You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12821 lines
4.4 MiB

/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.145.0
*
* Copyright 2011-2022 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
"use strict";var w3e=Object.create;var iD=Object.defineProperty;var I3e=Object.getOwnPropertyDescriptor;var P3e=Object.getOwnPropertyNames;var D3e=Object.getPrototypeOf,R3e=Object.prototype.hasOwnProperty;var O3e=(e,t,n)=>t in e?iD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var hs=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(i){throw n=[i],i}};var Yi=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Oq=(e,t)=>{for(var n in t)iD(e,n,{get:t[n],enumerable:!0})},tue=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of P3e(t))!R3e.call(e,r)&&r!==n&&iD(e,r,{get:()=>t[r],enumerable:!(i=I3e(t,r))||i.enumerable});return e};var Qo=(e,t,n)=>(n=e!=null?w3e(D3e(e)):{},tue(t||!e||!e.__esModule?iD(n,"default",{value:e,enumerable:!0}):n,e)),Fh=e=>tue(iD({},"__esModule",{value:!0}),e);var ut=(e,t,n)=>O3e(e,typeof t!="symbol"?t+"":t,n);var gj=Yi((t7t,nue)=>{var eg=function(e){e==null&&(e=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};eg.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};eg.prototype.init_by_array=function(e,t){var n,i,r;for(this.init_seed(19650218),n=1,i=0,r=this.N>t?this.N:t;r;r--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((o&4294901760)>>>16)*1664525<<16)+(o&65535)*1664525)+e[i]+i,this.mt[n]>>>=0,n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0)}for(r=this.N-1;r;r--){var o=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((o&4294901760)>>>16)*1566083941<<16)+(o&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648};eg.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[e&1],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0};eg.prototype.random_int31=function(){return this.random_int()>>>1};eg.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};eg.prototype.random=function(){return this.random_int()*(1/4294967296)};eg.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};eg.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};nue.exports=eg});var Tue=Yi((ov,sv)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof ov=="object"&&ov&&!ov.nodeType&&ov,n=typeof sv=="object"&&sv&&!sv.nodeType&&sv,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var r,o=2147483647,s=36,a=1,c=26,u=38,f=700,d=72,p=128,g="-",m=/^xn--/,y=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=s-a,T=Math.floor,E=String.fromCharCode,v;function S(B){throw new RangeError(b[B])}function I(B,j){for(var k=B.length,G=[];k--;)G[k]=j(B[k]);return G}function R(B,j){var k=B.split("@"),G="";k.length>1&&(G=k[0]+"@",B=k[1]),B=B.replace(A,".");var q=B.split("."),Q=I(q,j).join(".");return G+Q}function O(B){for(var j=[],k=0,G=B.length,q,Q;k<G;)q=B.charCodeAt(k++),q>=55296&&q<=56319&&k<G?(Q=B.charCodeAt(k++),(Q&64512)==56320?j.push(((q&1023)<<10)+(Q&1023)+65536):(j.push(q),k--)):j.push(q);return j}function L(B){return I(B,function(j){var k="";return j>65535&&(j-=65536,k+=E(j>>>10&1023|55296),j=56320|j&1023),k+=E(j),k}).join("")}function _(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:s}function C(B,j){return B+22+75*(B<26)-((j!=0)<<5)}function w(B,j,k){var G=0;for(B=k?T(B/f):B>>1,B+=T(B/j);B>x*c>>1;G+=s)B=T(B/x);return T(G+(x+1)*B/(B+u))}function P(B){var j=[],k=B.length,G,q=0,Q=p,W=d,J,Z,ae,Ae,fe,xe,ge,we,Se;for(J=B.lastIndexOf(g),J<0&&(J=0),Z=0;Z<J;++Z)B.charCodeAt(Z)>=128&&S("not-basic"),j.push(B.charCodeAt(Z));for(ae=J>0?J+1:0;ae<k;){for(Ae=q,fe=1,xe=s;ae>=k&&S("invalid-input"),ge=_(B.charCodeAt(ae++)),(ge>=s||ge>T((o-q)/fe))&&S("overflow"),q+=ge*fe,we=xe<=W?a:xe>=W+c?c:xe-W,!(ge<we);xe+=s)Se=s-we,fe>T(o/Se)&&S("overflow"),fe*=Se;G=j.length+1,W=w(q-Ae,G,Ae==0),T(q/G)>o-Q&&S("overflow"),Q+=T(q/G),q%=G,j.splice(q++,0,Q)}return L(j)}function M(B){var j,k,G,q,Q,W,J,Z,ae,Ae,fe,xe=[],ge,we,Se,Re;for(B=O(B),ge=B.length,j=p,k=0,Q=d,W=0;W<ge;++W)fe=B[W],fe<128&&xe.push(E(fe));for(G=q=xe.length,q&&xe.push(g);G<ge;){for(J=o,W=0;W<ge;++W)fe=B[W],fe>=j&&fe<J&&(J=fe);for(we=G+1,J-j>T((o-k)/we)&&S("overflow"),k+=(J-j)*we,j=J,W=0;W<ge;++W)if(fe=B[W],fe<j&&++k>o&&S("overflow"),fe==j){for(Z=k,ae=s;Ae=ae<=Q?a:ae>=Q+c?c:ae-Q,!(Z<Ae);ae+=s)Re=Z-Ae,Se=s-Ae,xe.push(E(C(Ae+Re%Se,0))),Z=T(Re/Se);xe.push(E(C(Z,0))),Q=w(k,we,G==q),k=0,++G}++k,++j}return xe.join("")}function F(B){return R(B,function(j){return m.test(j)?P(j.slice(4).toLowerCase()):j})}function V(B){return R(B,function(j){return y.test(j)?"xn--"+M(j):j})}if(r={version:"1.3.2",ucs2:{decode:O,encode:L},decode:P,encode:M,toASCII:V,toUnicode:F},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return r});else if(t&&n)if(sv.exports==t)n.exports=r;else for(v in r)r.hasOwnProperty(v)&&(t[v]=r[v]);else e.punycode=r})(ov)});var Cue=Yi((Eue,Sj)=>{/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof Sj=="object"&&Sj.exports?Sj.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(Eue,function(e){"use strict";var t=e&&e.IPv6;function n(r){var o=r.toLowerCase(),s=o.split(":"),a=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(c=7);var u;for(u=0;u<a&&s[u]!=="";u++);if(u<c)for(s.splice(u,1,"0000");s.length<c;)s.splice(u,0,"0000");for(var f,d=0;d<c;d++){f=s[d].split("");for(var p=0;p<3&&(f[0]==="0"&&f.length>1);p++)f.splice(0,1);s[d]=f.join("")}var g=-1,m=0,y=0,A=-1,b=!1;for(d=0;d<c;d++)b?s[d]==="0"?y+=1:(b=!1,y>m&&(g=A,m=y)):s[d]==="0"&&(b=!0,A=d,y=1);y>m&&(g=A,m=y),m>1&&s.splice(g,m,""),a=s.length;var x="";for(s[0]===""&&(x=":"),d=0;d<a&&(x+=s[d],d!==a-1);d++)x+=":";return s[a-1]===""&&(x+=":"),x}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var Sue=Yi((vue,wj)=>{/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof wj=="object"&&wj.exports?wj.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(vue,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(i){var r=i.lastIndexOf(".");if(r<=0||r>=i.length-1)return!1;var o=i.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return!1;var s=n.list[i.slice(r+1)];return s?s.indexOf(" "+i.slice(o+1,r)+" ")>=0:!1},is:function(i){var r=i.lastIndexOf(".");if(r<=0||r>=i.length-1)return!1;var o=i.lastIndexOf(".",r-1);if(o>=0)return!1;var s=n.list[i.slice(r+1)];return s?s.indexOf(" "+i.slice(0,r)+" ")>=0:!1},get:function(i){var r=i.lastIndexOf(".");if(r<=0||r>=i.length-1)return null;var o=i.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return null;var s=n.list[i.slice(r+1)];return!s||s.indexOf(" "+i.slice(o+1,r)+" ")<0?null:i.slice(o+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var xf=Yi((wue,Ij)=>{/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof Ij=="object"&&Ij.exports?Ij.exports=t(Tue(),Cue(),Sue()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(wue,function(e,t,n,i){"use strict";var r=i&&i.URI;function o(C,w){var P=arguments.length>=1,M=arguments.length>=2;if(!(this instanceof o))return P?M?new o(C,w):new o(C):new o;if(C===void 0){if(P)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?C=location.href+"":C=""}if(C===null&&P)throw new TypeError("null is not a valid argument for URI");return this.href(C),w!==void 0?this.absoluteTo(w):this}function s(C){return/^[0-9]+$/.test(C)}o.version="1.19.11";var a=o.prototype,c=Object.prototype.hasOwnProperty;function u(C){return C.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(C){return C===void 0?"Undefined":String(Object.prototype.toString.call(C)).slice(8,-1)}function d(C){return f(C)==="Array"}function p(C,w){var P={},M,F;if(f(w)==="RegExp")P=null;else if(d(w))for(M=0,F=w.length;M<F;M++)P[w[M]]=!0;else P[w]=!0;for(M=0,F=C.length;M<F;M++){var V=P&&P[C[M]]!==void 0||!P&&w.test(C[M]);V&&(C.splice(M,1),F--,M--)}return C}function g(C,w){var P,M;if(d(w)){for(P=0,M=w.length;P<M;P++)if(!g(C,w[P]))return!1;return!0}var F=f(w);for(P=0,M=C.length;P<M;P++)if(F==="RegExp"){if(typeof C[P]=="string"&&C[P].match(w))return!0}else if(C[P]===w)return!0;return!1}function m(C,w){if(!d(C)||!d(w)||C.length!==w.length)return!1;C.sort(),w.sort();for(var P=0,M=C.length;P<M;P++)if(C[P]!==w[P])return!1;return!0}function y(C){var w=/^\/+|\/+$/g;return C.replace(w,"")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(C){if(!(!C||!C.nodeName)){var w=C.nodeName.toLowerCase();if(!(w==="input"&&C.type!=="image"))return o.domAttributes[w]}};function A(C){return escape(C)}function b(C){return encodeURIComponent(C).replace(/[!'()*]/g,A).replace(/\*/g,"%2A")}o.encode=b,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=b,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(C,w){var P=o.encode(C+"");return w===void 0&&(w=o.escapeQuerySpace),w?P.replace(/%20/g,"+"):P},o.decodeQuery=function(C,w){C+="",w===void 0&&(w=o.escapeQuerySpace);try{return o.decode(w?C.replace(/\+/g,"%20"):C)}catch{return C}};var x={encode:"encode",decode:"decode"},T,E=function(C,w){return function(P){try{return o[w](P+"").replace(o.characters[C][w].expression,function(M){return o.characters[C][w].map[M]})}catch{return P}}};for(T in x)o[T+"PathSegment"]=E("pathname",x[T]),o[T+"UrnPathSegment"]=E("urnpath",x[T]);var v=function(C,w,P){return function(M){var F;P?F=function(k){return o[w](o[P](k))}:F=o[w];for(var V=(M+"").split(C),B=0,j=V.length;B<j;B++)V[B]=F(V[B]);return V.join(C)}};o.decodePath=v("/","decodePathSegment"),o.decodeUrnPath=v(":","decodeUrnPathSegment"),o.recodePath=v("/","encodePathSegment","decode"),o.recodeUrnPath=v(":","encodeUrnPathSegment","decode"),o.encodeReserved=E("reserved","encode"),o.parse=function(C,w){var P;return w||(w={preventInvalidHostname:o.preventInvalidHostname}),C=C.replace(o.leading_whitespace_expression,""),C=C.replace(o.ascii_tab_whitespace,""),P=C.indexOf("#"),P>-1&&(w.fragment=C.substring(P+1)||null,C=C.substring(0,P)),P=C.indexOf("?"),P>-1&&(w.query=C.substring(P+1)||null,C=C.substring(0,P)),C=C.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),C=C.replace(/^[/\\]{2,}/i,"//"),C.substring(0,2)==="//"?(w.protocol=null,C=C.substring(2),C=o.parseAuthority(C,w)):(P=C.indexOf(":"),P>-1&&(w.protocol=C.substring(0,P)||null,w.protocol&&!w.protocol.match(o.protocol_expression)?w.protocol=void 0:C.substring(P+1,P+3).replace(/\\/g,"/")==="//"?(C=C.substring(P+3),C=o.parseAuthority(C,w)):(C=C.substring(P+1),w.urn=!0))),w.path=C,w},o.parseHost=function(C,w){C||(C=""),C=C.replace(/\\/g,"/");var P=C.indexOf("/"),M,F;if(P===-1&&(P=C.length),C.charAt(0)==="[")M=C.indexOf("]"),w.hostname=C.substring(1,M)||null,w.port=C.substring(M+2,P)||null,w.port==="/"&&(w.port=null);else{var V=C.indexOf(":"),B=C.indexOf("/"),j=C.indexOf(":",V+1);j!==-1&&(B===-1||j<B)?(w.hostname=C.substring(0,P)||null,w.port=null):(F=C.substring(0,P).split(":"),w.hostname=F[0]||null,w.port=F[1]||null)}return w.hostname&&C.substring(P).charAt(0)!=="/"&&(P++,C="/"+C),w.preventInvalidHostname&&o.ensureValidHostname(w.hostname,w.protocol),w.port&&o.ensureValidPort(w.port),C.substring(P)||"/"},o.parseAuthority=function(C,w){return C=o.parseUserinfo(C,w),o.parseHost(C,w)},o.parseUserinfo=function(C,w){var P=C,M=C.indexOf("\\");M!==-1&&(C=C.replace(/\\/g,"/"));var F=C.indexOf("/"),V=C.lastIndexOf("@",F>-1?F:C.length-1),B;return V>-1&&(F===-1||V<F)?(B=C.substring(0,V).split(":"),w.username=B[0]?o.decode(B[0]):null,B.shift(),w.password=B[0]?o.decode(B.join(":")):null,C=P.substring(V+1)):(w.username=null,w.password=null),C},o.parseQuery=function(C,w){if(!C)return{};if(C=C.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!C)return{};for(var P={},M=C.split("&"),F=M.length,V,B,j,k=0;k<F;k++)V=M[k].split("="),B=o.decodeQuery(V.shift(),w),j=V.length?o.decodeQuery(V.join("="),w):null,B!=="__proto__"&&(c.call(P,B)?((typeof P[B]=="string"||P[B]===null)&&(P[B]=[P[B]]),P[B].push(j)):P[B]=j);return P},o.build=function(C){var w="",P=!1;return C.protocol&&(w+=C.protocol+":"),!C.urn&&(w||C.hostname)&&(w+="//",P=!0),w+=o.buildAuthority(C)||"",typeof C.path=="string"&&(C.path.charAt(0)!=="/"&&P&&(w+="/"),w+=C.path),typeof C.query=="string"&&C.query&&(w+="?"+C.query),typeof C.fragment=="string"&&C.fragment&&(w+="#"+C.fragment),w},o.buildHost=function(C){var w="";if(C.hostname)o.ip6_expression.test(C.hostname)?w+="["+C.hostname+"]":w+=C.hostname;else return"";return C.port&&(w+=":"+C.port),w},o.buildAuthority=function(C){return o.buildUserinfo(C)+o.buildHost(C)},o.buildUserinfo=function(C){var w="";return C.username&&(w+=o.encode(C.username)),C.password&&(w+=":"+o.encode(C.password)),w&&(w+="@"),w},o.buildQuery=function(C,w,P){var M="",F,V,B,j;for(V in C)if(V!=="__proto__"&&c.call(C,V))if(d(C[V]))for(F={},B=0,j=C[V].length;B<j;B++)C[V][B]!==void 0&&F[C[V][B]+""]===void 0&&(M+="&"+o.buildQueryParameter(V,C[V][B],P),w!==!0&&(F[C[V][B]+""]=!0));else C[V]!==void 0&&(M+="&"+o.buildQueryParameter(V,C[V],P));return M.substring(1)},o.buildQueryParameter=function(C,w,P){return o.encodeQuery(C,P)+(w!==null?"="+o.encodeQuery(w,P):"")},o.addQuery=function(C,w,P){if(typeof w=="object")for(var M in w)c.call(w,M)&&o.addQuery(C,M,w[M]);else if(typeof w=="string"){if(C[w]===void 0){C[w]=P;return}else typeof C[w]=="string"&&(C[w]=[C[w]]);d(P)||(P=[P]),C[w]=(C[w]||[]).concat(P)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},o.setQuery=function(C,w,P){if(typeof w=="object")for(var M in w)c.call(w,M)&&o.setQuery(C,M,w[M]);else if(typeof w=="string")C[w]=P===void 0?null:P;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},o.removeQuery=function(C,w,P){var M,F,V;if(d(w))for(M=0,F=w.length;M<F;M++)C[w[M]]=void 0;else if(f(w)==="RegExp")for(V in C)w.test(V)&&(C[V]=void 0);else if(typeof w=="object")for(V in w)c.call(w,V)&&o.removeQuery(C,V,w[V]);else if(typeof w=="string")P!==void 0?f(P)==="RegExp"?!d(C[w])&&P.test(C[w])?C[w]=void 0:C[w]=p(C[w],P):C[w]===String(P)&&(!d(P)||P.length===1)?C[w]=void 0:d(C[w])&&(C[w]=p(C[w],P)):C[w]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},o.hasQuery=function(C,w,P,M){switch(f(w)){case"String":break;case"RegExp":for(var F in C)if(c.call(C,F)&&w.test(F)&&(P===void 0||o.hasQuery(C,F,P)))return!0;return!1;case"Object":for(var V in w)if(c.call(w,V)&&!o.hasQuery(C,V,w[V]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(f(P)){case"Undefined":return w in C;case"Boolean":var B=!!(d(C[w])?C[w].length:C[w]);return P===B;case"Function":return!!P(C[w],w,C);case"Array":if(!d(C[w]))return!1;var j=M?g:m;return j(C[w],P);case"RegExp":return d(C[w])?M?g(C[w],P):!1:!!(C[w]&&C[w].match(P));case"Number":P=String(P);case"String":return d(C[w])?M?g(C[w],P):!1:C[w]===P;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var C=[],w=[],P=0,M=0;M<arguments.length;M++){var F=new o(arguments[M]);C.push(F);for(var V=F.segment(),B=0;B<V.length;B++)typeof V[B]=="string"&&w.push(V[B]),V[B]&&P++}if(!w.length||!P)return new o("");var j=new o("").segment(w);return(C[0].path()===""||C[0].path().slice(0,1)==="/")&&j.path("/"+j.path()),j.normalize()},o.commonPath=function(C,w){var P=Math.min(C.length,w.length),M;for(M=0;M<P;M++)if(C.charAt(M)!==w.charAt(M)){M--;break}return M<1?C.charAt(0)===w.charAt(0)&&C.charAt(0)==="/"?"/":"":((C.charAt(M)!=="/"||w.charAt(M)!=="/")&&(M=C.substring(0,M).lastIndexOf("/")),C.substring(0,M+1))},o.withinString=function(C,w,P){P||(P={});var M=P.start||o.findUri.start,F=P.end||o.findUri.end,V=P.trim||o.findUri.trim,B=P.parens||o.findUri.parens,j=/[a-z0-9-]=["']?$/i;for(M.lastIndex=0;;){var k=M.exec(C);if(!k)break;var G=k.index;if(P.ignoreHtml){var q=C.slice(Math.max(G-3,0),G);if(q&&j.test(q))continue}for(var Q=G+C.slice(G).search(F),W=C.slice(G,Q),J=-1;;){var Z=B.exec(W);if(!Z)break;var ae=Z.index+Z[0].length;J=Math.max(J,ae)}if(J>-1?W=W.slice(0,J)+W.slice(J).replace(V,""):W=W.replace(V,""),!(W.length<=k[0].length)&&!(P.ignore&&P.ignore.test(W))){Q=G+W.length;var Ae=w(W,G,Q,C);if(Ae===void 0){M.lastIndex=Q;continue}Ae=String(Ae),C=C.slice(0,G)+Ae+C.slice(Q),M.lastIndex=G+Ae.length}}return M.lastIndex=0,C},o.ensureValidHostname=function(C,w){var P=!!C,M=!!w,F=!1;if(M&&(F=g(o.hostProtocols,w)),F&&!P)throw new TypeError("Hostname cannot be empty, if protocol is "+w);if(C&&C.match(o.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(C).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(C){if(C){var w=Number(C);if(!(s(w)&&w>0&&w<65536))throw new TypeError('Port "'+C+'" is not a valid port')}},o.noConflict=function(C){if(C){var w={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(w.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(w.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(w.SecondLevelDomains=i.SecondLevelDomains.noConflict()),w}else i.URI===this&&(i.URI=r);return this},a.build=function(C){return C===!0?this._deferred_build=!0:(C===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new o(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function S(C){return function(w,P){return w===void 0?this._parts[C]||"":(this._parts[C]=w||null,this.build(!P),this)}}function I(C,w){return function(P,M){return P===void 0?this._parts[C]||"":(P!==null&&(P=P+"",P.charAt(0)===w&&(P=P.substring(1))),this._parts[C]=P,this.build(!M),this)}}a.protocol=S("protocol"),a.username=S("username"),a.password=S("password"),a.hostname=S("hostname"),a.port=S("port"),a.query=I("query","?"),a.fragment=I("fragment","#"),a.search=function(C,w){var P=this.query(C,w);return typeof P=="string"&&P.length?"?"+P:P},a.hash=function(C,w){var P=this.fragment(C,w);return typeof P=="string"&&P.length?"#"+P:P},a.pathname=function(C,w){if(C===void 0||C===!0){var P=this._parts.path||(this._parts.hostname?"/":"");return C?(this._parts.urn?o.decodeUrnPath:o.decodePath)(P):P}else return this._parts.urn?this._parts.path=C?o.recodeUrnPath(C):"":this._parts.path=C?o.recodePath(C):"/",this.build(!w),this},a.path=a.pathname,a.href=function(C,w){var P;if(C===void 0)return this.toString();this._string="",this._parts=o._parts();var M=C instanceof o,F=typeof C=="object"&&(C.hostname||C.path||C.pathname);if(C.nodeName){var V=o.getDomAttribute(C);C=C[V]||"",F=!1}if(!M&&F&&C.pathname!==void 0&&(C=C.toString()),typeof C=="string"||C instanceof String)this._parts=o.parse(String(C),this._parts);else if(M||F){var B=M?C._parts:C;for(P in B)P!=="query"&&c.call(this._parts,P)&&(this._parts[P]=B[P]);B.query&&this.query(B.query,!1)}else throw new TypeError("invalid input");return this.build(!w),this},a.is=function(C){var w=!1,P=!1,M=!1,F=!1,V=!1,B=!1,j=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,P=o.ip4_expression.test(this._parts.hostname),M=o.ip6_expression.test(this._parts.hostname),w=P||M,F=!w,V=F&&n&&n.has(this._parts.hostname),B=F&&o.idn_expression.test(this._parts.hostname),j=F&&o.punycode_expression.test(this._parts.hostname)),C.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return F;case"sld":return V;case"ip":return w;case"ip4":case"ipv4":case"inet4":return P;case"ip6":case"ipv6":case"inet6":return M;case"idn":return B;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var R=a.protocol,O=a.port,L=a.hostname;a.protocol=function(C,w){if(C&&(C=C.replace(/:(\/\/)?$/,""),!C.match(o.protocol_expression)))throw new TypeError('Protocol "'+C+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return R.call(this,C,w)},a.scheme=a.protocol,a.port=function(C,w){return this._parts.urn?C===void 0?"":this:(C!==void 0&&(C===0&&(C=null),C&&(C+="",C.charAt(0)===":"&&(C=C.substring(1)),o.ensureValidPort(C))),O.call(this,C,w))},a.hostname=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C!==void 0){var P={preventInvalidHostname:this._parts.preventInvalidHostname},M=o.parseHost(C,P);if(M!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');C=P.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(C,this._parts.protocol)}return L.call(this,C,w)},a.origin=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var P=this.protocol(),M=this.authority();return M?(P?P+"://":"")+this.authority():""}else{var F=o(C);return this.protocol(F.protocol()).authority(F.authority()).build(!w),this}},a.host=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var P=o.parseHost(C,this._parts);if(P!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!w),this},a.authority=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var P=o.parseAuthority(C,this._parts);if(P!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!w),this},a.userinfo=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var P=o.buildUserinfo(this._parts);return P&&P.substring(0,P.length-1)}else return C[C.length-1]!=="@"&&(C+="@"),o.parseUserinfo(C,this._parts),this.build(!w),this},a.resource=function(C,w){var P;return C===void 0?this.path()+this.search()+this.hash():(P=o.parse(C),this._parts.path=P.path,this._parts.query=P.query,this._parts.fragment=P.fragment,this.build(!w),this)},a.subdomain=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var P=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,P)||""}else{var M=this._parts.hostname.length-this.domain().length,F=this._parts.hostname.substring(0,M),V=new RegExp("^"+u(F));if(C&&C.charAt(C.length-1)!=="."&&(C+="."),C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return C&&o.ensureValidHostname(C,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(V,C),this.build(!w),this}},a.domain=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(w=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var P=this._parts.hostname.match(/\./g);if(P&&P.length<2)return this._parts.hostname;var M=this._parts.hostname.length-this.tld(w).length-1;return M=this._parts.hostname.lastIndexOf(".",M-1)+1,this._parts.hostname.substring(M)||""}else{if(!C)throw new TypeError("cannot set domain empty");if(C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(C,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=C;else{var F=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(F,C)}return this.build(!w),this}},a.tld=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(w=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var P=this._parts.hostname.lastIndexOf("."),M=this._parts.hostname.substring(P+1);return w!==!0&&n&&n.list[M.toLowerCase()]&&n.get(this._parts.hostname)||M}else{var F;if(C)if(C.match(/[^a-zA-Z0-9-]/))if(n&&n.is(C))F=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(F,C);else throw new TypeError('TLD "'+C+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");F=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(F,C)}else throw new TypeError("cannot set TLD empty");return this.build(!w),this}},a.directory=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var P=this._parts.path.length-this.filename().length-1,M=this._parts.path.substring(0,P)||(this._parts.hostname?"/":"");return C?o.decodePath(M):M}else{var F=this._parts.path.length-this.filename().length,V=this._parts.path.substring(0,F),B=new RegExp("^"+u(V));return this.is("relative")||(C||(C="/"),C.charAt(0)!=="/"&&(C="/"+C)),C&&C.charAt(C.length-1)!=="/"&&(C+="/"),C=o.recodePath(C),this._parts.path=this._parts.path.replace(B,C),this.build(!w),this}},a.filename=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(typeof C!="string"){if(!this._parts.path||this._parts.path==="/")return"";var P=this._parts.path.lastIndexOf("/"),M=this._parts.path.substring(P+1);return C?o.decodePathSegment(M):M}else{var F=!1;C.charAt(0)==="/"&&(C=C.substring(1)),C.match(/\.?\//)&&(F=!0);var V=new RegExp(u(this.filename())+"$");return C=o.recodePath(C),this._parts.path=this._parts.path.replace(V,C),F?this.normalizePath(w):this.build(!w),this}},a.suffix=function(C,w){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path||this._parts.path==="/")return"";var P=this.filename(),M=P.lastIndexOf("."),F,V;return M===-1?"":(F=P.substring(M+1),V=/^[a-z0-9%]+$/i.test(F)?F:"",C?o.decodePathSegment(V):V)}else{C.charAt(0)==="."&&(C=C.substring(1));var B=this.suffix(),j;if(B)C?j=new RegExp(u(B)+"$"):j=new RegExp(u("."+B)+"$");else{if(!C)return this;this._parts.path+="."+o.recodePath(C)}return j&&(C=o.recodePath(C),this._parts.path=this._parts.path.replace(j,C)),this.build(!w),this}},a.segment=function(C,w,P){var M=this._parts.urn?":":"/",F=this.path(),V=F.substring(0,1)==="/",B=F.split(M);if(C!==void 0&&typeof C!="number"&&(P=w,w=C,C=void 0),C!==void 0&&typeof C!="number")throw new Error('Bad segment "'+C+'", must be 0-based integer');if(V&&B.shift(),C<0&&(C=Math.max(B.length+C,0)),w===void 0)return C===void 0?B:B[C];if(C===null||B[C]===void 0)if(d(w)){B=[];for(var j=0,k=w.length;j<k;j++)!w[j].length&&(!B.length||!B[B.length-1].length)||(B.length&&!B[B.length-1].length&&B.pop(),B.push(y(w[j])))}else(w||typeof w=="string")&&(w=y(w),B[B.length-1]===""?B[B.length-1]=w:B.push(w));else w?B[C]=y(w):B.splice(C,1);return V&&B.unshift(""),this.path(B.join(M),P)},a.segmentCoded=function(C,w,P){var M,F,V;if(typeof C!="number"&&(P=w,w=C,C=void 0),w===void 0){if(M=this.segment(C,w,P),!d(M))M=M!==void 0?o.decode(M):void 0;else for(F=0,V=M.length;F<V;F++)M[F]=o.decode(M[F]);return M}if(!d(w))w=typeof w=="string"||w instanceof String?o.encode(w):w;else for(F=0,V=w.length;F<V;F++)w[F]=o.encode(w[F]);return this.segment(C,w,P)};var _=a.query;return a.query=function(C,w){if(C===!0)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="function"){var P=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),M=C.call(this,P);return this._parts.query=o.buildQuery(M||P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!w),this}else return C!==void 0&&typeof C!="string"?(this._parts.query=o.buildQuery(C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!w),this):_.call(this,C,w)},a.setQuery=function(C,w,P){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="string"||C instanceof String)M[C]=w!==void 0?w:null;else if(typeof C=="object")for(var F in C)c.call(C,F)&&(M[F]=C[F]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=o.buildQuery(M,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(P=w),this.build(!P),this},a.addQuery=function(C,w,P){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(M,C,w===void 0?null:w),this._parts.query=o.buildQuery(M,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(P=w),this.build(!P),this},a.removeQuery=function(C,w,P){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(M,C,w),this._parts.query=o.buildQuery(M,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(P=w),this.build(!P),this},a.hasQuery=function(C,w,P){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(M,C,w,P)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(C){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!C)),this},a.normalizeHostname=function(C){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!C)),this},a.normalizePort=function(C){return typeof this._parts.protocol=="string"&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!C)),this},a.normalizePath=function(C){var w=this._parts.path;if(!w)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!C),this;if(this._parts.path==="/")return this;w=o.recodePath(w);var P,M="",F,V;for(w.charAt(0)!=="/"&&(P=!0,w="/"+w),(w.slice(-3)==="/.."||w.slice(-2)==="/.")&&(w+="/"),w=w.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),P&&(M=w.substring(1).match(/^(\.\.\/)+/)||"",M&&(M=M[0]));F=w.search(/\/\.\.(\/|$)/),F!==-1;){if(F===0){w=w.substring(3);continue}V=w.substring(0,F).lastIndexOf("/"),V===-1&&(V=F),w=w.substring(0,V)+w.substring(F+3)}return P&&this.is("relative")&&(w=M+w.substring(1)),this._parts.path=w,this.build(!C),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(C){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!C)),this},a.normalizeFragment=function(C){return this._parts.fragment||(this._parts.fragment=null,this.build(!C)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var C=o.encode,w=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=C,o.decode=w}return this},a.unicode=function(){var C=o.encode,w=o.decode;o.encode=b,o.decode=unescape;try{this.normalize()}finally{o.encode=C,o.decode=w}return this},a.readable=function(){var C=this.clone();C.username("").password("").normalize();var w="";if(C._parts.protocol&&(w+=C._parts.protocol+"://"),C._parts.hostname&&(C.is("punycode")&&e?(w+=e.toUnicode(C._parts.hostname),C._parts.port&&(w+=":"+C._parts.port)):w+=C.host()),C._parts.hostname&&C._parts.path&&C._parts.path.charAt(0)!=="/"&&(w+="/"),w+=C.path(!0),C._parts.query){for(var P="",M=0,F=C._parts.query.split("&"),V=F.length;M<V;M++){var B=(F[M]||"").split("=");P+="&"+o.decodeQuery(B[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),B[1]!==void 0&&(P+="="+o.decodeQuery(B[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}w+="?"+P.substring(1)}return w+=o.decodeQuery(C.hash(),!0),w},a.absoluteTo=function(C){var w=this.clone(),P=["protocol","username","password","hostname","port"],M,F,V;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C instanceof o||(C=new o(C)),w._parts.protocol||(w._parts.protocol=C._parts.protocol,this._parts.hostname))return w;for(F=0;V=P[F];F++)w._parts[V]=C._parts[V];return w._parts.path?(w._parts.path.substring(-2)===".."&&(w._parts.path+="/"),w.path().charAt(0)!=="/"&&(M=C.directory(),M=M||(C.path().indexOf("/")===0?"/":""),w._parts.path=(M?M+"/":"")+w._parts.path,w.normalizePath())):(w._parts.path=C._parts.path,w._parts.query||(w._parts.query=C._parts.query)),w.build(),w},a.relativeTo=function(C){var w=this.clone().normalize(),P,M,F,V,B;if(w._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C=new o(C).normalize(),P=w._parts,M=C._parts,V=w.path(),B=C.path(),V.charAt(0)!=="/")throw new Error("URI is already relative");if(B.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(P.protocol===M.protocol&&(P.protocol=null),P.username!==M.username||P.password!==M.password||P.protocol!==null||P.username!==null||P.password!==null)return w.build();if(P.hostname===M.hostname&&P.port===M.port)P.hostname=null,P.port=null;else return w.build();if(V===B)return P.path="",w.build();if(F=o.commonPath(V,B),!F)return w.build();var j=M.path.substring(F.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return P.path=j+P.path.substring(F.length)||"./",w.build()},a.equals=function(C){var w=this.clone(),P=new o(C),M={},F={},V={},B,j,k;if(w.normalize(),P.normalize(),w.toString()===P.toString())return!0;if(B=w.query(),j=P.query(),w.query(""),P.query(""),w.toString()!==P.toString()||B.length!==j.length)return!1;M=o.parseQuery(B,this._parts.escapeQuerySpace),F=o.parseQuery(j,this._parts.escapeQuerySpace);for(k in M)if(c.call(M,k)){if(d(M[k])){if(!m(M[k],F[k]))return!1}else if(M[k]!==F[k])return!1;V[k]=!0}for(k in F)if(c.call(F,k)&&!V[k])return!1;return!0},a.preventInvalidHostname=function(C){return this._parts.preventInvalidHostname=!!C,this},a.duplicateQueryParameters=function(C){return this._parts.duplicateQueryParameters=!!C,this},a.escapeQuerySpace=function(C){return this._parts.escapeQuerySpace=!!C,this},o})});var Jbe=Yi((SJn,$be)=>{"use strict";$be.exports=Pct;var MB=1e20;function Pct(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,r=t.channel||0,o,s,a,c,u,f,d,p,g,m,y;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");o=t.width,s=t.height,c=e,t.stride?f=t.stride:f=Math.floor(e.length/o/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,d=p.getContext("2d"),o=p.width,s=p.height,g=d.getImageData(0,0,o,s),c=g.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,d=e,o=p.width,s=p.height,g=d.getImageData(0,0,o,s),c=g.data,f=4):window.ImageData&&e instanceof window.ImageData&&(g=e,o=e.width,s=e.height,c=g.data,f=4);if(a=Math.max(o,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(u=c,c=Array(o*s),m=0,y=Math.floor(u.length/f);m<y;m++)c[m]=u[m*f+r]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var A=Array(o*s),b=Array(o*s),x=Array(a),T=Array(a),E=Array(a+1),v=Array(a);for(m=0,y=o*s;m<y;m++){var S=c[m];A[m]=S===1?0:S===0?MB:Math.pow(Math.max(0,.5-S),2),b[m]=S===1?MB:S===0?0:Math.pow(Math.max(0,S-.5),2)}Xbe(A,o,s,x,T,v,E),Xbe(b,o,s,x,T,v,E);var I=window.Float32Array?new Float32Array(o*s):new Array(o*s);for(m=0,y=o*s;m<y;m++)I[m]=Math.min(Math.max(1-((A[m]-b[m])/i+n),0),1);return I}function Xbe(e,t,n,i,r,o,s){for(var a=0;a<t;a++){for(var c=0;c<n;c++)i[c]=e[c*t+a];for(Kbe(i,r,o,s,n),c=0;c<n;c++)e[c*t+a]=r[c]}for(c=0;c<n;c++){for(a=0;a<t;a++)i[a]=e[c*t+a];for(Kbe(i,r,o,s,t),a=0;a<t;a++)e[c*t+a]=Math.sqrt(r[a])}}function Kbe(e,t,n,i,r){n[0]=0,i[0]=-MB,i[1]=+MB;for(var o=1,s=0;o<r;o++){for(var a=(e[o]+o*o-(e[n[s]]+n[s]*n[s]))/(2*o-2*n[s]);a<=i[s];)s--,a=(e[o]+o*o-(e[n[s]]+n[s]*n[s]))/(2*o-2*n[s]);s++,n[s]=o,i[s]=a,i[s+1]=+MB}for(o=0,s=0;o<r;o++){for(;i[s+1]<o;)s++;t[o]=(o-n[s])*(o-n[s])+e[n[s]]}}});var ixe=Yi((HJn,VH)=>{function Uct(){var e=0,t=1,n=2,i=3,r=4,o=5,s=6,a=7,c=8,u=9,f=10,d=11,p=12,g=13,m=14,y=15,A=16,b=17,x=0,T=1,E=2,v=3,S=4;function I(_,C){return 55296<=_.charCodeAt(C)&&_.charCodeAt(C)<=56319&&56320<=_.charCodeAt(C+1)&&_.charCodeAt(C+1)<=57343}function R(_,C){C===void 0&&(C=0);var w=_.charCodeAt(C);if(55296<=w&&w<=56319&&C<_.length-1){var P=w,M=_.charCodeAt(C+1);return 56320<=M&&M<=57343?(P-55296)*1024+(M-56320)+65536:P}if(56320<=w&&w<=57343&&C>=1){var P=_.charCodeAt(C-1),M=w;return 55296<=P&&P<=56319?(P-55296)*1024+(M-56320)+65536:M}return w}function O(_,C,w){var P=[_].concat(C).concat([w]),M=P[P.length-2],F=w,V=P.lastIndexOf(m);if(V>1&&P.slice(1,V).every(function(k){return k==i})&&[i,g,b].indexOf(_)==-1)return E;var B=P.lastIndexOf(r);if(B>0&&P.slice(1,B).every(function(k){return k==r})&&[p,r].indexOf(M)==-1)return P.filter(function(k){return k==r}).length%2==1?v:S;if(M==e&&F==t)return x;if(M==n||M==e||M==t)return F==m&&C.every(function(k){return k==i})?E:T;if(F==n||F==e||F==t)return T;if(M==s&&(F==s||F==a||F==u||F==f))return x;if((M==u||M==a)&&(F==a||F==c))return x;if((M==f||M==c)&&F==c)return x;if(F==i||F==y)return x;if(F==o)return x;if(M==p)return x;var j=P.indexOf(i)!=-1?P.lastIndexOf(i)-1:P.length-2;return[g,b].indexOf(P[j])!=-1&&P.slice(j+1,-1).every(function(k){return k==i})&&F==m||M==y&&[A,b].indexOf(F)!=-1?x:C.indexOf(r)!=-1?E:M==r&&F==r?x:T}this.nextBreak=function(_,C){if(C===void 0&&(C=0),C<0)return 0;if(C>=_.length-1)return _.length;for(var w=L(R(_,C)),P=[],M=C+1;M<_.length;M++)if(!I(_,M-1)){var F=L(R(_,M));if(O(w,P,F))return M;P.push(F)}return _.length},this.splitGraphemes=function(_){for(var C=[],w=0,P;(P=this.nextBreak(_,w))<_.length;)C.push(_.slice(w,P)),w=P;return w<_.length&&C.push(_.slice(w)),C},this.iterateGraphemes=function(_){var C=0,w={next:(function(){var P,M;return(M=this.nextBreak(_,C))<_.length?(P=_.slice(C,M),C=M,{value:P,done:!1}):C<_.length?(P=_.slice(C),C=_.length,{value:P,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(w[Symbol.iterator]=function(){return w}),w},this.countGraphemes=function(_){for(var C=0,w=0,P;(P=this.nextBreak(_,w))<_.length;)w=P,C++;return w<_.length&&C++,C};function L(_){return 1536<=_&&_<=1541||_==1757||_==1807||_==2274||_==3406||_==69821||70082<=_&&_<=70083||_==72250||72326<=_&&_<=72329||_==73030?p:_==13?e:_==10?t:0<=_&&_<=9||11<=_&&_<=12||14<=_&&_<=31||127<=_&&_<=159||_==173||_==1564||_==6158||_==8203||8206<=_&&_<=8207||_==8232||_==8233||8234<=_&&_<=8238||8288<=_&&_<=8292||_==8293||8294<=_&&_<=8303||55296<=_&&_<=57343||_==65279||65520<=_&&_<=65528||65529<=_&&_<=65531||113824<=_&&_<=113827||119155<=_&&_<=119162||_==917504||_==917505||917506<=_&&_<=917535||917632<=_&&_<=917759||918e3<=_&&_<=921599?n:768<=_&&_<=879||1155<=_&&_<=1159||1160<=_&&_<=1161||1425<=_&&_<=1469||_==1471||1473<=_&&_<=1474||1476<=_&&_<=1477||_==1479||1552<=_&&_<=1562||1611<=_&&_<=1631||_==1648||1750<=_&&_<=1756||1759<=_&&_<=1764||1767<=_&&_<=1768||1770<=_&&_<=1773||_==1809||1840<=_&&_<=1866||1958<=_&&_<=1968||2027<=_&&_<=2035||2070<=_&&_<=2073||2075<=_&&_<=2083||2085<=_&&_<=2087||2089<=_&&_<=2093||2137<=_&&_<=2139||2260<=_&&_<=2273||2275<=_&&_<=2306||_==2362||_==2364||2369<=_&&_<=2376||_==2381||2385<=_&&_<=2391||2402<=_&&_<=2403||_==2433||_==2492||_==2494||2497<=_&&_<=2500||_==2509||_==2519||2530<=_&&_<=2531||2561<=_&&_<=2562||_==2620||2625<=_&&_<=2626||2631<=_&&_<=2632||2635<=_&&_<=2637||_==2641||2672<=_&&_<=2673||_==2677||2689<=_&&_<=2690||_==2748||2753<=_&&_<=2757||2759<=_&&_<=2760||_==2765||2786<=_&&_<=2787||2810<=_&&_<=2815||_==2817||_==2876||_==2878||_==2879||2881<=_&&_<=2884||_==2893||_==2902||_==2903||2914<=_&&_<=2915||_==2946||_==3006||_==3008||_==3021||_==3031||_==3072||3134<=_&&_<=3136||3142<=_&&_<=3144||3146<=_&&_<=3149||3157<=_&&_<=3158||3170<=_&&_<=3171||_==3201||_==3260||_==3263||_==3266||_==3270||3276<=_&&_<=3277||3285<=_&&_<=3286||3298<=_&&_<=3299||3328<=_&&_<=3329||3387<=_&&_<=3388||_==3390||3393<=_&&_<=3396||_==3405||_==3415||3426<=_&&_<=3427||_==3530||_==3535||3538<=_&&_<=3540||_==3542||_==3551||_==3633||3636<=_&&_<=3642||3655<=_&&_<=3662||_==3761||3764<=_&&_<=3769||3771<=_&&_<=3772||3784<=_&&_<=3789||3864<=_&&_<=3865||_==3893||_==3895||_==3897||3953<=_&&_<=3966||3968<=_&&_<=3972||3974<=_&&_<=3975||3981<=_&&_<=3991||3993<=_&&_<=4028||_==4038||4141<=_&&_<=4144||4146<=_&&_<=4151||4153<=_&&_<=4154||4157<=_&&_<=4158||4184<=_&&_<=4185||4190<=_&&_<=4192||4209<=_&&_<=4212||_==4226||4229<=_&&_<=4230||_==4237||_==4253||4957<=_&&_<=4959||5906<=_&&_<=5908||5938<=_&&_<=5940||5970<=_&&_<=5971||6002<=_&&_<=6003||6068<=_&&_<=6069||6071<=_&&_<=6077||_==6086||6089<=_&&_<=6099||_==6109||6155<=_&&_<=6157||6277<=_&&_<=6278||_==6313||6432<=_&&_<=6434||6439<=_&&_<=6440||_==6450||6457<=_&&_<=6459||6679<=_&&_<=6680||_==6683||_==6742||6744<=_&&_<=6750||_==6752||_==6754||6757<=_&&_<=6764||6771<=_&&_<=6780||_==6783||6832<=_&&_<=6845||_==6846||6912<=_&&_<=6915||_==6964||6966<=_&&_<=6970||_==6972||_==6978||7019<=_&&_<=7027||7040<=_&&_<=7041||7074<=_&&_<=7077||7080<=_&&_<=7081||7083<=_&&_<=7085||_==7142||7144<=_&&_<=7145||_==7149||7151<=_&&_<=7153||7212<=_&&_<=7219||7222<=_&&_<=7223||7376<=_&&_<=7378||7380<=_&&_<=7392||7394<=_&&_<=7400||_==7405||_==7412||7416<=_&&_<=7417||7616<=_&&_<=7673||7675<=_&&_<=7679||_==8204||8400<=_&&_<=8412||8413<=_&&_<=8416||_==8417||8418<=_&&_<=8420||8421<=_&&_<=8432||11503<=_&&_<=11505||_==11647||11744<=_&&_<=11775||12330<=_&&_<=12333||12334<=_&&_<=12335||12441<=_&&_<=12442||_==42607||42608<=_&&_<=42610||42612<=_&&_<=42621||42654<=_&&_<=42655||42736<=_&&_<=42737||_==43010||_==43014||_==43019||43045<=_&&_<=43046||43204<=_&&_<=43205||43232<=_&&_<=43249||43302<=_&&_<=43309||43335<=_&&_<=43345||43392<=_&&_<=43394||_==43443||43446<=_&&_<=43449||_==43452||_==43493||43561<=_&&_<=43566||43569<=_&&_<=43570||43573<=_&&_<=43574||_==43587||_==43596||_==43644||_==43696||43698<=_&&_<=43700||43703<=_&&_<=43704||43710<=_&&_<=43711||_==43713||43756<=_&&_<=43757||_==43766||_==44005||_==44008||_==44013||_==64286||65024<=_&&_<=65039||65056<=_&&_<=65071||65438<=_&&_<=65439||_==66045||_==66272||66422<=_&&_<=66426||68097<=_&&_<=68099||68101<=_&&_<=68102||68108<=_&&_<=68111||68152<=_&&_<=68154||_==68159||68325<=_&&_<=68326||_==69633||69688<=_&&_<=69702||69759<=_&&_<=69761||69811<=_&&_<=69814||69817<=_&&_<=69818||69888<=_&&_<=69890||69927<=_&&_<=69931||69933<=_&&_<=69940||_==70003||70016<=_&&_<=70017||70070<=_&&_<=70078||70090<=_&&_<=70092||70191<=_&&_<=70193||_==70196||70198<=_&&_<=70199||_==70206||_==70367||70371<=_&&_<=70378||70400<=_&&_<=70401||_==70460||_==70462||_==70464||_==70487||70502<=_&&_<=70508||70512<=_&&_<=70516||70712<=_&&_<=70719||70722<=_&&_<=70724||_==70726||_==70832||70835<=_&&_<=70840||_==70842||_==70845||70847<=_&&_<=70848||70850<=_&&_<=70851||_==71087||71090<=_&&_<=71093||71100<=_&&_<=71101||71103<=_&&_<=71104||71132<=_&&_<=71133||71219<=_&&_<=71226||_==71229||71231<=_&&_<=71232||_==71339||_==71341||71344<=_&&_<=71349||_==71351||71453<=_&&_<=71455||71458<=_&&_<=71461||71463<=_&&_<=71467||72193<=_&&_<=72198||72201<=_&&_<=72202||72243<=_&&_<=72248||72251<=_&&_<=72254||_==72263||72273<=_&&_<=72278||72281<=_&&_<=72283||72330<=_&&_<=72342||72344<=_&&_<=72345||72752<=_&&_<=72758||72760<=_&&_<=72765||_==72767||72850<=_&&_<=72871||72874<=_&&_<=72880||72882<=_&&_<=72883||72885<=_&&_<=72886||73009<=_&&_<=73014||_==73018||73020<=_&&_<=73021||73023<=_&&_<=73029||_==73031||92912<=_&&_<=92916||92976<=_&&_<=92982||94095<=_&&_<=94098||113821<=_&&_<=113822||_==119141||119143<=_&&_<=119145||119150<=_&&_<=119154||119163<=_&&_<=119170||119173<=_&&_<=119179||119210<=_&&_<=119213||119362<=_&&_<=119364||121344<=_&&_<=121398||121403<=_&&_<=121452||_==121461||_==121476||121499<=_&&_<=121503||121505<=_&&_<=121519||122880<=_&&_<=122886||122888<=_&&_<=122904||122907<=_&&_<=122913||122915<=_&&_<=122916||122918<=_&&_<=122922||125136<=_&&_<=125142||125252<=_&&_<=125258||917536<=_&&_<=917631||917760<=_&&_<=917999?i:127462<=_&&_<=127487?r:_==2307||_==2363||2366<=_&&_<=2368||2377<=_&&_<=2380||2382<=_&&_<=2383||2434<=_&&_<=2435||2495<=_&&_<=2496||2503<=_&&_<=2504||2507<=_&&_<=2508||_==2563||2622<=_&&_<=2624||_==2691||2750<=_&&_<=2752||_==2761||2763<=_&&_<=2764||2818<=_&&_<=2819||_==2880||2887<=_&&_<=2888||2891<=_&&_<=2892||_==3007||3009<=_&&_<=3010||3014<=_&&_<=3016||3018<=_&&_<=3020||3073<=_&&_<=3075||3137<=_&&_<=3140||3202<=_&&_<=3203||_==3262||3264<=_&&_<=3265||3267<=_&&_<=3268||3271<=_&&_<=3272||3274<=_&&_<=3275||3330<=_&&_<=3331||3391<=_&&_<=3392||3398<=_&&_<=3400||3402<=_&&_<=3404||3458<=_&&_<=3459||3536<=_&&_<=3537||3544<=_&&_<=3550||3570<=_&&_<=3571||_==3635||_==3763||3902<=_&&_<=3903||_==3967||_==4145||4155<=_&&_<=4156||4182<=_&&_<=4183||_==4228||_==6070||6078<=_&&_<=6085||6087<=_&&_<=6088||6435<=_&&_<=6438||6441<=_&&_<=6443||6448<=_&&_<=6449||6451<=_&&_<=6456||6681<=_&&_<=6682||_==6741||_==6743||6765<=_&&_<=6770||_==6916||_==6965||_==6971||6973<=_&&_<=6977||6979<=_&&_<=6980||_==7042||_==7073||7078<=_&&_<=7079||_==7082||_==7143||7146<=_&&_<=7148||_==7150||7154<=_&&_<=7155||7204<=_&&_<=7211||7220<=_&&_<=7221||_==7393||7410<=_&&_<=7411||_==7415||43043<=_&&_<=43044||_==43047||43136<=_&&_<=43137||43188<=_&&_<=43203||43346<=_&&_<=43347||_==43395||43444<=_&&_<=43445||43450<=_&&_<=43451||43453<=_&&_<=43456||43567<=_&&_<=43568||43571<=_&&_<=43572||_==43597||_==43755||43758<=_&&_<=43759||_==43765||44003<=_&&_<=44004||44006<=_&&_<=44007||44009<=_&&_<=44010||_==44012||_==69632||_==69634||_==69762||69808<=_&&_<=69810||69815<=_&&_<=69816||_==69932||_==70018||70067<=_&&_<=70069||70079<=_&&_<=70080||70188<=_&&_<=70190||70194<=_&&_<=70195||_==70197||70368<=_&&_<=70370||70402<=_&&_<=70403||_==70463||70465<=_&&_<=70468||70471<=_&&_<=70472||70475<=_&&_<=70477||70498<=_&&_<=70499||70709<=_&&_<=70711||70720<=_&&_<=70721||_==70725||70833<=_&&_<=70834||_==70841||70843<=_&&_<=70844||_==70846||_==70849||71088<=_&&_<=71089||71096<=_&&_<=71099||_==71102||71216<=_&&_<=71218||71227<=_&&_<=71228||_==71230||_==71340||71342<=_&&_<=71343||_==71350||71456<=_&&_<=71457||_==71462||72199<=_&&_<=72200||_==72249||72279<=_&&_<=72280||_==72343||_==72751||_==72766||_==72873||_==72881||_==72884||94033<=_&&_<=94078||_==119142||_==119149?o:4352<=_&&_<=4447||43360<=_&&_<=43388?s:4448<=_&&_<=4519||55216<=_&&_<=55238?a:4520<=_&&_<=4607||55243<=_&&_<=55291?c:_==44032||_==44060||_==44088||_==44116||_==44144||_==44172||_==44200||_==44228||_==44256||_==44284||_==44312||_==44340||_==44368||_==44396||_==44424||_==44452||_==44480||_==44508||_==44536||_==44564||_==44592||_==44620||_==44648||_==44676||_==44704||_==44732||_==44760||_==44788||_==44816||_==44844||_==44872||_==44900||_==44928||_==44956||_==44984||_==45012||_==45040||_==45068||_==45096||_==45124||_==45152||_==45180||_==45208||_==45236||_==45264||_==45292||_==45320||_==45348||_==45376||_==45404||_==45432||_==45460||_==45488||_==45516||_==45544||_==45572||_==45600||_==45628||_==45656||_==45684||_==45712||_==45740||_==45768||_==45796||_==45824||_==45852||_==45880||_==45908||_==45936||_==45964||_==45992||_==46020||_==46048||_==46076||_==46104||_==46132||_==46160||_==46188||_==46216||_==46244||_==46272||_==46300||_==46328||_==46356||_==46384||_==46412||_==46440||_==46468||_==46496||_==46524||_==46552||_==46580||_==46608||_==46636||_==46664||_==46692||_==46720||_==46748||_==46776||_==46804||_==46832||_==46860||_==46888||_==46916||_==46944||_==46972||_==47e3||_==47028||_==47056||_==47084||_==47112||_==47140||_==47168||_==47196||_==47224||_==47252||_==47280||_==47308||_==47336||_==47364||_==47392||_==47420||_==47448||_==47476||_==47504||_==47532||_==47560||_==47588||_==47616||_==47644||_==47672||_==47700||_==47728||_==47756||_==47784||_==47812||_==47840||_==47868||_==47896||_==47924||_==47952||_==47980||_==48008||_==48036||_==48064||_==48092||_==48120||_==48148||_==48176||_==48204||_==48232||_==48260||_==48288||_==48316||_==48344||_==48372||_==48400||_==48428||_==48456||_==48484||_==48512||_==48540||_==48568||_==48596||_==48624||_==48652||_==48680||_==48708||_==48736||_==48764||_==48792||_==48820||_==48848||_==48876||_==48904||_==48932||_==48960||_==48988||_==49016||_==49044||_==49072||_==49100||_==49128||_==49156||_==49184||_==49212||_==49240||_==49268||_==49296||_==49324||_==49352||_==49380||_==49408||_==49436||_==49464||_==49492||_==49520||_==49548||_==49576||_==49604||_==49632||_==49660||_==49688||_==49716||_==49744||_==49772||_==49800||_==49828||_==49856||_==49884||_==49912||_==49940||_==49968||_==49996||_==50024||_==50052||_==50080||_==50108||_==50136||_==50164||_==50192||_==50220||_==50248||_==50276||_==50304||_==50332||_==50360||_==50388||_==50416||_==50444||_==50472||_==50500||_==50528||_==50556||_==50584||_==50612||_==50640||_==50668||_==50696||_==50724||_==50752||_==50780||_==50808||_==50836||_==50864||_==50892||_==50920||_==50948||_==50976||_==51004||_==51032||_==51060||_==51088||_==51116||_==51144||_==51172||_==51200||_==51228||_==51256||_==51284||_==51312||_==51340||_==51368||_==51396||_==51424||_==51452||_==51480||_==51508||_==51536||_==51564||_==51592||_==51620||_==51648||_==51676||_==51704||_==51732||_==51760||_==51788||_==51816||_==51844||_==51872||_==51900||_==51928||_==51956||_==51984||_==52012||_==52040||_==52068||_==52096||_==52124||_==52152||_==52180||_==52208||_==52236||_==52264||_==52292||_==52320||_==52348||_==52376||_==52404||_==52432||_==52460||_==52488||_==52516||_==52544||_==52572||_==52600||_==52628||_==52656||_==52684||_==52712||_==52740||_==52768||_==52796||_==52824||_==52852||_==52880||_==52908||_==52936||_==52964||_==52992||_==53020||_==53048||_==53076||_==53104||_==53132||_==53160||_==53188||_==53216||_==53244||_==53272||_==53300||_==53328||_==53356||_==53384||_==53412||_==53440||_==53468||_==53496||_==53524||_==53552||_==53580||_==53608||_==53636||_==53664||_==53692||_==53720||_==53748||_==53776||_==53804||_==53832||_==53860||_==53888||_==53916||_==53944||_==53972||_==54e3||_==54028||_==54056||_==54084||_==54112||_==54140||_==54168||_==54196||_==54224||_==54252||_==54280||_==54308||_==54336||_==54364||_==54392||_==54420||_==54448||_==54476||_==54504||_==54532||_==54560||_==54588||_==54616||_==54644||_==54672||_==54700||_==54728||_==54756||_==54784||_==54812||_==54840||_==54868||_==54896||_==54924||_==54952||_==54980||_==55008||_==55036||_==55064||_==55092||_==55120||_==55148||_==55176?u:44033<=_&&_<=44059||44061<=_&&_<=44087||44089<=_&&_<=44115||44117<=_&&_<=44143||44145<=_&&_<=44171||44173<=_&&_<=44199||44201<=_&&_<=44227||44229<=_&&_<=44255||44257<=_&&_<=44283||44285<=_&&_<=44311||44313<=_&&_<=44339||44341<=_&&_<=44367||44369<=_&&_<=44395||44397<=_&&_<=44423||44425<=_&&_<=44451||44453<=_&&_<=44479||44481<=_&&_<=44507||44509<=_&&_<=44535||44537<=_&&_<=44563||44565<=_&&_<=44591||44593<=_&&_<=44619||44621<=_&&_<=44647||44649<=_&&_<=44675||44677<=_&&_<=44703||44705<=_&&_<=44731||44733<=_&&_<=44759||44761<=_&&_<=44787||44789<=_&&_<=44815||44817<=_&&_<=44843||44845<=_&&_<=44871||44873<=_&&_<=44899||44901<=_&&_<=44927||44929<=_&&_<=44955||44957<=_&&_<=44983||44985<=_&&_<=45011||45013<=_&&_<=45039||45041<=_&&_<=45067||45069<=_&&_<=45095||45097<=_&&_<=45123||45125<=_&&_<=45151||45153<=_&&_<=45179||45181<=_&&_<=45207||45209<=_&&_<=45235||45237<=_&&_<=45263||45265<=_&&_<=45291||45293<=_&&_<=45319||45321<=_&&_<=45347||45349<=_&&_<=45375||45377<=_&&_<=45403||45405<=_&&_<=45431||45433<=_&&_<=45459||45461<=_&&_<=45487||45489<=_&&_<=45515||45517<=_&&_<=45543||45545<=_&&_<=45571||45573<=_&&_<=45599||45601<=_&&_<=45627||45629<=_&&_<=45655||45657<=_&&_<=45683||45685<=_&&_<=45711||45713<=_&&_<=45739||45741<=_&&_<=45767||45769<=_&&_<=45795||45797<=_&&_<=45823||45825<=_&&_<=45851||45853<=_&&_<=45879||45881<=_&&_<=45907||45909<=_&&_<=45935||45937<=_&&_<=45963||45965<=_&&_<=45991||45993<=_&&_<=46019||46021<=_&&_<=46047||46049<=_&&_<=46075||46077<=_&&_<=46103||46105<=_&&_<=46131||46133<=_&&_<=46159||46161<=_&&_<=46187||46189<=_&&_<=46215||46217<=_&&_<=46243||46245<=_&&_<=46271||46273<=_&&_<=46299||46301<=_&&_<=46327||46329<=_&&_<=46355||46357<=_&&_<=46383||46385<=_&&_<=46411||46413<=_&&_<=46439||46441<=_&&_<=46467||46469<=_&&_<=46495||46497<=_&&_<=46523||46525<=_&&_<=46551||46553<=_&&_<=46579||46581<=_&&_<=46607||46609<=_&&_<=46635||46637<=_&&_<=46663||46665<=_&&_<=46691||46693<=_&&_<=46719||46721<=_&&_<=46747||46749<=_&&_<=46775||46777<=_&&_<=46803||46805<=_&&_<=46831||46833<=_&&_<=46859||46861<=_&&_<=46887||46889<=_&&_<=46915||46917<=_&&_<=46943||46945<=_&&_<=46971||46973<=_&&_<=46999||47001<=_&&_<=47027||47029<=_&&_<=47055||47057<=_&&_<=47083||47085<=_&&_<=47111||47113<=_&&_<=47139||47141<=_&&_<=47167||47169<=_&&_<=47195||47197<=_&&_<=47223||47225<=_&&_<=47251||47253<=_&&_<=47279||47281<=_&&_<=47307||47309<=_&&_<=47335||47337<=_&&_<=47363||47365<=_&&_<=47391||47393<=_&&_<=47419||47421<=_&&_<=47447||47449<=_&&_<=47475||47477<=_&&_<=47503||47505<=_&&_<=47531||47533<=_&&_<=47559||47561<=_&&_<=47587||47589<=_&&_<=47615||47617<=_&&_<=47643||47645<=_&&_<=47671||47673<=_&&_<=47699||47701<=_&&_<=47727||47729<=_&&_<=47755||47757<=_&&_<=47783||47785<=_&&_<=47811||47813<=_&&_<=47839||47841<=_&&_<=47867||47869<=_&&_<=47895||47897<=_&&_<=47923||47925<=_&&_<=47951||47953<=_&&_<=47979||47981<=_&&_<=48007||48009<=_&&_<=48035||48037<=_&&_<=48063||48065<=_&&_<=48091||48093<=_&&_<=48119||48121<=_&&_<=48147||48149<=_&&_<=48175||48177<=_&&_<=48203||48205<=_&&_<=48231||48233<=_&&_<=48259||48261<=_&&_<=48287||48289<=_&&_<=48315||48317<=_&&_<=48343||48345<=_&&_<=48371||48373<=_&&_<=48399||48401<=_&&_<=48427||48429<=_&&_<=48455||48457<=_&&_<=48483||48485<=_&&_<=48511||48513<=_&&_<=48539||48541<=_&&_<=48567||48569<=_&&_<=48595||48597<=_&&_<=48623||48625<=_&&_<=48651||48653<=_&&_<=48679||48681<=_&&_<=48707||48709<=_&&_<=48735||48737<=_&&_<=48763||48765<=_&&_<=48791||48793<=_&&_<=48819||48821<=_&&_<=48847||48849<=_&&_<=48875||48877<=_&&_<=48903||48905<=_&&_<=48931||48933<=_&&_<=48959||48961<=_&&_<=48987||48989<=_&&_<=49015||49017<=_&&_<=49043||49045<=_&&_<=49071||49073<=_&&_<=49099||49101<=_&&_<=49127||49129<=_&&_<=49155||49157<=_&&_<=49183||49185<=_&&_<=49211||49213<=_&&_<=49239||49241<=_&&_<=49267||49269<=_&&_<=49295||49297<=_&&_<=49323||49325<=_&&_<=49351||49353<=_&&_<=49379||49381<=_&&_<=49407||49409<=_&&_<=49435||49437<=_&&_<=49463||49465<=_&&_<=49491||49493<=_&&_<=49519||49521<=_&&_<=49547||49549<=_&&_<=49575||49577<=_&&_<=49603||49605<=_&&_<=49631||49633<=_&&_<=49659||49661<=_&&_<=49687||49689<=_&&_<=49715||49717<=_&&_<=49743||49745<=_&&_<=49771||49773<=_&&_<=49799||49801<=_&&_<=49827||49829<=_&&_<=49855||49857<=_&&_<=49883||49885<=_&&_<=49911||49913<=_&&_<=49939||49941<=_&&_<=49967||49969<=_&&_<=49995||49997<=_&&_<=50023||50025<=_&&_<=50051||50053<=_&&_<=50079||50081<=_&&_<=50107||50109<=_&&_<=50135||50137<=_&&_<=50163||50165<=_&&_<=50191||50193<=_&&_<=50219||50221<=_&&_<=50247||50249<=_&&_<=50275||50277<=_&&_<=50303||50305<=_&&_<=50331||50333<=_&&_<=50359||50361<=_&&_<=50387||50389<=_&&_<=50415||50417<=_&&_<=50443||50445<=_&&_<=50471||50473<=_&&_<=50499||50501<=_&&_<=50527||50529<=_&&_<=50555||50557<=_&&_<=50583||50585<=_&&_<=50611||50613<=_&&_<=50639||50641<=_&&_<=50667||50669<=_&&_<=50695||50697<=_&&_<=50723||50725<=_&&_<=50751||50753<=_&&_<=50779||50781<=_&&_<=50807||50809<=_&&_<=50835||50837<=_&&_<=50863||50865<=_&&_<=50891||50893<=_&&_<=50919||50921<=_&&_<=50947||50949<=_&&_<=50975||50977<=_&&_<=51003||51005<=_&&_<=51031||51033<=_&&_<=51059||51061<=_&&_<=51087||51089<=_&&_<=51115||51117<=_&&_<=51143||51145<=_&&_<=51171||51173<=_&&_<=51199||51201<=_&&_<=51227||51229<=_&&_<=51255||51257<=_&&_<=51283||51285<=_&&_<=51311||51313<=_&&_<=51339||51341<=_&&_<=51367||51369<=_&&_<=51395||51397<=_&&_<=51423||51425<=_&&_<=51451||51453<=_&&_<=51479||51481<=_&&_<=51507||51509<=_&&_<=51535||51537<=_&&_<=51563||51565<=_&&_<=51591||51593<=_&&_<=51619||51621<=_&&_<=51647||51649<=_&&_<=51675||51677<=_&&_<=51703||51705<=_&&_<=51731||51733<=_&&_<=51759||51761<=_&&_<=51787||51789<=_&&_<=51815||51817<=_&&_<=51843||51845<=_&&_<=51871||51873<=_&&_<=51899||51901<=_&&_<=51927||51929<=_&&_<=51955||51957<=_&&_<=51983||51985<=_&&_<=52011||52013<=_&&_<=52039||52041<=_&&_<=52067||52069<=_&&_<=52095||52097<=_&&_<=52123||52125<=_&&_<=52151||52153<=_&&_<=52179||52181<=_&&_<=52207||52209<=_&&_<=52235||52237<=_&&_<=52263||52265<=_&&_<=52291||52293<=_&&_<=52319||52321<=_&&_<=52347||52349<=_&&_<=52375||52377<=_&&_<=52403||52405<=_&&_<=52431||52433<=_&&_<=52459||52461<=_&&_<=52487||52489<=_&&_<=52515||52517<=_&&_<=52543||52545<=_&&_<=52571||52573<=_&&_<=52599||52601<=_&&_<=52627||52629<=_&&_<=52655||52657<=_&&_<=52683||52685<=_&&_<=52711||52713<=_&&_<=52739||52741<=_&&_<=52767||52769<=_&&_<=52795||52797<=_&&_<=52823||52825<=_&&_<=52851||52853<=_&&_<=52879||52881<=_&&_<=52907||52909<=_&&_<=52935||52937<=_&&_<=52963||52965<=_&&_<=52991||52993<=_&&_<=53019||53021<=_&&_<=53047||53049<=_&&_<=53075||53077<=_&&_<=53103||53105<=_&&_<=53131||53133<=_&&_<=53159||53161<=_&&_<=53187||53189<=_&&_<=53215||53217<=_&&_<=53243||53245<=_&&_<=53271||53273<=_&&_<=53299||53301<=_&&_<=53327||53329<=_&&_<=53355||53357<=_&&_<=53383||53385<=_&&_<=53411||53413<=_&&_<=53439||53441<=_&&_<=53467||53469<=_&&_<=53495||53497<=_&&_<=53523||53525<=_&&_<=53551||53553<=_&&_<=53579||53581<=_&&_<=53607||53609<=_&&_<=53635||53637<=_&&_<=53663||53665<=_&&_<=53691||53693<=_&&_<=53719||53721<=_&&_<=53747||53749<=_&&_<=53775||53777<=_&&_<=53803||53805<=_&&_<=53831||53833<=_&&_<=53859||53861<=_&&_<=53887||53889<=_&&_<=53915||53917<=_&&_<=53943||53945<=_&&_<=53971||53973<=_&&_<=53999||54001<=_&&_<=54027||54029<=_&&_<=54055||54057<=_&&_<=54083||54085<=_&&_<=54111||54113<=_&&_<=54139||54141<=_&&_<=54167||54169<=_&&_<=54195||54197<=_&&_<=54223||54225<=_&&_<=54251||54253<=_&&_<=54279||54281<=_&&_<=54307||54309<=_&&_<=54335||54337<=_&&_<=54363||54365<=_&&_<=54391||54393<=_&&_<=54419||54421<=_&&_<=54447||54449<=_&&_<=54475||54477<=_&&_<=54503||54505<=_&&_<=54531||54533<=_&&_<=54559||54561<=_&&_<=54587||54589<=_&&_<=54615||54617<=_&&_<=54643||54645<=_&&_<=54671||54673<=_&&_<=54699||54701<=_&&_<=54727||54729<=_&&_<=54755||54757<=_&&_<=54783||54785<=_&&_<=54811||54813<=_&&_<=54839||54841<=_&&_<=54867||54869<=_&&_<=54895||54897<=_&&_<=54923||54925<=_&&_<=54951||54953<=_&&_<=54979||54981<=_&&_<=55007||55009<=_&&_<=55035||55037<=_&&_<=55063||55065<=_&&_<=55091||55093<=_&&_<=55119||55121<=_&&_<=55147||55149<=_&&_<=55175||55177<=_&&_<=55203?f:_==9757||_==9977||9994<=_&&_<=9997||_==127877||127938<=_&&_<=127940||_==127943||127946<=_&&_<=127948||128066<=_&&_<=128067||128070<=_&&_<=128080||_==128110||128112<=_&&_<=128120||_==128124||128129<=_&&_<=128131||128133<=_&&_<=128135||_==128170||128372<=_&&_<=128373||_==128378||_==128400||128405<=_&&_<=128406||128581<=_&&_<=128583||128587<=_&&_<=128591||_==128675||128692<=_&&_<=128694||_==128704||_==128716||129304<=_&&_<=129308||129310<=_&&_<=129311||_==129318||129328<=_&&_<=129337||129341<=_&&_<=129342||129489<=_&&_<=129501?g:127995<=_&&_<=127999?m:_==8205?y:_==9792||_==9794||9877<=_&&_<=9878||_==9992||_==10084||_==127752||_==127806||_==127859||_==127891||_==127908||_==127912||_==127979||_==127981||_==128139||128187<=_&&_<=128188||_==128295||_==128300||_==128488||_==128640||_==128658?A:128102<=_&&_<=128105?b:d}return this}typeof VH<"u"&&VH.exports&&(VH.exports=Uct)});var pte,mI,Ue,bE,nf,Bo,Iwe,xE,Pwe,Dwe,gr,yc=hs(()=>{pte=new Date(2107,11,31,23,59,58),mI=new Date(1980,0,1),Ue=void 0,bE=1/0,nf="undefined",Bo="function",Iwe="object",xE="string",Pwe="number",Dwe="boolean",gr=new Uint8Array});function gI(e){if(e&&typeof e!=Bo)throw new Error(lIe);return e}function u5(e){if(e&&(typeof e.addEventListener!=Bo||typeof e.aborted!=Dwe))throw new Error(uIe);return e||Ue}function f5(e,t){if(e&&typeof e!=xE||t&&!(t instanceof Uint8Array))throw new Error(yte)}function Ate(e,t,n){if(!Number.isInteger(e)||e<0||e>t)throw new Error(n)}function _I(e,t,n){e!==Ue&&Ate(e,t,n)}function TE(e){return typeof e==xE&&e.trim()?Number(e):e}var Rwe,Owe,Mwe,Nwe,Lwe,QG,e5,t5,n5,Fwe,Bwe,kwe,Uwe,zwe,Vwe,jwe,Hwe,i5,r5,o5,s5,Gwe,Wwe,qwe,Ywe,Xwe,Kwe,$we,Jwe,Zwe,gte,Qwe,eIe,d3,pI,tIe,nIe,iIe,rIe,oIe,sIe,_te,aIe,cIe,a5,c5,ob,l5,z_,lIe,uIe,yte,h3=hs(()=>{yc();Rwe="filenameEncoding",Owe="commentEncoding",Mwe="decodeText",Nwe="extractPrependedData",Lwe="extractAppendedData",QG="password",e5="rawPassword",t5="passThrough",n5="signal",Fwe="checkPasswordOnly",Bwe="checkOverlappingEntryOnly",kwe="checkOverlappingEntry",Uwe="checkAmbiguity",zwe="checkLocalDirectory",Vwe="checkSignature",jwe="checkCrc32",Hwe="checkAuthenticationCode",i5="useWebWorkers",r5="useCompressionStream",o5="transferStreams",s5="preventClose",Gwe="encryptionStrength",Wwe="extendedTimestamp",qwe="ntfsTimestamp",Ywe="keepOrder",Xwe="level",Kwe="bufferedWrite",$we="createTempStream",Jwe="dataDescriptorSignature",Zwe="useUnicodeFileNames",gte="dataDescriptor",Qwe="supportZip64SplitFile",eIe="encodeText",d3="offset",pI="usdz",tIe="unixExtraFieldType",nIe="localExtraField",iIe="centralExtraField",rIe="strictness",oIe="filenameValidation",sIe="normalizeFilename",_te="maxAppendedDataSize",aIe="decryptCentralDirectory",cIe="signCentralDirectory",a5="filename",c5="comment",ob="strict",l5="balanced",z_="tolerant",lIe="Invalid option (must be a function)",uIe="Invalid signal (must be an AbortSignal instance)",yte="Invalid password (password must be a string, rawPassword must be a Uint8Array)"});function V_(){return bte}function m3(e){return xte(e.chunkSize)}function xte(e){return e=TE(e),Number.isInteger(e)&&e>=dIe?Math.max(e,cbt):fIe}function p3(e){Object.assign(bte,AIe(bIe(e)))}function AIe(e){let t={};for(let n of fbt){let i=e[n];i!==Ue&&(t[n]=dbt(n,i))}return t}function dbt(e,t){if(_Ie.includes(e)){if(t=TE(t),e==gIe&&(!Number.isInteger(t)||t<dIe))throw new Error(hIe)}else yIe.includes(e)&&gI(t);return t}function bIe(e){e=e||{};let{CompressionStreamZlib:t,DecompressionStreamZlib:n}=e;if(t===Ue&&n===Ue)return e;let i=Object.assign({},e);return i.CompressionStreamFallback===Ue&&(i.CompressionStreamFallback=t),i.DecompressionStreamFallback===Ue&&(i.DecompressionStreamFallback=n),i}function yI(e){let t=AIe(bIe(e));Object.assign(pIe,t),Object.assign(bte,t)}var fIe,cbt,dIe,hIe,mIe,pIe,gIe,lbt,ubt,_Ie,yIe,fbt,bte,_0=hs(()=>{yc();h3();fIe=64*1024,cbt=64,dIe=1,hIe="Invalid maxWorkers (must be an integer greater than 0)",mIe=2;try{typeof navigator!=nf&&navigator.hardwareConcurrency&&(mIe=navigator.hardwareConcurrency)}catch{}pIe={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:fIe,maxWorkers:mIe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=nf&&CompressionStream,DecompressionStream:typeof DecompressionStream!=nf&&DecompressionStream},gIe="maxWorkers",lbt=["baseURI","wasmURI","workerURI"],ubt=["useCompressionStream","useWebWorkers","transferStreams"],_Ie=["chunkSize",gIe,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],yIe=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],fbt=[...lbt,...ubt,..._Ie,...yIe],bte={...pIe}});function ph(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function d5(e){return e.byteOffset||e.byteLength!=e.buffer.byteLength?new Uint8Array(e):e}function di(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}var EE=hs(()=>{});var g3,xIe,hbt,mbt,pbt,gbt,_bt,ybt,Abt,Gm,_3=hs(()=>{g3=[[],[],[],[],[],[],[],[]];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t=t&1?t>>>1^3988292384:t>>>1;g3[0][e]=t}for(let e=0;e<256;e++)for(let t=1;t<8;t++){let n=g3[t-1][e];g3[t][e]=n>>>8^g3[0][n&255]}[xIe,hbt,mbt,pbt,gbt,_bt,ybt,Abt]=g3,Gm=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0,i=t.length|0,r=0;if(i>=8&&t.buffer){let o=new DataView(t.buffer,t.byteOffset,i),s=i-8;for(;r<=s;r+=8){let a=n^o.getInt32(r,!0),c=o.getInt32(r+4,!0);n=Abt[a&255]^ybt[a>>>8&255]^_bt[a>>>16&255]^gbt[a>>>24&255]^pbt[c&255]^mbt[c>>>8&255]^hbt[c>>>16&255]^xIe[c>>>24&255]}}for(;r<i;r++)n=n>>>8^xIe[(n^t[r])&255];this.crc=n}get(){return~this.crc}}});var y3,TIe=hs(()=>{_3();y3=class extends null{constructor(){let t,n=new Gm;super({transform(i,r){n.append(i),r.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}}});function AI(e){if(typeof TextEncoder==nf){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var Tte=hs(()=>{yc()});var pu,A3,EIe,Ete,Cte,sb,CIe=hs(()=>{pu={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=pu.getPartial(n);return i===32?e.concat(t):pu._shiftRight(t,i,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+pu.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t=t&31,n>0&&t&&(e[n-1]=pu.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;let r=e.length?e[e.length-1]:0,o=pu.getPartial(r);return i.push(pu.partial(t+o&31,t+o>32?n:i.pop(),1)),i}},A3={bytes:{fromBits(e){let n=pu.bitLength(e)/8,i=new Uint8Array(n),r;for(let o=0;o<n;o++)(o&3)===0&&(r=e[o/4]),i[o]=r>>>24,r<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],(n&3)===3&&(t.push(i),i=0);return n&3&&t.push(pu.partial(8*(n&3),i)),t}}},EIe={};EIe.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e=="string"&&(e=A3.utf8String.toBits(e));let n=t._buffer=pu.concat(t._buffer,e),i=t._length,r=t._length=i+pu.bitLength(e);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let o=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=r;a+=t.blockSize)t._block(o.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=pu.concat(t,[pu.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let u=0;u<16;u++)i[u]=e[u];let r=n[0],o=n[1],s=n[2],a=n[3],c=n[4];for(let u=0;u<=79;u++){u>=16&&(i[u]=t._S(1,i[u-3]^i[u-8]^i[u-14]^i[u-16]));let f=t._S(5,r)+t._f(u,o,s,a)+c+i[u]+t._key[Math.floor(u/20)]|0;c=a,a=s,s=t._S(30,o),o=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};Ete={};Ete.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],r=e.length,o,s,a,c=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],o=r;o<4*r+28;o++){let u=s[o-1];(o%r===0||r===8&&o%r===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],o%r===0&&(u=u<<8^u>>>24^c<<24,c=c<<1^(c>>7)*283)),s[o]=s[o-r]^u}for(let u=0;o;u++,o--){let f=s[u&3?o:o-4];o<=4||u<4?a[u]=f:a[u]=i[0][n[f>>>24]]^i[1][n[f>>16&255]]^i[2][n[f>>8&255]]^i[3][n[f&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],o=[],s,a,c,u;for(let f=0;f<256;f++)o[(r[f]=f<<1^(f>>7)*283)^f]=f;for(let f=s=0;!n[f];f^=a||1,s=o[s]||1){let d=s^s<<1^s<<2^s<<3^s<<4;d=d>>8^d&255^99,n[f]=d,i[d]=f,u=r[c=r[a=r[f]]];let p=u*16843009^c*65537^a*257^f*16843008,g=r[d]*257^d*16843008;for(let m=0;m<4;m++)e[m][f]=g=g<<24^g>>>8,t[m][d]=p=p<<24^p>>>8}for(let f=0;f<5;f++)e[f]=e[f].slice(0),t[f]=t[f].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,r=[0,0,0,0],o=this._tables[t],s=o[0],a=o[1],c=o[2],u=o[3],f=o[4],d=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],m=e[t?1:3]^n[3],y=4,A,b,x;for(let T=0;T<i;T++)A=s[d>>>24]^a[p>>16&255]^c[g>>8&255]^u[m&255]^n[y],b=s[p>>>24]^a[g>>16&255]^c[m>>8&255]^u[d&255]^n[y+1],x=s[g>>>24]^a[m>>16&255]^c[d>>8&255]^u[p&255]^n[y+2],m=s[m>>>24]^a[d>>16&255]^c[p>>8&255]^u[g&255]^n[y+3],y+=4,d=A,p=b,g=x;for(let T=0;T<4;T++)r[t?3&-T:T]=f[d>>>24]<<24^f[p>>16&255]<<16^f[g>>8&255]<<8^f[m&255]^n[y++],A=d,d=p,p=g,g=m,m=A;return r}};Cte={};Cte.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let r=pu.bitLength(t);for(let o=0;o<i;o+=4){this.incCounter(n);let s=e.encrypt(n);t[o]^=s[0],t[o+1]^=s[1],t[o+2]^=s[2],t[o+3]^=s[3]}return pu.clamp(t,r)}};sb={importKey(e){return new sb.hmacSha1(A3.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let r=(i>>5)+1<<2,o,s,a,c,u,f=new ArrayBuffer(r),d=new DataView(f),p=0,g=pu;for(t=A3.bytes.toBits(t),u=1;p<(r||1);u++){for(o=s=e.encrypt(g.concat(t,[u])),a=1;a<n;a++)for(s=e.encrypt(s),c=0;c<s.length;c++)o[c]^=s[c];for(a=0;p<(r||1)&&a<o.length;a++)d.setInt32(p,o[a]),p+=4}return f.slice(0,i/8)}};sb.hmacSha1=class{constructor(e){let t=this,n=t._hash=EIe.sha1,i=[[],[]];t._baseHash=[new n,new n];let r=t._baseHash[0].blockSize/32;e.length>r&&(e=new n().update(e).finalize());for(let o=0;o<r;o++)i[0][o]=e[o]^909522486,i[1][o]=e[o]^1549556828;t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}});function h5(e){if(bbt)return crypto.getRandomValues(e);throw new Error(bI)}var bbt,y0,ab,cb,j_,bI,m5=hs(()=>{yc();bbt=typeof crypto!=nf&&typeof crypto.getRandomValues==Bo,y0="Invalid password",ab="Invalid signature",cb=ab,j_="zipjs-abort-check-password",bI="Crypto API not supported"});function PIe(e,t,n,i){Object.assign(e,{ready:new Promise(r=>e.resolveReady=r),password:Nbt(t,n),strength:i-1,pendingInput:gr})}function DIe(e,t,n,i,r,o){let{ctr:s,hmac:a,pendingInput:c}=e;c.length&&(t=ph(c,t));let u=t.length-r;n=Lbt(n,i+(u-u%xI));let f;for(f=0;f<=u-xI;f+=xI){let d=E3(A0,gh(t,f,f+xI));o&&a.update(d);let p=s.update(d);o||a.update(p),n.set(T3(A0,p),f+i)}return e.pendingInput=gh(t,f),n}async function Dbt(e,t,n,i){let r=await RIe(e,t,n,gh(i,0,x3[t])),o=gh(i,x3[t]);if(r[0]!=o[0]||r[1]!=o[1])throw new Error(y0)}async function Rbt(e,t,n){let i=h5(new Uint8Array(x3[t])),r=await RIe(e,t,n,i);return ph(i,r)}async function RIe(e,t,n,i){e.password=null;let r=await Obt(xbt,n,Cbt,!1,vbt),o=await Mbt(Object.assign({salt:i},vte),r,8*(b3[t]*2+2)),s=new Uint8Array(o),a=E3(A0,gh(s,0,b3[t])),c=E3(A0,gh(s,b3[t],b3[t]*2)),u=gh(s,b3[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:u},ctr:new Ibt(new wbt(a),Array.from(Sbt)),hmac:new Pbt(c)}),u}async function Obt(e,t,n,i,r){if(vIe)try{return await C3.importKey(e,t,n,i,r)}catch{return vIe=!1,sb.importKey(t)}else return sb.importKey(t)}async function Mbt(e,t,n){if(SIe)try{return await C3.deriveBits(e,t,n)}catch{return SIe=!1,sb.pbkdf2(t,e.salt,vte.iterations,n)}else return sb.pbkdf2(t,e.salt,vte.iterations,n)}function Nbt(e,t){return t===Ue?AI(e):t}function Lbt(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function gh(e,t,n){return e.subarray(t,n)}function T3(e,t){return e.fromBits(t)}function E3(e,t){return e.toBits(t)}var xI,xbt,wIe,Tbt,Ebt,Cbt,vte,vbt,x3,b3,H_,Sbt,_5,C3,IIe,A0,wbt,Ibt,Pbt,vIe,SIe,p5,g5,OIe=hs(()=>{yc();Tte();EE();CIe();m5();xI=16,xbt="raw",wIe={name:"PBKDF2"},Tbt={name:"HMAC"},Ebt="SHA-1",Cbt=Object.assign({hash:Tbt},wIe),vte=Object.assign({iterations:1e3,hash:{name:Ebt}},wIe),vbt=["deriveBits"],x3=[8,12,16],b3=[16,24,32],H_=10,Sbt=[0,0,0,0],_5=typeof crypto!=nf,C3=_5&&crypto.subtle,IIe=_5&&typeof C3!=nf,A0=A3.bytes,wbt=Ete.aes,Ibt=Cte.ctrGladman,Pbt=sb.hmacSha1,vIe=_5&&IIe&&typeof C3.importKey==Bo,SIe=_5&&IIe&&typeof C3.deriveBits==Bo,p5=class extends null{constructor({password:t,rawPassword:n,encryptionStrength:i,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){super({start(){PIe(this,t,n,i)},async transform(s,a){let c=this,{password:u,strength:f,resolveReady:d,ready:p}=c;u?(await Dbt(c,f,u,gh(s,0,x3[f]+2)),s=gh(s,x3[f]+2),r?a.error(new Error(j_)):d()):await p;let g=new Uint8Array(s.length-H_-(s.length-H_)%xI);a.enqueue(DIe(c,s,g,0,H_,!0))},async flush(s){let{ctr:a,hmac:c,pendingInput:u,ready:f}=this;if(c&&a){await f;let d=gh(u,0,u.length-H_),p=gh(u,u.length-H_),g=gr;if(d.length){let A=E3(A0,d);c.update(A);let b=a.update(A);g=T3(A0,b)}let m=gh(T3(A0,c.digest()),0,H_),y=u.length<H_?1:0;for(let A=0;A<H_;A++)y|=m[A]^p[A];if(y&&o)throw new Error(cb);s.enqueue(g)}}})}},g5=class extends null{constructor({password:t,rawPassword:n,encryptionStrength:i}){super({start(){PIe(this,t,n,i)},async transform(r,o){let s=this,{password:a,strength:c,resolveReady:u,ready:f}=s,d=gr;a?(d=await Rbt(s,c,a),u()):await f;let p=new Uint8Array(d.length+r.length-r.length%xI);p.set(d,0),o.enqueue(DIe(s,r,p,d.length,0))},async flush(r){let{ctr:o,hmac:s,pendingInput:a,ready:c}=this;if(s&&o){await c;let u=gr;if(a.length){let d=o.update(E3(A0,a));s.update(d),u=T3(A0,d)}let f=T3(A0,s.digest()).slice(0,H_);r.enqueue(ph(u,f))}}})}}});function FIe(e,t,n,i){Object.assign(e,{password:t,rawPassword:n,passwordVerification:i}),Fbt(e,t,n)}function MIe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=BIe(e)^t[i],b5(e,n[i]);return n}function NIe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=BIe(e)^t[i],b5(e,t[i]);return n}function Fbt(e,t,n){let i=[305419896,591751049,878082192];if(Object.assign(e,{keys:i,crcKey0:new Gm(i[0]),crcKey2:new Gm(i[2])}),n)for(let r=0;r<n.length;r++)b5(e,n[r]);else for(let r=0;r<t.length;r++)b5(e,t.charCodeAt(r))}function b5(e,t){let[,n]=e.keys;e.crcKey0.append([t]);let i=~e.crcKey0.get();n=LIe(Math.imul(LIe(n+kIe(i)),134775813)+1),e.crcKey2.append([n>>>24]);let r=~e.crcKey2.get();e.keys=[i,n,r]}function BIe(e){let t=e.keys[2]|2;return kIe(Math.imul(t,t^1)>>>8)}function kIe(e){return e&255}function LIe(e){return e&4294967295}var TI,y5,A5,UIe=hs(()=>{_3();m5();TI=12,y5=class extends null{constructor({password:t,rawPassword:n,passwordVerification:i,checkPasswordOnly:r}){super({start(){FIe(this,t,n,i)},transform(o,s){let a=this;if(a.password||a.rawPassword){let c=MIe(a,o.subarray(0,TI));if(a.password=a.rawPassword=null,(c[TI-1]^a.passwordVerification)!=0)throw new Error(y0);o=o.subarray(TI)}r?s.error(new Error(j_)):s.enqueue(MIe(a,o))}})}},A5=class extends null{constructor({password:t,rawPassword:n,passwordVerification:i}){super({start(){FIe(this,t,n,i)},transform(r,o){let s=this,a,c;if(s.password||s.rawPassword){s.password=s.rawPassword=null;let u=h5(new Uint8Array(TI));u[TI-1]=s.passwordVerification,a=new Uint8Array(r.length+u.length),a.set(NIe(s,u),0),c=TI}else a=new Uint8Array(r.length),c=0;a.set(NIe(s,r),c),o.enqueue(a)}})}}});function Wm(e){if(e instanceof ReadableStream)return e;let t=e.getReader();return new ReadableStream({async pull(n){let{value:i,done:r}=await t.read();r?n.close():n.enqueue(i)},cancel(n){return t.cancel(n)}})}function b0(e,t){e=Wm(e);let n=t?{type:t}:{};if(Bbt())return new Response(e).blob().then(r=>t?new Blob([r],n):r);let i=[];return e.pipeTo(new WritableStream({write(r){i.push(r)}})).then(()=>new Blob(i,n))}function Bbt(){return typeof Blob.prototype.stream!=Bo||new Blob([]).stream()instanceof ReadableStream}function zIe(e){if(e instanceof WritableStream)return e;let t=e.getWriter();return new WritableStream({write(n){return t.write(n)},close(){return t.close()},abort(n){return t.abort(n)}})}var EI=hs(()=>{yc()});function x5(e){return kbt.get(e)}function T5(e){return Ste.get(e)}function Ubt(e,t){let{CompressionStream:n,DecompressionStream:i}=t;if(typeof n!=Bo&&typeof i!=Bo)throw new Error(VIe);Ste.set(e,{CompressionStream:n,DecompressionStream:i})}async function jIe(e,t){!Ste.has(e)&&t&&Ubt(e,await import(t))}var VIe,kbt,Ste,vE=hs(()=>{yc();VIe="Invalid codec module",kbt=new Map,Ste=new Map});function Hbt(e,t,n){let i=new Gm,r=0,o=!1,s,a,c,u=new Promise((m,y)=>{a=m,c=y});u.catch(()=>{}),n||a();let f=new null({start(m){let y=new Uint8Array(WIe);y.set(Vbt),m.enqueue(y)},transform(m,y){y.enqueue(m)},async flush(m){o=!0,p();try{await u}finally{g()}let y=new Uint8Array(wte),A=di(y);A.setUint32(0,i.get(),!0),A.setUint32(4,n,!0),m.enqueue(y)},cancel(m){c(m)}}),d=new null({transform(m,y){i.append(m),r+=m.length,r>=n?a():o&&p(),y.enqueue(m)},cancel(m){c(m)}});return e=qm(e,f),e=vI(e,t),qm(e,d);function p(){g(),s=setTimeout(()=>c(new Error(lb)),jbt)}function g(){clearTimeout(s)}}function Pte(e,t){if(!e)return!1;let n=HIe.get(e);n||(n=new Map,HIe.set(e,n));let i=n.get(t);if(i===Ue){try{new e(t),i=!0}catch{i=!1}n.set(t,i)}return i}function S5(e){return Pte(e,Ite)}function Dte(e){return Pte(e,S3)}function qIe(e,t,n){t=qm(t,new null({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function YIe(e,t,n){if(!e)throw new Error(zbt);return new e(t,n)}function XIe(e,t,n,i,r){let o=t&&i?i:r||i,s=n.deflate64?GIe:Ite,a;try{a=new o(s,n)}catch(c){if(t&&r&&o!=r)a=new r(s,n);else throw c}return vI(e,a)}function qm(e,t){return Wm(e).pipeThrough(t)}function vI(e,t){let n=t.writable.getWriter(),i=e.getReader();return r(),t.readable;async function r(){try{for(;;){await n.ready;let o=await i.read();if(o.done){await n.close();break}await n.write(o.value)}}catch(o){await Gbt(n,o),await Wbt(i,o)}}}async function Gbt(e,t){try{await e.abort(t)}catch{}}async function Wbt(e,t){try{await e.cancel(t)}catch{}}function qbt(e){let t=e.getReader();return new ReadableStream({async pull(n){let i;try{i=await t.read()}catch(s){if(s&&s.message)throw s;let a=new Error(SI);throw a.cause=s,a}let{value:r,done:o}=i;o?n.close():n.enqueue(r)},cancel(n){return t.cancel(n)}})}var lb,SI,wI,zbt,Ite,GIe,S3,WIe,wte,Vbt,jbt,E5,C5,v5,HIe,Rte=hs(()=>{_3();TIe();OIe();UIe();m5();yc();EE();EI();vE();lb="Invalid uncompressed size",SI="Invalid compressed data",wI=ab,zbt="Compression method not supported",Ite="deflate-raw",GIe="deflate64-raw",S3="gzip",WIe=10,wte=8,Vbt=[31,139,8],jbt=5e3,E5=class extends null{constructor(t,{chunkSize:n,CompressionStreamFallback:i,CompressionStream:r}){super({});let{compressed:o,encrypted:s,useCompressionStream:a,zipCrypto:c,computeCrc32:u,level:f,deflate64:d,format:p,compressionMethod:g,inputSize:m}=t,y=this,A,b,x,T=super.readable,E=p&&T5(p),v=u&&o&&!d&&!E&&(!s||c)&&!!(a&&r);if((!s||c)&&u&&!v&&(A=new y3,T=qm(T,A)),o)if(E)T=vI(T,YIe(E.CompressionStream,p,{level:f,chunkSize:n,compressionMethod:g,uncompressedSize:m}));else if(v)x=new C5,T=vI(T,new r(S3)),T=qm(T,x);else try{T=XIe(T,a,{level:f,chunkSize:n},r,i)}catch(S){let I;try{I=new r(S3)}catch{throw S}T=vI(T,I),T=qm(T,new C5)}s&&(c?T=qm(T,new A5(t)):(b=new g5(t),T=qm(T,b))),qIe(y,T,()=>{(!s||c)&&u&&(y.crc32=v?x.crc32:new DataView(A.value.buffer).getUint32(0))})}},C5=class extends null{constructor(){let t,n=WIe,i=new Uint8Array(0);super({transform(r,o){if(n){let u=Math.min(n,r.length);if(n-=u,r=r.subarray(u),!r.length)return}let s=i.length+r.length;if(s<=wte){i=ph(i,r);return}let a=s-wte,c=Math.min(a,i.length);o.enqueue(ph(i.subarray(0,c),r.subarray(0,a-c))),i=ph(i.subarray(c),r.subarray(a-c))},flush(){let r=di(i);t.crc32=r.getUint32(0,!0),t.uncompressedSize=r.getUint32(4,!0)}}),t=this}};v5=class extends null{constructor(t,{chunkSize:n,DecompressionStreamFallback:i,DecompressionStream:r}){super({});let{zipCrypto:o,encrypted:s,checkCrc32:a,crc32:c,compressed:u,useCompressionStream:f,deflate64:d,format:p,compressionMethod:g,rawBitFlag:m,outputSize:y}=t,A,b,x=super.readable;if(s&&(o?x=qm(x,new y5(t)):(b=new p5(t),x=qm(x,b))),u){let T=p&&T5(p);if(T)x=vI(x,YIe(T.DecompressionStream,p,{chunkSize:n,compressionMethod:g,rawBitFlag:m,uncompressedSize:y}));else try{x=XIe(x,f,{chunkSize:n,deflate64:d},r,i)}catch(E){if(d||y===Ue)throw E;let v;try{v=new r(S3)}catch{throw E}x=Hbt(x,v,y)}x=qbt(x)}a&&(A=new y3,x=qm(x,A)),qIe(this,x,()=>{if(a){let T=new DataView(A.value.buffer);if(c!=T.getUint32(0,!1))throw new Error(wI)}})}},HIe=new Map});var Ybt,KIe,$Ie,JIe,Ote,ZIe,QIe,II,I5,w5,w3,P5=hs(()=>{yc();Rte();Ybt=64*1024,KIe="message",$Ie="start",JIe="pull",Ote="data",ZIe="ack",QIe="close",II="deflate",I5="inflate",w5=class extends null{constructor(t,n){super({});let i=this,{codecType:r}=t,o;r.startsWith(II)?o=E5:r.startsWith(I5)&&(o=v5),i.outputSize=0;let s=0,a=new o(t,n),c=super.readable,u=new null({transform(d,p){d&&d.length&&(s+=d.length,p.enqueue(d))},flush(){Object.assign(i,{inputSize:s})}}),f=new null({transform(d,p){if(d&&d.length&&(p.enqueue(d),i.outputSize+=d.length,t.outputSize!==Ue&&i.outputSize>t.outputSize))throw new Error(lb)},flush(){let{crc32:d}=a;Object.assign(i,{crc32:d,inputSize:s})}});Object.defineProperty(i,"readable",{get(){return c.pipeThrough(u).pipeThrough(a).pipeThrough(f)}})}},w3=class extends null{constructor(t){let n=[],i=0;(!Number.isFinite(t)||t<1)&&(t=Ybt),super({transform(s,a){for(n.push(s),i+=s.length;i>t;)a.enqueue(r())},flush(s){i&&s.enqueue(o(n,i))}});function r(){let s=new Uint8Array(t),a=0;for(;a<t;){let c=n[0],u=t-a;c.length<=u?(s.set(c,a),a+=c.length,n.shift()):(s.set(c.subarray(0,u),a),n[0]=c.subarray(u),a+=u)}return i-=t,s}function o(s,a){let c=new Uint8Array(a),u=0;for(let f of s)c.set(f,u),u+=f.length;return c}}}});function tPe({initModule:e}){R5=e}function nPe(e){Nte=e}async function iPe(e){let{CompressionStream:t,CompressionStreamFallback:n}=e;if(n&&!n.requiresModule||S5(t)||Dte(t))return!0;if(n)try{return await R5(e),!0}catch{return!1}return!1}function Fte(e){e.createWorker?ePe=!0:D5=!1}async function Mte(e,...t){try{await e(...t)}catch{}}function Bte(e,t){return{run:()=>O5(e,t)}}async function O5({options:e,readable:t,writable:n,onTaskFinished:i},r){let o;try{if(e.compressed&&!e.format){let u=e.codecType.startsWith(II),f=u?r.CompressionStreamFallback:r.DecompressionStreamFallback,d=u?r.CompressionStream:r.DecompressionStream;if(e.useCompressionStream){if(f&&f.requiresModule&&!S5(d))try{await R5(r)}catch{}}else try{await R5(r)}catch{(!f||f.requiresModule)&&(e.useCompressionStream=!0)}}o=new w5(e,r),await t.pipeThrough(o).pipeThrough(new w3(m3(r))).pipeTo(n,{preventClose:!0,preventAbort:!0});let{crc32:s,inputSize:a,outputSize:c}=o;return{crc32:s,inputSize:a,outputSize:c}}catch(s){throw o&&(s.outputSize=o.outputSize),s}finally{i()}}var wE,D5,ePe,Nte,R5,SE,Lte,I3=hs(()=>{yc();_0();P5();wE="Worker startup timeout",R5=()=>{};SE=class{constructor(t,{readable:n,writable:i},{options:r,config:o,streamOptions:s,useWebWorkers:a,transferStreams:c,workerURI:u,createWorker:f},d){let{signal:p}=s;return ePe&&(f=Ue),Object.assign(t,{busy:!0,generation:(t.generation||0)+1,readable:n.pipeThrough(new w3(m3(o))).pipeThrough(new Lte(s),{signal:p}),writable:i,options:Object.assign({},r),workerURI:u,createWorker:f,transferStreams:c,terminate(){return new Promise(g=>{let{worker:m,busy:y}=t;m?(y?t.resolveTerminated=g:(m.terminate(),g()),t.interface=null):g()})},onTaskFinished(){if(t.busy){let{resolveTerminated:g}=t;g&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),g()),t.busy=!1,d(t)}}}),D5===Ue&&(D5=typeof Worker!=nf),(a&&Nte&&(D5&&u||f)?Nte:Bte)(t,o)}},Lte=class extends null{constructor({onstart:t,onprogress:n,size:i,onend:r}){let o=0;super({async start(){t&&await Mte(t,i)},async transform(s,a){o+=s.length,n&&await Mte(n,o,i),a.enqueue(s)},async flush(){r&&await Mte(r,o)}})}}});async function F5(e,t){let{options:n,config:i}=t,{transferStreams:r,useWebWorkers:o,useCompressionStream:s,compressed:a,checkCrc32:c,computeCrc32:u,encrypted:f,format:d,codecURI:p}=n,{workerURI:g,createWorker:m,maxWorkers:y}=i;d&&(p&&(n.codecURI=ext(p,i.baseURI)),await jIe(d,n.codecURI)),t.transferStreams=!d&&(r||r===Ue&&i.transferStreams);let A=!a&&!c&&!u&&!f,b=d===Ue||!!n.codecURI;return t.useWebWorkers=!A&&b&&(o||o===Ue&&i.useWebWorkers),t.workerURI=t.useWebWorkers&&g?g:Ue,t.createWorker=t.useWebWorkers&&m?m:Ue,n.useCompressionStream=s||s===Ue&&i.useCompressionStream,(await x()).run();async function x(){let E=IE.find(v=>!v.busy);if(E)return fPe(E),new SE(E,e,t,T);if(IE.length<y){let v={indexWorker:uPe};return uPe++,IE.push(v),new SE(v,e,t,T)}else return new Promise(v=>{PI.push({resolve:v,stream:e,workerOptions:t}),N5=i.workerStarvationTimeout,L5()})}function T(E){if(dPe(),PI.length){let[{resolve:v,stream:S,workerOptions:I}]=PI.splice(0,1);v(new SE(E,S,I,T)),L5()}else E.worker?(fPe(E),ixt(E,t)):IE=IE.filter(v=>v!=E)}}function ext(e,t){try{return new URL(e,t).toString()}catch{return e}}function L5(){!DI&&PI.length&&Number.isFinite(N5)&&N5>=0&&(DI=setTimeout(txt,N5))}function dPe(){DI&&(clearTimeout(DI),DI=null)}function txt(){if(DI=null,PI.length){let[{resolve:e,stream:t,workerOptions:n}]=PI.splice(0,1),i=Object.assign({},n,{useWebWorkers:!1,workerURI:Ue,createWorker:Ue});e(new SE({},t,i,nxt)),L5()}}function nxt(){dPe(),L5()}function ixt(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{IE=IE.filter(r=>r!=e);try{await e.terminate()}catch{}},i))}function fPe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var IE,PI,DI,N5,uPe,B5=hs(()=>{yc();P5();vE();I3();IE=[],PI=[],uPe=0});function mPe(e){if(rxt){let t="";for(let n=0;n<e.length;n++)t+=hPe[e[n]];return t}else return new TextDecoder().decode(e)}var hPe,rxt,pPe=hs(()=>{hPe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0".split(""),rxt=hPe.length==256});function P3(e,t){return _Pe(e,t,!0)}function gPe(e,t){return _Pe(e,t,!1)}function _Pe(e,t,n){return t&&t.trim().toLowerCase()=="cp437"?mPe(e):new TextDecoder(t,{ignoreBOM:n}).decode(e)}var Hte=hs(()=>{pPe()});function sxt(){xPe=(async()=>{try{let t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader(),n=0,i=await t.read();for(;!i.done;)n+=i.value.length,i=await t.read();Gte=n==1}catch{Gte=!1}})()}function V5(e){return!!(e&&e.getData)}async function kc(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}async function axt(e){return e=new G_(e),await kc(e),(e.size===Ue||!e.readUint8Array)&&(e=new rf(await b0(e.readable)),await kc(e)),e}function Uo(e,t,n){return e.readUint8Array(t,n)}function qte(e,t){return e.createReadable?e.createReadable(t):e.readUint8Array?OI.prototype.createReadable.call(e,t):e.readable}var APe,bPe,oxt,CNi,vNi,Wte,yPe,RI,OI,k5,D3,Gte,xPe,rf,MI,R3,O3,U5,z5,G_,NI,j5=hs(()=>{yc();_0();EE();EI();Hte();APe="Writer iterator completed too soon",bPe="Writer not initialized",oxt="text/plain",CNi=256*1024,vNi=16*1024*1024,Wte="writable",yPe=Symbol(),RI=class{constructor(){this.size=0}init(){this.initialized=!0}},OI=class extends RI{get readable(){return this.createReadable()}createReadable({offset:t=0,size:n,chunkSize:i=m3(V_())}={}){let r=this,o=0;return i=xte(i),new ReadableStream({async pull(s){let a=n===Ue?i:Math.min(i,n-o),c=await Uo(r,t+o,a);c.length&&s.enqueue(c),o+i>=n||!c.length&&a?s.close():o+=i}})}},k5=class extends RI{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(bPe);return t.writeUint8Array(d5(i))}});Object.defineProperty(t,Wte,{get(){return n}})}writeUint8Array(){}},D3=class extends k5{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",pendingCharacters:""})}writeUint8Array(t){let n=this,i,r=n.pendingCharacters,o=n.pendingCharacters.length;for(n.pendingCharacters="",i=0;i<Math.floor((o+t.length)/3)*3-o;i++)r+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pendingCharacters+=String.fromCharCode(t[i]);r.length>2?n.data+=btoa(r):n.pendingCharacters=r+n.pendingCharacters}getData(){return this.data+btoa(this.pendingCharacters)}};rf=class extends OI{constructor(t){super(),Object.assign(this,{sourceBlob:t,size:t.size}),xPe||sxt()}createReadable(t){let n=this,{sourceBlob:i,size:r}=n,{offset:o=0,size:s=r-o}=t||{};return!o&&s>=r?Wm(i.stream()):Gte?Wm(i.slice(o,o+s).stream()):super.createReadable(t)}async readUint8Array(t,n){let i=this,r=t+n,a=await(!t&&r>=i.size?i.sourceBlob:i.sourceBlob.slice(t,r)).arrayBuffer();return a.byteLength>n&&(a=a.slice(t,r)),new Uint8Array(a)}},MI=class extends RI{constructor(t){super();let n=this,i=new null;Object.defineProperty(n,Wte,{get(){return i.writable}}),n.contentType=t,n.blobPromise=b0(i.readable,t),n.blobPromise.catch(()=>{})}getData(){return this.blobPromise}},R3=class extends rf{constructor(t){super(new Blob([t],{type:oxt}))}},O3=class extends MI{constructor(t){super(),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();return i.text&&n?i.text():gPe(new Uint8Array(await i.arrayBuffer()),t)}},U5=class extends OI{constructor(t){super(),this.readers=t}async init(){let t=this;t.lastDiskNumber=0;let n=t.readers=await Promise.all(t.readers.map(axt));t.diskOffsets=n.map(i=>{let r=t.size;return t.size+=i.size,r}),super.init()}getDiskOffset(t){let{diskOffsets:n,size:i}=this,r=n[t];return r===Ue?i:r}async readUint8Array(t,n){let i=this,{readers:r}=this,o,s=0,a=t;for(;r[s]&&a>=r[s].size;)a-=r[s].size,s++;let c=r[s];if(c){let u=c.size;if(a+n<=u)o=await Uo(c,a,n);else{let f=u-a,d=await Uo(c,a,f),p=await i.readUint8Array(t+f,n-f);o=ph(d,p)}}else o=gr;return i.lastDiskNumber=Math.max(s,i.lastDiskNumber),o}},z5=class extends RI{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let r,o,s,a=new WritableStream({async write(d){if(d===yPe){s&&await u();return}let{availableSize:p}=i;if(s)d.length>=p?(await c(d.subarray(0,p)),await u(),d.length>p&&await this.write(d.subarray(p))):await c(d);else{let{value:g,done:m}=await t.next();if(m&&!g)throw new Error(APe);r=g,r.size=0,r.maxSize&&(i.maxSize=r.maxSize),i.availableSize=i.maxSize,await kc(r),o=g.writable,s=o.getWriter(),await this.write(d)}},async close(){s&&(await s.ready,await f())},async abort(d){s&&await s.abort(d)}});Object.defineProperty(i,Wte,{get(){return a}});async function c(d){let p=d.length;p&&(await s.ready,await s.write(d),r.size+=p,i.availableSize-=p)}async function u(){await f(),i.diskOffset+=r.size,i.diskNumber++,s=null,i.availableSize=i.maxSize}async function f(){await s.close()}}async closeDisk(){let t=this.writable.getWriter();try{await t.ready,await t.write(yPe)}finally{t.releaseLock()}}},G_=class{constructor(t){return Array.isArray(t)&&(t=new U5(t)),(t instanceof ReadableStream||typeof t.getReader==Bo)&&(t={readable:Wm(t)}),t}},NI=class{constructor(t){return t.writable===Ue&&typeof t.next==Bo&&(t=new z5(t)),(t instanceof WritableStream||typeof t.getWriter==Bo)&&(t={writable:zIe(t)}),t.size===Ue&&(t.size=0),t}}});var Yte,Xte,M3,Kte,N3,$te,Jte,Zte,LI,FI,L3,Qte,F3,ene,tne,nne,H5,G5,ine,rne,one,W5,sne,ane,cne,lne,PE,une,cxt,fne,q5,lxt,Y5,uxt,fxt,dxt,hxt,dne,hne,mne,pne,mxt,pxt,gxt,_xt,yxt,Axt,bxt,xxt,Txt,Ext,Cxt,vxt,Sxt,wxt,Ixt,Pxt,ub,gne=hs(()=>{Yte="filename",Xte="rawFilename",M3="comment",Kte="rawComment",N3="uncompressedSize",$te="compressedSize",Jte="offset",Zte="diskNumberStart",LI="lastModDate",FI="rawLastModDate",L3="lastAccessDate",Qte="rawLastAccessDate",F3="creationDate",ene="rawCreationDate",tne="internalFileAttributes",nne="externalFileAttributes",H5="internalFileAttribute",G5="externalFileAttribute",ine="msdosAttributesRaw",rne="msdosAttributes",one="msDosCompatible",W5="zip64",sne="encrypted",ane="version",cne="versionMadeBy",lne="zipCrypto",PE="directory",une="executable",cxt="symlink",fne="compressionMethod",q5="signature",lxt="crc32",Y5="extraField",uxt="extraFieldInfoZip",fxt="extraFieldUnix",dxt="extraFieldUnixType1",hxt="extraFieldPkwareUnix",dne="unixMode",hne="setuid",mne="setgid",pne="sticky",mxt="bitFlag",pxt="rawBitFlag",gxt="filenameLength",_xt="extraFieldLength",yxt="unixExternalUpper",Axt="filenameUTF8",bxt="commentUTF8",xxt="rawExtraField",Txt="extraFieldZip64",Ext="extraFieldUnicodePath",Cxt="extraFieldUnicodeComment",vxt="extraFieldAES",Sxt="extraFieldNTFS",wxt="extraFieldExtendedTimestamp",Ixt="extraFieldUSDZ",Pxt=[Yte,Xte,N3,$te,LI,FI,M3,Kte,L3,Qte,F3,ene,Jte,Zte,tne,nne,H5,G5,ine,rne,one,W5,sne,ane,cne,lne,PE,une,cxt,fne,q5,lxt,Y5,fxt,uxt,dxt,hxt,"uid","gid",dne,yxt,hne,mne,pne,mxt,pxt,gxt,_xt,Axt,bxt,xxt,Txt,Ext,Cxt,vxt,Sxt,wxt,Ixt],ub=class{constructor(t){Pxt.forEach(n=>this[n]=t[n])}}});var KPe={};Oq(KPe,{ERR_AMBIGUOUS_ARCHIVE:()=>Gne,ERR_BAD_FORMAT:()=>BI,ERR_CENTRAL_DIRECTORY_NOT_FOUND:()=>kne,ERR_ENCRYPTED:()=>Vne,ERR_ENCRYPTED_CENTRAL_DIRECTORY:()=>Wne,ERR_ENTRY_DATA_OUT_OF_BOUNDS:()=>Hne,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:()=>Bne,ERR_EOCDR_NOT_FOUND:()=>Fne,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:()=>zne,ERR_INVALID_AUTHENTICATION_CODE:()=>cb,ERR_INVALID_COMPRESSED_DATA:()=>SI,ERR_INVALID_CRC32:()=>wI,ERR_INVALID_FILENAME_VALIDATION:()=>Xne,ERR_INVALID_MAX_APPENDED_DATA_SIZE:()=>Kne,ERR_INVALID_PASSWORD:()=>y0,ERR_INVALID_SIGNATURE:()=>ab,ERR_INVALID_STRICTNESS:()=>Yne,ERR_INVALID_UNCOMPRESSED_SIZE:()=>lb,ERR_LOCAL_FILE_HEADER_NOT_FOUND:()=>Une,ERR_OVERLAPPING_ENTRY:()=>jne,ERR_SPLIT_ZIP_FILE:()=>Z5,ERR_UNSAFE_FILENAME:()=>qne,ERR_UNSUPPORTED_COMPRESSION:()=>J5,ERR_UNSUPPORTED_ENCRYPTION:()=>$5,ERR_UNSUPPORTED_UINT64:()=>$ne,ERR_WORKER_STARTUP_TIMEOUT:()=>wE,WARNING_APPENDED_DATA:()=>e9,WARNING_COMPRESSED_PATCHED_DATA:()=>Qne,WARNING_DUPLICATE_FILENAME:()=>iie,WARNING_MALFORMED_EXTRA_FIELD:()=>h9,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:()=>rie,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:()=>oie,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:()=>sie,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:()=>kI,WARNING_PREPENDED_CENTRAL_DIRECTORY:()=>tie,WARNING_PREPENDED_DATA:()=>t9,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:()=>nie,WARNING_UNKNOWN_VERSION:()=>Zne,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:()=>eie,WARNING_UNSORTED_CENTRAL_DIRECTORY:()=>Jne,WARNING_WRAPPED_ENTRIES_COUNT:()=>Q5,ZipReader:()=>ME,ZipReaderStream:()=>i9,isZipFile:()=>zPe});async function zPe(e,t={}){if(e=new G_(e),await kc(e),(e.size===Ue||!e.readUint8Array)&&(e=new rf(await b0(e.readable)),await kc(e)),e.size<22)return!1;let n=cie(t,{}),i=n!=z_,r=WPe(t[_te],n),{endOfDirectoryInfo:o,endOfDirectoryReachingEndCount:s}=await qPe(e,i,r);if(!o||n==ob&&s>1)return!1;let a=_r(di(o),20),c=o.offset+22+a;return e.size-c<=r}function _ne(e){let t=Math.min(e.byteLength,1024)-3;for(let n=0;n<t;n++)if(Ri(e,n)==134630224)return!0;return!1}function DPe(e,t,n){let i=0;for(;n+46<=t.length&&Ri(e,n)==33639248;)n+=46+_r(e,n+28)+_r(e,n+30)+_r(e,n+32),i++;return i%65536?0:i}function yne(e){if(e.length>=6){let t=di(e);if(Ri(t,0)==84233040){let n=_r(t,4);if(6+n<=e.length)return e.subarray(6,6+n)}}}function Hxt(e,t,n){let i=e&&e.compressedSize?e.compressedSize:t;return i>0&&i<=n?i:n}function Gxt(e){let t={rawExtensibleData:e};if(e.length>=28){let n=di(e),i=_r(n,26);Object.assign(t,{compressionMethod:_r(n,0),compressedSize:nd(n,2),uncompressedSize:nd(n,10),encryptionAlgorithm:_r(n,18),bitLength:_r(n,20),flags:_r(n,22),hashAlgorithm:_r(n,24),hashData:e.subarray(28,28+i)})}return t}function VPe(e,t,n){let i=e.rawBitFlag=_r(t,n+2),r=(i&1)==1,o=Ri(t,n+6);Object.assign(e,{encrypted:r,version:_r(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:o,lastModDate:oTt(o),filenameLength:_r(t,n+22),extraFieldLength:_r(t,n+24)})}function jPe(e,t,n,i,r){let{rawExtraField:o}=t,s=t.extraField=new Map,a=di(o),c=0,u=!1;try{for(;c<o.length;){let S=_r(a,c),I=_r(a,c+2);s.set(S,{type:S,data:o.slice(c+4,c+4+I)}),c+=4+I}}catch{u=!0}c>o.length&&(u=!0);let f=_r(n,i+4);Object.assign(t,{signature:Ri(n,i+10),crc32:Ri(n,i+10),compressedSize:Ri(n,i+14),uncompressedSize:Ri(n,i+18)});let d=s.get(1);d&&(Wxt(d,t),t.extraFieldZip64=d);let p=s.get(28789);p&&(RPe(p,Yte,Xte,t,e),t.extraFieldUnicodePath=p);let g=s.get(25461);g&&(RPe(g,M3,Kte,t,e),t.extraFieldUnicodeComment=g);let m=s.get(39169);m&&m.data.length>=7?(qxt(m,t,f),t.extraFieldAES=m):t.compressionMethod=f;let y=s.get(13);y&&(OPe(y,t),t.extraFieldPkwareUnix=y);let A=s.get(22613);A&&(OPe(A,t),t.extraFieldUnixType1=A);let b=s.get(10);b&&(Yxt(b,t),t.extraFieldNTFS=b);let x=s.get(30805),T;if(x&&(T=MPe(x,t,!1),t.extraFieldUnix=x),!T){let S=s.get(30837);S&&(MPe(S,t,!0),t.extraFieldInfoZip=S)}let E=s.get(21589);E&&(Xxt(E,t,r),t.extraFieldExtendedTimestamp=E);let v=s.get(6534);return v&&(t.extraFieldUSDZ=v),u}function Wxt(e,t){t.zip64=!0;let n=di(e.data),i=Uxt.filter(([o,s])=>t[o]==s),r=i.reduce((o,[,s])=>o+IPe[s].bytes,0);if(e.data.length<r)throw new Error(zne);for(let o=0,s=0;o<i.length;o++){let[a,c]=i[o],u=IPe[c];t[a]=e[a]=u.getValue(n,s),s+=u.bytes}}function RPe(e,t,n,i,r){if(e.data.length<5){e.valid=!1;return}let o=di(e.data),s=new Gm;s.append(r[n]);let a=di(new Uint8Array(4));a.setUint32(0,s.get(),!0);let c=Ri(o,1),u=db(o,0);Object.assign(e,{version:u,[t]:P3(e.data.subarray(5)),valid:u==1&&!r.bitFlag.languageEncodingFlag&&c==Ri(a,0)}),e.valid&&(i[t]=e[t],i[t+kxt]=!0)}function qxt(e,t,n){let i=di(e.data),r=db(i,4);Object.assign(e,{vendorVersion:db(i,0),vendorId:db(i,2),strength:r,originalCompressionMethod:n,compressionMethod:_r(i,5)}),t.compressionMethod=e.compressionMethod,e.vendorVersion!=UPe&&(t.crc32=Ue)}function Yxt(e,t){let n=di(e.data),i=4,r;try{for(;i<e.data.length&&!r;){let o=_r(n,i),s=_r(n,i+2);o==1&&(r=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}if(r&&r.length==24){let o=di(r),s=o.getBigUint64(0,!0),a=o.getBigUint64(8,!0),c=o.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:c});let u=Ane(s),f=Ane(a),d=Ane(c),p={lastModDate:u,lastAccessDate:f,creationDate:d};Object.assign(e,p),Object.assign(t,p,{rawLastAccessDate:a,rawCreationDate:c})}}function OPe(e,t){if(e.data.length<8)return;let n=di(e.data),i=new Date((Ri(n,0)|0)*1e3),r=new Date((Ri(n,4)|0)*1e3),o={lastAccessDate:i,lastModDate:r};e.data.length>=12&&(o.uid=_r(n,8),o.gid=_r(n,10)),Object.assign(e,o),Object.assign(t,o)}function MPe(e,t,n){try{let i=di(e.data),r,o;if(n){let s=0,a=db(i,s++),c=db(i,s++);r=NPe(e.data.subarray(s,s+c)),s+=c;let u=db(i,s++);o=NPe(e.data.subarray(s,s+u)),Object.assign(e,{version:a,uid:r,gid:o})}else e.data.length>=4&&(r=_r(i,0),o=_r(i,2),Object.assign(e,{uid:r,gid:o}));return r!==Ue&&(t.uid=r),o!==Ue&&(t.gid=o),r!==Ue||o!==Ue}catch{}}function NPe(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function Xxt(e,t,n){if(!e.data.length)return;let i=di(e.data),r=db(i,0),o=[],s=[];n?((r&1)==1&&(o.push(LI),s.push(FI)),(r&2)==2&&(o.push(L3),s.push(Qte)),(r&4)==4&&(o.push(F3),s.push(ene))):e.data.length>=5&&(o.push(LI),s.push(FI));let a=1;o.forEach((c,u)=>{if(e.data.length>=a+4){let f=Ri(i,a);t[c]=e[c]=new Date((f|0)*1e3);let d=s[u];e[d]=f}a+=4})}async function Kxt({reader:e,fileEntry:t,index:n,offset:i,crc32:r,compressedSize:o,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:u,readRanges:f}){let d=0;if(c&&(u?d=20:d=12),d){let g=await Uo(e,a+o,d+4),m=di(g),y=g.length==d+4&&Ri(m,0)==134695760;if(y){let A=LPe(m,4,u);(t.encrypted&&!t.zipCrypto||A.crc32==r)&&A.compressedSize==o&&A.uncompressedSize==s?d+=4:y=!1}if(g.length>=d){let A=LPe(m,y?4:0,u);A.signature=y,t.localDirectory.dataDescriptor=A}}let p={start:i,end:a+o+d,fileEntry:t};for(let[g,m]of f)if(g!=n&&p.start<m.end&&m.start<p.end){let y=new Error(jne);throw y.overlappingEntry=m.fileEntry,y}f.set(n,p)}function LPe(e,t,n){let i=Ri(e,t),r,o;return n?(r=nd(e,t+4),o=nd(e,t+12)):(r=Ri(e,t+4),o=Ri(e,t+8)),{crc32:i,compressedSize:r,uncompressedSize:o}}function UI(e,t){return e.getDiskOffset?e.getDiskOffset(t):0}async function $xt(e){return await HPe(e)==134695760}async function Jxt(e){let t=await HPe(e);return t==134695760||t==808471376}async function HPe(e){let t=await Uo(e,0,4);return Ri(di(t))}function GPe(e){return e===ob||e===l5||e===z_}function Zxt(e,t,n){return Math.min(e,n?t*jxt:t)}function cie(e,t){return FPe(e,FPe(t,l5))}function FPe(e,t){let n=e[rIe];if(n!==Ue){if(!GPe(n))throw new Error(Yne);return n}let i=e[Uwe];return i===Ue?t:i?ob:t==z_?z_:l5}function Qxt(e,t){return e===Ue?t!=z_:!!e}function eTt(e,t){return e===Ue?t==ob:!!e}function tTt(e,t){if(e===Ue)return t;if(!GPe(e))throw new Error(Xne);return e}function nTt(e,t){if(t==z_)return!1;let n=e.split("/");return n.length>1&&n[n.length-1]===""&&n.pop(),n.includes("..")||e.startsWith("/")||e.startsWith("\\\\")||Bxt.test(e)?!0:t==ob&&(n.includes(".")||n.includes(""))}function WPe(e,t){if(e!==Ue){let n=TE(e);if(typeof n!=Pwe||Number.isNaN(n)||n<0)throw new Error(Kne);return n}return t==ob?0:t==z_?1/0:65535}async function qPe(e,t,n){let{size:i}=e,r=Math.min(i,65557),o={count:Vxt},s,a,c=0;for await(let[u,f,d,p,g]of YPe(e,r)){let m=_r(u,p+20);if(g+22+m==i){let y=await XPe(e,u,f,p,g,i,o);if(y==n9){if(s||(s=xne(d,p,g)),c++,!t||c>1)break}else y==aie&&!a&&(a=xne(d,p,g))}}return s||(s=a),s||(s=await iTt(e,n,o)),{endOfDirectoryInfo:s,endOfDirectoryReachingEndCount:c}}async function iTt(e,t,n){let{size:i}=e,r=Math.min(i,t==1/0?i:65557+t),o,s;for await(let[a,c,u,f,d]of YPe(e,r)){let p=xne(u,f,d);o||(o=p);let g=await XPe(e,a,c,f,d,i,n);if(g==n9)return p;g==aie&&!s&&(s=p)}return s||o}async function*YPe(e,t){let n=e.size-t,i=await Uo(e,n,t),r=di(i);for(let o=i.length-22;o>=0;o--)Ri(r,o)==101010256&&(yield[r,n,i,o,n+o])}function xne(e,t,n){return{offset:n,buffer:e.slice(t,t+22).buffer}}async function XPe(e,t,n,i,r,o,s){let a=_r(t,i+10),c=Ri(t,i+12),u=Ri(t,i+16);if(a==65535||c==4294967295||u==4294967295)return await BPe(e,t,n,r-20,o,s)==117853008?n9:PPe;if(!a&&!c)return aie;let f=_r(t,i+6);for(let d of[r-c,UI(e,f)+u])if(await BPe(e,t,n,d,o,s)==33639248)return n9;return PPe}async function BPe(e,t,n,i,r,o){if(i<0||i+4>r)return Ue;if(i>=n)return Ri(t,i-n);if(o.count>0){o.count--;let s=await Uo(e,i,4);return Ri(di(s),0)}return Ue}function rTt(e,t,n,i,r){let{rawFilename:o}=e,s=!r,a=e.decryptedDirectory&&(t.rawBitFlag&8192)==8192;i&&!a&&(n.length!=o.length||n.some((c,u)=>c!=o[u]))&&E0(s,r,"mismatched local file header (filename)"),(t.rawBitFlag&wPe)!=(e.rawBitFlag&wPe)&&E0(s,r,rie),t.compressionMethod!=e.compressionMethod&&E0(s,r,oie),!t.bitFlag.dataDescriptor&&!a&&(t.crc32||t.compressedSize||t.uncompressedSize)&&(t.crc32!=e.crc32||t.compressedSize!=e.compressedSize||t.uncompressedSize!=e.uncompressedSize)&&E0(s,r,sie)}function E0(e,t,n){e?X5(n):_h(t,n)}function _h(e,t,n){if(!e.some(i=>i.reason==t)){let i={reason:t};n!==Ue&&(i.filename=n),e.push(i)}}function X5(e){let t=new Error(Gne);throw t.reason=e,t}function Os(e,t,n){return t[n]===Ue?e.options[n]:t[n]}function kPe(e,t,n){return gI(Os(e,t,n))}function oTt(e){let t=(e&4294901760)>>16,n=e&65535,i=new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0);return i<mI?mI:i}function Ane(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function db(e,t){return e.getUint8(t)}function _r(e,t){return e.getUint16(t,!0)}function Ri(e,t){return e.getUint32(t,!0)}function nd(e,t){let n=e.getBigUint64(t,!0);if(n>zxt)throw new Error($ne);return Number(n)}var BI,Fne,Bne,kne,Une,zne,Vne,$5,J5,Z5,jne,Hne,Gne,Wne,qne,Yne,Xne,Kne,$ne,Jne,Zne,Qne,h9,eie,Q5,e9,t9,tie,nie,iie,kI,rie,oie,sie,Fxt,Bxt,vPe,kxt,SPe,wPe,UPe,Uxt,IPe,zxt,Vxt,jxt,PPe,aie,n9,ME,i9,bne,lie=hs(()=>{yc();_0();vE();B5();j5();Hte();EE();EI();_3();gne();h3();BI="File format is not recognized",Fne="End of central directory not found",Bne="End of Zip64 central directory locator not found",kne="Central directory header not found",Une="Local file header not found",zne="Zip64 extra field not found",Vne="File contains encrypted entry",$5="Encryption method not supported",J5="Compression method not supported",Z5="Split zip file",jne="Overlapping entry found",Hne="Entry data out of bounds",Gne="Ambiguous archive",Wne="Encrypted central directory is not supported",qne="Unsafe filename",Yne="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Xne="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Kne="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",$ne="64-bit value exceeds Number.MAX_SAFE_INTEGER",Jne="unsorted central directory",Zne="unknown version needed to extract",Qne="compressed patched data",h9="malformed extra field",eie="unknown zip64 extensible data",Q5="wrapped entries count",e9="appended data",t9="prepended data",tie="prepended central directory",nie="trailing central directory data",iie="duplicate filename",kI="mismatched zip64 end of central directory record",rie="mismatched local file header (general purpose bit flag)",oie="mismatched local file header (compression method)",sie="mismatched local file header (crc32 or sizes)",Fxt=63,Bxt=/^[a-zA-Z]:/,vPe="utf-8",kxt="UTF8",SPe="cp437",wPe=2057,UPe=1,Uxt=[[N3,4294967295],[$te,4294967295],[Jte,4294967295],[Zte,65535]],IPe={65535:{getValue:Ri,bytes:4},4294967295:{getValue:nd,bytes:8}},zxt=BigInt(Number.MAX_SAFE_INTEGER),Vxt=64,jxt=1032,PPe=0,aie=1,n9=2,ME=class{constructor(t,n={}){Object.assign(this,{reader:new G_(t),options:n,readRanges:new Map})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n;if(await kc(i),(i.size===Ue||!i.readUint8Array)&&(i=new rf(await b0(i.readable)),await kc(i)),i.size<22)throw new Error(BI);let r=n.warnings=[],o=cie(t,n.options),s=o==ob,a=o!=z_,c=WPe(Os(n,t,_te),o),u=tTt(Os(n,t,oIe),o),f=Os(n,t,sIe),{endOfDirectoryInfo:d,endOfDirectoryReachingEndCount:p}=await qPe(i,a,c);if(!d)throw await $xt(i)?new Error(Z5):new Error(Fne);a&&p>1&&X5("multiple end of central directory records");let g=di(d),m=Ri(g,12),y=Ri(g,16),A=d.offset,b=_r(g,20),x=A+22+b,T=i.size-x;T>c&&X5(e9),T>0&&_h(r,e9);let E=_r(g,4),v=i.lastDiskNumber||0,S=_r(g,6),I=_r(g,10),R=0,O,L,_,C,w=56,P,M=y==4294967295||m==4294967295||I==65535||S==65535;if(y!=4294967295&&S!=65535&&(y+=UI(i,S)),M){let He=d.offset>=20?await Uo(i,d.offset-20,20):gr,Xe=di(He);if(He.length==20&&Ri(Xe,0)==117853008){y=UI(i,Ri(Xe,4))+nd(Xe,8);let $e=await Uo(i,y,56),Pe=di($e),qe=d.offset-20-56;if(($e.length<56||Ri(Pe,0)!=101075792)&&y!=qe&&qe>=0){let st=y;y=qe,y>st&&(R=y-st),$e=await Uo(i,y,56),Pe=di($e)}if($e.length<56||Ri(Pe,0)!=101075792)throw new Error(Bne);if(_=!0,C=nd(Pe,4)>44,C){let st=Math.min(nd(Pe,4)-44,i.size-y-56);if(st>0){w+=st;let vt=await Uo(i,y+56,st);P=Gxt(vt)}}E==65535?E=Ri(Pe,16):E!=Ri(Pe,16)&&E0(s,r,kI),S==65535?S=Ri(Pe,20):S!=Ri(Pe,20)&&E0(s,r,kI),I==65535?I=nd(Pe,32):I!=nd(Pe,32)&&E0(s,r,kI),m==4294967295?m=nd(Pe,40):m!=nd(Pe,40)&&E0(s,r,kI),y=UI(i,S)+nd(Pe,48)+R}}let F=m,V=d.offset-(_?w+20:0);if(y>=i.size&&(R=i.size-y-m-22,y=i.size-m-22),v!=E)throw new Error(Z5);if(y<0)throw new Error(BI);let B=0,j=await Uo(i,y,m),k=di(j);if(m){if(j.length<4)throw new Error(BI);let He=V-m;if(y!=He&&S==E){let Xe=Ri(k,B)==33639248||!!(P&&P.compressedSize)||_ne(k),$e=!Xe;if(!$e&&He>=0&&He+4<=i.size){let Pe=await Uo(i,He,4);$e=Ri(di(Pe),0)==33639248}if($e){let Pe=y;y=He,y>Pe&&(R+=y-Pe,O=Xe),j=await Uo(i,y,m),k=di(j)}}}let G=V-y;if(m!=G&&G>=0&&S==E&&(m=G,j=await Uo(i,y,m),k=di(j)),y<0||y>=i.size)throw new Error(BI);n.directoryOffset=y,n.directoryLength=F;let q=kPe(n,t,aIe),Q,W;if(q&&I&&j.length>=4&&Ri(k,0)!=33639248&&(C||_ne(k))){let He=Hxt(P,F,j.length);W=j.subarray(He),j=await q(j.subarray(0,He),P),k=di(j),F=j.length,Q=!0}P&&!Q&&(j.length<4||Ri(k,0)==33639248)&&_h(r,eie),L=y;let J=Os(n,t,Rwe),Z=Os(n,t,Owe),ae=new Set,Ae,fe=-1,xe=!s&&!_;!I&&xe&&(I=DPe(k,j,B),I&&_h(r,Q5));for(let He=0;He<I;He++){let Xe=new bne(i,n.options);if(B+46>j.length||Ri(k,B)!=33639248)throw He==0&&!Q&&(C||_ne(k))?new Error(Wne):new Error(kne);VPe(Xe,k,B+6);let $e=!!Xe.bitFlag.languageEncodingFlag,Pe=B+46,qe=Pe+Xe.filenameLength,st=qe+Xe.extraFieldLength,vt=_r(k,B+4),Gt=vt>>8==0,lt=vt>>8==3,mt=j.subarray(Pe,qe),ft=_r(k,B+32),Xt=st+ft,rt=j.subarray(st,Xt),ht=$e,Bi=$e,Xn=Ri(k,B+38),bi=Xn&255,Wi={readOnly:!!(bi&1),hidden:!!(bi&2),system:!!(bi&4),directory:!!(bi&16),archive:!!(bi&32)},wi=Ri(k,B+42),hi=kPe(n,t,Mwe)||P3,xi=ht?vPe:J||SPe,jn=Bi?vPe:Z||SPe,nn=hi(mt,xi,a5);if(nn===Ue&&(nn=P3(mt,xi)),f){let ki=f(nn);ki!==Ue&&(nn=ki)}if(nTt(nn,u)){let ki=new Error(qne);throw ki.filename=nn,ki}let Wn=hi(rt,jn,c5);Wn===Ue&&(Wn=P3(rt,jn)),Object.assign(Xe,{index:He,decryptedDirectory:Q,versionMadeBy:vt,msDosCompatible:Gt,zip64:!1,compressedSize:0,uncompressedSize:0,commentLength:ft,offset:wi,diskNumberStart:_r(k,B+34),internalFileAttributes:_r(k,B+36),externalFileAttributes:Xn,msdosAttributesRaw:bi,msdosAttributes:Wi,rawFilename:mt,filenameUTF8:ht,commentUTF8:Bi,rawExtraField:j.subarray(qe,st),rawComment:rt,filename:nn,comment:Wn}),jPe(Xe,Xe,k,B+6)&&_h(r,h9,nn),Xe.offset+=R;let Zi=UI(i,Xe.diskNumberStart)+Xe.offset;L=Math.min(Zi,L),Zi<fe&&_h(r,Jne,nn),fe=Zi,(Xe.version&255)>Fxt&&_h(r,Zne,nn),(Xe.rawBitFlag&32)==32&&_h(r,Qne,nn),ae.has(Xe.filename)&&(Ae=!0),ae.add(Xe.filename);let Mr=Xe.externalFileAttributes>>16&65535;Xe.unixMode===Ue&&(Mr&16877)!=0&&(Xe.unixMode=Mr);let fo=!!(Xe.unixMode&2048),Bs=!!(Xe.unixMode&1024),Ks=!!(Xe.unixMode&512),gi=((Xe.unixMode===Ue?Mr:Xe.unixMode)&61440)==40960,ho=!gi&&(Xe.unixMode!==Ue?(Xe.unixMode&73)!=0:lt&&(Mr&73)!=0),ur=Xe.unixMode!==Ue&&(Xe.unixMode&61440)==16384,Zo=(Mr&61440)==16384;Object.assign(Xe,{setuid:fo,setgid:Bs,sticky:Ks,symlink:gi,unixExternalUpper:Mr,internalFileAttribute:Xe.internalFileAttributes,externalFileAttribute:Xe.externalFileAttributes,executable:ho,directory:ur||Zo||Gt&&Wi.directory||Xe.filename.endsWith("/"),zipCrypto:Xe.encrypted&&!Xe.extraFieldAES});let Bn=new ub(Xe);if(Bn.getData=(ki,Nr)=>Xe.getData(ki,Bn,n.readRanges,Nr),Bn.arrayBuffer=async ki=>{let Nr=new null,Wc=b0(Nr.readable).then(bd=>bd.arrayBuffer());return Wc.catch(()=>{}),await Xe.getData(Nr,Bn,n.readRanges,ki),Wc},B=Xt,He==I-1&&xe){let ki=DPe(k,j,B);ki&&(I+=ki,_h(r,Q5))}let{onprogress:qi}=t;if(qi)try{await qi(He+1,I,new ub(Xe))}catch{}yield Bn}let ge=B,we=yne(j.subarray(B))||(Q?yne(W):Ue);if(!we&&!Q){let He=y+B,Xe=Math.min(V-He,65541);Xe>=6&&(we=yne(await Uo(i,He,Xe)))}we&&(n.digitalSignature=we,ge=B+6+we.length),(B!=F&&ge!=F||!Q&&B!=m&&ge!=m)&&E0(s,r,nie),Ae&&E0(s,r,iie);let Se=Os(n,t,Nwe),Re=Os(n,t,Lwe),Qe=(s||Se)&&I&&L==4&&await Jxt(i)?4:0;return s&&(R||I&&L>Qe)&&X5(t9),(R||I&&L>4)&&_h(r,t9),O&&_h(r,tie),Se&&(n.prependedData=L>Qe?await Uo(i,Qe,L-Qe):gr),n.comment=b?await Uo(i,A+22,b):gr,Re&&(n.appendedData=x<i.size?await Uo(i,x,i.size-x):gr),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){let{reader:t}=this;!t.readUint8Array&&t.readable&&!t.readable.locked&&await t.readable.cancel()}},i9=class{constructor(t={}){let{readable:n,writable:i}=new null,r=new ME(n,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(o){let{done:s,value:a}=await r.next();if(s)return o.close();let c={...a,readable:(function(){let{readable:u,writable:f}=new null;if(a.getData)return d(),u;async function d(){try{await a.getData(f)}catch(p){try{await f.abort(p)}catch{}}}})()};delete c.getData,o.enqueue(c)}}),this.writable=i}};bne=class{constructor(t,n){Object.assign(this,{reader:t,options:n})}async getData(t,n,i,r={}){let o=this,s=V_(),{reader:a,index:c,offset:u,diskNumberStart:f,extraFieldAES:d,extraFieldZip64:p,compressionMethod:g,bitFlag:m,rawBitFlag:y,crc32:A,rawLastModDate:b,uncompressedSize:x,compressedSize:T}=o,{dataDescriptor:E}=m,v=n.localDirectory={},S=n.warnings=[],I=UI(a,f)+u,R=await Uo(a,I,30),O=di(R),L=Os(o,r,QG),_=Os(o,r,e5),C=Os(o,r,t5);if(f5(L,_),L=L&&L.length&&L,_=_&&_.length&&_,d&&d.originalCompressionMethod!=99)throw new Error(J5);if(R.length<30||Ri(O,0)!=67324752)throw new Error(Une);VPe(v,O,4);let{extraFieldLength:w,filenameLength:P}=v,M=v.dataOffset=I+30+P+w,F=Os(o,r,zwe),V=cie(r,o.options),B=Qxt(F,V),j=eTt(F,V),k=gr;if(j&&(P||w)){let ft=await Uo(a,I+30,P+w);k=ft.subarray(0,P),v.rawExtraField=ft.subarray(P)}else v.rawExtraField=w?await Uo(a,I+30+P,w):gr;j&&(v.rawFilename=k),jPe(o,v,O,4,!0)&&_h(S,h9),rTt(o,v,k,j,B?Ue:S);let{lastAccessDate:G,creationDate:q,uid:Q,gid:W}=v;G&&(n.lastAccessDate=G),q&&(n.creationDate=q),Q!==Ue&&n.uid===Ue&&(n.uid=Q),W!==Ue&&n.gid===Ue&&(n.gid=W);let J=o.encrypted&&v.encrypted&&!C,Z=J&&!d;if(C||(n.zipCrypto=Z),J&&(v.rawBitFlag&64)==64)throw new Error($5);let ae=C?Ue:x5(g);if(g!=0&&g!=8&&g!=9&&!ae&&!C)throw new Error(J5);if(J){if(!Z&&(d.strength<1||d.strength>3))throw new Error($5);if(!L&&!_)throw new Error(Vne)}if(M+T>a.size)throw new Error(Hne);let Ae=T,fe=Wm(a.createReadable({offset:M,size:Ae})),xe=u5(Os(o,r,n5)),ge=Os(o,r,Fwe),we=Os(o,r,kwe),Se=Os(o,r,Bwe);Se&&(we=!0);let{onstart:Re,onprogress:Qe,onend:He}=r,Xe=g!=0&&!C,$e=C?T:x,Pe=g==9,qe=Os(o,r,r5);Pe&&(qe=!1);let st=Os(o,r,jwe),vt=(st===Ue?Os(o,r,Vwe):st)&&!C&&(!J||Z||d&&d.vendorVersion==UPe),Gt={options:{codecType:I5,password:L,rawPassword:_,zipCrypto:Z,encryptionStrength:d&&d.strength,checkCrc32:vt,checkAuthenticationCode:Os(o,r,Hwe),passwordVerification:Z&&(E?b>>>8&255:A>>>24&255),outputSize:$e,crc32:A,compressed:Xe,encrypted:J,useWebWorkers:Os(o,r,i5),useCompressionStream:qe,transferStreams:Os(o,r,o5),deflate64:Pe,format:ae?ae.format:Ue,codecURI:ae?ae.codecURI:Ue,compressionMethod:g,rawBitFlag:y,checkPasswordOnly:ge},config:s,streamOptions:{signal:xe,size:Ae,onstart:Re,onprogress:Qe,onend:He}};we&&await Kxt({reader:a,fileEntry:n,index:c,offset:I,crc32:A,compressedSize:T,uncompressedSize:x,dataOffset:M,dataDescriptor:E||v.bitFlag.dataDescriptor,extraFieldZip64:p||v.extraFieldZip64,readRanges:i});let lt,mt;try{if(!Se){ge&&(t=new WritableStream),t=new NI(t),await kc(t,Zxt($e,T,Xe)),{writable:lt}=t;let{outputSize:ft}=await F5({readable:fe,writable:lt},Gt);if(t.size+=ft,ft!=$e)throw new Error(lb)}}catch(ft){if(ft.outputSize!==Ue&&(t.size+=ft.outputSize),!ge||ft.message!=j_)throw mt=ft,ft}finally{if(!(!V5(t)&&Os(o,r,s5))&&lt&&!lt.locked){let Xt=lt.getWriter();if(mt)try{await Xt.abort(mt)}catch{}else await Xt.close()}}return ge||Se?Ue:t.getData?t.getData():lt}}});var a1e=Yi((w9,s1e)=>{(function(e,t){typeof w9=="object"&&typeof s1e<"u"?t(w9):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(w9,function(e){"use strict";function t(T){return T}function n(T){if(T==null)return t;var E,v,S=T.scale[0],I=T.scale[1],R=T.translate[0],O=T.translate[1];return function(L,_){_||(E=v=0);var C=2,w=L.length,P=new Array(w);for(P[0]=(E+=L[0])*S+R,P[1]=(v+=L[1])*I+O;C<w;)P[C]=L[C],++C;return P}}function i(T){var E=n(T.transform),v,S=1/0,I=S,R=-S,O=-S;function L(C){C=E(C),C[0]<S&&(S=C[0]),C[0]>R&&(R=C[0]),C[1]<I&&(I=C[1]),C[1]>O&&(O=C[1])}function _(C){switch(C.type){case"GeometryCollection":C.geometries.forEach(_);break;case"Point":L(C.coordinates);break;case"MultiPoint":C.coordinates.forEach(L);break}}T.arcs.forEach(function(C){for(var w=-1,P=C.length,M;++w<P;)M=E(C[w],w),M[0]<S&&(S=M[0]),M[0]>R&&(R=M[0]),M[1]<I&&(I=M[1]),M[1]>O&&(O=M[1])});for(v in T.objects)_(T.objects[v]);return[S,I,R,O]}function r(T,E){for(var v,S=T.length,I=S-E;I<--S;)v=T[I],T[I++]=T[S],T[S]=v}function o(T,E){return typeof E=="string"&&(E=T.objects[E]),E.type==="GeometryCollection"?{type:"FeatureCollection",features:E.geometries.map(function(v){return s(T,v)})}:s(T,E)}function s(T,E){var v=E.id,S=E.bbox,I=E.properties==null?{}:E.properties,R=a(T,E);return v==null&&S==null?{type:"Feature",properties:I,geometry:R}:S==null?{type:"Feature",id:v,properties:I,geometry:R}:{type:"Feature",id:v,bbox:S,properties:I,geometry:R}}function a(T,E){var v=n(T.transform),S=T.arcs;function I(w,P){P.length&&P.pop();for(var M=S[w<0?~w:w],F=0,V=M.length;F<V;++F)P.push(v(M[F],F));w<0&&r(P,V)}function R(w){return v(w)}function O(w){for(var P=[],M=0,F=w.length;M<F;++M)I(w[M],P);return P.length<2&&P.push(P[0]),P}function L(w){for(var P=O(w);P.length<4;)P.push(P[0]);return P}function _(w){return w.map(L)}function C(w){var P=w.type,M;switch(P){case"GeometryCollection":return{type:P,geometries:w.geometries.map(C)};case"Point":M=R(w.coordinates);break;case"MultiPoint":M=w.coordinates.map(R);break;case"LineString":M=O(w.arcs);break;case"MultiLineString":M=w.arcs.map(O);break;case"Polygon":M=_(w.arcs);break;case"MultiPolygon":M=w.arcs.map(_);break;default:return null}return{type:P,coordinates:M}}return C(E)}function c(T,E){var v={},S={},I={},R=[],O=-1;E.forEach(function(C,w){var P=T.arcs[C<0?~C:C],M;P.length<3&&!P[1][0]&&!P[1][1]&&(M=E[++O],E[O]=C,E[w]=M)}),E.forEach(function(C){var w=L(C),P=w[0],M=w[1],F,V;if(F=I[P])if(delete I[F.end],F.push(C),F.end=M,V=S[M]){delete S[V.start];var B=V===F?F:F.concat(V);S[B.start=F.start]=I[B.end=V.end]=B}else S[F.start]=I[F.end]=F;else if(F=S[M])if(delete S[F.start],F.unshift(C),F.start=P,V=I[P]){delete I[V.end];var j=V===F?F:V.concat(F);S[j.start=V.start]=I[j.end=F.end]=j}else S[F.start]=I[F.end]=F;else F=[C],S[F.start=P]=I[F.end=M]=F});function L(C){var w=T.arcs[C<0?~C:C],P=w[0],M;return T.transform?(M=[0,0],w.forEach(function(F){M[0]+=F[0],M[1]+=F[1]})):M=w[w.length-1],C<0?[M,P]:[P,M]}function _(C,w){for(var P in C){var M=C[P];delete w[M.start],delete M.start,delete M.end,M.forEach(function(F){v[F<0?~F:F]=1}),R.push(M)}}return _(I,S),_(S,I),E.forEach(function(C){v[C<0?~C:C]||R.push([C])}),R}function u(T){return a(T,f.apply(this,arguments))}function f(T,E,v){var S,I,R;if(arguments.length>1)S=d(T,E,v);else for(I=0,S=new Array(R=T.arcs.length);I<R;++I)S[I]=I;return{type:"MultiLineString",arcs:c(T,S)}}function d(T,E,v){var S=[],I=[],R;function O(P){var M=P<0?~P:P;(I[M]||(I[M]=[])).push({i:P,g:R})}function L(P){P.forEach(O)}function _(P){P.forEach(L)}function C(P){P.forEach(_)}function w(P){switch(R=P,P.type){case"GeometryCollection":P.geometries.forEach(w);break;case"LineString":L(P.arcs);break;case"MultiLineString":case"Polygon":_(P.arcs);break;case"MultiPolygon":C(P.arcs);break}}return w(E),I.forEach(v==null?function(P){S.push(P[0].i)}:function(P){v(P[0].g,P[P.length-1].g)&&S.push(P[0].i)}),S}function p(T){for(var E=-1,v=T.length,S,I=T[v-1],R=0;++E<v;)S=I,I=T[E],R+=S[0]*I[1]-S[1]*I[0];return Math.abs(R)}function g(T){return a(T,m.apply(this,arguments))}function m(T,E){var v={},S=[],I=[];E.forEach(R);function R(_){switch(_.type){case"GeometryCollection":_.geometries.forEach(R);break;case"Polygon":O(_.arcs);break;case"MultiPolygon":_.arcs.forEach(O);break}}function O(_){_.forEach(function(C){C.forEach(function(w){(v[w=w<0?~w:w]||(v[w]=[])).push(_)})}),S.push(_)}function L(_){return p(a(T,{type:"Polygon",arcs:[_]}).coordinates[0])}return S.forEach(function(_){if(!_._){var C=[],w=[_];for(_._=1,I.push(C);_=w.pop();)C.push(_),_.forEach(function(P){P.forEach(function(M){v[M<0?~M:M].forEach(function(F){F._||(F._=1,w.push(F))})})})}}),S.forEach(function(_){delete _._}),{type:"MultiPolygon",arcs:I.map(function(_){var C=[],w;if(_.forEach(function(B){B.forEach(function(j){j.forEach(function(k){v[k<0?~k:k].length<2&&C.push(k)})})}),C=c(T,C),(w=C.length)>1)for(var P=1,M=L(C[0]),F,V;P<w;++P)(F=L(C[P]))>M&&(V=C[0],C[0]=C[P],C[P]=V,M=F);return C}).filter(function(_){return _.length>0})}}function y(T,E){for(var v=0,S=T.length;v<S;){var I=v+S>>>1;T[I]<E?v=I+1:S=I}return v}function A(T){var E={},v=T.map(function(){return[]});function S(B,j){B.forEach(function(k){k<0&&(k=~k);var G=E[k];G?G.push(j):E[k]=[j]})}function I(B,j){B.forEach(function(k){S(k,j)})}function R(B,j){B.type==="GeometryCollection"?B.geometries.forEach(function(k){R(k,j)}):B.type in O&&O[B.type](B.arcs,j)}var O={LineString:S,MultiLineString:I,Polygon:I,MultiPolygon:function(B,j){B.forEach(function(k){I(k,j)})}};T.forEach(R);for(var L in E)for(var _=E[L],C=_.length,w=0;w<C;++w)for(var P=w+1;P<C;++P){var M=_[w],F=_[P],V;(V=v[M])[L=y(V,F)]!==F&&V.splice(L,0,F),(V=v[F])[L=y(V,M)]!==M&&V.splice(L,0,M)}return v}function b(T){if(T==null)return t;var E,v,S=T.scale[0],I=T.scale[1],R=T.translate[0],O=T.translate[1];return function(L,_){_||(E=v=0);var C=2,w=L.length,P=new Array(w),M=Math.round((L[0]-R)/S),F=Math.round((L[1]-O)/I);for(P[0]=M-E,E=M,P[1]=F-v,v=F;C<w;)P[C]=L[C],++C;return P}}function x(T,E){if(T.transform)throw new Error("already quantized");if(!E||!E.scale){if(!((O=Math.floor(E))>=2))throw new Error("n must be \u22652");_=T.bbox||i(T);var v=_[0],S=_[1],I=_[2],R=_[3],O;E={scale:[I-v?(I-v)/(O-1):1,R-S?(R-S)/(O-1):1],translate:[v,S]}}else _=T.bbox;var L=b(E),_,C,w=T.objects,P={};function M(B){return L(B)}function F(B){var j;switch(B.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:B.geometries.map(F)};break;case"Point":j={type:"Point",coordinates:M(B.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:B.coordinates.map(M)};break;default:return B}return B.id!=null&&(j.id=B.id),B.bbox!=null&&(j.bbox=B.bbox),B.properties!=null&&(j.properties=B.properties),j}function V(B){var j=0,k=1,G=B.length,q,Q=new Array(G);for(Q[0]=L(B[0],0);++j<G;)((q=L(B[j],j))[0]||q[1])&&(Q[k++]=q);return k===1&&(Q[k++]=[0,0]),Q.length=k,Q}for(C in w)P[C]=F(w[C]);return{type:"Topology",bbox:_,transform:E,objects:P,arcs:T.arcs.map(V)}}e.bbox=i,e.feature=o,e.merge=g,e.mergeArcs=m,e.mesh=u,e.meshArcs=f,e.neighbors=A,e.quantize=x,e.transform=n,e.untransform=b,Object.defineProperty(e,"__esModule",{value:!0})})});var Km={};Oq(Km,{__addDisposableResource:()=>J1e,__assign:()=>D9,__asyncDelegator:()=>H1e,__asyncGenerator:()=>j1e,__asyncValues:()=>G1e,__await:()=>XI,__awaiter:()=>F1e,__classPrivateFieldGet:()=>X1e,__classPrivateFieldIn:()=>$1e,__classPrivateFieldSet:()=>K1e,__createBinding:()=>O9,__decorate:()=>P1e,__disposeResources:()=>Z1e,__esDecorate:()=>R1e,__exportStar:()=>k1e,__extends:()=>w1e,__generator:()=>B1e,__importDefault:()=>Y1e,__importStar:()=>q1e,__makeTemplateObject:()=>W1e,__metadata:()=>L1e,__param:()=>D1e,__propKey:()=>M1e,__read:()=>zie,__rest:()=>I1e,__rewriteRelativeImportExtension:()=>Q1e,__runInitializers:()=>O1e,__setFunctionName:()=>N1e,__spread:()=>U1e,__spreadArray:()=>V1e,__spreadArrays:()=>z1e,__values:()=>R9,default:()=>SEt});function w1e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kie(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function I1e(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function P1e(e,t,n,i){var r=arguments.length,o=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,n):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function D1e(e,t){return function(n,i){t(n,i,e)}}function R1e(e,t,n,i,r,o){function s(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var a=i.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!t&&e?i.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d,p=!1,g=n.length-1;g>=0;g--){var m={};for(var y in i)m[y]=y==="access"?{}:i[y];for(var y in i.access)m.access[y]=i.access[y];m.addInitializer=function(b){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(b||null))};var A=(0,n[g])(a==="accessor"?{get:f.get,set:f.set}:f[c],m);if(a==="accessor"){if(A===void 0)continue;if(A===null||typeof A!="object")throw new TypeError("Object expected");(d=s(A.get))&&(f.get=d),(d=s(A.set))&&(f.set=d),(d=s(A.init))&&r.unshift(d)}else(d=s(A))&&(a==="field"?r.unshift(d):f[c]=d)}u&&Object.defineProperty(u,i.name,f),p=!0}function O1e(e,t,n){for(var i=arguments.length>2,r=0;r<t.length;r++)n=i?t[r].call(e,n):t[r].call(e);return i?n:void 0}function M1e(e){return typeof e=="symbol"?e:"".concat(e)}function N1e(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function L1e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function F1e(e,t,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(f){try{u(i.next(f))}catch(d){s(d)}}function c(f){try{u(i.throw(f))}catch(d){s(d)}}function u(f){f.done?o(f.value):r(f.value).then(a,c)}u((i=i.apply(e,t||[])).next())})}function B1e(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(f){return c([u,f])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(i=1,r&&(o=u[0]&2?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,r=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(f){u=[6,f],r=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function k1e(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&O9(t,e,n)}function R9(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zie(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),r,o=[],s;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return o}function U1e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(zie(arguments[t]));return e}function z1e(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),r=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}function V1e(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}function XI(e){return this instanceof XI?(this.v=e,this):new XI(e)}function j1e(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n.apply(e,t||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(g){return function(m){return Promise.resolve(m).then(g,d)}}function a(g,m){i[g]&&(r[g]=function(y){return new Promise(function(A,b){o.push([g,y,A,b])>1||c(g,y)})},m&&(r[g]=m(r[g])))}function c(g,m){try{u(i[g](m))}catch(y){p(o[0][3],y)}}function u(g){g.value instanceof XI?Promise.resolve(g.value.v).then(f,d):p(o[0][2],g)}function f(g){c("next",g)}function d(g){c("throw",g)}function p(g,m){g(m),o.shift(),o.length&&c(o[0][0],o[0][1])}}function H1e(e){var t,n;return t={},i("next"),i("throw",function(r){throw r}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(r,o){t[r]=e[r]?function(s){return(n=!n)?{value:XI(e[r](s)),done:!1}:o?o(s):s}:o}}function G1e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof R9=="function"?R9(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),r(a,c,s.done,s.value)})}}function r(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function W1e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function q1e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=Uie(e),i=0;i<n.length;i++)n[i]!=="default"&&O9(t,e,n[i]);return CEt(t,e),t}function Y1e(e){return e&&e.__esModule?e:{default:e}}function X1e(e,t,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:t.get(e)}function K1e(e,t,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:t.set(e,n),n}function $1e(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function J1e(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],n&&(r=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(o){return Promise.reject(o)}}),e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}function Z1e(e){function t(o){e.error=e.hasError?new vEt(o,e.error,"An error was suppressed during disposal."):o,e.hasError=!0}var n,i=0;function r(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(r);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(o).then(r,function(s){return t(s),r()})}else i|=1}catch(s){t(s)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return r()}function Q1e(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,i,r,o,s){return i?t?".jsx":".js":r&&(!o||!s)?n:r+o+"."+s.toLowerCase()+"js"}):e}var kie,D9,O9,CEt,Uie,vEt,SEt,$m=hs(()=>{kie=function(e,t){return kie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},kie(e,t)};D9=function(){return D9=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},D9.apply(this,arguments)};O9=Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]});CEt=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Uie=function(e){return Uie=Object.getOwnPropertyNames||function(t){var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[n.length]=i);return n},Uie(e)};vEt=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};SEt={__extends:w1e,__assign:D9,__rest:I1e,__decorate:P1e,__param:D1e,__esDecorate:R1e,__runInitializers:O1e,__propKey:M1e,__setFunctionName:N1e,__metadata:L1e,__awaiter:F1e,__generator:B1e,__createBinding:O9,__exportStar:k1e,__values:R9,__read:zie,__spread:U1e,__spreadArrays:z1e,__spreadArray:V1e,__await:XI,__asyncGenerator:j1e,__asyncDelegator:H1e,__asyncValues:G1e,__makeTemplateObject:W1e,__importStar:q1e,__importDefault:Y1e,__classPrivateFieldGet:X1e,__classPrivateFieldSet:K1e,__classPrivateFieldIn:$1e,__addDisposableResource:J1e,__disposeResources:Z1e,__rewriteRelativeImportExtension:Q1e}});var eRe=Yi(M9=>{"use strict";Object.defineProperty(M9,"__esModule",{value:!0});M9.version=void 0;M9.version="4.1.5"});var gb=Yi(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});pb.hasOwnProperty=void 0;pb.isBoolean=wEt;pb.ellipsis=IEt;pb.removeWithPredicate=PEt;pb.assertNever=DEt;pb.hasOwnProperty=Object.prototype.hasOwnProperty;function wEt(e){return typeof e=="boolean"}function IEt(e,t,n){var i;return e.length>t&&(n==null?(n="&hellip;",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function PEt(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function DEt(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}});var N9=Yi(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});S0.HtmlTag=S0.whitespaceRe=void 0;var REt=gb();S0.whitespaceRe=/\s+/;var OEt=(function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){var i=this.getAttrs();return i[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n=this.getClass(),i=n?n.split(S0.whitespaceRe):[],r=t.split(S0.whitespaceRe),o;o=r.shift();)i.indexOf(o)===-1&&i.push(o);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(S0.whitespaceRe):[],r=t.split(S0.whitespaceRe),o;i.length&&(o=r.shift());){var s=i.indexOf(o);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var i in t)REt.hasOwnProperty.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e})();S0.HtmlTag=OEt});var nRe=Yi(jie=>{"use strict";Object.defineProperty(jie,"__esModule",{value:!0});jie.truncateSmart=MEt;function MEt(e,t,n){var i,r;if(n==null?(n="&hellip;",r=3,i=8):(r=n.length,i=n.length),e.length<=t)return e;var o=t-r,s=NEt(e);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),e=tRe(s))}if(e.length<=t||(s.host&&(s.host=s.host.replace(/^www\./,""),e=tRe(s)),e.length<=t))return e;var c="";if(s.host&&(c+=s.host),c.length>=o)return s.host.length===t?(s.host.substr(0,t-r)+n).substr(0,o+i):Vie(c,o,n).substr(0,o+i);var u="";if(s.path&&(u+="/"+s.path),s.query&&(u+="?"+s.query),u)if((c+u).length>=o){if((c+u).length==t)return(c+u).substr(0,t);var f=o-c.length;return(c+Vie(u,f,n)).substr(0,o+i)}else c+=u;if(s.fragment){var d="#"+s.fragment;if((c+d).length>=o){if((c+d).length==t)return(c+d).substr(0,t);var p=o-c.length;return(c+Vie(d,p,n)).substr(0,o+i)}else c+=d}if(s.scheme&&s.host){var g=s.scheme+"://";if((c+g).length<o)return(g+c).substr(0,t)}if(c.length<=t)return c;var m="";return o>0&&(m=c.substr(-1*Math.floor(o/2))),(c.substr(0,Math.ceil(o/2))+n+m).substr(0,o+i)}function NEt(e){var t={},n=e,i=n.match(/^([a-z]+):\/\//i);return i&&(t.scheme=i[1],n=n.slice(i[0].length)),i=n.match(/^(.*?)(?=(\?|#|\/|$))/i),i&&(t.host=i[1],n=n.slice(i[0].length)),i=n.match(/^\/(.*?)(?=(\?|#|$))/i),i&&(t.path=i[1],n=n.slice(i[0].length)),i=n.match(/^\?(.*?)(?=(#|$))/i),i&&(t.query=i[1],n=n.slice(i[0].length)),i=n.match(/^#(.*?)$/i),i&&(t.fragment=i[1]),t}function tRe(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function Vie(e,t,n){var i=t/2,r=Math.ceil(i),o=-1*Math.floor(i),s="";return o<0&&(s=e.substr(o)),e.substr(0,r)+n+s}});var iRe=Yi(Hie=>{"use strict";Object.defineProperty(Hie,"__esModule",{value:!0});Hie.truncateMiddle=LEt;function LEt(e,t,n){if(e.length<=t)return e;var i,r;n==null?(n="&hellip;",i=8,r=3):(i=n.length,r=n.length);var o=t-r,s="";return o>0&&(s=e.substr(-1*Math.floor(o/2))),(e.substr(0,Math.ceil(o/2))+n+s).substr(0,o+i)}});var rRe=Yi(Gie=>{"use strict";Object.defineProperty(Gie,"__esModule",{value:!0});Gie.truncateEnd=BEt;var FEt=gb();function BEt(e,t,n){return(0,FEt.ellipsis)(e,t,n)}});var Wie=Yi(L9=>{"use strict";Object.defineProperty(L9,"__esModule",{value:!0});L9.AnchorTagBuilder=void 0;var kEt=N9(),UEt=nRe(),zEt=iRe(),VEt=rRe(),jEt=(function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new kEt.HtmlTag({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},i=this.createCssClass(t);return i&&(n.class=i),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var i=[n],r=t.getCssClassSuffixes(),o=0,s=r.length;o<s;o++)i.push(n+"-"+r[o]);return i.join(" ")}else return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t),t},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var i=n.length,r=n.location;return r==="smart"?(0,UEt.truncateSmart)(t,i):r==="middle"?(0,zEt.truncateMiddle)(t,i):(0,VEt.truncateEnd)(t,i)},e})();L9.AnchorTagBuilder=jEt});var VE=Yi(F9=>{"use strict";Object.defineProperty(F9,"__esModule",{value:!0});F9.AbstractMatch=void 0;var HEt=(function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e})();F9.AbstractMatch=HEt});var jE=Yi(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.isControlChar=GEt;od.isAsciiLetterChar=WEt;od.isDigitChar=qEt;od.isQuoteChar=YEt;od.isWhitespaceChar=XEt;od.isAlphaNumericOrMarkChar=KEt;od.isValidEmailLocalPartSpecialChar=$Et;od.isUrlSuffixAllowedSpecialChar=JEt;od.isUrlSuffixNotAllowedAsFinalChar=ZEt;od.isOpenBraceChar=QEt;od.isCloseBraceChar=eCt;function GEt(e){return e>=0&&e<=31||e==127}function WEt(e){return e>=65&&e<=90||e>=97&&e<=122}function qEt(e){return e>=48&&e<=57}function YEt(e){return e==34||e==39}function XEt(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function KEt(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function $Et(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126}function JEt(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003}function ZEt(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function QEt(e){return e<91?e==40:e==91||e==123}function eCt(e){return e<93?e==41:e==93||e==125}});var oRe=Yi(B9=>{"use strict";Object.defineProperty(B9,"__esModule",{value:!0});B9.tldRegex=void 0;B9.tldRegex=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/});var k9=Yi(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.isDomainLabelStartChar=Qr.isSchemeStartChar=Qr.tldUrlHostRe=Qr.schemeUrlRe=Qr.invalidSchemeRe=Qr.httpSchemePrefixRe=Qr.httpSchemeRe=void 0;Qr.isSchemeChar=nCt;Qr.isDomainLabelChar=iCt;Qr.isPathChar=rCt;Qr.isUrlSuffixStartChar=oCt;Qr.isKnownTld=sRe;Qr.isValidSchemeUrl=sCt;Qr.isValidTldMatch=aCt;Qr.isValidIpV4Address=uCt;var HE=jE(),tCt=oRe();Qr.httpSchemeRe=/https?:\/\//i;Qr.httpSchemePrefixRe=new RegExp("^"+Qr.httpSchemeRe.source,"i");Qr.invalidSchemeRe=/^(javascript|vbscript):/i;Qr.schemeUrlRe=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/;Qr.tldUrlHostRe=/^(?:\/\/)?([^/#?:]+)/;Qr.isSchemeStartChar=HE.isAsciiLetterChar;function nCt(e){return(0,HE.isAsciiLetterChar)(e)||(0,HE.isDigitChar)(e)||e===43||e===45||e===46}Qr.isDomainLabelStartChar=HE.isAlphaNumericOrMarkChar;function iCt(e){return e===95||(0,Qr.isDomainLabelStartChar)(e)}function rCt(e){return(0,HE.isAlphaNumericOrMarkChar)(e)||(0,HE.isUrlSuffixAllowedSpecialChar)(e)||(0,HE.isUrlSuffixNotAllowedAsFinalChar)(e)}function oCt(e){return e===47||e===63||e===35}function sRe(e){return tCt.tldRegex.test(e.toLowerCase())}function sCt(e){if(Qr.invalidSchemeRe.test(e))return!1;var t=e.match(Qr.schemeUrlRe);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function aCt(e){var t=e.match(Qr.tldUrlHostRe);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var r=i[i.length-1];return!!sRe(r)}var cCt=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,lCt=/[:/?#]/;function uCt(e){var t=e.split(lCt,1)[0];return cCt.test(t)}});var qie=Yi(U9=>{"use strict";Object.defineProperty(U9,"__esModule",{value:!0});U9.UrlMatch=void 0;var fCt=($m(),Fh(Km)),dCt=VE(),hCt=k9(),mCt=/^(https?:\/\/)?(?:www\.)?/i,pCt=/^\/\//,gCt=(function(e){fCt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="url",i.url="",i.urlMatchType="scheme",i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.protocolPrepended=!1,i.urlMatchType=n.urlMatchType,i.url=n.url,i.protocolRelativeMatch=n.protocolRelativeMatch,i.stripPrefix=n.stripPrefix,i.stripTrailingSlash=n.stripTrailingSlash,i.decodePercentEncoding=n.decodePercentEncoding,i}return t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return!this.protocolRelativeMatch&&this.urlMatchType!=="scheme"&&!this.protocolPrepended&&(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){var n=this.getUrl();return n.replace(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=ACt(n)),this.stripPrefix.scheme&&(n=_Ct(n)),this.stripPrefix.www&&(n=yCt(n)),this.stripTrailingSlash&&(n=bCt(n)),this.decodePercentEncoding&&(n=xCt(n)),n},t})(dCt.AbstractMatch);U9.UrlMatch=gCt;function _Ct(e){return e.replace(hCt.httpSchemePrefixRe,"")}function yCt(e){return e.includes("www.")?e.replace(mCt,"$1"):e}function ACt(e){return e.replace(pCt,"")}function bCt(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function xCt(e){var t=e.replace(/%(?:22|26|27|3C|3E)/gi,function(n){return n==="%22"?"&quot;":n==="%26"?"&amp;":n==="%27"?"&#39;":n==="%3C"||n==="%3c"?"&lt;":"&gt;"});if(t.includes("%"))try{return decodeURIComponent(t)}catch{}return t}});var cRe=Yi($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});$_.isEmailLocalPartStartChar=$_.mailtoSchemePrefixRe=void 0;$_.isEmailLocalPartChar=ECt;$_.isValidEmail=CCt;var aRe=jE(),TCt=k9();$_.mailtoSchemePrefixRe=/^mailto:/i;$_.isEmailLocalPartStartChar=aRe.isAlphaNumericOrMarkChar;function ECt(e){return(0,$_.isEmailLocalPartStartChar)(e)||(0,aRe.isValidEmailLocalPartSpecialChar)(e)}function CCt(e){var t=e.split(".").pop();return(0,TCt.isKnownTld)(t)}});var Yie=Yi(z9=>{"use strict";Object.defineProperty(z9,"__esModule",{value:!0});z9.EmailMatch=void 0;var vCt=($m(),Fh(Km)),SCt=VE(),wCt=(function(e){vCt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="email",i.email="",i.email=n.email,i}return t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t})(SCt.AbstractMatch);z9.EmailMatch=wCt});var Xie=Yi(KI=>{"use strict";Object.defineProperty(KI,"__esModule",{value:!0});KI.hashtagServices=void 0;KI.isHashtagTextChar=PCt;KI.isValidHashtag=DCt;var ICt=jE();function PCt(e){return e===95||(0,ICt.isAlphaNumericOrMarkChar)(e)}function DCt(e){return e.length<=140}KI.hashtagServices=["twitter","facebook","instagram","tiktok","youtube"]});var Kie=Yi(V9=>{"use strict";Object.defineProperty(V9,"__esModule",{value:!0});V9.HashtagMatch=void 0;var RCt=($m(),Fh(Km)),OCt=gb(),MCt=VE(),NCt=(function(e){RCt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="hashtag",i.serviceName="twitter",i.hashtag="",i.serviceName=n.serviceName,i.hashtag=n.hashtag,i}return t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,i=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+i;case"facebook":return"https://www.facebook.com/hashtag/"+i;case"instagram":return"https://instagram.com/explore/tags/"+i;case"tiktok":return"https://www.tiktok.com/tag/"+i;case"youtube":return"https://youtube.com/hashtag/"+i;default:(0,OCt.assertNever)(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(MCt.AbstractMatch);V9.HashtagMatch=NCt});var $ie=Yi($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});$I.mentionServices=void 0;$I.isMentionTextChar=FCt;$I.isValidMention=BCt;var lRe=jE(),LCt={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function FCt(e){return e===45||e===46||e===95||(0,lRe.isAsciiLetterChar)(e)||(0,lRe.isDigitChar)(e)}function BCt(e,t){var n=LCt[t];return n.test(e)}$I.mentionServices=["twitter","instagram","soundcloud","tiktok","youtube"]});var Jie=Yi(j9=>{"use strict";Object.defineProperty(j9,"__esModule",{value:!0});j9.MentionMatch=void 0;var kCt=($m(),Fh(Km)),UCt=gb(),zCt=VE(),VCt=(function(e){kCt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="mention",i.serviceName="twitter",i.mention="",i.mention=n.mention,i.serviceName=n.serviceName,i}return t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:(0,UCt.assertNever)(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&n.push(i),n},t})(zCt.AbstractMatch);j9.MentionMatch=VCt});var uRe=Yi(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});eU.isPhoneNumberSeparatorChar=qCt;eU.isPhoneNumberControlChar=YCt;eU.isValidPhoneNumber=XCt;var jCt=/[-. ()]/,HCt=/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/,GCt=/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,WCt=new RegExp("^".concat(HCt.source,"|").concat(GCt.source,"$"));function qCt(e){return e===45||e===46||e===32}function YCt(e){return e===44||e===59}function XCt(e){var t=e.charAt(0)==="+"||jCt.test(e);return t&&WCt.test(e)}});var Zie=Yi(H9=>{"use strict";Object.defineProperty(H9,"__esModule",{value:!0});H9.PhoneMatch=void 0;var KCt=($m(),Fh(Km)),$Ct=VE(),JCt=(function(e){KCt.__extends(t,e);function t(n){var i=e.call(this,n)||this;return i.type="phone",i.number="",i.plusSign=!1,i.number=n.number,i.plusSign=n.plusSign,i}return t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t})($Ct.AbstractMatch);H9.PhoneMatch=JCt});var ire=Yi(Y9=>{"use strict";Object.defineProperty(Y9,"__esModule",{value:!0});Y9.parseMatches=rvt;Y9.excludeUnbalancedTrailingBracesAndPunctuation=hRe;var ZCt=qie(),G9=gb(),zo=k9(),JI=cRe(),QCt=Yie(),tre=Xie(),evt=Kie(),nre=$ie(),tvt=Jie(),ZI=uRe(),nvt=Zie(),aa=jE(),ivt=(function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),dRe(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),dRe(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e})();function rvt(e,t){for(var n=new ivt(e,t);n.charIdx<n.text.length;n.charIdx++){var i=e.charAt(n.charIdx),r=e.charCodeAt(n.charIdx);if(n.stateMachines.length===0)W9(n,i,r);else{for(var o=n.stateMachines.length-1;o>=0;o--){var s=n.stateMachines[o];switch(s.state){case 11:uvt(n,s,r);break;case 12:fvt(n,s,r);break;case 0:ovt(n,s,r);break;case 1:svt(n,s,r);break;case 2:avt(n,s,r);break;case 3:cvt(n,s,r);break;case 4:lvt(n,s,i,r);break;case 5:dvt(n,s,r);break;case 6:hvt(n,s,i,r);break;case 7:mvt(n,s,i,r);break;case 13:pvt(n,s,r);break;case 14:gvt(n,s,r);break;case 8:_vt(n,s,r);break;case 9:yvt(n,s,r);break;case 10:Avt(n,s,r);break;case 15:bvt(n,s,i,r);break;case 16:xvt(n,s,i,r);break;case 17:Tvt(n,s,i,r);break;case 18:Evt(n,s,i,r);break;case 19:Cvt(n,s,i,r);break;case 20:vvt(n,s,r);break;case 21:Svt(n,s,r);break;case 22:GE(n,s,r);break;case 23:wvt(n,s,r);break;case 24:Ivt(n,s,r);break;case 25:Pvt(n,s,r);break;case 26:Dvt(n,s,r);break;case 27:Rvt(n,s,r);break;case 28:Ovt(n,s,r);break;case 29:Mvt(n,s,r);break;case 30:Nvt(n,s,r);break;case 31:Lvt(n,s,r);break;case 32:Bvt(n,s,i,r);break;case 33:kvt(n,s,r);break;case 34:Uvt(n,s,r);break;case 35:zvt(n,s,r);break;case 36:Vvt(n,s,i,r);break;case 37:Fvt(n,s,i,r);break;case 38:jvt(n,s,i,r);break;case 39:Hvt(n,s,i,r);break;case 40:Gvt(n,s,r);break;case 41:Wvt(n,s,r);break;default:(0,G9.assertNever)(s.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&(0,zo.isSchemeStartChar)(r)){var a=n.text.charCodeAt(n.charIdx-1);(0,zo.isSchemeStartChar)(a)||n.addMachine(q9(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(u){return Ns(n,u)});return n.matches}function W9(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(Kvt(i,28));else if(n===64)e.addMachine($vt(i,30));else if(n===47)e.addMachine(ere(i,11));else if(n===43)e.addMachine(Qie(i,37));else if(n===40)e.addMachine(Qie(i,32));else{if((0,aa.isDigitChar)(n)&&(e.addMachine(Qie(i,38)),e.addMachine(Yvt(i,13))),(0,JI.isEmailLocalPartStartChar)(n)){var r=t.toLowerCase()==="m"?15:22;e.addMachine(Xvt(i,r))}(0,zo.isSchemeStartChar)(n)&&e.addMachine(q9(i,0)),(0,aa.isAlphaNumericOrMarkChar)(n)&&e.addMachine(ere(i,5))}}function ovt(e,t,n){n===58?t.state=2:n===45?t.state=1:(0,zo.isSchemeChar)(n)||e.removeMachine(t)}function svt(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(ere(i,11))):(0,zo.isSchemeChar)(n)?t.state=0:e.removeMachine(t))}function avt(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):(0,zo.isDomainLabelStartChar)(n)?(t.state=5,(0,zo.isSchemeStartChar)(n)&&e.addMachine(q9(i,0))):e.removeMachine(t)}function cvt(e,t,n){n===47?t.state=4:(0,zo.isPathChar)(n)?(t.state=10,t.acceptStateReached=!0):Ns(e,t)}function lvt(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):(0,zo.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function uvt(e,t,n){n===47?t.state=12:e.removeMachine(t)}function fvt(e,t,n){(0,zo.isDomainLabelStartChar)(n)?t.state=5:e.removeMachine(t)}function dvt(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:(0,zo.isUrlSuffixStartChar)(n)?t.state=10:(0,zo.isDomainLabelChar)(n)||Ns(e,t)}function hvt(e,t,n,i){i===45||(i===46?Ns(e,t):(0,zo.isDomainLabelStartChar)(i)?t.state=5:Ns(e,t))}function mvt(e,t,n,i){i===46?Ns(e,t):(0,zo.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):Ns(e,t)}function pvt(e,t,n){n===46?t.state=14:n===58?t.state=8:(0,aa.isDigitChar)(n)||((0,zo.isUrlSuffixStartChar)(n)?t.state=10:(0,aa.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):Ns(e,t))}function gvt(e,t,n){(0,aa.isDigitChar)(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):Ns(e,t)}function _vt(e,t,n){(0,aa.isDigitChar)(n)?t.state=9:Ns(e,t)}function yvt(e,t,n){(0,aa.isDigitChar)(n)||((0,zo.isUrlSuffixStartChar)(n)?t.state=10:Ns(e,t))}function Avt(e,t,n){(0,zo.isPathChar)(n)||Ns(e,t)}function bvt(e,t,n,i){n.toLowerCase()==="a"?t.state=16:GE(e,t,i)}function xvt(e,t,n,i){n.toLowerCase()==="i"?t.state=17:GE(e,t,i)}function Tvt(e,t,n,i){n.toLowerCase()==="l"?t.state=18:GE(e,t,i)}function Evt(e,t,n,i){n.toLowerCase()==="t"?t.state=19:GE(e,t,i)}function Cvt(e,t,n,i){n.toLowerCase()==="o"?t.state=20:GE(e,t,i)}function vvt(e,t,n){n===58?t.state=21:GE(e,t,n)}function Svt(e,t,n){(0,JI.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function GE(e,t,n){n===46?t.state=23:n===64?t.state=24:(0,JI.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function wvt(e,t,n){n===46||n===64?e.removeMachine(t):(0,JI.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function Ivt(e,t,n){(0,zo.isDomainLabelStartChar)(n)?t.state=25:e.removeMachine(t)}function Pvt(e,t,n){n===46?t.state=27:n===45?t.state=26:(0,zo.isDomainLabelChar)(n)||Ns(e,t)}function Dvt(e,t,n){n===45||n===46?Ns(e,t):(0,zo.isDomainLabelChar)(n)?t.state=25:Ns(e,t)}function Rvt(e,t,n){n===46||n===45?Ns(e,t):(0,zo.isDomainLabelStartChar)(n)?(t.state=25,t.acceptStateReached=!0):Ns(e,t)}function Ovt(e,t,n){(0,tre.isHashtagTextChar)(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function Mvt(e,t,n){(0,tre.isHashtagTextChar)(n)||Ns(e,t)}function Nvt(e,t,n){(0,nre.isMentionTextChar)(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function Lvt(e,t,n){(0,nre.isMentionTextChar)(n)||((0,aa.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):Ns(e,t))}function Fvt(e,t,n,i){(0,aa.isDigitChar)(i)?t.state=38:(e.removeMachine(t),W9(e,n,i))}function Bvt(e,t,n,i){(0,aa.isDigitChar)(i)?t.state=33:e.removeMachine(t),W9(e,n,i)}function kvt(e,t,n){(0,aa.isDigitChar)(n)?t.state=34:e.removeMachine(t)}function Uvt(e,t,n){(0,aa.isDigitChar)(n)?t.state=35:e.removeMachine(t)}function zvt(e,t,n){n===41?t.state=36:e.removeMachine(t)}function Vvt(e,t,n,i){(0,aa.isDigitChar)(i)?t.state=38:(0,ZI.isPhoneNumberSeparatorChar)(i)?t.state=39:e.removeMachine(t)}function jvt(e,t,n,i){var r=e.charIdx;t.acceptStateReached=!0,(0,ZI.isPhoneNumberControlChar)(i)?t.state=40:i===35?t.state=41:(0,aa.isDigitChar)(i)||(i===40?t.state=32:(0,ZI.isPhoneNumberSeparatorChar)(i)?t.state=39:(Ns(e,t),(0,zo.isSchemeStartChar)(i)&&e.addMachine(q9(r,0))))}function Hvt(e,t,n,i){(0,aa.isDigitChar)(i)?t.state=38:i===40?t.state=32:(Ns(e,t),W9(e,n,i))}function Gvt(e,t,n){(0,ZI.isPhoneNumberControlChar)(n)||(n===35?t.state=41:(0,aa.isDigitChar)(n)?t.state=38:Ns(e,t))}function Wvt(e,t,n){(0,ZI.isPhoneNumberControlChar)(n)?t.state=40:(0,aa.isDigitChar)(n)?e.removeMachine(t):Ns(e,t)}function Ns(e,t){var n=e.matches,i=e.text,r=e.charIdx,o=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,c=e.decodePercentEncoding,u=e.hashtagServiceName,f=e.mentionServiceName;if(e.removeMachine(t),!!t.acceptStateReached){var d=t.startIdx,p=i.slice(t.startIdx,r);switch(p=hRe(p),t.type){case 0:{var g=i.charCodeAt(t.startIdx-1);if(g===64)return;switch(t.matchType){case 0:{var m=zo.httpSchemeRe.exec(p);if(m&&(d=d+m.index,p=p.slice(m.index)),!(0,zo.isValidSchemeUrl)(p))return;break}case 1:{if(!(0,zo.isValidTldMatch)(p))return;break}case 2:{if(!(0,zo.isValidIpV4Address)(p))return;break}default:(0,G9.assertNever)(t)}n.push(new ZCt.UrlMatch({tagBuilder:o,matchedText:p,offset:d,urlMatchType:qvt(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:c}));break}case 1:{(0,JI.isValidEmail)(p)&&n.push(new QCt.EmailMatch({tagBuilder:o,matchedText:p,offset:d,email:p.replace(JI.mailtoSchemePrefixRe,"")}));break}case 2:{(0,tre.isValidHashtag)(p)&&n.push(new evt.HashtagMatch({tagBuilder:o,matchedText:p,offset:d,serviceName:u,hashtag:p.slice(1)}));break}case 3:{(0,nre.isValidMention)(p,f)&&n.push(new tvt.MentionMatch({tagBuilder:o,matchedText:p,offset:d,serviceName:f,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),(0,ZI.isValidPhoneNumber)(p)){var y=p.replace(/[^0-9,;#]/g,"");n.push(new nvt.PhoneMatch({tagBuilder:o,matchedText:p,offset:d,number:y,plusSign:p.charAt(0)==="+"}))}break}default:(0,G9.assertNever)(t)}}}function qvt(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:(0,G9.assertNever)(e)}}var fRe={")":"(","}":"{","]":"["};function hRe(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n),r=e.charCodeAt(n);(0,aa.isOpenBraceChar)(r)?t[i]++:(0,aa.isCloseBraceChar)(r)&&t[fRe[i]]--}for(var o=e.length-1;o>=0;){var i=e.charAt(o),r=e.charCodeAt(o);if((0,aa.isCloseBraceChar)(r)){var s=fRe[i];if(t[s]<0)t[s]++,o--;else break}else if((0,aa.isUrlSuffixNotAllowedAsFinalChar)(r))o--;else break}return e.slice(0,o+1)}function q9(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function ere(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function Yvt(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function Xvt(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function Kvt(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function $vt(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function Qie(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function dRe(e){return e.type===0&&e.matchType===0}});var mRe=Yi(sre=>{"use strict";Object.defineProperty(sre,"__esModule",{value:!0});sre.parseHtml=Qvt;var El=($m(),Fh(Km)),_u=jE(),Jvt=gb(),w0=(function(){function e(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}return e})(),ore=new w0,Zvt=(function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=ore,this.html=t,this.callbacks=n}return e})();function Qvt(e,t){for(var n=new Zvt(e,t),i=e.length;n.charIdx<i;){var r=e.charAt(n.charIdx),o=e.charCodeAt(n.charIdx);switch(n.state){case 0:eSt(n,r);break;case 1:tSt(n,r,o);break;case 2:iSt(n,r,o);break;case 3:nSt(n,r,o);break;case 4:rSt(n,r,o);break;case 5:oSt(n,r,o);break;case 6:sSt(n,r,o);break;case 7:aSt(n,r,o);break;case 8:cSt(n,r);break;case 9:lSt(n,r);break;case 10:uSt(n,r,o);break;case 11:fSt(n,r,o);break;case 12:dSt(n,r);break;case 13:hSt(n);break;case 14:mSt(n,r);break;case 15:pSt(n,r);break;case 16:gSt(n,r);break;case 17:_St(n,r);break;case 18:ySt(n,r);break;case 19:ASt(n,r);break;case 20:bSt(n,r);break;default:(0,Jvt.assertNever)(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&xSt(n)}function eSt(e,t){t==="<"&&I0(e)}function tSt(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{isClosing:!0}))):t==="<"?I0(e):(0,_u.isAsciiLetterChar)(n)?(e.state=3,e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=ore)}function nSt(e,t,n){(0,_u.isWhitespaceChar)(n)?(e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{name:rre(e)})),e.state=4):t==="<"?I0(e):t==="/"?(e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{name:rre(e)})),e.state=12):t===">"?(e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{name:rre(e)})),P0(e)):!(0,_u.isAsciiLetterChar)(n)&&!(0,_u.isDigitChar)(n)&&t!==":"&&Ah(e)}function iSt(e,t,n){t===">"?Ah(e):(0,_u.isAsciiLetterChar)(n)?e.state=3:Ah(e)}function rSt(e,t,n){(0,_u.isWhitespaceChar)(n)||(t==="/"?e.state=12:t===">"?P0(e):t==="<"?I0(e):t==="="||(0,_u.isQuoteChar)(n)||(0,_u.isControlChar)(n)?Ah(e):e.state=5)}function oSt(e,t,n){(0,_u.isWhitespaceChar)(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?P0(e):t==="<"?I0(e):(0,_u.isQuoteChar)(n)&&Ah(e)}function sSt(e,t,n){(0,_u.isWhitespaceChar)(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?P0(e):t==="<"?I0(e):(0,_u.isQuoteChar)(n)?Ah(e):e.state=5)}function aSt(e,t,n){(0,_u.isWhitespaceChar)(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?Ah(e):t==="<"?I0(e):e.state=10)}function cSt(e,t){t==='"'&&(e.state=11)}function lSt(e,t){t==="'"&&(e.state=11)}function uSt(e,t,n){(0,_u.isWhitespaceChar)(n)?e.state=4:t===">"?P0(e):t==="<"&&I0(e)}function fSt(e,t,n){(0,_u.isWhitespaceChar)(n)?e.state=4:t==="/"?e.state=12:t===">"?P0(e):t==="<"?I0(e):(e.state=4,TSt(e))}function dSt(e,t){t===">"?(e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{isClosing:!0})),P0(e)):Ah(e)}function hSt(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new w0(El.__assign(El.__assign({},e.currentTag),{type:"doctype"})),e.state=20):Ah(e)}function mSt(e,t){t==="-"?e.state=15:t===">"?Ah(e):e.state=16}function pSt(e,t){t==="-"?e.state=18:t===">"?Ah(e):e.state=16}function gSt(e,t){t==="-"&&(e.state=17)}function _St(e,t){t==="-"?e.state=18:e.state=16}function ySt(e,t){t===">"?P0(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function ASt(e,t){t==="-"?e.state=17:t===">"?P0(e):e.state=16}function bSt(e,t){t===">"?P0(e):t==="<"&&I0(e)}function Ah(e){e.state=0,e.currentTag=ore}function I0(e){e.state=1,e.currentTag=new w0({idx:e.charIdx})}function P0(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),Ah(e),e.currentDataIdx=e.charIdx+1}function xSt(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function rre(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function TSt(e){e.charIdx--}});var X9=Yi(cre=>{"use strict";Object.defineProperty(cre,"__esModule",{value:!0});var are=($m(),Fh(Km)),ESt=eRe(),Ka=gb(),CSt=Wie(),vSt=N9(),SSt=ire(),wSt=mRe(),ISt=$ie(),PSt=Xie(),DSt=(function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=RSt(t.urls),this.email=(0,Ka.isBoolean)(t.email)?t.email:this.email,this.phone=(0,Ka.isBoolean)(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=(0,Ka.isBoolean)(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=OSt(t.stripPrefix),this.stripTrailingSlash=(0,Ka.isBoolean)(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=(0,Ka.isBoolean)(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&ISt.mentionServices.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&PSt.hashtagServices.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=MSt(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){var i=new e(n);return i.link(t)},e.parse=function(t,n){var i=new e(n);return i.parse(t)},e.prototype.parse=function(t){var n=this,i=["a","style","script"],r=0,o=[];return(0,wSt.parseHtml)(t,{onOpenTag:function(s){i.indexOf(s)>=0&&r++},onText:function(s,a){if(r===0){var c=/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,u=s.split(c),f=a;u.forEach(function(d,p){if(p%2===0){var g=n.parseText(d,f);o.push.apply(o,are.__spreadArray([],are.__read(g),!1))}f+=d.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(r=Math.max(r-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o),o},e.prototype.compactMatches=function(t){t.sort(NSt);for(var n=0;n<t.length-1;){var i=t[n],r=i.getOffset(),o=i.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===r){var s=t[n+1].getMatchedText().length>o?n:n+1;t.splice(s,1);continue}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="hashtag"}),this.email||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="email"}),this.phone||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="phone"}),this.mention||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||(0,Ka.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var i=(0,SSt.parseMatches)(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),r=0,o=i.length;r<o;r++)i[r].setOffset(n+i[r].getOffset());return i},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"));for(var n=this.parse(t),i=new Array(n.length*2+1),r=0,o=0,s=n.length;o<s;o++){var a=n[o];i.push(t.substring(r,a.getOffset())),i.push(this.createMatchReturnVal(a)),r=a.getOffset()+a.getMatchedText().length}return i.push(t.substring(r)),i.join("")},e.prototype.createMatchReturnVal=function(t){var n;if(this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string")return n;if(n===!1)return t.getMatchedText();if(n instanceof vSt.HtmlTag)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new CSt.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=ESt.version,e})();cre.default=DSt;function RSt(e){return e==null&&(e=!0),(0,Ka.isBoolean)(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:(0,Ka.isBoolean)(e.schemeMatches)?e.schemeMatches:!0,tldMatches:(0,Ka.isBoolean)(e.tldMatches)?e.tldMatches:!0,ipV4Matches:(0,Ka.isBoolean)(e.ipV4Matches)?e.ipV4Matches:!0}}function OSt(e){return e==null&&(e=!0),(0,Ka.isBoolean)(e)?{scheme:e,www:e}:{scheme:(0,Ka.isBoolean)(e.scheme)?e.scheme:!0,www:(0,Ka.isBoolean)(e.www)?e.www:!0}}function MSt(e){return typeof e=="number"?{length:e,location:"end"}:are.__assign({length:Number.POSITIVE_INFINITY,location:"end"},e)}function NSt(e,t){return e.getOffset()-t.getOffset()}});var gRe=Yi(pRe=>{"use strict";Object.defineProperty(pRe,"__esModule",{value:!0})});var _Re=Yi(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var WE=($m(),Fh(Km));WE.__exportStar(gRe(),J_);WE.__exportStar(Yie(),J_);WE.__exportStar(Kie(),J_);WE.__exportStar(VE(),J_);WE.__exportStar(Jie(),J_);WE.__exportStar(Zie(),J_);WE.__exportStar(qie(),J_)});var yRe=Yi(lre=>{"use strict";Object.defineProperty(lre,"__esModule",{value:!0});var LSt=($m(),Fh(Km));LSt.__exportStar(ire(),lre)});var ure=Yi((Jm,bRe)=>{"use strict";Jm=bRe.exports=X9().default;Object.defineProperty(Jm,"__esModule",{value:!0});Jm.Autolinker=void 0;var QI=($m(),Fh(Km)),ARe=QI.__importDefault(X9());Jm.Autolinker=ARe.default;Jm.default=ARe.default;QI.__exportStar(X9(),Jm);QI.__exportStar(Wie(),Jm);QI.__exportStar(N9(),Jm);QI.__exportStar(_Re(),Jm);QI.__exportStar(yRe(),Jm)});var Toe=Yi((aHi,zU)=>{/*!
* protobuf.js v8.8.0 (c) 2016, daniel wirtz
* compiled thu, 27 aug 2026 00:01:05 utc
* licensed under the bsd-3-clause license
* see: https://github.com/dcodeio/protobuf.js for details
*/(function(e){"use strict";(function(n,i,r){function o(a){var c=i[a];return c||n[a][0].call(c=i[a]={exports:{}},o,c,c.exports),c.exports}var s=o(r[0]);s.util.global.protobuf=s,typeof define=="function"&&define.amd&&define(["long"],function(a){return a&&a.isLong&&(s.util.Long=a,s.configure()),s}),typeof zU=="object"&&zU&&zU.exports&&(zU.exports=s)})({1:[function(t,n,i){"use strict";i.build="minimal",i.Writer=t(15),i.BufferWriter=t(16),i.Reader=t(2),i.BufferReader=t(3),i.util=t(12),i.rpc=t(5),i.roots=t(4),i.configure=r;function r(){i.util.LongBits._configure(i.util.Long),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}r()},{12:12,15:15,16:16,2:2,3:3,4:4,5:5}],2:[function(t,n,i){"use strict";n.exports=u;var r=t(12),o,s=r.LongBits,a=r.utf8;function c(T,E){return RangeError("index out of range: "+T.pos+" + "+(E||1)+" > "+T.len)}function u(T){this.buf=T,this.pos=0,this.len=T.length,this.view=null,this.discardUnknown=u.discardUnknown}function f(T){if(Array.isArray(T)&&(T=new Uint8Array(T)),T instanceof Uint8Array)return new u(T);throw Error("illegal buffer")}var d=function(){return r.Buffer?function(v){return(u.create=function(I){return r.Buffer.isBuffer(I)?new o(I):f(I)})(v)}:f};u.create=d(),u.prototype.raw=function(E,v){return this.buf.subarray(E,v)};function p(T){for(var E=0,v=0;v<4;++v){if(T.pos>=T.len)throw c(T);var S=T.buf[T.pos++];if(E=(E|(S&127)<<v*7)>>>0,S<128)return E}throw c(T)}u.prototype.uint32=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw c(this);if(this.buf[this.pos]>=128)return p(this)}var E=this.buf,v=this.pos,S=(E[v]&127)>>>0;if(E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<7)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<14)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<21)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&15)<<28)>>>0,E[v++]<128)return this.pos=v,S;for(var I=0;I<5;++I){if(v>=this.len)throw this.pos=v,c(this);if(E[v++]<128)return this.pos=v,S}throw this.pos=v,Error("invalid varint encoding")},u.prototype.tag=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw c(this);if(this.buf[this.pos]>=128)return p(this)}var E=this.buf,v=this.pos,S=(E[v]&127)>>>0;if(E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<7)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<14)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&127)<<21)>>>0,E[v++]<128)return this.pos=v,S;if(S=(S|(E[v]&15)<<28)>>>0,E[v]<128&&(E[v]&112)===0)return this.pos=v+1,S;throw this.pos=v+1,Error("invalid tag encoding")},u.prototype.int32=function(){return this.uint32()|0},u.prototype.sint32=function(){var E=this.uint32();return E>>>1^-(E&1)|0};function g(){var T=new s(0,0),E=0;if(this.len-this.pos>4){for(;E<4;++E)if(T.lo=(T.lo|(this.buf[this.pos]&127)<<E*7)>>>0,this.buf[this.pos++]<128)return T;if(T.lo=(T.lo|(this.buf[this.pos]&127)<<28)>>>0,T.hi=(T.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return T;E=0}else{for(;E<4;++E){if(this.pos>=this.len)throw c(this);if(T.lo=(T.lo|(this.buf[this.pos]&127)<<E*7)>>>0,this.buf[this.pos++]<128)return T}throw c(this)}if(this.len-this.pos>4){for(;E<5;++E)if(T.hi=(T.hi|(this.buf[this.pos]&127)<<E*7+3)>>>0,this.buf[this.pos++]<128)return T}else for(;E<5;++E){if(this.pos>=this.len)throw c(this);if(T.hi=(T.hi|(this.buf[this.pos]&127)<<E*7+3)>>>0,this.buf[this.pos++]<128)return T}throw Error("invalid varint encoding")}u.prototype.bool=function(){for(var E=!1,v,S=0;S<10;++S){if(this.pos>=this.len)throw c(this);if(v=this.buf[this.pos++],v&127&&(E=!0),v<128)return E}throw Error("invalid varint encoding")};function m(T,E){return(T[E-4]|T[E-3]<<8|T[E-2]<<16|T[E-1]<<24)>>>0}u.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return m(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return m(this.buf,this.pos+=4)|0};function y(){if(this.pos+8>this.len)throw c(this,8);return new s(m(this.buf,this.pos+=4),m(this.buf,this.pos+=4))}u.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var E=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,E},u.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var E=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,E},u.prototype.uint32s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len,I=this.buf,R=this.pos,O;if(v>S)throw c(this,v-this.pos);for(this.len=v;R<v;)O=I[R++],O<128?E.push(O):(this.pos=R-1,E.push(this.uint32()),R=this.pos);if(this.pos=R,R!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.int32s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len,I=this.buf,R=this.pos,O;if(v>S)throw c(this,v-this.pos);for(this.len=v;R<v;)O=I[R++],O<128?E.push(O):(this.pos=R-1,E.push(this.int32()),R=this.pos);if(this.pos=R,R!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.sint32s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len;if(v>S)throw c(this,v-this.pos);for(this.len=v;this.pos<v;)E.push(this.sint32());if(this.pos!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.bools=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len,I=this.buf,R=this.pos,O;if(v>S)throw c(this,v-this.pos);for(this.len=v;R<v;)O=I[R++],O<128?E.push(O!==0):(this.pos=R-1,E.push(this.bool()),R=this.pos);if(this.pos=R,R!==v)throw RangeError("index out of range");return this.len=S,E};var A=8,b=128;function x(T,E,v){var S=T.view;if(S||E<v)return S;var I=T.buf;return T.view=new DataView(I.buffer,I.byteOffset,I.byteLength)}u.prototype.fixed32s=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v;if(S>this.len)throw c(this,v);var I=v>>>2,R=E.length,O=this.pos;E.length=R+I;var L=x(this,I,b);if(L)for(var _=0;_<I;++_,O+=4)E[R++]=L.getUint32(O,!0);else for(var C=this.buf,w=0;w<I;++w,O+=4)E[R++]=m(C,O+4);if(this.pos=O,O!==S)throw c(this,4);return E},u.prototype.sfixed32s=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v;if(S>this.len)throw c(this,v);var I=v>>>2,R=E.length,O=this.pos;E.length=R+I;var L=x(this,I,b);if(L)for(var _=0;_<I;++_,O+=4)E[R++]=L.getInt32(O,!0);else for(var C=this.buf,w=0;w<I;++w,O+=4)E[R++]=m(C,O+4)|0;if(this.pos=O,O!==S)throw c(this,4);return E},u.prototype.floats=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v;if(S>this.len)throw c(this,v);var I=v>>>2,R=E.length,O=this.pos;E.length=R+I;var L=x(this,I,A);if(L)for(var _=0;_<I;++_,O+=4)E[R++]=L.getFloat32(O,!0);else for(var C=this.buf,w=0;w<I;++w,O+=4)E[R++]=r.float.readFloatLE(C,O);if(this.pos=O,O!==S)throw c(this,4);return E},u.prototype.doubles=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v;if(S>this.len)throw c(this,v);var I=v>>>3,R=E.length,O=this.pos;E.length=R+I;var L=x(this,I,A);if(L)for(var _=0;_<I;++_,O+=8)E[R++]=L.getFloat64(O,!0);else for(var C=this.buf,w=0;w<I;++w,O+=8)E[R++]=r.float.readDoubleLE(C,O);if(this.pos=O,O!==S)throw c(this,8);return E},u.prototype.uint64s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len;if(v>S)throw c(this,v-this.pos);for(this.len=v;this.pos<v;)E.push(this.uint64());if(this.pos!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.int64s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len;if(v>S)throw c(this,v-this.pos);for(this.len=v;this.pos<v;)E.push(this.int64());if(this.pos!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.sint64s=function(E){E===e&&(E=[]);var v=this.uint32()+this.pos,S=this.len;if(v>S)throw c(this,v-this.pos);for(this.len=v;this.pos<v;)E.push(this.sint64());if(this.pos!==v)throw RangeError("index out of range");return this.len=S,E},u.prototype.fixed64s=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v,I=E.length;if(S>this.len)throw c(this,v);var R=v>>>3;E.length=I+R;for(var O=0;O<R;++O)E[I++]=this.fixed64();if(this.pos!==S)throw c(this,8);return E},u.prototype.sfixed64s=function(E){E===e&&(E=[]);var v=this.uint32(),S=this.pos+v,I=E.length;if(S>this.len)throw c(this,v);var R=v>>>3;E.length=I+R;for(var O=0;O<R;++O)E[I++]=this.sfixed64();if(this.pos!==S)throw c(this,8);return E},u.prototype.bytes=function(){var E=this.uint32(),v=this.pos,S=this.pos+E;if(S>this.len)throw c(this,E);return this.pos=S,this.raw(v,S)},u.prototype.string=function(){var E=this.uint32(),v=this.pos,S=this.pos+E;if(S>this.len)throw c(this,E);return this.pos=S,a.read(this.buf,v,S)},u.prototype.stringVerify=function(){var E=this.uint32(),v=this.pos,S=this.pos+E;if(S>this.len)throw c(this,E);return this.pos=S,a.readStrict(this.buf,v,S)},u.prototype.skip=function(E){if(typeof E=="number"){if(this.pos+E>this.len)throw c(this,E);this.pos+=E}else do if(this.pos>=this.len)throw c(this);while(this.buf[this.pos++]&128);return this},u.recursionLimit=r.recursionLimit,u.discardUnknown=!0,u.prototype.skipType=function(T,E,v){if(E===e&&(E=0),E>u.recursionLimit)throw Error("max depth exceeded");if(v===0)throw Error("illegal tag: field number 0");switch(T){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var S=this.tag(),I=S>>>3;if(T=S&7,!I)throw Error("illegal tag: field number 0");if(T===4){if(v!==e&&I!==v)throw Error("invalid end group tag");break}this.skipType(T,E+1,I)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+T+" at offset "+this.pos)}return this},u._configure=function(T){o=T,u.create=d(),o._configure();var E=r.Long?"toLong":"toNumber";r.merge(u.prototype,{int64:function(){return g.call(this)[E](!1)},uint64:function(){return g.call(this)[E](!0)},sint64:function(){return g.call(this).zzDecode()[E](!1)},fixed64:function(){return y.call(this)[E](!0)},sfixed64:function(){return y.call(this)[E](!1)}})}},{12:12}],3:[function(t,n,i){"use strict";n.exports=s;var r=t(2);s.prototype=Object.create(r.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}});var o=t(12);function s(a){r.call(this,a)}s._configure=function(){o.Buffer&&(s.prototype._slice=o.Buffer.prototype.slice)},s.prototype.raw=function(c,u){return this._slice.call(this.buf,c,u)},s.prototype.string=function(){var c=this.uint32(),u=this.pos,f=this.pos+c;if(f>this.len)throw RangeError("index out of range: "+this.pos+" + "+c+" > "+this.len);return this.pos=f,this.buf.utf8Slice?this.buf.utf8Slice(u,f):this.buf.toString("utf-8",u,f)},s._configure()},{12:12,2:2}],4:[function(t,n,i){"use strict";n.exports=Object.create(null)},{}],5:[function(t,n,i){"use strict";var r=i;r.Service=t(6)},{6:6}],6:[function(t,n,i){"use strict";n.exports=o;var r=t(12);o.prototype=Object.create(r.EventEmitter.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}});function o(s,a,c){if(typeof s!="function")throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=s,this.requestDelimited=!!a,this.responseDelimited=!!c}o.prototype.rpcCall=function s(a,c,u,f,d){if(!f)throw TypeError("request must be specified");var p=this;if(!d)return r.asPromise(s,p,a,c,u,f);if(!p.rpcImpl)return setTimeout(function(){d(Error("already ended"))},0),e;try{return p.rpcImpl(a,c[p.requestDelimited?"encodeDelimited":"encode"](f).finish(),function(m,y){if(m)return p.emit("error",m,a),d(m);if(y===null)return p.end(!0),e;if(!(y instanceof u))try{y=u[p.responseDelimited?"decodeDelimited":"decode"](y)}catch(A){return p.emit("error",A,a),d(A)}return p.emit("data",y,a),d(null,y)})}catch(g){return p.emit("error",g,a),setTimeout(function(){d(g)},0),e}},o.prototype.end=function(a){return this.rpcImpl&&(a||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{12:12}],7:[function(t,n,i){"use strict";n.exports=r;function r(o,s){for(var a=new Array(arguments.length-1),c=0,u=2,f=!0;u<arguments.length;)a[c++]=arguments[u++];return new Promise(function(p,g){a[c]=function(y){if(f)if(f=!1,y)g(y);else{for(var A=new Array(arguments.length-1),b=0;b<A.length;)A[b++]=arguments[b];p.apply(null,A)}};try{o.apply(s||null,a)}catch(m){f&&(f=!1,g(m))}})}},{}],8:[function(t,n,i){"use strict";var r=i;r.length=function(g){var m=g.length;if(!m)return 0;for(;m>0&&g.charAt(m-1)==="=";)--m;return Math.floor(m*3/4)};for(var o=new Array(64),s=new Array(123),a=0;a<64;)s[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;s[45]=62,s[95]=63,r.encode=function(g,m,y){for(var A=null,b=[],x=0,T=0,E;m<y;){var v=g[m++];switch(T){case 0:b[x++]=o[v>>2],E=(v&3)<<4,T=1;break;case 1:b[x++]=o[E|v>>4],E=(v&15)<<2,T=2;break;case 2:b[x++]=o[E|v>>6],b[x++]=o[v&63],T=0;break}x>8191&&((A||(A=[])).push(String.fromCharCode.apply(String,b)),x=0)}return T&&(b[x++]=o[E],b[x++]=61,T===1&&(b[x++]=61)),A?(x&&A.push(String.fromCharCode.apply(String,b.slice(0,x))),A.join("")):String.fromCharCode.apply(String,b.slice(0,x))};var c="invalid encoding";r.decode=function(g,m,y){for(var A=y,b=0,x,T=0;T<g.length;){var E=g.charCodeAt(T++);if(E===61&&b>1)break;if((E=s[E])===e)throw Error(c);switch(b){case 0:x=E,b=1;break;case 1:m[y++]=x<<2|(E&48)>>4,x=E,b=2;break;case 2:m[y++]=(x&15)<<4|(E&60)>>2,x=E,b=3;break;case 3:m[y++]=(x&3)<<6|E,b=0;break}}if(b===1)throw Error(c);return y-A};var u=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,f=/[-_]/,d=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(g){return u.test(g)||f.test(g)&&d.test(g)}},{}],9:[function(t,n,i){"use strict";n.exports=r;function r(){this._listeners=Object.create(null)}r.prototype.on=function(s,a,c){return(this._listeners[s]||(this._listeners[s]=[])).push({fn:a,ctx:c||this}),this},r.prototype.off=function(s,a){if(s===e)this._listeners=Object.create(null);else if(a===e)this._listeners[s]=[];else{var c=this._listeners[s];if(!c)return this;for(var u=0;u<c.length;)c[u].fn===a?c.splice(u,1):++u}return this},r.prototype.emit=function(s){var a=this._listeners[s];if(a){for(var c=[],u=1;u<arguments.length;)c.push(arguments[u++]);for(u=0;u<a.length;)a[u].fn.apply(a[u++].ctx,c)}return this}},{}],10:[function(t,n,i){"use strict";n.exports=r(r);function r(u){return typeof Float32Array<"u"?(function(){var f=new Float32Array([-0]),d=new Uint8Array(f.buffer),p=d[3]===128;function g(b,x,T){f[0]=b,x[T]=d[0],x[T+1]=d[1],x[T+2]=d[2],x[T+3]=d[3]}function m(b,x,T){f[0]=b,x[T]=d[3],x[T+1]=d[2],x[T+2]=d[1],x[T+3]=d[0]}u.writeFloatLE=p?g:m,u.writeFloatBE=p?m:g;function y(b,x){return d[0]=b[x],d[1]=b[x+1],d[2]=b[x+2],d[3]=b[x+3],f[0]}function A(b,x){return d[3]=b[x],d[2]=b[x+1],d[1]=b[x+2],d[0]=b[x+3],f[0]}u.readFloatLE=p?y:A,u.readFloatBE=p?A:y})():(function(){function f(p,g,m,y){var A=g<0?1:0;if(A&&(g=-g),g===0)p(1/g>0?0:2147483648,m,y);else if(isNaN(g))p(2143289344,m,y);else if(g>34028234663852886e22)p((A<<31|2139095040)>>>0,m,y);else if(g<11754943508222875e-54)p((A<<31|Math.round(g/1401298464324817e-60))>>>0,m,y);else{var b=Math.floor(Math.log(g)/Math.LN2),x=Math.round(g*Math.pow(2,-b)*8388608)&8388607;p((A<<31|b+127<<23|x)>>>0,m,y)}}u.writeFloatLE=f.bind(null,o),u.writeFloatBE=f.bind(null,s);function d(p,g,m){var y=p(g,m),A=(y>>31)*2+1,b=y>>>23&255,x=y&8388607;return b===255?x?NaN:A*(1/0):b===0?A*1401298464324817e-60*x:A*Math.pow(2,b-150)*(x+8388608)}u.readFloatLE=d.bind(null,a),u.readFloatBE=d.bind(null,c)})(),typeof Float64Array<"u"?(function(){var f=new Float64Array([-0]),d=new Uint8Array(f.buffer),p=d[7]===128;function g(b,x,T){f[0]=b,x[T]=d[0],x[T+1]=d[1],x[T+2]=d[2],x[T+3]=d[3],x[T+4]=d[4],x[T+5]=d[5],x[T+6]=d[6],x[T+7]=d[7]}function m(b,x,T){f[0]=b,x[T]=d[7],x[T+1]=d[6],x[T+2]=d[5],x[T+3]=d[4],x[T+4]=d[3],x[T+5]=d[2],x[T+6]=d[1],x[T+7]=d[0]}u.writeDoubleLE=p?g:m,u.writeDoubleBE=p?m:g;function y(b,x){return d[0]=b[x],d[1]=b[x+1],d[2]=b[x+2],d[3]=b[x+3],d[4]=b[x+4],d[5]=b[x+5],d[6]=b[x+6],d[7]=b[x+7],f[0]}function A(b,x){return d[7]=b[x],d[6]=b[x+1],d[5]=b[x+2],d[4]=b[x+3],d[3]=b[x+4],d[2]=b[x+5],d[1]=b[x+6],d[0]=b[x+7],f[0]}u.readDoubleLE=p?y:A,u.readDoubleBE=p?A:y})():(function(){function f(p,g,m,y,A,b){var x=y<0?1:0;if(x&&(y=-y),y===0)p(0,A,b+g),p(1/y>0?0:2147483648,A,b+m);else if(isNaN(y))p(0,A,b+g),p(2146959360,A,b+m);else if(y>17976931348623157e292)p(0,A,b+g),p((x<<31|2146435072)>>>0,A,b+m);else{var T;if(y<22250738585072014e-324)T=y/5e-324,p(T>>>0,A,b+g),p((x<<31|T/4294967296)>>>0,A,b+m);else{var E=Math.floor(Math.log(y)/Math.LN2);E===1024&&(E=1023),T=y*Math.pow(2,-E),p(T*4503599627370496>>>0,A,b+g),p((x<<31|E+1023<<20|T*1048576&1048575)>>>0,A,b+m)}}}u.writeDoubleLE=f.bind(null,o,0,4),u.writeDoubleBE=f.bind(null,s,4,0);function d(p,g,m,y,A){var b=p(y,A+g),x=p(y,A+m),T=(x>>31)*2+1,E=x>>>20&2047,v=4294967296*(x&1048575)+b;return E===2047?v?NaN:T*(1/0):E===0?T*5e-324*v:T*Math.pow(2,E-1075)*(v+4503599627370496)}u.readDoubleLE=d.bind(null,a,0,4),u.readDoubleBE=d.bind(null,c,4,0)})(),u}function o(u,f,d){f[d]=u&255,f[d+1]=u>>>8&255,f[d+2]=u>>>16&255,f[d+3]=u>>>24}function s(u,f,d){f[d]=u>>>24,f[d+1]=u>>>16&255,f[d+2]=u>>>8&255,f[d+3]=u&255}function a(u,f){return(u[f]|u[f+1]<<8|u[f+2]<<16|u[f+3]<<24)>>>0}function c(u,f){return(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3])>>>0}},{}],11:[function(t,n,i){"use strict";n.exports=o;var r;function o(u,f){this.lo=u>>>0,this.hi=f>>>0}var s=o.zero=new o(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var a=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(f){if(f===0)return s;var d=f<0;d&&(f=-f);var p=f>>>0,g=(f-p)/4294967296>>>0;return d&&(g=~g>>>0,p=~p>>>0,++p>4294967295&&(p=0,++g>4294967295&&(g=0))),new o(p,g)},o.from=function(f){if(typeof f=="number")return o.fromNumber(f);if(typeof f=="string"||f instanceof String)if(r)f=r.fromString(f);else return o.fromNumber(parseInt(f,10));return f.low||f.high?new o(f.low>>>0,f.high>>>0):s},o.prototype.toNumber=function(f){if(!f&&this.hi>>>31){var d=~this.lo+1>>>0,p=~this.hi>>>0;return d||(p=p+1>>>0),-(d+p*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(f){return r?new r(this.lo|0,this.hi|0,!!f):{low:this.lo|0,high:this.hi|0,unsigned:!!f}};var c=String.prototype.charCodeAt;o.fromHash=function(f){return f===a?s:new o((c.call(f,0)|c.call(f,1)<<8|c.call(f,2)<<16|c.call(f,3)<<24)>>>0,(c.call(f,4)|c.call(f,5)<<8|c.call(f,6)<<16|c.call(f,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var f=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^f)>>>0,this.lo=(this.lo<<1^f)>>>0,this},o.prototype.zzDecode=function(){var f=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^f)>>>0,this.hi=(this.hi>>>1^f)>>>0,this},o.prototype.length=function(){var f=this.lo,d=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?d===0?f<16384?f<128?1:2:f<2097152?3:4:d<16384?d<128?5:6:d<2097152?7:8:p<128?9:10},o._configure=function(u){r=u}},{}],12:[function(t,n,i){"use strict";var r=i;r.asPromise=t(7),r.base64=t(8),r.EventEmitter=t(9),r.float=t(10),r.utf8=t(14),r.pool=t(13),r.LongBits=t(11);function o(c){return c==="__proto__"||c==="prototype"||c==="constructor"}r.isUnsafeProperty=o,r.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||typeof globalThis<"u"&&globalThis||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u},r.isString=function(u){return typeof u=="string"||u instanceof String},r.isObject=function(u){return u&&typeof u=="object"},r.isset=r.isSet=function(u,f){var d=u[f];return d!=null&&Object.hasOwnProperty.call(u,f)?typeof d!="object"||(Array.isArray(d)?d.length:Object.keys(d).length)>0:!1},r.Buffer=(function(){try{var c=r.global.Buffer;return c.prototype.utf8Write||r.isNode?c:null}catch{return null}})(),r.newBuffer=function(u){var f=r.Buffer;return typeof u=="number"?f?f.allocUnsafe(u):new Uint8Array(u):f?f.from(u):new Uint8Array(u)},r.rawField=function(u,f,d){var p=[],g=u<<3|f;for(g>>>=0;g>127;)p.push(g&127|128),g>>>=7;p.push(g);for(var m=0;m<d.length;++m)p.push(d[m]);return r.newBuffer(p)},r.Array=Uint8Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||(function(){try{var c=t("long");return c&&c.isLong?c:null}catch{return null}})(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(u){return u?r.LongBits.from(u).toHash():r.LongBits.zeroHash},r.longFromHash=function(u,f){var d=r.LongBits.fromHash(u);return r.Long?r.Long.fromBits(d.lo,d.hi,f):d.toNumber(!!f)},r.longFromKey=function(u,f){return r.key64Re.test(u)&&!r.key32Re.test(u)?r.longFromHash(u,f):u},r.boolFromKey=function(u){return u==="true"||u==="1"};function s(c){var u=typeof arguments[arguments.length-1]=="boolean",f=u?arguments.length-1:arguments.length;u=u&&arguments[arguments.length-1];for(var d=1;d<f;++d){var p=arguments[d];if(p)for(var g=Object.keys(p),m=0;m<g.length;++m)!o(g[m])&&(!u||!Object.prototype.hasOwnProperty.call(c,g[m])||c[g[m]]===e)&&(c[g[m]]=p[g[m]])}return c}r.merge=s,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(u,f,d){Object.prototype.hasOwnProperty.call(u,f)||Object.defineProperty(u,f,{enumerable:d===e?!0:d,configurable:!0,writable:!0})},r.lcFirst=function(u){return u.charAt(0).toLowerCase()+u.substring(1)};function a(c){function u(f,d){if(!(this instanceof u))return new u(f,d);Object.defineProperty(this,"message",{get:function(){return f}}),Error.captureStackTrace?Error.captureStackTrace(this,u):Object.defineProperty(this,"stack",{value:new Error().stack||""}),d&&s(this,d)}return u.prototype=Object.create(Error.prototype,{constructor:{value:u,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return c},set:e,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),u}r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(u){for(var f={},d=0;d<u.length;++d)f[u[d]]=1;return function(){for(var p=Object.keys(this),g=p.length-1;g>-1;--g)if(f[p[g]]===1&&this[p[g]]!==e&&this[p[g]]!==null)return p[g]}},r.oneOfSetter=function(u){return function(f){for(var d=0;d<u.length;++d)u[d]!==f&&delete this[u[d]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},{10:10,11:11,13:13,14:14,7:7,8:8,9:9,long:"long"}],13:[function(t,n,i){"use strict";n.exports=r;function r(o,s,a){var c=a||8192,u=c>>>1,f=null,d=c;return function(g){if(g<1||g>u)return o(g);d+g>c&&(f=o(c),d=0);var m=s.call(f,d,d+=g);return d&7&&(d=(d|7)+1),m}}},{}],14:[function(t,n,i){"use strict";var r=i,o=new TextDecoder("utf-8",{ignoreBOM:!0}),s,a=64;try{s=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch{s=o}r.length=function(f){for(var d=0,p=0,g=0;g<f.length;++g)p=f.charCodeAt(g),p<128?d+=1:p<2048?d+=2:(p&64512)===55296&&(f.charCodeAt(g+1)&64512)===56320?(++g,d+=4):d+=3;return d};function c(u,f,d,p){var g=d===0&&p===f.length?f:f.subarray(d,p);return u.decode(g)}r.read=function(f,d,p){if(p-d<1)return"";if(p-d>=a)return c(o,f,d,p);for(var g="",m=d,y,A,b,x,T,E,v,S;m+7<p;m+=8){if(y=f[m],A=f[m+1],b=f[m+2],x=f[m+3],T=f[m+4],E=f[m+5],v=f[m+6],S=f[m+7],(y|A|b|x|T|E|v|S)&128)return g+c(o,f,m,p);g+=String.fromCharCode(y,A,b,x,T,E,v,S)}for(;m<p;++m){if(y=f[m],y&128)return g+c(o,f,m,p);g+=String.fromCharCode(y)}return g},r.readStrict=function(f,d,p){if(p-d<1)return"";if(p-d>=a)return c(s,f,d,p);for(var g="",m=d,y,A,b,x,T,E,v,S;m+7<p;m+=8){if(y=f[m],A=f[m+1],b=f[m+2],x=f[m+3],T=f[m+4],E=f[m+5],v=f[m+6],S=f[m+7],(y|A|b|x|T|E|v|S)&128)return g+c(s,f,m,p);g+=String.fromCharCode(y,A,b,x,T,E,v,S)}for(;m<p;++m){if(y=f[m],y&128)return g+c(s,f,m,p);g+=String.fromCharCode(y)}return g},r.write=function(f,d,p){for(var g=p,m,y,A=0;A<f.length;++A)m=f.charCodeAt(A),m<128?d[p++]=m:m<2048?(d[p++]=m>>6|192,d[p++]=m&63|128):(m&64512)===55296&&((y=f.charCodeAt(A+1))&64512)===56320?(m=65536+((m&1023)<<10)+(y&1023),++A,d[p++]=m>>18|240,d[p++]=m>>12&63|128,d[p++]=m>>6&63|128,d[p++]=m&63|128):(d[p++]=m>>12|224,d[p++]=m>>6&63|128,d[p++]=m&63|128);return p-g}},{}],15:[function(t,n,i){"use strict";n.exports=u;var r=t(12),o,s=r.LongBits,a=r.base64,c=r.utf8;function u(){this.pos=0,this.buf=this.constructor.alloc(u.initialBufferSize),this.view=null,this.states=null}u.initialBufferSize=128,Object.defineProperty(u.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var f=function(){return r.Buffer?function(){return(u.create=function(){return new o})()}:function(){return new u}};u.create=f(),u.alloc=function(E){return new Uint8Array(E)},u.alloc=r.pool(u.alloc,Uint8Array.prototype.subarray);function d(T){return T<128?1:T<16384?2:T<2097152?3:T<268435456?4:5}u.prototype._reserve=function(E){var v=this.pos+E;if(v>this.buf.length){var S=this.buf.length<<1;S<v&&(S=v);var I=this.constructor.alloc(S);I.set(this.buf.subarray(0,this.pos),0),this.buf=I,this.view=null}};function p(T,E,v){for(var S=0;S<T.length;)E[v++]=T.charCodeAt(S++)}function g(T,E,v){for(;T>127;)E[v++]=T&127|128,T>>>=7;return E[v]=T,v+1}u.prototype.uint32=function(E){E=E>>>0,this._reserve(5);var v=this.pos;return this.pos=g(E,this.buf,v),this},u.prototype.int32=function(E){return(E|=0)<0?(this._reserve(10),m(s.fromNumber(E),this.buf,this.pos),this.pos+=10,this):this.uint32(E)},u.prototype.sint32=function(E){return this.uint32((E<<1^E>>31)>>>0)};function m(T,E,v){for(var S=T.lo,I=T.hi;I;)E[v++]=S&127|128,S=(S>>>7|I<<25)>>>0,I>>>=7;for(;S>127;)E[v++]=S&127|128,S=S>>>7;return E[v]=S,v+1}u.prototype.uint64=function(E){var v=s.from(E);this._reserve(10);var S=this.pos;return this.pos=m(v,this.buf,S),this},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(E){var v=s.from(E).zzEncode();this._reserve(10);var S=this.pos;return this.pos=m(v,this.buf,S),this},u.prototype.bool=function(E){return this._reserve(1),this.buf[this.pos++]=E?1:0,this};function y(T,E,v){E[v]=T&255,E[v+1]=T>>>8&255,E[v+2]=T>>>16&255,E[v+3]=T>>>24}u.prototype.fixed32=function(E){return this._reserve(4),y(E>>>0,this.buf,this.pos),this.pos+=4,this},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(E){var v=s.from(E);return this._reserve(8),y(v.lo,this.buf,this.pos),y(v.hi,this.buf,this.pos+4),this.pos+=8,this},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(E){return this._reserve(4),r.float.writeFloatLE(E,this.buf,this.pos),this.pos+=4,this},u.prototype.double=function(E){return this._reserve(8),r.float.writeDoubleLE(E,this.buf,this.pos),this.pos+=8,this},u.prototype.bytes=function(E){var v=E.length>>>0;if(!v)return this._reserve(1),this.buf[this.pos++]=0,this;if(r.isString(E)){var S=u.alloc(v=a.length(E));a.decode(E,S,0),E=S}return this.uint32(v),this._reserve(v),this.buf.set(E,this.pos),this.pos+=v,this},u.prototype.raw=function(E){var v=E.length>>>0;return v?(this._reserve(v),this.buf.set(E,this.pos),this.pos+=v,this):this},u.prototype._delim=function(E,v){var S=d(v);return S>1&&this.buf.copyWithin(E+S,E+1,E+1+v),g(v,this.buf,E),this.pos=E+S+v,this},u.prototype.string=function(E){var v=E.length;if(!v)return this._reserve(1),this.buf[this.pos++]=0,this;if(v<128){this._reserve(v*3+5);var S=this.pos;return this._delim(S,c.write(E,this.buf,S+1))}var I=c.length(E);return this.uint32(I),this._reserve(I),I===E.length?p(E,this.buf,this.pos):c.write(E,this.buf,this.pos),this.pos+=I,this},u.prototype.uint32s=function(E){var v=E.length;this._reserve(v*5+5);for(var S=this.buf,I=this.pos,R=I+1,O=0;O<v;++O)R=g(E[O]>>>0,S,R);return this._delim(I,R-I-1)},u.prototype.int32s=function(E){var v=E.length;this._reserve(v*10+5);for(var S=this.buf,I=this.pos,R=I+1,O,L=0;L<v;++L)(O=E[L]|0)<0?R=m(s.fromNumber(O),S,R):R=g(O,S,R);return this._delim(I,R-I-1)},u.prototype.sint32s=function(E){var v=E.length;this._reserve(v*5+5);for(var S=this.buf,I=this.pos,R=I+1,O=0;O<v;++O)R=g((E[O]<<1^E[O]>>31)>>>0,S,R);return this._delim(I,R-I-1)},u.prototype.uint64s=function(E){var v=E.length;this._reserve(v*10+5);for(var S=this.buf,I=this.pos,R=I+1,O=0;O<v;++O)R=m(s.from(E[O]),S,R);return this._delim(I,R-I-1)},u.prototype.int64s=u.prototype.uint64s,u.prototype.sint64s=function(E){var v=E.length;this._reserve(v*10+5);for(var S=this.buf,I=this.pos,R=I+1,O=0;O<v;++O)R=m(s.from(E[O]).zzEncode(),S,R);return this._delim(I,R-I-1)},u.prototype.bools=function(E){var v=E.length;this.uint32(v),this._reserve(v);for(var S=this.buf,I=this.pos,R=0;R<v;++R)S[I++]=E[R]?1:0;return this.pos+=v,this};var A=16,b=128;function x(T,E,v){var S=T.view;if(S||E<v)return S;var I=T.buf;return T.view=new DataView(I.buffer,I.byteOffset,I.byteLength)}u.prototype.fixed32s=function(E){var v=E.length,S=v*4;this.uint32(S),this._reserve(S);var I=this.pos,R,O=x(this,v,b);if(O)for(R=0;R<v;++R)O.setUint32(I,E[R]>>>0,!0),I+=4;else{var L=this.buf;for(R=0;R<v;++R)y(E[R]>>>0,L,I),I+=4}return this.pos+=S,this},u.prototype.sfixed32s=u.prototype.fixed32s,u.prototype.fixed64s=function(E){var v=E.length,S=v*8;this.uint32(S),this._reserve(S);var I=this.pos,R,O,L=x(this,v,b);if(L)for(R=0;R<v;++R)O=s.from(E[R]),L.setUint32(I,O.lo,!0),L.setUint32(I+4,O.hi,!0),I+=8;else{var _=this.buf;for(R=0;R<v;++R)O=s.from(E[R]),y(O.lo,_,I),y(O.hi,_,I+4),I+=8}return this.pos+=S,this},u.prototype.sfixed64s=u.prototype.fixed64s,u.prototype.floats=function(E){var v=E.length,S=v*4;this.uint32(S),this._reserve(S);var I=this.pos,R,O=x(this,v,A);if(O)for(R=0;R<v;++R)O.setFloat32(I,E[R],!0),I+=4;else{var L=this.buf;for(R=0;R<v;++R)r.float.writeFloatLE(E[R],L,I),I+=4}return this.pos+=S,this},u.prototype.doubles=function(E){var v=E.length,S=v*8;this.uint32(S),this._reserve(S);var I=this.pos,R,O=x(this,v,A);if(O)for(R=0;R<v;++R)O.setFloat64(I,E[R],!0),I+=8;else{var L=this.buf;for(R=0;R<v;++R)r.float.writeDoubleLE(E[R],L,I),I+=8}return this.pos+=S,this},u.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},u.prototype.reset=function(){var E=this.states;return E&&E.length?this.pos=E.pop():this.pos=0,this},u.prototype.ldelim=function(){var E=this.states,v,S;if(E&&E.length){var I=E.pop();v=this.pos-I-1,S=d(v),S>1?(this._reserve(S-1),this.buf.copyWithin(I+S,I+1,I+1+v),this.pos+=S-1,g(v,this.buf,I)):this.buf[I]=v}else v=this.pos,S=d(v),this._reserve(S),this.buf.copyWithin(S,0,v),g(v,this.buf,0),this.pos+=S;return this},u.prototype.finish=function(E){if(E)return this.buf.subarray(0,this.pos);var v=this.constructor.alloc(this.pos);return v.set(this.buf.subarray(0,this.pos),0),v},u.prototype.finishInto=function(E,v){return v===e&&(v=0),E.set(this.buf.subarray(0,this.pos),v),E},u._configure=function(T){o=T,u.create=f(),o._configure()}},{12:12}],16:[function(t,n,i){"use strict";n.exports=s;var r=t(15);s.prototype=Object.create(r.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}});var o=t(12);function s(){r.call(this)}var a;s._configure=function(){s.alloc=o.Buffer&&o.Buffer.allocUnsafe,a=o.Buffer&&o.Buffer.prototype.utf8Write?function(u,f,d){return f.utf8Write(u,d)}:function(u,f,d){return f.write(u,d)}},s.prototype.bytes=function(u){o.isString(u)&&(u=o.Buffer.from(u,"base64"));var f=u.length>>>0;return this.uint32(f),f&&(this._reserve(f),this.buf.set(u,this.pos),this.pos+=f),this},s.prototype.string=function(u){var f=u.length;if(!f)return this._reserve(1),this.buf[this.pos++]=0,this;if(f<128){this._reserve(f*3+5);var d=this.pos,p=this.buf;return this._delim(d,f<40?o.utf8.write(u,p,d+1):a(u,p,d+1))}var g=o.Buffer.byteLength(u);return this.uint32(g),this._reserve(g),a(u,this.buf,this.pos),this.pos+=g,this},s._configure()},{12:12,15:15}]},{},[1])})()});var bBe=Yi((Msr,EW)=>{/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=(function(){var r={};r.defaultNoDataValue=-34027999387901484e22,r.decode=function(f,d){d=d||{};var p=d.encodedMaskData||d.encodedMaskData===null,g=c(f,d.inputOffset||0,p),m=d.noDataValue!==null?d.noDataValue:r.defaultNoDataValue,y=o(g,d.pixelType||Float32Array,d.encodedMaskData,m,d.returnMask),A={width:g.width,height:g.height,pixelData:y.resultPixels,minValue:y.minValue,maxValue:g.pixels.maxValue,noDataValue:m};return y.resultMask&&(A.maskData=y.resultMask),d.returnEncodedMask&&g.mask&&(A.encodedMaskData=g.mask.bitset?g.mask.bitset:null),d.returnFileInfo&&(A.fileInfo=s(g),d.computeUsedBitDepths&&(A.fileInfo.bitDepths=a(g))),A};var o=function(f,d,p,g,m){var y=0,A=f.pixels.numBlocksX,b=f.pixels.numBlocksY,x=Math.floor(f.width/A),T=Math.floor(f.height/b),E=2*f.maxZError,v=Number.MAX_VALUE,S;p=p||(f.mask?f.mask.bitset:null);var I,R;I=new d(f.width*f.height),m&&p&&(R=new Uint8Array(f.width*f.height));for(var O=new Float32Array(x*T),L,_,C=0;C<=b;C++){var w=C!==b?T:f.height%b;if(w!==0)for(var P=0;P<=A;P++){var M=P!==A?x:f.width%A;if(M!==0){var F=C*f.width*T+P*x,V=f.width-M,B=f.pixels.blocks[y],j,k,G;B.encoding<2?(B.encoding===0?j=B.rawData:(u(B.stuffedData,B.bitsPerPixel,B.numValidPixels,B.offset,E,O,f.pixels.maxValue),j=O),k=0):B.encoding===2?G=0:G=B.offset;var q;if(p)for(_=0;_<w;_++){for(F&7&&(q=p[F>>3],q<<=F&7),L=0;L<M;L++)F&7||(q=p[F>>3]),q&128?(R&&(R[F]=1),S=B.encoding<2?j[k++]:G,v=v>S?S:v,I[F++]=S):(R&&(R[F]=0),I[F++]=g),q<<=1;F+=V}else if(B.encoding<2)for(_=0;_<w;_++){for(L=0;L<M;L++)S=j[k++],v=v>S?S:v,I[F++]=S;F+=V}else for(v=v>G?G:v,_=0;_<w;_++){for(L=0;L<M;L++)I[F++]=G;F+=V}if(B.encoding===1&&k!==B.numValidPixels)throw"Block and Mask do not match";y++}}}return{resultPixels:I,resultMask:R,minValue:v}},s=function(f){return{fileIdentifierString:f.fileIdentifierString,fileVersion:f.fileVersion,imageType:f.imageType,height:f.height,width:f.width,maxZError:f.maxZError,eofOffset:f.eofOffset,mask:f.mask?{numBlocksX:f.mask.numBlocksX,numBlocksY:f.mask.numBlocksY,numBytes:f.mask.numBytes,maxValue:f.mask.maxValue}:null,pixels:{numBlocksX:f.pixels.numBlocksX,numBlocksY:f.pixels.numBlocksY,numBytes:f.pixels.numBytes,maxValue:f.pixels.maxValue,noDataValue:f.noDataValue}}},a=function(f){for(var d=f.pixels.numBlocksX*f.pixels.numBlocksY,p={},g=0;g<d;g++){var m=f.pixels.blocks[g];m.encoding===0?p.float32=!0:m.encoding===1?p[m.bitsPerPixel]=!0:p[0]=!0}return Object.keys(p)},c=function(f,d,p){var g={},m=new Uint8Array(f,d,10);if(g.fileIdentifierString=String.fromCharCode.apply(null,m),g.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+g.fileIdentifierString;d+=10;var y=new DataView(f,d,24);if(g.fileVersion=y.getInt32(0,!0),g.imageType=y.getInt32(4,!0),g.height=y.getUint32(8,!0),g.width=y.getUint32(12,!0),g.maxZError=y.getFloat64(16,!0),d+=24,!p)if(y=new DataView(f,d,16),g.mask={},g.mask.numBlocksY=y.getUint32(0,!0),g.mask.numBlocksX=y.getUint32(4,!0),g.mask.numBytes=y.getUint32(8,!0),g.mask.maxValue=y.getFloat32(12,!0),d+=16,g.mask.numBytes>0){var A=new Uint8Array(Math.ceil(g.width*g.height/8));y=new DataView(f,d,g.mask.numBytes);var b=y.getInt16(0,!0),x=2,T=0;do{if(b>0)for(;b--;)A[T++]=y.getUint8(x++);else{var E=y.getUint8(x++);for(b=-b;b--;)A[T++]=E}b=y.getInt16(x,!0),x+=2}while(x<g.mask.numBytes);if(b!==-32768||T<A.length)throw"Unexpected end of mask RLE encoding";g.mask.bitset=A,d+=g.mask.numBytes}else(g.mask.numBytes|g.mask.numBlocksY|g.mask.maxValue)===0&&(g.mask.bitset=new Uint8Array(Math.ceil(g.width*g.height/8)));y=new DataView(f,d,16),g.pixels={},g.pixels.numBlocksY=y.getUint32(0,!0),g.pixels.numBlocksX=y.getUint32(4,!0),g.pixels.numBytes=y.getUint32(8,!0),g.pixels.maxValue=y.getFloat32(12,!0),d+=16;var v=g.pixels.numBlocksX,S=g.pixels.numBlocksY,I=v+(g.width%v>0?1:0),R=S+(g.height%S>0?1:0);g.pixels.blocks=new Array(I*R);for(var O=0,L=0;L<R;L++)for(var _=0;_<I;_++){var C=0,w=f.byteLength-d;y=new DataView(f,d,Math.min(10,w));var P={};g.pixels.blocks[O++]=P;var M=y.getUint8(0);if(C++,P.encoding=M&63,P.encoding>3)throw"Invalid block encoding ("+P.encoding+")";if(P.encoding===2){d++;continue}if(M!==0&&M!==2){if(M>>=6,P.offsetType=M,M===2)P.offset=y.getInt8(1),C++;else if(M===1)P.offset=y.getInt16(1,!0),C+=2;else if(M===0)P.offset=y.getFloat32(1,!0),C+=4;else throw"Invalid block offset type";if(P.encoding===1)if(M=y.getUint8(C),C++,P.bitsPerPixel=M&63,M>>=6,P.numValidPixelsType=M,M===2)P.numValidPixels=y.getUint8(C),C++;else if(M===1)P.numValidPixels=y.getUint16(C,!0),C+=2;else if(M===0)P.numValidPixels=y.getUint32(C,!0),C+=4;else throw"Invalid valid pixel count type"}if(d+=C,P.encoding!==3){var F,V;if(P.encoding===0){var B=(g.pixels.numBytes-1)/4;if(B!==Math.floor(B))throw"uncompressed block has invalid length";F=new ArrayBuffer(B*4),V=new Uint8Array(F),V.set(new Uint8Array(f,d,B*4));var j=new Float32Array(F);P.rawData=j,d+=B*4}else if(P.encoding===1){var k=Math.ceil(P.numValidPixels*P.bitsPerPixel/8),G=Math.ceil(k/4);F=new ArrayBuffer(G*4),V=new Uint8Array(F),V.set(new Uint8Array(f,d,k)),P.stuffedData=new Uint32Array(F),d+=k}}}return g.eofOffset=d,g},u=function(f,d,p,g,m,y,A){var b=(1<<d)-1,x=0,T,E=0,v,S,I=Math.ceil((A-g)/m),R=f.length*4-Math.ceil(d*p/8);for(f[f.length-1]<<=8*R,T=0;T<p;T++){if(E===0&&(S=f[x++],E=32),E>=d)v=S>>>E-d&b,E-=d;else{var O=d-E;v=(S&b)<<O&b,S=f[x++],E=32-O,v+=S>>>E}y[T]=v<I?g+v*m:A}return y};return r})(),t=(function(){"use strict";var r={unstuff:function(c,u,f,d,p,g,m,y){var A=(1<<f)-1,b=0,x,T=0,E,v,S,I,R=c.length*4-Math.ceil(f*d/8);if(c[c.length-1]<<=8*R,p)for(x=0;x<d;x++)T===0&&(v=c[b++],T=32),T>=f?(E=v>>>T-f&A,T-=f):(S=f-T,E=(v&A)<<S&A,v=c[b++],T=32-S,E+=v>>>T),u[x]=p[E];else for(I=Math.ceil((y-g)/m),x=0;x<d;x++)T===0&&(v=c[b++],T=32),T>=f?(E=v>>>T-f&A,T-=f):(S=f-T,E=(v&A)<<S&A,v=c[b++],T=32-S,E+=v>>>T),u[x]=E<I?g+E*m:y},unstuffLUT:function(c,u,f,d,p,g){var m=(1<<u)-1,y=0,A=0,b=0,x=0,T=0,E,v=[],S=c.length*4-Math.ceil(u*f/8);c[c.length-1]<<=8*S;var I=Math.ceil((g-d)/p);for(A=0;A<f;A++)x===0&&(E=c[y++],x=32),x>=u?(T=E>>>x-u&m,x-=u):(b=u-x,T=(E&m)<<b&m,E=c[y++],x=32-b,T+=E>>>x),v[A]=T<I?d+T*p:g;return v.unshift(d),v},unstuff2:function(c,u,f,d,p,g,m,y){var A=(1<<f)-1,b=0,x,T=0,E=0,v,S,I;if(p)for(x=0;x<d;x++)T===0&&(S=c[b++],T=32,E=0),T>=f?(v=S>>>E&A,T-=f,E+=f):(I=f-T,v=S>>>E&A,S=c[b++],T=32-I,v|=(S&(1<<I)-1)<<f-I,E=I),u[x]=p[v];else{var R=Math.ceil((y-g)/m);for(x=0;x<d;x++)T===0&&(S=c[b++],T=32,E=0),T>=f?(v=S>>>E&A,T-=f,E+=f):(I=f-T,v=S>>>E&A,S=c[b++],T=32-I,v|=(S&(1<<I)-1)<<f-I,E=I),u[x]=v<R?g+v*m:y}return u},unstuffLUT2:function(c,u,f,d,p,g){var m=(1<<u)-1,y=0,A=0,b=0,x=0,T=0,E=0,v,S=[],I=Math.ceil((g-d)/p);for(A=0;A<f;A++)x===0&&(v=c[y++],x=32,E=0),x>=u?(T=v>>>E&m,x-=u,E+=u):(b=u-x,T=v>>>E&m,v=c[y++],x=32-b,T|=(v&(1<<b)-1)<<u-b,E=b),S[A]=T<I?d+T*p:g;return S.unshift(d),S},originalUnstuff:function(c,u,f,d){var p=(1<<f)-1,g=0,m,y=0,A,b,x,T=c.length*4-Math.ceil(f*d/8);for(c[c.length-1]<<=8*T,m=0;m<d;m++)y===0&&(b=c[g++],y=32),y>=f?(A=b>>>y-f&p,y-=f):(x=f-y,A=(b&p)<<x&p,b=c[g++],y=32-x,A+=b>>>y),u[m]=A;return u},originalUnstuff2:function(c,u,f,d){var p=(1<<f)-1,g=0,m,y=0,A=0,b,x,T;for(m=0;m<d;m++)y===0&&(x=c[g++],y=32,A=0),y>=f?(b=x>>>A&p,y-=f,A+=f):(T=f-y,b=x>>>A&p,x=c[g++],y=32-T,b|=(x&(1<<T)-1)<<f-T,A=T),u[m]=b;return u}},o={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(c){for(var u=65535,f=65535,d=c.length,p=Math.floor(d/2),g=0;p;){var m=p>=359?359:p;p-=m;do u+=c[g++]<<8,f+=u+=c[g++];while(--m);u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16)}return d&1&&(f+=u+=c[g]<<8),u=(u&65535)+(u>>>16),f=(f&65535)+(f>>>16),(f<<16|u)>>>0},readHeaderInfo:function(c,u){var f=u.ptr,d=new Uint8Array(c,f,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,d),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;f+=6;var g=new DataView(c,f,8),m=g.getInt32(0,!0);p.fileVersion=m,f+=4,m>=3&&(p.checksum=g.getUint32(4,!0),f+=4),g=new DataView(c,f,12),p.height=g.getUint32(0,!0),p.width=g.getUint32(4,!0),f+=8,m>=4?(p.numDims=g.getUint32(8,!0),f+=4):p.numDims=1,g=new DataView(c,f,40),p.numValidPixel=g.getUint32(0,!0),p.microBlockSize=g.getInt32(4,!0),p.blobSize=g.getInt32(8,!0),p.imageType=g.getInt32(12,!0),p.maxZError=g.getFloat64(16,!0),p.zMin=g.getFloat64(24,!0),p.zMax=g.getFloat64(32,!0),f+=40,u.headerInfo=p,u.ptr=f;var y,A;if(m>=3&&(A=m>=4?52:48,y=this.computeChecksumFletcher32(new Uint8Array(c,f-A,p.blobSize-14)),y!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,u){var f=u.headerInfo,d=this.getDataTypeArray(f.imageType),p=f.numDims*this.getDataTypeSize(f.imageType),g=this.readSubArray(c,u.ptr,d,p),m=this.readSubArray(c,u.ptr+p,d,p);u.ptr+=2*p;var y,A=!0;for(y=0;y<f.numDims;y++)if(g[y]!==m[y]){A=!1;break}return f.minValues=g,f.maxValues=m,A},readSubArray:function(c,u,f,d){var p;if(f===Uint8Array)p=new Uint8Array(c,u,d);else{var g=new ArrayBuffer(d),m=new Uint8Array(g);m.set(new Uint8Array(c,u,d)),p=new f(g)}return p},readMask:function(c,u){var f=u.ptr,d=u.headerInfo,p=d.width*d.height,g=d.numValidPixel,m=new DataView(c,f,4),y={};if(y.numBytes=m.getUint32(0,!0),f+=4,(g===0||p===g)&&y.numBytes!==0)throw"invalid mask";var A,b;if(g===0)A=new Uint8Array(Math.ceil(p/8)),y.bitset=A,b=new Uint8Array(p),u.pixels.resultMask=b,f+=y.numBytes;else if(y.numBytes>0){A=new Uint8Array(Math.ceil(p/8)),m=new DataView(c,f,y.numBytes);var x=m.getInt16(0,!0),T=2,E=0,v=0;do{if(x>0)for(;x--;)A[E++]=m.getUint8(T++);else for(v=m.getUint8(T++),x=-x;x--;)A[E++]=v;x=m.getInt16(T,!0),T+=2}while(T<y.numBytes);if(x!==-32768||E<A.length)throw"Unexpected end of mask RLE encoding";b=new Uint8Array(p);var S=0,I=0;for(I=0;I<p;I++)I&7?(S=A[I>>3],S<<=I&7):S=A[I>>3],S&128&&(b[I]=1);u.pixels.resultMask=b,y.bitset=A,f+=y.numBytes}return u.ptr=f,u.mask=y,!0},readDataOneSweep:function(c,u,f){var d=u.ptr,p=u.headerInfo,g=p.numDims,m=p.width*p.height,y=p.imageType,A=p.numValidPixel*o.getDataTypeSize(y)*g,b,x=u.pixels.resultMask;if(f===Uint8Array)b=new Uint8Array(c,d,A);else{var T=new ArrayBuffer(A),E=new Uint8Array(T);E.set(new Uint8Array(c,d,A)),b=new f(T)}if(b.length===m*g)u.pixels.resultPixels=b;else{u.pixels.resultPixels=new f(m*g);var v=0,S=0,I=0,R=0;if(g>1)for(I=0;I<g;I++)for(R=I*m,S=0;S<m;S++)x[S]&&(u.pixels.resultPixels[R+S]=b[v++]);else for(S=0;S<m;S++)x[S]&&(u.pixels.resultPixels[S]=b[v++])}return d+=A,u.ptr=d,!0},readHuffmanTree:function(c,u){var f=this.HUFFMAN_LUT_BITS_MAX,d=new DataView(c,u.ptr,16);u.ptr+=16;var p=d.getInt32(0,!0);if(p<2)throw"unsupported Huffman version";var g=d.getInt32(4,!0),m=d.getInt32(8,!0),y=d.getInt32(12,!0);if(m>=y)return!1;var A=new Uint32Array(y-m);o.decodeBits(c,u,A);var b=[],x,T,E,v;for(x=m;x<y;x++)T=x-(x<g?0:g),b[T]={first:A[x-m],second:null};var S=c.byteLength-u.ptr,I=Math.ceil(S/4),R=new ArrayBuffer(I*4),O=new Uint8Array(R);O.set(new Uint8Array(c,u.ptr,S));var L=new Uint32Array(R),_=0,C,w=0;for(C=L[0],x=m;x<y;x++)T=x-(x<g?0:g),v=b[T].first,v>0&&(b[T].second=C<<_>>>32-v,32-_>=v?(_+=v,_===32&&(_=0,w++,C=L[w])):(_+=v-32,w++,C=L[w],b[T].second|=C>>>32-_));var P=0,M=0,F=new s;for(x=0;x<b.length;x++)b[x]!==void 0&&(P=Math.max(P,b[x].first));P>=f?M=f:M=P,P>=30&&console.log("WARning, large NUM LUT BITS IS "+P);var V=[],B,j,k,G,q,Q;for(x=m;x<y;x++)if(T=x-(x<g?0:g),v=b[T].first,v>0)if(B=[v,T],v<=M)for(j=b[T].second<<M-v,k=1<<M-v,E=0;E<k;E++)V[j|E]=B;else for(j=b[T].second,Q=F,G=v-1;G>=0;G--)q=j>>>G&1,q?(Q.right||(Q.right=new s),Q=Q.right):(Q.left||(Q.left=new s),Q=Q.left),G===0&&!Q.val&&(Q.val=B[1]);return{decodeLut:V,numBitsLUTQick:M,numBitsLUT:P,tree:F,stuffedData:L,srcPtr:w,bitPos:_}},readHuffman:function(c,u,f){var d=u.headerInfo,p=d.numDims,g=u.headerInfo.height,m=u.headerInfo.width,y=m*g,A=this.readHuffmanTree(c,u),b=A.decodeLut,x=A.tree,T=A.stuffedData,E=A.srcPtr,v=A.bitPos,S=A.numBitsLUTQick,I=A.numBitsLUT,R=u.headerInfo.imageType===0?128:0,O,L,_,C=u.pixels.resultMask,w,P,M,F,V,B,j,k=0;v>0&&(E++,v=0);var G=T[E],q=u.encodeMode===1,Q=new f(y*p),W=Q,J;for(J=0;J<d.numDims;J++){if(p>1&&(W=new f(Q.buffer,y*J,y),k=0),u.headerInfo.numValidPixel===m*g)for(B=0,F=0;F<g;F++)for(V=0;V<m;V++,B++){if(L=0,w=G<<v>>>32-S,P=w,32-v<S&&(w|=T[E+1]>>>64-v-S,P=w),b[P])L=b[P][1],v+=b[P][0];else for(w=G<<v>>>32-I,P=w,32-v<I&&(w|=T[E+1]>>>64-v-I,P=w),O=x,j=0;j<I;j++)if(M=w>>>I-j-1&1,O=M?O.right:O.left,!(O.left||O.right)){L=O.val,v=v+j+1;break}v>=32&&(v-=32,E++,G=T[E]),_=L-R,q?(V>0?_+=k:F>0?_+=W[B-m]:_+=k,_&=255,W[B]=_,k=_):W[B]=_}else for(B=0,F=0;F<g;F++)for(V=0;V<m;V++,B++)if(C[B]){if(L=0,w=G<<v>>>32-S,P=w,32-v<S&&(w|=T[E+1]>>>64-v-S,P=w),b[P])L=b[P][1],v+=b[P][0];else for(w=G<<v>>>32-I,P=w,32-v<I&&(w|=T[E+1]>>>64-v-I,P=w),O=x,j=0;j<I;j++)if(M=w>>>I-j-1&1,O=M?O.right:O.left,!(O.left||O.right)){L=O.val,v=v+j+1;break}v>=32&&(v-=32,E++,G=T[E]),_=L-R,q?(V>0&&C[B-1]?_+=k:F>0&&C[B-m]?_+=W[B-m]:_+=k,_&=255,W[B]=_,k=_):W[B]=_}u.ptr=u.ptr+(E+1)*4+(v>0?4:0)}u.pixels.resultPixels=Q},decodeBits:function(c,u,f,d,p){{var g=u.headerInfo,m=g.fileVersion,y=0,A=new DataView(c,u.ptr,5),b=A.getUint8(0);y++;var x=b>>6,T=x===0?4:3-x,E=(b&32)>0,v=b&31,S=0;if(T===1)S=A.getUint8(y),y++;else if(T===2)S=A.getUint16(y,!0),y+=2;else if(T===4)S=A.getUint32(y,!0),y+=4;else throw"Invalid valid pixel count type";var I=2*g.maxZError,R,O,L,_,C,w,P,M,F,V,B=g.numDims>1?g.maxValues[p]:g.zMax;if(E){for(u.counter.lut++,M=A.getUint8(y),F=v,y++,_=Math.ceil((M-1)*v/8),C=Math.ceil(_/4),O=new ArrayBuffer(C*4),L=new Uint8Array(O),u.ptr+=y,L.set(new Uint8Array(c,u.ptr,_)),P=new Uint32Array(O),u.ptr+=_,V=0;M-1>>>V;)V++;_=Math.ceil(S*V/8),C=Math.ceil(_/4),O=new ArrayBuffer(C*4),L=new Uint8Array(O),L.set(new Uint8Array(c,u.ptr,_)),R=new Uint32Array(O),u.ptr+=_,m>=3?w=r.unstuffLUT2(P,v,M-1,d,I,B):w=r.unstuffLUT(P,v,M-1,d,I,B),m>=3?r.unstuff2(R,f,V,S,w):r.unstuff(R,f,V,S,w)}else u.counter.bitstuffer++,V=v,u.ptr+=y,V>0&&(_=Math.ceil(S*V/8),C=Math.ceil(_/4),O=new ArrayBuffer(C*4),L=new Uint8Array(O),L.set(new Uint8Array(c,u.ptr,_)),R=new Uint32Array(O),u.ptr+=_,m>=3?d==null?r.originalUnstuff2(R,f,V,S):r.unstuff2(R,f,V,S,!1,d,I,B):d==null?r.originalUnstuff(R,f,V,S):r.unstuff(R,f,V,S,!1,d,I,B))}},readTiles:function(c,u,f){var d=u.headerInfo,p=d.width,g=d.height,m=d.microBlockSize,y=d.imageType,A=o.getDataTypeSize(y),b=Math.ceil(p/m),x=Math.ceil(g/m);u.pixels.numBlocksY=x,u.pixels.numBlocksX=b,u.pixels.ptr=0;var T=0,E=0,v=0,S=0,I=0,R=0,O=0,L=0,_=0,C=0,w=0,P=0,M=0,F=0,V=0,B=0,j,k,G,q,Q,W,J=new f(m*m),Z=g%m||m,ae=p%m||m,Ae,fe,xe=d.numDims,ge,we=u.pixels.resultMask,Se=u.pixels.resultPixels;for(v=0;v<x;v++)for(I=v!==x-1?m:Z,S=0;S<b;S++)for(R=S!==b-1?m:ae,w=v*p*m+S*m,P=p-R,ge=0;ge<xe;ge++){if(xe>1&&(Se=new f(u.pixels.resultPixels.buffer,p*g*ge*A,p*g)),O=c.byteLength-u.ptr,j=new DataView(c,u.ptr,Math.min(10,O)),k={},B=0,L=j.getUint8(0),B++,_=L>>6&255,C=L>>2&15,C!==(S*m>>3&15))throw"integrity issue";if(W=L&3,W>3)throw u.ptr+=B,"Invalid block encoding ("+W+")";if(W===2){u.counter.constant++,u.ptr+=B;continue}else if(W===0){if(u.counter.uncompressed++,u.ptr+=B,M=I*R*A,F=c.byteLength-u.ptr,M=M<F?M:F,G=new ArrayBuffer(M%A===0?M:M+A-M%A),q=new Uint8Array(G),q.set(new Uint8Array(c,u.ptr,M)),Q=new f(G),V=0,we)for(T=0;T<I;T++){for(E=0;E<R;E++)we[w]&&(Se[w]=Q[V++]),w++;w+=P}else for(T=0;T<I;T++){for(E=0;E<R;E++)Se[w++]=Q[V++];w+=P}u.ptr+=V*A}else if(Ae=o.getDataTypeUsed(y,_),fe=o.getOnePixel(k,B,Ae,j),B+=o.getDataTypeSize(Ae),W===3)if(u.ptr+=B,u.counter.constantoffset++,we)for(T=0;T<I;T++){for(E=0;E<R;E++)we[w]&&(Se[w]=fe),w++;w+=P}else for(T=0;T<I;T++){for(E=0;E<R;E++)Se[w++]=fe;w+=P}else if(u.ptr+=B,o.decodeBits(c,u,J,fe,ge),B=0,we)for(T=0;T<I;T++){for(E=0;E<R;E++)we[w]&&(Se[w]=J[B++]),w++;w+=P}else for(T=0;T<I;T++){for(E=0;E<R;E++)Se[w++]=J[B++];w+=P}}},formatFileInfo:function(c){return{fileIdentifierString:c.headerInfo.fileIdentifierString,fileVersion:c.headerInfo.fileVersion,imageType:c.headerInfo.imageType,height:c.headerInfo.height,width:c.headerInfo.width,numValidPixel:c.headerInfo.numValidPixel,microBlockSize:c.headerInfo.microBlockSize,blobSize:c.headerInfo.blobSize,maxZError:c.headerInfo.maxZError,pixelType:o.getPixelType(c.headerInfo.imageType),eofOffset:c.eofOffset,mask:c.mask?{numBytes:c.mask.numBytes}:null,pixels:{numBlocksX:c.pixels.numBlocksX,numBlocksY:c.pixels.numBlocksY,maxValue:c.headerInfo.zMax,minValue:c.headerInfo.zMin,noDataValue:c.noDataValue}}},constructConstantSurface:function(c){var u=c.headerInfo.zMax,f=c.headerInfo.numDims,d=c.headerInfo.height*c.headerInfo.width,p=d*f,g=0,m=0,y=0,A=c.pixels.resultMask;if(A)if(f>1)for(g=0;g<f;g++)for(y=g*d,m=0;m<d;m++)A[m]&&(c.pixels.resultPixels[y+m]=u);else for(m=0;m<d;m++)A[m]&&(c.pixels.resultPixels[m]=u);else if(c.pixels.resultPixels.fill)c.pixels.resultPixels.fill(u);else for(m=0;m<p;m++)c.pixels.resultPixels[m]=u},getDataTypeArray:function(c){var u;switch(c){case 0:u=Int8Array;break;case 1:u=Uint8Array;break;case 2:u=Int16Array;break;case 3:u=Uint16Array;break;case 4:u=Int32Array;break;case 5:u=Uint32Array;break;case 6:u=Float32Array;break;case 7:u=Float64Array;break;default:u=Float32Array}return u},getPixelType:function(c){var u;switch(c){case 0:u="S8";break;case 1:u="U8";break;case 2:u="S16";break;case 3:u="U16";break;case 4:u="S32";break;case 5:u="U32";break;case 6:u="F32";break;case 7:u="F64";break;default:u="F32"}return u},isValidPixelValue:function(c,u){if(u==null)return!1;var f;switch(c){case 0:f=u>=-128&&u<=127;break;case 1:f=u>=0&&u<=255;break;case 2:f=u>=-32768&&u<=32767;break;case 3:f=u>=0&&u<=65536;break;case 4:f=u>=-2147483648&&u<=2147483647;break;case 5:f=u>=0&&u<=4294967296;break;case 6:f=u>=-34027999387901484e22&&u<=34027999387901484e22;break;case 7:f=u>=5e-324&&u<=17976931348623157e292;break;default:f=!1}return f},getDataTypeSize:function(c){var u=0;switch(c){case 0:case 1:u=1;break;case 2:case 3:u=2;break;case 4:case 5:case 6:u=4;break;case 7:u=8;break;default:u=c}return u},getDataTypeUsed:function(c,u){var f=c;switch(c){case 2:case 4:f=c-u;break;case 3:case 5:f=c-2*u;break;case 6:u===0?f=c:u===1?f=2:f=1;break;case 7:u===0?f=c:f=c-2*u+1;break;default:f=c;break}return f},getOnePixel:function(c,u,f,d){var p=0;switch(f){case 0:p=d.getInt8(u);break;case 1:p=d.getUint8(u);break;case 2:p=d.getInt16(u,!0);break;case 3:p=d.getUint16(u,!0);break;case 4:p=d.getInt32(u,!0);break;case 5:p=d.getUInt32(u,!0);break;case 6:p=d.getFloat32(u,!0);break;case 7:p=d.getFloat64(u,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},s=function(c,u,f){this.val=c,this.left=u,this.right=f},a={decode:function(c,u){u=u||{};var f=u.noDataValue,d=0,p={};if(p.ptr=u.inputOffset||0,p.pixels={},!!o.readHeaderInfo(c,p)){var g=p.headerInfo,m=g.fileVersion,y=o.getDataTypeArray(g.imageType);o.readMask(c,p),g.numValidPixel!==g.width*g.height&&!p.pixels.resultMask&&(p.pixels.resultMask=u.maskData);var A=g.width*g.height;if(p.pixels.resultPixels=new y(A*g.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},g.numValidPixel!==0)if(g.zMax===g.zMin)o.constructConstantSurface(p);else if(m>=4&&o.checkMinMaxRanges(c,p))o.constructConstantSurface(p);else{var b=new DataView(c,p.ptr,2),x=b.getUint8(0);if(p.ptr++,x)o.readDataOneSweep(c,p,y);else if(m>1&&g.imageType<=1&&Math.abs(g.maxZError-.5)<1e-5){var T=b.getUint8(1);if(p.ptr++,p.encodeMode=T,T>2||m<4&&T>1)throw"Invalid Huffman flag "+T;T?o.readHuffman(c,p,y):o.readTiles(c,p,y)}else o.readTiles(c,p,y)}p.eofOffset=p.ptr;var E;u.inputOffset?(E=p.headerInfo.blobSize+u.inputOffset-p.ptr,Math.abs(E)>=1&&(p.eofOffset=u.inputOffset+p.headerInfo.blobSize)):(E=p.headerInfo.blobSize-p.ptr,Math.abs(E)>=1&&(p.eofOffset=p.headerInfo.blobSize));var v={width:g.width,height:g.height,pixelData:p.pixels.resultPixels,minValue:g.zMin,maxValue:g.zMax,validPixelCount:g.numValidPixel,dimCount:g.numDims,dimStats:{minValues:g.minValues,maxValues:g.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&o.isValidPixelValue(g.imageType,f)){var S=p.pixels.resultMask;for(d=0;d<A;d++)S[d]||(v.pixelData[d]=f);v.noDataValue=f}return p.noDataValue=f,u.returnFileInfo&&(v.fileInfo=o.formatFileInfo(p)),v}},getBandCount:function(c){var u=0,f=0,d={};for(d.ptr=0,d.pixels={};f<c.byteLength-58;)o.readHeaderInfo(c,d),f+=d.headerInfo.blobSize,u++,d.ptr=f;return u}};return a})(),n=(function(){var r=new ArrayBuffer(4),o=new Uint8Array(r),s=new Uint32Array(r);return s[0]=1,o[0]===1})(),i={decode:function(r,o){if(!n)throw"Big endian system is not supported.";o=o||{};var s=o.inputOffset||0,a=new Uint8Array(r,s,10),c=String.fromCharCode.apply(null,a),u,f;if(c.trim()==="CntZImage")u=e,f=1;else if(c.substring(0,5)==="Lerc2")u=t,f=2;else throw"Unexpected file identifier string: "+c;for(var d=0,p=r.byteLength-10,g,m=[],y,A,b={width:0,height:0,pixels:[],pixelType:o.pixelType,mask:null,statistics:[]};s<p;){var x=u.decode(r,{inputOffset:s,encodedMaskData:g,maskData:A,returnMask:d===0,returnEncodedMask:d===0,returnFileInfo:!0,pixelType:o.pixelType||null,noDataValue:o.noDataValue||null});s=x.fileInfo.eofOffset,d===0&&(g=x.encodedMaskData,A=x.maskData,b.width=x.width,b.height=x.height,b.dimCount=x.dimCount||1,b.pixelType=x.pixelType||x.fileInfo.pixelType,b.mask=x.maskData),f>1&&x.fileInfo.mask&&x.fileInfo.mask.numBytes>0&&m.push(x.maskData),d++,b.pixels.push(x.pixelData),b.statistics.push({minValue:x.minValue,maxValue:x.maxValue,noDataValue:x.noDataValue,dimStats:x.dimStats})}var T,E,v;if(f>1&&m.length>1){for(v=b.width*b.height,b.bandMasks=m,A=new Uint8Array(v),A.set(m[0]),T=1;T<m.length;T++)for(y=m[T],E=0;E<v;E++)A[E]=A[E]&y[E];b.maskData=A}return b}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof EW<"u"&&EW.exports?EW.exports=i:this.Lerc=i})()});var y3e=Yi((lj,Wle)=>{/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */(function(e,t){typeof lj=="object"&&typeof Wle=="object"?Wle.exports=t():typeof define=="function"&&define.amd?define([],t):typeof lj=="object"?lj.NoSleep=t():e.NoSleep=t()})(lj,(function(){return(function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(i,r,o){n.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:o})},n.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},n.t=function(i,r){if(1&r&&(i=n(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var s in i)n.d(o,s,function(a){return i[a]}.bind(null,s));return o},n.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(r,"a",r),r},n.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},n.p="",n(n.s=0)})([function(e,t,n){"use strict";var i=(function(){function f(d,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}return function(d,p,g){return p&&f(d.prototype,p),g&&f(d,g),d}})(),r=n(1),o=r.webm,s=r.mp4,a=function(){return typeof navigator<"u"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream},c=function(){return"wakeLock"in navigator},u=(function(){function f(){var d=this;if((function(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")})(this,f),this.enabled=!1,c()){this._wakeLock=null;var p=function(){d._wakeLock!==null&&document.visibilityState==="visible"&&d.enable()};document.addEventListener("visibilitychange",p),document.addEventListener("fullscreenchange",p)}else a()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",o),this._addSourceToVideo(this.noSleepVideo,"mp4",s),this.noSleepVideo.addEventListener("loadedmetadata",(function(){d.noSleepVideo.duration<=1?d.noSleepVideo.setAttribute("loop",""):d.noSleepVideo.addEventListener("timeupdate",(function(){d.noSleepVideo.currentTime>.5&&(d.noSleepVideo.currentTime=Math.random())}))})))}return i(f,[{key:"_addSourceToVideo",value:function(d,p,g){var m=document.createElement("source");m.src=g,m.type="video/"+p,d.appendChild(m)}},{key:"enable",value:function(){var d=this;return c()?navigator.wakeLock.request("screen").then((function(p){d._wakeLock=p,d.enabled=!0,console.log("Wake Lock active."),d._wakeLock.addEventListener("release",(function(){console.log("Wake Lock released.")}))})).catch((function(p){throw d.enabled=!1,console.error(p.name+", "+p.message),p})):a()?(this.disable(),console.warn(`
NoSleep enabled for older iOS devices. This can interrupt
active or long-running network requests from completing successfully.
See https://github.com/richtr/NoSleep.js/issues/15 for more details.
`),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then((function(p){return d.enabled=!0,p})).catch((function(p){throw d.enabled=!1,p}))}},{key:"disable",value:function(){c()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):a()?this.noSleepTimer&&(console.warn(`
NoSleep now disabled for older iOS devices.
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}},{key:"isEnabled",get:function(){return this.enabled}}]),f})();e.exports=u},function(e,t,n){"use strict";e.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}}])}))});var R9t={};Oq(R9t,{AlphaMode:()=>Gp,AlphaPipelineStage:()=>GL,AnchorPointDirect:()=>jN,AnchorPointIndirect:()=>HN,Animation:()=>R8,AnimationViewModel:()=>O8,Appearance:()=>wr,ApproximateTerrainHeights:()=>Mi,ArcGISTiledElevationTerrainProvider:()=>Kre,ArcGisBaseMapType:()=>gm,ArcGisMapServerImageryProvider:()=>$g,ArcGisMapService:()=>Bf,ArcType:()=>ln,ArticulationStageType:()=>ul,AssociativeArray:()=>kt,Atmosphere:()=>cT,AtmospherePipelineStage:()=>xL,AttributeCompression:()=>cn,AttributeType:()=>Vt,AutoExposure:()=>QU,AutomaticUniforms:()=>dg,Axis:()=>Hi,AxisAlignedBoundingBox:()=>vf,Azure2DImageryProvider:()=>SF,B3dmLoader:()=>sL,B3dmParser:()=>iL,BaseLayerPicker:()=>S8,BaseLayerPickerViewModel:()=>v8,BatchTable:()=>xx,BatchTableHierarchy:()=>qx,BatchTexture:()=>Kl,BatchTexturePipelineStage:()=>WL,Billboard:()=>Br,BillboardCollection:()=>Gf,BillboardGraphics:()=>qc,BillboardLoadState:()=>qs,BillboardTexture:()=>i_,BillboardVisualizer:()=>TD,BingMapsGeocoderService:()=>Jre,BingMapsImageryProvider:()=>gF,BingMapsStyle:()=>FS,BlendEquation:()=>Pc,BlendFunction:()=>$r,BlendOption:()=>Fi,BlendingState:()=>tn,BoundingRectangle:()=>et,BoundingSphere:()=>ue,BoundingSphereState:()=>Pt,BoundingVolumeSemantics:()=>lA,BoxEmitter:()=>yse,BoxGeometry:()=>Ic,BoxGeometryUpdater:()=>NM,BoxGraphics:()=>Px,BoxOutlineGeometry:()=>Hh,BrdfLutGenerator:()=>nz,Buffer:()=>nt,BufferLoader:()=>Zx,BufferPoint:()=>Bc,BufferPointCollection:()=>Ku,BufferPointMaterial:()=>Sm,BufferPolygon:()=>Mo,BufferPolygonCollection:()=>Ua,BufferPolygonMaterial:()=>Of,BufferPolyline:()=>ya,BufferPolylineCollection:()=>ml,BufferPolylineMaterial:()=>Mf,BufferPrimitive:()=>ss,BufferPrimitiveCollection:()=>ra,BufferPrimitiveMaterial:()=>Zl,BufferUsage:()=>Me,CPUStylingPipelineStage:()=>KL,CallbackPositionProperty:()=>LM,CallbackProperty:()=>em,Camera:()=>Or,CameraEventAggregator:()=>Iz,CameraEventType:()=>cr,CameraFlightPath:()=>vz,Cartesian2:()=>U,Cartesian3:()=>h,Cartesian4:()=>se,CartesianRectangle:()=>XS,Cartographic:()=>he,CartographicGeocoderService:()=>Qre,CatmullRomSpline:()=>eoe,Cesium3DContentGroup:()=>Wx,Cesium3DTile:()=>ih,Cesium3DTileBatchTable:()=>rm,Cesium3DTileColorBlendMode:()=>Uu,Cesium3DTileContent:()=>Nse,Cesium3DTileContentFactory:()=>BT,Cesium3DTileContentState:()=>Rr,Cesium3DTileContentType:()=>Ca,Cesium3DTileFeature:()=>na,Cesium3DTileFeatureTable:()=>dm,Cesium3DTileOptimizationHint:()=>Qd,Cesium3DTileOptimizations:()=>I2,Cesium3DTilePass:()=>ao,Cesium3DTilePassState:()=>vh,Cesium3DTilePointFeature:()=>r_,Cesium3DTileRefine:()=>yo,Cesium3DTileStyle:()=>l_,Cesium3DTileStyleEngine:()=>N2,Cesium3DTileVectorFeature:()=>NT,Cesium3DTilesInspector:()=>F8,Cesium3DTilesInspectorViewModel:()=>L8,Cesium3DTilesTerrainData:()=>RU,Cesium3DTilesTerrainGeometryProcessor:()=>uP,Cesium3DTilesTerrainProvider:()=>aoe,Cesium3DTilesVoxelProvider:()=>jse,Cesium3DTileset:()=>Yo,Cesium3DTilesetBaseTraversal:()=>z2,Cesium3DTilesetCache:()=>R2,Cesium3DTilesetGraphics:()=>Fx,Cesium3DTilesetHeatmap:()=>O2,Cesium3DTilesetMetadata:()=>YT,Cesium3DTilesetMostDetailedTraversal:()=>B2,Cesium3DTilesetSkipTraversal:()=>H2,Cesium3DTilesetStatistics:()=>Im,Cesium3DTilesetTraversal:()=>qa,Cesium3DTilesetVisualizer:()=>G2,CesiumInspector:()=>V8,CesiumInspectorViewModel:()=>z8,CesiumTerrainProvider:()=>tC,CesiumWidget:()=>_8,Check:()=>Wr,CheckerboardMaterialProperty:()=>gw,CircleEmitter:()=>Nz,CircleGeometry:()=>hoe,CircleOutlineGeometry:()=>moe,ClassificationModelDrawCommand:()=>mB,ClassificationPipelineStage:()=>qL,ClassificationPrimitive:()=>Iv,ClassificationType:()=>Qn,ClearCommand:()=>ui,ClippingPlane:()=>ia,ClippingPlaneCollection:()=>bs,ClippingPolygon:()=>fS,ClippingPolygonCollection:()=>Mc,Clock:()=>Nm,ClockRange:()=>Rs,ClockStep:()=>Vr,ClockViewModel:()=>C8,CloudCollection:()=>Yse,CloudType:()=>CP,Color:()=>z,ColorBlendMode:()=>ll,ColorGeometryInstanceAttribute:()=>Jt,ColorMaterialProperty:()=>Kt,Command:()=>Rle,ComponentDatatype:()=>Y,Composite3DTileContent:()=>GM,CompositeEntityCollection:()=>tee,CompositeMaterialProperty:()=>yw,CompositePositionProperty:()=>mc,CompositeProperty:()=>_l,CompressedTextureBuffer:()=>RD,ComputeCommand:()=>Nf,ComputeEngine:()=>pU,ConditionsExpression:()=>l2,ConeEmitter:()=>$se,ConstantPositionProperty:()=>Gl,ConstantProperty:()=>li,ConstantSpline:()=>uL,ContentMetadata:()=>A2,Context:()=>$E,ContextLimits:()=>Ut,Controller:()=>ple,ControllerHost:()=>F4,CoplanarPolygonGeometry:()=>wk,CoplanarPolygonGeometryLibrary:()=>p_,CoplanarPolygonOutlineGeometry:()=>nh,CornerType:()=>rr,CorrelationGroup:()=>GN,CorridorGeometry:()=>JT,CorridorGeometryLibrary:()=>mr,CorridorGeometryUpdater:()=>Q2,CorridorGraphics:()=>Rx,CorridorOutlineGeometry:()=>Z2,Credit:()=>It,CreditDisplay:()=>jz,CubeMap:()=>ts,CubeMapFace:()=>VD,CubeMapPanorama:()=>bC,CubicRealPolynomial:()=>ux,CullFace:()=>Vi,CullingVolume:()=>ta,CumulusCloud:()=>hd,CustomDataSource:()=>rk,CustomHeightmapTerrainProvider:()=>poe,CustomShader:()=>k0,CustomShaderMode:()=>Kg,CustomShaderPipelineStage:()=>nF,CustomShaderTranslucencyMode:()=>TA,CylinderGeometry:()=>ok,CylinderGeometryLibrary:()=>ZT,CylinderGeometryUpdater:()=>ak,CylinderGraphics:()=>Ox,CylinderOutlineGeometry:()=>sk,CzmlDataSource:()=>_k,DataSource:()=>Ds,DataSourceClock:()=>Lm,DataSourceCollection:()=>yk,DataSourceDisplay:()=>l3,DebugAppearance:()=>tae,DebugCameraPrimitive:()=>z0,DebugInspector:()=>Kz,DebugModelMatrixPrimitive:()=>$z,DefaultProxy:()=>_oe,DepthFunction:()=>ac,DepthPlane:()=>iV,DequantizationPipelineStage:()=>rF,DerivedCommand:()=>up,DeveloperError:()=>pe,DeviceOrientationCameraController:()=>rV,DirectionalLight:()=>aae,DiscardEmptyTileImagePolicy:()=>BS,DiscardMissingTileImagePolicy:()=>mF,DistanceDisplayCondition:()=>jt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Kn,DoubleEndedPriorityQueue:()=>iy,DoublyLinkedList:()=>D2,DracoLoader:()=>Og,DrawCommand:()=>at,DynamicAtmosphereLightingType:()=>Bg,DynamicEnvironmentMapManager:()=>kg,DynamicGeometryBatch:()=>rE,DynamicGeometryUpdater:()=>Ii,EarthOrientationParameters:()=>pD,EarthOrientationParametersSample:()=>wy,EasingFunction:()=>Ls,EdgeDetectionPipelineStage:()=>sF,EdgeDisplayMode:()=>Hd,EdgeFramebuffer:()=>oV,EdgeVisibilityPipelineStage:()=>lF,EllipseGeometry:()=>mu,EllipseGeometryLibrary:()=>Qu,EllipseGeometryUpdater:()=>bk,EllipseGraphics:()=>Mx,EllipseOutlineGeometry:()=>Qf,Ellipsoid:()=>ee,EllipsoidGeodesic:()=>_g,EllipsoidGeometry:()=>Xa,EllipsoidGeometryUpdater:()=>Tk,EllipsoidGraphics:()=>Nx,EllipsoidOutlineGeometry:()=>Yf,EllipsoidPrimitive:()=>sV,EllipsoidRhumbLine:()=>Dc,EllipsoidSurfaceAppearance:()=>lae,EllipsoidTangentPlane:()=>Vs,EllipsoidTerrainProvider:()=>M0,EllipsoidalOccluder:()=>Om,Empty3DTileContent:()=>n0,EncodedCartesian3:()=>Sn,Entity:()=>Jr,EntityCluster:()=>Kf,EntityCollection:()=>Ya,EntityView:()=>f3,EquirectangularPanorama:()=>uae,Event:()=>be,EventHelper:()=>Xo,Expression:()=>Ld,ExpressionNodeType:()=>Mt,ExtrapolationType:()=>fu,FeatureDetection:()=>dn,FeatureIdPipelineStage:()=>xA,Fog:()=>uV,ForEach:()=>ke,FrameRateMonitor:()=>fV,FrameState:()=>kA,Framebuffer:()=>ys,FramebufferManager:()=>ai,Frozen:()=>H,FrustumCommands:()=>dV,FrustumGeometry:()=>rC,FrustumOutlineGeometry:()=>kU,Fullscreen:()=>es,FullscreenButton:()=>k8,FullscreenButtonViewModel:()=>B8,GaussianSplat3DTileContent:()=>NA,GaussianSplatPrimitive:()=>y2,GaussianSplatRenderResources:()=>h2,GaussianSplatSorter:()=>LT,GaussianSplatTextureGenerator:()=>d2,GeoJsonDataSource:()=>mb,GeoJsonLoader:()=>aL,GeoJsonPrimitive:()=>pae,GeocodeType:()=>Ib,Geocoder:()=>H8,GeocoderService:()=>pP,GeocoderViewModel:()=>j8,GeographicProjection:()=>Ui,GeographicTilingScheme:()=>er,Geometry:()=>St,Geometry3DTileContent:()=>YM,GeometryAttribute:()=>Ne,GeometryAttributes:()=>Tn,GeometryFactory:()=>xoe,GeometryInstance:()=>Ft,GeometryInstanceAttribute:()=>Qc,GeometryOffsetAttribute:()=>mn,GeometryPipeline:()=>Gn,GeometryPipelineStage:()=>hF,GeometryType:()=>Sd,GeometryUpdater:()=>Pi,GeometryUpdaterSet:()=>pE,GeometryVisualizer:()=>Xk,GetFeatureInfoFormat:()=>_m,Globe:()=>PV,GlobeDepth:()=>DV,GlobeSurfaceShaderSet:()=>yV,GlobeSurfaceTile:()=>wh,GlobeSurfaceTileProvider:()=>bV,GlobeTranslucency:()=>xV,GlobeTranslucencyFramebuffer:()=>RV,GlobeTranslucencyState:()=>OV,GltfBufferViewLoader:()=>Hv,GltfDracoLoader:()=>Gv,GltfGpmLoader:()=>qN,GltfGpmLocal:()=>gS,GltfImageLoader:()=>Wv,GltfIndexBufferLoader:()=>qv,GltfJsonLoader:()=>Xv,GltfLoader:()=>Lf,GltfLoaderUtil:()=>ju,GltfMeshPrimitiveGpmLoader:()=>$N,GltfSpzLoader:()=>fN,GltfStructuralMetadataLoader:()=>zN,GltfTextureLoader:()=>Zv,GltfVertexBufferLoader:()=>Qv,Google2DImageryProvider:()=>vF,GoogleEarthEnterpriseImageryProvider:()=>Lae,GoogleEarthEnterpriseMapsProvider:()=>AF,GoogleEarthEnterpriseMetadata:()=>oy,GoogleEarthEnterpriseTerrainData:()=>gP,GoogleEarthEnterpriseTerrainProvider:()=>Ioe,GoogleEarthEnterpriseTileInformation:()=>VU,GoogleGeocoderService:()=>Doe,GoogleMaps:()=>Ta,GoogleStreetViewCubeMapPanoramaProvider:()=>Fae,GpxDataSource:()=>rU,GregorianDate:()=>Bh,GridImageryProvider:()=>Bae,GridMaterialProperty:()=>Iw,GroundGeometryUpdater:()=>ii,GroundPolylineGeometry:()=>vx,GroundPolylinePrimitive:()=>Kh,GroundPrimitive:()=>Vl,GroupMetadata:()=>hw,HeadingPitchRange:()=>mh,HeadingPitchRoll:()=>wc,Heap:()=>uD,HeightReference:()=>We,HeightmapEncoding:()=>xh,HeightmapTerrainData:()=>jc,HeightmapTessellator:()=>oP,HermitePolynomialApproximation:()=>ck,HermiteSpline:()=>yA,HilbertOrder:()=>Uv,HomeButton:()=>W8,HomeButtonViewModel:()=>G8,HorizontalOrigin:()=>zi,HybridScreenSpacePanCameraController:()=>ble,I3SBuildingSceneLayerExplorer:()=>zle,I3SBuildingSceneLayerExplorerViewModel:()=>q8,I3SDataProvider:()=>mp,I3SDecoder:()=>MV,I3SFeature:()=>NV,I3SField:()=>LV,I3SGeometry:()=>FP,I3SLayer:()=>RC,I3SNode:()=>BP,I3SStatistics:()=>kV,I3SSublayer:()=>zV,I3SSymbology:()=>BV,I3dmLoader:()=>lL,I3dmParser:()=>cL,ITwinData:()=>Vae,ITwinPlatform:()=>la,Iau2000Orientation:()=>HU,Iau2006XysData:()=>gD,Iau2006XysSample:()=>cx,IauOrientationAxes:()=>GU,IauOrientationParameters:()=>jU,ImageBasedLighting:()=>Gx,ImageBasedLightingPipelineStage:()=>EL,ImageMaterialProperty:()=>Hy,Imagery:()=>qS,ImageryConfiguration:()=>CB,ImageryCoverage:()=>KS,ImageryFlags:()=>PF,ImageryInput:()=>RF,ImageryLayer:()=>Ss,ImageryLayerCollection:()=>XT,ImageryLayerFeatureInfo:()=>pm,ImageryPipelineStage:()=>OF,ImageryProvider:()=>kf,ImageryState:()=>Vn,Implicit3DTileContent:()=>rS,ImplicitAvailabilityBitstream:()=>Vv,ImplicitMetadataView:()=>jv,ImplicitSubdivisionScheme:()=>Gs,ImplicitSubtree:()=>Lg,ImplicitSubtreeCache:()=>Dz,ImplicitSubtreeMetadata:()=>KM,ImplicitTileCoordinates:()=>o0,ImplicitTileset:()=>r0,IndexDatatype:()=>je,InfoBox:()=>X8,InfoBoxViewModel:()=>Y8,InspectorShared:()=>Af,InstanceAttributeSemantic:()=>No,InstancingPipelineStage:()=>zL,InterpolationAlgorithm:()=>Moe,InterpolationType:()=>um,Intersect:()=>$t,IntersectionTests:()=>_i,Intersections2D:()=>np,Interval:()=>Us,InvertClassification:()=>UP,Ion:()=>Fu,IonGeocodeProviderType:()=>sy,IonGeocoderService:()=>sC,IonImageryProvider:()=>iu,IonImageryProviderFactory:()=>GS,IonResource:()=>Ho,IonSnapGeometryType:()=>Foe,IonSnapHeat:()=>Boe,IonSnapMode:()=>qU,IonSnapParentGeometryType:()=>koe,IonSnapService:()=>Uoe,IonWorldImageryStyle:()=>Zg,Iso8601:()=>tt,JobScheduler:()=>jV,JobType:()=>Oc,JsonMetadataTable:()=>Ug,JulianDate:()=>K,KTX2Transcoder:()=>OD,KeyboardEventModifier:()=>to,KeyframeNode:()=>Hr,KmlCamera:()=>oU,KmlDataSource:()=>YE,KmlLookAt:()=>sU,KmlTour:()=>aU,KmlTourFlyTo:()=>lU,KmlTourWait:()=>uU,Label:()=>IA,LabelCollection:()=>e0,LabelGraphics:()=>Jh,LabelStyle:()=>Ao,LabelVisualizer:()=>Kk,LagrangePolynomialApproximation:()=>lk,LeapSecond:()=>yr,Light:()=>Hae,LightingModel:()=>Jp,LightingPipelineStage:()=>NF,LinearApproximation:()=>YA,LinearSpline:()=>_A,MVTDataProvider:()=>qae,ManagedArray:()=>Xl,MapMode2D:()=>Au,MapProjection:()=>Voe,MapboxImageryProvider:()=>bF,MapboxStyleImageryProvider:()=>Gae,MappedPositions:()=>DF,Material:()=>Qi,MaterialAppearance:()=>Er,MaterialPipelineStage:()=>kF,MaterialProperty:()=>_o,Math:()=>D,Matrix2:()=>Xi,Matrix3:()=>$,Matrix4:()=>N,Megatexture:()=>GV,MeshPrimitiveGpmLocal:()=>KN,MetadataClass:()=>am,MetadataClassProperty:()=>Vp,MetadataComponentType:()=>Lt,MetadataEntity:()=>Yn,MetadataEnum:()=>mN,MetadataEnumValue:()=>hN,MetadataPicking:()=>WV,MetadataPickingPipelineStage:()=>Vf,MetadataPipelineStage:()=>Gd,MetadataSchema:()=>$l,MetadataSchemaLoader:()=>aA,MetadataSemantic:()=>Ud,MetadataTable:()=>Fd,MetadataTableProperty:()=>ZM,MetadataType:()=>bt,MipmapHint:()=>Pd,Model:()=>jf,Model3DTileContent:()=>Hf,ModelAlphaOptions:()=>bT,ModelAnimation:()=>mL,ModelAnimationChannel:()=>hL,ModelAnimationCollection:()=>pL,ModelAnimationLoop:()=>Hu,ModelAnimationState:()=>hm,ModelArticulation:()=>vL,ModelArticulationStage:()=>CL,ModelClippingPlanesPipelineStage:()=>IL,ModelClippingPolygonsPipelineStage:()=>RL,ModelColorPipelineStage:()=>bA,ModelComponents:()=>Cn,ModelDrawCommand:()=>pB,ModelDrawCommands:()=>yB,ModelFeature:()=>gL,ModelFeatureTable:()=>_L,ModelGraphics:()=>Tg,ModelImagery:()=>vB,ModelImageryMapping:()=>_T,ModelLightingOptions:()=>fB,ModelMatrixUpdateStage:()=>VL,ModelNode:()=>LL,ModelPrimitiveImagery:()=>yT,ModelReader:()=>ba,ModelRenderResources:()=>rB,ModelRuntimeNode:()=>HL,ModelRuntimePrimitive:()=>eB,ModelSceneGraph:()=>AB,ModelSilhouettePipelineStage:()=>aB,ModelSkin:()=>tB,ModelSplitterPipelineStage:()=>lB,ModelStatistics:()=>bB,ModelType:()=>Wo,ModelUtility:()=>xt,ModelVectorLookupPipelineStage:()=>NL,ModelVisualizer:()=>Jk,Moon:()=>YV,MorphTargetsPipelineStage:()=>zF,MorphWeightSpline:()=>Woe,MortonOrder:()=>UA,MouseButton:()=>ec,Multiple3DTileContent:()=>T2,MultisampleFramebuffer:()=>QN,NavigationHelpButton:()=>$8,NavigationHelpButtonViewModel:()=>K8,NearFarScalar:()=>qt,NeverTileDiscardPolicy:()=>Xae,NodeRenderResources:()=>uB,NodeStatisticsPipelineStage:()=>jL,NodeTransformationProperty:()=>Lx,OIT:()=>$V,Occluder:()=>YU,OffsetGeometryInstanceAttribute:()=>xr,OpenCageGeocoderService:()=>Xoe,OpenStreetMapImageryProvider:()=>hy,OrderedGroundPrimitiveCollection:()=>Ak,OrientedBoundingBox:()=>Qt,OrthographicFrustum:()=>gn,OrthographicOffCenterFrustum:()=>As,Packable:()=>Koe,PackableForInterpolation:()=>$oe,Panorama:()=>Zae,PanoramaProvider:()=>Qae,Particle:()=>jP,ParticleBurst:()=>tce,ParticleEmitter:()=>nce,ParticleSystem:()=>ice,Pass:()=>Ie,PassState:()=>Ac,PathGraphics:()=>Eg,PathMode:()=>a0,PathVisualizer:()=>t3,PeliasGeocoderService:()=>WU,PerInstanceColorAppearance:()=>yn,PerformanceDisplay:()=>my,PerformanceWatchdog:()=>Z8,PerformanceWatchdogViewModel:()=>J8,PerspectiveFrustum:()=>Ji,PerspectiveOffCenterFrustum:()=>yu,PickDepth:()=>ZV,PickDepthFramebuffer:()=>e4,PickFramebuffer:()=>n4,PickId:()=>gU,PickedMetadataInfo:()=>t4,Picking:()=>f4,PickingPipelineStage:()=>VF,PinBuilder:()=>K_,PixelDatatype:()=>ze,PixelFormat:()=>Ke,PlanarFillIdFramebuffer:()=>i4,Plane:()=>sn,PlaneGeometry:()=>Ek,PlaneGeometryUpdater:()=>vk,PlaneGraphics:()=>wM,PlaneOutlineGeometry:()=>Ck,PntsLoader:()=>TB,PntsParser:()=>TT,PointCloud:()=>h4,PointCloudEyeDomeLighting:()=>Vg,PointCloudShading:()=>Yp,PointCloudStylingPipelineStage:()=>HF,PointGraphics:()=>Bx,PointPrimitive:()=>Ia,PointPrimitiveCollection:()=>Ew,PointVisualizer:()=>i3,PolygonGeometry:()=>qp,PolygonGeometryLibrary:()=>ni,PolygonGeometryUpdater:()=>Pk,PolygonGraphics:()=>Zh,PolygonHierarchy:()=>Rc,PolygonOutlineGeometry:()=>Ik,PolygonPipeline:()=>fi,Polyline:()=>Kd,PolylineArrowMaterialProperty:()=>Dw,PolylineCollection:()=>Em,PolylineColorAppearance:()=>js,PolylineDashMaterialProperty:()=>Ow,PolylineGeometry:()=>U_,PolylineGeometryUpdater:()=>s3,PolylineGlowMaterialProperty:()=>Nw,PolylineGraphics:()=>el,PolylineMaterialAppearance:()=>cc,PolylineOutlineMaterialProperty:()=>XA,PolylinePipeline:()=>ir,PolylineVisualizer:()=>c3,PolylineVolumeGeometry:()=>Ok,PolylineVolumeGeometryLibrary:()=>Pm,PolylineVolumeGeometryUpdater:()=>Fk,PolylineVolumeGraphics:()=>kx,PolylineVolumeOutlineGeometry:()=>Lk,PositionProperty:()=>$h,PositionPropertyArray:()=>P_,PostProcessStage:()=>Ur,PostProcessStageCollection:()=>L4,PostProcessStageComposite:()=>yf,PostProcessStageLibrary:()=>_d,PostProcessStageSampleMode:()=>gd,PostProcessStageTextureCache:()=>zC,PpeMetadata:()=>XN,PpeSource:()=>wle,PpeTexture:()=>YN,Primitive:()=>On,PrimitiveCollection:()=>xl,PrimitiveLoadPlan:()=>dT,PrimitiveOutlineGenerator:()=>fT,PrimitiveOutlinePipelineStage:()=>qF,PrimitivePipeline:()=>Tx,PrimitiveRenderResources:()=>dB,PrimitiveState:()=>is,PrimitiveStatisticsPipelineStage:()=>YF,PrimitiveType:()=>Oe,ProjectionPicker:()=>ej,ProjectionPickerViewModel:()=>Q8,Property:()=>X,PropertyArray:()=>Fw,PropertyAttribute:()=>lT,PropertyAttributeProperty:()=>FN,PropertyBag:()=>ql,PropertyTable:()=>Ql,PropertyTexture:()=>zg,PropertyTextureProperty:()=>LN,ProviderViewModel:()=>uo,Proxy:()=>Zoe,QuadraticRealPolynomial:()=>Ul,QuadtreeOccluders:()=>TV,QuadtreePrimitive:()=>IV,QuadtreeTile:()=>EV,QuadtreeTileLoadState:()=>Qa,QuadtreeTileProvider:()=>Cce,QuantizedMeshTerrainData:()=>eC,QuarticRealPolynomial:()=>LD,Quaternion:()=>Le,QuaternionSpline:()=>dL,Queue:()=>dA,Ray:()=>pn,Rectangle:()=>ie,RectangleCollisionChecker:()=>_E,RectangleGeometry:()=>lE,RectangleGeometryLibrary:()=>Sa,RectangleGeometryUpdater:()=>Bk,RectangleGraphics:()=>Qh,RectangleOutlineGeometry:()=>zT,ReferenceFrame:()=>ji,ReferenceProperty:()=>D_,RenderState:()=>Ge,Renderbuffer:()=>Ff,RenderbufferFormat:()=>nu,Request:()=>wo,RequestErrorEvent:()=>wp,RequestScheduler:()=>Kc,RequestState:()=>Ti,RequestType:()=>Zs,Resource:()=>De,ResourceCache:()=>Li,ResourceCacheKey:()=>Jl,ResourceCacheStatistics:()=>_N,ResourceLoader:()=>nr,ResourceLoaderState:()=>Tt,Rotation:()=>ch,RuntimeError:()=>oe,S2Cell:()=>Pg,SDFSettings:()=>Ga,SampledPositionProperty:()=>gc,SampledProperty:()=>Jf,Sampler:()=>Ht,ScaledPositionProperty:()=>m0,Scene:()=>e8,SceneFramebuffer:()=>LC,SceneMode:()=>re,SceneMode2DPipelineStage:()=>XF,SceneModePicker:()=>nj,SceneModePickerViewModel:()=>tj,SceneTransforms:()=>dr,SceneTransitioner:()=>k4,ScreenSpaceCameraController:()=>V4,ScreenSpaceElevatorCameraController:()=>y8,ScreenSpaceEventHandler:()=>ua,ScreenSpaceEventType:()=>un,ScreenSpaceInputBindings:()=>yp,ScreenSpaceMapCameraController:()=>A8,ScreenSpaceTiltOrbitCameraController:()=>Tle,ScreenSpaceZoomCameraController:()=>Cle,SelectedFeatureIdPipelineStage:()=>EA,SelectionIndicator:()=>oj,SelectionIndicatorViewModel:()=>rj,SensorVolumePortionToDisplay:()=>zw,ShaderBuilder:()=>e_,ShaderCache:()=>_U,ShaderDestination:()=>de,ShaderFunction:()=>iB,ShaderProgram:()=>en,ShaderSource:()=>Ye,ShaderStruct:()=>nB,ShadowMap:()=>gy,ShadowMapShader:()=>pp,ShadowMode:()=>Dn,ShadowVolumeAppearance:()=>Sf,SharedContext:()=>TU,ShowGeometryInstanceAttribute:()=>Pn,Simon1994PlanetaryPositions:()=>xb,SimplePolylineGeometry:()=>lse,SingleTileImageryProvider:()=>xF,SkinningPipelineStage:()=>$F,SkyAtmosphere:()=>i8,SkyBox:()=>r8,SnapFramebuffer:()=>H4,SnapService:()=>use,Snapping:()=>W4,SpatialNode:()=>J4,Spdcf:()=>WN,SpecularEnvironmentCubeMap:()=>nm,SphereEmitter:()=>tle,SphereGeometry:()=>JU,SphereOutlineGeometry:()=>__,Spherical:()=>uk,Spline:()=>Dr,SplitDirection:()=>Vo,Splitter:()=>GP,StaticGeometryColorBatch:()=>dh,StaticGeometryPerMaterialBatch:()=>hh,StaticGroundGeometryColorBatch:()=>sI,StaticGroundGeometryPerMaterialBatch:()=>Yk,StaticGroundPolylinePerMaterialBatch:()=>a3,StaticOutlineGeometryBatch:()=>lI,StencilConstants:()=>Yt,StencilFunction:()=>ei,StencilOperation:()=>Rt,SteppedSpline:()=>fL,Stereographic:()=>al,StorageType:()=>pA,StripeMaterialProperty:()=>kw,StripeOrientation:()=>Fm,StructuralMetadata:()=>za,StyleCommandsNeeded:()=>mm,StyleExpression:()=>nle,Sun:()=>f8,SunLight:()=>Q_,SunPostProcess:()=>X4,SupportedImageFormats:()=>VN,SvgPathBindingHandler:()=>T8,Sync:()=>EU,TaskProcessor:()=>Jn,Terrain:()=>d8,TerrainData:()=>uf,TerrainEncoding:()=>Co,TerrainFillMesh:()=>MP,TerrainMesh:()=>bc,TerrainOffsetProperty:()=>Ux,TerrainPicker:()=>SU,TerrainProvider:()=>Xr,TerrainQuantization:()=>$a,TerrainState:()=>kr,Texture:()=>Dt,Texture3D:()=>CU,TextureAtlas:()=>CT,TextureCache:()=>yU,TextureMagnificationFilter:()=>Zn,TextureManager:()=>rz,TextureMinificationFilter:()=>Wt,TexturePacker:()=>QS,TextureUniform:()=>sz,TextureWrap:()=>hn,TileAvailability:()=>tp,TileBoundingRegion:()=>qf,TileBoundingS2Cell:()=>S2,TileBoundingSphere:()=>y_,TileBoundingVolume:()=>ile,TileCoordinatesImageryProvider:()=>m8,TileDiscardPolicy:()=>ole,TileEdge:()=>wn,TileImagery:()=>YS,TileMapServiceImageryProvider:()=>CA,TileMetadata:()=>b2,TileOrientedBoundingBox:()=>$u,TileProviderError:()=>Zr,TileReplacementQueue:()=>CV,TileSelectionResult:()=>pi,TileState:()=>sle,Tileset3DTileContent:()=>IB,TilesetMetadata:()=>w2,TilesetPipelineStage:()=>yL,TilingScheme:()=>dse,TimeConstants:()=>kn,TimeDynamicImagery:()=>gT,TimeDynamicPointCloud:()=>ZP,TimeInterval:()=>En,TimeIntervalCollection:()=>Ps,TimeIntervalCollectionPositionProperty:()=>R_,TimeIntervalCollectionProperty:()=>O_,TimeStandard:()=>si,Timeline:()=>cj,TimelineHighlightRange:()=>sj,TimelineTrack:()=>aj,Tipsify:()=>FD,ToggleButtonViewModel:()=>Wb,Tonemapper:()=>Ay,TrackingReferenceFrame:()=>gg,Transforms:()=>At,TranslationRotationScale:()=>Gy,TranslucentTileClassification:()=>o4,TridiagonalSystemSolver:()=>CS,TrustedServers:()=>lv,TweenCollection:()=>HC,UniformState:()=>bU,UniformType:()=>B0,UrlTemplate3DTilesDataProvider:()=>XV,UrlTemplateImageryProvider:()=>vs,VERSION:()=>D9t,VRButton:()=>fj,VRButtonViewModel:()=>uj,VRTheWorldTerrainProvider:()=>mse,VaryingType:()=>vle,Vector3DTileBatch:()=>zp,Vector3DTileClampedPolylines:()=>$B,Vector3DTileContent:()=>ZB,Vector3DTileGeometry:()=>Ig,Vector3DTilePoints:()=>HB,Vector3DTilePolygons:()=>GB,Vector3DTilePolylines:()=>RT,Vector3DTilePrimitive:()=>Kx,VectorGltf3DTileContent:()=>MA,VectorPipeline:()=>Es,VectorProvider:()=>u_,VelocityOrientationProperty:()=>dk,VelocityVectorProperty:()=>M_,VertexArray:()=>zn,VertexArrayFacade:()=>n_,VertexAttributeSemantic:()=>ct,VertexFormat:()=>Be,VerticalExaggeration:()=>Ar,VerticalExaggerationPipelineStage:()=>ZF,VerticalOrigin:()=>Hn,VideoSynchronizer:()=>hse,View:()=>BC,Viewer:()=>Xle,ViewportQuad:()=>lle,Visibility:()=>$o,Visualizer:()=>Nre,VoxelBoundsCollection:()=>ay,VoxelBoxShape:()=>pC,VoxelCell:()=>K4,VoxelContent:()=>mC,VoxelCylinderShape:()=>gC,VoxelEllipsoidShape:()=>_C,VoxelInspector:()=>hj,VoxelInspectorViewModel:()=>dj,VoxelMetadataOrder:()=>U0,VoxelPrimitive:()=>Hb,VoxelProvider:()=>fle,VoxelRenderResources:()=>Tz,VoxelShape:()=>dle,VoxelShapeType:()=>xc,VoxelTraversal:()=>Z4,VulkanConstants:()=>pse,WallGeometry:()=>Uk,WallGeometryLibrary:()=>uE,WallGeometryUpdater:()=>jk,WallGraphics:()=>Cg,WallOutlineGeometry:()=>Vk,WebGLConstants:()=>te,WebMapServiceImageryProvider:()=>EF,WebMapTileServiceImageryProvider:()=>CF,WebMercatorProjection:()=>yi,WebMercatorTilingScheme:()=>Lo,WindingOrder:()=>ea,WireframeIndexGenerator:()=>$S,WireframePipelineStage:()=>QF,_shadersAcesTonemappingStage:()=>m4,_shadersAdditiveBlend:()=>q4,_shadersAdjustTranslucentFS:()=>VP,_shadersAllMaterialAppearanceFS:()=>vD,_shadersAllMaterialAppearanceVS:()=>SD,_shadersAmbientOcclusionGenerate:()=>p4,_shadersAmbientOcclusionModulate:()=>g4,_shadersAspectRampMaterial:()=>qD,_shadersAtmosphereCommon:()=>lm,_shadersAtmosphereStageFS:()=>AL,_shadersAtmosphereStageVS:()=>bL,_shadersBasicMaterialAppearanceFS:()=>wD,_shadersBasicMaterialAppearanceVS:()=>ID,_shadersBillboardCollectionFS:()=>PB,_shadersBillboardCollectionVS:()=>DB,_shadersBlackAndWhite:()=>_4,_shadersBloomComposite:()=>y4,_shadersBrdfLutGeneratorFS:()=>ez,_shadersBrightPass:()=>Y4,_shadersBrightness:()=>A4,_shadersBufferPointMaterialFS:()=>e2,_shadersBufferPointMaterialVS:()=>QB,_shadersBufferPolygonMaterialFS:()=>CN,_shadersBufferPolygonMaterialVS:()=>EN,_shadersBufferPolylineMaterialFS:()=>o2,_shadersBufferPolylineMaterialVS:()=>r2,_shadersBumpMapMaterial:()=>YD,_shadersCPUStylingStageFS:()=>XL,_shadersCPUStylingStageVS:()=>YL,_shadersCheckerboardMaterial:()=>XD,_shadersCloudCollectionFS:()=>Lz,_shadersCloudCollectionVS:()=>Fz,_shadersCloudNoiseFS:()=>Bz,_shadersCloudNoiseVS:()=>kz,_shadersCompareAndPackTranslucentDepth:()=>r4,_shadersCompositeOITFS:()=>KV,_shadersCompositeTranslucentClassification:()=>FC,_shadersComputeIrradianceFS:()=>DN,_shadersComputeRadianceMapFS:()=>RN,_shadersConstantLodStageFS:()=>BF,_shadersConstantLodStageVS:()=>FF,_shadersContrastBias:()=>b4,_shadersConvolveSpecularMapFS:()=>ON,_shadersConvolveSpecularMapVS:()=>MN,_shadersCubeMapPanoramaVS:()=>Wz,_shadersCustomShaderStageFS:()=>JL,_shadersCustomShaderStageVS:()=>$L,_shadersCzmBuiltins:()=>bx,_shadersDepthOfField:()=>x4,_shadersDepthPlaneFS:()=>Qz,_shadersDepthPlaneVS:()=>eV,_shadersDepthView:()=>T4,_shadersDepthViewPacked:()=>Sle,_shadersDotMaterial:()=>KD,_shadersEdgeDetection:()=>E4,_shadersEdgeDetectionStageFS:()=>oF,_shadersEdgeVisibilityStageFS:()=>aF,_shadersEdgeVisibilityStageVS:()=>cF,_shadersElevationBandMaterial:()=>$D,_shadersElevationContourMaterial:()=>JD,_shadersElevationRampMaterial:()=>ZD,_shadersEllipsoidFS:()=>IP,_shadersEllipsoidSurfaceAppearanceFS:()=>aV,_shadersEllipsoidSurfaceAppearanceVS:()=>cV,_shadersEllipsoidVS:()=>PP,_shadersFXAA:()=>S4,_shadersFXAA3_11:()=>O4,_shadersFadeMaterial:()=>QD,_shadersFeatureIdStageFS:()=>ZL,_shadersFeatureIdStageVS:()=>QL,_shadersFilmicTonemapping:()=>C4,_shadersGaussianBlur1D:()=>Vb,_shadersGeometryStageFS:()=>uF,_shadersGeometryStageVS:()=>fF,_shadersGlobeFS:()=>gV,_shadersGlobeVS:()=>_V,_shadersGridMaterial:()=>e1,_shadersGroundAtmosphere:()=>DP,_shadersHSBToRGB:()=>eO,_shadersHSLToRGB:()=>tO,_shadersImageBasedLightingStageFS:()=>TL,_shadersInstancingStageCommon:()=>FL,_shadersInstancingStageVS:()=>BL,_shadersIntersectBox:()=>mz,_shadersIntersectCylinder:()=>pz,_shadersIntersectDepth:()=>dz,_shadersIntersectEllipsoid:()=>gz,_shadersIntersectLongitude:()=>xP,_shadersIntersectPlane:()=>hz,_shadersIntersection:()=>hC,_shadersIntersectionUtils:()=>fz,_shadersLegacyInstancingStageVS:()=>kL,_shadersLensFlare:()=>w4,_shadersLightingStageFS:()=>MF,_shadersMaterialStageFS:()=>LF,_shadersMegatexture:()=>xz,_shadersMetadataStageFS:()=>eF,_shadersMetadataStageVS:()=>tF,_shadersModelClippingPlanesStageFS:()=>wL,_shadersModelClippingPolygonsStageFS:()=>PL,_shadersModelClippingPolygonsStageVS:()=>DL,_shadersModelColorStageFS:()=>SL,_shadersModelFS:()=>_B,_shadersModelSilhouetteStageFS:()=>oB,_shadersModelSilhouetteStageVS:()=>sB,_shadersModelSplitterStageFS:()=>cB,_shadersModelVS:()=>gB,_shadersModelVectorLookupStageFS:()=>ML,_shadersModelVectorLookupStageVS:()=>OL,_shadersModifiedReinhardTonemapping:()=>I4,_shadersMorphTargetsStageVS:()=>UF,_shadersNightVision:()=>P4,_shadersNormalMapMaterial:()=>t1,_shadersOctree:()=>bz,_shadersPassThrough:()=>gf,_shadersPassThroughDepth:()=>Fb,_shadersPbrNeutralTonemapping:()=>v4,_shadersPerInstanceColorAppearanceFS:()=>d1,_shadersPerInstanceColorAppearanceVS:()=>h1,_shadersPerInstanceFlatColorAppearanceFS:()=>yx,_shadersPerInstanceFlatColorAppearanceVS:()=>m1,_shadersPointCloudEyeDomeLighting:()=>tL,_shadersPointCloudStylingStageVS:()=>jF,_shadersPointPrimitiveCollectionFS:()=>qA,_shadersPointPrimitiveCollectionVS:()=>ek,_shadersPolylineArrowMaterial:()=>n1,_shadersPolylineColorAppearanceVS:()=>mM,_shadersPolylineCommon:()=>Hl,_shadersPolylineDashMaterial:()=>i1,_shadersPolylineFS:()=>wx,_shadersPolylineGlowMaterial:()=>r1,_shadersPolylineMaterialAppearanceVS:()=>pM,_shadersPolylineOutlineMaterial:()=>o1,_shadersPolylineShadowVolumeFS:()=>uM,_shadersPolylineShadowVolumeMorphFS:()=>fM,_shadersPolylineShadowVolumeMorphVS:()=>dM,_shadersPolylineShadowVolumeVS:()=>hM,_shadersPolylineVS:()=>BB,_shadersPrimitiveGaussianSplatFS:()=>p2,_shadersPrimitiveGaussianSplatVS:()=>m2,_shadersPrimitiveOutlineStageFS:()=>WF,_shadersPrimitiveOutlineStageVS:()=>GF,_shadersRGBToHSB:()=>wO,_shadersRGBToHSL:()=>IO,_shadersRGBToXYZ:()=>PO,_shadersReinhardTonemapping:()=>D4,_shadersReprojectWebMercatorFS:()=>wF,_shadersReprojectWebMercatorVS:()=>IF,_shadersRimLightingMaterial:()=>s1,_shadersSelectedFeatureIdStageCommon:()=>MS,_shadersShadowVolumeAppearanceFS:()=>Sv,_shadersShadowVolumeAppearanceVS:()=>tM,_shadersShadowVolumeFS:()=>zy,_shadersSilhouette:()=>R4,_shadersSkinningStageVS:()=>KF,_shadersSkyAtmosphereCommon:()=>qP,_shadersSkyAtmosphereFS:()=>t8,_shadersSkyAtmosphereVS:()=>n8,_shadersSkyBoxFS:()=>Hz,_shadersSkyBoxVS:()=>Gz,_shadersSlopeRampMaterial:()=>a1,_shadersStripeMaterial:()=>c1,_shadersSunFS:()=>s8,_shadersSunTextureFS:()=>a8,_shadersSunVS:()=>c8,_shadersTexturedMaterialAppearanceFS:()=>PD,_shadersTexturedMaterialAppearanceVS:()=>DD,_shadersVector3DTileClampedPolylinesFS:()=>XB,_shadersVector3DTileClampedPolylinesVS:()=>YB,_shadersVector3DTilePolylinesVS:()=>WB,_shadersVectorCommon:()=>Xg,_shadersVectorTileVS:()=>kv,_shadersVerticalExaggerationStageVS:()=>JF,_shadersViewportQuadFS:()=>p8,_shadersViewportQuadVS:()=>XE,_shadersVoxelFS:()=>lz,_shadersVoxelUtils:()=>cz,_shadersVoxelVS:()=>uz,_shadersWater:()=>u1,_shadersWaterMaskMaterial:()=>l1,_shadersXYZToRGB:()=>QO,_shadersacesTonemapping:()=>gR,_shadersalphaWeight:()=>_R,_shadersantialias:()=>yR,_shadersapplyHSBShift:()=>AR,_shadersapproximateSphericalCoordinates:()=>bR,_shadersapproximateTanh:()=>xR,_shadersbackFacing:()=>TR,_shadersbranchFreeTernary:()=>ER,_shaderscascadeColor:()=>CR,_shaderscascadeDistance:()=>vR,_shaderscascadeMatrix:()=>SR,_shaderscascadeWeights:()=>wR,_shaderscolumbusViewMorph:()=>IR,_shaderscomputeAtmosphereColor:()=>PR,_shaderscomputeGroundAtmosphereScattering:()=>DR,_shaderscomputePosition:()=>RR,_shaderscomputeScattering:()=>OR,_shaderscomputeTextureTransform:()=>MR,_shadersconvertLocalToBoxUv:()=>_z,_shadersconvertLocalToCylinderUv:()=>yz,_shadersconvertLocalToEllipsoidUv:()=>Az,_shaderscosineAndSine:()=>NR,_shadersdecodeRGB8:()=>LR,_shadersdecompressTextureCoordinates:()=>FR,_shadersdegreesPerRadian:()=>b1,_shadersdepthClamp:()=>BR,_shadersdepthRange:()=>x1,_shadersdepthRangeStruct:()=>cR,_shaderseastNorthUpToEyeCoordinates:()=>kR,_shadersellipsoidContainsPoint:()=>UR,_shadersellipsoidTextureCoordinates:()=>zR,_shadersepsilon1:()=>T1,_shadersepsilon2:()=>E1,_shadersepsilon3:()=>C1,_shadersepsilon4:()=>v1,_shadersepsilon5:()=>S1,_shadersepsilon6:()=>w1,_shadersepsilon7:()=>I1,_shadersequalsEpsilon:()=>VR,_shaderseyeOffset:()=>jR,_shaderseyeToCartographicDelta:()=>HR,_shaderseyeToWindowCoordinates:()=>GR,_shadersfastApproximateAtan:()=>WR,_shadersfog:()=>qR,_shadersgammaCorrect:()=>YR,_shadersgeodeticSurfaceNormal:()=>XR,_shadersgetDefaultMaterial:()=>KR,_shadersgetDynamicAtmosphereLightDirection:()=>$R,_shadersgetLambertDiffuse:()=>JR,_shadersgetSpecular:()=>ZR,_shadersgetWaterNoise:()=>QR,_shadershue:()=>nO,_shadersinfinity:()=>P1,_shadersinverseGamma:()=>iO,_shadersisEmpty:()=>rO,_shadersisFull:()=>oO,_shaderslatitudeToWebMercatorFraction:()=>sO,_shaderslineDistance:()=>cO,_shaderslinearToSrgb:()=>aO,_shadersluminance:()=>lO,_shadersmaterial:()=>lR,_shadersmaterialInput:()=>uR,_shadersmaximumComponent:()=>uO,_shadersmetersPerPixel:()=>fO,_shadersmodelMaterial:()=>fR,_shadersmodelToWindowCoordinates:()=>dO,_shadersmodelVertexOutput:()=>dR,_shadersmultiplyWithColorBalance:()=>hO,_shadersnearFarScalar:()=>mO,_shadersoctDecode:()=>pO,_shadersoneOverPi:()=>D1,_shadersoneOverTwoPi:()=>R1,_shaderspackDepth:()=>gO,_shaderspassCesium3DTile:()=>O1,_shaderspassCesium3DTileClassification:()=>M1,_shaderspassCesium3DTileClassificationIgnoreShow:()=>N1,_shaderspassCesium3DTileEdges:()=>L1,_shaderspassCesium3DTileEdgesDirect:()=>F1,_shaderspassCesium3DTilePlanarFillId:()=>B1,_shaderspassClassification:()=>k1,_shaderspassCompute:()=>U1,_shaderspassEnvironment:()=>z1,_shaderspassGaussianSplats:()=>V1,_shaderspassGlobe:()=>j1,_shaderspassOpaque:()=>H1,_shaderspassOverlay:()=>G1,_shaderspassTerrainClassification:()=>W1,_shaderspassTranslucent:()=>q1,_shaderspassVoxels:()=>Y1,_shaderspbrLighting:()=>_O,_shaderspbrNeutralTonemapping:()=>yO,_shadersphong:()=>AO,_shaderspi:()=>X1,_shaderspiOverFour:()=>K1,_shaderspiOverSix:()=>$1,_shaderspiOverThree:()=>J1,_shaderspiOverTwo:()=>Z1,_shadersplaneDistance:()=>bO,_shaderspointAlongRay:()=>xO,_shadersradiansPerDegree:()=>Q1,_shadersray:()=>hR,_shadersrayEllipsoidIntersectionInterval:()=>TO,_shadersraySegment:()=>mR,_shadersraySphereIntersectionInterval:()=>EO,_shadersreadDepth:()=>CO,_shadersreadNonPerspective:()=>vO,_shadersreverseLogDepth:()=>SO,_shadersround:()=>DO,_shaderssaturation:()=>RO,_shaderssceneMode2D:()=>eR,_shaderssceneMode3D:()=>tR,_shaderssceneModeColumbusView:()=>nR,_shaderssceneModeMorphing:()=>iR,_shadersshadowDepthCompare:()=>OO,_shadersshadowParameters:()=>pR,_shadersshadowVisibility:()=>MO,_shaderssignNotZero:()=>NO,_shaderssolarRadius:()=>rR,_shaderssphericalHarmonics:()=>LO,_shaderssrgbToLinear:()=>FO,_shaderstangentToEyeSpaceMatrix:()=>BO,_shaderstextureCube:()=>kO,_shadersthreePiOver2:()=>oR,_shaderstransformPlane:()=>UO,_shaderstranslateRelativeToEye:()=>zO,_shaderstranslucentPhong:()=>VO,_shaderstranspose:()=>jO,_shaderstwoPi:()=>sR,_shadersunpackDepth:()=>HO,_shadersunpackFloat:()=>GO,_shadersunpackTexture:()=>WO,_shadersunpackUint:()=>qO,_shadersvalueTransform:()=>YO,_shadersvertexLogDepth:()=>XO,_shaderswebMercatorMaxLatitude:()=>aR,_shaderswindowToEyeCoordinates:()=>KO,_shaderswriteDepthClamp:()=>$O,_shaderswriteLogDepth:()=>JO,_shaderswriteNonPerspective:()=>ZO,addAllToArray:()=>ti,addBuffer:()=>aN,addDefaults:()=>eN,addExtensionsRequired:()=>rN,addExtensionsUsed:()=>Bd,addPipelineExtras:()=>iA,addToArray:()=>ga,appendForwardSlash:()=>aD,arrayRemoveDuplicates:()=>Fr,assert:()=>lX,barycentricCoordinates:()=>lx,binarySearch:()=>vr,buildModuleUrl:()=>Zt,buildVectorGltfFromMVT:()=>iz,buildVoxelCustomShader:()=>bP,buildVoxelDrawCommands:()=>Ez,clone:()=>Je,combine:()=>Ot,computeFlyToLocationForRectangle:()=>AC,createBillboardPointCallback:()=>wT,createColorRamp:()=>MU,createCommand:()=>Rn,createDefaultImageryProviderViewModels:()=>w8,createDefaultTerrainProviderViewModels:()=>I8,createElevationBandMaterial:()=>Jse,createGooglePhotorealistic3DTileset:()=>Zse,createGuid:()=>$n,createMaterialPropertyDescriptor:()=>ro,createOsmBuildingsAsync:()=>Qse,createPropertyDescriptor:()=>me,createRawPropertyDescriptor:()=>Wl,createTangentSpaceDebugPrimitive:()=>eae,createTaskProcessorWorker:()=>Ile,createUniform:()=>y1,createUniformArray:()=>A1,createVectorTileBuffersFromModelComponents:()=>u2,createWorldBathymetryAsync:()=>NU,createWorldImageryAsync:()=>Qg,createWorldTerrainAsync:()=>nC,decodeGoogleEarthEnterpriseData:()=>LU,decodeMVT:()=>Zz,decodeVectorPolylinePositions:()=>JB,defaultPickWorldPosition:()=>_p,defer:()=>Iu,defined:()=>l,demodernizeShader:()=>eM,deprecationWarning:()=>qr,destroyObject:()=>le,exportKml:()=>Iie,findAccessorMinMax:()=>rT,findContentMetadata:()=>kT,findGroupMetadata:()=>UT,findMeshoptExtension:()=>tA,findTileMetadata:()=>x2,forEachTextureInMaterial:()=>Yv,formatError:()=>Kp,freezeRenderState:()=>gX,getAbsoluteUri:()=>Td,getAccessorByteStride:()=>Vu,getBaseUri:()=>cD,getBinaryAccessor:()=>Nd,getClipAndStyleCode:()=>hV,getClippingFunction:()=>CC,getComponentReader:()=>Ng,getElement:()=>Ln,getExtensionFromUri:()=>ng,getFilenameFromUri:()=>w_,getImageFromTypedArray:()=>UU,getImagePixels:()=>kh,getJsonFromTypedArray:()=>Ro,getMagic:()=>im,getMeshPrimitives:()=>JN,getMetadataClassProperty:()=>mV,getMetadataProperty:()=>pV,getStringFromTypedArray:()=>ku,getTimestamp:()=>xn,hasExtension:()=>tr,heightReferenceOnEntityPropertyChanged:()=>vg,isBitSet:()=>Cl,isBlobUri:()=>tx,isCrossOriginUrl:()=>Dy,isDataUri:()=>Uh,isLeapYear:()=>Bl,knockout:()=>ve,knockout_3_5_1:()=>$C,knockout_es5:()=>x8,loadAndExecuteScript:()=>nx,loadCubeMap:()=>xU,loadImageFromTypedArray:()=>Mg,loadKTX2:()=>Ou,mergeSort:()=>F0,mostDetailedSurfaceHeight:()=>jh,moveTechniqueRenderStates:()=>iN,moveTechniquesToExtension:()=>oN,numberOfComponentsForType:()=>Rf,objectToQuery:()=>ix,oneTimeWarning:()=>_t,parseBatchTable:()=>Gg,parseFeatureMetadataLegacy:()=>UN,parseGlb:()=>iT,parseResponseHeaders:()=>lD,parseStructuralMetadata:()=>kN,pickModel:()=>ZS,pointInsideTriangle:()=>Joe,positionForSurfaceHeight:()=>ag,preprocess3DTileContent:()=>m_,processVoxelProperties:()=>az,queryToObject:()=>Tf,readAccessorPacked:()=>cN,removeExtension:()=>oT,removeExtensionsRequired:()=>tN,removeExtensionsUsed:()=>nT,removePipelineExtras:()=>nN,removeUnusedElements:()=>sN,renderBufferPointCollection:()=>i2,renderBufferPolygonCollection:()=>wN,renderBufferPolylineCollection:()=>c2,resizeImageToNextPowerOfTwo:()=>sA,sampleTerrain:()=>XU,sampleTerrainMostDetailed:()=>aC,scaleToGeodeticSurface:()=>ex,srgbToLinear:()=>lC,subdivideArray:()=>nM,subscribeAndEvaluate:()=>Cc,updateAccessorComponentTypes:()=>lN,updateVersion:()=>uN,usesExtension:()=>Go,viewerCesium3DTilesInspectorMixin:()=>Kle,viewerCesiumInspectorMixin:()=>$le,viewerDragDropMixin:()=>Zle,viewerPerformanceWatchdogMixin:()=>Qle,viewerVoxelInspectorMixin:()=>eue,webGLConstantToGlslType:()=>gse,wrapFunction:()=>ZU,writeTextToCanvas:()=>PT});module.exports=Fh(R9t);var Mq={};Mq.EMPTY_OBJECT=Object.freeze({});Mq.EMPTY_ARRAY=Object.freeze([]);var H=Mq;function M3e(e){return e!=null}var l=M3e;function Qb(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(Qb.prototype=Object.create(Error.prototype),Qb.prototype.constructor=Qb);Qb.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
${this.stack.toString()}`),e};Qb.throwInstantiationError=function(){throw new Qb("This function defines an interface and should not be called directly.")};var pe=Qb;var ha={};ha.typeOf={};function N3e(e){return`${e} is required, actual value was undefined`}function nv(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ha.defined=function(e,t){if(!l(t))throw new pe(N3e(e))};ha.typeOf.func=function(e,t){if(typeof t!="function")throw new pe(nv(typeof t,"function",e))};ha.typeOf.string=function(e,t){if(typeof t!="string")throw new pe(nv(typeof t,"string",e))};ha.typeOf.number=function(e,t){if(typeof t!="number")throw new pe(nv(typeof t,"number",e))};ha.typeOf.number.lessThan=function(e,t,n){if(ha.typeOf.number(e,t),t>=n)throw new pe(`Expected ${e} to be less than ${n}, actual value was ${t}`)};ha.typeOf.number.lessThanOrEquals=function(e,t,n){if(ha.typeOf.number(e,t),t>n)throw new pe(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};ha.typeOf.number.greaterThan=function(e,t,n){if(ha.typeOf.number(e,t),t<=n)throw new pe(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};ha.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ha.typeOf.number(e,t),t<n)throw new pe(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};ha.typeOf.object=function(e,t){if(typeof t!="object")throw new pe(nv(typeof t,"object",e))};ha.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new pe(nv(typeof t,"boolean",e))};ha.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new pe(nv(typeof t,"bigint",e))};ha.typeOf.number.equals=function(e,t,n,i){if(ha.typeOf.number(e,n),ha.typeOf.number(t,i),n!==i)throw new pe(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var Wr=ha;function rD(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(rD.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}});rD.prototype.addEventListener=function(e,t){let n=this,i=n._invokingListeners?n._toAdd:n._listeners;return Lq(this,i,e,t)&&n._listenerCount++,function(){n.removeEventListener(e,t)}};function Lq(e,t,n,i){t.has(n)||t.set(n,new Set);let r=t.get(n);return r.has(i)?!1:(r.add(i),!0)}rD.prototype.removeEventListener=function(e,t){let n=Nq(this,this._listeners,e,t),i=Nq(this,this._toAdd,e,t),r=n||i;return r&&this._listenerCount--,r};function Nq(e,t,n,i){let r=t.get(n);if(!r||!r.has(i))return!1;if(e._invokingListeners){if(!Lq(e,e._toRemove,n,i))return!1}else r.delete(i),r.size===0&&t.delete(n);return!0}var pj,mj;function L3e(e){pj.apply(e,mj)}function F3e(e,t){l(t)&&(pj=t,e.forEach(L3e))}rD.prototype.raiseEvent=function(){this._invokingListeners=!0;let e=pj,t=mj;mj=arguments;try{this._listeners.forEach(F3e)}finally{pj=e,mj=t}if(this._invokingListeners=!1,this._toAdd.size>0){for(let[n,i]of this._toAdd.entries())for(let r of i)Lq(this,this._listeners,n,r);this._toAdd.clear()}if(this._toRemove.size>0){for(let[n,i]of this._toRemove.entries())for(let r of i)Nq(this,this._listeners,n,r);this._toRemove.clear()}};var be=rD;function Sy(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new be,this.setValue(e)}Object.defineProperties(Sy.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});Sy.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};Sy.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=l(e),i=n&&typeof e.clone=="function",r=n&&typeof e.equals=="function";(!r||!e.equals(t))&&(this._hasClone=i,this._hasEquals=r,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};Sy.prototype.equals=function(e){return this===e||e instanceof Sy&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};Sy.prototype.valueOf=function(){return this._value};Sy.prototype.toString=function(){return String(this._value)};var li=Sy;function B3e(e,t,n,i,r){return{configurable:i,get:function(){return this[t]},set:function(o){let s=this[t],a=this[n];l(a)&&(a(),this[n]=void 0),o!==void 0&&(!l(o)||!l(o.getValue))&&l(r)&&(o=r(o)),s!==o&&(this[t]=o,this._definitionChanged.raiseEvent(this,e,o,s)),l(o)&&l(o.definitionChanged)&&(this[n]=o.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,o,o)},this))}}}function k3e(e){return new li(e)}function U3e(e,t,n){return B3e(e,`_${e.toString()}`,`_${e.toString()}Subscription`,t??!1,n??k3e)}var me=U3e;function oD(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(oD.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),image:me("image"),scale:me("scale"),pixelOffset:me("pixelOffset"),eyeOffset:me("eyeOffset"),horizontalOrigin:me("horizontalOrigin"),verticalOrigin:me("verticalOrigin"),heightReference:me("heightReference"),color:me("color"),rotation:me("rotation"),alignedAxis:me("alignedAxis"),sizeInMeters:me("sizeInMeters"),width:me("width"),height:me("height"),scaleByDistance:me("scaleByDistance"),translucencyByDistance:me("translucencyByDistance"),pixelOffsetScaleByDistance:me("pixelOffsetScaleByDistance"),imageSubRegion:me("imageSubRegion"),distanceDisplayCondition:me("distanceDisplayCondition"),disableDepthTestDistance:me("disableDepthTestDistance"),splitDirection:me("splitDirection")});oD.prototype.clone=function(e){return l(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e.splitDirection=this._splitDirection,e):new oD(this)};oD.prototype.merge=function(e){this.show=this._show??e.show,this.image=this._image??e.image,this.scale=this._scale??e.scale,this.pixelOffset=this._pixelOffset??e.pixelOffset,this.eyeOffset=this._eyeOffset??e.eyeOffset,this.horizontalOrigin=this._horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this._verticalOrigin??e.verticalOrigin,this.heightReference=this._heightReference??e.heightReference,this.color=this._color??e.color,this.rotation=this._rotation??e.rotation,this.alignedAxis=this._alignedAxis??e.alignedAxis,this.sizeInMeters=this._sizeInMeters??e.sizeInMeters,this.width=this._width??e.width,this.height=this._height??e.height,this.scaleByDistance=this._scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.imageSubRegion=this._imageSubRegion??e.imageSubRegion,this.distanceDisplayCondition=this._distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this._disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var qc=oD;var Fq=class{constructor(){this._array=[],this._hash={}}get length(){return this._array.length}get values(){return this._array}contains(t){return l(this._hash[t])}set(t,n){let i=this._hash[t];n!==i&&(this.remove(t),this._hash[t]=n,this._array.push(n))}get(t){return this._hash[t]}remove(t){let n=this._hash[t],i=l(n);if(i){let r=this._array;r.splice(r.indexOf(n),1),delete this._hash[t]}return i}removeAll(){let t=this._array;t.length>0&&(this._hash={},t.length=0)}},kt=Fq;var Bq=Qo(gj(),1);var yt={};yt.EPSILON1=.1;yt.EPSILON2=.01;yt.EPSILON3=.001;yt.EPSILON4=1e-4;yt.EPSILON5=1e-5;yt.EPSILON6=1e-6;yt.EPSILON7=1e-7;yt.EPSILON8=1e-8;yt.EPSILON9=1e-9;yt.EPSILON10=1e-10;yt.EPSILON11=1e-11;yt.EPSILON12=1e-12;yt.EPSILON13=1e-13;yt.EPSILON14=1e-14;yt.EPSILON15=1e-15;yt.EPSILON16=1e-16;yt.EPSILON17=1e-17;yt.EPSILON18=1e-18;yt.EPSILON19=1e-19;yt.EPSILON20=1e-20;yt.EPSILON21=1e-21;yt.GRAVITATIONALPARAMETER=3986004418e5;yt.SOLAR_RADIUS=6955e5;yt.LUNAR_RADIUS=1737400;yt.SIXTY_FOUR_KILOBYTES=64*1024;yt.FOUR_GIGABYTES=4*1024*1024*1024;yt.sign=Math.sign??function(t){return t=+t,t===0||t!==t?t:t>0?1:-1};yt.signNotZero=function(e){return e<0?-1:1};yt.toSNorm=function(e,t){return t=t??255,Math.round((yt.clamp(e,-1,1)*.5+.5)*t)};yt.fromSNorm=function(e,t){return t=t??255,yt.clamp(e,0,t)/t*2-1};yt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:yt.clamp((e-t)/n,0,1)};yt.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};yt.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};yt.lerp=function(e,t,n){return(1-n)*e+n*t};yt.smoothDamp=function(e,t,n,i=0,r=Number.POSITIVE_INFINITY,o=1e-4,s={}){o=Math.max(1e-4,o);let a=2/o,c=a*i,u=1/(1+c+.48*c*c+.235*c*c*c),f=r*o,d=e-t;d=yt.clamp(d,-f,f);let p=e-d,g=(n+a*d)*i;return n=(n-a*g)*u,s.value=p+(d+g)*u,s.velocity=n,s};yt.PI=Math.PI;yt.ONE_OVER_PI=1/Math.PI;yt.PI_OVER_TWO=Math.PI/2;yt.PI_OVER_THREE=Math.PI/3;yt.PI_OVER_FOUR=Math.PI/4;yt.PI_OVER_SIX=Math.PI/6;yt.THREE_PI_OVER_TWO=3*Math.PI/2;yt.TWO_PI=2*Math.PI;yt.ONE_OVER_TWO_PI=1/(2*Math.PI);yt.RADIANS_PER_DEGREE=Math.PI/180;yt.DEGREES_PER_RADIAN=180/Math.PI;yt.RADIANS_PER_ARCSECOND=yt.RADIANS_PER_DEGREE/3600;yt.toRadians=function(e){return e*yt.RADIANS_PER_DEGREE};yt.toDegrees=function(e){return e*yt.DEGREES_PER_RADIAN};yt.convertLongitudeRange=function(e){let t=yt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};yt.clampToLatitudeRange=function(e){return yt.clamp(e,-1*yt.PI_OVER_TWO,yt.PI_OVER_TWO)};yt.negativePiToPi=function(e){return e>=-yt.PI&&e<=yt.PI?e:yt.zeroToTwoPi(e+yt.PI)-yt.PI};yt.zeroToTwoPi=function(e){if(e>=0&&e<=yt.TWO_PI)return e;let t=yt.mod(e,yt.TWO_PI);return Math.abs(t)<yt.EPSILON14&&Math.abs(e)>yt.EPSILON14?yt.TWO_PI:t};yt.mod=function(e,t){return yt.sign(e)===yt.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};yt.equalsEpsilon=function(e,t,n,i){n=n??0,i=i??n;let r=Math.abs(e-t);return r<=i||r<=n*Math.max(Math.abs(e),Math.abs(t))};yt.lessThan=function(e,t,n){return e-t<-n};yt.lessThanOrEquals=function(e,t,n){return e-t<n};yt.greaterThan=function(e,t,n){return e-t>n};yt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var _j=[1];yt.factorial=function(e){let t=_j.length;if(e>=t){let n=_j[t-1];for(let i=t;i<=e;i++){let r=n*i;_j.push(r),n=r}}return _j[e]};yt.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};yt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};yt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};yt.previousPowerOfTwo=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};yt.clamp=function(e,t,n){return e<t?t:e>n?n:e};var iue=new Bq.default;yt.setRandomNumberSeed=function(e){iue=new Bq.default(e)};yt.nextRandomNumber=function(){return iue.random()};yt.randomBetween=function(e,t){return yt.nextRandomNumber()*(t-e)+e};yt.acosClamped=function(e){return Math.acos(yt.clamp(e,-1,1))};yt.asinClamped=function(e){return Math.asin(yt.clamp(e,-1,1))};yt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};yt.logBase=function(e,t){return Math.log(e)/Math.log(t)};yt.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};yt.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};yt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};yt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};yt.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let r=Math.max(i,n);n=Math.min(i,n);let o=n/r;return i=yt.fastApproximateAtan(o),i=Math.abs(t)>Math.abs(e)?yt.PI_OVER_TWO-i:i,i=e<0?yt.PI-i:i,i=t<0?-i:i,i};var D=yt;var ms=class e{constructor(t,n){this.x=t??0,this.y=n??0}static fromElements(t,n,i){return l(i)?(i.x=t,i.y=n,i):new e(t,n)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n):new e(t.x,t.y)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i]=t.y,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n],i}static packArray(t,n){let i=t.length,r=i*2;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*2);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/2:n=new Array(i/2);for(let r=0;r<i;r+=2){let o=r/2;n[o]=e.unpack(t,r,n[o])}return n}static maximumComponent(t){return Math.max(t.x,t.y)}static minimumComponent(t){return Math.min(t.x,t.y)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i}static clamp(t,n,i,r){let o=D.clamp(t.x,n.x,i.x),s=D.clamp(t.y,n.y,i.y);return r.x=o,r.y=s,r}static magnitudeSquared(t){return t.x*t.x+t.y*t.y}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,yj),e.magnitude(yj)}static distanceSquared(t,n){return e.subtract(t,n,yj),e.magnitudeSquared(yj)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n}static dot(t,n){return t.x*n.x+t.y*n.y}static cross(t,n){return t.x*n.y-t.y*n.x}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n}static lerp(t,n,i,r){return e.multiplyByScalar(n,i,rue),r=e.multiplyByScalar(t,1-i,r),e.add(rue,r,r)}static angleBetween(t,n){return e.normalize(t,oue),e.normalize(n,sue),D.acosClamped(e.dot(oue,sue))}static mostOrthogonalAxis(t,n){let i=e.normalize(t,z3e);return e.abs(i,i),i.x<=i.y?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Y,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]}static equalsEpsilon(t,n,i,r){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,r)&&D.equalsEpsilon(t.y,n.y,i,r)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y})`}};ms.fromCartesian3=ms.clone;ms.fromCartesian4=ms.clone;ms.packedLength=2;ms.fromArray=ms.unpack;var yj=new ms,rue=new ms,oue=new ms,sue=new ms,z3e=new ms;ms.ZERO=Object.freeze(new ms(0,0));ms.ONE=Object.freeze(new ms(1,1));ms.UNIT_X=Object.freeze(new ms(1,0));ms.UNIT_Y=Object.freeze(new ms(0,1));var U=ms;var po=class e{constructor(t,n,i){this.x=t??0,this.y=n??0,this.z=i??0}static fromSpherical(t,n){l(n)||(n=new e);let i=t.clock,r=t.cone,o=t.magnitude??1,s=o*Math.sin(r);return n.x=s*Math.cos(i),n.y=s*Math.sin(i),n.z=o*Math.cos(r),n}static fromElements(t,n,i,r){return l(r)?(r.x=t,r.y=n,r.z=i,r):new e(t,n,i)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new e(t.x,t.y,t.z)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i]=t.z,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n],i}static packArray(t,n){let i=t.length,r=i*3;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*3);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/3:n=new Array(i/3);for(let r=0;r<i;r+=3){let o=r/3;n[o]=e.unpack(t,r,n[o])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z)}static minimumComponent(t){return Math.min(t.x,t.y,t.z)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i}static clamp(t,n,i,r){let o=D.clamp(t.x,n.x,i.x),s=D.clamp(t.y,n.y,i.y),a=D.clamp(t.z,n.z,i.z);return r.x=o,r.y=s,r.z=a,r}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,Aj),e.magnitude(Aj)}static distanceSquared(t,n){return e.subtract(t,n,Aj),e.magnitudeSquared(Aj)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n}static lerp(t,n,i,r){return e.multiplyByScalar(n,i,aue),r=e.multiplyByScalar(t,1-i,r),e.add(aue,r,r)}static angleBetween(t,n){e.normalize(t,bj),e.normalize(n,kq);let i=e.dot(bj,kq),r=e.magnitude(e.cross(bj,kq,bj));return Math.atan2(r,i)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,V3e);return e.abs(i,i),i.x<=i.y?i.x<=i.z?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Z,n):i.y<=i.z?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_Z,n),n}static projectVector(t,n,i){let r=e.dot(t,n)/e.dot(n,n);return e.multiplyByScalar(n,r,i)}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]}static equalsEpsilon(t,n,i,r){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,r)&&D.equalsEpsilon(t.y,n.y,i,r)&&D.equalsEpsilon(t.z,n.z,i,r)}static cross(t,n,i){let r=t.x,o=t.y,s=t.z,a=n.x,c=n.y,u=n.z,f=o*u-s*c,d=s*a-r*u,p=r*c-o*a;return i.x=f,i.y=d,i.z=p,i}static midpoint(t,n,i){return i.x=(t.x+n.x)*.5,i.y=(t.y+n.y)*.5,i.z=(t.z+n.z)*.5,i}static fromDegrees(t,n,i,r,o){return t=D.toRadians(t),n=D.toRadians(n),e.fromRadians(t,n,i,r,o)}static fromRadians(t,n,i,r,o){i=i??0;let s=l(r)?r.radiiSquared:e._ellipsoidRadiiSquared,a=Math.cos(n);xd.x=a*Math.cos(t),xd.y=a*Math.sin(t),xd.z=Math.sin(n),xd=e.normalize(xd,xd),e.multiplyComponents(s,xd,iv);let c=Math.sqrt(e.dot(xd,iv));return iv=e.divideByScalar(iv,c,iv),xd=e.multiplyByScalar(xd,i,xd),l(o)||(o=new e),e.add(iv,xd,o)}static fromDegreesArray(t,n,i){let r=t.length;l(i)?i.length=r/2:i=new Array(r/2);for(let o=0;o<r;o+=2){let s=t[o],a=t[o+1],c=o/2;i[c]=e.fromDegrees(s,a,0,n,i[c])}return i}static fromRadiansArray(t,n,i){let r=t.length;l(i)?i.length=r/2:i=new Array(r/2);for(let o=0;o<r;o+=2){let s=t[o],a=t[o+1],c=o/2;i[c]=e.fromRadians(s,a,0,n,i[c])}return i}static fromDegreesArrayHeights(t,n,i){let r=t.length;l(i)?i.length=r/3:i=new Array(r/3);for(let o=0;o<r;o+=3){let s=t[o],a=t[o+1],c=t[o+2],u=o/3;i[u]=e.fromDegrees(s,a,c,n,i[u])}return i}static fromRadiansArrayHeights(t,n,i){let r=t.length;l(i)?i.length=r/3:i=new Array(r/3);for(let o=0;o<r;o+=3){let s=t[o],a=t[o+1],c=t[o+2],u=o/3;i[u]=e.fromRadians(s,a,c,n,i[u])}return i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z})`}};po.fromCartesian4=po.clone;po.packedLength=3;po.fromArray=po.unpack;var Aj=new po,aue=new po,bj=new po,kq=new po,V3e=new po,xd=new po,iv=new po;po._ellipsoidRadiiSquared=new po(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);po.ZERO=Object.freeze(new po(0,0,0));po.ONE=Object.freeze(new po(1,1,1));po.UNIT_X=Object.freeze(new po(1,0,0));po.UNIT_Y=Object.freeze(new po(0,1,0));po.UNIT_Z=Object.freeze(new po(0,0,1));var h=po;var j3e=new h,H3e=new h;function G3e(e,t,n,i,r){let o=e.x,s=e.y,a=e.z,c=t.x,u=t.y,f=t.z,d=o*o*c*c,p=s*s*u*u,g=a*a*f*f,m=d+p+g,y=Math.sqrt(1/m),A=h.multiplyByScalar(e,y,j3e);if(m<i)return isFinite(y)?h.clone(A,r):void 0;let b=n.x,x=n.y,T=n.z,E=H3e;E.x=A.x*b*2,E.y=A.y*x*2,E.z=A.z*T*2;let v=(1-y)*h.magnitude(e)/(.5*h.magnitude(E)),S=0,I,R,O,L,_,C,w,P,M,F,V;do{v-=S,O=1/(1+v*b),L=1/(1+v*x),_=1/(1+v*T),C=O*O,w=L*L,P=_*_,M=C*O,F=w*L,V=P*_,I=d*C+p*w+g*P-1,R=d*M*b+p*F*x+g*V*T;let B=-2*R;S=I/B}while(Math.abs(I)>D.EPSILON12);return l(r)?(r.x=o*O,r.y=s*L,r.z=a*_,r):new h(o*O,s*L,a*_)}var ex=G3e;var Ll=class Ll{constructor(t,n,i){this.longitude=t??0,this.latitude=n??0,this.height=i??0}static fromRadians(t,n,i,r){return i=i??0,l(r)?(r.longitude=t,r.latitude=n,r.height=i,r):new Ll(t,n,i)}static fromDegrees(t,n,i,r){return t=D.toRadians(t),n=D.toRadians(n),Ll.fromRadians(t,n,i,r)}static fromCartesian(t,n,i){let r=l(n)?n.oneOverRadii:Ll._ellipsoidOneOverRadii,o=l(n)?n.oneOverRadiiSquared:Ll._ellipsoidOneOverRadiiSquared,s=l(n)?n._centerToleranceSquared:Ll._ellipsoidCenterToleranceSquared,a=ex(t,r,o,s,q3e);if(!l(a))return;let c=h.multiplyComponents(a,o,W3e);c=h.normalize(c,c);let u=h.subtract(t,a,Y3e),f=Math.atan2(c.y,c.x),d=Math.asin(c.z),p=D.sign(h.dot(u,t))*h.magnitude(u);return l(i)?(i.longitude=f,i.latitude=d,i.height=p,i):new Ll(f,d,p)}static toCartesian(t,n,i){return h.fromRadians(t.longitude,t.latitude,t.height,n,i)}static clone(t,n){if(l(t))return l(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new Ll(t.longitude,t.latitude,t.height)}static equals(t,n){return t===n||l(t)&&l(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.longitude-n.longitude)<=i&&Math.abs(t.latitude-n.latitude)<=i&&Math.abs(t.height-n.height)<=i}clone(t){return Ll.clone(this,t)}equals(t){return Ll.equals(this,t)}equalsEpsilon(t,n){return Ll.equalsEpsilon(this,t,n)}toString(){return`(${this.longitude}, ${this.latitude}, ${this.height})`}};ut(Ll,"_ellipsoidOneOverRadii",new h(1/6378137,1/6378137,1/6356752314245179e-9)),ut(Ll,"_ellipsoidOneOverRadiiSquared",new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9))),ut(Ll,"_ellipsoidCenterToleranceSquared",D.EPSILON1);var sD=Ll;sD.ZERO=Object.freeze(new sD(0,0,0));var W3e=new h,q3e=new h,Y3e=new h,he=sD;function cue(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=D.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}var Fl=class e{constructor(t,n,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,cue(this,t,n,i)}get radii(){return this._radii}get radiiSquared(){return this._radiiSquared}get radiiToTheFourth(){return this._radiiToTheFourth}get oneOverRadii(){return this._oneOverRadii}get oneOverRadiiSquared(){return this._oneOverRadiiSquared}get minimumRadius(){return this._minimumRadius}get maximumRadius(){return this._maximumRadius}static clone(t,n){if(!l(t))return;let i=t._radii;return l(n)?(h.clone(i,n._radii),h.clone(t._radiiSquared,n._radiiSquared),h.clone(t._radiiToTheFourth,n._radiiToTheFourth),h.clone(t._oneOverRadii,n._oneOverRadii),h.clone(t._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=t._minimumRadius,n._maximumRadius=t._maximumRadius,n._centerToleranceSquared=t._centerToleranceSquared,n):new e(i.x,i.y,i.z)}static fromCartesian3(t,n){return l(n)||(n=new e),l(t)&&cue(n,t.x,t.y,t.z),n}static get default(){return e._default}static set default(t){e._default=t,h._ellipsoidRadiiSquared=t.radiiSquared,he._ellipsoidOneOverRadii=t.oneOverRadii,he._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,he._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}clone(t){return e.clone(this,t)}static pack(t,n,i){return i=i??0,h.pack(t._radii,n,i),n}static unpack(t,n,i){n=n??0;let r=h.unpack(t,n);return e.fromCartesian3(r,i)}geodeticSurfaceNormalCartographic(t,n){let i=t.longitude,r=t.latitude,o=Math.cos(r),s=o*Math.cos(i),a=o*Math.sin(i),c=Math.sin(r);return l(n)||(n=new h),n.x=s,n.y=a,n.z=c,h.normalize(n,n)}geodeticSurfaceNormal(t,n){if(!h.equalsEpsilon(t,h.ZERO,D.EPSILON14))return l(n)||(n=new h),n=h.multiplyComponents(t,this._oneOverRadiiSquared,n),h.normalize(n,n)}cartographicToCartesian(t,n){let i=X3e,r=K3e;this.geodeticSurfaceNormalCartographic(t,i),h.multiplyComponents(this._radiiSquared,i,r);let o=Math.sqrt(h.dot(i,r));return h.divideByScalar(r,o,r),h.multiplyByScalar(i,t.height,i),l(n)||(n=new h),h.add(r,i,n)}cartographicArrayToCartesianArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let r=0;r<i;r++)n[r]=this.cartographicToCartesian(t[r],n[r]);return n}cartesianToCartographic(t,n){let i=this.scaleToGeodeticSurface(t,J3e);if(!l(i))return;let r=this.geodeticSurfaceNormal(i,$3e),o=h.subtract(t,i,Z3e),s=Math.atan2(r.y,r.x),a=Math.asin(r.z),c=D.sign(h.dot(o,t))*h.magnitude(o);return l(n)?(n.longitude=s,n.latitude=a,n.height=c,n):new he(s,a,c)}cartesianArrayToCartographicArray(t,n){let i=t.length;l(n)?n.length=i:n=new Array(i);for(let r=0;r<i;++r)n[r]=this.cartesianToCartographic(t[r],n[r]);return n}scaleToGeodeticSurface(t,n){return ex(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,n)}scaleToGeocentricSurface(t,n){l(n)||(n=new h);let i=t.x,r=t.y,o=t.z,s=this._oneOverRadiiSquared,a=1/Math.sqrt(i*i*s.x+r*r*s.y+o*o*s.z);return h.multiplyByScalar(t,a,n)}transformPositionToScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._oneOverRadii,n)}transformPositionFromScaledSpace(t,n){return l(n)||(n=new h),h.multiplyComponents(t,this._radii,n)}equals(t){return this===t||l(t)&&h.equals(this._radii,t._radii)}toString(){return this._radii.toString()}getSurfaceNormalIntersectionWithZAxis(t,n,i){n=n??0;let r=this._squaredXOverSquaredZ;if(l(i)||(i=new h),i.x=0,i.y=0,i.z=t.z*(1-r),!(Math.abs(i.z)>=this._radii.z-n))return i}getLocalCurvature(t,n){l(n)||(n=new U);let i=this.getSurfaceNormalIntersectionWithZAxis(t,0,Q3e),r=h.distance(t,i),o=this.minimumRadius*r/this.maximumRadius**2,s=r*o**2;return U.fromElements(1/r,1/s,n)}surfaceArea(t){let n=t.west,i=t.east,r=t.south,o=t.north;for(;i<n;)i+=D.TWO_PI;let s=this._radiiSquared,a=s.x,c=s.y,u=s.z,f=a*c;return lue(r,o,function(d){let p=Math.cos(d),g=Math.sin(d);return Math.cos(d)*lue(n,i,function(m){let y=Math.cos(m),A=Math.sin(m);return Math.sqrt(f*g*g+u*(c*y*y+a*A*A)*p*p)})})}};Fl.WGS84=Object.freeze(new Fl(6378137,6378137,6356752314245179e-9));Fl.UNIT_SPHERE=Object.freeze(new Fl(1,1,1));Fl.MOON=Object.freeze(new Fl(D.LUNAR_RADIUS,D.LUNAR_RADIUS,D.LUNAR_RADIUS));Fl.MARS=Object.freeze(new Fl(3396190,3396190,3376200));Fl._default=Fl.WGS84;Fl.packedLength=h.packedLength;Fl.prototype.geocentricSurfaceNormal=h.normalize;var X3e=new h,K3e=new h,$3e=new h,J3e=new h,Z3e=new h,Q3e=new h,eUe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],tUe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function lue(e,t,n){let i=.5*(t+e),r=.5*(t-e),o=0;for(let s=0;s<5;s++){let a=r*eUe[s];o+=tUe[s]*(n(i+a)+n(i-a))}return o*=r,o}var ee=Fl;var Uq=class{constructor(t){this._ellipsoid=t??ee.default,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}project(t,n){let i=this._semimajorAxis,r=t.longitude*i,o=t.latitude*i,s=t.height;return l(n)?(n.x=r,n.y=o,n.z=s,n):new h(r,o,s)}unproject(t,n){let i=this._oneOverSemimajorAxis,r=t.x*i,o=t.y*i,s=t.z;return l(n)?(n.longitude=r,n.latitude=o,n.height=s,n):new he(r,o,s)}},Ui=Uq;var uue={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};Object.freeze(uue);var $t=uue;var Js=class e{constructor(t,n,i,r){this.x=t??0,this.y=n??0,this.z=i??0,this.w=r??0}static fromElements(t,n,i,r,o){return l(o)?(o.x=t,o.y=n,o.z=i,o.w=r,o):new e(t,n,i,r)}static fromColor(t,n){return l(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static clone(t,n){if(l(t))return l(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new e(t.x,t.y,t.z,t.w)}static pack(t,n,i){return i=i??0,n[i++]=t.x,n[i++]=t.y,n[i++]=t.z,n[i]=t.w,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.x=t[n++],i.y=t[n++],i.z=t[n++],i.w=t[n],i}static packArray(t,n){let i=t.length,r=i*4;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*4);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/4:n=new Array(i/4);for(let r=0;r<i;r+=4){let o=r/4;n[o]=e.unpack(t,r,n[o])}return n}static maximumComponent(t){return Math.max(t.x,t.y,t.z,t.w)}static minimumComponent(t){return Math.min(t.x,t.y,t.z,t.w)}static minimumByComponent(t,n,i){return i.x=Math.min(t.x,n.x),i.y=Math.min(t.y,n.y),i.z=Math.min(t.z,n.z),i.w=Math.min(t.w,n.w),i}static maximumByComponent(t,n,i){return i.x=Math.max(t.x,n.x),i.y=Math.max(t.y,n.y),i.z=Math.max(t.z,n.z),i.w=Math.max(t.w,n.w),i}static clamp(t,n,i,r){let o=D.clamp(t.x,n.x,i.x),s=D.clamp(t.y,n.y,i.y),a=D.clamp(t.z,n.z,i.z),c=D.clamp(t.w,n.w,i.w);return r.x=o,r.y=s,r.z=a,r.w=c,r}static magnitudeSquared(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w}static magnitude(t){return Math.sqrt(e.magnitudeSquared(t))}static distance(t,n){return e.subtract(t,n,xj),e.magnitude(xj)}static distanceSquared(t,n){return e.subtract(t,n,xj),e.magnitudeSquared(xj)}static normalize(t,n){let i=e.magnitude(t);return n.x=t.x/i,n.y=t.y/i,n.z=t.z/i,n.w=t.w/i,n}static dot(t,n){return t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w}static multiplyComponents(t,n,i){return i.x=t.x*n.x,i.y=t.y*n.y,i.z=t.z*n.z,i.w=t.w*n.w,i}static divideComponents(t,n,i){return i.x=t.x/n.x,i.y=t.y/n.y,i.z=t.z/n.z,i.w=t.w/n.w,i}static add(t,n,i){return i.x=t.x+n.x,i.y=t.y+n.y,i.z=t.z+n.z,i.w=t.w+n.w,i}static subtract(t,n,i){return i.x=t.x-n.x,i.y=t.y-n.y,i.z=t.z-n.z,i.w=t.w-n.w,i}static multiplyByScalar(t,n,i){return i.x=t.x*n,i.y=t.y*n,i.z=t.z*n,i.w=t.w*n,i}static divideByScalar(t,n,i){return i.x=t.x/n,i.y=t.y/n,i.z=t.z/n,i.w=t.w/n,i}static negate(t,n){return n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n}static abs(t,n){return n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n.w=Math.abs(t.w),n}static lerp(t,n,i,r){return e.multiplyByScalar(n,i,fue),r=e.multiplyByScalar(t,1-i,r),e.add(fue,r,r)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,nUe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?i.x<=i.w?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n):i.y<=i.z?i.y<=i.w?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_W,n):i.z<=i.w?n=e.clone(e.UNIT_Z,n):n=e.clone(e.UNIT_W,n),n}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]&&t.w===n[i+3]}static equalsEpsilon(t,n,i,r){return t===n||l(t)&&l(n)&&D.equalsEpsilon(t.x,n.x,i,r)&&D.equalsEpsilon(t.y,n.y,i,r)&&D.equalsEpsilon(t.z,n.z,i,r)&&D.equalsEpsilon(t.w,n.w,i,r)}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n,i){return e.equalsEpsilon(this,t,n,i)}toString(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`}static packFloat(t,n){return l(n)||(n=new e),zq[0]=t,due?(n.x=Yc[0],n.y=Yc[1],n.z=Yc[2],n.w=Yc[3]):(n.x=Yc[3],n.y=Yc[2],n.z=Yc[1],n.w=Yc[0]),n}static unpackFloat(t){return due?(Yc[0]=t.x,Yc[1]=t.y,Yc[2]=t.z,Yc[3]=t.w):(Yc[0]=t.w,Yc[1]=t.z,Yc[2]=t.y,Yc[3]=t.x),zq[0]}};Js.packedLength=4;Js.fromArray=Js.unpack;var xj=new Js,fue=new Js,nUe=new Js;Js.ZERO=Object.freeze(new Js(0,0,0,0));Js.ONE=Object.freeze(new Js(1,1,1,1));Js.UNIT_X=Object.freeze(new Js(1,0,0,0));Js.UNIT_Y=Object.freeze(new Js(0,1,0,0));Js.UNIT_Z=Object.freeze(new Js(0,0,1,0));Js.UNIT_W=Object.freeze(new Js(0,0,0,1));var zq=new Float32Array(1),Yc=new Uint8Array(zq.buffer),iUe=new Uint32Array([287454020]),rUe=new Uint8Array(iUe.buffer),due=rUe[0]===68,se=Js;function oUe(e,t,n){let i=0,r=e.length-1,o,s;for(;i<=r;){if(o=~~((i+r)/2),s=n(e[o],t),s<0){i=o+1;continue}if(s>0){r=o-1;continue}return o}return~(r+1)}var vr=oUe;function sUe(e,t,n,i,r){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=r}var wy=sUe;function aUe(e){return e%4===0&&e%100!==0||e%400===0}var Bl=aUe;var hue=[31,28,31,30,31,30,31,31,30,31,30,31];function cUe(e,t,n,i,r,o,s,a){e=e??1,t=t??1,n=n??1,i=i??0,r=r??0,o=o??0,s=s??0,a=a??!1,this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=r,this.second=o,this.millisecond=s,this.isLeapSecond=a;function y(){Wr.typeOf.number.greaterThanOrEquals("Year",e,1),Wr.typeOf.number.lessThanOrEquals("Year",e,9999),Wr.typeOf.number.greaterThanOrEquals("Month",t,1),Wr.typeOf.number.lessThanOrEquals("Month",t,12),Wr.typeOf.number.greaterThanOrEquals("Day",n,1),Wr.typeOf.number.lessThanOrEquals("Day",n,31),Wr.typeOf.number.greaterThanOrEquals("Hour",i,0),Wr.typeOf.number.lessThanOrEquals("Hour",i,23),Wr.typeOf.number.greaterThanOrEquals("Minute",r,0),Wr.typeOf.number.lessThanOrEquals("Minute",r,59),Wr.typeOf.bool("IsLeapSecond",a),Wr.typeOf.number.greaterThanOrEquals("Second",o,0),Wr.typeOf.number.lessThanOrEquals("Second",o,a?60:59),Wr.typeOf.number.greaterThanOrEquals("Millisecond",s,0),Wr.typeOf.number.lessThan("Millisecond",s,1e3)}function A(){let b=t===2&&Bl(e)?hue[t-1]+1:hue[t-1];if(n>b)throw new pe("Month and Day represents invalid date")}}var Bh=cUe;function lUe(e,t){this.julianDate=e,this.offset=t}var yr=lUe;var mue={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1};Object.freeze(mue);var kn=mue;var pue={UTC:0,TAI:1};Object.freeze(pue);var si=pue;var gue=new Bh,Ej=[31,28,31,30,31,30,31,31,30,31,30,31],Cj=29;function jq(e,t){return mi.compare(e.julianDate,t.julianDate)}var rv=new yr;function vj(e){rv.julianDate=e;let t=mi.leapSeconds,n=vr(t,rv,jq);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&mi.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),mi.addSeconds(e,i,e)}function _ue(e,t){rv.julianDate=e;let n=mi.leapSeconds,i=vr(n,rv,jq);if(i<0&&(i=~i),i===0)return mi.addSeconds(e,-n[0].offset,t);if(i>=n.length)return mi.addSeconds(e,-n[i-1].offset,t);let r=mi.secondsDifference(n[i].julianDate,e);if(r===0)return mi.addSeconds(e,-n[i].offset,t);if(!(r<=1))return mi.addSeconds(e,-n[i-1].offset,t)}function Iy(e,t,n){let i=t/kn.SECONDS_PER_DAY|0;return e+=i,t-=kn.SECONDS_PER_DAY*i,t<0&&(e--,t+=kn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function Vq(e,t,n,i,r,o,s){let a=(t-14)/12|0,c=e+4800+a,u=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=o+(i*kn.SECONDS_PER_HOUR+r*kn.SECONDS_PER_MINUTE+s*kn.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var uUe=/^(\d{4})$/,fUe=/^(\d{4})-(\d{2})$/,dUe=/^(\d{4})-?(\d{3})$/,hUe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,mUe=/^(\d{4})-?(\d{2})-?(\d{2})$/,Hq=/([Z+\-])?(\d{2})?:?(\d{2})?$/,pUe=/^(\d{2})(\.\d+)?/.source+Hq.source,gUe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Hq.source,_Ue=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Hq.source;var Py={year:0,month:0,day:0,hour:0,minute:0,second:0,millisecond:0},yUe=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13,1e14,1e15];function tg(e,t){let n=e.charCodeAt(t)-48,i=e.charCodeAt(t+1)-48;return n<0||n>9||i<0||i>9?-1:n*10+i}var yue=NaN,Aue=0;function bue(e,t,n,i,r,o,s){Py.year=e,Py.month=t,Py.day=n,Py.hour=i,Py.minute=r,Py.second=o,Py.millisecond=s}function AUe(e){let t=e.length;if(t===4){let m=tg(e,0),y=tg(e,2);return m<0||y<0?!1:(bue(m*100+y,1,1,0,0,0,0),!0)}let n=e.charCodeAt(t-1)===90,i=n?t-1:t;if(i<19||e.charCodeAt(4)!==45||e.charCodeAt(7)!==45||e.charCodeAt(10)!==84||e.charCodeAt(13)!==58||e.charCodeAt(16)!==58)return!1;let r=tg(e,0),o=tg(e,2),s=tg(e,5),a=tg(e,8),c=tg(e,11),u=tg(e,14),f=tg(e,17);if(r<0||o<0||s<1||s>12||a<1||a>31||c<0||c>23||u<0||u>59||f<0||f>60)return!1;let d=0;if(i>19){let m=e.charCodeAt(19),y=i-20;if(m!==46&&m!==44||y<1||y>15)return!1;let A=0;for(let b=20;b<i;b++){let x=e.charCodeAt(b)-48;if(x<0||x>9)return!1;A=A*10+x}d=A/yUe[y]*1e3}let p=r*100+o,g=Bl(p);if((s!==2||!g?Ej[s-1]:Cj)<a)return!1;if(!n){let m=Date.UTC(p,s-1,a,c,u);m!==yue&&(yue=m,Aue=new Date(m).getTimezoneOffset()),u=u+Aue}return bue(p,s,a,c,u,f,d),!0}function xue(e,t,n,i,r,o,s,a,c){let u,f=o===60;for(f&&o--;r>=60;)r-=60,i++;for(;i>=24;)i-=24,n++;for(u=a&&t===2?Cj:Ej[t-1];n>u;)n-=u,t++,t>12&&(t-=12,e++),u=a&&t===2?Cj:Ej[t-1];for(;r<0;)r+=60,i--;for(;i<0;)i+=24,n--;for(;n<1;)t--,t<1&&(t+=12,e--),u=a&&t===2?Cj:Ej[t-1],n+=u;let d=Vq(e,t,n,i,r,o,s);return l(c)?(Iy(d[0],d[1],c),vj(c)):c=new mi(d[0],d[1],si.UTC),f&&mi.addSeconds(c,1,c),c}var mi=class e{constructor(t,n,i){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,i=i??si.UTC;let r=t|0;n=n+(t-r)*kn.SECONDS_PER_DAY,Iy(r,n,this),i===si.UTC&&vj(this)}static fromGregorianDate(t,n){let i=Vq(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return l(n)?(Iy(i[0],i[1],n),vj(n),n):new e(i[0],i[1],si.UTC)}static fromDate(t,n){let i=Vq(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return l(n)?(Iy(i[0],i[1],n),vj(n),n):new e(i[0],i[1],si.UTC)}static fromIso8601(t,n){if(AUe(t)){let A=Py;return xue(A.year,A.month,A.day,A.hour,A.minute,A.second,A.millisecond,Bl(A.year),n)}t=t.replace(",",".");let i=t.split("T"),r,o=1,s=1,a=0,c=0,u=0,f=0,d=i[0],p=i[1],g,m;if(i=d.match(mUe),i!==null)r=+i[1],o=+i[2],s=+i[3];else if(i=d.match(fUe),i!==null)r=+i[1],o=+i[2];else if(i=d.match(uUe),i!==null)r=+i[1];else{let A;if(i=d.match(dUe),i!==null)r=+i[1],A=+i[2],m=Bl(r);else if(i=d.match(hUe),i!==null){r=+i[1];let b=+i[2],x=+i[3]||0,T=new Date(Date.UTC(r,0,4));A=b*7+x-T.getUTCDay()-3}g=new Date(Date.UTC(r,0,1)),g.setUTCDate(A),o=g.getUTCMonth()+1,s=g.getUTCDate()}m=Bl(r);let y;if(l(p)){i=p.match(_Ue),i!==null?(a=+i[1],c=+i[2],u=+i[3],f=+(i[4]||0)*1e3,y=5):(i=p.match(gUe),i!==null?(a=+i[1],c=+i[2],u=+(i[3]||0)*60,y=4):(i=p.match(pUe),i!==null&&(a=+i[1],c=+(i[2]||0)*60,y=3)));let A=i[y],b=+i[y+1],x=+(i[y+2]||0);switch(A){case"+":a=a-b,c=c-x;break;case"-":a=a+b,c=c+x;break;case"Z":break;default:c=c+new Date(Date.UTC(r,o-1,s,a,c)).getTimezoneOffset();break}}return xue(r,o,s,a,c,u,f,m,n)}static now(t){return e.fromDate(new Date,t)}static toGregorianDate(t,n){let i=!1,r=_ue(t,Tj);l(r)||(e.addSeconds(t,-1,Tj),r=_ue(Tj,Tj),i=!0);let o=r.dayNumber,s=r.secondsOfDay;s>=43200&&(o+=1);let a=o+68569|0,c=4*a/146097|0;a=a-((146097*c+3)/4|0)|0;let u=4e3*(a+1)/1461001|0;a=a-(1461*u/4|0)+31|0;let f=80*a/2447|0,d=a-(2447*f/80|0)|0;a=f/11|0;let p=f+2-12*a|0,g=100*(c-49)+u+a|0,m=s/kn.SECONDS_PER_HOUR|0,y=s-m*kn.SECONDS_PER_HOUR,A=y/kn.SECONDS_PER_MINUTE|0;y=y-A*kn.SECONDS_PER_MINUTE;let b=y|0,x=(y-b)/kn.SECONDS_PER_MILLISECOND;return m+=12,m>23&&(m-=24),i&&(b+=1),l(n)?(n.year=g,n.month=p,n.day=d,n.hour=m,n.minute=A,n.second=b,n.millisecond=x,n.isLeapSecond=i,n):new Bh(g,p,d,m,A,b,x,i)}static toDate(t){let n=e.toGregorianDate(t,gue),i=n.second;return n.isLeapSecond&&(i-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,i,n.millisecond))}static toIso8601(t,n){let i=e.toGregorianDate(t,gue),r=i.year,o=i.month,s=i.day,a=i.hour,c=i.minute,u=i.second,f=i.millisecond;r===1e4&&o===1&&s===1&&a===0&&c===0&&u===0&&f===0&&(r=9999,o=12,s=31,a=24);let d;if(!l(n)&&f!==0){let p=f*.01;return d=p<1e-6?p.toFixed(20).replace(".","").replace(/0+$/,""):p.toString().replace(".",""),`${r.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}.${d}Z`}return!l(n)||n===0?`${r.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}Z`:(d=(f*.01).toFixed(n).replace(".","").slice(0,n),`${r.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${s.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}.${d}Z`)}static clone(t,n){if(l(t))return l(n)?(n.dayNumber=t.dayNumber,n.secondsOfDay=t.secondsOfDay,n):new e(t.dayNumber,t.secondsOfDay,si.TAI)}static compare(t,n){let i=t.dayNumber-n.dayNumber;return i!==0?i:t.secondsOfDay-n.secondsOfDay}static equals(t,n){return t===n||l(t)&&l(n)&&t.dayNumber===n.dayNumber&&t.secondsOfDay===n.secondsOfDay}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(e.secondsDifference(t,n))<=i}static totalDays(t){return t.dayNumber+t.secondsOfDay/kn.SECONDS_PER_DAY}static secondsDifference(t,n){return(t.dayNumber-n.dayNumber)*kn.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)}static daysDifference(t,n){let i=t.dayNumber-n.dayNumber,r=(t.secondsOfDay-n.secondsOfDay)/kn.SECONDS_PER_DAY;return i+r}static computeTaiMinusUtc(t){rv.julianDate=t;let n=e.leapSeconds,i=vr(n,rv,jq);return i<0&&(i=~i,--i,i<0&&(i=0)),n[i].offset}static addSeconds(t,n,i){return Iy(t.dayNumber,t.secondsOfDay+n,i)}static addMinutes(t,n,i){let r=t.secondsOfDay+n*kn.SECONDS_PER_MINUTE;return Iy(t.dayNumber,r,i)}static addHours(t,n,i){let r=t.secondsOfDay+n*kn.SECONDS_PER_HOUR;return Iy(t.dayNumber,r,i)}static addDays(t,n,i){let r=t.dayNumber+n;return Iy(r,t.secondsOfDay,i)}static lessThan(t,n){return e.compare(t,n)<0}static lessThanOrEquals(t,n){return e.compare(t,n)<=0}static greaterThan(t,n){return e.compare(t,n)>0}static greaterThanOrEquals(t,n){return e.compare(t,n)>=0}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return e.toIso8601(this)}},Tj=new mi(0,0,si.TAI);mi.leapSeconds=[new yr(new mi(2441317,43210,si.TAI),10),new yr(new mi(2441499,43211,si.TAI),11),new yr(new mi(2441683,43212,si.TAI),12),new yr(new mi(2442048,43213,si.TAI),13),new yr(new mi(2442413,43214,si.TAI),14),new yr(new mi(2442778,43215,si.TAI),15),new yr(new mi(2443144,43216,si.TAI),16),new yr(new mi(2443509,43217,si.TAI),17),new yr(new mi(2443874,43218,si.TAI),18),new yr(new mi(2444239,43219,si.TAI),19),new yr(new mi(2444786,43220,si.TAI),20),new yr(new mi(2445151,43221,si.TAI),21),new yr(new mi(2445516,43222,si.TAI),22),new yr(new mi(2446247,43223,si.TAI),23),new yr(new mi(2447161,43224,si.TAI),24),new yr(new mi(2447892,43225,si.TAI),25),new yr(new mi(2448257,43226,si.TAI),26),new yr(new mi(2448804,43227,si.TAI),27),new yr(new mi(2449169,43228,si.TAI),28),new yr(new mi(2449534,43229,si.TAI),29),new yr(new mi(2450083,43230,si.TAI),30),new yr(new mi(2450630,43231,si.TAI),31),new yr(new mi(2451179,43232,si.TAI),32),new yr(new mi(2453736,43233,si.TAI),33),new yr(new mi(2454832,43234,si.TAI),34),new yr(new mi(2456109,43235,si.TAI),35),new yr(new mi(2457204,43236,si.TAI),36),new yr(new mi(2457754,43237,si.TAI),37)];var K=mi;var jue=Qo(xf(),1);function bUe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var aD=bUe;function Iue(e,t){if(e===null||typeof e!="object")return e;t=t??!1;let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let r=e[i];t&&(r=Iue(r,t)),n[i]=r}return n}var Je=Iue;function Pue(e,t,n){n=n??!1;let i={},r=l(e),o=l(t),s,a,c;if(r)for(s in e)e.hasOwnProperty(s)&&(a=e[s],o&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=Pue(a,c,n):i[s]=a):i[s]=a);if(o)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var Ot=Pue;function xUe(){let e,t,n=new Promise(function(i,r){e=i,t=r});return{resolve:e,reject:t,promise:n}}var Iu=xUe;var Due=Qo(xf(),1);function Gq(e,t){let n;return typeof document<"u"&&(n=document),Gq._implementation(e,t,n)}Gq._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new Due.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var Td=Gq;var Rue=Qo(xf(),1);function TUe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new Rue.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var cD=TUe;var Oue=Qo(xf(),1);function EUe(e){let t=new Oue.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var ng=EUe;var Mue={};function CUe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=Mue[t];l(i)||(i={},Mue[t]=i);let r=i[n];if(!l(r)){let o=document.createElement("canvas");o.width=t,o.height=n,r=o.getContext("2d",{willReadFrequently:!0}),r.globalCompositeOperation="copy",i[n]=r}return r.drawImage(e,0,0,t,n),r.getImageData(0,0,t,n).data}var kh=CUe;var vUe=/^blob:/i;function SUe(e){return vUe.test(e)}var tx=SUe;var Sp;function wUe(e){l(Sp)||(Sp=document.createElement("a")),Sp.href=window.location.href;let t=Sp.host,n=Sp.protocol;return Sp.href=e,Sp.href=Sp.href,n!==Sp.protocol||t!==Sp.host}var Dy=wUe;var IUe=/^data:/i;function PUe(e){return IUe.test(e)}var Uh=PUe;function DUe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let r=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,r.removeChild(t),n()},t.onerror=function(o){i(o)},r.appendChild(t)})}var nx=DUe;function RUe(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],r=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let o=0,s=i.length;o<s;++o)t+=`${r+encodeURIComponent(i[o])}&`;else t+=`${r+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var ix=RUe;function OUe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,r=n.length;i<r;++i){let o=n[i].split("="),s=decodeURIComponent(o[0]),a=o[1];l(a)?a=decodeURIComponent(a):a="";let c=t[s];typeof c=="string"?t[s]=[c,a]:Array.isArray(c)?c.push(a):t[s]=a}return t}var Tf=OUe;var Nue={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};Object.freeze(Nue);var Ti=Nue;var Lue={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3};Object.freeze(Lue);var Zs=Lue;function Pj(e){e=e??H.EMPTY_OBJECT;let t=e.throttleByServer??!1,n=e.throttle??!1;this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=e.priority??0,this.throttle=n,this.throttleByServer=t,this.type=e.type??Zs.OTHER,this.serverKey=e.serverKey,this.state=Ti.UNISSUED,this.deferred=void 0,this.cancelled=!1}Pj.prototype.cancel=function(){this.cancelled=!0};Pj.prototype.clone=function(e){return l(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=Ti.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new Pj(this)};var wo=Pj;function MUe(e){let t={};if(!e)return t;let n=e.split(`\r
`);for(let i=0;i<n.length;++i){let r=n[i],o=r.indexOf(": ");if(o>0){let s=r.substring(0,o),a=r.substring(o+2);t[s]=a}}return t}var lD=MUe;function Fue(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=lD(this.responseHeaders))}Fue.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var wp=Fue;var Dj=Qo(xf(),1);function rx(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(rx.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function Wq(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}rx.prototype.reserve=function(e){e=e??this._length,this._array.length=e};rx.prototype.heapify=function(e){e=e??0;let t=this._length,n=this._comparator,i=this._array,r,o=!0;for(;o;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?r=a:r=e,s<t&&n(i[s],i[r])<0&&(r=s),r!==e?(Wq(i,r,e),e=r):o=!1}};rx.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};rx.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,r=this._length++;for(r<t.length?t[r]=e:t.push(e);r!==0;){let s=Math.floor((r-1)/2);if(n(t[r],t[s])<0)Wq(t,r,s),r=s;else break}let o;return l(i)&&this._length>i&&(o=t[i],this._length=i),o};rx.prototype.pop=function(e){if(e=e??0,this._length===0)return;let t=this._array,n=t[e];return Wq(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var uD=rx;function fD(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(fD.prototype=Object.create(Error.prototype),fD.prototype.constructor=fD);fD.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
${this.stack.toString()}`),e};var oe=fD;function NUe(e,t){return e.priority-t.priority}var Sr={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},av=20,Xc=new uD({comparator:NUe});Xc.maximumLength=av;Xc.reserve(av);var Ip=[],ig={},LUe=typeof document<"u"?new Dj.default(document.location.href):new Dj.default,Rj=new be;function Io(){}Io.maximumRequests=50;Io.maximumRequestsPerServer=18;Io.requestsByServer={};Io.throttleRequests=!0;Io.debugShowStatistics=!1;Io.requestCompletedEvent=Rj;Object.defineProperties(Io,{statistics:{get:function(){return Sr}},priorityHeapLength:{get:function(){return av},set:function(e){if(e<av)for(;Xc.length>e;){let t=Xc.pop();ox(t)}av=e,Xc.maximumLength=e,Xc.reserve(e)}}});function Bue(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}Io.serverHasOpenSlots=function(e,t){t=t??1;let n=Io.requestsByServer[e]??Io.maximumRequestsPerServer;return ig[e]+t<=n};Io.heapHasOpenSlots=function(e){return Xc.length+e<=av};function kue(e){return e.state===Ti.UNISSUED&&(e.state=Ti.ISSUED,e.deferred=Iu()),e.deferred.promise}function FUe(e){return function(t){if(e.state===Ti.CANCELLED)return;let n=e.deferred;--Sr.numberOfActiveRequests,--ig[e.serverKey],Rj.raiseEvent(),e.state=Ti.RECEIVED,e.deferred=void 0,n.resolve(t)}}function BUe(e){return function(t){e.state!==Ti.CANCELLED&&(++Sr.numberOfFailedRequests,--Sr.numberOfActiveRequests,--ig[e.serverKey],Rj.raiseEvent(t),e.state=Ti.FAILED,e.deferred.reject(t))}}function Uue(e){let t=kue(e);return e.state=Ti.ACTIVE,Ip.push(e),++Sr.numberOfActiveRequests,++Sr.numberOfActiveRequestsEver,++ig[e.serverKey],e.requestFunction().then(FUe(e)).catch(BUe(e)),t}function ox(e){let t=e.state===Ti.ACTIVE;if(e.state=Ti.CANCELLED,++Sr.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;n.promise.catch(()=>{}),e.deferred=void 0,n.reject(new oe(`Request cancelled: "${e.url}"`))}t&&(--Sr.numberOfActiveRequests,--ig[e.serverKey],++Sr.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}Io.update=function(){let e,t,n=0,i=Ip.length;for(e=0;e<i;++e){if(t=Ip[e],t.cancelled&&ox(t),t.state!==Ti.ACTIVE){++n;continue}n>0&&(Ip[e-n]=t)}Ip.length-=n;let r=Xc.internalArray,o=Xc.length;for(e=0;e<o;++e)Bue(r[e]);Xc.resort();let s=Math.max(Io.maximumRequests-Ip.length,0),a=0;for(;a<s&&Xc.length>0;){if(t=Xc.pop(),t.cancelled){ox(t);continue}if(t.throttleByServer&&!Io.serverHasOpenSlots(t.serverKey)){ox(t);continue}Uue(t),++a}kUe()};Io.getServerKey=function(e){let t=new Dj.default(e);t.scheme()===""&&(t=t.absoluteTo(LUe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=ig[n];return l(i)||(ig[n]=0),n};Io.request=function(e){if(Uh(e.url)||tx(e.url))return Rj.raiseEvent(),e.state=Ti.RECEIVED,e.requestFunction();if(++Sr.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=Io.getServerKey(e.url)),Io.throttleRequests&&e.throttleByServer&&!Io.serverHasOpenSlots(e.serverKey))return;if(!Io.throttleRequests||!e.throttle)return Uue(e);if(Ip.length>=Io.maximumRequests)return;Bue(e);let t=Xc.insert(e);if(l(t)){if(t===e)return;ox(t)}return kue(e)};function kUe(){Io.debugShowStatistics&&(Sr.numberOfActiveRequests===0&&Sr.lastNumberOfActiveRequests>0&&(Sr.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Sr.numberOfAttemptedRequests}`),Sr.numberOfAttemptedRequests=0),Sr.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Sr.numberOfCancelledRequests}`),Sr.numberOfCancelledRequests=0),Sr.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Sr.numberOfCancelledActiveRequests}`),Sr.numberOfCancelledActiveRequests=0),Sr.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Sr.numberOfFailedRequests}`),Sr.numberOfFailedRequests=0)),Sr.lastNumberOfActiveRequests=Sr.numberOfActiveRequests)}Io.clearForSpecs=function(){for(;Xc.length>0;){let t=Xc.pop();ox(t)}let e=Ip.length;for(let t=0;t<e;++t)ox(Ip[t]);Ip.length=0,ig={},Sr.numberOfAttemptedRequests=0,Sr.numberOfActiveRequests=0,Sr.numberOfCancelledRequests=0,Sr.numberOfCancelledActiveRequests=0,Sr.numberOfFailedRequests=0,Sr.numberOfActiveRequestsEver=0,Sr.lastNumberOfActiveRequests=0};Io.numberOfActiveRequestsByServer=function(e){return ig[e]};Io.requestHeap=Xc;var Kc=Io;var zue=Qo(xf(),1);var dD={},cv={};dD.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(cv[n])||(cv[n]=!0)};dD.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(cv[n])&&delete cv[n]};function UUe(e){let t=new zue.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}dD.contains=function(e){let t=UUe(e);return!!(l(t)&&l(cv[t]))};dD.clear=function(){cv={}};var lv=dD;var Hue=(function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}})();function zt(e){e=e??H.EMPTY_OBJECT,typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=Pp(e.templateValues,{}),this._queryParameters=Pp(e.queryParameters,{}),this.headers=Pp(e.headers,{}),this.request=e.request??new wo,this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=e.retryAttempts??0,this._retryCount=0,e.parseUrl??!0?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function Pp(e,t){return l(e)?Je(e):t}zt.createIfNeeded=function(e){return e instanceof zt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new zt({url:e})};var uv;zt.supportsImageBitmapOptions=function(){return l(uv)?uv:typeof createImageBitmap!="function"?(uv=Promise.resolve(!1),uv):(uv=zt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=kh(t[0]),i=kh(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),uv)};Object.defineProperties(zt,{isBlobSupported:{get:function(){return Hue}}});Object.defineProperties(zt.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){this.parseUrl(e,!1,!1)}},extension:{get:function(){return ng(this._url)}},isDataUri:{get:function(){return Uh(this._url)}},isBlobUri:{get:function(){return tx(this._url)}},isCrossOriginUrl:{get:function(){return Dy(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});zt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};zt.prototype.parseUrl=function(e,t,n,i){let r=new jue.default(e),o=zUe(r.query());this._queryParameters=t?Mj(o,this.queryParameters,n):o,r.search(""),r.fragment(""),l(i)&&r.scheme()===""&&(r=r.absoluteTo(Td(i))),this._url=r.toString()};function zUe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Tf(e)}function Mj(e,t,n){if(!n)return Ot(e,t);let i=Je(e,!0);for(let r in t)if(t.hasOwnProperty(r)){let o=i[r],s=t[r];l(o)?(Array.isArray(o)||(o=i[r]=[o]),i[r]=o.concat(s)):i[r]=Array.isArray(s)?s.slice():s}return i}zt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${VUe(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let i=this._templateValues;return Object.keys(i).length>0&&(n=n.replace(/{(.*?)}/g,function(r,o){let s=i[o];return l(s)?encodeURIComponent(s):r})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function VUe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${ix(e)}`}zt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=Mj(this._queryParameters,e,!1):this._queryParameters=Mj(e,this._queryParameters,!1)};zt.prototype.appendQueryParameters=function(e){this._queryParameters=Mj(e,this._queryParameters,!0)};zt.prototype.setTemplateValues=function(e,t){t?this._templateValues=Ot(this._templateValues,e):this._templateValues=Ot(e,this._templateValues)};zt.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=e.preserveQueryParameters??!1;t.parseUrl(e.url,!0,n,this._url)}return l(e.queryParameters)&&(t._queryParameters=Ot(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=Ot(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=Ot(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};zt.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};zt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=Je(this._queryParameters),e._templateValues=Je(this._templateValues),e.headers=Je(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new zt({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:l(this.credits)?this.credits.slice():void 0})};zt.prototype.getBaseUri=function(e){return cD(this.getUrlComponent(e),e)};zt.prototype.appendForwardSlash=function(){this._url=aD(this._url)};zt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};zt.fetchArrayBuffer=function(e){return new zt(e).fetchArrayBuffer()};zt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};zt.fetchBlob=function(e){return new zt(e).fetchBlob()};zt.prototype.fetchImage=function(e){e=e??H.EMPTY_OBJECT;let t=e.preferImageBitmap??!1,n=e.preferBlob??!1,i=e.flipY??!1,r=e.skipColorSpaceConversion??!1;if(qq(this.request),!Hue||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return this._fetchImage({resource:this,flipY:i,skipColorSpaceConversion:r,preferImageBitmap:t});let o=this.fetchBlob();if(!l(o))return;let s,a,c,u;return zt.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,o}).then(function(f){if(!l(f))return;if(u=f,a)return zt.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:r});let d=window.URL.createObjectURL(f);return c=new zt({url:d}),c._fetchImage({flipY:i,skipColorSpaceConversion:r,preferImageBitmap:!1})}).then(function(f){if(l(f))return f.blob=u,a||window.URL.revokeObjectURL(c.url),f}).catch(function(f){return l(c)&&window.URL.revokeObjectURL(c.url),f.blob=u,Promise.reject(f)})};zt.prototype._fetchImage=function(e){let t=this,n=e.flipY,i=e.skipColorSpaceConversion,r=e.preferImageBitmap,o=t.request;o.url=t.url,o.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=Iu();return zt._Implementations.createImage(o,a,c,n,i,r),c.promise};let s=Kc.request(o);if(l(s))return s.catch(function(a){return o.state!==Ti.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(o.state=Ti.UNISSUED,o.deferred=void 0,t._fetchImage({flipY:n,skipColorSpaceConversion:i,preferImageBitmap:r})):Promise.reject(a)})})};zt.fetchImage=function(e){return new zt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};zt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};zt.fetchText=function(e){return new zt(e).fetchText()};zt.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(l(e))return e.then(function(t){if(l(t))return JSON.parse(t)})};zt.fetchJson=function(e){return new zt(e).fetchJson()};zt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};zt.fetchXML=function(e){return new zt(e).fetchXML()};zt.prototype.fetchJsonp=function(e){e=e??"callback",qq(this.request);let t;do t=`loadJsonp${D.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Gue(this,e,t)};function Gue(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let r=e.request,o=e.url;r.url=o,r.requestFunction=function(){let a=Iu();return window[n]=function(c){a.resolve(c);try{delete window[n]}catch{window[n]=void 0}},zt._Implementations.loadAndExecuteScript(o,n,a),a.promise};let s=Kc.request(r);if(l(s))return s.catch(function(a){return r.state!==Ti.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(r.state=Ti.UNISSUED,r.deferred=void 0,Gue(e,t,n)):Promise.reject(a)})})}zt.fetchJsonp=function(e){return new zt(e).fetchJsonp(e.callbackParameterName)};zt.prototype._makeRequest=function(e){let t=this;qq(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let o=e.responseType,s=Ot(e.headers,t.headers),a=e.overrideMimeType,c=e.method,u=e.data,f=Iu(),d=zt._Implementations.loadWithXhr(i,o,c,u,s,f,a);return l(d)&&l(d.abort)&&(n.cancelFunction=function(){d.abort()}),f.promise};let r=Kc.request(n);if(l(r))return r.then(function(o){return n.cancelFunction=void 0,o}).catch(function(o){return n.cancelFunction=void 0,n.state!==Ti.FAILED?Promise.reject(o):t.retryOnError(o).then(function(s){return s?(n.state=Ti.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(o)})})};function qq(e){if(e.state===Ti.ISSUED||e.state===Ti.ACTIVE)throw new oe("The Resource is already being fetched.");e.state=Ti.UNISSUED,e.deferred=void 0}var jUe=/^data:(.*?)(;base64)?,(.*)$/;function Oj(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Vue(e,t){let n=Oj(e,t),i=new ArrayBuffer(n.length),r=new Uint8Array(i);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return i}function HUe(e,t){t=t??"";let n=e[1],i=!!e[2],r=e[3],o,s;switch(t){case"":case"text":return Oj(i,r);case"arraybuffer":return Vue(i,r);case"blob":return o=Vue(i,r),new Blob([o],{type:n});case"document":return s=new DOMParser,s.parseFromString(Oj(i,r),n);case"json":return JSON.parse(Oj(i,r));default:}}zt.prototype.fetch=function(e){return e=Pp(e,{}),e.method="GET",this._makeRequest(e)};zt.fetch=function(e){return new zt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt.prototype.delete=function(e){return e=Pp(e,{}),e.method="DELETE",this._makeRequest(e)};zt.delete=function(e){return new zt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};zt.prototype.head=function(e){return e=Pp(e,{}),e.method="HEAD",this._makeRequest(e)};zt.head=function(e){return new zt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt.prototype.options=function(e){return e=Pp(e,{}),e.method="OPTIONS",this._makeRequest(e)};zt.options=function(e){return new zt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt.prototype.post=function(e,t){return Wr.defined("data",e),t=Pp(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};zt.post=function(e){return new zt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt.prototype.put=function(e,t){return Wr.defined("data",e),t=Pp(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};zt.put=function(e){return new zt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt.prototype.patch=function(e,t){return Wr.defined("data",e),t=Pp(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};zt.patch=function(e){return new zt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};zt._Implementations={};zt._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(r){n.reject(r)},t&&(lv.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};zt._Implementations.createImage=function(e,t,n,i,r,o,s){let a=e.url;zt.supportsImageBitmapOptions().then(function(c){if(!(c&&o)){zt._Implementations.loadImageElement(a,t,n);return}let u="blob",f="GET",d=Iu(),p=zt._Implementations.loadWithXhr(a,u,f,void 0,s,d,void 0,void 0,void 0);return l(p)&&l(p.abort)&&(e.cancelFunction=function(){p.abort()}),d.promise.then(function(g){if(!l(g)){n.reject(new oe(`Successfully retrieved ${a} but it contained no content.`));return}return zt.createImageBitmapFromBlob(g,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:r})}).then(function(g){n.resolve(g)})}).catch(function(c){n.reject(c)})};zt.createImageBitmapFromBlob=function(e,t){return Wr.defined("options",t),Wr.typeOf.bool("options.flipY",t.flipY),Wr.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),Wr.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function GUe(e,t,n,i,r,o,s){fetch(e,{method:n,headers:r}).then(async a=>{if(!a.ok){let c={};a.headers.forEach((u,f)=>{c[f]=u}),o.reject(new wp(a.status,a,c));return}switch(t){case"text":o.resolve(a.text());break;case"json":o.resolve(a.json());break;default:o.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{o.reject(new wp)})}var WUe=typeof XMLHttpRequest>"u";zt._Implementations.loadWithXhr=function(e,t,n,i,r,o,s){let a=jUe.exec(e);if(a!==null){o.resolve(HUe(a,t));return}if(WUe){GUe(e,t,n,i,r,o,s);return}let c=new XMLHttpRequest;if(lv.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(r))for(let f in r)r.hasOwnProperty(f)&&c.setRequestHeader(f,r[f]);l(t)&&(c.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){o.reject(new wp(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,d=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};g.forEach(function(y){let A=y.split(": "),b=A.shift();m[b]=A.join(": ")}),o.resolve(m);return}if(c.status===204)o.resolve(void 0);else if(l(f)&&(!l(t)||d===t))o.resolve(f);else if(t==="json"&&typeof f=="string")try{o.resolve(JSON.parse(f))}catch(p){o.reject(p)}else(d===""||d==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?o.resolve(c.responseXML):(d===""||d==="text")&&l(c.responseText)?o.resolve(c.responseText):o.reject(new oe("Invalid XMLHttpRequest response type."))},c.onerror=function(f){o.reject(new wp)},c.send(i),c};zt._Implementations.loadAndExecuteScript=function(e,t,n){return nx(e,t).catch(function(i){n.reject(i)})};zt._DefaultImplementations={};zt._DefaultImplementations.createImage=zt._Implementations.createImage;zt._DefaultImplementations.loadWithXhr=zt._Implementations.loadWithXhr;zt._DefaultImplementations.loadAndExecuteScript=zt._Implementations.loadAndExecuteScript;zt.DEFAULT=Object.freeze(new zt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var De=zt;function mD(e){e=e??H.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=e.addNewLeapSeconds??!0,l(e.data)?Wue(this,e.data):Wue(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}mD.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=De.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new oe(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new mD({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};mD.NONE=Object.freeze({compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new wy(0,0,0,0,0),t}});mD.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new wy(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,r,o;if(l(i)){let a=n[i],c=n[i+1],u=K.lessThanOrEquals(a,e),f=!l(c),d=f||K.greaterThanOrEquals(c,e);if(u&&d)return r=i,!f&&c.equals(e)&&++r,o=r+1,Yue(this,n,this._samples,e,r,o,t),t}let s=vr(n,e,K.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,r=s,o=s):(o=~s,r=o-1,r<0&&(r=0)),this._lastIndex=r,Yue(this,n,this._samples,e,r,o,t),t};function qUe(e,t){return K.compare(e.julianDate,t)}function Wue(e,t){if(!l(t.columnNames))throw new oe("Error in loaded EOP data: The columnNames property is required.");if(!l(t.samples))throw new oe("Error in loaded EOP data: The samples property is required.");let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),o=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||r<0||o<0||s<0||a<0||c<0)throw new oe("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=o,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let d,p=e._addNewLeapSeconds;for(let g=0,m=u.length;g<m;g+=e._columnCount){let y=u[g+n],A=u[g+c],b=y+kn.MODIFIED_JULIAN_DATE_DIFFERENCE,x=new K(b,A,si.TAI);if(f.push(x),p){if(A!==d&&l(d)){let T=K.leapSeconds,E=vr(T,x,qUe);if(E<0){let v=new yr(x,A);T.splice(~E,0,v)}}d=A}}}function que(e,t,n,i,r){let o=n*i;r.xPoleWander=t[o+e._xPoleWanderRadiansColumn],r.yPoleWander=t[o+e._yPoleWanderRadiansColumn],r.xPoleOffset=t[o+e._xCelestialPoleOffsetRadiansColumn],r.yPoleOffset=t[o+e._yCelestialPoleOffsetRadiansColumn],r.ut1MinusUtc=t[o+e._ut1MinusUtcSecondsColumn]}function hD(e,t,n){return t+e*(n-t)}function Yue(e,t,n,i,r,o,s){let a=e._columnCount;if(o>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[r],u=t[o];if(c.equals(u)||i.equals(c))return que(e,n,r,a,s),s;if(i.equals(u))return que(e,n,o,a,s),s;let f=K.secondsDifference(i,c)/K.secondsDifference(u,c),d=r*a,p=o*a,g=n[d+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],y=m-g;if(y>.5||y<-.5){let A=n[d+e._taiMinusUtcSecondsColumn],b=n[p+e._taiMinusUtcSecondsColumn];A!==b&&(u.equals(i)?g=m:m-=b-A)}return s.xPoleWander=hD(f,n[d+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=hD(f,n[d+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=hD(f,n[d+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=hD(f,n[d+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=hD(f,g,m),s}var pD=mD;function $c(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}$c.fromQuaternion=function(e,t){l(t)||(t=new $c);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),r=2*(e.w*e.x+e.y*e.z),o=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,o),t.roll=Math.atan2(r,i),t.pitch=-D.asinClamped(n),t};$c.fromDegrees=function(e,t,n,i){return l(i)||(i=new $c),i.heading=e*D.RADIANS_PER_DEGREE,i.pitch=t*D.RADIANS_PER_DEGREE,i.roll=n*D.RADIANS_PER_DEGREE,i};$c.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new $c(e.heading,e.pitch,e.roll)};$c.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};$c.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&D.equalsEpsilon(e.heading,t.heading,n,i)&&D.equalsEpsilon(e.pitch,t.pitch,n,i)&&D.equalsEpsilon(e.roll,t.roll,n,i)};$c.prototype.clone=function(e){return $c.clone(this,e)};$c.prototype.equals=function(e){return $c.equals(this,e)};$c.prototype.equalsEpsilon=function(e,t,n){return $c.equalsEpsilon(this,e,t,n)};$c.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var wc=$c;var Xue={},Kue=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function YUe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),r=Kue.exec(i);if(r!==null)return r[1]}}var Nj;function $ue(e){return typeof document>"u"?e:(l(Nj)||(Nj=document.createElement("a")),Nj.href=e,Nj.href)}var sx;function Jue(){if(l(sx))return sx;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(Xue?.url)?e=Td(".",Xue.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?e=Td("..",ax("Core/buildModuleUrl.js")):e=YUe(),sx=new De({url:$ue(e)}),sx.appendForwardSlash(),sx}function XUe(e){return $ue(require.toUrl(`../${e}`))}function Zue(e){return Jue().getDerivedResource({url:e}).url}var Lj;function ax(e){return l(Lj)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?Lj=XUe:Lj=Zue),Lj(e)}ax._cesiumScriptRegex=Kue;ax._buildModuleUrlFromBaseUrl=Zue;ax._clearBaseResource=function(){sx=void 0};ax.setBaseUrl=function(e){sx=De.DEFAULT.getDerivedResource({url:e})};ax.getCesiumBaseUrl=Jue;var Zt=ax;function KUe(e,t,n){this.x=e,this.y=t,this.s=n}var cx=KUe;function Fj(e){e=e??H.EMPTY_OBJECT,this._xysFileUrlTemplate=De.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=e.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=e.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new K(this._sampleZeroJulianEphemerisDate,0,si.TAI),this._stepSizeDays=e.stepSizeDays??1,this._samplesPerXysFile=e.samplesPerXysFile??1e3,this._totalSamples=e.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),r=Math.pow(this._stepSizeDays,t);for(let o=0;o<=t;++o){n[o]=r,i[o]=o*this._stepSizeDays;for(let s=0;s<=t;++s)s!==o&&(n[o]*=o-s);n[o]=1/n[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}var $Ue=new K(0,0,si.TAI);function Yq(e,t,n){let i=$Ue;return i.dayNumber=t,i.secondsOfDay=n,K.daysDifference(i,e._sampleZeroDateTT)}Fj.prototype.preload=function(e,t,n,i){let r=Yq(this,e,t),o=Yq(this,n,i),s=r/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,u=a/this._samplesPerXysFile|0,f=[];for(let d=c;d<=u;++d)f.push(Xq(this,d));return Promise.all(f)};Fj.prototype.computeXysRadians=function(e,t,n){let i=Yq(this,e,t);if(i<0)return;let r=i/this._stepSizeDays|0;if(r>=this._totalSamples)return;let o=this._interpolationOrder,s=r-(o/2|0);s<0&&(s=0);let a=s+o;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-o,s<0&&(s=0));let c=!1,u=this._samples;if(l(u[s*3])||(Xq(this,s/this._samplesPerXysFile|0),c=!0),l(u[a*3])||(Xq(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new cx(0,0,0);let f=i-s*this._stepSizeDays,d=this._work,p=this._denominators,g=this._coef,m=this._xTable,y,A;for(y=0;y<=o;++y)d[y]=f-m[y];for(y=0;y<=o;++y){for(g[y]=1,A=0;A<=o;++A)A!==y&&(g[y]*=d[A]);g[y]*=p[y];let b=(s+y)*3;n.x+=g[y]*u[b++],n.y+=g[y]*u[b++],n.s+=g[y]*u[b]}return n};Fj.prototype._updateChunkData=function(e,{samples:t}){this._chunkDownloadsInProgress[e]=void 0;let n=this._samplesPerXysFile,i=e*n*3;for(let r=0;r<t.length;++r)this._samples[i+r]=t[r]};async function JUe(e,t,n){try{let i=await e.fetchJson();n._updateChunkData(t,i)}catch{}}function Xq(e,t){if(l(e._chunkDownloadsInProgress[t]))return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new De({url:Zt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let r=JUe(n,t,e);return e._chunkDownloadsInProgress[t]=r,r}var gD=Fj;var ZUe=Object.freeze([NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN]),br=class e{constructor(t,n,i,r,o,s,a,c,u){let f=Reflect.construct(Array,ZUe,new.target);return f[0]=t??0,f[1]=r??0,f[2]=a??0,f[3]=n??0,f[4]=o??0,f[5]=c??0,f[6]=i??0,f[7]=s??0,f[8]=u??0,f}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i]=t[8],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n],i}static packArray(t,n){let i=t.length,r=i*9;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*9);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/9:n=new Array(i/9);for(let r=0;r<i;r+=9){let o=r/9;n[o]=e.unpack(t,r,n[o])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):new e(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}static fromQuaternion(t,n){let i=t.x*t.x,r=t.x*t.y,o=t.x*t.z,s=t.x*t.w,a=t.y*t.y,c=t.y*t.z,u=t.y*t.w,f=t.z*t.z,d=t.z*t.w,p=t.w*t.w,g=i-a-f+p,m=2*(r-d),y=2*(o+u),A=2*(r+d),b=-i+a-f+p,x=2*(c-s),T=2*(o-u),E=2*(c+s),v=-i-a+f+p;return l(n)?(n[0]=g,n[1]=A,n[2]=T,n[3]=m,n[4]=b,n[5]=E,n[6]=y,n[7]=x,n[8]=v,n):new e(g,m,y,A,b,x,T,E,v)}static fromHeadingPitchRoll(t,n){let i=Math.cos(-t.pitch),r=Math.cos(-t.heading),o=Math.cos(t.roll),s=Math.sin(-t.pitch),a=Math.sin(-t.heading),c=Math.sin(t.roll),u=i*r,f=-o*a+c*s*r,d=c*a+o*s*r,p=i*a,g=o*r+c*s*a,m=-c*r+o*s*a,y=-s,A=c*i,b=o*i;return l(n)?(n[0]=u,n[1]=p,n[2]=y,n[3]=f,n[4]=g,n[5]=A,n[6]=d,n[7]=m,n[8]=b,n):new e(u,f,d,p,g,m,y,A,b)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=t.y,n[5]=0,n[6]=0,n[7]=0,n[8]=t.z,n):new e(t.x,0,0,0,t.y,0,0,0,t.z)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=t,n[5]=0,n[6]=0,n[7]=0,n[8]=t,n):new e(t,0,0,0,t,0,0,0,t)}static fromCrossProduct(t,n){return l(n)?(n[0]=0,n[1]=t.z,n[2]=-t.y,n[3]=-t.z,n[4]=0,n[5]=t.x,n[6]=t.y,n[7]=-t.x,n[8]=0,n):new e(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)}static fromRotationX(t,n){let i=Math.cos(t),r=Math.sin(t);return l(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=r,n[6]=0,n[7]=-r,n[8]=i,n):new e(1,0,0,0,i,-r,0,r,i)}static fromRotationY(t,n){let i=Math.cos(t),r=Math.sin(t);return l(n)?(n[0]=i,n[1]=0,n[2]=-r,n[3]=0,n[4]=1,n[5]=0,n[6]=r,n[7]=0,n[8]=i,n):new e(i,0,r,0,1,0,-r,0,i)}static fromRotationZ(t,n){let i=Math.cos(t),r=Math.sin(t);return l(n)?(n[0]=i,n[1]=r,n[2]=0,n[3]=-r,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new e(i,-r,0,r,i,0,0,0,1)}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]}static getElementIndex(t,n){return t*3+n}static getColumn(t,n,i){let r=n*3,o=t[r],s=t[r+1],a=t[r+2];return i.x=o,i.y=s,i.z=a,i}static setColumn(t,n,i,r){r=e.clone(t,r);let o=n*3;return r[o]=i.x,r[o+1]=i.y,r[o+2]=i.z,r}static getRow(t,n,i){let r=t[n],o=t[n+3],s=t[n+6];return i.x=r,i.y=o,i.z=s,i}static setRow(t,n,i,r){return r=e.clone(t,r),r[n]=i.x,r[n+3]=i.y,r[n+6]=i.z,r}static setScale(t,n,i){let r=e.getScale(t,QUe),o=n.x/r.x,s=n.y/r.y,a=n.z/r.z;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*o,i[3]=t[3]*s,i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*a,i[7]=t[7]*a,i[8]=t[8]*a,i}static setUniformScale(t,n,i){let r=e.getScale(t,eze),o=n/r.x,s=n/r.y,a=n/r.z;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*o,i[3]=t[3]*s,i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*a,i[7]=t[7]*a,i[8]=t[8]*a,i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],Kq)),n.y=h.magnitude(h.fromElements(t[3],t[4],t[5],Kq)),n.z=h.magnitude(h.fromElements(t[6],t[7],t[8],Kq)),n}static getMaximumScale(t){return e.getScale(t,Que),h.maximumComponent(Que)}static setRotation(t,n,i){let r=e.getScale(t,tze);return i[0]=n[0]*r.x,i[1]=n[1]*r.x,i[2]=n[2]*r.x,i[3]=n[3]*r.y,i[4]=n[4]*r.y,i[5]=n[5]*r.y,i[6]=n[6]*r.z,i[7]=n[7]*r.z,i[8]=n[8]*r.z,i}static getRotation(t,n){let i=e.getScale(t,nze);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.x,n[3]=t[3]/i.y,n[4]=t[4]/i.y,n[5]=t[5]/i.y,n[6]=t[6]/i.z,n[7]=t[7]/i.z,n[8]=t[8]/i.z,n}static multiply(t,n,i){let r=t[0]*n[0]+t[3]*n[1]+t[6]*n[2],o=t[1]*n[0]+t[4]*n[1]+t[7]*n[2],s=t[2]*n[0]+t[5]*n[1]+t[8]*n[2],a=t[0]*n[3]+t[3]*n[4]+t[6]*n[5],c=t[1]*n[3]+t[4]*n[4]+t[7]*n[5],u=t[2]*n[3]+t[5]*n[4]+t[8]*n[5],f=t[0]*n[6]+t[3]*n[7]+t[6]*n[8],d=t[1]*n[6]+t[4]*n[7]+t[7]*n[8],p=t[2]*n[6]+t[5]*n[7]+t[8]*n[8];return i[0]=r,i[1]=o,i[2]=s,i[3]=a,i[4]=c,i[5]=u,i[6]=f,i[7]=d,i[8]=p,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i}static multiplyByVector(t,n,i){let r=n.x,o=n.y,s=n.z,a=t[0]*r+t[3]*o+t[6]*s,c=t[1]*r+t[4]*o+t[7]*s,u=t[2]*r+t[5]*o+t[8]*s;return i.x=a,i.y=c,i.z=u,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.x,i[3]=t[3]*n.y,i[4]=t[4]*n.y,i[5]=t[5]*n.y,i[6]=t[6]*n.z,i[7]=t[7]*n.z,i[8]=t[8]*n.z,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n}static transpose(t,n){let i=t[0],r=t[3],o=t[6],s=t[1],a=t[4],c=t[7],u=t[2],f=t[5],d=t[8];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n[4]=a,n[5]=c,n[6]=u,n[7]=f,n[8]=d,n}static computeEigenDecomposition(t,n){let i=D.EPSILON20,r=10,o=0,s=0;l(n)||(n={});let a=n.unitary=e.clone(e.IDENTITY,n.unitary),c=n.diagonal=e.clone(t,n.diagonal),u=i*rze(c);for(;s<r&&oze(c)>u;)sze(c,Bj),e.transpose(Bj,efe),e.multiply(c,Bj,c),e.multiply(efe,c,c),e.multiply(a,Bj,a),++o>2&&(++s,o=0);return n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n}static determinant(t){let n=t[0],i=t[3],r=t[6],o=t[1],s=t[4],a=t[7],c=t[2],u=t[5],f=t[8];return n*(s*f-u*a)+o*(u*r-i*f)+c*(i*a-s*r)}static inverse(t,n){let i=t[0],r=t[1],o=t[2],s=t[3],a=t[4],c=t[5],u=t[6],f=t[7],d=t[8],p=e.determinant(t);n[0]=a*d-f*c,n[1]=f*o-r*d,n[2]=r*c-a*o,n[3]=u*c-s*d,n[4]=i*d-u*o,n[5]=s*o-i*c,n[6]=s*f-u*a,n[7]=u*r-i*f,n[8]=i*a-s*r;let g=1/p;return e.multiplyByScalar(n,g,n)}static inverseTranspose(t,n){return e.inverse(e.transpose(t,ize),n)}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[3]}, ${this[6]})
(${this[1]}, ${this[4]}, ${this[7]})
(${this[2]}, ${this[5]}, ${this[8]})`}};br.packedLength=9;br.fromArray=br.unpack;br.IDENTITY=new br(1,0,0,0,1,0,0,0,1);br.ZERO=new br(0,0,0,0,0,0,0,0,0);br.COLUMN0ROW0=0;br.COLUMN0ROW1=1;br.COLUMN0ROW2=2;br.COLUMN1ROW0=3;br.COLUMN1ROW1=4;br.COLUMN1ROW2=5;br.COLUMN2ROW0=6;br.COLUMN2ROW1=7;br.COLUMN2ROW2=8;var QUe=new h,eze=new h,Kq=new h,Que=new h,tze=new h,nze=new h,Bj=new br,efe=new br,ize=new br;function rze(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var $q=[1,0,0],Jq=[2,2,1];function oze(e){let t=0;for(let n=0;n<3;++n){let i=e[br.getElementIndex(Jq[n],$q[n])];t+=2*i*i}return Math.sqrt(t)}function sze(e,t){let n=D.EPSILON15,i=0,r=1;for(let u=0;u<3;++u){let f=Math.abs(e[br.getElementIndex(Jq[u],$q[u])]);f>i&&(r=u,i=f)}let o=1,s=0,a=$q[r],c=Jq[r];if(Math.abs(e[br.getElementIndex(c,a)])>n){let u=e[br.getElementIndex(c,c)],f=e[br.getElementIndex(a,a)],d=e[br.getElementIndex(c,a)],p=(u-f)/2/d,g;p<0?g=-1/(-p+Math.sqrt(1+p*p)):g=1/(p+Math.sqrt(1+p*p)),o=1/Math.sqrt(1+g*g),s=g*o}return t=br.clone(br.IDENTITY,t),t[br.getElementIndex(a,a)]=t[br.getElementIndex(c,c)]=o,t[br.getElementIndex(c,a)]=s,t[br.getElementIndex(a,c)]=-s,t}var $=br;var aze=Object.freeze([NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN]),go=class e{constructor(t,n,i,r,o,s,a,c,u,f,d,p,g,m,y,A){let b=Reflect.construct(Array,aze,new.target);return b[0]=t??0,b[1]=o??0,b[2]=u??0,b[3]=g??0,b[4]=n??0,b[5]=s??0,b[6]=f??0,b[7]=m??0,b[8]=i??0,b[9]=a??0,b[10]=d??0,b[11]=y??0,b[12]=r??0,b[13]=c??0,b[14]=p??0,b[15]=A??0,b}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i++]=t[7],n[i++]=t[8],n[i++]=t[9],n[i++]=t[10],n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i]=t[15],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n++],i[4]=t[n++],i[5]=t[n++],i[6]=t[n++],i[7]=t[n++],i[8]=t[n++],i[9]=t[n++],i[10]=t[n++],i[11]=t[n++],i[12]=t[n++],i[13]=t[n++],i[14]=t[n++],i[15]=t[n],i}static packArray(t,n){let i=t.length,r=i*16;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*16);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/16:n=new Array(i/16);for(let r=0;r<i;r+=16){let o=r/16;n[o]=e.unpack(t,r,n[o])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):new e(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=t[1],n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=t[2],n[9]=t[6],n[10]=t[10],n[11]=t[14],n[12]=t[3],n[13]=t[7],n[14]=t[11],n[15]=t[15],n):new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}static fromRotationTranslation(t,n,i){return n=n??h.ZERO,l(i)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=0,i[4]=t[3],i[5]=t[4],i[6]=t[5],i[7]=0,i[8]=t[6],i[9]=t[7],i[10]=t[8],i[11]=0,i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=1,i):new e(t[0],t[3],t[6],n.x,t[1],t[4],t[7],n.y,t[2],t[5],t[8],n.z,0,0,0,1)}static fromTranslationQuaternionRotationScale(t,n,i,r){l(r)||(r=new e);let o=i.x,s=i.y,a=i.z,c=n.x*n.x,u=n.x*n.y,f=n.x*n.z,d=n.x*n.w,p=n.y*n.y,g=n.y*n.z,m=n.y*n.w,y=n.z*n.z,A=n.z*n.w,b=n.w*n.w,x=c-p-y+b,T=2*(u-A),E=2*(f+m),v=2*(u+A),S=-c+p-y+b,I=2*(g-d),R=2*(f-m),O=2*(g+d),L=-c-p+y+b;return r[0]=x*o,r[1]=v*o,r[2]=R*o,r[3]=0,r[4]=T*s,r[5]=S*s,r[6]=O*s,r[7]=0,r[8]=E*a,r[9]=I*a,r[10]=L*a,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,r}static fromTranslationRotationScale(t,n){return e.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,n)}static fromTranslation(t,n){return e.fromRotationTranslation($.IDENTITY,t,n)}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new e(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)}static fromRotation(t,n){return l(n)||(n=new e),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}static fromCamera(t,n){let i=t.position,r=t.direction,o=t.up;h.normalize(r,fv),h.normalize(h.cross(fv,o,dv),dv),h.normalize(h.cross(dv,fv,_D),_D);let s=dv.x,a=dv.y,c=dv.z,u=fv.x,f=fv.y,d=fv.z,p=_D.x,g=_D.y,m=_D.z,y=i.x,A=i.y,b=i.z,x=s*-y+a*-A+c*-b,T=p*-y+g*-A+m*-b,E=u*y+f*A+d*b;return l(n)?(n[0]=s,n[1]=p,n[2]=-u,n[3]=0,n[4]=a,n[5]=g,n[6]=-f,n[7]=0,n[8]=c,n[9]=m,n[10]=-d,n[11]=0,n[12]=x,n[13]=T,n[14]=E,n[15]=1,n):new e(s,a,c,x,p,g,m,T,-u,-f,-d,E,0,0,0,1)}static computePerspectiveFieldOfView(t,n,i,r,o){let a=1/Math.tan(t*.5),c=a/n,u=(r+i)/(i-r),f=2*r*i/(i-r);return o[0]=c,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=a,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=u,o[11]=-1,o[12]=0,o[13]=0,o[14]=f,o[15]=0,o}static computeOrthographicOffCenter(t,n,i,r,o,s,a){let c=1/(n-t),u=1/(r-i),f=1/(s-o),d=-(n+t)*c,p=-(r+i)*u,g=-(s+o)*f;return c*=2,u*=2,f*=-2,a[0]=c,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=f,a[11]=0,a[12]=d,a[13]=p,a[14]=g,a[15]=1,a}static computePerspectiveOffCenter(t,n,i,r,o,s,a){let c=2*o/(n-t),u=2*o/(r-i),f=(n+t)/(n-t),d=(r+i)/(r-i),p=-(s+o)/(s-o),g=-1,m=-2*s*o/(s-o);return a[0]=c,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=f,a[9]=d,a[10]=p,a[11]=g,a[12]=0,a[13]=0,a[14]=m,a[15]=0,a}static computeInfinitePerspectiveOffCenter(t,n,i,r,o,s){let a=2*o/(n-t),c=2*o/(r-i),u=(n+t)/(n-t),f=(r+i)/(r-i),d=-1,p=-1,g=-2*o;return s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=c,s[6]=0,s[7]=0,s[8]=u,s[9]=f,s[10]=d,s[11]=p,s[12]=0,s[13]=0,s[14]=g,s[15]=0,s}static computeViewportTransformation(t,n,i,r){l(r)||(r=new e),t=t??H.EMPTY_OBJECT;let o=t.x??0,s=t.y??0,a=t.width??0,c=t.height??0;n=n??0,i=i??1;let u=a*.5,f=c*.5,d=(i-n)*.5,p=u,g=f,m=d,y=o+u,A=s+f,b=n+d,x=1;return r[0]=p,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=g,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=m,r[11]=0,r[12]=y,r[13]=A,r[14]=b,r[15]=x,r}static computeView(t,n,i,r,o){return o[0]=r.x,o[1]=i.x,o[2]=-n.x,o[3]=0,o[4]=r.y,o[5]=i.y,o[6]=-n.y,o[7]=0,o[8]=r.z,o[9]=i.z,o[10]=-n.z,o[11]=0,o[12]=-h.dot(r,t),o[13]=-h.dot(i,t),o[14]=h.dot(n,t),o[15]=1,o}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}static getElementIndex(t,n){return t*4+n}static getColumn(t,n,i){let r=n*4,o=t[r],s=t[r+1],a=t[r+2],c=t[r+3];return i.x=o,i.y=s,i.z=a,i.w=c,i}static setColumn(t,n,i,r){r=e.clone(t,r);let o=n*4;return r[o]=i.x,r[o+1]=i.y,r[o+2]=i.z,r[o+3]=i.w,r}static getRow(t,n,i){let r=t[n],o=t[n+4],s=t[n+8],a=t[n+12];return i.x=r,i.y=o,i.z=s,i.w=a,i}static setRow(t,n,i,r){return r=e.clone(t,r),r[n]=i.x,r[n+4]=i.y,r[n+8]=i.z,r[n+12]=i.w,r}static setTranslation(t,n,i){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=n.x,i[13]=n.y,i[14]=n.z,i[15]=t[15],i}static setScale(t,n,i){let r=e.getScale(t,cze),o=n.x/r.x,s=n.y/r.y,a=n.z/r.z;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*o,i[3]=t[3],i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*s,i[7]=t[7],i[8]=t[8]*a,i[9]=t[9]*a,i[10]=t[10]*a,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static setUniformScale(t,n,i){let r=e.getScale(t,lze),o=n/r.x,s=n/r.y,a=n/r.z;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*o,i[3]=t[3],i[4]=t[4]*s,i[5]=t[5]*s,i[6]=t[6]*s,i[7]=t[7],i[8]=t[8]*a,i[9]=t[9]*a,i[10]=t[10]*a,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getScale(t,n){return n.x=h.magnitude(h.fromElements(t[0],t[1],t[2],Zq)),n.y=h.magnitude(h.fromElements(t[4],t[5],t[6],Zq)),n.z=h.magnitude(h.fromElements(t[8],t[9],t[10],Zq)),n}static getMaximumScale(t){return e.getScale(t,tfe),h.maximumComponent(tfe)}static setRotation(t,n,i){let r=e.getScale(t,uze);return i[0]=n[0]*r.x,i[1]=n[1]*r.x,i[2]=n[2]*r.x,i[3]=t[3],i[4]=n[3]*r.y,i[5]=n[4]*r.y,i[6]=n[5]*r.y,i[7]=t[7],i[8]=n[6]*r.z,i[9]=n[7]*r.z,i[10]=n[8]*r.z,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static getRotation(t,n){let i=e.getScale(t,fze);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.x,n[3]=t[4]/i.y,n[4]=t[5]/i.y,n[5]=t[6]/i.y,n[6]=t[8]/i.z,n[7]=t[9]/i.z,n[8]=t[10]/i.z,n}static multiply(t,n,i){let r=t[0],o=t[1],s=t[2],a=t[3],c=t[4],u=t[5],f=t[6],d=t[7],p=t[8],g=t[9],m=t[10],y=t[11],A=t[12],b=t[13],x=t[14],T=t[15],E=n[0],v=n[1],S=n[2],I=n[3],R=n[4],O=n[5],L=n[6],_=n[7],C=n[8],w=n[9],P=n[10],M=n[11],F=n[12],V=n[13],B=n[14],j=n[15],k=r*E+c*v+p*S+A*I,G=o*E+u*v+g*S+b*I,q=s*E+f*v+m*S+x*I,Q=a*E+d*v+y*S+T*I,W=r*R+c*O+p*L+A*_,J=o*R+u*O+g*L+b*_,Z=s*R+f*O+m*L+x*_,ae=a*R+d*O+y*L+T*_,Ae=r*C+c*w+p*P+A*M,fe=o*C+u*w+g*P+b*M,xe=s*C+f*w+m*P+x*M,ge=a*C+d*w+y*P+T*M,we=r*F+c*V+p*B+A*j,Se=o*F+u*V+g*B+b*j,Re=s*F+f*V+m*B+x*j,Qe=a*F+d*V+y*B+T*j;return i[0]=k,i[1]=G,i[2]=q,i[3]=Q,i[4]=W,i[5]=J,i[6]=Z,i[7]=ae,i[8]=Ae,i[9]=fe,i[10]=xe,i[11]=ge,i[12]=we,i[13]=Se,i[14]=Re,i[15]=Qe,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i[4]=t[4]+n[4],i[5]=t[5]+n[5],i[6]=t[6]+n[6],i[7]=t[7]+n[7],i[8]=t[8]+n[8],i[9]=t[9]+n[9],i[10]=t[10]+n[10],i[11]=t[11]+n[11],i[12]=t[12]+n[12],i[13]=t[13]+n[13],i[14]=t[14]+n[14],i[15]=t[15]+n[15],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i[4]=t[4]-n[4],i[5]=t[5]-n[5],i[6]=t[6]-n[6],i[7]=t[7]-n[7],i[8]=t[8]-n[8],i[9]=t[9]-n[9],i[10]=t[10]-n[10],i[11]=t[11]-n[11],i[12]=t[12]-n[12],i[13]=t[13]-n[13],i[14]=t[14]-n[14],i[15]=t[15]-n[15],i}static multiplyTransformation(t,n,i){let r=t[0],o=t[1],s=t[2],a=t[4],c=t[5],u=t[6],f=t[8],d=t[9],p=t[10],g=t[12],m=t[13],y=t[14],A=n[0],b=n[1],x=n[2],T=n[4],E=n[5],v=n[6],S=n[8],I=n[9],R=n[10],O=n[12],L=n[13],_=n[14],C=r*A+a*b+f*x,w=o*A+c*b+d*x,P=s*A+u*b+p*x,M=r*T+a*E+f*v,F=o*T+c*E+d*v,V=s*T+u*E+p*v,B=r*S+a*I+f*R,j=o*S+c*I+d*R,k=s*S+u*I+p*R,G=r*O+a*L+f*_+g,q=o*O+c*L+d*_+m,Q=s*O+u*L+p*_+y;return i[0]=C,i[1]=w,i[2]=P,i[3]=0,i[4]=M,i[5]=F,i[6]=V,i[7]=0,i[8]=B,i[9]=j,i[10]=k,i[11]=0,i[12]=G,i[13]=q,i[14]=Q,i[15]=1,i}static multiplyByMatrix3(t,n,i){let r=t[0],o=t[1],s=t[2],a=t[4],c=t[5],u=t[6],f=t[8],d=t[9],p=t[10],g=n[0],m=n[1],y=n[2],A=n[3],b=n[4],x=n[5],T=n[6],E=n[7],v=n[8],S=r*g+a*m+f*y,I=o*g+c*m+d*y,R=s*g+u*m+p*y,O=r*A+a*b+f*x,L=o*A+c*b+d*x,_=s*A+u*b+p*x,C=r*T+a*E+f*v,w=o*T+c*E+d*v,P=s*T+u*E+p*v;return i[0]=S,i[1]=I,i[2]=R,i[3]=0,i[4]=O,i[5]=L,i[6]=_,i[7]=0,i[8]=C,i[9]=w,i[10]=P,i[11]=0,i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByTranslation(t,n,i){let r=n.x,o=n.y,s=n.z,a=r*t[0]+o*t[4]+s*t[8]+t[12],c=r*t[1]+o*t[5]+s*t[9]+t[13],u=r*t[2]+o*t[6]+s*t[10]+t[14];return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=a,i[13]=c,i[14]=u,i[15]=t[15],i}static multiplyByScale(t,n,i){let r=n.x,o=n.y,s=n.z;return r===1&&o===1&&s===1?e.clone(t,i):(i[0]=r*t[0],i[1]=r*t[1],i[2]=r*t[2],i[3]=t[3],i[4]=o*t[4],i[5]=o*t[5],i[6]=o*t[6],i[7]=t[7],i[8]=s*t[8],i[9]=s*t[9],i[10]=s*t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i)}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3],i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7],i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}static multiplyByVector(t,n,i){let r=n.x,o=n.y,s=n.z,a=n.w,c=t[0]*r+t[4]*o+t[8]*s+t[12]*a,u=t[1]*r+t[5]*o+t[9]*s+t[13]*a,f=t[2]*r+t[6]*o+t[10]*s+t[14]*a,d=t[3]*r+t[7]*o+t[11]*s+t[15]*a;return i.x=c,i.y=u,i.z=f,i.w=d,i}static multiplyByPointAsVector(t,n,i){let r=n.x,o=n.y,s=n.z,a=t[0]*r+t[4]*o+t[8]*s,c=t[1]*r+t[5]*o+t[9]*s,u=t[2]*r+t[6]*o+t[10]*s;return i.x=a,i.y=c,i.z=u,i}static multiplyByPoint(t,n,i){let r=n.x,o=n.y,s=n.z,a=t[0]*r+t[4]*o+t[8]*s+t[12],c=t[1]*r+t[5]*o+t[9]*s+t[13],u=t[2]*r+t[6]*o+t[10]*s+t[14];return i.x=a,i.y=c,i.z=u,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*n,i[9]=t[9]*n,i[10]=t[10]*n,i[11]=t[11]*n,i[12]=t[12]*n,i[13]=t[13]*n,i[14]=t[14]*n,i[15]=t[15]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n[9]=-t[9],n[10]=-t[10],n[11]=-t[11],n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=-t[15],n}static transpose(t,n){let i=t[1],r=t[2],o=t[3],s=t[6],a=t[7],c=t[11];return n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=i,n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=r,n[9]=s,n[10]=t[10],n[11]=t[14],n[12]=o,n[13]=a,n[14]=c,n[15]=t[15],n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n[9]=Math.abs(t[9]),n[10]=Math.abs(t[10]),n[11]=Math.abs(t[11]),n[12]=Math.abs(t[12]),n[13]=Math.abs(t[13]),n[14]=Math.abs(t[14]),n[15]=Math.abs(t[15]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[3]===n[3]&&t[7]===n[7]&&t[11]===n[11]&&t[15]===n[15]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i&&Math.abs(t[4]-n[4])<=i&&Math.abs(t[5]-n[5])<=i&&Math.abs(t[6]-n[6])<=i&&Math.abs(t[7]-n[7])<=i&&Math.abs(t[8]-n[8])<=i&&Math.abs(t[9]-n[9])<=i&&Math.abs(t[10]-n[10])<=i&&Math.abs(t[11]-n[11])<=i&&Math.abs(t[12]-n[12])<=i&&Math.abs(t[13]-n[13])<=i&&Math.abs(t[14]-n[14])<=i&&Math.abs(t[15]-n[15])<=i}static getTranslation(t,n){return n.x=t[12],n.y=t[13],n.z=t[14],n}static getMatrix3(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n}static inverse(t,n){let i=t[0],r=t[4],o=t[8],s=t[12],a=t[1],c=t[5],u=t[9],f=t[13],d=t[2],p=t[6],g=t[10],m=t[14],y=t[3],A=t[7],b=t[11],x=t[15],T=g*x,E=m*b,v=p*x,S=m*A,I=p*b,R=g*A,O=d*x,L=m*y,_=d*b,C=g*y,w=d*A,P=p*y,M=T*c+S*u+I*f-(E*c+v*u+R*f),F=E*a+O*u+C*f-(T*a+L*u+_*f),V=v*a+L*c+w*f-(S*a+O*c+P*f),B=R*a+_*c+P*u-(I*a+C*c+w*u),j=E*r+v*o+R*s-(T*r+S*o+I*s),k=T*i+L*o+_*s-(E*i+O*o+C*s),G=S*i+O*r+P*s-(v*i+L*r+w*s),q=I*i+C*r+w*o-(R*i+_*r+P*o);T=o*f,E=s*u,v=r*f,S=s*c,I=r*u,R=o*c,O=i*f,L=s*a,_=i*u,C=o*a,w=i*c,P=r*a;let Q=T*A+S*b+I*x-(E*A+v*b+R*x),W=E*y+O*b+C*x-(T*y+L*b+_*x),J=v*y+L*A+w*x-(S*y+O*A+P*x),Z=R*y+_*A+P*b-(I*y+C*A+w*b),ae=v*g+R*m+E*p-(I*m+T*p+S*g),Ae=_*m+T*d+L*g-(O*g+C*m+E*d),fe=O*p+P*m+S*d-(w*m+v*d+L*p),xe=w*g+I*d+C*p-(_*p+P*g+R*d),ge=i*M+r*F+o*V+s*B;if(Math.abs(ge)<D.EPSILON21){if($.equalsEpsilon(e.getMatrix3(t,dze),hze,D.EPSILON7)&&se.equals(e.getRow(t,3,mze),pze))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new oe("matrix is not invertible because its determinate is zero.")}return ge=1/ge,n[0]=M*ge,n[1]=F*ge,n[2]=V*ge,n[3]=B*ge,n[4]=j*ge,n[5]=k*ge,n[6]=G*ge,n[7]=q*ge,n[8]=Q*ge,n[9]=W*ge,n[10]=J*ge,n[11]=Z*ge,n[12]=ae*ge,n[13]=Ae*ge,n[14]=fe*ge,n[15]=xe*ge,n}static inverseTransformation(t,n){let i=t[0],r=t[1],o=t[2],s=t[4],a=t[5],c=t[6],u=t[8],f=t[9],d=t[10],p=t[12],g=t[13],m=t[14],y=-i*p-r*g-o*m,A=-s*p-a*g-c*m,b=-u*p-f*g-d*m;return n[0]=i,n[1]=s,n[2]=u,n[3]=0,n[4]=r,n[5]=a,n[6]=f,n[7]=0,n[8]=o,n[9]=c,n[10]=d,n[11]=0,n[12]=y,n[13]=A,n[14]=b,n[15]=1,n}static inverseTranspose(t,n){return e.inverse(e.transpose(t,gze),n)}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]&&t[4]===n[i+4]&&t[5]===n[i+5]&&t[6]===n[i+6]&&t[7]===n[i+7]&&t[8]===n[i+8]&&t[9]===n[i+9]&&t[10]===n[i+10]&&t[11]===n[i+11]&&t[12]===n[i+12]&&t[13]===n[i+13]&&t[14]===n[i+14]&&t[15]===n[i+15]}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`}};go.packedLength=16;go.fromArray=go.unpack;go.IDENTITY=new go(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);go.ZERO=new go(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);go.COLUMN0ROW0=0;go.COLUMN0ROW1=1;go.COLUMN0ROW2=2;go.COLUMN0ROW3=3;go.COLUMN1ROW0=4;go.COLUMN1ROW1=5;go.COLUMN1ROW2=6;go.COLUMN1ROW3=7;go.COLUMN2ROW0=8;go.COLUMN2ROW1=9;go.COLUMN2ROW2=10;go.COLUMN2ROW3=11;go.COLUMN3ROW0=12;go.COLUMN3ROW1=13;go.COLUMN3ROW2=14;go.COLUMN3ROW3=15;var fv=new h,dv=new h,_D=new h,cze=new h,lze=new h,Zq=new h,tfe=new h,uze=new h,fze=new h,dze=new $,hze=new $,mze=new se,pze=new se(0,0,0,1),gze=new go,N=go;var Ry,ps={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Pu={};Object.defineProperties(Pu,{element:{get:function(){if(Pu.supportsFullscreen())return document[ps.fullscreenElement]}},changeEventName:{get:function(){if(Pu.supportsFullscreen())return ps.fullscreenchange}},errorEventName:{get:function(){if(Pu.supportsFullscreen())return ps.fullscreenerror}},enabled:{get:function(){if(Pu.supportsFullscreen())return document[ps.fullscreenEnabled]}},fullscreen:{get:function(){if(Pu.supportsFullscreen())return Pu.element!==null}}});Pu.supportsFullscreen=function(){if(l(Ry))return Ry;Ry=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return ps.requestFullscreen="requestFullscreen",ps.exitFullscreen="exitFullscreen",ps.fullscreenEnabled="fullscreenEnabled",ps.fullscreenElement="fullscreenElement",ps.fullscreenchange="fullscreenchange",ps.fullscreenerror="fullscreenerror",Ry=!0,Ry;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,r=t.length;i<r;++i){let o=t[i];n=`${o}RequestFullscreen`,typeof e[n]=="function"?(ps.requestFullscreen=n,Ry=!0):(n=`${o}RequestFullScreen`,typeof e[n]=="function"&&(ps.requestFullscreen=n,Ry=!0)),n=`${o}ExitFullscreen`,typeof document[n]=="function"?ps.exitFullscreen=n:(n=`${o}CancelFullScreen`,typeof document[n]=="function"&&(ps.exitFullscreen=n)),n=`${o}FullscreenEnabled`,document[n]!==void 0?ps.fullscreenEnabled=n:(n=`${o}FullScreenEnabled`,document[n]!==void 0&&(ps.fullscreenEnabled=n)),n=`${o}FullscreenElement`,document[n]!==void 0?ps.fullscreenElement=n:(n=`${o}FullScreenElement`,document[n]!==void 0&&(ps.fullscreenElement=n)),n=`${o}fullscreenchange`,document[`on${n}`]!==void 0&&(o==="ms"&&(n="MSFullscreenChange"),ps.fullscreenchange=n),n=`${o}fullscreenerror`,document[`on${n}`]!==void 0&&(o==="ms"&&(n="MSFullscreenError"),ps.fullscreenerror=n)}return Ry};Pu.requestFullscreen=function(e,t){Pu.supportsFullscreen()&&e[ps.requestFullscreen]({vrDisplay:t})};Pu.exitFullscreen=function(){Pu.supportsFullscreen()&&document[ps.exitFullscreen]()};Pu._names=ps;var es=Pu;var Ed;typeof navigator<"u"?Ed=navigator:Ed={};function yD(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var kj,nfe;function iY(){if(!l(kj)&&(kj=!1,!Gj())){let e=/ Chrome\/([\.0-9]+)/.exec(Ed.userAgent);e!==null&&(kj=!0,nfe=yD(e[1]))}return kj}function _ze(){return iY()&&nfe}var Uj,ife;function rfe(){if(!l(Uj)&&(Uj=!1,!iY()&&!Gj()&&/ Safari\/[\.0-9]+/.test(Ed.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(Ed.userAgent);e!==null&&(Uj=!0,ife=yD(e[1]))}return Uj}function yze(){return rfe()&&ife}var zj,nY;function ofe(){if(!l(zj)){zj=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Ed.userAgent);e!==null&&(zj=!0,nY=yD(e[1]),nY.isNightly=!!e[2])}return zj}function Aze(){return ofe()&&nY}var Vj,sfe;function Gj(){if(!l(Vj)){Vj=!1;let e=/ Edg\/([\.0-9]+)/.exec(Ed.userAgent);e!==null&&(Vj=!0,sfe=yD(e[1]))}return Vj}function bze(){return Gj()&&sfe}var jj,rY;function Wj(){if(!l(jj)){jj=!1;let e=/Firefox\/([\.0-9]+)/.exec(Ed.userAgent);e!==null&&(jj=!0,rY=yD(e[1]))}return jj}var Qq;function xze(){return l(Qq)||(Qq=/Windows/i.test(Ed.appVersion)),Qq}var eY;function Tze(){return l(eY)||(eY=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),eY}function Eze(){return Wj()&&rY}var tY;function Cze(){return l(tY)||(tY=!Wj()&&typeof PointerEvent<"u"&&(!l(Ed.pointerEnabled)||Ed.pointerEnabled)),tY}var afe,Hj;function cfe(){if(!l(Hj)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;Hj=l(t)&&t!=="",Hj&&(afe=t)}return Hj}function vze(){return cfe()?afe:void 0}function kl(){return kl._result}kl._promise=void 0;kl._result=void 0;kl.initialize=function(){return l(kl._promise)||(kl._promise=new Promise(e=>{let t=new Image;t.onload=function(){kl._result=t.width>0&&t.height>0,e(kl._result)},t.onerror=function(){kl._result=!1,e(kl._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),kl._promise};Object.defineProperties(kl,{initialized:{get:function(){return l(kl._result)}}});var hv=[];typeof ArrayBuffer<"u"&&(hv.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&hv.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&hv.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&hv.push(BigInt64Array),typeof BigUint64Array<"u"&&hv.push(BigUint64Array));var Cd={isChrome:iY,chromeVersion:_ze,isSafari:rfe,safariVersion:yze,isWebkit:ofe,webkitVersion:Aze,isEdge:Gj,edgeVersion:bze,isFirefox:Wj,firefoxVersion:Eze,isWindows:xze,isIPadOrIOS:Tze,hardwareConcurrency:Ed.hardwareConcurrency??3,supportsPointerEvents:Cze,supportsImageRenderingPixelated:cfe,supportsWebP:kl,imageRenderingValue:vze,typedArrayTypes:hv};Cd.supportsBasis=function(e){return Cd.supportsWebAssembly()&&e.context.supportsBasis};Cd.supportsFullscreen=function(){return es.supportsFullscreen()};Cd.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};Cd.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};Cd.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};Cd.supportsBigInt=function(){return typeof BigInt<"u"};Cd.supportsWebWorkers=function(){return typeof Worker<"u"};Cd.supportsWebAssembly=function(){return typeof WebAssembly<"u"};Cd.supportsWebgl2=function(e){return e.context.webgl2};Cd.supportsEsmWebWorkers=function(){return!Wj()||parseInt(rY)>=114};var dn=Cd;function dt(e,t,n,i){this.x=e??0,this.y=t??0,this.z=n??0,this.w=i??0}var AD=new h;dt.fromAxisAngle=function(e,t,n){let i=t/2,r=Math.sin(i);AD=h.normalize(e,AD);let o=AD.x*r,s=AD.y*r,a=AD.z*r,c=Math.cos(i);return l(n)?(n.x=o,n.y=s,n.z=a,n.w=c,n):new dt(o,s,a,c)};var Sze=[1,2,0],wze=new Array(3);dt.fromRotationMatrix=function(e,t){let n,i,r,o,s,a=e[$.COLUMN0ROW0],c=e[$.COLUMN1ROW1],u=e[$.COLUMN2ROW2],f=a+c+u;if(f>0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[$.COLUMN1ROW2]-e[$.COLUMN2ROW1])*n,r=(e[$.COLUMN2ROW0]-e[$.COLUMN0ROW2])*n,o=(e[$.COLUMN0ROW1]-e[$.COLUMN1ROW0])*n;else{let d=Sze,p=0;c>a&&(p=1),u>a&&u>c&&(p=2);let g=d[p],m=d[g];n=Math.sqrt(e[$.getElementIndex(p,p)]-e[$.getElementIndex(g,g)]-e[$.getElementIndex(m,m)]+1);let y=wze;y[p]=.5*n,n=.5/n,s=(e[$.getElementIndex(m,g)]-e[$.getElementIndex(g,m)])*n,y[g]=(e[$.getElementIndex(g,p)]+e[$.getElementIndex(p,g)])*n,y[m]=(e[$.getElementIndex(m,p)]+e[$.getElementIndex(p,m)])*n,i=-y[0],r=-y[1],o=-y[2]}return l(t)?(t.x=i,t.y=r,t.z=o,t.w=s,t):new dt(i,r,o,s)};var lfe=new dt,ufe=new dt,oY=new dt,ffe=new dt;dt.fromHeadingPitchRoll=function(e,t){return ffe=dt.fromAxisAngle(h.UNIT_X,e.roll,lfe),oY=dt.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=dt.multiply(oY,ffe,oY),ufe=dt.fromAxisAngle(h.UNIT_Z,-e.heading,lfe),dt.multiply(ufe,t,t)};var qj=new h,sY=new h,zh=new dt,dfe=new dt,Yj=new dt;dt.packedLength=4;dt.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};dt.unpack=function(e,t,n){return t=t??0,l(n)||(n=new dt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};dt.packedInterpolationLength=3;dt.convertPackedArrayForInterpolation=function(e,t,n,i){dt.unpack(e,n*4,Yj),dt.conjugate(Yj,Yj);for(let r=0,o=n-t+1;r<o;r++){let s=r*3;dt.unpack(e,(t+r)*4,zh),dt.multiply(zh,Yj,zh),zh.w<0&&dt.negate(zh,zh),dt.computeAxis(zh,qj);let a=dt.computeAngle(zh);l(i)||(i=[]),i[s]=qj.x*a,i[s+1]=qj.y*a,i[s+2]=qj.z*a}};dt.unpackInterpolationResult=function(e,t,n,i,r){l(r)||(r=new dt),h.fromArray(e,0,sY);let o=h.magnitude(sY);return dt.unpack(t,i*4,dfe),o===0?dt.clone(dt.IDENTITY,zh):dt.fromAxisAngle(sY,o,zh),dt.multiply(zh,dfe,r)};dt.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new dt(e.x,e.y,e.z,e.w)};dt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};dt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};dt.magnitude=function(e){return Math.sqrt(dt.magnitudeSquared(e))};dt.normalize=function(e,t){let n=1/dt.magnitude(e),i=e.x*n,r=e.y*n,o=e.z*n,s=e.w*n;return t.x=i,t.y=r,t.z=o,t.w=s,t};dt.inverse=function(e,t){let n=dt.magnitudeSquared(e);return t=dt.conjugate(e,t),dt.multiplyByScalar(t,1/n,t)};dt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};dt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};dt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};dt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};dt.multiply=function(e,t,n){let i=e.x,r=e.y,o=e.z,s=e.w,a=t.x,c=t.y,u=t.z,f=t.w,d=s*a+i*f+r*u-o*c,p=s*c-i*u+r*f+o*a,g=s*u+i*c-r*a+o*f,m=s*f-i*a-r*c-o*u;return n.x=d,n.y=p,n.z=g,n.w=m,n};dt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};dt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};dt.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<D.EPSILON6||Math.abs(n+1)<D.EPSILON6)return t.x=1,t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};dt.computeAngle=function(e){return Math.abs(e.w-1)<D.EPSILON6?0:2*Math.acos(e.w)};var aY=new dt;dt.lerp=function(e,t,n,i){return aY=dt.multiplyByScalar(t,n,aY),i=dt.multiplyByScalar(e,1-n,i),dt.add(aY,i,i)};var hfe=new dt,cY=new dt,lY=new dt;dt.slerp=function(e,t,n,i){let r=dt.dot(e,t),o=t;if(r<0&&(r=-r,o=hfe=dt.negate(t,hfe)),1-r<D.EPSILON6)return dt.lerp(e,o,n,i);let s=Math.acos(r);return cY=dt.multiplyByScalar(e,Math.sin((1-n)*s),cY),lY=dt.multiplyByScalar(o,Math.sin(n*s),lY),i=dt.add(cY,lY,i),dt.multiplyByScalar(i,1/Math.sin(s),i)};dt.log=function(e,t){let n=D.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),h.multiplyByScalar(e,i,t)};dt.exp=function(e,t){let n=h.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var Ize=new h,Pze=new h,bD=new dt,mv=new dt;dt.computeInnerQuadrangle=function(e,t,n,i){let r=dt.conjugate(t,bD);dt.multiply(r,n,mv);let o=dt.log(mv,Ize);dt.multiply(r,e,mv);let s=dt.log(mv,Pze);return h.add(o,s,o),h.multiplyByScalar(o,.25,o),h.negate(o,o),dt.exp(o,bD),dt.multiply(t,bD,i)};dt.squad=function(e,t,n,i,r,o){let s=dt.slerp(e,t,r,bD),a=dt.slerp(n,i,r,mv);return dt.slerp(s,a,2*r*(1-r),o)};var Dze=new dt,mfe=1.9011074535173003,Xj=dn.supportsTypedArrays()?new Float32Array(8):[],Kj=dn.supportsTypedArrays()?new Float32Array(8):[],rg=dn.supportsTypedArrays()?new Float32Array(8):[],og=dn.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;Xj[e]=1/(t*n),Kj[e]=t/n}Xj[7]=mfe/136;Kj[7]=mfe*8/17;dt.fastSlerp=function(e,t,n,i){let r=dt.dot(e,t),o;r>=0?o=1:(o=-1,r=-r);let s=r-1,a=1-n,c=n*n,u=a*a;for(let g=7;g>=0;--g)rg[g]=(Xj[g]*c-Kj[g])*s,og[g]=(Xj[g]*u-Kj[g])*s;let f=o*n*(1+rg[0]*(1+rg[1]*(1+rg[2]*(1+rg[3]*(1+rg[4]*(1+rg[5]*(1+rg[6]*(1+rg[7])))))))),d=a*(1+og[0]*(1+og[1]*(1+og[2]*(1+og[3]*(1+og[4]*(1+og[5]*(1+og[6]*(1+og[7])))))))),p=dt.multiplyByScalar(e,d,Dze);return dt.multiplyByScalar(t,f,i),dt.add(p,i,i)};dt.fastSquad=function(e,t,n,i,r,o){let s=dt.fastSlerp(e,t,r,bD),a=dt.fastSlerp(n,i,r,mv);return dt.fastSlerp(s,a,2*r*(1-r),o)};dt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};dt.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};dt.ZERO=Object.freeze(new dt(0,0,0,0));dt.IDENTITY=Object.freeze(new dt(0,0,0,1));dt.prototype.clone=function(e){return dt.clone(this,e)};dt.prototype.equals=function(e){return dt.equals(this,e)};dt.prototype.equalsEpsilon=function(e,t){return dt.equalsEpsilon(this,e,t)};dt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Le=dt;var Ei={},uY={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},pv={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},fY={},Du={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},Oy=new h,My=new h,Ny=new h;Ei.localFrameToFixedFrameGenerator=function(e,t){if(!uY.hasOwnProperty(e)||!uY[e].hasOwnProperty(t))throw new pe("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=uY[e][t],i,r=e+t;return l(fY[r])?i=fY[r]:(i=function(o,s,a){if(l(a)||(a=new N),h.equalsEpsilon(o,h.ZERO,D.EPSILON14))h.unpack(pv[e],0,Oy),h.unpack(pv[t],0,My),h.unpack(pv[n],0,Ny);else if(D.equalsEpsilon(o.x,0,D.EPSILON14)&&D.equalsEpsilon(o.y,0,D.EPSILON14)){let c=D.sign(o.z);h.unpack(pv[e],0,Oy),e!=="east"&&e!=="west"&&h.multiplyByScalar(Oy,c,Oy),h.unpack(pv[t],0,My),t!=="east"&&t!=="west"&&h.multiplyByScalar(My,c,My),h.unpack(pv[n],0,Ny),n!=="east"&&n!=="west"&&h.multiplyByScalar(Ny,c,Ny)}else{s=s??ee.default,s.geodeticSurfaceNormal(o,Du.up);let c=Du.up,u=Du.east;u.x=-o.y,u.y=o.x,u.z=0,h.normalize(u,Du.east),h.cross(c,u,Du.north),h.multiplyByScalar(Du.up,-1,Du.down),h.multiplyByScalar(Du.east,-1,Du.west),h.multiplyByScalar(Du.north,-1,Du.south),Oy=Du[e],My=Du[t],Ny=Du[n]}return a[0]=Oy.x,a[1]=Oy.y,a[2]=Oy.z,a[3]=0,a[4]=My.x,a[5]=My.y,a[6]=My.z,a[7]=0,a[8]=Ny.x,a[9]=Ny.y,a[10]=Ny.z,a[11]=0,a[12]=o.x,a[13]=o.y,a[14]=o.z,a[15]=1,a},fY[r]=i),i};Ei.eastNorthUpToFixedFrame=Ei.localFrameToFixedFrameGenerator("east","north");Ei.northEastDownToFixedFrame=Ei.localFrameToFixedFrameGenerator("north","east");Ei.northUpEastToFixedFrame=Ei.localFrameToFixedFrameGenerator("north","up");Ei.northWestUpToFixedFrame=Ei.localFrameToFixedFrameGenerator("north","west");var Rze=new Le,Oze=new h(1,1,1),Mze=new N;Ei.headingPitchRollToFixedFrame=function(e,t,n,i,r){i=i??Ei.eastNorthUpToFixedFrame;let o=Le.fromHeadingPitchRoll(t,Rze),s=N.fromTranslationQuaternionRotationScale(h.ZERO,o,Oze,Mze);return r=i(e,n,r),N.multiply(r,s,r)};var Nze=new N,Lze=new $;Ei.headingPitchRollQuaternion=function(e,t,n,i,r){let o=Ei.headingPitchRollToFixedFrame(e,t,n,i,Nze),s=N.getMatrix3(o,Lze);return Le.fromRotationMatrix(s,r)};var Fze=new h(1,1,1),Bze=new h,pfe=new N,kze=new N,Uze=new $,zze=new Le;Ei.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??ee.default,n=n??Ei.eastNorthUpToFixedFrame,l(i)||(i=new wc);let r=N.getTranslation(e,Bze);if(h.equals(r,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let o=N.inverseTransformation(n(r,t,pfe),pfe),s=N.setScale(e,Fze,kze);s=N.setTranslation(s,h.ZERO,s),o=N.multiply(o,s,o);let a=Le.fromRotationMatrix(N.getMatrix3(o,Uze),zze);return a=Le.normalize(a,a),wc.fromQuaternion(a,i)};var Vze=6*3600+2460+50.54841,jze=8640184812866e-6,Hze=.093104,Gze=-62e-7,Wze=11772758384668e-32,qze=72921158553e-15,Yze=D.TWO_PI/86400,$j=new K;Ei.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=Ei.computeIcrfToFixedMatrix(e,t);return l(n)||(n=Ei.computeTemeToPseudoFixedMatrix(e,t)),n};Ei.computeTemeToPseudoFixedMatrix=function(e,t){$j=K.addSeconds(e,-K.computeTaiMinusUtc(e),$j);let n=$j.dayNumber,i=$j.secondsOfDay,r,o=n-2451545;i>=43200?r=(o+.5)/kn.DAYS_PER_JULIAN_CENTURY:r=(o-.5)/kn.DAYS_PER_JULIAN_CENTURY;let a=(Vze+r*(jze+r*(Hze+r*Gze)))*Yze%D.TWO_PI,c=qze+Wze*(n-24515455e-1),u=(i+kn.SECONDS_PER_DAY*.5)%kn.SECONDS_PER_DAY,f=a+c*u,d=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=d,t[1]=-p,t[2]=0,t[3]=p,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new $(d,p,0,-p,d,0,0,0,1)};Ei.iau2006XysData=new gD;Ei.earthOrientationParameters=pD.NONE;var mY=32.184,Xze=2451545;Ei.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+mY,i=e.stop.dayNumber,r=e.stop.secondsOfDay+mY;return Ei.iau2006XysData.preload(t,n,i,r)};Ei.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new $);let n=Ei.computeFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var Kze=32.184,$ze=2451545,Jj=new wc,Jze=new $,Zze=new K;Ei.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=K.addSeconds(e,Kze,Zze),i=K.totalDays(n)-$ze,r=D.toRadians(12.112)-D.toRadians(.052992)*i,o=D.toRadians(24.224)-D.toRadians(.105984)*i,s=D.toRadians(227.645)+D.toRadians(13.012)*i,a=D.toRadians(261.105)+D.toRadians(13.340716)*i,c=D.toRadians(358)+D.toRadians(.9856)*i;return Jj.pitch=D.toRadians(180)-D.toRadians(3.878)*Math.sin(r)-D.toRadians(.12)*Math.sin(o)+D.toRadians(.07)*Math.sin(s)-D.toRadians(.017)*Math.sin(a),Jj.roll=D.toRadians(66.53-90)+D.toRadians(1.543)*Math.cos(r)+D.toRadians(.24)*Math.cos(o)-D.toRadians(.028)*Math.cos(s)+D.toRadians(.007)*Math.cos(a),Jj.heading=D.toRadians(244.375-90)+D.toRadians(13.17635831)*i+D.toRadians(3.558)*Math.sin(r)+D.toRadians(.121)*Math.sin(o)-D.toRadians(.064)*Math.sin(s)+D.toRadians(.016)*Math.sin(a)+D.toRadians(.025)*Math.sin(c),$.fromHeadingPitchRoll(Jj,Jze,t)};Ei.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new $);let n=Ei.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return $.transpose(n,t)};var Qze=new cx(0,0,0),eVe=new wy(0,0,0,0,0,0),dY=new $,hY=new $;Ei.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new $);let n=Ei.earthOrientationParameters.compute(e,eVe);if(!l(n))return;let i=e.dayNumber,r=e.secondsOfDay+mY,o=Ei.iau2006XysData.computeXysRadians(i,r,Qze);if(!l(o))return;let s=o.x+n.xPoleOffset,a=o.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),u=dY;u[0]=1-c*s*s,u[3]=-c*s*a,u[6]=s,u[1]=-c*s*a,u[4]=1-c*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-c*(s*s+a*a);let f=$.fromRotationZ(-o.s,hY),d=$.multiply(u,f,dY),p=e.dayNumber,g=e.secondsOfDay-K.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,y=g/kn.SECONDS_PER_DAY,A=.779057273264+y+.00273781191135448*(m+y);A=A%1*D.TWO_PI;let b=$.fromRotationZ(A,hY),x=$.multiply(d,b,dY),T=Math.cos(n.xPoleWander),E=Math.cos(n.yPoleWander),v=Math.sin(n.xPoleWander),S=Math.sin(n.yPoleWander),I=i-Xze+r/kn.SECONDS_PER_DAY;I/=36525;let R=-47e-6*I*D.RADIANS_PER_DEGREE/3600,O=Math.cos(R),L=Math.sin(R),_=hY;return _[0]=T*O,_[1]=T*L,_[2]=v,_[3]=-E*L+S*v*O,_[4]=E*O+S*v*L,_[5]=-S*T,_[6]=-S*L-E*v*O,_[7]=S*O-E*v*L,_[8]=E*T,$.multiply(x,_,t)};var tVe=new se;Ei.pointToWindowCoordinates=function(e,t,n,i){return i=Ei.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Ei.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new U);let r=tVe;return N.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,r),r),se.multiplyByScalar(r,1/r.w,r),N.multiplyByVector(t,r,r),U.fromCartesian4(r,i)};var nVe=new h,iVe=new h,rVe=new h;Ei.rotationMatrixFromPositionVelocity=function(e,t,n,i){let r=(n??ee.default).geodeticSurfaceNormal(e,nVe),o=h.cross(t,r,iVe);h.equalsEpsilon(o,h.ZERO,D.EPSILON6)&&(o=h.clone(h.UNIT_X,o));let s=h.cross(o,t,rVe);return h.normalize(s,s),h.cross(t,s,o),h.negate(o,o),h.normalize(o,o),l(i)||(i=new $),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=o.x,i[4]=o.y,i[5]=o.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};Ei.SWIZZLE_3D_TO_2D_MATRIX=Object.freeze(new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1));var gfe=new he,pY=new h,oVe=new h,sVe=new $,gY=new N,_fe=new N;Ei.basisTo2D=function(e,t,n){let i=N.getTranslation(t,oVe),r=e.ellipsoid,o;if(h.equals(i,h.ZERO))o=h.clone(h.ZERO,pY);else{let f=r.cartesianToCartographic(i,gfe);o=e.project(f,pY),h.fromElements(o.z,o.x,o.y,o)}let s=Ei.eastNorthUpToFixedFrame(i,r,gY),a=N.inverseTransformation(s,_fe),c=N.getMatrix3(t,sVe),u=N.multiplyByMatrix3(a,c,n);return N.multiply(Ei.SWIZZLE_3D_TO_2D_MATRIX,u,n),N.setTranslation(n,o,n),n};Ei.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,r=Ei.eastNorthUpToFixedFrame(t,i,gY),o=N.inverseTransformation(r,_fe),s=i.cartesianToCartographic(t,gfe),a=e.project(s,pY);h.fromElements(a.z,a.x,a.y,a);let c=N.fromTranslation(a,gY);return N.multiply(Ei.SWIZZLE_3D_TO_2D_MATRIX,o,n),N.multiply(c,n,n),n};var At=Ei;var gv=class e{constructor(t,n,i,r){this.west=t??0,this.south=n??0,this.east=i??0,this.north=r??0}get width(){return e.computeWidth(this)}get height(){return e.computeHeight(this)}static pack(t,n,i){return i=i??0,n[i++]=t.west,n[i++]=t.south,n[i++]=t.east,n[i]=t.north,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.west=t[n++],i.south=t[n++],i.east=t[n++],i.north=t[n],i}static computeWidth(t){let n=t.east,i=t.west;return n<i&&(n+=D.TWO_PI),n-i}static computeHeight(t){return t.north-t.south}static fromDegrees(t,n,i,r,o){return t=D.toRadians(t??0),n=D.toRadians(n??0),i=D.toRadians(i??0),r=D.toRadians(r??0),l(o)?(o.west=t,o.south=n,o.east=i,o.north=r,o):new e(t,n,i,r)}static fromRadians(t,n,i,r,o){return l(o)?(o.west=t??0,o.south=n??0,o.east=i??0,o.north=r??0,o):new e(t,n,i,r)}static fromCartographicArray(t,n){let i=Number.MAX_VALUE,r=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=t.length;u<f;u++){let d=t[u];i=Math.min(i,d.longitude),r=Math.max(r,d.longitude),a=Math.min(a,d.latitude),c=Math.max(c,d.latitude);let p=d.longitude>=0?d.longitude:d.longitude+D.TWO_PI;o=Math.min(o,p),s=Math.max(s,p)}return r-i>s-o&&(i=o,r=s,r>D.PI&&(r=r-D.TWO_PI),i>D.PI&&(i=i-D.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=r,n.north=c,n):new e(i,a,r,c)}static fromCartesianArray(t,n,i){n=n??ee.default;let r=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(let f=0,d=t.length;f<d;f++){let p=n.cartesianToCartographic(t[f]);r=Math.min(r,p.longitude),o=Math.max(o,p.longitude),c=Math.min(c,p.latitude),u=Math.max(u,p.latitude);let g=p.longitude>=0?p.longitude:p.longitude+D.TWO_PI;s=Math.min(s,g),a=Math.max(a,g)}return o-r>a-s&&(r=s,o=a,o>D.PI&&(o=o-D.TWO_PI),r>D.PI&&(r=r-D.TWO_PI)),l(i)?(i.west=r,i.south=c,i.east=o,i.north=u,i):new e(r,c,o,u)}static fromBoundingSphere(t,n,i){let r=t.center,o=t.radius;if(l(n)||(n=ee.default),l(i)||(i=new e),h.equals(r,h.ZERO))return e.clone(e.MAX_VALUE,i),i;let s=At.eastNorthUpToFixedFrame(r,n,aVe),a=N.multiplyByPointAsVector(s,h.UNIT_X,cVe);h.normalize(a,a);let c=N.multiplyByPointAsVector(s,h.UNIT_Y,lVe);h.normalize(c,c),h.multiplyByScalar(c,o,c),h.multiplyByScalar(a,o,a);let u=h.negate(c,fVe),f=h.negate(a,uVe),d=_Y,p=d[0];return h.add(r,c,p),p=d[1],h.add(r,f,p),p=d[2],h.add(r,u,p),p=d[3],h.add(r,a,p),d[4]=r,e.fromCartesianArray(d,n,i)}static clone(t,n){if(l(t))return l(n)?(n.west=t.west,n.south=t.south,n.east=t.east,n.north=t.north,n):new e(t.west,t.south,t.east,t.north)}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t.west-n.west)<=i&&Math.abs(t.south-n.south)<=i&&Math.abs(t.east-n.east)<=i&&Math.abs(t.north-n.north)<=i}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}static equals(t,n){return t===n||l(t)&&l(n)&&t.west===n.west&&t.south===n.south&&t.east===n.east&&t.north===n.north}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}static _validate(t){}static southwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new he(t.west,t.south)}static northwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new he(t.west,t.north)}static northeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new he(t.east,t.north)}static southeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new he(t.east,t.south)}static center(t,n){let i=t.east,r=t.west;i<r&&(i+=D.TWO_PI);let o=D.negativePiToPi((r+i)*.5),s=(t.south+t.north)*.5;return l(n)?(n.longitude=o,n.latitude=s,n.height=0,n):new he(o,s)}static intersection(t,n,i){let r=t.east,o=t.west,s=n.east,a=n.west;r<o&&s>0?r+=D.TWO_PI:s<a&&r>0&&(s+=D.TWO_PI),r<o&&a<0?a+=D.TWO_PI:s<a&&o<0&&(o+=D.TWO_PI);let c=D.negativePiToPi(Math.max(o,a)),u=D.negativePiToPi(Math.min(r,s));if(c===D.PI&&u<D.PI&&(c=-D.PI),(t.west<t.east||n.west<n.east)&&u<=c)return;let f=Math.max(t.south,n.south),d=Math.min(t.north,n.north);if(!(f>=d))return l(i)?(i.west=c,i.south=f,i.east=u,i.north=d,i):new e(c,f,u,d)}static simpleIntersection(t,n,i){let r=Math.max(t.west,n.west),o=Math.max(t.south,n.south),s=Math.min(t.east,n.east),a=Math.min(t.north,n.north);if(!(o>=a||r>=s))return l(i)?(i.west=r,i.south=o,i.east=s,i.north=a,i):new e(r,o,s,a)}static union(t,n,i){l(i)||(i=new e);let r=t.east,o=t.west,s=n.east,a=n.west;r<o&&s>0?r+=D.TWO_PI:s<a&&r>0&&(s+=D.TWO_PI),r<o&&a<0?a+=D.TWO_PI:s<a&&o<0&&(o+=D.TWO_PI);let c=D.negativePiToPi(Math.min(o,a)),u=D.negativePiToPi(Math.max(r,s));return i.west=c,i.south=Math.min(t.south,n.south),i.east=u,i.north=Math.max(t.north,n.north),i}static expand(t,n,i){return l(i)||(i=new e),i.west=Math.min(t.west,n.longitude),i.south=Math.min(t.south,n.latitude),i.east=Math.max(t.east,n.longitude),i.north=Math.max(t.north,n.latitude),i}static contains(t,n){let i=n.longitude,r=n.latitude,o=t.west,s=t.east;return s<o&&(s+=D.TWO_PI,i<0&&(i+=D.TWO_PI)),(i>o||D.equalsEpsilon(i,o,D.EPSILON14))&&(i<s||D.equalsEpsilon(i,s,D.EPSILON14))&&r>=t.south&&r<=t.north}static subsample(t,n,i,r){n=n??ee.default,i=i??0,l(r)||(r=[]);let o=0,s=t.north,a=t.south,c=t.east,u=t.west,f=dVe;f.height=i,f.longitude=u,f.latitude=s,r[o]=n.cartographicToCartesian(f,r[o]),o++,f.longitude=c,r[o]=n.cartographicToCartesian(f,r[o]),o++,f.latitude=a,r[o]=n.cartographicToCartesian(f,r[o]),o++,f.longitude=u,r[o]=n.cartographicToCartesian(f,r[o]),o++,s<0?f.latitude=s:a>0?f.latitude=a:f.latitude=0;for(let d=1;d<8;++d)f.longitude=-Math.PI+d*D.PI_OVER_TWO,e.contains(t,f)&&(r[o]=n.cartographicToCartesian(f,r[o]),o++);return f.latitude===0&&(f.longitude=u,r[o]=n.cartographicToCartesian(f,r[o]),o++,f.longitude=c,r[o]=n.cartographicToCartesian(f,r[o]),o++),r.length=o,r}static subsection(t,n,i,r,o,s){if(l(s)||(s=new e),t.west<=t.east){let c=t.east-t.west;s.west=t.west+n*c,s.east=t.west+r*c}else{let c=D.TWO_PI+t.east-t.west;s.west=D.negativePiToPi(t.west+n*c),s.east=D.negativePiToPi(t.west+r*c)}let a=t.north-t.south;return s.south=t.south+i*a,s.north=t.south+o*a,n===1&&(s.west=t.east),r===1&&(s.east=t.east),i===1&&(s.south=t.north),o===1&&(s.north=t.north),s}};gv.packedLength=4;var aVe=new N,cVe=new h,lVe=new h,uVe=new h,fVe=new h,_Y=new Array(5);for(let e=0;e<_Y.length;++e)_Y[e]=new h;var dVe=new he;gv.MAX_VALUE=Object.freeze(new gv(-Math.PI,-D.PI_OVER_TWO,Math.PI,D.PI_OVER_TWO));var ie=gv;function gs(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}gs.packedLength=4;gs.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};gs.unpack=function(e,t,n){return t=t??0,l(n)||(n=new gs),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};gs.fromPoints=function(e,t){if(l(t)||(t=new gs),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,r=e[0].y,o=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],u=c.x,f=c.y;i=Math.min(u,i),o=Math.max(u,o),r=Math.min(f,r),s=Math.max(f,s)}return t.x=i,t.y=r,t.width=o-i,t.height=s-r,t};var yfe=new Ui,hVe=new he,mVe=new he;gs.fromRectangle=function(e,t,n){if(l(n)||(n=new gs),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;yfe._ellipsoid=ee.default,t=t??yfe;let i=t.project(ie.southwest(e,hVe)),r=t.project(ie.northeast(e,mVe));return U.subtract(r,i,r),n.x=i.x,n.y=i.y,n.width=r.x,n.height=r.y,n};gs.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new gs(e.x,e.y,e.width,e.height)};gs.union=function(e,t,n){l(n)||(n=new gs);let i=Math.min(e.x,t.x),r=Math.min(e.y,t.y),o=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=r,n.width=o-i,n.height=s-r,n};gs.expand=function(e,t,n){n=gs.clone(e,n);let i=t.x-n.x,r=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),r>n.height?n.height=r:r<0&&(n.height-=r,n.y=t.y),n};gs.intersect=function(e,t){let n=e.x,i=e.y,r=t.x,o=t.y;return n>r+t.width||n+e.width<r||i+e.height<o||i>o+t.height?$t.OUTSIDE:$t.INTERSECTING};gs.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};gs.prototype.clone=function(e){return gs.clone(this,e)};gs.prototype.intersect=function(e){return gs.intersect(this,e)};gs.prototype.equals=function(e){return gs.equals(this,e)};var et=gs;function yY(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var _e=class e{constructor(t,n,i,r){this.red=t??1,this.green=n??1,this.blue=i??1,this.alpha=r??1}static fromCartesian4(t,n){return l(n)?(n.red=t.x,n.green=t.y,n.blue=t.z,n.alpha=t.w,n):new e(t.x,t.y,t.z,t.w)}static fromBytes(t,n,i,r,o){return t=e.byteToFloat(t??255),n=e.byteToFloat(n??255),i=e.byteToFloat(i??255),r=e.byteToFloat(r??255),l(o)?(o.red=t,o.green=n,o.blue=i,o.alpha=r,o):new e(t,n,i,r)}static fromAlpha(t,n,i){return l(i)?(i.red=t.red,i.green=t.green,i.blue=t.blue,i.alpha=n,i):new e(t.red,t.green,t.blue,n)}static fromRgba(t,n){return bY[0]=t,e.fromBytes(sg[0],sg[1],sg[2],sg[3],n)}static fromHsl(t,n,i,r,o){t=(t??0)%1,n=n??0,i=i??0,r=r??1;let s=i,a=i,c=i;if(n!==0){let u;i<.5?u=i*(1+n):u=i+n-i*n;let f=2*i-u;s=yY(f,u,t+1/3),a=yY(f,u,t),c=yY(f,u,t-1/3)}return l(o)?(o.red=s,o.green=a,o.blue=c,o.alpha=r,o):new e(s,a,c,r)}static fromRandom(t,n){t=t??H.EMPTY_OBJECT;let i=t.red;if(!l(i)){let a=t.minimumRed??0,c=t.maximumRed??1;i=a+D.nextRandomNumber()*(c-a)}let r=t.green;if(!l(r)){let a=t.minimumGreen??0,c=t.maximumGreen??1;r=a+D.nextRandomNumber()*(c-a)}let o=t.blue;if(!l(o)){let a=t.minimumBlue??0,c=t.maximumBlue??1;o=a+D.nextRandomNumber()*(c-a)}let s=t.alpha;if(!l(s)){let a=t.minimumAlpha??0,c=t.maximumAlpha??1;s=a+D.nextRandomNumber()*(c-a)}return l(n)?(n.red=i,n.green=r,n.blue=o,n.alpha=s,n):new e(i,r,o,s)}static fromCssColorString(t,n){l(n)||(n=new e),t=t.trim();let i=e[t.toUpperCase()];if(l(i))return e.clone(i,n),n;let r=pVe.exec(t);return r!==null?(n.red=parseInt(r[1],16)/15,n.green=parseInt(r[2],16)/15,n.blue=parseInt(r[3],16)/15,n.alpha=parseInt(r[4]??"f",16)/15,n):(r=gVe.exec(t),r!==null?(n.red=parseInt(r[1],16)/255,n.green=parseInt(r[2],16)/255,n.blue=parseInt(r[3],16)/255,n.alpha=parseInt(r[4]??"ff",16)/255,n):(r=_Ve.exec(t),r!==null?(n.red=parseFloat(r[1])/(r[1].substr(-1)==="%"?100:255),n.green=parseFloat(r[2])/(r[2].substr(-1)==="%"?100:255),n.blue=parseFloat(r[3])/(r[3].substr(-1)==="%"?100:255),n.alpha=parseFloat(r[4]??"1.0"),n):(r=yVe.exec(t),r!==null?e.fromHsl(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,parseFloat(r[4]??"1.0"),n):(n=void 0,n))))}static pack(t,n,i){return i=i??0,n[i++]=t.red,n[i++]=t.green,n[i++]=t.blue,n[i]=t.alpha,n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i.red=t[n++],i.green=t[n++],i.blue=t[n++],i.alpha=t[n],i}static byteToFloat(t){return t/255}static floatToByte(t){return t===1?255:t*256|0}static clone(t,n){if(l(t))return l(n)?(n.red=t.red,n.green=t.green,n.blue=t.blue,n.alpha=t.alpha,n):new e(t.red,t.green,t.blue,t.alpha)}static equals(t,n){return t===n||l(t)&&l(n)&&t.red===n.red&&t.green===n.green&&t.blue===n.blue&&t.alpha===n.alpha}static equalsArray(t,n,i){return t.red===n[i]&&t.green===n[i+1]&&t.blue===n[i+2]&&t.alpha===n[i+3]}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return this===t||l(t)&&Math.abs(this.red-t.red)<=n&&Math.abs(this.green-t.green)<=n&&Math.abs(this.blue-t.blue)<=n&&Math.abs(this.alpha-t.alpha)<=n}toString(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`}toCssColorString(){let t=e.floatToByte(this.red),n=e.floatToByte(this.green),i=e.floatToByte(this.blue);return this.alpha===1?`rgb(${t},${n},${i})`:`rgba(${t},${n},${i},${this.alpha})`}toCssHexString(){let t=e.floatToByte(this.red).toString(16);t.length<2&&(t=`0${t}`);let n=e.floatToByte(this.green).toString(16);n.length<2&&(n=`0${n}`);let i=e.floatToByte(this.blue).toString(16);if(i.length<2&&(i=`0${i}`),this.alpha<1){let r=e.floatToByte(this.alpha).toString(16);return r.length<2&&(r=`0${r}`),`#${t}${n}${i}${r}`}return`#${t}${n}${i}`}toBytes(t){let n=e.floatToByte(this.red),i=e.floatToByte(this.green),r=e.floatToByte(this.blue),o=e.floatToByte(this.alpha);return l(t)?(t[0]=n,t[1]=i,t[2]=r,t[3]=o,t):[n,i,r,o]}static bytesToRgba(t,n,i,r){return sg[0]=t,sg[1]=n,sg[2]=i,sg[3]=r,bY[0]}toRgba(){return e.bytesToRgba(e.floatToByte(this.red),e.floatToByte(this.green),e.floatToByte(this.blue),e.floatToByte(this.alpha))}brighten(t,n){return t=1-t,n.red=1-(1-this.red)*t,n.green=1-(1-this.green)*t,n.blue=1-(1-this.blue)*t,n.alpha=this.alpha,n}darken(t,n){return t=1-t,n.red=this.red*t,n.green=this.green*t,n.blue=this.blue*t,n.alpha=this.alpha,n}withAlpha(t,n){return e.fromAlpha(this,t,n)}static add(t,n,i){return i.red=t.red+n.red,i.green=t.green+n.green,i.blue=t.blue+n.blue,i.alpha=t.alpha+n.alpha,i}static subtract(t,n,i){return i.red=t.red-n.red,i.green=t.green-n.green,i.blue=t.blue-n.blue,i.alpha=t.alpha-n.alpha,i}static multiply(t,n,i){return i.red=t.red*n.red,i.green=t.green*n.green,i.blue=t.blue*n.blue,i.alpha=t.alpha*n.alpha,i}static divide(t,n,i){return i.red=t.red/n.red,i.green=t.green/n.green,i.blue=t.blue/n.blue,i.alpha=t.alpha/n.alpha,i}static mod(t,n,i){return i.red=t.red%n.red,i.green=t.green%n.green,i.blue=t.blue%n.blue,i.alpha=t.alpha%n.alpha,i}static lerp(t,n,i,r){return r.red=D.lerp(t.red,n.red,i),r.green=D.lerp(t.green,n.green,i),r.blue=D.lerp(t.blue,n.blue,i),r.alpha=D.lerp(t.alpha,n.alpha,i),r}static multiplyByScalar(t,n,i){return i.red=t.red*n,i.green=t.green*n,i.blue=t.blue*n,i.alpha=t.alpha*n,i}static divideByScalar(t,n,i){return i.red=t.red/n,i.green=t.green/n,i.blue=t.blue/n,i.alpha=t.alpha/n,i}},AY,bY,sg;dn.supportsTypedArrays()&&(AY=new ArrayBuffer(4),bY=new Uint32Array(AY),sg=new Uint8Array(AY));var pVe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,gVe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,_Ve=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,yVe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;_e.packedLength=4;_e.ALICEBLUE=Object.freeze(_e.fromCssColorString("#F0F8FF"));_e.ANTIQUEWHITE=Object.freeze(_e.fromCssColorString("#FAEBD7"));_e.AQUA=Object.freeze(_e.fromCssColorString("#00FFFF"));_e.AQUAMARINE=Object.freeze(_e.fromCssColorString("#7FFFD4"));_e.AZURE=Object.freeze(_e.fromCssColorString("#F0FFFF"));_e.BEIGE=Object.freeze(_e.fromCssColorString("#F5F5DC"));_e.BISQUE=Object.freeze(_e.fromCssColorString("#FFE4C4"));_e.BLACK=Object.freeze(_e.fromCssColorString("#000000"));_e.BLANCHEDALMOND=Object.freeze(_e.fromCssColorString("#FFEBCD"));_e.BLUE=Object.freeze(_e.fromCssColorString("#0000FF"));_e.BLUEVIOLET=Object.freeze(_e.fromCssColorString("#8A2BE2"));_e.BROWN=Object.freeze(_e.fromCssColorString("#A52A2A"));_e.BURLYWOOD=Object.freeze(_e.fromCssColorString("#DEB887"));_e.CADETBLUE=Object.freeze(_e.fromCssColorString("#5F9EA0"));_e.CHARTREUSE=Object.freeze(_e.fromCssColorString("#7FFF00"));_e.CHOCOLATE=Object.freeze(_e.fromCssColorString("#D2691E"));_e.CORAL=Object.freeze(_e.fromCssColorString("#FF7F50"));_e.CORNFLOWERBLUE=Object.freeze(_e.fromCssColorString("#6495ED"));_e.CORNSILK=Object.freeze(_e.fromCssColorString("#FFF8DC"));_e.CRIMSON=Object.freeze(_e.fromCssColorString("#DC143C"));_e.CYAN=Object.freeze(_e.fromCssColorString("#00FFFF"));_e.DARKBLUE=Object.freeze(_e.fromCssColorString("#00008B"));_e.DARKCYAN=Object.freeze(_e.fromCssColorString("#008B8B"));_e.DARKGOLDENROD=Object.freeze(_e.fromCssColorString("#B8860B"));_e.DARKGRAY=Object.freeze(_e.fromCssColorString("#A9A9A9"));_e.DARKGREEN=Object.freeze(_e.fromCssColorString("#006400"));_e.DARKGREY=_e.DARKGRAY;_e.DARKKHAKI=Object.freeze(_e.fromCssColorString("#BDB76B"));_e.DARKMAGENTA=Object.freeze(_e.fromCssColorString("#8B008B"));_e.DARKOLIVEGREEN=Object.freeze(_e.fromCssColorString("#556B2F"));_e.DARKORANGE=Object.freeze(_e.fromCssColorString("#FF8C00"));_e.DARKORCHID=Object.freeze(_e.fromCssColorString("#9932CC"));_e.DARKRED=Object.freeze(_e.fromCssColorString("#8B0000"));_e.DARKSALMON=Object.freeze(_e.fromCssColorString("#E9967A"));_e.DARKSEAGREEN=Object.freeze(_e.fromCssColorString("#8FBC8F"));_e.DARKSLATEBLUE=Object.freeze(_e.fromCssColorString("#483D8B"));_e.DARKSLATEGRAY=Object.freeze(_e.fromCssColorString("#2F4F4F"));_e.DARKSLATEGREY=_e.DARKSLATEGRAY;_e.DARKTURQUOISE=Object.freeze(_e.fromCssColorString("#00CED1"));_e.DARKVIOLET=Object.freeze(_e.fromCssColorString("#9400D3"));_e.DEEPPINK=Object.freeze(_e.fromCssColorString("#FF1493"));_e.DEEPSKYBLUE=Object.freeze(_e.fromCssColorString("#00BFFF"));_e.DIMGRAY=Object.freeze(_e.fromCssColorString("#696969"));_e.DIMGREY=_e.DIMGRAY;_e.DODGERBLUE=Object.freeze(_e.fromCssColorString("#1E90FF"));_e.FIREBRICK=Object.freeze(_e.fromCssColorString("#B22222"));_e.FLORALWHITE=Object.freeze(_e.fromCssColorString("#FFFAF0"));_e.FORESTGREEN=Object.freeze(_e.fromCssColorString("#228B22"));_e.FUCHSIA=Object.freeze(_e.fromCssColorString("#FF00FF"));_e.GAINSBORO=Object.freeze(_e.fromCssColorString("#DCDCDC"));_e.GHOSTWHITE=Object.freeze(_e.fromCssColorString("#F8F8FF"));_e.GOLD=Object.freeze(_e.fromCssColorString("#FFD700"));_e.GOLDENROD=Object.freeze(_e.fromCssColorString("#DAA520"));_e.GRAY=Object.freeze(_e.fromCssColorString("#808080"));_e.GREEN=Object.freeze(_e.fromCssColorString("#008000"));_e.GREENYELLOW=Object.freeze(_e.fromCssColorString("#ADFF2F"));_e.GREY=_e.GRAY;_e.HONEYDEW=Object.freeze(_e.fromCssColorString("#F0FFF0"));_e.HOTPINK=Object.freeze(_e.fromCssColorString("#FF69B4"));_e.INDIANRED=Object.freeze(_e.fromCssColorString("#CD5C5C"));_e.INDIGO=Object.freeze(_e.fromCssColorString("#4B0082"));_e.IVORY=Object.freeze(_e.fromCssColorString("#FFFFF0"));_e.KHAKI=Object.freeze(_e.fromCssColorString("#F0E68C"));_e.LAVENDER=Object.freeze(_e.fromCssColorString("#E6E6FA"));_e.LAVENDAR_BLUSH=Object.freeze(_e.fromCssColorString("#FFF0F5"));_e.LAWNGREEN=Object.freeze(_e.fromCssColorString("#7CFC00"));_e.LEMONCHIFFON=Object.freeze(_e.fromCssColorString("#FFFACD"));_e.LIGHTBLUE=Object.freeze(_e.fromCssColorString("#ADD8E6"));_e.LIGHTCORAL=Object.freeze(_e.fromCssColorString("#F08080"));_e.LIGHTCYAN=Object.freeze(_e.fromCssColorString("#E0FFFF"));_e.LIGHTGOLDENRODYELLOW=Object.freeze(_e.fromCssColorString("#FAFAD2"));_e.LIGHTGRAY=Object.freeze(_e.fromCssColorString("#D3D3D3"));_e.LIGHTGREEN=Object.freeze(_e.fromCssColorString("#90EE90"));_e.LIGHTGREY=_e.LIGHTGRAY;_e.LIGHTPINK=Object.freeze(_e.fromCssColorString("#FFB6C1"));_e.LIGHTSEAGREEN=Object.freeze(_e.fromCssColorString("#20B2AA"));_e.LIGHTSKYBLUE=Object.freeze(_e.fromCssColorString("#87CEFA"));_e.LIGHTSLATEGRAY=Object.freeze(_e.fromCssColorString("#778899"));_e.LIGHTSLATEGREY=_e.LIGHTSLATEGRAY;_e.LIGHTSTEELBLUE=Object.freeze(_e.fromCssColorString("#B0C4DE"));_e.LIGHTYELLOW=Object.freeze(_e.fromCssColorString("#FFFFE0"));_e.LIME=Object.freeze(_e.fromCssColorString("#00FF00"));_e.LIMEGREEN=Object.freeze(_e.fromCssColorString("#32CD32"));_e.LINEN=Object.freeze(_e.fromCssColorString("#FAF0E6"));_e.MAGENTA=Object.freeze(_e.fromCssColorString("#FF00FF"));_e.MAROON=Object.freeze(_e.fromCssColorString("#800000"));_e.MEDIUMAQUAMARINE=Object.freeze(_e.fromCssColorString("#66CDAA"));_e.MEDIUMBLUE=Object.freeze(_e.fromCssColorString("#0000CD"));_e.MEDIUMORCHID=Object.freeze(_e.fromCssColorString("#BA55D3"));_e.MEDIUMPURPLE=Object.freeze(_e.fromCssColorString("#9370DB"));_e.MEDIUMSEAGREEN=Object.freeze(_e.fromCssColorString("#3CB371"));_e.MEDIUMSLATEBLUE=Object.freeze(_e.fromCssColorString("#7B68EE"));_e.MEDIUMSPRINGGREEN=Object.freeze(_e.fromCssColorString("#00FA9A"));_e.MEDIUMTURQUOISE=Object.freeze(_e.fromCssColorString("#48D1CC"));_e.MEDIUMVIOLETRED=Object.freeze(_e.fromCssColorString("#C71585"));_e.MIDNIGHTBLUE=Object.freeze(_e.fromCssColorString("#191970"));_e.MINTCREAM=Object.freeze(_e.fromCssColorString("#F5FFFA"));_e.MISTYROSE=Object.freeze(_e.fromCssColorString("#FFE4E1"));_e.MOCCASIN=Object.freeze(_e.fromCssColorString("#FFE4B5"));_e.NAVAJOWHITE=Object.freeze(_e.fromCssColorString("#FFDEAD"));_e.NAVY=Object.freeze(_e.fromCssColorString("#000080"));_e.OLDLACE=Object.freeze(_e.fromCssColorString("#FDF5E6"));_e.OLIVE=Object.freeze(_e.fromCssColorString("#808000"));_e.OLIVEDRAB=Object.freeze(_e.fromCssColorString("#6B8E23"));_e.ORANGE=Object.freeze(_e.fromCssColorString("#FFA500"));_e.ORANGERED=Object.freeze(_e.fromCssColorString("#FF4500"));_e.ORCHID=Object.freeze(_e.fromCssColorString("#DA70D6"));_e.PALEGOLDENROD=Object.freeze(_e.fromCssColorString("#EEE8AA"));_e.PALEGREEN=Object.freeze(_e.fromCssColorString("#98FB98"));_e.PALETURQUOISE=Object.freeze(_e.fromCssColorString("#AFEEEE"));_e.PALEVIOLETRED=Object.freeze(_e.fromCssColorString("#DB7093"));_e.PAPAYAWHIP=Object.freeze(_e.fromCssColorString("#FFEFD5"));_e.PEACHPUFF=Object.freeze(_e.fromCssColorString("#FFDAB9"));_e.PERU=Object.freeze(_e.fromCssColorString("#CD853F"));_e.PINK=Object.freeze(_e.fromCssColorString("#FFC0CB"));_e.PLUM=Object.freeze(_e.fromCssColorString("#DDA0DD"));_e.POWDERBLUE=Object.freeze(_e.fromCssColorString("#B0E0E6"));_e.PURPLE=Object.freeze(_e.fromCssColorString("#800080"));_e.RED=Object.freeze(_e.fromCssColorString("#FF0000"));_e.ROSYBROWN=Object.freeze(_e.fromCssColorString("#BC8F8F"));_e.ROYALBLUE=Object.freeze(_e.fromCssColorString("#4169E1"));_e.SADDLEBROWN=Object.freeze(_e.fromCssColorString("#8B4513"));_e.SALMON=Object.freeze(_e.fromCssColorString("#FA8072"));_e.SANDYBROWN=Object.freeze(_e.fromCssColorString("#F4A460"));_e.SEAGREEN=Object.freeze(_e.fromCssColorString("#2E8B57"));_e.SEASHELL=Object.freeze(_e.fromCssColorString("#FFF5EE"));_e.SIENNA=Object.freeze(_e.fromCssColorString("#A0522D"));_e.SILVER=Object.freeze(_e.fromCssColorString("#C0C0C0"));_e.SKYBLUE=Object.freeze(_e.fromCssColorString("#87CEEB"));_e.SLATEBLUE=Object.freeze(_e.fromCssColorString("#6A5ACD"));_e.SLATEGRAY=Object.freeze(_e.fromCssColorString("#708090"));_e.SLATEGREY=_e.SLATEGRAY;_e.SNOW=Object.freeze(_e.fromCssColorString("#FFFAFA"));_e.SPRINGGREEN=Object.freeze(_e.fromCssColorString("#00FF7F"));_e.STEELBLUE=Object.freeze(_e.fromCssColorString("#4682B4"));_e.TAN=Object.freeze(_e.fromCssColorString("#D2B48C"));_e.TEAL=Object.freeze(_e.fromCssColorString("#008080"));_e.THISTLE=Object.freeze(_e.fromCssColorString("#D8BFD8"));_e.TOMATO=Object.freeze(_e.fromCssColorString("#FF6347"));_e.TURQUOISE=Object.freeze(_e.fromCssColorString("#40E0D0"));_e.VIOLET=Object.freeze(_e.fromCssColorString("#EE82EE"));_e.WHEAT=Object.freeze(_e.fromCssColorString("#F5DEB3"));_e.WHITE=Object.freeze(_e.fromCssColorString("#FFFFFF"));_e.WHITESMOKE=Object.freeze(_e.fromCssColorString("#F5F5F5"));_e.YELLOW=Object.freeze(_e.fromCssColorString("#FFFF00"));_e.YELLOWGREEN=Object.freeze(_e.fromCssColorString("#9ACD32"));_e.TRANSPARENT=Object.freeze(new _e(0,0,0,0));var z=_e;function AVe(){return!0}function bVe(e,t){t=t??"This object was destroyed, i.e., destroy() was called.";function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=AVe}var le=bVe;function Ef(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(Ef.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});Ef.packedLength=2;Ef.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};Ef.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Ef),n.near=e[t++],n.far=e[t],n};Ef.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};Ef.clone=function(e,t){if(l(e))return l(t)||(t=new Ef),t.near=e.near,t.far=e.far,t};Ef.prototype.clone=function(e){return Ef.clone(this,e)};Ef.prototype.equals=function(e){return Ef.equals(this,e)};var jt=Ef;function vd(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}vd.clone=function(e,t){if(l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new vd(e.near,e.nearValue,e.far,e.farValue)};vd.packedLength=4;vd.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};vd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new vd),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};vd.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};vd.prototype.clone=function(e){return vd.clone(this,e)};vd.prototype.equals=function(e){return vd.equals(this,e)};var qt=vd;var Ly={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2,CLAMP_TO_TERRAIN:3,RELATIVE_TO_TERRAIN:4,CLAMP_TO_3D_TILE:5,RELATIVE_TO_3D_TILE:6,CLIP_TO_GROUND:7};Object.freeze(Ly);var We=Ly;function _s(e){return e===Ly.CLAMP_TO_GROUND||e===Ly.CLAMP_TO_3D_TILE||e===Ly.CLAMP_TO_TERRAIN}function Fy(e){return e===Ly.RELATIVE_TO_GROUND||e===Ly.RELATIVE_TO_3D_TILE||e===Ly.RELATIVE_TO_TERRAIN}var Afe={CENTER:0,LEFT:1,RIGHT:-1};Object.freeze(Afe);var zi=Afe;var bfe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1};Object.freeze(bfe);var Hn=bfe;var xVe=Object.freeze({DONE:0,PENDING:1,FAILED:2}),Pt=xVe;function Vh(){pe.throwInstantiationError()}Object.defineProperties(Vh.prototype,{isConstant:{get:pe.throwInstantiationError},definitionChanged:{get:pe.throwInstantiationError}});Vh.prototype.getValue=pe.throwInstantiationError;Vh.prototype.equals=pe.throwInstantiationError;Vh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};Vh.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!Vh.equals(e[i],t[i]))return!1;return!0};Vh.isConstant=function(e){return!l(e)||e.isConstant};Vh.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};Vh.getValueOrDefault=function(e,t,n,i){return l(e)?e.getValue(t,i)??n:n};Vh.getValueOrClonedDefault=function(e,t,n,i){let r;return l(e)&&(r=e.getValue(t,i)),l(r)||(r=n.clone(r)),r};var X=Vh;var xD={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};xD.getMorphTime=function(e){return e===xD.SCENE3D?1:e===xD.MORPHING?void 0:0};Object.freeze(xD);var re=xD;var TVe=500;function EVe(e,t,n,i,r){let o=t.mostDetailedHeightPosition;if(l(o)&&h.distance(o,n)>TVe&&(l(t.mostDetailedHeight)&&(t.mostDetailedHeightPrevious=t.mostDetailedHeight),t.mostDetailedHeightPosition=void 0,t.mostDetailedHeight=void 0),!l(t.mostDetailedHeightPosition))if(t.mostDetailedHeightPosition=h.clone(n),!l(e)||!e.sampleHeightSupported||e.mode!==re.SCENE3D)t.mostDetailedHeight=null;else{t.mostDetailedHeight=void 0;let a=(e.ellipsoid??ee.default).cartesianToCartographic(n);e.sampleHeightMostDetailed([a],i).then(function(c){r()&&(t.mostDetailedHeight=c[0].height??null)}).catch(function(){r()&&(t.mostDetailedHeight=null)})}return t.mostDetailedHeight===void 0?t.mostDetailedHeightPrevious:t.mostDetailedHeight}var jh=EVe;var CVe=new he;function vVe(e,t,n,i,r){let o=i.cartesianToCartographic(e,CVe);return n===We.CLIP_TO_GROUND?o.height<t&&(o.height=t):_s(n)?o.height=t:Fy(n)&&(o.height+=t),i.cartographicToCartesian(o,r)}var ag=vVe;var xfe={LEFT:-1,NONE:0,RIGHT:1};Object.freeze(xfe);var Vo=xfe;var SVe=z.WHITE,wVe=h.ZERO,IVe=We.NONE,PVe=U.ZERO,DVe=1,RVe=0,OVe=h.ZERO,MVe=zi.CENTER,NVe=Hn.CENTER,LVe=!1,FVe=Vo.NONE,BVe=new h,kVe=new z,UVe=new h,zVe=new U,VVe=new qt,jVe=new qt,HVe=new qt,GVe=new et,WVe=new jt;function Tfe(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function By(e,t){t.collectionChanged.addEventListener(By.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new kt,this._onCollectionChanged(t,t.values,[],[])}By.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,r=t.length;i<r;i++){let o=t[i],s=o.entity,a=s._billboard,c,u=o.billboard,f=s.isShowing&&s.isAvailable(e)&&X.getValueOrDefault(a._show,e,!0),d;if(f&&(d=X.getValueOrUndefined(s._position,e,BVe),c=X.getValueOrUndefined(a._image,e),f=l(d)&&l(c)),!f){xY(o,s,n);continue}X.isConstant(s._position)||(n._clusterDirty=!0),l(u)||(u=n.getBillboard(s),u.id=s,o.billboard=u,o.textureValue=void 0),u.show=f,u.position=d,u.color=X.getValueOrDefault(a._color,e,SVe,kVe),u.eyeOffset=X.getValueOrDefault(a._eyeOffset,e,wVe,UVe),u.heightReference=X.getValueOrDefault(a._heightReference,e,IVe),u.pixelOffset=X.getValueOrDefault(a._pixelOffset,e,PVe,zVe),u.scale=X.getValueOrDefault(a._scale,e,DVe),u.rotation=X.getValueOrDefault(a._rotation,e,RVe),u.alignedAxis=X.getValueOrDefault(a._alignedAxis,e,OVe),u.horizontalOrigin=X.getValueOrDefault(a._horizontalOrigin,e,MVe),u.verticalOrigin=X.getValueOrDefault(a._verticalOrigin,e,NVe),u.width=X.getValueOrUndefined(a._width,e),u.height=X.getValueOrUndefined(a._height,e),u.scaleByDistance=X.getValueOrUndefined(a._scaleByDistance,e,VVe),u.translucencyByDistance=X.getValueOrUndefined(a._translucencyByDistance,e,jVe),u.pixelOffsetScaleByDistance=X.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,HVe),u.sizeInMeters=X.getValueOrDefault(a._sizeInMeters,e,LVe),u.distanceDisplayCondition=X.getValueOrUndefined(a._distanceDisplayCondition,e,WVe),u.disableDepthTestDistance=X.getValueOrUndefined(a._disableDepthTestDistance,e),u.splitDirection=X.getValueOrDefault(a._splitDirection,e,FVe),o.textureValue!==c&&(u.image=c,o.textureValue=c);let p=X.getValueOrUndefined(a._imageSubRegion,e,GVe);l(p)&&u.setImageSubRegion(u.image,p)}return!0};By.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return Pt.FAILED;let i=n.billboard;if(i.heightReference===We.NONE)t.center=h.clone(i.position,t.center);else if(i._clampedToSurface)t.center=h.clone(i._clampedPosition,t.center);else{let r=this._cluster._scene,o=this._items,s=jh(r,n,i.position,[i],()=>o.get(e.id)===n);if(s===void 0)return Pt.PENDING;s===null?t.center=h.clone(i.position,t.center):t.center=ag(i.position,s,i.heightReference,r.ellipsoid??ee.default,t.center)}return t.radius=0,Pt.DONE};By.prototype.isDestroyed=function(){return!1};By.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(By.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return le(this)};By.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s=this._items,a=this._cluster;for(r=t.length-1;r>-1;r--)o=t[r],l(o._billboard)&&l(o._position)&&s.set(o.id,new Tfe(o));for(r=i.length-1;r>-1;r--)o=i[r],l(o._billboard)&&l(o._position)?s.contains(o.id)||s.set(o.id,new Tfe(o)):(xY(s.get(o.id),o,a),s.remove(o.id));for(r=n.length-1;r>-1;r--)o=n[r],xY(s.get(o.id),o,a),s.remove(o.id)};function xY(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var TD=By;function qVe(e,t){this.start=e??0,this.stop=t??0}var Us=qVe;var Zj=class e{constructor(t,n){this.center=h.clone(t??h.ZERO),this.radius=n??0}static fromPoints(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=h.clone(t[0],IY),r=h.clone(i,TY),o=h.clone(i,EY),s=h.clone(i,CY),a=h.clone(i,vY),c=h.clone(i,SY),u=h.clone(i,wY),f=t.length,d;for(d=1;d<f;d++){h.clone(t[d],i);let O=i.x,L=i.y,_=i.z;O<r.x&&h.clone(i,r),O>a.x&&h.clone(i,a),L<o.y&&h.clone(i,o),L>c.y&&h.clone(i,c),_<s.z&&h.clone(i,s),_>u.z&&h.clone(i,u)}let p=h.magnitudeSquared(h.subtract(a,r,nc)),g=h.magnitudeSquared(h.subtract(c,o,nc)),m=h.magnitudeSquared(h.subtract(u,s,nc)),y=r,A=a,b=p;g>b&&(b=g,y=o,A=c),m>b&&(y=s,A=u);let x=PY;x.x=(y.x+A.x)*.5,x.y=(y.y+A.y)*.5,x.z=(y.z+A.z)*.5;let T=h.magnitudeSquared(h.subtract(A,x,nc)),E=Math.sqrt(T),v=DY;v.x=r.x,v.y=o.y,v.z=s.z;let S=RY;S.x=a.x,S.y=c.y,S.z=u.z;let I=h.midpoint(v,S,OY),R=0;for(d=0;d<f;d++){h.clone(t[d],i);let O=h.magnitude(h.subtract(i,I,nc));O>R&&(R=O);let L=h.magnitudeSquared(h.subtract(i,x,nc));if(L>T){let _=Math.sqrt(L);E=(E+_)*.5,T=E*E;let C=_-E;x.x=(E*x.x+C*i.x)/_,x.y=(E*x.y+C*i.y)/_,x.z=(E*x.z+C*i.z)/_}}return E<R?(h.clone(x,n.center),n.radius=E):(h.clone(I,n.center),n.radius=R),n}static fromRectangle2D(t,n,i){return e.fromRectangleWithHeights2D(t,n,0,0,i)}static fromRectangleWithHeights2D(t,n,i,r,o){if(l(o)||(o=new e),!l(t))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;Efe._ellipsoid=ee.default,n=n??Efe,ie.southwest(t,MY),MY.height=i,ie.northeast(t,NY),NY.height=r;let s=n.project(MY,XVe),a=n.project(NY,KVe),c=a.x-s.x,u=a.y-s.y,f=a.z-s.z;o.radius=Math.sqrt(c*c+u*u+f*f)*.5;let d=o.center;return d.x=s.x+c*.5,d.y=s.y+u*.5,d.z=s.z+f*.5,o}static fromRectangle3D(t,n,i,r){if(n=n??ee.default,i=i??0,l(r)||(r=new e),!l(t))return r.center=h.clone(h.ZERO,r.center),r.radius=0,r;let o=ie.subsample(t,n,i,$Ve);return e.fromPoints(o,r)}static fromVertices(t,n,i,r){if(l(r)||(r=new e),!l(t)||t.length===0)return r.center=h.clone(h.ZERO,r.center),r.radius=0,r;n=n??h.ZERO,i=i??3;let o=IY;o.x=t[0]+n.x,o.y=t[1]+n.y,o.z=t[2]+n.z;let s=h.clone(o,TY),a=h.clone(o,EY),c=h.clone(o,CY),u=h.clone(o,vY),f=h.clone(o,SY),d=h.clone(o,wY),p=t.length,g;for(g=0;g<p;g+=i){let _=t[g]+n.x,C=t[g+1]+n.y,w=t[g+2]+n.z;o.x=_,o.y=C,o.z=w,_<s.x&&h.clone(o,s),_>u.x&&h.clone(o,u),C<a.y&&h.clone(o,a),C>f.y&&h.clone(o,f),w<c.z&&h.clone(o,c),w>d.z&&h.clone(o,d)}let m=h.magnitudeSquared(h.subtract(u,s,nc)),y=h.magnitudeSquared(h.subtract(f,a,nc)),A=h.magnitudeSquared(h.subtract(d,c,nc)),b=s,x=u,T=m;y>T&&(T=y,b=a,x=f),A>T&&(b=c,x=d);let E=PY;E.x=(b.x+x.x)*.5,E.y=(b.y+x.y)*.5,E.z=(b.z+x.z)*.5;let v=h.magnitudeSquared(h.subtract(x,E,nc)),S=Math.sqrt(v),I=DY;I.x=s.x,I.y=a.y,I.z=c.z;let R=RY;R.x=u.x,R.y=f.y,R.z=d.z;let O=h.midpoint(I,R,OY),L=0;for(g=0;g<p;g+=i){o.x=t[g]+n.x,o.y=t[g+1]+n.y,o.z=t[g+2]+n.z;let _=h.magnitude(h.subtract(o,O,nc));_>L&&(L=_);let C=h.magnitudeSquared(h.subtract(o,E,nc));if(C>v){let w=Math.sqrt(C);S=(S+w)*.5,v=S*S;let P=w-S;E.x=(S*E.x+P*o.x)/w,E.y=(S*E.y+P*o.y)/w,E.z=(S*E.z+P*o.z)/w}}return S<L?(h.clone(E,r.center),r.radius=S):(h.clone(O,r.center),r.radius=L),r}static fromEncodedCartesianVertices(t,n,i){if(l(i)||(i=new e),!l(t)||!l(n)||t.length!==n.length||t.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let r=IY;r.x=t[0]+n[0],r.y=t[1]+n[1],r.z=t[2]+n[2];let o=h.clone(r,TY),s=h.clone(r,EY),a=h.clone(r,CY),c=h.clone(r,vY),u=h.clone(r,SY),f=h.clone(r,wY),d=t.length,p;for(p=0;p<d;p+=3){let L=t[p]+n[p],_=t[p+1]+n[p+1],C=t[p+2]+n[p+2];r.x=L,r.y=_,r.z=C,L<o.x&&h.clone(r,o),L>c.x&&h.clone(r,c),_<s.y&&h.clone(r,s),_>u.y&&h.clone(r,u),C<a.z&&h.clone(r,a),C>f.z&&h.clone(r,f)}let g=h.magnitudeSquared(h.subtract(c,o,nc)),m=h.magnitudeSquared(h.subtract(u,s,nc)),y=h.magnitudeSquared(h.subtract(f,a,nc)),A=o,b=c,x=g;m>x&&(x=m,A=s,b=u),y>x&&(A=a,b=f);let T=PY;T.x=(A.x+b.x)*.5,T.y=(A.y+b.y)*.5,T.z=(A.z+b.z)*.5;let E=h.magnitudeSquared(h.subtract(b,T,nc)),v=Math.sqrt(E),S=DY;S.x=o.x,S.y=s.y,S.z=a.z;let I=RY;I.x=c.x,I.y=u.y,I.z=f.z;let R=h.midpoint(S,I,OY),O=0;for(p=0;p<d;p+=3){r.x=t[p]+n[p],r.y=t[p+1]+n[p+1],r.z=t[p+2]+n[p+2];let L=h.magnitude(h.subtract(r,R,nc));L>O&&(O=L);let _=h.magnitudeSquared(h.subtract(r,T,nc));if(_>E){let C=Math.sqrt(_);v=(v+C)*.5,E=v*v;let w=C-v;T.x=(v*T.x+w*r.x)/C,T.y=(v*T.y+w*r.y)/C,T.z=(v*T.z+w*r.z)/C}}return v<O?(h.clone(T,i.center),i.radius=v):(h.clone(R,i.center),i.radius=O),i}static fromCornerPoints(t,n,i){l(i)||(i=new e);let r=h.midpoint(t,n,i.center);return i.radius=h.distance(r,n),i}static fromEllipsoid(t,n){return l(n)||(n=new e),h.clone(h.ZERO,n.center),n.radius=t.maximumRadius,n}static fromBoundingSpheres(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=t.length;if(i===1)return e.clone(t[0],n);if(i===2)return e.union(t[0],t[1],n);let r=[],o;for(o=0;o<i;o++)r.push(t[o].center);n=e.fromPoints(r,n);let s=n.center,a=n.radius;for(o=0;o<i;o++){let c=t[o];a=Math.max(a,h.distance(s,c.center)+c.radius)}return n.radius=a,n}static fromOrientedBoundingBox(t,n){l(n)||(n=new e);let i=t.halfAxes,r=$.getColumn(i,0,JVe),o=$.getColumn(i,1,ZVe),s=$.getColumn(i,2,QVe);return h.add(r,o,r),h.add(r,s,r),n.center=h.clone(t.center,n.center),n.radius=h.magnitude(r),n}static fromTransformation(t,n){l(n)||(n=new e);let i=N.getTranslation(t,e4e),r=N.getScale(t,t4e),o=.5*h.magnitude(r);return n.center=h.clone(i,n.center),n.radius=o,n}static clone(t,n){if(l(t))return l(n)?(n.center=h.clone(t.center,n.center),n.radius=t.radius,n):new e(t.center,t.radius)}static pack(t,n,i){i=i??0;let r=t.center;return n[i++]=r.x,n[i++]=r.y,n[i++]=r.z,n[i]=t.radius,n}static unpack(t,n,i){n=n??0,l(i)||(i=new e);let r=i.center;return r.x=t[n++],r.y=t[n++],r.z=t[n++],i.radius=t[n],i}static union(t,n,i){l(i)||(i=new e);let r=t.center,o=t.radius,s=n.center,a=n.radius,c=h.subtract(s,r,n4e),u=h.magnitude(c);if(o>=u+a)return t.clone(i),i;if(a>=u+o)return n.clone(i),i;let f=(o+u+a)*.5,d=h.multiplyByScalar(c,(-o+f)/u,i4e);return h.add(d,r,d),h.clone(d,i.center),i.radius=f,i}static expand(t,n,i){i=e.clone(t,i);let r=h.magnitude(h.subtract(n,i.center,r4e));return r>i.radius&&(i.radius=r),i}static intersectPlane(t,n){let i=t.center,r=t.radius,o=n.normal,s=h.dot(o,i)+n.distance;return s<-r?$t.OUTSIDE:s<r?$t.INTERSECTING:$t.INSIDE}static transform(t,n,i){return l(i)||(i=new e),i.center=N.multiplyByPoint(n,t.center,i.center),i.radius=N.getMaximumScale(n)*t.radius,i}static distanceSquaredTo(t,n){let i=h.subtract(t.center,n,o4e),r=h.magnitude(i)-t.radius;return r<=0?0:r*r}static transformWithoutScale(t,n,i){return l(i)||(i=new e),i.center=N.multiplyByPoint(n,t.center,i.center),i.radius=t.radius,i}static computePlaneDistances(t,n,i,r){l(r)||(r=new Us);let o=h.subtract(t.center,n,s4e),s=h.dot(i,o);return r.start=s-t.radius,r.stop=s+t.radius,r}static projectTo2D(t,n,i){vfe._ellipsoid=ee.default,n=n??vfe;let r=n.ellipsoid,o=t.center,s=t.radius,a;h.equals(o,h.ZERO)?a=h.clone(h.UNIT_X,Cfe):a=r.geodeticSurfaceNormal(o,Cfe);let c=h.cross(h.UNIT_Z,a,a4e);h.normalize(c,c);let u=h.cross(a,c,c4e);h.normalize(u,u),h.multiplyByScalar(a,s,a),h.multiplyByScalar(u,s,u),h.multiplyByScalar(c,s,c);let f=h.negate(u,u4e),d=h.negate(c,l4e),p=Sfe,g=p[0];h.add(a,u,g),h.add(g,c,g),g=p[1],h.add(a,u,g),h.add(g,d,g),g=p[2],h.add(a,f,g),h.add(g,d,g),g=p[3],h.add(a,f,g),h.add(g,c,g),h.negate(a,a),g=p[4],h.add(a,u,g),h.add(g,c,g),g=p[5],h.add(a,u,g),h.add(g,d,g),g=p[6],h.add(a,f,g),h.add(g,d,g),g=p[7],h.add(a,f,g),h.add(g,c,g);let m=p.length;for(let x=0;x<m;++x){let T=p[x];h.add(o,T,T);let E=r.cartesianToCartographic(T,f4e);n.project(E,T)}i=e.fromPoints(p,i),o=i.center;let y=o.x,A=o.y,b=o.z;return o.x=b,o.y=y,o.z=A,i}static isOccluded(t,n){return!n.isBoundingSphereVisible(t)}static equals(t,n){return t===n||l(t)&&l(n)&&h.equals(t.center,n.center)&&t.radius===n.radius}intersectPlane(t){return e.intersectPlane(this,t)}distanceSquaredTo(t){return e.distanceSquaredTo(this,t)}computePlaneDistances(t,n,i){return e.computePlaneDistances(this,t,n,i)}isOccluded(t){return e.isOccluded(this,t)}equals(t){return e.equals(this,t)}clone(t){return e.clone(this,t)}volume(){let t=this.radius;return YVe*t*t*t}};Zj.packedLength=4;var TY=new h,EY=new h,CY=new h,vY=new h,SY=new h,wY=new h,IY=new h,nc=new h,PY=new h,DY=new h,RY=new h,OY=new h,YVe=4/3*D.PI,Efe=new Ui,XVe=new h,KVe=new h,MY=new he,NY=new he,$Ve=[],JVe=new h,ZVe=new h,QVe=new h,e4e=new h,t4e=new h,n4e=new h,i4e=new h,r4e=new h,o4e=new h,s4e=new h,Cfe=new h,a4e=new h,c4e=new h,l4e=new h,u4e=new h,f4e=new he,Sfe=new Array(8);for(let e=0;e<8;++e)Sfe[e]=new h;var vfe=new Ui,ue=Zj;var wfe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047};Object.freeze(wfe);var te=wfe;var An={BYTE:te.BYTE,UNSIGNED_BYTE:te.UNSIGNED_BYTE,SHORT:te.SHORT,UNSIGNED_SHORT:te.UNSIGNED_SHORT,INT:te.INT,UNSIGNED_INT:te.UNSIGNED_INT,FLOAT:te.FLOAT,DOUBLE:te.DOUBLE};An.getSizeInBytes=function(e){switch(e){case An.BYTE:return Int8Array.BYTES_PER_ELEMENT;case An.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case An.SHORT:return Int16Array.BYTES_PER_ELEMENT;case An.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case An.INT:return Int32Array.BYTES_PER_ELEMENT;case An.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case An.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case An.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};An.fromTypedArray=function(e){if(e instanceof Int8Array)return An.BYTE;if(e instanceof Uint8Array)return An.UNSIGNED_BYTE;if(e instanceof Int16Array)return An.SHORT;if(e instanceof Uint16Array)return An.UNSIGNED_SHORT;if(e instanceof Int32Array)return An.INT;if(e instanceof Uint32Array)return An.UNSIGNED_INT;if(e instanceof Float32Array)return An.FLOAT;if(e instanceof Float64Array)return An.DOUBLE};An.validate=function(e){return l(e)&&(e===An.BYTE||e===An.UNSIGNED_BYTE||e===An.SHORT||e===An.UNSIGNED_SHORT||e===An.INT||e===An.UNSIGNED_INT||e===An.FLOAT||e===An.DOUBLE)};An.createTypedArray=function(e,t){switch(e){case An.BYTE:return new Int8Array(t);case An.UNSIGNED_BYTE:return new Uint8Array(t);case An.SHORT:return new Int16Array(t);case An.UNSIGNED_SHORT:return new Uint16Array(t);case An.INT:return new Int32Array(t);case An.UNSIGNED_INT:return new Uint32Array(t);case An.FLOAT:return new Float32Array(t);case An.DOUBLE:return new Float64Array(t)}};An.createArrayBufferView=function(e,t,n,i){switch(n=n??0,i=i??(t.byteLength-n)/An.getSizeInBytes(e),e){case An.BYTE:return new Int8Array(t,n,i);case An.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case An.SHORT:return new Int16Array(t,n,i);case An.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case An.INT:return new Int32Array(t,n,i);case An.UNSIGNED_INT:return new Uint32Array(t,n,i);case An.FLOAT:return new Float32Array(t,n,i);case An.DOUBLE:return new Float64Array(t,n,i)}};An.fromName=function(e){switch(e){case"BYTE":return An.BYTE;case"UNSIGNED_BYTE":return An.UNSIGNED_BYTE;case"SHORT":return An.SHORT;case"UNSIGNED_SHORT":return An.UNSIGNED_SHORT;case"INT":return An.INT;case"UNSIGNED_INT":return An.UNSIGNED_INT;case"FLOAT":return An.FLOAT;case"DOUBLE":return An.DOUBLE}};An.dequantize=function(e,t){switch(t){case An.BYTE:return Math.max(e/127,-1);case An.UNSIGNED_BYTE:return e/255;case An.SHORT:return Math.max(e/32767,-1);case An.UNSIGNED_SHORT:return e/65535;case An.INT:return Math.max(e/2147483647,-1);case An.UNSIGNED_INT:return e/4294967295}};Object.freeze(An);var Y=An;var Ife={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};Object.freeze(Ife);var Sd=Ife;var d4e=Object.freeze([NaN,NaN,NaN,NaN]),Ru=class e{constructor(t,n,i,r){let o=Reflect.construct(Array,d4e,new.target);return o[0]=t??0,o[1]=i??0,o[2]=n??0,o[3]=r??0,o}static pack(t,n,i){return i=i??0,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3],n}static unpack(t,n,i){return n=n??0,l(i)||(i=new e),i[0]=t[n++],i[1]=t[n++],i[2]=t[n++],i[3]=t[n],i}static packArray(t,n){let i=t.length,r=i*4;l(n)?!Array.isArray(n)&&n.length!==r||n.length!==r&&(n.length=r):n=new Array(r);for(let o=0;o<i;++o)e.pack(t[o],n,o*4);return n}static unpackArray(t,n){let i=t.length;l(n)?n.length=i/4:n=new Array(i/4);for(let r=0;r<i;r+=4){let o=r/4;n[o]=e.unpack(t,r,n[o])}return n}static clone(t,n){if(l(t))return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):new e(t[0],t[2],t[1],t[3])}static fromColumnMajorArray(t,n){return e.clone(t,n)}static fromRowMajorArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[2],n[2]=t[1],n[3]=t[3],n):new e(t[0],t[1],t[2],t[3])}static fromScale(t,n){return l(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=t.y,n):new e(t.x,0,0,t.y)}static fromUniformScale(t,n){return l(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=t,n):new e(t,0,0,t)}static fromRotation(t,n){let i=Math.cos(t),r=Math.sin(t);return l(n)?(n[0]=i,n[1]=r,n[2]=-r,n[3]=i,n):new e(i,-r,r,i)}static toArray(t,n){return l(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):[t[0],t[1],t[2],t[3]]}static getElementIndex(t,n){return t*2+n}static getColumn(t,n,i){let r=n*2,o=t[r],s=t[r+1];return i.x=o,i.y=s,i}static setColumn(t,n,i,r){r=e.clone(t,r);let o=n*2;return r[o]=i.x,r[o+1]=i.y,r}static getRow(t,n,i){let r=t[n],o=t[n+2];return i.x=r,i.y=o,i}static setRow(t,n,i,r){return r=e.clone(t,r),r[n]=i.x,r[n+2]=i.y,r}static setScale(t,n,i){let r=e.getScale(t,h4e),o=n.x/r.x,s=n.y/r.y;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*s,i[3]=t[3]*s,i}static setUniformScale(t,n,i){let r=e.getScale(t,m4e),o=n/r.x,s=n/r.y;return i[0]=t[0]*o,i[1]=t[1]*o,i[2]=t[2]*s,i[3]=t[3]*s,i}static getScale(t,n){return n.x=U.magnitude(U.fromElements(t[0],t[1],Pfe)),n.y=U.magnitude(U.fromElements(t[2],t[3],Pfe)),n}static getMaximumScale(t){return e.getScale(t,Dfe),U.maximumComponent(Dfe)}static setRotation(t,n,i){let r=e.getScale(t,p4e);return i[0]=n[0]*r.x,i[1]=n[1]*r.x,i[2]=n[2]*r.y,i[3]=n[3]*r.y,i}static getRotation(t,n){let i=e.getScale(t,g4e);return n[0]=t[0]/i.x,n[1]=t[1]/i.x,n[2]=t[2]/i.y,n[3]=t[3]/i.y,n}static multiply(t,n,i){let r=t[0]*n[0]+t[2]*n[1],o=t[0]*n[2]+t[2]*n[3],s=t[1]*n[0]+t[3]*n[1],a=t[1]*n[2]+t[3]*n[3];return i[0]=r,i[1]=s,i[2]=o,i[3]=a,i}static add(t,n,i){return i[0]=t[0]+n[0],i[1]=t[1]+n[1],i[2]=t[2]+n[2],i[3]=t[3]+n[3],i}static subtract(t,n,i){return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],i[3]=t[3]-n[3],i}static multiplyByVector(t,n,i){let r=t[0]*n.x+t[2]*n.y,o=t[1]*n.x+t[3]*n.y;return i.x=r,i.y=o,i}static multiplyByScalar(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static multiplyByScale(t,n,i){return i[0]=t[0]*n.x,i[1]=t[1]*n.x,i[2]=t[2]*n.y,i[3]=t[3]*n.y,i}static multiplyByUniformScale(t,n,i){return i[0]=t[0]*n,i[1]=t[1]*n,i[2]=t[2]*n,i[3]=t[3]*n,i}static negate(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}static transpose(t,n){let i=t[0],r=t[2],o=t[1],s=t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n}static abs(t,n){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n}static equals(t,n){return t===n||l(t)&&l(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}static equalsArray(t,n,i){return t[0]===n[i]&&t[1]===n[i+1]&&t[2]===n[i+2]&&t[3]===n[i+3]}static equalsEpsilon(t,n,i){return i=i??0,t===n||l(t)&&l(n)&&Math.abs(t[0]-n[0])<=i&&Math.abs(t[1]-n[1])<=i&&Math.abs(t[2]-n[2])<=i&&Math.abs(t[3]-n[3])<=i}get length(){return e.packedLength}clone(t){return e.clone(this,t)}equals(t){return e.equals(this,t)}equalsEpsilon(t,n){return e.equalsEpsilon(this,t,n)}toString(){return`(${this[0]}, ${this[2]})
(${this[1]}, ${this[3]})`}};Ru.packedLength=4;Ru.fromArray=Ru.unpack;Ru.IDENTITY=new Ru(1,0,0,1);Ru.ZERO=new Ru(0,0,0,0);Ru.COLUMN0ROW0=0;Ru.COLUMN0ROW1=1;Ru.COLUMN1ROW0=2;Ru.COLUMN1ROW1=3;var h4e=new U,m4e=new U,Pfe=new U,Dfe=new U,p4e=new U,g4e=new U,Xi=Ru;var ic={POINTS:te.POINTS,LINES:te.LINES,LINE_LOOP:te.LINE_LOOP,LINE_STRIP:te.LINE_STRIP,TRIANGLES:te.TRIANGLES,TRIANGLE_STRIP:te.TRIANGLE_STRIP,TRIANGLE_FAN:te.TRIANGLE_FAN};ic.isLines=function(e){return e===ic.LINES||e===ic.LINE_LOOP||e===ic.LINE_STRIP};ic.isTriangles=function(e){return e===ic.TRIANGLES||e===ic.TRIANGLE_STRIP||e===ic.TRIANGLE_FAN};ic.validate=function(e){return e===ic.POINTS||e===ic.LINES||e===ic.LINE_LOOP||e===ic.LINE_STRIP||e===ic.TRIANGLES||e===ic.TRIANGLE_STRIP||e===ic.TRIANGLE_FAN};Object.freeze(ic);var Oe=ic;function LY(e){e=e??H.EMPTY_OBJECT,this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType??Oe.TRIANGLES,this.boundingSphere=e.boundingSphere,this.geometryType=e.geometryType??Sd.NONE,this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}LY.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var _4e=new he,y4e=new h,Rfe=new N,A4e=[new he,new he,new he],b4e=[new U,new U,new U],x4e=[new U,new U,new U],T4e=new h,E4e=new Le,C4e=new N,v4e=new Xi;LY._textureCoordinateRotationPoints=function(e,t,n,i){let r,o=ie.center(i,_4e),s=he.toCartesian(o,n,y4e),a=At.eastNorthUpToFixedFrame(s,n,Rfe),c=N.inverse(a,Rfe),u=b4e,f=A4e;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=T4e;for(r=0;r<3;r++)he.toCartesian(f[r],n,d),d=N.multiplyByPointAsVector(c,d,d),u[r].x=d.x,u[r].y=d.y;let p=Le.fromAxisAngle(h.UNIT_Z,-t,E4e),g=$.fromQuaternion(p,C4e),m=e.length,y=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(r=0;r<m;r++)d=N.multiplyByPointAsVector(c,e[r],d),d=$.multiplyByVector(g,d,d),y=Math.min(y,d.x),A=Math.min(A,d.y),b=Math.max(b,d.x),x=Math.max(x,d.y);let T=Xi.fromRotation(t,v4e),E=x4e;E[0].x=y,E[0].y=A,E[1].x=y,E[1].y=x,E[2].x=b,E[2].y=A;let v=u[0],S=u[2].x-v.x,I=u[1].y-v.y;for(r=0;r<3;r++){let C=E[r];Xi.multiplyByVector(T,C,C),C.x=(C.x-v.x)/S,C.y=(C.y-v.y)/I}let R=E[0],O=E[1],L=E[2],_=new Array(6);return U.pack(R,_),U.pack(O,_,2),U.pack(L,_,4),_};var St=LY;function S4e(e){e=e??H.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.values=e.values}var Ne=S4e;function w4e(e){e=e??H.EMPTY_OBJECT,this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var Tn=w4e;var Ofe={NONE:0,TOP:1,ALL:2};Object.freeze(Ofe);var mn=Ofe;function Qs(e){e=e??H.EMPTY_OBJECT,this.position=e.position??!1,this.normal=e.normal??!1,this.st=e.st??!1,this.bitangent=e.bitangent??!1,this.tangent=e.tangent??!1,this.color=e.color??!1}Qs.POSITION_ONLY=Object.freeze(new Qs({position:!0}));Qs.POSITION_AND_NORMAL=Object.freeze(new Qs({position:!0,normal:!0}));Qs.POSITION_NORMAL_AND_ST=Object.freeze(new Qs({position:!0,normal:!0,st:!0}));Qs.POSITION_AND_ST=Object.freeze(new Qs({position:!0,st:!0}));Qs.POSITION_AND_COLOR=Object.freeze(new Qs({position:!0,color:!0}));Qs.ALL=Object.freeze(new Qs({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));Qs.DEFAULT=Qs.POSITION_NORMAL_AND_ST;Qs.packedLength=6;Qs.pack=function(e,t,n){return n=n??0,t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};Qs.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Qs),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};Qs.clone=function(e,t){if(l(e))return l(t)||(t=new Qs),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Be=Qs;var I4e=new h;function Cf(e){e=e??H.EMPTY_OBJECT;let t=e.minimum,n=e.maximum,i=e.vertexFormat??Be.DEFAULT;this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Cf.fromDimensions=function(e){e=e??H.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Cf({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Cf.fromAxisAlignedBoundingBox=function(e){return new Cf({minimum:e.minimum,maximum:e.maximum})};Cf.packedLength=2*h.packedLength+Be.packedLength+1;Cf.pack=function(e,t,n){return n=n??0,h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Be.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Be.packedLength]=e._offsetAttribute??-1,t};var Nfe=new h,Lfe=new h,Ffe=new Be,Mfe={minimum:Nfe,maximum:Lfe,vertexFormat:Ffe,offsetAttribute:void 0};Cf.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,Nfe),r=h.unpack(e,t+h.packedLength,Lfe),o=Be.unpack(e,t+2*h.packedLength,Ffe),s=e[t+2*h.packedLength+Be.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(r,n._maximum),n._vertexFormat=Be.clone(o,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(Mfe.offsetAttribute=s===-1?void 0:s,new Cf(Mfe))};Cf.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let r=new Tn,o,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(72),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,r.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,r.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,r.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,r.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,r.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:u})}o=new Uint16Array(36),o[0]=0,o[1]=1,o[2]=2,o[3]=0,o[4]=2,o[5]=3,o[6]=6,o[7]=5,o[8]=4,o[9]=7,o[10]=6,o[11]=4,o[12]=8,o[13]=9,o[14]=10,o[15]=8,o[16]=10,o[17]=11,o[18]=14,o[19]=13,o[20]=12,o[21]=15,o[22]=14,o[23]=12,o[24]=18,o[25]=17,o[26]=16,o[27]=19,o[28]=18,o[29]=16,o[30]=20,o[31]=21,o[32]=22,o[33]=20,o[34]=22,o[35]=23}else s=new Float64Array(24),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,r.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s}),o=new Uint16Array(36),o[0]=4,o[1]=5,o[2]=6,o[3]=4,o[4]=6,o[5]=7,o[6]=1,o[7]=0,o[8]=3,o[9]=1,o[10]=3,o[11]=2,o[12]=1,o[13]=6,o[14]=5,o[15]=1,o[16]=2,o[17]=6,o[18]=2,o[19]=3,o[20]=7,o[21]=2,o[22]=7,o[23]=6,o[24]=3,o[25]=0,o[26]=4,o[27]=3,o[28]=4,o[29]=7,o[30]=0,o[31]=1,o[32]=5,o[33]=0,o[34]=5,o[35]=4;let a=h.subtract(n,t,I4e),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===mn.NONE?0:1,d=new Uint8Array(u/3).fill(f);r.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new St({attributes:r,indices:o,primitiveType:Oe.TRIANGLES,boundingSphere:new ue(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var FY;Cf.getUnitBox=function(){return l(FY)||(FY=Cf.createGeometry(Cf.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Be.POSITION_ONLY}))),FY};var Ic=Cf;var P4e=new h;function Dp(e){e=e??H.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}Dp.fromDimensions=function(e){e=e??H.EMPTY_OBJECT;let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Dp({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};Dp.fromAxisAlignedBoundingBox=function(e){return new Dp({minimum:e.minimum,maximum:e.maximum})};Dp.packedLength=2*h.packedLength+1;Dp.pack=function(e,t,n){return n=n??0,h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=e._offsetAttribute??-1,t};var kfe=new h,Ufe=new h,Bfe={minimum:kfe,maximum:Ufe,offsetAttribute:void 0};Dp.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,kfe),r=h.unpack(e,t+h.packedLength,Ufe),o=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(r,n._max),n._offsetAttribute=o===-1?void 0:o,n):(Bfe.offsetAttribute=o===-1?void 0:o,new Dp(Bfe))};Dp.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new Tn,r=new Uint16Array(24),o=new Float64Array(24);o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=n.x,o[4]=t.y,o[5]=t.z,o[6]=n.x,o[7]=n.y,o[8]=t.z,o[9]=t.x,o[10]=n.y,o[11]=t.z,o[12]=t.x,o[13]=t.y,o[14]=n.z,o[15]=n.x,o[16]=t.y,o[17]=n.z,o[18]=n.x,o[19]=n.y,o[20]=n.z,o[21]=t.x,o[22]=n.y,o[23]=n.z,i.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:o}),r[0]=4,r[1]=5,r[2]=5,r[3]=6,r[4]=6,r[5]=7,r[6]=7,r[7]=4,r[8]=0,r[9]=1,r[10]=1,r[11]=2,r[12]=2,r[13]=3,r[14]=3,r[15]=0,r[16]=0,r[17]=4,r[18]=1,r[19]=5,r[20]=2,r[21]=6,r[22]=3,r[23]=7;let s=h.subtract(n,t,P4e),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=o.length,u=e._offsetAttribute===mn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new St({attributes:i,indices:r,primitiveType:Oe.LINES,boundingSphere:new ue(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var Hh=Dp;function _v(e,t,n,i){e=e??1,t=t??1,n=n??1,i=i??1,this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(_v.prototype,{componentDatatype:{get:function(){return Y.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});_v.fromColor=function(e){return new _v(e.red,e.green,e.blue,e.alpha)};_v.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};_v.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var Jt=_v;function ED(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(ED.prototype,{componentDatatype:{get:function(){return Y.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});ED.fromDistanceDisplayCondition=function(e){return new ED(e.near,e.far)};ED.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Kn=ED;function D4e(e){e=e??H.EMPTY_OBJECT,this.geometry=e.geometry,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=e.attributes??{},this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var Ft=D4e;function Po(e){e=e??H.EMPTY_OBJECT,this.start=l(e.start)?K.clone(e.start):new K,this.stop=l(e.stop)?K.clone(e.stop):new K,this.data=e.data,this.isStartIncluded=e.isStartIncluded??!0,this.isStopIncluded=e.isStopIncluded??!0}Object.defineProperties(Po.prototype,{isEmpty:{get:function(){let e=K.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var yv={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Po.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new pe("options.iso8601 is an invalid ISO 8601 interval.");let i=K.fromIso8601(n[0]),r=K.fromIso8601(n[1]),o=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.data;return l(t)?(t.start=i,t.stop=r,t.isStartIncluded=o,t.isStopIncluded=s,t.data=a,t):(yv.start=i,yv.stop=r,yv.isStartIncluded=o,yv.isStopIncluded=s,yv.data=a,new Po(yv))};Po.toIso8601=function(e,t){return`${K.toIso8601(e.start,t)}/${K.toIso8601(e.stop,t)}`};Po.clone=function(e,t){if(l(e))return l(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Po(e)};Po.equals=function(e,t,n){return e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&K.equals(e.start,t.start)&&K.equals(e.stop,t.stop)&&(e.data===t.data||l(n)&&n(e.data,t.data)))};Po.equalsEpsilon=function(e,t,n,i){return n=n??0,e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&K.equalsEpsilon(e.start,t.start,n)&&K.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||l(i)&&i(e.data,t.data)))};Po.intersect=function(e,t,n,i){if(!l(t))return Po.clone(Po.EMPTY,n);let r=e.start,o=e.stop,s=t.start,a=t.stop,c=K.greaterThanOrEquals(s,r)&&K.greaterThanOrEquals(o,s),u=!c&&K.lessThanOrEquals(s,r)&&K.lessThanOrEquals(r,a);if(!c&&!u)return Po.clone(Po.EMPTY,n);let f=e.isStartIncluded,d=e.isStopIncluded,p=t.isStartIncluded,g=t.isStopIncluded,m=K.lessThan(o,a);return l(n)||(n=new Po),n.start=c?s:r,n.isStartIncluded=f&&p||!K.equals(s,r)&&(c&&p||u&&f),n.stop=m?o:a,n.isStopIncluded=m?d:d&&g||!K.equals(a,o)&&g,n.data=l(i)?i(e.data,t.data):e.data,n};Po.contains=function(e,t){if(e.isEmpty)return!1;let n=K.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=K.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};Po.prototype.clone=function(e){return Po.clone(this,e)};Po.prototype.equals=function(e,t){return Po.equals(this,e,t)};Po.prototype.equalsEpsilon=function(e,t,n){return Po.equalsEpsilon(this,e,t,n)};Po.prototype.toString=function(){return Po.toIso8601(this)};Po.EMPTY=Object.freeze(new Po({start:new K,stop:new K,isStartIncluded:!1,isStopIncluded:!1}));var En=Po;var zfe=Object.freeze(K.fromIso8601("0000-01-01T00:00:00Z")),Vfe=Object.freeze(K.fromIso8601("9999-12-31T24:00:00Z")),R4e=Object.freeze(new En({start:zfe,stop:Vfe})),O4e={MINIMUM_VALUE:zfe,MAXIMUM_VALUE:Vfe,MAXIMUM_INTERVAL:R4e},tt=O4e;function CD(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(CD.prototype,{componentDatatype:{get:function(){return Y.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});CD.fromCartesian3=function(e){return new CD(e.x,e.y,e.z)};CD.toValue=function(e,t){return l(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var xr=CD;function Qj(e){e=e??!0,this.value=Qj.toValue(e)}Object.defineProperties(Qj.prototype,{componentDatatype:{get:function(){return Y.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});Qj.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var Pn=Qj;var vD=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec3 v_tangentEC;
in vec3 v_bitangentEC;
in vec2 v_st;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
materialInput.positionToEyeEC = positionToEyeEC;
materialInput.st = v_st;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var SD=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec3 tangent;
in vec3 bitangent;
in vec2 st;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec3 v_tangentEC;
out vec3 v_bitangentEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
v_normalEC = czm_normal * normal;
v_tangentEC = czm_normal * tangent;
v_bitangentEC = czm_normal * bitangent;
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var wD=`in vec3 v_positionEC;
in vec3 v_normalEC;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var ID=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
v_normalEC = czm_normal * normal;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var PD=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec2 v_st;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
materialInput.st = v_st;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var DD=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec2 st;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
v_normalEC = czm_normal * normal;
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var jfe={ADD:te.FUNC_ADD,SUBTRACT:te.FUNC_SUBTRACT,REVERSE_SUBTRACT:te.FUNC_REVERSE_SUBTRACT,MIN:te.MIN,MAX:te.MAX};Object.freeze(jfe);var Pc=jfe;var Hfe={ZERO:te.ZERO,ONE:te.ONE,SOURCE_COLOR:te.SRC_COLOR,ONE_MINUS_SOURCE_COLOR:te.ONE_MINUS_SRC_COLOR,DESTINATION_COLOR:te.DST_COLOR,ONE_MINUS_DESTINATION_COLOR:te.ONE_MINUS_DST_COLOR,SOURCE_ALPHA:te.SRC_ALPHA,ONE_MINUS_SOURCE_ALPHA:te.ONE_MINUS_SRC_ALPHA,DESTINATION_ALPHA:te.DST_ALPHA,ONE_MINUS_DESTINATION_ALPHA:te.ONE_MINUS_DST_ALPHA,CONSTANT_COLOR:te.CONSTANT_COLOR,ONE_MINUS_CONSTANT_COLOR:te.ONE_MINUS_CONSTANT_COLOR,CONSTANT_ALPHA:te.CONSTANT_ALPHA,ONE_MINUS_CONSTANT_ALPHA:te.ONE_MINUS_CONSTANT_ALPHA,SOURCE_ALPHA_SATURATE:te.SRC_ALPHA_SATURATE};Object.freeze(Hfe);var $r=Hfe;var Gfe={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.SOURCE_ALPHA,functionSourceAlpha:$r.ONE,functionDestinationRgb:$r.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:$r.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.ONE,functionSourceAlpha:$r.ONE,functionDestinationRgb:$r.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:$r.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.SOURCE_ALPHA,functionSourceAlpha:$r.ONE,functionDestinationRgb:$r.ONE,functionDestinationAlpha:$r.ONE})};Object.freeze(Gfe);var tn=Gfe;var Wfe={FRONT:te.FRONT,BACK:te.BACK,FRONT_AND_BACK:te.FRONT_AND_BACK};Object.freeze(Wfe);var Vi=Wfe;function Av(e){e=e??H.EMPTY_OBJECT,this.material=e.material,this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource,this._renderState=e.renderState,this._closed=e.closed??!1}Object.defineProperties(Av.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}}});Av.prototype.getFragmentShaderSource=function(){let e=[];return this.flat&&e.push("#define FLAT"),this.faceForward&&e.push("#define FACE_FORWARD"),l(this.material)&&e.push(this.material.shaderSource),e.push(this.fragmentShaderSource),e.join(`
`)};Av.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};Av.prototype.getRenderState=function(){let e=this.isTranslucent(),t=Je(this.renderState,!1);return e?(t.depthMask=!1,t.blending=tn.ALPHA_BLEND):t.depthMask=!0,t};Av.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=tn.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:Vi.BACK}),l(n)&&(i=Ot(n,i,!0)),i};var wr=Av;function M4e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var $n=M4e;function bv(e,t,n,i,r){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=r}Object.defineProperties(bv.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}});bv.clone=function(e){if(l(e))return new bv(e._format,e._datatype,e._width,e._height,e._buffer)};bv.prototype.clone=function(){return bv.clone(this)};var RD=bv;var qfe=Qo(xf(),1);function Yfe(){if(!l(rc._canTransferArrayBuffer)){let e=UY("transferTypedArrayTest");e.postMessage=e.webkitPostMessage??e.postMessage;let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return rc._canTransferArrayBuffer=!1,rc._canTransferArrayBuffer}rc._canTransferArrayBuffer=new Promise(i=>{e.onmessage=function(r){let o=r.data.array,s=l(o)&&o[0]===t;i(s),e.terminate(),rc._canTransferArrayBuffer=s}})}return rc._canTransferArrayBuffer}var kY=new be;function BY(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,o=new r;o.append(e),t=o.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function UY(e){let t=new qfe.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),r={},o,s;if(Dy(e))s=e;else if(!n){let a=Zt(`${rc._workerModulePrefix}/${i}.js`);Dy(a)&&(s=a)}if(s){let a=`import "${s}";`;return o=BY(a),r.type="module",new Worker(o,r)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=`
importScripts("${BY(CESIUM_WORKERS)}");
CesiumWorkers["${i}"]();
`;return o=BY(a),new Worker(o,r)}if(o=e,n||(o=Zt(`${rc._workerModulePrefix+i}.js`)),!dn.supportsEsmWebWorkers())throw new oe("This browser is not supported. Please update your browser to continue.");return r.type="module",new Worker(o,r)}async function N4e(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!dn.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new oe(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Zt(t.fallbackModulePath),n}n.wasmBinaryFile=Zt(t.wasmBinaryFile);let i=await De.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function rc(e,t){this._workerPath=e,this._maximumActiveTasks=t??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var L4e=(e,t,n,i)=>{let r=({data:o})=>{if(o.id===t){if(l(o.error)){let s=o.error;s.name==="RuntimeError"?(s=new oe(o.error.message),s.stack=o.error.stack):s.name==="DeveloperError"?(s=new pe(o.error.message),s.stack=o.error.stack):s.name==="Error"&&(s=new Error(o.error.message),s.stack=o.error.stack),kY.raiseEvent(s),i(s)}else kY.raiseEvent(),n(o.result);e.removeEventListener("message",r)}};return r},F4e=[];async function B4e(e,t,n){let i=await Promise.resolve(Yfe());l(n)?i||(n.length=0):n=F4e;let r=e._nextID++,o=new Promise((s,a)=>{e._worker.addEventListener("message",L4e(e._worker,r,s,a))});return e._worker.postMessage({id:r,baseUrl:Zt.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),o}async function k4e(e,t,n){++e._activeTasks;try{let i=await B4e(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}rc.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=UY(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return k4e(this,e,t)};rc.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=UY(this._workerPath),i=await N4e(this,e),r=await Promise.resolve(Yfe()),o,s=i.wasmBinary;l(s)&&r&&(o=[s]);let a=new Promise((c,u)=>{n.onmessage=function({data:f}){l(f)?c(f.result):u(new oe("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:r,parameters:{webAssemblyConfig:i}},o),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};rc.prototype.isDestroyed=function(){return!1};rc.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),le(this)};rc.taskCompletedEvent=kY;rc._defaultWorkerModulePrefix="Workers/";rc._workerModulePrefix=rc._defaultWorkerModulePrefix;rc._canTransferArrayBuffer=void 0;var Jn=rc;function cg(){}cg._transcodeTaskProcessor=new Jn("transcodeKTX2",Number.POSITIVE_INFINITY);cg._readyPromise=void 0;function U4e(){let e=cg._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return cg._transcodeTaskProcessor;throw new oe("KTX2 transcoder could not be initialized.")});cg._readyPromise=e}cg.transcode=function(e,t){return l(cg._readyPromise)||U4e(),cg._readyPromise.then(function(n){let i=e;e instanceof ArrayBuffer&&(i=new Uint8Array(e));let r={supportedTargetFormats:t,ktx2Buffer:i};return n.scheduleTask(r,[i.buffer])}).then(function(n){let i=n.length,r=Object.keys(n[0]);for(let o=0;o<i;o++){let s=n[o];for(let a=0;a<r.length;a++){let c=s[r[a]];s[r[a]]=new RD(c.internalFormat,c.datatype,c.width,c.height,c.levelBuffer)}}if(r.length===1){for(let o=0;o<i;++o)n[o]=n[o][r[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var OD=cg;var Xfe;Kfe.setKTX2SupportedFormats=function(e,t,n,i,r,o){Xfe={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:r,bc7:o}};function Kfe(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=De.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return OD.transcode(n,Xfe)})}var Ou=Kfe;var Tr={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};Tr.getMathType=function(e){switch(e){case Tr.SCALAR:return Number;case Tr.VEC2:return U;case Tr.VEC3:return h;case Tr.VEC4:return se;case Tr.MAT2:return Xi;case Tr.MAT3:return $;case Tr.MAT4:return N}};Tr.getNumberOfComponents=function(e){switch(e){case Tr.SCALAR:return 1;case Tr.VEC2:return 2;case Tr.VEC3:return 3;case Tr.VEC4:case Tr.MAT2:return 4;case Tr.MAT3:return 9;case Tr.MAT4:return 16}};Tr.getAttributeLocationCount=function(e){switch(e){case Tr.SCALAR:case Tr.VEC2:case Tr.VEC3:case Tr.VEC4:return 1;case Tr.MAT2:return 2;case Tr.MAT3:return 3;case Tr.MAT4:return 4}};Tr.getGlslType=function(e){switch(e){case Tr.SCALAR:return"float";case Tr.VEC2:return"vec2";case Tr.VEC3:return"vec3";case Tr.VEC4:return"vec4";case Tr.MAT2:return"mat2";case Tr.MAT3:return"mat3";case Tr.MAT4:return"mat4"}};Object.freeze(Tr);var Vt=Tr;var $fe=1/256,z4e=65536,VY=256,Lr={};Lr.octEncodeInRange=function(e,t,n){if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,r=n.y;n.x=(1-Math.abs(r))*D.signNotZero(i),n.y=(1-Math.abs(i))*D.signNotZero(r)}return n.x=D.toSNorm(n.x,t),n.y=D.toSNorm(n.y,t),n};Lr.octEncode=function(e,t){return Lr.octEncodeInRange(e,255,t)};var MD=new U,Jfe=new Uint8Array(1);function e6(e){return Jfe[0]=e,Jfe[0]}Lr.octEncodeToCartesian4=function(e,t){return Lr.octEncodeInRange(e,65535,MD),t.x=e6(MD.x*$fe),t.y=e6(MD.x),t.z=e6(MD.y*$fe),t.w=e6(MD.y),t};Lr.octDecodeInRange=function(e,t,n,i){if(i.x=D.fromSNorm(e,n),i.y=D.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let r=i.x;i.x=(1-Math.abs(i.y))*D.signNotZero(r),i.y=(1-Math.abs(r))*D.signNotZero(i.y)}return h.normalize(i,i)};Lr.octDecode=function(e,t,n){return Lr.octDecodeInRange(e,t,255,n)};Lr.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,r=e.z,o=e.w,s=n*VY+i,a=r*VY+o;return Lr.octDecodeInRange(s,a,65535,t)};Lr.octPackFloat=function(e){return 256*e.x+e.y};var jY=new U;Lr.octEncodeFloat=function(e){return Lr.octEncode(e,jY),Lr.octPackFloat(jY)};Lr.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),r=(n-i)*256;return Lr.octDecode(i,r,t)};Lr.octPack=function(e,t,n,i){let r=Lr.octEncodeFloat(e),o=Lr.octEncodeFloat(t),s=Lr.octEncode(n,jY);return i.x=65536*s.x+r,i.y=65536*s.y+o,i};Lr.octUnpack=function(e,t,n,i){let r=e.x/65536,o=Math.floor(r),s=(r-o)*65536;r=e.y/65536;let a=Math.floor(r),c=(r-a)*65536;Lr.octDecodeFloat(s,t),Lr.octDecodeFloat(c,n),Lr.octDecode(o,a,i)};Lr.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};Lr.decompressTextureCoordinates=function(e,t){let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function zY(e){return e>>1^-(e&1)}Lr.zigZagDeltaDecode=function(e,t,n){let i=e.length,r=0,o=0,s=0;for(let a=0;a<i;++a)r+=zY(e[a]),o+=zY(t[a]),e[a]=r,t[a]=o,l(n)&&(s+=zY(n[a]),n[a]=s)};Lr.dequantize=function(e,t,n,i){let r=Vt.getNumberOfComponents(n),o;switch(t){case Y.BYTE:o=127;break;case Y.UNSIGNED_BYTE:o=255;break;case Y.SHORT:o=32767;break;case Y.UNSIGNED_SHORT:o=65535;break;case Y.INT:o=2147483647;break;case Y.UNSIGNED_INT:o=4294967295;break}let s=new Float32Array(i*r);for(let a=0;a<i;a++)for(let c=0;c<r;c++){let u=a*r+c;s[u]=Math.max(e[u]/o,-1)}return s};Lr.encodeRGB8=function(e){return Math.round(D.clamp(e.red*255,0,255))*z4e+Math.round(D.clamp(e.green*255,0,255))*VY+Math.round(D.clamp(e.blue*255,0,255))};Lr.decodeRGB8=function(e,t){return e=Math.floor(e),t.red=(e>>16&255)/255,t.green=(e>>8&255)/255,t.blue=(e&255)/255,t};Lr.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=31,r=63,o=1/31,s=1/63;for(let a=0;a<n;a++){let c=e[a],u=c>>11,f=c>>5&r,d=c&i,p=3*a;t[p]=u*o,t[p+1]=f*s,t[p+2]=d*o}return t};var cn=Lr;var Zfe=new h,Qfe=new h,ede=new h;function V4e(e,t,n,i,r){l(r)||(r=new h);let o,s,a,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,D.EPSILON14))return h.clone(h.UNIT_X,r);if(h.equalsEpsilon(e,n,D.EPSILON14))return h.clone(h.UNIT_Y,r);if(h.equalsEpsilon(e,i,D.EPSILON14))return h.clone(h.UNIT_Z,r);o=h.subtract(n,t,Zfe),s=h.subtract(i,t,Qfe),a=h.subtract(e,t,ede),c=h.dot(o,o),u=h.dot(o,s),f=h.dot(o,a),d=h.dot(s,s),p=h.dot(s,a)}else{if(U.equalsEpsilon(e,t,D.EPSILON14))return h.clone(h.UNIT_X,r);if(U.equalsEpsilon(e,n,D.EPSILON14))return h.clone(h.UNIT_Y,r);if(U.equalsEpsilon(e,i,D.EPSILON14))return h.clone(h.UNIT_Z,r);o=U.subtract(n,t,Zfe),s=U.subtract(i,t,Qfe),a=U.subtract(e,t,ede),c=U.dot(o,o),u=U.dot(o,s),f=U.dot(o,a),d=U.dot(s,s),p=U.dot(s,a)}r.y=d*f-u*p,r.z=c*p-u*f;let g=c*d-u*u;if(g!==0)return r.y/=g,r.z/=g,r.x=1-r.y-r.z,r}var lx=V4e;function Rp(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}Rp.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var lg={high:0,low:0};Rp.fromCartesian=function(e,t){l(t)||(t=new Rp);let n=t.high,i=t.low;return Rp.encode(e.x,lg),n.x=lg.high,i.x=lg.low,Rp.encode(e.y,lg),n.y=lg.high,i.y=lg.low,Rp.encode(e.z,lg),n.z=lg.high,i.z=lg.low,t};var HY=new Rp;Rp.writeElements=function(e,t,n){Rp.fromCartesian(e,HY);let i=HY.high,r=HY.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=r.x,t[n+4]=r.y,t[n+5]=r.z};var Sn=Rp;var ma={UNSIGNED_BYTE:te.UNSIGNED_BYTE,UNSIGNED_SHORT:te.UNSIGNED_SHORT,UNSIGNED_INT:te.UNSIGNED_INT};ma.getSizeInBytes=function(e){switch(e){case ma.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ma.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ma.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};ma.fromSizeInBytes=function(e){switch(e){case 2:return ma.UNSIGNED_SHORT;case 4:return ma.UNSIGNED_INT;case 1:return ma.UNSIGNED_BYTE}};ma.validate=function(e){return l(e)&&(e===ma.UNSIGNED_BYTE||e===ma.UNSIGNED_SHORT||e===ma.UNSIGNED_INT)};ma.createTypedArray=function(e,t){return e>=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};ma.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};ma.fromTypedArray=function(e){if(e instanceof Uint8Array)return ma.UNSIGNED_BYTE;if(e instanceof Uint16Array)return ma.UNSIGNED_SHORT;if(e instanceof Uint32Array)return ma.UNSIGNED_INT};Object.freeze(ma);var je=ma;var GY={};GY.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function tde(e,t,n){let i=e+t;return D.sign(e)!==D.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}GY.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),u=Math.abs(e);if(c<u&&c/u<D.EPSILON14)return[0,0];if(c>u&&u/c<D.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let r=t*t,o=4*e*n,s=tde(r,-o,D.EPSILON14);if(s<0)return[];let a=-.5*tde(t,D.sign(t)*Math.sqrt(s),D.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Ul=GY;var qY={};qY.computeDiscriminant=function(e,t,n,i){let r=e*e,o=t*t,s=n*n,a=i*i;return 18*e*t*n*i+o*s-27*r*a-4*(e*s*n+o*t*i)};function WY(e,t,n,i){let r=e,o=t/3,s=n/3,a=i,c=r*s,u=o*a,f=o*o,d=s*s,p=r*s-f,g=r*a-o*s,m=o*a-d,y=4*p*m-g*g,A,b;if(y<0){let G,q,Q;f*u>=c*d?(G=r,q=p,Q=-2*o*p+r*g):(G=a,q=m,Q=-a*g+2*s*m);let J=-(Q<0?-1:1)*Math.abs(G)*Math.sqrt(-y);b=-Q+J;let Z=b/2,ae=Z<0?-Math.pow(-Z,1/3):Math.pow(Z,1/3),Ae=b===J?-ae:-q/ae;return A=q<=0?ae+Ae:-Q/(ae*ae+Ae*Ae+q),f*u>=c*d?[(A-o)/r]:[-a/(A+s)]}let x=p,T=-2*o*p+r*g,E=m,v=-a*g+2*s*m,S=Math.sqrt(y),I=Math.sqrt(3)/2,R=Math.abs(Math.atan2(r*S,-T)/3);A=2*Math.sqrt(-x);let O=Math.cos(R);b=A*O;let L=A*(-O/2-I*Math.sin(R)),_=b+L>2*o?b-o:L-o,C=r,w=_/C;R=Math.abs(Math.atan2(a*S,-v)/3),A=2*Math.sqrt(-E),O=Math.cos(R),b=A*O,L=A*(-O/2-I*Math.sin(R));let P=-a,M=b+L<2*s?b+s:L+s,F=P/M,V=C*M,B=-_*M-C*P,j=_*P,k=(s*B-o*j)/(-o*B+s*V);return w<=k?w<=F?k<=F?[w,k,F]:[w,F,k]:[F,w,k]:w<=F?[k,w,F]:k<=F?[k,F,w]:[F,k,w]}qY.computeRealRoots=function(e,t,n,i){let r,o;if(e===0)return Ul.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];o=-i/e;let s=o<0?-Math.pow(-o,1/3):Math.pow(o,1/3);return[s,s,s]}else if(i===0)return r=Ul.computeRealRoots(e,0,n),r.Length===0?[0]:[r[0],0,r[1]];return WY(e,0,n,i)}else{if(n===0)return i===0?(o=-t/e,o<0?[o,0,0]:[0,0,o]):WY(e,t,0,i);if(i===0)return r=Ul.computeRealRoots(e,t,n),r.length===0?[0]:r[1]<=0?[r[0],r[1],0]:r[0]>=0?[0,r[0],r[1]]:[r[0],0,r[1]]}return WY(e,t,n,i)};var ux=qY;var YY={};YY.computeDiscriminant=function(e,t,n,i,r){let o=e*e,s=o*e,a=t*t,c=a*t,u=n*n,f=u*n,d=i*i,p=d*i,g=r*r,m=g*r;return a*u*d-4*c*p-4*e*f*d+18*e*t*n*p-27*o*d*d+256*s*m+r*(18*c*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*d+144*o*n*d)+g*(144*e*a*n-27*a*a-128*o*u-192*o*t*i)};function Gh(e,t,n,i){let r=e*e,o=t-3*r/8,s=n-t*e/2+r*e/8,a=i-n*e/4+t*r/16-3*r*r/256,c=ux.computeRealRoots(1,2*o,o*o-4*a,-s*s);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)<D.EPSILON14){let d=Ul.computeRealRoots(1,o,a);if(d.length===2){let p=d[0],g=d[1],m;if(p>=0&&g>=0){let y=Math.sqrt(p),A=Math.sqrt(g);return[u-A,u-y,u+y,u+A]}else{if(p>=0&&g<0)return m=Math.sqrt(p),[u-m,u+m];if(p<0&&g>=0)return m=Math.sqrt(g),[u-m,u+m]}}return[]}else if(f>0){let d=Math.sqrt(f),p=(o+f-s/d)/2,g=(o+f+s/d)/2,m=Ul.computeRealRoots(1,d,p),y=Ul.computeRealRoots(1,-d,g);return m.length!==0?(m[0]+=u,m[1]+=u,y.length!==0?(y[0]+=u,y[1]+=u,m[1]<=y[0]?[m[0],m[1],y[0],y[1]]:y[1]<=m[0]?[y[0],y[1],m[0],m[1]]:m[0]>=y[0]&&m[1]<=y[1]?[y[0],m[0],m[1],y[1]]:y[0]>=m[0]&&y[1]<=m[1]?[m[0],y[0],y[1],m[1]]:m[0]>y[0]&&m[0]<y[1]?[y[0],m[0],y[1],m[1]]:[m[0],y[0],m[1],y[1]]):m):y.length!==0?(y[0]+=u,y[1]+=u,y):[]}}return[]}function ND(e,t,n,i){let r=n*n,o=t*t,s=e*e,a=-2*t,c=n*e+o-4*i,u=s*i-n*t*e+r,f=ux.computeRealRoots(1,a,c,u);if(f.length>0){let d=f[0],p=t-d,g=p*p,m=e/2,y=p/2,A=g-4*i,b=g+4*Math.abs(i),x=s-4*d,T=s+4*Math.abs(d),E,v;if(d<0||A*T<x*b){let C=Math.sqrt(x);E=C/2,v=C===0?0:(e*y-n)/C}else{let C=Math.sqrt(A);E=C===0?0:(e*y-n)/C,v=C/2}let S,I;m===0&&E===0?(S=0,I=0):D.sign(m)===D.sign(E)?(S=m+E,I=d/S):(I=m-E,S=d/I);let R,O;y===0&&v===0?(R=0,O=0):D.sign(y)===D.sign(v)?(R=y+v,O=i/R):(O=y-v,R=i/O);let L=Ul.computeRealRoots(1,S,R),_=Ul.computeRealRoots(1,I,O);if(L.length!==0)return _.length!==0?L[1]<=_[0]?[L[0],L[1],_[0],_[1]]:_[1]<=L[0]?[_[0],_[1],L[0],L[1]]:L[0]>=_[0]&&L[1]<=_[1]?[_[0],L[0],L[1],_[1]]:_[0]>=L[0]&&_[1]<=L[1]?[L[0],_[0],_[1],L[1]]:L[0]>_[0]&&L[0]<_[1]?[_[0],L[0],_[1],L[1]]:[L[0],_[0],L[1],_[1]]:L;if(_.length!==0)return _}return[]}YY.computeRealRoots=function(e,t,n,i,r){if(Math.abs(e)<D.EPSILON15)return ux.computeRealRoots(t,n,i,r);let o=t/e,s=n/e,a=i/e,c=r/e,u=o<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=c<0?u+1:u,u){case 0:return Gh(o,s,a,c);case 1:return ND(o,s,a,c);case 2:return ND(o,s,a,c);case 3:return Gh(o,s,a,c);case 4:return Gh(o,s,a,c);case 5:return ND(o,s,a,c);case 6:return Gh(o,s,a,c);case 7:return Gh(o,s,a,c);case 8:return ND(o,s,a,c);case 9:return Gh(o,s,a,c);case 10:return Gh(o,s,a,c);case 11:return ND(o,s,a,c);case 12:return Gh(o,s,a,c);case 13:return Gh(o,s,a,c);case 14:return Gh(o,s,a,c);case 15:return Gh(o,s,a,c);default:return}};var LD=YY;var XY=class e{constructor(t,n){n=h.clone(n??h.ZERO),h.equals(n,h.ZERO)||h.normalize(n,n),this.origin=h.clone(t??h.ZERO),this.direction=n}static clone(t,n){if(l(t))return l(n)?(n.origin=h.clone(t.origin),n.direction=h.clone(t.direction),n):new e(t.origin,t.direction)}static getPoint(t,n,i){return l(i)||(i=new h),i=h.multiplyByScalar(t.direction,n,i),h.add(t.origin,i,i)}},pn=XY;var io={};io.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,r=e.direction,o=t.normal,s=h.dot(o,r);if(Math.abs(s)<D.EPSILON15)return;let a=(-t.distance-h.dot(o,i))/s;if(!(a<0))return n=h.multiplyByScalar(r,a,n),h.add(i,n,n)};var j4e=new h,H4e=new h,lde=new h,nde=new h,ide=new h;io.rayTriangleParametric=function(e,t,n,i,r){r=r??!1;let o=e.origin,s=e.direction,a=h.subtract(n,t,j4e),c=h.subtract(i,t,H4e),u=h.cross(s,c,lde),f=h.dot(a,u),d,p,g,m,y;if(r){if(f<D.EPSILON6||(d=h.subtract(o,t,nde),g=h.dot(d,u),g<0||g>f)||(p=h.cross(d,a,ide),m=h.dot(s,p),m<0||g+m>f))return;y=h.dot(c,p)/f}else{if(Math.abs(f)<D.EPSILON6)return;let A=1/f;if(d=h.subtract(o,t,nde),g=h.dot(d,u)*A,g<0||g>1||(p=h.cross(d,a,ide),m=h.dot(s,p)*A,m<0||g+m>1))return;y=h.dot(c,p)*A}return y};io.rayTriangle=function(e,t,n,i,r,o){let s=io.rayTriangleParametric(e,t,n,i,r);if(!(!l(s)||s<0))return l(o)||(o=new h),h.multiplyByScalar(e.direction,s,o),h.add(e.origin,o,o)};var G4e=new pn;io.lineSegmentTriangle=function(e,t,n,i,r,o,s){let a=G4e;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=io.rayTriangleParametric(a,n,i,r,o);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function W4e(e,t,n,i){let r=t*t-4*e*n;if(r<0)return;if(r>0){let s=1/(2*e),a=Math.sqrt(r),c=(-t+a)*s,u=(-t-a)*s;return c<u?(i.root0=c,i.root1=u):(i.root0=u,i.root1=c),i}let o=-t/(2*e);if(o!==0)return i.root0=i.root1=o,i}var q4e={root0:0,root1:0};function ude(e,t,n){l(n)||(n=new Us);let i=e.origin,r=e.direction,o=t.center,s=t.radius*t.radius,a=h.subtract(i,o,lde),c=h.dot(r,r),u=2*h.dot(r,a),f=h.magnitudeSquared(a)-s,d=W4e(c,u,f,q4e);if(l(d))return n.start=d.root0,n.stop=d.root1,n}io.raySphere=function(e,t,n){if(n=ude(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var Y4e=new pn;io.lineSegmentSphere=function(e,t,n,i){let r=Y4e;h.clone(e,r.origin);let o=h.subtract(t,e,r.direction),s=h.magnitude(o);if(h.normalize(o,o),i=ude(r,n,i),!(!l(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var X4e=new h,K4e=new h;io.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,X4e),r=h.multiplyComponents(n,e.direction,K4e),o=h.magnitudeSquared(i),s=h.dot(i,r),a,c,u,f,d;if(o>1){if(s>=0)return;let p=s*s;if(a=o-1,c=h.magnitudeSquared(r),u=c*a,p<u)return;if(p>u){f=s*s-u,d=-s+Math.sqrt(f);let m=d/c,y=a/d;return m<y?new Us(m,y):{start:y,stop:m}}let g=Math.sqrt(a/c);return new Us(g,g)}else if(o<1)return a=o-1,c=h.magnitudeSquared(r),u=c*a,f=s*s-u,d=-s+Math.sqrt(f),new Us(0,d/c);if(s<0)return c=h.magnitudeSquared(r),new Us(0,-s/c)};var $4e=new Us,J4e=new Us,Z4e=new Us;io.rayAxisAlignedBoundingBox=function(e,t,n){l(n)||(n=new Us);let i=KY(e.origin.x,e.direction.x,t.minimum.x,t.maximum.x,$4e),r=KY(e.origin.y,e.direction.y,t.minimum.y,t.maximum.y,J4e),o=KY(e.origin.z,e.direction.z,t.minimum.z,t.maximum.z,Z4e);if(n.start=i.start>r.start?i.start:r.start,n.stop=i.stop<r.stop?i.stop:r.stop,!(i.start>r.stop||r.start>i.stop)&&!(n.start>o.stop||o.start>n.stop))return o.start>n.start&&(n.start=o.start),o.stop<n.stop&&(n.stop=o.stop),n};function KY(e,t,n,i,r){if(r.start=(n-e)/t,r.stop=(i-e)/t,r.stop<r.start){let o=r.stop;r.stop=r.start,r.start=o}return r}function fx(e,t,n){let i=e+t;return D.sign(e)!==D.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}io.quadraticVectorExpression=function(e,t,n,i,r){let o=i*i,s=r*r,a=(e[$.COLUMN1ROW1]-e[$.COLUMN2ROW2])*s,c=r*(i*fx(e[$.COLUMN1ROW0],e[$.COLUMN0ROW1],D.EPSILON15)+t.y),u=e[$.COLUMN0ROW0]*o+e[$.COLUMN2ROW2]*s+i*t.x+n,f=s*fx(e[$.COLUMN2ROW1],e[$.COLUMN1ROW2],D.EPSILON15),d=r*(i*fx(e[$.COLUMN2ROW0],e[$.COLUMN0ROW2])+t.z),p,g=[];if(d===0&&f===0){if(p=Ul.computeRealRoots(a,c,u),p.length===0)return g;let R=p[0],O=Math.sqrt(Math.max(1-R*R,0));if(g.push(new h(i,r*R,r*-O)),g.push(new h(i,r*R,r*O)),p.length===2){let L=p[1],_=Math.sqrt(Math.max(1-L*L,0));g.push(new h(i,r*L,r*-_)),g.push(new h(i,r*L,r*_))}return g}let m=d*d,y=f*f,A=a*a,b=d*f,x=A+y,T=2*(c*a+b),E=2*u*a+c*c-y+m,v=2*(u*c-b),S=u*u-m;if(x===0&&T===0&&E===0&&v===0)return g;p=LD.computeRealRoots(x,T,E,v,S);let I=p.length;if(I===0)return g;for(let R=0;R<I;++R){let O=p[R],L=O*O,_=Math.max(1-L,0),C=Math.sqrt(_),w;D.sign(a)===D.sign(u)?w=fx(a*L+u,c*O,D.EPSILON12):D.sign(u)===D.sign(c*O)?w=fx(a*L,c*O+u,D.EPSILON12):w=fx(a*L+c*O,u,D.EPSILON12);let P=fx(f*O,d,D.EPSILON15),M=w*P;M<0?g.push(new h(i,r*O,r*C)):M>0?g.push(new h(i,r*O,r*-C)):C!==0?(g.push(new h(i,r*O,r*-C)),g.push(new h(i,r*O,r*C)),++R):g.push(new h(i,r*O,r*C))}return g};var $Y=new h,rde=new h,ode=new h,t6=new h,Q4e=new h,e8e=new $,t8e=new $,n8e=new $,i8e=new $,r8e=new $,sde=new $,ade=new $,cde=new h,o8e=new h,s8e=new he;io.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let S=t.geodeticSurfaceNormal(n,$Y);if(h.dot(i,S)>=0)return n}let r=l(this.rayEllipsoid(e,t)),o=t.transformPositionToScaledSpace(i,$Y),s=h.normalize(o,o),a=h.mostOrthogonalAxis(o,t6),c=h.normalize(h.cross(a,s,rde),rde),u=h.normalize(h.cross(s,c,ode),ode),f=e8e;f[0]=s.x,f[1]=s.y,f[2]=s.z,f[3]=c.x,f[4]=c.y,f[5]=c.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let d=$.transpose(f,t8e),p=$.fromScale(t.radii,n8e),g=$.fromScale(t.oneOverRadii,i8e),m=r8e;m[0]=0,m[1]=-i.z,m[2]=i.y,m[3]=i.z,m[4]=0,m[5]=-i.x,m[6]=-i.y,m[7]=i.x,m[8]=0;let y=$.multiply($.multiply(d,g,sde),m,sde),A=$.multiply($.multiply(y,p,ade),f,ade),b=$.multiplyByVector(y,n,Q4e),x=io.quadraticVectorExpression(A,h.negate(b,$Y),0,0,1),T,E,v=x.length;if(v>0){let S=h.clone(h.ZERO,o8e),I=Number.NEGATIVE_INFINITY;for(let O=0;O<v;++O){T=$.multiplyByVector(p,$.multiplyByVector(f,x[O],cde),cde);let L=h.normalize(h.subtract(T,n,t6),t6),_=h.dot(L,i);_>I&&(I=_,S=h.clone(T,S))}let R=t.cartesianToCartographic(S,s8e);return I=D.clamp(I,0,1),E=h.magnitude(h.subtract(S,n,t6))*Math.sqrt(1-I*I),E=r?-E:E,R.height=E,t.cartographicToCartesian(R,new h)}};var a8e=new h;io.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let r=h.subtract(t,e,a8e),o=n.normal,s=h.dot(o,r);if(Math.abs(s)<D.EPSILON6)return;let a=h.dot(o,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return h.multiplyByScalar(r,c,i),h.add(e,i,i),i};io.trianglePlaneIntersection=function(e,t,n,i){let r=i.normal,o=i.distance,s=h.dot(r,e)+o<0,a=h.dot(r,t)+o<0,c=h.dot(r,n)+o<0,u=0;u+=s?1:0,u+=a?1:0,u+=c?1:0;let f,d;if((u===1||u===2)&&(f=new h,d=new h),u===1){if(s)return io.lineSegmentPlane(e,t,i,f),io.lineSegmentPlane(e,n,i,d),{positions:[e,t,n,f,d],indices:[0,3,4,1,2,4,1,4,3]};if(a)return io.lineSegmentPlane(t,n,i,f),io.lineSegmentPlane(t,e,i,d),{positions:[e,t,n,f,d],indices:[1,3,4,2,0,4,2,4,3]};if(c)return io.lineSegmentPlane(n,e,i,f),io.lineSegmentPlane(n,t,i,d),{positions:[e,t,n,f,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!c)return io.lineSegmentPlane(e,n,i,f),io.lineSegmentPlane(t,n,i,d),{positions:[e,t,n,f,d],indices:[0,1,4,0,4,3,2,3,4]}}else return io.lineSegmentPlane(n,t,i,f),io.lineSegmentPlane(e,t,i,d),{positions:[e,t,n,f,d],indices:[2,0,4,2,4,3,1,3,4]};else return io.lineSegmentPlane(t,e,i,f),io.lineSegmentPlane(n,e,i,d),{positions:[e,t,n,f,d],indices:[1,2,4,1,4,3,0,3,4]}};var _i=io;function Na(e,t){this.normal=h.clone(e),this.distance=t}Na.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Na(t,i)};var c8e=new h;Na.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,c8e),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Na(n,i)};Na.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var l8e=new h;Na.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Na.getPointDistance(e,t),r=h.multiplyByScalar(e.normal,i,l8e);return h.subtract(t,r,n)};var u8e=new N,f8e=new se,d8e=new h;Na.transform=function(e,t,n){let i=e.normal,r=e.distance,o=N.inverseTranspose(t,u8e),s=se.fromElements(i.x,i.y,i.z,r,f8e);s=N.multiplyByVector(o,s,s);let a=h.fromCartesian4(s,d8e);return s=se.divideByScalar(s,h.magnitude(a),s),Na.fromCartesian4(s,n)};Na.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Na(e.normal,e.distance)};Na.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Na.ORIGIN_XY_PLANE=Object.freeze(new Na(h.UNIT_Z,0));Na.ORIGIN_YZ_PLANE=Object.freeze(new Na(h.UNIT_X,0));Na.ORIGIN_ZX_PLANE=Object.freeze(new Na(h.UNIT_Y,0));var sn=Na;var JY={};JY.calculateACMR=function(e){e=e??H.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,r=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<r;)c>n&&(n=c),++a,c=t[a]}let o=[];for(let a=0;a<n+1;a++)o[a]=0;let s=i+1;for(let a=0;a<r;++a)s-o[t[a]]>i&&(o[t[a]]=s,++s);return(s-i+1)/(r/3)};JY.tipsify=function(e){e=e??H.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,r;function o(_,C,w,P){for(;C.length>=1;){let M=C[C.length-1];if(C.splice(C.length-1,1),_[M].numLiveTriangles>0)return M}for(;r<P;){if(_[r].numLiveTriangles>0)return++r,r-1;++r}return-1}function s(_,C,w,P,M,F,V){let B=-1,j,k=-1,G=0;for(;G<w.length;){let q=w[G];P[q].numLiveTriangles&&(j=0,M-P[q].timeStamp+2*P[q].numLiveTriangles<=C&&(j=M-P[q].timeStamp),(j>k||k===-1)&&(k=j,B=q)),++G}return B===-1?o(P,F,_,V):B}let a=t.length,c=0,u=0,f=t[u],d=a;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],g;for(g=0;g<c;g++)p[g]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let y=0,A=i+1;r=1;let b,x=[],T,E,v=0,S=[],I=a/3,R=[];for(g=0;g<I;g++)R[g]=!1;let O,L;for(;y!==-1;){b=[],E=p[y],L=E.vertexTriangles.length;for(let _=0;_<L;++_)if(m=E.vertexTriangles[_],!R[m]){R[m]=!0,u=m+m+m;for(let C=0;C<3;++C)O=t[u],b.push(O),x.push(O),S[v]=O,++v,T=p[O],--T.numLiveTriangles,A-T.timeStamp>i&&(T.timeStamp=A,++A),++u}y=s(t,i,b,p,A,x,c)}return S};var FD=JY;var zl={};function c6(e,t,n,i,r){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=r,e[t++]=r,e[t]=n}function h8e(e){let t=e.length,n=t/3*6,i=je.createTypedArray(t,n),r=0;for(let o=0;o<t;o+=3,r+=6)c6(i,r,e[o],e[o+1],e[o+2]);return i}function m8e(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=je.createTypedArray(t,n);c6(i,0,e[0],e[1],e[2]);let r=6;for(let o=3;o<t;++o,r+=6)c6(i,r,e[o-1],e[o],e[o-2]);return i}return new Uint16Array}function p8e(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=je.createTypedArray(t,n),r=e[0],o=0;for(let s=1;s<t;++s,o+=6)c6(i,o,r,e[s],e[s+1]);return i}return new Uint16Array}zl.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Oe.TRIANGLES:e.indices=h8e(t);break;case Oe.TRIANGLE_STRIP:e.indices=m8e(t);break;case Oe.TRIANGLE_FAN:e.indices=p8e(t);break}e.primitiveType=Oe.LINES}return e};zl.createLineSegmentsForVectors=function(e,t,n){t=t??"normal",n=n??1e4;let i=e.attributes.position.values,r=e.attributes[t].values,o=i.length,s=new Float64Array(2*o),a=0;for(let f=0;f<o;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+r[f]*n,s[a++]=i[f+1]+r[f+1]*n,s[a++]=i[f+2]+r[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new ue(u.center,u.radius+n)),new St({attributes:{position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Oe.LINES,boundingSphere:c})};zl.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},r=0,o,s=t.length;for(o=0;o<s;++o){let a=t[o];l(n[a])&&(i[a]=r++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=r++);return i};zl.reorderForPreVertexCache=function(e){let t=St.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let r=n,o=r.length,s=je.createTypedArray(t,o),a=0,c=0,u=0,f;for(;a<o;)f=i[r[a]],f!==-1?s[c]=f:(f=r[a],i[f]=u,s[c]=u,++u),++a,++c;e.indices=s;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let g=d[p],m=g.values,y=0,A=g.componentsPerAttribute,b=Y.createTypedArray(g.componentDatatype,u*A);for(;y<t;){let x=i[y];if(x!==-1)for(let T=0;T<A;T++)b[A*x+T]=m[A*y+T];++y}g.values=b}}return e};zl.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Oe.TRIANGLES&&l(n)){let i=n.length,r=0;for(let o=0;o<i;o++)n[o]>r&&(r=n[o]);e.indices=FD.tipsify({indices:n,maximumIndex:r,cacheSize:t})}return e};function fde(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ne({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function g8e(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let r=t[i];for(let o=0;o<r.componentsPerAttribute;++o)e[i].values.push(r.values[n*r.componentsPerAttribute+o])}}zl.fitToUnsignedShortIndices=function(e){let t=[],n=St.computeNumberOfVertices(e);if(l(e.indices)&&n>=D.SIXTY_FOUR_KILOBYTES){let i=[],r=[],o=0,s=fde(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Oe.TRIANGLES?u=3:e.primitiveType===Oe.LINES?u=2:e.primitiveType===Oe.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=a[f+d],g=i[p];l(g)||(g=o++,i[p]=g,g8e(s,e.attributes,p)),r.push(g)}o+u>=D.SIXTY_FOUR_KILOBYTES&&(t.push(new St({attributes:s,indices:r,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],r=[],o=0,s=fde(e.attributes))}r.length!==0&&t.push(new St({attributes:s,indices:r,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var dde=new h,_8e=new he;zl.projectTo2D=function(e,t,n,i,r){let o=e.attributes[t];r=l(r)?r:new Ui;let s=r.ellipsoid,a=o.values,c=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let d=h.fromArray(a,f,dde),p=s.cartesianToCartographic(d,_8e),g=r.project(p,dde);c[u++]=g.x,c[u++]=g.y,c[u++]=g.z}return e.attributes[n]=o,e.attributes[i]=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var ZY={high:0,low:0};zl.encodeAttribute=function(e,t,n,i){let r=e.attributes[t],o=r.values,s=o.length,a=new Float32Array(s),c=new Float32Array(s);for(let f=0;f<s;++f)Sn.encode(o[f],ZY),a[f]=ZY.high,c[f]=ZY.low;let u=r.componentsPerAttribute;return e.attributes[n]=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var qh=new h;function QY(e,t){if(l(t)){let n=t.values,i=n.length;for(let r=0;r<i;r+=3)h.unpack(n,r,qh),N.multiplyByPoint(e,qh,qh),h.pack(qh,n,r)}}function eX(e,t){if(l(t)){let n=t.values,i=n.length;for(let r=0;r<i;r+=3)h.unpack(n,r,qh),$.multiplyByVector(e,qh,qh),qh=h.normalize(qh,qh),h.pack(qh,n,r)}}var n6=new N,i6=new $;zl.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(N.equals(t,N.IDENTITY))return e;let n=e.geometry.attributes;QY(t,n.position),QY(t,n.prevPosition),QY(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(N.inverse(t,n6),N.transpose(n6,n6),N.getMatrix3(n6,i6),eX(i6,n.normal),eX(i6,n.tangent),eX(i6,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=ue.transform(i,t,i)),e.modelMatrix=N.clone(N.IDENTITY),e};function y8e(e,t){let n=e.length,i={},r=e[0][t].attributes,o;for(o in r)if(r.hasOwnProperty(o)&&l(r[o])&&l(r[o].values)){let s=r[o],a=s.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[o];if(!l(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){c=!1;break}a+=f.values.length}c&&(i[o]=new Ne({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:Y.createTypedArray(s.componentDatatype,a)}))}return i}var A8e=new h;function tX(e,t){let n=e.length,i,r,o,s,a=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=y8e(e,t),d,p,g;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,s=0,r=0;r<n;++r)for(p=e[r][t].attributes[i].values,g=p.length,o=0;o<g;++o)d[s++]=p[o];let m;if(c){let x=0;for(r=0;r<n;++r)x+=e[r][t].indices.length;let T=St.computeNumberOfVertices(new St({attributes:f,primitiveType:Oe.POINTS})),E=je.createTypedArray(T,x),v=0,S=0;for(r=0;r<n;++r){let I=e[r][t].indices,R=I.length;for(s=0;s<R;++s)E[v++]=S+I[s];S+=St.computeNumberOfVertices(e[r][t])}m=E}let y=new h,A=0,b;for(r=0;r<n;++r){if(b=e[r][t].boundingSphere,!l(b)){y=void 0;break}h.add(b.center,y,y)}if(l(y))for(h.divideByScalar(y,n,y),r=0;r<n;++r){b=e[r][t].boundingSphere;let x=h.magnitude(h.subtract(b.center,y,A8e))+b.radius;x>A&&(A=x)}return new St({attributes:f,indices:m,primitiveType:u,boundingSphere:l(y)?new ue(y,A):void 0})}zl.combineInstances=function(e){let t=[],n=[],i=e.length;for(let o=0;o<i;++o){let s=e[o];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let r=[];return t.length>0&&r.push(tX(t,"geometry")),n.length>0&&(r.push(tX(n,"westHemisphereGeometry")),r.push(tX(n,"eastHemisphereGeometry"))),r};var wd=new h,BD=new h,xv=new h,Tv=new h;zl.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,r=n.position.values.length/3,o=t.length,s=new Array(r),a=new Array(o/3),c=new Array(o),u;for(u=0;u<r;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<o;u+=3){let m=t[u],y=t[u+1],A=t[u+2],b=m*3,x=y*3,T=A*3;BD.x=i[b],BD.y=i[b+1],BD.z=i[b+2],xv.x=i[x],xv.y=i[x+1],xv.z=i[x+2],Tv.x=i[T],Tv.y=i[T+1],Tv.z=i[T+2],s[m].count++,s[y].count++,s[A].count++,h.subtract(xv,BD,xv),h.subtract(Tv,BD,Tv),a[f]=h.cross(xv,Tv,new h),f++}let d=0;for(u=0;u<r;u++)s[u].indexOffset+=d,d+=s[u].count;f=0;let p;for(u=0;u<o;u+=3){p=s[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=s[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=s[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let g=new Float32Array(r*3);for(u=0;u<r;u++){let m=u*3;if(p=s[u],h.clone(h.ZERO,wd),p.count>0){for(f=0;f<p.count;f++)h.add(wd,a[c[p.indexOffset+f]],wd);h.equalsEpsilon(h.ZERO,wd,D.EPSILON10)&&h.clone(a[c[p.indexOffset]],wd)}h.equalsEpsilon(h.ZERO,wd,D.EPSILON10)&&(wd.z=1),h.normalize(wd,wd),g[m]=wd.x,g[m+1]=wd.y,g[m+2]=wd.z}return e.attributes.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g}),e};var b8e=new h,hde=new h,x8e=new h;zl.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,r=e.attributes.normal.values,o=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<a;u+=3){let y=n[u],A=n[u+1],b=n[u+2];f=y*3,d=A*3,p=b*3;let x=y*2,T=A*2,E=b*2,v=i[f],S=i[f+1],I=i[f+2],R=o[x],O=o[x+1],L=o[T+1]-O,_=o[E+1]-O,C=1/((o[T]-R)*_-(o[E]-R)*L),w=(_*(i[d]-v)-L*(i[p]-v))*C,P=(_*(i[d+1]-S)-L*(i[p+1]-S))*C,M=(_*(i[d+2]-I)-L*(i[p+2]-I))*C;c[f]+=w,c[f+1]+=P,c[f+2]+=M,c[d]+=w,c[d+1]+=P,c[d+2]+=M,c[p]+=w,c[p+1]+=P,c[p+2]+=M}let g=new Float32Array(s*3),m=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,d=f+1,p=f+2;let y=h.fromArray(r,f,b8e),A=h.fromArray(c,f,x8e),b=h.dot(y,A);h.multiplyByScalar(y,b,hde),h.normalize(h.subtract(A,hde,A),A),g[f]=A.x,g[d]=A.y,g[p]=A.z,h.normalize(h.cross(y,A,A),A),m[f]=A.x,m[d]=A.y,m[p]=A.z}return e.attributes.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g}),e.attributes.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m}),e};var kD=new U,Wh=new h,mde=new h,pde=new h,r6=new U;zl.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let S=t.values;i=S.length/3;let I=new Float32Array(i*2),R=0;for(n=0;n<i;++n){if(h.fromArray(S,n*3,Wh),h.equals(Wh,h.ZERO)){R+=2;continue}r6=cn.octEncodeInRange(Wh,65535,r6),I[R++]=r6.x,I[R++]=r6.y}return e.attributes.compressedAttributes=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:I}),delete e.attributes.extrudeDirection,e}let r=e.attributes.normal,o=e.attributes.st,s=l(r),a=l(o);if(!s&&!a)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,g,m,y;s&&(p=r.values),a&&(g=o.values),f&&(m=c.values),d&&(y=u.values),i=(s?p.length:g.length)/(s?3:2);let x=i,T=a&&s?2:1;T+=f||d?1:0,x*=T;let E=new Float32Array(x),v=0;for(n=0;n<i;++n){a&&(U.fromArray(g,n*2,kD),E[v++]=cn.compressTextureCoordinates(kD));let S=n*3;s&&l(m)&&l(y)?(h.fromArray(p,S,Wh),h.fromArray(m,S,mde),h.fromArray(y,S,pde),cn.octPack(Wh,mde,pde,kD),E[v++]=kD.x,E[v++]=kD.y):(s&&(h.fromArray(p,S,Wh),E[v++]=cn.octEncodeFloat(Wh)),f&&(h.fromArray(m,S,Wh),E[v++]=cn.octEncodeFloat(Wh)),d&&(h.fromArray(y,S,Wh),E[v++]=cn.octEncodeFloat(Wh)))}return e.attributes.compressedAttributes=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:T,values:E}),s&&delete e.attributes.normal,a&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function T8e(e){if(l(e.indices))return e;let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function E8e(e){let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let r=3;r<t;++r)n[i++]=r-1,n[i++]=0,n[i++]=r;return e.indices=n,e.primitiveType=Oe.TRIANGLES,e}function C8e(e){let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let r=3;r<t-1;r+=2)n[i++]=r,n[i++]=r-1,n[i++]=r+1,r+2<t&&(n[i++]=r,n[i++]=r+1,n[i++]=r+2);return e.indices=n,e.primitiveType=Oe.TRIANGLES,e}function v8e(e){if(l(e.indices))return e;let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function S8e(e){let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let r=2;r<t;++r)n[i++]=r-1,n[i++]=r;return e.indices=n,e.primitiveType=Oe.LINES,e}function w8e(e){let t=St.computeNumberOfVertices(e),n=je.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let r=2;r<t;++r)n[i++]=r-1,n[i++]=r;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Oe.LINES,e}function I8e(e){switch(e.primitiveType){case Oe.TRIANGLE_FAN:return E8e(e);case Oe.TRIANGLE_STRIP:return C8e(e);case Oe.TRIANGLES:return T8e(e);case Oe.LINE_STRIP:return S8e(e);case Oe.LINE_LOOP:return w8e(e);case Oe.LINES:return v8e(e)}return e}function ky(e,t){Math.abs(e.y)<D.EPSILON6&&(t?e.y=-D.EPSILON6:e.y=D.EPSILON6)}function P8e(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){ky(e,e.y<0),ky(t,t.y<0),ky(n,n.y<0);return}let i=Math.abs(e.y),r=Math.abs(t.y),o=Math.abs(n.y),s;i>r?i>o?s=D.sign(e.y):s=D.sign(n.y):r>o?s=D.sign(t.y):s=D.sign(n.y);let a=s<0;ky(e,a),ky(t,a),ky(n,a)}var gde=new h;function Id(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,gde),e.y/(e.y-t.y),gde),n),h.clone(n,i),ky(n,!0),ky(i,!1)}var dx=new h,hx=new h,mx=new h,px=new h,nX={positions:new Array(7),indices:new Array(9)};function D8e(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;P8e(e,t,n);let i=e.y<0,r=t.y<0,o=n.y<0,s=0;s+=i?1:0,s+=r?1:0,s+=o?1:0;let a=nX.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Id(e,t,dx,mx),Id(e,n,hx,px),a[0]=0,a[3]=1,a[4]=2,a[6]=1):r?(Id(t,n,dx,mx),Id(t,e,hx,px),a[0]=1,a[3]=2,a[4]=0,a[6]=2):o&&(Id(n,e,dx,mx),Id(n,t,hx,px),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?r?o||(Id(n,e,dx,mx),Id(n,t,hx,px),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Id(t,n,dx,mx),Id(t,e,hx,px),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Id(e,t,dx,mx),Id(e,n,hx,px),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=nX.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=dx,c[4]=hx,c[5]=mx,c[6]=px,c.length=7),nX}function _de(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let r in n)if(n.hasOwnProperty(r)&&l(n[r])&&l(n[r].values)){let o=n[r];o.values=Y.createTypedArray(o.componentDatatype,o.values)}let i=St.computeNumberOfVertices(e);return e.indices=je.createTypedArray(i,e.indices),t&&(e.boundingSphere=ue.fromVertices(n.position.values)),e}function Cv(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let r=t[i];n[i]=new Ne({componentDatatype:r.componentDatatype,componentsPerAttribute:r.componentsPerAttribute,normalize:r.normalize,values:[]})}return new St({attributes:n,indices:[],primitiveType:e.primitiveType})}function sX(e,t,n){let i=l(e.geometry.boundingSphere);t=_de(t,i),n=_de(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function aX(e,t){let n=new e,i=new e,r=new e;return function(o,s,a,c,u,f,d,p){let g=e.fromArray(u,o*t,n),m=e.fromArray(u,s*t,i),y=e.fromArray(u,a*t,r);e.multiplyByScalar(g,c.x,g),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(y,c.z,y);let A=e.add(g,m,g);e.add(A,y,A),p&&e.normalize(A,A),e.pack(A,f,d*t)}}var R8e=aX(se,4),a6=aX(h,3),Ede=aX(U,2),O8e=function(e,t,n,i,r,o,s){let a=r[e]*i.x,c=r[t]*i.y,u=r[n]*i.z;o[s]=a+c+u>D.EPSILON6?1:0},UD=new h,iX=new h,rX=new h,M8e=new h;function o6(e,t,n,i,r,o,s,a,c,u,f,d,p,g,m,y){if(!l(o)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&g===0)return;let A=h.fromArray(r,e*3,UD),b=h.fromArray(r,t*3,iX),x=h.fromArray(r,n*3,rX),T=lx(i,A,b,x,M8e);if(l(T)){if(l(o)&&a6(e,t,n,T,o,d.normal.values,y,!0),l(u)){let E=h.fromArray(u,e*3,UD),v=h.fromArray(u,t*3,iX),S=h.fromArray(u,n*3,rX);h.multiplyByScalar(E,T.x,E),h.multiplyByScalar(v,T.y,v),h.multiplyByScalar(S,T.z,S);let I;!h.equals(E,h.ZERO)||!h.equals(v,h.ZERO)||!h.equals(S,h.ZERO)?(I=h.add(E,v,E),h.add(I,S,I),h.normalize(I,I)):(I=UD,I.x=0,I.y=0,I.z=0),h.pack(I,d.extrudeDirection.values,y*3)}if(l(f)&&O8e(e,t,n,T,f,d.applyOffset.values,y),l(s)&&a6(e,t,n,T,s,d.tangent.values,y,!0),l(a)&&a6(e,t,n,T,a,d.bitangent.values,y,!0),l(c)&&Ede(e,t,n,T,c,d.st.values,y),g>0)for(let E=0;E<g;E++){let v=p[E];N8e(e,t,n,T,y,m[v],d[v])}}}function N8e(e,t,n,i,r,o,s){let a=o.componentsPerAttribute,c=o.values,u=s.values;switch(a){case 4:R8e(e,t,n,i,c,u,r,!1);break;case 3:a6(e,t,n,i,c,u,r,!1);break;case 2:Ede(e,t,n,i,c,u,r,!1);break;default:u[r]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function Op(e,t,n,i,r,o){let s=e.position.values.length/3;if(r!==-1){let a=i[r],c=n[a];return c===-1?(n[a]=s,e.position.values.push(o.x,o.y,o.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(o.x,o.y,o.z),t.push(s),s}var L8e={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function yde(e){let t=e.geometry,n=t.attributes,i=n.position.values,r=l(n.normal)?n.normal.values:void 0,o=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let I in n)n.hasOwnProperty(I)&&!L8e[I]&&l(n[I])&&d.push(I);let p=d.length,g=Cv(t),m=Cv(t),y,A,b,x,T,E=[];E.length=i.length/3;let v=[];for(v.length=i.length/3,T=0;T<E.length;++T)E[T]=-1,v[T]=-1;let S=f.length;for(T=0;T<S;T+=3){let I=f[T],R=f[T+1],O=f[T+2],L=h.fromArray(i,I*3),_=h.fromArray(i,R*3),C=h.fromArray(i,O*3),w=D8e(L,_,C);if(l(w)&&w.positions.length>3){let P=w.positions,M=w.indices,F=M.length;for(let V=0;V<F;++V){let B=M[V],j=P[B];j.y<0?(y=m.attributes,A=m.indices,b=E):(y=g.attributes,A=g.indices,b=v),x=Op(y,A,b,f,B<3?T+B:-1,j),o6(I,R,O,j,i,r,s,o,a,c,u,y,d,p,n,x)}}else l(w)&&(L=w.positions[0],_=w.positions[1],C=w.positions[2]),L.y<0?(y=m.attributes,A=m.indices,b=E):(y=g.attributes,A=g.indices,b=v),x=Op(y,A,b,f,T,L),o6(I,R,O,L,i,r,s,o,a,c,u,y,d,p,n,x),x=Op(y,A,b,f,T+1,_),o6(I,R,O,_,i,r,s,o,a,c,u,y,d,p,n,x),x=Op(y,A,b,f,T+2,C),o6(I,R,O,C,i,r,s,o,a,c,u,y,d,p,n,x)}sX(e,m,g)}var Cde=sn.fromPointNormal(h.ZERO,h.UNIT_Y),F8e=new h,B8e=new h;function Ev(e,t,n,i,r,o,s){if(!l(s))return;let a=h.fromArray(i,e*3,UD);h.equalsEpsilon(a,n,D.EPSILON10)?o.applyOffset.values[r]=s[e]:o.applyOffset.values[r]=s[t]}function Ade(e){let t=e.geometry,n=t.attributes,i=n.position.values,r=l(n.applyOffset)?n.applyOffset.values:void 0,o=t.indices,s=Cv(t),a=Cv(t),c,u=o.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=o[c],g=o[c+1],m=h.fromArray(i,p*3,UD),y=h.fromArray(i,g*3,iX),A;Math.abs(m.y)<D.EPSILON6&&(m.y<0?m.y=-D.EPSILON6:m.y=D.EPSILON6),Math.abs(y.y)<D.EPSILON6&&(y.y<0?y.y=-D.EPSILON6:y.y=D.EPSILON6);let b=s.attributes,x=s.indices,T=d,E=a.attributes,v=a.indices,S=f,I=_i.lineSegmentPlane(m,y,Cde,rX);if(l(I)){let R=h.multiplyByScalar(h.UNIT_Y,5*D.EPSILON9,F8e);m.y<0&&(h.negate(R,R),b=a.attributes,x=a.indices,T=f,E=s.attributes,v=s.indices,S=d);let O=h.add(I,R,B8e);A=Op(b,x,T,o,c,m),Ev(p,g,m,i,A,b,r),A=Op(b,x,T,o,-1,O),Ev(p,g,O,i,A,b,r),h.negate(R,R),h.add(I,R,O),A=Op(E,v,S,o,-1,O),Ev(p,g,O,i,A,E,r),A=Op(E,v,S,o,c+1,y),Ev(p,g,y,i,A,E,r)}else{let R,O,L;m.y<0?(R=a.attributes,O=a.indices,L=f):(R=s.attributes,O=s.indices,L=d),A=Op(R,O,L,o,c,m),Ev(p,g,m,i,A,R,r),A=Op(R,O,L,o,c+1,y),Ev(p,g,y,i,A,R,r)}}sX(e,a,s)}var bde=new U,k8e=new U,vde=new h,Sde=new h,oX=new h,U8e=new h,z8e=new h,V8e=new h,xde=new se;function Tde(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,r=t.nextPosition.values,o=n.length;for(let s=0;s<o;s+=3){let a=h.unpack(n,s,vde);if(a.x>0)continue;let c=h.unpack(i,s,Sde);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let u=h.unpack(r,s,oX);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<o?(r[s]=n[s+3],r[s+1]=n[s+4],r[s+2]=n[s+5]):h.pack(a,r,s))}}var j8e=5*D.EPSILON9,s6=D.EPSILON6;function H8e(e){let t=e.geometry,n=t.attributes,i=n.position.values,r=n.prevPosition.values,o=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=Cv(t),f=Cv(t),d,p,g,m=!1,y=i.length/3;for(d=0;d<y;d+=4){let A=d,b=d+2,x=h.fromArray(i,A*3,vde),T=h.fromArray(i,b*3,Sde);if(Math.abs(x.y)<s6)for(x.y=s6*(T.y<0?-1:1),i[d*3+1]=x.y,i[(d+1)*3+1]=x.y,p=A*3;p<A*3+12;p+=3)r[p]=i[d*3],r[p+1]=i[d*3+1],r[p+2]=i[d*3+2];if(Math.abs(T.y)<s6)for(T.y=s6*(x.y<0?-1:1),i[(d+2)*3+1]=T.y,i[(d+3)*3+1]=T.y,p=A*3;p<A*3+12;p+=3)o[p]=i[(d+2)*3],o[p+1]=i[(d+2)*3+1],o[p+2]=i[(d+2)*3+2];let E=u.attributes,v=u.indices,S=f.attributes,I=f.indices,R=_i.lineSegmentPlane(x,T,Cde,U8e);if(l(R)){m=!0;let O=h.multiplyByScalar(h.UNIT_Y,j8e,z8e);x.y<0&&(h.negate(O,O),E=f.attributes,v=f.indices,S=u.attributes,I=u.indices);let L=h.add(R,O,V8e);E.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),E.position.values.push(L.x,L.y,L.z),E.position.values.push(L.x,L.y,L.z),E.prevPosition.values.push(r[A*3],r[A*3+1],r[A*3+2]),E.prevPosition.values.push(r[A*3+3],r[A*3+4],r[A*3+5]),E.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),E.nextPosition.values.push(L.x,L.y,L.z),h.negate(O,O),h.add(R,O,L),S.position.values.push(L.x,L.y,L.z),S.position.values.push(L.x,L.y,L.z),S.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.prevPosition.values.push(L.x,L.y,L.z),S.prevPosition.values.push(L.x,L.y,L.z),S.prevPosition.values.push(L.x,L.y,L.z),S.prevPosition.values.push(L.x,L.y,L.z),S.nextPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.nextPosition.values.push(o[b*3],o[b*3+1],o[b*3+2]),S.nextPosition.values.push(o[b*3+3],o[b*3+4],o[b*3+5]);let _=U.fromArray(s,A*2,bde),C=Math.abs(_.y);E.expandAndWidth.values.push(-1,C,1,C),E.expandAndWidth.values.push(-1,-C,1,-C),S.expandAndWidth.values.push(-1,C,1,C),S.expandAndWidth.values.push(-1,-C,1,-C);let w=h.magnitudeSquared(h.subtract(R,x,oX));if(w/=h.magnitudeSquared(h.subtract(T,x,oX)),l(c)){let P=se.fromArray(c,A*4,xde),M=se.fromArray(c,b*4,xde),F=D.lerp(P.x,M.x,w),V=D.lerp(P.y,M.y,w),B=D.lerp(P.z,M.z,w),j=D.lerp(P.w,M.w,w);for(p=A*4;p<A*4+8;++p)E.color.values.push(c[p]);for(E.color.values.push(F,V,B,j),E.color.values.push(F,V,B,j),S.color.values.push(F,V,B,j),S.color.values.push(F,V,B,j),p=b*4;p<b*4+8;++p)S.color.values.push(c[p])}if(l(a)){let P=U.fromArray(a,A*2,bde),M=U.fromArray(a,(d+3)*2,k8e),F=D.lerp(P.x,M.x,w);for(p=A*2;p<A*2+4;++p)E.st.values.push(a[p]);for(E.st.values.push(F,P.y),E.st.values.push(F,M.y),S.st.values.push(F,P.y),S.st.values.push(F,M.y),p=b*2;p<b*2+4;++p)S.st.values.push(a[p])}g=E.position.values.length/3-4,v.push(g,g+2,g+1),v.push(g+1,g+2,g+3),g=S.position.values.length/3-4,I.push(g,g+2,g+1),I.push(g+1,g+2,g+3)}else{let O,L;for(x.y<0?(O=f.attributes,L=f.indices):(O=u.attributes,L=u.indices),O.position.values.push(x.x,x.y,x.z),O.position.values.push(x.x,x.y,x.z),O.position.values.push(T.x,T.y,T.z),O.position.values.push(T.x,T.y,T.z),p=d*3;p<d*3+12;++p)O.prevPosition.values.push(r[p]),O.nextPosition.values.push(o[p]);for(p=d*2;p<d*2+8;++p)O.expandAndWidth.values.push(s[p]),l(a)&&O.st.values.push(a[p]);if(l(c))for(p=d*4;p<d*4+16;++p)O.color.values.push(c[p]);g=O.position.values.length/3-4,L.push(g,g+2,g+1),L.push(g+1,g+2,g+3)}}m&&(Tde(f),Tde(u)),sX(e,f,u)}zl.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||ue.intersectPlane(n,sn.ORIGIN_ZX_PLANE)!==$t.INTERSECTING))return e;if(t.geometryType!==Sd.NONE)switch(t.geometryType){case Sd.POLYLINES:H8e(e);break;case Sd.TRIANGLES:yde(e);break;case Sd.LINES:Ade(e);break}else I8e(t),t.primitiveType===Oe.TRIANGLES?yde(e):t.primitiveType===Oe.LINES&&Ade(e);return e};var Gn=zl;var Oi={UNSIGNED_BYTE:te.UNSIGNED_BYTE,UNSIGNED_SHORT:te.UNSIGNED_SHORT,UNSIGNED_INT:te.UNSIGNED_INT,FLOAT:te.FLOAT,HALF_FLOAT:te.HALF_FLOAT_OES,UNSIGNED_INT_24_8:te.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:te.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:te.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:te.UNSIGNED_SHORT_5_6_5};Oi.toWebGLConstant=function(e,t){switch(e){case Oi.UNSIGNED_BYTE:return te.UNSIGNED_BYTE;case Oi.UNSIGNED_SHORT:return te.UNSIGNED_SHORT;case Oi.UNSIGNED_INT:return te.UNSIGNED_INT;case Oi.FLOAT:return te.FLOAT;case Oi.HALF_FLOAT:return t.webgl2?te.HALF_FLOAT:te.HALF_FLOAT_OES;case Oi.UNSIGNED_INT_24_8:return te.UNSIGNED_INT_24_8;case Oi.UNSIGNED_SHORT_4_4_4_4:return te.UNSIGNED_SHORT_4_4_4_4;case Oi.UNSIGNED_SHORT_5_5_5_1:return te.UNSIGNED_SHORT_5_5_5_1;case Oi.UNSIGNED_SHORT_5_6_5:return Oi.UNSIGNED_SHORT_5_6_5}};Oi.isPacked=function(e){return e===Oi.UNSIGNED_INT_24_8||e===Oi.UNSIGNED_SHORT_4_4_4_4||e===Oi.UNSIGNED_SHORT_5_5_5_1||e===Oi.UNSIGNED_SHORT_5_6_5};Oi.sizeInBytes=function(e){switch(e){case Oi.UNSIGNED_BYTE:return 1;case Oi.UNSIGNED_SHORT:case Oi.UNSIGNED_SHORT_4_4_4_4:case Oi.UNSIGNED_SHORT_5_5_5_1:case Oi.UNSIGNED_SHORT_5_6_5:case Oi.HALF_FLOAT:return 2;case Oi.UNSIGNED_INT:case Oi.FLOAT:case Oi.UNSIGNED_INT_24_8:return 4}};Oi.validate=function(e){return e===Oi.UNSIGNED_BYTE||e===Oi.UNSIGNED_SHORT||e===Oi.UNSIGNED_INT||e===Oi.FLOAT||e===Oi.HALF_FLOAT||e===Oi.UNSIGNED_INT_24_8||e===Oi.UNSIGNED_SHORT_4_4_4_4||e===Oi.UNSIGNED_SHORT_5_5_5_1||e===Oi.UNSIGNED_SHORT_5_6_5};Oi.getTypedArrayConstructor=function(e){let t=Oi.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Oi.FLOAT?Float32Array:Uint32Array};Object.freeze(Oi);var ze=Oi;var ot={DEPTH_COMPONENT:te.DEPTH_COMPONENT,DEPTH_STENCIL:te.DEPTH_STENCIL,ALPHA:te.ALPHA,RED:te.RED,RG:te.RG,RGB:te.RGB,RGBA:te.RGBA,RED_INTEGER:te.RED_INTEGER,RG_INTEGER:te.RG_INTEGER,RGB_INTEGER:te.RGB_INTEGER,RGBA_INTEGER:te.RGBA_INTEGER,LUMINANCE:te.LUMINANCE,LUMINANCE_ALPHA:te.LUMINANCE_ALPHA,RGB_DXT1:te.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:te.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:te.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:te.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:te.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:te.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:te.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:te.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:te.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:te.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:te.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:te.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:te.COMPRESSED_RGBA_BPTC_UNORM};ot.componentsLength=function(e){switch(e){case ot.RGB:case ot.RGB_INTEGER:return 3;case ot.RGBA:case ot.RGBA_INTEGER:return 4;case ot.LUMINANCE_ALPHA:case ot.RG:case ot.RG_INTEGER:return 2;case ot.ALPHA:case ot.RED:case ot.RED_INTEGER:case ot.LUMINANCE:return 1;default:return 1}};ot.validate=function(e){return e===ot.DEPTH_COMPONENT||e===ot.DEPTH_STENCIL||e===ot.ALPHA||e===ot.RED||e===ot.RG||e===ot.RGB||e===ot.RGBA||e===ot.RED_INTEGER||e===ot.RG_INTEGER||e===ot.RGB_INTEGER||e===ot.RGBA_INTEGER||e===ot.LUMINANCE||e===ot.LUMINANCE_ALPHA||e===ot.RGB_DXT1||e===ot.RGBA_DXT1||e===ot.RGBA_DXT3||e===ot.RGBA_DXT5||e===ot.RGB_PVRTC_4BPPV1||e===ot.RGB_PVRTC_2BPPV1||e===ot.RGBA_PVRTC_4BPPV1||e===ot.RGBA_PVRTC_2BPPV1||e===ot.RGBA_ASTC||e===ot.RGB_ETC1||e===ot.RGB8_ETC2||e===ot.RGBA8_ETC2_EAC||e===ot.RGBA_BC7};ot.isColorFormat=function(e){return e===ot.RED||e===ot.ALPHA||e===ot.RGB||e===ot.RGBA||e===ot.LUMINANCE||e===ot.LUMINANCE_ALPHA};ot.isDepthFormat=function(e){return e===ot.DEPTH_COMPONENT||e===ot.DEPTH_STENCIL};ot.isCompressedFormat=function(e){return e===ot.RGB_DXT1||e===ot.RGBA_DXT1||e===ot.RGBA_DXT3||e===ot.RGBA_DXT5||e===ot.RGB_PVRTC_4BPPV1||e===ot.RGB_PVRTC_2BPPV1||e===ot.RGBA_PVRTC_4BPPV1||e===ot.RGBA_PVRTC_2BPPV1||e===ot.RGBA_ASTC||e===ot.RGB_ETC1||e===ot.RGB8_ETC2||e===ot.RGBA8_ETC2_EAC||e===ot.RGBA_BC7};ot.isDXTFormat=function(e){return e===ot.RGB_DXT1||e===ot.RGBA_DXT1||e===ot.RGBA_DXT3||e===ot.RGBA_DXT5};ot.isPVRTCFormat=function(e){return e===ot.RGB_PVRTC_4BPPV1||e===ot.RGB_PVRTC_2BPPV1||e===ot.RGBA_PVRTC_4BPPV1||e===ot.RGBA_PVRTC_2BPPV1};ot.isASTCFormat=function(e){return e===ot.RGBA_ASTC};ot.isETC1Format=function(e){return e===ot.RGB_ETC1};ot.isETC2Format=function(e){return e===ot.RGB8_ETC2||e===ot.RGBA8_ETC2_EAC};ot.isBC7Format=function(e){return e===ot.RGBA_BC7};ot.compressedTextureSizeInBytes=function(e,t,n){switch(e){case ot.RGB_DXT1:case ot.RGBA_DXT1:case ot.RGB_ETC1:case ot.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case ot.RGBA_DXT3:case ot.RGBA_DXT5:case ot.RGBA_ASTC:case ot.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case ot.RGB_PVRTC_4BPPV1:case ot.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case ot.RGB_PVRTC_2BPPV1:case ot.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case ot.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};ot.textureSizeInBytes=function(e,t,n,i){let r=ot.componentsLength(e);return ze.isPacked(t)&&(r=1),r*ze.sizeInBytes(t)*n*i};ot.texture3DSizeInBytes=function(e,t,n,i,r){let o=ot.componentsLength(e);return ze.isPacked(t)&&(o=1),o*ze.sizeInBytes(t)*n*i*r};ot.alignmentInBytes=function(e,t,n){let i=ot.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};ot.createTypedArray=function(e,t,n,i){let r=ze.getTypedArrayConstructor(t),o=ot.componentsLength(e)*n*i;return new r(o)};ot.flipY=function(e,t,n,i,r){if(r===1)return e;let o=ot.createTypedArray(t,n,i,r),s=ot.componentsLength(t),a=i*s;for(let c=0;c<r;++c){let u=c*i*s,f=(r-c-1)*i*s;for(let d=0;d<a;++d)o[f+d]=e[u+d]}return o};ot.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===ot.DEPTH_STENCIL)return te.DEPTH24_STENCIL8;if(e===ot.DEPTH_COMPONENT){if(t===ze.UNSIGNED_SHORT)return te.DEPTH_COMPONENT16;if(t===ze.UNSIGNED_INT)return te.DEPTH_COMPONENT24}if(t===ze.FLOAT)switch(e){case ot.RGBA:return te.RGBA32F;case ot.RGB:return te.RGB32F;case ot.RG:return te.RG32F;case ot.RED:return te.R32F}if(t===ze.HALF_FLOAT)switch(e){case ot.RGBA:return te.RGBA16F;case ot.RGB:return te.RGB16F;case ot.RG:return te.RG16F;case ot.RED:return te.R16F}if(t===ze.UNSIGNED_BYTE)switch(e){case ot.RGBA:return te.RGBA8;case ot.RGB:return te.RGB8;case ot.RG:return te.RG8;case ot.RED:return te.R8}if(t===ze.INT)switch(e){case ot.RGBA_INTEGER:return te.RGBA32I;case ot.RGB_INTEGER:return te.RGB32I;case ot.RG_INTEGER:return te.RG32I;case ot.RED_INTEGER:return te.R32I}if(t===ze.UNSIGNED_INT)switch(e){case ot.RGBA_INTEGER:return te.RGBA32UI;case ot.RGB_INTEGER:return te.RGB32UI;case ot.RG_INTEGER:return te.RG32UI;case ot.RED_INTEGER:return te.R32UI}return e};Object.freeze(ot);var Ke=ot;var gx={STREAM_DRAW:te.STREAM_DRAW,STATIC_DRAW:te.STATIC_DRAW,DYNAMIC_DRAW:te.DYNAMIC_DRAW,DYNAMIC_READ:te.DYNAMIC_READ};gx.validate=function(e){return e===gx.STREAM_DRAW||e===gx.STATIC_DRAW||e===gx.DYNAMIC_DRAW||e===gx.DYNAMIC_READ};Object.freeze(gx);var Me=gx;var jo={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximum3DTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_maximumSamples:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(jo,{maximumCombinedTextureImageUnits:{get:function(){return jo._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return jo._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return jo._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return jo._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return jo._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return jo._maximumTextureSize}},maximum3DTextureSize:{get:function(){return jo._maximum3DTextureSize}},maximumVaryingVectors:{get:function(){return jo._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return jo._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return jo._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return jo._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return jo._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return jo._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return jo._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return jo._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return jo._maximumViewportWidth}},maximumViewportHeight:{get:function(){return jo._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return jo._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return jo._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return jo._maximumColorAttachments}},maximumSamples:{get:function(){return jo._maximumSamples}},highpFloatSupported:{get:function(){return jo._highpFloatSupported}},highpIntSupported:{get:function(){return jo._highpIntSupported}}});var Ut=jo;function zD(e,t,n,i,r,o,s,a,c,u,f){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=r,this._pixelFormat=o,this._size=a,this._preMultiplyAlpha=c,this._flipY=u,this._initialized=f}Object.defineProperties(zD.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});zD.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:r=!1}=e,{width:o,height:s}=i,a=this._context._gl,c=this._textureTarget,u=this._targetFace;a.activeTexture(a.TEXTURE0),a.bindTexture(c,this._texture);let f=i.arrayBufferView,d=this._size,p=this._pixelFormat,g=this._internalFormat,m=this._pixelDatatype,y=this._preMultiplyAlpha,A=this._flipY,b=4;l(f)&&(b=Ke.alignmentInBytes(p,m,o)),a.pixelStorei(a.UNPACK_ALIGNMENT,b),r?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let x=!1;if(!this._initialized){let T;t===0&&n===0&&o===d&&s===d?(l(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),A&&(f=Ke.flipY(f,p,m,d,d)),T=f):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,A),T=i),x=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),T=Ke.createTypedArray(p,m,d,d)),a.texImage2D(u,0,g,d,d,0,p,ze.toWebGLConstant(m,this._context),T),this._initialized=!0}x||(l(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),A&&(f=Ke.flipY(f,p,m,o,s)),a.texSubImage2D(u,0,t,n,o,s,p,ze.toWebGLConstant(m,this._context),f)):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,A),a.texSubImage2D(u,0,t,n,p,ze.toWebGLConstant(m,this._context),i))),a.bindTexture(c,null)};zD.prototype.copyFromFramebuffer=function(e,t,n,i,r,o){e=e??0,t=t??0,n=n??0,i=i??0,r=r??this._size,o=o??this._size;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,r,o),s.bindTexture(a,null),this._initialized=!0};zD.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,r){e=e??0,t=t??0,n=n??this._size,i=i??this._size,r=r??0;let o=this._context._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.copyTexImage2D(this._targetFace,r,this._internalFormat,e,t,n,i,0),o.bindTexture(s,null),this._initialized=!0};var VD=zD;function cX(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function l6(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Yh(e){e=e??H.EMPTY_OBJECT;let t=e.context,n=t._gl,i=Ut.maximumColorAttachments;if(this._gl=n,this._framebuffer=n.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=e.destroyAttachments??!0,this._bind(),l(e.colorTextures)){let r=e.colorTextures,o=this._colorTextures.length=this._activeColorAttachments.length=r.length;for(let s=0;s<o;++s){let a=r[s],c=this._gl.COLOR_ATTACHMENT0+s;cX(this,c,a),this._activeColorAttachments[s]=c,this._colorTextures[s]=a}}if(l(e.colorRenderbuffers)){let r=e.colorRenderbuffers,o=this._colorRenderbuffers.length=this._activeColorAttachments.length=r.length;for(let s=0;s<o;++s){let a=r[s],c=this._gl.COLOR_ATTACHMENT0+s;l6(this,c,a),this._activeColorAttachments[s]=c,this._colorRenderbuffers[s]=a}}if(l(e.depthTexture)){let r=e.depthTexture;cX(this,this._gl.DEPTH_ATTACHMENT,r),this._depthTexture=r}if(l(e.depthRenderbuffer)){let r=e.depthRenderbuffer;l6(this,this._gl.DEPTH_ATTACHMENT,r),this._depthRenderbuffer=r}if(l(e.stencilRenderbuffer)){let r=e.stencilRenderbuffer;l6(this,this._gl.STENCIL_ATTACHMENT,r),this._stencilRenderbuffer=r}if(l(e.depthStencilTexture)){let r=e.depthStencilTexture;cX(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilTexture=r}if(l(e.depthStencilRenderbuffer)){let r=e.depthStencilRenderbuffer;l6(this,this._gl.DEPTH_STENCIL_ATTACHMENT,r),this._depthStencilRenderbuffer=r}this._unBind(),t._currentFramebuffer=void 0}Object.defineProperties(Yh.prototype,{status:{get:function(){this._bind();let e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}});Yh.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Yh.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Yh.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Yh.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Yh.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Yh.prototype.getColorTexture=function(e){return this._colorTextures[e]};Yh.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]};Yh.prototype.isDestroyed=function(){return!1};Yh.prototype.destroy=function(){if(this.destroyAttachments){let e=this._colorTextures;for(let n=0;n<e.length;++n){let i=e[n];l(i)&&i.destroy()}let t=this._colorRenderbuffers;for(let n=0;n<t.length;++n){let i=t[n];l(i)&&i.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),le(this)};var ys=Yh;var jD={DONT_CARE:te.DONT_CARE,FASTEST:te.FASTEST,NICEST:te.NICEST,validate:function(e){return e===jD.DONT_CARE||e===jD.FASTEST||e===jD.NICEST}};Object.freeze(jD);var Pd=jD;var HD={NEAREST:te.NEAREST,LINEAR:te.LINEAR};HD.validate=function(e){return e===HD.NEAREST||e===HD.LINEAR};Object.freeze(HD);var Zn=HD;var ug={NEAREST:te.NEAREST,LINEAR:te.LINEAR,NEAREST_MIPMAP_NEAREST:te.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:te.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:te.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:te.LINEAR_MIPMAP_LINEAR};ug.validate=function(e){return e===ug.NEAREST||e===ug.LINEAR||e===ug.NEAREST_MIPMAP_NEAREST||e===ug.LINEAR_MIPMAP_NEAREST||e===ug.NEAREST_MIPMAP_LINEAR||e===ug.LINEAR_MIPMAP_LINEAR};Object.freeze(ug);var Wt=ug;var GD={CLAMP_TO_EDGE:te.CLAMP_TO_EDGE,REPEAT:te.REPEAT,MIRRORED_REPEAT:te.MIRRORED_REPEAT,validate:function(e){return e===GD.CLAMP_TO_EDGE||e===GD.REPEAT||e===GD.MIRRORED_REPEAT}};Object.freeze(GD);var hn=GD;function WD(e){e=e??H.EMPTY_OBJECT;let{wrapR:t=hn.CLAMP_TO_EDGE,wrapS:n=hn.CLAMP_TO_EDGE,wrapT:i=hn.CLAMP_TO_EDGE,minificationFilter:r=Wt.LINEAR,magnificationFilter:o=Zn.LINEAR,maximumAnisotropy:s=1}=e;this._wrapR=t,this._wrapS=n,this._wrapT=i,this._minificationFilter=r,this._magnificationFilter=o,this._maximumAnisotropy=s}Object.defineProperties(WD.prototype,{wrapR:{get:function(){return this._wrapR}},wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}});WD.equals=function(e,t){return e===t||l(e)&&l(t)&&e._wrapR===t._wrapR&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy};WD.NEAREST=Object.freeze(new WD({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST}));var Ht=WD;function Jc(e){e=e??H.EMPTY_OBJECT;let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,r=e.sizeInBytes,o=e.usage,s=l(i);s&&(r=i.byteLength);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:r,o),t.bindBuffer(n,null),this._id=$n(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=r,this._usage=o,this._buffer=a,this.vertexArrayDestroyable=!0}Jc.createPixelBuffer=function(e){if(!e.context._webgl2)throw new pe("A WebGL 2 context is required to create PixelBuffers.");return new Jc({context:e.context,bufferTarget:te.PIXEL_PACK_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Jc.createVertexBuffer=function(e){return new Jc({context:e.context,bufferTarget:te.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Jc.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=je.getSizeInBytes(n),r=new Jc({context:t,bufferTarget:te.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),o=r.sizeInBytes/i;return Object.defineProperties(r,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return o}}}),r};Object.defineProperties(Jc.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});Jc.prototype._getBuffer=function(){return this._buffer};Jc.prototype._bind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,this._buffer)};Jc.prototype._unBind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,null)};Jc.prototype.copyFromArrayView=function(e,t){t=t??0;let n=this._gl,i=this._bufferTarget;n.bindBuffer(i,this._buffer),n.bufferSubData(i,t,e),n.bindBuffer(i,null)};Jc.prototype.copyFromBuffer=function(e,t,n,i){let r=te.COPY_READ_BUFFER,o=te.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(o,this._buffer),s.bindBuffer(r,e._buffer),s.copyBufferSubData(r,o,t,n,i),s.bindBuffer(o,null),s.bindBuffer(r,null)};Jc.prototype.getBufferData=function(e,t,n,i){t=t??0,n=n??0;let r=this._gl,o=te.COPY_READ_BUFFER;r.bindBuffer(o,this._buffer),r.getBufferSubData(o,t,e,n,i),r.bindBuffer(o,null)};Jc.prototype.isDestroyed=function(){return!1};Jc.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),le(this)};var nt=Jc;function G8e(e,t){if(!e)throw new pe(t)}var lX=G8e;function W8e(e,t,n,i){let r=l(t.vertexBuffer),o=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:t.index??n,enabled:t.enabled??!0,vertexBuffer:t.vertexBuffer,value:o?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:t.componentDatatype??Y.FLOAT,normalize:t.normalize??!1,offsetInBytes:t.offsetInBytes??0,strideInBytes:t.strideInBytes??0,instanceDivisor:t.instanceDivisor??0};if(r)a.vertexAttrib=function(c){let u=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(u,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(u),this.instanceDivisor>0&&(i.glVertexAttribDivisor(u,this.instanceDivisor),i._vertexAttribDivisors[u]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(c){}}e.push(a)}function Ide(e,t,n){for(let i=0;i<t.length;++i){let r=t[i];r.enabled&&r.vertexAttrib(e)}l(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Xh(e){e=e??H.EMPTY_OBJECT;let t=e.context,n=t._gl,i=e.attributes,r=e.indexBuffer,o,s=[],a=1,c=!1,u=!1,f=i.length;for(o=0;o<f;++o)W8e(s,i[o],o,t);for(f=s.length,o=0;o<f;++o){let p=s[o];if(l(p.vertexBuffer)&&p.instanceDivisor===0){let g=p.strideInBytes||p.componentsPerAttribute*Y.getSizeInBytes(p.componentDatatype);a=p.vertexBuffer.sizeInBytes/g;break}}for(o=0;o<f;++o)s[o].instanceDivisor>0&&(c=!0),l(s[o].value)&&(u=!0);let d;t.vertexArrayObject&&(d=t.glCreateVertexArray(),t.glBindVertexArray(d),Ide(n,s,r),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=u,this._context=t,this._gl=n,this._vao=d,this._attributes=s,this._indexBuffer=r}function wde(e){return e.values.length/e.componentsPerAttribute}function q8e(e){return Y.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function Y8e(e){let t,n,i,r=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(r.push(n),e[n].componentDatatype===Y.DOUBLE&&(e[n].componentDatatype=Y.FLOAT,e[n].values=Y.createTypedArray(Y.FLOAT,e[n].values)));let o,s=r.length;if(s>0)for(o=wde(e[r[0]]),t=1;t<s;++t){let u=wde(e[r[t]]);if(u!==o)throw new oe(`Each attribute list must have the same number of vertices. Attribute ${r[t]} has a different number of vertices (${u.toString()}) than attribute ${r[0]} (${o.toString()}).`)}r.sort(function(u,f){return Y.getSizeInBytes(e[f].componentDatatype)-Y.getSizeInBytes(e[u].componentDatatype)});let a=0,c={};for(t=0;t<s;++t)n=r[t],i=e[n],c[n]=a,a+=q8e(i);if(a>0){let u=Y.getSizeInBytes(e[r[0]].componentDatatype),f=a%u;f!==0&&(a+=u-f);let d=o*a,p=new ArrayBuffer(d),g={};for(t=0;t<s;++t){n=r[t];let m=Y.getSizeInBytes(e[n].componentDatatype);g[n]={pointer:Y.createTypedArray(e[n].componentDatatype,p),index:c[n]/m,strideInComponentType:a/m}}for(t=0;t<o;++t)for(let m=0;m<s;++m){n=r[m],i=e[n];let y=i.values,A=g[n],b=A.pointer,x=i.componentsPerAttribute;for(let T=0;T<x;++T)b[A.index+T]=y[t*x+T];A.index+=A.strideInComponentType}return{buffer:p,offsetsInBytes:c,vertexSizeInBytes:a}}}Xh.fromGeometry=function(e){e=e??H.EMPTY_OBJECT;let t=e.context,n=e.geometry??H.EMPTY_OBJECT,i=e.bufferUsage??Me.DYNAMIC_DRAW,r=e.attributeLocations??H.EMPTY_OBJECT,o=e.interleave??!1,s=e.vertexArrayAttributes,a,c,u,f=l(s)?s:[],d=n.attributes;if(o){let m=Y8e(d);if(l(m)){u=nt.createVertexBuffer({context:t,typedArray:m.buffer,usage:i});let y=m.offsetsInBytes,A=m.vertexSizeInBytes;for(a in d)d.hasOwnProperty(a)&&l(d[a])&&(c=d[a],l(c.values)?f.push({index:r[a],vertexBuffer:u,componentDatatype:c.componentDatatype,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize,offsetInBytes:y[a],strideInBytes:A}):f.push({index:r[a],value:c.value,componentDatatype:c.componentDatatype,normalize:c.normalize}))}}else for(a in d)if(d.hasOwnProperty(a)&&l(d[a])){c=d[a];let m=c.componentDatatype;m===Y.DOUBLE&&(m=Y.FLOAT);let y={};l(c.values)&&(u=nt.createVertexBuffer({context:t,typedArray:Y.createTypedArray(m,c.values),usage:i}),y={index:r[a],vertexBuffer:u,value:c.value,componentDatatype:m,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize}),l(c.typedArray)&&(u=nt.createVertexBuffer({context:t,typedArray:c.typedArray,usage:i}),y={index:r[a],vertexBuffer:u,value:void 0,componentDatatype:m,componentsPerAttribute:Vt.getNumberOfComponents(c.type),normalize:c.normalized,instanceDivisor:c.instanceDivisor}),f.push(y)}let p,g=n.indices;return l(g)&&(St.computeNumberOfVertices(n)>=D.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=nt.createIndexBuffer({context:t,typedArray:new Uint32Array(g),usage:i,indexDatatype:je.UNSIGNED_INT}):p=nt.createIndexBuffer({context:t,typedArray:new Uint16Array(g),usage:i,indexDatatype:je.UNSIGNED_SHORT})),new Xh({context:t,attributes:f,indexBuffer:p})};Object.defineProperties(Xh.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Xh.prototype.getAttribute=function(e){return this._attributes[e]};function X8e(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,r=e._attributes,o=Ut.maximumVertexAttributes,s;if(n){let a=r.length;for(s=0;s<a;++s){let c=r[s];if(c.enabled){let u=c.instanceDivisor,f=c.index;u!==i[f]&&(t.glVertexAttribDivisor(f,u),i[f]=u)}}}else for(s=0;s<o;++s)i[s]>0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function K8e(e,t){let n=e._attributes,i=n.length;for(let r=0;r<i;++r){let o=n[r];o.enabled&&l(o.value)&&o.vertexAttrib(t)}}Xh.prototype.copyAttributeFromRange=function(e,t,n,i){let r=this.getAttribute(e),o=r.vertexBuffer,s=r.componentsPerAttribute,a=t.constructor,c=n*s*a.BYTES_PER_ELEMENT,u=new a(t.buffer,t.byteOffset+c,i*s);o.copyFromArrayView(u,c)};Xh.prototype.copyIndexFromRange=function(e,t,n){let i=this._indexBuffer,r=e.constructor,o=t*r.BYTES_PER_ELEMENT,s=new r(e.buffer,e.byteOffset+o,n);i.copyFromArrayView(s,o)};Xh.prototype._bind=function(){l(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&X8e(this),this._hasConstantAttributes&&K8e(this,this._gl)):Ide(this._gl,this._attributes,this._indexBuffer)};Xh.prototype._unBind=function(){if(l(this._vao))this._context.glBindVertexArray(null);else{let e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){let i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}};Xh.prototype.isDestroyed=function(){return!1};Xh.prototype.destroy=function(){let e=this._attributes;for(let n=0;n<e.length;++n){let i=e[n].vertexBuffer;l(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}let t=this._indexBuffer;return l(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),l(this._vao)&&this._context.glDeleteVertexArray(this._vao),le(this)};var zn=Xh;function Do(e){e=e??H.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:r=ze.UNSIGNED_BYTE,flipY:o=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ht}=e,c=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,{width:u,height:f}=e;l(n)&&({width:u,height:f}=n.positiveX);let d=u,p=Ke.textureSizeInBytes(i,r,d,d)*6,g=Ke.toInternalFormat(i,r,t),m=t._gl,y=m.TEXTURE_CUBE_MAP,A=m.createTexture();this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=y,this._texture=A,this._pixelFormat=i,this._pixelDatatype=r,this._size=d,this._hasMipmap=!1,this._sizeInBytes=p,this._preMultiplyAlpha=c,this._flipY=o;let b=l(n);function x(T){return new VD(t,A,y,T,g,i,r,d,c,o,b)}this._positiveX=x(m.TEXTURE_CUBE_MAP_POSITIVE_X),this._negativeX=x(m.TEXTURE_CUBE_MAP_NEGATIVE_X),this._positiveY=x(m.TEXTURE_CUBE_MAP_POSITIVE_Y),this._negativeY=x(m.TEXTURE_CUBE_MAP_NEGATIVE_Y),this._positiveZ=x(m.TEXTURE_CUBE_MAP_POSITIVE_Z),this._negativeZ=x(m.TEXTURE_CUBE_MAP_NEGATIVE_Z),this._sampler=a,Pde(this,a),m.activeTexture(m.TEXTURE0),m.bindTexture(y,A),s?m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.NONE):m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.BROWSER_DEFAULT_WEBGL);for(let T of Do.faceNames())uX(this[T],n?.[T],0);m.bindTexture(y,null)}Do.prototype.copyFace=function(e,t,n,i){let r=e.context,o=new ys({context:r,colorTextures:[t],destroyAttachments:!1});o._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,i??0),o._unBind(),o.destroy()};Do.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*$8e(){yield Do.FaceName.POSITIVEX,yield Do.FaceName.NEGATIVEX,yield Do.FaceName.POSITIVEY,yield Do.FaceName.NEGATIVEY,yield Do.FaceName.POSITIVEZ,yield Do.FaceName.NEGATIVEZ}Do.faceNames=function(){return $8e()};function uX(e,t,n){n=n??0;let i=e._targetFace,r=Math.max(Math.floor(e._size/2**n),1),o=e._pixelFormat,s=e._pixelDatatype,a=e._internalFormat,c=e._flipY,u=e._preMultiplyAlpha,f=e._context,d=f._gl;if(!l(t)){d.texImage2D(i,n,a,r,r,0,o,ze.toWebGLConstant(s,f),null);return}let{arrayBufferView:p}=t,g=4;l(p)&&(g=Ke.alignmentInBytes(o,s,r)),d.pixelStorei(d.UNPACK_ALIGNMENT,g),l(p)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),c&&(p=Ke.flipY(p,o,s,r,r)),d.texImage2D(i,n,a,r,r,0,o,ze.toWebGLConstant(s,f),p)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,c),d.texImage2D(i,n,a,o,ze.toWebGLConstant(s,f),t))}Do.loadFace=uX;Object.defineProperties(Do.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){Pde(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}});Do.getDirection=function(e,t){switch(e){case Do.FaceName.POSITIVEX:return h.clone(h.UNIT_X,t);case Do.FaceName.NEGATIVEX:return h.negate(h.UNIT_X,t);case Do.FaceName.POSITIVEY:return h.clone(h.UNIT_Y,t);case Do.FaceName.NEGATIVEY:return h.negate(h.UNIT_Y,t);case Do.FaceName.POSITIVEZ:return h.clone(h.UNIT_Z,t);case Do.FaceName.NEGATIVEZ:return h.negate(h.UNIT_Z,t)}};function Pde(e,t){let{minificationFilter:n,magnificationFilter:i}=t,r=[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(n),o=e._context,s=e._pixelDatatype;(s===ze.FLOAT&&!o.textureFloatLinear||s===ze.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(n=r?Wt.NEAREST_MIPMAP_NEAREST:Wt.NEAREST,i=Zn.NEAREST);let a=o._gl,c=e._textureTarget;a.activeTexture(a.TEXTURE0),a.bindTexture(c,e._texture),a.texParameteri(c,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(c,a.TEXTURE_MAG_FILTER,i),a.texParameteri(c,a.TEXTURE_WRAP_S,t.wrapS),a.texParameteri(c,a.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&a.texParameteri(c,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),a.bindTexture(c,null)}Do.prototype.loadMipmaps=function(e,t){t=t??!1;let n=this._context._gl,i=this._texture,r=this._textureTarget;n.activeTexture(n.TEXTURE0),n.bindTexture(r,i),t?n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE):n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL);for(let o=0;o<e.length;o++){let s=e[o],a=o+1;for(let c of Do.faceNames())uX(this[c],s[c],a)}n.bindTexture(r,null),this._hasMipmap=!0};Do.prototype.generateMipmap=function(e){e=e??Pd.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};Do.createVertexArray=function(e){let t=Ic.createGeometry(Ic.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Be.POSITION_ONLY})),n=this._attributeLocations=Gn.createAttributeLocations(t);return zn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Me.STATIC_DRAW})};Do.prototype.isDestroyed=function(){return!1};Do.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=le(this._positiveX),this._negativeX=le(this._negativeX),this._positiveY=le(this._positiveY),this._negativeY=le(this._negativeY),this._positiveZ=le(this._positiveZ),this._negativeZ=le(this._negativeZ),le(this)};var ts=Do;function Dd(e){e=e??H.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:r=ze.UNSIGNED_BYTE,flipY:o=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ht}=e,{width:c,height:u}=e;l(n)&&(l(c)||(c=n.videoWidth??n.naturalWidth??n.width),l(u)||(u=n.videoHeight??n.naturalHeight??n.height));let f=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,d=Ke.toInternalFormat(i,r,t),p=Ke.isCompressedFormat(d),g=t._gl,m=p?Ke.compressedTextureSizeInBytes(i,c,u):Ke.textureSizeInBytes(i,r,c,u);this._id=e.id??$n(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=g.TEXTURE_2D,this._texture=g.createTexture(),this._internalFormat=d,this._pixelFormat=i,this._pixelDatatype=r,this._width=c,this._height=u,this._dimensions=new U(c,u),this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=f,this._flipY=o,this._initialized=!1,this._sampler=void 0,this._sampler=a,Mde(this,a),g.activeTexture(g.TEXTURE0),g.bindTexture(this._textureTarget,this._texture),l(n)?(s?g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,g.NONE):g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,g.BROWSER_DEFAULT_WEBGL),l(n.arrayBufferView)?Ke.isCompressedFormat(d)?J8e(this,n):Dde(this,n):l(n.framebuffer)?Q8e(this,n):Rde(this,n),this._initialized=!0):Ode(this),g.bindTexture(this._textureTarget,null)}function J8e(e,t){let i=e._context._gl,r=e._textureTarget,o=e._internalFormat,{width:s,height:a}=e;if(i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.compressedTexImage2D(r,0,o,s,a,0,t.arrayBufferView),l(t.mipLevels)){let c=s,u=a;for(let f=0;f<t.mipLevels.length;++f)c=u6(c),u=u6(u),i.compressedTexImage2D(r,f+1,o,c,u,0,t.mipLevels[f])}}function Dde(e,t){let n=e._context,i=n._gl,r=e._textureTarget,o=e._internalFormat,{width:s,height:a,pixelFormat:c,pixelDatatype:u,flipY:f}=e,d=Ke.alignmentInBytes(c,u,s);i.pixelStorei(i.UNPACK_ALIGNMENT,d),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:p}=t;if(f&&(p=Ke.flipY(p,c,u,s,a)),i.texImage2D(r,0,o,s,a,0,c,ze.toWebGLConstant(u,n),p),l(t.mipLevels)){let g=s,m=a;for(let y=0;y<t.mipLevels.length;++y)g=u6(g),m=u6(m),i.texImage2D(r,y+1,o,g,m,0,c,ze.toWebGLConstant(u,n),t.mipLevels[y])}}function Z8e(e,t,n,i,r,o){let s=e._context,a=s._gl,{pixelFormat:c,pixelDatatype:u}=e,f=Ke.alignmentInBytes(c,u,r);a.pixelStorei(a.UNPACK_ALIGNMENT,f),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),e.flipY&&(t=Ke.flipY(t,c,u,r,o)),a.texSubImage2D(e._textureTarget,0,n,i,r,o,c,ze.toWebGLConstant(u,s),t)}function Q8e(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._bind(),i.copyTexImage2D(e._textureTarget,0,e._internalFormat,t.xOffset,t.yOffset,e.width,e.height,0),t.framebuffer!==n.defaultFramebuffer&&t.framebuffer._unBind()}function Rde(e,t){let n=e._context,i=n._gl;i.pixelStorei(i.UNPACK_ALIGNMENT,4),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e.flipY),i.texImage2D(e._textureTarget,0,e._internalFormat,e.pixelFormat,ze.toWebGLConstant(e.pixelDatatype,n),t)}function eje(e,t,n,i){let r=e._context,o=r._gl;o.pixelStorei(o.UNPACK_ALIGNMENT,4),o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.preMultiplyAlpha),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,e.flipY),o.texSubImage2D(e._textureTarget,0,n,i,e.pixelFormat,ze.toWebGLConstant(e.pixelDatatype,r),t)}function u6(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Ode(e){let t=e._context;t._gl.texImage2D(e._textureTarget,0,e._internalFormat,e._width,e._height,0,e._pixelFormat,ze.toWebGLConstant(e._pixelDatatype,t),null)}Dd.create=function(e){return new Dd(e)};Dd.fromFramebuffer=function(e){e=e??H.EMPTY_OBJECT;let t=e.context,{pixelFormat:n=Ke.RGB,framebufferXOffset:i=0,framebufferYOffset:r=0,width:o=t.drawingBufferWidth,height:s=t.drawingBufferHeight,framebuffer:a}=e;return new Dd({context:t,width:o,height:s,pixelFormat:n,source:{framebuffer:l(a)?a:t.defaultFramebuffer,xOffset:i,yOffset:r,width:o,height:s}})};Object.defineProperties(Dd.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){Mde(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*4/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function Mde(e,t){let{minificationFilter:n,magnificationFilter:i}=t,r=[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(n),o=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===ze.FLOAT&&!o.textureFloatLinear||a===ze.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(n=r?Wt.NEAREST_MIPMAP_NEAREST:Wt.NEAREST,i=Zn.NEAREST),o.webgl2&&Ke.isDepthFormat(s)&&(n=Wt.NEAREST,i=Zn.NEAREST);let c=o._gl,u=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(u,e._texture),c.texParameteri(u,c.TEXTURE_MIN_FILTER,n),c.texParameteri(u,c.TEXTURE_MAG_FILTER,i),c.texParameteri(u,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(u,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(u,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(u,null)}Dd.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:r=!1}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:u}=i;l(i.videoWidth)&&l(i.videoHeight)?(c=i.videoWidth,u=i.videoHeight):l(i.naturalWidth)&&l(i.naturalHeight)&&(c=i.naturalWidth,u=i.naturalHeight),r?s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE):s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL);let f=!1;this._initialized||(t===0&&n===0&&c===this._width&&u===this._height?(l(i.arrayBufferView)?Dde(this,i):Rde(this,i),f=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),Ode(this)),this._initialized=!0),f||(l(i.arrayBufferView)?Z8e(this,i.arrayBufferView,t,n,c,u):eje(this,i,t,n)),s.bindTexture(a,null)};Dd.prototype.copyFromFramebuffer=function(e,t,n,i,r,o){e=e??0,t=t??0,n=n??0,i=i??0,r=r??this._width,o=o??this._height;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,r,o),s.bindTexture(a,null),this._initialized=!0};Dd.prototype.generateMipmap=function(e){e=e??Pd.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};Dd.prototype.isDestroyed=function(){return!1};Dd.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),le(this)};Dd.defaultColor=z.WHITE;var Dt=Dd;var qD=`uniform sampler2D image;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var YD=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
vec2 centerPixel = fract(repeat * st);
float centerBump = texture(image, centerPixel).channel;
float imageWidth = float(imageDimensions.x);
vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
float rightBump = texture(image, rightPixel).channel;
float imageHeight = float(imageDimensions.y);
vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
float topBump = texture(image, leftPixel).channel;
vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
material.normal = normalEC;
material.diffuse = vec3(0.01);
return material;
}
`;var XD=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0);
float scaledWidth = fract(repeat.s * st.s);
scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
float scaledHeight = fract(repeat.t * st.t);
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
float value = min(scaledWidth, scaledHeight);
vec4 currentColor = mix(lightColor, darkColor, b);
vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var KD=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5));
vec4 color = mix(lightColor, darkColor, b);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var $D=`uniform sampler2D heights;
uniform sampler2D colors;
float getHeight(int idx, float invTexSize)
{
vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
#ifdef OES_texture_float
return texture(heights, uv).x;
#else
return czm_unpackFloat(texture(heights, uv));
#endif
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float height = materialInput.height;
float invTexSize = 1.0 / float(heightsDimensions.x);
float minHeight = getHeight(0, invTexSize);
float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
if (height < minHeight || height > maxHeight) {
material.diffuse = vec3(0.0);
material.alpha = 0.0;
return material;
}
int idxBelow = 0;
int idxAbove = heightsDimensions.x;
float heightBelow = minHeight;
float heightAbove = maxHeight;
const int maxIterations = 16;
for (int i = 0; i < maxIterations; i++) {
if (idxBelow >= idxAbove - 1) {
break;
}
int idxMid = (idxBelow + idxAbove) / 2;
float heightTex = getHeight(idxMid, invTexSize);
if (height > heightTex) {
idxBelow = idxMid;
heightBelow = heightTex;
} else {
idxAbove = idxMid;
heightAbove = heightTex;
}
}
float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
vec4 color = texture(colors, colorUv);
if (color.a > 0.0)
{
color.rgb /= color.a;
}
color.rgb = czm_gammaCorrect(color.rgb);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var JD=`uniform vec4 color;
uniform float spacing;
uniform float width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float distanceToContour = mod(materialInput.height, spacing);
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float dxc = abs(dFdx(materialInput.height));
float dyc = abs(dFdy(materialInput.height));
float dF = max(dxc, dyc) * czm_pixelRatio * width;
float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
#else
float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
#endif
vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var ZD=`uniform sampler2D image;
uniform float minimumHeight;
uniform float maximumHeight;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var QD=`uniform vec4 fadeInColor;
uniform vec4 fadeOutColor;
uniform float maximumDistance;
uniform bool repeat;
uniform vec2 fadeDirection;
uniform vec2 time;
float getTime(float t, float coord)
{
float scalar = 1.0 / maximumDistance;
float q = distance(t, coord) * scalar;
if (repeat)
{
float r = distance(t, coord + 1.0) * scalar;
float s = distance(t, coord - 1.0) * scalar;
q = min(min(r, s), q);
}
return clamp(q, 0.0, 1.0);
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float s = getTime(time.x, st.s) * fadeDirection.s;
float t = getTime(time.y, st.t) * fadeDirection.t;
float u = length(vec2(s, t));
vec4 color = mix(fadeInColor, fadeOutColor, u);
color = czm_gammaCorrect(color);
material.emission = color.rgb;
material.alpha = color.a;
return material;
}
`;var e1=`uniform vec4 color;
uniform float cellAlpha;
uniform vec2 lineCount;
uniform vec2 lineThickness;
uniform vec2 lineOffset;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
float value;
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
const float fuzz = 1.2;
vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
vec2 dx = abs(dFdx(st));
vec2 dy = abs(dFdy(st));
vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
value = min(
smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
#else
const float fuzz = 0.05;
vec2 range = 0.5 - (lineThickness * 0.05);
value = min(
1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
#endif
float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
float sRim = smoothstep(0.8, 1.0, dRim);
value *= (1.0 - sRim);
vec4 halfColor;
halfColor.rgb = color.rgb * 0.5;
halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
halfColor = czm_gammaCorrect(halfColor);
material.diffuse = halfColor.rgb;
material.emission = halfColor.rgb;
material.alpha = halfColor.a;
return material;
}
`;var t1=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 textureValue = texture(image, fract(repeat * materialInput.st));
vec3 normalTangentSpace = textureValue.channels;
normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
normalTangentSpace = normalize(normalTangentSpace);
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
material.normal = normalEC;
return material;
}
`;var n1=`uniform vec4 color;
float getPointOnLine(vec2 p0, vec2 p1, float x)
{
float slope = (p0.y - p1.y) / (p0.x - p1.x);
return slope * (x - p0.x) + p0.y;
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
#else
float base = 0.975;
#endif
vec2 center = vec2(1.0, 0.5);
float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
float halfWidth = 0.15;
float s = step(0.5 - halfWidth, st.t);
s *= 1.0 - step(0.5 + halfWidth, st.t);
s *= 1.0 - step(base, st.s);
float t = step(base, materialInput.st.s);
t *= 1.0 - step(ptOnUpperLine, st.t);
t *= step(ptOnLowerLine, st.t);
float dist;
if (st.s < base)
{
float d1 = abs(st.t - (0.5 - halfWidth));
float d2 = abs(st.t - (0.5 + halfWidth));
dist = min(d1, d2);
}
else
{
float d1 = czm_infinity;
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
{
d1 = abs(st.s - base);
}
float d2 = abs(st.t - ptOnUpperLine);
float d3 = abs(st.t - ptOnLowerLine);
dist = min(min(d1, d2), d3);
}
vec4 outsideColor = vec4(0.0);
vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var i1=`uniform vec4 color;
uniform vec4 gapColor;
uniform float dashLength;
uniform float dashPattern;
in float v_polylineAngle;
const float maskLength = 16.0;
mat2 rotate(float rad) {
float c = cos(rad);
float s = sin(rad);
return mat2(
c, s,
-s, c
);
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
float maskIndex = floor(dashPosition * maskLength);
float maskTest = floor(dashPattern / pow(2.0, maskIndex));
vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
if (fragColor.a < 0.005) {
discard;
}
fragColor = czm_gammaCorrect(fragColor);
material.emission = fragColor.rgb;
material.alpha = fragColor.a;
return material;
}
`;var r1=`uniform vec4 color;
uniform float glowPower;
uniform float taperPower;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
if (taperPower <= 0.99999) {
glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
}
vec4 fragColor;
fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
fragColor.a = clamp(glow, 0.0, 1.0) * color.a;
fragColor = czm_gammaCorrect(fragColor);
material.emission = fragColor.rgb;
material.alpha = fragColor.a;
return material;
}
`;var o1=`uniform vec4 color;
uniform vec4 outlineColor;
uniform float outlineWidth;
in float v_width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
float b = step(0.5 - halfInteriorWidth, st.t);
b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
float d1 = abs(st.t - (0.5 - halfInteriorWidth));
float d2 = abs(st.t - (0.5 + halfInteriorWidth));
float dist = min(d1, d2);
vec4 currentColor = mix(outlineColor, color, b);
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var s1=`uniform vec4 color;
uniform vec4 rimColor;
uniform float width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
float s = smoothstep(1.0 - width, 1.0, d);
vec4 outColor = czm_gammaCorrect(color);
vec4 outRimColor = czm_gammaCorrect(rimColor);
material.diffuse = outColor.rgb;
material.emission = outRimColor.rgb * s;
material.alpha = mix(outColor.a, outRimColor.a, s);
return material;
}
`;var a1=`uniform sampler2D image;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var c1=`uniform vec4 evenColor;
uniform vec4 oddColor;
uniform float offset;
uniform float repeat;
uniform bool horizontal;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
float value = fract((coord - offset) * (repeat * 0.5));
float dist = min(value, min(abs(value - 0.5), 1.0 - value));
vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var l1=`uniform vec4 waterColor;
uniform vec4 landColor;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var u1=`uniform sampler2D specularMap;
uniform sampler2D normalMap;
uniform vec4 baseWaterColor;
uniform vec4 blendColor;
uniform float frequency;
uniform float animationSpeed;
uniform float amplitude;
uniform float specularIntensity;
uniform float fadeFactor;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float time = czm_frameNumber * animationSpeed;
float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
float specularMapValue = texture(specularMap, materialInput.st).r;
vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
normalTangentSpace.xy /= fade;
normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
normalTangentSpace = normalize(normalTangentSpace);
float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
material.diffuse += (0.1 * tsPerturbationRatio);
material.diffuse = material.diffuse;
material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
material.specular = specularIntensity;
material.shininess = 10.0;
return material;
}
`;function it(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=e.minificationFilter??Wt.LINEAR,this._magnificationFilter=e.magnificationFilter??Zn.LINEAR,this._strict=void 0,this._template=void 0,this._count=void 0,this._texturePaths={},this._loadedImages=[],this._loadedCubeMaps=[],this._textures={},this._updateFunctions=[],this._defaultTexture=void 0,this._initializationPromises=[],this._initializationError=void 0,tje(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1},minificationFilter:{get:function(){return this._minificationFilter},set:function(t){this._minificationFilter=t}},magnificationFilter:{get:function(){return this._magnificationFilter},set:function(t){this._magnificationFilter=t}}}),l(it._uniformList[this.type])||(it._uniformList[this.type]=Object.keys(this._uniforms))}it._uniformList={};it.fromType=function(e,t){let n=new it({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};it.fromTypeAsync=async function(e,t){let n=[],i=new it({fabric:{type:e,uniforms:t}});if(Fde(i,n),await Promise.all(n),n.length=0,l(i._initializationError))throw i._initializationError;return i};function Fde(e,t){t.push(...e._initializationPromises);let n=e.materials;for(let i in n)if(n.hasOwnProperty(i)){let r=n[i];Fde(r,t)}}it.prototype.isTranslucent=function(){if(l(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){let r=t[i];if(typeof r=="function"?e=e&&r():e=e&&r,!e)break}return e};it.prototype.update=function(e){this._defaultTexture=e.defaultTexture;let t,n,i=this._loadedImages,r=i.length;for(t=0;t<r;++t){let c=i[t];n=c.id;let u=c.image,f;Array.isArray(u)&&(f=u.slice(1,u.length).map(function(y){return y.bufferView}),u=u[0]);let d=new Ht({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter}),p;l(u.internalFormat)?p=new Dt({context:e,pixelFormat:u.internalFormat,width:u.width,height:u.height,source:{arrayBufferView:u.bufferView,mipLevels:f},sampler:d}):p=new Dt({context:e,source:u,sampler:d});let g=this._textures[n];l(g)&&g!==this._defaultTexture&&g.destroy(),this._textures[n]=p;let m=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(m)){let y=this.uniforms[m];y.x=p._width,y.y=p._height}}i.length=0;let o=this._loadedCubeMaps;for(r=o.length,t=0;t<r;++t){let c=o[t];n=c.id;let u=c.images,f=new ts({context:e,source:{positiveX:u[0],negativeX:u[1],positiveY:u[2],negativeY:u[3],positiveZ:u[4],negativeZ:u[5]},sampler:new Ht({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=f}o.length=0;let s=this._updateFunctions;for(r=s.length,t=0;t<r;++t)s[t](this,e);let a=this.materials;for(let c in a)a.hasOwnProperty(c)&&a[c].update(e)};it.prototype.isDestroyed=function(){return!1};it.prototype.destroy=function(){let e=this._textures;for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i!==this._defaultTexture&&i.destroy()}let t=this.materials;for(let n in t)t.hasOwnProperty(n)&&t[n].destroy();return le(this)};function tje(e,t){e=e??H.EMPTY_OBJECT,t._strict=e.strict??!1,t._count=e.count??0,t._template=Je(e.fabric??H.EMPTY_OBJECT),t.fabric=Je(e.fabric??H.EMPTY_OBJECT),t._template.uniforms=Je(t._template.uniforms??H.EMPTY_OBJECT),t._template.materials=Je(t._template.materials??H.EMPTY_OBJECT),t.type=l(t._template.type)?t._template.type:$n(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=it._materialCache.getMaterial(t.type);if(l(i)){let o=Je(i.fabric,!0);t._template=Ot(t._template,o,!0),n=i.translucent}oje(t),aje(t),fje(t),hje(t),l(i)||it._materialCache.addMaterial(t.type,t);let r=t._translucentFunctions.length===0?!0:void 0;if(n=n??r,n=e.translucent??n,l(n))if(typeof n=="function"){let o=function(){return n(t)};t._translucentFunctions.push(o)}else t._translucentFunctions.push(n)}function fX(e,t,n,i){if(l(e)){for(let r in e)if(e.hasOwnProperty(r)){let o=t.indexOf(r)!==-1;(i&&!o||!i&&o)&&n(r,t)}}}function Nde(e,t){}function nje(e,t){}var ije=["type","materials","uniforms","components","source"],rje=["diffuse","specular","shininess","normal","emission","alpha"];function oje(e){let t=e._template,n=t.uniforms,i=t.materials,r=t.components;fX(t,ije,Nde,!0),fX(r,rje,Nde,!0);let o=[];for(let s in i)i.hasOwnProperty(s)&&o.push(s);fX(n,o,nje,!1)}function sje(e,t){let n=t._template.materials;for(let i in n)if(n.hasOwnProperty(i)&&e.indexOf(i)>-1)return!0;return!1}function aje(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n}
`;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
{
`,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
`,l(t)){let i=Object.keys(e._template.materials).length>0;for(let r in t)if(t.hasOwnProperty(r))if(r==="diffuse"||r==="emission"){let s=i&&sje(t[r],e)?t[r]:`czm_gammaCorrect(${t[r]})`;e.shaderSource+=`material.${r} = ${s};
`}else r==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha};
`:e.shaderSource+=`material.${r} = ${t[r]};
`}e.shaderSource+=`return material;
}
`}}var Lde={mat2:Xi,mat3:$,mat4:N},cje=/\.ktx2$/i;function lje(e){let t;return function(n,i){let r=n.uniforms,o=r[e],s=t!==o,a=!l(o)||o===it.DefaultImageId;t=o;let c=n._textures[e],u,f;if(o instanceof HTMLVideoElement){if(o.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let d=new Ht({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Dt({context:i,source:o,sampler:d}),n._textures[e]=c;return}c.copyFrom({source:o})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(o instanceof Dt&&o!==c){n._texturePaths[e]=void 0;let d=n._textures[e];l(d)&&d!==n._defaultTexture&&d.destroy(),n._textures[e]=o,u=`${e}Dimensions`,r.hasOwnProperty(u)&&(f=r[u],f.x=o._width,f.y=o._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0,n._texturePaths[e]=void 0),l(c)||(c=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,r.hasOwnProperty(u)&&(f=r[u],f.x=c._width,f.y=c._height)),!a){if((o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof ImageBitmap||o instanceof OffscreenCanvas)&&o!==n._texturePaths[e]){n._loadedImages.push({id:e,image:o}),n._texturePaths[e]=o;return}Bde(n,e)}}}function Bde(e,t){let i=e.uniforms[t];if(i===it.DefaultImageId)return Promise.resolve();let r=De.createIfNeeded(i);if(!(r instanceof De))return Promise.resolve();let o=De.createIfNeeded(e._texturePaths[t]);if(!(!l(o)||o.url!==r.url))return Promise.resolve();let a;return cje.test(r.url)?a=Ou(r.url):a=r.fetchImage(),Promise.resolve(a).then(function(c){e._loadedImages.push({id:t,image:c})}).catch(function(c){e._initializationError=c;let u=e._textures[t];l(u)&&u!==e._defaultTexture&&u.destroy(),e._textures[t]=e._defaultTexture}),e._texturePaths[t]=i,a}function uje(e){return function(t,n){let i=t.uniforms[e];if(i instanceof ts){let r=t._textures[e];r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}l(t._textures[e])||(t._textures[e]=n.defaultCubeMap),kde(t,e)}}function kde(e,t){let i=e.uniforms[t];if(i===it.DefaultCubeMapId)return Promise.resolve();let r=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(r===e._texturePaths[t])return Promise.resolve();let o=[De.createIfNeeded(i.positiveX).fetchImage(),De.createIfNeeded(i.negativeX).fetchImage(),De.createIfNeeded(i.positiveY).fetchImage(),De.createIfNeeded(i.negativeY).fetchImage(),De.createIfNeeded(i.positiveZ).fetchImage(),De.createIfNeeded(i.negativeZ).fetchImage()],s=Promise.all(o);return s.then(function(a){e._loadedCubeMaps.push({id:t,images:a})}).catch(function(a){e._initializationError=a}),e._texturePaths[t]=r,s}function fje(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&Ude(e,n)}function Ude(e,t){let n=e._strict,i=e._template.uniforms,r=i[t],o=dje(r),s;if(o==="channels")s=f1(e,t,r,!1);else{if(o==="sampler2D"){let u=`${t}Dimensions`;mje(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},Ude(e,u))}if(!new RegExp(`uniform\\s+${o}\\s+${t}\\s*;`).test(e.shaderSource)){let u=`uniform ${o} ${t};`;e.shaderSource=u+e.shaderSource}let c=`${t}_${e._count++}`;if(s=f1(e,t,c),e.uniforms[t]=r,o==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(lje(t)),e._initializationPromises.push(Bde(e,t));else if(o==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(uje(t)),e._initializationPromises.push(kde(e,t));else if(o.indexOf("mat")!==-1){let u=new Lde[o];e._uniforms[c]=function(){return Lde[o].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function dje(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof De||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageBitmap||e instanceof OffscreenCanvas)/^([rgba]){1,4}$/i.test(e)?t="channels":e===it.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let r in e)e.hasOwnProperty(r)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function hje(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let r=new it({strict:t,fabric:n[i],count:e._count});e._count=r._count,e._uniforms=Ot(e._uniforms,r._uniforms,!0),e.materials[i]=r,e._translucentFunctions=e._translucentFunctions.concat(r._translucentFunctions);let o="czm_getMaterial",s=`${o}_${e._count++}`;f1(r,o,s),e.shaderSource=r.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=f1(e,i,a)}}function f1(e,t,n,i){i=i??!0;let r=0,o="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+o,"g");return e.shaderSource=e.shaderSource.replace(a,function(c,u,f){return u||f?c:(r+=1,n)}),r}function mje(e,t,n){return f1(e,t,t,n)}it._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};it.DefaultImageId="czm_defaultImage";it.DefaultCubeMapId="czm_defaultCubeMap";it.ColorType="Color";it._materialCache.addMaterial(it.ColorType,{fabric:{type:it.ColorType,uniforms:{color:new z(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});it.ImageType="Image";it._materialCache.addMaterial(it.ImageType,{fabric:{type:it.ImageType,uniforms:{image:it.DefaultImageId,repeat:new U(1,1),color:new z(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});it.DiffuseMapType="DiffuseMap";it._materialCache.addMaterial(it.DiffuseMapType,{fabric:{type:it.DiffuseMapType,uniforms:{image:it.DefaultImageId,channels:"rgb",repeat:new U(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});it.AlphaMapType="AlphaMap";it._materialCache.addMaterial(it.AlphaMapType,{fabric:{type:it.AlphaMapType,uniforms:{image:it.DefaultImageId,channel:"a",repeat:new U(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});it.SpecularMapType="SpecularMap";it._materialCache.addMaterial(it.SpecularMapType,{fabric:{type:it.SpecularMapType,uniforms:{image:it.DefaultImageId,channel:"r",repeat:new U(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});it.EmissionMapType="EmissionMap";it._materialCache.addMaterial(it.EmissionMapType,{fabric:{type:it.EmissionMapType,uniforms:{image:it.DefaultImageId,channels:"rgb",repeat:new U(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});it.BumpMapType="BumpMap";it._materialCache.addMaterial(it.BumpMapType,{fabric:{type:it.BumpMapType,uniforms:{image:it.DefaultImageId,channel:"r",strength:.8,repeat:new U(1,1)},source:YD},translucent:!1});it.NormalMapType="NormalMap";it._materialCache.addMaterial(it.NormalMapType,{fabric:{type:it.NormalMapType,uniforms:{image:it.DefaultImageId,channels:"rgb",strength:.8,repeat:new U(1,1)},source:t1},translucent:!1});it.GridType="Grid";it._materialCache.addMaterial(it.GridType,{fabric:{type:it.GridType,uniforms:{color:new z(0,1,0,1),cellAlpha:.1,lineCount:new U(8,8),lineThickness:new U(1,1),lineOffset:new U(0,0)},source:e1},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});it.StripeType="Stripe";it._materialCache.addMaterial(it.StripeType,{fabric:{type:it.StripeType,uniforms:{horizontal:!0,evenColor:new z(1,1,1,.5),oddColor:new z(0,0,1,.5),offset:0,repeat:5},source:c1},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});it.CheckerboardType="Checkerboard";it._materialCache.addMaterial(it.CheckerboardType,{fabric:{type:it.CheckerboardType,uniforms:{lightColor:new z(1,1,1,.5),darkColor:new z(0,0,0,.5),repeat:new U(5,5)},source:XD},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});it.DotType="Dot";it._materialCache.addMaterial(it.DotType,{fabric:{type:it.DotType,uniforms:{lightColor:new z(1,1,0,.75),darkColor:new z(0,1,1,.75),repeat:new U(5,5)},source:KD},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});it.WaterType="Water";it._materialCache.addMaterial(it.WaterType,{fabric:{type:it.WaterType,uniforms:{baseWaterColor:new z(.2,.3,.6,1),blendColor:new z(0,1,.699,1),specularMap:it.DefaultImageId,normalMap:it.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:u1},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});it.RimLightingType="RimLighting";it._materialCache.addMaterial(it.RimLightingType,{fabric:{type:it.RimLightingType,uniforms:{color:new z(1,0,0,.7),rimColor:new z(1,1,1,.4),width:.3},source:s1},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});it.FadeType="Fade";it._materialCache.addMaterial(it.FadeType,{fabric:{type:it.FadeType,uniforms:{fadeInColor:new z(1,0,0,1),fadeOutColor:new z(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new U(.5,.5)},source:QD},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});it.PolylineArrowType="PolylineArrow";it._materialCache.addMaterial(it.PolylineArrowType,{fabric:{type:it.PolylineArrowType,uniforms:{color:new z(1,1,1,1)},source:n1},translucent:!0});it.PolylineDashType="PolylineDash";it._materialCache.addMaterial(it.PolylineDashType,{fabric:{type:it.PolylineDashType,uniforms:{color:new z(1,0,1,1),gapColor:new z(0,0,0,0),dashLength:16,dashPattern:255},source:i1},translucent:!0});it.PolylineGlowType="PolylineGlow";it._materialCache.addMaterial(it.PolylineGlowType,{fabric:{type:it.PolylineGlowType,uniforms:{color:new z(0,.5,1,1),glowPower:.25,taperPower:1},source:r1},translucent:!0});it.PolylineOutlineType="PolylineOutline";it._materialCache.addMaterial(it.PolylineOutlineType,{fabric:{type:it.PolylineOutlineType,uniforms:{color:new z(1,1,1,1),outlineColor:new z(1,0,0,1),outlineWidth:1},source:o1},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});it.ElevationContourType="ElevationContour";it._materialCache.addMaterial(it.ElevationContourType,{fabric:{type:it.ElevationContourType,uniforms:{spacing:100,color:new z(1,0,0,1),width:1},source:JD},translucent:!1});it.ElevationRampType="ElevationRamp";it._materialCache.addMaterial(it.ElevationRampType,{fabric:{type:it.ElevationRampType,uniforms:{image:it.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:ZD},translucent:!1});it.SlopeRampMaterialType="SlopeRamp";it._materialCache.addMaterial(it.SlopeRampMaterialType,{fabric:{type:it.SlopeRampMaterialType,uniforms:{image:it.DefaultImageId},source:a1},translucent:!1});it.AspectRampMaterialType="AspectRamp";it._materialCache.addMaterial(it.AspectRampMaterialType,{fabric:{type:it.AspectRampMaterialType,uniforms:{image:it.DefaultImageId},source:qD},translucent:!1});it.ElevationBandType="ElevationBand";it._materialCache.addMaterial(it.ElevationBandType,{fabric:{type:it.ElevationBandType,uniforms:{heights:it.DefaultImageId,colors:it.DefaultImageId},source:$D},translucent:!0});it.WaterMaskType="WaterMask";it._materialCache.addMaterial(it.WaterMaskType,{fabric:{type:it.WaterMaskType,source:l1,uniforms:{waterColor:new z(1,1,1,1),landColor:new z(0,0,0,0)}},translucent:!1});var Qi=it;function _x(e){e=e??H.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.materialSupport??_x.MaterialSupport.TEXTURED;this.material=l(e.material)?e.material:Qi.fromType(Qi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??i.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource??i.fragmentShaderSource,this._renderState=wr.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._materialSupport=i,this._vertexFormat=i.vertexFormat,this._flat=e.flat??!1,this._faceForward=e.faceForward??!n}Object.defineProperties(_x.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});_x.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;_x.prototype.isTranslucent=wr.prototype.isTranslucent;_x.prototype.getRenderState=wr.prototype.getRenderState;_x.MaterialSupport={BASIC:Object.freeze({vertexFormat:Be.POSITION_AND_NORMAL,vertexShaderSource:ID,fragmentShaderSource:wD}),TEXTURED:Object.freeze({vertexFormat:Be.POSITION_NORMAL_AND_ST,vertexShaderSource:DD,fragmentShaderSource:PD}),ALL:Object.freeze({vertexFormat:Be.ALL,vertexShaderSource:SD,fragmentShaderSource:vD})};var Er=_x;var d1=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec4 v_color;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
vec4 color = czm_gammaCorrect(v_color);
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = color.rgb;
material.alpha = color.a;
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
}
`;var h1=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec4 color;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec4 v_color;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
v_normalEC = czm_normal * normal;
v_color = color;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var yx=`in vec4 v_color;
void main()
{
out_FragColor = czm_gammaCorrect(v_color);
}
`;var m1=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec4 color;
in float batchId;
out vec4 v_color;
void main()
{
vec4 p = czm_computePosition();
v_color = color;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function fg(e){e=e??H.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,r=i?m1:h1,o=i?yx:d1,s=i?fg.FLAT_VERTEX_FORMAT:fg.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??r,this._fragmentShaderSource=e.fragmentShaderSource??o,this._renderState=wr.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(fg.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}});fg.VERTEX_FORMAT=Be.POSITION_AND_NORMAL;fg.FLAT_VERTEX_FORMAT=Be.POSITION_ONLY;fg.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;fg.prototype.isTranslucent=wr.prototype.isTranslucent;fg.prototype.getRenderState=wr.prototype.getRenderState;var yn=fg;function vv(e){this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(vv.prototype,{isConstant:{get:function(){return X.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color")});vv.prototype.getType=function(e){return"Color"};var pje=new K;vv.prototype.getValue=function(e,t){return l(e)||(e=K.now(pje)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,z.WHITE,t.color),t};vv.prototype.equals=function(e){return this===e||e instanceof vv&&X.equals(this._color,e._color)};var Kt=vv;var dX=class{constructor(t){t=t??H.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??ee.default,this._rectangle=t.rectangle??ie.MAX_VALUE,this._projection=new Ui(this._ellipsoid),this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=D.toDegrees(t.west),r=D.toDegrees(t.south),o=D.toDegrees(t.east),s=D.toDegrees(t.north);return l(n)?(n.west=i,n.south=r,n.east=o,n.north=s,n):new ie(i,r,o,s)}tileXYToNativeRectangle(t,n,i,r){let o=this.tileXYToRectangle(t,n,i,r);return o.west=D.toDegrees(o.west),o.south=D.toDegrees(o.south),o.east=D.toDegrees(o.east),o.north=D.toDegrees(o.north),o}tileXYToRectangle(t,n,i,r){let o=this._rectangle,s=this.getNumberOfXTilesAtLevel(i),a=this.getNumberOfYTilesAtLevel(i),c=o.width/s,u=t*c+o.west,f=(t+1)*c+o.west,d=o.height/a,p=o.north-n*d,g=o.north-(n+1)*d;return l(r)||(r=new ie(u,g,f,p)),r.west=u,r.south=g,r.east=f,r.north=p,r}positionToTileXY(t,n,i){let r=this._rectangle;if(!ie.contains(r,t))return;let o=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=r.width/o,c=r.height/s,u=t.longitude;r.east<r.west&&(u+=D.TWO_PI);let f=(u-r.west)/a|0;f>=o&&(f=o-1);let d=(r.north-t.latitude)/c|0;return d>=s&&(d=s-1),l(i)?(i.x=f,i.y=d,i):new U(f,d)}},er=dX;var zde=new h,Vde=new h,jde=new he,hX=new h,gje=new h,Hde=new ue,_je=new er,p1=[new he,new he,new he,new he],g1=new U,zs={};zs.initialize=function(){let e=zs._initPromise;return l(e)||(e=De.fetchJson(Zt("Assets/approximateTerrainHeights.json")).then(function(t){zs._terrainHeights=t}),zs._initPromise=e),e};zs.getMinimumMaximumHeights=function(e,t){t=t??ee.default;let n=Gde(e),i=zs._defaultMinTerrainHeight,r=zs._defaultMaxTerrainHeight;if(l(n)){let o=`${n.level}-${n.x}-${n.y}`,s=zs._terrainHeights[o];l(s)&&(i=s[0],r=s[1]),t.cartographicToCartesian(ie.northeast(e,jde),zde),t.cartographicToCartesian(ie.southwest(e,jde),Vde),h.midpoint(Vde,zde,hX);let a=t.scaleToGeodeticSurface(hX,gje);if(l(a)){let c=h.distance(hX,a);i=Math.min(i,-c)}else i=zs._defaultMinTerrainHeight}return i=Math.max(zs._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:r}};zs.getBoundingSphere=function(e,t){t=t??ee.default;let n=Gde(e),i=zs._defaultMaxTerrainHeight;if(l(n)){let o=`${n.level}-${n.x}-${n.y}`,s=zs._terrainHeights[o];l(s)&&(i=s[1])}let r=ue.fromRectangle3D(e,t,0);return ue.fromRectangle3D(e,t,i,Hde),ue.union(r,Hde,r)};function Gde(e){he.fromRadians(e.east,e.north,0,p1[0]),he.fromRadians(e.west,e.north,0,p1[1]),he.fromRadians(e.east,e.south,0,p1[2]),he.fromRadians(e.west,e.south,0,p1[3]);let t=0,n=0,i=0,r=0,o=zs._terrainHeightsMaxLevel,s;for(s=0;s<=o;++s){let a=!1;for(let c=0;c<4;++c){let u=p1[c];if(_je.positionToTileXY(u,s,g1),c===0)i=g1.x,r=g1.y;else if(i!==g1.x||r!==g1.y){a=!0;break}}if(a)break;t=i,n=r}if(s!==0)return{x:t,y:n,level:s>o?o:s-1}}zs._terrainHeightsMaxLevel=6;zs._defaultMaxTerrainHeight=9e3;zs._defaultMinTerrainHeight=-1e5;zs._terrainHeights=void 0;zs._initPromise=void 0;Object.defineProperties(zs,{initialized:{get:function(){return l(zs._terrainHeights)}}});var Mi=zs;function oc(e,t,n){this.minimum=h.clone(e??h.ZERO),this.maximum=h.clone(t??h.ZERO),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}oc.fromCorners=function(e,t,n){return l(n)||(n=new oc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};oc.fromPoints=function(e,t){if(l(t)||(t=new oc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,r=e[0].z,o=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let d=1;d<c;d++){let p=e[d],g=p.x,m=p.y,y=p.z;n=Math.min(g,n),o=Math.max(g,o),i=Math.min(m,i),s=Math.max(m,s),r=Math.min(y,r),a=Math.max(y,a)}let u=t.minimum;u.x=n,u.y=i,u.z=r;let f=t.maximum;return f.x=o,f.y=s,f.z=a,t.center=h.midpoint(u,f,t.center),t};oc.clone=function(e,t){if(l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.clone(e.center,t.center),t):new oc(e.minimum,e.maximum,e.center)};oc.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var f6=new h;oc.intersectPlane=function(e,t){f6=h.subtract(e.maximum,e.minimum,f6);let n=h.multiplyByScalar(f6,.5,f6),i=t.normal,r=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),o=h.dot(e.center,i)+t.distance;return o-r>0?$t.INSIDE:o+r<0?$t.OUTSIDE:$t.INTERSECTING};oc.intersectAxisAlignedBoundingBox=function(e,t){return e.minimum.x<=t.maximum.x&&e.maximum.x>=t.minimum.x&&e.minimum.y<=t.maximum.y&&e.maximum.y>=t.minimum.y&&e.minimum.z<=t.maximum.z&&e.maximum.z>=t.minimum.z};oc.prototype.clone=function(e){return oc.clone(this,e)};oc.prototype.intersectPlane=function(e){return oc.intersectPlane(this,e)};oc.prototype.intersectAxisAlignedBoundingBox=function(e){return oc.intersectAxisAlignedBoundingBox(this,e)};oc.prototype.equals=function(e){return oc.equals(this,e)};var vf=oc;var mX=new se;function Mp(e,t){t=t??ee.default,e=t.scaleToGeodeticSurface(e);let n=At.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(N.getColumn(n,0,mX)),this._yAxis=h.fromCartesian4(N.getColumn(n,1,mX));let i=h.fromCartesian4(N.getColumn(n,2,mX));this._plane=sn.fromPointNormal(e,i)}Object.defineProperties(Mp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var yje=new vf;Mp.fromPoints=function(e,t){let n=vf.fromPoints(e,yje);return new Mp(n.center,t)};var Wde=new pn,d6=new h;Mp.prototype.projectPointOntoPlane=function(e,t){let n=Wde;n.origin=e,h.normalize(e,n.direction);let i=_i.rayPlane(n,this._plane,d6);if(l(i)||(h.negate(n.direction,n.direction),i=_i.rayPlane(n,this._plane,d6)),l(i)){let r=h.subtract(i,this._origin,i),o=h.dot(this._xAxis,r),s=h.dot(this._yAxis,r);return l(t)?(t.x=o,t.y=s,t):new U(o,s)}};Mp.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let r=0;r<i;r++){let o=this.projectPointOntoPlane(e[r],t[n]);l(o)&&(t[n]=o,n++)}return t.length=n,t};Mp.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new U);let n=Wde;n.origin=e,h.clone(this._plane.normal,n.direction);let i=_i.rayPlane(n,this._plane,d6);l(i)||(h.negate(n.direction,n.direction),i=_i.rayPlane(n,this._plane,d6));let r=h.subtract(i,this._origin,i),o=h.dot(this._xAxis,r),s=h.dot(this._yAxis,r);return t.x=o,t.y=s,t};Mp.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var Aje=new h;Mp.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,r=this._xAxis,o=this._yAxis,s=Aje;return h.multiplyByScalar(r,e.x,s),t=h.add(i,s,t),h.multiplyByScalar(o,e.y,s),h.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};Mp.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Vs=Mp;function fr(e,t){this.center=h.clone(e??h.ZERO),this.halfAxes=$.clone(t??$.ZERO)}fr.packedLength=h.packedLength+$.packedLength;fr.pack=function(e,t,n){return n=n??0,h.pack(e.center,t,n),$.pack(e.halfAxes,t,n+h.packedLength),t};fr.unpack=function(e,t,n){return t=t??0,l(n)||(n=new fr),h.unpack(e,t,n.center),$.unpack(e,t+h.packedLength,n.halfAxes),n};var bje=new h,xje=new h,Tje=new h,Eje=new h,Cje=new h,vje=new h,Sje=new $,wje={unitary:new $,diagonal:new $};fr.fromPoints=function(e,t){if(l(t)||(t=new fr),!l(e)||e.length===0)return t.halfAxes=$.ZERO,t.center=h.ZERO,t;let n,i=e.length,r=h.clone(e[0],bje);for(n=1;n<i;n++)h.add(r,e[n],r);let o=1/i;h.multiplyByScalar(r,o,r);let s=0,a=0,c=0,u=0,f=0,d=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],r,xje),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,u+=p.y*p.y,f+=p.y*p.z,d+=p.z*p.z;s*=o,a*=o,c*=o,u*=o,f*=o,d*=o;let g=Sje;g[0]=s,g[1]=a,g[2]=c,g[3]=a,g[4]=u,g[5]=f,g[6]=c,g[7]=f,g[8]=d;let m=$.computeEigenDecomposition(g,wje),y=$.clone(m.unitary,t.halfAxes),A=$.getColumn(y,0,Eje),b=$.getColumn(y,1,Cje),x=$.getColumn(y,2,vje),T=-Number.MAX_VALUE,E=-Number.MAX_VALUE,v=-Number.MAX_VALUE,S=Number.MAX_VALUE,I=Number.MAX_VALUE,R=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],T=Math.max(h.dot(A,p),T),E=Math.max(h.dot(b,p),E),v=Math.max(h.dot(x,p),v),S=Math.min(h.dot(A,p),S),I=Math.min(h.dot(b,p),I),R=Math.min(h.dot(x,p),R);A=h.multiplyByScalar(A,.5*(S+T),A),b=h.multiplyByScalar(b,.5*(I+E),b),x=h.multiplyByScalar(x,.5*(R+v),x);let O=h.add(A,b,t.center);h.add(O,x,O);let L=Tje;return L.x=T-S,L.y=E-I,L.z=v-R,h.multiplyByScalar(L,.5,L),$.multiplyByScale(t.halfAxes,L,t.halfAxes),t};var Jde=new h,Ije=new h;function qde(e,t,n,i,r,o,s,a,c,u,f){l(f)||(f=new fr);let d=f.halfAxes;$.setColumn(d,0,t,d),$.setColumn(d,1,n,d),$.setColumn(d,2,i,d);let p=Jde;p.x=(r+o)/2,p.y=(s+a)/2,p.z=(c+u)/2;let g=Ije;g.x=(o-r)/2,g.y=(a-s)/2,g.z=(u-c)/2;let m=f.center;return p=$.multiplyByVector(d,p,p),h.add(e,p,m),$.multiplyByScale(d,g,d),f}var Yde=new he,Pje=new h,Dje=new he,Rje=new he,Oje=new he,Mje=new he,Nje=new he,Lje=new h,Xde=new h,Fje=new h,Kde=new h,Bje=new h,kje=new U,Uje=new U,zje=new U,Vje=new U,jje=new U,Hje=new h,Gje=new h,Wje=new h,qje=new h,Yje=new U,Xje=new h,Kje=new h,$je=new h,Jje=new sn(h.UNIT_X,0);fr.fromRectangle=function(e,t,n,i,r){t=t??0,n=n??0,i=i??ee.default;let o,s,a,c,u,f,d;if(e.width<=D.PI){let I=ie.center(e,Yde),R=i.cartographicToCartesian(I,Pje),O=new Vs(R,i);d=O.plane;let L=I.longitude,_=e.south<0&&e.north>0?0:I.latitude,C=he.fromRadians(L,e.north,n,Dje),w=he.fromRadians(e.west,e.north,n,Rje),P=he.fromRadians(e.west,_,n,Oje),M=he.fromRadians(e.west,e.south,n,Mje),F=he.fromRadians(L,e.south,n,Nje),V=i.cartographicToCartesian(C,Lje),B=i.cartographicToCartesian(w,Xde),j=i.cartographicToCartesian(P,Fje),k=i.cartographicToCartesian(M,Kde),G=i.cartographicToCartesian(F,Bje),q=O.projectPointToNearestOnPlane(V,kje),Q=O.projectPointToNearestOnPlane(B,Uje),W=O.projectPointToNearestOnPlane(j,zje),J=O.projectPointToNearestOnPlane(k,Vje),Z=O.projectPointToNearestOnPlane(G,jje);return o=Math.min(Q.x,W.x,J.x),s=-o,c=Math.max(Q.y,q.y),a=Math.min(J.y,Z.y),w.height=M.height=t,B=i.cartographicToCartesian(w,Xde),k=i.cartographicToCartesian(M,Kde),u=Math.min(sn.getPointDistance(d,B),sn.getPointDistance(d,k)),f=n,qde(O.origin,O.xAxis,O.yAxis,O.zAxis,o,s,a,c,u,f,r)}let p=e.south>0,g=e.north<0,m=p?e.south:g?e.north:0,y=ie.center(e,Yde).longitude,A=h.fromRadians(y,m,n,i,Hje);A.z=0;let x=Math.abs(A.x)<D.EPSILON10&&Math.abs(A.y)<D.EPSILON10?h.UNIT_X:h.normalize(A,Gje),T=h.UNIT_Z,E=h.cross(x,T,Wje);d=sn.fromPointNormal(A,x,Jje);let v=h.fromRadians(y+D.PI_OVER_TWO,m,n,i,qje);s=h.dot(sn.projectPointOntoPlane(d,v,Yje),E),o=-s,c=h.fromRadians(0,e.north,g?t:n,i,Xje).z,a=h.fromRadians(0,e.south,p?t:n,i,Kje).z;let S=h.fromRadians(e.east,m,n,i,$je);return u=sn.getPointDistance(d,S),f=0,qde(A,E,T,x,o,s,a,c,u,f,r)};fr.fromTransformation=function(e,t){return l(t)||(t=new fr),t.center=N.getTranslation(e,t.center),t.halfAxes=N.getMatrix3(e,t.halfAxes),t.halfAxes=$.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};fr.clone=function(e,t){if(l(e))return l(t)?(h.clone(e.center,t.center),$.clone(e.halfAxes,t.halfAxes),t):new fr(e.center,e.halfAxes)};fr.intersectPlane=function(e,t){let n=e.center,i=t.normal,r=e.halfAxes,o=i.x,s=i.y,a=i.z,c=Math.abs(o*r[$.COLUMN0ROW0]+s*r[$.COLUMN0ROW1]+a*r[$.COLUMN0ROW2])+Math.abs(o*r[$.COLUMN1ROW0]+s*r[$.COLUMN1ROW1]+a*r[$.COLUMN1ROW2])+Math.abs(o*r[$.COLUMN2ROW0]+s*r[$.COLUMN2ROW1]+a*r[$.COLUMN2ROW2]),u=h.dot(i,n)+t.distance;return u<=-c?$t.OUTSIDE:u>=c?$t.INSIDE:$t.INTERSECTING};var Zde=new h,Qde=new h,ehe=new h,Zje=new h,$de=new h,Qje=new h;fr.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,Jde),i=e.halfAxes,r=$.getColumn(i,0,Zde),o=$.getColumn(i,1,Qde),s=$.getColumn(i,2,ehe),a=h.magnitude(r),c=h.magnitude(o),u=h.magnitude(s),f=!0,d=!0,p=!0;a>0?h.divideByScalar(r,a,r):f=!1,c>0?h.divideByScalar(o,c,o):d=!1,u>0?h.divideByScalar(s,u,s):p=!1;let g=!f+!d+!p,m,y,A;if(g===1){let E=r;m=o,y=s,d?p||(E=s,y=r):(E=o,m=r),A=h.cross(m,y,$de),E===r?r=A:E===o?o=A:E===s&&(s=A)}else if(g===2){m=r,d?m=o:p&&(m=s);let E=h.UNIT_Y;E.equalsEpsilon(m,D.EPSILON3)&&(E=h.UNIT_X),y=h.cross(m,E,Zje),h.normalize(y,y),A=h.cross(m,y,$de),h.normalize(A,A),m===r?(o=y,s=A):m===o?(s=y,r=A):m===s&&(r=y,o=A)}else g===3&&(r=h.UNIT_X,o=h.UNIT_Y,s=h.UNIT_Z);let b=Qje;b.x=h.dot(n,r),b.y=h.dot(n,o),b.z=h.dot(n,s);let x=0,T;return b.x<-a?(T=b.x+a,x+=T*T):b.x>a&&(T=b.x-a,x+=T*T),b.y<-c?(T=b.y+c,x+=T*T):b.y>c&&(T=b.y-c,x+=T*T),b.z<-u?(T=b.z+u,x+=T*T):b.z>u&&(T=b.z-u,x+=T*T),x};var e6e=new h,t6e=new h;fr.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Us);let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=$.getColumn(a,0,Zde),u=$.getColumn(a,1,Qde),f=$.getColumn(a,2,ehe),d=h.add(c,u,e6e);h.add(d,f,d),h.add(d,s,d);let p=h.subtract(d,t,t6e),g=h.dot(n,p);return r=Math.min(g,r),o=Math.max(g,o),h.add(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.add(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.add(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.subtract(s,c,d),h.add(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.subtract(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.subtract(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),h.subtract(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),g=h.dot(n,p),r=Math.min(g,r),o=Math.max(g,o),i.start=r,i.stop=o,i};var n6e=new h,i6e=new h,r6e=new h;fr.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,r=$.getColumn(i,0,n6e),o=$.getColumn(i,1,i6e),s=$.getColumn(i,2,r6e);return h.clone(n,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],r,t[1]),h.subtract(t[1],o,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],r,t[2]),h.add(t[2],o,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],r,t[3]),h.add(t[3],o,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],r,t[4]),h.subtract(t[4],o,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],r,t[5]),h.subtract(t[5],o,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],r,t[6]),h.add(t[6],o,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],r,t[7]),h.add(t[7],o,t[7]),h.add(t[7],s,t[7]),t};var o6e=new $;fr.computeTransformation=function(e,t){l(t)||(t=new N);let n=e.center,i=$.multiplyByUniformScale(e.halfAxes,2,o6e);return N.fromRotationTranslation(i,n,t)};var s6e=new ue;fr.isOccluded=function(e,t){let n=ue.fromOrientedBoundingBox(e,s6e);return!t.isBoundingSphereVisible(n)};fr.prototype.intersectPlane=function(e){return fr.intersectPlane(this,e)};fr.prototype.distanceSquaredTo=function(e){return fr.distanceSquaredTo(this,e)};fr.prototype.computePlaneDistances=function(e,t,n){return fr.computePlaneDistances(this,e,t,n)};fr.prototype.computeCorners=function(e){return fr.computeCorners(this,e)};fr.prototype.computeTransformation=function(e){return fr.computeTransformation(this,e)};fr.prototype.isOccluded=function(e){return fr.isOccluded(this,e)};fr.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&$.equals(e.halfAxes,t.halfAxes)};fr.prototype.clone=function(e){return fr.clone(this,e)};fr.prototype.equals=function(e){return fr.equals(this,e)};var Qt=fr;var h6={};h6.getHeight=function(e,t,n){return(e-n)*t+n};var a6e=new he;h6.getPosition=function(e,t,n,i,r){let o=t.cartesianToCartographic(e,a6e);if(!l(o))return h.clone(e,r);let s=h6.getHeight(o.height,n,i);return h.fromRadians(o.longitude,o.latitude,s,t,r)};var Ar=h6;var ns={CULL:1,OCCLUDE:2,EXECUTE_IN_CLOSEST_FRUSTUM:4,DEBUG_SHOW_BOUNDING_VOLUME:8,CAST_SHADOWS:16,RECEIVE_SHADOWS:32,PICK_ONLY:64,DEPTH_FOR_TRANSLUCENT_CLASSIFICATION:128},pX=class e{constructor(t=H.EMPTY_OBJECT){this._boundingVolume=t.boundingVolume,this._orientedBoundingBox=t.orientedBoundingBox,this._modelMatrix=t.modelMatrix,this._primitiveType=t.primitiveType??Oe.TRIANGLES,this._vertexArray=t.vertexArray,this._count=t.count,this._offset=t.offset??0,this._instanceCount=t.instanceCount??0,this._shaderProgram=t.shaderProgram,this._uniformMap=t.uniformMap,this._renderState=t.renderState,this._framebuffer=t.framebuffer,this._pass=t.pass,this._owner=t.owner,this._debugOverlappingFrustums=0,this._pickId=t.pickId,this._snapId=t.snapId,this._pickMetadataAllowed=t.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=t.cull??!0,this.occlude=t.occlude??!0,this.executeInClosestFrustum=t.executeInClosestFrustum??!1,this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this.castShadows=t.castShadows??!1,this.receiveShadows=t.receiveShadows??!1,this.pickOnly=t.pickOnly??!1,this.depthForTranslucentClassification=t.depthForTranslucentClassification??!1,this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}get boundingVolume(){return this._boundingVolume}set boundingVolume(t){this._boundingVolume!==t&&(this._boundingVolume=t,this.dirty=!0)}get orientedBoundingBox(){return this._orientedBoundingBox}set orientedBoundingBox(t){this._orientedBoundingBox!==t&&(this._orientedBoundingBox=t,this.dirty=!0)}get cull(){return Zc(this,ns.CULL)}set cull(t){Zc(this,ns.CULL)!==t&&(Uy(this,ns.CULL,t),this.dirty=!0)}get occlude(){return Zc(this,ns.OCCLUDE)}set occlude(t){Zc(this,ns.OCCLUDE)!==t&&(Uy(this,ns.OCCLUDE,t),this.dirty=!0)}get modelMatrix(){return this._modelMatrix}set modelMatrix(t){this._modelMatrix!==t&&(this._modelMatrix=t,this.dirty=!0)}get primitiveType(){return this._primitiveType}set primitiveType(t){this._primitiveType!==t&&(this._primitiveType=t,this.dirty=!0)}get vertexArray(){return this._vertexArray}set vertexArray(t){this._vertexArray!==t&&(this._vertexArray=t,this.dirty=!0)}get count(){return this._count}set count(t){this._count!==t&&(this._count=t,this.dirty=!0)}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this.dirty=!0)}get instanceCount(){return this._instanceCount}set instanceCount(t){this._instanceCount!==t&&(this._instanceCount=t,this.dirty=!0)}get shaderProgram(){return this._shaderProgram}set shaderProgram(t){this._shaderProgram!==t&&(this._shaderProgram=t,this.dirty=!0)}get castShadows(){return Zc(this,ns.CAST_SHADOWS)}set castShadows(t){Zc(this,ns.CAST_SHADOWS)!==t&&(Uy(this,ns.CAST_SHADOWS,t),this.dirty=!0)}get receiveShadows(){return Zc(this,ns.RECEIVE_SHADOWS)}set receiveShadows(t){Zc(this,ns.RECEIVE_SHADOWS)!==t&&(Uy(this,ns.RECEIVE_SHADOWS,t),this.dirty=!0)}get uniformMap(){return this._uniformMap}set uniformMap(t){this._uniformMap!==t&&(this._uniformMap=t,this.dirty=!0)}get renderState(){return this._renderState}set renderState(t){this._renderState!==t&&(this._renderState=t,this.dirty=!0)}get framebuffer(){return this._framebuffer}set framebuffer(t){this._framebuffer!==t&&(this._framebuffer=t,this.dirty=!0)}get pass(){return this._pass}set pass(t){this._pass!==t&&(this._pass=t,this.dirty=!0)}get executeInClosestFrustum(){return Zc(this,ns.EXECUTE_IN_CLOSEST_FRUSTUM)}set executeInClosestFrustum(t){Zc(this,ns.EXECUTE_IN_CLOSEST_FRUSTUM)!==t&&(Uy(this,ns.EXECUTE_IN_CLOSEST_FRUSTUM,t),this.dirty=!0)}get owner(){return this._owner}set owner(t){this._owner!==t&&(this._owner=t,this.dirty=!0)}get debugShowBoundingVolume(){return Zc(this,ns.DEBUG_SHOW_BOUNDING_VOLUME)}set debugShowBoundingVolume(t){Zc(this,ns.DEBUG_SHOW_BOUNDING_VOLUME)!==t&&(Uy(this,ns.DEBUG_SHOW_BOUNDING_VOLUME,t),this.dirty=!0)}get debugOverlappingFrustums(){return this._debugOverlappingFrustums}set debugOverlappingFrustums(t){this._debugOverlappingFrustums!==t&&(this._debugOverlappingFrustums=t,this.dirty=!0)}get pickId(){return this._pickId}set pickId(t){this._pickId!==t&&(this._pickId=t,this.dirty=!0)}get snapId(){return this._snapId}set snapId(t){this._snapId!==t&&(this._snapId=t,this.dirty=!0)}get pickMetadataAllowed(){return this._pickMetadataAllowed}get pickedMetadataInfo(){return this._pickedMetadataInfo}set pickedMetadataInfo(t){this._pickedMetadataInfo!==t&&(this._pickedMetadataInfo=t,this.dirty=!0)}get pickOnly(){return Zc(this,ns.PICK_ONLY)}set pickOnly(t){Zc(this,ns.PICK_ONLY)!==t&&(Uy(this,ns.PICK_ONLY,t),this.dirty=!0)}get depthForTranslucentClassification(){return Zc(this,ns.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)}set depthForTranslucentClassification(t){Zc(this,ns.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==t&&(Uy(this,ns.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,t),this.dirty=!0)}static shallowClone(t,n){if(l(t))return l(n)||(n=new e),n._boundingVolume=t._boundingVolume,n._orientedBoundingBox=t._orientedBoundingBox,n._modelMatrix=t._modelMatrix,n._primitiveType=t._primitiveType,n._vertexArray=t._vertexArray,n._count=t._count,n._offset=t._offset,n._instanceCount=t._instanceCount,n._shaderProgram=t._shaderProgram,n._uniformMap=t._uniformMap,n._renderState=t._renderState,n._framebuffer=t._framebuffer,n._pass=t._pass,n._owner=t._owner,n._debugOverlappingFrustums=t._debugOverlappingFrustums,n._pickId=t._pickId,n._snapId=t._snapId,n._pickMetadataAllowed=t._pickMetadataAllowed,n._pickedMetadataInfo=t._pickedMetadataInfo,n._flags=t._flags,n.dirty=!0,n.lastDirtyTime=0,n}execute(t,n){t.draw(this,n)}};function Zc(e,t){return(e._flags&t)===t}function Uy(e,t,n){n?e._flags|=t:e._flags&=~t}var at=pX;var the={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE_EDGES:4,CESIUM_3D_TILE_PLANAR_FILL_ID:5,CESIUM_3D_TILE:6,CESIUM_3D_TILE_CLASSIFICATION:7,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:8,OPAQUE:9,TRANSLUCENT:10,VOXELS:11,GAUSSIAN_SPLATS:12,CESIUM_3D_TILE_EDGES_DIRECT:13,OVERLAY:14,NUMBER_OF_PASSES:15};Object.freeze(the);var Ie=the;var _1={CLOCKWISE:te.CW,COUNTER_CLOCKWISE:te.CCW};_1.validate=function(e){return e===_1.CLOCKWISE||e===_1.COUNTER_CLOCKWISE};Object.freeze(_1);var ea=_1;function nhe(e){if(typeof e!="object"||e===null)return e;let t,n=Object.keys(e);for(let i=0;i<n.length;i++)t=n[i],e.hasOwnProperty(t)&&t!=="_applyFunctions"&&(e[t]=nhe(e[t]));return Object.freeze(e)}var gX=nhe;function Lp(e){let t=e??H.EMPTY_OBJECT,n=t.cull??H.EMPTY_OBJECT,i=t.polygonOffset??H.EMPTY_OBJECT,r=t.scissorTest??H.EMPTY_OBJECT,o=r.rectangle??H.EMPTY_OBJECT,s=t.depthRange??H.EMPTY_OBJECT,a=t.depthTest??H.EMPTY_OBJECT,c=t.colorMask??H.EMPTY_OBJECT,u=t.blending??H.EMPTY_OBJECT,f=u.color??H.EMPTY_OBJECT,d=t.stencilTest??H.EMPTY_OBJECT,p=d.frontOperation??H.EMPTY_OBJECT,g=d.backOperation??H.EMPTY_OBJECT,m=t.sampleCoverage??H.EMPTY_OBJECT,y=t.viewport;this.frontFace=t.frontFace??ea.COUNTER_CLOCKWISE,this.cull={enabled:n.enabled??!1,face:n.face??te.BACK},this.lineWidth=t.lineWidth??1,this.polygonOffset={enabled:i.enabled??!1,factor:i.factor??0,units:i.units??0},this.scissorTest={enabled:r.enabled??!1,rectangle:et.clone(o)},this.depthRange={near:s.near??0,far:s.far??1},this.depthTest={enabled:a.enabled??!1,func:a.func??te.LESS},this.colorMask={red:c.red??!0,green:c.green??!0,blue:c.blue??!0,alpha:c.alpha??!0},this.depthMask=t.depthMask??!0,this.stencilMask=t.stencilMask??-1,this.blending={enabled:u.enabled??!1,color:new z(f.red??0,f.green??0,f.blue??0,f.alpha??0),equationRgb:u.equationRgb??te.FUNC_ADD,equationAlpha:u.equationAlpha??te.FUNC_ADD,functionSourceRgb:u.functionSourceRgb??te.ONE,functionSourceAlpha:u.functionSourceAlpha??te.ONE,functionDestinationRgb:u.functionDestinationRgb??te.ZERO,functionDestinationAlpha:u.functionDestinationAlpha??te.ZERO},this.stencilTest={enabled:d.enabled??!1,frontFunction:d.frontFunction??te.ALWAYS,backFunction:d.backFunction??te.ALWAYS,reference:d.reference??0,mask:d.mask??-1,frontOperation:{fail:p.fail??te.KEEP,zFail:p.zFail??te.KEEP,zPass:p.zPass??te.KEEP},backOperation:{fail:g.fail??te.KEEP,zFail:g.zFail??te.KEEP,zPass:g.zPass??te.KEEP}},this.sampleCoverage={enabled:m.enabled??!1,value:m.value??1,invert:m.invert??!1},this.viewport=l(y)?new et(y.x,y.y,y.width,y.height):void 0,this.id=0,this._applyFunctions=[]}var c6e=0,Np={};Lp.fromCache=function(e){let t=JSON.stringify(e),n=Np[t];if(l(n))return++n.referenceCount,n.state;let i=new Lp(e),r=JSON.stringify(i);return n=Np[r],l(n)||(i.id=c6e++,n={referenceCount:0,state:i},Np[r]=n),++n.referenceCount,Np[t]={referenceCount:1,state:n.state},n.state};Lp.removeFromCache=function(e){let t=new Lp(e),n=JSON.stringify(t),i=Np[n],r=JSON.stringify(e),o=Np[r];l(o)&&(--o.referenceCount,o.referenceCount===0&&(delete Np[r],l(i)&&--i.referenceCount)),l(i)&&i.referenceCount===0&&delete Np[n]};Lp.getCache=function(){return Np};Lp.clearCache=function(){Np={}};function Ax(e,t,n){n?e.enable(t):e.disable(t)}function ihe(e,t){e.frontFace(t.frontFace)}function rhe(e,t){let n=t.cull,i=n.enabled;Ax(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function ohe(e,t){e.lineWidth(t.lineWidth)}function she(e,t){let n=t.polygonOffset,i=n.enabled;Ax(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function ahe(e,t,n){let i=t.scissorTest,r=l(n.scissorTest)?n.scissorTest.enabled:i.enabled;if(Ax(e,e.SCISSOR_TEST,r),r){let o=l(n.scissorTest)?n.scissorTest.rectangle:i.rectangle;e.scissor(o.x,o.y,o.width,o.height)}}function che(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function lhe(e,t){let n=t.depthTest,i=n.enabled;Ax(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function uhe(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function fhe(e,t){e.depthMask(t.depthMask)}function dhe(e,t){e.stencilMask(t.stencilMask)}function l6e(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function hhe(e,t,n){let i=t.blending,r=l(n.blendingEnabled)?n.blendingEnabled:i.enabled;Ax(e,e.BLEND,r),r&&(l6e(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function mhe(e,t){let n=t.stencilTest,i=n.enabled;if(Ax(e,e.STENCIL_TEST,i),i){let r=n.frontFunction,o=n.backFunction,s=n.reference,a=n.mask;e.stencilFunc(r,s,a),e.stencilFuncSeparate(e.BACK,o,s,a),e.stencilFuncSeparate(e.FRONT,r,s,a);let c=n.frontOperation,u=c.fail,f=c.zFail,d=c.zPass;e.stencilOpSeparate(e.FRONT,u,f,d);let p=n.backOperation,g=p.fail,m=p.zFail,y=p.zPass;e.stencilOpSeparate(e.BACK,g,m,y)}}function phe(e,t){let n=t.sampleCoverage,i=n.enabled;Ax(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var u6e=new et;function ghe(e,t,n){let i=t.viewport??n.viewport;l(i)||(i=u6e,i.width=n.context.drawingBufferWidth,i.height=n.context.drawingBufferHeight),n.context.uniformState.viewport=i,e.viewport(i.x,i.y,i.width,i.height)}Lp.apply=function(e,t,n){ihe(e,t),rhe(e,t),ohe(e,t),she(e,t),che(e,t),lhe(e,t),uhe(e,t),fhe(e,t),dhe(e,t),mhe(e,t),phe(e,t),ahe(e,t,n),hhe(e,t,n),ghe(e,t,n)};function f6e(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(ihe),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(rhe),e.lineWidth!==t.lineWidth&&n.push(ohe),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(she),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(che),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(lhe),(e.colorMask.red!==t.colorMask.red||e.colorMask.green!==t.colorMask.green||e.colorMask.blue!==t.colorMask.blue||e.colorMask.alpha!==t.colorMask.alpha)&&n.push(uhe),e.depthMask!==t.depthMask&&n.push(fhe),e.stencilMask!==t.stencilMask&&n.push(dhe),(e.stencilTest.enabled!==t.stencilTest.enabled||e.stencilTest.frontFunction!==t.stencilTest.frontFunction||e.stencilTest.backFunction!==t.stencilTest.backFunction||e.stencilTest.reference!==t.stencilTest.reference||e.stencilTest.mask!==t.stencilTest.mask||e.stencilTest.frontOperation.fail!==t.stencilTest.frontOperation.fail||e.stencilTest.frontOperation.zFail!==t.stencilTest.frontOperation.zFail||e.stencilTest.backOperation.fail!==t.stencilTest.backOperation.fail||e.stencilTest.backOperation.zFail!==t.stencilTest.backOperation.zFail||e.stencilTest.backOperation.zPass!==t.stencilTest.backOperation.zPass)&&n.push(mhe),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(phe),n}Lp.partialApply=function(e,t,n,i,r,o){if(t!==n){let f=n._applyFunctions[t.id];l(f)||(f=f6e(t,n),n._applyFunctions[t.id]=f);let d=f.length;for(let p=0;p<d;++p)f[p](e,n)}let s=l(i.scissorTest)?i.scissorTest:t.scissorTest,a=l(r.scissorTest)?r.scissorTest:n.scissorTest;(s!==a||o)&&ahe(e,n,r);let c=l(i.blendingEnabled)?i.blendingEnabled:t.blending.enabled,u=l(r.blendingEnabled)?r.blendingEnabled:n.blending.enabled;(c!==u||u&&t.blending!==n.blending)&&hhe(e,n,r),(t!==n||i!==r||i.context!==r.context)&&ghe(e,n,r)};Lp.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:et.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:z.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:l(e.viewport)?et.clone(e.viewport):void 0}};var Ge=Lp;var d6e=new h;function Nt(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var sc={};sc[te.FLOAT]="float";sc[te.FLOAT_VEC2]="vec2";sc[te.FLOAT_VEC3]="vec3";sc[te.FLOAT_VEC4]="vec4";sc[te.INT]="int";sc[te.INT_VEC2]="ivec2";sc[te.INT_VEC3]="ivec3";sc[te.INT_VEC4]="ivec4";sc[te.BOOL]="bool";sc[te.BOOL_VEC2]="bvec2";sc[te.BOOL_VEC3]="bvec3";sc[te.BOOL_VEC4]="bvec4";sc[te.FLOAT_MAT2]="mat2";sc[te.FLOAT_MAT3]="mat3";sc[te.FLOAT_MAT4]="mat4";sc[te.SAMPLER_2D]="sampler2D";sc[te.SAMPLER_CUBE]="samplerCube";Nt.prototype.getDeclaration=function(e){let t=`uniform ${sc[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var h6e={czm_viewport:new Nt({size:1,datatype:te.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_edgeIdTexture:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.edgeIdTexture}}),czm_edgeColorTexture:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.edgeColorTexture}}),czm_edgeDepthTexture:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.edgeDepthTexture}}),czm_planarFillIdTexture:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.planarFillIdTexture}}),czm_model:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeCartographic:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.eyeCartographic}}),czm_eyeHeight2D:new Nt({size:1,datatype:te.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new Nt({size:1,datatype:te.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_eyeToEnu:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.eyeToEnu}}),czm_modelToEnu:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new Nt({size:1,datatype:te.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new Nt({size:1,datatype:te.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Nt({size:1,datatype:te.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Nt({size:1,datatype:te.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return N.getTranslation(e.inverseView,d6e)}}),czm_frameNumber:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Nt({size:1,datatype:te.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Nt({size:1,datatype:te.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Nt({size:1,datatype:te.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Nt({size:1,datatype:te.SAMPLER_CUBE,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Nt({size:9,datatype:te.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Nt({size:1,datatype:te.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Nt({size:1,datatype:te.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Nt({size:1,datatype:te.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Nt({size:1,datatype:te.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},dg=h6e;function m6e(e,t,n,i){switch(t.type){case e.FLOAT:return new _X(e,t,n,i);case e.FLOAT_VEC2:return new yX(e,t,n,i);case e.FLOAT_VEC3:return new AX(e,t,n,i);case e.FLOAT_VEC4:return new bX(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new m6(e,t,n,i);case e.UNSIGNED_INT_SAMPLER_2D:return new m6(e,t,n,i);case e.INT:case e.BOOL:return new xX(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new TX(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new EX(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new CX(e,t,n,i);case e.FLOAT_MAT2:return new vX(e,t,n,i);case e.FLOAT_MAT3:return new SX(e,t,n,i);case e.FLOAT_MAT4:return new wX(e,t,n,i);default:throw new oe(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var _X=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=r}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))}},yX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new U,this._gl=t,this._location=r}set(){let t=this.value;U.equals(t,this._value)||(U.clone(t,this._value),this._gl.uniform2f(this._location,t.x,t.y))}},AX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=r}set(){let t=this.value;l(t.red)?z.equals(t,this._value)||(this._value=z.clone(t,this._value),this._gl.uniform3f(this._location,t.red,t.green,t.blue)):l(t.x)&&(h.equals(t,this._value)||(this._value=h.clone(t,this._value),this._gl.uniform3f(this._location,t.x,t.y,t.z)))}},bX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=void 0,this._gl=t,this._location=r}set(){let t=this.value;l(t.red)?z.equals(t,this._value)||(this._value=z.clone(t,this._value),this._gl.uniform4f(this._location,t.red,t.green,t.blue,t.alpha)):l(t.x)&&(se.equals(t,this._value)||(this._value=se.clone(t,this._value),this._gl.uniform4f(this._location,t.x,t.y,t.z,t.w)))}},m6=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._gl=t,this._location=r,this.textureUnitIndex=void 0}set(){let t=this._gl;t.activeTexture(t.TEXTURE0+this.textureUnitIndex);let n=this.value;t.bindTexture(n._target,n._texture)}_setSampler(t){return this.textureUnitIndex=t,this._gl.uniform1i(this._location,t),t+1}},xX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=0,this._gl=t,this._location=r}set(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))}},TX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new U,this._gl=t,this._location=r}set(){let t=this.value;U.equals(t,this._value)||(U.clone(t,this._value),this._gl.uniform2i(this._location,t.x,t.y))}},EX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new h,this._gl=t,this._location=r}set(){let t=this.value;h.equals(t,this._value)||(h.clone(t,this._value),this._gl.uniform3i(this._location,t.x,t.y,t.z))}},CX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new se,this._gl=t,this._location=r}set(){let t=this.value;se.equals(t,this._value)||(se.clone(t,this._value),this._gl.uniform4i(this._location,t.x,t.y,t.z,t.w))}},p6e=new Float32Array(4),vX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new Xi,this._gl=t,this._location=r}set(){if(!Xi.equalsArray(this.value,this._value,0)){Xi.clone(this.value,this._value);let t=Xi.toArray(this.value,p6e);this._gl.uniformMatrix2fv(this._location,!1,t)}}},g6e=new Float32Array(9),SX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new $,this._gl=t,this._location=r}set(){if(!$.equalsArray(this.value,this._value,0)){$.clone(this.value,this._value);let t=$.toArray(this.value,g6e);this._gl.uniformMatrix3fv(this._location,!1,t)}}},_6e=new Float32Array(16),wX=class{constructor(t,n,i,r){this.name=i,this.value=void 0,this._value=new N,this._gl=t,this._location=r}set(){if(!N.equalsArray(this.value,this._value,0)){N.clone(this.value,this._value);let t=N.toArray(this.value,_6e);this._gl.uniformMatrix4fv(this._location,!1,t)}}},y1=m6e;function y6e(e,t,n,i){switch(t.type){case e.FLOAT:return new IX(e,t,n,i);case e.FLOAT_VEC2:return new PX(e,t,n,i);case e.FLOAT_VEC3:return new DX(e,t,n,i);case e.FLOAT_VEC4:return new RX(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new OX(e,t,n,i);case e.INT:case e.BOOL:return new MX(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new NX(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new LX(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new FX(e,t,n,i);case e.FLOAT_MAT2:return new BX(e,t,n,i);case e.FLOAT_MAT3:return new kX(e,t,n,i);case e.FLOAT_MAT4:return new UX(e,t,n,i);default:throw new oe(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}var IX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1;for(let o=0;o<n;++o){let s=t[o];s!==i[o]&&(i[o]=s,r=!0)}r&&this._gl.uniform1fv(this._location,i)}},PX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*2),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];U.equalsArray(a,i,o)||(U.pack(a,i,o),r=!0),o+=2}r&&this._gl.uniform2fv(this._location,i)}},DX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*3),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];l(a.red)?(a.red!==i[o]||a.green!==i[o+1]||a.blue!==i[o+2])&&(i[o]=a.red,i[o+1]=a.green,i[o+2]=a.blue,r=!0):l(a.x)&&(h.equalsArray(a,i,o)||(h.pack(a,i,o),r=!0)),o+=3}r&&this._gl.uniform3fv(this._location,i)}},RX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];l(a.red)?z.equalsArray(a,i,o)||(z.pack(a,i,o),r=!0):l(a.x)&&(se.equalsArray(a,i,o)||(se.pack(a,i,o),r=!0)),o+=4}r&&this._gl.uniform4fv(this._location,i)}},OX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o),this._gl=t,this._locations=r,this.textureUnitIndex=void 0}set(){let t=this._gl,n=t.TEXTURE0+this.textureUnitIndex,i=this.value,r=i.length;for(let o=0;o<r;++o){let s=i[o];t.activeTexture(n+o),t.bindTexture(s._target,s._texture)}}_setSampler(t){this.textureUnitIndex=t;let n=this._locations,i=n.length;for(let r=0;r<i;++r){let o=t+r;this._gl.uniform1i(n[r],o)}return t+i}},MX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Int32Array(o),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1;for(let o=0;o<n;++o){let s=t[o];s!==i[o]&&(i[o]=s,r=!0)}r&&this._gl.uniform1iv(this._location,i)}},NX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Int32Array(o*2),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];U.equalsArray(a,i,o)||(U.pack(a,i,o),r=!0),o+=2}r&&this._gl.uniform2iv(this._location,i)}},LX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Int32Array(o*3),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];h.equalsArray(a,i,o)||(h.pack(a,i,o),r=!0),o+=3}r&&this._gl.uniform3iv(this._location,i)}},FX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Int32Array(o*4),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];se.equalsArray(a,i,o)||(se.pack(a,i,o),r=!0),o+=4}r&&this._gl.uniform4iv(this._location,i)}},BX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];Xi.equalsArray(a,i,o)||(Xi.pack(a,i,o),r=!0),o+=4}r&&this._gl.uniformMatrix2fv(this._location,!1,i)}},kX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*9),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];$.equalsArray(a,i,o)||($.pack(a,i,o),r=!0),o+=9}r&&this._gl.uniformMatrix3fv(this._location,!1,i)}},UX=class{constructor(t,n,i,r){let o=r.length;this.name=i,this.value=new Array(o),this._value=new Float32Array(o*16),this._gl=t,this._location=r[0]}set(){let t=this.value,n=t.length,i=this._value,r=!1,o=0;for(let s=0;s<n;++s){let a=t[s];N.equalsArray(a,i,o)||(N.pack(a,i,o),r=!0),o+=16}r&&this._gl.uniformMatrix4fv(this._location,!1,i)}},A1=y6e;var A6e=0;function hg(e){let t=e.vertexShaderText,n=e.fragmentShaderText;typeof spector<"u"&&(t=t.replace(/^#line/gm,"//#line"),n=n.replace(/^#line/gm,"//#line"));let i=b6e(t,n);this._gl=e.gl,this._logShaderCompilation=e.logShaderCompilation,this._debugShaders=e.debugShaders,this._attributeLocations=e.attributeLocations,this._program=void 0,this._numberOfVertexAttributes=void 0,this._vertexAttributes=void 0,this._uniformsByName=void 0,this._uniforms=void 0,this._automaticUniforms=void 0,this._manualUniforms=void 0,this._duplicateUniformNames=i.duplicateUniformNames,this._cachedShader=void 0,this.maximumTextureUnitIndex=void 0,this._vertexShaderSource=e.vertexShaderSource,this._vertexShaderText=e.vertexShaderText,this._fragmentShaderSource=e.fragmentShaderSource,this._fragmentShaderText=i.fragmentShaderText,this.id=A6e++}hg.fromCache=function(e){return e=e??H.EMPTY_OBJECT,e.context.shaderCache.getShaderProgram(e)};hg.replaceCache=function(e){return e=e??H.EMPTY_OBJECT,e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(hg.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return p6(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return p6(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return p6(this),this._uniformsByName}}});function _he(e){let t=[],n=e.match(/uniform.*?(?![^{]*})(?=[=\[;])/g);if(l(n)){let i=n.length;for(let r=0;r<i;r++){let o=n[r].trim(),s=o.slice(o.lastIndexOf(" ")+1);t.push(s)}}return t}function b6e(e,t){let n={};if(!Ut.highpFloatSupported||!Ut.highpIntSupported){let i,r,o,s,a=_he(e),c=_he(t),u=a.length,f=c.length;for(i=0;i<u;i++)for(r=0;r<f;r++)if(a[i]===c[r]){o=a[i],s=`czm_mediump_${o}`;let d=new RegExp(`${o}\\b`,"g");t=t.replace(d,s),n[s]=o}}return{fragmentShaderText:t,duplicateUniformNames:n}}var Fp="[Cesium WebGL] ";function x6e(e,t){let n=t._vertexShaderText,i=t._fragmentShaderText,r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,n),e.compileShader(r);let o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,i),e.compileShader(o);let s=e.createProgram();e.attachShader(s,r),e.attachShader(s,o);let a=t._attributeLocations;if(l(a))for(let p in a)a.hasOwnProperty(p)&&e.bindAttribLocation(s,a[p],p);e.linkProgram(s);let c;if(e.getProgramParameter(s,e.LINK_STATUS))return t._logShaderCompilation&&(c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${Fp}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(o),l(c)&&c.length>0&&console.log(`${Fp}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${Fp}Shader program link log: ${c}`)),e.deleteShader(r),e.deleteShader(o),s;let u,f=t._debugShaders;throw e.getShaderParameter(o,e.COMPILE_STATUS)?e.getShaderParameter(r,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(s),console.error(`${Fp}Shader program link log: ${c}`),d(r,"vertex"),d(o,"fragment"),u=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${Fp}Vertex shader compile log: ${c}`),console.error(`${Fp} Vertex shader source:
${n}`),u=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${Fp}Fragment shader compile log: ${c}`),console.error(`${Fp} Fragment shader source:
${i}`),u=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(r),e.deleteShader(o),e.deleteProgram(s),new oe(u);function d(p,g){if(!l(f))return;let m=f.getTranslatedShaderSource(p);if(m===""){console.error(`${Fp}${g} shader translation failed.`);return}console.error(`${Fp}Translated ${g} shaderSource:
${m}`)}}function T6e(e,t,n){let i={};for(let r=0;r<n;++r){let o=e.getActiveAttrib(t,r),s=e.getAttribLocation(t,o.name);i[o.name]={name:o.name,type:o.type,index:s}}return i}function E6e(e,t){let n={},i=[],r=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s<o;++s){let a=e.getActiveUniform(t,s),c="[0]",u=a.name.indexOf(c,a.name.length-c.length)!==-1?a.name.slice(0,a.name.length-3):a.name;if(u.indexOf("gl_")!==0)if(a.name.indexOf("[")<0){let f=e.getUniformLocation(t,u);if(f!==null){let d=y1(e,a,u,f);n[u]=d,i.push(d),d._setSampler&&r.push(d)}}else{let f,d,p,g,m=u.indexOf("[");if(m>=0){if(f=n[u.slice(0,m)],!l(f))continue;d=f._locations,d.length<=1&&(p=f.value,g=e.getUniformLocation(t,u),g!==null&&(d.push(g),p.push(e.getUniform(t,g))))}else{d=[];for(let y=0;y<a.size;++y)g=e.getUniformLocation(t,`${u}[${y}]`),g!==null&&d.push(g);f=A1(e,a,u,d),n[u]=f,i.push(f),f._setSampler&&r.push(f)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:r}}function C6e(e,t){let n=[],i=[];for(let r in t)if(t.hasOwnProperty(r)){let o=t[r],s=r,a=e._duplicateUniformNames[s];l(a)&&(o.name=a,s=a);let c=dg[s];l(c)?n.push({uniform:o,automaticUniform:c}):i.push(o)}return{automaticUniforms:n,manualUniforms:i}}function v6e(e,t,n){e.useProgram(t);let i=0,r=n.length;for(let o=0;o<r;++o)i=n[o]._setSampler(i);return e.useProgram(null),i}function p6(e){l(e._program)||yhe(e)}function yhe(e){let t=e._program,n=e._gl,i=x6e(n,e,e._debugShaders),r=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),o=E6e(n,i),s=C6e(e,o.uniformsByName);e._program=i,e._numberOfVertexAttributes=r,e._vertexAttributes=T6e(n,i,r),e._uniformsByName=o.uniformsByName,e._uniforms=o.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=v6e(n,i,o.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(a,c,u,f){let d=e._vertexShaderText,p=e._fragmentShaderText,g=/ ! = /g;e._vertexShaderText=a.replace(g," != "),e._fragmentShaderText=c.replace(g," != ");try{yhe(e),u(e._program)}catch(m){e._vertexShaderText=d,e._fragmentShaderText=p;let A=/(?:Compile|Link) error: ([^]*)/.exec(m.message);f(A?A[1]:m.message)}})}hg.prototype._bind=function(){p6(this),this._gl.useProgram(this._program)};hg.prototype._setUniforms=function(e,t,n){let i,r;if(l(e)){let a=this._manualUniforms;for(i=a.length,r=0;r<i;++r){let c=a[r];c.value=e[c.name]()}}let o=this._automaticUniforms;for(i=o.length,r=0;r<i;++r){let a=o[r];a.uniform.value=a.automaticUniform.getValue(t)}let s=this._uniforms;for(i=s.length,r=0;r<i;++r)s[r].set();if(n){let a=this._gl,c=this._program;a.validateProgram(c)}};hg.prototype.isDestroyed=function(){return!1};hg.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};hg.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),le(this)};var en=hg;var b1=`const float czm_degreesPerRadian = 57.29577951308232;
`;var x1=`const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
`;var T1=`const float czm_epsilon1 = 0.1;
`;var E1=`const float czm_epsilon2 = 0.01;
`;var C1=`const float czm_epsilon3 = 0.001;
`;var v1=`const float czm_epsilon4 = 0.0001;
`;var S1=`const float czm_epsilon5 = 0.00001;
`;var w1=`const float czm_epsilon6 = 0.000001;
`;var I1=`const float czm_epsilon7 = 0.0000001;
`;var P1=`const float czm_infinity = 5906376272000.0;
`;var D1=`const float czm_oneOverPi = 0.3183098861837907;
`;var R1=`const float czm_oneOverTwoPi = 0.15915494309189535;
`;var O1=`const float czm_passCesium3DTile = 6.0;
`;var M1=`const float czm_passCesium3DTileClassification = 7.0;
`;var N1=`const float czm_passCesium3DTileClassificationIgnoreShow = 8.0;
`;var L1=`const float czm_passCesium3DTileEdges = 4.0;
`;var F1=`const float czm_passCesium3DTileEdgesDirect = 12.0;
`;var B1=`const float czm_passCesium3DTilePlanarFillId = 5.0;
`;var k1=`const float czm_passClassification = 8.0;
`;var U1=`const float czm_passCompute = 1.0;
`;var z1=`const float czm_passEnvironment = 0.0;
`;var V1=`const float czm_passGaussianSplats = 12.0;
`;var j1=`const float czm_passGlobe = 2.0;
`;var H1=`const float czm_passOpaque = 9.0;
`;var G1=`const float czm_passOverlay = 13.0;
`;var W1=`const float czm_passTerrainClassification = 3.0;
`;var q1=`const float czm_passTranslucent = 10.0;
`;var Y1=`const float czm_passVoxels = 11.0;
`;var X1=`const float czm_pi = 3.141592653589793;
`;var K1=`const float czm_piOverFour = 0.7853981633974483;
`;var $1=`const float czm_piOverSix = 0.5235987755982988;
`;var J1=`const float czm_piOverThree = 1.0471975511965976;
`;var Z1=`const float czm_piOverTwo = 1.5707963267948966;
`;var Q1=`const float czm_radiansPerDegree = 0.017453292519943295;
`;var eR=`const float czm_sceneMode2D = 2.0;
`;var tR=`const float czm_sceneMode3D = 3.0;
`;var nR=`const float czm_sceneModeColumbusView = 1.0;
`;var iR=`const float czm_sceneModeMorphing = 0.0;
`;var rR=`const float czm_solarRadius = 695500000.0;
`;var oR=`const float czm_threePiOver2 = 4.71238898038469;
`;var sR=`const float czm_twoPi = 6.283185307179586;
`;var aR=`const float czm_webMercatorMaxLatitude = 1.4844222297453324;
`;var cR=`struct czm_depthRangeStruct
{
float near;
float far;
};
`;var lR=`struct czm_material
{
vec3 diffuse;
float specular;
float shininess;
vec3 normal;
vec3 emission;
float alpha;
};
`;var uR=`struct czm_materialInput
{
float s;
vec2 st;
vec3 str;
vec3 normalEC;
mat3 tangentToEyeMatrix;
vec3 positionToEyeEC;
float height;
float slope;
float aspect;
float waterMask;
};
`;var fR=`struct czm_modelMaterial {
vec4 baseColor;
vec3 diffuse;
float alpha;
vec3 specular;
float roughness;
vec3 normalEC;
float occlusion;
vec3 emissive;
#ifdef USE_SPECULAR
float specularWeight;
#endif
#ifdef USE_ANISOTROPY
vec3 anisotropicT;
vec3 anisotropicB;
float anisotropyStrength;
#endif
#ifdef USE_CLEARCOAT
float clearcoatFactor;
float clearcoatRoughness;
vec3 clearcoatNormal;
#endif
};
`;var dR=`struct czm_modelVertexOutput {
vec3 positionMC;
float pointSize;
};
`;var hR=`struct czm_ray
{
vec3 origin;
vec3 direction;
};
`;var mR=`struct czm_raySegment
{
float start;
float stop;
};
const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);
const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
`;var pR=`struct czm_shadowParameters
{
#ifdef USE_CUBE_MAP_SHADOW
vec3 texCoords;
#else
vec2 texCoords;
#endif
float depthBias;
float depth;
float nDotL;
vec2 texelStepSize;
float normalShadingSmooth;
float darkness;
};
`;var gR=`vec3 czm_acesTonemapping(vec3 color) {
float g = 0.985;
float a = 0.065;
float b = 0.0001;
float c = 0.433;
float d = 0.238;
color = (color * (color + a) - b) / (color * (g * color + c) + d);
color = clamp(color, 0.0, 1.0);
return color;
}
`;var _R=`float czm_alphaWeight(float a)
{
float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
}
`;var yR=`vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
{
float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
val1 = val1 * (1.0 - val2);
val1 = val1 * val1 * (3.0 - (2.0 * val1));
val1 = pow(val1, 0.5);
vec4 midColor = (color1 + color2) * 0.5;
return mix(midColor, currentColor, val1);
}
vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
{
return czm_antialias(color1, color2, currentColor, dist, 0.1);
}
`;var AR=`vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
vec3 hsb = czm_RGBToHSB(rgb);
hsb.x += hsbShift.x;
hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0);
if (ignoreBlackPixels) {
hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
} else {
hsb.z = hsb.z + hsbShift.z;
}
hsb.z = clamp(hsb.z, 0.0, 1.0);
return czm_HSBToRGB(hsb);
}
`;var bR=`vec2 czm_approximateSphericalCoordinates(vec3 normal) {
float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
return vec2(latitudeApproximation, longitudeApproximation);
}
`;var xR=`float czm_approximateTanh(float x) {
float x2 = x * x;
return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
}
`;var TR=`bool czm_backFacing()
{
return gl_FrontFacing == false;
}
`;var ER=`float czm_branchFreeTernary(bool comparison, float a, float b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
`;var CR=`vec4 czm_cascadeColor(vec4 weights)
{
return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
}
`;var vR=`uniform vec4 shadowMap_cascadeDistances;
float czm_cascadeDistance(vec4 weights)
{
return dot(shadowMap_cascadeDistances, weights);
}
`;var SR=`uniform mat4 shadowMap_cascadeMatrices[4];
mat4 czm_cascadeMatrix(vec4 weights)
{
return shadowMap_cascadeMatrices[0] * weights.x +
shadowMap_cascadeMatrices[1] * weights.y +
shadowMap_cascadeMatrices[2] * weights.z +
shadowMap_cascadeMatrices[3] * weights.w;
}
`;var wR=`uniform vec4 shadowMap_cascadeSplits[2];
vec4 czm_cascadeWeights(float depthEye)
{
vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
return near * far;
}
`;var IR=`vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
{
vec3 p = position2D.xyz * (1.0 - time) + position3D.xyz * time;
return vec4(p, 1.0);
}
`;var PR=`vec4 czm_computeAtmosphereColor(
vec3 positionWC,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = czm_atmosphereMieAnisotropy;
float GSq = G * G;
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
return vec4(color, opacity);
}
vec4 czm_computeAtmosphereColor(
czm_ray primaryRay,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
vec3 direction = normalize(primaryRay.direction);
float cosAngle = dot(direction, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = czm_atmosphereMieAnisotropy;
float GSq = G * G;
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
return vec4(color, opacity);
}
`;var DR=`void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
float atmosphereInnerRadius = length(positionWC);
czm_computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
}
`;var RR=`vec4 czm_computePosition();
`;var OR=`void czm_computeScattering(
czm_ray primaryRay,
float primaryRayLength,
vec3 lightDirection,
float atmosphereInnerRadius,
out vec3 rayleighColor,
out vec3 mieColor,
out float opacity
) {
const float ATMOSPHERE_THICKNESS = 111e3;
const int PRIMARY_STEPS_MAX = 16;
const int LIGHT_STEPS_MAX = 4;
rayleighColor = vec3(0.0);
mieColor = vec3(0.0);
opacity = 0.0;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
vec3 origin = vec3(0.0);
czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
return;
}
float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
float start_0 = primaryRayAtmosphereIntersect.start;
primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
float x_o_a = start_0 - ATMOSPHERE_THICKNESS;
float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0);
int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0);
float rayPositionLength = primaryRayAtmosphereIntersect.start;
float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
vec3 rayleighAccumulation = vec3(0.0);
vec3 mieAccumulation = vec3(0.0);
vec2 opticalDepth = vec2(0.0);
vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);
for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
if (i >= PRIMARY_STEPS) {
break;
}
vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
opticalDepth += sampleDensity;
czm_ray lightRay = czm_ray(samplePosition, lightDirection);
czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
float lightPositionLength = 0.0;
vec2 lightOpticalDepth = vec2(0.0);
for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
if (j >= LIGHT_STEPS) {
break;
}
vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
float lightHeight = length(lightPosition) - atmosphereInnerRadius;
lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
lightPositionLength += lightStepLength;
}
vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
rayleighAccumulation += sampleDensity.x * attenuation;
mieAccumulation += sampleDensity.y * attenuation;
rayPositionLength += (rayStepLength += rayStepLengthIncrease);
}
rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
mieColor = czm_atmosphereMieCoefficient * mieAccumulation;
opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
}
`;var MR=`vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)
{
return vec2(textureTransform * vec3(texCoord, 1.0));
}
`;var NR=`vec2 cordic(float angle)
{
vec2 vector = vec2(6.0725293500888267e-1, 0.0);
float sense = (angle < 0.0) ? -1.0 : 1.0;
mat2 rotation = mat2(1.0, sense, -sense, 1.0);
vector = rotation * vector;
angle -= sense * 7.8539816339744828e-1;
sense = (angle < 0.0) ? -1.0 : 1.0;
float factor = sense * 5.0e-1;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.6364760900080609e-1;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.5e-1;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.4497866312686414e-1;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.25e-1;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.2435499454676144e-1;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 6.25e-2;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 6.2418809995957350e-2;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.125e-2;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.1239833430268277e-2;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.5625e-2;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.5623728620476831e-2;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 7.8125e-3;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 7.8123410601011111e-3;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.90625e-3;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.9062301319669718e-3;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.953125e-3;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.9531225164788188e-3;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 9.765625e-4;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 9.7656218955931946e-4;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 4.8828125e-4;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.8828121119489829e-4;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.44140625e-4;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.4414062014936177e-4;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.220703125e-4;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.2207031189367021e-4;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 6.103515625e-5;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 6.1035156174208773e-5;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.0517578125e-5;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.0517578115526096e-5;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.52587890625e-5;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.5258789061315762e-5;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 7.62939453125e-6;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 7.6293945311019700e-6;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.814697265625e-6;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.8146972656064961e-6;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.9073486328125e-6;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.9073486328101870e-6;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 9.5367431640625e-7;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 9.5367431640596084e-7;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 4.76837158203125e-7;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.7683715820308884e-7;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.384185791015625e-7;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.3841857910155797e-7;
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.1920928955078125e-7;
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
return vector;
}
vec2 czm_cosineAndSine(float angle)
{
if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
{
if (angle < 0.0)
{
return -cordic(angle + czm_pi);
}
else
{
return -cordic(angle - czm_pi);
}
}
else
{
return cordic(angle);
}
}
`;var LR=`vec4 czm_decodeRGB8(float encoded) {
const float SHIFT_RIGHT16 = 1.0 / 65536.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
const float SHIFT_LEFT16 = 65536.0;
const float SHIFT_LEFT8 = 256.0;
vec4 color = vec4(255.0);
color.r = floor(encoded * SHIFT_RIGHT16);
color.g = floor((encoded - color.r * SHIFT_LEFT16) * SHIFT_RIGHT8);
color.b = floor(encoded - color.r * SHIFT_LEFT16 - color.g * SHIFT_LEFT8);
return color / 255.0;
}
`;var FR=`vec2 czm_decompressTextureCoordinates(float encoded)
{
float temp = encoded / 4096.0;
float xZeroTo4095 = floor(temp);
float stx = xZeroTo4095 / 4095.0;
float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
return vec2(stx, sty);
}
`;var BR=`#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
out float v_WindowZ;
#endif
vec4 czm_depthClamp(vec4 coords)
{
#ifndef LOG_DEPTH
#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
coords.z = 0.0;
#else
coords.z = min(coords.z, coords.w);
#endif
#endif
return coords;
}
`;var kR=`mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
{
vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0));
vec3 tangentEC = normalize(czm_normal3D * tangentMC);
vec3 bitangentEC = normalize(cross(normalEC, tangentEC));
return mat3(
tangentEC.x, tangentEC.y, tangentEC.z,
bitangentEC.x, bitangentEC.y, bitangentEC.z,
normalEC.x, normalEC.y, normalEC.z);
}
`;var UR=`bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
{
vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
return (dot(scaled, scaled) <= 1.0);
}
`;var zR=`vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
{
return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
}
`;var VR=`bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec4(epsilon)));
}
bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec3(epsilon)));
}
bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec2(epsilon)));
}
bool czm_equalsEpsilon(float left, float right, float epsilon) {
return (abs(left - right) <= epsilon);
}
`;var jR=`vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
{
vec4 p = positionEC;
vec4 zEyeOffset = normalize(p) * eyeOffset.z;
p.xy += eyeOffset.xy + zEyeOffset.xy;
p.z += zEyeOffset.z;
return p;
}
`;var HR=`vec3 czm_eyeToCartographicDelta(vec3 positionEC)
{
vec3 cameraToVertex = czm_eyeToEnu * positionEC;
float cosLatitude = cos(czm_eyeCartographic.y);
float sinLatitude = sin(czm_eyeCartographic.y);
float primeVerticalRadius = 1.0 / czm_eyeEllipsoidCurvature.x;
vec2 cameraEquatorialPos = vec2((primeVerticalRadius + czm_eyeCartographic.z) * cosLatitude, 0.0);
vec2 vertexEquatorialPos = cameraEquatorialPos + vec2(-cameraToVertex.y * sinLatitude + cameraToVertex.z * cosLatitude, cameraToVertex.x);
float deltaLongitude = atan(vertexEquatorialPos.y, vertexEquatorialPos.x);
float sinHalfLongitude = sin(deltaLongitude * 0.5);
float dx = length(vertexEquatorialPos) * 2.0 * sinHalfLongitude * sinHalfLongitude;
vec3 meridionalOffset = vec3(
0.0,
cameraToVertex.y - dx * sinLatitude,
cameraToVertex.z + dx * cosLatitude
);
float meridionalRadius = 1.0 / czm_eyeEllipsoidCurvature.y;
vec2 cameraMeridionalPos = vec2(meridionalRadius + czm_eyeCartographic.z, 0.0);
vec2 vertMeridionalPos = cameraMeridionalPos + vec2(meridionalOffset.z, meridionalOffset.y);
float deltaLatitude = atan(vertMeridionalPos.y, vertMeridionalPos.x);
float sinHalfLatitude = sin(deltaLatitude * 0.5);
float dz = length(vertMeridionalPos) * 2.0 * sinHalfLatitude * sinHalfLatitude;
float deltaHeight = meridionalOffset.z + dz;
return vec3(deltaLongitude, deltaLatitude, deltaHeight);
}
`;var GR=`vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
{
vec4 q = czm_projection * positionEC;
q.xyz /= q.w;
q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;
return q;
}
`;var WR=`float czm_fastApproximateAtan(float x) {
return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
}
float czm_fastApproximateAtan(float x, float y) {
float t = abs(x);
float opposite = abs(y);
float adjacent = max(t, opposite);
opposite = min(t, opposite);
t = czm_fastApproximateAtan(opposite / adjacent);
t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
t = czm_branchFreeTernary(y < 0.0, -t, t);
return t;
}
`;var qR=`vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
{
float scalar = distanceToCamera * czm_fogDensity;
float fog = 1.0 - exp(-(scalar * scalar));
return mix(color, fogColor, fog);
}
vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
{
float scalar = distanceToCamera * czm_fogDensity;
float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
return mix(color, fogColor, fog);
}
`;var YR=`vec3 czm_gammaCorrect(vec3 color) {
#ifdef HDR
color = pow(color, vec3(czm_gamma));
#endif
return color;
}
vec4 czm_gammaCorrect(vec4 color) {
#ifdef HDR
color.rgb = pow(color.rgb, vec3(czm_gamma));
#endif
return color;
}
`;var XR=`vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
{
return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
}
`;var KR=`czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
{
czm_material material;
material.diffuse = vec3(0.0);
material.specular = 0.0;
material.shininess = 1.0;
material.normal = materialInput.normalEC;
material.emission = vec3(0.0);
material.alpha = 1.0;
return material;
}
`;var $R=`vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
const float NONE = 0.0;
const float SCENE_LIGHT = 1.0;
const float SUNLIGHT = 2.0;
vec3 lightDirection =
positionWC * float(lightEnum == NONE) +
czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
return normalize(lightDirection);
}
`;var JR=`float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
{
return max(dot(lightDirectionEC, normalEC), 0.0);
}
`;var ZR=`float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
{
vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
return pow(specular, max(shininess, czm_epsilon2));
}
`;var QR=`vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
{
float cosAngle = cos(angleInRadians);
float sinAngle = sin(angleInRadians);
vec2 s0 = vec2(1.0/17.0, 0.0);
vec2 s1 = vec2(-1.0/29.0, 0.0);
vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
vec2 uv0 = (uv/103.0) + (time * s0);
vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
uv0 = fract(uv0);
uv1 = fract(uv1);
uv2 = fract(uv2);
uv3 = fract(uv3);
vec4 noise = (texture(normalMap, uv0)) +
(texture(normalMap, uv1)) +
(texture(normalMap, uv2)) +
(texture(normalMap, uv3));
return ((noise / 4.0) - 0.5) * 2.0;
}
`;var eO=`const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 czm_HSBToRGB(vec3 hsb)
{
vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
}
`;var tO=`vec3 hueToRGB(float hue)
{
float r = abs(hue * 6.0 - 3.0) - 1.0;
float g = 2.0 - abs(hue * 6.0 - 2.0);
float b = 2.0 - abs(hue * 6.0 - 4.0);
return clamp(vec3(r, g, b), 0.0, 1.0);
}
vec3 czm_HSLToRGB(vec3 hsl)
{
vec3 rgb = hueToRGB(hsl.x);
float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
return (rgb - 0.5) * c + hsl.z;
}
`;var nO=`vec3 czm_hue(vec3 rgb, float adjustment)
{
const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
0.595716, -0.274453, -0.321263,
0.211456, -0.522591, 0.311135);
const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
1.0, -0.2721, -0.6474,
1.0, -1.107, 1.7046);
vec3 yiq = toYIQ * rgb;
float hue = atan(yiq.z, yiq.y) + adjustment;
float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
return toRGB * color;
}
`;var iO=`vec3 czm_inverseGamma(vec3 color) {
return pow(color, vec3(1.0 / czm_gamma));
}
`;var rO=`bool czm_isEmpty(czm_raySegment interval)
{
return (interval.stop < 0.0);
}
`;var oO=`bool czm_isFull(czm_raySegment interval)
{
return (interval.start == 0.0 && interval.stop == czm_infinity);
}
`;var sO=`float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
{
float sinLatitude = sin(latitude);
float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
return (mercatorY - southMercatorY) * oneOverMercatorHeight;
}
`;var aO=`vec3 czm_linearToSrgb(vec3 linearIn)
{
return pow(linearIn, vec3(1.0/2.2));
}
vec4 czm_linearToSrgb(vec4 linearIn)
{
vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
return vec4(srgbOut, linearIn.a);
}
`;var cO=`float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
}
`;var lO=`float czm_luminance(vec3 rgb)
{
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
return dot(rgb, W);
}
`;var uO=`float czm_maximumComponent(vec2 v)
{
return max(v.x, v.y);
}
float czm_maximumComponent(vec3 v)
{
return max(max(v.x, v.y), v.z);
}
float czm_maximumComponent(vec4 v)
{
return max(max(max(v.x, v.y), v.z), v.w);
}
`;var fO=`float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
{
float width = czm_viewport.z;
float height = czm_viewport.w;
float pixelWidth;
float pixelHeight;
float top = czm_frustumPlanes.x;
float bottom = czm_frustumPlanes.y;
float left = czm_frustumPlanes.z;
float right = czm_frustumPlanes.w;
if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
{
float frustumWidth = right - left;
float frustumHeight = top - bottom;
pixelWidth = frustumWidth / width;
pixelHeight = frustumHeight / height;
}
else
{
float distanceToPixel = -positionEC.z;
float inverseNear = 1.0 / czm_currentFrustum.x;
float tanTheta = top * inverseNear;
pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
tanTheta = right * inverseNear;
pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
}
return max(pixelWidth, pixelHeight) * pixelRatio;
}
float czm_metersPerPixel(vec4 positionEC)
{
return czm_metersPerPixel(positionEC, czm_pixelRatio);
}
`;var dO=`vec4 czm_modelToWindowCoordinates(vec4 position)
{
vec4 positionEC = czm_modelView * position;
vec4 q = czm_projection * positionEC;
q.xyz /= q.w;
q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz;
return q;
}
`;var hO=`vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
{
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
vec3 target = left * right;
float leftLuminance = dot(left, W);
float rightLuminance = dot(right, W);
float targetLuminance = dot(target, W);
return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
}
`;var mO=`float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
{
float valueAtMin = nearFarScalar.y;
float valueAtMax = nearFarScalar.w;
float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
t = pow(clamp(t, 0.0, 1.0), 0.2);
return mix(valueAtMin, valueAtMax, t);
}
`;var pO=`vec3 czm_octDecode(vec2 encoded, float range)
{
if (encoded.x == 0.0 && encoded.y == 0.0) {
return vec3(0.0, 0.0, 0.0);
}
encoded = encoded / range * 2.0 - 1.0;
vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
if (v.z < 0.0)
{
v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
}
return normalize(v);
}
vec3 czm_octDecode(vec2 encoded)
{
return czm_octDecode(encoded, 255.0);
}
vec3 czm_octDecode(float encoded)
{
float temp = encoded / 256.0;
float x = floor(temp);
float y = (temp - x) * 256.0;
return czm_octDecode(vec2(x, y));
}
void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
{
float temp = encoded.x / 65536.0;
float x = floor(temp);
float encodedFloat1 = (temp - x) * 65536.0;
temp = encoded.y / 65536.0;
float y = floor(temp);
float encodedFloat2 = (temp - y) * 65536.0;
vector1 = czm_octDecode(encodedFloat1);
vector2 = czm_octDecode(encodedFloat2);
vector3 = czm_octDecode(vec2(x, y));
}
`;var gO=`vec4 czm_packDepth(float depth)
{
vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
enc = fract(enc);
enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
return enc;
}
`;var _O=`vec3 lambertianDiffuse(vec3 diffuseColor)
{
return diffuseColor / czm_pi;
}
vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
{
float versine = 1.0 - VdotH;
float versineSquared = versine * versine;
return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
}
#ifdef USE_ANISOTROPY
float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
{
vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
float v = 0.5 / (GGXV + GGXL);
return clamp(v, 0.0, 1.0);
}
float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
{
float roughnessSquared = bitangentRoughness * tangentialRoughness;
vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
float w2 = roughnessSquared / dot(f, f);
return roughnessSquared * w2 * w2 / czm_pi;
}
#endif
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
float alphaRoughnessSq = alphaRoughness * alphaRoughness;
float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGX = GGXV + GGXL;
if (GGX > 0.0)
{
return 0.5 / GGX;
}
return 0.0;
}
float GGX(float alphaRoughness, float NdotH)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
return alphaRoughnessSquared / (czm_pi * f * f);
}
float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
{
float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
float D = GGX(alphaRoughness, NdotH);
return G * D;
}
vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
{
vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);
vec3 f0 = material.specular;
float reflectance = czm_maximumComponent(f0);
vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
vec3 F = fresnelSchlick2(f0, f90, VdotH);
#if defined(USE_SPECULAR)
F *= material.specularWeight;
#endif
float alphaRoughness = material.roughness * material.roughness;
#ifdef USE_ANISOTROPY
mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
vec3 lightDirection = lightDirectionEC * tbn;
vec3 viewDirection = viewDirectionEC * tbn;
vec3 halfwayDirection = halfwayDirectionEC * tbn;
float anisotropyStrength = material.anisotropyStrength;
float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
vec3 specularContribution = F * G * D;
#else
float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
vec3 specularContribution = F * specularStrength;
#endif
vec3 diffuseColor = material.diffuse;
vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
return (diffuseContribution + specularContribution) * NdotL;
}
`;var yO=`vec3 czm_pbrNeutralTonemapping(vec3 color) {
const float startCompression = 0.8 - 0.04;
const float desaturation = 0.15;
float x = min(color.r, min(color.g, color.b));
float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
color -= offset;
float peak = max(color.r, max(color.g, color.b));
if (peak < startCompression) return color;
const float d = 1.0 - startCompression;
float newPeak = 1.0 - d * d / (peak + d - startCompression);
color *= newPeak / peak;
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
}
`;var AO=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
{
return czm_getLambertDiffuse(lightDirectionEC, material.normal);
}
float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
{
return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
}
vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
if (czm_sceneMode == czm_sceneMode3D) {
diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
}
float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
vec3 materialDiffuse = material.diffuse * 0.5;
vec3 ambient = materialDiffuse;
vec3 color = ambient + material.emission;
color += materialDiffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
vec3 ambient = vec3(0.0);
vec3 color = ambient + material.emission;
color += material.diffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
`;var bO=`float czm_planeDistance(vec4 plane, vec3 point) {
return (dot(plane.xyz, point) + plane.w);
}
float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
return (dot(planeNormal, point) + planeDistance);
}
`;var xO=`vec3 czm_pointAlongRay(czm_ray ray, float time)
{
return ray.origin + (time * ray.direction);
}
`;var TO=`czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
{
vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
float q2 = dot(q, q);
float qw = dot(q, w);
if (q2 > 1.0)
{
if (qw >= 0.0)
{
return czm_emptyRaySegment;
}
else
{
float qw2 = qw * qw;
float difference = q2 - 1.0;
float w2 = dot(w, w);
float product = w2 * difference;
if (qw2 < product)
{
return czm_emptyRaySegment;
}
else if (qw2 > product)
{
float discriminant = qw * qw - product;
float temp = -qw + sqrt(discriminant);
float root0 = temp / w2;
float root1 = difference / temp;
if (root0 < root1)
{
czm_raySegment i = czm_raySegment(root0, root1);
return i;
}
else
{
czm_raySegment i = czm_raySegment(root1, root0);
return i;
}
}
else
{
float root = sqrt(difference / w2);
czm_raySegment i = czm_raySegment(root, root);
return i;
}
}
}
else if (q2 < 1.0)
{
float difference = q2 - 1.0;
float w2 = dot(w, w);
float product = w2 * difference;
float discriminant = qw * qw - product;
float temp = -qw + sqrt(discriminant);
czm_raySegment i = czm_raySegment(0.0, temp / w2);
return i;
}
else
{
if (qw < 0.0)
{
float w2 = dot(w, w);
czm_raySegment i = czm_raySegment(0.0, -qw / w2);
return i;
}
else
{
return czm_emptyRaySegment;
}
}
}
`;var EO=`czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
{
vec3 o = ray.origin;
vec3 d = ray.direction;
vec3 oc = o - center;
float a = dot(d, d);
float b = 2.0 * dot(d, oc);
float c = dot(oc, oc) - (radius * radius);
float det = (b * b) - (4.0 * a * c);
if (det < 0.0) {
return czm_emptyRaySegment;
}
float sqrtDet = sqrt(det);
float t0 = (-b - sqrtDet) / (2.0 * a);
float t1 = (-b + sqrtDet) / (2.0 * a);
czm_raySegment result = czm_raySegment(t0, t1);
return result;
}
`;var CO=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
{
return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
}
`;var vO=`float czm_readNonPerspective(float value, float oneOverW) {
return value * oneOverW;
}
vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
return value * oneOverW;
}
vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
return value * oneOverW;
}
vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
return value * oneOverW;
}
`;var SO=`float czm_reverseLogDepth(float logZ)
{
#ifdef LOG_DEPTH
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
float depthFromNear = exp2(log2Depth) - 1.0;
return far * (1.0 - near / (depthFromNear + near)) / (far - near);
#endif
return logZ;
}
`;var wO=`const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec3 czm_RGBToHSB(vec3 rgb)
{
vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
float d = q.x - min(q.w, q.y);
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
}
`;var IO=`vec3 RGBtoHCV(vec3 rgb)
{
vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
float c = q.x - min(q.w, q.y);
float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
return vec3(h, c, q.x);
}
vec3 czm_RGBToHSL(vec3 rgb)
{
vec3 hcv = RGBtoHCV(rgb);
float l = hcv.z - hcv.y * 0.5;
float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
return vec3(hcv.x, s, l);
}
`;var PO=`vec3 czm_RGBToXYZ(vec3 rgb)
{
const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
0.3576, 0.7152, 0.1192,
0.1805, 0.0722, 0.9505);
vec3 xyz = RGB2XYZ * rgb;
vec3 Yxy;
Yxy.r = xyz.g;
float temp = dot(vec3(1.0), xyz);
Yxy.gb = xyz.rg / temp;
return Yxy;
}
`;var DO=`float czm_round(float value) {
return floor(value + 0.5);
}
vec2 czm_round(vec2 value) {
return floor(value + 0.5);
}
vec3 czm_round(vec3 value) {
return floor(value + 0.5);
}
vec4 czm_round(vec4 value) {
return floor(value + 0.5);
}
`;var RO=`vec3 czm_saturation(vec3 rgb, float adjustment)
{
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
vec3 intensity = vec3(dot(rgb, W));
return mix(intensity, rgb, adjustment);
}
`;var OO=`float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
{
return czm_unpackDepth(czm_textureCube(shadowMap, d));
}
float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
{
#ifdef USE_SHADOW_DEPTH_TEXTURE
return texture(shadowMap, uv).r;
#else
return czm_unpackDepth(texture(shadowMap, uv));
#endif
}
float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
{
return step(depth, czm_sampleShadowMap(shadowMap, uv));
}
float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
{
return step(depth, czm_sampleShadowMap(shadowMap, uv));
}
`;var MO=`float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
{
#ifdef USE_NORMAL_SHADING
#ifdef USE_NORMAL_SHADING_SMOOTH
float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
#else
float strength = step(0.0, nDotL);
#endif
visibility *= strength;
#endif
visibility = max(visibility, darkness);
return visibility;
}
#ifdef USE_CUBE_MAP_SHADOW
float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
{
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec3 uvw = shadowParameters.texCoords;
depth -= depthBias;
float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#else
float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
{
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec2 uv = shadowParameters.texCoords;
depth -= depthBias;
#ifdef USE_SOFT_SHADOWS
vec2 texelStepSize = shadowParameters.texelStepSize;
float radius = 1.0;
float dx0 = -texelStepSize.x * radius;
float dy0 = -texelStepSize.y * radius;
float dx1 = texelStepSize.x * radius;
float dy1 = texelStepSize.y * radius;
float visibility = (
czm_shadowDepthCompare(shadowMap, uv, depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
) * (1.0 / 9.0);
#else
float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
#endif
return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#endif
`;var NO=`float czm_signNotZero(float value)
{
return value >= 0.0 ? 1.0 : -1.0;
}
vec2 czm_signNotZero(vec2 value)
{
return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
}
vec3 czm_signNotZero(vec3 value)
{
return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
}
vec4 czm_signNotZero(vec4 value)
{
return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
}
`;var LO=`vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
{
vec3 L00 = coefficients[0];
vec3 L1_1 = coefficients[1];
vec3 L10 = coefficients[2];
vec3 L11 = coefficients[3];
vec3 L2_2 = coefficients[4];
vec3 L2_1 = coefficients[5];
vec3 L20 = coefficients[6];
vec3 L21 = coefficients[7];
vec3 L22 = coefficients[8];
float x = normal.x;
float y = normal.y;
float z = normal.z;
vec3 L =
L00
+ L1_1 * y
+ L10 * z
+ L11 * x
+ L2_2 * (y * x)
+ L2_1 * (y * z)
+ L20 * (3.0 * z * z - 1.0)
+ L21 * (z * x)
+ L22 * (x * x - y * y);
return max(L, vec3(0.0));
}
`;var FO=`vec3 czm_srgbToLinear(vec3 srgbIn)
{
return pow(srgbIn, vec3(2.2));
}
vec4 czm_srgbToLinear(vec4 srgbIn)
{
vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
return vec4(linearOut, srgbIn.a);
}
`;var BO=`mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
{
vec3 normal = normalize(normalEC);
vec3 tangent = normalize(tangentEC);
vec3 bitangent = normalize(bitangentEC);
return mat3(tangent.x , tangent.y , tangent.z,
bitangent.x, bitangent.y, bitangent.z,
normal.x , normal.y , normal.z);
}
`;var kO=`vec4 czm_textureCube(samplerCube sampler, vec3 p) {
#if __VERSION__ == 300
return texture(sampler, p);
#else
return textureCube(sampler, p);
#endif
}
vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
#if __VERSION__ == 300
return textureLod(sampler, p, lod);
#elif defined(GL_EXT_shader_texture_lod)
return textureCubeLodEXT(sampler, p, lod);
#endif
}
`;var UO=`vec4 czm_transformPlane(vec4 plane, mat4 transform) {
vec4 transformedPlane = transform * plane;
float normalMagnitude = length(transformedPlane.xyz);
return transformedPlane / normalMagnitude;
}
`;var zO=`vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
{
vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
if (length(highDifference) == 0.0) {
highDifference = vec3(0);
}
vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
return vec4(highDifference + lowDifference, 1.0);
}
`;var VO=`vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);
if (czm_sceneMode == czm_sceneMode3D) {
diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
}
diffuse = clamp(diffuse, 0.0, 1.0);
float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);
vec3 materialDiffuse = material.diffuse * 0.5;
vec3 ambient = materialDiffuse;
vec3 color = ambient + material.emission;
color += materialDiffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
`;var jO=`mat2 czm_transpose(mat2 matrix)
{
return mat2(
matrix[0][0], matrix[1][0],
matrix[0][1], matrix[1][1]);
}
mat3 czm_transpose(mat3 matrix)
{
return mat3(
matrix[0][0], matrix[1][0], matrix[2][0],
matrix[0][1], matrix[1][1], matrix[2][1],
matrix[0][2], matrix[1][2], matrix[2][2]);
}
mat4 czm_transpose(mat4 matrix)
{
return mat4(
matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
}
`;var HO=`float czm_unpackDepth(vec4 packedDepth)
{
return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
}
`;var GO=`float czm_unpackFloat(vec4 packedFloat)
{
packedFloat = floor(packedFloat * 255.0 + 0.5);
float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
if (exponent == -127.0)
{
return 0.0;
}
float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
float result = sign * exp2(exponent - 23.0) * mantissa;
return result;
}
`;var WO=`uint czm_unpackTexture(float packedValue) {
float rounded = czm_round(packedValue * 255.0);
return uint(rounded);
}
uint czm_unpackTexture(vec2 packedValue) {
vec2 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
return byte0 | (byte1 << 8);
}
uint czm_unpackTexture(vec3 packedValue) {
vec3 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
uint byte2 = uint(rounded.z);
return byte0 | (byte1 << 8) | (byte2 << 16);
}
uint czm_unpackTexture(vec4 packedValue) {
vec4 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
uint byte2 = uint(rounded.z);
uint byte3 = uint(rounded.w);
return byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24);
}
`;var qO=`int czm_unpackUint(float packedValue) {
float rounded = czm_round(packedValue * 255.0);
return int(rounded);
}
int czm_unpackUint(vec2 packedValue) {
vec2 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec2(1.0, 256.0)));
}
int czm_unpackUint(vec3 packedValue) {
vec3 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
}
int czm_unpackUint(vec4 packedValue) {
vec4 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
}
`;var YO=`float czm_valueTransform(float offset, float scale, float value) {
return scale * value + offset;
}
vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
return scale * value + offset;
}
vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
return scale * value + offset;
}
vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
return scale * value + offset;
}
mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
return matrixCompMult(scale, value) + offset;
}
mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
return matrixCompMult(scale, value) + offset;
}
mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
return matrixCompMult(scale, value) + offset;
}
`;var XO=`#ifdef LOG_DEPTH
out float v_depthFromNearPlusOne;
#ifdef SHADOW_MAP
out vec3 v_logPositionEC;
#endif
#endif
vec4 czm_updatePositionDepth(vec4 coords) {
#if defined(LOG_DEPTH)
#ifdef SHADOW_MAP
vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
v_logPositionEC = logPositionEC;
#endif
coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
#endif
return coords;
}
void czm_vertexLogDepth()
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
gl_Position = czm_updatePositionDepth(gl_Position);
#endif
}
void czm_vertexLogDepth(vec4 clipCoords)
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
czm_updatePositionDepth(clipCoords);
#endif
}
`;var KO=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
{
float x = 2.0 * screenCoordinate.x - 1.0;
float y = 2.0 * screenCoordinate.y - 1.0;
float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
vec4 q = vec4(x, y, z, 1.0);
q /= screenCoordinate.w;
if (!(czm_inverseProjection == mat4(0.0)))
{
q = czm_inverseProjection * q;
}
else
{
float top = czm_frustumPlanes.x;
float bottom = czm_frustumPlanes.y;
float left = czm_frustumPlanes.z;
float right = czm_frustumPlanes.w;
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
q.x = (q.x * (right - left) + left + right) * 0.5;
q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
q.z = (q.z * (near - far) - near - far) * 0.5;
q.w = 1.0;
}
return q;
}
vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
{
vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
}
vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
{
#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
float depthFromNear = exp2(log2Depth) - 1.0;
float depthFromCamera = depthFromNear + near;
vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
eyeCoordinate.w = 1.0 / depthFromCamera;
#else
vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
#endif
return eyeCoordinate;
}
vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
{
vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
}
`;var $O=`#if !defined(LOG_DEPTH)
in float v_WindowZ;
#endif
void czm_writeDepthClamp()
{
#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
#endif
}
`;var JO=`#ifdef LOG_DEPTH
in float v_depthFromNearPlusOne;
#ifdef POLYGON_OFFSET
uniform vec2 u_polygonOffset;
#endif
#endif
void czm_writeLogDepth(float depth)
{
#if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
discard;
}
#ifdef POLYGON_OFFSET
float factor = u_polygonOffset[0];
float units = u_polygonOffset[1];
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
if (factor != 0.0) {
float x = dFdx(depth);
float y = dFdy(depth);
float m = sqrt(x * x + y * y);
depth += m * factor;
}
#endif
#endif
gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;
#ifdef POLYGON_OFFSET
gl_FragDepth += czm_epsilon7 * units;
#endif
#endif
}
void czm_writeLogDepth() {
#ifdef LOG_DEPTH
czm_writeLogDepth(v_depthFromNearPlusOne);
#endif
}
`;var ZO=`float czm_writeNonPerspective(float value, float w) {
return value * w;
}
vec2 czm_writeNonPerspective(vec2 value, float w) {
return value * w;
}
vec3 czm_writeNonPerspective(vec3 value, float w) {
return value * w;
}
vec4 czm_writeNonPerspective(vec4 value, float w) {
return value * w;
}
`;var QO=`vec3 czm_XYZToRGB(vec3 Yxy)
{
const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
-1.5371, 1.8760, -0.2040,
-0.4985, 0.0416, 1.0572);
vec3 xyz;
xyz.r = Yxy.r * Yxy.g / Yxy.b;
xyz.g = Yxy.r;
xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
return XYZ2RGB * xyz;
}
`;var bx={czm_degreesPerRadian:b1,czm_depthRange:x1,czm_epsilon1:T1,czm_epsilon2:E1,czm_epsilon3:C1,czm_epsilon4:v1,czm_epsilon5:S1,czm_epsilon6:w1,czm_epsilon7:I1,czm_infinity:P1,czm_oneOverPi:D1,czm_oneOverTwoPi:R1,czm_passCesium3DTile:O1,czm_passCesium3DTileClassification:M1,czm_passCesium3DTileClassificationIgnoreShow:N1,czm_passCesium3DTileEdges:L1,czm_passCesium3DTileEdgesDirect:F1,czm_passCesium3DTilePlanarFillId:B1,czm_passClassification:k1,czm_passCompute:U1,czm_passEnvironment:z1,czm_passGaussianSplats:V1,czm_passGlobe:j1,czm_passOpaque:H1,czm_passOverlay:G1,czm_passTerrainClassification:W1,czm_passTranslucent:q1,czm_passVoxels:Y1,czm_pi:X1,czm_piOverFour:K1,czm_piOverSix:$1,czm_piOverThree:J1,czm_piOverTwo:Z1,czm_radiansPerDegree:Q1,czm_sceneMode2D:eR,czm_sceneMode3D:tR,czm_sceneModeColumbusView:nR,czm_sceneModeMorphing:iR,czm_solarRadius:rR,czm_threePiOver2:oR,czm_twoPi:sR,czm_webMercatorMaxLatitude:aR,czm_depthRangeStruct:cR,czm_material:lR,czm_materialInput:uR,czm_modelMaterial:fR,czm_modelVertexOutput:dR,czm_ray:hR,czm_raySegment:mR,czm_shadowParameters:pR,czm_acesTonemapping:gR,czm_alphaWeight:_R,czm_antialias:yR,czm_applyHSBShift:AR,czm_approximateSphericalCoordinates:bR,czm_approximateTanh:xR,czm_backFacing:TR,czm_branchFreeTernary:ER,czm_cascadeColor:CR,czm_cascadeDistance:vR,czm_cascadeMatrix:SR,czm_cascadeWeights:wR,czm_columbusViewMorph:IR,czm_computeAtmosphereColor:PR,czm_computeGroundAtmosphereScattering:DR,czm_computePosition:RR,czm_computeScattering:OR,czm_computeTextureTransform:MR,czm_cosineAndSine:NR,czm_decodeRGB8:LR,czm_decompressTextureCoordinates:FR,czm_depthClamp:BR,czm_eastNorthUpToEyeCoordinates:kR,czm_ellipsoidContainsPoint:UR,czm_ellipsoidTextureCoordinates:zR,czm_equalsEpsilon:VR,czm_eyeOffset:jR,czm_eyeToCartographicDelta:HR,czm_eyeToWindowCoordinates:GR,czm_fastApproximateAtan:WR,czm_fog:qR,czm_gammaCorrect:YR,czm_geodeticSurfaceNormal:XR,czm_getDefaultMaterial:KR,czm_getDynamicAtmosphereLightDirection:$R,czm_getLambertDiffuse:JR,czm_getSpecular:ZR,czm_getWaterNoise:QR,czm_HSBToRGB:eO,czm_HSLToRGB:tO,czm_hue:nO,czm_inverseGamma:iO,czm_isEmpty:rO,czm_isFull:oO,czm_latitudeToWebMercatorFraction:sO,czm_linearToSrgb:aO,czm_lineDistance:cO,czm_luminance:lO,czm_maximumComponent:uO,czm_metersPerPixel:fO,czm_modelToWindowCoordinates:dO,czm_multiplyWithColorBalance:hO,czm_nearFarScalar:mO,czm_octDecode:pO,czm_packDepth:gO,czm_pbrLighting:_O,czm_pbrNeutralTonemapping:yO,czm_phong:AO,czm_planeDistance:bO,czm_pointAlongRay:xO,czm_rayEllipsoidIntersectionInterval:TO,czm_raySphereIntersectionInterval:EO,czm_readDepth:CO,czm_readNonPerspective:vO,czm_reverseLogDepth:SO,czm_RGBToHSB:wO,czm_RGBToHSL:IO,czm_RGBToXYZ:PO,czm_round:DO,czm_saturation:RO,czm_shadowDepthCompare:OO,czm_shadowVisibility:MO,czm_signNotZero:NO,czm_sphericalHarmonics:LO,czm_srgbToLinear:FO,czm_tangentToEyeSpaceMatrix:BO,czm_textureCube:kO,czm_transformPlane:UO,czm_translateRelativeToEye:zO,czm_translucentPhong:VO,czm_transpose:jO,czm_unpackDepth:HO,czm_unpackFloat:GO,czm_unpackTexture:WO,czm_unpackUint:qO,czm_valueTransform:YO,czm_vertexLogDepth:XO,czm_windowToEyeCoordinates:KO,czm_writeDepthClamp:$O,czm_writeLogDepth:JO,czm_writeNonPerspective:ZO,czm_XYZToRGB:QO};function S6e(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,`
varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable
${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
${n}`,n=`#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable
#endif
${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100
${n}`,n}var eM=S6e;function Ahe(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let r=0;r<n;++r)i+=`
`;return i})}function bhe(e,t,n){let i;for(let r=0;r<n.length;++r)n[r].name===e&&(i=n[r]);return l(i)||(t=Ahe(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function xhe(e,t){if(e.evaluated)return;e.evaluated=!0;let n=e.glslSource.match(/\bczm_[a-zA-Z0-9_]*/g);l(n)&&n!==null&&(n=n.filter(function(i,r){return n.indexOf(i)===r}),n.forEach(function(i){if(i!==e.name&&La._czmBuiltinsAndUniforms.hasOwnProperty(i)){let r=bhe(i,La._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(r),r.requiredBy.push(e),xhe(r,t)}}))}function w6e(e){let t=[],n=[];for(;e.length>0;){let r=e.pop();n.push(r),r.requiredBy.length===0&&t.push(r)}for(;t.length>0;){let r=t.shift();e.push(r);for(let o=0;o<r.dependsOn.length;++o){let s=r.dependsOn[o],a=s.requiredBy.indexOf(r);s.requiredBy.splice(a,1),s.requiredBy.length===0&&t.push(s)}}let i=[];for(let r=0;r<n.length;++r)n[r].requiredBy.length!==0&&i.push(n[r])}function I6e(e){let t=[],n=bhe("main",e,t);xhe(n,t),w6e(t);let i="";for(let r=t.length-1;r>=0;--r)i=`${i+t[r].glslSource}
`;return i.replace(n.glslSource,"")}function The(e,t,n){let i="",r=e.sources;if(l(r))for(let g=0;g<r.length;++g)i+=`
#line 0
${r[g]}`;i=Ahe(i);let o;i=i.replace(/#version\s+(.*?)\n/gm,function(g,m){return o=m,`
`});let s=[];i=i.replace(/#extension.*\n/gm,function(g){return s.push(g),`
`}),i=i.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let a=e.pickColorQualifier;l(a)&&(i=La.createPickFragmentShaderSource(i,a));let c="",u=s.length;for(let g=0;g<u;g++)c+=s[g];t&&(c+=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
precision highp int;
#else
precision mediump float;
precision mediump int;
#define highp mediump
#endif
`),n.webgl2&&(c+=`precision highp sampler3D;
`);let f=e.defines;if(l(f))for(let g=0,m=f.length;g<m;++g){let y=f[g];y.length!==0&&(c+=`#define ${y}
`)}n.textureFloatLinear&&(c+=`#define OES_texture_float_linear
`),n.floatingPointTexture&&(c+=`#define OES_texture_float
`);let d="";e.includeBuiltIns&&(d=I6e(i)),c+=`
#line 0
`;let p=d+i;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(p)&&!/czm_out_FragColor/g.test(p)&&/out_FragColor/g.test(p)&&(c+=`layout(location = 0) out vec4 out_FragColor;
`),c+=d,c+=i,n.webgl2?c=`#version 300 es
${c}`:c=eM(c,t),c}function La(e){e=e??H.EMPTY_OBJECT;let t=e.pickColorQualifier;this.defines=l(e.defines)?e.defines.slice(0):[],this.sources=l(e.sources)?e.sources.slice(0):[],this.pickColorQualifier=t,this.includeBuiltIns=e.includeBuiltIns??!0}La.prototype.clone=function(){return new La({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};La.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};La.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,r=this.sources.join(`
`);return`${t}:${n}:${i}:${r}`};La.prototype.createCombinedVertexShader=function(e){return The(this,!1,e)};La.prototype.createCombinedFragmentShader=function(e){return The(this,!0,e)};La._czmBuiltinsAndUniforms={};for(let e in bx)bx.hasOwnProperty(e)&&(La._czmBuiltinsAndUniforms[e]=bx[e]);for(let e in dg)if(dg.hasOwnProperty(e)){let t=dg[e];typeof t.getDeclaration=="function"&&(La._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}La.createPickVertexShaderSource=function(e){return`${La.replaceMain(e,"czm_old_main")}
in vec4 pickColor;
out vec4 czm_pickColor;
void main()
{
czm_old_main();
czm_pickColor = pickColor;
}`};La.createPickFragmentShaderSource=function(e,t){let n=La.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor;
void main()
{
czm_old_main();
if (out_FragColor.a == 0.0) {
discard;
}
out_FragColor = czm_pickColor;
}`;return`${n}
${i}`};function P6e(e,t){let n=e.defines,i=n.length;for(let r=0;r<i;++r)if(n[r]===t)return!0;return!1}function Ehe(e,t){let n=e.sources,i=n.length;for(let r=0;r<i;++r)if(n[r].indexOf(t)!==-1)return!0;return!1}function Che(e,t){let n=t.length;for(let i=0;i<n;++i){let r=t[i];if(Ehe(e,r))return r}}var D6e=["v_normalEC","v_normal"];La.findNormalVarying=function(e){return Ehe(e,"#ifdef HAS_NORMALS")?P6e(e,"HAS_NORMALS")?"v_normalEC":void 0:Che(e,D6e)};var R6e=["v_positionEC"];La.findPositionVarying=function(e){return Che(e,R6e)};var Ye=La;var tM=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;
#ifdef EXTRUDED_GEOMETRY
in vec3 extrudeDirection;
uniform float u_globeMinimumAltitude;
#endif // EXTRUDED_GEOMETRY
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif // PER_INSTANCE_COLOR
#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
out vec4 v_sphericalExtents;
#else // SPHERICAL
out vec2 v_inversePlaneExtents;
out vec4 v_westPlane;
out vec4 v_southPlane;
#endif // SPHERICAL
out vec3 v_uvMinAndSphericalLongitudeRotation;
out vec3 v_uMaxAndInverseDistance;
out vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES
void main()
{
vec4 position = czm_computePosition();
#ifdef EXTRUDED_GEOMETRY
float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
position = position + vec4(extrudeDirection * delta, 0.0);
#endif
#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
#else // SPHERICAL
#ifdef COLUMBUS_VIEW_2D
vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
#else // COLUMBUS_VIEW_2D
vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
#endif // COLUMBUS_VIEW_2D
vec3 eastWard = southEastCorner - southWestCorner;
float eastExtent = length(eastWard);
eastWard /= eastExtent;
vec3 northWard = northWestCorner - southWestCorner;
float northExtent = length(northWard);
northWard /= northExtent;
v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
#endif // SPHERICAL
vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
#endif // TEXTURE_COORDINATES
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#endif
gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
}
`;var zy=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
void main(void)
{
#ifdef VECTOR_TILE
out_FragColor = czm_gammaCorrect(u_highlightColor);
#else
out_FragColor = vec4(1.0);
#endif
czm_writeDepthClamp();
}
`;var zX={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};zX.NUMBER_OF_CLASSIFICATION_TYPES=3;Object.freeze(zX);var Qn=zX;var vhe={NEVER:te.NEVER,LESS:te.LESS,EQUAL:te.EQUAL,LESS_OR_EQUAL:te.LEQUAL,GREATER:te.GREATER,NOT_EQUAL:te.NOTEQUAL,GREATER_OR_EQUAL:te.GEQUAL,ALWAYS:te.ALWAYS};Object.freeze(vhe);var ac=vhe;function O6e(e,t){let n=[],i=e.length,r=0;for(;r<i;){let o=Math.ceil((i-r)/t--);n.push(e.slice(r,r+o)),r+=o}return n}var nM=O6e;function mg(e,t,n){if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=M6e(t),r=e.floatingPointTexture,o=i===ze.FLOAT&&!r,s=N6e(t,o),a=L6e(s,t,o),c=Math.floor(Ut.maximumTextureSize/a),u=Math.min(n,c),f=a*u,d=Math.ceil(n/u),p=1/f,g=p*.5,m=1/d,y=m*.5;this._textureDimensions=new U(f,d),this._textureStep=new se(p,g,m,y),this._pixelDatatype=o?ze.UNSIGNED_BYTE:i,this._packFloats=o,this._offsets=s,this._stride=a,this._texture=void 0;let A=4*f*d;this._batchValues=i===ze.FLOAT&&!o?new Float32Array(A):new Uint8Array(A),this._batchValuesDirty=!1}Object.defineProperties(mg.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function M6e(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==Y.UNSIGNED_BYTE){t=!0;break}return t?ze.FLOAT:ze.UNSIGNED_BYTE}function whe(e,t){let n=e[t].componentsPerAttribute;return n===2?U:n===3?h:n===4?se:Number}function N6e(e,t){let n=new Array(e.length),i=0,r=e.length;for(let o=0;o<r;++o){let a=e[o].componentDatatype;n[o]=i,a!==Y.UNSIGNED_BYTE&&t?i+=4:++i}return n}function L6e(e,t,n){let i=e.length,r=e[i-1];return t[i-1].componentDatatype!==Y.UNSIGNED_BYTE&&n?r+4:r+1}var iM=new se;function F6e(e,t,n){let i=se.unpack(e,t,iM),r=se.unpackFloat(i);i=se.unpack(e,t+4,iM);let o=se.unpackFloat(i);i=se.unpack(e,t+8,iM);let s=se.unpackFloat(i);i=se.unpack(e,t+12,iM);let a=se.unpackFloat(i);return se.fromElements(r,o,s,a,n)}function B6e(e,t,n){let i=se.packFloat(e.x,iM);se.pack(i,t,n),i=se.packFloat(e.y,i),se.pack(i,t,n+4),i=se.packFloat(e.z,i),se.pack(i,t,n+8),i=se.packFloat(e.w,i),se.pack(i,t,n+12)}var She=new se;mg.prototype.getBatchedAttribute=function(e,t,n){let i=this._attributes,r=this._offsets[t],s=4*this._stride*e+4*r,a;this._packFloats&&i[t].componentDatatype!==ze.UNSIGNED_BYTE?a=F6e(this._batchValues,s,She):a=se.unpack(this._batchValues,s,She);let c=whe(i,t);return l(c.fromCartesian4)?c.fromCartesian4(a,n):l(c.clone)?c.clone(a,n):a.x};var k6e=[void 0,void 0,new U,new h,new se],U6e=new se;mg.prototype.setBatchedAttribute=function(e,t,n){let i=this._attributes,r=k6e[i[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,r),s=whe(this._attributes,t);if(l(s.equals)?s.equals(o,n):o===n)return;let c=U6e;c.x=l(n.x)?n.x:n,c.y=l(n.y)?n.y:0,c.z=l(n.z)?n.z:0,c.w=l(n.w)?n.w:0;let u=this._offsets[t],d=4*this._stride*e+4*u;this._packFloats&&i[t].componentDatatype!==ze.UNSIGNED_BYTE?B6e(c,this._batchValues,d):se.pack(c,this._batchValues,d),this._batchValuesDirty=!0};function z6e(e,t){let n=e._textureDimensions;e._texture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:Ht.NEAREST,flipY:!1})}function V6e(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}mg.prototype.update=function(e){l(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,l(this._texture)||z6e(this,e.context),V6e(this))};mg.prototype.getUniformMapCallback=function(){let e=this;return function(t){return e._attributes.length===0?t:Ot(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}};function j6e(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep;
vec2 computeSt(float batchId)
{
float stepX = batchTextureStep.x;
float centerX = batchTextureStep.y;
float numberOfAttributes = float(${t});
return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
}
`:`uniform vec4 batchTextureStep;
uniform vec2 batchTextureDimensions;
vec2 computeSt(float batchId)
{
float stepX = batchTextureStep.x;
float centerX = batchTextureStep.y;
float stepY = batchTextureStep.z;
float centerY = batchTextureStep.w;
float numberOfAttributes = float(${t});
float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
}
`}function H6e(e){return e===1?"float":`vec${e}`}function G6e(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function W6e(e,t){let i=e._attributes[t],r=i.componentsPerAttribute,o=i.functionName,s=H6e(r),a=G6e(r),c=e._offsets[t],u=`${s} ${o}(float batchId)
{
vec2 st = computeSt(batchId);
st.x += batchTextureStep.x * float(${c});
`;return e._packFloats&&i.componentDatatype!==ze.UNSIGNED_BYTE?u+=`vec4 textureValue;
textureValue.x = czm_unpackFloat(texture(batchTexture, st));
textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
`:u+=` vec4 textureValue = texture(batchTexture, st);
`,u+=` ${s} value = textureValue${a};
`,e._pixelDatatype===ze.UNSIGNED_BYTE&&i.componentDatatype===Y.UNSIGNED_BYTE&&!i.normalize?u+=`value *= 255.0;
`:e._pixelDatatype===ze.FLOAT&&i.componentDatatype===Y.UNSIGNED_BYTE&&i.normalize&&(u+=`value /= 255.0;
`),u+=` return value;
}
`,u}mg.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture;
`;t+=`${j6e(this)}
`;let n=e.length;for(let i=0;i<n;++i)t+=W6e(this,i);return function(i){let r=i.indexOf("void main"),o=i.substring(0,r),s=i.substring(r);return`${o}
${t}
${s}`}};mg.prototype.isDestroyed=function(){return!1};mg.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),le(this)};var xx=mg;var rM=class e{constructor(t){this._ellipsoid=t??ee.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}get ellipsoid(){return this._ellipsoid}static mercatorAngleToGeodeticLatitude(t){return D.PI_OVER_TWO-2*Math.atan(Math.exp(-t))}static geodeticLatitudeToMercatorAngle(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let n=Math.sin(t);return .5*Math.log((1+n)/(1-n))}project(t,n){let i=this._semimajorAxis,r=t.longitude*i,o=e.geodeticLatitudeToMercatorAngle(t.latitude)*i,s=t.height;return l(n)?(n.x=r,n.y=o,n.z=s,n):new h(r,o,s)}unproject(t,n){let i=this._oneOverSemimajorAxis,r=t.x*i,o=e.mercatorAngleToGeodeticLatitude(t.y*i),s=t.z;return l(n)?(n.longitude=r,n.latitude=o,n.height=s,n):new he(r,o,s)}};rM.MaximumLatitude=rM.mercatorAngleToGeodeticLatitude(Math.PI);var yi=rM;function q6e(e,t,n){let i=!n,r=e.length,o;if(!i&&r>1){let s=e[0].modelMatrix;for(o=1;o<r;++o)if(!N.equals(s,e[o].modelMatrix)){i=!0;break}}if(i)for(o=0;o<r;++o)l(e[o].geometry)&&Gn.transformToWorldCoordinates(e[o]);else N.multiplyTransformation(t,e[0].modelMatrix,t)}function VX(e,t){let n=e.attributes,i=n.position,r=i.values.length/i.componentsPerAttribute;n.batchId=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});let o=n.batchId.values;for(let s=0;s<r;++s)o[s]=t}function Y6e(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];l(i.geometry)?VX(i.geometry,n):l(i.westHemisphereGeometry)&&l(i.eastHemisphereGeometry)&&(VX(i.westHemisphereGeometry,n),VX(i.eastHemisphereGeometry,n))}}function X6e(e){let t=e.instances,n=e.projection,i=e.elementIndexUintSupported,r=e.scene3DOnly,o=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix,c,u,f,d=t.length;for(c=0;c<d;++c)if(l(t[c].geometry)){f=t[c].geometry.primitiveType;break}if(q6e(t,a,r),!r)for(c=0;c<d;++c)l(t[c].geometry)&&Gn.splitLongitude(t[c]);if(Y6e(t),o)for(c=0;c<d;++c){let g=t[c];l(g.geometry)?(Gn.reorderForPostVertexCache(g.geometry),Gn.reorderForPreVertexCache(g.geometry)):l(g.westHemisphereGeometry)&&l(g.eastHemisphereGeometry)&&(Gn.reorderForPostVertexCache(g.westHemisphereGeometry),Gn.reorderForPreVertexCache(g.westHemisphereGeometry),Gn.reorderForPostVertexCache(g.eastHemisphereGeometry),Gn.reorderForPreVertexCache(g.eastHemisphereGeometry))}let p=Gn.combineInstances(t);for(d=p.length,c=0;c<d;++c){u=p[c];let g=u.attributes;if(r)for(let m in g)g.hasOwnProperty(m)&&g[m].componentDatatype===Y.DOUBLE&&Gn.encodeAttribute(u,m,`${m}3DHigh`,`${m}3DLow`);else for(let m in g)if(g.hasOwnProperty(m)&&g[m].componentDatatype===Y.DOUBLE){let y=`${m}3D`,A=`${m}2D`;Gn.projectTo2D(u,m,y,A,n),l(u.boundingSphere)&&m==="position"&&(u.boundingSphereCV=ue.fromVertices(u.attributes.position2D.values)),Gn.encodeAttribute(u,y,`${y}High`,`${y}Low`),Gn.encodeAttribute(u,A,`${A}High`,`${A}Low`)}s&&Gn.compressVertices(u)}if(!i){let g=[];for(d=p.length,c=0;c<d;++c)u=p[c],g=g.concat(Gn.fitToUnsignedShortIndices(u));p=g}return p}function jX(e,t,n,i){let r,o,s,a=i.length-1;if(a>=0){let u=i[a];r=u.offset+u.count,s=u.index,o=n[s].indices.length}else r=0,s=0,o=n[s].indices.length;let c=e.length;for(let u=0;u<c;++u){let d=e[u][t];if(!l(d))continue;let p=d.indices.length;r+p>o&&(r=0,o=n[++s].indices.length),i.push({index:s,offset:r,count:p}),r+=p}}function K6e(e,t){let n=[];return jX(e,"geometry",t,n),jX(e,"westHemisphereGeometry",t,n),jX(e,"eastHemisphereGeometry",t,n),n}var pg={};pg.combineGeometry=function(e){let t,n,i=e.instances,r=i.length,o,s,a=!1;r>0&&(t=X6e(e),t.length>0&&(n=Gn.createAttributeLocations(t[0]),e.createPickOffsets&&(o=K6e(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(r),a=!0));let c=new Array(r),u=new Array(r);for(let f=0;f<r;++f){let d=i[f],p=d.geometry;l(p)&&(c[f]=p.boundingSphere,u[f]=p.boundingSphereCV,a&&(s[f]=d.geometry.offsetAttribute));let g=d.eastHemisphereGeometry,m=d.westHemisphereGeometry;l(g)&&l(m)&&(l(g.boundingSphere)&&l(m.boundingSphere)&&(c[f]=ue.union(g.boundingSphere,m.boundingSphere)),l(g.boundingSphereCV)&&l(m.boundingSphereCV)&&(u[f]=ue.union(g.boundingSphereCV,m.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:o,offsetInstanceExtend:s,boundingSpheres:c,boundingSpheresCV:u}};function $6e(e,t){let n=e.attributes;for(let i in n)if(n.hasOwnProperty(i)){let r=n[i];l(r)&&l(r.values)&&t.push(r.values.buffer)}l(e.indices)&&t.push(e.indices.buffer)}function J6e(e,t){let n=e.length;for(let i=0;i<n;++i)$6e(e[i],t)}function Z6e(e){let t=1,n=e.length;for(let i=0;i<n;i++){let r=e[i];if(++t,!l(r))continue;let o=r.attributes;t+=7+2*ue.packedLength+(l(r.indices)?r.indices.length:0);for(let s in o)if(o.hasOwnProperty(s)&&l(o[s])){let a=o[s];t+=5+a.values.length}}return t}pg.packCreateGeometryResults=function(e,t){let n=new Float64Array(Z6e(e)),i=[],r={},o=e.length,s=0;n[s++]=o;for(let a=0;a<o;a++){let c=e[a],u=l(c);if(n[s++]=u?1:0,!u)continue;n[s++]=c.primitiveType,n[s++]=c.geometryType,n[s++]=c.offsetAttribute??-1;let f=l(c.boundingSphere)?1:0;n[s++]=f,f&&ue.pack(c.boundingSphere,n,s),s+=ue.packedLength;let d=l(c.boundingSphereCV)?1:0;n[s++]=d,d&&ue.pack(c.boundingSphereCV,n,s),s+=ue.packedLength;let p=c.attributes,g=[];for(let y in p)p.hasOwnProperty(y)&&l(p[y])&&(g.push(y),l(r[y])||(r[y]=i.length,i.push(y)));n[s++]=g.length;for(let y=0;y<g.length;y++){let A=g[y],b=p[A];n[s++]=r[A],n[s++]=b.componentDatatype,n[s++]=b.componentsPerAttribute,n[s++]=b.normalize?1:0,n[s++]=b.values.length,n.set(b.values,s),s+=b.values.length}let m=l(c.indices)?c.indices.length:0;n[s++]=m,m>0&&(n.set(c.indices,s),s+=m)}return t.push(n.buffer),{stringTable:i,packedData:n}};pg.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,r=new Array(n[0]),o=0,s=1;for(;s<n.length;){if(!(n[s++]===1)){r[o++]=void 0;continue}let c=n[s++],u=n[s++],f=n[s++];f===-1&&(f=void 0);let d,p;n[s++]===1&&(d=ue.unpack(n,s)),s+=ue.packedLength,n[s++]===1&&(p=ue.unpack(n,s)),s+=ue.packedLength;let y,A,b,x=new Tn,T=n[s++];for(i=0;i<T;i++){let v=t[n[s++]],S=n[s++];b=n[s++];let I=n[s++]!==0;y=n[s++],A=Y.createTypedArray(S,y);for(let R=0;R<y;R++)A[R]=n[s++];x[v]=new Ne({componentDatatype:S,componentsPerAttribute:b,normalize:I,values:A})}let E;if(y=n[s++],y>0){let v=A.length/b;for(E=je.createTypedArray(v,y),i=0;i<y;i++)E[i]=n[s++]}r[o++]=new St({primitiveType:c,geometryType:u,boundingSphere:d,boundingSphereCV:p,indices:E,attributes:x,offsetAttribute:f})}return r};function Q6e(e,t){let n=e.length,i=new Float64Array(1+n*19),r=0;i[r++]=n;for(let o=0;o<n;o++){let s=e[o];if(N.pack(s.modelMatrix,i,r),r+=N.packedLength,l(s.attributes)&&l(s.attributes.offset)){let a=s.attributes.offset.value;i[r]=a[0],i[r+1]=a[1],i[r+2]=a[2]}r+=3}return t.push(i.buffer),i}function eHe(e){let t=e,n=new Array(t[0]),i=0,r=1;for(;r<t.length;){let o=N.unpack(t,r),s;r+=N.packedLength,l(t[r])&&(s={offset:new xr(t[r],t[r+1],t[r+2])}),r+=3,n[i++]={modelMatrix:o,attributes:s}}return n}pg.packCombineGeometryParameters=function(e,t){let n=e.createGeometryResults,i=n.length;for(let r=0;r<i;r++)t.push(n[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:Q6e(e.instances,t),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof Ui,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};pg.unpackCombineGeometryParameters=function(e){let t=eHe(e.packedInstances),n=e.createGeometryResults,i=n.length,r=0;for(let a=0;a<i;a++){let c=pg.unpackCreateGeometryResults(n[a]),u=c.length;for(let f=0;f<u;f++){let d=c[f],p=t[r];p.geometry=d,++r}}let o=ee.clone(e.ellipsoid),s=e.isGeographic?new Ui(o):new yi(o);return{instances:t,ellipsoid:o,projection:s,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:N.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function Ihe(e){let t=e.length,n=1+(ue.packedLength+1)*t,i=new Float32Array(n),r=0;i[r++]=t;for(let o=0;o<t;++o){let s=e[o];l(s)?(i[r++]=1,ue.pack(e[o],i,r)):i[r++]=0,r+=ue.packedLength}return i}function Phe(e){let t=new Array(e[0]),n=0,i=1;for(;i<e.length;)e[i++]===1&&(t[n]=ue.unpack(e,i)),++n,i+=ue.packedLength;return t}pg.packCombineGeometryResults=function(e,t){l(e.geometries)&&J6e(e.geometries,t);let n=Ihe(e.boundingSpheres),i=Ihe(e.boundingSpheresCV);return t.push(n.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:i}};pg.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:Phe(e.boundingSpheres),boundingSpheresCV:Phe(e.boundingSpheresCV)}};var Tx=pg;var Dhe={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6};Object.freeze(Dhe);var is=Dhe;var Mu={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3};Mu.NUMBER_OF_SHADOW_MODES=4;Mu.castShadows=function(e){return e===Mu.ENABLED||e===Mu.CAST_ONLY};Mu.receiveShadows=function(e){return e===Mu.ENABLED||e===Mu.RECEIVE_ONLY};Mu.fromCastReceive=function(e,t){return e&&t?Mu.ENABLED:e?Mu.CAST_ONLY:t?Mu.RECEIVE_ONLY:Mu.DISABLED};Object.freeze(Mu);var Dn=Mu;function rs(e){e=e??H.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=new N,this.show=e.show??!0,this._vertexCacheOptimize=e.vertexCacheOptimize??!1,this._interleave=e.interleave??!1,this._releaseGeometryInstances=e.releaseGeometryInstances??!0,this._allowPicking=e.allowPicking??!0,this._asynchronous=e.asynchronous??!0,this._compressVertices=e.compressVertices??!0,this.cull=e.cull??!0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.rtcCenter=e.rtcCenter,this.shadows=e.shadows??Dn.DISABLED,this._translucent=void 0,this._state=is.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=new Map,this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(rs.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}}});function tHe(e){let t=e.length,n=[],i=e[0].attributes,r;for(r in i)if(i.hasOwnProperty(r)&&l(i[r])){let o=i[r],s=!0;for(let a=1;a<t;++a){let c=e[a].attributes[r];if(!l(c)||o.componentDatatype!==c.componentDatatype||o.componentsPerAttribute!==c.componentsPerAttribute||o.normalize!==c.normalize){s=!1;break}}s&&n.push(r)}return n}var nHe=new U,iHe=new h,Uhe=new se;function zhe(e){let t=e.length;if(t===1)return e[0];if(t===2)return U.unpack(e,0,nHe);if(t===3)return h.unpack(e,0,iHe);if(t===4)return se.unpack(e,0,Uhe)}function rHe(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],r=i.length;if(r===0)return;let o=tHe(i),s=o.length,a=[],c={},u={},f,p=i[0].attributes,g,m,y;for(g=0;g<s;++g)m=o[g],y=p[m],c[m]=g,a.push({functionName:`czm_batchTable_${m}`,componentDatatype:y.componentDatatype,componentsPerAttribute:y.componentsPerAttribute,normalize:y.normalize});o.indexOf("distanceDisplayCondition")!==-1&&(a.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:Y.FLOAT,componentsPerAttribute:1}),u.center3DHigh=a.length-5,u.center3DLow=a.length-4,u.center2DHigh=a.length-3,u.center2DLow=a.length-2,u.radius=a.length-1),o.indexOf("offset")!==-1&&(a.push({functionName:"czm_batchTable_offset2D",componentDatatype:Y.FLOAT,componentsPerAttribute:3}),f=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let A=a.length,b=new xx(t,a,r);for(g=0;g<r;++g){let x=i[g];p=x.attributes;for(let I=0;I<s;++I){m=o[I],y=p[m];let R=zhe(y.value),O=c[m];b.setBatchedAttribute(g,O,R)}let T={primitive:x.pickPrimitive??e};l(x.id)&&(T.id=x.id);let E=t.createPickId(T);e._pickIds.push(E);let v=E.color,S=Uhe;S.x=z.floatToByte(v.red),S.y=z.floatToByte(v.green),S.z=z.floatToByte(v.blue),S.w=z.floatToByte(v.alpha),b.setBatchedAttribute(g,A-1,S)}e._batchTable=b,e._batchTableAttributeIndices=c,e._batchTableBoundingSphereAttributeIndices=u,e._batchTableOffsetAttribute2DIndex=f}function oHe(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new Ne({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function sHe(e){let t=e.attributes,n=new Tn;for(let r in t)t.hasOwnProperty(r)&&l(t[r])&&(n[r]=oHe(t[r]));let i;if(l(e.indices)){let r=e.indices;Array.isArray(r)?i=r.slice(0):i=new r.constructor(r)}return new St({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:ue.clone(e.boundingSphere)})}function aHe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:N.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var cHe=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;rs._modifyShaderPosition=function(e,t,n){let i,r="",o="",s="";for(;(i=cHe.exec(t))!==null;){let a=i[1],c=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;c!=="vec4 czm_computePosition()"&&(r+=`${c};
`),l(e.rtcCenter)?(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/in\s+vec(?:3|4)\s+position3DLow;/g,""),r+=`uniform mat4 u_modifiedModelView;
`,o+=`in vec4 position;
`,s+=`${c}
{
return u_modifiedModelView * position;
}
`,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${c}
{
return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
}
`:(o+=`in vec3 ${a}2DHigh;
in vec3 ${a}2DLow;
`,s+=`${c}
{
vec4 p;
if (czm_morphTime == 1.0)
{
p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
}
else if (czm_morphTime == 0.0)
{
p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);
}
else
{
p = czm_columbusViewMorph(
czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),
czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),
czm_morphTime);
}
return p;
}
`)}return[r,o,t,s].join(`
`)};rs._appendShowToShader=function(e,t){return l(e._batchTableAttributeIndices.show)?`${Ye.replaceMain(t,"czm_non_show_main")}
void main()
{
czm_non_show_main();
gl_Position *= czm_batchTable_show(batchId);
}`:t};rs._updateColorAttribute=function(e,t,n){if(!l(e._batchTableAttributeIndices.color)&&!l(e._batchTableAttributeIndices.depthFailColor)||t.search(/in\s+vec4\s+color;/g)===-1)return t;let i=t;return i=i.replace(/in\s+vec4\s+color;/g,""),n?i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):i=i.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2"),i};function Rhe(e){return`${Ye.replaceMain(e,"czm_non_pick_main")}
out vec4 v_pickColor;
void main()
{
czm_non_pick_main();
v_pickColor = czm_batchTable_pickColor(batchId);
}`}function Ohe(e){return`in vec4 v_pickColor;
${e}`}rs._updatePickColorAttribute=function(e){let t=e.replace(/in\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2"),t};rs._appendOffsetToShader=function(e,t){if(!l(e._batchTableAttributeIndices.offset))return t;let n=`in float batchId;
`;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),r=`vec4 $1 = czm_computePosition();
`;return r+=` if (czm_sceneMode == czm_sceneMode3D)
`,r+=` {
`,r+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",r+=` }
`,r+=` else
`,r+=` {
`,r+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",r+=` }
`,i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,r),i};rs._appendDistanceDisplayConditionToShader=function(e,t,n){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let i=Ye.replaceMain(t,"czm_non_distanceDisplayCondition_main"),r=`void main()
{
czm_non_distanceDisplayCondition_main();
vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
`;return n?r+=` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
`:r+=` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
vec4 centerRTE;
if (czm_morphTime == 1.0)
{
centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
}
else if (czm_morphTime == 0.0)
{
centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
}
else
{
centerRTE = czm_columbusViewMorph(
czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
czm_morphTime);
}
`,r+=` float radiusSq = boundingSphereRadius * boundingSphereRadius;
float distanceSq;
if (czm_sceneMode == czm_sceneMode2D)
{
distanceSq = czm_eyeHeight2D.y - radiusSq;
}
else
{
distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
}
distanceSq = max(distanceSq, 0.0);
float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
gl_Position *= show;
}`,`${i}
${r}`};function Mhe(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let r=t.search(/in\s+vec3\s+tangent;/g)!==-1,o=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=r||o?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",u=`in ${a} ${c};`,f="",d="";if(i){f+=`vec2 st;
`;let m=s>1?`${c}.x`:c;d+=` st = czm_decompressTextureCoordinates(${m});
`}n&&r&&o?(f+=`vec3 normal;
vec3 tangent;
vec3 bitangent;
`,d+=` czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent);
`):(n&&(f+=`vec3 normal;
`,d+=` normal = czm_octDecode(${c}${s>1?`.${i?"y":"x"}`:""});
`),r&&(f+=`vec3 tangent;
`,d+=` tangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`),o&&(f+=`vec3 bitangent;
`,d+=` bitangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`));let p=t;p=p.replace(/in\s+vec3\s+normal;/g,""),p=p.replace(/in\s+vec2\s+st;/g,""),p=p.replace(/in\s+vec3\s+tangent;/g,""),p=p.replace(/in\s+vec3\s+bitangent;/g,""),p=Ye.replaceMain(p,"czm_non_compressed_main");let g=`void main()
{
${d} czm_non_compressed_main();
}`;return[u,f,p,g].join(`
`)}function lHe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
czm_non_depth_clamp_main();
gl_Position = czm_depthClamp(gl_Position);}
`,t}function uHe(e){let t=Ye.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
czm_non_depth_clamp_main();
#if defined(LOG_DEPTH)
czm_writeLogDepth();
#else
czm_writeDepthClamp();
#endif
}
`,t}function Nhe(e,t){let n=e.vertexAttributes}function fHe(e,t){return function(){return e[t]}}var HX=Math.max(dn.hardwareConcurrency-1,1),g6,dHe=new Jn("combineGeometry");function hHe(e,t){let n,i,r,o,s=e._instanceIds;if(e._state===is.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let a=e._numberOfInstances=n.length,c=[],u=[];for(r=0;r<a;++r)i=n[r].geometry,s.push(n[r].id),u.push({moduleName:i._workerName,modulePath:i._workerPath,geometry:i});if(!l(g6))for(g6=new Array(HX),r=0;r<HX;r++)g6[r]=new Jn("createGeometry");let f;for(u=nM(u,HX),r=0;r<u.length;r++){let d=0,p=u[r],g=p.length;for(o=0;o<g;++o)f=p[o],i=f.geometry,l(i.constructor.pack)&&(f.offset=d,d+=i.constructor.packedLength??i.packedLength);let m;if(d>0){let y=new Float64Array(d);for(m=[y.buffer],o=0;o<g;++o)f=p[o],i=f.geometry,l(i.constructor.pack)&&(i.constructor.pack(i,y,f.offset),f.geometry=y)}c.push(g6[r].scheduleTask({subTasks:u[r]},m))}e._state=is.CREATING,Promise.all(c).then(function(d){e._createGeometryResults=d,e._state=is.CREATED}).catch(function(d){sM(e,t,is.FAILED,d)})}else if(e._state===is.CREATED){let a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let c=t.scene3DOnly,u=t.mapProjection,f=dHe.scheduleTask(Tx.packCombineGeometryParameters({createGeometryResults:e._createGeometryResults,instances:n,ellipsoid:u.ellipsoid,projection:u,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:c,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets},a),a);e._createGeometryResults=void 0,e._state=is.COMBINING,Promise.resolve(f).then(function(d){let p=Tx.unpackCombineGeometryResults(d);e._geometries=p.geometries,e._attributeLocations=p.attributeLocations,e.modelMatrix=N.clone(p.modelMatrix,e.modelMatrix),e._pickOffsets=p.pickOffsets,e._offsetInstanceExtend=p.offsetInstanceExtend,e._instanceBoundingSpheres=p.boundingSpheres,e._instanceBoundingSpheresCV=p.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=is.COMBINED):sM(e,t,is.FAILED,void 0)}).catch(function(d){sM(e,t,is.FAILED,d)})}}function mHe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,r=new Array(i),o=e._instanceIds,s,a,c=0;for(a=0;a<i;a++){s=n[a];let p=s.geometry,g;l(p.attributes)&&l(p.primitiveType)?g=sHe(p):g=p.constructor.createGeometry(p),r[c++]=aHe(s,g),o.push(s.id)}r.length=c;let u=t.scene3DOnly,f=t.mapProjection,d=Tx.combineGeometry({instances:r,ellipsoid:f.ellipsoid,projection:f,elementIndexUintSupported:t.context.elementIndexUint,scene3DOnly:u,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e._createPickOffsets});e._geometries=d.geometries,e._attributeLocations=d.attributeLocations,e.modelMatrix=N.clone(d.modelMatrix,e.modelMatrix),e._pickOffsets=d.pickOffsets,e._offsetInstanceExtend=d.offsetInstanceExtend,e._instanceBoundingSpheres=d.boundingSpheres,e._instanceBoundingSpheresCV=d.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=is.COMBINED):sM(e,t,is.FAILED,void 0)}function pHe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,r=e._offsetInstanceExtend,o=e._instanceBoundingSpheres,s=o.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i<s;i++)a[i]=new ue;e._tempBoundingSpheres=a}for(i=0;i<s;++i){let y=a[i],A=e._batchTable.getBatchedAttribute(i,n,new h);y=o[i].clone(y),Ghe(y,A,r[i])}let c=[],u=[],f=[];for(i=0;i<s;++i){let y=a[i];y.center.x-y.radius>0||ue.intersectPlane(y,sn.ORIGIN_ZX_PLANE)!==$t.INTERSECTING?c.push(y):(u.push(y),f.push(y))}let d=c[0],p=f[0],g=u[0];for(i=1;i<c.length;i++)d=ue.union(d,c[i]);for(i=1;i<f.length;i++)p=ue.union(p,f[i]);for(i=1;i<u.length;i++)g=ue.union(g,u[i]);let m=[];for(l(d)&&m.push(d),l(p)&&m.push(p),l(g)&&m.push(g),i=0;i<m.length;i++){let y=m[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=y,e._boundingSphereCV[i]=ue.projectTo2D(y,t.mapProjection,e._boundingSphereCV[i])}rs._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}var Lhe=new Sn,Vhe=new he,jhe=new h,Hhe=new ue;function gHe(e,t){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;let i=e._batchTableBoundingSphereAttributeIndices,r=i.center3DHigh,o=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,c=i.radius,u=t.mapProjection,f=u.ellipsoid,d=e._batchTable,p=e._instanceBoundingSpheres,g=p.length;for(let m=0;m<g;++m){let y=p[m];if(!l(y))continue;let A=e.modelMatrix;l(A)&&(y=ue.transform(y,A,Hhe));let b=y.center,x=y.radius,T=Sn.fromCartesian(b,Lhe);if(d.setBatchedAttribute(m,r,T.high),d.setBatchedAttribute(m,o,T.low),!t.scene3DOnly){let E=f.cartesianToCartographic(b,Vhe),v=u.project(E,jhe);T=Sn.fromCartesian(v,Lhe),d.setBatchedAttribute(m,s,T.high),d.setBatchedAttribute(m,a,T.low)}d.setBatchedAttribute(m,c,x)}e._batchTableBoundingSpheresUpdated=!0}var GX=new h,_He=new h;function Fhe(e,t){if(!l(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;let i=e._batchTableOffsetAttribute2DIndex,r=t.mapProjection,o=r.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,c=a.length;for(let u=0;u<c;++u){let f=a[u];if(!l(f))continue;let d=s.getBatchedAttribute(u,e._batchTableAttributeIndices.offset);if(h.equals(d,h.ZERO)){s.setBatchedAttribute(u,i,h.ZERO);continue}let p=e.modelMatrix;l(p)&&(f=ue.transform(f,p,Hhe));let g=f.center;g=o.scaleToGeodeticSurface(g,_He);let m=o.cartesianToCartographic(g,Vhe),y=r.project(m,jhe),A=h.add(d,g,GX);m=o.cartesianToCartographic(A,m);let b=r.project(m,GX),x=h.subtract(b,y,GX),T=x.x;x.x=x.z,x.z=x.y,x.y=T,s.setBatchedAttribute(u,i,x)}e._batchTableOffsetsUpdated=!0}function yHe(e,t){let n=e._attributeLocations,i=e._geometries,r=t.scene3DOnly,o=t.context,s=[],a=i.length;for(let c=0;c<a;++c){let u=i[c];if(s.push(zn.fromGeometry({context:o,geometry:u,attributeLocations:n,bufferUsage:Me.STATIC_DRAW,interleave:e._interleave})),l(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,u);else if(e._boundingSpheres.push(ue.clone(u.boundingSphere)),e._boundingSphereWC.push(new ue),!r){let f=u.boundingSphereCV.center,d=f.x,p=f.y,g=f.z;f.x=g,f.y=d,f.z=p,e._boundingSphereCV.push(ue.clone(u.boundingSphereCV)),e._boundingSphere2D.push(new ue),e._boundingSphereMorph.push(new ue)}}e._va=s,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,sM(e,t,is.COMPLETE,void 0)}function AHe(e,t,n,i){let r=n.getRenderState(),o;i?(o=Je(r,!1),o.cull={enabled:!0,face:Vi.BACK},e._frontFaceRS=Ge.fromCache(o),o.cull.face=Vi.FRONT,e._backFaceRS=Ge.fromCache(o)):(e._frontFaceRS=Ge.fromCache(r),e._backFaceRS=e._frontFaceRS),o=Je(r,!1),l(e._depthFailAppearance)&&(o.depthTest.enabled=!1),l(e._depthFailAppearance)&&(r=e._depthFailAppearance.getRenderState(),o=Je(r,!1),o.depthTest.func=ac.GREATER,i?(o.cull={enabled:!0,face:Vi.BACK},e._frontFaceDepthFailRS=Ge.fromCache(o),o.cull.face=Vi.FRONT,e._backFaceDepthFailRS=Ge.fromCache(o)):(e._frontFaceDepthFailRS=Ge.fromCache(o),e._backFaceDepthFailRS=e._frontFaceRS))}function bHe(e,t,n){let i=t.context,r=e._attributeLocations,o=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);o=rs._appendOffsetToShader(e,o),o=rs._appendShowToShader(e,o),o=rs._appendDistanceDisplayConditionToShader(e,o,t.scene3DOnly),o=Rhe(o),o=rs._updateColorAttribute(e,o,!1),o=Mhe(e,o),o=rs._modifyShaderPosition(e,o,t.scene3DOnly);let s=n.getFragmentShaderSource();s=Ohe(s),e._sp=en.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:r}),Nhe(e._sp,r),l(e._depthFailAppearance)&&(o=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),o=rs._appendShowToShader(e,o),o=rs._appendDistanceDisplayConditionToShader(e,o,t.scene3DOnly),o=Rhe(o),o=rs._updateColorAttribute(e,o,!0),o=Mhe(e,o),o=rs._modifyShaderPosition(e,o,t.scene3DOnly),o=lHe(o),s=e._depthFailAppearance.getFragmentShaderSource(),s=Ohe(s),s=uHe(s),e._spDepthFail=en.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:r}),Nhe(e._spDepthFail,r))}var oM=new N,Bhe=new h;function khe(e,t,n,i){let r=l(n)?n._uniforms:void 0,o={},s=t.uniforms;if(l(s))for(let c in s)s.hasOwnProperty(c)&&(o[c]=fHe(s,c));let a=Ot(o,r);return a=e._batchTable.getUniformMapCallback()(a),l(e.rtcCenter)&&(a.u_modifiedModelView=function(){let c=i.context.uniformState.view;return N.multiply(c,e._modelMatrix,oM),N.multiplyByPoint(oM,e.rtcCenter,Bhe),N.setTranslation(oM,Bhe,oM),oM}),a}function xHe(e,t,n,i,r,o,s,a){let c=khe(e,t,n,a),u;l(e._depthFailAppearance)&&(u=khe(e,e._depthFailAppearance,e._depthFailAppearance.material,a));let f=i?Ie.TRANSLUCENT:Ie.OPAQUE,d=r?2:1;d*=l(e._depthFailAppearance)?2:1,o.length=e._va.length*d;let p=o.length,g=0;for(let m=0;m<p;++m){let y;r&&(y=o[m],l(y)||(y=o[m]=new at({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[g],y.renderState=e._backFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=f,++m),y=o[m],l(y)||(y=o[m]=new at({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[g],y.renderState=e._frontFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=f,l(e._depthFailAppearance)&&(r&&(++m,y=o[m],l(y)||(y=o[m]=new at({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[g],y.renderState=e._backFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=u,y.pass=f),++m,y=o[m],l(y)||(y=o[m]=new at({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[g],y.renderState=e._frontFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=u,y.pass=f),++g}}rs._updateBoundingVolumes=function(e,t,n,i){let r,o,s;if(i||!N.equals(n,e._modelMatrix))for(N.clone(n,e._modelMatrix),o=e._boundingSpheres.length,r=0;r<o;++r)s=e._boundingSpheres[r],l(s)&&(e._boundingSphereWC[r]=ue.transform(s,n,e._boundingSphereWC[r]),t.scene3DOnly||(e._boundingSphere2D[r]=ue.clone(e._boundingSphereCV[r],e._boundingSphere2D[r]),e._boundingSphereMorph[r]=ue.union(e._boundingSphereWC[r],e._boundingSphereCV[r])));let a=e.appearance.pixelSize;if(l(a))for(o=e._boundingSpheres.length,r=0;r<o;++r){s=e._boundingSpheres[r];let c=e._boundingSphereWC[r],f=t.camera.getPixelSize(s,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*a;c.radius=s.radius+f}};function THe(e,t,n,i,r,o,s,a){rs._updateBoundingVolumes(e,t,r);let c;t.mode===re.SCENE3D?c=e._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=e._boundingSphereCV:t.mode===re.SCENE2D&&l(e._boundingSphere2D)?c=e._boundingSphere2D:l(e._boundingSphereMorph)&&(c=e._boundingSphereMorph);let u=t.commandList,f=t.passes;if(f.render||f.pick){let d=e.allowPicking,p=Dn.castShadows(e.shadows),g=Dn.receiveShadows(e.shadows),m=n.length,y=a?2:1;y*=l(e._depthFailAppearance)?2:1;for(let A=0;A<m;++A){let b=Math.floor(A/y),x=n[A];x.modelMatrix=r,x.boundingVolume=c[b],x.cull=o,x.debugShowBoundingVolume=s,x.castShadows=p,x.receiveShadows=g,d?x.pickId="v_pickColor":x.pickId=void 0,u.push(x)}}}rs.prototype.update=function(e){if(!l(this.geometryInstances)&&this._va.length===0||l(this.geometryInstances)&&Array.isArray(this.geometryInstances)&&this.geometryInstances.length===0||!l(this.appearance)||e.mode!==re.SCENE3D&&e.scene3DOnly||!e.passes.render&&!e.passes.pick)return;if(l(this._error))throw this._error;if(this._state===is.FAILED)return;let t=e.context;if(l(this._batchTable)||rHe(this,t),this._batchTable.attributes.length>0){if(Ut.maximumVertexTextureImageUnits===0)throw new oe("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==is.COMPLETE&&this._state!==is.COMBINED&&(this.asynchronous?hHe(this,e):mHe(this,e)),this._state===is.COMBINED&&(gHe(this,e),Fhe(this,e),yHe(this,e)),!this.show||this._state!==is.COMPLETE)return;this._batchTableOffsetsUpdated||Fhe(this,e),this._recomputeBoundingSpheres&&pHe(this,e);let n=this.appearance,i=n.material,r=!1,o=!1;this._appearance!==n?(this._appearance=n,this._material=i,r=!0,o=!0):this._material!==i&&(this._material=i,o=!0);let s=this.depthFailAppearance,a=l(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,r=!0,o=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,o=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,r=!0),l(this._material)&&this._material.update(t);let u=n.closed&&c;r&&(this._createRenderStatesFunction??AHe)(this,t,n,u),o&&(this._createShaderProgramFunction??bHe)(this,e,n),(r||o)&&(this._createCommandsFunction??xHe)(this,n,i,c,u,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??THe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)};var EHe=new ue,CHe=new ue;function Ghe(e,t,n){if(n===mn.TOP){let i=ue.clone(e,EHe),r=ue.clone(e,CHe);r.center=h.add(r.center,t,r.center),e=ue.union(i,r,e)}else n===mn.ALL&&(e.center=h.add(e.center,t,e.center));return e}function vHe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),r=e.attributes[n],o=r.componentsPerAttribute,s=Y.createTypedArray(r.componentDatatype,o);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function SHe(e,t,n,i,r){return function(o){let s=zhe(o);e.setBatchedAttribute(t,n,s),r==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var wHe=new h;function IHe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let r=e.modelMatrix,o=t.offset;l(o)&&Ghe(i,h.fromArray(o.get(),0,wHe),e._offsetInstanceExtend[n]),l(r)&&(i=ue.transform(i,r))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function PHe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}rs.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,r=this._instanceIds,o=r.length;for(let u=0;u<o;++u){let f=(i+u)%o;if(e===r[f]){n=f;break}}if(n===-1)return;let s=this._batchTable,a=this._batchTableAttributeIndices;t={};let c={};for(let u in a)if(a.hasOwnProperty(u)){let f=a[u];c[u]={get:vHe(s,n,f),set:SHe(s,n,f,this,u)}}return IHe(this,c,n),PHe(this,c,n),Object.defineProperties(t,c),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t};rs.prototype.isDestroyed=function(){return!1};rs.prototype.destroy=function(){let e,t;this._sp=this._sp&&this._sp.destroy(),this._spDepthFail=this._spDepthFail&&this._spDepthFail.destroy();let n=this._va;for(e=n.length,t=0;t<e;++t)n[t].destroy();this._va=void 0;let i=this._pickIds;for(e=i.length,t=0;t<e;++t)i[t].destroy();return this._pickIds=void 0,this._batchTable=this._batchTable&&this._batchTable.destroy(),this._instanceIds=void 0,this._perInstanceAttributeCache=void 0,this._attributeLocations=void 0,le(this)};function sM(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){return e._ready=e._state===is.COMPLETE||e._state===is.FAILED,!0})}var On=rs;function DHe(e){e=e??H.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.value=e.value}var Qc=DHe;var Sv=`#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
in vec4 v_sphericalExtents;
#else // SPHERICAL
in vec2 v_inversePlaneExtents;
in vec4 v_westPlane;
in vec4 v_southPlane;
#endif // SPHERICAL
in vec3 v_uvMinAndSphericalLongitudeRotation;
in vec3 v_uMaxAndInverseDistance;
in vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif
#ifdef NORMAL_EC
vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
return eyeCoordinate.xyz / eyeCoordinate.w;
}
vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
vec2 glFragCoordXY = gl_FragCoord.xy;
float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
float useDownOrLeft = float(useUpOrRight == 0.0);
vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
}
#endif // NORMAL_EC
void main(void)
{
#ifdef REQUIRES_EC
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
#endif
#ifdef REQUIRES_WC
vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
#endif
#ifdef TEXTURE_COORDINATES
vec2 uv;
#ifdef SPHERICAL
vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
#else // SPHERICAL
uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
#endif // SPHERICAL
#endif // TEXTURE_COORDINATES
#ifdef CULL_FRAGMENTS
if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
discard;
}
#endif
#ifdef PICK
out_FragColor.a = 1.0;
#ifdef CULL_FRAGMENTS
czm_writeDepthClamp();
#endif // CULL_FRAGMENTS
#else // PICK
#ifdef NORMAL_EC
vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
vec3 normalEC = normalize(cross(leftRight, downUp));
#endif
#ifdef PER_INSTANCE_COLOR
vec4 color = czm_gammaCorrect(v_color);
#ifdef FLAT
out_FragColor = color;
#else // FLAT
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = -eyeCoordinate.xyz;
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = color.rgb;
material.alpha = color.a;
out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT
out_FragColor.rgb *= out_FragColor.a;
#else // PER_INSTANCE_COLOR
czm_materialInput materialInput;
#ifdef USES_NORMAL_EC
materialInput.normalEC = normalEC;
#endif
#ifdef USES_POSITION_TO_EYE_EC
materialInput.positionToEyeEC = -eyeCoordinate.xyz;
#endif
#ifdef USES_TANGENT_TO_EYE
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
#endif
#ifdef USES_ST
materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
#endif
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else // FLAT
out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT
out_FragColor.rgb *= out_FragColor.a;
#endif // PER_INSTANCE_COLOR
czm_writeDepthClamp();
#endif // PICK
}
`;function Rd(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new WX;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let r=new WX;if(r.requiresTextureCoordinates=e,n instanceof yn)i.requiresNormalEC=!n.flat;else{let o=`${n.material.shaderSource}
${n.fragmentShaderSource}`;i.normalEC=o.indexOf("materialInput.normalEC")!==-1||o.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=o.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=o.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=o.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=r,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}Rd.prototype.createFragmentShader=function(e){let t=this._appearance,n=this._colorShaderDependencies,i=[];!e&&!this._planarExtents&&i.push("SPHERICAL"),n.requiresEC&&i.push("REQUIRES_EC"),n.requiresWC&&i.push("REQUIRES_WC"),n.requiresTextureCoordinates&&i.push("TEXTURE_COORDINATES"),this._extentsCulling&&i.push("CULL_FRAGMENTS"),n.requiresNormalEC&&i.push("NORMAL_EC"),t instanceof yn&&i.push("PER_INSTANCE_COLOR"),n.normalEC&&i.push("USES_NORMAL_EC"),n.positionToEyeEC&&i.push("USES_POSITION_TO_EYE_EC"),n.tangentToEyeMatrix&&i.push("USES_TANGENT_TO_EYE"),n.st&&i.push("USES_ST"),t.flat&&i.push("FLAT");let r="";return t instanceof yn||(r=t.material.shaderSource),new Ye({defines:i,sources:[r,Sv]})};Rd.prototype.createPickFragmentShader=function(e){let t=this._pickShaderDependencies,n=["PICK"];return!e&&!this._planarExtents&&n.push("SPHERICAL"),t.requiresEC&&n.push("REQUIRES_EC"),t.requiresWC&&n.push("REQUIRES_WC"),t.requiresTextureCoordinates&&n.push("TEXTURE_COORDINATES"),this._extentsCulling&&n.push("CULL_FRAGMENTS"),new Ye({defines:n,sources:[Sv],pickColorQualifier:"in"})};Rd.prototype.createVertexShader=function(e,t,n,i){return Zhe(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};Rd.prototype.createPickVertexShader=function(e,t,n,i){return Zhe(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var Whe=new h,qhe=new he,Yhe={high:0,low:0};function Zhe(e,t,n,i,r,o,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let u=qhe;u.longitude=D.PI,u.latitude=0,u.height=0;let f=s.project(u,Whe),d=Sn.encode(f.x,Yhe);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${d.high.toFixed(`${d.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${d.low.toFixed(`${d.low}`.length+1)}`;let p=qhe;p.longitude=-D.PI,p.latitude=0,p.height=0;let g=s.project(p,Whe);d=Sn.encode(g.x,Yhe),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${d.high.toFixed(`${d.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${d.low.toFixed(`${d.low}`.length+1)}`}return n&&(c.push(a.eastMostYhighDefine),c.push(a.eastMostYlowDefine),c.push(a.westMostYhighDefine),c.push(a.westMostYlowDefine)),l(o)&&o instanceof yn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new Ye({defines:c,sources:[r]})}function WX(){this._requiresEC=!1,this._requiresWC=!1,this._requiresNormalEC=!1,this._requiresTextureCoordinates=!1,this._usesNormalEC=!1,this._usesPositionToEyeEC=!1,this._usesTangentToEyeMat=!1,this._usesSt=!1}Object.defineProperties(WX.prototype,{requiresEC:{get:function(){return this._requiresEC},set:function(e){this._requiresEC=e||this._requiresEC}},requiresWC:{get:function(){return this._requiresWC},set:function(e){this._requiresWC=e||this._requiresWC,this.requiresEC=this._requiresWC}},requiresNormalEC:{get:function(){return this._requiresNormalEC},set:function(e){this._requiresNormalEC=e||this._requiresNormalEC,this.requiresEC=this._requiresNormalEC}},requiresTextureCoordinates:{get:function(){return this._requiresTextureCoordinates},set:function(e){this._requiresTextureCoordinates=e||this._requiresTextureCoordinates,this.requiresWC=this._requiresTextureCoordinates}},normalEC:{set:function(e){this.requiresNormalEC=e,this._usesNormalEC=e},get:function(){return this._usesNormalEC}},tangentToEyeMatrix:{set:function(e){this.requiresWC=e,this.requiresNormalEC=e,this._usesTangentToEyeMat=e},get:function(){return this._usesTangentToEyeMat}},positionToEyeEC:{set:function(e){this.requiresEC=e,this._usesPositionToEyeEC=e},get:function(){return this._usesPositionToEyeEC}},st:{set:function(e){this.requiresTextureCoordinates=e,this._usesSt=e},get:function(){return this._usesSt}}});function Xhe(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/U.distance(t,e)}var RHe=[new U,new U,new U,new U];function Qhe(e,t){let n=RHe,i=U.unpack(t,0,n[0]),r=U.unpack(t,2,n[1]),o=U.unpack(t,4,n[2]);e.uMaxVmax=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r.x,r.y,o.x,o.y]});let s=1/Xhe(i,r,o),a=1/Xhe(i,o,r);e.uvMinAndExtents=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var eme=new he,tme=new h,OHe=new h,MHe=new h,_6={high:0,low:0};function nme(e,t,n){let i=eme;i.height=0,i.longitude=e.west,i.latitude=e.south;let r=t.project(i,tme);i.latitude=e.north;let o=t.project(i,OHe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,MHe),a=[0,0,0,0],c=[0,0,0,0],u=Sn.encode(r.x,_6);a[0]=u.high,c[0]=u.low,u=Sn.encode(r.y,_6),a[1]=u.high,c[1]=u.low,u=Sn.encode(o.y,_6),a[2]=u.high,c[2]=u.low,u=Sn.encode(s.x,_6),a[3]=u.high,c[3]=u.low,n.planes2D_HIGH=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var NHe=new N,LHe=new N,Khe=new h,FHe=new he,BHe=[new he,new he,new he,new he,new he,new he,new he,new he];function kHe(e,t,n,i,r,o){let s=ie.center(e,FHe);s.height=n;let a=he.toCartesian(s,t,Khe),c=At.eastNorthUpToFixedFrame(a,t,NHe),u=N.inverse(c,LHe),f=e.west,d=e.east,p=e.north,g=e.south,m=BHe;m[0].latitude=g,m[0].longitude=f,m[1].latitude=p,m[1].longitude=f,m[2].latitude=p,m[2].longitude=d,m[3].latitude=g,m[3].longitude=d;let y=(f+d)*.5,A=(p+g)*.5;m[4].latitude=g,m[4].longitude=y,m[5].latitude=p,m[5].longitude=y,m[6].latitude=A,m[6].longitude=f,m[7].latitude=A,m[7].longitude=d;let b=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY;for(let R=0;R<8;R++){m[R].height=n;let O=he.toCartesian(m[R],t,Khe);N.multiplyByPoint(u,O,O),O.z=0,b=Math.min(b,O.x),x=Math.max(x,O.x),T=Math.min(T,O.y),E=Math.max(E,O.y)}let v=i;v.x=b,v.y=T,v.z=0,N.multiplyByPoint(c,v,v);let S=r;S.x=x,S.y=T,S.z=0,N.multiplyByPoint(c,S,S),h.subtract(S,v,r);let I=o;I.x=b,I.y=E,I.z=0,N.multiplyByPoint(c,I,I),h.subtract(I,v,o)}var UHe=new h,zHe=new h,VHe=new Sn;Rd.getPlanarTextureCoordinateAttributes=function(e,t,n,i,r){let o=tme,s=UHe,a=zHe;kHe(e,n,r??0,o,s,a);let c={};Qhe(c,t);let u=Sn.fromCartesian(o,VHe);return c.southWest_HIGH=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(u.high,[0,0,0])}),c.southWest_LOW=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(u.low,[0,0,0])}),c.eastward=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(s,[0,0,0])}),c.northward=new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:3,normalize:!1,value:h.pack(a,[0,0,0])}),nme(e,i,c),c};var jHe=new h;function $he(e,t,n,i){let r=eme;r.latitude=e,r.longitude=t,r.height=0;let o=he.toCartesian(r,n,jHe),s=Math.sqrt(o.x*o.x+o.y*o.y),a=D.fastApproximateAtan2(s,o.z),c=D.fastApproximateAtan2(o.x,o.y);return i.x=a,i.y=c,i}var Jhe=new U;Rd.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let r=$he(e.south,e.west,n,Jhe),o=r.x,s=r.y,a=$he(e.north,e.east,n,Jhe),c=a.x,u=a.y,f=0;s>u&&(f=D.PI-s,s=-D.PI,u+=f),o-=D.EPSILON5,s-=D.EPSILON5,c+=D.EPSILON5,u+=D.EPSILON5;let d=1/(u-s),p=1/(c-o),g={sphericalExtents:new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o,s,p,d]}),longitudeRotation:new Qc({componentDatatype:Y.FLOAT,componentsPerAttribute:1,normalize:!1,value:[f]})};return Qhe(g,t),nme(e,i,g),g};Rd.hasAttributesForTextureCoordinatePlanes=function(e){return l(e.southWest_HIGH)&&l(e.southWest_LOW)&&l(e.northward)&&l(e.eastward)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};Rd.hasAttributesForSphericalExtents=function(e){return l(e.sphericalExtents)&&l(e.longitudeRotation)&&l(e.planes2D_HIGH)&&l(e.planes2D_LOW)&&l(e.uMaxVmax)&&l(e.uvMinAndExtents)};function HHe(e){return Math.max(e.width,e.height)>Rd.MAX_WIDTH_FOR_PLANAR_EXTENTS}Rd.shouldUseSphericalCoordinates=function(e){return HHe(e)};Rd.MAX_WIDTH_FOR_PLANAR_EXTENTS=D.toRadians(1);var Sf=Rd;var ime={NEVER:te.NEVER,LESS:te.LESS,EQUAL:te.EQUAL,LESS_OR_EQUAL:te.LEQUAL,GREATER:te.GREATER,NOT_EQUAL:te.NOTEQUAL,GREATER_OR_EQUAL:te.GEQUAL,ALWAYS:te.ALWAYS};Object.freeze(ime);var ei=ime;var rme={ZERO:te.ZERO,KEEP:te.KEEP,REPLACE:te.REPLACE,INCREMENT:te.INCR,DECREMENT:te.DECR,INVERT:te.INVERT,INCREMENT_WRAP:te.INCR_WRAP,DECREMENT_WRAP:te.DECR_WRAP};Object.freeze(rme);var Rt=rme;var y6={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};y6.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:ei.ALWAYS,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.REPLACE},backFunction:ei.ALWAYS,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.REPLACE},reference:y6.CESIUM_3D_TILE_MASK,mask:y6.CESIUM_3D_TILE_MASK}};var Yt=Object.freeze(y6);function Ex(e){e=e??H.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??Qn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._debugShowShadowVolume=!1,this._extruded=e._extruded??!1,this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}Object.defineProperties(Ex.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}});Ex.isSupported=function(e){return e.context.stencilBuffer};function wv(e,t){let n=t?ei.EQUAL:ei.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:n,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL},depthMask:!1}}function YX(e){return{stencilTest:{enabled:e,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND}}var GHe={stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function WHe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let r=!e.debugShowShadowVolume;e._rsStencilDepthPass=Ge.fromCache(wv(r,!1)),e._rsStencilDepthPass3DTiles=Ge.fromCache(wv(r,!0)),e._rsColorPass=Ge.fromCache(YX(r,!1)),e._rsPickPass=Ge.fromCache(GHe)}function qHe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,r=`vec3 extrudeDirection;
`,o=` extrudeDirection = czm_octDecode(${n}, 65535.0);
`,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Ye.replaceMain(s,"czm_non_compressed_main");let a=`void main()
{
${o} czm_non_compressed_main();
}`;return[i,r,s,a].join(`
`)}}function YHe(e,t){let n=t.context,i=e._primitive,r=tM;r=e._primitive._batchTable.getVertexShaderCallback()(r),r=On._appendDistanceDisplayConditionToShader(i,r),r=On._modifyShaderPosition(e,r,t.scene3DOnly),r=On._updateColorAttribute(i,r);let o=e._hasPlanarExtentsAttributes,s=o||e._hasSphericalExtentsAttribute;e._extruded&&(r=qHe(i,r));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new Ye({defines:[a],sources:[r]}),u=new Ye({sources:[zy]}),f=e._primitive._attributeLocations,d=new Sf(s,o,e.appearance);if(e._spStencil=en.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f}),e._primitive.allowPicking){let m=Ye.createPickVertexShaderSource(r);m=On._appendShowToShader(i,m),m=On._updatePickColorAttribute(m);let y=d.createPickFragmentShader(!1),A=d.createPickVertexShader([a],m,!1,t.mapProjection);if(e._spPick=en.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:A,fragmentShaderSource:y,attributeLocations:f}),s){let b=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(b)){let x=d.createPickFragmentShader(!0),T=d.createPickVertexShader([a],m,!0,t.mapProjection);b=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:T,fragmentShaderSource:x,attributeLocations:f})}e._spPick2D=b}}else e._spPick=en.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});r=On._appendShowToShader(i,r),c=new Ye({defines:[a],sources:[r]}),e._sp=en.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});let p=d.createFragmentShader(!1),g=d.createVertexShader([a],r,!1,t.mapProjection);if(e._spColor=en.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:g,fragmentShaderSource:p,attributeLocations:f}),s){let m=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(m)){let y=d.createFragmentShader(!0),A=d.createVertexShader([a],r,!0,t.mapProjection);m=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:A,fragmentShaderSource:y,attributeLocations:f})}e._spColor2D=m}}function XHe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let r,o,s,a=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),u=e._needs2DShader;for(r=0;r<i;r+=2){let g=n._va[a++];o=t[r],l(o)||(o=t[r]=new at({owner:e,primitiveType:n._primitiveType})),o.vertexArray=g,o.renderState=e._rsStencilDepthPass,o.shaderProgram=e._sp,o.uniformMap=c,o.pass=Ie.TERRAIN_CLASSIFICATION,s=at.shallowClone(o,o.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,o.derivedCommands.tileset=s,o=t[r+1],l(o)||(o=t[r+1]=new at({owner:e,primitiveType:n._primitiveType})),o.vertexArray=g,o.renderState=e._rsColorPass,o.shaderProgram=e._spColor,o.pass=Ie.TERRAIN_CLASSIFICATION;let y=e.appearance.material;if(l(y)&&(c=Ot(c,y._uniforms)),o.uniformMap=c,s=at.shallowClone(o,o.derivedCommands.tileset),s.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,o.derivedCommands.tileset=s,u){let A=at.shallowClone(o,o.derivedCommands.appearance2D);A.shaderProgram=e._spColor2D,o.derivedCommands.appearance2D=A,A=at.shallowClone(s,s.derivedCommands.appearance2D),A.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=A}}let f=e._commandsIgnoreShow,d=e._spStencil,p=0;i=f.length=i/2;for(let g=0;g<i;++g){let m=f[g]=at.shallowClone(t[p],f[g]);m.shaderProgram=d,m.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function KHe(e,t){let n=e._usePickOffsets,i=e._primitive,r=i._va.length*2,o,s=0,a;n&&(o=i._pickOffsets,r=o.length*2),t.length=r;let c,u,f,d=0,p=i._batchTable.getUniformMapCallback()(e._uniformMap),g=e._needs2DShader;for(c=0;c<r;c+=2){let m=i._va[d++];if(n&&(a=o[s++],m=i._va[a.index]),u=t[c],l(u)||(u=t[c]=new at({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=m,u.renderState=e._rsStencilDepthPass,u.shaderProgram=e._sp,u.uniformMap=p,u.pass=Ie.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),f=at.shallowClone(u,u.derivedCommands.tileset),f.renderState=e._rsStencilDepthPass3DTiles,f.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,u=t[c+1],l(u)||(u=t[c+1]=new at({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),u.vertexArray=m,u.renderState=e._rsPickPass,u.shaderProgram=e._spPick,u.uniformMap=p,u.pass=Ie.TERRAIN_CLASSIFICATION,n&&(u.offset=a.offset,u.count=a.count),f=at.shallowClone(u,u.derivedCommands.tileset),f.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,u.derivedCommands.tileset=f,g){let y=at.shallowClone(u,u.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y,y=at.shallowClone(f,f.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,f.derivedCommands.pick2D=y}}}function $He(e,t,n,i,r,o,s){XHe(e,o),KHe(e,s)}function ome(e,t){return Math.floor(e%t/2)}function qX(e,t,n,i,r,o){e.modelMatrix=n,e.boundingVolume=r,e.cull=i,e.debugShowBoundingVolume=o,t.commandList.push(e)}function sme(e,t,n,i,r){e.modelMatrix=n,e.boundingVolume=r,e.cull=i,t.commandList.push(e)}function JHe(e,t,n,i,r,o,s,a){let c=e._primitive;On._updateBoundingVolumes(c,t,r);let u;t.mode===re.SCENE3D?u=c._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?u=c._boundingSphereCV:t.mode===re.SCENE2D&&l(c._boundingSphere2D)?u=c._boundingSphere2D:l(c._boundingSphereMorph)&&(u=c._boundingSphereMorph);let f=e.classificationType,d=f!==Qn.CESIUM_3D_TILE,p=f!==Qn.TERRAIN,g=t.passes,m,y,A;if(g.render){let b=n.length;for(m=0;m<b;++m)y=u[ome(m,b)],d&&(A=n[m],qX(A,t,r,o,y,s)),p&&(A=n[m].derivedCommands.tileset,qX(A,t,r,o,y,s));if(t.invertClassification){let x=e._commandsIgnoreShow,T=x.length;for(m=0;m<T;++m)y=u[m],A=x[m],qX(A,t,r,o,y,s)}}if(g.pick){let b=i.length,x=c._pickOffsets;for(m=0;m<b;++m){let T=x[ome(m,b)];y=u[T.index],d&&(A=i[m],sme(A,t,r,o,y)),p&&(A=i[m].derivedCommands.tileset,sme(A,t,r,o,y))}}}Ex.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;let t=this.appearance;l(t)&&l(t.material)&&t.material.update(e.context);let n=this,i=this._primitiveOptions;if(!l(this._primitive)){let r=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],o=r.length,s,a,c,u=!1,f=!0,d,p=!1,g=!1;for(o>0&&(c=r[0].attributes,p=Sf.hasAttributesForSphericalExtents(c),g=Sf.hasAttributesForTextureCoordinatePlanes(c),d=c.color),s=0;s<o;s++){a=r[s];let y=a.attributes.color;l(y)&&(u=!0),f=f&&l(y)&&Jt.equals(d,y)}if(!f&&!p&&!g)throw new pe("All GeometryInstances must have the same color attribute except via GroundPrimitives");u&&!l(t)&&(t=new yn({flat:!0}),this.appearance=t),this._usePickOffsets=!p&&!g,this._hasSphericalExtentsAttribute=p,this._hasPlanarExtentsAttributes=g,this._hasPerColorAttribute=u;let m=new Array(o);for(s=0;s<o;++s)a=r[s],m[s]=new Ft({geometry:a.geometry,attributes:a.attributes,modelMatrix:a.modelMatrix,id:a.id,pickPrimitive:this._pickPrimitive??n});i.appearance=t,i.geometryInstances=m,l(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(y,A){n._createBoundingVolumeFunction(y,A)}),i._createRenderStatesFunction=function(y,A,b,x){WHe(n,A)},i._createShaderProgramFunction=function(y,A,b){YHe(n,A)},i._createCommandsFunction=function(y,A,b,x,T,E,v){$He(n,void 0,void 0,!0,!1,E,v)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(y,A,b,x,T,E,v,S){n._updateAndQueueCommandsFunction(y,A,b,x,T,E,v,S)}:i._updateAndQueueCommandsFunction=function(y,A,b,x,T,E,v,S){JHe(n,A,b,x,T,E,v,S)},this._primitive=new On(i)}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=Ge.fromCache(wv(!1,!1)),this._rsStencilDepthPass3DTiles=Ge.fromCache(wv(!1,!0)),this._rsColorPass=Ge.fromCache(YX(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=Ge.fromCache(wv(!0,!1)),this._rsStencilDepthPass3DTiles=Ge.fromCache(wv(!0,!0)),this._rsColorPass=Ge.fromCache(YX(!0))),this._primitive.appearance!==t&&(this._primitive.appearance=t),this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Ex.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Ex.prototype.isDestroyed=function(){return!1};Ex.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,le(this)};var Iv=Ex;var ZHe={u_globeMinimumAltitude:function(){return 55e3}};function Nu(e){e=e??H.EMPTY_OBJECT;let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let r=Array.isArray(n)?n:[n],o=r.length;for(let s=0;s<o;s++){let a=r[s].attributes;if(l(a)&&l(a.color)){t=new yn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e.show??!0,this.classificationType=e.classificationType??Qn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowShadowVolume=e.debugShowShadowVolume??!1,this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=Mi._defaultMaxTerrainHeight,this._minTerrainHeight=Mi._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;let i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:e.vertexCacheOptimize??!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:e.compressVertices??!0,_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:ZHe}}Object.defineProperties(Nu.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}});Nu.isSupported=Iv.isSupported;function ame(e){return function(t,n){let i=n.maximumRadius,r=i/Math.cos(t*.5)-i;return e._maxHeight+r}}function cme(e){return function(t,n){return e._minHeight}}var QHe=new h,eGe=new h,tGe=new h,nGe=new he,iGe=new ie;function A6(e,t){let n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;let i=t.attributes.position3DHigh.values,r=t.attributes.position3DLow.values,o=i.length,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let d=0;d<o;d+=3){let p=h.unpack(i,d,QHe),g=h.unpack(r,d,eGe),m=h.add(p,g,tGe),y=n.cartesianToCartographic(m,nGe),A=y.latitude,b=y.longitude;s=Math.min(s,A),a=Math.min(a,b),c=Math.max(c,A),u=Math.max(u,b)}let f=iGe;return f.north=c,f.south=s,f.east=u,f.west=a,f}function rGe(e,t,n){let i=Mi.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function oGe(e,t,n){let i=t.mapProjection.ellipsoid,r=A6(t,n),o=Qt.fromRectangle(r,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(o),!t.scene3DOnly){let s=t.mapProjection,a=ue.fromRectangleWithHeights2D(r,s,e._maxHeight,e._minHeight);h.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}function XX(e,t){return Math.floor(e%t/2)}function KX(e,t,n,i,r,o,s){let a=e._primitive;n.mode!==re.SCENE3D&&t.shaderProgram===a._spColor&&a._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=s,n.commandList.push(t)}function lme(e,t,n,i,r,o){let s=e._primitive;n.mode!==re.SCENE3D&&t.shaderProgram===s._spPick&&s._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=o,t.cull=r,n.commandList.push(t)}function sGe(e,t,n,i,r,o,s,a){let c;t.mode===re.SCENE3D?c=e._boundingVolumes:c=e._boundingVolumes2D;let u=e.classificationType,f=u!==Qn.CESIUM_3D_TILE,d=u!==Qn.TERRAIN,p=t.passes,g=e._primitive,m,y,A;if(p.render){let b=n.length;for(m=0;m<b;++m)y=c[XX(m,b)],f&&(A=n[m],KX(e,A,t,r,o,y,s)),d&&(A=n[m].derivedCommands.tileset,KX(e,A,t,r,o,y,s));if(t.invertClassification){let x=g._commandsIgnoreShow,T=x.length;for(m=0;m<T;++m)y=c[m],A=x[m],KX(e,A,t,r,o,y,s)}}if(p.pick){let b=i.length,x;for(e._useFragmentCulling||(x=g._primitive._pickOffsets),m=0;m<b;++m){if(y=c[XX(m,b)],!e._useFragmentCulling){let T=x[XX(m,b)];y=c[T.index]}f&&(A=i[m],lme(e,A,t,r,o,y)),d&&(A=i[m].derivedCommands.tileset,lme(e,A,t,r,o,y))}}}Nu.initializeTerrainHeights=function(){return Mi.initialize()};Nu.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Mi.initialized){Nu.initializeTerrainHeights();return}let t=this,n=this._classificationPrimitiveOptions;if(!l(this._primitive)){let i=e.mapProjection.ellipsoid,r,o,s,a=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=a.length,u=new Array(c),f,d;for(f=0;f<c;++f){r=a[f],o=r.geometry;let y=A6(e,o);l(d)?l(y)&&ie.union(d,y,d):d=ie.clone(y);let A=r.id;if(l(A)&&l(y)){let b=Mi.getBoundingSphere(y,i);this._boundingSpheresKeys.push(A),this._boundingSpheres.push(b)}s=o.constructor,!l(s)||l(s.createShadowVolume)}rGe(this,d,i);let p=e.verticalExaggeration,g=e.verticalExaggerationRelativeHeight;this._minHeight=Ar.getHeight(this._minTerrainHeight,p,g),this._maxHeight=Ar.getHeight(this._maxTerrainHeight,p,g);let m=Nu._supportsMaterials(e.context);if(this._useFragmentCulling=m,m){let y,A=!0;for(f=0;f<c;++f)if(r=a[f],o=r.geometry,d=A6(e,o),Sf.shouldUseSphericalCoordinates(d)){A=!1;break}for(f=0;f<c;++f){r=a[f],o=r.geometry,s=o.constructor;let b=A6(e,o),x=o.textureCoordinateRotationPoints;A?y=Sf.getPlanarTextureCoordinateAttributes(b,x,i,e.mapProjection,this._maxHeight):y=Sf.getSphericalExtentGeometryInstanceAttributes(b,x,i,e.mapProjection);let T=r.attributes;for(let E in T)T.hasOwnProperty(E)&&(y[E]=T[E]);u[f]=new Ft({geometry:s.createShadowVolume(o,cme(this),ame(this)),attributes:y,id:r.id})}}else for(f=0;f<c;++f)r=a[f],o=r.geometry,s=o.constructor,u[f]=new Ft({geometry:s.createShadowVolume(o,cme(this),ame(this)),attributes:r.attributes,id:r.id});n.geometryInstances=u,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,A){oGe(t,y,A)},n._updateAndQueueCommandsFunction=function(y,A,b,x,T,E,v,S){sGe(t,A,b,x,T,E,v,S)},this._primitive=new Iv(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};Nu.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};Nu.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};Nu.prototype.isDestroyed=function(){return!1};Nu.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),le(this)};Nu._supportsMaterials=function(e){return e.depthTexture};Nu.supportsMaterials=function(e){return Nu._supportsMaterials(e.frameState.context)};var Vl=Nu;function Pv(){pe.throwInstantiationError()}Object.defineProperties(Pv.prototype,{isConstant:{get:pe.throwInstantiationError},definitionChanged:{get:pe.throwInstantiationError}});Pv.prototype.getType=pe.throwInstantiationError;Pv.prototype.getValue=pe.throwInstantiationError;Pv.prototype.equals=pe.throwInstantiationError;var aGe=new K;Pv.getValue=function(e,t,n){let i;return l(e)||(e=K.now(aGe)),l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=Qi.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==Qi.ColorType)&&(n=Qi.fromType(Qi.ColorType)),z.clone(z.WHITE,n.uniforms.color),n)};var _o=Pv;function Cx(e,t,n){this._primitives=t,this._orderedGroundPrimitives=n,this._primitive=void 0,this._outlinePrimitive=void 0,this._geometryUpdater=e,this._options=e._options,this._entity=e._entity,this._material=void 0}Cx.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!X.getValueOrDefault(t.show,n,!0)};Cx.prototype._setOptions=pe.throwInstantiationError;Cx.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,r=this._orderedGroundPrimitives;n?r.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let o=this._entity,s=o[this._geometryUpdater._geometryPropertyName];if(this._setOptions(o,s,e),this._isHidden(o,s,e))return;let a=this._geometryUpdater.shadowsProperty.getValue(e),c=this._options;if(!l(s.fill)||s.fill.getValue(e)){let u=t.fillMaterialProperty,f=u instanceof Kt,d,p=t._getIsClosed(c);if(f)d=new yn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let g=_o.getValue(e,u,this._material);this._material=g,d=new Er({material:g,translucent:g.isTranslucent(),closed:p})}if(n)c.vertexFormat=yn.VERTEX_FORMAT,this._primitive=r.add(new Vl({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:d,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),X.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=d.vertexFormat;let g=this._geometryUpdater.createFillGeometryInstance(e);f&&(d.translucent=g.attributes.color.value[3]!==255),this._primitive=i.add(new On({geometryInstances:g,appearance:d,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let u=this._geometryUpdater.createOutlineGeometryInstance(e),f=X.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new On({geometryInstances:u,appearance:new yn({flat:!0,translucent:u.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(f)}}),asynchronous:!1,shadows:a}))}};Cx.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,r;return l(n)&&n.show&&n.ready&&(r=n.getGeometryInstanceAttributes(t),l(r)&&l(r.boundingSphere))?(ue.clone(r.boundingSphere,e),Pt.DONE):l(i)&&i.show&&i.ready&&(r=i.getGeometryInstanceAttributes(t),l(r)&&l(r.boundingSphere))?(ue.clone(r.boundingSphere,e),Pt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?Pt.PENDING:Pt.FAILED};Cx.prototype.isDestroyed=function(){return!1};Cx.prototype.destroy=function(){let e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),le(this)};var Ii=Cx;var ume={};function aM(e,t){l(ume[e])||(ume[e]=!0,console.warn(t??e))}aM.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";aM.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";aM.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";aM.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var _t=aM;var fme={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3};Object.freeze(fme);var gg=fme;var dme={NONE:0,GEODESIC:1,RHUMB:2};Object.freeze(dme);var ln=dme;var hme=D.EPSILON10;function cGe(e,t,n,i){if(!l(e))return;n=n??!1;let r=l(i),o=e.length;if(o<2)return e;let s,a=e[0],c,u,f=0,d=-1;for(s=1;s<o;++s)c=e[s],t(a,c,hme)?(l(u)||(u=e.slice(0,s),f=s-1,d=0),r&&i.push(s)):(l(u)&&(u.push(c),f=s,r&&(d=i.length)),a=c);return n&&t(e[0],e[o-1],hme)&&(r&&(l(u)?i.splice(d,0,f):i.push(o-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var Fr=cGe;function lGe(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,r=(n-i)/n,o=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-r)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),u=c*a,f=Math.atan2(a,o),d=c*s,p=d*d,g=1-p,m=Math.sqrt(g),y=t/4,A=y*y,b=A*y,x=A*A,T=1+y-3*A/4+5*b/4-175*x/64,E=1-y+15*A/8-35*b/8,v=1-3*y+35*A/4,S=1-5*y,I=T*f-E*Math.sin(2*f)*y/2-v*Math.sin(4*f)*A/16-S*Math.sin(6*f)*b/48-Math.sin(8*f)*5*x/512,R=e._constants;R.a=n,R.b=i,R.f=r,R.cosineHeading=o,R.sineHeading=s,R.tanU=a,R.cosineU=c,R.sineU=u,R.sigma=f,R.sineAlpha=d,R.sineSquaredAlpha=p,R.cosineSquaredAlpha=g,R.cosineAlpha=m,R.u2Over4=y,R.u4Over16=A,R.u6Over64=b,R.u8Over256=x,R.a0=T,R.a1=E,R.a2=v,R.a3=S,R.distanceRatio=I}function uGe(e,t){return e*t*(4+e*(4-3*t))/16}function mme(e,t,n,i,r,o,s){let a=uGe(e,n);return(1-a)*e*t*(i+a*r*(s+a*o*(2*s*s-1)))}function fGe(e,t,n,i,r,o,s){let a=(t-n)/t,c=o-i,u=Math.atan((1-a)*Math.tan(r)),f=Math.atan((1-a)*Math.tan(s)),d=Math.cos(u),p=Math.sin(u),g=Math.cos(f),m=Math.sin(f),y=d*g,A=d*m,b=p*m,x=p*g,T=c,E,v,S,I,R,O,L,_;do{v=Math.cos(T),S=Math.sin(T);let k=A-x*v;O=Math.sqrt(g*g*S*S+k*k),R=b+y*v,I=Math.atan2(O,R);let G;O===0?(G=0,L=1):(G=y*S/O,L=1-G*G),E=T,_=R-2*b/L,isFinite(_)||(_=0),T=c+mme(a,G,L,I,O,R,_)}while(Math.abs(T-E)>D.EPSILON12);let C=L*(t*t-n*n)/(n*n),w=1+C*(4096+C*(C*(320-175*C)-768))/16384,P=C*(256+C*(C*(74-47*C)-128))/1024,M=_*_,F=P*O*(_+P*(R*(2*M-1)-P*_*(4*O*O-3)*(4*M-3)/6)/4),V=n*w*(I-F),B=Math.atan2(g*S,A-x*v),j=Math.atan2(d*S,A*v-x);e._distance=V,e._startHeading=B,e._endHeading=j,e._uSquared=C}var dGe=new h,$X=new h;function pme(e,t,n,i){let r=h.normalize(i.cartographicToCartesian(t,$X),dGe),o=h.normalize(i.cartographicToCartesian(n,$X),$X);fGe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=he.clone(t,e._start),e._end=he.clone(n,e._end),e._start.height=0,e._end.height=0,lGe(e)}function cM(e,t,n){let i=n??ee.default;this._ellipsoid=i,this._start=new he,this._end=new he,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&pme(this,e,t,i)}Object.defineProperties(cM.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});cM.prototype.setEndPoints=function(e,t){pme(this,e,t,this._ellipsoid)};cM.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};cM.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,r=Math.cos(2*i),o=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,g=n.u8Over256,m=n.u2Over4,y=n.u6Over64,A=n.u4Over16,b=2*p*g*r/3+i*(1-m+7*A/4-15*y/4+579*g/64-(A-15*y/4+187*g/16)*r-(5*y/4-115*g/16)*o-29*g*s/16)+(m/2-A+71*y/32-85*g/16)*a+(5*A/16-5*y/4+383*g/96)*c-d*((y-11*g/2)*a+5*g*c/2)+(29*y/96-29*g/16)*u+539*g*f/1536,x=Math.asin(Math.sin(b)*n.cosineAlpha),T=Math.atan(n.a/n.b*Math.tan(x));b=b-n.sigma;let E=Math.cos(2*n.sigma+b),v=Math.sin(b),S=Math.cos(b),I=n.cosineU*S,R=n.sineU*v,L=Math.atan2(v*n.sineHeading,I-R*n.cosineHeading)-mme(n.f,n.sineAlpha,n.cosineSquaredAlpha,b,v,S,E);return l(t)?(t.longitude=this._start.longitude+L,t.latitude=T,t.height=0,t):new he(this._start.longitude+L,T,0)};var _g=cM;function ZX(e,t,n){if(e===0)return t*n;let i=e*e,r=i*i,o=r*i,s=o*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),g=Math.sin(8*u),m=Math.sin(10*u),y=Math.sin(12*u);return t*((1-i/4-3*r/64-5*o/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*r/32+45*o/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*r/256+45*o/1024+525*s/16384+1575*a/65536+155925*c/8388608)*d-(35*o/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*g-(693*a/1310720+6237*c/5242880)*m+1001*c/8388608*y)}function hGe(e,t,n){let i=e/n;if(t===0)return i;let r=i*i,o=r*i,s=o*i,a=t,c=a*a,u=c*c,f=u*c,d=f*c,p=d*c,g=p*c,m=Math.sin(2*i),y=Math.cos(2*i),A=Math.sin(4*i),b=Math.cos(4*i),x=Math.sin(6*i),T=Math.cos(6*i),E=Math.sin(8*i),v=Math.cos(8*i),S=Math.sin(10*i),I=Math.cos(10*i),R=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*g/1048576+(3*i*u/16+45*i*f/256-i*(32*r-561)*d/4096-i*(232*r-1677)*p/16384+i*(399985-90560*r+512*s)*g/5242880)*y+(21*i*f/256+483*i*d/4096-i*(224*r-1969)*p/16384-i*(33152*r-112599)*g/1048576)*b+(151*i*d/4096+4681*i*p/65536+1479*i*g/16384-453*o*g/32768)*T+(1097*i*p/65536+42783*i*g/1048576)*v+8011*i*g/1048576*I+(3*c/8+3*u/16+213*f/2048-3*r*f/64+255*d/4096-33*r*d/512+20861*p/524288-33*r*p/512+s*p/1024+28273*g/1048576-471*r*g/8192+9*s*g/4096)*m+(21*u/256+21*f/256+533*d/8192-21*r*d/512+197*p/4096-315*r*p/4096+584039*g/16777216-12517*r*g/131072+7*s*g/2048)*A+(151*f/6144+151*d/4096+5019*p/131072-453*r*p/16384+26965*g/786432-8607*r*g/131072)*x+(1097*d/131072+1097*p/65536+225797*g/10485760-1097*r*g/65536)*E+(8011*p/2621440+8011*g/1048576)*S+293393*g/251658240*R}function Dv(e,t){if(e===0)return Math.log(Math.tan(.5*(D.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(D.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function mGe(e,t,n,i,r){let o=Dv(e._ellipticity,n),s=Dv(e._ellipticity,r);return Math.atan2(D.negativePiToPi(i-t),s-o)}function pGe(e,t,n,i,r,o,s){let a=e._heading,c=o-i,u;if(D.equalsEpsilon(Math.abs(a),D.PI_OVER_TWO,D.EPSILON8))if(t===n)u=t*Math.cos(r)*D.negativePiToPi(c);else{let f=Math.sin(r);u=t*Math.cos(r)*D.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=ZX(e._ellipticity,t,r);u=(ZX(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var gGe=new h,JX=new h;function gme(e,t,n,i){let r=h.normalize(i.cartographicToCartesian(t,JX),gGe),o=h.normalize(i.cartographicToCartesian(n,JX),JX),s=i.maximumRadius,a=i.minimumRadius,c=s*s,u=a*a;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=he.clone(t,e._start),e._start.height=0,e._end=he.clone(n,e._end),e._end.height=0,e._heading=mGe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=pGe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function _me(e,t,n,i,r,o){if(n===0)return he.clone(e,o);let s=r*r,a,c,u;if(Math.abs(D.PI_OVER_TWO-Math.abs(t))>D.EPSILON8){let f=ZX(r,i,e.latitude),d=n*Math.cos(t),p=f+d;if(c=hGe(p,r,i),Math.abs(t)<D.EPSILON10)a=D.negativePiToPi(e.longitude);else{let g=Dv(r,e.latitude),m=Dv(r,c);u=Math.tan(t)*(m-g),a=D.negativePiToPi(e.longitude+u)}}else{c=e.latitude;let f;if(r===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*d*d)}u=n/f,t>0?a=D.negativePiToPi(e.longitude+u):a=D.negativePiToPi(e.longitude-u)}return l(o)?(o.longitude=a,o.latitude=c,o.height=0,o):new he(a,c,0)}function yg(e,t,n){let i=n??ee.default;this._ellipsoid=i,this._start=new he,this._end=new he,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&gme(this,e,t,i)}Object.defineProperties(yg.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});yg.fromStartHeadingDistance=function(e,t,n,i,r){let o=i??ee.default,s=o.maximumRadius,a=o.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=D.negativePiToPi(t);let d=_me(e,t,n,o.maximumRadius,f);return!l(r)||l(i)&&!i.equals(r.ellipsoid)?new yg(e,d,o):(r.setEndPoints(e,d),r)};yg.prototype.setEndPoints=function(e,t){gme(this,e,t,this._ellipsoid)};yg.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};yg.prototype.interpolateUsingSurfaceDistance=function(e,t){return _me(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};yg.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,r=Math.abs(i),o=this._start;if(e=D.negativePiToPi(e),D.equalsEpsilon(Math.abs(e),Math.PI,D.EPSILON14)&&(e=D.sign(o.longitude)*Math.PI),l(t)||(t=new he),Math.abs(D.PI_OVER_TWO-r)<=D.EPSILON8)return t.longitude=e,t.latitude=o.latitude,t.height=0,t;if(D.equalsEpsilon(Math.abs(D.PI_OVER_TWO-r),D.PI_OVER_TWO,D.EPSILON8))return D.equalsEpsilon(e,o.longitude,D.EPSILON12)?void 0:(t.longitude=e,t.latitude=D.PI_OVER_TWO*D.sign(D.PI_OVER_TWO-i),t.height=0,t);let s=o.latitude,a=n*Math.sin(s),c=Math.tan(.5*(D.PI_OVER_TWO+s))*Math.exp((e-o.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=o.latitude,d;do{d=f;let p=n*Math.sin(d),g=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(g/u,n/2))-D.PI_OVER_TWO}while(!D.equalsEpsilon(f,d,D.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};yg.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,r=this._start;if(D.equalsEpsilon(Math.abs(i),D.PI_OVER_TWO,D.EPSILON8))return;let o=Dv(n,r.latitude),s=Dv(n,e),a=Math.tan(i)*(s-o),c=D.negativePiToPi(r.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new he(c,e,0)};var Dc=yg;var sK=[Ui,yi],_Ge=sK.length,Bme=Math.cos(D.toRadians(30)),yme=Math.cos(D.toRadians(150)),kme=0,Ume=1e3;function jy(e){e=e??H.EMPTY_OBJECT;let t=e.positions;this.width=e.width??1,this._positions=t,this.granularity=e.granularity??9999,this.loop=e.loop??!1,this.arcType=e.arcType??ln.GEODESIC,this._ellipsoid=ee.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(jy.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ee.packedLength+1+1}}});jy.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<_Ge;i++)if(t instanceof sK[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var yGe=new h,Ame=new h,bme=new h;function oK(e,t,n,i,r){let o=jl(i,e,0,yGe),s=jl(i,e,n,Ame),a=jl(i,t,0,bme),c=Ag(s,o,Ame),u=Ag(a,o,bme);return h.cross(u,c,r),h.normalize(r,r)}var AGe=new he,bGe=new h,xGe=new h,TGe=new h;function QX(e,t,n,i,r,o,s,a,c,u,f){if(r===0)return;let d;o===ln.GEODESIC?d=new _g(e,t,s):o===ln.RHUMB&&(d=new Dc(e,t,s));let p=d.surfaceDistance;if(p<r)return;let g=oK(e,t,i,s,TGe),m=Math.ceil(p/r),y=p/m,A=y,b=m-1,x=a.length;for(let T=0;T<b;T++){let E=d.interpolateUsingSurfaceDistance(A,AGe),v=jl(s,E,n,bGe),S=jl(s,E,i,xGe);h.pack(g,a,x),h.pack(v,c,x),h.pack(S,u,x),f.push(E.latitude),f.push(E.longitude),x+=3,A+=y}}var eK=new he;function jl(e,t,n,i){return he.clone(t,eK),eK.height=n,he.toCartesian(eK,e,i)}jy.pack=function(e,t,n){let i=n??0,r=e._positions,o=r.length;t[i++]=o;for(let s=0;s<o;++s){let a=r[s];h.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,ee.pack(e._ellipsoid,t,i),i+=ee.packedLength,t[i++]=e._projectionIndex,t[i]=e._scene3DOnly?1:0,t};jy.unpack=function(e,t,n){let i=t??0,r=e[i++],o=new Array(r);for(let p=0;p<r;p++)o[p]=h.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,c=e[i++],u=ee.unpack(e,i);i+=ee.packedLength;let f=e[i++],d=e[i]===1;return l(n)||(n=new jy({positions:o})),n._positions=o,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=u,n._projectionIndex=f,n._scene3DOnly=d,n};function Ag(e,t,n){return h.subtract(e,t,n),h.normalize(n,n),n}function xme(e,t,n,i){return i=Ag(e,t,i),i=h.cross(i,n,i),i=h.normalize(i,i),i=h.cross(n,i,i),i}var EGe=new h,CGe=new h,vGe=new h,zme=new h,SGe=0,wGe=-1;function tK(e,t,n,i,r){let o=Ag(n,t,zme),s=xme(e,t,o,EGe),a=xme(i,t,o,CGe);if(D.equalsEpsilon(h.dot(s,a),wGe,D.EPSILON5))return r=h.cross(o,s,r),r=h.normalize(r,r),r;r=h.add(a,s,r),r=h.normalize(r,r);let c=h.cross(o,r,vGe);return h.dot(a,c)<SGe&&(r=h.negate(r,r)),r}var E6=sn.fromPointNormal(h.ZERO,h.UNIT_Y),IGe=new h,PGe=new h,DGe=new h,RGe=new h,OGe=new h,b6=new h,x6=new he,Tme=new he,Eme=new he;jy.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,r=e.granularity,o=e.arcType,s=new sK[e._projectionIndex](i),a=kme,c=Ume,u,f,d=e._positions,p=d.length;p===2&&(n=!1);let g,m,y,A,b=new Dc(void 0,void 0,i),x,T,E,v=[d[0]];for(f=0;f<p-1;f++)g=d[f],m=d[f+1],x=_i.lineSegmentPlane(g,m,E6,b6),l(x)&&!h.equalsEpsilon(x,g,D.EPSILON7)&&!h.equalsEpsilon(x,m,D.EPSILON7)&&(e.arcType===ln.GEODESIC?v.push(h.clone(x)):e.arcType===ln.RHUMB&&(E=i.cartesianToCartographic(x,x6).longitude,y=i.cartesianToCartographic(g,x6),A=i.cartesianToCartographic(m,Tme),b.setEndPoints(y,A),T=b.findIntersectionWithLongitude(E,Eme),x=i.cartographicToCartesian(T,b6),l(x)&&!h.equalsEpsilon(x,g,D.EPSILON7)&&!h.equalsEpsilon(x,m,D.EPSILON7)&&v.push(h.clone(x)))),v.push(m);n&&(g=d[p-1],m=d[0],x=_i.lineSegmentPlane(g,m,E6,b6),l(x)&&!h.equalsEpsilon(x,g,D.EPSILON7)&&!h.equalsEpsilon(x,m,D.EPSILON7)&&(e.arcType===ln.GEODESIC?v.push(h.clone(x)):e.arcType===ln.RHUMB&&(E=i.cartesianToCartographic(x,x6).longitude,y=i.cartesianToCartographic(g,x6),A=i.cartesianToCartographic(m,Tme),b.setEndPoints(y,A),T=b.findIntersectionWithLongitude(E,Eme),x=i.cartographicToCartesian(T,b6),l(x)&&!h.equalsEpsilon(x,g,D.EPSILON7)&&!h.equalsEpsilon(x,m,D.EPSILON7)&&v.push(h.clone(x)))));let S=v.length,I=new Array(S);for(f=0;f<S;f++){let q=he.fromCartesian(v[f],i);q.height=0,I[f]=q}if(I=Fr(I,he.equalsEpsilon),S=I.length,S<2)return;let R=[],O=[],L=[],_=[],C=IGe,w=PGe,P=DGe,M=RGe,F=OGe,V=I[0],B=I[1],j=I[S-1];for(C=jl(i,j,a,C),M=jl(i,B,a,M),w=jl(i,V,a,w),P=jl(i,V,c,P),n?F=tK(C,w,P,M,F):F=oK(V,B,c,i,F),h.pack(F,O,0),h.pack(w,L,0),h.pack(P,_,0),R.push(V.latitude),R.push(V.longitude),QX(V,B,a,c,r,o,i,O,L,_,R),f=1;f<S-1;++f){C=h.clone(w,C),w=h.clone(M,w);let q=I[f];jl(i,q,c,P),jl(i,I[f+1],a,M),tK(C,w,P,M,F),u=O.length,h.pack(F,O,u),h.pack(w,L,u),h.pack(P,_,u),R.push(q.latitude),R.push(q.longitude),QX(I[f],I[f+1],a,c,r,o,i,O,L,_,R)}let k=I[S-1],G=I[S-2];if(w=jl(i,k,a,w),P=jl(i,k,c,P),n){let q=I[0];C=jl(i,G,a,C),M=jl(i,q,a,M),F=tK(C,w,P,M,F)}else F=oK(G,k,c,i,F);if(u=O.length,h.pack(F,O,u),h.pack(w,L,u),h.pack(P,_,u),R.push(k.latitude),R.push(k.longitude),n){for(QX(k,V,a,c,r,o,i,O,L,_,R),u=O.length,f=0;f<3;++f)O[u+f]=O[f],L[u+f]=L[f],_[u+f]=_[f];R.push(V.latitude),R.push(V.longitude)}return r5e(n,s,L,_,O,R,t)};var MGe=new h,NGe=new $,LGe=new Le;function Cme(e,t,n,i){let r=Ag(n,t,MGe),o=h.dot(r,e);if(o>Bme||o<yme){let s=Ag(i,n,zme),a=o<yme?D.PI_OVER_TWO:-D.PI_OVER_TWO,c=Le.fromAxisAngle(s,a,LGe),u=$.fromQuaternion(c,NGe);return $.multiplyByVector(u,e,e),!0}return!1}var vme=new he,FGe=new h,Sme=new h;function lM(e,t,n,i,r){let o=he.toCartesian(t,e._ellipsoid,FGe),s=h.add(o,n,Sme),a=!1,c=e._ellipsoid,u=c.cartesianToCartographic(s,vme);Math.abs(t.longitude-u.longitude)>D.PI_OVER_TWO&&(a=!0,s=h.subtract(o,n,Sme),u=c.cartesianToCartographic(s,vme)),u.height=0;let f=e.project(u,r);return r=h.subtract(f,i,r),r.z=0,r=h.normalize(r,r),a&&h.negate(r,r),r}var BGe=new h,wme=new h;function Ime(e,t,n,i,r,o){let s=h.subtract(t,e,BGe);h.normalize(s,s);let a=n-kme,c=h.multiplyByScalar(s,a,wme);h.add(e,c,r);let u=i-Ume;c=h.multiplyByScalar(s,u,wme),h.add(t,c,o)}var kGe=new h;function T6(e,t){let n=sn.getPointDistance(E6,e),i=sn.getPointDistance(E6,t),r=kGe;D.equalsEpsilon(n,0,D.EPSILON2)?(r=Ag(t,e,r),h.multiplyByScalar(r,D.EPSILON2,r),h.add(e,r,e)):D.equalsEpsilon(i,0,D.EPSILON2)&&(r=Ag(e,t,r),h.multiplyByScalar(r,D.EPSILON2,r),h.add(t,r,t))}function UGe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(D.equalsEpsilon(n,D.PI,D.EPSILON11)){let r=D.sign(t.longitude);return e.longitude=r*(n-D.EPSILON11),1}else if(D.equalsEpsilon(i,D.PI,D.EPSILON11)){let r=D.sign(e.longitude);return t.longitude=r*(i-D.EPSILON11),2}return 0}var Vme=new he,jme=new he,Pme=new h,nK=new h,Dme=new h,Rme=new h,zGe=new h,Ome=new h,VGe=[Vme,jme],jGe=new ie,HGe=new h,GGe=new h,WGe=new h,qGe=new h,YGe=new h,XGe=new h,iK=new h,rK=new h,KGe=new h,$Ge=new h,JGe=new h,Mme=new h,ZGe=new h,QGe=new h,e5e=new Sn,t5e=new Sn,Nme=new h,n5e=new h,Lme=new h,i5e=[new ue,new ue],Hme=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Fme=Hme.length;function r5e(e,t,n,i,r,o,s){let a,c,u=t._ellipsoid,f=n.length/3-1,d=f*8,p=d*4,g=f*36,m=d>65535?new Uint32Array(g):new Uint16Array(g),y=new Float64Array(d*3),A=new Float32Array(p),b=new Float32Array(p),x=new Float32Array(p),T=new Float32Array(p),E=new Float32Array(p),v,S,I,R;s&&(v=new Float32Array(p),S=new Float32Array(p),I=new Float32Array(p),R=new Float32Array(d*2));let O=o.length/2,L=0,_=Vme;_.height=0;let C=jme;C.height=0;let w=Pme,P=nK;if(s)for(c=0,a=1;a<O;a++)_.latitude=o[c],_.longitude=o[c+1],C.latitude=o[c+2],C.longitude=o[c+3],w=t.project(_,w),P=t.project(C,P),L+=h.distance(w,P),c+=2;let M=i.length/3;P=h.unpack(i,0,P);let F=0;for(c=3,a=1;a<M;a++)w=h.clone(P,w),P=h.unpack(i,c,P),F+=h.distance(w,P),c+=3;let V;c=3;let B=0,j=0,k=0,G=0,q=!1,Q=h.unpack(n,0,Rme),W=h.unpack(i,0,nK),J=h.unpack(r,0,Ome);if(e){let Se=h.unpack(n,n.length-6,Dme);Cme(J,Se,Q,W)&&(J=h.negate(J,J))}let Z=0,ae=0,Ae=0;for(a=0;a<f;a++){let Se=h.clone(Q,Dme),Re=h.clone(W,Pme),Qe=h.clone(J,zGe);q&&(Qe=h.negate(Qe,Qe)),Q=h.unpack(n,c,Rme),W=h.unpack(i,c,nK),J=h.unpack(r,c,Ome),q=Cme(J,Se,Q,W),_.latitude=o[B],_.longitude=o[B+1],C.latitude=o[B+2],C.longitude=o[B+3];let He,Xe,$e,Pe;if(s){let gi=UGe(_,C);He=t.project(_,YGe),Xe=t.project(C,XGe);let ho=Ag(Xe,He,Nme);ho.y=Math.abs(ho.y),$e=iK,Pe=rK,gi===0||h.dot(ho,h.UNIT_Y)>Bme?($e=lM(t,_,Qe,He,iK),Pe=lM(t,C,J,Xe,rK)):gi===1?(Pe=lM(t,C,J,Xe,rK),$e.x=0,$e.y=D.sign(_.longitude-Math.abs(C.longitude)),$e.z=0):($e=lM(t,_,Qe,He,iK),Pe.x=0,Pe.y=D.sign(_.longitude-C.longitude),Pe.z=0)}let qe=h.distance(Re,W),st=Sn.fromCartesian(Se,e5e),vt=h.subtract(Q,Se,KGe),Gt=h.normalize(vt,Mme),lt=h.subtract(Re,Se,$Ge);lt=h.normalize(lt,lt);let mt=h.cross(Gt,lt,Mme);mt=h.normalize(mt,mt);let ft=h.cross(lt,Qe,ZGe);ft=h.normalize(ft,ft);let Xt=h.subtract(W,Q,JGe);Xt=h.normalize(Xt,Xt);let rt=h.cross(J,Xt,QGe);rt=h.normalize(rt,rt);let ht=qe/F,Bi=Z/F,Xn=0,bi,Wi,wi,hi=0,xi=0;if(s){Xn=h.distance(He,Xe),bi=Sn.fromCartesian(He,t5e),Wi=h.subtract(Xe,He,Nme),wi=h.normalize(Wi,n5e);let gi=wi.x;wi.x=wi.y,wi.y=-gi,hi=Xn/L,xi=ae/L}for(V=0;V<8;V++){let gi=G+V*4,ho=j+V*2,ur=gi+3,Zo=V<4?1:-1,Bn=V===2||V===3||V===6||V===7?1:-1;h.pack(st.high,A,gi),A[ur]=vt.x,h.pack(st.low,b,gi),b[ur]=vt.y,h.pack(ft,x,gi),x[ur]=vt.z,h.pack(rt,T,gi),T[ur]=ht*Zo,h.pack(mt,E,gi);let qi=Bi*Bn;qi===0&&Bn<0&&(qi=9),E[ur]=qi,s&&(v[gi]=bi.high.x,v[gi+1]=bi.high.y,v[gi+2]=bi.low.x,v[gi+3]=bi.low.y,I[gi]=-$e.y,I[gi+1]=$e.x,I[gi+2]=Pe.y,I[gi+3]=-Pe.x,S[gi]=Wi.x,S[gi+1]=Wi.y,S[gi+2]=wi.x,S[gi+3]=wi.y,R[ho]=hi*Zo,qi=xi*Bn,qi===0&&Bn<0&&(qi=9),R[ho+1]=qi)}let jn=WGe,nn=qGe,Wn=HGe,Zi=GGe,Mr=ie.fromCartographicArray(VGe,jGe),fo=Mi.getMinimumMaximumHeights(Mr,u),Bs=fo.minimumTerrainHeight,Ks=fo.maximumTerrainHeight;Ae+=Math.abs(Bs),Ae+=Math.abs(Ks),Ime(Se,Re,Bs,Ks,jn,Wn),Ime(Q,W,Bs,Ks,nn,Zi);let no=h.multiplyByScalar(mt,D.EPSILON5,Lme);h.add(jn,no,jn),h.add(nn,no,nn),h.add(Wn,no,Wn),h.add(Zi,no,Zi),T6(jn,nn),T6(Wn,Zi),h.pack(jn,y,k),h.pack(nn,y,k+3),h.pack(Zi,y,k+6),h.pack(Wn,y,k+9),no=h.multiplyByScalar(mt,-2*D.EPSILON5,Lme),h.add(jn,no,jn),h.add(nn,no,nn),h.add(Wn,no,Wn),h.add(Zi,no,Zi),T6(jn,nn),T6(Wn,Zi),h.pack(jn,y,k+12),h.pack(nn,y,k+15),h.pack(Zi,y,k+18),h.pack(Wn,y,k+21),B+=2,c+=3,j+=16,k+=24,G+=32,Z+=qe,ae+=Xn}c=0;let fe=0;for(a=0;a<f;a++){for(V=0;V<Fme;V++)m[c+V]=Hme[V]+fe;fe+=8,c+=Fme}let xe=i5e;ue.fromVertices(n,h.ZERO,3,xe[0]),ue.fromVertices(i,h.ZERO,3,xe[1]);let ge=ue.fromBoundingSpheres(xe);ge.radius+=Ae/(f*2);let we={position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:Vy(A),startLoAndForwardOffsetY:Vy(b),startNormalAndForwardOffsetZ:Vy(x),endNormalAndTextureCoordinateNormalizationX:Vy(T),rightNormalAndTextureCoordinateNormalizationY:Vy(E)};return s&&(we.startHiLo2D=Vy(v),we.offsetAndRight2D=Vy(S),we.startEndNormals2D=Vy(I),we.texcoordNormalization2D=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,normalize:!1,values:R})),new St({attributes:we,indices:m,boundingSphere:ge})}function Vy(e){return new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}jy._projectNormal=lM;var vx=jy;var uM=`in vec4 v_startPlaneNormalEcAndHalfWidth;
in vec4 v_endPlaneNormalEcAndBatchId;
in vec4 v_rightPlaneEC;
in vec4 v_endEcAndStartEcX;
in vec4 v_texcoordNormalizationAndStartEcYZ;
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif
void main(void)
{
float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
eyeCoordinate /= eyeCoordinate.w;
float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
vec3 alignedPlaneNormal;
alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
#ifdef PER_INSTANCE_COLOR
out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
czm_materialInput materialInput;
materialInput.s = s;
materialInput.st = vec2(s, t);
materialInput.str = vec3(s, t, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR
out_FragColor.rgb *= out_FragColor.a;
czm_writeDepthClamp();
}
`;var fM=`in vec3 v_forwardDirectionEC;
in vec3 v_texcoordNormalizationAndHalfWidth;
in float v_batchId;
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#else
in vec2 v_alignedPlaneDistances;
in float v_texcoordT;
#endif
float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
}
void main(void)
{
vec4 eyeCoordinate = gl_FragCoord;
eyeCoordinate /= eyeCoordinate.w;
#ifdef PER_INSTANCE_COLOR
out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
distanceFromStart = max(0.0, distanceFromStart);
distanceFromEnd = max(0.0, distanceFromEnd);
float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
czm_materialInput materialInput;
materialInput.s = s;
materialInput.st = vec2(s, v_texcoordT);
materialInput.str = vec3(s, v_texcoordT, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR
}
`;var dM=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;
in float batchId;
out vec3 v_forwardDirectionEC;
out vec3 v_texcoordNormalizationAndHalfWidth;
out float v_batchId;
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#else
out vec2 v_alignedPlaneDistances;
out float v_texcoordT;
#endif
void main()
{
v_batchId = batchId;
vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
vec4 startPlane2D;
vec4 startPlane3D;
startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
vec4 rightPlane2D;
vec4 rightPlane3D;
rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
vec4 endPlane2D;
vec4 endPlane3D;
endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
v_forwardDirectionEC = normalize(endEC - startEC);
vec2 cleanTexcoordNormalization2D;
cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
vec2 cleanTexcoordNormalization3D;
cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#else // PER_INSTANCE_COLOR
v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
#endif // PER_INSTANCE_COLOR
#ifdef WIDTH_VARYING
float width = czm_batchTable_width(batchId);
float halfWidth = width * 0.5;
v_width = width;
v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#else
float halfWidth = 0.5 * czm_batchTable_width(batchId);
v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#endif
vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow);
float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection));
vec3 normalEC = normalize(cross(planeDirection, upOrDown));
vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
positionEc3D.xyz += geodeticSurfaceNormal;
normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC;
vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection));
normalEC = normalize(cross(planeDirection, upOrDown));
geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
positionEc2D.xyz += geodeticSurfaceNormal;
normalEC *= sign(texcoordNormalization2D.x);
#ifndef PER_INSTANCE_COLOR
v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
#endif
positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC;
gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
#ifdef ANGLE_VARYING
vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var hM=`in vec3 position3DHigh;
in vec3 position3DLow;
#ifndef COLUMBUS_VIEW_2D
in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
#else
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;
#endif
in float batchId;
out vec4 v_startPlaneNormalEcAndHalfWidth;
out vec4 v_endPlaneNormalEcAndBatchId;
out vec4 v_rightPlaneEC;
out vec4 v_endEcAndStartEcX;
out vec4 v_texcoordNormalizationAndStartEcYZ;
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif
void main()
{
#ifdef COLUMBUS_VIEW_2D
vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
vec3 ecEnd = forwardDirectionEC + ecStart;
forwardDirectionEC = normalize(forwardDirectionEC);
v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
vec4 startPlaneEC;
startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
vec4 endPlaneEC;
endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
#else // COLUMBUS_VIEW_2D
vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
vec3 ecEnd = ecStart + offset;
vec3 forwardDirectionEC = normalize(offset);
vec4 startPlaneEC;
startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
vec4 endPlaneEC;
endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
#endif // COLUMBUS_VIEW_2D
v_endEcAndStartEcX.xyz = ecEnd;
v_endEcAndStartEcX.w = ecStart.x;
v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#endif // PER_INSTANCE_COLOR
vec4 positionRelativeToEye = czm_computePosition();
vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye;
float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection));
vec3 normalEC = normalize(cross(planeDirection, upOrDown));
upOrDown = cross(forwardDirectionEC, normalEC);
upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
positionEC.xyz += upOrDown;
v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
float width = czm_batchTable_width(batchId);
#ifdef WIDTH_VARYING
v_width = width;
#endif
v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
v_endPlaneNormalEcAndBatchId.w = batchId;
width = width * max(0.0, czm_metersPerPixel(positionEC));
width = width / dot(normalEC, v_rightPlaneEC.xyz);
#ifdef COLUMBUS_VIEW_2D
normalEC *= sign(texcoordNormalization2D.x);
#else
normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
#endif
positionEC.xyz += width * normalEC;
gl_Position = czm_depthClamp(czm_projection * positionEC);
#ifdef ANGLE_VARYING
vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var mM=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec4 color;
in float batchId;
out vec4 v_color;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = czm_computePosition();
vec4 prev = czm_computePrevPosition();
vec4 next = czm_computeNextPosition();
float angle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
v_color = color;
}
`;var Hl=`void clipLineSegmentToNearPlane(
vec3 p0,
vec3 p1,
out vec4 positionWC,
out bool clipped,
out bool culledByNearPlane,
out vec4 clippedPositionEC)
{
culledByNearPlane = false;
clipped = false;
vec3 p0ToP1 = p1 - p0;
float magnitude = length(p0ToP1);
vec3 direction = normalize(p0ToP1);
float endPoint0Distance = czm_currentFrustum.x + p0.z;
float denominator = -direction.z;
if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
{
culledByNearPlane = true;
}
else if (endPoint0Distance > 0.0)
{
float t = endPoint0Distance / denominator;
if (t < 0.0 || t > magnitude)
{
culledByNearPlane = true;
}
else
{
p0 = p0 + t * direction;
p0.z = min(p0.z, -czm_currentFrustum.x);
clipped = true;
}
}
clippedPositionEC = vec4(p0, 1.0);
positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
}
vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
{
#ifdef POLYLINE_DASH
vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
vec2 lineDir;
if (usePrevious) {
lineDir = normalize(positionWindow.xy - previousWindow.xy);
}
else {
lineDir = normalize(nextWindow.xy - positionWindow.xy);
}
angle = atan(lineDir.x, lineDir.y) - 1.570796327;
angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
#endif
vec4 clippedPrevWC, clippedPrevEC;
bool prevSegmentClipped, prevSegmentCulled;
clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
vec4 clippedNextWC, clippedNextEC;
bool nextSegmentClipped, nextSegmentCulled;
clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
bool segmentClipped, segmentCulled;
vec4 clippedPositionWC, clippedPositionEC;
clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
if (segmentCulled)
{
return vec4(0.0, 0.0, 0.0, 1.0);
}
vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
if (prevSegmentCulled)
{
directionToPrevWC = -directionToNextWC;
}
else if (nextSegmentCulled)
{
directionToNextWC = -directionToPrevWC;
}
vec2 thisSegmentForwardWC, otherSegmentForwardWC;
if (usePrevious)
{
thisSegmentForwardWC = -directionToPrevWC;
otherSegmentForwardWC = directionToNextWC;
}
else
{
thisSegmentForwardWC = directionToNextWC;
otherSegmentForwardWC = -directionToPrevWC;
}
vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
vec2 leftWC = thisSegmentLeftWC;
float expandWidth = width * 0.5;
if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
{
vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
float leftSumLength = length(leftSumWC);
leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
vec2 u = -thisSegmentForwardWC;
vec2 v = leftWC;
float sinAngle = abs(u.x * v.y - u.y * v.x);
expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
}
vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
}
vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
{
vec4 positionEC = czm_modelViewRelativeToEye * position;
vec4 prevEC = czm_modelViewRelativeToEye * previous;
vec4 nextEC = czm_modelViewRelativeToEye * next;
return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
}
`;var o5e=`#define CLIP_POLYLINE
${Hl}
${mM}`,s5e=yx;function Sx(e){e=e??H.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=Sx.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o5e,this._fragmentShaderSource=e.fragmentShaderSource??s5e,this._renderState=wr.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(Sx.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});Sx.VERTEX_FORMAT=Be.POSITION_ONLY;Sx.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;Sx.prototype.isTranslucent=wr.prototype.isTranslucent;Sx.prototype.getRenderState=wr.prototype.getRenderState;var js=Sx;var pM=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec2 st;
in float batchId;
out float v_width;
out vec2 v_st;
out float v_polylineAngle;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = czm_computePosition();
vec4 prev = czm_computePrevPosition();
vec4 next = czm_computeNextPosition();
float angle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
v_width = width;
v_st.s = st.s;
v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
v_polylineAngle = angle;
}
`;var wx=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
in vec2 v_st;
void main()
{
czm_materialInput materialInput;
vec2 st = v_st;
st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
materialInput.s = st.s;
materialInput.st = st;
materialInput.str = vec3(st, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#ifdef VECTOR_TILE
out_FragColor *= u_highlightColor;
#endif
czm_writeLogDepth();
}
`;var a5e=`#define CLIP_POLYLINE
${Hl}
${pM}`,c5e=wx;function Ix(e){e=e??H.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=Ix.VERTEX_FORMAT;this.material=l(e.material)?e.material:Qi.fromType(Qi.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??a5e,this._fragmentShaderSource=e.fragmentShaderSource??c5e,this._renderState=wr.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(Ix.prototype,{vertexShaderSource:{get:function(){let e=this._vertexShaderSource;return this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&(e=`#define POLYLINE_DASH
${e}`),e}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}}});Ix.VERTEX_FORMAT=Be.POSITION_AND_ST;Ix.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;Ix.prototype.isTranslucent=wr.prototype.isTranslucent;Ix.prototype.getRenderState=wr.prototype.getRenderState;var cc=Ix;function bg(e){e=e??H.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;l(t)||(t=new cc),this.appearance=t,this.show=e.show??!0,this.classificationType=e.classificationType??Qn.BOTH,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._debugShowShadowVolume=e.debugShowShadowVolume??!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:!1,interleave:e.interleave??!1,releaseGeometryInstances:e.releaseGeometryInstances??!0,allowPicking:e.allowPicking??!0,asynchronous:e.asynchronous??!0,compressVertices:!1,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0},this._zIndex=void 0,this._ready=!1,this._primitive=void 0,this._sp=void 0,this._sp2D=void 0,this._spMorph=void 0,this._renderState=Gme(!1),this._renderState3DTiles=Gme(!0),this._renderStateMorph=Ge.fromCache({cull:{enabled:!0,face:Vi.FRONT},depthTest:{enabled:!0},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(bg.prototype,{interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},ready:{get:function(){return this._ready}},debugShowShadowVolume:{get:function(){return this._debugShowShadowVolume}}});bg.initializeTerrainHeights=function(){return Mi.initialize()};function l5e(e,t,n){let i=t.context,r=e._primitive,o=r._attributeLocations,s=r._batchTable.getVertexShaderCallback()(hM);s=On._appendShowToShader(r,s),s=On._appendDistanceDisplayConditionToShader(r,s),s=On._modifyShaderPosition(e,s,t.scene3DOnly);let a=r._batchTable.getVertexShaderCallback()(dM);a=On._appendShowToShader(r,a),a=On._appendDistanceDisplayConditionToShader(r,a),a=On._modifyShaderPosition(e,a,t.scene3DOnly);let c=r._batchTable.getVertexShaderCallback()(uM),u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],f="",d="";l(n.material)?(d=l(n.material)?n.material.shaderSource:"",d.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),d.search(/in\s+float\s+v_width;/g)!==-1&&u.push("WIDTH_VARYING")):f="PER_INSTANCE_COLOR",u.push(f);let p=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",f]:[f],g=new Ye({defines:u,sources:[s]}),m=new Ye({defines:p,sources:[d,c]});e._sp=en.replaceCache({context:i,shaderProgram:r._sp,vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:o});let y=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!l(y)){let b=new Ye({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:b,fragmentShaderSource:m,attributeLocations:o})}e._sp2D=y;let A=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!l(A)){let b=new Ye({defines:u.concat([`MAX_TERRAIN_HEIGHT ${Mi._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});c=r._batchTable.getVertexShaderCallback()(fM);let x=new Ye({defines:p,sources:[d,c]});A=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:b,fragmentShaderSource:x,attributeLocations:o})}e._spMorph=A}function Gme(e){return Ge.fromCache({cull:{enabled:!0},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:ei.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:ei.EQUAL,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK}})}function u5e(e,t,n,i,r,o){let s=e._primitive,a=s._va.length;r.length=a,o.length=a;let u=t instanceof js?{}:n._uniforms,f=s._batchTable.getUniformMapCallback()(u);for(let d=0;d<a;d++){let p=s._va[d],g=r[d];l(g)||(g=r[d]=new at({owner:e,primitiveType:s._primitiveType})),g.vertexArray=p,g.renderState=e._renderState,g.shaderProgram=e._sp,g.uniformMap=f,g.pass=Ie.TERRAIN_CLASSIFICATION,g.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";let m=at.shallowClone(g,g.derivedCommands.tileset);m.renderState=e._renderState3DTiles,m.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,g.derivedCommands.tileset=m;let y=at.shallowClone(g,g.derivedCommands.color2D);y.shaderProgram=e._sp2D,g.derivedCommands.color2D=y;let A=at.shallowClone(m,m.derivedCommands.color2D);A.shaderProgram=e._sp2D,m.derivedCommands.color2D=A;let b=at.shallowClone(g,g.derivedCommands.colorMorph);b.renderState=e._renderStateMorph,b.shaderProgram=e._spMorph,b.pickId="czm_batchTable_pickColor(v_batchId)",g.derivedCommands.colorMorph=b}}function Wme(e,t,n,i,r,o,s){n.mode===re.MORPHING?t=t.derivedCommands.colorMorph:n.mode!==re.SCENE3D&&(t=t.derivedCommands.color2D),t.modelMatrix=i,t.boundingVolume=o,t.cull=r,t.debugShowBoundingVolume=s,n.commandList.push(t)}function f5e(e,t,n,i,r,o,s){let a=e._primitive;On._updateBoundingVolumes(a,t,r);let c;t.mode===re.SCENE3D?c=a._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=a._boundingSphereCV:t.mode===re.SCENE2D&&l(a._boundingSphere2D)?c=a._boundingSphere2D:l(a._boundingSphereMorph)&&(c=a._boundingSphereMorph);let u=t.mode===re.MORPHING,f=e.classificationType,d=f!==Qn.CESIUM_3D_TILE,p=f!==Qn.TERRAIN&&!u,g,m=t.passes;if(m.render||m.pick&&a.allowPicking){let y=n.length;for(let A=0;A<y;++A){let b=c[A];d&&(g=n[A],Wme(e,g,t,r,o,b,s)),p&&(g=n[A].derivedCommands.tileset,Wme(e,g,t,r,o,b,s))}}}bg.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Mi.initialized){bg.initializeTerrainHeights();return}let t,n=this,i=this._primitiveOptions;if(!l(this._primitive)){let r=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],o=r.length,s=new Array(o),a;for(t=0;t<o;++t)if(a=r[t].attributes,!l(a)||!l(a.color)){this._hasPerInstanceColors=!1;break}for(t=0;t<o;++t){let c=r[t];a={};let u=c.attributes;for(let f in u)u.hasOwnProperty(f)&&(a[f]=u[f]);l(a.width)||(a.width=new Qc({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=e.scene3DOnly,vx.setProjectionAndEllipsoid(c.geometry,e.mapProjection),s[t]=new Ft({geometry:c.geometry,attributes:a,id:c.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(c,u,f){l5e(n,u,f)},i._createCommandsFunction=function(c,u,f,d,p,g,m){u5e(n,u,f,d,g,m)},i._updateAndQueueCommandsFunction=function(c,u,f,d,p,g,m,y){f5e(n,u,f,d,p,g,m)},this._primitive=new On(i)}if(this.appearance instanceof js&&!this._hasPerInstanceColors)throw new pe("All GeometryInstances must have color attributes to use PolylineColorAppearance with GroundPolylinePrimitive.");this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};bg.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};bg.isSupported=function(e){return e.frameState.context.depthTexture};bg.prototype.isDestroyed=function(){return!1};bg.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._sp2D=void 0,this._spMorph=void 0,le(this)};var Kh=bg;var d5e=new U(1,1),h5e=!1,m5e=z.WHITE;function Rv(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._transparent=void 0,this._transparentSubscription=void 0,this.image=e.image,this.repeat=e.repeat,this.color=e.color,this.transparent=e.transparent}Object.defineProperties(Rv.prototype,{isConstant:{get:function(){return X.isConstant(this._image)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:me("image"),repeat:me("repeat"),color:me("color"),transparent:me("transparent")});Rv.prototype.getType=function(e){return"Image"};var p5e=new K;Rv.prototype.getValue=function(e,t){return l(e)||(e=K.now(p5e)),l(t)||(t={}),t.image=X.getValueOrUndefined(this._image,e),t.repeat=X.getValueOrClonedDefault(this._repeat,e,d5e,t.repeat),t.color=X.getValueOrClonedDefault(this._color,e,m5e,t.color),X.getValueOrDefault(this._transparent,e,h5e)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};Rv.prototype.equals=function(e){return this===e||e instanceof Rv&&X.equals(this._image,e._image)&&X.equals(this._repeat,e._repeat)&&X.equals(this._color,e._color)&&X.equals(this._transparent,e._transparent)};var Hy=Rv;function g5e(e){if(e instanceof z)return new Kt(e);if(typeof e=="string"||e instanceof De||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new Hy;return t.image=e,t}}function _5e(e,t){return me(e,t,g5e)}var ro=_5e;function gM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(gM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),dimensions:me("dimensions"),heightReference:me("heightReference"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});gM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.dimensions=this.dimensions,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new gM(this)};gM.prototype.merge=function(e){this.show=this.show??e.show,this.dimensions=this.dimensions??e.dimensions,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Px=gM;var qme={FIXED:0,INERTIAL:1};Object.freeze(qme);var ji=qme;function Ov(){pe.throwInstantiationError()}Object.defineProperties(Ov.prototype,{isConstant:{get:pe.throwInstantiationError},definitionChanged:{get:pe.throwInstantiationError},referenceFrame:{get:pe.throwInstantiationError}});Ov.prototype.getValue=pe.throwInstantiationError;Ov.prototype.getValueInReferenceFrame=pe.throwInstantiationError;Ov.prototype.equals=pe.throwInstantiationError;var Yme=new $;Ov.convertToReferenceFrame=function(e,t,n,i,r){if(!l(t))return t;if(l(r)||(r=new h),n===i)return h.clone(t,r);let o=At.computeIcrfToCentralBodyFixedMatrix(e,Yme);if(n===ji.INERTIAL)return $.multiplyByVector(o,t,r);if(n===ji.FIXED)return $.multiplyByVector($.transpose(o,Yme),t,r)};var $h=Ov;function Dx(e,t){this._definitionChanged=new be,this._value=h.clone(e),this._referenceFrame=t??ji.FIXED}Object.defineProperties(Dx.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===ji.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var y5e=new K;Dx.prototype.getValue=function(e,t){return l(e)||(e=K.now(y5e)),this.getValueInReferenceFrame(e,ji.FIXED,t)};Dx.prototype.setValue=function(e,t){let n=!1;h.equals(this._value,e)||(n=!0,this._value=h.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};Dx.prototype.getValueInReferenceFrame=function(e,t,n){return $h.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};Dx.prototype.equals=function(e){return this===e||e instanceof Dx&&h.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Gl=Dx;function _M(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(_M.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),positions:me("positions"),width:me("width"),height:me("height"),heightReference:me("heightReference"),extrudedHeight:me("extrudedHeight"),extrudedHeightReference:me("extrudedHeightReference"),cornerType:me("cornerType"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition"),classificationType:me("classificationType"),zIndex:me("zIndex")});_M.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new _M(this)};_M.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Rx=_M;function A5e(e){return e}function b5e(e,t){return me(e,t,A5e)}var Wl=b5e;function yM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._length=void 0,this._lengthSubscription=void 0,this._topRadius=void 0,this._topRadiusSubscription=void 0,this._bottomRadius=void 0,this._bottomRadiusSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(yM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),length:me("length"),topRadius:me("topRadius"),bottomRadius:me("bottomRadius"),heightReference:me("heightReference"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),numberOfVerticalLines:me("numberOfVerticalLines"),slices:me("slices"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});yM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.length=this.length,e.topRadius=this.topRadius,e.bottomRadius=this.bottomRadius,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.slices=this.slices,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new yM(this)};yM.prototype.merge=function(e){this.show=this.show??e.show,this.length=this.length??e.length,this.topRadius=this.topRadius??e.topRadius,this.bottomRadius=this.bottomRadius??e.bottomRadius,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.slices=this.slices??e.slices,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Ox=yM;function AM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._semiMajorAxis=void 0,this._semiMajorAxisSubscription=void 0,this._semiMinorAxis=void 0,this._semiMinorAxisSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(AM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),semiMajorAxis:me("semiMajorAxis"),semiMinorAxis:me("semiMinorAxis"),height:me("height"),heightReference:me("heightReference"),extrudedHeight:me("extrudedHeight"),extrudedHeightReference:me("extrudedHeightReference"),rotation:me("rotation"),stRotation:me("stRotation"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),numberOfVerticalLines:me("numberOfVerticalLines"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition"),classificationType:me("classificationType"),zIndex:me("zIndex")});AM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.semiMajorAxis=this.semiMajorAxis,e.semiMinorAxis=this.semiMinorAxis,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.numberOfVerticalLines=this.numberOfVerticalLines,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new AM(this)};AM.prototype.merge=function(e){this.show=this.show??e.show,this.semiMajorAxis=this.semiMajorAxis??e.semiMajorAxis,this.semiMinorAxis=this.semiMinorAxis??e.semiMinorAxis,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.numberOfVerticalLines=this.numberOfVerticalLines??e.numberOfVerticalLines,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Mx=AM;function bM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._radii=void 0,this._radiiSubscription=void 0,this._innerRadii=void 0,this._innerRadiiSubscription=void 0,this._minimumClock=void 0,this._minimumClockSubscription=void 0,this._maximumClock=void 0,this._maximumClockSubscription=void 0,this._minimumCone=void 0,this._minimumConeSubscription=void 0,this._maximumCone=void 0,this._maximumConeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._stackPartitions=void 0,this._stackPartitionsSubscription=void 0,this._slicePartitions=void 0,this._slicePartitionsSubscription=void 0,this._subdivisions=void 0,this._subdivisionsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(bM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),radii:me("radii"),innerRadii:me("innerRadii"),minimumClock:me("minimumClock"),maximumClock:me("maximumClock"),minimumCone:me("minimumCone"),maximumCone:me("maximumCone"),heightReference:me("heightReference"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),stackPartitions:me("stackPartitions"),slicePartitions:me("slicePartitions"),subdivisions:me("subdivisions"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});bM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.radii=this.radii,e.innerRadii=this.innerRadii,e.minimumClock=this.minimumClock,e.maximumClock=this.maximumClock,e.minimumCone=this.minimumCone,e.maximumCone=this.maximumCone,e.heightReference=this.heightReference,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.stackPartitions=this.stackPartitions,e.slicePartitions=this.slicePartitions,e.subdivisions=this.subdivisions,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new bM(this)};bM.prototype.merge=function(e){this.show=this.show??e.show,this.radii=this.radii??e.radii,this.innerRadii=this.innerRadii??e.innerRadii,this.minimumClock=this.minimumClock??e.minimumClock,this.maximumClock=this.maximumClock??e.maximumClock,this.minimumCone=this.minimumCone??e.minimumCone,this.maximumCone=this.maximumCone??e.maximumCone,this.heightReference=this.heightReference??e.heightReference,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.stackPartitions=this.stackPartitions??e.stackPartitions,this.slicePartitions=this.slicePartitions??e.slicePartitions,this.subdivisions=this.subdivisions??e.subdivisions,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Nx=bM;function xM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._text=void 0,this._textSubscription=void 0,this._font=void 0,this._fontSubscription=void 0,this._style=void 0,this._styleSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._showBackground=void 0,this._showBackgroundSubscription=void 0,this._backgroundColor=void 0,this._backgroundColorSubscription=void 0,this._backgroundPadding=void 0,this._backgroundPaddingSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._fillColor=void 0,this._fillColorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(xM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),text:me("text"),font:me("font"),style:me("style"),scale:me("scale"),showBackground:me("showBackground"),backgroundColor:me("backgroundColor"),backgroundPadding:me("backgroundPadding"),pixelOffset:me("pixelOffset"),eyeOffset:me("eyeOffset"),horizontalOrigin:me("horizontalOrigin"),verticalOrigin:me("verticalOrigin"),heightReference:me("heightReference"),fillColor:me("fillColor"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),translucencyByDistance:me("translucencyByDistance"),pixelOffsetScaleByDistance:me("pixelOffsetScaleByDistance"),scaleByDistance:me("scaleByDistance"),distanceDisplayCondition:me("distanceDisplayCondition"),disableDepthTestDistance:me("disableDepthTestDistance")});xM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.text=this.text,e.font=this.font,e.style=this.style,e.scale=this.scale,e.showBackground=this.showBackground,e.backgroundColor=this.backgroundColor,e.backgroundPadding=this.backgroundPadding,e.pixelOffset=this.pixelOffset,e.eyeOffset=this.eyeOffset,e.horizontalOrigin=this.horizontalOrigin,e.verticalOrigin=this.verticalOrigin,e.heightReference=this.heightReference,e.fillColor=this.fillColor,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.translucencyByDistance=this.translucencyByDistance,e.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance,e.scaleByDistance=this.scaleByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e):new xM(this)};xM.prototype.merge=function(e){this.show=this.show??e.show,this.text=this.text??e.text,this.font=this.font??e.font,this.style=this.style??e.style,this.scale=this.scale??e.scale,this.showBackground=this.showBackground??e.showBackground,this.backgroundColor=this.backgroundColor??e.backgroundColor,this.backgroundPadding=this.backgroundPadding??e.backgroundPadding,this.pixelOffset=this.pixelOffset??e.pixelOffset,this.eyeOffset=this.eyeOffset??e.eyeOffset,this.horizontalOrigin=this.horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this.verticalOrigin??e.verticalOrigin,this.heightReference=this.heightReference??e.heightReference,this.fillColor=this.fillColor??e.fillColor,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.translucencyByDistance=this.translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance};var Jh=xM;var x5e=new h(1,1,1),T5e=h.ZERO,E5e=Le.IDENTITY;function Xme(e,t,n){this.translation=h.clone(e??T5e),this.rotation=Le.clone(t??E5e),this.scale=h.clone(n??x5e)}Xme.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&Le.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var Gy=Xme;var aK=new Gy;function TM(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._translation=void 0,this._translationSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this.translation=e.translation,this.rotation=e.rotation,this.scale=e.scale}Object.defineProperties(TM.prototype,{isConstant:{get:function(){return X.isConstant(this._translation)&&X.isConstant(this._rotation)&&X.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:me("translation"),rotation:me("rotation"),scale:me("scale")});var C5e=new K;TM.prototype.getValue=function(e,t){return l(e)||(e=K.now(C5e)),l(t)||(t=new Gy),t.translation=X.getValueOrClonedDefault(this._translation,e,aK.translation,t.translation),t.rotation=X.getValueOrClonedDefault(this._rotation,e,aK.rotation,t.rotation),t.scale=X.getValueOrClonedDefault(this._scale,e,aK.scale,t.scale),t};TM.prototype.equals=function(e){return this===e||e instanceof TM&&X.equals(this._translation,e._translation)&&X.equals(this._rotation,e._rotation)&&X.equals(this._scale,e._scale)};var Lx=TM;function xg(e,t){this._propertyNames=[],this._definitionChanged=new be,l(e)&&this.merge(e,t)}Object.defineProperties(xg.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t<n;t++)if(!X.isConstant(this[e[t]]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});xg.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function v5e(e){return new li(e)}xg.prototype.addProperty=function(e,t,n){this._propertyNames.push(e),Object.defineProperty(this,e,me(e,!0,n??v5e)),l(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};xg.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var S5e=new K;xg.prototype.getValue=function(e,t){l(e)||(e=K.now(S5e)),l(t)||(t={});let n=this._propertyNames;for(let i=0,r=n.length;i<r;i++){let o=n[i];t[o]=X.getValueOrUndefined(this[o],e,t[o])}return t};xg.prototype.merge=function(e,t){let n=this._propertyNames,i=l(e._propertyNames)?e._propertyNames:Object.keys(e);for(let r=0,o=i.length;r<o;r++){let s=i[r],a=this[s],c=e[s];a===void 0&&n.indexOf(s)===-1&&this.addProperty(s,void 0,t),c!==void 0&&(a!==void 0?l(a)&&l(a.merge)&&a.merge(c):l(c)&&l(c.merge)&&l(c.clone)?this[s]=c.clone():this[s]=c)}};function w5e(e,t){let n=e._propertyNames,i=t._propertyNames,r=n.length;if(r!==i.length)return!1;for(let o=0;o<r;++o){let s=n[o];if(i.indexOf(s)===-1||!X.equals(e[s],t[s]))return!1}return!0}xg.prototype.equals=function(e){return this===e||e instanceof xg&&w5e(this,e)};var ql=xg;function Kme(e){return new Lx(e)}function I5e(e){return new ql(e,Kme)}function P5e(e){return new ql(e)}function D5e(e){return new ql(e)}function EM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._hasVerticalExaggeration=void 0,this._hasVerticalExaggerationSubscription=void 0,this._enableVerticalExaggeration=void 0,this._enableVerticalExaggerationSubscription=void 0,this._minimumPixelSize=void 0,this._minimumPixelSizeSubscription=void 0,this._maximumScale=void 0,this._maximumScaleSubscription=void 0,this._incrementallyLoadTextures=void 0,this._incrementallyLoadTexturesSubscription=void 0,this._runAnimations=void 0,this._runAnimationsSubscription=void 0,this._clampAnimations=void 0,this._clampAnimationsSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._silhouetteColor=void 0,this._silhouetteColorSubscription=void 0,this._silhouetteSize=void 0,this._silhouetteSizeSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._colorBlendMode=void 0,this._colorBlendModeSubscription=void 0,this._colorBlendAmount=void 0,this._colorBlendAmountSubscription=void 0,this._imageBasedLightingFactor=void 0,this._imageBasedLightingFactorSubscription=void 0,this._environmentMapOptions=void 0,this._environmentMapOptionsSubscription=void 0,this._lightColor=void 0,this._lightColorSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._nodeTransformations=void 0,this._nodeTransformationsSubscription=void 0,this._articulations=void 0,this._articulationsSubscription=void 0,this._clippingPlanes=void 0,this._clippingPlanesSubscription=void 0,this._customShader=void 0,this._customShaderSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(EM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),uri:me("uri"),scale:me("scale"),enableVerticalExaggeration:me("enableVerticalExaggeration"),minimumPixelSize:me("minimumPixelSize"),maximumScale:me("maximumScale"),incrementallyLoadTextures:me("incrementallyLoadTextures"),runAnimations:me("runAnimations"),clampAnimations:me("clampAnimations"),shadows:me("shadows"),heightReference:me("heightReference"),silhouetteColor:me("silhouetteColor"),silhouetteSize:me("silhouetteSize"),color:me("color"),colorBlendMode:me("colorBlendMode"),colorBlendAmount:me("colorBlendAmount"),imageBasedLightingFactor:me("imageBasedLightingFactor"),environmentMapOptions:me("environmentMapOptions",void 0,D5e),lightColor:me("lightColor"),distanceDisplayCondition:me("distanceDisplayCondition"),nodeTransformations:me("nodeTransformations",void 0,I5e),articulations:me("articulations",void 0,P5e),clippingPlanes:me("clippingPlanes"),customShader:me("customShader")});EM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.scale=this.scale,e.enableVerticalExaggeration=this.enableVerticalExaggeration,e.minimumPixelSize=this.minimumPixelSize,e.maximumScale=this.maximumScale,e.incrementallyLoadTextures=this.incrementallyLoadTextures,e.runAnimations=this.runAnimations,e.clampAnimations=this.clampAnimations,e.heightReference=this._heightReference,e.silhouetteColor=this.silhouetteColor,e.silhouetteSize=this.silhouetteSize,e.color=this.color,e.colorBlendMode=this.colorBlendMode,e.colorBlendAmount=this.colorBlendAmount,e.imageBasedLightingFactor=this.imageBasedLightingFactor,e.environmentMapOptions=this.environmentMapOptions,e.lightColor=this.lightColor,e.distanceDisplayCondition=this.distanceDisplayCondition,e.nodeTransformations=this.nodeTransformations,e.articulations=this.articulations,e.clippingPlanes=this.clippingPlanes,e.customShader=this.customShader,e):new EM(this)};EM.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.scale=this.scale??e.scale,this.enableVerticalExaggeration=this.enableVerticalExaggeration??e.enableVerticalExaggeration,this.minimumPixelSize=this.minimumPixelSize??e.minimumPixelSize,this.maximumScale=this.maximumScale??e.maximumScale,this.incrementallyLoadTextures=this.incrementallyLoadTextures??e.incrementallyLoadTextures,this.runAnimations=this.runAnimations??e.runAnimations,this.clampAnimations=this.clampAnimations??e.clampAnimations,this.shadows=this.shadows??e.shadows,this.heightReference=this.heightReference??e.heightReference,this.silhouetteColor=this.silhouetteColor??e.silhouetteColor,this.silhouetteSize=this.silhouetteSize??e.silhouetteSize,this.color=this.color??e.color,this.colorBlendMode=this.colorBlendMode??e.colorBlendMode,this.colorBlendAmount=this.colorBlendAmount??e.colorBlendAmount,this.imageBasedLightingFactor=this.imageBasedLightingFactor??e.imageBasedLightingFactor,this.environmentMapOptions=this.environmentMapOptions??e.environmentMapOptions,this.lightColor=this.lightColor??e.lightColor,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.clippingPlanes=this.clippingPlanes??e.clippingPlanes,this.customShader=this.customShader??e.customShader;let t=e.nodeTransformations;if(l(t)){let i=this.nodeTransformations;l(i)?i.merge(t):this.nodeTransformations=new ql(t,Kme)}let n=e.articulations;if(l(n)){let i=this.articulations;l(i)?i.merge(n):this.articulations=new ql(n)}};var Tg=EM;function CM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._uri=void 0,this._uriSubscription=void 0,this._maximumScreenSpaceError=void 0,this._maximumScreenSpaceErrorSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(CM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),uri:me("uri"),maximumScreenSpaceError:me("maximumScreenSpaceError")});CM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new CM(this)};CM.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.maximumScreenSpaceError=this.maximumScreenSpaceError??e.maximumScreenSpaceError};var Fx=CM;function vM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._leadTime=void 0,this._leadTimeSubscription=void 0,this._trailTime=void 0,this._trailTimeSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._resolution=void 0,this._resolutionSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._relativeTo=void 0,this._relativeToSubscription=void 0,this._materialMode=void 0,this._materialModeSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(vM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),leadTime:me("leadTime"),trailTime:me("trailTime"),width:me("width"),resolution:me("resolution"),material:ro("material"),distanceDisplayCondition:me("distanceDisplayCondition"),relativeTo:me("relativeTo"),materialMode:me("materialMode")});vM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.leadTime=this.leadTime,e.trailTime=this.trailTime,e.width=this.width,e.resolution=this.resolution,e.material=this.material,e.distanceDisplayCondition=this.distanceDisplayCondition,e.relativeTo=this.relativeTo,e.materialMode=this.materialMode,e):new vM(this)};vM.prototype.merge=function(e){this.show=this.show??e.show,this.leadTime=this.leadTime??e.leadTime,this.trailTime=this.trailTime??e.trailTime,this.width=this.width??e.width,this.resolution=this.resolution??e.resolution,this.material=this.material??e.material,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.relativeTo=this.relativeTo??e.relativeTo,this.materialMode=this.materialMode??e.materialMode};var Eg=vM;function SM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(SM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),plane:me("plane"),dimensions:me("dimensions"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});SM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new SM(this)};SM.prototype.merge=function(e){this.show=this.show??e.show,this.plane=this.plane??e.plane,this.dimensions=this.dimensions??e.dimensions,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var wM=SM;function IM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._pixelSize=void 0,this._pixelSizeSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this._splitDirection=void 0,this._splitDirectionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(IM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),pixelSize:me("pixelSize"),heightReference:me("heightReference"),color:me("color"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),scaleByDistance:me("scaleByDistance"),translucencyByDistance:me("translucencyByDistance"),distanceDisplayCondition:me("distanceDisplayCondition"),disableDepthTestDistance:me("disableDepthTestDistance"),splitDirection:me("splitDirection")});IM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.pixelSize=this.pixelSize,e.heightReference=this.heightReference,e.color=this.color,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.scaleByDistance=this.scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.distanceDisplayCondition=this.distanceDisplayCondition,e.disableDepthTestDistance=this.disableDepthTestDistance,e.splitDirection=this.splitDirection,e):new IM(this)};IM.prototype.merge=function(e){this.show=this.show??e.show,this.pixelSize=this.pixelSize??e.pixelSize,this.heightReference=this.heightReference??e.heightReference,this.color=this.color??e.color,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.translucencyByDistance=this._translucencyByDistance??e.translucencyByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance,this.splitDirection=this.splitDirection??e.splitDirection};var Bx=IM;function R5e(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var Rc=R5e;function O5e(e){return Array.isArray(e)&&(e=new Rc(e)),new li(e)}function PM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._textureCoordinates=void 0,this._textureCoordinatesSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(PM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),hierarchy:me("hierarchy",void 0,O5e),height:me("height"),heightReference:me("heightReference"),extrudedHeight:me("extrudedHeight"),extrudedHeightReference:me("extrudedHeightReference"),stRotation:me("stRotation"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),perPositionHeight:me("perPositionHeight"),closeTop:me("closeTop"),closeBottom:me("closeBottom"),arcType:me("arcType"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition"),classificationType:me("classificationType"),zIndex:me("zIndex"),textureCoordinates:me("textureCoordinates")});PM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e.textureCoordinates=this.textureCoordinates,e):new PM(this)};PM.prototype.merge=function(e){this.show=this.show??e.show,this.hierarchy=this.hierarchy??e.hierarchy,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.perPositionHeight=this.perPositionHeight??e.perPositionHeight,this.closeTop=this.closeTop??e.closeTop,this.closeBottom=this.closeBottom??e.closeBottom,this.arcType=this.arcType??e.arcType,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex,this.textureCoordinates=this.textureCoordinates??e.textureCoordinates};var Zh=PM;function DM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(DM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),positions:me("positions"),width:me("width"),granularity:me("granularity"),material:ro("material"),depthFailMaterial:ro("depthFailMaterial"),arcType:me("arcType"),clampToGround:me("clampToGround"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition"),classificationType:me("classificationType"),zIndex:me("zIndex")});DM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.width=this.width,e.granularity=this.granularity,e.material=this.material,e.depthFailMaterial=this.depthFailMaterial,e.arcType=this.arcType,e.clampToGround=this.clampToGround,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new DM(this)};DM.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.width=this.width??e.width,this.granularity=this.granularity??e.granularity,this.material=this.material??e.material,this.depthFailMaterial=this.depthFailMaterial??e.depthFailMaterial,this.arcType=this.arcType??e.arcType,this.clampToGround=this.clampToGround??e.clampToGround,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var el=DM;function RM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._shape=void 0,this._shapeSubscription=void 0,this._cornerType=void 0,this._cornerTypeSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubsription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(RM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),positions:me("positions"),shape:me("shape"),cornerType:me("cornerType"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});RM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.shape=this.shape,e.cornerType=this.cornerType,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new RM(this)};RM.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.shape=this.shape??e.shape,this.cornerType=this.cornerType??e.cornerType,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var kx=RM;function OM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(OM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),coordinates:me("coordinates"),height:me("height"),heightReference:me("heightReference"),extrudedHeight:me("extrudedHeight"),extrudedHeightReference:me("extrudedHeightReference"),rotation:me("rotation"),stRotation:me("stRotation"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition"),classificationType:me("classificationType"),zIndex:me("zIndex")});OM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new OM(this)};OM.prototype.merge=function(e){this.show=this.show??e.show,this.coordinates=this.coordinates??e.coordinates,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var Qh=OM;function MM(e){this._definitionChanged=new be,this._show=void 0,this._showSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._minimumHeights=void 0,this._minimumHeightsSubscription=void 0,this._maximumHeights=void 0,this._maximumHeightsSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(e??H.EMPTY_OBJECT)}Object.defineProperties(MM.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:me("show"),positions:me("positions"),minimumHeights:me("minimumHeights"),maximumHeights:me("maximumHeights"),granularity:me("granularity"),fill:me("fill"),material:ro("material"),outline:me("outline"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth"),shadows:me("shadows"),distanceDisplayCondition:me("distanceDisplayCondition")});MM.prototype.clone=function(e){return l(e)?(e.show=this.show,e.positions=this.positions,e.minimumHeights=this.minimumHeights,e.maximumHeights=this.maximumHeights,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new MM(this)};MM.prototype.merge=function(e){this.show=this.show??e.show,this.positions=this.positions??e.positions,this.minimumHeights=this.minimumHeights??e.minimumHeights,this.maximumHeights=this.maximumHeights??e.maximumHeights,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition};var Cg=MM;var M5e=new he,cK=[];function N5e(e){return new Gl(e)}function L5e(e){return me(e,void 0,N5e)}function Fa(e,t){return me(e,void 0,function(n){return n instanceof t?n:new t(n)})}function Od(e){e=e??H.EMPTY_OBJECT;let t=e.id;l(t)||(t=$n()),this._availability=void 0,this._id=t,this._definitionChanged=new be,this._name=e.name,this._show=e.show??!0,this._trackingReferenceFrame=e.trackingReferenceFrame??gg.AUTODETECT,this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall",...cK],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function lK(e,t,n){let i=t.length;for(let r=0;r<i;r++){let o=t[r],s=o._show;(!n&&s)!==(n&&s)&&lK(o,o._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(Od.prototype,{availability:Wl("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:Wl("name"),show:{get:function(){return this._show},set:function(e){if(e===this._show)return;let t=this.isShowing;this._show=e;let n=this.isShowing;t!==n&&lK(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},trackingReferenceFrame:Wl("trackingReferenceFrame"),isShowing:{get:function(){return this._show&&(!l(this.entityCollection)||this.entityCollection.show)&&(!l(this._parent)||this._parent.isShowing)}},parent:{get:function(){return this._parent},set:function(e){let t=this._parent;if(t===e)return;let n=this.isShowing;if(l(t)){let r=t._children.indexOf(this);t._children.splice(r,1)}this._parent=e,l(e)&&e._children.push(this);let i=this.isShowing;n!==i&&lK(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Fa("billboard",qc),box:Fa("box",Px),corridor:Fa("corridor",Rx),cylinder:Fa("cylinder",Ox),description:me("description"),ellipse:Fa("ellipse",Mx),ellipsoid:Fa("ellipsoid",Nx),label:Fa("label",Jh),model:Fa("model",Tg),tileset:Fa("tileset",Fx),orientation:me("orientation"),path:Fa("path",Eg),plane:Fa("plane",wM),point:Fa("point",Bx),polygon:Fa("polygon",Zh),polyline:Fa("polyline",el),polylineVolume:Fa("polylineVolume",kx),properties:Fa("properties",ql),position:L5e("position"),rectangle:Fa("rectangle",Qh),viewFrom:me("viewFrom"),wall:Fa("wall",Cg)});Od.registerEntityType=function(e,t){Object.defineProperties(Od.prototype,{[e]:Fa(e,t)}),cK.includes(e)||cK.push(e)};Od.prototype.isAvailable=function(e){let t=this._availability;return!l(t)||t.contains(e)};Od.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,Wl(e,!0))};Od.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e]};Od.prototype.merge=function(e){this.name=this.name??e.name,this.availability=this.availability??e.availability;let t=this._propertyNames,n=l(e._propertyNames)?e._propertyNames:Object.keys(e),i=n.length;for(let r=0;r<i;r++){let o=n[r];if(o==="parent"||o==="name"||o==="availability"||o==="children")continue;let s=this[o],a=e[o];!l(s)&&t.indexOf(o)===-1&&this.addProperty(o),l(a)&&(l(s)?l(s.merge)&&s.merge(a):l(a.merge)&&l(a.clone)?this[o]=a.clone():this[o]=a)}};var $me=new $,Jme=new h,Zme=new Le;Od.prototype.computeModelMatrix=function(e,t){let n=X.getValueOrUndefined(this._position,e,Jme);if(!l(n))return;let i=X.getValueOrUndefined(this._orientation,e,Zme);return l(i)?t=N.fromRotationTranslation($.fromQuaternion(i,$me),n,t):t=At.eastNorthUpToFixedFrame(n,void 0,t),t};Od.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,r){let o=X.getValueOrDefault(t,e,We.NONE),s=X.getValueOrUndefined(this._position,e,Jme);if(o===We.NONE||!l(s)||h.equalsEpsilon(s,h.ZERO,D.EPSILON8))return this.computeModelMatrix(e,r);let a=i.cartesianToCartographic(s,M5e);o===We.CLIP_TO_GROUND?a.height<n&&(a.height=n):_s(o)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);let c=X.getValueOrUndefined(this._orientation,e,Zme);return l(c)?r=N.fromRotationTranslation($.fromQuaternion(c,$me),s,r):r=At.eastNorthUpToFixedFrame(s,void 0,r),r};Od.supportsMaterialsforEntitiesOnTerrain=function(e){return Vl.supportsMaterials(e)};Od.supportsPolylinesOnTerrain=function(e){return Kh.isSupported(e)};var Jr=Od;var F5e=new Kt(z.WHITE),B5e=new li(!0),k5e=new li(!0),U5e=new li(!1),z5e=new li(z.BLACK),V5e=new li(Dn.DISABLED),j5e=new li(new jt),H5e=new li(Qn.BOTH);function Yl(e){let t=e.entity,n=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new be,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=n,this._id=`${n}-${t.id}`,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=Jr.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(Yl.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)&&X.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)&&X.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}});Yl.prototype.isOutlineVisible=function(e){let t=this._entity;return(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e))??!1};Yl.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e))??!1};Yl.prototype.createFillGeometryInstance=pe.throwInstantiationError;Yl.prototype.createOutlineGeometryInstance=pe.throwInstantiationError;Yl.prototype.isDestroyed=function(){return!1};Yl.prototype.destroy=function(){le(this)};Yl.prototype._isHidden=function(e,t){let n=t.show;return l(n)&&n.isConstant&&!n.getValue(tt.MINIMUM_VALUE)};Yl.prototype._isOnTerrain=function(e,t){return!1};Yl.prototype._getIsClosed=function(e){return!0};Yl.prototype._isDynamic=pe.throwInstantiationError;Yl.prototype._setStaticOptions=pe.throwInstantiationError;Yl.prototype._onEntityPropertyChanged=function(e,t,n,i){if(this._observedPropertyNames.indexOf(t)===-1)return;let r=this._entity[this._geometryPropertyName];if(!l(r)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let o=r.fill,s=l(o)&&o.isConstant?o.getValue(tt.MINIMUM_VALUE):!0,a=r.outline,c=l(a);if(c&&a.isConstant&&(c=a.getValue(tt.MINIMUM_VALUE)),!s&&!c){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let u=r.show;if(this._isHidden(e,r)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}this._materialProperty=r.material??F5e,this._fillProperty=o??k5e,this._showProperty=u??B5e,this._showOutlineProperty=r.outline??U5e,this._outlineColorProperty=c?r.outlineColor??z5e:void 0,this._shadowsProperty=r.shadows??V5e,this._distanceDisplayConditionProperty=r.distanceDisplayCondition??j5e,this._classificationTypeProperty=r.classificationType??H5e,this._fillEnabled=s;let f=this._isOnTerrain(e,r)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Kt);if(c&&f&&(_t(_t.geometryOutlines),c=!1),this._onTerrain=f,this._outlineEnabled=c,this._isDynamic(e,r))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,r),this._isClosed=this._getIsClosed(this._options);let d=r.outlineWidth;this._outlineWidth=l(d)?d.getValue(tt.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Yl.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)};var Pi=Yl;function Mv(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new be,this.setCallback(e,t)}Object.defineProperties(Mv.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var G5e=new K;Mv.prototype.getValue=function(e,t){return l(e)||(e=K.now(G5e)),this._callback(e,t)};Mv.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};Mv.prototype.equals=function(e){return this===e||e instanceof Mv&&this._callback===e._callback&&this._isConstant===e._isConstant};var em=Mv;var Qme=new h;function Nv(e,t,n,i){this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new h,this._cartographicPosition=new he,this._normal=new h,this._definitionChanged=new be,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;let r=this;if(l(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){r._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){r._updateClamping()})),t.isConstant){let o=t.getValue(tt.MINIMUM_VALUE,Qme);if(!l(o)||h.equals(o,h.ZERO)||!l(e.globe))return;this._position=h.clone(o,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(o,this._normal)}}Object.defineProperties(Nv.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});Nv.prototype._updateClamping=function(){l(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(h.equals(t,h.ZERO)){this._terrainHeight=0;return}let i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),r=e.getHeight(i,this._heightReference);l(r)?this._terrainHeight=r:this._terrainHeight=0;let o=s=>{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,o,this._heightReference)};var W5e=new K;Nv.prototype.getValue=function(e,t){l(e)||(e=K.now(W5e));let n=X.getValueOrDefault(this._heightReference,e,We.NONE),i=X.getValueOrDefault(this._extrudedHeightReference,e,We.NONE);if(n===We.NONE&&!Fy(i))return this._position=h.clone(h.ZERO,this._position),h.clone(h.ZERO,t);if(this._positionProperty.isConstant&&n!==We.CLIP_TO_GROUND)return h.multiplyByScalar(this._normal,this._terrainHeight,t);let r=this._scene,o=this._positionProperty.getValue(e,Qme);if(!l(o)||h.equals(o,h.ZERO)||!l(r.globe))return h.clone(h.ZERO,t);if(h.equalsEpsilon(this._position,o,D.EPSILON10)&&n!==We.CLIP_TO_GROUND)return h.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=h.clone(o,this._position),this._updateClamping();let s=r.ellipsoid.geodeticSurfaceNormal(o,this._normal);if(n===We.CLIP_TO_GROUND){let c=r.globe.ellipsoid.cartesianToCartographic(o,scratchCarto);return this._terrainHeight>=c.height?h.multiplyByScalar(s,this._terrainHeight-c.height,t):h.clone(h.ZERO,t)}return h.multiplyByScalar(s,this._terrainHeight,t)};Nv.prototype.isDestroyed=function(){return!1};Nv.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),le(this)};var Ux=Nv;function q5e(e,t,n,i){if(Pi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let r=this._entity[this._geometryPropertyName];if(!l(r))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let o=r.heightReference;if(l(o)){let s=new em(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Ux(this._scene,s,o)}}var vg=q5e;var epe=h.ZERO,tpe=new h,Y5e=new h,npe=new z;function X5e(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function wf(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new X5e(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(wf.prototype=Object.create(Pi.prototype),wf.prototype.constructor=wf);Object.defineProperties(wf.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});wf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),o=Kn.fromDistanceDisplayCondition(r),s={show:i,distanceDisplayCondition:o,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,npe)),l(a)||(a=z.WHITE),s.color=Jt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,epe,tpe))),new Ft({id:t,geometry:Ic.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};wf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,npe),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,epe,tpe))),new Ft({id:t,geometry:Hh.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:o})};wf.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};wf.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||Pi.prototype._isHidden.call(this,e,t)};wf.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.dimensions.isConstant||!X.isConstant(t.outlineWidth)};wf.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(tt.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==We.NONE?mn.ALL:void 0};wf.prototype._onEntityPropertyChanged=vg;wf.DynamicGeometryUpdater=Lv;function Lv(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Lv.prototype=Object.create(Ii.prototype),Lv.prototype.constructor=Lv);Lv.prototype._isHidden=function(e,t,n){let i=X.getValueOrUndefined(e.position,n,Y5e),r=this._options.dimensions;return!l(i)||!l(r)||Ii.prototype._isHidden.call(this,e,t,n)};Lv.prototype._setOptions=function(e,t,n){let i=X.getValueOrDefault(t.heightReference,n,We.NONE),r=this._options;r.dimensions=X.getValueOrUndefined(t.dimensions,n,r.dimensions),r.offsetAttribute=i!==We.NONE?mn.ALL:void 0};var NM=wf;function zx(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=n??ji.FIXED,this._definitionChanged=new be,this.setCallback(e,t)}Object.defineProperties(zx.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var K5e=new K;zx.prototype.getValue=function(e,t){return l(e)||(e=K.now(K5e)),this.getValueInReferenceFrame(e,ji.FIXED,t)};zx.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};zx.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._callback(e,n);return $h.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};zx.prototype.equals=function(e){return this===e||e instanceof zx&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var LM=zx;/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function ipe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function $5e(e){if(Array.isArray(e))return e}function J5e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);c=!0);}catch(f){u=!0,r=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function Z5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q5e(e,t){return $5e(e)||J5e(e,t)||e9e(e,t)||Z5e()}function e9e(e,t){if(e){if(typeof e=="string")return ipe(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ipe(e,t):void 0}}var ype=Object.entries,rpe=Object.setPrototypeOf,t9e=Object.isFrozen,n9e=Object.getPrototypeOf,i9e=Object.getOwnPropertyDescriptor,Ba=Object.freeze,lc=Object.seal,Fv=Object.create,Ape=typeof Reflect<"u"&&Reflect,gK=Ape.apply,_K=Ape.construct;Ba||(Ba=function(t){return t});lc||(lc=function(t){return t});gK||(gK=function(t,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return t.apply(n,r)});_K||(_K=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return new t(...i)});var jx=pa(Array.prototype.forEach),r9e=pa(Array.prototype.lastIndexOf),ope=pa(Array.prototype.pop),FM=pa(Array.prototype.push),o9e=pa(Array.prototype.splice),Bv=Array.isArray,UM=pa(String.prototype.toLowerCase),uK=pa(String.prototype.toString),spe=pa(String.prototype.match),BM=pa(String.prototype.replace),ape=pa(String.prototype.indexOf),s9e=pa(String.prototype.trim),a9e=pa(Number.prototype.toString),c9e=pa(Boolean.prototype.toString),cpe=typeof BigInt>"u"?null:pa(BigInt.prototype.toString),lpe=typeof Symbol>"u"?null:pa(Symbol.prototype.toString),Lu=pa(Object.prototype.hasOwnProperty),kM=pa(Object.prototype.toString),tl=pa(RegExp.prototype.test),Vx=l9e(TypeError);function pa(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return gK(e,t,i)}}function l9e(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return _K(e,n)}}function Ir(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:UM;if(rpe&&rpe(e,null),!Bv(t))return e;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=n(r);o!==r&&(t9e(t)||(t[i]=o),r=o)}e[r]=!0}return e}function u9e(e){for(let t=0;t<e.length;t++)Lu(e,t)||(e[t]=null);return e}function Pf(e){let t=Fv(null);for(let i of ype(e)){var n=Q5e(i,2);let r=n[0],o=n[1];Lu(e,r)&&(Bv(o)?t[r]=u9e(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=Pf(o):t[r]=o)}return t}function f9e(e){switch(typeof e){case"string":return e;case"number":return a9e(e);case"boolean":return c9e(e);case"bigint":return cpe?cpe(e):"0";case"symbol":return lpe?lpe(e):"Symbol()";case"undefined":return kM(e);case"function":case"object":{if(e===null)return kM(e);let t=e,n=tm(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:kM(i)}return kM(e)}default:return kM(e)}}function tm(e,t){for(;e!==null;){let i=i9e(e,t);if(i){if(i.get)return pa(i.get);if(typeof i.value=="function")return pa(i.value)}e=n9e(e)}function n(){return null}return n}function d9e(e){try{return tl(e,""),!0}catch{return!1}}var upe=Ba(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fK=Ba(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dK=Ba(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),h9e=Ba(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hK=Ba(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),m9e=Ba(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fpe=Ba(["#text"]),dpe=Ba(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),mK=Ba(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hpe=Ba(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),C6=Ba(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),p9e=lc(/{{[\w\W]*|^[\w\W]*}}/g),g9e=lc(/<%[\w\W]*|^[\w\W]*%>/g),_9e=lc(/\${[\w\W]*/g),y9e=lc(/^data-[\-\w.\u00B7-\uFFFF]+$/),A9e=lc(/^aria-[\-\w]+$/),mpe=lc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),b9e=lc(/^(?:\w+script|data):/i),x9e=lc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T9e=lc(/^html$/i),E9e=lc(/^[a-z][.\w]*(-[.\w]+)+$/i),ppe=lc(/<[/\w!]/g),gpe=lc(/<[/\w]/g),C9e=lc(/<\/no(script|embed|frames)/i),v9e=lc(/\/>/i),If={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bpe=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],S9e=Ba(Ir({},bpe)),w9e=(function(){let e={};return jx(bpe,t=>{e[t]=lc(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ba(e)})(),I9e=function(){return typeof window>"u"?null:window},P9e=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},_pe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wy=function(t,n,i,r){return Lu(t,n)&&Bv(t[n])?Ir(r.base?Pf(r.base):{},t[n],r.transform):i},pK=function(t,n,i){let r=Lu(t,n)?t[n]:void 0;return r&&typeof r=="object"?Pf(r):i()};function xpe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I9e(),t=Ct=>xpe(Ct);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==If.document||!e.Element)return t.isSupported=!1,t;let n=e.document,i=n,r=i.currentScript;e.DocumentFragment;let o=e.HTMLTemplateElement,s=e.Node,a=e.Element,c=e.NodeFilter,u=e.NamedNodeMap;u===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let f=e.DOMParser,d=e.trustedTypes,p=a.prototype,g=tm(p,"cloneNode"),m=tm(p,"remove"),y=tm(p,"nextSibling"),A=tm(p,"childNodes"),b=tm(p,"parentNode"),x=tm(p,"shadowRoot"),T=tm(p,"attributes"),E=s&&s.prototype?tm(s.prototype,"nodeType"):null,v=s&&s.prototype?tm(s.prototype,"nodeName"):null,S=s&&s.prototype?tm(s.prototype,"ownerDocument"):null,I=function(ye){return E?E(ye):ye.nodeType},R=function(ye){return v?v(ye):ye.nodeName};if(typeof o=="function"){let Ct=n.createElement("template");Ct.content&&Ct.content.ownerDocument&&(n=Ct.content.ownerDocument)}let O,L="",_,C=!1,w=0,P=function(){if(w>0)throw Vx('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},M=function(ye){P(),w++;try{return O.createHTML(ye)}finally{w--}},F=function(ye){P(),w++;try{return O.createScriptURL(ye)}finally{w--}},V=function(){return C||(_=P9e(d,r),C=!0),_},B=n,j=B.implementation,k=B.createNodeIterator,G=B.createDocumentFragment,q=B.getElementsByTagName,Q=i.importNode,W=_pe();t.isSupported=typeof ype=="function"&&typeof b=="function"&&j&&j.createHTMLDocument!==void 0;let J=p9e,Z=g9e,ae=_9e,Ae=y9e,fe=A9e,xe=b9e,ge=x9e,we=E9e,Se=mpe,Re=null,Qe=Ir({},[...upe,...fK,...dK,...hK,...fpe]),He=null,Xe=Ir({},[...dpe,...mK,...hpe,...C6]),$e=Object.seal(Fv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,qe=null,st=Object.seal(Fv(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),vt=!0,Gt=!0,lt=!1,mt=!0,ft=!1,Xt=!0,rt=!1,ht=!1,Bi=null,Xn=null,bi=!1,Wi=!1,wi=!1,hi=!1,xi=!0,jn=!1,nn="user-content-",Wn=!0,Zi=!1,Mr={},fo=null,Bs=Ir({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Ks=null,no=Ir({},["audio","video","img","source","image","track"]),gi=null,ho=Ir({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ur="http://www.w3.org/1998/Math/MathML",Zo="http://www.w3.org/2000/svg",Bn="http://www.w3.org/1999/xhtml",qi=Bn,ki=!1,Nr=null,Wc=Ir({},[ur,Zo,Bn],uK),bd=Ba(["mi","mo","mn","ms","mtext"]),xp=Ir({},bd),Nh=Ba(["annotation-xml"]),da=Ir({},Nh),Tp=Ir({},["title","style","font","a","script"]),ks=null,tc=["application/xhtml+xml","text/html"],Kb="text/html",ri=null,Kr=null,Ol=n.createElement("form"),Z0=function(ye){return ye instanceof RegExp||ye instanceof Function},Ma=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kr&&Kr===ye)return;(!ye||typeof ye!="object")&&(ye={}),ye=Pf(ye),ks=tc.indexOf(ye.PARSER_MEDIA_TYPE)===-1?Kb:ye.PARSER_MEDIA_TYPE,ri=ks==="application/xhtml+xml"?uK:UM,Re=Wy(ye,"ALLOWED_TAGS",Qe,{transform:ri}),He=Wy(ye,"ALLOWED_ATTR",Xe,{transform:ri}),Nr=Wy(ye,"ALLOWED_NAMESPACES",Wc,{transform:uK}),gi=Wy(ye,"ADD_URI_SAFE_ATTR",ho,{transform:ri,base:ho}),Ks=Wy(ye,"ADD_DATA_URI_TAGS",no,{transform:ri,base:no}),fo=Wy(ye,"FORBID_CONTENTS",Bs,{transform:ri}),Pe=Wy(ye,"FORBID_TAGS",Pf({}),{transform:ri}),qe=Wy(ye,"FORBID_ATTR",Pf({}),{transform:ri}),Mr=Lu(ye,"USE_PROFILES")?ye.USE_PROFILES&&typeof ye.USE_PROFILES=="object"?Pf(ye.USE_PROFILES):ye.USE_PROFILES:!1,vt=ye.ALLOW_ARIA_ATTR!==!1,Gt=ye.ALLOW_DATA_ATTR!==!1,lt=ye.ALLOW_UNKNOWN_PROTOCOLS||!1,mt=ye.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ft=ye.SAFE_FOR_TEMPLATES||!1,Xt=ye.SAFE_FOR_XML!==!1,rt=ye.WHOLE_DOCUMENT||!1,Wi=ye.RETURN_DOM||!1,wi=ye.RETURN_DOM_FRAGMENT||!1,hi=ye.RETURN_TRUSTED_TYPE||!1,bi=ye.FORCE_BODY||!1,xi=ye.SANITIZE_DOM!==!1,jn=ye.SANITIZE_NAMED_PROPS||!1,Wn=ye.KEEP_CONTENT!==!1,Zi=ye.IN_PLACE||!1,Se=d9e(ye.ALLOWED_URI_REGEXP)?ye.ALLOWED_URI_REGEXP:mpe,qi=typeof ye.NAMESPACE=="string"?ye.NAMESPACE:Bn,xp=pK(ye,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ir({},bd)),da=pK(ye,"HTML_INTEGRATION_POINTS",()=>Ir({},Nh));let Fe=pK(ye,"CUSTOM_ELEMENT_HANDLING",()=>Fv(null));if($e=Fv(null),Lu(Fe,"tagNameCheck")&&Z0(Fe.tagNameCheck)&&($e.tagNameCheck=Fe.tagNameCheck),Lu(Fe,"attributeNameCheck")&&Z0(Fe.attributeNameCheck)&&($e.attributeNameCheck=Fe.attributeNameCheck),Lu(Fe,"allowCustomizedBuiltInElements")&&typeof Fe.allowCustomizedBuiltInElements=="boolean"&&($e.allowCustomizedBuiltInElements=Fe.allowCustomizedBuiltInElements),lc($e),ft&&(Gt=!1),wi&&(Wi=!0),Mr&&(Re=Ir({},fpe),He=Fv(null),Mr.html===!0&&(Ir(Re,upe),Ir(He,dpe)),Mr.svg===!0&&(Ir(Re,fK),Ir(He,mK),Ir(He,C6)),Mr.svgFilters===!0&&(Ir(Re,dK),Ir(He,mK),Ir(He,C6)),Mr.mathMl===!0&&(Ir(Re,hK),Ir(He,hpe),Ir(He,C6))),st.tagCheck=null,st.attributeCheck=null,Lu(ye,"ADD_TAGS")&&(typeof ye.ADD_TAGS=="function"?st.tagCheck=ye.ADD_TAGS:Bv(ye.ADD_TAGS)&&(Re===Qe&&(Re=Pf(Re)),Ir(Re,ye.ADD_TAGS,ri))),Lu(ye,"ADD_ATTR")&&(typeof ye.ADD_ATTR=="function"?st.attributeCheck=ye.ADD_ATTR:Bv(ye.ADD_ATTR)&&(He===Xe&&(He=Pf(He)),Ir(He,ye.ADD_ATTR,ri))),Lu(ye,"ADD_FORBID_CONTENTS")&&Bv(ye.ADD_FORBID_CONTENTS)&&(fo===Bs&&(fo=Pf(fo)),Ir(fo,ye.ADD_FORBID_CONTENTS,ri)),Wn&&(Re["#text"]=!0),rt&&Ir(Re,["html","head","body"]),Re.table&&(Ir(Re,["tbody"]),delete Pe.tbody),ye.TRUSTED_TYPES_POLICY){if(typeof ye.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vx('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ye.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vx('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let gt=O;O=ye.TRUSTED_TYPES_POLICY;try{L=M("")}catch(on){throw O=gt,on}}else ye.TRUSTED_TYPES_POLICY===null?(O=void 0,L=""):(O===void 0&&(O=V()),O&&typeof L=="string"&&(L=M("")));Ba&&Ba(ye),Kr=ye},Ep=Ir({},[...fK,...dK,...h9e]),Cy=Ir({},[...hK,...m9e]),Sq=function(ye,Fe,gt){return Fe.namespaceURI===Bn?ye==="svg":Fe.namespaceURI===ur?ye==="svg"&&(gt==="annotation-xml"||xp[gt]):!!Ep[ye]},wq=function(ye,Fe,gt){return Fe.namespaceURI===Bn?ye==="math":Fe.namespaceURI===Zo?ye==="math"&&da[gt]:!!Cy[ye]},Iq=function(ye,Fe,gt){return Fe.namespaceURI===Zo&&!da[gt]||Fe.namespaceURI===ur&&!xp[gt]?!1:!Cy[ye]&&(Tp[ye]||!Ep[ye])},Pq=function(ye){let Fe=b(ye);(!Fe||!Fe.tagName)&&(Fe={namespaceURI:qi,tagName:"template"});let gt=UM(ye.tagName),on=UM(Fe.tagName);return Nr[ye.namespaceURI]?ye.namespaceURI===Zo?Sq(gt,Fe,on):ye.namespaceURI===ur?wq(gt,Fe,on):ye.namespaceURI===Bn?Iq(gt,Fe,on):!!(ks==="application/xhtml+xml"&&Nr[ye.namespaceURI]):!1},Cp=function(ye){FM(t.removed,{element:ye});try{b(ye).removeChild(ye)}catch{if(m(ye),!b(ye))throw Vx("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},QC=function(ye,Fe,gt){try{ye.removeAttributeNode(Fe)}catch{try{ye.removeAttribute(gt)}catch{}}},$b=function(ye){Jb(ye);let Fe=A(ye);if(Fe){let on=[];jx(Fe,In=>{FM(on,In)}),jx(on,In=>{try{m(In)}catch{}})}let gt=T(ye);if(gt)for(let on=gt.length-1;on>=0;--on){let In=gt[on],oi=In&&In.name;typeof oi=="string"&&QC(ye,In,oi)}},Lh=function(ye,Fe,gt){if(!gt)try{gt=Fe.getAttributeNode(ye)}catch{gt=null}FM(t.removed,{attribute:gt||null,from:Fe});try{gt?Fe.removeAttributeNode(gt):Fe.removeAttribute(ye)}catch{try{Fe.removeAttribute(ye)}catch{}}if(ye==="is")if(Wi||wi)try{Cp(Fe)}catch{}else try{Fe.setAttribute(ye,"")}catch{}},Dq=function(ye){let Fe=T(ye);if(Fe)for(let gt=Fe.length-1;gt>=0;--gt){let on=Fe[gt],In=on&&on.name;typeof In!="string"||He[ri(In)]||QC(ye,on,In)}},Jb=function(ye){let Fe=[ye];for(;Fe.length>0;){let gt=Fe.pop();I(gt)===If.element&&Dq(gt);let In=A(gt);if(In)for(let oi=In.length-1;oi>=0;--oi)Fe.push(In[oi])}},ev=function(ye,Fe){return Xt?ye==="patchsrc"?!0:ye==="for"&&Fe!=="label"&&Fe!=="output":!1},vp=function(ye){if(!Xt)return;let Fe=[ye];for(;Fe.length>0;){let gt=Fe.pop(),on=I(gt);if(on===If.processingInstruction||on===If.comment&&tl(gpe,gt.data)){try{m(gt)}catch{}continue}if(on===If.element){let oi=gt,So=ri(R(gt));try{oi.hasAttribute&&oi.hasAttribute("patchsrc")&&oi.removeAttribute("patchsrc"),oi.hasAttribute&&oi.hasAttribute("for")&&ev("for",So)&&oi.removeAttribute("for")}catch{}}let In=A(gt);if(In)for(let oi=In.length-1;oi>=0;--oi)Fe.push(In[oi])}},Zb=function(ye){let Fe=null,gt=null;if(bi)ye="<remove></remove>"+ye;else{let oi=spe(ye,/^[\r\n\t ]+/);gt=oi&&oi[0]}ks==="application/xhtml+xml"&&qi===Bn&&(ye='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ye+"</body></html>");let on=O?M(ye):ye;if(qi===Bn)try{Fe=new f().parseFromString(on,ks)}catch{}if(!Fe||!Fe.documentElement){Fe=j.createDocument(qi,"template",null);try{Fe.documentElement.innerHTML=ki?L:on}catch{}}let In=Fe.body||Fe.documentElement;return ye&&gt&&In.insertBefore(n.createTextNode(gt),In.childNodes[0]||null),qi===Bn?q.call(Fe,rt?"html":"body")[0]:rt?Fe.documentElement:In},nD=function(ye){let Fe=S?S(ye):ye.ownerDocument;return k.call(Fe||ye,ye,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},tv=function(ye){return ye=BM(ye,J," "),ye=BM(ye,Z," "),ye=BM(ye,ae," "),ye},vy=function(ye){var Fe;ye.normalize();let gt=S?S(ye):ye.ownerDocument,on=k.call(gt||ye,ye,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),In=on.nextNode();for(;In;)In.data=tv(In.data),In=on.nextNode();let oi=(Fe=ye.querySelectorAll)===null||Fe===void 0?void 0:Fe.call(ye,"template");oi&&jx(oi,So=>{ne(So.content)&&vy(So.content)})},ce=function(ye){let Fe=v?v(ye):null;return typeof Fe!="string"||ri(Fe)!=="form"?!1:typeof ye.nodeName!="string"||typeof ye.textContent!="string"||typeof ye.removeChild!="function"||ye.attributes!==T(ye)||typeof ye.removeAttribute!="function"||typeof ye.setAttribute!="function"||typeof ye.namespaceURI!="string"||typeof ye.insertBefore!="function"||typeof ye.hasChildNodes!="function"||ye.nodeType!==E(ye)||ye.childNodes!==A(ye)},ne=function(ye){if(!E||typeof ye!="object"||ye===null)return!1;try{return E(ye)===If.documentFragment}catch{return!1}},Te=function(ye){if(!E||typeof ye!="object"||ye===null)return!1;try{return typeof E(ye)=="number"}catch{return!1}};function Ce(Ct,ye,Fe){Ct.length!==0&&jx(Ct,gt=>{gt.call(t,ye,Fe,Kr)})}let Ze=function(ye,Fe){return!!(Xt&&ye.hasChildNodes()&&!Te(ye.firstElementChild)&&tl(ppe,ye.textContent)&&tl(ppe,ye.innerHTML)||Xt&&ye.namespaceURI===Bn&&S9e[Fe]&&(Te(ye.firstElementChild)||typeof ye.textContent=="string"&&tl(w9e[Fe],ye.textContent))||ye.nodeType===If.processingInstruction||Xt&&ye.nodeType===If.comment&&tl(gpe,ye.data))},Et=function(ye,Fe){if(ye instanceof RegExp)return tl(ye,Fe);if(ye instanceof Function){for(var gt=arguments.length,on=new Array(gt>2?gt-2:0),In=2;In<gt;In++)on[In-2]=arguments[In];return!!ye(Fe,...on)}return!1},pt=function(ye,Fe,gt){if(!Pe[Fe]&&mo(Fe)&&Et($e.tagNameCheck,Fe))return!1;if(Wn&&!fo[Fe]){let on=b(ye),In=A(ye);if(In&&on){let oi=In.length;for(let So=oi-1;So>=0;--So){let ds=ye===gt?g(In[So],!0):In[So];on.insertBefore(ds,y(ye))}}}return Cp(ye),!0},wt=function(ye,Fe,gt,on){return ye.length===0?Fe:Fe===gt||Fe===on?Pf(Fe):Fe},bn=function(ye,Fe){return ye===Fe||b(ye)!==null?!1:(Zi&&Jb(ye),!0)},qn=function(ye,Fe){if(Ce(W.beforeSanitizeElements,ye,null),bn(ye,Fe))return!0;if(ce(ye))return Cp(ye),!0;let gt=ri(R(ye));if(Re=wt(W.uponSanitizeElement,Re,Qe,Bi),Ce(W.uponSanitizeElement,ye,{tagName:gt,allowedTags:Re}),bn(ye,Fe))return!0;if(Ze(ye,gt))return Cp(ye),!0;if(Pe[gt]||!(st.tagCheck instanceof Function&&st.tagCheck(gt))&&!Re[gt]){let In=pt(ye,gt,Fe);return In===!1&&Ce(W.afterSanitizeElements,ye,null),In}if(I(ye)===If.element&&!Pq(ye)||(gt==="noscript"||gt==="noembed"||gt==="noframes")&&tl(C9e,ye.innerHTML))return Cp(ye),!0;if(ft&&ye.nodeType===If.text){let In=tv(ye.textContent);ye.textContent!==In&&(FM(t.removed,{element:ye.cloneNode()}),ye.textContent=In)}return Ce(W.afterSanitizeElements,ye,null),!1},_n=function(ye,Fe,gt){if(qe[Fe]||ev(Fe,ye)||xi&&(Fe==="id"||Fe==="name")&&(gt in n||gt in Ol))return!1;let on=He[Fe]||st.attributeCheck instanceof Function&&st.attributeCheck(Fe,ye);return Gt&&tl(Ae,Fe)||vt&&tl(fe,Fe)?!0:on?gi[Fe]||tl(Se,BM(gt,ge,""))||(Fe==="src"||Fe==="xlink:href"||Fe==="href")&&ye!=="script"&&ape(gt,"data:")===0&&Ks[ye]||lt&&!tl(xe,BM(gt,ge,""))?!0:!gt:mo(ye)&&Et($e.tagNameCheck,ye)&&Et($e.attributeNameCheck,Fe,ye)||Fe==="is"&&$e.allowCustomizedBuiltInElements&&Et($e.tagNameCheck,gt)},vo=Ir({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mo=function(ye){return!vo[UM(ye)]&&tl(we,ye)},$s=function(ye,Fe,gt,on){if(O&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!gt)switch(d.getAttributeType(ye,Fe)){case"TrustedHTML":return M(on);case"TrustedScriptURL":return F(on)}return on},Sc=function(ye,Fe,gt,on){try{gt?ye.setAttributeNS(gt,Fe,on):ye.setAttribute(Fe,on),ce(ye)?Cp(ye):ope(t.removed)}catch{Lh(Fe,ye)}},Ml=function(ye){Ce(W.beforeSanitizeAttributes,ye,null);let Fe=ye.attributes;if(!Fe||ce(ye))return;He=wt(W.uponSanitizeAttribute,He,Xe,Xn);let gt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He,forceKeepAttr:void 0},on=Fe.length,In=ri(ye.nodeName);for(;on--;){let oi=Fe[on],So=oi.name,ds=oi.namespaceURI,Su=oi.value,wu=ri(So),Rq=Su,Nl=So==="value"?Rq:s9e(Rq);if(gt.attrName=wu,gt.attrValue=Nl,gt.keepAttr=!0,gt.forceKeepAttr=void 0,Ce(W.uponSanitizeAttribute,ye,gt),Nl=gt.attrValue,jn&&(wu==="id"||wu==="name")&&ape(Nl,nn)!==0&&(Lh(So,ye,oi),Nl=nn+Nl),Xt&&tl(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Nl)){Lh(So,ye,oi);continue}if(wu==="attributename"&&spe(Nl,"href")){Lh(So,ye,oi);continue}if(!gt.forceKeepAttr){if(!gt.keepAttr){Lh(So,ye,oi);continue}if(!mt&&tl(v9e,Nl)){Lh(So,ye,oi);continue}if(ft&&(Nl=tv(Nl)),!_n(In,wu,Nl)){Lh(So,ye,oi);continue}Nl=$s(In,wu,ds,Nl),Nl!==Rq&&Sc(ye,So,ds,Nl)}}Ce(W.afterSanitizeAttributes,ye,null)},vu=function(ye){let Fe=null,gt=nD(ye);for(Ce(W.beforeSanitizeShadowDOM,ye,null);Fe=gt.nextNode();)if(Ce(W.uponSanitizeShadowNode,Fe,null),qn(Fe,ye),Ml(Fe),ne(Fe.content)&&vu(Fe.content),I(Fe)===If.element){let on=x(Fe);ne(on)&&(Q0(on),vu(on))}Ce(W.afterSanitizeShadowDOM,ye,null)},Q0=function(ye){let Fe=[{node:ye,shadow:null}];for(;Fe.length>0;){let gt=Fe.pop();if(gt.shadow){vu(gt.shadow);continue}let on=gt.node,oi=I(on)===If.element,So=A(on);if(So)for(let ds=So.length-1;ds>=0;--ds)Fe.push({node:So[ds],shadow:null});if(oi){let ds=v?v(on):null;if(typeof ds=="string"&&ri(ds)==="template"){let Su=on.content;ne(Su)&&Fe.push({node:Su,shadow:null})}}if(oi){let ds=x(on);ne(ds)&&Fe.push({node:null,shadow:ds},{node:ds,shadow:null})}}};return t.sanitize=function(Ct){let ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=null,gt=null,on=null,In=null;if(ki=!Ct,ki&&(Ct="<!-->"),typeof Ct!="string"&&!Te(Ct)&&(Ct=f9e(Ct),typeof Ct!="string"))throw Vx("dirty is not a string, aborting");if(!t.isSupported)return Ct;ht?(Re=Bi,He=Xn):Ma(ye),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(Re=Pf(Re)),W.uponSanitizeAttribute.length>0&&(He=Pf(He)),t.removed=[];let oi=Zi&&typeof Ct!="string"&&Te(Ct);if(oi){vp(Ct);let Su=R(Ct);if(typeof Su=="string"){let wu=ri(Su);if(!Re[wu]||Pe[wu])throw $b(Ct),Vx("root node is forbidden and cannot be sanitized in-place")}if(ce(Ct))throw $b(Ct),Vx("root node is clobbered and cannot be sanitized in-place");try{Q0(Ct)}catch(wu){throw $b(Ct),wu}}else if(Te(Ct))Fe=Zb("<!---->"),gt=Fe.ownerDocument.importNode(Ct,!0),gt.nodeType===If.element&&gt.nodeName==="BODY"||gt.nodeName==="HTML"?Fe=gt:Fe.appendChild(gt),Q0(gt);else{if(!Wi&&!ft&&!rt&&Ct.indexOf("<")===-1)return O&&hi?M(Ct):Ct;if(Fe=Zb(Ct),!Fe)return Wi?null:hi?L:""}Fe&&bi&&Cp(Fe.firstChild);let So=oi?Ct:Fe;try{let Su=nD(So);for(;on=Su.nextNode();)qn(on,So),Ml(on),ne(on.content)&&vu(on.content)}catch(Su){throw oi&&($b(Ct),jx(t.removed,wu=>{wu.element&&Jb(wu.element)})),Su}if(oi)return jx(t.removed,Su=>{Su.element&&Jb(Su.element)}),ft&&vy(Ct),Ct;if(Wi){if(ft&&vy(Fe),wi)for(In=G.call(Fe.ownerDocument);Fe.firstChild;)In.appendChild(Fe.firstChild);else In=Fe;return(He.shadowroot||He.shadowrootmode)&&(In=Q.call(i,In,!0)),In}let ds=rt?Fe.outerHTML:Fe.innerHTML;return rt&&Re["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&tl(T9e,Fe.ownerDocument.doctype.name)&&(ds="<!DOCTYPE "+Fe.ownerDocument.doctype.name+`>
`+ds),ft&&(ds=tv(ds)),O&&hi?M(ds):ds},t.setConfig=function(){let Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ma(Ct),ht=!0,Bi=Re,Xn=He},t.clearConfig=function(){Kr=null,ht=!1,Bi=null,Xn=null,O=_,L=""},t.isValidAttribute=function(Ct,ye,Fe){Kr||Ma({});let gt=ri(Ct),on=ri(ye);return _n(gt,on,Fe)},t.addHook=function(Ct,ye){typeof ye=="function"&&Lu(W,Ct)&&FM(W[Ct],ye)},t.removeHook=function(Ct,ye){if(Lu(W,Ct)){if(ye!==void 0){let Fe=r9e(W[Ct],ye);return Fe===-1?void 0:o9e(W[Ct],Fe,1)[0]}return ope(W[Ct])}},t.removeHooks=function(Ct){Lu(W,Ct)&&(W[Ct]=[])},t.removeAllHooks=function(){W=_pe()},t}var Tpe=xpe();var D9e=0,yK={},AK=class e{constructor(t,n){let i,r=t;l(yK[r])?i=yK[r]:(i=D9e++,yK[r]=i),n=n??!1,this._id=i,this._html=t,this._showOnScreen=n,this._element=void 0}get html(){return this._html}get id(){return this._id}get showOnScreen(){return this._showOnScreen}set showOnScreen(t){this._showOnScreen=t}get element(){if(!l(this._element)){let t=Tpe.sanitize(this._html),n=document.createElement("div");n.className="cesium-credit-wrapper",n._creditId=this._id,n.style.display="inline",n.innerHTML=t;let i=n.querySelectorAll("a");for(let r=0;r<i.length;r++)i[r].setAttribute("target","_blank");this._element=n}return this._element}static equals(t,n){return t===n||l(t)&&l(n)&&t._id===n._id&&t._showOnScreen===n._showOnScreen}equals(t){return e.equals(this,t)}isIon(){return this.html.indexOf("ion-credit.png")!==-1}static getIonCredit(t){let n=l(t.collapsible)&&!t.collapsible;return new e(t.html,n)}static clone(t){if(l(t))return new e(t.html,t.showOnScreen)}},It=AK;function R9e(e,t){_t(e,t)}var qr=R9e;function Hx(e){this._url=e,this._cubeMapBuffers=void 0,this._texture=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._errorEvent=new be}Object.defineProperties(Hx.prototype,{url:{get:function(){return this._url}},errorEvent:{get:function(){return this._errorEvent}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}}});Hx.isSupported=function(e){return(e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat)&&e.supportsTextureLod};function bK(e){e._cubeMapBuffers=void 0}Hx.prototype.update=function(e){let{context:t}=e;if(!Hx.isSupported(t))return;if(l(this._texture)){bK(this);return}if(!l(this._texture)&&!this._loading){let f=t.textureCache.getTexture(this._url);l(f)&&(bK(this),this._texture=f,this._maximumMipmapLevel=this._texture.maximumMipmapLevel,this._ready=!0)}let n=this._cubeMapBuffers;if(!l(n)&&!this._loading){let f=this;Ou(this._url).then(function(d){f._cubeMapBuffers=d,f._loading=!1}).catch(function(d){f.isDestroyed()||f._errorEvent.raiseEvent(d)}),this._loading=!0}if(!l(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;l(i)||(i=t.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT);let r=Ke.RGBA,o=n.length;this._maximumMipmapLevel=o-1;let s=n[0].positiveX.width,a=Math.log2(s)+1;if(o!==a){let f={};Object.values(ts.FaceName).forEach(d=>{f[d]=void 0});for(let d=o;d<a;d++)n.push(f)}let c=new Ht({minificationFilter:Wt.LINEAR_MIPMAP_LINEAR}),u=new ts({context:t,source:n[0],flipY:!1,pixelDatatype:i,pixelFormat:r,sampler:c});u.loadMipmaps(n.slice(1)),this._texture=u,this._texture.maximumMipmapLevel=this._maximumMipmapLevel,t.textureCache.addTexture(this._url,this._texture),this._ready=!0};Hx.prototype.isDestroyed=function(){return!1};Hx.prototype.destroy=function(){return bK(this),this._texture=this._texture&&this._texture.destroy(),le(this)};var nm=Hx;function zM(e){e=e??H.EMPTY_OBJECT;let t=l(e.imageBasedLightingFactor)?U.clone(e.imageBasedLightingFactor):new U(1,1);this._imageBasedLightingFactor=t;let n=e.sphericalHarmonicCoefficients;this._sphericalHarmonicCoefficients=n,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentCubeMap=void 0,this._specularEnvironmentCubeMapDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousFrameContext=void 0,this._previousImageBasedLightingFactor=U.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(zM.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){this._previousImageBasedLightingFactor=U.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=U.clone(e,this._imageBasedLightingFactor)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentCubeMapDirty=this._specularEnvironmentCubeMapDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},specularEnvironmentCubeMap:{get:function(){return this._specularEnvironmentCubeMap}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready||this._useDefaultSpecularMaps}}});function O9e(e,t){if(nm.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new nm(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}zM.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber&&e.context===this._previousFrameContext)return;this._previousFrameNumber=e.frameNumber;let t=this._previousFrameContext=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;U.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=U.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentCubeMapDirty&&(O9e(this,t),this._specularEnvironmentCubeMapDirty=!1),l(this._specularEnvironmentCubeMap)&&(this._specularEnvironmentCubeMap.update(e),this._specularEnvironmentCubeMap.ready&&(this._specularEnvironmentMapLoaded=!0));let r=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,o=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||r||o||s||a,this._useDefaultSpecularMaps=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};zM.prototype.isDestroyed=function(){return!1};zM.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),le(this)};var Gx=zM;var TK=Qo(xf(),1);var xK,Epe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6ImwwendUTkl3UVk5Uk5XdEkiLCJqdGkiOiJjZGFkZDZlNC0wMDI5LTQ5OTMtYWIwMC01ZWY4ZDVlNTBhMzYiLCJpZCI6MjU5LCJzdWIiOiJDZXNpdW1KUyIsImlzcyI6Imh0dHBzOi8vYXBpLmNlc2l1bS5jb20iLCJhdWQiOiIxLjE0NSBSZWxlYXNlIC0gRGVsZXRlIG9uIE5vdmVtYmVyIDEsIDIwMjYiLCJpYXQiOjE3ODc2MzQ3NzV9.3SPieoGxEZ22pnWLETAIFZveR0xXTzvOh8G4NYTxDSo",v6={};v6.defaultAccessToken=Epe;v6.defaultServer=new De({url:"https://api.cesium.com/"});v6.getDefaultTokenCredit=function(e){if(e===Epe){if(!l(xK)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;xK=new It(t,!0)}return xK}};var Fu=v6;function nl(e,t){let n,i=e.externalType,r=l(i);if(!r)n={url:e.url,retryAttempts:1,retryCallback:M9e};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new oe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=r?void 0:new TK.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=r,this.refreshCallback=void 0}l(Object.create)&&(nl.prototype=Object.create(De.prototype),nl.prototype.constructor=nl);nl.fromAssetId=function(e,t){let n=nl._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new nl(i,n)})};Object.defineProperties(nl.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=nl.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});nl.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(It.getIonCredit),i=Fu.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(It.clone(i)),n};nl.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=Object.create(nl.prototype),De.call(e,{url:this._url,parseUrl:!1}),e._ionEndpoint=t._ionEndpoint,e._ionEndpointDomain=t._ionEndpointDomain,e._ionEndpointResource=t._ionEndpointResource,e._ionRoot=void 0,e._pendingPromise=void 0,e._credits=void 0,e._isExternal=this._isExternal,e.refreshCallback=void 0),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};nl.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};nl.prototype._makeRequest=function(e){return this._isExternal||new TK.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(e.headers=EK(e.headers),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};nl._createEndpointResource=function(e,t){t=t??H.EMPTY_OBJECT;let n=t.server??Fu.defaultServer,i=t.accessToken??Fu.defaultAccessToken;n=De.createIfNeeded(n);let r={url:`v1/assets/${e}/endpoint`};return l(i)&&(r.queryParameters={access_token:i}),l(t.queryParameters)&&(r.queryParameters={...r.queryParameters,...t.queryParameters}),r.headers=EK(r.headers),n.getDerivedResource(r)};function EK(e={}){return e["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e["X-Cesium-Client-Version"]=CESIUM_VERSION),e}nl._addClientHeaders=EK;function M9e(e,t){let n=e._ionRoot??e,i=n._ionEndpointResource,r=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(r&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(o){let s=e.refreshCallback??n.refreshCallback;return l(s)&&s(n,o),n._ionEndpoint=o,n._ionEndpoint}).finally(function(o){return n._pendingPromise=void 0,o})),n._pendingPromise.then(function(o){return e._ionEndpoint=o,!0}))}var Ho=nl;function Bp(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(Bp.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});Bp.prototype.get=function(e){return this._array[e]};Bp.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};Bp.prototype.peek=function(){return this._array[this._length-1]};Bp.prototype.push=function(e){let t=this.length++;this._array[t]=e};Bp.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};Bp.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};Bp.prototype.resize=function(e){this.length=e};Bp.prototype.trim=function(e){e=e??this._length,this._array.length=e};var Xl=Bp;function S6(e){e=e??H.EMPTY_OBJECT,this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}S6.ALL=Object.freeze(new S6({color:new z(0,0,0,0),depth:1,stencil:0}));S6.prototype.execute=function(e,t){e.clear(this,t)};var ui=S6;var kp={X:0,Y:1,Z:2};kp.Y_UP_TO_Z_UP=N.fromRotationTranslation($.fromArray([1,0,0,0,0,1,0,-1,0]));kp.Z_UP_TO_Y_UP=N.fromRotationTranslation($.fromArray([1,0,0,0,0,-1,0,1,0]));kp.X_UP_TO_Z_UP=N.fromRotationTranslation($.fromArray([0,0,1,0,1,0,-1,0,0]));kp.Z_UP_TO_X_UP=N.fromRotationTranslation($.fromArray([0,0,-1,0,1,0,1,0,0]));kp.X_UP_TO_Y_UP=N.fromRotationTranslation($.fromArray([0,1,0,-1,0,0,0,0,1]));kp.Y_UP_TO_X_UP=N.fromRotationTranslation($.fromArray([0,-1,0,1,0,0,0,0,1]));kp.fromName=function(e){return kp[e]};Object.freeze(kp);var Hi=kp;function Md(e){this.planes=e??[]}var VM=[new h,new h,new h];h.clone(h.UNIT_X,VM[0]);h.clone(h.UNIT_Y,VM[1]);h.clone(h.UNIT_Z,VM[2]);var qy=new h,N9e=new h,Cpe=new sn(new h(1,0,0),0);function vpe(e,t){let n=t.normal;return n.x=e.x,n.y=e.y,n.z=e.z,t.distance=e.w,t}Md.fromBoundingSphere=function(e,t){l(t)||(t=new Md);let n=VM.length,i=t.planes;i.length=2*n;let r=e.center,o=e.radius,s=0;for(let a=0;a<n;++a){let c=VM[a],u=i[s],f=i[s+1];l(u)||(u=i[s]=new se),l(f)||(f=i[s+1]=new se),h.multiplyByScalar(c,-o,qy),h.add(r,qy,qy),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,qy),h.multiplyByScalar(c,o,qy),h.add(r,qy,qy),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,N9e),qy),s+=2}return t};Md.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,r=t.length;i<r;++i){let o=e.intersectPlane(vpe(t[i],Cpe));if(o===$t.OUTSIDE)return $t.OUTSIDE;o===$t.INTERSECTING&&(n=!0)}return n?$t.INTERSECTING:$t.INSIDE};Md.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Md.MASK_OUTSIDE||t===Md.MASK_INSIDE)return t;let n=Md.MASK_INSIDE,i=this.planes;for(let r=0,o=i.length;r<o;++r){let s=r<31?1<<r:0;if(r<31&&(t&s)===0)continue;let a=e.intersectPlane(vpe(i[r],Cpe));if(a===$t.OUTSIDE)return Md.MASK_OUTSIDE;a===$t.INTERSECTING&&(n|=s)}return n};Md.MASK_OUTSIDE=4294967295;Md.MASK_INSIDE=0;Md.MASK_INDETERMINATE=2147483647;var ta=Md;function Up(e){e=e??H.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new ta,this._orthographicMatrix=new N}function Spe(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=N.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(Up.prototype,{projectionMatrix:{get:function(){return Spe(this),this._orthographicMatrix}}});var L9e=new h,F9e=new h,B9e=new h,CK=new h;Up.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,r=this.top,o=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,L9e);h.normalize(f,f);let d=F9e;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=B9e;h.multiplyByScalar(f,a,p),h.add(d,p,p);let g=i[0];return l(g)||(g=i[0]=new se),g.x=f.x,g.y=f.y,g.z=f.z,g.w=-h.dot(f,p),h.multiplyByScalar(f,s,p),h.add(d,p,p),g=i[1],l(g)||(g=i[1]=new se),g.x=-f.x,g.y=-f.y,g.z=-f.z,g.w=-h.dot(h.negate(f,CK),p),h.multiplyByScalar(n,o,p),h.add(d,p,p),g=i[2],l(g)||(g=i[2]=new se),g.x=n.x,g.y=n.y,g.z=n.z,g.w=-h.dot(n,p),h.multiplyByScalar(n,r,p),h.add(d,p,p),g=i[3],l(g)||(g=i[3]=new se),g.x=-n.x,g.y=-n.y,g.z=-n.z,g.w=-h.dot(h.negate(n,CK),p),g=i[4],l(g)||(g=i[4]=new se),g.x=t.x,g.y=t.y,g.z=t.z,g.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),g=i[5],l(g)||(g=i[5]=new se),g.x=-t.x,g.y=-t.y,g.z=-t.z,g.w=-h.dot(h.negate(t,CK),p),this._cullingVolume};Up.prototype.getPixelDimensions=function(e,t,n,i,r){Spe(this);let o=this.right-this.left,s=this.top-this.bottom,a=i*o/e,c=i*s/t;return r.x=a,r.y=c,r};Up.prototype.clone=function(e){return l(e)||(e=new Up),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Up.prototype.equals=function(e){return l(e)&&e instanceof Up&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Up.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Up&&D.equalsEpsilon(this.right,e.right,t,n)&&D.equalsEpsilon(this.left,e.left,t,n)&&D.equalsEpsilon(this.top,e.top,t,n)&&D.equalsEpsilon(this.bottom,e.bottom,t,n)&&D.equalsEpsilon(this.near,e.near,t,n)&&D.equalsEpsilon(this.far,e.far,t,n)};var As=Up;function Bu(e){e=e??H.EMPTY_OBJECT,this._offCenterFrustum=new As,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far}Bu.packedLength=4;Bu.pack=function(e,t,n){return n=n??0,t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};Bu.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Bu),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function Yy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(Bu.prototype,{projectionMatrix:{get:function(){return Yy(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return Yy(this),this._offCenterFrustum}}});Bu.prototype.computeCullingVolume=function(e,t,n){return Yy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Bu.prototype.getPixelDimensions=function(e,t,n,i,r){return Yy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,r)};Bu.prototype.clone=function(e){return l(e)||(e=new Bu),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};Bu.prototype.equals=function(e){return!l(e)||!(e instanceof Bu)?!1:(Yy(this),Yy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Bu.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Bu)?!1:(Yy(this),Yy(e),D.equalsEpsilon(this.width,e.width,t,n)&&D.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var gn=Bu;function wpe(e){e=e??H.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(wpe.prototype,{metadata:{get:function(){return this._metadata}}});var Wx=wpe;function Xy(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),Xy.decode(e)}Xy.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};Xy.decodeWithFromCharCode=function(e){let t="",n=k9e(e),i=n.length;for(let r=0;r<i;++r){let o=n[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320))}return t};function jM(e,t,n){return t<=e&&e<=n}function k9e(e){let t=0,n=0,i=0,r=128,o=191,s=[],a=e.length;for(let c=0;c<a;++c){let u=e[c];if(i===0){if(jM(u,0,127)){s.push(u);continue}if(jM(u,194,223)){i=1,t=u&31;continue}if(jM(u,224,239)){u===224&&(r=160),u===237&&(o=159),i=2,t=u&15;continue}if(jM(u,240,244)){u===240&&(r=144),u===244&&(o=143),i=3,t=u&7;continue}throw new oe("String decoding failed.")}if(!jM(u,r,o)){t=i=n=0,r=128,o=191,--c;continue}r=128,o=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?Xy.decode=Xy.decodeWithTextDecoder:Xy.decode=Xy.decodeWithFromCharCode;var ku=Xy;function U9e(e,t){return t=t??0,ku(e,t,Math.min(4,e.length))}var im=U9e;var vK=class e{constructor(t,n,i,r){this._tileset=t,this._tile=n,this._resource=i,l(r)||(r=[]),this._contents=r,this._metadata=void 0,this._group=void 0,this._ready=!1}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t;let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].metadata=t}get batchTable(){}get group(){return this._group}set group(t){this._group=t;let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].group=t}static async fromTileType(t,n,i,r,o,s){o=o??0;let a=new Uint8Array(r),c=new DataView(r);o+=HM;let u=c.getUint32(o,!0);if(u!==1)throw new oe(`Only Composite Tile version 1 is supported. Version ${u} is not.`);o+=HM,o+=HM;let f=c.getUint32(o,!0);o+=HM;let d=i.queryParameters.compositeIndex;l(d)?d=`${d}_`:d="";let p=[];p.length=f;for(let y=0;y<f;++y){let A=im(a,o),b=c.getUint32(o+HM*2,!0),x=s[A],T=`${d}${y}`,E=i.getDerivedResource({queryParameters:{compositeIndex:T}});if(l(x))p[y]=Promise.resolve(x(t,n,E,r,o));else throw new oe(`Unknown tile content type, ${A}, inside Composite tile`);o+=b}let g=await Promise.all(p);return new e(t,n,i,g)}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,r=i.length;for(let o=0;o<r;++o)i[o].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].applyStyle(t)}update(t,n){let i=this._contents,r=i.length,o=!0;for(let s=0;s<r;++s)i[s].update(t,n),o=o&&i[s].ready;!this._ready&&o&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let r,o=Number.POSITIVE_INFINITY,s=this._contents,a=s.length;for(let c=0;c<a;++c){let u=s[c].pick(t,n,i);if(!l(u))continue;let f=h.distance(t.origin,u);f<o&&(r=u,o=f)}if(l(r))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return le(this)}},HM=Uint32Array.BYTES_PER_ELEMENT,GM=vK;function z9e(e,t,n){return JSON.parse(ku(e,t,n))}var Ro=z9e;function il(e){this._id=$n();let t=e.featuresLength;this._showAlphaProperties=void 0,this._batchValues=void 0,this._batchValuesDirty=!1,this._batchTexture=void 0,this._defaultTexture=void 0,this._pickTexture=void 0,this._pickIds=[];let n,i;if(t>0){let r=Math.min(t,Ut.maximumTextureSize),o=Math.ceil(t/Ut.maximumTextureSize),s=1/r,a=s*.5,c=1/o,u=c*.5;n=new U(r,o),i=new se(s,a,c,u)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(il.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},byteLength:{get:function(){let e=0;return l(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),l(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}});il.DEFAULT_COLOR_VALUE=z.WHITE;il.DEFAULT_SHOW_VALUE=!0;function Ipe(e){let t=e._textureDimensions;return t.x*t.y*4}function Ppe(e){if(!l(e._batchValues)){let t=Ipe(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Dpe(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}il.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Dpe(this),i=e*2,r=t?255:0;if(n[i]!==r){n[i]=r;let o=Ppe(this),s=e*4+3;o[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};il.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};il.prototype.getShow=function(e){if(!l(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var V9e=new Array(4);il.prototype.setColor=function(e,t){if(z.equals(t,il.DEFAULT_COLOR_VALUE)&&!l(this._batchValues))return;let n=t.toBytes(V9e),i=n[3],r=Ppe(this),o=e*4,s=Dpe(this),a=e*2;if(r[o]!==n[0]||r[o+1]!==n[1]||r[o+2]!==n[2]||s[a+1]!==i){r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2];let c=s[a+1]!==255,u=s[a]!==0;r[o+3]=u?i:0,s[a+1]=i;let f=i!==255;f&&!c?++this._translucentFeaturesLength:!f&&c&&--this._translucentFeaturesLength,this._batchValuesDirty=!0,l(this._colorChangedCallback)&&this._colorChangedCallback(e,t)}};il.prototype.setAllColor=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};il.prototype.getColor=function(e,t){if(!l(this._batchValues))return z.clone(il.DEFAULT_COLOR_VALUE,t);let n=this._batchValues,i=e*4,r=this._showAlphaProperties,o=e*2;return z.fromBytes(n[i],n[i+1],n[i+2],r[o+1],t)};il.prototype.getPickColor=function(e){return this._pickIds[e]};function Rpe(e,t,n){let i=e._textureDimensions;return new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:Ht.NEAREST})}function j9e(e,t){let n=e._featuresLength;if(!l(e._pickTexture)&&n>0){let i=e._pickIds,r=Ipe(e),o=new Uint8Array(r),s=e._owner,a=e._statistics;for(let c=0;c<n;++c){let u=t.createPickId(s.getFeature(c));i.push(u);let f=u.color,d=c*4;o[d]=z.floatToByte(f.red),o[d+1]=z.floatToByte(f.green),o[d+2]=z.floatToByte(f.blue),o[d+3]=z.floatToByte(f.alpha)}e._pickTexture=Rpe(e,t,o),l(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function H9e(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}il.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&j9e(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,l(this._batchTexture)||(this._batchTexture=Rpe(this,n,this._batchValues),l(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),H9e(this))};il.prototype.isDestroyed=function(){return!1};il.prototype.destroy=function(){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),this._pickTexture=this._pickTexture&&this._pickTexture.destroy();let e=this._pickIds,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return le(this)};var Kl=il;var G9e={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},W9e={SCALAR:void 0,VEC2:U,VEC3:h,VEC4:se,MAT2:Xi,MAT3:$,MAT4:N};function q9e(e){let t=e.componentType,n;typeof t=="string"?n=Y.fromName(t):n=t;let i=G9e[e.type],r=W9e[e.type];return{componentsPerAttribute:i,classType:r,createArrayBufferView:function(o,s,a){return Y.createArrayBufferView(n,o,s,i*a)}}}var Nd=q9e;function Sg(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,this._byteLength=0,Y9e(this,e.extension,e.binaryBody)}Object.defineProperties(Sg.prototype,{byteLength:{get:function(){return this._byteLength}}});function Y9e(e,t,n){let i,r,o,s=t.instancesLength,a=t.classes,c=t.classIds,u=t.parentCounts,f=t.parentIds,d=s,p=0;l(c.byteOffset)&&(c.componentType=c.componentType??Y.UNSIGNED_SHORT,c.type=Vt.SCALAR,o=Nd(c),c=o.createArrayBufferView(n.buffer,n.byteOffset+c.byteOffset,s),p+=c.byteLength);let g;if(l(u)){for(l(u.byteOffset)&&(u.componentType=u.componentType??Y.UNSIGNED_SHORT,u.type=Vt.SCALAR,o=Nd(u),u=o.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,s),p+=u.byteLength),g=new Uint16Array(s),d=0,i=0;i<s;++i)g[i]=d,d+=u[i];p+=g.byteLength}l(f)&&l(f.byteOffset)&&(f.componentType=f.componentType??Y.UNSIGNED_SHORT,f.type=Vt.SCALAR,o=Nd(f),f=o.createArrayBufferView(n.buffer,n.byteOffset+f.byteOffset,d),p+=f.byteLength);let m=a.length;for(i=0;i<m;++i){let b=a[i].length,x=a[i].instances,T=rm.getBinaryProperties(b,x,n);p+=X9e(T),a[i].instances=Ot(T,x)}let y=new Array(m).fill(0),A=new Uint16Array(s);for(i=0;i<s;++i)r=c[i],A[i]=y[r],++y[r];p+=A.byteLength,e._classes=a,e._classIds=c,e._classIndexes=A,e._parentCounts=u,e._parentIndexes=g,e._parentIds=f,e._byteLength=p}function X9e(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var K9e=[],$9e=[],J9e=0;function Z9e(e,t,n){let i=e._classIds,r=e._parentCounts,o=e._parentIds,s=e._parentIndexes,a=i.length,c=K9e;c.length=Math.max(c.length,a);let u=++J9e,f=$9e;for(f.length=0,f.push(t);f.length>0;){if(t=f.pop(),c[t]===u)continue;c[t]=u;let d=n(e,t);if(l(d))return d;let p=r[t],g=s[t];for(let m=0;m<p;++m){let y=o[g+m];y!==t&&f.push(y)}}}function Q9e(e,t,n){let i=!0;for(;i;){let r=n(e,t);if(l(r))return r;let o=e._parentIds[t];i=o!==t,t=o}}function WM(e,t,n){let i=e._parentCounts,r=e._parentIds;if(l(r)){if(l(i))return Z9e(e,t,n)}else return n(e,t);return Q9e(e,t,n)}Sg.prototype.hasProperty=function(e,t){let n=WM(this,e,function(i,r){let o=i._classIds[r],s=i._classes[o].instances;if(l(s[t]))return!0});return l(n)};Sg.prototype.propertyExists=function(e){let t=this._classes,n=t.length;for(let i=0;i<n;++i){let r=t[i].instances;if(l(r[e]))return!0}return!1};Sg.prototype.getPropertyIds=function(e,t){return t=l(t)?t:[],t.length=0,WM(this,e,function(n,i){let r=n._classIds[i],o=n._classes[r].instances;for(let s in o)o.hasOwnProperty(s)&&t.indexOf(s)===-1&&t.push(s)}),t};Sg.prototype.getProperty=function(e,t){return WM(this,e,function(n,i){let r=n._classIds[i],o=n._classes[r],s=n._classIndexes[i],a=o.instances[t];if(l(a))return l(a.typedArray)?e7e(a,s):Je(a[s],!0)})};function e7e(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}Sg.prototype.setProperty=function(e,t,n){let i=WM(this,e,function(r,o){let s=r._classIds[o],a=r._classes[s],c=r._classIndexes[o],u=a.instances[t];if(l(u))return l(u.typedArray)?t7e(u,c,n):u[c]=Je(n,!0),!0});return l(i)};function t7e(e,t,n){let i=e.typedArray,r=e.componentCount;r===1?i[t]=n:e.type.pack(n,i,t*r)}Sg.prototype.isClass=function(e,t){let n=WM(this,e,function(i,r){let o=i._classIds[r];if(i._classes[o].name===t)return!0});return l(n)};Sg.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var qx=Sg;var Ope={HIGHLIGHT:0,REPLACE:1,MIX:2};Object.freeze(Ope);var Uu=Ope;function n7e(e,t){if(!l(t))return;let n=t.length;if(n===0)return;let i=e.length;e.length+=n;for(let r=0;r<n;r++)e[i+r]=t[r]}var ti=n7e;var SK=Kl.DEFAULT_COLOR_VALUE,wK=Kl.DEFAULT_SHOW_VALUE;function Yr(e,t,n,i,r){this.featuresLength=t;let o;l(n)&&(o=n.extensions),this._extensions=o??{};let s=i7e(n);this._properties=s,this._batchTableHierarchy=r7e(this,n,i);let a=Npe(t,s,i);this._binaryPropertiesByteLength=o7e(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new Kl({featuresLength:t,colorChangedCallback:r,owner:e,statistics:e.tileset.statistics})}Yr._deprecationWarning=qr;Object.defineProperties(Yr.prototype,{batchTableByteLength:{get:function(){let e=this._binaryPropertiesByteLength;return l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e+=this._batchTexture.byteLength,e}}});function i7e(e){let t={};if(!l(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=Je(e[n],!0));return t}function r7e(e,t,n){if(!l(t))return;let i=e._extensions["3DTILES_batch_table_hierarchy"],r=t.HIERARCHY;if(l(r)&&(Yr._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=r,i=r),!!l(i))return new qx({extension:i,binaryBody:n})}function Npe(e,t,n){let i;for(let r in t)if(t.hasOwnProperty(r)){let o=t[r],s=o.byteOffset;if(l(s)){let a=o.componentType,c=o.type;if(!l(a))throw new oe("componentType is required.");if(!l(c))throw new oe("type is required.");if(!l(n))throw new oe(`Property ${r} requires a batch table binary.`);let u=Nd(o),f=u.componentsPerAttribute,d=u.classType,p=u.createArrayBufferView(n.buffer,n.byteOffset+s,e);l(i)||(i={}),i[r]={typedArray:p,componentCount:f,type:d}}}return i}function o7e(e){if(!l(e))return 0;let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}Yr.getBinaryProperties=function(e,t,n){return Npe(e,t,n)};Yr.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};Yr.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};Yr.prototype.getShow=function(e){return this._batchTexture.getShow(e)};Yr.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};Yr.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};Yr.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};Yr.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var s7e=new z;Yr.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(SK),this.setAllShow(wK);return}let t=this._content,n=this.featuresLength;for(let i=0;i<n;++i){let r=t.getFeature(i),o=l(e.color)?e.color.evaluateColor(r,s7e)??SK:SK,s=l(e.show)?e.show.evaluate(r)??wK:wK;this.setColor(i,o),this.setShow(i,s)}};function a7e(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function c7e(e,t,n){let i=e.typedArray,r=e.componentCount;r===1?i[t]=n:e.type.pack(n,i,t*r)}Yr.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Yr.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Yr.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Yr.prototype.hasProperty=function(e,t){return l(this._properties[t])||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)};Yr.prototype.hasPropertyBySemantic=function(){return!1};Yr.prototype.getPropertyIds=function(e,t){t=l(t)?t:[],t.length=0;let n=Object.keys(this._properties);if(ti(t,n),l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getPropertyIds(e,n);ti(t,i)}return t};Yr.prototype.getPropertyBySemantic=function(e,t){};Yr.prototype.getProperty=function(e,t){if(l(this._batchTableBinaryProperties)){let i=this._batchTableBinaryProperties[t];if(l(i))return a7e(i,e)}let n=this._properties[t];if(l(n))return Je(n[e],!0);if(l(this._batchTableHierarchy)){let i=this._batchTableHierarchy.getProperty(e,t);if(l(i))return i}};Yr.prototype.setProperty=function(e,t,n){let i=this.featuresLength;if(l(this._batchTableBinaryProperties)){let o=this._batchTableBinaryProperties[t];if(l(o)){c7e(o,e,n);return}}if(l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n))return;let r=this._properties[t];l(r)||(this._properties[t]=new Array(i),r=this._properties[t]),r[e]=Je(n,!0)};function l7e(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep;
vec2 computeSt(float batchId)
{
float stepX = tile_textureStep.x;
float centerX = tile_textureStep.y;
return vec2(centerX + (batchId * stepX), 0.5);
}
`:`uniform vec4 tile_textureStep;
uniform vec2 tile_textureDimensions;
vec2 computeSt(float batchId)
{
float stepX = tile_textureStep.x;
float centerX = tile_textureStep.y;
float stepY = tile_textureStep.z;
float centerY = tile_textureStep.w;
float xId = mod(batchId, tile_textureDimensions.x);
float yId = floor(batchId / tile_textureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
}
`}Yr.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(r){let o=Lpe(r,n,!1),s;return Ut.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand;
`),s+=`uniform sampler2D tile_batchTexture;
out vec4 tile_featureColor;
out vec2 tile_featureSt;
void main()
{
vec2 st = computeSt(${t});
vec4 featureProperties = texture(tile_batchTexture, st);
tile_color(featureProperties);
float show = ceil(featureProperties.a);
gl_Position *= show;
`,e&&(s+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
if (czm_pass == czm_passTranslucent)
{
if (!isStyleTranslucent && !tile_translucentCommand)
{
gl_Position *= 0.0;
}
}
else
{
if (isStyleTranslucent)
{
gl_Position *= 0.0;
}
}
`),s+=` tile_featureColor = featureProperties;
tile_featureSt = st;
}`):s=`out vec2 tile_featureSt;
void main()
{
tile_color(vec4(1.0));
tile_featureSt = computeSt(${t});
}`,`${o}
${l7e(i)}${s}`}};function Mpe(e,t){return e=Ye.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend;
void tile_color(vec4 tile_featureColor)
{
tile_main();
tile_featureColor = czm_gammaCorrect(tile_featureColor);
out_FragColor.a *= tile_featureColor.a;
float highlight = ceil(tile_colorBlend);
out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
}
`:`${e}void tile_color(vec4 tile_featureColor)
{
tile_main();
}
`}function u7e(e,t){let n=`texture(${t}`,i=0,r=e.indexOf(n,i),o;for(;r>-1;){let s=0;for(let u=r;u<e.length;++u){let f=e.charAt(u);if(f==="(")++s;else if(f===")"&&(--s,s===0)){o=u+1;break}}let c=`tile_diffuse_final(${e.slice(r,o)}, tile_diffuse)`;e=e.slice(0,r)+c+e.slice(o),i=r+c.length,r=e.indexOf(n,i)}return e}function Lpe(e,t,n){if(!l(t))return Mpe(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),r=e.match(i);if(!l(r))return Mpe(e,n);let o=r[0],s=r[2];e=Ye.replaceMain(e,"tile_main"),e=e.replace(o,"");let a=`bool isWhite(vec3 color)
{
return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
}
vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
{
vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
return vec4(diffuse.rgb, sourceDiffuse.a);
}
`,c=` tile_featureColor = czm_gammaCorrect(tile_featureColor);
out_FragColor.a *= tile_featureColor.a;
float highlight = ceil(tile_colorBlend);
out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
`,u;if(s==="vec3"||s==="vec4"){let f=s==="vec3"?`vec4(${t}, 1.0)`:t,d=s==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,d),u=` vec4 source = ${f};
tile_diffuse = tile_diffuse_final(source, tile_featureColor);
tile_main();
`}else s==="sampler2D"&&(e=u7e(e,t),u=` tile_diffuse = tile_featureColor;
tile_main();
`);return e=`uniform float tile_colorBlend;
vec4 tile_diffuse = vec4(1.0);
${a}${o}
${e}
void tile_color(vec4 tile_featureColor)
{
${u}`,n&&(e+=c),e+=`}
`,e}Yr.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=Lpe(i,t,!0),Ut.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture;
in vec2 tile_featureSt;
in vec4 tile_featureColor;
void main()
{
tile_color(tile_featureColor);
`,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
`),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand;
`),i+=`uniform sampler2D tile_pickTexture;
uniform sampler2D tile_batchTexture;
in vec2 tile_featureSt;
void main()
{
vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
if (featureProperties.a == 0.0) {
discard;
}
`,e&&(i+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
if (czm_pass == czm_passTranslucent)
{
if (!isStyleTranslucent && !tile_translucentCommand)
{
discard;
}
}
else
{
if (isStyleTranslucent)
{
discard;
}
}
`),i+=` tile_color(featureProperties);
`,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
`),i+=`}
`),i}};function f7e(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===Uu.HIGHLIGHT)return 0;if(n===Uu.REPLACE)return 1;if(n===Uu.MIX)return D.clamp(i,D.EPSILON4,1)}Yr.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return Ot(t,{tile_batchTexture:function(){return e._batchTexture.batchTexture??e._batchTexture.defaultTexture},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return f7e(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};Yr.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var Ky={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Yr.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,r=this._content._tile,o=r._finalResolution,s=r.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,c=d7e(this);for(let u=t;u<i;++u){let f=n[u];if(f.pass===Ie.COMPUTE)continue;let d=f.derivedCommands.tileset;(!l(d)||f.dirty)&&(d={},f.derivedCommands.tileset=d,d.originalCommand=h7e(f),f.dirty=!1);let p=d.originalCommand;c!==Ky.ALL_OPAQUE&&f.pass!==Ie.TRANSLUCENT&&(l(d.translucent)||(d.translucent=m7e(p))),c!==Ky.ALL_TRANSLUCENT&&f.pass!==Ie.TRANSLUCENT&&(l(d.opaque)||(d.opaque=p7e(p)),a&&(o||(l(d.zback)||(d.zback=_7e(e.context,p)),s._backfaceCommands.push(d.zback)),(!l(d.stencil)||r._selectionDepth!==A7e(d.stencil))&&(f.renderState.depthMask?d.stencil=y7e(p,r._selectionDepth):d.stencil=d.opaque)));let g=a?d.stencil:d.opaque,m=d.translucent;f.pass!==Ie.TRANSLUCENT?(c===Ky.ALL_OPAQUE&&(n[u]=g),c===Ky.ALL_TRANSLUCENT&&(n[u]=m),c===Ky.OPAQUE_AND_TRANSLUCENT&&(n[u]=g,n.push(m))):n[u]=p}};function d7e(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?Ky.ALL_OPAQUE:t===e.featuresLength?Ky.ALL_TRANSLUCENT:Ky.OPAQUE_AND_TRANSLUCENT}function h7e(e){let t=at.shallowClone(e),n=t.pass===Ie.TRANSLUCENT;return t.uniformMap=l(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function m7e(e){let t=at.shallowClone(e);return t.pass=Ie.TRANSLUCENT,t.renderState=b7e(e.renderState),t}function p7e(e){let t=at.shallowClone(e);return t.renderState=x7e(e.renderState),t}function g7e(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!l(n)){let i=t.fragmentShaderSource.clone();i.defines=l(i.defines)?i.defines.slice(0):[],i.defines.push("POLYGON_OFFSET"),n=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}return n}function _7e(e,t){let n=at.shallowClone(t),i=Je(n.renderState,!0);i.cull.enabled=!0,i.cull.face=Vi.FRONT,i.colorMask={red:!1,green:!1,blue:!1,alpha:!1},i.polygonOffset={enabled:!0,factor:5,units:5},i.stencilTest=Yt.setCesium3DTileBit(),i.stencilMask=Yt.CESIUM_3D_TILE_MASK,n.renderState=Ge.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=Je(t.uniformMap);let r=new U(5,5);return n.uniformMap.u_polygonOffset=function(){return r},n.shaderProgram=g7e(e,t.shaderProgram),n}function y7e(e,t){let n=at.shallowClone(e),i=Je(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Yt.SKIP_LOD_MASK,i.stencilTest.reference=Yt.CESIUM_3D_TILE_MASK|t<<Yt.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=ei.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=Rt.REPLACE,i.stencilTest.backFunction=ei.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=Rt.REPLACE,i.stencilMask=Yt.CESIUM_3D_TILE_MASK|Yt.SKIP_LOD_MASK,n.renderState=Ge.fromCache(i),n}function A7e(e){return(e.renderState.stencilTest.reference&Yt.SKIP_LOD_MASK)>>>Yt.SKIP_LOD_BIT_SHIFT}function b7e(e){let t=Je(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=tn.ALPHA_BLEND,t.stencilTest=Yt.setCesium3DTileBit(),t.stencilMask=Yt.CESIUM_3D_TILE_MASK,Ge.fromCache(t)}function x7e(e){let t=Je(e,!0);return t.stencilTest=Yt.setCesium3DTileBit(),t.stencilMask=Yt.CESIUM_3D_TILE_MASK,Ge.fromCache(t)}Yr.prototype.update=function(e,t){this._batchTexture.update(e,t)};Yr.prototype.isDestroyed=function(){return!1};Yr.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),le(this)};var rm=Yr;function T7e(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var zp=T7e;var kv=`in vec3 position;
in float a_batchId;
uniform mat4 u_modifiedModelViewProjection;
void main()
{
gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
}
`;var IK=class e{constructor(t,n){this._content=t,this._batchId=n,this._color=void 0}get show(){return this._content.batchTable.getShow(this._batchId)}set show(t){this._content.batchTable.setShow(this._batchId,t)}get color(){return l(this._color)||(this._color=new z),this._content.batchTable.getColor(this._batchId,this._color)}set color(t){this._content.batchTable.setColor(this._batchId,t)}get polylinePositions(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get pickId(){return this._content.batchTable.getPickColor(this._batchId)}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}static getPropertyInherited(t,n,i,r=t.batchTable){if(l(r)){if(r.hasPropertyBySemantic(n,i))return r.getPropertyBySemantic(n,i);if(r.hasProperty(n,i))return r.getProperty(n,i)}let o=t.metadata;if(l(o)){if(o.hasPropertyBySemantic(i))return o.getPropertyBySemantic(i);if(o.hasProperty(i))return o.getProperty(i)}let s=t.tile,a=s.metadata;if(l(a)){if(a.hasPropertyBySemantic(i))return a.getPropertyBySemantic(i);if(a.hasProperty(i))return a.getProperty(i)}let c;if(l(s.implicitSubtree)&&(c=s.implicitSubtree.metadata),l(c)){if(c.hasPropertyBySemantic(i))return c.getPropertyBySemantic(i);if(c.hasProperty(i))return c.getProperty(i)}let u=l(t.group)?t.group.metadata:void 0;if(l(u)){if(u.hasPropertyBySemantic(i))return u.getPropertyBySemantic(i);if(u.hasProperty(i))return u.getProperty(i)}let f=t.tileset.metadata;if(l(f)){if(f.hasPropertyBySemantic(i))return f.getPropertyBySemantic(i);if(f.hasProperty(i))return f.getProperty(i)}}getPropertyInherited(t){return e.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}},na=IK;var PK=class{add(t,n,i){if(typeof arguments[0]!="string")for(let r in arguments[0])this.add(r,arguments[0][r],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(r){this[r]=this[r]||[],n&&this[r][i?"unshift":"push"](n)},this)}run(t,n){this[t]=this[t]||[],this[t].forEach(function(i){i.call(n&&n.context?n.context:n,n)})}},DK=class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}},zu=class e{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,r;for(;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())n.push(r);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,e.max_binop_len),n=t.length;for(;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,r,o,s,a,c,u;if(s=this.gobbleToken(),!s||(n=this.gobbleBinaryOp(),!n))return s;for(o={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+n),r=[s,o,a];n=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(n),i===0){this.index-=n.length;break}o={value:n,prec:i,right_a:e.right_associative.has(n)},u=n;let f=d=>o.right_a&&d.right_a?i>d.prec:i<=d.prec;for(;r.length>2&&f(r[r.length-2]);)a=r.pop(),n=r.pop().value,s=r.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),r.push(o,t)}for(c=r.length-1,t=r[c];c>1;)t={type:e.BINARY_EXP,operator:r[c-1].value,left:r[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)r=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;let o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:o,prefix:!0})}n=n.substr(0,--i)}e.isIdentifierStart(t)?(r=this.gobbleIdentifier(),e.literals.hasOwnProperty(r.name)?r={type:e.LITERAL,value:e.literals[r.name],raw:r.name}:r.name===e.this_str&&(r={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){let i;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let t="",n,i;for(;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n==="e"||n==="E"){for(t+=this.expr.charAt(this.index++),n=this.char,(n==="+"||n==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",n=this.index,i=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===i){r=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return r||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){let n=[],i=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){i=!0,this.index++,t===e.CPAREN_CODE&&r&&r>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===e.COMMA_CODE){if(this.index++,r++,r!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s<r;s++)n.push(null)}}else if(n.length!==r&&r!==0)this.throwError("Expected comma");else{let s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError("Expected comma"),n.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}},E7e=new PK;Object.assign(zu,{hooks:E7e,plugins:new DK(zu),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});zu.max_unop_len=zu.getMaxKeyLen(zu.unary_ops);zu.max_binop_len=zu.getMaxKeyLen(zu.binary_ops);var $y=e=>new zu(e).parse(),C7e=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(zu).filter(e=>!C7e.includes(e)&&$y[e]===void 0).forEach(e=>{$y[e]=zu[e]});$y.Jsep=zu;var v7e="ConditionalExpression",S7e={name:"ternary",init(e){e.hooks.add("after-expression",function(n){if(n.node&&this.code===e.QUMARK_CODE){this.index++;let i=n.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let o=this.gobbleExpression();if(o||this.throwError("Expected expression"),n.node={type:v7e,test:i,consequent:r,alternate:o},i.operator&&e.binary_ops[i.operator]<=.9){let s=i;for(;s.right.operator&&e.binary_ops[s.right.operator]<=.9;)s=s.right;n.node.test=s.right,s.right=n.node,n.node=i}}else this.throwError("Expected :")}})}};$y.plugins.register(S7e);var Fpe={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18};Object.freeze(Fpe);var Mt=Fpe;function om(e,t){this._expression=e,e=U7e(e,t),e=V7e(z7e(e)),$y.addBinaryOp("=~",0),$y.addBinaryOp("!~",0);let n;try{n=$y(e)}catch(i){throw new oe(i)}this._runtimeAst=Ki(this,n)}Object.defineProperties(om.prototype,{expression:{get:function(){return this._expression}}});var Un={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new U],cartesian3Array:[new h],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new U),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};om.prototype.evaluate=function(e,t){Un.reset();let n=this._runtimeAst.evaluate(e);return t instanceof z&&n instanceof se?z.fromCartesian4(n,t):n instanceof U||n instanceof h||n instanceof se?n.clone(t):n};om.prototype.evaluateColor=function(e,t){Un.reset();let n=this._runtimeAst.evaluate(e);return z.fromCartesian4(n,t)};om.prototype.getShaderFunction=function(e,t,n,i){let r=this.getShaderExpression(t,n);return r=`${i} ${e}
{
return ${r};
}
`,r};om.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};om.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var w7e=["!","-","+"],Bpe=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],qM=/\${(.*?)}/g,I7e=/\\/g,P7e="@#%",D7e=/@#%/g,P6=new z,D6={abs:ka(Math.abs),sqrt:ka(Math.sqrt),cos:ka(Math.cos),sin:ka(Math.sin),tan:ka(Math.tan),acos:ka(Math.acos),asin:ka(Math.asin),atan:ka(Math.atan),radians:ka(D.toRadians),degrees:ka(D.toDegrees),sign:ka(D.sign),floor:ka(Math.floor),ceil:ka(Math.ceil),round:ka(Math.round),exp:ka(Math.exp),exp2:ka(O7e),log:ka(Math.log),log2:ka(M7e),fract:ka(R7e),length:N7e,normalize:L7e},R6={atan2:w6(Math.atan2,!1),pow:w6(Math.pow,!1),min:w6(Math.min,!0),max:w6(Math.max,!0),distance:F7e,dot:B7e,cross:k7e},MK={clamp:kpe(D.clamp,!0),mix:kpe(D.lerp,!0)};function R7e(e){return e-Math.floor(e)}function O7e(e){return Math.pow(2,e)}function M7e(e){return D.log2(e)}function ka(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof U)return U.fromElements(e(n.x),e(n.y),Un.getCartesian2());if(n instanceof h)return h.fromElements(e(n.x),e(n.y),e(n.z),Un.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Un.getCartesian4());throw new oe(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function w6(e,t){return function(n,i,r){if(t&&typeof r=="number"){if(typeof i=="number")return e(i,r);if(i instanceof U)return U.fromElements(e(i.x,r),e(i.y,r),Un.getCartesian2());if(i instanceof h)return h.fromElements(e(i.x,r),e(i.y,r),e(i.z,r),Un.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,r),e(i.y,r),e(i.z,r),e(i.w,r),Un.getCartesian4())}if(typeof i=="number"&&typeof r=="number")return e(i,r);if(i instanceof U&&r instanceof U)return U.fromElements(e(i.x,r.x),e(i.y,r.y),Un.getCartesian2());if(i instanceof h&&r instanceof h)return h.fromElements(e(i.x,r.x),e(i.y,r.y),e(i.z,r.z),Un.getCartesian3());if(i instanceof se&&r instanceof se)return se.fromElements(e(i.x,r.x),e(i.y,r.y),e(i.z,r.z),e(i.w,r.w),Un.getCartesian4());throw new oe(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${r}.`)}}function kpe(e,t){return function(n,i,r,o){if(t&&typeof o=="number"){if(typeof i=="number"&&typeof r=="number")return e(i,r,o);if(i instanceof U&&r instanceof U)return U.fromElements(e(i.x,r.x,o),e(i.y,r.y,o),Un.getCartesian2());if(i instanceof h&&r instanceof h)return h.fromElements(e(i.x,r.x,o),e(i.y,r.y,o),e(i.z,r.z,o),Un.getCartesian3());if(i instanceof se&&r instanceof se)return se.fromElements(e(i.x,r.x,o),e(i.y,r.y,o),e(i.z,r.z,o),e(i.w,r.w,o),Un.getCartesian4())}if(typeof i=="number"&&typeof r=="number"&&typeof o=="number")return e(i,r,o);if(i instanceof U&&r instanceof U&&o instanceof U)return U.fromElements(e(i.x,r.x,o.x),e(i.y,r.y,o.y),Un.getCartesian2());if(i instanceof h&&r instanceof h&&o instanceof h)return h.fromElements(e(i.x,r.x,o.x),e(i.y,r.y,o.y),e(i.z,r.z,o.z),Un.getCartesian3());if(i instanceof se&&r instanceof se&&o instanceof se)return se.fromElements(e(i.x,r.x,o.x),e(i.y,r.y,o.y),e(i.z,r.z,o.z),e(i.w,r.w,o.w),Un.getCartesian4());throw new oe(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${r}, and ${o}.`)}}function N7e(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof U)return U.magnitude(t);if(t instanceof h)return h.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new oe(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function L7e(e,t){if(typeof t=="number")return 1;if(t instanceof U)return U.normalize(t,Un.getCartesian2());if(t instanceof h)return h.normalize(t,Un.getCartesian3());if(t instanceof se)return se.normalize(t,Un.getCartesian4());throw new oe(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function F7e(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof U&&n instanceof U)return U.distance(t,n);if(t instanceof h&&n instanceof h)return h.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new oe(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function B7e(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof U&&n instanceof U)return U.dot(t,n);if(t instanceof h&&n instanceof h)return h.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new oe(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function k7e(e,t,n){if(t instanceof h&&n instanceof h)return h.cross(t,n,Un.getCartesian3());throw new oe(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function Bt(e,t,n,i,r){this._type=e,this._value=t,this._left=n,this._right=i,this._test=r,this.evaluate=void 0,J7e(this)}function U7e(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),r=`(${t[n]})`;l(r)&&(e=e.replace(i,r))}return e}function z7e(e){return e.replace(I7e,P7e)}function OK(e){return e.replace(D7e,"\\")}function V7e(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let r=t.indexOf("'"),o=t.indexOf('"'),s;if(r>=0&&r<i)s=t.indexOf("'",r+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else if(o>=0&&o<i)s=t.indexOf('"',o+1),n+=t.substr(0,s+1),t=t.substr(s+1),i=t.indexOf("${");else{n+=t.substr(0,i);let a=t.indexOf("}");if(a<0)throw new oe("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}function j7e(e){let t=typeof e.value;if(e.value===null)return new Bt(Mt.LITERAL_NULL,null);if(t==="boolean")return new Bt(Mt.LITERAL_BOOLEAN,e.value);if(t==="number")return new Bt(Mt.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new Bt(Mt.VARIABLE_IN_STRING,e.value):new Bt(Mt.LITERAL_STRING,OK(e.value))}function H7e(e,t){let n=t.arguments,i=n.length,r,o,s,a;if(t.callee.type==="MemberExpression"){r=t.callee.property.name;let c=t.callee.object;if(r==="test"||r==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new oe(`${r} is not a function.`);return i===0?r==="test"?new Bt(Mt.LITERAL_BOOLEAN,!1):new Bt(Mt.LITERAL_NULL,null):(s=Ki(e,c),a=Ki(e,n[0]),new Bt(Mt.FUNCTION_CALL,r,s,a))}else if(r==="toString")return o=Ki(e,c),new Bt(Mt.FUNCTION_CALL,r,o);throw new oe(`Unexpected function call "${r}".`)}if(r=t.callee.name,r==="color"){if(i===0)return new Bt(Mt.LITERAL_COLOR,r);if(o=Ki(e,n[0]),l(n[1])){let c=Ki(e,n[1]);return new Bt(Mt.LITERAL_COLOR,r,[o,c])}return new Bt(Mt.LITERAL_COLOR,r,[o])}else if(r==="rgb"||r==="hsl"){if(i<3)throw new oe(`${r} requires three arguments.`);return o=[Ki(e,n[0]),Ki(e,n[1]),Ki(e,n[2])],new Bt(Mt.LITERAL_COLOR,r,o)}else if(r==="rgba"||r==="hsla"){if(i<4)throw new oe(`${r} requires four arguments.`);return o=[Ki(e,n[0]),Ki(e,n[1]),Ki(e,n[2]),Ki(e,n[3])],new Bt(Mt.LITERAL_COLOR,r,o)}else if(r==="vec2"||r==="vec3"||r==="vec4"){o=new Array(i);for(let c=0;c<i;++c)o[c]=Ki(e,n[c]);return new Bt(Mt.LITERAL_VECTOR,r,o)}else{if(r==="isNaN"||r==="isFinite")return i===0?r==="isNaN"?new Bt(Mt.LITERAL_BOOLEAN,!0):new Bt(Mt.LITERAL_BOOLEAN,!1):(o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o));if(r==="isExactClass"||r==="isClass"){if(i<1||i>1)throw new oe(`${r} requires exactly one argument.`);return o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o)}else if(r==="getExactClassName"){if(i>0)throw new oe(`${r} does not take any argument.`);return new Bt(Mt.UNARY,r)}else if(l(D6[r])){if(i!==1)throw new oe(`${r} requires exactly one argument.`);return o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o)}else if(l(R6[r])){if(i!==2)throw new oe(`${r} requires exactly two arguments.`);return s=Ki(e,n[0]),a=Ki(e,n[1]),new Bt(Mt.BINARY,r,s,a)}else if(l(MK[r])){if(i!==3)throw new oe(`${r} requires exactly three arguments.`);s=Ki(e,n[0]),a=Ki(e,n[1]);let c=Ki(e,n[2]);return new Bt(Mt.TERNARY,r,s,a,c)}else{if(r==="Boolean")return i===0?new Bt(Mt.LITERAL_BOOLEAN,!1):(o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o));if(r==="Number")return i===0?new Bt(Mt.LITERAL_NUMBER,0):(o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o));if(r==="String")return i===0?new Bt(Mt.LITERAL_STRING,""):(o=Ki(e,n[0]),new Bt(Mt.UNARY,r,o));if(r==="regExp")return G7e(e,t)}}throw new oe(`Unexpected function call "${r}".`)}function G7e(e,t){let n=t.arguments;if(n.length===0)return new Bt(Mt.LITERAL_REGEX,new RegExp);let i=Ki(e,n[0]),r;if(n.length>1){let o=Ki(e,n[1]);if(RK(i)&&RK(o)){try{r=new RegExp(OK(String(i._value)),o._value)}catch(s){throw new oe(s)}return new Bt(Mt.LITERAL_REGEX,r)}return new Bt(Mt.REGEX,i,o)}if(RK(i)){try{r=new RegExp(OK(String(i._value)))}catch(o){throw new oe(o)}return new Bt(Mt.LITERAL_REGEX,r)}return new Bt(Mt.REGEX,i)}function W7e(e){if(K7e(e.name)){let t=$7e(e.name);return t.substr(0,8)==="tiles3d_"?new Bt(Mt.BUILTIN_VARIABLE,t):new Bt(Mt.VARIABLE,t)}else{if(e.name==="NaN")return new Bt(Mt.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new Bt(Mt.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new Bt(Mt.LITERAL_UNDEFINED,void 0)}throw new oe(`${e.name} is not defined.`)}function q7e(e){let t=e.property.name;if(t==="PI")return new Bt(Mt.LITERAL_NUMBER,Math.PI);if(t==="E")return new Bt(Mt.LITERAL_NUMBER,Math.E)}function Y7e(e){if(e.property.name==="POSITIVE_INFINITY")return new Bt(Mt.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function X7e(e,t){if(t.object.name==="Math")return q7e(t);if(t.object.name==="Number")return Y7e(t);let n,i=Ki(e,t.object);return t.computed?(n=Ki(e,t.property),new Bt(Mt.MEMBER,"brackets",i,n)):(n=new Bt(Mt.LITERAL_STRING,t.property.name),new Bt(Mt.MEMBER,"dot",i,n))}function RK(e){return e._type>=Mt.LITERAL_NULL}function K7e(e){return e.substr(0,4)==="czm_"}function $7e(e){return e.substr(4)}function Ki(e,t){let n,i,r,o;if(t.type==="Literal")n=j7e(t);else if(t.type==="CallExpression")n=H7e(e,t);else if(t.type==="Identifier")n=W7e(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=Ki(e,t.argument);if(w7e.indexOf(i)>-1)n=new Bt(Mt.UNARY,i,s);else throw new oe(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,r=Ki(e,t.left),o=Ki(e,t.right),Bpe.indexOf(i)>-1)n=new Bt(Mt.BINARY,i,r,o);else throw new oe(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,r=Ki(e,t.left),o=Ki(e,t.right),Bpe.indexOf(i)>-1&&(n=new Bt(Mt.BINARY,i,r,o));else if(t.type==="ConditionalExpression"){let s=Ki(e,t.test);r=Ki(e,t.consequent),o=Ki(e,t.alternate),n=new Bt(Mt.CONDITIONAL,"?",r,o,s)}else if(t.type==="MemberExpression")n=X7e(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a<t.elements.length;a++)s[a]=Ki(e,t.elements[a]);n=new Bt(Mt.ARRAY,s)}else throw t.type==="Compound"?new oe("Provide exactly one expression."):new oe("Cannot parse expression.");return n}function J7e(e){e._type===Mt.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Mt.FUNCTION_CALL?e._value==="test"?e.evaluate=e._evaluateRegExpTest:e._value==="exec"?e.evaluate=e._evaluateRegExpExec:e._value==="toString"&&(e.evaluate=e._evaluateToString):e._type===Mt.UNARY?e._value==="!"?e.evaluate=e._evaluateNot:e._value==="-"?e.evaluate=e._evaluateNegative:e._value==="+"?e.evaluate=e._evaluatePositive:e._value==="isNaN"?e.evaluate=e._evaluateNaN:e._value==="isFinite"?e.evaluate=e._evaluateIsFinite:e._value==="isExactClass"?e.evaluate=e._evaluateIsExactClass:e._value==="isClass"?e.evaluate=e._evaluateIsClass:e._value==="getExactClassName"?e.evaluate=e._evaluateGetExactClassName:e._value==="Boolean"?e.evaluate=e._evaluateBooleanConversion:e._value==="Number"?e.evaluate=e._evaluateNumberConversion:e._value==="String"?e.evaluate=e._evaluateStringConversion:l(D6[e._value])&&(e.evaluate=Q7e(e._value)):e._type===Mt.BINARY?e._value==="+"?e.evaluate=e._evaluatePlus:e._value==="-"?e.evaluate=e._evaluateMinus:e._value==="*"?e.evaluate=e._evaluateTimes:e._value==="/"?e.evaluate=e._evaluateDivide:e._value==="%"?e.evaluate=e._evaluateMod:e._value==="==="?e.evaluate=e._evaluateEqualsStrict:e._value==="!=="?e.evaluate=e._evaluateNotEqualsStrict:e._value==="<"?e.evaluate=e._evaluateLessThan:e._value==="<="?e.evaluate=e._evaluateLessThanOrEquals:e._value===">"?e.evaluate=e._evaluateGreaterThan:e._value===">="?e.evaluate=e._evaluateGreaterThanOrEquals:e._value==="&&"?e.evaluate=e._evaluateAnd:e._value==="||"?e.evaluate=e._evaluateOr:e._value==="=~"?e.evaluate=e._evaluateRegExpMatch:e._value==="!~"?e.evaluate=e._evaluateRegExpNotMatch:l(R6[e._value])&&(e.evaluate=eWe(e._value)):e._type===Mt.TERNARY?e.evaluate=tWe(e._value):e._type===Mt.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===Mt.ARRAY?e.evaluate=e._evaluateArray:e._type===Mt.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Mt.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Mt.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Mt.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Mt.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Mt.REGEX?e.evaluate=e._evaluateRegExp:e._type===Mt.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=Z7e):e.evaluate=e._evaluateLiteral}function Z7e(e){return l(e)?e.content.tileset.timeSinceLoad:0}function Q7e(e){let t=D6[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function eWe(e){let t=R6[e];return function(n){let i=this._left.evaluate(n),r=this._right.evaluate(n);return t(e,i,r)}}function tWe(e){let t=MK[e];return function(n){let i=this._left.evaluate(n),r=this._right.evaluate(n),o=this._test.evaluate(n);return t(e,i,r,o)}}function O6(e,t){if(l(e))return e.getPropertyInherited(t)}Bt.prototype._evaluateLiteral=function(){return this._value};Bt.prototype._evaluateLiteralColor=function(e){let t=P6,n=this._left;if(this._value==="color")l(n)?n.length>1?(z.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):z.fromCssColorString(n[0].evaluate(e),t):z.fromBytes(255,255,255,255,t);else if(this._value==="rgb")z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;z.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&z.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,Un.getCartesian4())};Bt.prototype._evaluateLiteralVector=function(e){let t=Un.getArray(),n=this._value,i=this._left,r=i.length;for(let a=0;a<r;++a){let c=i[a].evaluate(e);if(typeof c=="number")t.push(c);else if(c instanceof U)t.push(c.x,c.y);else if(c instanceof h)t.push(c.x,c.y,c.z);else if(c instanceof se)t.push(c.x,c.y,c.z,c.w);else throw new oe(`${n} argument must be a vector or number. Argument is ${c}.`)}let o=t.length,s=parseInt(n.charAt(3));if(o===0)throw new oe(`Invalid ${n} constructor. No valid arguments.`);if(o<s&&o>1)throw new oe(`Invalid ${n} constructor. Not enough arguments.`);if(o>s&&r>1)throw new oe(`Invalid ${n} constructor. Too many arguments.`);if(o===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return U.fromArray(t,0,Un.getCartesian2());if(n==="vec3")return h.fromArray(t,0,Un.getCartesian3());if(n==="vec4")return se.fromArray(t,0,Un.getCartesian4())};Bt.prototype._evaluateLiteralString=function(){return this._value};Bt.prototype._evaluateVariableString=function(e){let t=this._value,n=qM.exec(t);for(;n!==null;){let i=n[0],r=n[1],o=O6(e,r);l(o)||(o=""),t=t.replace(i,o),qM.lastIndex+=o.length-i.length,n=qM.exec(t)}return t};Bt.prototype._evaluateVariable=function(e){return O6(e,this._value)};function Yx(e){return e._value==="feature"}Bt.prototype._evaluateMemberDot=function(e){if(Yx(this._left))return O6(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof U||t instanceof h||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};Bt.prototype._evaluateMemberBrackets=function(e){if(Yx(this._left))return O6(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof U||t instanceof h||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};Bt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};Bt.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new oe(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};Bt.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof U)return U.negate(t,Un.getCartesian2());if(t instanceof h)return h.negate(t,Un.getCartesian3());if(t instanceof se)return se.negate(t,Un.getCartesian4());if(typeof t=="number")return-t;throw new oe(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};Bt.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof U||t instanceof h||t instanceof se||typeof t=="number"))throw new oe(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};Bt.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new oe(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};Bt.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new oe(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};Bt.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new oe(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};Bt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new oe(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};Bt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new oe(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new oe(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};Bt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new oe(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new oe(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};Bt.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof U&&t instanceof U)return U.add(t,n,Un.getCartesian2());if(n instanceof h&&t instanceof h)return h.add(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,Un.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new oe(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof U&&t instanceof U)return U.subtract(t,n,Un.getCartesian2());if(n instanceof h&&t instanceof h)return h.subtract(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new oe(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof U&&t instanceof U)return U.multiplyComponents(t,n,Un.getCartesian2());if(n instanceof U&&typeof t=="number")return U.multiplyByScalar(n,t,Un.getCartesian2());if(t instanceof U&&typeof n=="number")return U.multiplyByScalar(t,n,Un.getCartesian2());if(n instanceof h&&t instanceof h)return h.multiplyComponents(t,n,Un.getCartesian3());if(n instanceof h&&typeof t=="number")return h.multiplyByScalar(n,t,Un.getCartesian3());if(t instanceof h&&typeof n=="number")return h.multiplyByScalar(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,Un.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,Un.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new oe(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof U&&t instanceof U)return U.divideComponents(t,n,Un.getCartesian2());if(t instanceof U&&typeof n=="number")return U.divideByScalar(t,n,Un.getCartesian2());if(n instanceof h&&t instanceof h)return h.divideComponents(t,n,Un.getCartesian3());if(t instanceof h&&typeof n=="number")return h.divideByScalar(t,n,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,Un.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new oe(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof U&&t instanceof U)return U.fromElements(t.x%n.x,t.y%n.y,Un.getCartesian2());if(n instanceof h&&t instanceof h)return h.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Un.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Un.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new oe(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof U&&t instanceof U||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?t.equals(n):t===n};Bt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof U&&t instanceof U||n instanceof h&&t instanceof h||n instanceof se&&t instanceof se?!t.equals(n):t!==n};Bt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new oe(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};Bt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};Bt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};Bt.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};Bt.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};Bt.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};Bt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};Bt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};Bt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};Bt.prototype._evaluateRegExp=function(e){let t=this._value.evaluate(e),n="";l(this._left)&&(n=this._left.evaluate(e));let i;try{i=new RegExp(t,n)}catch(r){throw new oe(r)}return i};Bt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new oe(`RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);return t.test(n)};Bt.prototype._evaluateRegExpMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return t.test(n);if(n instanceof RegExp&&typeof t=="string")return n.test(t);throw new oe(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateRegExpNotMatch=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(t instanceof RegExp&&typeof n=="string")return!t.test(n);if(n instanceof RegExp&&typeof t=="string")return!n.test(t);throw new oe(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Bt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new oe(`RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are ${t} and ${n}.`);let i=t.exec(n);return l(i)?i[1]:null};Bt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof U||t instanceof h||t instanceof se)return String(t);throw new oe(`Unexpected function call "${this._value}".`)};function Upe(e){let t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==Mt.LITERAL_NUMBER)return;let i=t[0]._value,r=t[1]._value,o=t[2]._value,s=n===4?t[3]._value:1;return z.fromHsl(i,r,o,s,P6)}function zpe(e){let t=e._left,n=t.length;for(let r=0;r<n;++r)if(t[r]._type!==Mt.LITERAL_NUMBER)return;let i=P6;return i.red=t[0]._value/255,i.green=t[1]._value/255,i.blue=t[2]._value/255,i.alpha=n===4?t[3]._value:1,i}function Jy(e){return e%1===0?e.toFixed(1):e.toString()}function nWe(e){let t=Jy(e.red),n=Jy(e.green),i=Jy(e.blue);return`vec3(${t}, ${n}, ${i})`}function I6(e){let t=Jy(e.red),n=Jy(e.green),i=Jy(e.blue),r=Jy(e.alpha);return`vec4(${t}, ${n}, ${i}, ${r})`}function Vpe(e,t,n,i){let r=e.length,o=new Array(r);for(let s=0;s<r;++s)o[s]=e[s].getShaderExpression(t,n,i);return o}function jpe(e,t){return l(t[e])?t[e]:om.NULL_SENTINEL}om.NULL_SENTINEL="czm_infinity";Bt.prototype.getShaderExpression=function(e,t,n){let i,r,o,s,a=this._type,c=this._value;l(this._left)&&(Array.isArray(this._left)?r=Vpe(this._left,e,t,this):r=this._left.getShaderExpression(e,t,this)),l(this._right)&&(o=this._right.getShaderExpression(e,t,this)),l(this._test)&&(s=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(c=Vpe(this._value,e,t,this));let u,f,d;switch(a){case Mt.VARIABLE:return Yx(this)?void 0:jpe(c,e);case Mt.UNARY:if(c==="Boolean")return`bool(${r})`;if(c==="Number")return`float(${r})`;if(c==="round")return`floor(${r} + 0.5)`;if(l(D6[c]))return`${c}(${r})`;if(c==="isNaN")return`(${r} != ${r})`;if(c==="isFinite")return`(abs(${r}) < czm_infinity)`;if(c==="String"||c==="isExactClass"||c==="isClass"||c==="getExactClassName")throw new oe(`Error generating style shader: "${c}" is not supported.`);return c+r;case Mt.BINARY:return c==="%"?`mod(${r}, ${o})`:c==="==="?`(${r} == ${o})`:c==="!=="?`(${r} != ${o})`:c==="atan2"?`atan(${r}, ${o})`:l(R6[c])?`${c}(${r}, ${o})`:`(${r} ${c} ${o})`;case Mt.TERNARY:if(l(MK[c]))return`${c}(${r}, ${o}, ${s})`;break;case Mt.CONDITIONAL:return`(${s} ? ${r} : ${o})`;case Mt.MEMBER:return Yx(this._left)?jpe(o,e):o==="r"||o==="x"||o==="0.0"?`${r}[0]`:o==="g"||o==="y"||o==="1.0"?`${r}[1]`:o==="b"||o==="z"||o==="2.0"?`${r}[2]`:o==="a"||o==="w"||o==="3.0"?`${r}[3]`:`${r}[int(${o})]`;case Mt.FUNCTION_CALL:throw new oe(`Error generating style shader: "${c}" is not supported.`);case Mt.ARRAY:if(c.length===4)return`vec4(${c[0]}, ${c[1]}, ${c[2]}, ${c[3]})`;if(c.length===3)return`vec3(${c[0]}, ${c[1]}, ${c[2]})`;if(c.length===2)return`vec2(${c[0]}, ${c[1]})`;throw new oe("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Mt.REGEX:throw new oe("Error generating style shader: Regular expressions are not supported.");case Mt.VARIABLE_IN_STRING:throw new oe("Error generating style shader: Converting a variable to a string is not supported.");case Mt.LITERAL_NULL:return om.NULL_SENTINEL;case Mt.LITERAL_BOOLEAN:return c?"true":"false";case Mt.LITERAL_NUMBER:return Jy(c);case Mt.LITERAL_STRING:if(l(n)&&n._type===Mt.MEMBER&&(c==="r"||c==="g"||c==="b"||c==="a"||c==="x"||c==="y"||c==="z"||c==="w"||Yx(n._left)))return c;if(i=z.fromCssColorString(c,P6),l(i))return nWe(i);throw new oe("Error generating style shader: String literals are not supported.");case Mt.LITERAL_COLOR:if(u=r,c==="color"){if(l(u)){if(u.length>1){let p=u[0],g=u[1];return g!=="1.0"&&(t.translucent=!0),`vec4(${p}, ${g})`}}else return"vec4(1.0)";return`vec4(${u[0]}, 1.0)`}else{if(c==="rgb")return i=zpe(this),l(i)?I6(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, 1.0)`;if(c==="rgba")return u[3]!=="1.0"&&(t.translucent=!0),i=zpe(this),l(i)?I6(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if(c==="hsl")return i=Upe(this),l(i)?I6(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if(c==="hsla")return i=Upe(this),l(i)?(i.alpha!==1&&(t.translucent=!0),I6(i)):(u[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`)}break;case Mt.LITERAL_VECTOR:f=r.length,d=`${c}(`;for(let p=0;p<f;++p)d+=r[p],p<f-1&&(d+=", ");return d+=")",d;case Mt.LITERAL_REGEX:throw new oe("Error generating style shader: Regular expressions are not supported.");case Mt.LITERAL_UNDEFINED:return om.NULL_SENTINEL;case Mt.BUILTIN_VARIABLE:if(c==="tiles3d_tileset_time")return c}};Bt.prototype.getVariables=function(e,t){let n,i,r,o=this._type,s=this._value;if(l(this._left))if(Array.isArray(this._left))for(n=this._left,i=n.length,r=0;r<i;++r)n[r].getVariables(e,this);else this._left.getVariables(e,this);if(l(this._right)&&this._right.getVariables(e,this),l(this._test)&&this._test.getVariables(e,this),Array.isArray(this._value))for(n=this._value,i=n.length,r=0;r<i;++r)n[r].getVariables(e,this);let a;switch(o){case Mt.VARIABLE:Yx(this)||e.push(s);break;case Mt.VARIABLE_IN_STRING:for(a=qM.exec(s);a!==null;)e.push(a[1]),a=qM.exec(s);break;case Mt.LITERAL_STRING:l(t)&&t._type===Mt.MEMBER&&Yx(t._left)&&e.push(s);break}};var Ld=om;function wg(e){e=e??H.EMPTY_OBJECT,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=e.center??h.ZERO,this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=e.classificationType??Qn.BOTH,this._vertexShaderSource=e._vertexShaderSource,this._fragmentShaderSource=e._fragmentShaderSource,this._attributeLocations=e._attributeLocations,this._uniformMap=e._uniformMap,this._pickId=e._pickId,this._modelMatrix=e._modelMatrix,this._boundingSphere=e._boundingSphere,this._batchIdLookUp={};let t=this._batchIds.length;for(let n=0;n<t;++n){let i=this._batchIds[n];this._batchIdLookUp[i]=n}}Object.defineProperties(wg.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var iWe={position:0,a_batchId:1};function rWe(e,t){if(l(e._va))return;let n=nt.createVertexBuffer({context:t,typedArray:e._positions,usage:Me.STATIC_DRAW}),i=nt.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Me.STATIC_DRAW}),r=nt.createIndexBuffer({context:t,typedArray:e._indices,usage:Me.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?je.UNSIGNED_SHORT:je.UNSIGNED_INT}),o=[{index:0,vertexBuffer:n,componentDatatype:Y.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:Y.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new zn({context:t,attributes:o,indexBuffer:r}),t.webgl2&&(e._vaSwap=new zn({context:t,attributes:o,indexBuffer:nt.createIndexBuffer({context:t,sizeInBytes:r.sizeInBytes,usage:Me.DYNAMIC_DRAW,indexDatatype:r.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function oWe(e,t){if(l(e._sp))return;let n=e._batchTable,i=e._attributeLocations??iWe,r=e._pickId,o=e._vertexShaderSource,s=e._fragmentShaderSource;if(l(o)){e._sp=en.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:i}),e._spStencil=e._sp,s=Ye.replaceMain(s,"czm_non_pick_main"),s=`${s}void main()
{
czm_non_pick_main();
out_FragColor = ${r};
}
`,e._spPick=en.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:i});return}let a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(kv),c=n.getFragmentShaderCallback(!1,void 0,!0)(zy);r=n.getPickId();let u=new Ye({sources:[a]}),f=new Ye({defines:["VECTOR_TILE"],sources:[c]});e._sp=en.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),u=new Ye({sources:[kv]}),f=new Ye({defines:["VECTOR_TILE"],sources:[zy]}),e._spStencil=en.fromCache({context:t,vertexShaderSource:u,fragmentShaderSource:f,attributeLocations:i}),c=Ye.replaceMain(c,"czm_non_pick_main"),c=`${c}
void main()
{
czm_non_pick_main();
out_FragColor = ${r};
}
`;let d=new Ye({sources:[a]}),p=new Ye({defines:["VECTOR_TILE"],sources:[c]});e._spPick=en.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:i})}function Hpe(e){let t=e?ei.EQUAL:ei.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:t,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL},depthMask:!1}}var sWe={stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND},aWe={stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function cWe(e){l(e._rsStencilDepthPass)||(e._rsStencilDepthPass=Ge.fromCache(Hpe(!1)),e._rsStencilDepthPass3DTiles=Ge.fromCache(Hpe(!0)),e._rsColorPass=Ge.fromCache(sWe),e._rsPickPass=Ge.fromCache(aWe))}var Xx=new N,Gpe=new h;function lWe(e,t){if(l(e._uniformMap))return;let n={u_modifiedModelViewProjection:function(){let i=t.uniformState.view,r=t.uniformState.projection;return N.clone(i,Xx),N.multiplyByPoint(Xx,e._center,Gpe),N.setTranslation(Xx,Gpe,Xx),N.multiply(r,Xx,Xx),Xx},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function NK(e,t,n,i,r,o,s){let a=e.constructor.BYTES_PER_ELEMENT,c=o.length;for(let u=0;u<c;++u){let f=o[u],d=s[f],p=i[d],g=r[d],m=new e.constructor(e.buffer,a*p,g);t.set(m,n),i[d]=n,n+=g}return n}function uWe(e,t){let n=e._indices,i=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,s=new n.constructor(n.length),a=t.pop(),c=[a],u=NK(n,s,0,i,r,a.batchIds,o);for(a.offset=0,a.count=u;t.length>0;){let f=t.pop();if(z.equals(f.color,a.color))u=NK(n,s,u,i,r,f.batchIds,o),a.batchIds=a.batchIds.concat(f.batchIds),a.count=u-a.offset;else{let d=u;u=NK(n,s,u,i,r,f.batchIds,o),f.offset=d,f.count=u-d,c.push(f),a=f}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function LK(e,t,n,i,r,o,s){let a=e.bytesPerIndex,c=o.length;for(let u=0;u<c;++u){let f=o[u],d=s[f],p=i[d],g=r[d];t.copyFromBuffer(e,p*a,n*a,g*a),i[d]=n,n+=g}return n}function fWe(e,t){let n=e._indexOffsets,i=e._indexCounts,r=e._batchIdLookUp,o=t.pop(),s=[o],a=e._va.indexBuffer,c=e._vaSwap.indexBuffer,u=LK(a,c,0,n,i,o.batchIds,r);for(o.offset=0,o.count=u;t.length>0;){let d=t.pop();if(z.equals(d.color,o.color))u=LK(a,c,u,n,i,d.batchIds,r),o.batchIds=o.batchIds.concat(d.batchIds),o.count=u-o.offset;else{let p=u;u=LK(a,c,u,n,i,d.batchIds,r),d.offset=p,d.count=u-p,s.push(d),o=d}}let f=e._va;e._va=e._vaSwap,e._vaSwap=f,e._batchedIndices=s}function dWe(e,t){return t.color.toRgba()-e.color.toRgba()}function hWe(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,r=!1,o={};for(let s=0;s<i;++s){let c=n[s].color.toRgba();if(l(o[c])){r=!0;break}else o[c]=!0}if(!r)return e._batchDirty=!1,!1;if(r&&!e.forceRebatch&&e._framesSinceLastRebatch<120){++e._framesSinceLastRebatch;return}return n.sort(dWe),t.webgl2?fWe(e,n):uWe(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function mWe(e,t){let n=hWe(e,t),i=e._commands,r=e._batchedIndices,o=r.length,s=o*2;if(l(i)&&!n&&i.length===s)return;i.length=s;let a=e._va,c=e._sp,u=e._modelMatrix??N.IDENTITY,f=e._uniformMap,d=e._boundingVolume;for(let p=0;p<o;++p){let g=r[p].offset,m=r[p].count,y=i[p*2];l(y)||(y=i[p*2]=new at({owner:e})),y.vertexArray=a,y.modelMatrix=u,y.offset=g,y.count=m,y.renderState=e._rsStencilDepthPass,y.shaderProgram=c,y.uniformMap=f,y.boundingVolume=d,y.cull=!1,y.pass=Ie.TERRAIN_CLASSIFICATION;let A=at.shallowClone(y,y.derivedCommands.tileset);A.renderState=e._rsStencilDepthPass3DTiles,A.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=A;let b=i[p*2+1];l(b)||(b=i[p*2+1]=new at({owner:e})),b.vertexArray=a,b.modelMatrix=u,b.offset=g,b.count=m,b.renderState=e._rsColorPass,b.shaderProgram=c,b.uniformMap=f,b.boundingVolume=d,b.cull=!1,b.pass=Ie.TERRAIN_CLASSIFICATION;let x=at.shallowClone(b,b.derivedCommands.tileset);x.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,b.derivedCommands.tileset=x}e._commandsDirty=!0}function pWe(e,t){if(e.classificationType===Qn.TERRAIN||!t.invertClassification||l(e._commandsIgnoreShow)&&!e._commandsDirty)return;let n=e._commands,i=e._commandsIgnoreShow,r=e._spStencil,o=n.length,s=i.length=o/2,a=0;for(let c=0;c<s;++c){let u=i[c]=at.shallowClone(n[a],i[c]);u.shaderProgram=r,u.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}function gWe(e){if(!e._pickCommandsDirty)return;let t=e._indexOffsets.length,n=e._pickCommands;n.length=t*2;let i=e._va,r=e._spStencil,o=e._spPick,s=e._modelMatrix??N.IDENTITY,a=e._uniformMap;for(let c=0;c<t;++c){let u=e._indexOffsets[c],f=e._indexCounts[c],d=l(e._boundingVolumes)?e._boundingVolumes[c]:e.boundingVolume,p=n[c*2];l(p)||(p=n[c*2]=new at({owner:e,pickOnly:!0})),p.vertexArray=i,p.modelMatrix=s,p.offset=u,p.count=f,p.renderState=e._rsStencilDepthPass,p.shaderProgram=r,p.uniformMap=a,p.boundingVolume=d,p.pass=Ie.TERRAIN_CLASSIFICATION;let g=at.shallowClone(p,p.derivedCommands.tileset);g.renderState=e._rsStencilDepthPass3DTiles,g.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=g;let m=n[c*2+1];l(m)||(m=n[c*2+1]=new at({owner:e,pickOnly:!0})),m.vertexArray=i,m.modelMatrix=s,m.offset=u,m.count=f,m.renderState=e._rsPickPass,m.shaderProgram=o,m.uniformMap=a,m.boundingVolume=d,m.pass=Ie.TERRAIN_CLASSIFICATION;let y=at.shallowClone(m,m.derivedCommands.tileset);y.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,m.derivedCommands.tileset=y}e._pickCommandsDirty=!1}wg.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r];t[o]=new na(e,o)}};wg.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function _We(e,t){e._updatingAllCommands=!0;let n=e._batchIds,i=n.length,r;for(r=0;r<i;++r){let s=n[r],a=t[s];a.show=!0,a.color=z.WHITE}let o=e._batchedIndices;for(i=o.length,r=0;r<i;++r)o[r].color=z.clone(z.WHITE);e._updatingAllCommands=!1,e._batchDirty=!0}var yWe=new z,AWe=z.WHITE,bWe=!0,xWe=/\$/;wg.prototype.applyStyle=function(e,t){if(!l(e)){_We(this,t);return}let n=e.color,i=n instanceof Ld&&!xWe.test(n.expression);this._updatingAllCommands=i;let r=this._batchIds,o=r.length,s;for(s=0;s<o;++s){let a=r[s],c=t[a];c.color=l(e.color)?e.color.evaluateColor(c,yWe):AWe,c.show=l(e.show)?e.show.evaluate(c):bWe}if(i){let a=this._batchedIndices;for(o=a.length,s=0;s<o;++s)a[s].color=z.clone(z.WHITE);this._updatingAllCommands=!1,this._batchDirty=!0}};wg.prototype.updateCommands=function(e,t){if(this._updatingAllCommands)return;let n=this._batchIdLookUp,i=n[e];if(!l(i))return;let r=this._indexOffsets,o=this._indexCounts,s=r[i],a=o[i],c=this._batchedIndices,u=c.length,f;for(f=0;f<u;++f){let y=c[f].offset,A=c[f].count;if(s>=y&&s<y+A)break}c.push(new zp({color:z.clone(t),offset:s,count:a,batchIds:[e]}));let d=[],p=[],g=c[f].batchIds,m=g.length;for(let y=0;y<m;++y){let A=g[y];if(A===e)continue;let b=n[A];r[b]<s?d.push(A):p.push(A)}p.length!==0&&c.push(new zp({color:z.clone(c[f].color),offset:s+a,count:c[f].offset+c[f].count-(s+a),batchIds:p})),d.length!==0?(c[f].count=s-c[f].offset,c[f].batchIds=d):c.splice(f,1),this._batchDirty=!0};function Wpe(e,t,n,i){let r=e.classificationType,o=r!==Qn.CESIUM_3D_TILE,s=r!==Qn.TERRAIN,a=t.commandList,c=n.length,u,f;for(f=0;f<c;++f)o&&(u=n[f],u.pass=Ie.TERRAIN_CLASSIFICATION,a.push(u)),s&&(u=n[f].derivedCommands.tileset,u.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,a.push(u));if(!(!t.invertClassification||!l(i)))for(c=i.length,f=0;f<c;++f)a.push(i[f])}function TWe(e,t){let n=e.commandList,i=t.length;for(let r=0;r<i;r+=2){let o=t[r+1];o.pass=Ie.OPAQUE,n.push(o)}}function EWe(e){let t=e.debugWireframe===e._debugWireframe;if(t=t&&!(e.debugWireframe&&e._wireframeDirty),t)return;l(e._rsWireframe)||(e._rsWireframe=Ge.fromCache({}));let n,i;e.debugWireframe?(n=e._rsWireframe,i=Oe.LINES):(n=e._rsColorPass,i=Oe.TRIANGLES);let r=e._commands,o=r.length;for(let s=0;s<o;s+=2){let a=r[s+1];a.renderState=n,a.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}wg.prototype.update=function(e){let t=e.context;rWe(this,t),oWe(this,t),cWe(this),lWe(this,t);let n=e.passes;n.render&&(mWe(this,t),pWe(this,e),EWe(this),this._debugWireframe?TWe(e,this._commands):Wpe(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(gWe(this),Wpe(this,e,this._pickCommands))};wg.prototype.isDestroyed=function(){return!1};wg.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaSwap=this._vaSwap&&this._vaSwap.destroy(),le(this)};var Kx=wg;function Df(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,l(this._center)||(l(this._boundingVolume)?this._center=h.clone(this._boundingVolume.center):this._center=h.clone(h.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Qn.BOTH}Object.defineProperties(Df.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});Df.packedBoxLength=N.packedLength+h.packedLength;Df.packedCylinderLength=N.packedLength+2;Df.packedEllipsoidLength=N.packedLength+h.packedLength;Df.packedSphereLength=h.packedLength+1;function CWe(e){let t=new Float64Array(N.packedLength+h.packedLength),n=0;return h.pack(e._center,t,n),n+=h.packedLength,N.pack(e._modelMatrix,t,n),t}function vWe(e,t){let n=0,i=t[n++],r=t[n++],o=e._boundingVolumes=new Array(r);for(let c=0;c<r;++c)o[c]=ue.unpack(t,n),n+=ue.packedLength;let s=t[n++],a=e._batchedIndices=new Array(s);for(let c=0;c<s;++c){let u=z.unpack(t,n);n+=z.packedLength;let f=t[n++],d=t[n++],p=t[n++],g=new Array(p);for(let m=0;m<p;++m)g[m]=t[n++];a[c]=new zp({color:u,offset:f,count:d,batchIds:g})}return i}var SWe=new Jn("createVectorTileGeometries",5),wWe=new z;function IWe(e){if(!l(e._primitive)&&!l(e._verticesPromise)){let t=e._boxes,n=e._boxBatchIds,i=e._cylinders,r=e._cylinderBatchIds,o=e._ellipsoids,s=e._ellipsoidBatchIds,a=e._spheres,c=e._sphereBatchIds,u=e._batchTableColors,f=e._packedBuffer;if(!l(u)){let m=0;l(e._boxes)&&(t=e._boxes=t.slice(),n=e._boxBatchIds=n.slice(),m+=n.length),l(e._cylinders)&&(i=e._cylinders=i.slice(),r=e._cylinderBatchIds=r.slice(),m+=r.length),l(e._ellipsoids)&&(o=e._ellipsoids=o.slice(),s=e._ellipsoidBatchIds=s.slice(),m+=s.length),l(e._spheres)&&(a=e._sphere=a.slice(),c=e._sphereBatchIds=c.slice(),m+=c.length),u=e._batchTableColors=new Uint32Array(m);let y=e._batchTable;for(let A=0;A<m;++A){let b=y.getColor(A,wWe);u[A]=b.toRgba()}f=e._packedBuffer=CWe(e)}let d=[];l(t)&&d.push(t.buffer,n.buffer),l(i)&&d.push(i.buffer,r.buffer),l(o)&&d.push(o.buffer,s.buffer),l(a)&&d.push(a.buffer,c.buffer),d.push(u.buffer,f.buffer);let p={boxes:l(t)?t.buffer:void 0,boxBatchIds:l(t)?n.buffer:void 0,cylinders:l(i)?i.buffer:void 0,cylinderBatchIds:l(i)?r.buffer:void 0,ellipsoids:l(o)?o.buffer:void 0,ellipsoidBatchIds:l(o)?s.buffer:void 0,spheres:l(a)?a.buffer:void 0,sphereBatchIds:l(a)?c.buffer:void 0,batchTableColors:u.buffer,packedBuffer:f.buffer},g=e._verticesPromise=SWe.scheduleTask(p,d);return l(g)?g.then(function(m){if(e.isDestroyed())return;let y=new Float64Array(m.packedBuffer);vWe(e,y)===2?e._indices=new Uint16Array(m.indices):e._indices=new Uint32Array(m.indices),e._indexOffsets=new Uint32Array(m.indexOffsets),e._indexCounts=new Uint32Array(m.indexCounts),e._positions=new Float32Array(m.positions),e._vertexBatchIds=new Uint16Array(m.vertexBatchIds),e._batchIds=new Uint16Array(m.batchIds),PWe(e),e._ready=!0}).catch(m=>{e.isDestroyed()||(e._error=m)}):void 0}}function PWe(e){l(e._primitive)||(e._primitive=new Kx({batchTable:e._batchTable,positions:e._positions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center,pickObject:e._pickObject??e}),e._boxes=void 0,e._boxBatchIds=void 0,e._cylinders=void 0,e._cylinderBatchIds=void 0,e._ellipsoids=void 0,e._ellipsoidBatchIds=void 0,e._spheres=void 0,e._sphereBatchIds=void 0,e._center=void 0,e._modelMatrix=void 0,e._batchTable=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._indices=void 0,e._indexOffsets=void 0,e._indexCounts=void 0,e._positions=void 0,e._vertexBatchIds=void 0,e._batchIds=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._verticesPromise=void 0)}Df.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Df.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Df.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Df.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Df.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=IWe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};Df.prototype.isDestroyed=function(){return!1};Df.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),le(this)};var Ig=Df;var FK=class{constructor(t,n,i,r,o){this._tileset=t,this._tile=n,this._resource=i,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,OWe(this,r,o)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return 0}get trianglesLength(){return l(this._geometries)?this._geometries.trianglesLength:0}get geometryByteLength(){return l(this._geometries)?this._geometries.geometryByteLength:0}get texturesByteLength(){return 0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return qpe(this),this._features[t]}applyDebugSettings(t,n){l(this._geometries)&&this._geometries.applyDebugSettings(t,n)}applyStyle(t){qpe(this),l(this._geometries)&&this._geometries.applyStyle(t,this._features)}update(t,n){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(n)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),le(this)}};function DWe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function RWe(e,t){let n,i,r,o,s,a=e.BOXES_LENGTH??0,c=e.CYLINDERS_LENGTH??0,u=e.ELLIPSOIDS_LENGTH??0,f=e.SPHERES_LENGTH??0;if(a>0&&l(e.BOX_BATCH_IDS)){let m=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,m,a)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let m=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,m,c)}if(u>0&&l(e.ELLIPSOID_BATCH_IDS)){let m=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,m,u)}if(f>0&&l(e.SPHERE_BATCH_IDS)){let m=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,m,f)}let d=l(n)||l(i)||l(r)||l(o),p=a>0&&!l(n)||c>0&&!l(i)||u>0&&!l(r)||f>0&&!l(o);if(d&&p)throw new oe("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(r)&&!l(o)){let m=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),s=0;s<a;++s)n[s]=m++;if(!l(i)&&c>0)for(i=new Uint16Array(c),s=0;s<c;++s)i[s]=m++;if(!l(r)&&u>0)for(r=new Uint16Array(u),s=0;s<u;++s)r[s]=m++;if(!l(o)&&f>0)for(o=new Uint16Array(f),s=0;s<f;++s)o[s]=m++}return{boxes:n,cylinders:i,ellipsoids:r,spheres:o}}var $x=Uint32Array.BYTES_PER_ELEMENT;function OWe(e,t,n){n=n??0;let i=new Uint8Array(t),r=new DataView(t);n+=$x;let o=r.getUint32(n,!0);if(o!==1)throw new oe(`Only Geometry tile version 1 is supported. Version ${o} is not.`);n+=$x;let s=r.getUint32(n,!0);if(n+=$x,s===0){e._ready=!0;return}let a=r.getUint32(n,!0);if(n+=$x,a===0)throw new oe("Feature table must have a byte length greater than zero");let c=r.getUint32(n,!0);n+=$x;let u=r.getUint32(n,!0);n+=$x;let f=r.getUint32(n,!0);n+=$x;let d=Ro(i,n,a);n+=a;let p=new Uint8Array(t,n,c);n+=c;let g,m;u>0&&(g=Ro(i,n,u),n+=u,f>0&&(m=new Uint8Array(t,n,f),m=new Uint8Array(m)));let y=d.BOXES_LENGTH??0,A=d.CYLINDERS_LENGTH??0,b=d.ELLIPSOIDS_LENGTH??0,x=d.SPHERES_LENGTH??0,T=y+A+b+x,E=new rm(e,T,g,m,DWe(e));if(e._batchTable=E,T===0)return;let v=e.tile.computedTransform,S;l(d.RTC_CENTER)&&(S=h.unpack(d.RTC_CENTER),N.multiplyByPoint(v,S,S));let I=RWe(d,p);if(y>0||A>0||b>0||x>0){let R,O,L,_;if(y>0){let C=p.byteOffset+d.BOXES.byteOffset;R=new Float32Array(p.buffer,C,Ig.packedBoxLength*y)}if(A>0){let C=p.byteOffset+d.CYLINDERS.byteOffset;O=new Float32Array(p.buffer,C,Ig.packedCylinderLength*A)}if(b>0){let C=p.byteOffset+d.ELLIPSOIDS.byteOffset;L=new Float32Array(p.buffer,C,Ig.packedEllipsoidLength*b)}if(x>0){let C=p.byteOffset+d.SPHERES.byteOffset;_=new Float32Array(p.buffer,C,Ig.packedSphereLength*x)}return e._geometries=new Ig({boxes:R,boxBatchIds:I.boxes,cylinders:O,cylinderBatchIds:I.cylinders,ellipsoids:L,ellipsoidBatchIds:I.ellipsoids,spheres:_,sphereBatchIds:I.spheres,center:S,modelMatrix:v,batchTable:E,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function qpe(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._geometries)&&e._geometries.createFeatures(e,n),e._features=n}}var YM=FK;var BK={};BK.encode2D=function(e,t,n){let i=Math.pow(2,e),r={x:t,y:n},o,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)o=(r.x&a)>0?1:0,s=(r.y&a)>0?1:0,c+=BigInt((3*o^s)*a*a),Ype(i,r,o,s);return c};BK.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},r,o,s,a;for(s=1,a=t;s<n;s*=2)r=1&Number(a/BigInt(2)),o=1&Number(a^BigInt(r)),Ype(s,i,r,o),i.x+=s*r,i.y+=s*o,a/=BigInt(4);return[i.x,i.y]};function Ype(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let r=t.x;t.x=t.y,t.y=r}var Uv=BK;var Jx=30,MWe=1<<Jx,NWe=1<<Jx+1>>>0,kK=2*Jx+1,Zy=4,$pe=[],Jpe=[],LWe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],Qy=1,zv=2,M6=[Qy,0,0,Qy|zv];function Hs(e){if(!dn.supportsBigInt())throw new oe("S2 required BigInt support");this._cellId=e,this._level=Hs.getLevel(e)}Hs.fromToken=function(e){return new Hs(Hs.getIdFromToken(e))};Hs.isValidId=function(e){return!(e<=0||e>>BigInt(kK)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Hs.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?Hs.isValidId(Hs.getIdFromToken(e)):!1};Hs.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};Hs.getTokenFromId=function(e){let t=Math.floor(WWe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Hs.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return Jx-(t>>1)};Hs.prototype.getChild=function(e){let t=e0e(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Hs(n)};Hs.prototype.getParent=function(){let e=e0e(this._cellId)<<BigInt(2);return new Hs(this._cellId&~e+BigInt(1)|e)};Hs.prototype.getParentAtLevel=function(e){let t=HWe(e);return new Hs(this._cellId&-t|t)};Hs.prototype.getCenter=function(e){e=e??ee.WGS84;let t=FWe(this._cellId,this._level);t=h.normalize(t,t);let n=he.fromCartesian(t,ee.UNIT_SPHERE);return he.toCartesian(n,e,new h)};Hs.prototype.getVertex=function(e,t){t=t??ee.WGS84;let n=BWe(this._cellId,this._level,e);n=h.normalize(n,n);let i=he.fromCartesian(n,ee.UNIT_SPHERE);return he.toCartesian(i,t,new h)};Hs.fromFacePositionLevel=function(e,t,n){let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),r=t.toString(2),o=Array(2*n-r.length+1).join("0"),s=Array(kK-2*n).join("0"),a=BigInt(`0b${i}${o}${r}1${s}`);return new Hs(a)};function FWe(e,t){let n=kWe(e,t);return UWe(n[0],n[1],n[2])}function BWe(e,t,n){let i=Zpe(e,t),r=zWe([i[1],i[2]],t),o=n>>1&1;return Qpe(i[0],r[0][o^n&1],r[1][o])}function kWe(e,t){let n=Zpe(e),i=n[0],r=n[1],o=n[2],s=t===30,a=!s&&(BigInt(r)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,u=(r<<1)+c,f=(o<<1)+c;return[i,u,f]}function Zpe(e){$pe.length===0&&jWe();let t=Number(e>>BigInt(kK)),n=t&Qy,i=(1<<Zy)-1,r=0,o=0;for(let s=7;s>=0;s--){let c=(1<<2*(s===7?Jx-7*Zy:Zy))-1;n+=Number(e>>BigInt(s*2*Zy+1)&BigInt(c))<<2,n=Jpe[n];let u=s*Zy;r+=n>>Zy+2<<u,o+=(n>>2&i)<<u,n&=Qy|zv}return[t,r,o]}function UWe(e,t,n){let i=Xpe(t),r=Xpe(n),o=N6(i),s=N6(r);return Qpe(e,o,s)}function Qpe(e,t,n){switch(e){case 0:return new h(1,t,n);case 1:return new h(-t,1,n);case 2:return new h(-t,-n,1);case 3:return new h(-1,-n,-t);case 4:return new h(n,-1,-t);default:return new h(n,t,-1)}}function N6(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Xpe(e){return 1/NWe*e}function zWe(e,t){let n=[[],[]],i=VWe(t);for(let r=0;r<2;++r){let o=e[r]&-i,s=o+i;n[r][0]=N6(Kpe(o)),n[r][1]=N6(Kpe(s))}return n}function VWe(e){return 1<<Jx-e>>>0}function Kpe(e){return 1/MWe*e}function eA(e,t,n,i,r,o){if(e===Zy){let s=(t<<Zy)+n;$pe[(s<<2)+i]=(r<<2)+o,Jpe[(r<<2)+i]=(s<<2)+o}else{e++,t<<=1,n<<=1,r<<=2;let s=LWe[o];eA(e,t+(s[0]>>1),n+(s[0]&1),i,r,o^M6[0]),eA(e,t+(s[1]>>1),n+(s[1]&1),i,r+1,o^M6[1]),eA(e,t+(s[2]>>1),n+(s[2]&1),i,r+2,o^M6[2]),eA(e,t+(s[3]>>1),n+(s[3]&1),i,r+3,o^M6[3])}}function jWe(){eA(0,0,0,0,0,0),eA(0,0,0,Qy,0,Qy),eA(0,0,0,zv,0,zv),eA(0,0,0,Qy|zv,0,Qy|zv)}function e0e(e){return e&~e+BigInt(1)}function HWe(e){return BigInt(1)<<BigInt(2*(Jx-e))}var GWe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function WWe(e){return GWe[(-e&e)%BigInt(67)]}var Pg=Hs;function qWe(e,t){return l(e)&&l(e.extensions)&&l(e.extensions[t])}var tr=qWe;function UK(e){let t=e.lengthBits,n=e.availableCount,i=e.constant,r=e.bitstream;if(l(i))n=t;else{let o=Math.ceil(t/8);if(r.length!==o)throw new oe(`Availability bitstream must be exactly ${o} bytes long to store ${t} bits. Actual bitstream was ${r.length} bytes long.`);let s=e.computeAvailableCountEnabled??!1;!l(n)&&s&&(n=YWe(r,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=r}function YWe(e,t){let n=0;for(let i=0;i<t;i++){let r=i>>3,o=i%8;n+=e[r]>>o&1}return n}Object.defineProperties(UK.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});UK.prototype.getBit=function(e){if(l(this._constant))return this._constant;let t=e>>3,n=e%8;return(this._bitstream[t]>>n&1)===1};var Vv=UK;function Dg(e){e=e??H.EMPTY_OBJECT;let t=e.metadataTable,n=e.class,i=e.entityId,r=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=r.extensions,this._extras=r.extras}Object.defineProperties(Dg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Dg.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};Dg.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};Dg.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};Dg.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};Dg.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};Dg.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};Dg.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var jv=Dg;var XM={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};XM.getBranchingFactor=function(e){switch(e){case XM.OCTREE:return 8;case XM.QUADTREE:return 4}};Object.freeze(XM);var Gs=XM;function uc(){}Object.defineProperties(uc.prototype,{class:{get:function(){pe.throwInstantiationError()}}});uc.prototype.hasProperty=function(e){pe.throwInstantiationError()};uc.prototype.hasPropertyBySemantic=function(e){pe.throwInstantiationError()};uc.prototype.getPropertyIds=function(e){pe.throwInstantiationError()};uc.prototype.getProperty=function(e){pe.throwInstantiationError()};uc.prototype.setProperty=function(e,t){pe.throwInstantiationError()};uc.prototype.getPropertyBySemantic=function(e){pe.throwInstantiationError()};uc.prototype.setPropertyBySemantic=function(e,t){pe.throwInstantiationError()};uc.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let r=i[e];return!!(l(r)&&l(r.default))};uc.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let r=i[e];return l(r)};uc.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let r in e)e.hasOwnProperty(r)&&l(e[r])&&n.push(r);let i=t.properties;if(l(i))for(let r in i)i.hasOwnProperty(r)&&!l(e[r])&&l(i[r].default)&&n.push(r);return n};uc.getProperty=function(e,t,n){let i=n.properties[e],r=t[e];Array.isArray(r)&&l(r.slice)&&(r=r.slice());let o=!0;if(r=i.handleNoData(r),!l(r)&&l(i.default))return r=Je(i.default,!0),i.unpackVectorAndMatrixTypes(r,o);if(l(r))return r=i.normalize(r),r=i.applyValueTransform(r),i.unpackVectorAndMatrixTypes(r,o)};uc.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&l(t.slice)&&(t=t.slice());let r,o=i.properties;return l(o)&&(r=o[e]),l(r)&&(t=r.packVectorAndMatrixTypes(t,!0),t=r.unapplyValueTransform(t),t=r.unnormalize(t)),n[e]=t,!0};uc.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let r=i[e];if(l(r))return uc.getProperty(r.id,t,n)};uc.setPropertyBySemantic=function(e,t,n,i){let r=i.propertiesBySemantic;if(!l(r))return!1;let o=i.propertiesBySemantic[e];return l(o)?uc.setProperty(o.id,t,n,i):!1};var Yn=uc;function Rg(e){e=e??H.EMPTY_OBJECT;let t=e.subtreeMetadata,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Rg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Rg.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};Rg.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};Rg.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};Rg.prototype.getProperty=function(e){return Yn.getProperty(e,this._properties,this._class)};Rg.prototype.setProperty=function(e,t){return Yn.setProperty(e,t,this._properties,this._class)};Rg.prototype.getPropertyBySemantic=function(e){return Yn.getPropertyBySemantic(e,this._properties,this._class)};Rg.prototype.setPropertyBySemantic=function(e,t){return Yn.setPropertyBySemantic(e,t,this._properties,this._class)};var KM=Rg;var fn={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},rl={INTEGER:"int",UNSIGNED_INTEGER:"uint",FLOAT:"float"};fn.typeInfo={INT8:{vectorCompatible:!0,size:1,maximumValue:127,minimumValue:-128,category:rl.INTEGER},UINT8:{vectorCompatible:!0,size:1,maximumValue:255,minimumValue:0,category:rl.UNSIGNED_INTEGER},INT16:{vectorCompatible:!0,size:2,maximumValue:32767,minimumValue:-32768,category:rl.INTEGER},UINT16:{vectorCompatible:!0,size:2,maximumValue:65535,minimumValue:0,category:rl.UNSIGNED_INTEGER},INT32:{vectorCompatible:!0,size:4,maximumValue:2147483647,minimumValue:-2147483648,category:rl.INTEGER},UINT32:{vectorCompatible:!0,size:4,maximumValue:4294967295,minimumValue:0,category:rl.UNSIGNED_INTEGER},INT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("9223372036854775807"),minimumValue:BigInt("-9223372036854775808"),category:rl.INTEGER,downcastFunction:e=>fn.clampToLimits(e,fn.INT32)},UINT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("18446744073709551615"),minimumValue:BigInt(0),category:rl.UNSIGNED_INTEGER,downcastFunction:e=>fn.clampToLimits(e,fn.UINT32)},FLOAT32:{vectorCompatible:!0,size:4,maximumValue:34028234663852886e22,minimumValue:-34028234663852886e22,category:rl.FLOAT},FLOAT64:{vectorCompatible:!0,size:8,maximumValue:Number.MAX_VALUE,minimumValue:-Number.MAX_VALUE,category:rl.FLOAT,downcastFunction:e=>Math.fround(e)}};fn.getMinimum=function(e){return fn.typeInfo[e].minimumValue};fn.getMaximum=function(e){return fn.typeInfo[e].maximumValue};fn.isIntegerType=function(e){return fn.typeInfo[e].category!==rl.FLOAT};fn.isUnsignedIntegerType=function(e){return fn.typeInfo[e].category===rl.UNSIGNED_INTEGER};fn.isVectorCompatible=function(e){return fn.typeInfo[e].vectorCompatible};fn.category=function(e){return fn.typeInfo[e].category};fn.gpuComponentType=function(e){switch(e){case fn.INT64:return"INT32";case fn.UINT64:return"UINT32";case fn.FLOAT64:return"FLOAT32";default:return e}};fn.normalize=function(e,t){return Math.max(Number(e)/Number(fn.getMaximum(t)),-1)};fn.unnormalize=function(e,t){let n=fn.getMaximum(t),i=fn.isUnsignedIntegerType(t)?0:-n;return e=D.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===fn.INT64||t===fn.UINT64)&&dn.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};fn.applyValueTransform=function(e,t,n){return n*e+t};fn.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};fn.getSizeInBytes=function(e){return fn.typeInfo[e].size};fn.clampToLimits=function(e,t){let n=fn.getMinimum(t),i=fn.getMaximum(t);if(typeof e=="bigint"){let r=BigInt(n),o=BigInt(i);return e<r?n:e>o?i:Number(e)}return Math.max(n,Math.min(i,e))};fn.downcastFunction=function(e){let n=fn.typeInfo[e].downcastFunction;return l(n)?n:i=>i};fn.fromComponentDatatype=function(e){switch(e){case Y.BYTE:return fn.INT8;case Y.UNSIGNED_BYTE:return fn.UINT8;case Y.SHORT:return fn.INT16;case Y.UNSIGNED_SHORT:return fn.UINT16;case Y.INT:return fn.INT32;case Y.UNSIGNED_INT:return fn.UINT32;case Y.FLOAT:return fn.FLOAT32;case Y.DOUBLE:return fn.FLOAT64}};fn.toComponentDatatype=function(e){switch(e){case fn.INT8:return Y.BYTE;case fn.UINT8:return Y.UNSIGNED_BYTE;case fn.INT16:return Y.SHORT;case fn.UINT16:return Y.UNSIGNED_SHORT;case fn.INT32:return Y.INT;case fn.UINT32:return Y.UNSIGNED_INT;case fn.FLOAT32:return Y.FLOAT;case fn.FLOAT64:return Y.DOUBLE}};fn.getDataViewAccessors=function(e,t){return{[fn.UINT8]:{get:e.getUint8.bind(e),set:e.setUint8.bind(e)},[fn.INT8]:{get:e.getInt8.bind(e),set:e.setInt8.bind(e)},[fn.UINT16]:{get:i=>e.getUint16(i,!0),set:(i,r)=>e.setUint16(i,r,!0)},[fn.INT16]:{get:i=>e.getInt16(i,!0),set:(i,r)=>e.setInt16(i,r,!0)},[fn.UINT32]:{get:i=>e.getUint32(i,!0),set:(i,r)=>e.setUint32(i,r,!0)},[fn.INT32]:{get:i=>e.getInt32(i,!0),set:(i,r)=>e.setInt32(i,r,!0)},[fn.FLOAT32]:{get:i=>e.getFloat32(i,!0),set:(i,r)=>e.setFloat32(i,r,!0)},[fn.FLOAT64]:{get:i=>e.getFloat64(i,!0),set:(i,r)=>e.setFloat64(i,r,!0)},[fn.UINT64]:{get:i=>e.getBigUint64(i,!0),set:(i,r)=>e.setBigUint64(i,BigInt(r),!0)},[fn.INT64]:{get:i=>e.getBigInt64(i,!0),set:(i,r)=>e.setBigInt64(i,BigInt(r),!0)}}[t]};Object.freeze(fn);var Lt=fn;var oo={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4",BOOLEAN:"BOOLEAN",STRING:"STRING",ENUM:"ENUM"};oo.isVectorType=function(e){switch(e){case oo.VEC2:case oo.VEC3:case oo.VEC4:return!0;default:return!1}};oo.isMatrixType=function(e){switch(e){case oo.MAT2:case oo.MAT3:case oo.MAT4:return!0;default:return!1}};oo.getComponentCount=function(e){switch(e){case oo.SCALAR:case oo.STRING:case oo.ENUM:case oo.BOOLEAN:return 1;case oo.VEC2:return 2;case oo.VEC3:return 3;case oo.VEC4:return 4;case oo.MAT2:return 4;case oo.MAT3:return 9;case oo.MAT4:return 16}};oo.getMathType=function(e){switch(e){case oo.VEC2:return U;case oo.VEC3:return h;case oo.VEC4:return se;case oo.MAT2:return Xi;case oo.MAT3:return $;case oo.MAT4:return N;default:return}};Object.freeze(oo);var bt=oo;function os(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.type,i=e.componentType,r=e.enumType,o=l(i)&&(e.normalized??!1)&&Lt.isIntegerType(i);this._id=t,this._name=e.name,this._description=e.description,this._semantic=e.semantic,this._isLegacyExtension=e.isLegacyExtension,this._type=n,this._componentType=i,this._enumType=r,this._valueType=l(r)?r.valueType:i,this._isArray=e.isArray??!1,this._isVariableLengthArray=e.isVariableLengthArray??!1,this._arrayLength=e.arrayLength,this._min=Je(e.min,!0),this._max=Je(e.max,!0),this._normalized=o;let s=Je(e.offset,!0),a=Je(e.scale,!0),c=l(s)||l(a),u=!0;l(s)||(s=this.expandConstant(0,u)),l(a)||(a=this.expandConstant(1,u)),this._offset=s,this._scale=a,this._hasValueTransform=c,this._noData=Je(e.noData,!0),this._default=Je(e.default,!0),this._required=e.required??!0,this._extras=Je(e.extras,!0),this._extensions=Je(e.extensions,!0)}os.fromJson=function(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.property,i=XWe(n),r=KWe(n,e.enums),o;return l(i)?i?o=l(n.optional)?!n.optional:!0:o=n.required??!1:o=!1,new os({id:t,type:r.type,componentType:r.componentType,enumType:r.enumType,isArray:r.isArray,isVariableLengthArray:r.isVariableLengthArray,arrayLength:r.arrayLength,normalized:n.normalized,min:n.min,max:n.max,offset:n.offset,scale:n.scale,noData:n.noData,default:n.default,required:o,name:n.name,description:n.description,semantic:n.semantic,extras:n.extras,extensions:n.extensions,isLegacyExtension:i})};Object.defineProperties(os.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},isArray:{get:function(){return this._isArray}},isVariableLengthArray:{get:function(){return this._isVariableLengthArray}},arrayLength:{get:function(){return this._arrayLength}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},noData:{get:function(){return this._noData}},default:{get:function(){return this._default}},required:{get:function(){return this._required}},semantic:{get:function(){return this._semantic}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function XWe(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===bt.SCALAR||bt.isMatrixType(t)||bt.isVectorType(t))return!1;if(l(Lt[t]))return!0;if(l(e.noData)||l(e.scale)||l(e.offset)||l(e.required)||l(e.count)||l(e.array)||l(e.optional))return!1}function KWe(e,t){let n=e.type,i=e.componentType,r=n==="ARRAY",o,s,a;r?(o=!0,s=e.componentCount,a=!l(s)):e.array?(o=!0,s=e.count,a=!l(e.count)):(o=!1,s=void 0,a=!1);let c;if(l(e.enumType)&&(c=t[e.enumType]),n===bt.ENUM)return{type:n,componentType:void 0,enumType:c,valueType:c.valueType,isArray:o,isVariableLengthArray:a,arrayLength:s};if(r&&i===bt.ENUM)return{type:i,componentType:void 0,enumType:c,valueType:c.valueType,isArray:o,isVariableLengthArray:a,arrayLength:s};if(n===bt.SCALAR||bt.isMatrixType(n)||bt.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:o,isVariableLengthArray:a,arrayLength:s};if(n===bt.BOOLEAN||n===bt.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:o,isVariableLengthArray:a,arrayLength:s};if(r&&(i===bt.BOOLEAN||i===bt.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:o,isVariableLengthArray:a,arrayLength:s};if(l(i)&&l(Lt[i]))return{type:bt.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:o,isVariableLengthArray:a,arrayLength:s};if(l(Lt[n]))return{type:bt.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:o,isVariableLengthArray:a,arrayLength:s}}os.prototype.normalize=function(e){return this._normalized?zK(e,this._valueType,Lt.normalize):e};os.prototype.unnormalize=function(e){return this._normalized?zK(e,this._valueType,Lt.unnormalize):e};os.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:os.valueTransformInPlace(e,this._offset,this._scale,Lt.applyValueTransform)};os.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:os.valueTransformInPlace(e,this._offset,this._scale,Lt.unapplyValueTransform)};os.prototype.expandConstant=function(e,t){t=t??!1;let n=this._isArray,i=this._arrayLength,r=bt.getComponentCount(this._type),o=n&&r>1;if(!n&&r===1)return e;if(!n)return new Array(r).fill(e);if(!o)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*r).fill(e);let s=new Array(r).fill(e);return new Array(this._arrayLength).fill(s)};os.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!r0e(e,t))return e};function $M(e){return Array.isArray(e)&&!(e instanceof Xi)&&!(e instanceof $)&&!(e instanceof N)}function r0e(e,t){if(!$M(e))return e===t;if(!$M(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!r0e(e[n],t[n]))return!1;return!0}os.prototype.unpackVectorAndMatrixTypes=function(e,t){t=t??!1;let n=bt.getMathType(this._type),i=this._isArray,r=bt.getComponentCount(this._type),o=i&&r>1;return l(n)?t&&o?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};os.prototype.packVectorAndMatrixTypes=function(e,t){t=t??!1;let n=bt.getMathType(this._type),i=this._isArray,r=bt.getComponentCount(this._type),o=i&&r>1;return l(n)?t&&o?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};os.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?$We(this,e):o0e(this,e)};function $We(e,t){if(!$M(t))return`value ${t} must be an array`;let n=t.length;if(!e._isVariableLengthArray&&n!==e._arrayLength)return"Array length does not match property.arrayLength";for(let i=0;i<n;i++){let r=o0e(e,t[i]);if(l(r))return r}}function o0e(e,t){let n=e._type,i=e._componentType,r=e._enumType,o=e._normalized;return bt.isVectorType(n)?JWe(t,n,i):bt.isMatrixType(n)?ZWe(t,n,i):n===bt.STRING?QWe(t):n===bt.BOOLEAN?eqe(t):n===bt.ENUM?tqe(t,r):nqe(t,i,o)}function JWe(e,t,n){if(!Lt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===bt.VEC2&&!(e instanceof U))return`vector value ${e} must be a Cartesian2`;if(t===bt.VEC3&&!(e instanceof h))return`vector value ${e} must be a Cartesian3`;if(t===bt.VEC4&&!(e instanceof se))return`vector value ${e} must be a Cartesian4`}function ZWe(e,t,n){if(!Lt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===bt.MAT2&&!(e instanceof Xi))return`matrix value ${e} must be a Matrix2`;if(t===bt.MAT3&&!(e instanceof $))return`matrix value ${e} must be a Matrix3`;if(t===bt.MAT4&&!(e instanceof N))return`matrix value ${e} must be a Matrix4`}function QWe(e){if(typeof e!="string")return L6(e,bt.STRING)}function eqe(e){if(typeof e!="boolean")return L6(e,bt.BOOLEAN)}function tqe(e,t){let n=typeof e;if(l(t))return n!=="string"||!l(t.valuesByName[e])?`value ${e} is not a valid enum name for ${t.id}`:void 0}function nqe(e,t,n){let i=typeof e;switch(t){case Lt.INT8:case Lt.UINT8:case Lt.INT16:case Lt.UINT16:case Lt.INT32:case Lt.UINT32:case Lt.FLOAT32:case Lt.FLOAT64:return i!=="number"?L6(e,t):isFinite(e)?n0e(e,t,n):i0e(e,t);case Lt.INT64:case Lt.UINT64:return i!=="number"&&i!=="bigint"?L6(e,t):i==="number"&&!isFinite(e)?i0e(e,t):n0e(e,t,n)}}function L6(e,t){return`value ${e} does not match type ${t}`}function t0e(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function n0e(e,t,n){if(n){let i=Lt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?t0e(e,t,n):void 0}if(e<Lt.getMinimum(t)||e>Lt.getMaximum(t))return t0e(e,t,n)}function i0e(e,t){return`value ${e} of type ${t} must be finite`}function zK(e,t,n){if(!$M(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=zK(e[i],t,n);return e}os.valueTransformInPlace=function(e,t,n,i){if(!$M(e))return i(e,t,n);for(let r=0;r<e.length;r++)e[r]=os.valueTransformInPlace(e[r],t[r],n[r],i);return e};os.prototype.cpuBytesPerElement=function(){return s0e(this,this.valueType)};os.prototype.gpuBytesPerElement=function(){let e=Lt.gpuComponentType(this.valueType);return s0e(this,e)};function s0e(e,t){let n=e.type,i=bt.getComponentCount(n),r=e.isArray?e.arrayLength:1,o=Lt.getSizeInBytes(t);return i*r*o}os.prototype.isGpuCompatible=function(e){let t=this.type;return!(this.isVariableLengthArray||t===bt.STRING||t===bt.BOOLEAN||this.gpuBytesPerElement()>e)};var VK=[void 0,"float","vec2","vec3","vec4"],a0e=[void 0,"int","ivec2","ivec3","ivec4"],iqe=[void 0,"uint","uvec2","uvec3","uvec4"],rqe={[rl.FLOAT]:"uintBitsToFloat",[rl.INTEGER]:"int",[rl.UNSIGNED_INTEGER]:""};os.prototype.getGlslTypeWebGL1=function(){let e=bt.getComponentCount(this.type);return this.isArray&&(e=this.arrayLength),this.normalized?VK[e]:a0e[e]};os.prototype.getGlslType=function(){let e=this.valueType,t=bt.getComponentCount(this.type),n=this.isArray?this.arrayLength:1;return t*=n,!Lt.isIntegerType(e)||this.normalized?VK[t]:Lt.isUnsignedIntegerType(e)?iqe[t]:a0e[t]};os.prototype.unpackTextureInShader=function(e,t,n,i){let r=this.getGlslType(),o=Lt.gpuComponentType(this.valueType),s=t.length,a=this.type,c=bt.getComponentCount(a)*(this.isArray?this.arrayLength:1),u=Math.floor(s/c),f=`${n}_rawChannels`,d=`${n}_rawBits`,p=`${n}_unpackedValue`,g=`${r} ${p};`,m=`uint ${d};`;i.push(g),i.push(m);let y=`${VK[s]} ${f} = ${e};`;i.push(y);let A=rqe[Lt.category(o)],b=c>1;for(let x=0;x<c;x++){let T="rgba".slice(x*u,(x+1)*u),E=s>1?`.${T}`:"",v=`${d} = czm_unpackTexture(${f}${E});`,S="";b&&(S=`[${x}]`);let I="",R="";if(this.normalized){let L=Lt.getMaximum(o);I=` * ${1/Number(L)}`,R="float"}let O=`${p}${S} = ${R}(${A}(${d}))${I};`;i.push(v),i.push(O)}return p};os.prototype.unpackTextureInShaderWebGL1=function(e){return this.normalized?e:`${this.getGlslTypeWebGL1()}(255.0 * ${e})`};var Vp=os;function JM(e){e=e??H.EMPTY_OBJECT;let t=e.count,n=e.property,i=e.classProperty,r=e.bufferViews,o=i.type,s=i.isArray,a=i.isVariableLengthArray,c=i.valueType,u=i.enumType,f=o===bt.STRING,d=o===bt.BOOLEAN,p=0,g;if(a){let _=n.arrayOffsetType??n.offsetType;_=Lt[_]??Lt.UINT32;let C=n.arrayOffsets??n.arrayOffsetBufferView;g=new jK(r[C],_,t+1),p+=g.typedArray.byteLength}let m=bt.getComponentCount(o),y;a?y=g.get(t)-g.get(0):s?y=t*i.arrayLength:y=t;let A=m*y,b;if(f){let _=n.stringOffsetType??n.offsetType;_=Lt[_]??Lt.UINT32;let C=n.stringOffsets??n.stringOffsetBufferView;b=new jK(r[C],_,A+1),p+=b.typedArray.byteLength}(f||d)&&(c=Lt.UINT8);let x;f?x=b.get(A)-b.get(0):d?x=Math.ceil(A/8):x=A;let T=n.values??n.bufferView,E=new jK(r[T],c,x);p+=E.typedArray.byteLength;let v=n.offset,S=n.scale,I=i.hasValueTransform||l(v)||l(S);v=v??i.offset,S=S??i.scale,v=c0e(v),S=c0e(S);let R,O,L=this;f?R=function(_){return aqe(_,L._values,L._stringOffsets)}:d?(R=function(_){return cqe(_,L._values)},O=function(_,C){lqe(_,L._values,C)}):l(u)?(R=function(_){let C=L._values.get(_);return u.namesByValue[C]},O=function(_,C){let w=u.valuesByName[C];L._values.set(_,w)}):(R=function(_){return L._values.get(_)},O=function(_,C){L._values.set(_,C)}),this._arrayOffsets=g,this._stringOffsets=b,this._values=E,this._classProperty=i,this._count=t,this._vectorComponentCount=m,this._min=n.min,this._max=n.max,this._offset=v,this._scale=S,this._hasValueTransform=I,this._getValue=R,this._setValue=O,this._unpackedValues=void 0,this._extras=n.extras,this._extensions=n.extensions,this._byteLength=p}Object.defineProperties(JM.prototype,{hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){return this._byteLength}},classProperty:{get:function(){return this._classProperty}}});JM.prototype.get=function(e){let t=oqe(this,e);return t=this._classProperty.handleNoData(t),l(t)?(t=this._classProperty.normalize(t),t=_qe(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};JM.prototype.set=function(e,t){let n=this._classProperty;t=n.packVectorAndMatrixTypes(t),t=yqe(this,t),t=n.unnormalize(t),sqe(this,e,t)};JM.prototype.getTypedArray=function(){if(l(this._values))return this._values.typedArray};function c0e(e){if(!Array.isArray(e)||!l(e.slice))return e;let t=[];for(let n=0;n<e.length;n++){let i=e[n];Array.isArray(i)?ti(t,i):t.push(i)}return t}function oqe(e,t){u0e(e)&&f0e(e);let n=e._classProperty,i=n.isArray,r=n.type,o=bt.getComponentCount(r);if(l(e._unpackedValues)){let s=e._unpackedValues[t];return i?Je(s,!0):s}return!i&&o===1?e._getValue(t):l0e(e,n,t)}function l0e(e,t,n){let i,r;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),r=e._arrayOffsets.get(n+1)-i;let s=bt.getComponentCount(t.type);i*=s,r*=s}else{let a=(t.arrayLength??1)*e._vectorComponentCount;i=n*a,r=a}let o=new Array(r);for(let s=0;s<r;s++)o[s]=e._getValue(i+s);return o}function sqe(e,t,n){pqe(e,t,n)&&f0e(e);let i=e._classProperty,r=i.isArray,o=i.type,s=bt.getComponentCount(o);if(l(e._unpackedValues)){i.isArray&&(n=Je(n,!0)),e._unpackedValues[t]=n;return}if(!r&&s===1){e._setValue(t,n);return}let a,c;if(i.isVariableLengthArray)a=e._arrayOffsets.get(t),c=e._arrayOffsets.get(t+1)-a;else{let f=(i.arrayLength??1)*e._vectorComponentCount;a=t*f,c=f}for(let u=0;u<c;++u)e._setValue(a+u,n[u])}function aqe(e,t,n){let i=n.get(e),r=n.get(e+1)-i;return ku(t.typedArray,i,r)}function cqe(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function lqe(e,t,n){let i=e>>3,r=e%8;n?t.typedArray[i]|=1<<r:t.typedArray[i]&=~(1<<r)}function uqe(e,t){let n=t.dataView,i=e*8,r=0,o=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);o&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),r+=c*Math.pow(256,a)}return o&&(r=-r),r}function fqe(e,t){let n=t.dataView,i=e*8,r=BigInt(0),o=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);o&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),r+=BigInt(c)*(BigInt(1)<<BigInt(a*8))}return o&&(r=-r),r}function dqe(e,t){let n=t.dataView,i=e*8,r=n.getUint32(i,!0),o=n.getUint32(i+4,!0);return r+4294967296*o}function hqe(e,t){let n=t.dataView,i=e*8,r=BigInt(n.getUint32(i,!0)),o=BigInt(n.getUint32(i+4,!0));return r+BigInt(4294967296)*o}function mqe(e){switch(e){case Lt.INT8:return Y.BYTE;case Lt.UINT8:return Y.UNSIGNED_BYTE;case Lt.INT16:return Y.SHORT;case Lt.UINT16:return Y.UNSIGNED_SHORT;case Lt.INT32:return Y.INT;case Lt.UINT32:return Y.UNSIGNED_INT;case Lt.FLOAT32:return Y.FLOAT;case Lt.FLOAT64:return Y.DOUBLE}}function u0e(e){if(l(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===bt.STRING||i===Lt.INT64&&!dn.supportsBigInt64Array()||i===Lt.UINT64&&!dn.supportsBigUint64Array()}function pqe(e,t,n){if(u0e(e))return!0;let i=e._arrayOffsets;if(l(i)){let r=i.get(t+1)-i.get(t),o=n.length;if(r!==o)return!0}return!1}function f0e(e){e._unpackedValues=gqe(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function gqe(e){let t=e._count,n=new Array(t),i=e._classProperty,r=i.isArray,o=i.type,s=bt.getComponentCount(o);if(!r&&s===1){for(let a=0;a<t;++a)n[a]=e._getValue(a);return n}for(let a=0;a<t;a++)n[a]=l0e(e,i,a);return n}function _qe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:Vp.valueTransformInPlace(t,e._offset,e._scale,Lt.applyValueTransform)}function yqe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:Vp.valueTransformInPlace(t,e._offset,e._scale,Lt.unapplyValueTransform)}function jK(e,t,n){let i=this,r,o,s;if(t===Lt.INT64)dn.supportsBigInt()?dn.supportsBigInt64Array()?(r=new BigInt64Array(e.buffer,e.byteOffset,n),s=function(a,c){i.typedArray[a]=BigInt(c)}):(r=new Uint8Array(e.buffer,e.byteOffset,n*8),o=function(a){return fqe(a,i)}):(_t("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),r=new Uint8Array(e.buffer,e.byteOffset,n*8),o=function(a){return uqe(a,i)});else if(t===Lt.UINT64)dn.supportsBigInt()?dn.supportsBigUint64Array()?(r=new BigUint64Array(e.buffer,e.byteOffset,n),s=function(a,c){i.typedArray[a]=BigInt(c)}):(r=new Uint8Array(e.buffer,e.byteOffset,n*8),o=function(a){return hqe(a,i)}):(_t("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),r=new Uint8Array(e.buffer,e.byteOffset,n*8),o=function(a){return dqe(a,i)});else{let a=mqe(t);r=Y.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(c,u){i.typedArray[c]=u}}l(o)||(o=function(a){return i.typedArray[a]}),this.typedArray=r,this.dataView=new DataView(r.buffer,r.byteOffset),this.get=o,this.set=s,this._componentType=t}var ZM=JM;function sm(e){e=e??H.EMPTY_OBJECT;let t=e.count,n=e.class,i=0,r={};if(l(e.properties)){for(let o in e.properties)if(e.properties.hasOwnProperty(o)){let s=new ZM({count:t,property:e.properties[o],classProperty:n.properties[o],bufferViews:e.bufferViews});r[o]=s,i+=s.byteLength}}this._count=t,this._class=n,this._properties=r,this._byteLength=i}Object.defineProperties(sm.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}},properties:{get:function(){return this._properties}}});sm.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};sm.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};sm.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};sm.prototype.getProperty=function(e,t){let n=this._properties[t],i;return l(n)?i=n.get(e):i=Aqe(this._class,t),i};sm.prototype.setProperty=function(e,t,n){let i=this._properties[t];return l(i)?(i.set(e,n),!0):!1};sm.prototype.getPropertyBySemantic=function(e,t){let n,i=this._class.propertiesBySemantic;if(l(i)&&(n=i[t]),l(n))return this.getProperty(e,n.id)};sm.prototype.setPropertyBySemantic=function(e,t,n){let i,r=this._class.propertiesBySemantic;return l(r)&&(i=r[t]),l(i)?this.setProperty(e,i.id,n):!1};sm.prototype.getPropertyTypedArray=function(e){let t=this._properties[e];if(l(t))return t.getTypedArray()};sm.prototype.getPropertyTypedArrayBySemantic=function(e){let t,n=this._class.propertiesBySemantic;if(l(n)&&(t=n[e]),l(t))return this.getPropertyTypedArray(t.id)};function Aqe(e,t){let n=e.properties;if(!l(n))return;let i=n[t];if(l(i)&&l(i.default)){let r=i.default;return i.isArray&&(r=Je(r,!0)),r=i.normalize(r),i.unpackVectorAndMatrixTypes(r)}}var Fd=sm;var HK=class{get cacheKey(){pe.throwInstantiationError()}load(){pe.throwInstantiationError()}unload(){}process(t){return!1}getError(t,n){l(n)&&l(n.message)&&(t+=`
${n.message}`);let i=new oe(t);return l(n)&&(i.stack=`Original stack:
${n.stack}
Handler stack:
${i.stack}`),i}isDestroyed(){return!1}destroy(){return this.unload(),le(this)}},nr=HK;var d0e={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5};Object.freeze(d0e);var Tt=d0e;var F6=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.typedArray,i=t.resource,r=t.cacheKey;this._typedArray=n,this._resource=i,this._cacheKey=r,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:l(this._typedArray)?(this._promise=Promise.resolve(this),this._promise):(this._promise=bqe(this),this._promise)}static _fetchArrayBuffer(t){return t.fetchArrayBuffer()}unload(){this._typedArray=void 0}};async function bqe(e){let t=e._resource;e._state=Tt.LOADING;try{let n=await F6._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=Tt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=Tt.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}var Zx=F6;function xqe(e){let t=e?.extensions;if(l(t))return t.KHR_meshopt_compression??t.EXT_meshopt_compression}var tA=xqe;var UTn=(function(){var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiE8AdilveoveovrrwrrrDDoDrbqqbelve9Weiiviebeoweuecj:Gdkr:PlCo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9mW4W2be8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbd8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbiE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UblY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbv8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbo8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UbrE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbwa9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbDL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbqK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbkL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbxY9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVJ9V29VVbmE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbza9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9WbHa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbOK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbAl79IV9RbXDwebcekdKYq:zf8Adbk;wadhud9:8Jjjjjbc;qw9Rgr8KjjjjbcbhwdnaeTmbabcbyd;i:I:cjbaoaocb9iEgDc:GeV86bbarc;adfcbcjdz:xjjjb8AdnaiTmbarc;adfadalz:wjjjb8Akarc;abfalfcbcbcjdal9RalcFe0Ez:xjjjb8Aarc;abfarc;adfalz:wjjjb8Aar9cb83iUar9cb83i8War9cb83iyar9cb83iaar9cb83iKar9cb83izar9cb83iwar9cb83ibcj;abal9Uc;WFbGcjdalca0Ehqdnaicd6mbavcd9imbaDTmbadcefhkaqci2gxal2hmarc;alfclfhParc;qlfceVhsarc;qofclVhzcbhHincdhOcbhAdnavci6mbar9cb83i;Ooar9cb83i;Goar9cb83i;yoar9cb83i;qoadaHfgoybbhCcbhXincbhwcbhQdninaoalfhLaoybbgKaC7aQVhQawcP0meaLhoaKhCawcefgwaXfai6mbkkcbhCarc;qofhwincwhYcwh8AdnaQaC93gocFeGgEcs0mbclh8AaEci0mbcdcbaEEh8Akdnaocw4cFeGgEcs0mbclhYaEci0mbcdcbaEEhYkaYa8AfhEawydbh3cwhYcwh8Adnaocz4cFeGg5cs0mbclh8Aa5ci0mbcdcba5Eh8AkaEa3fhEdnaocFFFFb0mbclhYaocFFF8F0mbcbcdaocjjjw6EhYkawaEa8AfaYfBdbawclfhwaCcefgCcw9hmbkaLhoaKhCaXczfgXai6mbkcbhocehwazhQinawaoaQydbarc;qofaocdtfydb6EhoaQclfhQawcefgwcw9hmbkaoclthAcihOkcbhEarc;qlfcbcjdz:xjjjb8AarcbBd;ilar9cb83i;aladh8Eaqh8Fakh3inarc;qlfadaEaEcb9h9Ral2falz:wjjjb8Aaia8Faia8F6EhadnaqaiaE9RaEaqfai6EgKcsfc9WGgoaK9nmbarc;qofaKfcbaoaK9Rz:xjjjb8AkadaEal2fhhcbhginagaAVcl4hXarc;alfagcdtfh8JaHh8Kcbh8Lina8LaHfhwdndndndndndndnagPlbedibkaKTmvahawfhoarc;qlfawfRbbhQarc;qofhwaahCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaEaCcufgC9hmbxvkkaKTmla8Kc9:Ghoa8LcitcwGh8Aarc;qlfawceVfRbbcwtarc;qlfawc9:GfRbbVhQarc;qofhwaahCinawa3aofRbbcwta8EaofRbbVgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbaoalfhoawcefhwaYhQaEaCcufgC9hmbxlkkasa8Kc98GgQfhoa3aQfhYarc;qlfawc98GgQfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbxdkkaKTmdxekaKTmea8Lcith5ahaQfh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aX93a5486bbaYalfhYa8Aalfh8AaQhCaLcefgLaK9hmbkka8Jydbh8AcbhLarc;qofhoincdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgwaYawaY6Egwczawcz6Ea8Afh8AaoczfhoaLczfgLaK6mbka8Ja8ABdbka8Kcefh8Ka8Lcefg8Lcl9hmbkagcefggaO9hmbka8Eamfh8Ea8Faxfh8Fa3amfh3aEaxfgEai6mbkcbhocehwaPhQinawaoaQydbarc;alfaocdtfydb6EhoaQclfhQaOawcefgw9hmbkaraHcd4faAcdVaoaocdSE86bbaHclfgHal6mbkkabaefhgabcefhoalcd4g8McbaDEhkadcefh8Narc;abfceVhecbhmdndninaiam9nmearc;qofcbcjdz:xjjjb8Aagao9Rak6mdadamal2gwfhxcbhHa8Nawfhzaocbakz:xjjjbg8Fakfh3aqaiam9Ramaqfai6Egscsfgocl4cifcd4hOaoc9WGg8JThPindndndndndndndndndndnaDTmbaraHcd4fRbbgQciGPlbedlbkasTmdaxaHfhoarc;abfaHfRbbhQarc;qofhwashCinawaoRbbgYaQ9RgQcetaQcKtc8F91786bbawcefhwaoalfhoaYhQaCcufgCmbxikkasTmiaHcitcwGh8Aarc;abfaHceVfRbbcwtarc;abfaHc9:GgofRbbVhQaxaofhoarc;qofhwashCinawao8VbbgYaQ9RgQcetaQcztc8F917cFFiGa8A486bbawcefhwaoalfhoaYhQaCcufgCmbxikkaeaHc98Gg8Afhoaza8AfhYarc;abfa8AfRbbhCcwhwinaoRbbawtaCVhCaocefhoawcwfgwca9hmbkasTmdaQcl4hKaHcitcKGhEaxa8Afh8AcbhLina8ARbbhQcwhoaYhwinawRbbaotaQVhQawcefhwaocwfgoca9hmbkarc;qofaLfaQaC7aK93aE486bbaYalfhYa8Aalfh8AaQhCaLcefgLas9hmbkkaDmbcbhoxlka8JTmbcbhodninarc;qofaofgwcwf8Pibaw8Pib:e9qTmeaoczfgoa8J9pmdxbkkdnavmbcehoxikcbh8AaOhLaOhKinarc;qofa8Afgocwf8Pibhyao8Pibh8PcdhQcbhwinaQaoawfRbbcb9hfhQawcefgwcz9hmbkclhCcbhwinaCaoawfRbbcd0fhCawcefgwcz9hmbkcwhYcbhwinaYaoawfRbbcP0fhYawcefgwcz9hmbkaQaCaQaC6EgoaYaoaY6Egoczaocz6EaKfhKaocucbaya8P:e9cb9sEgwaoaw6EaLfhLa8Aczfg8Aa8J9pmdxbkka8FaHcd4fgoaoRbbcdaHcetcoGtV86bbxikdnaLas6mbaKas6mba8FaHcd4fgoaoRbbciaHcetcoGtV86bbaga39Ras6mra3arc;qofasz:wjjjbasfh3xikaLaK9phoka8FaHcd4fgwawRbbaoaHcetcoGtV86bbkaga39RaO6mla3cbaOz:xjjjbgaaOfhKdndna8JmbaPhoxekdnagaK9RcK9pmbaPhoxekaocdtc:q:G:cjbfcj:G:cjbaDEg3ydxghcetc;:FFFeGhAcuhEcuahtcu7cFeGh8Ecbh8Karc;qofhQinarc;qofa8KfhXczh8AdndndnahPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEh8AxekcbhoaAh8Aina8Aa8EaQaofRbb9nfh8Aaocefgocz9hmbkkcih5cbhYinczhwdndndna3aYcdtfydbgLPDbeeeeeeedekcucbaXcwf8PibaX8Pib:e9cb9sEhwxekaLcetc;:FFFeGhwcuaLtcu7cFeGhCcbhoinawaCaQaofRbb9nfhwaocefgocz9hmbkkdndnawa8A6mbaLaE9hmeawa8A9hmea3a5cdtfydbcwSmekaYh5awh8AkaYcefgYci9hmbkaaa8Kco4fgoaoRbba5a8Kci4coGtV86bbdndndna3a5cdtfydbgEPDdbbbbbbbebkdncwaE9Tg5TmbcuaEtcu7hwdndnaEceSmbcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCaEtVhCaocefhoaYcufgYmbkaKaC86bbaXa5fhXaKcefhKa8La5fg8Lcz6mbxdkkcbh8LaQhXinaXhoa5hYcbhCinaoRbbg8AawcFeGgLa8AaL6EaCcetVhCaocefhoaYcufgYmbkaKaC:T9cFe:d9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:9ca188bbaXa5fhXaKcefhKa8La5fg8Lcz6mbkkcbhoinaKaQaofRbbgC86bbaKaCawcFeG9pfhKaocefgocz9hmbxikkdnaEceSmbinaKcb86bbaKcefhKxbkkinaKcb86bbaKcefhKxbkkaKaX8Pbw83bwaKaX8Pbb83bbaKczfhKka8Kczfg8Ka8J9pgomeaQczfhQagaK9RcK9pmbkkaoTmlaKh3aKTmlkaHcefgHal9hmbkarc;abfaxascufal2falz:wjjjb8Aasamfhma3hoa3mbkcbhwxdkdnagao9RakalfgwcKcaaDEgQawaQ0EgC9pmbcbhwxdkdnawaQ9pmbaocbaCaw9Rgwz:xjjjbawfhokaoarc;adfalz:wjjjbalfhodnaDTmbaoara8Mz:wjjjba8Mfhokaoab9Rhwxekcbhwkarc;qwf8Kjjjjbawk5babaeadaialcdcbyd;i:I:cjbz:bjjjbk9reduaecd4gdaefgicaaica0Eabcj;abae9Uc;WFbGcjdaeca0Egifcufai9Uae2aiadfaicl4cifcd4f2fcefkmbcbabBd;i:I:cjbk;HPeLu8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaeaici9UgocHf6mbabcbyd;m:I:cjbgrc;GeV86bbalc;abfcFecjez:xjjjb8Aal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibabaefc9WfhwabcefgDaofhednaiTmbcmcsarcb9kgqEhkcbhxcbhmcbhPcbhscbhzindnaeaw9nmbcbhvxikazcufhvadaPcdtfgHydbhOaHcwfydbhAaHclfydbhCcbhXdndndninalc;abfavcsGcitfgoydlhQdndndnaoydbgoaO9hmbaQaCSmekdnaoaC9hmbaQaA9hmbaXcefhXxekaoaA9hmeaQaO9hmeaXcdfhXkaXc870mdascufhvaHaXcdtgAcxGgoyd:4:G:cjbcdtfydbhQaHaoyd:0:G:cjbcdtfydbhCaHaoyd:W:G:cjbcdtfydbhOcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaQaxSgvaXce9iaXak9oVgoGfhxdndndncbcsavEaXaoEgvcs9hmbarce9imbaQaQamaQcefamSgvEgmcefSmecmcsavEhvkaDavaAc;WeGV86bbavcs9hmeaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmxvkcPhvaDaAcPV86bbaQhmkavTmiavak9omicdhocehXazhAxlkavcufhvaXclfgXc;ab9hmbkkdnaHcecdcbaAaxSEaCaxSEcdtgvyd:W:G:cjbcdtfydbgOTaHavyd:0:G:cjbcdtfydbgCceSGaHavyd:4:G:cjbcdtfydbgQcdSGaxcb9hGaqGgLce9hmbal9cu83iUal9cu83i8Wal9cu83iyal9cu83iaal9cu83iKal9cu83izal9cu83iwal9cu83ibcbhxkcbhXascufgvhodnindnalaocsGcdtfydbaC9hmbaXhAxdkcuhAaocufhoaXcefgXcz9hmbkkcbhodnindnalavcsGcdtfydbaQ9hmbaohXxdkcuhXavcufhvaocefgocz9hmbkkaxaOaxSgKfhHdndnaAcm0mbaAcefhAxekcbcsaCaHSgvEhAaHavfhHkdndnaXcm0mbaXcefhXxekcbcsaQaHSgvEhXaHavfhHkc9:cuaKEhYcbhvaXaAcltVg8AcFeGhodndndninavc;q:G:cjbfRbbaoSmeavcefgvcz9hmbxdkkaLaOax9havcm0VVmbaDavc;WeV86bbxekaDaY86bbaea8A86bbaecefhekdnaKmbaOam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaOhmkdnaAcs9hmbaCam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaChmkdnaXcs9hmbaQam9Rgvcetavc8F917hvinaecbcjeavcje6EavcFbGV86bbaecefheavcr4gvmbkaQhmkalascdtfaOBdbascefcsGhvdndnaAPzbeeeeeeeeeeeeeebekalavcdtfaCBdbascdfcsGhvkdndnaXPzbeeeeeeeeeeeeeebekalavcdtfaQBdbavcefcsGhvkcihoalc;abfazcitfgXaOBdlaXaCBdbazcefcsGhAcdhXavhsaHhxxekcdhoalascdtfaQBdbcehXascefcsGhsazhAkalc;abfaAcitfgvaCBdlavaQBdbalc;abfazaXfcsGcitfgvaQBdlavaOBdbaDcefhDazaofcsGhzaPcifgPai6mbkkdnaeaw9nmbcbhvxekcbhvinaeavfavc;q:G:cjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meaeceadt0mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd;m:I:cjbk:zderu8Jjjjjbcz9Rhlcbhvdnaeaicvf6mbabcbRb;m:I:cjbc;qeV86bbal9cb83iwabcefhvabaefc98fhodnaiTmbcbhecbhrcbhwindnavao6mbcbskadawcdtfydbgDalcwfaraDae9Rgeaec8F91ge7ae9Rc507grcdtfgqydb9Rgec8E91c9:Gaecdt7arVheinavcbcjeaecje6EaecFbGV86bbavcefhvaecr4gembkaqaDBdbaDheawcefgwai9hmbkkdnavao9nmbcbskavcbBbbavab9RclfhvkavkBeeucbhddninadcefgdc8F0meaeceadt0mbkkabadcwfcFeGcr9U2cvfk:dvli99dui99ludnaeTmbcuadcetcuftcu7:Zhvdndncuaicuftcu7:ZgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhralcxfIdbhqdndnakJbbbb9GTmbaxhkxekJbbjZar:l:tgkak:maxJbbbb9GEhkJbbjZax:l:tgxax:marJbbbb9GEhrkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEavNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohmxekcjjjj94hmkdndnakJbbj:;akJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;akJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaDfgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaifgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkaicwfhiaDclfhDalczfhlaecufgembkkk;hlld99eud99eudnaeTmbdndncuaicuftcu7:ZgvJbbbZMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikaic;8FiGhrinabcofcicdalclfIdb:lalIdb:l9EgialcwfIdb:lalaicdtfIdb:l9EEgialcxfIdb:lalaicdtfIdb:l9EEgiarV87ebdndnJbbj:;JbbjZalaicdtfIdbJbbbb9DEgoalaicd7cdtfIdbJ;Zl:1ZNNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabcdfaq87ebdndnalaicefciGcdtfIdbJ;Zl:1ZNaoNgwJbbj:;awJbbj:;9GEgDJbbjZaDJbbjZ9FEavNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohqxekcjjjj94hqkabaq87ebdndnaoalaicufciGcdtfIdbJ;Zl:1ZNNgoJbbj:;aoJbbj:;9GEgwJbbjZawJbbjZ9FEavNJbbbZJbbb:;aoJbbbb9GEMgo:lJbbb9p9DTmbao:Ohixekcjjjj94hikabclfai87ebabcwfhbalczfhlaecufgembkkk;gvdDue998Jjjjjbcjd9Rgo8Kjjjjbdndndnadcd4grTmbc:CucbavEhwaohdarhDinadawBdbadclfhdaDcufgDmbkavcd9hmbaeTmbarcdthqcbhkalhxinaohdaxhDarhwinadadydbgmaDydbcL4cFeGc:cufgPamaP9kEBdbaDclfhDadclfhdawcufgwmbkaxaqfhxakcefgkae9hmbxdkkaeTmekarcdthxavce9hhqcbhkindndndnaqmbarTmdc:CuhDalhdarhwinaDadydbcL4cFeGc:cufgmaDam9kEhDadclfhdawcufgwmbxdkkdndndndnavPleddbdkarTmlaohdalhDarhwinadcbaDydbcL4cFeGgmc:cufgPaPam0EBdbadclfhdaDclfhDawcufgwmbxikkarTmicbhdarhDindnaladfIdbgsJbbbb9Bmbaoadfas:8cL4cFeGgwc8Aawc8A0Ec:cufBdbkadclfhdaDcufgDmbxdkkarTmdkc:CuhDkcbhdarhminaDhwdnavceSmbaoadfydbhwkdndnaladfIdbgscjjj;8iawai9RcefgwcLt9R::NJbbbZJbbb:;asJbbbb9GEMgs:lJbbb9p9DTmbas:OhPxekcjjjj94hPkabadfaPcFFFrGawcKtVBdbadclfhdamcufgmmbkkabaxfhbalaxfhlakcefgkae9hmbkkaocjdf8Kjjjjbk:Olveue99iue99iudnaeTmbceaicufthvcuaitcu7:Zhocbhradcl9hhwcbhDindndnalcwfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohixekcjjjj94hikdndnalIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9TgkaifhidndnalclfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkadai9Rcd9ThddndnalcxfIdbgqJbbbbaqJbbbb9GEgqJbbjZaqJbbjZ9FEaoNJbbbZMgq:lJbbb9p9DTmbaq:Ohxxekcjjjj94hxkadaifhiaxce91avVhxdndnawmbabaDfgmai86bbamcifax86bbamcdfad86bbamcefak86bbxekabarfgmai87ebamcofax87ebamclfad87ebamcdfak87ebkarcwfhraDclfhDalczfhlaecufgembkkk;mqdQui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;Kbz:xjjjb8AdnadTmbaiTmbdndnabaeSmbaehoxekavcuadcdtgradcFFFFi0Ecbyd;q:I:cjbHjjjjbbgoBd:SeavceBd:mdaoaearz:wjjjb8AkavcbBd:Oeav9cb83i:Geavc:Gefaoadaiavc:Sefz:pjjjbavyd:Gehwadci9UgDcbyd;q:I:cjbHjjjjbbheavc:Sefavyd:mdgqcdtfaeBdbavaqcefgrBd:mdaecbaDz:xjjjbhkavc:SefarcdtfcuaicdtaicFFFFi0Ecbyd;q:I:cjbHjjjjbbgxBdbavaqcdfgmBd:mdalc;ebfhPawheaxhrinaralIdbaPaeydbgscwascw6EcdtfIdbMUdbaeclfhearclfhraicufgimbkavc:SefamcdtfcuaDcdtadcFFFF970Ecbyd;q:I:cjbHjjjjbbgmBdbdnadci6mbaoheamhraDhiinaraxaeydbcdtfIdbaxaeclfydbcdtfIdbMaxaecwfydbcdtfIdbMUdbaecxfhearclfhraicufgimbkkaqcifhzalc;ebfhHavc;qbfhOavheavyd:KehAavyd:OehCcbhscbhrcbhXcehQinaehLaoarcx2fgKydbhPaKclfydbhdabaXcx2fgecwfaKcwfydbgYBdbaeclfadBdbaeaPBdbakarfce86bbaOaYBdwaOadBdlaOaPBdbamarcdtfcbBdbcih8AdnasTmbaLhiinaOa8AcdtfaiydbgeBdba8AaeaY9haeaP9haead9hGGfh8AaiclfhiascufgsmbkkaXcefhXcbhsinaCaAaKascdtfydbcdtgifydbcdtfgYheawaifgdydbgPhidnaPTmbdninaeydbarSmeaeclfheaicufgiTmdxbkkaeaYaPcdtfc98fydbBdbadadydbcufBdbkascefgsci9hmbkdndndna8ATmbcuhrJbbbbhEcbhdavyd:KehYavyd:OehKindnawaOadcdtfydbcdtgsfydbgeTmbaxasfgiIdbh3aialcuadadcs0EcdtfclfIdbaHaecwaecw6EcdtfIdbMg5Udba5a3:th5aecdthiaKaYasfydbcdtfheinamaeydbgscdtfgPa5aPIdbMg3Udba3aEaEa39DgPEhEasaraPEhraeclfheaic98fgimbkkadcefgda8A9hmbkarcu9hmekaQaD9pmeindnakaQfRbbmbaQhrxdkaDaQcefgQ9hmbxdkka8Acza8Acz6EhsaOheaLhOarcu9hmekkazTmbaqcdtavc:Seffcwfheinaeydbcbyd;u:I:cjbH:bjjjbbaec98fheazcufgzmbkkavc:qdf8Kjjjjbk:0leoucuaicdtgvaicFFFFi0Egocbyd;q:I:cjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd;q:I:cjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavz:xjjjb8AabydbhraehladhvinaralydbcdtfgoaoydbcefBdbalclfhlavcufgvmbkcbhvabydlglhoarhwaihDinaoavBdbaoclfhoawydbavfhvawclfhwaDcufgDmbkadci9Uhqdnadcd9nmbabydwhocbhvinaecwfydbhwaeclfydbhDalaeydbcdtfgbabydbgbcefBdbaoabcdtfavBdbalaDcdtfgDaDydbgDcefBdbaoaDcdtfavBdbalawcdtfgwawydbgwcefBdbaoawcdtfavBdbaecxfheaqavcefgv9hmbkkinalalydbarydb9RBdbarclfhralclfhlaicufgimbkkQbabaeadaic;G:G:cjbz:ojjjbkQbabaeadaic;i:H:cjbz:ojjjbk9DeeuabcFeaicdtz:xjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk:3vioud9:du8Jjjjjbc;Wa9Rgl8Kjjjjbcbhvalcxfcbc;Kbz:xjjjb8AalcuadcitgoadcFFFFe0Ecbyd;q:I:cjbHjjjjbbgrBdxalceBd2araeadaicezNjjjbalcuaoadcjjjjoGEcbyd;q:I:cjbHjjjjbbgwBdzadcdthednadTmbabhiinaiavBdbaiclfhiadavcefgv9hmbkkawaefhDalabBdwalawBdl9cbhqindnadTmbaq9cq9:hkarhvaDhiadheinaiav8Pibak1:NcFrG87ebavcwfhvaicdfhiaecufgembkkalclfaq:NceGcdtfydbhxalclfaq9ce98gq:NceGcdtfydbhmalc;Wbfcbcjaz:xjjjb8AaDhvadhidnadTmbinalc;Wbfav8VebcdtfgeaeydbcefBdbavcdfhvaicufgimbkkcbhvcbhiinalc;WbfavfgeydbhoaeaiBdbaoaifhiavclfgvcja9hmbkadhvdndnadTmbinalc;WbfaDamydbgicetf8VebcdtfgeaeydbgecefBdbaxaecdtfaiBdbamclfhmavcufgvmbkaq9cv9smdcbhvinabawydbcdtfavBdbawclfhwadavcefgv9hmbxdkkaq9cv9smekkcwhvcbhiinalcxfavfc98fydbcbyd;u:I:cjbH:bjjjbbaiceGheclhvcehiaeTmbkalc;Waf8Kjjjjbk:Awliuo99iud9:cbhv8Jjjjjbca9Rgocbyd:4:I:cjbBdKaocb8Pd:W:I:cjb83izaocbyd;e:I:cjbBdwaocb8Pd:8:I:cjb83ibaicd4hrdndnadmbJFFuFhwJFFuuhDJFFuuhqJFFuFhkJFFuuhxJFFuFhmxekarcdthPaehsincbhiinaoczfaifgzasaifIdbgwazIdbgDaDaw9EEUdbaoaifgzawazIdbgDaDaw9DEUdbaiclfgicx9hmbkasaPfhsavcefgvad9hmbkaoIdKhDaoIdwhwaoIdChqaoIdlhkaoIdzhxaoIdbhmkdnadTmbJbbbbJbFu9hJbbbbamax:tgmamJbbbb9DEgmakaq:tgkakam9DEgkawaD:tgwawak9DEgw:vawJbbbb9BEhwdnalmbarcdthoindndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:S9cC:ghHdndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikaHai:S:ehHdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaHai:T9cy:g:e83ibaeaofheabcwfhbadcufgdmbxdkkarcdthoindndnaeIdbax:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cv9:9c;j:KM;j:KM;j:Kd:dhOdndnaeclfIdbaq:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cq9:9cM;j:KM;j:KM;jl:daO:ehOdndnaecwfIdbaD:tawNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabaOai:SgH9ca:gaH9cz:g9cjjj;4s:d:eaH9cFe:d:e9cF:bj;4:pj;ar:d9c:bd9:9c:p;G:d;4j:E;ar:d9cH9:9c;d;H:W:y:m:g;d;Hb:d9cC9:9c:KM;j:KM;j:KMD:d:e83ibaeaofheabcwfhbadcufgdmbkkk9teiucbcbyd;y:I:cjbgeabcifc98GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;y:I:cjbgeabcrfc94GfgbBd;y:I:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;y:I:cjbge9Rcifc98GaefgbBd;y:I:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk;Sddbcj:Gdk;idbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbbbbbbbbbbbbbbbbebbbdbbbbbbbebbbbbbbbbbbbbbbb4:h9w9N94:P:gW:j9O:ye9Pbbbbbb:l29hZ;69:9kZ;N;76Z;rg97Z;z;o9xZ8J;B85Z;:;u9yZ;b;k9HZ:2;Z9DZ9e:l9mZ59A8KZ:r;T3Z:A:zYZ79OHZ;j4::8::Y:D9V8:bbbb9s:49:Z8R:hBZ9M9M;M8:L;z;o8:;8:PG89q;x:J878R:hQ8::M:B;e87bbbbbbjZbbjZbbjZ:E;V;N8::Y:DsZ9i;H;68:xd;R8:;h0838:;W:NoZbbbb:WV9O8:uf888:9i;H;68:9c9G;L89;n;m9m89;D8Ko8:bbbbf:8tZ9m836ZS:2AZL;zPZZ818EZ9e:lxZ;U98F8:819E;68:FFuuFFuuFFuuFFuFFFuFFFuFbc;i:IdkCebbbebbbebbbdbbb9G:rbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(r(e),{}).then(function(g){n=g.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(1),n.exports.meshopt_encodeIndexVersion(1)});function r(g){for(var m=new Uint8Array(g.length),y=0;y<g.length;++y){var A=g.charCodeAt(y);m[y]=A>96?A-97:A>64?A-39:A+4}for(var b=0,y=0;y<g.length;++y)m[b++]=m[y]<60?t[m[y]]:(m[y]-60)*64+m[++y];return m.buffer.slice(0,b)}function o(g){if(!g)throw new Error("Assertion failed")}function s(g){return new Uint8Array(g.buffer,g.byteOffset,g.byteLength)}function a(g,m,y,A){var b=n.exports.sbrk,x=b(m.length*4),T=b(y*4),E=new Uint8Array(n.exports.memory.buffer),v=s(m);E.set(v,x),A&&A(x,x,m.length,y);var S=g(T,x,m.length,y);E=new Uint8Array(n.exports.memory.buffer);var I=new Uint32Array(y);new Uint8Array(I.buffer).set(E.subarray(T,T+y*4)),v.set(E.subarray(x,x+m.length*4)),b(x-b(0));for(var R=0;R<m.length;++R)m[R]=I[m[R]];return[I,S]}function c(g,m,y,A){var b=n.exports.sbrk,x=b(y*4),T=b(y*A),E=new Uint8Array(n.exports.memory.buffer);E.set(s(m),T),g(x,T,y,A),E=new Uint8Array(n.exports.memory.buffer);var v=new Uint32Array(y);return new Uint8Array(v.buffer).set(E.subarray(x,x+y*4)),b(x-b(0)),v}function u(g,m,y,A,b,x,T){var E=n.exports.sbrk,v=E(m),S=E(A*b),I=new Uint8Array(n.exports.memory.buffer);I.set(s(y),S);var R=g(v,m,S,A,b,x,T),O=new Uint8Array(R);return O.set(I.subarray(v,v+R)),E(v-E(0)),O}function f(g){for(var m=0,y=0;y<g.length;++y){var A=g[y];m=m<A?A:m}return m}function d(g,m){if(o(m==2||m==4),m==4)return new Uint32Array(g.buffer,g.byteOffset,g.byteLength/4);var y=new Uint16Array(g.buffer,g.byteOffset,g.byteLength/2);return new Uint32Array(y)}function p(g,m,y,A,b,x,T){var E=n.exports.sbrk,v=E(y*A),S=E(y*x),I=new Uint8Array(n.exports.memory.buffer);I.set(s(m),S),g(v,y,A,b,S,T);var R=new Uint8Array(y*A);return R.set(I.subarray(v,v+y*A)),E(v-E(0)),R}return{ready:i,supported:!0,reorderMesh:function(g,m,y){o(g instanceof Uint32Array||g instanceof Int32Array),o(!m||g.length%3==0);var A=m?y?n.exports.meshopt_optimizeVertexCacheStrip:n.exports.meshopt_optimizeVertexCache:void 0;return a(n.exports.meshopt_optimizeVertexFetchRemap,g,f(g)+1,A)},reorderPoints:function(g,m){return o(g instanceof Float32Array),o(g.length%m==0),o(m>=3),c(n.exports.meshopt_spatialSortRemap,g,g.length/m,m*4)},encodeVertexBuffer:function(g,m,y){o(y>0&&y<=256),o(y%4==0);var A=n.exports.meshopt_encodeVertexBufferBound(m,y);return u(n.exports.meshopt_encodeVertexBuffer,A,g,m,y)},encodeVertexBufferLevel:function(g,m,y,A,b){o(y>0&&y<=256),o(y%4==0),o(A>=0&&A<=3),o(b===void 0||b==0||b==1);var x=n.exports.meshopt_encodeVertexBufferBound(m,y);return u(n.exports.meshopt_encodeVertexBufferLevel,x,g,m,y,A,b===void 0?-1:b)},encodeIndexBuffer:function(g,m,y){o(y==2||y==4),o(m%3==0);var A=d(g,y),b=n.exports.meshopt_encodeIndexBufferBound(m,f(A)+1);return u(n.exports.meshopt_encodeIndexBuffer,b,A,m,4)},encodeIndexSequence:function(g,m,y){o(y==2||y==4);var A=d(g,y),b=n.exports.meshopt_encodeIndexSequenceBound(m,f(A)+1);return u(n.exports.meshopt_encodeIndexSequence,b,A,m,4)},encodeGltfBuffer:function(g,m,y,A,b){var x={ATTRIBUTES:this.encodeVertexBufferLevel,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return o(x[A]),x[A](g,m,y,2,b===void 0?0:b)},encodeFilterOct:function(g,m,y,A){return o(y==4||y==8),o(A>=2&&A<=16),p(n.exports.meshopt_encodeFilterOct,g,m,y,A,16)},encodeFilterQuat:function(g,m,y,A){return o(y==8),o(A>=4&&A<=16),p(n.exports.meshopt_encodeFilterQuat,g,m,y,A,16)},encodeFilterExp:function(g,m,y,A,b){o(y>0&&y%4==0),o(A>=1&&A<=24);var x={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return o(!b||b in x),p(n.exports.meshopt_encodeFilterExp,g,m,y,A,y,b?x[b]:1)},encodeFilterColor:function(g,m,y,A){return o(y==4||y==8),o(A>=2&&A<=16),p(n.exports.meshopt_encodeFilterColor,g,m,y,A,16)}}})();var nA=(function(){var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq1Zkdbk:kYi5ud9:du8Jjjjjbcjq9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCaAcethXaxaDfhiaOaeaoaeao6E9RhQalcl4cifcd4hLazcjdfaAfhKcbhYabaOad2fg8AhEaHh3incbh5dnawTmbaxaYcd4fRbbh5kcbh8Eazcjdfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcjdfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcjdfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaL6mva8FaLfhidnaCTmbaPai9RcK6mbaocdtc:q:G:cjbfcj:G:cjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bwar9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfcbaicdfa8J9c8N1:NfghRbbag9cjjjjjw:dg8J9qE86bbarcVfcbaha8J9c8M1:NfghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fcbaha8J9c8N1:NfgiRbbag9cjjjjjw:dg8J9qE86bbarc96fcbaia8J9c8M1:NfgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbw83bwarai8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasaYcd4fRbbgociGPlbedrbkaATmdazaYfh8Fazcjdfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeazaYfhaazcjdfhhcbhoceh8EaKh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaQaocefgofmbka8FaXfh8FcdhoaacdfhaahaXfhha8EceGhlcbh8EalmbxdkkaATmbaocl4h8EazaYfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaKhainazcjdfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E94aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3aYclfgYad6mbkaza8AaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcjqf8Kjjjjbaok:ysezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8Aav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk:4ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxalarcefciGcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGgkfcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkalarcufciGcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkalakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K:G:cjbgeabcifc98GfgbBd:K:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk83dbcj:Gdk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:K:Gdkl8W:qbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuecj:Gdkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:59Dklbzik94evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaeai86b:q:W:cjbaecitab8Piw83i:q:G:cjbaecefgecjd9hmbkk:SBlEud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaialfgxar9RhodnadTgmmbavaoad;8qbbkaicefhPcj;abad9Uc;WFbGcjdadca0EhsdndndnadTmbaoadfhzcbhHinaeaH9nmdaxaP9RaD6miabaHad2fgOavcjdfasaeaH9RaHasfae6EgAaAcsfgoc9WGgCSEhXaPaDfhQaocl4cifcd4hLavcj;cbfaCcetfhKavcj;cbfaCci2fhYavcj;cbfaCfh8AcbhEaoc;ab6h3incbh5dnawTmbaPaEcd4fRbbh5kcbh8Eavcj;cbfh8Findndndndna5a8Ecet4ciGgoc9:fPdebdkaxaQ9RaC6mwdnaCTmbavcj;cbfa8EaC2faQaC;8qbbkaQaAfhQxdkaCTmeavcj;cbfa8EaC2fcbaC;8kbxekaxaQ9RaL6moaoclVcbawEhraQaLfhocbhidna3mbaxao9Rc;Gb6mbcbhlina8FalfhidndndndndndnaQalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLgacdp:meaapmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9oghpxiiiiiiiiiiiiiiiip8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaoclffa8JRb:q:W:cjbfhoxikaiaopbbwaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLpxssssssssssssssssp9oghpxssssssssssssssssp8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaocwffa8JRb:q:W:cjbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbggcitpbi:q:G:cjbagRb:q:W:cjbggpsaoRbeg8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbagaocdffa8JRb:q:W:cjbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLgacdp:meaapmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9oghpxiiiiiiiiiiiiiiiip8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaoclffa8JRb:q:W:cjbfhoxikaiczfaopbbwaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLpxssssssssssssssssp9oghpxssssssssssssssssp8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaocwffa8JRb:q:W:cjbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbggcitpbi:q:G:cjbagRb:q:W:cjbggpsaoRbeg8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbagaocdffa8JRb:q:W:cjbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLgacdp:meaapmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9oghpxiiiiiiiiiiiiiiiip8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaoclffa8JRb:q:W:cjbfhoxikaicafaopbbwaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLpxssssssssssssssssp9oghpxssssssssssssssssp8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbagaocwffa8JRb:q:W:cjbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbggcitpbi:q:G:cjbagRb:q:W:cjbggpsaoRbeg8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbagaocdffa8JRb:q:W:cjbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLgacdp:meaapmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9oghpxiiiiiiiiiiiiiiiip8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsaap5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbaiaoclffaqRb:q:W:cjbfhoxikaic8Wfaopbbwaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLpxssssssssssssssssp9oghpxssssssssssssssssp8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Ngicitpbi:q:G:cjbaiRb:q:W:cjbgipsaap5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spklbaiaocwffaqRb:q:W:cjbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitpbi:q:G:cjbaiRb:q:W:cjbgipsaoRbegqcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqRb:q:W:cjbfhokalc;abfhialcjefaC0meaihlaxao9Rc;Fb0mbkkdnaiaC9pmbaici4hlinaxao9RcK6mwa8FaifhqdndndndndndnaQaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLgacdp:meaapmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9oghpxiiiiiiiiiiiiiiiip8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spkbbagaoclffa8JRb:q:W:cjbfhoxikaqaopbbwaopbbbgaclp:meaapmbzeHdOiAlCvXoQrLpxssssssssssssssssp9oghpxssssssssssssssssp8Jgap5b9cjF;8;4;W;G;ab9:9cU1:Nggcitpbi:q:G:cjbagRb:q:W:cjbggpsaap5e9cjF;8;4;W;G;ab9:9cU1:Ng8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPahaap9spkbbagaocwffa8JRb:q:W:cjbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbggcitpbi:q:G:cjbagRb:q:W:cjbggpsaoRbeg8Jcitpbi:q:G:cjbp9UpmbedilvorzHOACXQLpPpkbbagaocdffa8JRb:q:W:cjbfhokalcdfhlaiczfgiaC6mbkkaohQaoTmoka8FaCfh8Fa8Ecefg8Ecl9hmbkdndndndnawTmbazaEcd4fRbbglciGPlbedwbkaCTmdaXaEfhlavaEfpbdbh8Kcbhoinalavcj;cbfaofpblbg8La8Aaofpblbg8MpmbzeHdOiAlCvXoQrLg8NaKaofpblbgyaYaofpblbg8PpmbzeHdOiAlCvXoQrLgIpmbezHdiOAlvCXorQLgacep9Taapxeeeeeeeeeeeeeeeeghp9op9Hp9rgaa8Kp9Ug8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp9Ug8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp9Ug8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp9Ug8Kp9Abbbaladfgla8Ka8NaIpmwDKYqk8AExm35Ps8E8Fgacep9Taaahp9op9Hp9rgap9Ug8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp9Ug8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp9Ug8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp9Ug8Kp9Abbbaladfgla8Ka8La8MpmwKDYq8AkEx3m5P8Es8Fg8Laya8PpmwKDYq8AkEx3m5P8Es8Fg8MpmbezHdiOAlvCXorQLgacep9Taaahp9op9Hp9rgap9Ug8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp9Ug8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp9Ug8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp9Ug8Kp9Abbbaladfgla8Ka8La8MpmwDKYqk8AExm35Ps8E8Fgacep9Taaahp9op9Hp9rgap9Ughp9Abbbaladfglahaaaapmlvorlvorlvorlvorp9Ughp9AbbbaladfglahaaaapmwDqkwDqkwDqkwDqkp9Ughp9AbbbaladfglahaaaapmxmPsxmPsxmPsxmPsp9Ug8Kp9AbbbaladfhlaoczfgoaC6mbxikkaCTmeaXaEfhlavaEfpbdbh8Kcbhoinalavcj;cbfaofpblbg8La8Aaofpblbg8MpmbzeHdOiAlCvXoQrLg8NaKaofpblbgyaYaofpblbg8PpmbzeHdOiAlCvXoQrLgIpmbezHdiOAlvCXorQLgacep:neaapxebebebebebebebebghp9op:bep9rgaa8Kp:oeg8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp:oeg8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp:oeg8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp:oeg8Kp9Abbbaladfgla8Ka8NaIpmwDKYqk8AExm35Ps8E8Fgacep:neaaahp9op:bep9rgap:oeg8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp:oeg8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp:oeg8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp:oeg8Kp9Abbbaladfgla8Ka8La8MpmwKDYq8AkEx3m5P8Es8Fg8Laya8PpmwKDYq8AkEx3m5P8Es8Fg8MpmbezHdiOAlvCXorQLgacep:neaaahp9op:bep9rgap:oeg8Kp9Abbbaladfgla8Kaaaapmlvorlvorlvorlvorp:oeg8Kp9Abbbaladfgla8KaaaapmwDqkwDqkwDqkwDqkp:oeg8Kp9Abbbaladfgla8KaaaapmxmPsxmPsxmPsxmPsp:oeg8Kp9Abbbaladfgla8Ka8La8MpmwDKYqk8AExm35Ps8E8Fgacep:neaaahp9op:bep9rgap:oeghp9Abbbaladfglahaaaapmlvorlvorlvorlvorp:oeghp9AbbbaladfglahaaaapmwDqkwDqkwDqkwDqkp:oeghp9AbbbaladfglahaaaapmxmPsxmPsxmPsxmPsp:oeg8Kp9AbbbaladfhlaoczfgoaC6mbxdkkaCTmbaXaEfhrcbhocbalcl4gl9Rc8FGhiavaEfpbdbhhinaravcj;cbfaofpblbg8Ka8Aaofpblbg8LpmbzeHdOiAlCvXoQrLg8MaKaofpblbg8NaYaofpblbgypmbzeHdOiAlCvXoQrLg8PpmbezHdiOAlvCXorQLgaaip:Reaaalp:Tep9qgaahp9rghp9Abbbaradfgrahaaaapmlvorlvorlvorlvorp9rghp9AbbbaradfgrahaaaapmwDqkwDqkwDqkwDqkp9rghp9AbbbaradfgrahaaaapmxmPsxmPsxmPsxmPsp9rghp9Abbbaradfgraha8Ma8PpmwDKYqk8AExm35Ps8E8Fgaaip:Reaaalp:Tep9qgap9rghp9Abbbaradfgrahaaaapmlvorlvorlvorlvorp9rghp9AbbbaradfgrahaaaapmwDqkwDqkwDqkwDqkp9rghp9AbbbaradfgrahaaaapmxmPsxmPsxmPsxmPsp9rghp9Abbbaradfgraha8Ka8LpmwKDYq8AkEx3m5P8Es8Fg8Ka8NaypmwKDYq8AkEx3m5P8Es8Fg8LpmbezHdiOAlvCXorQLgaaip:Reaaalp:Tep9qgap9rghp9Abbbaradfgrahaaaapmlvorlvorlvorlvorp9rghp9AbbbaradfgrahaaaapmwDqkwDqkwDqkwDqkp9rghp9AbbbaradfgrahaaaapmxmPsxmPsxmPsxmPsp9rghp9Abbbaradfgraha8Ka8LpmwDKYqk8AExm35Ps8E8Fgaaip:Reaaalp:Tep9qgap9rghp9Abbbaradfgrahaaaapmlvorlvorlvorlvorp9rghp9AbbbaradfgrahaaaapmwDqkwDqkwDqkwDqkp9rghp9AbbbaradfgrahaaaapmxmPsxmPsxmPsxmPsp9rghp9AbbbaradfhraoczfgoaC6mbkkaEclfgEad6mbkdnaXavcjdf9hmbaAad2goTmbaOavcjdfao;8qbbkdnammbavaXaAcufad2fad;8qbbkaAaHfhHc9:hoaQhPaQmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdasaeao9Raoasfae6Eaofgoae6mbkaial9RhPkcbc99axaP9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbkNsezu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnalaeci9UgrcHf6mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbav9cu83iUav9cu83i8Wav9cu83iyav9cu83iaav9cu83iKav9cu83izav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbavaiaqaDcsGfRbbgscl4gP9RcsGcdtfydbaxcefgOaPEhDavaias9RcsGcdtfydbaOaPTgzfgOascsGgPEhsaPThPdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiazfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaPfhiaOaPfhxxekaxcbalRbbgsEgHaDc;:eSgDfhOascsGhAdndnascl4gCmbaOcefhzxekaOhzavaiaC9RcsGcdtfydbhOkdndnaAmbazcefhxxekazhxavaias9RcsGcdtfydbhzkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhHascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaHhDxekaDcefhDkasce4cbasceG9R7amfgmhHkdndnaCcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhOaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkaOhsxekascefhskaPce4cbaPceG9R7amfgmhOkdndnaAcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhzaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkazhlxekalcefhlkaPce4cbaPceG9R7amfgmhzkdndnadcd9hmbabarcetfgDaH87ebaDclfaz87ebaDcdfaO87ebxekabarcdtfgDaHBdbaDcwfazBdbaDclfaOBdbkavc;abfaocitfgDaOBdbaDaHBdlavaicdtfaHBdbavc;abfaocefcsGcitfgDazBdbaDaOBdlavaicefgicsGcdtfaOBdbavc;abfaocdfcsGcitfgDaHBdbaDazBdlavaiaCTaCcsSVfgicsGcdtfazBdbaiaATaAcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnalaecvf9pmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk;Toio97eue97aec98Ghedndnadcl9hmbaeTmecbhdinababpbbbgicKp:RecKp:Sep;6eglaicwp:RecKp:Sep;6ealp;Geaiczp:RecKp:Sep;6egvp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgwp9op9rp;Keglpxbb;:9cbb;:9cbb;:9cbb;:9calalp;Meaoaop;Meavaravawp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFbbbFbbbFbbbFbbbp9oaipxbbbFbbbFbbbFbbbFp9op9qalavp;Mearp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaoavp;Mearp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgDaDpbbbgipxbbbbbbFFbbbbbbFFgwp9oabpbbbgoaipmbediwDqkzHOAKY8AEgvczp:Reczp:Sep;6eglaoaipmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eavczp:Sep;6egvp;Gealp;Gep;Kep;Legipxbbbbbbbbbbbbbbbbp:2egralpxbbbjbbbjbbbjbbbjgqp9op9rp;Keglpxb;:FSb;:FSb;:FSb;:FSalalp;Meaiaip;Meavaravaqp9op9rp;Keglalp;Mep;Kep;Kep;Jep;Negvp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbp9oaiavp;Mearp;Keczp:Rep9qgialavp;Mearp;KepxFFbbFFbbFFbbFFbbp9oglpmwDKYqk8AExm35Ps8E8Fp9qpkbbabaoawp9oaialpmbezHdiOAlvCXorQLp9qpkbbabcafhbadclfgdae6mbkkk;2ileue97euo97dnaec98GgiTmbcbheinabcKfpx:ji:1S:ji:1S:ji:1S:ji:1SabpbbbglabczfgvpbbbgopmlvorxmPsCXQL358E8Fgrczp:Segwpxibbbibbbibbbibbbp9qp;6egDp;NegqaDaDp;MegDaDp;KealaopmbediwDqkzHOAKY8AEgDczp:Reczp:Sep;6eglalp;MeaDczp:Sep;6egoaop;Mearczp:Reczp:Sep;6egrarp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gDp;KepxFFbbFFbbFFbbFFbbgkp9oaqaop;MeaDp;Keczp:Rep9qgoaqalp;MeaDp;Keakp9oaqarp;MeaDp;Keczp:Rep9qgDpmwDKYqk8AExm35Ps8E8Fglp5eawclp:RegqpEi:T:j83ibavalp5baqpEd:T:j83ibabcwfaoaDpmbezHdiOAlvCXorQLgDp5eaqpEe:T:j83ibabaDp5baqpEb:T:j83ibabcafhbaeclfgeai6mbkkkuee97dnadcd4ae2c98GgeTmbcbhdinababpbbbgicwp:Recwp:Sep;6eaicep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbabczfhbadclfgdae6mbkkk:Sodw97euaec98Ghedndnadcl9hmbaeTmecbhdinabpxbbuJbbuJbbuJbbuJabpbbbgicKp:TeglaicYp:Tep9qgvcdp:Teavp9qgvclp:Teavp9qgop;6ep;Negvaicwp:RecKp:SegraipxFbbbFbbbFbbbFbbbgwp9ogDp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oavaDarp:Xeaiczp:RecKp:Segip:Uep;6ep;Meaqp;Keawp9op9qavaDaraip:Uep:Xep;6ep;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qavaoalcep:Rep9oalpxebbbebbbebbbebbbp9op9qp;6ep;Meaqp;KecKp:Rep9qpkbbabczfhbadclfgdae6mbxdkkaeTmbcbhdinabczfgkpxbFu9hbFu9hbFu9hbFu9habpbbbglakpbbbgrpmlvorxmPsCXQL358E8Fgvczp:TegqavcHp:Tep9qgicdp:Teaip9qgiclp:Teaip9qgicwp:Teaip9qgop;6ep;NegialarpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbglp9ograDczp:Segwp:Ueavczp:Reczp:SegDp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gvp;Kealp9oaiarawaDp:Uep:Xep;6ep;Meavp;Keczp:Rep9qgwaiaoaqcep:Rep9oaqpxebbbebbbebbbebbbp9op9qp;6ep;Meavp;Keczp:ReaiaDarp:Uep;6ep;Meavp;Kealp9op9qgipmwDKYqk8AExm35Ps8E8FpkbbabawaipmbezHdiOAlvCXorQLpkbbabcafhbadclfgdae6mbkkk9teiucbcbydj:G:cjbgeabcifc98GfgbBdj:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkxebcj:Gdklz:zbb",n=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var r=WebAssembly.validate(n)?a(t):a(e),o,s=WebAssembly.instantiate(r,{}).then(function(b){o=b.instance,o.exports.__wasm_call_ctors()});function a(b){for(var x=new Uint8Array(b.length),T=0;T<b.length;++T){var E=b.charCodeAt(T);x[T]=E>96?E-97:E>64?E-39:E+4}for(var v=0,T=0;T<b.length;++T)x[v++]=x[T]<60?i[x[T]]:(x[T]-60)*64+x[++T];return x.buffer.slice(0,v)}function c(b,x,T,E,v,S,I){var R=b.exports.sbrk,O=E+3&-4,L=R(O*v),_=R(S.length),C=new Uint8Array(b.exports.memory.buffer);C.set(S,_);var w=x(L,E,v,_,S.length);if(w==0&&I&&I(L,O,v),T.set(C.subarray(L,L+E*v)),R(L-R(0)),w!=0)throw new Error("Malformed buffer data: "+w)}var u={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},f={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},d=[],p=0;function g(b){var x={object:new Worker(b),pending:0,requests:{}};return x.object.onmessage=function(T){var E=T.data;x.pending-=E.count,x.requests[E.id][E.action](E.value),delete x.requests[E.id]},x}function m(b){for(var x="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(r)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+A.name+";"+c.toString()+A.toString(),T=new Blob([x],{type:"text/javascript"}),E=URL.createObjectURL(T),v=d.length;v<b;++v)d[v]=g(E);for(var v=b;v<d.length;++v)d[v].object.postMessage({});d.length=b,URL.revokeObjectURL(E)}function y(b,x,T,E,v){for(var S=d[0],I=1;I<d.length;++I)d[I].pending<S.pending&&(S=d[I]);return new Promise(function(R,O){var L=new Uint8Array(T),_=++p;S.pending+=b,S.requests[_]={resolve:R,reject:O},S.object.postMessage({id:_,count:b,size:x,source:L,mode:E,filter:v},[L.buffer])})}function A(b){var x=b.data;self.ready.then(function(T){if(!x.id)return self.close();try{var E=new Uint8Array(x.count*x.size);c(T,T.exports[x.mode],E,x.count,x.size,x.source,T.exports[x.filter]),self.postMessage({id:x.id,count:x.count,action:"resolve",value:E},[E.buffer])}catch(v){self.postMessage({id:x.id,count:x.count,action:"reject",value:v})}})}return{ready:s,supported:!0,useWorkers:function(b){m(b)},decodeVertexBuffer:function(b,x,T,E,v){c(o,o.exports.meshopt_decodeVertexBuffer,b,x,T,E,o.exports[u[v]])},decodeIndexBuffer:function(b,x,T,E){c(o,o.exports.meshopt_decodeIndexBuffer,b,x,T,E)},decodeIndexSequence:function(b,x,T,E){c(o,o.exports.meshopt_decodeIndexSequence,b,x,T,E)},decodeGltfBuffer:function(b,x,T,E,v,S){c(o,o.exports[f[v]],b,x,T,E,o.exports[u[S]])},decodeGltfBufferAsync:function(b,x,T,E,v){return d.length>0?y(b,x,T,f[E],u[v]):s.then(function(){var S=new Uint8Array(b*x);return c(o,o.exports[f[E]],S,b,x,T,o.exports[u[v]]),S})}}})();var jTn=(function(){var e="b9H79Tebbbe:6eO9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gruuuuuuub9Gouuuuuue999Gvuuuuueu9Gzuuuuuuuuuuu99uuuub9Gquuuuuuu99uueu9GPuuuuuuuuuuu99uueu9Gquuuuuuuu99ueu9Gruuuuuu99eu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9Gluuuub9GiuuueuiLQdilvorlwDiqkxmPszbHHbelve9Weiiviebeoweuecj:Gdkr:Bdxo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95bw8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bD8A9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9O9v9W9K9HtWbqQ9TW79O9V9Wt9F79P9T9W29P9M959t29V9W9W95bkX9TW79O9V9Wt9F79P9T9W29P9M959qV919UWbxQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7bmX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2WbPa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbs59TW79O9V9Wt9F9NW9UWV9HtW9q9V79Pt9P9V9U9sW9T9H9Wbzl79IV9RbHDwebcekdCXq;y;WeQdbk;r:herYue99iuY99Xue9:D998Jjjjjbcj;sb9Rgs8Kjjjjbcbhzasc:Cefcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkdnamcdGTmbalcrfci4cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egecdtfaHBdbasaecefBd;8ecbhlcbhednadTmbabheadhOinaHaeydbci4fcb86bbaeclfheaOcufgOmbkcbhlabheadhOinaHaeydbgAci4fgCaCRbbgCceaAcrGgAtV86bbaCcu7aA4ceGalfhlaeclfheaOcufgOmbkcualcdtalcFFFFi0Ehekaecbyd1:H:cjbHjjjjbbhzasc:Cefasyd;8egecdtfazBdbasaecefBd;8ealcd4alfhOcehHinaHgecethHaeaO6mbkcbhXcuaecdtgOaecFFFFi0Ecbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8eaHcFeaOz:tjjjbhQdnadTmbaecufhLcbhKindndnaQabaKcdtfgYydbgAc:v;t;h;Ev2aLGgOcdtfgCydbgHcuSmbceheinazaHcdtfydbaASmdaOaefhHaecefheaQaHaLGgOcdtfgCydbgHcu9hmbkkazaXcdtfaABdbaCaXBdbaXhHaXcefhXkaYaHBdbaKcefgKad9hmbkkaQcbyd:m:H:cjbH:bjjjbbasasyd;8ecufBd;8ekcbh8AcualcefgecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbhLasc:Cefasyd;8egecdtfaLBdbasaLBdNeasaecefBd;8ecuadcitadcFFFFe0Ecbyd1:H:cjbHjjjjbbhEasc:Cefasyd;8egecdtfaEBdbasaEBd:yeasaecefBd;8eascNefabadalcbz:cjjjbcualcdtgealcFFFFi0Eg3cbyd1:H:cjbHjjjjbbhOasc:Cefasyd;8egHcdtfaOBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhQasc:Cefasyd;8egHcdtfaQBdbasaHcefBd;8eaOaQaialavazasc:Cefz:djjjbalcbyd1:H:cjbHjjjjbbhYasc:Cefasyd;8egHcdtfaYBdbasaHcefBd;8ea3cbyd1:H:cjbHjjjjbbhHasc:Cefasyd;8egAcdtfaHBdbasaAcefBd;8ea3cbyd1:H:cjbHjjjjbbhAasc:Cefasyd;8egCcdtfaABdbasaCcefBd;8eaHcFeaez:tjjjbh5aAcFeaez:tjjjbh8EdnalTmbindnaLa8AgAcefg8AcdtfydbgCaLaAcdtgefydbgHSmbaCaH9Rh8FaEaHcitfhaa8Eaefhha5aefhKcbhCindndnaaaCcitfydbgXaA9hmbaKaABdbahaABdbxekdnaLaXcdtggfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheinaeydbaASmdaecwfheaHcufgHmbkka8EagfgeaAaXaeydbcuSEBdbaKaXaAaKydbcuSEBdbkaCcefgCa8F9hmbkka8Aal9hmbkaOhHaQhAa5hXa8EhCcbheindndnaeaHydbgK9hmbdnaeaAydbgK9hmbaXydbhKdnaCydbg8Fcu9hmbaKcu9hmbaYaefcb86bbxikdna8FcuSmbaKcuSmbaea8FSmbaOa8FcdtfydbaOaKcdtfydb9hmbaYaefcd86bbxikaYaefhadnaea8FSmbaeaKSmbaace86bbxikaacl86bbxdkdnaeaQaKcdtg8Ffydb9hmbdnaCydbgacuSmbaeaaSmbaXydbggcuSmbaeagSmba8Ea8FfydbghcuSmbahaKSmba5a8Ffydbg8FcuSmba8FaKSmbdnaOaacdtfydbgKaOa8Fcdtfydb9hmbaKaOagcdtfydbg8FSmba8FaOahcdtfydb9hmbaYaefcd86bbxlkaYaefcl86bbxikaYaefcl86bbxdkaYaefcl86bbxekaYaefaYaKfRbb86bbkaHclfhHaAclfhAaXclfhXaCclfhCalaecefge9hmbkdnamcaGTmbcbh8JindndnaYa8Jfg8KRbbg8Lc9:fPibebekdndndnaOa8Jcdtfydbgea8J9hmbdnaqmbcbh8FxdkdnazTmbcbh8Fa8JheinaqazaecdtgefydbfRbbce4a8FVceGh8FaQaefydbgea8J9hmbxikkcbh8Fa8JheinaqaefRbbce4a8FVceGh8FaQaecdtfydbgea8J9hmbxdkkaYaefRbbhexeka8JheindnaLaecdtg8AfgeclfydbgHaeydbgeSmbaHae9RhgaEaecitfhhaOa8AfhacbhKinahaKcitfydbgXhednindnaLaecdtgCfgeclfydbgHaeydbgeSmbaHae9RhHaEaecitfheaaydbhAdninaOaeydbcdtfydbaASmeaecwfheaHcufgHTmdxbkkcbhexdkaQaCfydbgeaX9hmbkceheka8FaeVh8FaKcefgKag9hmbkkaQa8Afydbgea8J9hmbka8Lcia8FceGEheka8Kae86bbka8Jcefg8Jal9hmbkkdnaqTmbdndnazTmbazheaOhHalhAindnaqaeydbfRbbceGTmbaYaHydbfcl86bbkaeclfheaHclfhHaAcufgAmbxdkkaqheaOhHalhAindnaeRbbceGTmbaYaHydbfcl86bbkaecefheaHclfhHaAcufgAmbkkaOhealhAaYhHindnaYaeydbfRbbcl9hmbaHcl86bbkaeclfheaHcefhHaAcufgAmbkkamceGTmbaYhealhHindnaeRbbce9hmbaecl86bbkaecefheaHcufgHmbkkcbh8Mcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh8Nasc:Cefasyd;8egecdtfa8NBdbasaecefBd;8eascbBd:qeas9cb83i1ea8Naialavazasc1efz:ejjjbhydndnaDmbcbh8PcbhCxekcbhCawhecbhHindnaeIdbJbbbb9ETmbasaCcdtfaHBdbaCcefhCkaeclfheaDaHcefgH9hmbkcuaCal2gecdtaecFFFFi0Ecbyd1:H:cjbHjjjjbbh8Pasc:Cefasyd;8egecdtfa8PBdbasaecefBd;8ealTmbdnaCmbcbhCxekarcd4hgdnazTmbaCcdthhcbh8Fa8Phainaoaza8Fcdtfydbag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbxdkkaCcdthhcbh8Fa8Phainaoa8Fag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbkkcualc8S2gHalc;D;O;f8U0EgXcbyd1:H:cjbHjjjjbbheasc:Cefasyd;8egAcdtfaeBdbasaAcefBd;8eaecbaHz:tjjjbhIcbh8RcbhgdnaCTmbcbh8MaXcbyd1:H:cjbHjjjjbbhgasc:Cefasyd;8egecdtfagBdbasaecefBd;8eagcbaHz:tjjjb8AcuaCal2gecltgHaecFFFFb0Ecbyd1:H:cjbHjjjjbbh8Rasc:Cefasyd;8egecdtfa8RBdbasaecefBd;8ea8RcbaHz:tjjjb8AamcjjjjdGTmbcualcltgealcFFFFb0Ecbyd1:H:cjbHjjjjbbh8Masc:Cefasyd;8egHcdtfa8MBdbasaHcefBd;8ea8Mcbaez:tjjjb8AkdnadTmbcbhKabhHina8NaHclfydbg8Fcx2fgeIdba8NaHydbgacx2fgAIdbg8S:tgRa8NaHcwfydbghcx2fgXIdlaAIdlg8U:tg8VNaeIdla8U:tg8WaXIdba8S:tg8XN:tg8Ya8YNa8WaXIdwaAIdwg8Z:tg80NaeIdwa8Z:tg8Wa8VN:tg81a81Na8Wa8XNaRa80N:tg80a80NMMg8V:rhBa8Yh8Xa80h8Wa81hRdna8VJbbbb9EgATmba8YaB:vh8Xa80aB:vh8Wa81aB:vhRkaIaOaacdtfydbgXc8S2fgeaRaB:rg8VaRNNg83aeIdbMUdbaea8Wa8Va8WNgUNg85aeIdlMUdlaea8Xa8Va8XNg86Ng87aeIdwMUdwaeaRaUNgUaeIdxMUdxaea86aRNg88aeIdzMUdzaea8Wa86Ng89aeIdCMUdCaeaRa8Va8Xa8ZNaRa8SNa8Ua8WNMM:mg8:Ng86NgRaeIdKMUdKaea8Wa86Ng8WaeId3MUd3aea8Xa86Ng8XaeIdaMUdaaea86a8:Ng86aeId8KMUd8Kaea8VaeIdyMUdyaIaOa8Fcdtfydbg8Fc8S2fgea83aeIdbMUdbaea85aeIdlMUdlaea87aeIdwMUdwaeaUaeIdxMUdxaea88aeIdzMUdzaea89aeIdCMUdCaeaRaeIdKMUdKaea8WaeId3MUd3aea8XaeIdaMUdaaea86aeId8KMUd8Kaea8VaeIdyMUdyaIaOahcdtfydbgac8S2fgea83aeIdbMUdbaea85aeIdlMUdlaea87aeIdwMUdwaeaUaeIdxMUdxaea88aeIdzMUdzaea89aeIdCMUdCaeaRaeIdKMUdKaea8WaeId3MUd3aea8XaeIdaMUdaaea86aeId8KMUd8Kaea8VaeIdyMUdydna8MTmbdnaATmba8YaB:vh8Ya80aB:vh80a81aB:vh81ka8MaXcltfgeaBJbbbZNgRa80Ng8VaeIdlMUdlaeaRa8YNg8WaeIdwMUdwaeaRa81Ng8XaeIdbMUdbaeaRa8S:ma81Na8Ua80N:ta8Za8YN:tNgRaeIdxMUdxa8Ma8Fcltfgea8VaeIdlMUdlaea8WaeIdwMUdwaea8XaeIdbMUdbaeaRaeIdxMUdxa8Maacltfgea8VaeIdlMUdlaea8WaeIdwMUdwaea8XaeIdbMUdbaeaRaeIdxMUdxkaHcxfhHaKcifgKad6mbkkdnalTmbJq;x8J88J;n;m;m89J:v:;;w8ZamczGEamc;abGEh80cbhHaOhXazhKaIhea8NhAindnaHaXydb9hmbaHh8FdnazTmbaKydbh8Fka80hRdnaqTmbJbbjZa80aqa8FfRbbclGEhRkaecxfg8Fa8FIdbJbbbbMUdbaeczfg8Fa8FIdbJbbbbMUdbaecCfg8Fa8FIdbJbbbbMUdbaeaRaecyfg8FIdbg8YNgRaeIdbMUdbaeclfgaaRaaIdbMUdbaecwfgaaRaaIdbMUdbaecKfgaaaIdbaAIdbg8WaRN:tUdbaAcwfIdbh8Vaec3fgaaaIdbaRaAclfIdbg8XN:tUdbaecafgaaaIdbaRa8VN:tUdbaec8KfgaIdbh81a8Fa8YaRMUdbaaa81aRa8Va8VNa8Wa8WNa8Xa8XNMMNMUdbkaXclfhXaKclfhKaec8SfheaAcxfhAalaHcefgH9hmbkkdnadTmbcbh8Aabhainaba8Acdtfh8FcbhHinaYa8FaHc:G:G:cjbfydbcdtfydbgAfRbbhedndnaYaaaHfydbgXfRbbgKc99fcFeGcpe0mbaec99fcFeGc;:e6mekdnaKcufcFeGce0mba5aXcdtfydbaA9hmekdnaecufcFeGce0mba8EaAcdtfydbaX9hmekJbbacJbbacJbbbZaecFeGceSEaKcFeGceSEhUdna8Na8FaHc:K:G:cjbfydbcdtfydbcx2fgeIdwa8NaXcx2fgKIdwg86:tg8Sa8NaAcx2fghIdwa86:tg8Xa8XNahIdbaKIdbg8U:tg80a80NahIdlaKIdlg8Z:tg8Va8VNMMg81Na8Xa8Sa8XNaeIdba8U:tg83a80Na8VaeIdla8Z:tg85NMMg8WN:tg8Ya8YNa83a81Na80a8WN:tgRaRNa85a81Na8Va8WN:tg8Wa8WNMMgBJbbbb9ETmba8YaB:rgB:vh8Ya8WaB:vh8WaRaB:vhRkaUa81:rNgBa8Ya86NaRa8UNa8Za8WNMM:mg81Ng87a81Nh88a80a85Na8Va83N:tg81a81Na8Va8SNa8Xa85N:tg8Va8VNa8Xa83Na80a8SN:tg8Xa8XNMMg83:rh80a8Ya87Nh85a8Wa87Nh89aRa87Nh87a8WaBa8YNg8SNh8:a8SaRNhZaRaBa8WNgnNhca8Ya8SNh8Ya8WanNh8WaRaBaRNNh8Sdna83Jbbbb9ETmba81a80:vh81a8Xa80:vh8Xa8Va80:vh8VkaIaOaXcdtfydbc8S2fgeaeIdba8Sa8VaUa80:rNgRa8VNNMg80MUdbaea8Wa8XaRa8XNg8SNMg83aeIdlMUdlaea8Ya81aRa81Ng8WNMg8YaeIdwMUdwaeaca8Va8SNMg8SaeIdxMUdxaeaZa8Wa8VNMgUaeIdzMUdzaea8:a8Xa8WNMg8WaeIdCMUdCaea87a8VaRa81a86Na8Va8UNa8Za8XNMMg86:mNgRNMg8VaeIdKMUdKaea89a8XaRNMg8XaeId3MUd3aea85a81aRNMg81aeIdaMUdaaea88a86aRN:tgRaeId8KMUd8KaeaBaeIdyMUdyaIaOaAcdtfydbc8S2fgea80aeIdbMUdbaea83aeIdlMUdlaea8YaeIdwMUdwaea8SaeIdxMUdxaeaUaeIdzMUdzaea8WaeIdCMUdCaea8VaeIdKMUdKaea8XaeId3MUd3aea81aeIdaMUdaaeaRaeId8KMUd8KaeaBaeIdyMUdykaHclfgHcx9hmbkaacxfhaa8Acifg8Aad6mbkaCTmbcbhainJbbbbh80a8Nabaacdtfgeclfydbg8Fcx2fgHIdwa8Naeydbghcx2fgAIdwg8Z:tg8Va8VNaHIdbaAIdbg83:tg8Wa8WNaHIdlaAIdlg85:tg8Xa8XNMMg8Sa8Naecwfydbg8Acx2fgeIdwa8Z:tg8YNa8Va8YNa8WaeIdba83:tg81Na8XaeIdla85:tgBNMMgRa8VN:tJbbbbJbbjZa8Sa8Ya8YNa81a81NaBaBNMMg8UNaRaRN:tg86:va86Jbbbb9BEg86Nh88a8Ua8VNaRa8YN:ta86Nh89a8SaBNaRa8XN:ta86Nh8:a8Ua8XNaRaBN:ta86NhZa8Sa81NaRa8WN:ta86Nhna8Ua8WNaRa81N:ta86Nhca8WaBNa8Xa81N:tgRaRNa8Xa8YNa8VaBN:tgRaRNa8Va81Na8Wa8YN:tgRaRNMM:rJbbbZNhRa8PahaC2g8JcdtfhHa8Pa8AaC2gDcdtfhAa8Pa8FaC2g8KcdtfhXa8Z:mh9ca85:mhJa83:mh9eascjdfheaChKJbbbbhBJbbbbh86Jbbbbh8SJbbbbh8UJbbbbh8ZJbbbbh83Jbbbbh85Jbbbbh87JbbbbhUinaecwfaRa89aXIdbaHIdbg8Y:tg8XNa88aAIdba8Y:tg81NMg8VNUdbaeclfaRaZa8XNa8:a81NMg8WNUdbaeaRaca8XNana81NMg8XNUdbaecxfaRa9ca8VNaJa8WNa8Ya9ea8XNMMMg8YNUdbaRa8Va8WNNa8ZMh8ZaRa8Va8XNNa8UMh8UaRa8Wa8XNNa8SMh8SaRa8Ya8YNNaUMhUaRa8Va8YNNa87Mh87aRa8Wa8YNNa85Mh85aRa8Xa8YNNa83Mh83aRa8Va8VNNa86Mh86aRa8Wa8WNNaBMhBaRa8Xa8XNNa80Mh80aHclfhHaXclfhXaAclfhAaeczfheaKcufgKmbkagahc8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdyaga8Fc8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdyaga8Ac8S2fgea80aeIdbMUdbaeaBaeIdlMUdlaea86aeIdwMUdwaea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdya8Ra8Jcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8Ra8Kcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8RaDcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbkaacifgaad6mbkkcbhAdndnamcwGgTmbJbbbbh8ScbhScbh9hcbh9ixekcbhSa3cbyd1:H:cjbHjjjjbbh9iasc:Cefasyd;8egecdtfa9iBdbasaecefBd;8ecua9ialabadaOz:fjjjbgXcltaXcjjjjiGEcbyd1:H:cjbHjjjjbbh9hasc:Cefasyd;8egecdtfa9hBdbasaecefBd;8ea9haXa9ia8Nalz:gjjjbJFFuuh8SaXTmba9hheaXhHinaeIdbgRa8Sa8SaR9EEh8SaeclfheaHcufgHmbkaXhSkdnalTmbaLclfheaLydbhXaYhHalhKcbhAincbaeydbg8FaX9RaHRbbcpeGEaAfhAaHcefhHaeclfhea8FhXaKcufgKmbkaAce4hAkcuadaA9Rcifg6cx2a6c;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbh9kasc:Cefasyd;8egecdtfa9kBdbasaecefBd;8ecua6cdta6cFFFFi0Ecbyd1:H:cjbHjjjjbbh0asc:Cefasyd;8egecdtfa0BdbasaecefBd;8ea3cbyd1:H:cjbHjjjjbbh9masc:Cefasyd;8egecdtfa9mBdbasaecefBd;8ealcbyd1:H:cjbHjjjjbbh9nasc:Cefasyd;8egecdtfa9nBdbasaecefBd;8eaxaxNayJbbjZamclGEgZaZN:vh87JbbbbhUdnadak9nmbdna6ci6mbaCclth9oa9kcwfh9pJbbbbh85JbbbbhUinascNefabadalaOz:cjjjbabh8Acbh9qcbh9rinaba9rcdtfhDcbheindnaOa8AaefydbgAcdtghfydbgXaOaDaec:W:G:cjbfydbcdtfydbgHcdtg8JfydbgKSmbaYaHfRbbgacv2aYaAfRbbg8FfRb;a:G:cjbg8La8Fcv2aafg8KRb;a:G:cjbg3VcFeGTmbdnaKaX9nmba8KRb;G:G:cjbcFeGmekdna8FcufcFeGce0mbaaTmba5ahfydbaH9hmekdna8FTmbaacufcFeGce0mba8Ea8JfydbaA9hmeka9ka9qcx2fgXaHaAa3cFeGgKEBdlaXaAaHaKEBdbaXaKa8LGcb9hBdwa9qcefh9qkaeclfgecx9hmbkdna9rcifg9rad9pmba8Acxfh8Aa9qcifa69nmekka9qTmdcbh8KinaIaOa9ka8Kcx2fghydbgKcdtgXfydbg8Ac8S2fgeIdwa8Nahydlg8Fcx2fgHIdwg8WNaeIdzaHIdbg8XNaeIdaMgRaRMMa8WNaeIdlaHIdlg8YNaeIdCa8WNaeId3MgRaRMMa8YNaeIdba8XNaeIdxa8YNaeIdKMgRaRMMa8XNaeId8KMMM:lhRJbbbbJbbjZaeIdyg8V:va8VJbbbb9BEh8VdndnahydwgDmbJFFuuh86xekJbbbbJbbjZaIaOa8Fcdtfydbc8S2fgeIdyg81:va81Jbbbb9BEaeIdwa8NaKcx2fgHIdwg81NaeIdzaHIdbg80NaeIdaMgBaBMMa81NaeIdlaHIdlgBNaeIdCa81NaeId3Mg81a81MMaBNaeIdba80NaeIdxaBNaeIdKMg81a81MMa80NaeId8KMMM:lNh86ka8VaRNhBdnaCTmbagaKc8S2fgAIdwa8WNaAIdza8XNaAIdaMgRaRMMa8WNaAIdla8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8Pa8FaC2gacdtfhHa8RaKaC2g8JcltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkdndnaDmbJbbbbh8Vxekaga8Fc8S2fgAIdwa8NaKcx2fgeIdwg8XNaAIdzaeIdbg8YNaAIdaMg8Va8VMMa8XNaAIdlaeIdlg81NaAIdCa8XNaAId3Mg8Va8VMMa81NaAIdba8YNaAIdxa81NaAIdKMg8Va8VMMa8YNaAId8KMMMh8Va8Pa8JcdtfhHa8RaacltfheaAIdyh80aChAinaHIdbg8Wa8Wa80NaecxfIdba8XaecwfIdbNa8YaeIdbNa81aeclfIdbNMMMg8Wa8WM:tNa8VMh8VaHclfhHaeczfheaAcufgAmbka8V:lh8VkaBaR:lMhBa86a8VMh86dndndnaYaKfRbbc9:fPddbekaQaXfydbgXaKSmbaOa8Fcdtfydbh8Jindndna5aXcdtgafydbgecuSmbaOaecdtfydba8JSmekdna8EaafydbgecuSmbaOaecdtfydba8JSmeka8FhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkaBaR:lMhBaQaafydbgXaK9hmbkkaYa8FfRbbci9hmeaDTmeaQa8FcdtfydbgXa8FSmeindndna5aXcdtgafydbgecuSmbaOaecdtfydba8ASmekdna8EaafydbgecuSmbaOaecdtfydba8ASmekaKhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbka86aR:lMh86aQaafydbgXa8F9hmbxdkkdna8Ea5a5aXfydba8FSEaQaXfydbgacdtfydbgXcu9hmbaQa8FcdtfydbhXkagaac8S2fgAIdwa8NaXcx2fgeIdwg8WNaAIdzaeIdbg8XNaAIdaMgRaRMMa8WNaAIdlaeIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaXaC2g8AcdtfhHa8RaaaC2g8JcltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkdndnaDmbJbbbbh8VxekagaXc8S2fgAIdwa8Naacx2fgeIdwg8XNaAIdzaeIdbg8YNaAIdaMg8Va8VMMa8XNaAIdlaeIdlg81NaAIdCa8XNaAId3Mg8Va8VMMa81NaAIdba8YNaAIdxa81NaAIdKMg8Va8VMMa8YNaAId8KMMMh8Va8Pa8JcdtfhHa8Ra8AcltfheaAIdyh80aChAinaHIdbg8Wa8Wa80NaecxfIdba8XaecwfIdbNa8YaeIdbNa81aeclfIdbNMMMg8Wa8WM:tNa8VMh8VaHclfhHaeczfheaAcufgAmbka8V:lh8VkaBaR:lMhBa86a8VMh86kaha86aBa86aB9DgeEUdwahaKa8FaeaDcb9hGgeEBdlaha8FaKaeEBdba8Kcefg8Ka9q9hmbkascjdfcbcj;qbz:tjjjb8Aa9phea9qhHinascjdfaeydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbcefBdbaecxfheaHcufgHmbkcbhecbhHinascjdfaefgAydbhXaAaHBdbaXaHfhHaeclfgecj;qb9hmbkcbhea9phHinascjdfaHydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbgAcefBdba0aAcdtfaeBdbaHcxfhHa9qaecefge9hmbkadak9RgAci9Uh9sdnalTmbcbhea9mhHinaHaeBdbaHclfhHalaecefge9hmbkkcbh9ta9ncbalz:tjjjbh3aAcO9Uh9ua9sce4h9rcbh8Lcbh8Kdnina9ka0a8Kcdtfydbcx2fg8JIdwgRa879Emea8La9s9pmeJFFuuh8Vdna9ra9q9pmba9ka0a9rcdtfydbcx2fIdwJbb;aZNh8VkdnaRa8V9ETmbaRaU9ETmba8La9u0mdkdna3aOa8JydlgDcdtg9vfg8AydbgAfg9wRbba3aOa8Jydbghcdtg9xfydbgefg9yRbbVmbaYahfRbbh9zdndnaLaecdtfgHclfydbgXaHydbgHSmbaXaH9RhXa8NaAcx2fh8Fa8Naecx2fhaaEaHcitfheindna9maeydbcdtfydbgHaASmba9maeclfydbcdtfydbgKaASmbaHaKSmba8NaKcx2fgKIdba8NaHcx2fgHIdbg8W:tgRaaIdlaHIdlg8X:tg80NaKIdla8X:tg8VaaIdba8W:tgBN:tg8YaRa8FIdla8X:tg86Na8Va8FIdba8W:tg8UN:tg8XNa8VaaIdwaHIdwg81:tg8ZNaKIdwa81:tg8Wa80N:tg80a8Va8FIdwa81:tg83Na8Wa86N:tg8VNa8WaBNaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9FmikaecwfheaXcufgXmbkkdndndndna9zc9:fPdebdkahheina8AydbhAdndna5aecdtgHfydbgecuSmbaOaecdtfydbaASmekdna8EaHfydbgecuSmbaOaecdtfydbaASmekaDheka9maHfaeBdbaQaHfydbgeah9hmbxikkdna8Ea5a5a9xfydbaDSEaQa9xfydbghcdtfydbgecu9hmbaQa9vfydbheka9ma9xfaDBdbaehDka9mahcdtfaDBdbka9yce86bba9wce86bba8JIdwgRaUaUaR9DEhUa9tcefh9tcecda9zceSEa8Lfh8Lxeka9rcefh9rka8Kcefg8Ka9q9hmbkka9tTmddnalTmbcbh8Fcbhhindna9mahcdtgefydbgAahSmbaOaAcdtfydbh8AdnahaOaefydb9hg8JmbaIa8Ac8S2fgeaIahc8S2fgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya8MTmba8Ma8Acltfgea8MahcltfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxkaCTmbagaAc8S2fgeagahc8S2gDfgHIdbaeIdbMUdbaeaHIdlaeIdlMUdlaeaHIdwaeIdwMUdwaeaHIdxaeIdxMUdxaeaHIdzaeIdzMUdzaeaHIdCaeIdCMUdCaeaHIdKaeIdKMUdKaeaHId3aeId3MUd3aeaHIdaaeIdaMUdaaeaHId8KaeId8KMUd8KaeaHIdyaeIdyMUdya9oaA2haa8RhHaChXinaHaafgeaHa8FfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8JmbJbbbbJbbjZaIaDfgeIdygR:vaRJbbbb9BEaeIdwa8Na8Acx2fgHIdwgRNaeIdzaHIdbg8VNaeIdaMg8Wa8WMMaRNaeIdlaHIdlg8WNaeIdCaRNaeId3MgRaRMMa8WNaeIdba8VNaeIdxa8WNaeIdKMgRaRMMa8VNaeId8KMMM:lNgRa85a85aR9DEh85ka8Fa9ofh8Fahcefghal9hmbkcbhHa5heindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa5aXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkcbhHa8EheindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa8EaXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkka85aUaCEh85cbhHabhecbhAindnaOa9maeydbcdtfydbg8FcdtfydbgXaOa9maeclfydbcdtfydbgacdtfydbgKSmbaXaOa9maecwfydbcdtfydbg8AcdtfydbghSmbaKahSmbabaHcdtfgXa8FBdbaXcwfa8ABdbaXclfaaBdbaHcifhHkaecxfheaAcifgAad6mbkdndnaTmbaHhdxekdnaHak0mbaHhdxekdna8Sa859FmbaHhdxekJFFuuh8ScbhdabhecbhAindna9ha9iaeydbgXcdtfydbcdtfIdbgRa859ETmbaeclf8Pdbh9AabadcdtfgKaXBdbaKclfa9A83dbaRa8Sa8SaR9EEh8SadcifhdkaecxfheaAcifgAaH6mbkkadak0mbxdkkascNefabadalaOz:cjjjbkdndnadak0mbadhaxekdnaTmbadhaxekdna8Sa879FmbadhaxekcehKina8SJbb;aZNgRa87aRa879DEh8WJbbbbhRdnaSTmba9hheaShHinaeIdbg8VaRa8Va8W9FEaRa8VaR9EEhRaeclfheaHcufgHmbkkJFFuuh8ScbhaabhecbhHindna9ha9iaeydbgAcdtfydbcdtfIdbg8Va8W9ETmbaeclf8Pdbh9AabaacdtfgXaABdbaXclfa9A83dba8Va8Sa8Sa8V9EEh8SaacifhakaecxfheaHcifgHad6mbkdnaKaaad9hVceGmbadhaxdkaRaUaUaR9DEhUaaak9nmecbhKaahda8Sa879FmbkkdnamcjjjjdGTmba9ncbalz:tjjjbh8AdnaaTmbabheaahHina8AaeydbgAfce86bba8AaOaAcdtfydbfce86bbaeclfheaHcufgHmbkkascNefabaaalaOz:cjjjbdndnalTmbcbhXindna8AaXfRbbTmbdnaYaXfRbbgecl0mbceaetcQGmekdnaOaXcdtg8FfydbgeaXSmba8NaXcx2fgHa8Naecx2fgeydwBdwaHae8Pdb83dbxekaIaXc8S2fgKIdygcacJL:3;rUNgRMh87aKIdwg9BaRMh8SaKIdlg9CaRMh8UaKIdbg9DaRMh81aKIdag9EaRa8NaXcx2fg8JIdwg88N:th8ZaKId3g9FaRa8JIdlg89N:th83aKIdKg9Ga8JIdbg8:aRN:th80JbbbbhnaKIdCg9HJbbbbMh85aKIdzg9IJbbbbMhBaKIdxg9JJbbbbMh86dndnaCTmbaXhAinJbbbba87agaAc8S2fgHIdygR:vaRJbbbb9BEhRa8RaAaC2cltfheaHIdaa87Na8ZMh8ZaHId3a87Na83Mh83aHIdKa87Na80Mh80aHIdCa87Na85Mh85aHIdza87NaBMhBaHIdxa87Na86Mh86aHIdwa87Na8SMh8SaHIdla87Na8UMh8UaHIdba87Na81Mh81aChHina8ZaecwfIdbg8VaecxfIdbg8YNaRN:th8Za83aeclfIdbg8Wa8YNaRN:th83a85a8Wa8VNaRN:th85a81aeIdbg8Xa8XNaRN:th81a80a8Xa8YNaRN:th80aBa8Xa8VNaRN:thBa86a8Xa8WNaRN:th86a8Sa8Va8VNaRN:th8Sa8Ua8Wa8WNaRN:th8UaeczfheaHcufgHmbkaQaAcdtfydbgAaX9hmbka8MTmba8MaXcltfgeIdxhxaeIdwh9caeIdlhJaeIdbhRxekJbbbbhxJbbbbh9cJbbbbhJJbbbbhRkaBa81:vg8Wa80Na8Z:ta85aBa86a81:vg8VN:tg8Za8Ua86a8VN:tg8Y:vg8Xa8Va80Na83:tg8UN:th83a9caRa8WN:taJaRa8VN:tg86a8XN:tg85a8SaBa8WN:ta8Za8XN:tgB:vg8S:mh8Za86a8Y:vg9c:mhJdnJbbbbaRaRa81:vg9eN:ta86a9cN:ta85a8SN:tg86:la87J:983:g81NgR9ETmba8Za83NaJa8UNa9ea80Nax:tMMa86:vhnka81:laR9ETmba8Y:laR9ETmbaB:laR9ETmba9e:manNa8W:ma8ZanNa83aB:vMgBNa8V:maJanNa8X:maBNa8Ua8Y:vMMg85Na80:ma81:vMMMh87aLa8FfgeclfydbgHaeydbge9RhhaEaecitfh8FJbbbbhRdnaHaeSgDmbJbbbbhRa8FheahhAina8Naeclfydbcx2fgHIdwa88:tg8Va8VNaHIdba8::tg8Va8VNaHIdla89:tg8Va8VNMMg8Va8Naeydbcx2fgHIdwa88:tg8Wa8WNaHIdba8::tg8Wa8WNaHIdla89:tg8Wa8WNMMg8WaRaRa8W9DEgRaRa8V9DEhRaecwfheaAcufgAmbkaR:rgRaRNhRkaBa88:tg8Va8VNa87a8::tg8Va8VNa85a89:tg8Va8VNMMaR9EmbaKId8KhndnaDmbina8Na8Fclfydbcx2fgeIdba8Na8Fydbcx2fgHIdbg8W:tgRa89aHIdlg8X:tg80NaeIdla8X:tg8Va8:a8W:tg86N:tg8YaRa85a8X:tg8SNa8Va87a8W:tg8UN:tg8XNa8Va88aHIdwg81:tg8ZNaeIdwa81:tg8Wa80N:tg80a8VaBa81:tg83Na8Wa8SN:tg8VNa8Wa86NaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9Fmda8Fcwfh8FahcufghmbkkJbbbbJbbjZac:vacJbbbb9BEgRa9BaBNa9Ia87Na9EMg8Va8VMMaBNa9Ca85Na9HaBNa9FMg8Va8VMMa85Na9Da87Na9Ja85Na9GMg8Va8VMMa87NanMMM:lNaRa9Ba88Na9Ia8:Na9EMg8Va8VMMa88Na9Ca89Na9Ha88Na9FMg8Va8VMMa89Na9Da8:Na9Ja89Na9GMg8Va8VMMa8:NanMMM:lNJbb;aZNJ:983:g81M9Emba8JaBUdwa8Ja85Udla8Ja87UdbkaXcefgXal9hmbkdnaCmbcbhCxdkcbhXindna8AaXfRbbTmbaOaXcdtgefydbaX9hmbaYaXfhhaQaefh8Ja8NaXcx2fhAa8PaXaC2cdtfhDcbhEincuhLdnahRbbci9hmbaXhLa8JydbgeaXSmba8PaEcdtgHfhKaDaHfIdbhRaXhLinaLhHcuhLdnaKaeaC2cdtfIdbaR9CmbaHcuSmbaHhLagaec8S2fIdyagaHc8S2fIdy9ETmbaehLkaQaecdtfydbgeaX9hmbkka8PaEcdtfhKa8RaEcltfh8FaXheinaKaeaC2cdtfJbbbbJbbjZagaeaLaLcuSEgHc8S2fIdygR:vaRJbbbb9BEa8FaHaC2cltfgHIdwaAIdwNaHIdbaAIdbNaHIdlaAIdlNMMaHIdxMNUdbaQaecdtfydbgeaX9hmbkaEcefgEaC9hmbkkaXcefgXal9hmbxdkkaCmbcbhCkaiavaoarawaCala8Na8Pazasayasc1efaYa8Aaqz:hjjjbkdnamcjjjjlGTmbazmbaaTmbabhecbhLinaYaeydbgAfRbbc3thQaecwfgXydbhHcjjjj94hCdna5aAcdtgEfydbaeclfgKydbgOSmbcjjjj94cba8EaOcdtfydbaASEhCkaeaQaCVaAVBdbaYaOfRbbc3th8Fcjjjj94hCcjjjj94hQdna5aOcdtfydbaHSmbcjjjj94cba8EaHcdtfydbaOSEhQkaKa8FaQVaOVBdbaYaHfRbbc3thOdna5aHcdtfydbaASmbcjjjj94cba8EaEfydbaHSEhCkaXaOaCVaHVBdbaecxfheaLcifgLaa6mbkkdnazTmbaaTmbaaheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaZaU:rNUdbkdnasyd;8egHTmbaHcdtasc:Ceffc98fheinaeydbcbyd:m:H:cjbH:bjjjbbaec98fheaHcufgHmbkkascj;sbf8Kjjjjbaak;Yieouabydlhvabydbclfcbaicdtz:tjjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk:todDue99aicd4aifhrcehwinawgDcethwaDar6mbkcuaDcdtgraDcFFFFi0Ecbyd1:H:cjbHjjjjbbhwaoaoyd9GgqcefBd9GaoaqcdtfawBdbawcFearz:tjjjbhkdnaiTmbalcd4hlaDcufhxcbhminamhDdnavTmbavamcdtfydbhDkcbadaDal2cdtfgDydlgwawcjjjj94SEgwcH4aw7c:F:b:DD2cbaDydbgwawcjjjj94SEgwcH4aw7c;D;O:B8J27cbaDydwgDaDcjjjj94SEgDcH4aD7c:3F;N8N27axGhwamcdthPdndndnavTmbakawcdtfgrydbgDcuSmeadavaPfydbal2cdtfgsIdbhzcehqinaqhrdnadavaDcdtfydbal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmlkarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbxdkkakawcdtfgrydbgDcuSmbadamal2cdtfgsIdbhzcehqinaqhrdnadaDal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmikarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbkkaramBdbamhDkabaPfaDBdbamcefgmai9hmbkkakcbyd:m:H:cjbH:bjjjbbaoaoyd9GcufBd9GdnaeTmbaiTmbcbhDaehwinawaDBdbawclfhwaiaDcefgD9hmbkcbhDaehwindnaDabydbgrSmbawaearcdtfgrydbBdbaraDBdbkabclfhbawclfhwaiaDcefgD9hmbkkk;:odvuv998Jjjjjbca9Rgocbyd1:G:cjbBdKaocb8Pdj:G:cjb83izaocbydN:G:cjbBdwaocb8Pd:m:G:cjb83ibdnadTmbaicd4hrdnabmbdnalTmbcbhwinaealawcdtfydbar2cdtfhDcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxikkarcdthwcbhDincbhiinaoczfaifgqaeaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaeawfheaDcefgDad9hmbxdkkdnalTmbcbhwinabawcx2fgiaealawcdtfydbar2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkawcefgwad9hmbxdkkarcdthlcbhwaehDinabawcx2fgiaeawar2cdtfgqIdbUdbaiaqIdlUdlaiaqIdwUdwcbhiinaoczfaifgqaDaifIdbgkaqIdbgxaxak9EEUdbaoaifgqakaqIdbgxaxak9DEUdbaiclfgicx9hmbkaDalfhDawcefgwad9hmbkkJbbbbaoIdbaoIdzgx:tgkakJbbbb9DEgkaoIdlaoIdCgm:tgPaPak9DEgkaoIdwaoIdKgP:tgsasak9DEhsdnabTmbadTmbJbbbbJbbjZas:vasJbbbb9BEhkinabakabIdbax:tNUdbabclfgoakaoIdbam:tNUdbabcwfgoakaoIdbaP:tNUdbabcxfhbadcufgdmbkkdnavTmbavaPUdwavamUdlavaxUdbkask:WlewudnaeTmbcbhvabhoinaoavBdbaoclfhoaeavcefgv9hmbkkdnaiTmbcbhrinadarcdtfhwcbhDinalawaDcdtgvyd:G:G:cjbcdtfydbcdtfydbhodnalawavfydbcdtfydbgqabaqcdtfgkydbgvSmbinakabavgqcdtfgxydbgvBdbaxhkaqav9hmbkkdnaoabaocdtfgkydbgvSmbinakabavgocdtfgxydbgvBdbaxhkaoav9hmbkkdnaqaoSmbabaqaoaqao0Ecdtfaqaoaqao6EBdbkaDcefgDci9hmbkarcifgrai6mbkkdnaembcbskcbhxindnalaxcdtgvfydbax9hmbaxhodnaxabavfgDydbgvSmbaDhqinaqabavgocdtfgkydbgvBdbakhqaoav9hmbkkaDaoBdbkaxcefgxae9hmbkcbhkabhvcbhoindndnaoalydbgq9hmbdnaoavydbgq9hmbavakBdbakcefhkxdkavabaqcdtfydbBdbxekavabaqcdtfydbBdbkalclfhlavclfhvaeaocefgo9hmbkakk;jiilud99euabcbaecltz:tjjjbhvdnalTmbadhoaihralhwinarcwfIdbhDarclfIdbhqavaoydbcltfgkarIdbakIdbMUdbakaqakIdlMUdlakaDakIdwMUdwakakIdxJbbjZMUdxaoclfhoarcxfhrawcufgwmbkkdnaeTmbavhkaehrinakcxfgoIdbhDaocbBdbakakIdbJbbbbJbbjZaD:vaDJbbbb9BEgDNUdbakclfgoaDaoIdbNUdbakcwfgoaDaoIdbNUdbakczfhkarcufgrmbkkdnalTmbinavadydbcltfgkaicwfIdbakIdw:tgDaDNaiIdbakIdb:tgDaDNaiclfIdbakIdl:tgDaDNMMgDakIdxgqaqaD9DEUdxadclfhdaicxfhialcufglmbkkdnaeTmbavcxfhkinabakIdbUdbakczfhkabclfhbaecufgembkkk:moerudnaoTmbaecd4hzdnavTmbaicd4hHavcdthOcbhAindnaPaAfRbbTmbaAhednaDTmbaDaAcdtfydbhekdnasTmbasaefRbbceGmekdnamaAfRbbclSmbabaeaz2cdtfgiaraAcx2fgCIdbakNaxIdbMUdbaiaCIdlakNaxIdlMUdlaiaCIdwakNaxIdwMUdwkadaeaH2cdtfhXaqheawhiavhCinaXaeydbcdtgQfaiIdbalaQfIdb:vUdbaeclfheaiclfhiaCcufgCmbkkawaOfhwaAcefgAao9hmbxdkkdnasmbcbheaDhiindnaPaefRbbTmbaehCdnaDTmbaiydbhCkamaefRbbclSmbabaCaz2cdtfgCarIdbakNaxIdbMUdbaCarclfIdbakNaxIdlMUdlaCarcwfIdbakNaxIdwMUdwkaiclfhiarcxfhraoaecefge9hmbxdkkdnaDTmbindnaPRbbTmbasaDydbgefRbbceGmbamRbbclSmbabaeaz2cdtfgearIdbakNaxIdbMUdbaearclfIdbakNaxIdlMUdlaearcwfIdbakNaxIdwMUdwkaPcefhPaDclfhDamcefhmarcxfhraocufgombxdkkazcdthicbheindnaPaefRbbTmbasaefRbbceGmbamaefRbbclSmbabarIdbakNaxIdbMUdbabclfarclfIdbakNaxIdlMUdbabcwfarcwfIdbakNaxIdwMUdbkarcxfhrabaifhbaoaecefge9hmbkkk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbkRbababaeadaialavaoarawaDaqakaxcjjjjdVamz:bjjjbk:g8Koque99due99duq998Jjjjjbc;Wb9Rgq8Kjjjjbcbhkaqcxfcbc;Kbz:tjjjb8Aaqcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgxBdxaqceBd2axaialavcbcbz:ejjjb8AaqcualcdtalcFFFFi0Egmcbyd1:H:cjbHjjjjbbgiBdzaqcdBd2dndnJFF959eJbbjZawJbbjZawJbbjZ9DE:vawJ9VO:d869DEgw:lJbbb9p9DTmbaw:OhPxekcjjjj94hPkadci9Uhsarco9UhzdndnaombaPcd9imekdnalTmbaPcuf:YhwdnaoTmbcbhvaihHaxhOindndnaoavfRbbceGTmbavcjjjjlVhAxekdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHaOcxfhOalavcefgv9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkadTmbcbhkaehvcbhOinakaiavclfydbcdtfydbgHaiavcwfydbcdtfydbgA9haiavydbcdtfydbgXaH9haXaA9hGGfhkavcxfhvaOcifgOad6mbkkarci9UhQdndnaz:Z:rJbbbZMgw:lJbbb9p9DTmbaw:Ohvxekcjjjj94hvkaQ:ZhLcbhKc:bwhzdninakaQ9pmeazaP9Rcd9imeavazcufgOavaO9iEaPcefavaP9kEhYdnalTmbaYcuf:YhwdnaoTmbcbhOaihHaxhvindndnaoaOfRbbceGTmbaOcjjjjlVhAxekdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcqthAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXVhAdndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHavcxfhvalaOcefgO9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkcbhOdnadTmbaehvcbhHinaOaiavclfydbcdtfydbgAaiavcwfydbcdtfydbgX9haiavydbcdtfydbgraA9haraX9hGGfhOavcxfhvaHcifgHad6mbkkdnas:ZgCaL:taY:Ygwaz:Y:tg8ANak:ZgEaO:Zg3:tNaEaL:tawaP:Y:tg5Na3aC:tNMg8EJbbbb9BmbaCaE:ta5a8Aa3aL:tNNNa8E:vawMhwkdndnaOaQ0mbaOhkaYhPxekaOhsaYhzkdndnaKcl0mbdnawJbbbZMgw:lJbbb9p9DTmbaw:Ohvxdkcjjjj94hvxekaPazfcd9ThvkaKcefgKcs9hmbkkdndndnakmbJbbjZhwcbhOcdhvaDmexdkalcd4alfhHcehOinaOgvcethOavaH6mbkcbhOaqcuavcdtgYavcFFFFi0Ecbyd1:H:cjbHjjjjbbgKBdCaqciBd2aqamcbyd1:H:cjbHjjjjbbgzBdKaqclBd2dndndndnalTmbaPcuf:YhwaoTmecbhOaihAaxhHindndnaoaOfRbbceGTmbaOcjjjjlVhXxekdndnaHclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqthXdndnaHcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarVhXdndnaHIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarcCtVhXkaAaXBdbaAclfhAaHcxfhHalaOcefgO9hmbxikkaKcFeaYz:tjjjb8AcbhPcbhvxdkaxhOaihHalhAindndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcCthXdndnaOclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkarcqtaXVhXdndnaOcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaHaXarVBdbaOcxfhOaHclfhHaAcufgAmbkkaKcFeaYz:tjjjbhravcufhocbhPcbhYindndndnaraiaYcdtgKfydbgAcm4aA7c:v;t;h;Ev2gvcs4av7aoGgHcdtfgXydbgOcuSmbcehvinaiaOcdtgOfydbaASmdaHavfhOavcefhvaraOaoGgHcdtfgXydbgOcu9hmbkkaXaYBdbaPhvaPcefhPxekazaOfydbhvkazaKfavBdbaYcefgYal9hmbkcuaPc8S2gOaPc;D;O;f8U0EhvkcbhXaqavcbyd1:H:cjbHjjjjbbgvBd3aqcvBd2avcbaOz:tjjjbhOdnadTmbaehiinaxaiclfydbgrcx2fgvIdbaxaiydbgocx2fgHIdbg3:tgCaxaicwfydbgYcx2fgAIdlaHIdlg8A:tgwNavIdla8A:tgEaAIdba3:tg8EN:tgLaLNaEaAIdwaHIdwg5:tg8FNavIdwa5:tgEawN:tgwawNaEa8ENaCa8FN:tgCaCNMMg8E:rhEJbbnnJbbjZazaocdtfydbgvazarcdtfydbgASavazaYcdtfydbgrSGgHEh8Fdna8EJbbbb9ETmbaLaE:vhLaCaE:vhCawaE:vhwkaOavc8S2fgvavIdbawa8FaE:rNgEawNNg8FMUdbavaCaEaCNgaNghavIdlMUdlavaLaEaLNg8ENggavIdwMUdwavawaaNgaavIdxMUdxava8EawNg8JavIdzMUdzavaCa8ENg8EavIdCMUdCavawaEaLa5Nawa3Na8AaCNMM:mg8ANg3NgwavIdKMUdKavaCa3NgCavId3MUd3avaLa3NgLavIdaMUdaava3a8ANg3avId8KMUd8KavaEavIdyMUdydnaHmbaOaAc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdyaOarc8S2fgva8FavIdbMUdbavahavIdlMUdlavagavIdwMUdwavaaavIdxMUdxava8JavIdzMUdzava8EavIdCMUdCavawavIdKMUdKavaCavId3MUd3avaLavIdaMUdaava3avId8KMUd8KavaEavIdyMUdykaicxfhiaXcifgXad6mbkkcbhAaqcuaPcdtgvaPcFFFFi0Egicbyd1:H:cjbHjjjjbbgHBdaaqcoBd2aqaicbyd1:H:cjbHjjjjbbgiBd8KaqcrBd2aHcFeavz:tjjjbhYdnalTmbazhHinJbbbbJbbjZaOaHydbgXc8S2fgvIdygw:vawJbbbb9BEavIdwaxcwfIdbgwNavIdzaxIdbgCNavIdaMgLaLMMawNavIdlaxclfIdbgLNavIdCawNavId3MgwawMMaLNavIdbaCNavIdxaLNavIdKMgwawMMaCNavId8KMMM:lNhwdndnaYaXcdtgvfgXydbcuSmbaiavfIdbaw9ETmekaXaABdbaiavfawUdbkaHclfhHaxcxfhxalaAcefgA9hmbkkdndnaPmbJbbbbhwxekJbbbbhwinaiIdbgCawawaC9DEhwaiclfhiaPcufgPmbkaw:rhwkakcd4akfhOcehiinaigvcethiavaO6mbkcbhOaqcuavcdtgiavcFFFFi0Ecbyd1:H:cjbHjjjjbbgHBdyaHcFeaiz:tjjjbhXdnadTmbavcufhrcbhPcbhxindnazaeaxcdtfgvydbcdtfydbgiazavclfydbcdtfydbgOSmbaiazavcwfydbcdtfydbgvSmbaOavSmbaYavcdtfydbhAdndnaYaOcdtfydbgvaYaicdtfydbgi9pmbavaA9pmbaAhlaihoavhAxekdnaAai9pmbaAav9pmbaihlavhoxekavhlaAhoaihAkabaPcx2fgvaABdbavcwfaoBdbavclfalBdbdnaXaoc:3F;N8N2alc:F:b:DD27aAc;D;O:B8J27arGgOcdtfgvydbgicuSmbcehHinaHhvdnabaicx2fgiydbaA9hmbaiydlal9hmbaiydwaoSmikavcefhHaXaOavfarGgOcdtfgvydbgicu9hmbkkavaPBdbaPcefhPkaxcifgxad6mbkaPci2hOkcwhvaDTmekaDawUdbkavcdthvaqcxfc98fhiinaiavfydbcbyd:m:H:cjbH:bjjjbbavc98fgvmbkaqc;Wbf8KjjjjbaOk:3ldrue9:8Jjjjjbc;Wb9Rgr8Kjjjjbcbhwarcxfcbc;Kbz:tjjjb8AdnabaeSmbabaeadcdtzMjjjb8AkarcualcdtalcFFFFi0EgDcbyd1:H:cjbHjjjjbbgqBdxarceBd2aqcbaialavcbarcxfz:djjjbcualcx2alc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbhkarcxfaryd2gxcdtfakBdbaraxcefgmBd2akaialavcbcbz:ejjjb8AarcxfamcdtfaDcbyd1:H:cjbHjjjjbbgiBdbaraxcdfgvBd2arcxfavcdtfcuaialaeadaqz:fjjjbgecltaecjjjjiGEcbyd1:H:cjbHjjjjbbgqBdbaqaeaiakalz:gjjjbaxcifhkdnadTmbaoaoNhocbhwabhlcbheindnaqaialydbgvcdtfydbcdtfIdbao9ETmbalclf8PdbhPabawcdtfgDavBdbaDclfaP83dbawcifhwkalcxfhlaecifgead6mbkkdnakTmbaxcdtarcxffcwfhlinalydbcbyd:m:H:cjbH:bjjjbbalc98fhlakcufgkmbkkarc;Wbf8Kjjjjbawk:WCoDud99vue99vuv998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:tjjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd1:H:cjbHjjjjbbgqBdxawceBd2aqaeadaicbcbz:ejjjb8AawcuadcdtadcFFFFi0Egkcbyd1:H:cjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd1:H:cjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhCcbhXadhQcbhLinaeaCcufgiaeai9iEaPcefaeaP9kEhDdndnadTmbaDcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMgK:lJbbb9p9DTmbaK:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaONJbbbZMgK:lJbbb9p9DTmbaK:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbh3cbh5indnaEaxa5cdtfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbaeaYSmbcehiinaEamaifaAGgmcdtfg8AydbgecuSmeaicefhiaeaY9hmbkka8AaYBdba3aecuSfh3a5cefg5ad9hmbxdkkazcFeasz:tjjjb8Acbh3kdnaQ:ZgKaH:taD:YgOaC:Y:tg8ENaX:Zg8Fa3:Zga:tNa8FaH:taOaP:Y:tghNaaaK:tNMggJbbbb9BmbaKa8F:taha8EaaaH:tNNNag:vaOMhOkaPaDa3ar0giEhPaXa3aiEhXdna3arSmbaDaCaiEgCaP9Rcd9imbdndnaLcl0mbdnaOJbbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPaCfcd9Theka3aQaiEhQaLcefgLcs9hmekkdndnaXmbcihicbhDxekcbhiawakcbyd1:H:cjbHjjjjbbg5BdKawclBd2aPcuf:YhKdndnadTmbaqhiaxheadhmindndnaiIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbhDcbh3indndndnaEaxa3cdtgCfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbcehiinaxaecdtgefydbaYSmdamaifheaicefhiaEaeaAGgmcdtfg8Aydbgecu9hmbkka8Aa3BdbaDhiaDcefhDxeka5aefydbhika5aCfaiBdba3cefg3ad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:tjjjb8AcbhDcbhekawaecbyd1:H:cjbHjjjjbbgeBd3awcvBd2aecbaiz:tjjjbh8Aavcd4hxdnadTmbdnalTmbaxcdthEa5hYaqhealhmadhAina8AaYydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiamIdbaiIdxMUdxaiamclfIdbaiIdzMUdzaiamcwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaYclfhYaecxfheamaEfhmaAcufgAmbxdkka5hmaqheadhYina8Aamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaYcufgYmbkkdnaDTmba8AhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhYawcuaDcdtgCaDcFFFFi0Egicbyd1:H:cjbHjjjjbbgeBdaawcoBd2awaicbyd1:H:cjbHjjjjbbgEBd8KaecFeaCz:tjjjbh3dnadTmbaoJbbjZJbbjZaK:vaPceSENgOaONhKaxcdthxalheinaKaec;8:G:cjbalEgmIdwa8Aa5ydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndna3aAcdtgifgmydbcuSmbaEaifIdbaO9ETmekamaYBdbaEaifaOUdbka5clfh5aqcxfhqaeaxfheadaYcefgY9hmbkkaba3aCzMjjjb8Acrhikaicdthiawcxfc98fheinaeaifydbcbyd:m:H:cjbH:bjjjbbaic98fgimbkkawc;Wbf8KjjjjbaDk:Pdidui99ducbhi8Jjjjjbca9Rglcbyd1:G:cjbBdKalcb8Pdj:G:cjb83izalcbydN:G:cjbBdwalcb8Pd:m:G:cjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgvaDIdbgoaoav9EEUdbaladfgDavaDIdbgoaoav9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkJbbbbavavJbbbb9DEgvaoaoav9DEgvararav9DEk9DeeuabcFeaicdtz:tjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk;Bidqui998Jjjjjbc;Wb9Rgl8Kjjjjbalcxfcbc;Kbz:tjjjb8Aadcd4adfhvcehoinaogrcethoarav6mbkalcuarcdtgoarcFFFFi0Ecbyd1:H:cjbHjjjjbbgvBdxavcFeaoz:tjjjbhwdnadTmbaicd4hDarcufhqcbhkindndnawcbaeakaD2cdtfgrydlgiaicjjjj94SEgocH4ao7c:F:b:DD2cbarydbgxaxcjjjj94SEgocH4ao7c;D;O:B8J27cbarydwgmamcjjjj94SEgrcH4ar7c:3F;N8N27aqGgvcdtfgrydbgocuSmbam::hPai::hsax::hzcehiinaihrdnaeaoaD2cdtfgiIdbaz9CmbaiIdlas9CmbaiIdwaP9BmikarcefhiawavarfaqGgvcdtfgrydbgocu9hmbkkarakBdbakhokabakcdtfaoBdbakcefgkad9hmbkkalydxcbyd:m:H:cjbH:bjjjbbalc;Wbf8Kjjjjbk9teiucbcbyd:q:H:cjbgeabcifc98GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:H:cjbgeabcrfc94GfgbBd:q:H:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd:q:H:cjbge9Rcifc98GaefgbBd:q:H:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk:Kedbcj:Gdk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbeeeeeebebbeeebeebbbbebebbbbbbbbbbbbbbbbbbc1:Hdkxebbbdbbb:G:qbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(r(e),{}).then(function(x){n=x.instance,n.exports.__wasm_call_ctors()});function r(x){for(var T=new Uint8Array(x.length),E=0;E<x.length;++E){var v=x.charCodeAt(E);T[E]=v>96?v-97:v>64?v-39:v+4}for(var S=0,E=0;E<x.length;++E)T[S++]=T[E]<60?t[T[E]]:(T[E]-60)*64+T[++E];return T.buffer.slice(0,S)}function o(x){if(!x)throw new Error("Assertion failed")}function s(x){return new Uint8Array(x.buffer,x.byteOffset,x.byteLength)}function a(x,T,E,v){var S=n.exports.sbrk,I=S(E*4),R=S(E*v*4),O=new Uint8Array(n.exports.memory.buffer);O.set(s(T),R),x(I,R,E,v*4),O=new Uint8Array(n.exports.memory.buffer);var L=new Uint32Array(E);return new Uint8Array(L.buffer).set(O.subarray(I,I+E*4)),S(I-S(0)),L}function c(x,T,E){var v=n.exports.sbrk,S=v(T.length*4),I=v(E*4),R=new Uint8Array(n.exports.memory.buffer),O=s(T);R.set(O,S);var L=x(I,S,T.length,E);R=new Uint8Array(n.exports.memory.buffer);var _=new Uint32Array(E);new Uint8Array(_.buffer).set(R.subarray(I,I+E*4)),v(S-v(0));for(var C=0;C<T.length;++C)T[C]=_[T[C]];return[_,L]}function u(x){for(var T=0,E=0;E<x.length;++E){var v=x[E];T=T<v?v:T}return T}function f(x,T,E,v,S,I,R,O,L){var _=n.exports.sbrk,C=_(4),w=_(E*4),P=_(S*I),M=_(E*4),F=new Uint8Array(n.exports.memory.buffer);F.set(s(v),P),F.set(s(T),M);var V=x(w,M,E,P,S,I,R,O,L,C);F=new Uint8Array(n.exports.memory.buffer);var B=new Uint32Array(V);s(B).set(F.subarray(w,w+V*4));var j=new Float32Array(1);return s(j).set(F.subarray(C,C+4)),_(C-_(0)),[B,j[0]]}function d(x,T,E,v,S,I,R,O,L,_,C,w,P){var M=n.exports.sbrk,F=M(4),V=M(E*4),B=M(S*I),j=M(S*O),k=M(L.length*4),G=M(E*4),q=_?M(S):0,Q=new Uint8Array(n.exports.memory.buffer);Q.set(s(v),B),Q.set(s(R),j),Q.set(s(L),k),Q.set(s(T),G),_&&Q.set(s(_),q);var W=x(V,G,E,B,S,I,j,O,k,L.length,q,C,w,P,F);Q=new Uint8Array(n.exports.memory.buffer);var J=new Uint32Array(W);s(J).set(Q.subarray(V,V+W*4));var Z=new Float32Array(1);return s(Z).set(Q.subarray(F,F+4)),M(F-M(0)),[J,Z[0]]}function p(x,T,E,v,S,I,R,O,L,_,C,w,P){var M=n.exports.sbrk,F=M(4),V=M(S*I),B=M(S*O),j=M(L.length*4),k=M(E*4),G=_?M(S):0,q=new Uint8Array(n.exports.memory.buffer);q.set(s(v),V),q.set(s(R),B),q.set(s(L),j),q.set(s(T),k),_&&q.set(s(_),G);var Q=x(k,E,V,S,I,B,O,j,L.length,G,C,w,P,F);q=new Uint8Array(n.exports.memory.buffer),s(T).set(q.subarray(k,k+Q*4)),s(v).set(q.subarray(V,V+S*I)),s(R).set(q.subarray(B,B+S*O));var W=new Float32Array(1);return s(W).set(q.subarray(F,F+4)),M(F-M(0)),[Q,W[0]]}function g(x,T,E,v){var S=n.exports.sbrk,I=S(E*v),R=new Uint8Array(n.exports.memory.buffer);R.set(s(T),I);var O=x(I,E,v);return S(I-S(0)),O}function m(x,T,E,v,S,I,R,O){var L=n.exports.sbrk,_=L(O*4),C=L(E*v),w=S?L(E*I):0,P=new Uint8Array(n.exports.memory.buffer);P.set(s(T),C),S&&P.set(s(S),w);var M=x(_,C,E,v,w,I,R,O);P=new Uint8Array(n.exports.memory.buffer);var F=new Uint32Array(M);return s(F).set(P.subarray(_,_+M*4)),L(_-L(0)),F}function y(x,T,E,v,S,I,R,O,L){var _=n.exports.sbrk,C=_(4),w=_(E*4),P=_(S*I),M=_(E*4),F=R?_(S):0,V=new Uint8Array(n.exports.memory.buffer);V.set(s(v),P),V.set(s(T),M),R&&V.set(s(R),F);var B=x(w,M,E,P,S,I,F,O,L,C);V=new Uint8Array(n.exports.memory.buffer);var j=new Uint32Array(B);s(j).set(V.subarray(w,w+B*4));var k=new Float32Array(1);return s(k).set(V.subarray(C,C+4)),_(C-_(0)),[j,k[0]]}function A(x,T,E,v,S,I,R){var O=n.exports.sbrk,L=O(E*4),_=O(S*I),C=O(E*4),w=new Uint8Array(n.exports.memory.buffer);w.set(s(v),_),w.set(s(T),C);var P=x(L,C,E,_,S,I,R);w=new Uint8Array(n.exports.memory.buffer);var M=new Uint32Array(P);return s(M).set(w.subarray(L,L+P*4)),O(L-O(0)),M}var b={LockBorder:1,Sparse:2,ErrorAbsolute:4,Prune:8,Regularize:16,Permissive:32,RegularizeLight:64,_InternalDebug:1<<30};return{ready:i,supported:!0,compactMesh:function(x){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0);var T=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),E=c(n.exports.meshopt_optimizeVertexFetchRemap,T,u(x)+1);if(x!==T)for(var v=0;v<T.length;++v)x[v]=T[v];return E},generatePositionRemap:function(x,T){return o(x instanceof Float32Array),o(x.length%T==0),o(T>=3),a(n.exports.meshopt_generatePositionRemap,x,x.length/T,T)},simplify:function(x,T,E,v,S,I){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0),o(T instanceof Float32Array),o(T.length%E==0),o(E>=3),o(v>=0&&v<=x.length),o(v%3==0),o(S>=0);for(var R=0,O=0;O<(I?I.length:0);++O)o(I[O]in b),R|=b[I[O]];var L=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),_=f(n.exports.meshopt_simplify,L,x.length,T,T.length/E,E*4,v,S,R);return _[0]=x instanceof Uint32Array?_[0]:new x.constructor(_[0]),_},simplifyWithAttributes:function(x,T,E,v,S,I,R,O,L,_){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0),o(T instanceof Float32Array),o(T.length%E==0),o(E>=3),o(v instanceof Float32Array),o(v.length==S*(T.length/E)),o(S>=0),o(R==null||R instanceof Uint8Array),o(R==null||R.length==T.length/E),o(O>=0&&O<=x.length),o(O%3==0),o(L>=0),o(Array.isArray(I)),o(S>=I.length),o(I.length<=32);for(var C=0;C<I.length;++C)o(I[C]>=0);for(var w=0,C=0;C<(_?_.length:0);++C)o(_[C]in b),w|=b[_[C]];var P=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),M=d(n.exports.meshopt_simplifyWithAttributes,P,x.length,T,T.length/E,E*4,v,S*4,new Float32Array(I),R,O,L,w);return M[0]=x instanceof Uint32Array?M[0]:new x.constructor(M[0]),M},simplifyWithUpdate:function(x,T,E,v,S,I,R,O,L,_){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0),o(T instanceof Float32Array),o(T.length%E==0),o(E>=3),o(v instanceof Float32Array),o(v.length==S*(T.length/E)),o(S>=0),o(R==null||R instanceof Uint8Array),o(R==null||R.length==T.length/E),o(O>=0&&O<=x.length),o(O%3==0),o(L>=0),o(Array.isArray(I)),o(S>=I.length),o(I.length<=32);for(var C=0;C<I.length;++C)o(I[C]>=0);for(var w=0,C=0;C<(_?_.length:0);++C)o(_[C]in b),w|=b[_[C]];var P=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),M=p(n.exports.meshopt_simplifyWithUpdate,P,x.length,T,T.length/E,E*4,v,S*4,new Float32Array(I),R,O,L,w);if(x!==P)for(var C=0;C<M[0];++C)x[C]=P[C];return M},getScale:function(x,T){return o(x instanceof Float32Array),o(x.length%T==0),o(T>=3),g(n.exports.meshopt_simplifyScale,x,x.length/T,T*4)},simplifyPoints:function(x,T,E,v,S,I){return o(x instanceof Float32Array),o(x.length%T==0),o(T>=3),o(E>=0&&E<=x.length/T),v?(o(v instanceof Float32Array),o(v.length%S==0),o(S>=3),o(x.length/T==v.length/S),m(n.exports.meshopt_simplifyPoints,x,x.length/T,T*4,v,S*4,I||0,E)):m(n.exports.meshopt_simplifyPoints,x,x.length/T,T*4,void 0,0,0,E)},simplifySloppy:function(x,T,E,v,S,I){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0),o(T instanceof Float32Array),o(T.length%E==0),o(E>=3),o(v==null||v instanceof Uint8Array),o(v==null||v.length==T.length/E),o(S>=0&&S<=x.length),o(S%3==0),o(I>=0);var R=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),O=y(n.exports.meshopt_simplifySloppy,R,x.length,T,T.length/E,E*4,v,S,I);return O[0]=x instanceof Uint32Array?O[0]:new x.constructor(O[0]),O},simplifyPrune:function(x,T,E,v){o(x instanceof Uint32Array||x instanceof Int32Array||x instanceof Uint16Array||x instanceof Int16Array),o(x.length%3==0),o(T instanceof Float32Array),o(T.length%E==0),o(E>=3),o(v>=0);var S=x.BYTES_PER_ELEMENT==4?x:new Uint32Array(x),I=A(n.exports.meshopt_simplifyPrune,S,x.length,T,T.length/E,E*4,v);return I=x instanceof Uint32Array?I:new x.constructor(I),I}}})();var GTn=(function(){var e="b9H79Tebbbe:neP9Geueu9Geub9Gbb9Giuuueu9Gmuuuuuuuuuuu9999eu9Gouuuuuueu9Gruuuuuuub9Gxuuuuuuuuuuuueu9Gxuuuuuuuuuuu99eu9GPuuuuuuuuuuuuu99b9Gouuuuuub9Gwuuuuuuuub9Gvuuuuub9GluuuubiQXdilvorwDqokoqxmbiibeilve9Weiiviebeoweuecj:Gdkr;Zeqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeY9TW79O9V9Wt9F9I919P29K9nW79O2Wt7S2W94bd39TW79O9V9Wt9F9I919P29K9nW79O2Wt79t9W9Ht9P9H2bo39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7bw39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bkE9TW79O9V9Wt9F9J9V9T9W91tW9t9W9OWVW9c9V919U9K7bxL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2WtbPl79IV9RbsDwebcekdOAq;W:leXdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek:88JDPue99eux99due99euo99iu8Jjjjjbc:WD9Rgm8KjjjjbdndnalmbcbhPxekamc:Cwfcbc;Kbz:rjjjb8AcuaocdtgsaocFFFFi0Ehzcbyd;0:G:cjbhHdndnalcb9imbaoal9nmbamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waihzalhsinaHazydbcdtfcbBdbazclfhzascufgsmbkaihzalhsinaHazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkaihzalhCcbhXindnaHazydbcdtgQfgsydbcb9imbaOaQfaXBdbasasydbgQcjjjj94VBdbaQaXfhXkazclfhzaCcufgCmbkalci9UhLdnalci6mbcbhzaihsinascwfydbhCasclfydbhXaOasydbcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaXcdtfgXaXydbgXcefBdbaAaXcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaihzalhsindnaHazydbcdtgCfgXydbgQcu9kmbaXaQcFFFFrGgQBdbaOaCfgCaCydbaQ9RBdbkazclfhzascufgsmbxdkkamazaHHjjjjbbgHBd:CwamceBd;8wamazcbyd;0:G:cjbHjjjjbbgOBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;0:G:cjbHjjjjbbgABd:KwamciBd;8waHcbasz:rjjjbhXaihzalhsinaXazydbcdtfgCaCydbcefBdbazclfhzascufgsmbkalci9UhLdnaoTmbcbhzaOhsaXhCaohQinasazBdbasclfhsaCydbazfhzaCclfhCaQcufgQmbkkdnalci6mbcbhzaihsinascwfydbhCasclfydbhQaOasydbcdtfgKaKydbgKcefBdbaAaKcdtfazBdbaOaQcdtfgQaQydbgQcefBdbaAaQcdtfazBdbaOaCcdtfgCaCydbgCcefBdbaAaCcdtfazBdbascxfhsaLazcefgz9hmbkkaoTmbcbhzaohsinaOazfgCaCydbaXazfydb9RBdbazclfhzascufgsmbkkamaLcbyd;0:G:cjbHjjjjbbgzBd:OwamclBd;8wazcbaLz:rjjjbhYamcuaLcK2alcjjjjd0Ecbyd;0:G:cjbHjjjjbbg8ABd:SwamcvBd;8wJbbbbhEdnalci6g3mbarcd4hKaihsa8AhzaLhrJbbbbh5inavasclfydbaK2cdtfgCIdlh8EavasydbaK2cdtfgXIdlhEavascwfydbaK2cdtfgQIdlh8FaCIdwhaaXIdwhhaQIdwhgazaCIdbg8JaXIdbg8KMaQIdbg8LMJbbnn:vUdbazclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8MaCIdwh8NaXIdwhyazcxfa8EaE:tg8Eagah:tggNaaah:tgaa8FaE:tghN:tgEJbbbbJbbjZa8Ja8K:tg8FahNa8Ea8La8K:tg8KN:tghahNaEaENaaa8KNa8FagN:tgEaENMMg8K:rg8E:va8KJbbbb9BEg8KNUdbazczfaEa8KNUdbazcCfaha8KNUdbazcwfa8Maya8NMMJbbnn:vUdba5a8EMh5ascxfhsazcKfhzarcufgrmbka5aL:Z:vJbbbZNhEkamcuaLcdtalcFFFF970Ecbyd;0:G:cjbHjjjjbbgCBd:WwamcoBd;8waq:Zhhdna3mbcbhzaChsinasazBdbasclfhsaLazcefgz9hmbkkaEahNhhamcuaLcltalcFFFFd0Ecbyd;0:G:cjbHjjjjbbg8PBd:0wamcrBd;8wcba8Pa8AaCaLcbz:djjjb8AJFFuuh8MJFFuuh8NJFFuuhydnalci6mbJFFuuhya8AhzaLhsJFFuuh8NJFFuuh8MinazcwfIdbgEa8Ma8MaE9EEh8MazclfIdbgEa8Na8NaE9EEh8NazIdbgEayayaE9EEhyazcKfhzascufgsmbkkah:rhEamaocetgzcuaocu9kEcbyd;0:G:cjbHjjjjbbgCBd:4wdndnaoal9nmbaihzalhsinaCazydbcetfcFFi87ebazclfhzascufgsmbxdkkaCcFeazz:rjjjb8AkaEJbbbZNh8JcuhIdnalci6mbcbhsJFFuuhEa8AhzcuhIinazcwfIdba8M:tghahNazIdbay:tghahNazclfIdba8N:tghahNMM:rghaEaIcuSahaE9DVgXEhEasaIaXEhIazcKfhzaLascefgs9hmbkkamczfcbcjwz:rjjjb8Aam9cb83iwam9cb83ibaxa8JNh8RJbbjZak:th8Lcbh8SJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8Ycbh8ZcbhPinJbbbbhEdna8STmbJbbjZa8S:Z:vhEkJbbbbhhdna8Ya8YNa8Wa8WNa8Xa8XNMMg8KJbbbb9BmbJbbjZa8K:r:vhhka8VaENh8Ka8UaENh5aRaENh8EaIhLdndndndndna8SaPVTmbamydwg80Tmea8YahNh8Fa8XahNhaa8WahNhgaeamydbcdtfh81cbh3JFFuuhEcvhQcuhLindnaHa81a3cdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhsindndnaCaiasydbgKcx2fgzclfydbgrcetf8Vebcs4aCazydbgXcetf8Vebcs4faCazcwfydbglcetf8Vebcs4fgombcbhzxekcehzaHaXcdtfydbgXceSmbcehzaHarcdtfydbgrceSmbcehzaHalcdtfydbglceSmbdnarcdSaXcdSfalcdSfcd6mbaocefhzxekaocdfhzkdnazaQ9kmba8AaKcK2fgXIdwa8K:tghahNaXIdba8E:tghahNaXIdla5:tghahNMM:ra8J:va8LNJbbjZMJ9VO:d86JbbjZaXIdCa8FNaXIdxagNaaaXIdzNMMakN:tghahJ9VO:d869DENghaEazaQ6ahaE9DVgXEhEaKaLaXEhLazaQaXEhQkasclfhsavcufgvmbkka3cefg3a809hmbkkaLcu9hmekama8KUd:ODama5Ud:KDama8EUd:GDamcuBd:qDamcFFF;7rBdjDa8Pcba8AaYamc:GDfamc:qDfamcjDfz:ejjjbamyd:qDhLdndnaxJbbbb9ETmba8SaD6mbaLcuSmeceh3amIdjDa8R9EmixdkaLcu9hmekdna8STmbabaPcltfgHam8Piw83dwaHam8Pib83dbaPcefhPkc3hHinamc:CwfaHfydbcbyd;4:G:cjbH:bjjjbbaHc98fgHc989hmbxvkkcbh3a8Saq9pmbamydwaCaiaLcx2fgzydbcetf8Vebcs4aCazcwfydbcetf8Vebcs4faCazclfydbcetf8Vebcs4ffaw9nmekcbhzcbhsdna8ZTmbcbhsamczfhXinamczfascdtfaXydbgQBdbaXclfhXasaYaQfRbbTfhsa8Zcufg8ZmbkkamydwhlamydbhXam9cu83i:GDam9cu83i:ODam9cu83i:qDam9cu83i:yDinamcjDfazfcFFF;7rBdbazclfgzcz9hmbkasc;8easclfc:bd6Eg8Zcdth80dnalTmbaeaXcdtfhocbhrindnaHaoarcdtfydbcdtgzfydbgvTmbaAaOazfydbcdtfhscuhQcuhzinaHaiasydbgKcx2fgXclfydbcdtfydbaHaXydbcdtfydbfaHaXcwfydbcdtfydbfgXazaXaz6gXEhzaKaQaXEhQasclfhsavcufgvmbkaQcuSmba8AaQcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEcbhsindndnazamc:qDfasfgvydbgX6mbazaX9hmeaEamcjDfasfIdb9FTmekavazBdbamc:GDfasfaQBdbamcjDfasfaEUdbxdkasclfgscz9hmbkkarcefgral9hmbkkamczfa80fhQcbhzcbhsindnamc:GDfazfydbgXcuSmbaQascdtfaXBdbascefhskazclfgzcz9hmbkasa8Zfg8ZTmbJFFuuhhcuhKamczfhza8ZhvcuhQina8AazydbgXcK2fgsIdwa8M:tgEaENasIdbay:tgEaENasIdla8N:tgEaENMM:rhEdndnaHaiaXcx2fgsclfydbcdtfydbaHasydbcdtfydbfaHascwfydbcdtfydbfgsaQ6mbasaQ9hmeaEah9DTmekaEhhashQaXhKkazclfhzavcufgvmbkaKcuSmbaKhLkdnamaiaLcx2fgrydbarclfydbarcwfydbaCabaeadaPawaqa3z:fjjjbTmbaPcefhPJbbbbhRJbbbbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YkcbhXinaAaOaraXcdtfydbcdtgsfydbcdtfgKhzaHasfgvydbgQhsdnaQTmbdninazydbaLSmeazclfhzascufgsTmdxbkkazaKaQcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbka8AaLcK2fgzIdbhEazIdlhhazIdwh8KazIdxh5azIdzh8EazIdCh8FaYaLfce86bba8Ya8FMh8Ya8Xa8EMh8Xa8Wa5Mh8Wa8Va8KMh8Va8UahMh8UaRaEMhRamydxh8Sxbkkamc:WDf8KjjjjbaPkjoivuv99lu8Jjjjjbca9Rgo8Kjjjjbdndnalcw0mbaiydbhraeabcitfgwalcdtciVBdlawarBdbdnalcd6mbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkkalabfhwxekcbhqaocbBdKao9cb83izaocbBdwao9cb83ibJbbjZhkJbbjZhxinadaiaqcdtfydbcK2fhDcbhwinaoczfawfgraDawfIdbgmarIdbgP:tgsaxNaPMgPUdbaoawfgrasamaP:tNarIdbMUdbawclfgwcx9hmbkJbbjZakJbbjZMgk:vhxaqcefgqal9hmbkcbhradcbcecdaoIdlgmaoIdwgP9GEgwaoIdbgsaP9GEawasam9GEgzcdtgwfhHaoczfawfIdbhmaihwalhDinaiarcdtfgqydbhOaqawydbgABdbawaOBdbawclfhwaraHaAcK2fIdbam9DfhraDcufgDmbkdndnarcv6mbavc8X9kmbaralc98f6mekaiydbhraeabcitfgwalcdtciVBdlawarBdbaiclfhralcufhDawcxfhwinarydbhqawcuBdbawc98faqBdbawcwfhwarclfhraDcufgDmbkalabfhwxekaeabcitfgwamUdbawawydlc98GazVBdlabcefaeadaiaravcefgqz:djjjbhDawawydlciGaDabcu7fcdtVBdlaDaeadaiarcdtfalar9Raqz:djjjbhwkaocaf8Kjjjjbawk;Oddvue99dninabaecitfgrydlgwcd4gDTmednawciGgqci9hmbcihqdnawcl6mbabaecitfhbcbheawhqcehkindnaiabydbgDfRbbmbcbhkadaDcK2fgwIdwalIdw:tgxaxNawIdbalIdb:tgxaxNawIdlalIdl:tgxaxNMM:rgxaoIdb9DTmbaoaxUdbavaDBdbarydlhqkabcwfhbaecefgeaqcd46mbkakceGTmikaraqciGBdlskdnabcbaDalaqcdtfIdbarIdb:tgxJbbbb9FEgwaD7aecefgDfgecitfydlabawaDfgDcitfydlVci0mbaraqBdlkabaDadaialavaoz:ejjjbax:laoIdb9Fmbkkkjlevudndnabydwgxaladcetfgm8Vebcs4alaecetfgP8Vebgscs4falaicetfgz8Vebcs4ffaD0mbakmbcbhDabydxaq6mekavawcltfgxab8Pdw83dwaxab8Pdb83dbabydbhDdnabydwgwTmbaoaDcdtfhxawhsinalaxydbcetfcFFi87ebaxclfhxascufgsmbkkabaDawfBdbabydxhxab9cb83dwababydlaxci2fBdlaP8VebhscehDcbhxkdnascztcz91cu9kmbabaxcefBdwaPax87ebaoabydbcdtfaxcdtfaeBdbkdnam8Uebcu9kmbababydwgxcefBdwamax87ebaoabydbcdtfaxcdtfadBdbkdnaz8Uebcu9kmbababydwgxcefBdwazax87ebaoabydbcdtfaxcdtfaiBdbkarabydlfabydxci2faPRbb86bbarabydlfabydxci2fcefamRbb86bbarabydlfabydxci2fcdfazRbb86bbababydxcefBdxaDk:mPrHue99eue99eue99iu8Jjjjjbc;W;Gb9Rgx8KjjjjbdndnalmbcbhmxekcbhPaxc:m;Gbfcbc;Kbz:rjjjb8Aaxcualci9UgscltascjjjjiGEcbyd;0:G:cjbHjjjjbbgzBd:m9GaxceBd;S9GaxcuascK2gHcKfalcpFFFe0Ecbyd;0:G:cjbHjjjjbbgOBd:q9GaxcdBd;S9Gdnalci6gAmbarcd4hCascdthXaOhQazhLinavaiaPcx2fgrydwaC2cdtfhKavarydlaC2cdtfhYavarydbaC2cdtfh8AcbhraLhEinaQarfgma8Aarfg3Idbg5aYarfg8EIdbg8Fa5a8F9DEg5UdbamaKarfgaIdbg8Fa5a8Fa59DEg8FUdbamcxfgma3Idbg5a8EIdbgha5ah9EEg5UdbamaaIdbgha5aha59EEg5UdbaEa8Fa5MJbbbZNUdbaEaXfhEarclfgrcx9hmbkaQcKfhQaLclfhLaPcefgPas9hmbkkaOaHfgr9cb83dbar9cb83dzar9cb83dwaxcuascx2gralc:bjjjl0Ecbyd;0:G:cjbHjjjjbbgHBdN9GaxciBd;S9GascdthgazarfhvaxcwVhPaxclVhCaHh8Jazh8KcbhLinaxcbcj;Gbz:rjjjbhEaLas2cdthadnaAmba8Khrash3inaEarydbgmc8F91cjjjj94Vam7gmcQ4cx2fg8Ea8EydwcefBdwaEamcd4cFrGcx2fg8Ea8EydbcefBdbaEamcx4cFrGcx2fgmamydlcefBdlarclfhra3cufg3mbkkazaafh8AaHaafhXcbhmcbh3cbh8EcbhainaEamfgrydbhQara3BdbarcwfgKydbhYaKaaBdbarclfgrydbhKara8EBdbaQa3fh3aYaafhaaKa8Efh8Eamcxfgmcj;Gb9hmbkdnaAmbcbhravhminamarBdbamclfhmasarcefgr9hmbkavhrashminaEa8Aarydbg3cdtfydbg8Ec8F91a8E7cd4cFrGcx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbka8JhrashminaCa8Aarydbg3cdtfydbg8Ec8F91a8E7cx4cFrGcx2fg8Ea8Eydbg8EcefBdbava8Ecdtfa3BdbarclfhramcufgmmbkavhrashminaPa8Aarydbg3cdtfydbg8Ec8F91cjjjj94Va8E7cQ4cx2fg8Ea8Eydbg8EcefBdbaXa8Ecdtfa3Bdbarclfhramcufgmmbkka8Jagfh8Ja8Kagfh8KaLcefgLci9hmbkaEaocetgrcuaocu9kEcbyd;0:G:cjbHjjjjbbgKBd:y9GaEclBd;S9Gdndnaoal9nmbaihralhminaKarydbcetfcFFi87ebarclfhramcufgmmbxdkkaKcFearz:rjjjb8Akcbh8EaEascbyd;0:G:cjbHjjjjbbg8ABd:C9GaOaHaHascdtfaHascitfa8AascbazaKaiawaDaqakz:hjjjbdndnalci6mba8Ahrashmina8EarRbbfh8EarcefhramcufgmmbkaE9cb83iwaE9cb83ibalawc9:fgrfcufar9UgrasaDfcufaD9Ugmaram0EhYcbhmcbhra8Ehaincbh3dnarTmba8AarfRbbceSh3kamaEaiaHydbcx2fgQydbaQclfydbaQcwfydbaKabaeadamawaqa3a3ce7a8EaY9nVaaamfaY6VGz:fjjjbfhmaHclfhHaaa8AarfRbb9Rhaasarcefgr9hmbkaEydxTmeabamcltfgraE8Piw83dwaraE8Pib83dbamcefhmxekaE9cb83iwaE9cb83ibcbhmkczhrinaEc:m;Gbfarfydbcbyd;4:G:cjbH:bjjjbbarc98fgrc989hmbkkaxc;W;Gbf8Kjjjjbamk:wKDQue99iue99iul9:euw99iu8Jjjjjbc;qb9RgP8Kjjjjbaxhsaxhzdndnavax0gHmbdnavTmbcbhOaehzavhAinawaDazydbcx2fgCcwfydbcetfgX8VebhQawaCclfydbcetfgL8VebhKawaCydbcetfgC8VebhYaXce87ebaLce87ebaCce87ebaOaKcs4aYcs4faQcs4ffhOazclfhzaAcufgAmbkaehzavhAinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaAcufgAmbkcehzaqhsaOaq0mekalce86bbalcefcbavcufz:rjjjb8AxekaPaiBdxaPadBdwaPaeBdlavakaqci9Ug8Aaka8Aak6EaHEgK9RhEaxaK9Rh3aKcufh5aKceth8EaKcdtgCc98fh8FavcitgOaC9Rarfc98fhaascufhhavcufhgaraOfh8JJbbjZas:Y:vh8KcbazceakaxSEg8Lcdtg8M9Rh8NJFFuuhycuh8PcbhIcbh8RinaPclfa8RcdtfydbhQaPcb8Pd:y:G:cjbg8S83i9iaPcb8Pd:q:G:cjbgR83inaPcb8Pd1:G:cjbg8U83iUaPcb8Pdj:G:cjbg8V83i8WaPa8S83iyaPaR83iaaPa8U83iKaPa8V83izaQavcdtgYfh8WcbhXinabaQaXcdtgLfydbcK2fhAcbhzinaPc8WfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaba8WaXcu7cdtfydbcK2fhAcbhzaPIdUh8ZaPId9ih80aPId80h81aPId9ehBaPId8Wh83aPIdnhUinaPczfazfgCaAazfgOIdbg8XaCIdbg8Ya8Xa8Y9DEUdbaCczfgCaOcxfIdbg8XaCIdbg8Ya8Xa8Y9EEUdbazclfgzcx9hmbkaraLfgza80a8Z:tg8XaUa83:tg8YNa8YaBa81:tg8ZNa8Za8XNMMUdbazaYfaPIdyaPIdK:tg8XaPIdaaPIdz:tg8YNa8YaPId8KaPIdC:tg8ZNa8Za8XNMMUdbaXcefgXav9hmbkcbh85dnaHmbcbhAaQhza8JhCavhXinawaDazydbcx2fgOcwfydbcetfgL8Vebh8WawaOclfydbcetfg858Vebh86awaOydbcetfgO8Vebh87aLce87eba85ce87ebaOce87ebaCaAa86cs4a87cs4fa8Wcs4ffgABdbazclfhzaCclfhCaXcufgXmbkavhCinawaDaQydbcx2fgzcwfydbcetfcFFi87ebawazclfydbcetfcFFi87ebawazydbcetfcFFi87ebaQclfhQaCcufgCmbka8Jh85kdndndndndndndndndndndnava8E6mba8Eax9nmeavavaK9UgzaK29Raza320mda5aE9pmqa85Th87ceh8WaEhQxwka5ag9pmDa8Eax9nmixokavaK6mea5aE9pmwcehQaEhXa85Tmixlka5ag6mlxrka5ag9pmokcbhQaghXa85mekJFFuuh8XcbhLa5hzindnazcefgCaK6mbaQavaC9RgOaK6GmbarazcdtfIdbg8YaC:YNaravaz9RcdtfaYfc94fIdbg8ZaO:YNMg80a8X9Embdndna8KaOahf:YNg81:lJbbb9p9DTmba81:OhAxekcjjjj94hAka8ZasaA2aO9R:YNh8Zdndna8Kazasf:YNg81:lJbbb9p9DTmba81:OhOxekcjjjj94hOkamasaO2aC9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgOEh8XaCaLaOEhLkaza8LfgzaX6mbxlkkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazaK6mbaQaCaK6GmbaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9Embdndna8Ka85aOfydbgYahf:YNg81:lJbbb9p9DTmba81:Oh8Wxekcjjjj94h8Wkamasa8W2aY9R:Yg81a8YNa8Za81NMNa80Mg8Ya8Xa8Ya8X9DgYEh8XazaLaYEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaX6mbxikka85Th87cbh8WaghQkJFFuuh8XcbhLaEhCaahAa8FhOaKhzindnazazaK9UgXaK29RaXa320mbdna8WTmbaCaCaK9UgXaK29RaXa320mekaraOfIdbg8Yaz:YNaAIdbg8ZaC:YNMg80a8X9EmbazhXaChYdna87mba85aOfydbgXhYkdndna8KaYahf:YNg81:lJbbb9p9DTmba81:Oh86xekcjjjj94h86ka8Zasa862aY9R:YNh8Zdndna8KaXahf:YNg81:lJbbb9p9DTmba81:OhYxekcjjjj94hYkamasaY2aX9R:Ya8YNa8ZMNa80Mg8Ya8Xa8Ya8X9DgXEh8XazaLaXEhLkaCa8L9RhCaAa8NfhAaOa8MfhOaza8LfgzcufaQ6mbkkaLTmba8Xay9DTmba8XhyaLhIa8Rh8Pka8Rcefg8Rci9hmbkdndnaoc8X9kmba8Pcb9omeka8Acufh85cbhYindndndnavaY9RaxaYaxfav0Eg8WTmbcbhAaeaYcdtfgzhCa8WhXinawaDaCydbcx2fgOcwfydbcetfgQ8VebhbawaOclfydbcetfgL8VebhrawaOydbcetfgO8VebhKaQce87ebaLce87ebaOce87ebaAarcs4aKcs4fabcs4ffhAaCclfhCaXcufgXmbka8WhOinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaOcufgOmbkaAaq0mekalaYfgzce86bbazcefcba8Wcufz:rjjjb8AxekalaYfgzce86bbazcefcba85z:rjjjb8Aa8Ah8Wka8WaYfgYav9pmdxbkkaravcdtg8WfhLdnaITmbaPclfa8PcdtfydbhzaIhCinaLazydbfcb86bbazclfhzaCcufgCmbkkdnavaI9nmbaPclfa8PcdtfydbaIcdtfhzavaI9RhCinaLazydbfce86bbazclfhzaCcufgCmbkkcbhYindnaYa8PSmbcbhzaraPclfaYcdtfydbgKa8Wz:qjjjbhCavhXaIhOinaKaOazaLaCydbgQfRbbgAEcdtfaQBdbaCclfhCaOaAfhOazaA9RcefhzaXcufgXmbkkaYcefgYci9hmbkabaeadaialaIaocefgCarawaDaqakaxamz:hjjjbabaeaIcdtgzfadazfaiazfalaIfavaI9RaCarawaDaqakaxamz:hjjjbkaPc;qbf8Kjjjjbk:Seeru8Jjjjjbc:q;ab9Rgo8Kjjjjbaoc:q8WfcFecjzz:rjjjb8AcbhrdnadTmbaehwadhDinaoarcdtfawydbgqBdbaoc:q8WfaqcFiGcdtfgkydbhxakaqBdbawclfhwaraxaq9hfhraDcufgDmbkkabaeadaoaraiavz:jjjjbaoc:q;abf8Kjjjjbk;Sqloud99euD998Jjjjjbc:W;ab9Rgr8KjjjjbdndnadTmbaocd4hwcbhDcbhqindnavaeclfydbaw2cdtfgkIdbavaeydbaw2cdtfgxIdbgm:tgPavaecwfydbaw2cdtfgsIdlaxIdlgz:tgHNakIdlaz:tgOasIdbam:tgAN:tgCaCNaOasIdwaxIdwgX:tgQNakIdwaX:tgOaHN:tgHaHNaOaANaPaQN:tgPaPNMMgOJbbbb9Bmbarc8WfaDcltfgkaCaO:rgO:vgCUdwakaPaO:vgPUdlakaHaO:vgHUdbakaCaXNaHamNazaPNMM:mUdxaDcefhDkaecxfheaqcifgqad6mbkab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbaDTmearcbBd8Sar9cb83iKar9cb83izarczfavalaoarc8Sfcbcraiz:kjjjbarIdKhQarIdChLarIdzhKar9cb83iwar9cb83ibararc8WfaDczarc8Sfcbcicbz:kjjjbJbbbbhmdnarIdwgzazNarIdbgHaHNarIdlgXaXNMMgCJbbbb9BmbJbbjZaC:r:vhmkazamNhCaXamNhXaHamNhHJbbjZhmarc8WfheaDhvinaecwfIdbaCNaeIdbaHNaXaeclfIdbNMMgzamazam9DEhmaeczfheavcufgvmbkabaQUdwabaLUdlabaKUdbabarId3UdxdndnamJ;n;m;m899FmbJbbbbhzarc8WfheinaecxfIdbaQaecwfIdbgPNaKaeIdbgONaLaeclfIdbgANMMMaCaPNaHaONaXaANMM:vgPazaPaz9EEhzaeczfheaDcufgDmbkabaCUd8KabaXUdaabaHUd3abaQaCazN:tUdKabaLaXazN:tUdCabaKaHazN:tUdzabJbbjZamamN:t:rgmUdydndnaCJbbj:;aCJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aCJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohexekcjjjj94hekabae86b8UdndnaXJbbj:;aXJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aXJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohvxekcjjjj94hvkabav86bRdndnaHJbbj:;aHJbbj:;9GEgzJbbjZazJbbjZ9FEJbb;:9cNJbbbZJbbb:;aHJbbbb9GEMgz:lJbbb9p9DTmbaz:Ohwxekcjjjj94hwkabaw86b8SdndnaecKtcK91:YJbb;:9c:vaC:t:lavcKtcK91:YJbb;:9c:vaX:t:lawcKtcK91:YJbb;:9c:vaH:t:lamMMMJbb;:9cNJbbjZMgm:lJbbb9p9DTmbam:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbkarc:W;abf8Kjjjjbk;7woDuo99eue99euv998Jjjjjbcje9Rgw8Kjjjjbawc;abfcbaocdtgDz:rjjjb8Aawc;GbfcbaDz:rjjjb8AawcafhDawhqaohkinaqcFFF97BdbaDcFFF;7rBdbaqclfhqaDclfhDakcufgkmbkavcd4hxaicd4hmdnadTmbaocx2hPcbhsinashzdnarTmbarascdtfydbhzkaeazam2cdtfgDIdwhHaDIdlhOaDIdbhAalazax2cdtfIdbhCcbhDawcafhqawc;Gbfhvawhkawc;abfhiinaCaDc:O:G:cjbfIdbaHNaDc:G:G:cjbfIdbaANaDc:K:G:cjbfIdbaONMMgXMhQazhLdnaXaC:tgXaqIdbgK9DgYmbavydbhLkavaLBdbazhLdnaQakIdbg8A9EmbaiydbhLa8AhQkaiaLBdbakaQUdbaqaXaKaYEUdbaiclfhiakclfhkavclfhvaqclfhqaPaDcxfgD9hmbkascefgsad9hmbkkJbbbbhQcbhLawc;GbfhDawc;abfhqcbhkinalaqydbgvax2cdtfIdbalaDydbgiax2cdtfIdbaeavam2cdtfgvIdwaeaiam2cdtfgiIdw:tgCaCNavIdbaiIdb:tgCaCNavIdlaiIdl:tgCaCNMM:rMMgCaQaCaQ9EgvEhQakaLavEhLaqclfhqaDclfhDaoakcefgk9hmbkJbbbbhCdnaeawc;abfaLcdtgqfydbgkam2cdtfgDIdwaeawc;Gbfaqfydbgvam2cdtfgqIdwgH:tgXaXNaDIdbaqIdbgA:tg8Aa8ANaDIdlaqIdlgE:tgOaONMMgKJbbbb9ETmbaK:rgCalakax2cdtfIdbMalavax2cdtfIdb:taCaCM:vhCkaQJbbbZNhKaXaCNaHMhHaOaCNaEMhOa8AaCNaAMhAdnadTmbcbhqarhkinaqhDdnarTmbakydbhDkdnalaDax2cdtfIdbg3aeaDam2cdtfgDIdwaH:tgQaQNaDIdbaA:tgCaCNaDIdlaO:tgXaXNMMg5:rgEMg8EaK9ETmbJbbbbh8Adna5Jbbbb9ETmba8EaK:taEaEM:vh8Aka8AaQNaHMhHa8AaXNaOMhOa8AaCNaAMhAa3aKaEMMJbbbZNhKkakclfhkadaqcefgq9hmbkkabaKUdxabaHUdwabaOUdlabaAUdbawcjef8Kjjjjbk:reevu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwcbhDdnaiTmbarhiawhqinaiaeadRbbgkcdtfydbBdbaDakcefgkaDak0EhDaiclfhiadcefhdaqcufgqmbkkabarawaeaDalaoz:jjjjbarcj8Wf8Kjjjjbk:Eeeeu8Jjjjjbca9Rgo8Kjjjjbab9cb83dyab9cb83daab9cb83dKab9cb83dzab9cb83dwab9cb83dbdnadTmbaocbBd3ao9cb83iwao9cb83ibaoaeadaialaoc3falEavcbalEcrcbz:kjjjbabao8Pib83dbabao8Piw83dwkaocaf8Kjjjjbk::meQu8Jjjjjbcjz9Rgv8KjjjjbcbhoavcjPfcbaez:rjjjb8Aavcjxfcbaez:rjjjb8AdnaiTmbadhoaihrinavcjxfaoRbbfgwawRbbcef86bbavcjxfaocefRbbfgwawRbbcef86bbavcjxfaocdfRbbfgwawRbbcef86bbaocifhoarcufgrmbkcbhDcjehoadhqcehkindndnalTmbcbhxcuhmaqhrakhwcuhPinawcufamaoavcjPfarcefRbbgsfRbb9RcFeGgzci6aoavcjPfarRbbgHfRbb9RcFeGgOci6faoavcjPfarcdfRbbgAfRbb9RcFeGgCci6fgXcOtaOcFr7azaCf9RcwtVavcjxfaAfRbbgzavcjxfaHfRbbgHavcjxfasfRbbgsaHas6Egsazas6EcFe7VgsaP9kgzEhmaXcd6gHaxcefgOal9iVce9hmdasaPazEhPaxaOaHEhxarcifhrawai6hsawcefhwasmbxdkkcuhmaqhrakhwcuhxinawcufamaoavcjPfarcefRbbfRbb9RcFeGci6aoavcjPfarRbbfRbb9RcFeGci6faoavcjPfarcdfRbbfRbb9RcFeGci6fgPax9kgsEhmaPce0meaPaxasEhxarcifhrawai6hPawcefhwaPmbkkadamci2fgrcdfRbbhwarcefRbbhxarRbbhPadaDci2fgrcifaramaD9Rci2zNjjjb8AaPavcjPffaocefgo86bbaPavcjxffgmamRbbcuf86bbaxavcjPffao86bbaxavcjxffgmamRbbcuf86bbarcdfaw86bbarcefax86bbaraP86bbawavcjPffao86bbawavcjxffgrarRbbcuf86bbaqcifhqakcefhkaDcefgDai9hmbkcbhzdnalcb9mmbcbhsavcjPfcbaez:rjjjb8Aadcvfhlinadasci2fgxcefgDRbbhoaxcdfgqRbbhrdndnavcjPfaxRbbgmfRbbmbavcjPfarfRbbhwdndndnavcjPfaofRbbTmbawcFeGTmexikawcFeGmdascefgAai9pmdasc980mdascifhQcbhLarcFeGhCamcFeGhXalhwcbhKcbhYinawcufRbbhPawRbbhOcehkdndnawc9:fRbbgHao9hmbaPcFeGamSmekdnaPcFeGao9hmbaOcFeGamSmekaHamSaOcFeGaoSGhkkceh8AaYceGhYdndnaHar9hmbaPcFeGaoSmekdnaPcFeGar9hmbaOcFeGaoSmekaHaoSaOcFeGarSGh8AkakaYVhYaLaHcFeGgHaXSaPcFeGgPaCSGaPaXSaOcFeGgPaCSGVaHaCSaPaXSGVVhLa8AaKceGVhKdnaAcefgPai9pmbawcifhwaAaQ6hHaPhAaHmekkaYTmeaKmekarhwaohPaohHarhOamhrxdkdnaYTaLVceGTmbaYaKTVaLVceGmekamhwarhParhHamhOaohrxekaohwamhPamhHaohOkavcjPfarfce86bbavcjPfawfce86bbaxaH86bbaqar86bbaDaO86bbavcjPfaPfce86bbalcifhlascefgsai9hmbkkavcFeaecetz:rjjjbhwaici2hrindnawadRbbgmcetfgx8Uebgocu9kmbaxaz87ebawcjlfazcdtfabamcdtfydbBdbazhoazcefhzkadao86bbadcefhdarcufgrmbkazcdthokabavcjlfaoz:qjjjb8Aavcjzf8KjjjjbkObabaiaeadcbz:njjjbk9teiucbcbyd;8:G:cjbgeabcifc98GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;8:G:cjbgeabcrfc94GfgbBd;8:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd;8:G:cjbge9Rcifc98GaefgbBd;8:G:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akk:3qeludndnadch6mbadTmeabaead;8qbbabskabaeSmbdnaeadabfgi9Rcbadcet9R0mbadTmeabaead;8qbbabskaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocxGcxSmbaocd4cefciGhiaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglc3Gc3Smbavalcd4cefcrGgdcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfaeczfydbBdbaicCfaecCfydbBdbaicKfaecKfydbBdbaic3faec3fydbBdbaecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaicefaecefRbb86bbaicdfaecdfRbb86bbaicifaecifRbb86bbaiclfaeclfRbb86bbaicvfaecvfRbb86bbaicofaecofRbb86bbaicrfaecrfRbb86bbaicwfhiaecwfhealc94fglmbkkabkk:pedbcj:GdktFFuuFFuuFFuubbbbFFuFFFuFFFuFbbbbbbjZbbbbbbbbbbbbbbjZbbbbbbbbbbbbbbjZ86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;bc;0:Gdkxebbbdbbbj:qbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(r(e),{}).then(function(y){n=y.instance,n.exports.__wasm_call_ctors()});function r(y){for(var A=new Uint8Array(y.length),b=0;b<y.length;++b){var x=y.charCodeAt(b);A[b]=x>96?x-97:x>64?x-39:x+4}for(var T=0,b=0;b<y.length;++b)A[T++]=A[b]<60?t[A[b]]:(A[b]-60)*64+A[++b];return A.buffer.slice(0,T)}function o(y){if(!y)throw new Error("Assertion failed")}function s(y){return new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}var a=48,c=16;function u(y,A){var b=y.meshlets[A*4+0],x=y.meshlets[A*4+1],T=y.meshlets[A*4+2],E=y.meshlets[A*4+3];return{vertices:y.vertices.subarray(b,b+T),triangles:y.triangles.subarray(x,x+E*3)}}function f(y,A,b,x,T,E,v,S,I,R){var O=n.exports.sbrk,L=n.exports.meshopt_buildMeshletsBound(A.length,E,v),_=O(L*c),C=O(A.length*4),w=O(A.length),P=O(A.byteLength),M=O(b.byteLength),F=new Uint8Array(n.exports.memory.buffer);F.set(s(A),P),F.set(s(b),M);var V=y(_,C,w,P,A.length,M,x,T,E,v,S,I,R);F=new Uint8Array(n.exports.memory.buffer);for(var B=F.subarray(_,_+V*c),j=new Uint32Array(B.buffer,B.byteOffset,B.byteLength/4).slice(),k=0;k<V;++k){var G=j[k*4+0],q=j[k*4+1],x=j[k*4+2],Q=j[k*4+3];n.exports.meshopt_optimizeMeshlet(C+G*4,w+q,Q,x)}var W=V?j[(V-1)*4+0]+j[(V-1)*4+2]:0,J=V?j[(V-1)*4+1]+j[(V-1)*4+3]*3:0,Z={meshlets:j,vertices:new Uint32Array(F.buffer,C,W).slice(),triangles:new Uint8Array(F.buffer,w,J).slice(),meshletCount:V};return O(_-O(0)),Z}function d(y){var A=new Float32Array(n.exports.memory.buffer,y,a/4);return{centerX:A[0],centerY:A[1],centerZ:A[2],radius:A[3],coneApexX:A[4],coneApexY:A[5],coneApexZ:A[6],coneAxisX:A[7],coneAxisY:A[8],coneAxisZ:A[9],coneCutoff:A[10]}}function p(y,A,b,x){var T=n.exports.sbrk,E=[],v=T(A.byteLength),S=T(y.vertices.byteLength),I=T(y.triangles.byteLength),R=T(a),O=new Uint8Array(n.exports.memory.buffer);O.set(s(A),v),O.set(s(y.vertices),S),O.set(s(y.triangles),I);for(var L=0;L<y.meshletCount;++L){var _=y.meshlets[L*4+0],C=y.meshlets[L*4+1],w=y.meshlets[L*4+3];n.exports.meshopt_computeMeshletBounds(R,S+_*4,I+C,w,v,b,x),E.push(d(R))}return T(v-T(0)),E}function g(y,A,b,x){var T=n.exports.sbrk,E=T(a),v=T(y.byteLength),S=T(A.byteLength),I=new Uint8Array(n.exports.memory.buffer);I.set(s(y),v),I.set(s(A),S),n.exports.meshopt_computeClusterBounds(E,v,y.length,S,b,x);var R=d(E);return T(E-T(0)),R}function m(y,A,b,x,T){var E=n.exports.sbrk,v=E(a),S=E(y.byteLength),I=x?E(x.byteLength):0,R=new Uint8Array(n.exports.memory.buffer);R.set(s(y),S),x&&R.set(s(x),I),n.exports.meshopt_computeSphereBounds(v,S,A,b,I,x?T:0);var O=d(v);return E(v-E(0)),O}return{ready:i,supported:!0,buildMeshlets:function(y,A,b,x,T,E){o(y.length%3==0),o(A instanceof Float32Array),o(A.length%b==0),o(b>=3),o(x>=3&&x<=256),o(T>=1&&T<=512),E=E||0;var v=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return f(n.exports.meshopt_buildMeshletsFlex,v,A,A.length/b,b*4,x,T,T,E,0)},buildMeshletsFlex:function(y,A,b,x,T,E,v,S){o(y.length%3==0),o(A instanceof Float32Array),o(A.length%b==0),o(b>=3),o(x>=3&&x<=256),o(T>=1&&E<=512),o(T<=E),v=v||0,S=S||0;var I=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return f(n.exports.meshopt_buildMeshletsFlex,I,A,A.length/b,b*4,x,T,E,v,S)},buildMeshletsSpatial:function(y,A,b,x,T,E,v){o(y.length%3==0),o(A instanceof Float32Array),o(A.length%b==0),o(b>=3),o(x>=3&&x<=256),o(T>=1&&E<=512),o(T<=E),v=v||0;var S=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return f(n.exports.meshopt_buildMeshletsSpatial,S,A,A.length/b,b*4,x,T,E,v)},extractMeshlet:function(y,A){return o(A>=0&&A<y.meshletCount),u(y,A)},computeClusterBounds:function(y,A,b){o(y.length%3==0),o(y.length/3<=512),o(A instanceof Float32Array),o(A.length%b==0),o(b>=3);var x=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return g(x,A,A.length/b,b*4)},computeMeshletBounds:function(y,A,b){return o(A instanceof Float32Array),o(A.length%b==0),o(b>=3),p(y,A,A.length/b,b*4)},computeSphereBounds:function(y,A,b,x){return o(y instanceof Float32Array),o(y.length%A==0),o(A>=3),o(!b||b instanceof Float32Array),o(!b||b.length%x==0),o(!b||x>=1),o(!b||y.length/A==b.length/x),x=x||0,m(y,y.length/A,A*4,b,x*4)}}})();var qTn=(function(){var e="b9H79Tebbbegv9Geueu9Geub9Gbb9Gkuuuuuuuuuuub9Giuuueuirodiblbelve9Weiiviebeoweuecj:Gdkrnlo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbK9TW79O9V9Wt9F9NW9UWV9HtW9u9H9U9NW9Ut7bel79IV9RbdDwebcekdlvq;m8Lodbk:wgvOuw99iuv99vu8Jjjjjbc;Wb9Rgk8Kjjjjbakcxfcbc;Kbz:djjjb8AakcualcdtgxalcFFFFi0Ecbyd:q:G:cjbHjjjjbbgmBdxakceBd2adci9UhPalcd4alfhscehzinazgHcethzaHas6mbkakcuaHcdtgzaHcFFFFi0Ecbyd:q:G:cjbHjjjjbbgsBdzakcdBd2ascFeazz:djjjbhOaDcd4hAarcd4hCavcd4hXdnalTmbaHcufhrcbhvindndnaOcbaiavaX2cdtfgHydlgDaDcjjjj94SEgscH4cbaoavaC2cdtfgzydlgQcs4aQcjjjj94SE7as7c:F:b:DD2cbaHydbgLaLcjjjj94SEgscH4cbazydbgKcs4aKcjjjj94SE7as7c;D;O:B8J27cbaHydwgYaYcjjjj94SEgHcH4cbazydwg8Acs4a8Acjjjj94SE7aH7c:3F;N8N27awavaA2cdtfgHydlgEaHydbg37cFFFFrGgHcm4aH7c:fjjK27arGgscdtfgHydbgzcuSmbaE::h5a3::h8Ea8A::h8FaQ::haaK::hhaY::hgaD::h8JaL::h8KcehDinaDhHdnaiazaX2cdtfgDIdba8K9CmbaDIdla8J9CmbaDIdwag9CmbaoazaC2cdtfgDIdbah9CmbaDIdlaa9CmbaDIdwa8F9CmbawazaA2cdtfgDIdba8E9CmbaDIdla59BmikaHcefhDaOasaHfarGgscdtfgHydbgzcu9hmbkkaHavBdbavhzkamavcdtfazBdbavcefgval9hmbkkaOcbydN:G:cjbH:bjjjbbakceBd2akcualcefgHcdtaHcFFFFi0Ecbyd:q:G:cjbHjjjjbbg8LBdzakcdBd2akcuadcdtadcFFFFi0EgYcbyd:q:G:cjbHjjjjbbg8MBdCakciBd2a8Lclfcbaxz:djjjbhzdnadTmbdnaeTmbaehHadhsinazamaHydbcdtfydbcdtfgDaDydbcefBdbaHclfhHascufgsmbxdkkamhHadhsinazaHydbcdtfgDaDydbcefBdbaHclfhHascufgsmbkkdnalTmbcbhsazhHalhDinaHydbhOaHasBdbaHclfhHaOasfhsaDcufgDmbkkdnadci6gQmbcbhscdhHaPhOindndnaeTmbamaeasfgvydbcdtfhDamavcwfydbcdtfhramavclfydbcdtfhvxekamasfgDcwfhraDclfhvkarydbhravydbhvazaDydbcdtfgDaDydbgDcefBdba8MaDcdtfaHc9:fBdbazavcdtfgDaDydbgDcefBdba8MaDcdtfaHcufBdbazarcdtfgDaDydbgDcefBdba8MaDcdtfaHBdbascxfhsaHclfhHaOcufgOmbkkcbhsa8LcbBdbakcuaPcltadcFFFFd0Ecbyd:q:G:cjbHjjjjbbg8NBdKakclBd2dnaQmbaehza8NhHaPhvindndnaeTmbazcwfydbhDazclfydbhOazydbhrxekascdfhDascefhOashrkJbbbbh8KJbbbbJbbbbJbbbbJbbbbJbbjZJbbj:;awaOaA2cdtfgQIdbawaraA2cdtfgLIdbgh:tawaDaA2cdtfgKIdlaLIdlgg:tg8JNaQIdlag:tggaKIdbah:tN:tghJbbbb9EEahJbbbb9BEg8EaiaraX2cdtfgrIdwghaiaOaX2cdtfgOIdwg59BEa8EarIdlgaaOIdlgy9BEa8EarIdbg8FaOIdbg8P9BEg8EahaiaDaX2cdtfgDIdwgI9BEa8EaaaDIdlg8R9BEa8Ea8FaDIdbg8S9BEg8Ea5aI9BEa8Eaya8R9BEa8Ea8Pa8S9BEh8Edna8Ja5ah:tNagaIah:tN:tghahNa8Ja8Pa8F:tNaga8Sa8F:tN:tg8Fa8FNa8Jayaa:tNaga8Raa:tN:tg8Ja8JNMMggJbbbb9Bmba8Eag:r:vh8KkaHcxfa8EUdbaHcwfaha8KNUdbaHclfa8Ja8KNUdbaHa8Fa8KNUdbazcxfhzaHczfhHascifhsavcufgvmbkkcbhHakaYcbyd:q:G:cjbHjjjjbbgDBd3akcvBd2dnadTmbaDhzinazaHBdbazclfhzadaHcefgH9hmbkkakcuaPcdtadcFFFF970Ecbyd:q:G:cjbHjjjjbbgvBdaakcoBd2akaPcbyd:q:G:cjbHjjjjbbg8ABd8KakcrBd2dnadci6mba8NcxfhzavhscbhHinasaHBdba8AaHfcdcbazIdbg8KJbbbb9DEa8KJbbbb9EV86bbasclfhsazczfhzaPaHcefgH9hmbkkdnalTmbcbhRinaRcdthHdna8LaRcefgRcdtfydbgza8LaHfydbgHSmbazaH9RhLa8MaHcdtfhKcbh8UinaKa8Ucdtfg8VydbgHcd4g8Wci2gxaHciGcdtgzyd:e:G:cjbfhHaxazydj:G:cjbfhzdnaeTmbaeaHcdtfydbhHaeazcdtfydbhzkdna8Ucefg8UaL9pmbamaHcdtfydbhYamazcdtfydbh3a8Aa8WfhEava8Wcdtfh8Xa8UhwinaKawcdtfgQydbgHcd4gzci2gAaHciGcdtgHyd:e:G:cjbfhsaAaHydj:G:cjbfhHdnaeTmbaeascdtfydbhsaeaHcdtfydbhHkdndnamaHcdtfydbaYSmbamascdtfydba39hmeka8AazfRbbgHaERbbgsVciSmbdnaHasGmba8Whsdna8Wa8XydbgHSmba8XhOinaOavaHgscdtfgrydbgHBdbarhOasaH9hmbkkdnazavazcdtfgOydbgHSmbinaOavaHgzcdtfgrydbgHBdbarhOazaH9hmbkkasazSmba8AazfgORbba8AasfgHRbbVciSmeavazcdtfasBdbaHaHRbbaORbbV86bbkdna8VydbciGaxfgzaDazcdtfgsydbgHSmbinasaDaHgzcdtfgOydbgHBdbaOhsazaH9hmbkkdnaQydbciGaAfgsaDascdtfgOydbgHSmbinaOaDaHgscdtfgrydbgHBdbarhOasaH9hmbkkazasSmbaDascdtfazBdbkawcefgwaL9hmbkka8UaL9hmbkkaRal9hmbkkdnadTmbcbhrinarhzdnaraDarcdtfgwydbgHSmbawhsinasaDaHgzcdtfgOydbgHBdbaOhsazaH9hmbkkawazBdbarcefgrad9hmbkcbh8Vabcbadcltz:djjjbhKdnadci6mbaqceGhEaDhYaeh3cbh8Windna8Na8WcltfgsIdxJbbbb9Bmbama8Wcx2gHfhxaeaHfhLcbhza8VhwinaKaYazfydbcltfhHdndnaeTmbamaLazc:e:G:cjbfydbcdtfydbcdtfhAamaLazcj:G:cjbfydbcdtfydbcdtfhra3azfydbhOxekaxazc:e:G:cjbfydbcdtfhAaxazcj:G:cjbfydbcdtfhrawhOkaHasIdbggaoamaOcdtfydbgQaC2cdtfgOIdbg8KasIdwg8FaOIdwg8JNaga8KNasIdlg8EaOIdlggNMMghN:tgaJbbbbJbbjZa8Fa8JahN:tg8Fa8FNaaaaNa8EagahN:tghahNMMga:r:vaaJbbbb9BEJ;As6nJbbjZaiarydbaX2cdtfgOIdwaiaQaX2cdtfgrIdwg5:tgaa8Jaaa8JNaOIdbarIdbgy:tg8Pa8KNagaOIdlarIdlgI:tg8RNMMgaN:tg8EaiaAydbaX2cdtfgOIdwa5:tg5a8Ja5a8JNaOIdbay:tg8Sa8KNagaOIdlaI:tgINMMg5N:tg8JNa8Pa8KaaN:tgya8Sa8Ka5N:tg8KNa8RagaaN:tgaaIaga5N:tggNMMJbbbbJbbjZa8Ea8ENayayNaaaaNMMa8Ja8JNa8Ka8KNagagNMMNg8K:rg8J:va8KJbbbb9BENgg:lg8Ka8KJbbjZ9EEg8Ka8KJ7;A9s89NJ:L9t9s::MNJ;ob;jZMJbbjZa8K:t:rNg8K:ta8KagJbbbb9DENg8Ka8Ja8KNaEEg8KNaHIdbMUdbaHaha8KNaHIdlMUdlaHa8Fa8KNaHIdwMUdwawcefhwazclfgzcx9hmbkkaYcxfhYa3cxfh3a8Vcifh8Va8Wcefg8WaP9hmbkcbhrinarhzdnaravarcdtfgsydbgHSmbinasavaHgzcdtfgOydbgHBdbaOhsazaH9hmbkkaKarc8W2fgHc3fJbbjZJbbj:;a8AazfRbbceGEg8KUdbaHc8Sfa8KUdbaHa8KUdxarcefgraP9hmbkkaqcdGhvcbhzaDhsaKhHindnazasydb9hmbJbbbbh8KdnaHcwfgOIdbg8Ja8JNaHIdbggagNaHclfgrIdbghahNMMgaJbbbb9BmbJbbjZaa:r:vh8KkaOa8Ja8KNUdbaraha8KNUdbaHaga8KNg8JUdbavmbaHJbbjZa8Ja8KJbbbb9BEUdbkasclfhsaHczfhHadazcefgz9hmbkcbhHaKhzindnaHaDydbgsSmbazaKascltfgsydwBdwazas8Pdb83dbkaDclfhDazczfhzadaHcefgH9hmbkkdnakyd2gzTmbazcdtakcxffc98fhHinaHydbcbydN:G:cjbH:bjjjbbaHc98fhHazcufgzmbkkakc;Wbf8Kjjjjbk9teiucbcbyd:y:G:cjbgeabcifc98GfgbBd:y:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:y:G:cjbgeabcrfc94GfgbBd:y:G:cjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikTeeucbabcbyd:y:G:cjbge9Rcifc98GaefgbBd:y:G:cjbdnabZbcztge9nmbabae9RcFFifcz4nb8Akkk8Rdbcj:Gdkzebbbdbbbbbbbebbbbc:q:Gdkxebbbdbbba:qbb",t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n,i=WebAssembly.instantiate(r(e),{}).then(function(u){n=u.instance,n.exports.__wasm_call_ctors()});function r(u){for(var f=new Uint8Array(u.length),d=0;d<u.length;++d){var p=u.charCodeAt(d);f[d]=p>96?p-97:p>64?p-39:p+4}for(var g=0,d=0;d<u.length;++d)f[g++]=f[d]<60?t[f[d]]:(f[d]-60)*64+f[++d];return f.buffer.slice(0,g)}function o(u){if(!u)throw new Error("Assertion failed")}function s(u){return new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}function a(u,f,d,p,g,m,y,A,b,x){var T=n.exports.sbrk,E=T(f*16),v=u?T(u.byteLength):0,S=T(d.byteLength),I=T(m.byteLength),R=T(A.byteLength),O=new Uint8Array(n.exports.memory.buffer);u&&O.set(s(u),v),O.set(s(d),S),O.set(s(m),I),O.set(s(A),R),n.exports.meshopt_generateTangents(E,v,f,S,p,g*4,I,y*4,R,b*4,x),O=new Uint8Array(n.exports.memory.buffer);var L=new Float32Array(O.buffer,E,f*4).slice();return T(E-T(0)),L}var c={Compatible:1,ZeroFallback:2};return{ready:i,supported:!0,generateTangents:function(u,f,d,p,g,m,y,A){o(u===null||u instanceof Uint32Array||u instanceof Int32Array||u instanceof Uint16Array||u instanceof Int16Array),o(u===null||u.length%3==0),o(f instanceof Float32Array),o(f.length%d==0),o(d>=3),o(p instanceof Float32Array),o(p.length%g==0),o(g>=3),o(m instanceof Float32Array),o(m.length%y==0),o(y>=2),o(f.length/d==p.length/g),o(f.length/d==m.length/y),o(u!==null||f.length/d%3==0);for(var b=0,x=0;x<(A?A.length:0);++x)o(A[x]in c),b|=c[A[x]];var T=f.length/d,E=u?u.length:T,v=u===null||u.BYTES_PER_ELEMENT==4?u:new Uint32Array(u);return a(v,E,f,T,d,p,g,m,y,b)}}})();var GK=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.bufferViewId,o=t.gltfResource,s=t.baseResource,a=t.cacheKey,c=i.bufferViews[r],u=c.buffer,f=c.byteOffset,d=c.byteLength,p=!1,g,m,y,A,b=tA(c);l(b)&&(u=b.buffer,f=b.byteOffset??0,d=b.byteLength,p=!0,g=b.byteStride,m=b.count,y=b.mode,A=b.filter??"NONE");let x=i.buffers[u];this._hasMeshopt=p,this._meshoptByteStride=g,this._meshoptCount=m,this._meshoptMode=y,this._meshoptFilter=A,this._resourceCache=n,this._gltfResource=o,this._baseResource=s,this._buffer=x,this._bufferId=u,this._byteOffset=f,this._byteLength=d,this._cacheKey=a,this._bufferLoader=void 0,this._typedArray=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get typedArray(){return this._typedArray}async load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=Tqe(this),this._promise)}unload(){l(this._bufferLoader)&&!this._bufferLoader.isDestroyed()&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0}};async function Tqe(e){try{let t=Eqe(e);if(e._bufferLoader=t,await t.load(),e.isDestroyed())return;let n=t.typedArray,i=new Uint8Array(n.buffer,n.byteOffset+e._byteOffset,e._byteLength);if(e.unload(),e._typedArray=i,e._hasMeshopt){let r=e._meshoptCount,o=e._meshoptByteStride,s=new Uint8Array(r*o);nA.decodeGltfBuffer(s,r,o,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=Tt.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load buffer view",t)}}function Eqe(e){let t=e._resourceCache,n=e._buffer;if(l(n.uri)){let o=e._baseResource.getDerivedResource({url:n.uri});return t.getExternalBufferLoader({resource:o})}let i=n.extras?._pipeline?.source;return t.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:e._bufferId,typedArray:i})}var Hv=GK;var Qx=class e{static _getDecoderTaskProcessor(){if(!l(e._decoderTaskProcessor)){let t=new Jn("decodeDraco",e._maxDecodingConcurrency);t.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(n){n?e._taskProcessorReady=!0:e._error=new oe("Draco decoder could not be initialized.")}).catch(n=>{e._error=n}),e._decoderTaskProcessor=t}return e._decoderTaskProcessor}static decodePointCloud(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.buffer.buffer])}static decodeBufferView(t){let n=e._getDecoderTaskProcessor();if(l(e._error))throw e._error;if(e._taskProcessorReady)return n.scheduleTask(t,[t.array.buffer])}};Qx._maxDecodingConcurrency=Math.max(dn.hardwareConcurrency-1,1);Qx._decoderTaskProcessor=void 0;Qx._taskProcessorReady=!1;Qx._error=void 0;var Og=Qx;var Mn={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",SCALE:"KHR_gaussian_splatting:SCALE",ROTATION:"KHR_gaussian_splatting:ROTATION",CUMULATIVE_DISTANCE:"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE"};function Cqe(e){switch(e){case Mn.POSITION:return"positionMC";case Mn.NORMAL:return"normalMC";case Mn.TANGENT:return"tangentMC";case Mn.TEXCOORD:return"texCoord";case Mn.COLOR:return"color";case Mn.JOINTS:return"joints";case Mn.WEIGHTS:return"weights";case Mn.FEATURE_ID:return"featureId";case Mn.SCALE:return"scale";case Mn.ROTATION:return"rotation";case Mn.CUMULATIVE_DISTANCE:return"cumulativeDistance"}}Mn.hasSetIndex=function(e){switch(e){case Mn.POSITION:case Mn.NORMAL:case Mn.TANGENT:case Mn.CUMULATIVE_DISTANCE:return!1;case Mn.TEXCOORD:case Mn.COLOR:case Mn.JOINTS:case Mn.WEIGHTS:case Mn.FEATURE_ID:case Mn.SCALE:case Mn.ROTATION:return!0}};Mn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Mn.POSITION;case"NORMAL":return Mn.NORMAL;case"TANGENT":return Mn.TANGENT;case"TEXCOORD":return Mn.TEXCOORD;case"COLOR":return Mn.COLOR;case"JOINTS":return Mn.JOINTS;case"WEIGHTS":return Mn.WEIGHTS;case"_FEATURE_ID":return Mn.FEATURE_ID;case"KHR_gaussian_splatting:SCALE":case"_SCALE":return Mn.SCALE;case"KHR_gaussian_splatting:ROTATION":case"_ROTATION":return Mn.ROTATION;case"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE":return Mn.CUMULATIVE_DISTANCE}};Mn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return Mn.POSITION;case"RGBA":case"RGB":case"RGB565":return Mn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Mn.NORMAL;case"BATCH_ID":return Mn.FEATURE_ID}};Mn.getGlslType=function(e){switch(e){case Mn.POSITION:case Mn.NORMAL:case Mn.TANGENT:return"vec3";case Mn.TEXCOORD:return"vec2";case Mn.COLOR:return"vec4";case Mn.JOINTS:return"ivec4";case Mn.WEIGHTS:return"vec4";case Mn.FEATURE_ID:return"int";case Mn.SCALE:return"vec3";case Mn.ROTATION:return"vec4";case Mn.CUMULATIVE_DISTANCE:return"float";case Mn.OPACITY:return"float"}};Mn.getVariableName=function(e,t){let n=Cqe(e);return l(t)&&(n+=`_${t}`),n};Object.freeze(Mn);var ct=Mn;var WK=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.primitive,o=t.draco,s=t.gltfResource,a=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=s,this._baseResource=a,this._gltf=i,this._primitive=r,this._draco=o,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=Tt.UNLOADED,this._promise=void 0,this._dracoError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=vqe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.PROCESSING||(l(this._dracoError)&&h0e(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=this._draco,i=this._primitive,r=this._gltf,o=r.bufferViews,s=n.bufferView,a=o[s],c=n.attributes,u=[];for(let p in i.attributes)if(i.attributes.hasOwnProperty(p)){let g=wqe(p);l(g)&&r.accessors[i.attributes[p]].componentType===Y.FLOAT&&(u.includes(g)||u.push(g))}let f={array:new Uint8Array(this._bufferViewTypedArray),bufferView:a,compressedAttributes:c,dequantizeInShader:!0,attributesToSkipTransform:u},d=Og.decodeBufferView(f);if(!l(d))return!1;this._decodePromise=Sqe(this,d)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function vqe(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._draco.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=Tt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;h0e(e,n)}}function h0e(e,t){throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load Draco",t)}async function Sqe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=Tt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var eT={};eT[ct.POSITION]="POSITION";eT[ct.NORMAL]="NORMAL";eT[ct.COLOR]="COLOR";eT[ct.TEXCOORD]="TEX_COORD";function wqe(e){for(let t in eT)if(eT.hasOwnProperty(t)&&e.startsWith(t))return eT[t]}var Gv=WK;function Iqe(e){let{uint8Array:t,format:n,request:i}=e,r=e.flipY??!1,o=e.skipColorSpaceConversion??!1,s=new Blob([t],{type:n}),a;return De.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(De.createImageBitmapFromBlob(s,{flipY:r,premultiplyAlpha:!1,skipColorSpaceConversion:o})):(a=window.URL.createObjectURL(s),new De({url:a,request:i}).fetchImage({flipY:r,skipColorSpaceConversion:o}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var Mg=Iqe;var QM=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.imageId,o=t.gltfResource,s=t.baseResource,a=t.cacheKey,c=i.images[r],u=c.bufferView,f=c.uri;this._resourceCache=n,this._gltfResource=o,this._baseResource=s,this._gltf=i,this._bufferViewId=u,this._uri=f,this._cacheKey=a,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get image(){return this._image}get mipLevels(){return this._mipLevels}load(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=Pqe(this),this._promise):(this._promise=Dqe(this),this._promise)}unload(){l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0}};function m0e(e){let t;return Array.isArray(e)&&(t=e.slice(1,e.length).map(function(n){return n.bufferView}),e=e[0]),{image:e,mipLevels:t}}async function Pqe(e){e._state=Tt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=n,await n.load(),e.isDestroyed())return;let i=n.typedArray,r=await Oqe(i);if(e.isDestroyed())return;let o=m0e(r);return e.unload(),e._image=o.image,e._mipLevels=o.mipLevels,e._state=Tt.READY,e}catch(n){return e.isDestroyed()?void 0:p0e(e,n,"Failed to load embedded image")}}async function Dqe(e){e._state=Tt.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let r=await Nqe(i);if(e.isDestroyed())return;let o=m0e(r);return e.unload(),e._image=o.image,e._mipLevels=o.mipLevels,e._state=Tt.READY,e}catch(r){return e.isDestroyed()?void 0:p0e(e,r,`Failed to load image: ${n}`)}}function p0e(e,t,n){return e.unload(),e._state=Tt.FAILED,Promise.reject(e.getError(n,t))}function Rqe(e){let t=e.subarray(0,2),n=e.subarray(0,4),i=e.subarray(8,12);if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===137&&t[1]===80)return"image/png";if(t[0]===171&&t[1]===75)return"image/ktx2";if(n[0]===82&&n[1]===73&&n[2]===70&&n[3]===70&&i[0]===87&&i[1]===69&&i[2]===66&&i[3]===80)return"image/webp";throw new oe("Image format is not recognized")}async function Oqe(e){let t=Rqe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return Ou(n)}return QM._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var Mqe=/(^data:image\/ktx2)|(\.ktx2$)/i;function Nqe(e){let t=e.getUrlComponent(!1,!0);return Mqe.test(t)?Ou(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}QM._loadImageFromTypedArray=Mg;var Wv=QM;var g0e={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3};Object.freeze(g0e);var Oc=g0e;var qK=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.accessorId,o=t.gltfResource,s=t.baseResource,a=t.primitive,c=t.draco,u=t.cacheKey,f=t.asynchronous??!0,d=t.loadBuffer??!1,p=t.loadTypedArray??!1,g=i.accessors[r].componentType;this._resourceCache=n,this._gltfResource=o,this._baseResource=s,this._gltf=i,this._accessorId=r,this._indexDatatype=g,this._primitive=a,this._draco=c,this._cacheKey=u,this._asynchronous=f,this._loadBuffer=d,this._loadTypedArray=p,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get indexDatatype(){return this._indexDatatype}async load(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=Fqe(this),this._promise):(this._promise=Bqe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.LOADED&&this._state!==Tt.PROCESSING)return!1;let n=this._typedArray,i=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(t)&&(n=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=n,i=Y.fromTypedArray(n),this._indexDatatype=i)}catch(o){XK(this,o)}if(!l(n))return!1;let r;if(this._loadBuffer&&this._asynchronous){let o=Lqe;if(o.set(n,i,t.context),!t.jobScheduler.execute(o,Oc.BUFFER))return!1;r=o.buffer}else this._loadBuffer&&(r=_0e(n,i,t.context));return this.unload(),this._buffer=r,this._typedArray=this._loadTypedArray?n:void 0,this._state=Tt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}},YK=class{constructor(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}set(t,n,i){this.typedArray=t,this.indexDatatype=n,this.context=i}execute(){this.buffer=_0e(this.typedArray,this.indexDatatype,this.context)}};function _0e(e,t,n){let i=nt.createIndexBuffer({typedArray:e,context:n,usage:Me.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}var Lqe=new YK;async function Fqe(e){e._state=Tt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=Tt.LOADED,e)}catch(n){if(e.isDestroyed())return;XK(e,n)}}async function Bqe(e){let t=e._gltf,n=e._accessorId,r=t.accessors[n].bufferView;e._state=Tt.LOADING;let o=e._resourceCache;try{let s=o.getBufferViewLoader({gltf:t,bufferViewId:r,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=kqe(e,a),e._state=Tt.PROCESSING,e}catch(s){if(e.isDestroyed())return;XK(e,s)}}function kqe(e,t){let n=e._gltf,i=e._accessorId,r=n.accessors[i],o=r.count,s=r.componentType,a=je.getSizeInBytes(s),c=t.buffer,u=t.byteOffset+r.byteOffset;if(u%a!==0){let d=o*a,p=new Uint8Array(c,u,d);c=new Uint8Array(p).buffer,u=0,qr("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let f;return s===je.UNSIGNED_BYTE?f=new Uint8Array(c,u,o):s===je.UNSIGNED_SHORT?f=new Uint16Array(c,u,o):s===je.UNSIGNED_INT&&(f=new Uint32Array(c,u,o)),f}function XK(e,t){throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load index buffer",t)}var qv=qK;function Uqe(e,t,n){if(n=n??!1,n){let i=e.indexOf(t);if(i>-1)return i}return e.push(t),e.length-1}var ga=Uqe;function zqe(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var Go=zqe;function rn(){}rn.objectLegacy=function(e,t){if(l(e)){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],r=t(i,n);if(l(r))return r}}};rn.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i<n;i++){let r=e[i],o=t(r,i);if(l(o))return o}}};rn.topLevel=function(e,t,n){let i=e[t];return l(i)&&!Array.isArray(i)?rn.objectLegacy(i,n):rn.object(i,n)};rn.accessor=function(e,t){return rn.topLevel(e,"accessors",t)};rn.accessorWithSemantic=function(e,t,n){let i={};return rn.mesh(e,function(r){return rn.meshPrimitive(r,function(o){let s=rn.meshPrimitiveAttribute(o,function(a,c){if(c.indexOf(t)===0&&!l(i[a])){i[a]=!0;let u=n(a);if(l(u))return u}});return l(s)?s:rn.meshPrimitiveTarget(o,function(a){return rn.meshPrimitiveTargetAttribute(a,function(c,u){if(u.indexOf(t)===0&&!l(i[c])){i[c]=!0;let f=n(c);if(l(f))return f}})})})})};rn.accessorContainingVertexAttributeData=function(e,t){let n={};return rn.mesh(e,function(i){return rn.meshPrimitive(i,function(r){let o=rn.meshPrimitiveAttribute(r,function(s){if(!l(n[s])){n[s]=!0;let a=t(s);if(l(a))return a}});return l(o)?o:rn.meshPrimitiveTarget(r,function(s){return rn.meshPrimitiveTargetAttribute(s,function(a){if(!l(n[a])){n[a]=!0;let c=t(a);if(l(c))return c}})})})})};rn.accessorContainingIndexData=function(e,t){let n={};return rn.mesh(e,function(i){return rn.meshPrimitive(i,function(r){let o=r.indices;if(l(o)&&!l(n[o])){n[o]=!0;let s=t(o);if(l(s))return s}})})};rn.animation=function(e,t){return rn.topLevel(e,"animations",t)};rn.animationChannel=function(e,t){let n=e.channels;return rn.object(n,t)};rn.animationSampler=function(e,t){let n=e.samplers;return rn.object(n,t)};rn.buffer=function(e,t){return rn.topLevel(e,"buffers",t)};rn.bufferView=function(e,t){return rn.topLevel(e,"bufferViews",t)};rn.camera=function(e,t){return rn.topLevel(e,"cameras",t)};rn.image=function(e,t){return rn.topLevel(e,"images",t)};rn.material=function(e,t){return rn.topLevel(e,"materials",t)};rn.materialValue=function(e,t){let n=e.values;l(e.extensions)&&l(e.extensions.KHR_techniques_webgl)&&(n=e.extensions.KHR_techniques_webgl.values);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let r=t(n[i],i);if(l(r))return r}};rn.mesh=function(e,t){return rn.topLevel(e,"meshes",t)};rn.meshPrimitive=function(e,t){let n=e.primitives;if(l(n)){let i=n.length;for(let r=0;r<i;r++){let o=n[r],s=t(o,r);if(l(s))return s}}};rn.meshPrimitiveAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let r=t(n[i],i);if(l(r))return r}};rn.meshPrimitiveTarget=function(e,t){let n=e.targets;if(l(n)){let i=n.length;for(let r=0;r<i;++r){let o=t(n[r],r);if(l(o))return o}}};rn.meshPrimitiveTargetAttribute=function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let i=e[n],r=t(i,n);if(l(r))return r}};rn.node=function(e,t){return rn.topLevel(e,"nodes",t)};rn.nodeInTree=function(e,t,n){let i=e.nodes;if(l(i)){let r=t.length;for(let o=0;o<r;o++){let s=t[o],a=i[s];if(l(a)){let c=n(a,s);if(l(c))return c;let u=a.children;if(l(u)&&(c=rn.nodeInTree(e,u,n),l(c)))return c}}}};rn.nodeInScene=function(e,t,n){let i=t.nodes;if(l(i))return rn.nodeInTree(e,i,n)};rn.program=function(e,t){return Go(e,"KHR_techniques_webgl")?rn.object(e.extensions.KHR_techniques_webgl.programs,t):rn.topLevel(e,"programs",t)};rn.sampler=function(e,t){return rn.topLevel(e,"samplers",t)};rn.scene=function(e,t){return rn.topLevel(e,"scenes",t)};rn.shader=function(e,t){return Go(e,"KHR_techniques_webgl")?rn.object(e.extensions.KHR_techniques_webgl.shaders,t):rn.topLevel(e,"shaders",t)};rn.skin=function(e,t){return rn.topLevel(e,"skins",t)};rn.skinJoint=function(e,t){let n=e.joints;if(l(n)){let i=n.length;for(let r=0;r<i;r++){let o=n[r],s=t(o);if(l(s))return s}}};rn.techniqueAttribute=function(e,t){let n=e.attributes;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let r=t(n[i],i);if(l(r))return r}};rn.techniqueUniform=function(e,t){let n=e.uniforms;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let r=t(n[i],i);if(l(r))return r}};rn.techniqueParameter=function(e,t){let n=e.parameters;for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)){let r=t(n[i],i);if(l(r))return r}};rn.technique=function(e,t){return Go(e,"KHR_techniques_webgl")?rn.object(e.extensions.KHR_techniques_webgl.techniques,t):rn.topLevel(e,"techniques",t)};rn.texture=function(e,t){return rn.topLevel(e,"textures",t)};var ke=rn;function Vqe(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}var Rf=Vqe;function jqe(e,t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n];if(l(i.byteStride)&&i.byteStride>0)return i.byteStride}return Y.getSizeInBytes(t.componentType)*Rf(t.type)}var Vu=jqe;function Hqe(e){ke.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),ke.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){if(i.mode=i.mode??te.TRIANGLES,!l(i.material)){l(e.materials)||(e.materials=[]);let r={name:"default"};i.material=ga(e.materials,r)}})}),ke.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],r=i.bufferView;if(i.normalized=i.normalized??!1,l(r)){let o=e.bufferViews[r];o.byteStride=Vu(e,i),o.target=te.ARRAY_BUFFER}}),ke.accessorContainingIndexData(e,function(n){let r=e.accessors[n].bufferView;if(l(r)){let o=e.bufferViews[r];o.target=te.ELEMENT_ARRAY_BUFFER}}),ke.material(e,function(n){let i=n.extensions??{},r=i.KHR_materials_common;if(l(r)){let c=r.technique,u=l(r.values)?r.values:{};r.values=u,u.ambient=l(u.ambient)?u.ambient:[0,0,0,1],u.emission=l(u.emission)?u.emission:[0,0,0,1],u.transparency=u.transparency??1,c!=="CONSTANT"&&(u.diffuse=l(u.diffuse)?u.diffuse:[0,0,0,1],c!=="LAMBERT"&&(u.specular=l(u.specular)?u.specular:[0,0,0,1],u.shininess=u.shininess??0)),r.transparent=r.transparent??!1,r.doubleSided=r.doubleSided??!1;return}n.emissiveFactor=n.emissiveFactor??[0,0,0],n.alphaMode=n.alphaMode??"OPAQUE",n.doubleSided=n.doubleSided??!1,n.alphaMode==="MASK"&&(n.alphaCutoff=n.alphaCutoff??.5);let o=i.KHR_techniques_webgl;l(o)&&ke.materialValue(n,function(c){l(c.index)&&tT(c)}),tT(n.emissiveTexture),tT(n.normalTexture),tT(n.occlusionTexture);let s=n.pbrMetallicRoughness;l(s)&&(s.baseColorFactor=s.baseColorFactor??[1,1,1,1],s.metallicFactor=s.metallicFactor??1,s.roughnessFactor=s.roughnessFactor??1,tT(s.baseColorTexture),tT(s.metallicRoughnessTexture));let a=i.KHR_materials_pbrSpecularGlossiness;l(a)&&(a.diffuseFactor=a.diffuseFactor??[1,1,1,1],a.specularFactor=a.specularFactor??[1,1,1],a.glossinessFactor=a.glossinessFactor??1,tT(a.specularGlossinessTexture))}),ke.animation(e,function(n){ke.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=Gqe(e);return ke.node(e,function(n,i){l(t[i])||l(n.translation)||l(n.rotation)||l(n.scale)?(n.translation=n.translation??[0,0,0],n.rotation=n.rotation??[0,0,0,1],n.scale=n.scale??[1,1,1]):n.matrix=n.matrix??[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}),ke.sampler(e,function(n){n.wrapS=n.wrapS??te.REPEAT,n.wrapT=n.wrapT??te.REPEAT}),l(e.scenes)&&!l(e.scene)&&(e.scene=0),e}function Gqe(e){let t={};return ke.animation(e,function(n){ke.animationChannel(n,function(i){let r=i.target,o=r.node,s=r.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[o]=!0)})}),t}function tT(e){l(e)&&(e.texCoord=e.texCoord??0)}var eN=Hqe;function Wqe(e){return ke.shader(e,function(t){B6(t)}),ke.buffer(e,function(t){B6(t)}),ke.image(e,function(t){B6(t)}),B6(e),e}function B6(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var iA=Wqe;function qqe(e,t){let n=e.extensionsRequired;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),n.length===0&&delete e.extensionsRequired}}var tN=qqe;function Yqe(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),tN(e,t),n.length===0&&delete e.extensionsUsed}}var nT=Yqe;var Xqe=4;function Kqe(e){if(im(e)!=="glTF")throw new oe("File is not valid binary glTF");let n=y0e(e,0,5),i=n[1];if(i!==1&&i!==2)throw new oe("Binary glTF version is not 1 or 2");return i===1?$qe(e,n):Jqe(e,n)}function y0e(e,t,n){let i=new DataView(e.buffer),r=new Array(n);for(let o=0;o<n;++o)r[o]=i.getUint32(e.byteOffset+t+o*Xqe,!0);return r}function $qe(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new oe("Binary glTF scene format is not JSON");let o=20,s=o+i,a=ku(e,o,i),c=JSON.parse(a);iA(c);let u=e.subarray(s,n),f=c.buffers;if(l(f)&&Object.keys(f).length>0){let d=f.binary_glTF??f.KHR_binary_glTF;l(d)&&(d.extras._pipeline.source=u,delete d.uri)}return nT(c,"KHR_binary_glTF"),c}function Jqe(e,t){let n=t[2],i=12,r,o;for(;i<n;){let s=y0e(e,i,2),a=s[0],c=s[1];i+=8;let u=e.subarray(i,i+a);if(i+=a,c===1313821514){let f=ku(u);r=JSON.parse(f),iA(r)}else c===5130562&&(o=u)}if(l(r)&&l(o)){let s=r.buffers;if(l(s)&&s.length>0){let a=s[0];a.extras._pipeline.source=o}}return r}var iT=Kqe;function Zqe(e){return ke.shader(e,function(t){k6(t)}),ke.buffer(e,function(t){k6(t)}),ke.image(e,function(t){k6(t)}),k6(e),e}function k6(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var nN=Zqe;function Qqe(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),ga(n,t,!0)}var Bd=Qqe;function eYe(e){switch(e){case Y.BYTE:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getInt8(n+s*r)};case Y.UNSIGNED_BYTE:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getUint8(n+s*r)};case Y.SHORT:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getInt16(n+s*r,!0)};case Y.UNSIGNED_SHORT:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getUint16(n+s*r,!0)};case Y.INT:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getInt32(n+s*r,!0)};case Y.UNSIGNED_INT:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getUint32(n+s*r,!0)};case Y.FLOAT:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getFloat32(n+s*r,!0)};case Y.DOUBLE:return function(t,n,i,r,o){for(let s=0;s<i;++s)o[s]=t.getFloat64(n+s*r,!0)}}}var Ng=eYe;function tYe(e,t){let n=e.bufferViews,i=e.buffers,r=t.bufferView,o=Rf(t.type);if(!l(t.bufferView))return{min:new Array(o).fill(0),max:new Array(o).fill(0)};let s=new Array(o).fill(Number.POSITIVE_INFINITY),a=new Array(o).fill(Number.NEGATIVE_INFINITY),c=n[r],u=c.buffer,d=i[u].extras._pipeline.source,p=t.count,g=Vu(e,t),m=t.byteOffset+c.byteOffset+d.byteOffset,y=t.componentType,A=Y.getSizeInBytes(y),b=new DataView(d.buffer),x=new Array(o),T=Ng(y);for(let E=0;E<p;E++){T(b,m,o,A,x);for(let v=0;v<o;v++){let S=x[v];s[v]=Math.min(s[v],S),a[v]=Math.max(a[v],S)}m+=g}return{min:s,max:a}}var rT=tYe;var nYe=[te.FUNC_ADD,te.FUNC_ADD],iYe=[te.ONE,te.ZERO,te.ONE,te.ZERO];function A0e(e,t){let n=e.enable;return l(n)?n.indexOf(t)>-1:!1}var rYe=[te.ZERO,te.ONE,te.SRC_COLOR,te.ONE_MINUS_SRC_COLOR,te.SRC_ALPHA,te.ONE_MINUS_SRC_ALPHA,te.DST_ALPHA,te.ONE_MINUS_DST_ALPHA,te.DST_COLOR,te.ONE_MINUS_DST_COLOR];function oYe(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(rYe.indexOf(e[n])===-1)return t;return e}function sYe(e){let t={},n={},i=e.techniques;return l(i)&&(ke.technique(e,function(r,o){let s=r.states;if(l(s)){let a=n[o]={};if(A0e(s,te.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[o]={blendEquation:c.blendEquationSeparate??nYe,blendFactors:oYe(c.blendFuncSeparate,iYe)})}A0e(s,te.CULL_FACE)||(a.doubleSided=!0),delete r.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),Bd(e,"KHR_blend")),ke.material(e,function(r){if(l(r.technique)){let o=n[r.technique];ke.objectLegacy(o,function(a,c){r[c]=a});let s=t[r.technique];l(s)&&(l(r.extensions)||(r.extensions={}),r.extensions.KHR_blend=s)}})),e}var iN=sYe;function aYe(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),ga(n,t,!0),Bd(e,t)}var rN=aYe;function cYe(e){let t=e.techniques,n={},i={},r={};if(l(t)){let o={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,ke.technique(e,function(a,c){let u={name:a.name,program:void 0,attributes:{},uniforms:{}},f;if(ke.techniqueAttribute(a,function(d,p){f=a.parameters[d],u.attributes[p]={semantic:f.semantic}}),ke.techniqueUniform(a,function(d,p){f=a.parameters[d],u.uniforms[p]={count:f.count,node:f.node,type:f.type,semantic:f.semantic,value:f.value},l(n[c])||(n[c]={}),n[c][d]=p}),l(r[a.program]))u.program=r[a.program];else{let d=e.programs[a.program],p={name:d.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},g=e.shaders[d.fragmentShader];p.fragmentShader=ga(o.shaders,g,!0);let m=e.shaders[d.vertexShader];p.vertexShader=ga(o.shaders,m,!0),u.program=ga(o.programs,p),r[a.program]=u.program}i[c]=ga(o.techniques,u)}),o.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=o,Bd(e,"KHR_techniques_webgl"),rN(e,"KHR_techniques_webgl"))}return ke.material(e,function(o){if(l(o.technique)){let s={technique:i[o.technique]};ke.objectLegacy(o.values,function(a,c){l(s.values)||(s.values={});let u=n[o.technique][c];l(u)&&(s.values[u]=a)}),l(o.extensions)||(o.extensions={}),o.extensions.KHR_techniques_webgl=s}delete o.technique,delete o.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var oN=cYe;function lYe(e,t){Wr.typeOf.object("material",e),Wr.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let o=n.baseColorTexture,s=t(o.index,o);if(l(s))return s}if(l(n.metallicRoughnessTexture)){let o=n.metallicRoughnessTexture,s=t(o.index,o);if(l(s))return s}}let{extensions:i}=e;if(l(i)){let o=i.KHR_materials_pbrSpecularGlossiness;if(l(o)){if(l(o.diffuseTexture)){let u=o.diffuseTexture,f=t(u.index,u);if(l(f))return f}if(l(o.specularGlossinessTexture)){let u=o.specularGlossinessTexture,f=t(u.index,u);if(l(f))return f}}let s=i.KHR_materials_specular;if(l(s)){let{specularTexture:u,specularColorTexture:f}=s;if(l(u)){let d=t(u.index,u);if(l(d))return d}if(l(f)){let d=t(f.index,f);if(l(d))return d}}let a=i.KHR_materials_transmission;if(l(a)&&l(a.transmissionTexture)){let u=a.transmissionTexture,f=t(u.index,u);if(l(f))return f}let c=i.KHR_materials_common;if(l(c)&&l(c.values)){let{diffuse:u,ambient:f,emission:d,specular:p}=c.values;if(l(u)&&l(u.index)){let g=t(u.index,u);if(l(g))return g}if(l(f)&&l(f.index)){let g=t(f.index,f);if(l(g))return g}if(l(d)&&l(d.index)){let g=t(d.index,d);if(l(g))return g}if(l(p)&&l(p.index)){let g=t(p.index,p);if(l(g))return g}}}let r=ke.materialValue(e,function(o){if(l(o.index)){let s=t(o.index,o);if(l(s))return s}});if(l(r))return r;if(l(e.emissiveTexture)){let o=e.emissiveTexture,s=t(o.index,o);if(l(s))return s}if(l(e.normalTexture)){let o=e.normalTexture,s=t(o.index,o);if(l(s))return s}if(l(e.occlusionTexture)){let o=e.occlusionTexture,s=t(o.index,o);if(l(s))return s}}var Yv=lYe;var b0e=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function uYe(e,t){return t=t??b0e,b0e.forEach(function(n){t.indexOf(n)>-1&&dYe(e,n)}),e}var fYe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function dYe(e,t){let n=fYe[t],i=e[n];if(l(i)){let r=0,o=Hp[t](e),s=i.length;for(let a=0;a<s;++a)o[a]||(jp[t](e,a-r),r++)}}function jp(){}jp.accessor=function(e,t){e.accessors.splice(t,1),ke.mesh(e,function(i){ke.meshPrimitive(i,function(r){ke.meshPrimitiveAttribute(r,function(a,c){a>t&&r.attributes[c]--}),ke.meshPrimitiveTarget(r,function(a){ke.meshPrimitiveTargetAttribute(a,function(c,u){c>t&&a[u]--})});let o=r.indices;l(o)&&o>t&&r.indices--;let s=r.extensions;l(s)&&l(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),ke.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),ke.animation(e,function(i){ke.animationSampler(i,function(r){l(r.input)&&r.input>t&&r.input--,l(r.output)&&r.output>t&&r.output--})})};jp.buffer=function(e,t){e.buffers.splice(t,1),ke.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--;let r=i.extensions;if(l(r)){let o=r.EXT_meshopt_compression;l(o)&&o.buffer>t&&o.buffer--;let s=r.KHR_meshopt_compression;l(s)&&s.buffer>t&&s.buffer--}})};jp.bufferView=function(e,t){if(e.bufferViews.splice(t,1),ke.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),ke.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),ke.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Go(e,"KHR_draco_mesh_compression")&&ke.mesh(e,function(i){ke.meshPrimitive(i,function(r){l(r.extensions)&&l(r.extensions.KHR_draco_mesh_compression)&&r.extensions.KHR_draco_mesh_compression.bufferView>t&&r.extensions.KHR_draco_mesh_compression.bufferView--})}),Go(e,"EXT_feature_metadata")){let r=e.extensions.EXT_feature_metadata.featureTables;for(let o in r)if(r.hasOwnProperty(o)){let a=r[o].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let u=a[c];l(u.bufferView)&&u.bufferView>t&&u.bufferView--,l(u.arrayOffsetBufferView)&&u.arrayOffsetBufferView>t&&u.arrayOffsetBufferView--,l(u.stringOffsetBufferView)&&u.stringOffsetBufferView>t&&u.stringOffsetBufferView--}}}}if(Go(e,"EXT_structural_metadata")){let r=e.extensions.EXT_structural_metadata.propertyTables;if(l(r)){let o=r.length;for(let s=0;s<o;++s){let c=r[s].properties;for(let u in c)if(c.hasOwnProperty(u)){let f=c[u];l(f.values)&&f.values>t&&f.values--,l(f.arrayOffsets)&&f.arrayOffsets>t&&f.arrayOffsets--,l(f.stringOffsets)&&f.stringOffsets>t&&f.stringOffsets--}}}}};jp.image=function(e,t){e.images.splice(t,1),ke.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let r=i.extensions;l(r)&&l(r.EXT_texture_webp)&&r.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(r)&&l(r.KHR_texture_basisu)&&r.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};jp.mesh=function(e,t){e.meshes.splice(t,1),ke.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};jp.node=function(e,t){e.nodes.splice(t,1),ke.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(r){return r>t?r-1:r})}),ke.animation(e,function(i){ke.animationChannel(i,function(r){l(r.target)&&l(r.target.node)&&r.target.node>t&&r.target.node--})}),ke.technique(e,function(i){ke.techniqueUniform(i,function(r){l(r.node)&&r.node>t&&r.node--})}),ke.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(r){return r!==t}).map(function(r){return r>t?r-1:r}))}),ke.scene(e,function(i){i.nodes=i.nodes.filter(function(r){return r!==t}).map(function(r){return r>t?r-1:r})})};jp.material=function(e,t){e.materials.splice(t,1),ke.mesh(e,function(i){ke.meshPrimitive(i,function(r){l(r.material)&&r.material>t&&r.material--})})};jp.sampler=function(e,t){e.samplers.splice(t,1),ke.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};jp.texture=function(e,t){if(e.textures.splice(t,1),ke.material(e,function(i){Yv(i,function(r,o){o.index>t&&--o.index})}),Go(e,"EXT_feature_metadata")){ke.mesh(e,function(o){ke.meshPrimitive(o,function(s){let a=s.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let u=a.EXT_feature_metadata.featureIdTextures;if(l(u)){let f=u.length;for(let d=0;d<f;++d){let g=u[d].featureIds.texture;g.index>t&&--g.index}}}})});let r=e.extensions.EXT_feature_metadata.featureTextures;for(let o in r)if(r.hasOwnProperty(o)){let a=r[o].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let f=a[c].texture;f.index>t&&--f.index}}}}if(Go(e,"EXT_mesh_features")&&ke.mesh(e,function(i){ke.meshPrimitive(i,function(r){let o=r.extensions;if(l(o)&&l(o.EXT_mesh_features)){let a=o.EXT_mesh_features.featureIds;if(l(a)){let c=a.length;for(let u=0;u<c;++u){let f=a[u];l(f.texture)&&f.texture.index>t&&--f.texture.index}}}})}),Go(e,"EXT_structural_metadata")){let r=e.extensions.EXT_structural_metadata.propertyTextures;if(l(r)){let o=r.length;for(let s=0;s<o;++s){let c=r[s].properties;for(let u in c)if(c.hasOwnProperty(u)){let f=c[u];f.index>t&&--f.index}}}}};function Hp(){}Hp.accessor=function(e){let t={};return ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){ke.meshPrimitiveAttribute(i,function(o){t[o]=!0}),ke.meshPrimitiveTarget(i,function(o){ke.meshPrimitiveTargetAttribute(o,function(s){t[s]=!0})});let r=i.indices;l(r)&&(t[r]=!0)})}),ke.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),ke.animation(e,function(n){ke.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),Go(e,"EXT_mesh_gpu_instancing")&&ke.node(e,function(n){l(n.extensions)&&l(n.extensions.EXT_mesh_gpu_instancing)&&Object.keys(n.extensions.EXT_mesh_gpu_instancing.attributes).forEach(function(i){let r=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[r]=!0})}),Go(e,"CESIUM_primitive_outline")&&ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){let r=i.extensions;if(l(r)&&l(r.CESIUM_primitive_outline)){let s=r.CESIUM_primitive_outline.indices;l(s)&&(t[s]=!0)}})}),t};Hp.buffer=function(e){let t={};return ke.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0);let i=n.extensions;if(l(i)){let r=i.EXT_meshopt_compression;l(r)&&(t[r.buffer]=!0);let o=i.KHR_meshopt_compression;l(o)&&(t[o.buffer]=!0)}}),t};Hp.bufferView=function(e){let t={};if(ke.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),ke.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),ke.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Go(e,"KHR_draco_mesh_compression")&&ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),Go(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let r in i)if(i.hasOwnProperty(r)){let s=i[r].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let c=s[a];l(c.bufferView)&&(t[c.bufferView]=!0),l(c.arrayOffsetBufferView)&&(t[c.arrayOffsetBufferView]=!0),l(c.stringOffsetBufferView)&&(t[c.stringOffsetBufferView]=!0)}}}}if(Go(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let r=i.length;for(let o=0;o<r;++o){let a=i[o].properties;for(let c in a)if(a.hasOwnProperty(c)){let u=a[c];l(u.values)&&(t[u.values]=!0),l(u.arrayOffsets)&&(t[u.arrayOffsets]=!0),l(u.stringOffsets)&&(t[u.stringOffsets]=!0)}}}}return t};Hp.image=function(e){let t={};return ke.texture(e,function(n){l(n.source)&&(t[n.source]=!0),l(n.extensions)&&l(n.extensions.EXT_texture_webp)?t[n.extensions.EXT_texture_webp.source]=!0:l(n.extensions)&&l(n.extensions.KHR_texture_basisu)&&(t[n.extensions.KHR_texture_basisu.source]=!0)}),t};Hp.mesh=function(e){let t={};return ke.node(e,function(n){if(l(n.mesh&&l(e.meshes))){let i=e.meshes[n.mesh];l(i)&&l(i.primitives)&&i.primitives.length>0&&(t[n.mesh]=!0)}}),t};function x0e(e,t,n){let i=e.nodes[t];return l(i.mesh)||l(i.camera)||l(i.skin)||l(i.weights)||l(i.extras)||l(i.extensions)&&Object.keys(i.extensions).length!==0||l(n[t])?!1:!l(i.children)||i.children.filter(function(r){return!x0e(e,r,n)}).length===0}Hp.node=function(e){let t={};return ke.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),ke.skinJoint(n,function(i){t[i]=!0})}),ke.animation(e,function(n){ke.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),ke.technique(e,function(n){ke.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),ke.node(e,function(n,i){x0e(e,i,t)||(t[i]=!0)}),t};Hp.material=function(e){let t={};return ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};Hp.texture=function(e){let t={};if(ke.material(e,function(n){Yv(n,function(i){t[i]=!0})}),Go(e,"EXT_feature_metadata")){ke.mesh(e,function(r){ke.meshPrimitive(r,function(o){let s=o.extensions;if(l(s)&&l(s.EXT_feature_metadata)){let c=s.EXT_feature_metadata.featureIdTextures;if(l(c)){let u=c.length;for(let f=0;f<u;++f){let p=c[f].featureIds.texture;t[p.index]=!0}}}})});let i=e.extensions.EXT_feature_metadata.featureTextures;for(let r in i)if(i.hasOwnProperty(r)){let s=i[r].properties;if(l(s)){for(let a in s)if(s.hasOwnProperty(a)){let u=s[a].texture;t[u.index]=!0}}}}if(Go(e,"EXT_mesh_features")&&ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){let r=i.extensions;if(l(r)&&l(r.EXT_mesh_features)){let s=r.EXT_mesh_features.featureIds;if(l(s)){let a=s.length;for(let c=0;c<a;++c){let u=s[c];l(u.texture)&&(t[u.texture.index]=!0)}}}})}),Go(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTextures;if(l(i)){let r=i.length;for(let o=0;o<r;++o){let a=i[o].properties;for(let c in a)if(a.hasOwnProperty(c)){let u=a[c];t[u.index]=!0}}}}return t};Hp.sampler=function(e){let t={};return ke.texture(e,function(n){l(n.sampler)&&(t[n.sampler]=!0)}),t};var sN=uYe;function hYe(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},r={buffer:ga(e.buffers,n),byteOffset:0,byteLength:t.length};return ga(e.bufferViews,r)}var aN=hYe;function mYe(e,t){let n=Vu(e,t),i=Y.getSizeInBytes(t.componentType),r=Rf(t.type),o=t.count,s=new Array(r*o);if(!l(t.bufferView))return s.fill(0);let a=e.bufferViews[t.bufferView],c=e.buffers[a.buffer].extras._pipeline.source,u=t.byteOffset+a.byteOffset+c.byteOffset,f=new DataView(c.buffer),d=new Array(r),p=Ng(t.componentType);for(let g=0;g<o;++g){p(f,u,r,i,d);for(let m=0;m<r;++m)s[g*r+m]=d[m];u+=n}return s}var cN=mYe;function pYe(e){let t;return ke.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===te.BYTE?U6(e,i,Y.UNSIGNED_BYTE):t!==te.UNSIGNED_BYTE&&t!==te.UNSIGNED_SHORT&&U6(e,i,Y.UNSIGNED_SHORT)}),ke.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===te.BYTE?U6(e,i,Y.UNSIGNED_BYTE):t===te.SHORT&&U6(e,i,Y.UNSIGNED_SHORT)}),e}function U6(e,t,n){let i=Y.createTypedArray(n,cN(e,t)),r=new Uint8Array(i.buffer);t.bufferView=aN(e,r),t.componentType=n,t.byteOffset=0}var lN=pYe;function gYe(e,t){return nT(e,t),t==="CESIUM_RTC"&&_Ye(e),KK(e,t)}function _Ye(e){ke.technique(e,function(t){ke.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function KK(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)KK(e[i],t)}else if(e!==null&&typeof e=="object"&&e.constructor===Object){let n=e.extensions,i;l(n)&&(i=n[t],l(i)&&(delete n[t],Object.keys(n).length===0&&delete e.extensions));for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&KK(e[r],t);return i}}var oT=gYe;var z6={.8:EYe,"1.0":GYe,"2.0":void 0};function yYe(e,t){t=t??{};let n=t.targetVersion,i=e.version;e.asset=e.asset??{version:"1.0"},e.asset.version=e.asset.version??"1.0",i=(i??e.asset.version).toString(),Object.prototype.hasOwnProperty.call(z6,i)||(l(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(z6,i)||(i="1.0"));let r=z6[i];for(;l(r)&&i!==n;)r(e,t),i=e.asset.version,r=z6[i];return t.keepLegacyExtensions||(YYe(e,t),XYe(e)),e}function C0e(e){let t=e.materials;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],r=i.instanceTechnique;l(r)&&(i.technique=r.technique,i.values=r.values,delete i.instanceTechnique)}}function AYe(e){let t=e.meshes;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n].primitives;if(l(r)){let o=r.length;for(let s=0;s<o;++s){let a=r[s],c=a.primitive??te.TRIANGLES;a.mode=a.mode??c,delete a.primitive}}}}function bYe(e){let t=e.nodes,n=new h,i=new Le;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let o=t[r];if(l(o.rotation)){let a=o.rotation;h.fromArray(a,0,n),Le.fromAxisAngle(n,a[3],i),o.rotation=[i.x,i.y,i.z,i.w]}let s=o.instanceSkin;l(s)&&(o.skeletons=s.skeletons,o.skin=s.skin,o.meshes=s.meshes,delete o.instanceSkin)}}function xYe(e){let t=e.animations,n=e.accessors,i=e.bufferViews,r=e.buffers,o={},s=new h,a=new Le;for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let u=t[c],f=u.channels,d=u.parameters,p=u.samplers;if(l(f)){let g=f.length;for(let m=0;m<g;++m){let y=f[m];if(y.target.path==="rotation"){let A=d[p[y.sampler].output];if(l(o[A]))continue;o[A]=!0;let b=n[A],x=i[b.bufferView],E=r[x.buffer].extras._pipeline.source,v=E.byteOffset+x.byteOffset+b.byteOffset,S=b.componentType,I=b.count,R=Rf(b.type),O=b.count*R,L=Y.createArrayBufferView(S,E.buffer,v,O);for(let _=0;_<I;_++){let C=_*R;h.unpack(L,C,s);let w=L[C+3];Le.fromAxisAngle(s,w,a),Le.pack(a,L,C)}}}}}}function TYe(e){let t=e.techniques;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],r=i.passes;if(l(r)){let o=i.pass??"defaultPass";if(Object.prototype.hasOwnProperty.call(r,o)){let s=r[o],a=s.instanceProgram;i.attributes=i.attributes??a.attributes,i.program=i.program??a.program,i.uniforms=i.uniforms??a.uniforms,i.states=i.states??s.states}delete i.passes,delete i.pass}}}function EYe(e){l(e.asset)||(e.asset={});let t=e.asset;if(t.version="1.0",typeof t.profile=="string"){let n=t.profile.split(" ");t.profile={api:n[0],version:n[1]}}else t.profile={};if(l(e.version)&&delete e.version,C0e(e),AYe(e),bYe(e),xYe(e),TYe(e),l(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions),l(e.lights)){let n=e.extensions??{};e.extensions=n;let i=n.KHR_materials_common??{};n.KHR_materials_common=i,i.lights=e.lights,delete e.lights,Bd(e,"KHR_materials_common")}}function CYe(e){let t=e.animations;for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n],r=i.parameters;if(l(r)){let o=i.samplers;for(let s in o)if(Object.prototype.hasOwnProperty.call(o,s)){let a=o[s];a.input=r[a.input],a.output=r[a.output]}delete i.parameters}}}function T0e(e,t){let n=[];for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let r=e[i];t[i]=n.length,n.push(r),l(r.name)||(r.name=i)}return n}function vYe(e){let t,n={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}},i,r={},o=e.nodes;for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i=o[s].jointName,l(i)&&(r[i]=s));for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&l(n[s])){let a={},c=e[s];e[s]=T0e(c,a),n[s]=a}for(i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=n.nodes[r[i]]);l(e.scene)&&(e.scene=n.scenes[e.scene]),ke.bufferView(e,function(s){l(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),ke.accessor(e,function(s){l(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),ke.shader(e,function(s){let a=s.extensions;if(l(a)){let c=a.KHR_binary_glTF;l(c)&&(s.bufferView=n.bufferViews[c.bufferView],delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),ke.program(e,function(s){l(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),l(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),ke.technique(e,function(s){l(s.program)&&(s.program=n.programs[s.program]),ke.techniqueParameter(s,function(a){l(a.node)&&(a.node=n.nodes[a.node]);let c=a.value;typeof c=="string"&&(a.value={index:n.textures[c]})})}),ke.mesh(e,function(s){ke.meshPrimitive(s,function(a){l(a.indices)&&(a.indices=n.accessors[a.indices]),ke.meshPrimitiveAttribute(a,function(c,u){a.attributes[u]=n.accessors[c]}),l(a.material)&&(a.material=n.materials[a.material])})}),ke.node(e,function(s){let a=s.children;if(l(a)){let c=a.length;for(t=0;t<c;++t)a[t]=n.nodes[a[t]]}if(l(s.meshes)){let c=s.meshes,u=c.length;if(u>0)for(s.mesh=n.meshes[c[0]],t=1;t<u;++t){let f={mesh:n.meshes[c[t]]},d=ga(e.nodes,f);l(a)||(a=[],s.children=a),a.push(d)}delete s.meshes}if(l(s.camera)&&(s.camera=n.cameras[s.camera]),l(s.skin)&&(s.skin=n.skins[s.skin]),l(s.skeletons)){let c=s.skeletons;if(c.length>0&&l(s.skin)){let f=e.skins[s.skin];f.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),ke.skin(e,function(s){l(s.inverseBindMatrices)&&(s.inverseBindMatrices=n.accessors[s.inverseBindMatrices]);let a=s.jointNames;if(l(a)){let c=[],u=a.length;for(t=0;t<u;++t)c[t]=r[a[t]];s.joints=c,delete s.jointNames}}),ke.scene(e,function(s){let a=s.nodes;if(l(a)){let c=a.length;for(t=0;t<c;++t)a[t]=n.nodes[a[t]]}}),ke.animation(e,function(s){let a={};s.samplers=T0e(s.samplers,a),ke.animationSampler(s,function(c){c.input=n.accessors[c.input],c.output=n.accessors[c.output]}),ke.animationChannel(s,function(c){c.sampler=a[c.sampler];let u=c.target;l(u)&&(u.node=n.nodes[u.id],delete u.id)})}),ke.material(e,function(s){l(s.technique)&&(s.technique=n.techniques[s.technique]),ke.materialValue(s,function(c,u){typeof c=="string"&&(s.values[u]={index:n.textures[c]})});let a=s.extensions;if(l(a)){let c=a.KHR_materials_common;l(c)&&l(c.values)&&ke.materialValue(c,function(u,f){typeof u=="string"&&(c.values[f]={index:n.textures[u]})})}}),ke.image(e,function(s){let a=s.extensions;if(l(a)){let c=a.KHR_binary_glTF;l(c)&&(s.bufferView=n.bufferViews[c.bufferView],s.mimeType=c.mimeType,delete a.KHR_binary_glTF),Object.keys(a).length===0&&delete s.extensions}}),ke.texture(e,function(s){l(s.sampler)&&(s.sampler=n.samplers[s.sampler]),l(s.source)&&(s.source=n.images[s.source])})}function SYe(e){ke.animation(e,function(t){ke.animationSampler(t,function(n){delete n.name})})}function wYe(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];Array.isArray(n)&&n.length===0&&delete e[t]}ke.node(e,function(t){l(t.children)&&t.children.length===0&&delete t.children})}function IYe(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var PYe={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function DYe(e){let t=e.extensionsUsed;if(e.extensionsRequired=e.extensionsRequired??[],l(t)){let n=t.length;for(let i=0;i<n;++i){let r=t[i];l(PYe[r])&&e.extensionsRequired.push(r)}}}function RYe(e){ke.buffer(e,function(t){delete t.type})}function OYe(e){ke.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function MYe(e){ke.mesh(e,function(t){ke.meshPrimitive(t,function(n){ke.meshPrimitiveAttribute(n,function(i,r){r==="TEXCOORD"?n.attributes.TEXCOORD_0=i:r==="COLOR"&&(n.attributes.COLOR_0=i)}),delete n.attributes.TEXCOORD,delete n.attributes.COLOR})}),ke.technique(e,function(t){ke.techniqueParameter(t,function(n){let i=n.semantic;l(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var NYe={POSITION:!0,NORMAL:!0,TANGENT:!0},LYe={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function FYe(e){let t={};ke.mesh(e,function(n){ke.meshPrimitive(n,function(i){ke.meshPrimitiveAttribute(i,function(r,o){if(o.charAt(0)!=="_"){let s=o.search(/_[0-9]+/g),a=o,c="_0";s>=0&&(a=o.substring(0,s),c=o.substring(s));let u,f=LYe[a];l(f)?(u=f+c,t[o]=u):l(NYe[a])||(u=`_${o}`,t[o]=u)}});for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let o=t[r],s=i.attributes[r];l(s)&&(delete i.attributes[r],i.attributes[o]=s)}})}),ke.technique(e,function(n){ke.techniqueParameter(n,function(i){let r=t[i.semantic];l(r)&&(i.semantic=r)})})}function BYe(e){ke.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let r=n.yfov;l(r)&&r===0&&(n.yfov=1)}})}function JK(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Vu(e,t)}function kYe(e){ke.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),ke.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],r=JK(e,t),o=t.byteOffset+t.count*r;i.byteLength=Math.max(i.byteLength??0,o)}})}function UYe(e){let t,n,i,r=e.bufferViews,o={};ke.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(o[c.bufferView]=!0)});let s={};ke.accessor(e,function(a){l(a.bufferView)&&(s[a.bufferView]=s[a.bufferView]??[],s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=r[a];let c=s[a];c.sort(function(p,g){return p.byteOffset-g.byteOffset});let u=0,f=0,d=c.length;for(t=0;t<d;++t){let p=c[t],g=JK(e,p),m=p.byteOffset,y=p.count*g;delete p.byteStride;let A=t<d-1,b=A?JK(e,c[t+1]):void 0;if(g!==b){let x=Je(i,!0);o[a]&&(x.byteStride=g),x.byteOffset+=u,x.byteLength=m+y-u;let T=ga(r,x);for(n=f;n<=t;++n)p=c[n],p.bufferView=T,p.byteOffset=p.byteOffset-u;u=A?c[t+1].byteOffset:void 0,f=t+1}}}sN(e,["accessor","bufferView","buffer"])}function zYe(e){ke.accessorWithSemantic(e,"POSITION",function(t){let n=e.accessors[t];if(!l(n.min)||!l(n.max)){let i=rT(e,n);n.min=i.min,n.max=i.max}})}function v0e(e){return(!l(e.children)||e.children.length===0)&&(!l(e.meshes)||e.meshes.length===0)&&!l(e.camera)&&!l(e.skin)&&!l(e.skeletons)&&!l(e.jointName)&&(!l(e.translation)||h.fromArray(e.translation).equals(h.ZERO))&&(!l(e.scale)||h.fromArray(e.scale).equals(new h(1,1,1)))&&(!l(e.rotation)||se.fromArray(e.rotation).equals(new se(0,0,0,1)))&&(!l(e.matrix)||N.fromColumnMajorArray(e.matrix).equals(N.IDENTITY))&&!l(e.extensions)&&!l(e.extras)}function S0e(e,t){ke.scene(e,function(n){let i=n.nodes;if(l(i)){let r=i.length;for(let o=r;o>=0;--o)if(i[o]===t){i.splice(o,1);return}}}),ke.node(e,function(n,i){if(l(n.children)){let r=n.children.indexOf(t);r>-1&&(n.children.splice(r,1),v0e(n)&&S0e(e,i))}}),delete e.nodes[t]}function VYe(e){return ke.node(e,function(t,n){v0e(t)&&S0e(e,n)}),e}function jYe(e){ke.animation(e,function(t){ke.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let r=rT(e,i);i.min=r.min,i.max=r.max}})})}function HYe(e){ke.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=rT(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function GYe(e){e.asset=e.asset??{},e.asset.version="2.0",C0e(e),CYe(e),VYe(e),vYe(e),SYe(e),IYe(e),DYe(e),kYe(e),UYe(e),zYe(e),jYe(e),HYe(e),RYe(e),OYe(e),MYe(e),FYe(e),lN(e),BYe(e),iN(e),oN(e),wYe(e)}var WYe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],qYe=["u_diffuse","u_diffuse_mat"];function ZK(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function QK(e){return l(e.index)}function e$(e){return Array.isArray(e)&&e.length===4}function w0e(e){let t=new Array(4);t[3]=e[3];for(let n=0;n<3;n++){let i=e[n];i<=.04045?t[n]=e[n]*.07739938080495357:t[n]=Math.pow((i+.055)*.9478672985781991,2.4)}return t}function YYe(e,t){t=t??{};let n=t.baseColorTextureNames??WYe,i=t.baseColorFactorNames??qYe;ke.material(e,function(r){ke.materialValue(r,function(o,s){n.indexOf(s)!==-1&&QK(o)?(ZK(r),r.pbrMetallicRoughness.baseColorTexture=o):i.indexOf(s)!==-1&&e$(o)&&(ZK(r),r.pbrMetallicRoughness.baseColorFactor=w0e(o))})}),oT(e,"KHR_techniques_webgl"),oT(e,"KHR_blend")}function $K(e,t){l(t)&&(e$(t)?e.pbrMetallicRoughness.baseColorFactor=w0e(t):QK(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function E0e(e,t){l(t)&&(e$(t)?e.emissiveFactor=t.slice(0,3):QK(t)&&(e.emissiveTexture=t))}function XYe(e){ke.material(e,function(t){let n=(t.extensions??{}).KHR_materials_common;if(!l(n))return;let i=n.values??{},r=i.ambient,o=i.diffuse,s=i.emission,a=i.transparency,c=n.doubleSided,u=n.transparent;ZK(t),n.technique==="CONSTANT"?(Bd(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},$K(t,s),$K(t,r)):($K(t,o),E0e(t,r),E0e(t,s)),l(c)&&(t.doubleSided=c),l(a)&&(l(t.pbrMetallicRoughness.baseColorFactor)?t.pbrMetallicRoughness.baseColorFactor[3]*=a:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,a]),l(u)&&(t.alphaMode=u?"BLEND":"OPAQUE")}),oT(e,"KHR_materials_common")}var uN=yYe;function ol(){}ol.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=`
${n.message}`);let r=new oe(i);return l(n)&&(r.stack=`Original stack:
${n.stack}
Handler stack:
${r.stack}`),r};ol.getNodeTransform=function(e){return l(e.matrix)?e.matrix:N.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:h.ZERO,l(e.rotation)?e.rotation:Le.IDENTITY,l(e.scale)?e.scale:h.ONE)};ol.getAttributeBySemantic=function(e,t,n){let i=e.attributes,r=i.length;for(let o=0;o<r;++o){let s=i[o],a=l(n)?s.setIndex===n:!0;if(s.semantic===t&&a)return s}};ol.getAttributeByName=function(e,t){let n=e.attributes,i=n.length;for(let r=0;r<i;++r){let o=n[r];if(o.name===t)return o}};ol.getFeatureIdsByLabel=function(e,t){for(let n=0;n<e.length;n++){let i=e[n];if(i.positionalLabel===t||i.label===t)return i}};ol.hasQuantizedAttributes=function(e){if(!l(e))return!1;for(let t=0;t<e.length;t++){let n=e[t];if(l(n.quantization))return!0}return!1};ol.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,r=!1;l(t)?(i=ct.getVariableName(t,n),r=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let o=/^color_\d+$/.test(i),s=e.type,a=Vt.getGlslType(s);o&&(a="vec4");let c=l(e.quantization),u;return c&&(u=o?"vec4":Vt.getGlslType(e.quantization.type)),{attribute:e,isQuantized:c,variableName:i,hasSemantic:r,glslType:a,quantizedGlslType:u}};var KYe=new h,$Ye=new h;ol.getPositionMinMax=function(e,t,n){let i=ol.getAttributeBySemantic(e,"POSITION"),r=i.max,o=i.min;return l(n)&&l(t)&&(o=h.add(o,t,$Ye),r=h.add(r,n,KYe)),{min:o,max:r}};ol.getAxisCorrectionMatrix=function(e,t,n){return n=N.clone(N.IDENTITY,n),e===Hi.Y?n=N.clone(Hi.Y_UP_TO_Z_UP,n):e===Hi.X&&(n=N.clone(Hi.X_UP_TO_Z_UP,n)),t===Hi.Z&&(n=N.multiplyTransformation(n,Hi.Z_UP_TO_X_UP,n)),n};var JYe=new $;ol.getCullFace=function(e,t){if(!Oe.isTriangles(t))return Vi.BACK;let n=N.getMatrix3(e,JYe);return $.determinant(n)<0?Vi.FRONT:Vi.BACK};ol.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};ol.supportedExtensions={AGI_articulations:!0,CESIUM_mesh_vector:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_implicit_cylinder_region:!0,EXT_implicit_ellipsoid_region:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_mesh_polygon:!0,EXT_mesh_primitive_edge_visibility:!0,EXT_meshopt_compression:!0,EXT_primitive_voxels:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_implicit_shapes:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_mesh_primitive_restart:!0,KHR_meshopt_compression:!0,KHR_techniques_webgl:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,KHR_gaussian_splatting:!0,KHR_gaussian_splatting_compression_spz_2:!0,WEB3D_quantized_attributes:!0};ol.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!ol.supportedExtensions[i])throw new oe(`Unsupported glTF Extension: ${i}`)}};var xt=ol;var t$=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltfResource,r=t.baseResource,o=t.typedArray,s=t.gltfJson,a=t.cacheKey;this._resourceCache=n,this._gltfResource=i,this._baseResource=r,this._typedArray=o,this._gltfJson=s,this._cacheKey=a,this._gltf=void 0,this._bufferLoaders=[],this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get gltf(){return this._gltf}async load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,l(this._gltfJson)?(this._promise=I0e(this,this._gltfJson),this._promise):l(this._typedArray)?(this._promise=P0e(this,this._typedArray),this._promise):(this._promise=ZYe(this),this._promise))}unload(){let t=this._bufferLoaders,n=t.length;for(let i=0;i<n;++i)t[i]=!t[i].isDestroyed()&&this._resourceCache.unload(t[i]);this._bufferLoaders.length=0,this._gltf=void 0}_fetchGltf(){return this._gltfResource.fetchArrayBuffer()}};async function ZYe(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;n$(e,n)}return P0e(e,t)}function n$(e,t){e.unload(),e._state=Tt.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function QYe(e,t){if(l(t.asset)&&t.asset.version==="2.0"&&!Go(t,"KHR_techniques_webgl")&&!Go(t,"KHR_materials_common"))return Promise.resolve();let n=[];ke.buffer(t,function(i){if(!l(i.extras._pipeline.source)&&l(i.uri)){let r=e._baseResource.getDerivedResource({url:i.uri}),s=e._resourceCache.getExternalBufferLoader({resource:r});e._bufferLoaders.push(s),n.push(s.load().then(function(){s.isDestroyed()||(i.extras._pipeline.source=s.typedArray)}))}}),await Promise.all(n),uN(t)}function eXe(e){let t=[];return ke.buffer(e,function(n){let i=n.uri;!l(n.extras._pipeline.source)&&l(i)&&Uh(i)&&(delete n.uri,t.push(De.fetchArrayBuffer(i).then(function(r){n.extras._pipeline.source=new Uint8Array(r)})))}),Promise.all(t)}function tXe(e,t){let n=[];return ke.buffer(t,function(i,r){let o=i.extras._pipeline.source;if(l(o)&&!l(i.uri)){let a=e._resourceCache.getEmbeddedBufferLoader({parentResource:e._gltfResource,bufferId:r,typedArray:o});e._bufferLoaders.push(a),n.push(a.load())}}),Promise.all(n)}async function I0e(e,t){try{iA(t),await eXe(t),await QYe(e,t),eN(t),await tXe(e,t),nN(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new oe(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return l(i)&&xt.checkSupportedExtensions(i),e._gltf=t,e._state=Tt.READY,e}catch(n){if(e.isDestroyed())return;n$(e,n)}}async function P0e(e,t){let n;try{im(t)==="glTF"?n=iT(t):n=Ro(t)}catch(i){if(e.isDestroyed())return;n$(e,i)}return I0e(e,n)}var Xv=t$;var D0e={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};Object.freeze(D0e);var Gp=D0e;var Pr={},i$=class{constructor(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0}},r$=class{constructor(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.typedArray=void 0,this.buffer=void 0,this.byteOffset=0,this.byteStride=void 0}},o$=class{constructor(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}},s$=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.setIndex=void 0,this.label=void 0,this.positionalLabel=void 0}},a$=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.offset=0,this.repeat=void 0,this.label=void 0,this.positionalLabel=void 0}},c$=class{constructor(){this.featureCount=void 0,this.nullFeatureId=void 0,this.propertyTableId=void 0,this.textureReader=void 0,this.label=void 0,this.positionalLabel=void 0}},l$=class{constructor(){this.attributes=[]}},u$=class{constructor(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.polygon=void 0,this.vector=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0,this.modelPrimitiveImagery=void 0,this.edgeVisibility=void 0}},f$=class{constructor(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}},d$=class{constructor(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}},h$=class{constructor(){this.name=void 0,this.index=void 0,this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0,this.morphWeights=[],this.articulationName=void 0,this.meshVector=void 0}},m$=class{constructor(){this.nodes=[]}},nXe={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"},p$=class{constructor(){this.input=[],this.interpolation=void 0,this.output=[]}},g$=class{constructor(){this.node=void 0,this.path=void 0}},_$=class{constructor(){this.sampler=void 0,this.target=void 0}},y$=class{constructor(){this.name=void 0,this.samplers=[],this.channels=[]}},A$=class{constructor(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}},b$=class{constructor(){this.name=void 0,this.stages=[]}},V6=class{constructor(){this.credits=[]}},x$=class{constructor(){this.asset=new V6,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=N.clone(N.IDENTITY),this.extensions={}}},T$=class{constructor(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=$.clone($.IDENTITY),this.scale=1,this.channels=void 0,this.constantLod=void 0}},rA=class rA{constructor(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=se.clone(rA.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=rA.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=rA.DEFAULT_ROUGHNESS_FACTOR}};ut(rA,"DEFAULT_BASE_COLOR_FACTOR",se.ONE),ut(rA,"DEFAULT_METALLIC_FACTOR",1),ut(rA,"DEFAULT_ROUGHNESS_FACTOR",1);var j6=rA,oA=class oA{constructor(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=se.clone(oA.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=h.clone(oA.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=oA.DEFAULT_GLOSSINESS_FACTOR}};ut(oA,"DEFAULT_DIFFUSE_FACTOR",se.ONE),ut(oA,"DEFAULT_SPECULAR_FACTOR",h.ONE),ut(oA,"DEFAULT_GLOSSINESS_FACTOR",1);var E$=oA,Kv=class Kv{constructor(){this.specularFactor=Kv.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=h.clone(Kv.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}};ut(Kv,"DEFAULT_SPECULAR_FACTOR",1),ut(Kv,"DEFAULT_SPECULAR_COLOR_FACTOR",h.ONE);var C$=Kv,$v=class $v{constructor(){this.anisotropyStrength=$v.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=$v.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}};ut($v,"DEFAULT_ANISOTROPY_STRENGTH",0),ut($v,"DEFAULT_ANISOTROPY_ROTATION",0);var v$=$v,Jv=class Jv{constructor(){this.clearcoatFactor=Jv.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=Jv.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}};ut(Jv,"DEFAULT_CLEARCOAT_FACTOR",0),ut(Jv,"DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR",0);var S$=Jv,w$=class{constructor(){ut(this,"width");ut(this,"pattern")}},H6=class H6{constructor(t={}){let{wireframeFill:n=H6.DEFAULT_WIREFRAME_FILL,backgroundFill:i=!1,behind:r=!1}=t;this.wireframeFill=n,this.backgroundFill=i,this.behind=r}};ut(H6,"DEFAULT_WIREFRAME_FILL",0);var I$=H6,G6=class G6{constructor(){this.metallicRoughness=new j6,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=h.clone(G6.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=Gp.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1,this.pointDiameter=void 0,this.planarFill=void 0,this.lineStyle=void 0}};ut(G6,"DEFAULT_EMISSIVE_FACTOR",h.ZERO);var P$=G6,D$=class{constructor(){ut(this,"count",0);ut(this,"triangleIndices");ut(this,"triangleIndicesOffsets");ut(this,"loopIndices");ut(this,"loopIndicesOffsets")}},R$=class{constructor(){ut(this,"vector",!0);ut(this,"count",0);ut(this,"polygonAttributeOffsets");ut(this,"polygonHoleCounts");ut(this,"polygonHoleOffsets");ut(this,"polygonIndicesOffsets")}};Pr.Quantization=i$;Pr.Attribute=r$;Pr.Indices=o$;Pr.FeatureIdAttribute=s$;Pr.FeatureIdTexture=c$;Pr.FeatureIdImplicitRange=a$;Pr.MorphTarget=l$;Pr.Primitive=u$;Pr.Instances=f$;Pr.Skin=d$;Pr.Node=h$;Pr.Scene=m$;Pr.AnimatedPropertyType=Object.freeze(nXe);Pr.AnimationSampler=p$;Pr.AnimationTarget=g$;Pr.AnimationChannel=_$;Pr.Animation=y$;Pr.ArticulationStage=A$;Pr.Articulation=b$;Pr.Asset=V6;Pr.Components=x$;Pr.TextureReader=T$;Pr.MetallicRoughness=j6;Pr.SpecularGlossiness=E$;Pr.Specular=C$;Pr.Anisotropy=v$;Pr.Clearcoat=S$;Pr.PlanarFill=I$;Pr.LineStyle=w$;Pr.Material=P$;Pr.Vector=R$;Pr.Polygon=D$;var Cn=Pr;var W6={};W6.getImageIdFromTexture=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,textureId:n,supportedImageFormats:i}=e,r=t.textures[n],o=r.extensions;if(l(o)){if(i.webp&&l(o.EXT_texture_webp))return o.EXT_texture_webp.source;if(i.basis&&l(o.KHR_texture_basisu))return o.KHR_texture_basisu.source}return r.source};W6.createSampler=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e,r=hn.REPEAT,o=hn.REPEAT,s=Wt.LINEAR,a=Zn.LINEAR,c=n.index,f=t.textures[c].sampler;if(l(f)){let d=t.samplers[f];r=d.wrapS??r,o=d.wrapT??o,s=d.minFilter??s,a=d.magFilter??a}return i&&s!==Wt.LINEAR&&s!==Wt.NEAREST&&(s===Wt.NEAREST_MIPMAP_NEAREST||s===Wt.NEAREST_MIPMAP_LINEAR?s=Wt.NEAREST:s=Wt.LINEAR),hn.validate(r)||(r=hn.REPEAT),hn.validate(o)||(o=hn.REPEAT),Wt.validate(s)||(s=Wt.LINEAR),Zn.validate(a)||(a=Zn.LINEAR),new Ht({wrapS:r,wrapT:o,minificationFilter:s,magnificationFilter:a})};var iXe=new U(1,1);W6.createModelTextureReader=function(e){e=e??H.EMPTY_OBJECT;let{textureInfo:t,channels:n,texture:i}=e,r=t.texCoord??0,o,s=t.extensions?.KHR_texture_transform;if(l(s)){r=s.texCoord??r;let u=l(s.offset)?U.unpack(s.offset):U.ZERO,f=s.rotation??0,d=l(s.scale)?U.unpack(s.scale):iXe;f=-f,o=new $(Math.cos(f)*d.x,-Math.sin(f)*d.y,u.x,Math.sin(f)*d.x,Math.cos(f)*d.y,u.y,0,0,1)}let a=new Cn.TextureReader;a.index=t.index,a.texture=i,a.texCoord=r,a.scale=t.scale,a.transform=o,a.channels=n;let c=t.extensions?.EXT_textureInfo_constant_lod;return l(c)&&(a.constantLod={repetitions:c.repetitions??1,offset:l(c.offset)?U.unpack(c.offset):U.ZERO,minClampDistance:c.minClampDistance??1,maxClampDistance:c.maxClampDistance??4294967296}),a};var ju=W6;function rXe(e){let t=document.createElement("canvas");return t.width=D.nextPowerOfTwo(e.width),t.height=D.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var sA=rXe;var O$=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.textureInfo,o=t.gltfResource,s=t.baseResource,a=t.supportedImageFormats,c=t.cacheKey,u=t.asynchronous??!0,f=r.index,d=ju.getImageIdFromTexture({gltf:i,textureId:f,supportedImageFormats:a});this._resourceCache=n,this._gltf=i,this._textureInfo=r,this._imageId=d,this._gltfResource=o,this._baseResource=s,this._cacheKey=c,this._asynchronous=u,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get texture(){return this._texture}async load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=sXe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.LOADED&&this._state!==Tt.PROCESSING||l(this._texture)||!l(this._image))return!1;this._state=Tt.PROCESSING;let n;if(this._asynchronous){let i=oXe;if(i.set(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context),!t.jobScheduler.execute(i,Oc.TEXTURE))return!1;n=i.texture}else n=R0e(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context);return this.unload(),this._texture=n,this._state=Tt.READY,this._resourceCache.statistics.addTextureLoader(this),!0}unload(){l(this._texture)&&this._texture.destroy(),l(this._imageLoader)&&!this._imageLoader.isDestroyed()&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0}},M$=class{constructor(){this.gltf=void 0,this.textureInfo=void 0,this.textureId=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}set(t,n,i,r,o,s){this.gltf=t,this.textureInfo=n,this.textureId=i,this.image=r,this.mipLevels=o,this.context=s}execute(){this.texture=R0e(this.gltf,this.textureInfo,this.textureId,this.image,this.mipLevels,this.context)}};function R0e(e,t,n,i,r,o){let s=i.internalFormat,a=!1;Ke.isCompressedFormat(s)&&!l(r)&&(a=!0);let c=ju.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:a}),u=c.minificationFilter,f=c.wrapS,d=c.wrapT,p=u===Wt.NEAREST_MIPMAP_NEAREST||u===Wt.NEAREST_MIPMAP_LINEAR||u===Wt.LINEAR_MIPMAP_NEAREST||u===Wt.LINEAR_MIPMAP_LINEAR,g=!l(s)&&p,m=g||f===hn.REPEAT||f===hn.MIRRORED_REPEAT||d===hn.REPEAT||d===hn.MIRRORED_REPEAT,y=!D.isPowerOfTwo(i.width)||!D.isPowerOfTwo(i.height),A=m&&y,b;return l(s)?(!o.webgl2&&Ke.isCompressedFormat(s)&&y&&m&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),b=Dt.create({id:n,context:o,source:{arrayBufferView:i.bufferView,mipLevels:r},width:i.width,height:i.height,pixelFormat:i.internalFormat,sampler:c})):(A&&(i=sA(i)),b=Dt.create({id:n,context:o,source:i,sampler:c,flipY:!1,skipColorSpaceConversion:!0})),g&&b.generateMipmap(),b}var oXe=new M$;async function sXe(e){let t=e._resourceCache;try{let n=t.getImageLoader({gltf:e._gltf,imageId:e._imageId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._imageLoader=n,await n.load(),e.isDestroyed()?void 0:(e._image=n.image,e._mipLevels=n.mipLevels,e._state=Tt.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load texture",n)}}var Zv=O$;var N$=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.gltfResource,o=t.baseResource,s=t.bufferViewId,a=t.primitive,c=t.draco,u=t.attributeSemantic,f=t.accessorId,d=t.cacheKey,p=t.spz,g=t.asynchronous??!0,m=t.loadBuffer??!1,y=t.loadTypedArray??!1;this._resourceCache=n,this._gltfResource=r,this._baseResource=o,this._gltf=i,this._bufferViewId=s,this._primitive=a,this._draco=c,this._spz=p,this._attributeSemantic=u,this._accessorId=f,this._cacheKey=d,this._asynchronous=g,this._loadBuffer=m,this._loadTypedArray=y,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get buffer(){return this._buffer}get typedArray(){return this._typedArray}get quantization(){return this._quantization}async load(){return l(this._promise)?this._promise:l(this._spz)?(this._promise=lXe(this),this._promise):aXe(this._draco,this._attributeSemantic)?(this._promise=hXe(this),this._promise):(this._promise=pXe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.LOADED&&this._state!==Tt.PROCESSING)return!1;if(l(this._dracoLoader)){try{if(!this._dracoLoader.process(t))return!1}catch(r){q6(this,r)}mXe(this)}if(l(this._spzLoader)){try{if(!this._spzLoader.process(t))return!1}catch(r){q6(this,r)}dXe(this)}let n,i=this._typedArray;if(this._loadBuffer&&this._asynchronous){let r=gXe;if(r.set(i,t.context),!t.jobScheduler.execute(r,Oc.BUFFER))return!1;n=r.buffer}else this._loadBuffer&&(n=O0e(i,t.context));return this.unload(),this._buffer=n,this._typedArray=this._loadTypedArray?i:void 0,this._state=Tt.READY,this._resourceCache.statistics.addGeometryLoader(this),!0}unload(){l(this._buffer)&&this._buffer.destroy();let t=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&t.unload(this._bufferViewLoader),l(this._dracoLoader)&&t.unload(this._dracoLoader),l(this._spzLoader)&&t.unload(this._spzLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._spzLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0,this._primitive=void 0}};function aXe(e,t){return l(e)&&l(e.attributes)&&l(e.attributes[t])}function cXe(e,t,n,i){let o=(1<<e.quantizationBits)-1,s=1/o,a=new Cn.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=Vt.VEC2,a.normalizationRange=o;else{let c=Vt.getMathType(i);if(c===Number){let u=e.range;a.quantizedVolumeOffset=e.minValues[0],a.quantizedVolumeDimensions=u,a.normalizationRange=o,a.quantizedVolumeStepSize=u*s}else{a.quantizedVolumeOffset=c.unpack(e.minValues),a.normalizationRange=c.unpack(new Array(n).fill(o));let u=new Array(n).fill(e.range);a.quantizedVolumeDimensions=c.unpack(u);let f=u.map(function(d){return d*s});a.quantizedVolumeStepSize=c.unpack(f)}}return a}async function lXe(e){e._state=Tt.LOADING;let t=e._resourceCache;try{let n=t.getSpzLoader({gltf:e._gltf,primitive:e._primitive,spz:e._spz,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._spzLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=Tt.LOADED,e)}catch{if(e.isDestroyed())return}}function uXe(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function fXe(e){let t=uXe(e),n="_COEF_",i=t.length,r=e.indexOf(n,i),o=parseInt(e.slice(i,r),10),s=parseInt(e.slice(r+n.length),10);return{l:o,n:s}}function dXe(e){e._state=Tt.PROCESSING;let n=e._spzLoader.decodedData.gcloud;if(e._attributeSemantic==="POSITION")e._typedArray=n.positions;else if(e._attributeSemantic==="KHR_gaussian_splatting:SCALE"||e._attributeSemantic==="_SCALE")e._typedArray=n.scales;else if(e._attributeSemantic==="KHR_gaussian_splatting:ROTATION"||e._attributeSemantic==="_ROTATION")e._typedArray=n.rotations;else if(e._attributeSemantic==="COLOR_0"){let i=n.colors,r=n.alphas;e._typedArray=new Uint8Array(i.length/3*4);for(let o=0;o<i.length/3;o++)e._typedArray[o*4]=D.clamp(i[o*3]*255,0,255),e._typedArray[o*4+1]=D.clamp(i[o*3+1]*255,0,255),e._typedArray[o*4+2]=D.clamp(i[o*3+2]*255,0,255),e._typedArray[o*4+3]=D.clamp(r[o]*255,0,255)}else if(e._attributeSemantic.includes("SH_DEGREE_")){let{l:i,n:r}=fXe(e._attributeSemantic),o=n.shDegree,s=0,a=[0,9,24];switch(o){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}let c=n.numPoints,u=n.sh;e._typedArray=new Float32Array(c*3);for(let f=0;f<c;f++){let d=f*s+a[i-1]+r*3;e._typedArray[f*3]=u[d],e._typedArray[f*3+1]=u[d+1],e._typedArray[f*3+2]=u[d+2]}}}async function hXe(e){e._state=Tt.LOADING;let t=e._resourceCache;try{let n=t.getDracoLoader({gltf:e._gltf,primitive:e._primitive,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._dracoLoader=n,await n.load(),e.isDestroyed()?void 0:(e._state=Tt.LOADED,e)}catch{if(e.isDestroyed())return;q6(e)}}function mXe(e){e._state=Tt.PROCESSING;let n=e._dracoLoader.decodedData.vertexAttributes,i=e._attributeSemantic,r=n[i],o=e._accessorId,a=e._gltf.accessors[o].type,c=r.array,u=r.data.quantization;l(u)&&(e._quantization=cXe(u,r.data.componentDatatype,r.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}async function pXe(e){e._state=Tt.LOADING;let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._typedArray=n.typedArray,e._state=Tt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;q6(e,n)}}function q6(e,t){throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load vertex buffer",t)}var L$=class{constructor(){this.typedArray=void 0,this.context=void 0,this.buffer=void 0}set(t,n){this.typedArray=t,this.context=n}execute(){this.buffer=O0e(this.typedArray,this.context)}};function O0e(e,t){let n=nt.createVertexBuffer({typedArray:e,context:t,usage:Me.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var gXe=new L$,Qv=N$;var M0e={};async function _Xe(e={}){var t,n,i,r,o=e,s=!!globalThis.window,a=!!globalThis.WorkerGlobalScope,c=((n=(t=globalThis.process)==null?void 0:t.versions)==null?void 0:n.node)&&((i=globalThis.process)==null?void 0:i.type)!="renderer";if(c){let{createRequire:ce}=await Promise.resolve().then(()=>TXe);var u=ce(M0e.url)}var f="./this.program",d=M0e.url;if(c)u("node:fs"),d.startsWith("file:")&&u("node:path").dirname(u("node:url").fileURLToPath(d)),1<process.argv.length&&(f=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);else if(s||a)try{new URL(".",d)}catch{}var p=console.log.bind(console),g=console.error.bind(console),m=!1;function y(ce){for(var ne=0,Te=ce.length,Ce=new Uint8Array(Te),Ze;ne<Te;++ne)Ze=ce.charCodeAt(ne),Ce[ne]=~Ze>>8&Ze;return Ce}var A,b,x,T,E,v,S,I,R,O,L,_,C=!1;function w(){var ce=Zb.buffer;x=new Int8Array(ce),E=new Int16Array(ce),o.HEAPU8=T=new Uint8Array(ce),v=new Uint16Array(ce),S=new Int32Array(ce),I=new Uint32Array(ce),o.HEAPF32=R=new Float32Array(ce),O=new Float64Array(ce),L=new BigInt64Array(ce),_=new BigUint64Array(ce)}function P(ce){var ne;throw(ne=o.onAbort)==null||ne.call(o,ce),ce="Aborted("+ce+")",g(ce),m=!0,ce=new WebAssembly.RuntimeError(ce+". Build with -sASSERTIONS for more info."),b?.(ce),ce}var M;async function F(ce){return ce}async function V(ce){var ne=M;try{var Te=await F(ne);return await WebAssembly.instantiate(Te,ce)}catch(Ce){g(`failed to asynchronously prepare wasm: ${Ce}`),P(Ce)}}async function B(ce){return V(ce)}var j=ce=>{for(;0<ce.length;)ce.shift()(o)},k=[],G=[],q=()=>{var ce=o.preRun.shift();G.push(ce)},Q={},W=ce=>{for(;ce.length;){var ne=ce.pop();ce.pop()(ne)}};function J(ce){return this.O(I[ce>>2])}var Z={},ae={},Ae={},fe=class extends Error{constructor(ce){super(ce),this.name="InternalError"}},xe=(ce,ne,Te)=>{function Ce(wt){if(wt=Te(wt),wt.length!==ce.length)throw new fe("Mismatched type converter count");for(var bn=0;bn<ce.length;++bn)Qe(ce[bn],wt[bn])}ce.forEach(wt=>Ae[wt]=ne);var Ze=Array(ne.length),Et=[],pt=0;for(let[wt,bn]of ne.entries())ae.hasOwnProperty(bn)?Ze[wt]=ae[bn]:(Et.push(bn),Z.hasOwnProperty(bn)||(Z[bn]=[]),Z[bn].push(()=>{Ze[wt]=ae[bn],++pt,pt===Et.length&&Ce(Ze)}));Et.length===0&&Ce(Ze)},ge=ce=>{for(var ne="";;){var Te=T[ce++];if(!Te)return ne;ne+=String.fromCharCode(Te)}},we=class extends Error{constructor(ce){super(ce),this.name="BindingError"}},Se=ce=>{throw new we(ce)};function Re(ce,ne,Te={}){var Ce=ne.name;if(!ce)throw new we(`type "${Ce}" must have a positive integer typeid pointer`);if(ae.hasOwnProperty(ce)){if(Te.Aa)return;throw new we(`Cannot register type '${Ce}' twice`)}ae[ce]=ne,delete Ae[ce],Z.hasOwnProperty(ce)&&(ne=Z[ce],delete Z[ce],ne.forEach(Ze=>Ze()))}function Qe(ce,ne,Te={}){return Re(ce,ne,Te)}var He=(ce,ne,Te)=>{switch(ne){case 1:return Te?Ce=>x[Ce]:Ce=>T[Ce];case 2:return Te?Ce=>E[Ce>>1]:Ce=>v[Ce>>1];case 4:return Te?Ce=>S[Ce>>2]:Ce=>I[Ce>>2];case 8:return Te?Ce=>L[Ce>>3]:Ce=>_[Ce>>3];default:throw new TypeError(`invalid integer width (${ne}): ${ce}`)}},Xe=ce=>{throw new we(ce.M.R.N.name+" instance already deleted")},$e=!1,Pe=()=>{},qe=ce=>globalThis.FinalizationRegistry?($e=new FinalizationRegistry(ne=>{ne=ne.M,--ne.count.value,ne.count.value===0&&(ne.V?ne.Y.Z(ne.V):ne.R.N.Z(ne.P))}),qe=ne=>{var Te=ne.M;return Te.V&&$e.register(ne,{M:Te},ne),ne},Pe=ne=>{$e.unregister(ne)},qe(ce)):(qe=ne=>ne,ce);function st(){}var vt=(ce,ne)=>Object.defineProperty(ne,"name",{value:ce}),Gt={},lt=(ce,ne,Te)=>{if(ce[ne].U===void 0){var Ce=ce[ne];ce[ne]=function(...Ze){if(!ce[ne].U.hasOwnProperty(Ze.length))throw new we(`Function '${Te}' called with an invalid number of arguments (${Ze.length}) - expects one of (${ce[ne].U})!`);return ce[ne].U[Ze.length].apply(this,Ze)},ce[ne].U=[],ce[ne].U[Ce.$]=Ce}},mt=(ce,ne,Te)=>{if(o.hasOwnProperty(ce)){if(Te===void 0||o[ce].U!==void 0&&o[ce].U[Te]!==void 0)throw new we(`Cannot register public name '${ce}' twice`);if(lt(o,ce,ce),o[ce].U.hasOwnProperty(Te))throw new we(`Cannot register multiple overloads of a function with the same number of arguments (${Te})!`);o[ce].U[Te]=ne}else o[ce]=ne,o[ce].$=Te},ft=ce=>{ce=ce.replace(/[^a-zA-Z0-9_]/g,"$");var ne=ce.charCodeAt(0);return 48<=ne&&57>=ne?`_${ce}`:ce};function Xt(ce,ne,Te,Ce,Ze,Et,pt,wt){this.name=ce,this.constructor=ne,this.ba=Te,this.Z=Ce,this.W=Ze,this.va=Et,this.fa=pt,this.ta=wt,this.Ca=[]}var rt=(ce,ne,Te)=>{for(;ne!==Te;){if(!ne.fa)throw new we(`Expected null or instance of ${Te.name}, got an instance of ${ne.name}`);ce=ne.fa(ce),ne=ne.W}return ce},ht=ce=>{if(ce===null)return"null";var ne=typeof ce;return ne==="object"||ne==="array"||ne==="function"?ce.toString():""+ce};function Bi(ce,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);return 0}if(!ne.M)throw new we(`Cannot pass "${ht(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);return rt(ne.M.P,ne.M.R.N,this.N)}function Xn(ce,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);if(this.ha){var Te=this.ka();return ce!==null&&ce.push(this.Z,Te),Te}return 0}if(!ne||!ne.M)throw new we(`Cannot pass "${ht(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ga&&ne.M.R.ga)throw new we(`Cannot convert argument of type ${ne.M.Y?ne.M.Y.name:ne.M.R.name} to parameter type ${this.name}`);if(Te=rt(ne.M.P,ne.M.R.N,this.N),this.ha){if(ne.M.V===void 0)throw new we("Passing raw pointer to smart pointer is illegal");switch(this.Ha){case 0:if(ne.M.Y===this)Te=ne.M.V;else throw new we(`Cannot convert argument of type ${ne.M.Y?ne.M.Y.name:ne.M.R.name} to parameter type ${this.name}`);break;case 1:Te=ne.M.V;break;case 2:if(ne.M.Y===this)Te=ne.M.V;else{var Ce=ne.clone();Te=this.Da(Te,qi(()=>Ce.delete())),ce!==null&&ce.push(this.Z,Te)}break;default:throw new we("Unsupported sharing policy")}}return Te}function bi(ce,ne){if(ne===null){if(this.ia)throw new we(`null is not a valid ${this.name}`);return 0}if(!ne.M)throw new we(`Cannot pass "${ht(ne)}" as a ${this.name}`);if(!ne.M.P)throw new we(`Cannot pass deleted object as a pointer of type ${this.name}`);if(ne.M.R.ga)throw new we(`Cannot convert argument of type ${ne.M.R.name} to parameter type ${this.name}`);return rt(ne.M.P,ne.M.R.N,this.N)}var Wi=(ce,ne,Te)=>ne===Te?ce:Te.W===void 0?null:(ce=Wi(ce,ne,Te.W),ce===null?null:Te.ta(ce)),wi={},hi=(ce,ne)=>{if(ne===void 0)throw new we("ptr should not be undefined");for(;ce.W;)ne=ce.fa(ne),ce=ce.W;return wi[ne]},xi=(ce,ne)=>{if(!ne.R||!ne.P)throw new fe("makeClassHandle requires ptr and ptrType");if(!!ne.Y!=!!ne.V)throw new fe("Both smartPtrType and smartPtr must be specified");return ne.count={value:1},qe(Object.create(ce,{M:{value:ne,writable:!0}}))};function jn(ce,ne,Te,Ce,Ze,Et,pt,wt,bn,qn,_n){this.name=ce,this.N=ne,this.ia=Te,this.ga=Ce,this.ha=Ze,this.Ba=Et,this.Ha=pt,this.pa=wt,this.ka=bn,this.Da=qn,this.Z=_n,Ze||ne.W!==void 0?this.S=Xn:(this.S=Ce?Bi:bi,this.T=null)}var nn=(ce,ne,Te)=>{if(!o.hasOwnProperty(ce))throw new fe("Replacing nonexistent public symbol");o[ce].U!==void 0&&Te!==void 0?o[ce].U[Te]=ne:(o[ce]=ne,o[ce].$=Te)},Wn=(ce,ne)=>{ce=ge(ce);var Te=nD.get(ne);if(typeof Te!="function")throw new we(`unknown function pointer with signature ${ce}: ${ne}`);return Te};class Zi extends Error{}var Mr=ce=>{ce=Jb(ce);var ne=ge(ce);return vp(ce),ne},fo=(ce,ne)=>{function Te(Et){Ze[Et]||ae[Et]||(Ae[Et]?Ae[Et].forEach(Te):(Ce.push(Et),Ze[Et]=!0))}var Ce=[],Ze={};throw ne.forEach(Te),new Zi(`${ce}: `+Ce.map(Mr).join([", "]))},Bs=(ce,ne)=>{for(var Te=[],Ce=0;Ce<ce;Ce++)Te.push(I[ne+4*Ce>>2]);return Te};function Ks(ce){for(var ne=1;ne<ce.length;++ne)if(ce[ne]!==null&&ce[ne].T===void 0)return!0;return!1}function no(ce,ne,Te,Ce,Ze,Et){var pt=ne.length;if(2>pt)throw new we("argTypes array size mismatch! Must at least get return value and 'this' types!");var wt=ne[1]!==null&&Te!==null,bn=Ks(ne);Te=!ne[0].oa;var qn=ne[0],_n=ne[1];for(Ce=[ce,Se,Ce,Ze,W,qn.O.bind(qn),_n?.S.bind(_n)],Ze=2;Ze<pt;++Ze)qn=ne[Ze],Ce.push(qn.S.bind(qn));if(!bn)for(Ze=wt?1:2;Ze<ne.length;++Ze)ne[Ze].T!==null&&Ce.push(ne[Ze].T);for(bn=Ks(ne),Ze=ne.length-2,_n=[],qn=["fn"],wt&&qn.push("thisWired"),pt=0;pt<Ze;++pt)_n.push(`arg${pt}`),qn.push(`arg${pt}Wired`);_n=_n.join(","),qn=qn.join(","),_n=`return function (${_n}) {
`,bn&&(_n+=`var destructors = [];
`);var vo=bn?"destructors":"null",mo="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(wt&&(_n+=`var thisWired = toClassParamWire(${vo}, this);
`),pt=0;pt<Ze;++pt){var $s=`toArg${pt}Wire`;_n+=`var arg${pt}Wired = ${$s}(${vo}, arg${pt});
`,mo.push($s)}if(_n+=(Te||Et?"var rv = ":"")+`invoker(${qn});
`,bn)_n+=`runDestructors(destructors);
`;else for(pt=wt?1:2;pt<ne.length;++pt)Et=pt===1?"thisWired":"arg"+(pt-2)+"Wired",ne[pt].T!==null&&(_n+=`${Et}_dtor(${Et});
`,mo.push(`${Et}_dtor`));return Te&&(_n+=`var ret = fromRetWire(rv);
return ret;
`),ne=new Function(mo,_n+`}
`)(...Ce),vt(ce,ne)}var gi=ce=>{ce=ce.trim();let ne=ce.indexOf("(");return ne===-1?ce:ce.slice(0,ne)},ho=[],ur=[0,1,,1,null,1,!0,1,!1,1],Zo=ce=>{9<ce&&--ur[ce+1]===0&&(ur[ce]=void 0,ho.push(ce))},Bn=ce=>{if(!ce)throw new we(`Cannot use deleted val. handle = ${ce}`);return ur[ce]},qi=ce=>{switch(ce){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let ne=ho.pop()||ur.length;return ur[ne]=ce,ur[ne+1]=1,ne}},ki={name:"emscripten::val",O:ce=>{var ne=Bn(ce);return Zo(ce),ne},S:(ce,ne)=>qi(ne),X:J,T:null},Nr=(ce,ne,Te)=>{switch(ne){case 1:return Te?function(Ce){return this.O(x[Ce])}:function(Ce){return this.O(T[Ce])};case 2:return Te?function(Ce){return this.O(E[Ce>>1])}:function(Ce){return this.O(v[Ce>>1])};case 4:return Te?function(Ce){return this.O(S[Ce>>2])}:function(Ce){return this.O(I[Ce>>2])};default:throw new TypeError(`invalid integer width (${ne}): ${ce}`)}},Wc=(ce,ne)=>{var Te=ae[ce];if(Te===void 0)throw ce=`${ne} has unknown type ${Mr(ce)}`,new we(ce);return Te},bd=(ce,ne)=>{switch(ne){case 4:return function(Te){return this.O(R[Te>>2])};case 8:return function(Te){return this.O(O[Te>>3])};default:throw new TypeError(`invalid float width (${ne}): ${ce}`)}},xp=(ce,ne,Te)=>{let Ce=(Ze,Et)=>{let pt=0;return{next(){if(pt>=Ze)return{done:!0};let wt=pt;return pt++,{value:Et(wt),done:!1}},[Symbol.iterator](){return this}}};ce[Symbol.iterator]||(ce[Symbol.iterator]=function(){let Ze=this[ne]();return Ce(Ze,Et=>this[Te](Et))})},Nh=Object.assign({optional:!0},ki),da=(ce,ne,Te)=>{var Ce=T;if(!(0<Te))return 0;var Ze=ne;Te=ne+Te-1;for(var Et=0;Et<ce.length;++Et){var pt=ce.codePointAt(Et);if(127>=pt){if(ne>=Te)break;Ce[ne++]=pt}else if(2047>=pt){if(ne+1>=Te)break;Ce[ne++]=192|pt>>6,Ce[ne++]=128|pt&63}else if(65535>=pt){if(ne+2>=Te)break;Ce[ne++]=224|pt>>12,Ce[ne++]=128|pt>>6&63,Ce[ne++]=128|pt&63}else{if(ne+3>=Te)break;Ce[ne++]=240|pt>>18,Ce[ne++]=128|pt>>12&63,Ce[ne++]=128|pt>>6&63,Ce[ne++]=128|pt&63,Et++}}return Ce[ne]=0,ne-Ze},Tp=ce=>{for(var ne=0,Te=0;Te<ce.length;++Te){var Ce=ce.charCodeAt(Te);127>=Ce?ne++:2047>=Ce?ne+=2:55296<=Ce&&57343>=Ce?(ne+=4,++Te):ne+=3}return ne},ks=new TextDecoder,tc=(ce,ne,Te,Ce)=>{if(Te=ne+Te,Ce)return Te;for(;ce[ne]&&!(ne>=Te);)++ne;return ne},Kb=new TextDecoder("utf-16le"),ri=(ce,ne,Te)=>(ce>>=1,Kb.decode(v.subarray(ce,tc(v,ce,ne/2,Te)))),Kr=(ce,ne,Te)=>{if(Te??(Te=2147483647),2>Te)return 0;Te-=2;var Ce=ne;Te=Te<2*ce.length?Te/2:ce.length;for(var Ze=0;Ze<Te;++Ze)E[ne>>1]=ce.charCodeAt(Ze),ne+=2;return E[ne>>1]=0,ne-Ce},Ol=ce=>2*ce.length,Z0=(ce,ne,Te)=>{var Ce="";ce>>=2;for(var Ze=0;!(Ze>=ne/4);Ze++){var Et=I[ce+Ze];if(!Et&&!Te)break;Ce+=String.fromCodePoint(Et)}return Ce},Ma=(ce,ne,Te)=>{if(Te??(Te=2147483647),4>Te)return 0;var Ce=ne;Te=Ce+Te-4;for(var Ze=0;Ze<ce.length;++Ze){var Et=ce.codePointAt(Ze);if(65535<Et&&Ze++,S[ne>>2]=Et,ne+=4,ne+4>Te)break}return S[ne>>2]=0,ne-Ce},Ep=ce=>{for(var ne=0,Te=0;Te<ce.length;++Te)65535<ce.codePointAt(Te)&&Te++,ne+=4;return ne},Cy=[],Sq=ce=>{var ne=Cy.length;return Cy.push(ce),ne},wq=(ce,ne)=>{for(var Te=Array(ce),Ce=0;Ce<ce;++Ce)Te[Ce]=Wc(I[ne+4*Ce>>2],`parameter ${Ce}`);return Te},Iq=(ce,ne,Te)=>{var Ce=[];return ce=ce(Ce,Te),Ce.length&&(I[ne>>2]=qi(Ce)),ce},Pq={},Cp=ce=>{var ne=Pq[ce];return ne===void 0?ge(ce):ne},QC={},$b=()=>{var ce;if(!Lh){var ne={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(((ce=globalThis.navigator)==null?void 0:ce.language)??"C").replace("-","_")+".UTF-8",_:f||"./this.program"},Te;for(Te in QC)QC[Te]===void 0?delete ne[Te]:ne[Te]=QC[Te];var Ce=[];for(Te in ne)Ce.push(`${Te}=${ne[Te]}`);Lh=Ce}return Lh},Lh,Dq=[null,[],[]];if((()=>{let ce=st.prototype;Object.assign(ce,{isAliasOf:function(Te){if(!(this instanceof st&&Te instanceof st))return!1;var Ce=this.M.R.N,Ze=this.M.P;Te.M=Te.M;var Et=Te.M.R.N;for(Te=Te.M.P;Ce.W;)Ze=Ce.fa(Ze),Ce=Ce.W;for(;Et.W;)Te=Et.fa(Te),Et=Et.W;return Ce===Et&&Ze===Te},clone:function(){if(this.M.P||Xe(this),this.M.ea)return this.M.count.value+=1,this;var Te=qe,Ce=Object,Ze=Ce.create,Et=Object.getPrototypeOf(this),pt=this.M;return Te=Te(Ze.call(Ce,Et,{M:{value:{count:pt.count,da:pt.da,ea:pt.ea,P:pt.P,R:pt.R,V:pt.V,Y:pt.Y}}})),Te.M.count.value+=1,Te.M.da=!1,Te},delete(){if(this.M.P||Xe(this),this.M.da&&!this.M.ea)throw new we("Object already scheduled for deletion");Pe(this);var Te=this.M;--Te.count.value,Te.count.value===0&&(Te.V?Te.Y.Z(Te.V):Te.R.N.Z(Te.P)),this.M.ea||(this.M.V=void 0,this.M.P=void 0)},isDeleted:function(){return!this.M.P},deleteLater:function(){if(this.M.P||Xe(this),this.M.da&&!this.M.ea)throw new we("Object already scheduled for deletion");return this.M.da=!0,this}});let ne=Symbol.dispose;ne&&(ce[ne]=ce.delete)})(),Object.assign(jn.prototype,{wa(ce){return this.pa&&(ce=this.pa(ce)),ce},ma(ce){var ne;(ne=this.Z)==null||ne.call(this,ce)},X:J,O:function(ce){function ne(){return this.ha?xi(this.N.ba,{R:this.Ba,P:Te,Y:this,V:ce}):xi(this.N.ba,{R:this,P:ce})}var Te=this.wa(ce);if(!Te)return this.ma(ce),null;var Ce=hi(this.N,Te);if(Ce!==void 0)return Ce.M.count.value===0?(Ce.M.P=Te,Ce.M.V=ce,Ce.clone()):(Ce=Ce.clone(),this.ma(ce),Ce);if(Ce=this.N.va(Te),Ce=Gt[Ce],!Ce)return ne.call(this);Ce=this.ga?Ce.sa:Ce.pointerType;var Ze=Wi(Te,this.N,Ce.N);return Ze===null?ne.call(this):this.ha?xi(Ce.N.ba,{R:Ce,P:Ze,Y:this,V:ce}):xi(Ce.N.ba,{R:Ce,P:Ze})}}),o.print&&(p=o.print),o.printErr&&(g=o.printErr),o.thisProgram&&(f=o.thisProgram),o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);0<o.preInit.length;)o.preInit.shift()();var Jb,ev,vp,Zb,nD,tv={y:()=>P(""),r:ce=>{var ne=Q[ce];delete Q[ce];var Te=ne.ka,Ce=ne.Z,Ze=ne.na,Et=Ze.map(pt=>pt.za).concat(Ze.map(pt=>pt.Fa));xe([ce],Et,pt=>{var wt={},bn,qn;for([bn,qn]of Ze.entries()){let _n=pt[bn],vo=qn.xa,mo=qn.ya,$s=pt[bn+Ze.length],Sc=qn.Ea,Ml=qn.Ga;wt[qn.ua]={read:vu=>_n.O(vo(mo,vu)),write:(vu,Q0)=>{var Ct=[];Sc(Ml,vu,$s.S(Ct,Q0)),W(Ct)},optional:_n.optional}}return[{name:ne.name,O:_n=>{var vo={},mo;for(mo in wt)vo[mo]=wt[mo].read(_n);return Ce(_n),vo},S:(_n,vo)=>{for(var mo in wt)if(!(mo in vo||wt[mo].optional))throw new TypeError(`Missing field: "${mo}"`);var $s=Te();for(mo in wt)wt[mo].write($s,vo[mo]);return _n!==null&&_n.push(Ce,$s),$s},X:J,T:Ce}]})},o:(ce,ne,Te,Ce,Ze)=>{ne=ge(ne),Ce=Ce===0n;let Et=pt=>pt;if(Ce){let pt=8*Te;Et=wt=>BigInt.asUintN(pt,wt),Ze=Et(Ze)}Qe(ce,{name:ne,O:Et,S:(pt,wt)=>(typeof wt=="number"&&(wt=BigInt(wt)),wt),X:He(ne,Te,!Ce),T:null})},C:(ce,ne,Te,Ce)=>{ne=ge(ne),Qe(ce,{name:ne,O:function(Ze){return!!Ze},S:function(Ze,Et){return Et?Te:Ce},X:function(Ze){return this.O(T[Ze])},T:null})},k:(ce,ne,Te,Ce,Ze,Et,pt,wt,bn,qn,_n,vo,mo)=>{_n=ge(_n),Et=Wn(Ze,Et),wt&&(wt=Wn(pt,wt)),qn&&(qn=Wn(bn,qn)),mo=Wn(vo,mo);var $s=ft(_n);mt($s,function(){fo(`Cannot construct ${_n} due to unbound types`,[Ce])}),xe([ce,ne,Te],Ce?[Ce]:[],Sc=>{if(Sc=Sc[0],Ce)var Ml=Sc.N,vu=Ml.ba;else vu=st.prototype;Sc=vt(_n,function(...Fe){if(Object.getPrototypeOf(this)!==Q0)throw new we(`Use 'new' to construct ${_n}`);if(Ct.aa===void 0)throw new we(`${_n} has no accessible constructor`);var gt=Ct.aa[Fe.length];if(gt===void 0)throw new we(`Tried to invoke ctor of ${_n} with invalid number of parameters (${Fe.length}) - expected (${Object.keys(Ct.aa).toString()}) parameters instead!`);return gt.apply(this,Fe)});var Q0=Object.create(vu,{constructor:{value:Sc}});Sc.prototype=Q0;var Ct=new Xt(_n,Sc,Q0,mo,Ml,Et,wt,qn);if(Ct.W){var ye;(ye=Ct.W).la??(ye.la=[]),Ct.W.la.push(Ct)}return Ml=new jn(_n,Ct,!0,!1,!1),ye=new jn(_n+"*",Ct,!1,!1,!1),vu=new jn(_n+" const*",Ct,!1,!0,!1),Gt[ce]={pointerType:ye,sa:vu},nn($s,Sc),[Ml,ye,vu]})},g:(ce,ne,Te,Ce,Ze,Et)=>{var pt=Bs(ne,Te);Ze=Wn(Ce,Ze),xe([],[ce],wt=>{wt=wt[0];var bn=`constructor ${wt.name}`;if(wt.N.aa===void 0&&(wt.N.aa=[]),wt.N.aa[ne-1]!==void 0)throw new we(`Cannot register multiple constructors with identical number of parameters (${ne-1}) for class '${wt.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return wt.N.aa[ne-1]=()=>{fo(`Cannot construct ${wt.name} due to unbound types`,pt)},xe([],pt,qn=>(qn.splice(1,0,null),wt.N.aa[ne-1]=no(bn,qn,null,Ze,Et),[])),[]})},b:(ce,ne,Te,Ce,Ze,Et,pt,wt,bn)=>{var qn=Bs(Te,Ce);ne=ge(ne),ne=gi(ne),Et=Wn(Ze,Et),xe([],[ce],_n=>{function vo(){fo(`Cannot call ${mo} due to unbound types`,qn)}_n=_n[0];var mo=`${_n.name}.${ne}`;ne.startsWith("@@")&&(ne=Symbol[ne.substring(2)]),wt&&_n.N.Ca.push(ne);var $s=_n.N.ba,Sc=$s[ne];return Sc===void 0||Sc.U===void 0&&Sc.className!==_n.name&&Sc.$===Te-2?(vo.$=Te-2,vo.className=_n.name,$s[ne]=vo):(lt($s,ne,mo),$s[ne].U[Te-2]=vo),xe([],qn,Ml=>(Ml=no(mo,Ml,_n,Et,pt,bn),$s[ne].U===void 0?(Ml.$=Te-2,$s[ne]=Ml):$s[ne].U[Te-2]=Ml,[])),[]})},A:ce=>Qe(ce,ki),s:(ce,ne,Te,Ce,Ze)=>{switch(ne=ge(ne),Ze=Ze===0?"object":Ze===1?"number":"string",Ze){case"object":let pt=function(){};pt.values={},Qe(ce,{name:ne,constructor:pt,valueType:Ze,O:function(wt){return this.constructor.values[wt]},S:(wt,bn)=>bn.value,X:Nr(ne,Te,Ce),T:null}),mt(ne,pt);break;case"number":var Et={};Qe(ce,{name:ne,ja:Et,valueType:Ze,O:wt=>wt,S:(wt,bn)=>bn,X:Nr(ne,Te,Ce),T:null}),mt(ne,Et),delete o[ne].$;break;case"string":Et={},Qe(ce,{name:ne,ra:{},qa:{},ja:Et,valueType:Ze,O:function(wt){return this.qa[wt]},S:function(wt,bn){return this.ra[bn]},X:Nr(ne,Te,Ce),T:null}),mt(ne,Et),delete o[ne].$}},d:(ce,ne,Te)=>{var Ce=Wc(ce,"enum");switch(ne=ge(ne),Ce.valueType){case"object":ce=Ce.constructor,Ce=Object.create(Ce.constructor.prototype,{value:{value:Te},constructor:{value:vt(`${Ce.name}_${ne}`,function(){})}}),ce.values[Te]=Ce,ce[ne]=Ce;break;case"number":Ce.ja[ne]=Te;break;case"string":Ce.ra[ne]=Te,Ce.qa[Te]=ne,Ce.ja[ne]=ne}},n:(ce,ne,Te)=>{ne=ge(ne),Qe(ce,{name:ne,O:Ce=>Ce,S:(Ce,Ze)=>Ze,X:bd(ne,Te),T:null})},m:(ce,ne,Te,Ce,Ze,Et,pt)=>{var wt=Bs(ne,Te);ce=ge(ce),ce=gi(ce),Ze=Wn(Ce,Ze),mt(ce,function(){fo(`Cannot call ${ce} due to unbound types`,wt)},ne-1),xe([],wt,bn=>(bn=[bn[0],null].concat(bn.slice(1)),nn(ce,no(ce,bn,null,Ze,Et,pt),ne-1),[]))},c:(ce,ne,Te,Ce,Ze)=>{ne=ge(ne);let Et=wt=>wt;if(Ce===0){var pt=32-8*Te;Et=wt=>wt<<pt>>>pt,Ze=Et(Ze)}Qe(ce,{name:ne,O:Et,S:(wt,bn)=>bn,X:He(ne,Te,Ce!==0),T:null})},j:(ce,ne,Te,Ce)=>{Te=ge(Te),Ce=ge(Ce),xe([],[ce,ne],Ze=>(xp(Ze[0].N.ba,Te,Ce),[]))},a:(ce,ne,Te)=>{function Ce(Et){return new Ze(x.buffer,I[Et+4>>2],I[Et>>2])}var Ze=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][ne];Te=ge(Te),Qe(ce,{name:Te,O:Ce,X:Ce},{Aa:!0})},h:ce=>{Qe(ce,Nh)},B:(ce,ne)=>{ne=ge(ne),Qe(ce,{name:ne,O(Te){var Ce=(Ce=Te+4)?ks.decode(T.subarray(Ce,tc(T,Ce,I[Te>>2],!0))):"";return vp(Te),Ce},S(Te,Ce){Ce instanceof ArrayBuffer&&(Ce=new Uint8Array(Ce));var Ze=typeof Ce=="string";if(!(Ze||ArrayBuffer.isView(Ce)&&Ce.BYTES_PER_ELEMENT==1))throw new we("Cannot pass non-string to std::string");var Et=Ze?Tp(Ce):Ce.length,pt=ev(4+Et+1),wt=pt+4;return I[pt>>2]=Et,Ze?da(Ce,wt,Et+1):T.set(Ce,wt),Te!==null&&Te.push(vp,pt),pt},X:J,T(Te){vp(Te)}})},f:(ce,ne,Te)=>{if(Te=ge(Te),ne===2)var Ce=ri,Ze=Kr,Et=Ol;else Ce=Z0,Ze=Ma,Et=Ep;Qe(ce,{name:Te,O:pt=>{var wt=Ce(pt+4,I[pt>>2]*ne,!0);return vp(pt),wt},S:(pt,wt)=>{if(typeof wt!="string")throw new we(`Cannot pass non-string to C++ string type ${Te}`);var bn=Et(wt),qn=ev(4+bn+ne);return I[qn>>2]=bn/ne,Ze(wt,qn+4,bn+ne),pt!==null&&pt.push(vp,qn),qn},X:J,T(pt){vp(pt)}})},i:(ce,ne,Te,Ce,Ze,Et)=>{Q[ce]={name:ge(ne),ka:Wn(Te,Ce),Z:Wn(Ze,Et),na:[]}},e:(ce,ne,Te,Ce,Ze,Et,pt,wt,bn,qn)=>{Q[ce].na.push({ua:ge(ne),za:Te,xa:Wn(Ce,Ze),ya:Et,Fa:pt,Ea:Wn(wt,bn),Ga:qn})},D:(ce,ne)=>{ne=ge(ne),Qe(ce,{oa:!0,name:ne,O:()=>{},S:()=>{}})},q:(ce,ne,Te)=>{var[Ce,...Ze]=wq(ce,ne);ne=Ce.S.bind(Ce);var Et=Ze.map(bn=>bn.X.bind(bn));ce--;var pt={toValue:Bn};switch(ce=Et.map((bn,qn)=>{var _n=`argFromPtr${qn}`;return pt[_n]=bn,`${_n}(args${qn?"+"+8*qn:""})`}),Te){case 0:var wt="toValue(handle)";break;case 2:wt="new (toValue(handle))";break;case 3:wt="";break;case 1:pt.getStringOrSymbol=Cp,wt="toValue(handle)[getStringOrSymbol(methodName)]"}return wt+=`(${ce})`,Ce.oa||(pt.toReturnWire=ne,pt.emval_returnValue=Iq,wt=`return emval_returnValue(toReturnWire, destructorsRef, ${wt})`),wt=`return function (handle, methodName, destructorsRef, args) {
${wt}
}`,Te=new Function(Object.keys(pt),wt)(...Object.values(pt)),wt=`methodCaller<(${Ze.map(bn=>bn.name)}) => ${Ce.name}>`,Sq(vt(wt,Te))},F:Zo,p:(ce,ne,Te,Ce,Ze)=>Cy[ce](ne,Te,Ce,Ze),E:ce=>{var ne=Bn(ce);W(ne),Zo(ce)},t:(ce,ne,Te,Ce)=>{var Ze=new Date().getFullYear(),Et=new Date(Ze,0,1).getTimezoneOffset();Ze=new Date(Ze,6,1).getTimezoneOffset(),I[ce>>2]=60*Math.max(Et,Ze),S[ne>>2]=+(Et!=Ze),ne=pt=>{var wt=Math.abs(pt);return`UTC${0<=pt?"-":"+"}${String(Math.floor(wt/60)).padStart(2,"0")}${String(wt%60).padStart(2,"0")}`},ce=ne(Et),ne=ne(Ze),Ze<Et?(da(ce,Te,17),da(ne,Ce,17)):(da(ce,Ce,17),da(ne,Te,17))},z:ce=>{var ne=T.length;if(ce>>>=0,2147483648<ce)return!1;for(var Te=1;4>=Te;Te*=2){var Ce=ne*(1+.2/Te);Ce=Math.min(Ce,ce+100663296);e:{Ce=(Math.min(2147483648,65536*Math.ceil(Math.max(ce,Ce)/65536))-Zb.buffer.byteLength+65535)/65536|0;try{Zb.grow(Ce),w();var Ze=1;break e}catch{}Ze=void 0}if(Ze)return!0}return!1},u:(ce,ne)=>{var Te=0,Ce=0,Ze;for(Ze of $b()){var Et=ne+Te;I[ce+Ce>>2]=Et,Te+=da(Ze,Et,1/0)+1,Ce+=4}return 0},v:(ce,ne)=>{var Te=$b();I[ce>>2]=Te.length,ce=0;for(var Ce of Te)ce+=Tp(Ce)+1;return I[ne>>2]=ce,0},w:()=>52,x:function(){return 70},l:(ce,ne,Te,Ce)=>{for(var Ze=0,Et=0;Et<Te;Et++){var pt=I[ne>>2],wt=I[ne+4>>2];ne+=8;for(var bn=0;bn<wt;bn++){var qn=ce,_n=T[pt+bn],vo=Dq[qn];_n===0||_n===10?(qn=qn===1?p:g,_n=tc(vo,0),_n=ks.decode(vo.buffer?vo.subarray(0,_n):new Uint8Array(vo.slice(0,_n))),qn(_n),vo.length=0):vo.push(_n)}Ze+=wt}return I[Ce>>2]=Ze,0}},vy;return vy=await(async function(){function ce(Te){return Te=vy=Te.exports,Jb=Te.J,ev=o._malloc=Te.K,vp=o._free=Te.L,Zb=Te.G,nD=Te.I,w(),vy}var ne={a:tv};return o.instantiateWasm?new Promise(Te=>{o.instantiateWasm(ne,(Ce,Ze)=>{Te(ce(Ce))})}):(M??(M=y(`\0asm\0\0\0\xD79\`\x7F\x7F\`\x7F\x7F\0\`\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\`\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\0\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\0\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F~~~~\0\`\0\x7F\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F~\x7F\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F~~\x7F\0\`\x7F~\x7F~\`\x7F\x7F~\x7F\x7F\0\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\f\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F~\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\v\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F~\`\x7F|\x7F\x7F\x7F\x7F\x7F\`\x07\x7F\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F~~\x7F\`\x7F\x7F\x7F\x7F|\x7F\`\r\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F~~\0\`\x7F\x7F\x7F\x7F\x7F|\`\x7F~\x7F\x7F\x7F\`\x7F~\0\`\x7F|\0\`~~~~\x7F\`~\x7F\x7F\`\x7F\x7F\x7F~\x7F\0\`\x7F\x7F\x7F~~\`~~|\`\x7F|\`\x7F\x7F\x7F|\`\x7F\x7F\x7F}\`\x7F\x7F~\0\`~~}\`\x7F\x7F~\`\x7F~~~\0\`~~~\x7F\`|\x7F|\`\x7F\x7F\x7F}\x7F\`\x7F\x7F\x7F}\0\`\x7F\x7F}\0\xC1 aa\0\x07ab\0ac\0
ad\0\x07ae\0af\0\x07ag\0\vah\0ai\0\vaj\0\bak\0"al\0am\0an\0\x07ao\0#ap\0$aq\0ar\0as\0
at\0\bau\0av\0aw\0\0ax\0%ay\0\raz\0\0aA\0aB\0aC\0\baD\0aE\0aF\0\x8D\x8B\0\0\0\0\r\x07\0\b
\0\0\0\0\0\0\0\0\0\0\0&\0\0 \0\0\0'\0\f\f\0\r(\x07\r\x07\0\0\0\0\0)\0 \x07\x07\0\r
\0\0\0*
\r\0\0
\v\b\x07\0\0

\b\0+\0\0,\x07-\0\r\0\x07\b\0\x07\b\x07\x07\x07\0\0 \f\f \f\f\0 \f\0\0\0\x1B\x1B\0\0
\0\0\x07\v
\v\v
\v\v\0\r\b./\x07\0012\b34\0 \0\0\0\0\0\0\b\0\b\0 5\0\b\x07678\x07\x07\v\v\v
\b\b\b\x07\0\0\0\0\0\0\0\0\0\0\0\x07\0\0\0\0\0\0\0\0\0\0 \0 \f\f\x07 \0 \x07\v\v\0\f\f !  !  \0\b\b \b \0\0\b\0\0\0\0\0\0\0\0\0\0\b\0\r\x07p\xFD\xFD\x07\x82\x80\x80\b\x7FA\xC0\xEC\v\x07\x1BG\0H\0\xAAI\0J\0\xD4K\0/L\0! \xAE\0A\v\xFC\x95\xF3\xEF\xD4\xCD\xC9\x81\xFA\xBE\xB7\xAE\xA5\x9D\x9B\x81\xFA\x91\x87\xFC\xF1\xEF\xEE\xEA\xD8\xD7\xE1\xE0\xDF\xDE\xDD,\xD8\xD7\xD5\xDC\xDB\xD3\xDA\xD9\xD5\xD8\xD7\xD3\xD6\xD5\xCC\xD3\xD28\xA9\xA8\xA7\xA6\xC3\xA3\xC2\xA2\xA1\xA088\x9F\x9E\x9D\xC6\x9C\xC6\xB0\x8C\x8D\x8B\x90\x8F\x8E\x81\xC0\x8A\x89\x88\x87\x95\xC1\x94\x92\x93\x91\x9B\xC5\x9A\x99\x98\xC1\x97\x96K\x86\x85\x84\xA0!\xF2\x8D\x8B\x89\x86\x84\x82\x80\xFE\xFB\xF9\xF7\xF5\xF3\xF0\xF5\xBD\xBC\xF0\xAF\xAD\xAC\xAB\xAA\xF1\xA9\xA8\xA7\xF6\xA4\xA3\xA2\xA1\xA08\x9F\x9E\xE6\x9C\x99\x97\x95\x93\x90\xE5\x9A\x98\x96\x94\x92\x8Fq,,\xBB\xBA\xB9\xB8\xB6\xB5\xB4\xB3\xF1\xB2\xB1\xB0,\xEF\xEF{\xA1\xA1\xA6\xA1,\xEC\xEB{88\xEA\x8B,\xEC\xEB{88\xEA\x8B,\xE9\xE8{88\xE7\x8B,\xE9\xE8{88\xE7\x8Bq,\x83\x82\x81q,\x80\xFF\xFE,\xFD\xFC\xFB\xFA\x9E\x9E\xF9\xF8\xF7\xF6\xF5,\xF4\xF2\xF1\xF0\x97\x97\xEE\xED\xEC\xEB\xEA,\xE9\xE8\xE7\xE6\xE5\xE4\xE3\xE2,\xE1\xE0\xDF\xDE\xDD\xDC\xDB\xDAq,\x8F\xD9\xD8\xD7\xD6\xD5\xD3\x8E\x8A\x85\xF8\xF4\x81\xFDq,\x8F\xD2\xD1\xD0\xCF\xCE\xCC\x8C\x88\x83\xF6\xF2\xFF\xFA\xAE\xE4\xCB\xAE\xE4\xCA,\x8E\x8EFFF\x878[[,\x8E\x8EFFF\x878[[,\x8D\x8DFFF\x868[[,\x8D\x8DFFF\x868[[,\xC8\xC7,\xC6\xC5,\xC4\xC3,\xC2\xC1,\xF7\xC0\xC2,\xF7\xBF\xC2\xA4\xA5q,\xA0\xA0\xDB,\xDB,\xED\xE2\xE5\xEC,\xE3\xE6\xEB,\xE4\xE7\xE9,\xE8\f(
\xC9\xCB\b\x8B\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0\v\x82\f\b\x7F@ \0E\r\0 \0A\bk" \0Ak(\0"Axq"\0j!@ Aq\r\0 AqE\r  (\0"k"A\x8C\xD8(\0I\r \0 j!\0@@@A\x90\xD8(\0 G@ (\f! A\xFFM@  (\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v (!\x07  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v ("AqAG\rA\x84\xD8 \x006\0  A~q6  \0Ar6  \x006\0\v  6\f  6\b\f\vA\0!\v \x07E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  \x07(F@ \x07 6\f\v \x07 6\v E\r\v  \x076 ("@  6  6\v ("E\r\0  6  6\v  O\r\0 ("AqE\r\0@@@@ AqE@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \0j"\x006\0  \0Ar6 A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\x07 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \0j"\x006\0  \0Ar6 \0 j \x006\0\v Axq \0j!\0 (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v (!\b  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ ! "Aj! ("\r\0 Aj! ("\r\0\v A\x006\0\f\v  A~q6  \0Ar6 \0 j \x006\0\f\vA\0!\v \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  \b(F@ \b 6\f\v \b 6\v E\r\v  \b6 ("@  6  6\v ("E\r\0  6  6\v  \0Ar6 \0 j \x006\0  \x07G\r\0A\x84\xD8 \x006\0\v \0A\xFFM@ \0A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A \0Avt"\0qE@A\xFC\xD7 \0 r6\0 \f\v (\b\v!\0  6\b \0 6\f  6\f  \x006\b\vA! \0A\xFF\xFF\xFF\x07M@ \0A& \0A\bvg"kvAq AtrA>s!\v  6 B\x007 AtA\xAC\xDAj!\x7F@\x7FA\x80\xD8(\0"A t"qE@A\x80\xD8  r6\0  6\0A!A\b\f\v \0A AvkA\0 AG\x1Bt! (\0!@ "(Axq \0F\r Av! At!  Aqj"("\r\0\v  6A! !A\b\v!\0 "\f\v (\b" 6\f  6\bA!\0A\b!A\0\v!  j 6\0  6\f \0 j 6\0A\x9C\xD8A\x9C\xD8(\0Ak"\0A\x7F \0\x1B6\0\v\v\xA0\x7F \0( \0,\0\v" A\0H\x1B" I@  k"@\x7F  \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
\0,\0\v"A\0H"\x1B" \0(  \x1B"kM@ Av\f\v \0   j k  \xA4 \0-\0\v\v! \0(\0 \0 \xC0A\0H\x1B" j! !@ @ A\0:\0\0 Ak! Aj!\f\v\v  j!@ \0,\0\vA\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  jA\0:\0\0\v\v@ \0,\0\vA\0H@ \0 6 \0(\0!\0\f\v \0 A\xFF\0q:\0\v\v \0 jA\0:\0\0\v0\x7F@ \0A\xEC\xDEF\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v\v%\0 \0 ("\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\x8B\x7F~@ \0)p"PE  \0)x \0(" \0(,"k\xAC|"WqE@#\0Ak"$\0A\x7F!@ \0\xC8\r\0 \0 AjA \0( \0AG\r\0 -\0!\v Aj$\0 "A\0N\r \0(! \0(,!\v \0B\x7F7p \0 6h \0   k\xAC|7xA\x7F\v B|! \0(! \0(\b!@ \0)p"P\r\0  }"  k\xACY\r\0  \xA7j!\v \0 6h \0  \0(,"\0 k\xAC|7x \0 O@ Ak :\0\0\v \v\xB1\x7F@ \xA5" \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA \0,\0\v"A\0H"\x1B"M@ \0(\0 \0 \x1B!@ \x7F At"@   \xFC
\0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  AtjA\x006\0\f\v \0   k \0(  \x1B"\0A\0 \0  \xDE\v\v\r\0 \0  y\xE0\v\0 \0\xBC \xBCsAs\v\0 \0\xBD \xBDsAs\v\xE5\x7FA\xE8\xDE-\0\0@A\xE4\xDE(\0\v#\0A k"$\0@@@ A\bj" \0At"j\x7FA \0tA\xFF\xFF\xFF\xFF\x07q"ArE@ (\0\f\v \0A\xAFA\xD7 \x1B\xBB\v"6\0 A\x7FF\r \0Aj"\0AG\r\0\vA\0\xBAE@A\xF8\xFC\0! A\xF8\xFC\0AhE\rA\x90\xFD\0! A\x90\xFD\0AhE\rA\0!\0A\xA8\xDC-\0\0E@@ \0At \0A\xD7\xBB6\xF8\xDB \0Aj"\0AG\r\0\vA\xA8\xDCA:\0\0A\x90\xDCA\xF8\xDB(\x006\0\vA\xF8\xDB! A\bj"\0A\xF8\xDBAhE\rA\x90\xDC! \0A\x90\xDCAhE\rA/"E\r\v  )7  )7\b  )\b7\0\f\vA\0!\v A j$\0A\xE8\xDEA:\0\0A\xE4\xDE 6\0 \v\xCB
\x7F ~#\0A\xE0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
 \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83"\fB \x88! B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq" A\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"\rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v !\f\v  \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\vB\0!\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \r\x84B\0!P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\v\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\v\f\v  \r\x84P@B\0!\f\v  \x84P@B\0!\f\v \rB\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xD0\0j  \f  \f \fP"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )X"\fB \x88! )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A@k 

P"\b\x1ByB\xC0\0B\0 \b\x1B|\xA7"\bAk6  \bkAj! )H!
)@!\v \x07 j jA\xFF\xFF\0k!@
B\x86"B \x88B\x80\x80\x80\x80\b\x84" B \x88"~" B\x86"B \x88"
B\x80\x80\x84"\r~|" T\xAD  B1\x88 \x84B\xFF\xFF\xFF\xFF\x83" \fB\xFF\xFF\xFF\xFF\x83"\f~|" T\xAD|  \r~|   B\x80\x80\xFE\xFF\x83" \f~" 
~|" T\xAD    B\xFF\xFF\xFF\xFF\x83"~|"V\xAD||"V\xAD|  \r~"  \f~|" T\xADB \x86 B \x88\x84|   B \x86|"V\xAD|  \r ~"\r
\f~|"\f  ~|"  ~|"B \x88  V\xAD \f \rT\xAD  \fT\xAD||B \x86\x84|" T\xAD|    ~"\f 
~|"B \x88  \fT\xADB \x86\x84|"
T\xAD
B \x86|"
T\xAD||"
T\xAD|
 B \x86"  ~|" T\xAD|" T\xAD|"
T\xAD|"B\x80\x80\x80\x80\x80\x80\xC0\0\x83PE@ Aj!\f\v B?\x88 B\x86 B?\x88\x84! B\x86 B?\x88\x84! B\x86! B\x86\x84!\v A\xFF\xFFN@ \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v~ A\0L@A k"\x07A\xFF\0M@ A0j   A\xFF\0j"6 A j   6 Aj   \x07g    \x07g )0 )8\x84B\0R\xAD ) )\x84\x84! )( )\x84! )\0! )\b\f\vB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84\v \v\x84!\v P B\0Y B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FQ\x1BE@ \v B|"P\xAD|!\v\f\v  B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84PE@ !\f\v \v  B\x83|" T\xAD|!\v\v \0 7\0 \0 \v7\b A\xE0\0j$\0\v\0 \0!\vr\x7F#\0Ak"$\0  \x006 \0(\0A\x7FG@  Aj6\f  A\fj6\b A\bj!@ \0(\0AF\r\0\v \0(\0E@ \0A6\0 \xF2 \0A\x7F6\0\v\v \0( Aj$\0Ak\v\xB2\x7F#\0Ak"$\0 \0 \0(Aj6  \x006\f@A\xF8\xDE(\0A\xF4\xDE(\0"\0kAu M\x7F@ Aj"\0A\xF8\xDE(\0A\xF4\xDE(\0"kAu"K@#\0A k"\x07$\0@ \0 k"A\xFC\xDE(\0A\xF8\xDE(\0"kAuM@A\xF4\xDE \xB9\f\v A\xF4\xDE(\0kAu j"\0A\x80\x80\x80\x80O@0\0\vA\xFF\xFF\xFF\xFFA\xFC\xDE(\0A\xF4\xDE(\0k"Au" \0 \0 I\x1B A\xFC\xFF\xFF\xFF\x07O\x1B!A\xF8\xDE(\0A\xF4\xDE(\0kAu!A\0! \x07A\fj"\0A\x80\xDF6 \0A\x006\f @A\x80\xDF \xE3!\v \0 6\0 \0  Atj"6\b \0  Atj6\f \0 6 \0 \xCFA\xF4\xDE \0\x96 \0\xD4 \0(\0"@ \0(\f \0( \xE2\v\v \x07A j$\0\f\v \0 I@A\xF8\xDE  \0Atj6\0\v\vA\xF4\xDE(\0 \0\v Atj(\0"\0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v (\f!\0 A\x006\fA\xF4\xDE(\0 Atj \x006\0 (\f!\0 A\x006\f@ \0E\r\0 \0 \0("Ak6 \r\0 \0 \0(\0(\b\0\v Aj$\0\v\xBC(\v\x7F#\0Ak"
$\0@@@@@@@@@@ \0A\xF4M@A\xFC\xD7(\0"A \0A\vjA\xF8q \0A\vI\x1B"Av"\0v"Aq@@ A\x7FsAq \0j"At"A\xA4\xD8j"\0 (\xAC\xD8"(\b"F@A\xFC\xD7 A~ wq6\0\f\v  \x006\f \0 6\b\v A\bj!\0  Ar6  j" (Ar6\f\v\v A\x84\xD8(\0"\bM\r @@A \0t"A\0 kr  \0tqh"At"A\xA4\xD8j" (\xAC\xD8"\0(\b"F@A\xFC\xD7 A~ wq"6\0\f\v  6\f  6\b\v \0 Ar6 \0 j"\x07  k"Ar6 \0 j 6\0 \b@ \bAxqA\xA4\xD8j!A\x90\xD8(\0!\x7F A \bAvt"qE@A\xFC\xD7  r6\0 \f\v (\b\v!  6\b  6\f  6\f  6\b\v \0A\bj!\0A\x90\xD8 \x076\0A\x84\xD8 6\0\f\v\vA\x80\xD8(\0"\vE\r \vhAt(\xAC\xDA"(Axq k! !@@ ("\0E@ ("\0E\r\v \0(Axq k"   I"\x1B! \0  \x1B! \0!\f\v\v (!  (\f"\0G@ (\b" \x006\f \0 6\b\f
\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v \x07A\x006\0\f \vA\x7F! \0A\xBF\x7FK\r\0 \0A\vj"Axq!A\x80\xD8(\0"\x07E\r\0A!\bA\0 k! \0A\xF4\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtkA>j!\b\v@@@ \bAt(\xAC\xDA"E@A\0!\0\f\vA\0!\0 A \bAvkA\0 \bAG\x1Bt!@@ (Axq k" O\r\0 ! "\r\0A\0! !\0\f\v \0 ("   AvAqj("F\x1B \0 \x1B!\0 At! \r\0\v\v \0 rE@A\0!A \bt"\0A\0 \0kr \x07q"\0E\r \0hAt(\xAC\xDA!\0\v \0E\r\v@ \0(Axq k" I!   \x1B! \0  \x1B! \0("\x7F  \0(\v"\0\r\0\v\v E\r\0 A\x84\xD8(\0 kO\r\0 (!\b  (\f"\0G@ (\b" \x006\f \0 6\b\f\b\v ("\x7F Aj ("E\r Aj\v!@ ! "\0Aj! \0("\r\0 \0Aj! \0("\r\0\v A\x006\0\f\x07\v A\x84\xD8(\0"M@A\x90\xD8(\0!\0@  k"AO@ \0 j" Ar6 \0 j 6\0 \0 Ar6\f\v \0 Ar6 \0 j" (Ar6A\0!A\0!\vA\x84\xD8 6\0A\x90\xD8 6\0 \0A\bj!\0\f \v A\x88\xD8(\0"I@A\x88\xD8  k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0  Ar6 \0 Ar6 \0A\bj!\0\f \vA\0!\0 A/j"\x7FA\xD4\xDB(\0@A\xDC\xDB(\0\f\vA\xE0\xDBB\x7F7\0A\xD8\xDBB\x80\xA0\x80\x80\x80\x807\0A\xD4\xDB
A\fjApqA\xD8\xAA\xD5\xAAs6\0A\xE8\xDBA\x006\0A\xB8\xDBA\x006\0A\x80 \v"j"A\0 k"\x07q" M\r\bA\xB4\xDB(\0"@A\xAC\xDB(\0"\b j" \bM  Ir\r \v@A\xB8\xDB-\0\0AqE@@@@@A\x94\xD8(\0"@A\xBC\xDB!\0@ \0(\0"\b M@  \b \0(jI\r\v \0(\b"\0\r\0\v\vA\0v"A\x7FF\r !A\xD8\xDB(\0"\0Ak" q@  k  jA\0 \0kqj!\v  M\rA\xB4\xDB(\0"\0@A\xAC\xDB(\0" j"\x07 M \0 \x07Ir\r\v v"\0 G\r\f\v  k \x07q"v" \0(\0 \0(jF\r !\0\v \0A\x7FF\r A0j M@ \0!\f\vA\xDC\xDB(\0"  kjA\0 kq"vA\x7FF\r  j! \0!\f\v A\x7FG\r\vA\xB8\xDBA\xB8\xDB(\0Ar6\0\v v"A\x7FFA\0v"\0A\x7FFr \0 Mr\r \0 k" A(jM\r\vA\xAC\xDBA\xAC\xDB(\0 j"\x006\0A\xB0\xDB(\0 \0I@A\xB0\xDB \x006\0\v@A\x94\xD8(\0"@A\xBC\xDB!\0@  \0(\0" \0("jF\r \0(\b"\0\r\0\v\f\vA\x8C\xD8(\0"\0A\0 \0 M\x1BE@A\x8C\xD8 6\0\vA\0!\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\x9C\xD8A\x7F6\0A\xA0\xD8A\xD4\xDB(\x006\0A\xC8\xDBA\x006\0@ \0At" A\xA4\xD8j"6\xAC\xD8  6\xB0\xD8 \0Aj"\0A G\r\0\vA\x88\xD8 A(k"\0Ax kA\x07q"k"6\0A\x94\xD8  j"6\0  Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\v  M  Kr\r \0(\fA\bq\r \0  j6A\x94\xD8 Ax kA\x07q"\0j"6\0A\x88\xD8A\x88\xD8(\0 j" \0k"\x006\0  \0Ar6  jA(6A\x98\xD8A\xE4\xDB(\x006\0\f\vA\0!\0\f\vA\0!\0\f\vA\x8C\xD8(\0 K@A\x8C\xD8 6\0\v  j!A\xBC\xDB!\0@@  \0(\0"G@ \0(\b"\0\r\f\v\v \0-\0\fA\bqE\r\vA\xBC\xDB!\0@@ \0(\0" M@   \0(j"I\r\v \0(\b!\0\f\v\vA\x88\xD8 A(k"\0Ax kA\x07q"k"\x076\0A\x94\xD8  j"6\0  \x07Ar6 \0 jA(6A\x98\xD8A\xE4\xDB(\x006\0  A' kA\x07qjA/k"\0 \0 AjI\x1B"A\x1B6 A\xC4\xDB)\x007 A\xBC\xDB)\x007\bA\xC4\xDB A\bj6\0A\xC0\xDB 6\0A\xBC\xDB 6\0A\xC8\xDBA\x006\0 Aj!\0@ \0A\x076 \0A\bj \0Aj!\0 I\r\0\v  F\r\0  (A~q6   k"Ar6  6\0\x7F A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\fA\f!A\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v  \x006 B\x007 \0AtA\xAC\xDAj!@@A\x80\xD8(\0"A \0t"qE@A\x80\xD8  r6\0  6\0\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0  Aqj"("\r\0\v  6\v  6A\b! "!\0A\f\f\v (\b"\0 6\f  6\b  \x006\bA\0!\0A!A\f\v j 6\0  j \x006\0\vA\x88\xD8(\0"\0 M\r\0A\x88\xD8 \0 k"6\0A\x94\xD8A\x94\xD8(\0"\0 j"6\0  Ar6 \0 Ar6 \0A\bj!\0\f\vA\xF8\xD7A06\0A\0!\0\f\v \0 6\0 \0 \0( j6 Ax kA\x07qj"\b Ar6 Ax kA\x07qj"  \bj"k!\x07@A\x94\xD8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \x07j"\x006\0  \0Ar6\f\vA\x90\xD8(\0 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \x07j"\x006\0  \0Ar6 \0 j \x006\0\f\v ("\0AqAF@ \0Axq! (\f!@ \0A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ \0Avwq6\0\f\v  6\f  6\b\f\v (!@  G@ (\b"\0 6\f  \x006\b\f\v@ ("\0\x7F Aj ("\0E\r Aj\v!@ ! \0"Aj! \0("\0\r\0 Aj! ("\0\r\0\v A\x006\0\f\vA\0!\v E\r\0@ ("\0At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ \0wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("\0@  \x006 \0 6\v ("\0E\r\0  \x006 \0 6\v \x07 j!\x07  j"(!\0\v  \0A~q6  \x07Ar6  \x07j \x076\0 \x07A\xFFM@ \x07A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A \x07Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA! \x07A\xFF\xFF\xFF\x07M@ \x07A& \x07A\bvg"\0kvAq \0AtrA>s!\v  6 B\x007 AtA\xAC\xDAj!\0@@A\x80\xD8(\0"A t"qE@A\x80\xD8  r6\0 \0 6\0\f\v \x07A AvkA\0 AG\x1Bt! \0(\0!@ "\0(Axq \x07F\r Av! At! \0 Aqj"("\r\0\v  6\v  \x006  6\f  6\b\f\v \0(\b" 6\f \0 6\b A\x006  \x006\f  6\b\v \bA\bj!\0\f\v@ \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \x07A~ wq"\x076\0\f\v@  \b(F@ \b \x006\f\v \b \x006\v \0E\r\v \0 \b6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v  \x006 B\x007 \0AtA\xAC\xDAj!@@ \x07A \0t"qE@A\x80\xD8  \x07r6\0  6\0  6\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0  Aqj"\x07("\r\0\v \x07 6  6\v  6\f  6\b\f\v (\b"\0 6\f  6\b A\x006  6\f  \x006\b\v A\bj!\0\f\v@ E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \vA~ wq6\0\f\v@  (F@ \x006\f\v \x006\v \0E\r\v \0 6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 \b@ \bAxqA\xA4\xD8j!\0A\x90\xD8(\0!\x7FA \bAvt"\x07 qE@A\xFC\xD7  \x07r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\vA\x90\xD8 6\0A\x84\xD8 6\0\v A\bj!\0\v
Aj$\0 \0\v\0\x9C\0\v;\x7F#\0Ak"$\0  \x006\f (\f"\0(\0"@ \0 6 \0(\b !\v Aj$\0\vu~ \0  ~  ~| B \x88" B \x88"~| B\xFF\xFF\xFF\xFF\x83" B\xFF\xFF\xFF\xFF\x83"~"B \x88  ~|"B \x88|  ~ B\xFF\xFF\xFF\xFF\x83|"B \x88|7\b \0 B\xFF\xFF\xFF\xFF\x83 B \x86\x847\0\v\xC1\x7F \0-\0\0A qE@@ \0("\x7F  \0\xC9\r \0(\v \0("k I@ \0   \0($\0\f\v@@ E \0(PA\0Hr\r\0 !@  j"Ak-\0\0A
G@ Ak"\r\f\v\v \0   \0($\0 I\r  k! \0(!\f\v !\v   Y \0 \0( j6\v\v\v\x7FA9" \0(\x006\0 \v\xC0\x7F@  kAH\r\0 \0( \0,\0\v" A\0H\x1BE\r\0  \x8F \0(\0 \0 \0,\0\v"A\0H"\x1B" \0(  \x1Bj! Ak!\0@@@ -\0\0"Ak! \0 M\r\0 A\xFFqA\xFD\0M@ (\0 G\r\v Aj!   kAJj!\f\v\v A\xFFqA\xFD\0K\r \0(\0Ak I\r\v A6\0\v\vP~@ A\xC0\0q@  A@j\xAD\x86!B\0!\f\v E\r\0  \xAD"\x86 A\xC0\0 k\xAD\x88\x84!  \x86!\v \0 7\0 \0 7\b\vi\x7F#\0A\x80k"$\0 A\x80\xC0q  LrE@    k"A\x80 A\x80I"\x1B\xC6 E@@ \0 A\x803 A\x80k"A\xFFK\r\0\v\v \0  3\v A\x80j$\0\v\0A\0\v<\x7FA \0 \0AM\x1B!@@ /"\0\r\0A\xB4\xEC(\0"E\r\0 \r\0\f\v\v \0E@0\0\v \0\v \0 \0(\0C\v
\0 \0(\0A\xC0\v\xCD \x7F~#\0A\xF0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83! @@ P" B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}B\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FT
P\x1BE@ B\0R B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}"\vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FV \vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FQ\x1B\r\v 
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84! !\f\v P B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\v 
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0   \x85  \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84P"\x1B!B\0  \x1B!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P\r 
\x84P@  \x84B\0R\r  \x83!  \x83!\f\v  \x84PE\r\0 ! !\f\v    T
V
Q\x1B"\b\x1B!
  \b\x1B"\fB\xFF\xFF\xFF\xFF\xFF\xFF?\x83!   \b\x1B"\vB0\x88\xA7A\xFF\xFFq!\x07 \fB0\x88\xA7A\xFF\xFFq"E@ A\xE0\0j
P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6 )h! )\`!
A k!\v   \b\x1B! \vB\xFF\xFF\xFF\xFF\xFF\xFF?\x83! \x07~  A\xD0\0j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B|\xA7"\x07Ak6A \x07k!\x07 )P! )X\vB\x86 B=\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84! B\x86
B=\x88\x84  \x85!~ B\x86"  \x07F\r\0  \x07k"\x07A\xFF\0K@B\0!B\f\v A@k  A\x80 \x07k6 A0j   \x07g )8! )0 )@ )H\x84B\0R\xAD\x84\v! B\x80\x80\x80\x80\x80\x80\x80\x84!\v
B\x86!
@ B\0S@B\0!B\0!
\x85  \v\x85\x84P\r
}! \v }
V\xAD}"B\xFF\xFF\xFF\xFF\xFF\xFF\xFFV\r A j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B\x84\xA7A\fk"\x076  \x07k! )(! ) !\f\v
|" T\xAD  \v||"B\x80\x80\x80\x80\x80\x80\x80\b\x83P\r\0 B\x83 B?\x86 B\x88\x84\x84! Aj! B\x88!\v \fB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83! A\xFF\xFFN@ B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!B\0!\f\vA\0!\x07@ A\0J@ !\x07\f\v Aj   A\xFF\0j6   A kg )\0 ) )\x84B\0R\xAD\x84! )\b!\v B=\x86 B\x88\x84! B\x88B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \x07\xADB0\x86\x84 \x84!@@ \xA7A\x07q"AG@    AK\xAD|"V\xAD|!\f\v    B\x83|"V\xAD|!\f\v E\r\v\v \0 7\0 \0 7\b A\xF0\0j$\0\v
\0 \0A\x9C\xE0^\v
\0 \0A\xA4\xE0^\v\x84\x7F~#\0Ak"$\0 \0~ E@B\0\f\v   Au"s k"\xADB\0 g"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\0 A\0H\x1B\x84! )\0\v7\0 \0 7\b Aj$\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v -\0\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v -\0\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v (\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v (\0\v\xAA\f\b\x7F\x7FA\0 E\r\0 \0A\x7Fs! AO@@ AqE\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Aj! Ak!\f\v \0! !\f\v \0! !\f\v \0! !\v An"\bAll!
@ \bAk" E@A\0!\f\v !\0A\0!@ \0( \x07s"\x07AvA\xFC\x07q(\xE0S \x07AvA\xFC\x07q(\xE0K \x07AvA\xFC\x07q(\xE0C \x07A\xFFqAt(\xE0;sss!\x07 \0(\f s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\b s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0( s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0(\0 s"AvA\xFC\x07q(\xE0S AvA\xFC\x07q(\xE0K AvA\xFC\x07q(\xE0C A\xFFqAt(\xE0;sss! \0Aj!\0 Ak" \r\0\v  \bAljAk!\v 
j! ( (\f (\b ( (\0 s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\xFFqAt(\xE03 \x07ss \0A\bvs"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s"\0A\bv \0A\xFFqAt(\xE03s! Aj!\v A\x07K@@ -\0\0 sA\xFFqAt(\xE03 A\bvs"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0\x07 \0sA\xFFqAt(\xE03s! A\bj! A\bk"A\x07K\r\0\v\v@ E\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs!\v A\x7Fs\v\v\x97\x7F#\0A@j"$\0 \0 \0(\0"A\bk(\0"j!@ Ak(\0"( (F@A\0  \x1B!\0\f\v \0 N@ B\x007 A\x006  6\f  \x006\b  6 B\x007 B\x007$ B\x007, A\x006< B\x81\x80\x80\x80\x80\x80\x80\x8074  Aj  AA\0 (\0(\v\0 (\r\v B\x007 A\x006 A\x98\xC46\f  \x006\b  6 B\x007 B\x007$ B\x007, B\x007\x003 A\x006< A:\0;  Aj AA\0 (\0(
\0A\0!\0@@ ((\0\v (A\0 ($AF\x1BA\0 ( AF\x1BA\0 (,AF\x1B!\0\f\v (AG@ (,\r ( AG\r ($AG\r\v (!\0\v A@k$\0 \0\v\0 \0A\x006\b \0B\x007\0\vc\0 (A\xB0q"A F@ \v@ AG\r\0@@ \0-\0\0"A+k\0\0\v \0Aj\v A0G  \0kAHr\r\0 \0-\0A rA\xF8\0G\r\0 \0Aj!\0\v \0\v1\x7FA\xCC\xCF(\0! \0@A\xCC\xCFA\xD4\xCE \0 \0A\x7FF\x1B6\0\vA\x7F  A\xD4\xCEF\x1B\v\0 \0(\0"\0@ \0H\v\vA\x7F \0 7p \0 \0(, \0("k\xAC7x \0 P  \0(\b"\0 k\xACYr\x7F \0  \xA7j\v6h\vs\x7F \0A\x90\xFC\x006\0 \0(@ \0((!@ @A\0 \0 Ak"At" \0($j(\0 \0( j(\0\x07\0\f\v\v \0Aj\xF3 \0( ! \0($! \0(0! \0(<!\v \0\v\xEC\x7F \0E@A\xC8\xCC(\0@A\xC8\xCC(\0L!\vA\xF8\xCD(\0@A\xF8\xCD(\0L r!\vA\xB0\xCE(\0"\0@@ \0(L \0( \0(G@ \0L r!\v \0(8"\0\r\0\v\v \v \0(LA\0H!@@ \0( \0(F\r\0 \0A\0A\0 \0($\0 \0(\r\0A\x7F!\f\v \0(" \0(\b"G@ \0  k\xACA \0((\0\vA\0! \0A\x006 \0B\x007 \0B\x007 \r\0\v \v-\0 E@ \0( (F\v \0 F@A\v \0( (\x9BE\v\xDB\x7F#\0Ak"$\0  6\fA\0!@ \x7FA \0 A\fj(\r\0A A\xC0\0 \0:" (\0(\f\0E\r\0  A\0 (\0(4\0!@@ \0Q A0k! \0 A\fj( AHr\r\0 A\xC0\0 \0:" (\0(\f\0E\r Ak!  A\0 (\0(4\0 A
lj!\f\v\v \0 A\fj(E\rA\v (\0r6\0\v Aj$\0 \v\xF6\x7F#\0Ak"$\0  6\f@@ \0 A\fj)@A\0!A!\f\vA\0!A! \0;"\x07A\0H\r\0 (\b \x07Atj-\0\0A\xC0\0qE\r\0  \x07A\0 (\0($\0!@@ \0S A0k! \0 A\fj) AHr\r\0 \0;"A\0H\r (\b Atj-\0\0A\xC0\0qE\r Ak!  A\0 (\0($\0 A
lj!\f\v\v \0 A\fj)E\rA!\v  (\0 r6\0\v Aj$\0 \v\x90\x7F#\0Ak"$\0  6\f  H6\b (\f!#\0Ak"$\0  6\f  6\bA\x7F!@A\0A\0  \x9A"A\0H\r\0 \0 Aj"/"\x006\0 \0E\r\0 \0   (\f\x9A!\v Aj$\0 A\bjI Aj$\0 \v\f\0 \0(\0B \0\v.\0@ \0(A\xCA\0q"\0@ \0A\xC0\0F@A\b\v \0A\bG\rA\vA\0\vA
\v\f\0 \0(\0@ \0\v\xCE~\x7F#\0Ak"$\0 \xBD"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07\x83! \0~ B4\x88B\xFF\x83"PE@ B\xFFR@ B\x88! B\x80\xF8\0|! B<\x86\f\v B\x88!B\xFF\xFF! B<\x86\f\v P@B\0!B\0\f\v  B\0 y\xA7"\x07A1j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85!A\x8C\xF8\0 \x07k\xAD! )\0\v7\0 \0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B0\x86\x84 \x847\b Aj$\0\v\0 \0A\x80\x80\x80\x80O@A\xBFA\0\xDC\0\v \0At9\v\x85\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ =! \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj(\r\0@ (\0A\0 (\0(4\0A%F@ Aj \x07F\rA\0!\x7F@ (A\0 (\0(4\0"A\xC5\0F\r\0A!
A\xFFqA0F\r\0 \f\v A\bj \x07F\rA\b!
! (\bA\0 (\0(4\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
jAj!\f\v A (\0 (\0(\f\0@@ \x07 Aj"G@ A (\0 (\0(\f\0\r\v\v@ \bA\fj \bA\bj(\r A \b(\fC (\0(\f\0E\r \b(\fB\f\0\v\0\v \b(\fC (\0(\0 (\0 (\0(\0F@ \b(\fB Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj(@  (\0Ar6\0\v \b(\f \bAj$\0\v\xB1\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ >! \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj)\r\0@ ,\0\0A\0 (\0($\0A%F@ Aj \x07F\rA\0!\x7F@ ,\0A\0 (\0($\0"A\xC5\0F\r\0A!
A\xFFqA0F\r\0 \f\v Aj \x07F\rA!
! ,\0A\0 (\0($\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
jAj!\f\v@ ,\0\0"A\0H\r\0 (\b" Atj-\0\0AqE\r\0@@ \x07 Aj"F@ \x07!\f\v ,\0\0"A\0H\r\0  Atj-\0\0Aq\r\v\v@ \bA\fj \bA\bj)\r \b(\fA"A\x80q\r (\b A\xFF\0qAtj-\0\0AqE\r \b(\f@\f\0\v\0\v \b(\fA\xC0 (\0(\f\0 ,\0\0 (\0(\f\0F@ \b(\f@ Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj)@  (\0Ar6\0\v \b(\f \bAj$\0\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\0:\0\0\v\0 @ \0  \xFC
\0\0\v \0\v\xC3\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f!  k"A\0J@ \0   \0(\0(0\0 G\r\v  k" H@ \x07Aj" k" \xE1 \0 \x07(  \x07,\0A\0H\x1B  \0(\0(0\0!    G\r\v  k"A\0J@ \0   \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v\f\0 \0A\x82\x86\x80 6\0\0\v\xCC\x7F#\0Ak"\x07$\0@ \0E\r\0 (\f!  kAu"A\0J@ \0   \0(\0(0\0 G\r\v  kAu" H@ \x07Aj" k" \xDF \0 \x07(  \x07,\0A\0H\x1B  \0(\0(0\0!    G\r\v  kAu"A\0J@ \0   \0(\0(0\0 G\r\v A\x006\f \0!\b\v \x07Aj$\0 \b\v9\x7F#\0Ak"$\0  6\f  H6\b \0A  (\f\x9A A\bjI Aj$\0\vK\x7F \0(\0!\0 -" \0(\f \0(\b"kAuI\x7F  Atj(\0A\0GA\0\vE@0\0\v \0(\b Atj(\0\v\0 \0A F \0A kAIr\v\xD7\x7F@A\x84\xCC(\0"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@A\x88\xCC(\0A
F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
:\0\0\vA\xB8\xCB\x9F\vA\x84\xCCA\x84\xCC(\0"\0A\xFF\xFF\xFF\xFF \0\x1B6\0@@A\x88\xCC(\0A
F\r\0A\xCC\xCB(\0"\0A\xC8\xCB(\0F\r\0A\xCC\xCB \0Aj6\0 \0A
:\0\0\f\vA\xB8\xCB\x9F\vA\x84\xCC(\0A\x84\xCCA\x006\0\v+\x7F#\0Ak"$\0  6\fA\xB8\xCB \0 A\0A\0\xD0 Aj$\0\v^\x7F \0A\x006\b \0B\x007\0 (\0! (" k"Au"@ \0 \xA8 \0(! E  FrE@   \xFC
\0\0\v \0  j6\v \0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0-\0\0! \0 -\0\0:\0\0  :\0\0 \0Aj!\0\f\0\v\0\v\v\xDB\x7F~A!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 \0 \x84  \x84\x84P@A\0\v  \x83B\0Y@ \0 T  S  Q\x1B@A\x7F\v \0 \x85  \x85\x84B\0R\v \0 V  U  Q\x1B@A\x7F\v \0 \x85  \x85\x84B\0R!\v \v'\x7F#\0Ak"$\0  6\f \0A\xE4\0  \x9A Aj$\0\v\xD7\x7F#\0Ak"$\0 \0A\x006#\0Ak"$\0 A\0:\0@ \0 \0(\0"A\fk(\0j"(E@  \0 (H"\x7F \xC4 \0(\0 \vA\fk(\0j(E:\0\f\v A\x99\v Aj$\0A! -\0AF@ \0 \0 \0(\0A\fk(\0j("   (\0( \0"6AA\0  G\x1B!\v \0 \0(\0A\fk(\0j \x99 Aj$\0\vP~@ A\xC0\0q@  A@j\xAD\x88!B\0!\f\v E\r\0 A\xC0\0 k\xAD\x86  \xAD"\x88\x84!  \x88!\v \0 7\0 \0 7\b\vC\x7F@ E\r\0@ \0-\0\0" -\0\0"F@ Aj! \0Aj!\0 Ak"\r\f\v\v  k!\v \v \0A\x97\xD6\0\v\x88\x7F@ \xA5"A\xF7\xFF\xFF\xFFI@@@ AO@ Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v At"E\r\0 \0  \xFC
\0\0\v \0 AtjA\x006\0\f\v0\0\v\v\xBB\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0" k"At  F\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @   \xFC
\0\0\v \0 6\0 E\r\0  \0(\0 \0(\0!\v \0A\xE4\x006   \x07 kj6\0  \0(\0 \bA|qj6\0\v0\0\vA\x7F#\0Ak"$\0  6\fA\xB0 A\xFC A\xDD,A A\fj"4A\xFC A\xE1,A 4 Aj$\0 \0\v\xFA\x7F#\0Ak"
$\0
\x006\f@@@ (\0"\v G\r\0 (\` \0F\x7FA+ \0 (dG\rA-\v!\0  \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0  \x006\0\f\vA\x7F!\0 A\xE8\0j
A\fj\xB1 kAu"AJ\r@@@ A\bk\0\0\v  J\r\f\v AG AHr\r\0 (\0" F  kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0  Aj6\0  -\0\xD0\x85:\0\0\f\v  (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0  (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v
Aj$\0 \0\v
\0 \0A\xE4\xE0^\v\xFC\x7F#\0Ak"
$\0
\0:\0@@@ (\0"\v G\r\0 \0A\xFFq"\f -\0F\x7FA+ \f -\0G\rA-\v!\0  \vAj6\0 \v \0:\0\0\f\v@ \0 G\r\0 ( ,\0\v"\0 \0A\0H\x1BE\r\0A\0!\0 \b(\0" \x07kA\x9FJ\r (\0!\0 \b Aj6\0  \x006\0\f\vA\x7F!\0 Aj
Aj\xB4 k"AJ\r@@@ A\bk\0\0\v  J\r\f\v AG AHr\r\0 (\0" F  kAJr\r Ak-\0\0A0G\rA\0!\0 A\x006\0  Aj6\0  -\0\xD0\x85:\0\0\f\v  (\0"\0Aj6\0 \0 A\xD0\x85j-\0\0:\0\0  (\0Aj6\0A\0!\0\f\vA\0!\0 A\x006\0\v
Aj$\0 \0\v
\0 \0A\xDC\xE0^\v\0 \0\vf\x7F~#\0Ak"$\0 \0~ E@B\0\f\v  \xADB\0A\xF0\0 g"Ask6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|! )\0\v7\0 \0 7\b Aj$\0\v\0 \0A\xDF\0q \0 \0A\xE1\0kAI\x1B\v<\0 \0A\x006\b \0B\x007\0 \0 (\x006\0 \0 (6 \0 (\b6\b A\x006\b B\x007\0\v,\x7F \0A\x006\b \0B\x007\0 \0 (\0" ("  k\xC2 \0\vW\x7F~@A\xCC\xCC(\0"\xAD \0\xADB\x07|B\xF8\xFF\xFF\xFF\x83|"B\xFF\xFF\xFF\xFFX@ \xA7"\0?\0AtM\r \0\r\vA\xF8\xD7A06\0A\x7F\vA\xCC\xCC \x006\0 \v\xA7\x7F \0( \0(\0"kAu" I@#\0A k"$\0@  k" \0(\b \0("kAuM@ \0 \xB9\f\v A\fj \0  \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8" \xCF \0 \x96 \xB5\v A j$\0\v  I@ \0  Atj6\v\vt\x7F~ \0B\x80\x80\x80\x80Z@@ Ak" \0" \0B
\x80"\0B
~}\xA7A0r:\0\0 B\xFF\xFF\xFF\xFF\x9FV\r\0\v\v \0PE@ \0\xA7!@ Ak"  A
n"A
lkA0r:\0\0 A K !\r\0\v\v \v}\x7F@@ \0"AqE\r\0 -\0\0E@A\0\v@ Aj"AqE\r -\0\0\r\0\v\f\v@ "Aj!A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v@ "Aj! -\0\0\r\0\v\v  \0k\v\xBF\x7F \0( \0(\0"k" I@#\0A k"$\0@  k" \0(\b \0("kM@ \0 \x96\f\v  A\fj \0  j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@  G@ A\0:\0\0 Aj!\f\v\v  6\b \0 \xA9 \x87\v A j$\0\v  I@ \0  j6\v\v\v\0  6\0A\v<\0 \0,\0\vA\0H@ \0(\b \0(\0!\v \0 (\b6\b \0 )\x007\0 A\0:\0\v A\x006\0\vK\x7F#\0Ak"$\0 A\fj" $  n" (\0(\0\x006\0 \0  (\0(\0 (\f# Aj$\0\vD\x7F#\0Ak"$\0 A\fj" \0$ ="\0A\xD0\x85A\xEA\x85  \0(\0(0\0 (\f# Aj$\0 \vK\x7F#\0Ak"$\0 A\fj" $  p" (\0(\0\0:\0\0 \0  (\0(\0 (\f# Aj$\0\v\x7F\x7F@ y"A\xF7\xFF\xFF\xFF\x07I@@@ A\vO@ A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\f\v \0 :\0\v E\r\v E\r\0 \0  \xFC
\0\0\v \0 jA\0:\0\0\f\vi\0\v\vF\x7F \0A\x80\xFA\0(\0"6\0 \0 A\fk(\0jA\xA0\xFA\0(\x006\0 \0A\xA4\xFA\0(\x006\b \0A\fj\xB0 \0A@kK \0\v\xB5\x07\x7F\x7F \0A\xFF\xFFq! \0Av! AF@  -\0\0j"\0A\xF1\xFFk \0 \0A\xF0\xFFK\x1B"\0 j"At"A\x80\x80<j  A\xF0\xFFK\x1B \0r\f\v \x7F@@@@ AO@@ A\xAF+K@@A\xDB! !\0@  \0-\0\0j" j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0j"j  \0-\0\x07j"j  \0-\0\bj"j  \0-\0 j"j  \0-\0
j"j  \0-\0\vj"j  \0-\0\fj"j  \0-\0\rj"j  \0-\0j"j  \0-\0j"j! \0Aj!\0 Ak"\r\0\v A\xF1\xFFp! A\xF1\xFFp! A\xB0+j! A\xB0+k"A\xAF+K\r\0\v E\r AI\r\v@  -\0\0j"\0 j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0j"\0j \0 -\0\x07j"\0j \0 -\0\bj"\0j \0 -\0 j"\0j \0 -\0
j"\0j \0 -\0\vj"\0j \0 -\0\fj"\0j \0 -\0\rj"\0j \0 -\0j"\0j \0 -\0j"j! Aj! Ak"AK\r\0\v E\r\v Aq"\x07\r !\0\f\v@ E\r\0@ Aq"\x07E@ !\0\f\v !\0@ "Aj! \0Ak!\0  -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@  -\0\0j" -\0j" -\0j" -\0j"    jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFpAt A\xF1\xFFk  A\xF0\xFFK\x1Br\f\vA\0! !\0@ "Aj! \0Ak!\0  -\0\0j" j! Aj" \x07G\r\0\v\v AI\r\0@  -\0\0j" -\0j" -\0j" -\0j"    jjjj! Aj! \0Ak"\0\r\0\v\v A\xF1\xFFp! A\xF1\xFFp!\v At rA\v\v\v:\x7F A\0H@\x85\0\vA\xFF\xFF\xFF\xFF\x07 \0(\b \0(\0k"\0At"   I\x1B \0A\xFF\xFF\xFF\xFFO\x1B\v\0 \0("\0A O@ \0\v\v \0A\x9F\f\xD6\0\v>\x7F A\x80\x80\x80\x80O@\x85\0\vA\xFF\xFF\xFF\xFF \0(\b \0(\0k"\0Au"   I\x1B \0A\xFC\xFF\xFF\xFF\x07O\x1B\v?\x7F \0(! \0(\b!@  G@ \0 Ak"6\b\f\v\v \0(\0"@ \0(\f !\v\vI\x7F \0("A\bu! \0(\0"\0  Aq\x7F (\0 j(\0 \v j A Aq\x1B  \0(\0(
\0\v\xF1\x7FA\xF6\xFF\xFF\xFF\x07 k O@A\xF7\xFF\xFF\xFF\x07!\b \0(\0 \0 \0,\0\vA\0H\x1B! A\xF2\xFF\xFF\xFFM@A\v  j" At"\b  \bK\x1B"A\x07rAj A\vI\x1B!\b\v \b9! @  \xFC
\0\0\v @  j \x07 \xFC
\0\0\v   j"
k"\x07E 
FrE@  j j  j j \x07\xFC
\0\0\v A
G@ !\v \0 6\0 \0 \bA\x80\x80\x80\x80xr6\b \0  j \x07j"\x006 \0 jA\0:\0\0\vi\0\v,\x7F \0 A\xC0\x84=n"At/\xC0\xBB;\0\0 \0Aj  A\xC0\x84=lk\xAB\v\0A\v;\0 \0 6 \0 \x7F 9A\0\v"6\0 \0  j"6\b \0  j6\f \0 6 \0\v\b\0A\xFF\xFF\xFF\xFF\x07\v\0A\xFF\0\v?\x7F@ \0 F\r\0@ \0 Ak"O\r \0(\0! \0 (\x006\0  6\0 \0Aj!\0\f\0\v\0\v\v\xCB \x7F#\0Ak" $\0 =!
Aj n" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
\0  
(\0(0\0    \0kAtj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
\b\xC0
(\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 \0Aj!\x07\v@  \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0
A0
(\0(,\0!\b  (\0"\vAj6\0 \v \b6\0
\x07,\0
(\0(,\0!\b  (\0"\vAj6\0 \v \b6\0 \x07Aj!\x07\v \x07 c  (\0(\0\0!A\0!\vA\0!\b \x07!\x7F  M\x7F  \x07 \0kAtj (\0\x8F (\0@ ("\f Aj"\r ,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0  (\0"\vAj6\0 \v 6\0A\0!\v \b \b (\b ,\0"\f \fA\0H\x1BAkIj!\b\v
,\0\0
(\0(,\0!\f  (\0"\rAj6\0 \r \f6\0 Aj! \vAj!\v\f\v\v!\v     \0kAtj  F\x1B6\0 Aj  Aj$\0\v\xD0\x7F A\x80q@ \0A+:\0\0 \0Aj!\0\v A\x80\bq@ \0A#:\0\0 \0Aj!\0\v A\x84q"A\x84G@ \0A\xAE\xD4\0;\0\0 \0Aj!\0\v A\x80\x80q!@ -\0\0"@ \0 :\0\0 \0Aj!\0 Aj!\f\v\v \0\x7F@ A\x80G@ AG\rA\xC6\0A\xE6\0 \x1B\f\vA\xC5\0A\xE5\0 \x1B\f\vA\xC1\0A\xE1\0 \x1B A\x84F\r\0A\xC7\0A\xE7\0 \x1B\v:\0\0 A\x84G\v\xB4\x7F~@@@@@@ AkAw\b\0\v \0\x7F  k"AL@A= A\xC0\0 B\x84y\xA7kA\xD1 lA\fv"  At)\xD0\xC2TkAjH\r\v\x7F B\xFF\xFF\xFF\xFFX@  \xA7\xAD\f\v B\x80\xC8\xAF\xA0%Z@  B\x80\xC8\xAF\xA0%\x80"B\x80\xC8\xAF\xA0%~}!  \xA7\xAD!\v  B\x80\xC2\xD7/\x80"\xA7At/\xC0\xBB;\0\0 Aj  B\x80\xC2\xD7/~}\xA7\x8A\v!A\0\v6\f\v \0A\xC0\0 B\x84y\xA7k"  kJ\x7FA=  j"!\x7F BT\x7F@ Ak" \xA7Aq-\0\x91:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA<q(\x90\xBD6\0\0 B\x88!\f\v\v\v6\f\v \0A\xC2\0 B\x84y\xA7kAn"  kJ\x7FA=  j"!\x7F B\xC1\0T\x7F@ Ak" \xA7A\x07q-\0\xFA\x1B:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFE\0q/\xD0\xBD;\0\0 B\x88!\f\v\v\v6\f\v \0A\xC3\0 B\x84y\xA7kAv"  kJ\x7FA=  j"!\x7F B\x81T\x7F@ Ak" \xA7Aq-\0\xD2:\0\0 B\x88"B\0R\r\0\vA\0 Ak" \xA7AtA\xFEq/\xD0\xBE;\0\0 B\b\x88!\f\v\v\v6\f\v\x7F !  l" l\xAD!\b \xAD! \xAD!
 l\xAD!\x07A\0!\x7F Ar  T\r Ar 
T\r Ar  \bT\r  \x07T\x7F Aj Aj!  \x07\x80!\f\v\v\v"  kJ@ \0A=6\f\v \xAC!\x07  j"!@ Ak"   \x07\x80" \x07~}\xA7-\0\x80\b:\0\0  \x07Z !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xC1 \x7F#\0Ak" $\0 >!
Aj p" (\0(\0@ (\b ,\0"\x07 \x07A\0H\x1BE@
\0  
(\0( \0    \0kj"6\0\f\v  6\0@@ \0"\x07-\0\0"\bA+k\0\0\v
\b\xC0
(\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 \0Aj!\x07\v@  \x07kAH\r\0 \x07-\0\0A0G\r\0 \x07-\0A rA\xF8\0G\r\0
A0
(\0(\0!\b  (\0"\vAj6\0 \v \b:\0\0
\x07,\0
(\0(\0!\b  (\0"\vAj6\0 \v \b:\0\0 \x07Aj!\x07\v \x07 c  (\0(\0\0!A\0!\vA\0!\b \x07!\x7F  M\x7F  \x07 \0kj (\0c (\0@ ("\f Aj"\r ,\0A\0H"\x1B \bj-\0\0E\r\0 \v \f \r \x1B \bj,\0\0G\r\0  (\0"\vAj6\0 \v :\0\0A\0!\v \b \b (\b ,\0"\f \fA\0H\x1BAkIj!\b\v
,\0\0
(\0(\0!\f  (\0"\rAj6\0 \r \f:\0\0 Aj! \vAj!\v\f\v\v!\v     \0kj  F\x1B6\0 Aj  Aj$\0\v\x9A\x7F@@@@@@ AkAw\b\0\v \0\x7F  k"A L@A= A ArgkA\xD1 lA\fv"  At(\x90\xBBIkAjH\r\v  \xAD!A\0\v6\f\v \0A Argk"  kJ\x7FA=  j"!\x7F AI\x7F@ Ak" Aq-\0\x91:\0\0 Av"\r\0\vA\0 Ak" AtA<q(\x90\xBD6\0\0 Av!\f\v\v\v6\f\v \0A" ArgkAn"  kJ\x7FA=  j"!\x7F A\xC1\0I\x7F@ Ak" A\x07q-\0\xFA\x1B:\0\0 Av"\r\0\vA\0 Ak" AtA\xFE\0q/\xD0\xBD;\0\0 Av!\f\v\v\v6\f\v \0A# ArgkAv"  kJ\x7FA=  j"!\x7F A\x81I\x7F@ Ak" Aq-\0\xD2:\0\0 Av"\r\0\vA\0 Ak" AtA\xFEq/\xD0\xBE;\0\0 A\bv!\f\v\v\v6\f\v\x7F !  l"\x07 l! \x07 \x07l!\b\x7F Ar  K\r Ar  \x07I\r Ar  I\r  \bI\x7F Aj Aj!  \bn!\f\v\v\v"  kJ@ \0A=6\f\v  j"!@ Ak"   n" lk-\0\x80\b:\0\0  O !\r\0\v \0A\x006 \0 6\0\v \0 6\0\v\xCB\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f! @@@  kA\fm"
A\xE5\0O@
/"! E\r\v !\x07 !@  F@A\0!\b@ \0 \fA\xEC\0j"(A
\x1B@ \0 (@  (\0Ar6\0\v@  F\r -\0\0AF\r\x07 Aj! A\fj!\f\0\v\0\v \0:!\r E@  \r (\0(\0!\r\v \bAj!A\0! !\x07 !@  F@ !\b E\r \0Q !\x07 !
\vjAI\r@  F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 \bAt (\0  ,\0\vA\0H\x1Bj(\0!@ \x7F    (\0(\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v
Ak!
\v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v
\bk!
\f\v\0\v\0\v0\0\v  (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\x88\x7F ( \0( \0(\0"k"k! @   \xFC
\0\0\v  6 \0 \0(\0"6 \0 (6\0  6 \0(! \0 (\b6  6\b \0(\b! \0 (\f6\b  6\f  (6\0\v\xC8\v\x7F#\0A\xF0\0k"\f$\0 \f 6l \f! @@@  kA\fm"
A\xE5\0O@
/"! E\r\v !\x07 !@  F@A\0!\b@ \0 \fA\xEC\0j")A
\x1B@ \0 )@  (\0Ar6\0\v@  F\r -\0\0AF\r\x07 Aj! A\fj!\f\0\v\0\v \0;!\r E@  \r (\0(\f\0!\r\v \bAj!A\0! !\x07 !@  F@ !\b E\r \0S !\x07 !
\vjAI\r@  F@\f@ \x07-\0\0AG\r\0 ( ,\0\v" A\0H\x1B \bF\r\0 \x07A\0:\0\0 \vAk!\v\v \x07Aj!\x07 A\fj!\f\v\0\v\0@ \x07-\0\0AG\r\0 (\0  ,\0\vA\0H\x1B \bj,\0\0!@ \x7F    (\0(\f\0\v \rF@A! ( ,\0\v" A\0H\x1B G\r \x07A:\0\0 \vAj!\v\f\v \x07A\0:\0\0\v
Ak!
\v \x07Aj!\x07 A\fj!\f\v\0\v\0\v\0 \x07AA ( ,\0\v"\b \bA\0H\x1B"\b\x1B:\0\0 \x07Aj!\x07 A\fj! \v \bE"\bj!\v
\bk!
\f\v\0\v\0\v0\0\v  (\0Ar6\0\v ! \fA\xF0\0j$\0 \v\xBB\x7F A\xF4\xDC \x1B"(\0!@\x7F@ E@ \rA\0\vA~ E\r@ @ !\f\v -\0\0"\xC0"A\0N@ \0@ \0 6\0\v A\0G\vA\xCC\xCF(\0(\0E@A \0E\r \0 A\xFF\xBFq6\0A\v A\xC2k"A2K\r At(\x80\x84! Ak"E\r Aj!\v -\0\0"Av"\x07Ak Au \x07jrA\x07K\r\0@ Ak! A\xFFqA\x80k Atr"A\0N@ A\x006\0 \0@ \0 6\0\v  k\v E\r Aj",\0\0"A@H\r\0\v\v A\x006\0A\xF8\xD7A6\0A\x7F\v\v  6\0A~\v'\0 \0 \0(E \0( rr"6 \0( q@\x9C\0\v\v}\x7F#\0A\xA0k"$\0  \0 A\x9Ej \x1B"\x006\x94   A\0Gk6\x98 A\0A\x90\xFC\v\0 A\x7F6L A\xE1\x006$ A\x7F6P  A\x9Fj6,  A\x94j6T \0A\0:\0\0   \xCB A\xA0j$\0\vJ\x7F@ \0-\0\0"E  -\0\0"Gr\r\0@ -\0! \0-\0"E\r Aj! \0Aj!\0  F\r\0\v\v  k\v\0\0\v\x8D\b\v\x7F \0E@ /\v A@O@A\xF8\xD7A06\0A\0\v\x7FA A\vjAxq A\vI\x1B! \0A\bk"(" Axq!\b@ AqE@ A\x80I\r Aj \bM@ ! \b kA\xDC\xDB(\0AtM\r\vA\0\f\v  \bj!\x07@  \bM@ \b k"AI\r   AqrAr6  j" Ar6 \x07 \x07(Ar6  \xC9\f\vA\x94\xD8(\0 \x07F@A\x88\xD8(\0 \bj"\b M\r   AqrAr6  j" \b k"Ar6A\x88\xD8 6\0A\x94\xD8 6\0\f\vA\x90\xD8(\0 \x07F@A\x84\xD8(\0 \bj" I\r@  k"AO@   AqrAr6  j"\b Ar6  j" 6\0  (A~q6\f\v  Aq rAr6  j" (Ar6A\0!\bA\0!\vA\x90\xD8 \b6\0A\x84\xD8 6\0\f\v \x07("Aq\r Axq \bj"\v I\r \v k!\f \x07(\f!@ A\xFFM@ \x07(\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v \x07(!
@  \x07G@ \x07(\b" 6\f  6\b\f\v@ \x07("\x7F \x07Aj \x07("E\r \x07Aj\v!\b@ \b! "Aj!\b ("\r\0 Aj!\b ("\r\0\v A\x006\0\f\vA\0!\v
E\r\0@ \x07("At"(\xAC\xDA \x07F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07
(F@
6\f\v
6\v E\r\v 
6 \x07("@  6  6\v \x07("E\r\0  6  6\v \fAM@  Aq \vrAr6  \vj" (Ar6\f\v   AqrAr6  j" \fAr6  \vj" (Ar6  \f\xC9\v !\v \v"@ A\bj\v /"E@A\0\v  \0A|Ax \0Ak(\0"Aq\x1B Axqj"   K\x1BY \0! \v\0 \0E@A\0\vA\xF8\xD7 \x006\0A\x7F\v}\x7F#\0Ak"$\0 A
:\0@@ \0("\x7F  \0\xC9\r \0(\v \0("F\r\0 \0(PA
F\r\0 \0 Aj6 A
:\0\0\f\v \0 AjA \0($\0AG\r\0 -\0\v Aj$\0\v\0\v\0A\v\xF4\x7F#\0A@j"\x07B\x007 \x07B\x007( \x07B\x0070 \x07B\x0078@@\x7F@\x7F @ Aq!@ AO@ A|q!@ \x07A j"\f  \bAtj"/\0Atj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 \bAj!\b Aj" G\r\0\v E\r\v@ \x07A j  \bAtj/\0Atj" /\0Aj;\0 \bAj!\b
Aj"
G\r\0\v\v (\0"\b \x07/>"\rE\rA!\v\f\v (\0\v!\bA\0!\r \x07/<@A!\v\f\v \x07/:@A\r!\v\f\v \x07/8@A\f!\v\f\v \x07/6@A\v!\v\f\v \x07/4@A
!\v\f\v \x07/2@A !\v\f\v \x07/0@A\b!\v\f\v \x07/.@A\x07!\v\f\v \x07/,@A!\v\f\v \x07/*@A!\v\f\v \x07/(@A!\v\f\v \x07/&@A!\v\f\v \x07/$@A!\v\f\v \x07/"@A!\fA!\vA!\bA\0\f\v  (\0"\0Aj6\0 \0A\xC06\0  (\0"\0Aj6\0 \0A\xC06\0A!\f\f\v \b \v \b \vI\x1B!A!\b@@ \x07A j \bAtj/\0\r \bAj"\b \vG\r\0\v \v!\b\v  \b  \bK\x1B!\fA\v! A\x7F!
\x07/""AK\rA AtkA\xFE\xFFq \x07/$"k"A\0H\r At \x07/&"k"A\0H\r At \x07/("k"A\0H\r At \x07/*"k"A\0H\r At \x07/,"k"A\0H\r At \x07/."k"A\0H\r At \x07/0"k"A\0H\r At \x07/2"k"A\0H\r At \x07/4"k"A\0H\r At \x07/6"\x1Bk"A\0H\r At \x07/8"k"A\0H\r At \x07/:"k"A\0H\r At \x07/<"k"A\0H\r At" \rI  \rGA\0 \0E r\x1Br\rA\0!
\x07A\0; \x07 ; \x07  j"; \x07  j";\b \x07  j";
\x07  j";\f \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  \x1Bj"; \x07  j"; \x07  j"; \x07  j;@ E\r\0 AG@ Aq A~q!A\0! @ 
Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj
;\0\v 
Ar"Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj ;\0\v
Aj!
Aj" G\r\0\vE\r\v 
Atj/\0"E\r\0 \x07 Atj" /\0"Aj;\0  Atj
;\0\vA!A\0! "!A\0!@@@ \0\0\vA!
\fA K\rA\x81!A\xD0\xED\0!A\x90\xED\0!A!\f\v \0AF!A\0!A\xD0\xEE\0!A\x90\xEE\0! \0AG@\f\vA!
\fA K\r\vA \ft"Ak! (\0!A\0! \f! A\0!A\0!\rA\x7F!@A t!@@\x7FA\0   Atj/\0" AjK\r\0 I@A\0! A\xE0\0\f\v  kAt"\0j/\0! \0 j-\0\0\v!\0A\x7F \b k"t!\x1B  \r vAtj! !
@ 
\x1Bj"
Atj" ;  :\0  \0:\0\0
\r\0\vA \bAkt! @ "\0Av! \0 \rq\r\0\v \x07A j \bAtj" /\0Ak" ;\0 \0Ak \rq \0jA\0 \0\x1B!\r Aj! A\xFF\xFFqE@ \b \vF\r   Atj/\0Atj/\0!\b\v \b \fM\r\0 \r q"\0 F\r\0\vA \b  \f \x1B"k" t! \b \vI@ \v k! \b!
@@  \x07A j
Atj/\0k"A\0L\r At! Aj" j"
\vI\r\0\v ! \vA t!\vA!
  j"A\xD4Kq  A\xD0Kqr\r (\0" \0Atj"
\f:\0
:\0\0
 Atj" kAv; \0!\f\v\v \r@  \rAtj"\0A\0; \0 :\0 \0A\xC0\0:\0\0\v  (\0 Atj6\0\v  \f6\0A\0!
\v
\v\x9C\x7F ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\v (\0!@@@ ("A
M@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFF\x07O\r A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v Aj"@ \0  \xFC
\0\0\v\f\vi\0\v\v\xCC\x7F@A\xF6\xFF\xFF\xFF\x07 k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF\x07! A\xF2\xFF\xFF\xFFM@A\v  j" At"  K\x1B"A\x07rAj A\vI\x1B!\v \0 \x1B! 9! @   \xFC
\0\0\v@  F\r\0  k"\x07E\r\0  j  j \x07\xFC
\0\0\v A
G@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\vi\0\v \0 6\v\0 \0 \0(\0A\fk(\0j"\0 jK \0\vK\x7F \0("A\bu!\x07 \0(\0"\0   Aq\x7F (\0 \x07j(\0 \x07\v j A Aq\x1B  \0(\0(\v\0\v\x9A\0 \0A:\x005@  \0(G\r\0 \0A:\x004@ \0("E@ \0A6$ \0 6 \0 6 AG\r \0(0AF\r\f\v  F@ \0("AF@ \0 6 !\v \0(0AG\r AF\r\f\v \0 \0($Aj6$\v \0A:\x006\v\vv\x7F \0($"E@ \0 6 \0 6 \0A6$ \0 \0(86\v@@ \0( \0(8G\r\0 \0( G\r\0 \0(AG\r \0 6\v \0A:\x006 \0A6 \0 Aj6$\v\v\x8D\x7F ( \0(\0" \0("kj!  k"@   \xFC
\0\0\v  6 \0 \0(\0"6 \0 (6\0  6 \0(! \0 (\b6  6\b \0(\b! \0 (\f6\b  6\f  (6\0\v\x85\x7F@@@ \0,\0\v"A\0N@A
! A
F\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A  \xA4 !\v \0 Aj6 \0(\0!\0\v \0 j"\0A\0:\0 \0 :\0\0\v,\x7F \0 A\x90\xCE\0n"At/\xC0\xBB;\0\0 \0Aj  A\x90\xCE\0lk\xAC\v4\x7F \0 A\xE4\0n"At/\xC0\xBB;\0\0 \0  A\xE4\0lkAt/\xC0\xBB;\0 \0Aj\v\xE9\x7F A\xBF\x84=M@ A\x8F\xCE\0M@ A\xE3\0M@ A M@ \0 A0r:\0\0 \0Aj\v \0 At/\xC0\xBB;\0\0 \0Aj\v A\xE7\x07M@ \0 A\xFF\xFFqA\xE4\0n"A0r:\0\0 \0  A\xE4\0lkA\xFF\xFFqAt/\xC0\xBB;\0 \0Aj\v \0 \xAC\v A\x9F\x8DM@ \0 A\x90\xCE\0n"A0j:\0\0 \0Aj  A\x90\xCE\0lk\xAC\v \0 \xAB\v A\xFF\xC1\xD7/M@ A\xFF\xAC\xE2M@ \0 A\xC0\x84=n"A0j:\0\0 \0Aj  A\xC0\x84=lk\xAB\v \0 \x8A\v A\xFF\x93\xEB\xDCM@ \0 A\x80\xC2\xD7/n"A0j:\0\0 \0Aj  A\x80\xC2\xD7/lk\x8A\v \0 A\x80\xC2\xD7/n"At/\xC0\xBB;\0\0 \0Aj  A\x80\xC2\xD7/lk\x8A\v\0 \0(\b*G@ \0(\b\xA6\v \0\v+\x7F#\0Ak"$\0  H6\f \0 \xC5 A\fjI Aj$\0\v\0 \0A\xE8\xF5\x006\0 \0A j  \0\xC3\vT\x7F#\0Ak"$\0\x7F (\0!  \0kAu"@@ \0  \0(\0F\r \0Aj!\0 Ak"\r\0\v\vA\0\v"\0  \0\x1B Aj$\0\v\x9F\x7F#\0Ak"\f$\0 \f \x006\f@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0  (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r (\0" \bkA\x9FJ\r
(\0! Aj6\0  6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r (\0"\0 \bkA\x9FJ\r
(\0! \0Aj6\0 \0 6\0A\0!\0
A\x006\0\f\v \v \vA\xF0\0j \fA\fj\xB1 \vk"\0Au"A\x1BJ\r A\xD0\x85j,\0\0!@@ \0A{q"\0A\xD8\0G@ \0A\xE0\0G\r  (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v  Aj6\0  :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0  \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 (\0"\0 \bkA\x9FJ\r\0
(\0! \0Aj6\0 \0 6\0\v  (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r
(\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ ="A\xD0\x85A\xEC\x85  (\0(0\0  n" (\0(\f\0\x006\0   (\0(\0\x006\0 \0  (\0(\0 (\f# Aj$\0\v*\x7F#\0Ak"$\0 \0 ,\0\0  \0k\xCA"\0  \0\x1B Aj$\0\v\x7F \0\xD4 \0(\0"@ \0(\f !\v\v\x97\x7F#\0Ak"\f$\0 \f \0:\0@@ \0 F@ -\0\0AG\rA\0!\0 A\0:\0\0  (\0"Aj6\0 A.:\0\0 \x07( \x07,\0\v" A\0H\x1BE\r (\0" \bkA\x9FJ\r
(\0! Aj6\0  6\0\f\v@@ \0 G\r\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 -\0\0AG\r (\0"\0 \bkA\x9FJ\r
(\0! \0Aj6\0 \0 6\0A\0!\0
A\x006\0\f\v \v \vAj \fAj\xB4 \vk"A\x1BJ\r A\xD0\x85j,\0\0!@@@@ A~qAk\0\v  (\0"G@A\x7F!\0 Ak,\0\0s ,\0\0sG\r\v  Aj6\0  :\0\0\f\v A\xD0\0:\0\0\f\v s"\0 ,\0\0G\r\0  \0\xB9:\0\0 -\0\0AG\r\0 A\0:\0\0 \x07( \x07,\0\v"\0 \0A\0H\x1BE\r\0 (\0"\0 \bkA\x9FJ\r\0
(\0! \0Aj6\0 \0 6\0\v  (\0"\0Aj6\0 \0 :\0\0A\0!\0 AJ\r
(\0Aj6\0\f\vA\0!\0\f\vA\x7F!\0\v \fAj$\0 \0\vy\x7F#\0Ak"$\0 A\fj" $ >"A\xD0\x85A\xEC\x85  (\0( \0  p" (\0(\f\0\0:\0\0   (\0(\0\0:\0\0 \0  (\0(\0 (\f# Aj$\0\vI\x7F \0 6 \0A\x006\f @ U!\v \0 6\0 \0  Atj"6\b \0  Atj6\f \0 6 \0\v6\x7F \0(" Atj!@  F@ \0 6 A\x006\0 Aj!\f\v\v\v~\x7F~#\0A\xA0k"$\0  6<  6 A\x7F6 Aj"B\0J   A\xAD )\b! )\0!\x07 @  (\x88  ( (<kjj6\0\v \0 7\b \0 \x077\0 A\xA0j$\0\v\r\0 \0  B\x7F\xBE\vD\x7F#\0Ak"$\0     B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85< )\0! \0 )\b7\b \0 7\0 Aj$\0\v\x9C\x7FA5!@ \0(" \0("AjA\x07pkA\x07jA\x07n  k"A\xF1jA\x07pAIj"A5G@ "\rA4!@@ AjA\x07pAk\0\v \0(A\x90oAk\xB3E\r\vA5\v@@ A\xF3jA\x07pAk\0\v \0(\xB3\r\vA!\v \v\x95\x07\x7F~#\0Ak"\b$\0@@@ A$L@ \0-\0\0"\r \0!\f\vA\xF8\xD7A6\0B\0!\f\v \0!@@ \xC0_E\r -\0! Aj! \r\0\v\f\v@ A\xFFq"A+k\0\0\vA\x7FA\0 A-F\x1B!\x07 Aj!\v\x7F@ ArAG\r\0 -\0\0A0G\r\0A! -\0A\xDFqA\xD8\0F@ Aj!A\f\v Aj! A\b \x1B\f\v A
\x1B\v"
\xAD!\fA\0!@@@ -\0\0"A0k"A\xFFqA
I\r\0 A\xE1\0kA\xFFqAM@ A\xD7\0k!\f\v A\xC1\0kA\xFFqAK\r A7k!\v
A\xFFqL\r\0 \b \fB\0 \vB\02A!@ \b)\bB\0R\r\0 \v \f~"\r \xADB\xFF\x83"B\x7F\x85V\r\0 \r |!\vA! !\v Aj! !\f\v\v @   \0 \x1B6\0\v@@ @A\xF8\xD7A\xC4\x006\0 \x07A\0 B\x83P\x1B!\x07 !\v\f\v  \vV\r\v \x07 \xA7AqrE@A\xF8\xD7A\xC4\x006\0 B}!\f\v  \vZ\r\0A\xF8\xD7A\xC4\x006\0\f\v \v \x07\xAC"\x85 }!\v \bAj$\0 \v\x9A\b\x7F@ \0"Aq@@ -\0\0"E A=Fr\r Aj"Aq\r\0\v\v@@A\x80\x82\x84\b (\0"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r\0@A\x80\x82\x84\b A\xBD\xFA\xF4\xE9s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r (! Aj"! A\x80\x82\x84\b krA\x80\x81\x82\x84xqA\x80\x81\x82\x84xF\r\0\v\f\v !\v@ "-\0\0"E\r Aj! A=G\r\0\v\v \0 F@A\0\v@ \0  \0k"j-\0\0\r\0A\xEC\xDB(\0"E\r\0 (\0"E\r\0@@\x7F \0!A\0 "E\r\0 \0-\0\0"\x7F@@  -\0\0"\x07G \x07Er\r Ak"E\r Aj! -\0! Aj! \r\0\vA\0!\v A\0\v -\0\0k\vE@ (\0 j"-\0\0A=F\r\v (! Aj! \r\f\v\v Aj!\b\v \b\v \0 \0\x81!\v\0 \0A\fjK \0!\v\0\v\0 \0A\xA8\xF5\x006\0 \0Aj\xF3 \0\v\xFD~\x7F#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!~ B0\x88B\xFF\xFF\x83"\xA7"A\x81\xF8\0kA\xFDM@ B\x86 \0B<\x88\x84! A\x80\xF8\0k\xAD!@ \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83"\0B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ B|!\f\v \0B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 B\x83 |!\vB\0  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD |\f\v \0 \x84P B\xFF\xFFRrE@ B\x86 \0B<\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84!\0B\xFF\f\v A\xFE\x87K@B\0!\0B\xFF\f\vA\x80\xF8\0A\x81\xF8\0 P"\x1B"\b k"\x07A\xF0\0J@B\0!\0B\0\f\v  B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!A\0!  \bG@ Aj \0 A\x80 \x07k6 ) )\x84B\0R!\v  \0  \x07g )\bB\x86 )\0"B<\x88\x84!\0@ \xAD B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x84"B\x81\x80\x80\x80\x80\x80\x80\x80\bZ@ \0B|!\0\f\v B\x80\x80\x80\x80\x80\x80\x80\x80\bR\r\0 \0B\x83 \0|!\0\v \0B\x80\x80\x80\x80\x80\x80\x80\b\x85 \0 \0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x07V"\x1B!\0 \xAD\v! A j$\0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B4\x86\x84 \0\x84\xBF\v\x89\0@ \0\x7F A\xFF\0M\r@A\xCC\xCF(\0(\0E@ A\x80\x7FqA\x80\xBFF\r\f\v A\xFFM@ \0 A?qA\x80r:\0 \0 AvA\xC0r:\0\0A\v A\x80@qA\x80\xC0G A\x80\xB0OqE@ \0 A?qA\x80r:\0 \0 A\fvA\xE0r:\0\0 \0 AvA?qA\x80r:\0A\v A\x80\x80kA\xFF\xFF?M@ \0 A?qA\x80r:\0 \0 AvA\xF0r:\0\0 \0 AvA?qA\x80r:\0 \0 A\fvA?qA\x80r:\0A\v\vA\xF8\xD7A6\0A\x7FA\v\v \0 :\0\0A\v\0 @ \0 \xC0 \xFC\v\0\v\v0\x7F#\0Ak"$\0  (\x006\0 \0 a\`A\xB0\xF1\0(\0L Aj$\0\v\xA9|D\0\0\0\0\0\0\xF0?!@ \0A\x80\bN@D\0\0\0\0\0\0\xE0\x7F! \0A\xFFI@ \0A\xFF\x07k!\0\f\vD\0\0\0\0\0\0\xF0\x7F!A\xFD \0 \0A\xFDO\x1BA\xFEk!\0\f\v \0A\x81xJ\r\0D\0\0\0\0\0\0\`! \0A\xB8pK@ \0A\xC9\x07j!\0\f\vD\0\0\0\0\0\0\0\0!A\xF0h \0 \0A\xF0hM\x1BA\x92j!\0\v  \0A\xFF\x07j\xADB4\x86\xBF\xA2\vY\x7F \0 \0(H"Ak r6H \0(\0"A\bq@ \0 A r6\0A\x7F\v \0B\x007 \0 \0(,"6 \0 6 \0  \0(0j6A\0\v\xE2\x7F A\0G!@@@ \0AqE Er\r\0 A\xFFq!@ \0-\0\0 F\r Ak"A\0G! \0Aj"\0AqE\r \r\0\v\v E\r A\xFFq" \0-\0\0F AIrE@ A\x81\x82\x84\bl!@A\x80\x82\x84\b \0(\0 s"k rA\x80\x81\x82\x84xqA\x80\x81\x82\x84xG\r \0Aj!\0 Ak"AK\r\0\v\v E\r\v A\xFFq!@  \0-\0\0F@ \0\v \0Aj!\0 Ak"\r\0\v\vA\0\vx\x7F@ \0E\r\0 \0( E\r\0 \0($"E\r\0 \0("E\r\0 (\0 \0G\r\0 (A\xB4\xFE\0kAK\r\0 (8"@ \0((  \0 \0($! \0(!\v \0((  \0 \0A\x006\v\v\xE9\0A\x98\xC7A\xA8A\xA8\xC7A\xA9AA\0A\xB4\xC7A\x96\rAA\x80\x7FA\xFF\0A\xCC\xC7A\x8F\rAA\x80\x7FA\xFF\0A\xC0\xC7A\x8D\rAA\0A\xFFA\xD8\xC7A\xC8 AA\x80\x80~A\xFF\xFFA\xE4\xC7A\xBF AA\0A\xFF\xFFA\xF0\xC7A\xD7 AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\xFC\xC7A\xCE AA\0A\x7FA\x88\xC8A\x85AA\x80\x80\x80\x80xA\xFF\xFF\xFF\xFF\x07A\x94\xC8A\xFCAA\0A\x7FA\xA0\xC8A\xF2A\bB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xAC\xC8A\xE9A\bB\0B\x7FA\xB8\xC8A\xC7
A\rA\xC4\xC8A\xAFA\b\rA\xA8-A\xA4\x1BA\xF0-AA\x8AA\xB8.AA\xB0A\x84/AA\xBFA\xDC&A\xD0/A\0A\x98\0A\xF8/A\0A\xDD\0A\xA00AA\xB6\0A\xC80AA\xE5\0A\xF00AA\x84\0A\x981AA\xAC\0A\xC01AA\xC9\0A\xE81AA\x82\x1B\0A\x902AA\xA0\x1B\0A\xF8/A\0A\xAF\0A\xA00AA\x8E\0A\xC80AA\xF1\0A\xF00AA\xCF\0A\x981AA\xF7\0A\xC01AA\xD5\0A\xB82A\bA\xB4\0A\xE02A A\x92\0A\x883AA\xEF\0A\xB03A\x07A\xC7\x1B\0\v>\x7F#\0Ak"$\0  \x006\f\x7F \0AO@A\xAE A\fj\xC7A\0\f\v \0At(\x98-\v Aj$\0\v\x85\x7F@  k"A\xF7\xFF\xFF\xFF\x07I@@ A
M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v  k"E  FrE@ \0  \xFC
\0\0\v \0 jA\0:\0\0\f\vi\0\v\v6\x7F \0(\b" Atj!@  FE@ A\x006\0 Aj!\f\v\v \0 6\b\vD\x7F#\0Ak"$\0 \0(\0!\0  6\b  \x006 A\x9F6\0A\xED\v a\`A\xB0\xF1\0(\0L Aj$\0\v\`\x7F  \0(" k"\x07j! !@  M@ \0 6 \x07E  FrE@  \x07k  \x07\xFC
\0\0\v  -\0\0:\0\0 Aj! Aj!\f\v\v\v\0 \0(\0"\0@ \0\v\v\f\0  \0(\0\0\0\v+\x7F \0(! \0(\b!@  G@ \0 Ak"6\b\f\v\v\v\x07\0 \0\0\v\x7F#\0Ak"$\0  \x006\0A\xEC \xDC\0\v\0  \0(\0j 6\0\v\r\0  \0(\0j(\0\vQ\x7F@ E\r\0 A\x8C\xC6E"E\r\0 (\b \0(\bA\x7Fsq\r\0 \0(\f( (\f(G\r\0 \0(( ((F!\v \v{\x7F \0("Aq!\x7F -\x007AF@ A\bu" E\r (\0 j(\0\f\v A\bu E\r\0  \0(\0(68A\0!A\0\v! \0(\0"\0   j A Aq\x1B \0(\0(\b\0\v\r\0 \0( (F\v\xF6\x7F#\0Ak"$\0  6\fA\x94\xC4(\0" \0 \xCB \0y \0jAk-\0\0A
G@@@ (L"\0A\0N@ \0E\rA\x84\xCF(\0 \0A\xFF\xFF\xFF\xFFqG\r\v@ (PA
F\r\0 ("\0 (F\r\0  \0Aj6 \0A
:\0\0\f\v \x9F\f\v  (L"\0A\xFF\xFF\xFF\xFF \0\x1B6L@@ (PA
F\r\0 ("\0 (F\r\0  \0Aj6 \0A
:\0\0\f\v \x9F\v (L A\x006L\v\v\x9C\0\v\x88\x7F@@@ \0,\0\v"A\0N@A! AF\r \0 AjA\xFF\0q:\0\v\f\v \0(" \0(\bA\xFF\xFF\xFF\xFF\x07qAk"G\r\v \0 A  \xFF !\v \0 Aj6 \0(\0!\0\v \0 Atj"\0A\x006 \0 6\0\v\x9B\x7FA\xF6\xFF\xFF\xFF k O@A\xF7\xFF\xFF\xFF! \0(\0 \0 \0,\0\vA\0H\x1B!
A\xF2\xFF\xFF\xFFM@  j" At"  K\x1BArAj! \v U!@ E\r\0 At"\bE\r\0 
\b\xFC
\0\0\v@ E\r\0 At"\bE\r\0  Atj \x07 \b\xFC
\0\0\v   j"\bk!\x07@  \bF\r\0 \x07At"E\r\0  At"\bj Atj \b
j Atj \xFC
\0\0\v AG@
!\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b \0  j \x07j"\x006  \0AtjA\x006\0\v0\0\v\x8A\x7F A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @  6\0 Ak! Aj!\f\v\v \0 AtjA\x006\0\v0\0\v\xA0\x7F \0(\b"A\xFF\xFF\xFF\xFF\x07qAkA
\0,\0\v"A\0H"\x1B" O@ \0(\0 \0 \x1B!@ \x7F @   \xFC
\0\0\v \0,\0\v Av\v\xC0A\0H@ \0 6\f\v \0 A\xFF\0q:\0\v\v  jA\0:\0\0\v \0   k \0(  \x1B"\0A\0 \0  \x89\v\x87\x7F A\xF7\xFF\xFF\xFF\x07I@@ A
M@ \0 :\0\v\f\v A\x07r"Aj9! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v ! \0!@ @  :\0\0 Ak! Aj!\f\v\v \0 jA\0:\0\0\vi\0\v\0 \0 F@ \0A\0:\0x\v !\v<\x7F#\0Ak"$\0@@ AK\r\0 \0-\0xAq\r\0 \0A:\0x\f\v U!\0\v Aj$\0 \0\v \0 \0\xAE!\v\0 \0A\xF0\x906\0 \0Aj  \0\v\0 \0A\xC8\x906\0 \0A\fj  \0\v\x80\x7F !\0@@  \x07M \0 Or\r\0 \0,\0\0"A\xFFq!\x7FA A\0N\r\0 ABI\r A_M@  \0kAH\r \0-\0A\xC0qA\x80G\rA\f\v AoM@  \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\rA\f\v  \0kAH AtKr\r \0-\0! \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G A\xC0qA\x80Gr A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\rA\v! \x07Aj!\x07 \0 j!\0\f\v\v \0 k\v\xB8\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O  OrE@ ,\0\0"\bA\xFFq!\x7F \bA\0N@ A\xFF\xFF\xC3\0K\rA\f\v \bABI\r \bA_M@A  kAH\rA!\b -\0" A\xC0qA\x80G\r A?q AtA\xC0qr!A\f\v \bAoM@A!\b  k"
AH\r ,\0! @@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\b\v A\xA0\x7FH\r\f\x07\v A\xBF\x7FJ\r\v
AF\r -\0"\bA\xC0qA\x80G\r \bA?q A\ftA\x80\xE0q A?qAtrr!A\f\v \bAtK\rA!\b  k"
AH\r ,\0! @@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\x07\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v
AF\r -\0"\vA\xC0qA\x80G\r
AF\r -\0"
A\xC0qA\x80G\rA!\b
A?q \vAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrr"A\xFF\xFF\xC3\0K\rA\v!\b  6\0 \0  \bj"6\f \0 Aj"6\b\f\v\v  I!\b\v \b\f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xF5\0#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O@A\0!\f\vA! (\0"A\xFF\xFF\xC3\0K A\x80pqA\x80\xB0Fr\r\0@ A\xFF\0M@A!  \0(\b"kA\0L\r \0 Aj6\b  :\0\0\f\v A\xFFM@  \0(\b"kAH\r \0 Aj6\b  AvA\xC0r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v  \0(\b"k! A\xFF\xFFM@ AH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v AH\r \0 Aj6\b  AvA\xF0r:\0\0 \0 \0(\b"Aj6\b  A\fvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\v \f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\x92\x7F !\0@@  M \0 Or\r\0\x7F \0Aj \0-\0\0"\xC0A\0N\r\0 A\xC2I\r A\xDFM@  \0kAH\r \0-\0A\xC0qA\x80G\r \0Aj\f\v A\xEFM@  \0kAH\r \0-\0 \0,\0!@@ A\xEDG@ A\xE0G\r A\`qA\xA0\x7FF\r\f\v A\xA0\x7FN\r\f\v A\xBF\x7FJ\r\vA\xC0qA\x80G\r \0Aj\f\v  \0kAH A\xF4Kr  kAIr\r \0-\0!\x07 \0-\0!\b \0,\0!@@@@ A\xF0k\0\v A\xF0\0jA\xFFqA0O\r\f\v A\x90\x7FN\r\f\v A\xBF\x7FJ\r\v \bA\xC0qA\x80G \x07A\xC0qA\x80Gr \x07A?q \bAtA\xC0q AtA\x80\x80\xF0\0q A?qA\ftrrrA\xFF\xFF\xC3\0Kr\r Aj! \0Aj\v!\0 Aj!\f\v\v \0 k\v\x81\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O  OrE@A! \0\x7F -\0\0"\xC0A\0N@  ;\0A\f\v A\xC2I\r A\xDFM@A  kAH\r -\0"\bA\xC0qA\x80G\r  \bA?q AtA\xC0qr;\0A\f\v A\xEFM@A!  k"
AH\r ,\0!\b@@ A\xEDG@ A\xE0G\r \bA\`qA\xA0\x7FG\r\b\f\v \bA\xA0\x7FN\r\x07\f\v \bA\xBF\x7FJ\r\v
AF\r -\0" A\xC0qA\x80G\r  A?q \bA?qAt A\ftrr;\0A\f\v A\xF4K\rA!  k"
AH\r -\0"\v\xC0!\b@@@@ A\xF0k\0\v \bA\xF0\0jA\xFFqA0O\r\x07\f\v \bA\x90\x7FN\r\f\v \bA\xBF\x7FJ\r\v
AF\r -\0"\bA\xC0qA\x80G\r
AF\r -\0"
A\xC0qA\x80G\r  kAH\rA!
A?q"
\bAt"\fA\xC0q \vA\ftA\x80\xE0q A\x07q"AtrrrA\xFF\xFF\xC3\0K\r 
\fA\xC0\x07qrA\x80\xB8r;  \bAvAq \vAt" A\xC0q A\btr A<qrrA\xC0\xFF\0jA\x80\xB0r;\0 Aj!A\v j"6\f \0 Aj"6\b\f\v\v  I! \v \f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v\xCB\x7F#\0Ak"\0$\0\x7F \0 6\f \0 6\b@@@  O@A\0!\f\vA!@@ /\0"A\xFF\0M@A!  \0(\b"kA\0L\r \0 Aj6\b  :\0\0\f\v A\xFFM@  \0(\b"kAH\r \0 Aj6\b  AvA\xC0r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v A\xFF\xAFM@  \0(\b"kAH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA?qA\x80r:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\f\v A\xFF\xB7M@A!  kAH\r /"\bA\x80\xF8qA\x80\xB8G\r  \0(\b" kAH\r \bA\xFF\x07q A
tA\x80\xF8q A\xC0\x07q"A
trrA\xFF\xFF?K\r \0 Aj6\f \0 Aj6\b AvAj"AvA\xF0r:\0\0 \0 \0(\b"Aj6\b  AtA0q AvAqrA\x80r:\0\0 \0 \0(\b"Aj6\b  \bAvAq AtA0qrA\x80r:\0\0 \0 \0(\b"Aj6\b  \bA?qA\x80r:\0\0\f\v A\x80\xC0I\r  \0(\b"kAH\r \0 Aj6\b  A\fvA\xE0r:\0\0 \0 \0(\b"Aj6\b  AvA\xBFq:\0\0 \0 \0(\b"Aj6\b  A?qA\x80r:\0\0\v \0 \0(\fAj"6\f\f\v\vA\f\v \f\vA\v  \0(\f6\0 \x07 \0(\b6\0 \0Aj$\0\v3\x7F#\0Ak"$\0  \0H6\fAAA\xCC\xCF(\0(\0\x1B A\fjI Aj$\0\v/\x7F#\0Ak"$\0  H6\f \0   \x98 A\fjI Aj$\0\v\0  6\0 \x07 6\0A\v+\x7F \0A\xDC\x876\0@ \0(\b"E\r\0 \0-\0\fAqE\r\0 !\v \0\v\0 \v'\x7F \0(\0(\0(\0A\x98\xE0A\x98\xE0(\0Aj"6\0 6\v \0 \0(\0#\v\xDB
\x7F \0A\x94\xE0-\0\0E@A\x8C\xE0-\0\0E@A\xEC\xDEA\xC8\x876\0A\xF0\xDEA\x006\0A\xF8\xDFA\0:\0\0A\xFC\xDEA\x006\0A\xF4\xDEB\x007\0A\xF8\xDEA\x80\xDFA\xE3"\x006\0A\xF4\xDE \x006\0A\xFC\xDE \0A\xF8\0j6\0A\xF4\xDEA\xB9A\xFC\xDFA\xAF\x80A\xF8\xDEA\xF4\xDE(\x006\0A\xFC\xE9A\xE8\x9B6\0A\x80\xEAA\x006\0A\xFC\xE9A\xC4\xDD-.A\x84\xEAA\x88\x9C6\0A\x88\xEAA\x006\0A\x84\xEAA\xCC\xDD-.A\x8C\xEAA\xDC\x876\0A\x94\xEAA\x90\x886\0A\x98\xEAA\0:\0\0A\x90\xEAA\x006\0A\x8C\xEAA\xA4\xE0-.A\x9C\xEAA\xC8\x936\0A\xA0\xEAA\x006\0A\x9C\xEAA\x9C\xE0-.A\xA4\xEAA\xE0\x946\0A\xA8\xEAA\x006\0A\xA4\xEAA\xAC\xE0-.A\xAC\xEAA\x98\x906\0A\xB0\xEAA\x006\0A\xB4\xEA*6\0A\xAC\xEAA\xB4\xE0-.A\xB8\xEAA\xF4\x956\0A\xBC\xEAA\x006\0A\xB8\xEAA\xBC\xE0-.A\xC0\xEAA\xDC\x976\0A\xC4\xEAA\x006\0A\xC0\xEAA\xCC\xE0-.A\xC8\xEAA\xE8\x966\0A\xCC\xEAA\x006\0A\xC8\xEAA\xC4\xE0-.A\xD0\xEAA\xD0\x986\0A\xD4\xEAA\x006\0A\xD0\xEAA\xD4\xE0-.A\xE4\xEAB\x007\0A\xE0\xEAA\xAE\xD8\0;\0A\xD8\xEAA\xC8\x906\0A\xDC\xEAA\x006\0A\xEC\xEAA\x006\0A\xD8\xEAA\xDC\xE0-.A\x80\xEBB\x007\0A\xFC\xEAA,6\0A\xF0\xEAA\xF0\x906\0A\xF4\xEAB\x80\x80\x80\x80\xE07\0A\x88\xEBA\x006\0A\xF0\xEAA\xE4\xE0-.A\x8C\xEBA\xA8\x9C6\0A\x90\xEBA\x006\0A\x8C\xEBA\xD4\xDD-.A\x94\xEBA\xA0\x9E6\0A\x98\xEBA\x006\0A\x94\xEBA\xDC\xDD-.A\x9C\xEBA\xF4\x9F6\0A\xA0\xEBA\x006\0A\x9C\xEBA\xE4\xDD-.A\xA4\xEBA\xE0\xA16\0A\xA8\xEBA\x006\0A\xA4\xEBA\xEC\xDD-.A\xAC\xEBA\xC4\xA96\0A\xB0\xEBA\x006\0A\xAC\xEBA\x94\xDE-.A\xB4\xEBA\xD8\xAA6\0A\xB8\xEBA\x006\0A\xB4\xEBA\x9C\xDE-.A\xBC\xEBA\xCC\xAB6\0A\xC0\xEBA\x006\0A\xBC\xEBA\xA4\xDE-.A\xC4\xEBA\xC0\xAC6\0A\xC8\xEBA\x006\0A\xC4\xEBA\xAC\xDE-.A\xCC\xEBA\xB4\xAD6\0A\xD0\xEBA\x006\0A\xCC\xEBA\xB4\xDE-.A\xD4\xEBA\xDC\xAE6\0A\xD8\xEBA\x006\0A\xD4\xEBA\xBC\xDE-.A\xDC\xEBA\x84\xB06\0A\xE0\xEBA\x006\0A\xDC\xEBA\xC4\xDE-.A\xE4\xEBA\xAC\xB16\0A\xE8\xEBA\x006\0A\xE4\xEBA\xCC\xDE-.A\xF4\xEBA\xD8\xA36\0A\xEC\xEBA\xA8\xA36\0A\xF0\xEBA\x006\0A\xEC\xEBA\xF4\xDD-.A\x80\xECA\xE4\xA56\0A\xF8\xEBA\xB4\xA56\0A\xFC\xEBA\x006\0A\xF8\xEBA\xFC\xDD-.A\x84\xECA\x90\x936\0A\x88\xECA\x006\0*!\0A\x84\xECA\xA4\xA76\0A\x8C\xEC \x006\0A\x84\xECA\x84\xDE-.A\x90\xECA\x90\x936\0A\x94\xECA\x006\0*!\0A\x90\xECA\xC4\xA86\0A\x98\xEC \x006\0A\x90\xECA\x8C\xDE-.A\x9C\xECA\xD4\xB26\0A\xA0\xECA\x006\0A\x9C\xECA\xD4\xDE-.A\xA4\xECA\xCC\xB36\0A\xA8\xECA\x006\0A\xA4\xECA\xDC\xDE-.A\x8C\xE0A:\0\0A\x88\xE0A\xEC\xDE6\0\vA\x90\xE0A\x88\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\vA\x94\xE0A:\0\0\vA\x90\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\xB1\x7F \0A\xC8\x876\0 \0A\bj!@ \0(\f \0(\b"kAu K@@  Atj(\0"E\r\0  ("Ak6 \r\0  (\0(\b\0\v Aj!\f\v\v \0A\x90j #\0Ak"$\0  6\f (\f"(\0"@  6 (\b A\fj \xE2\v Aj$\0 \0\v \0 \0A\x98\x906\0 \0(\b*G@ \0(\b\xA6\v \0\v\0A\x7F\v\x9D\x07 \x7F  \x006\0AA\0 \x07\x1B! A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! AtAk"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \r( \r,\0\v"\x07 \x07A\0H"\x07\x1BE\r \r(\0 \r \x07\x1B(\0!\x07  (\0"Aj6\0  \x076\0\f\v E\r \f( \f,\0\v"\x07 \x07A\0H"\x1B"E\r (\0!\x07 At"@ \x07 \f(\0 \f \x1B \xFC
\0\0\v  \x07 j6\0\f\v (\0  j"!\x07@@  \x07M\r\0 A\xC0\0 \x07(\0 (\0(\f\0E\r\0 \x07Aj!\x07\f\v\v A\0J@ (\0! !@ E  \x07OrE@ Ak! \x07Ak"\x07(\0!  Aj"6\0  6\0 !\f\v\v \x7F A0 (\0(,\0A\0\v! (\0!@ A\0LE@  Aj"6\0  6\0 Ak! !\f\v\v  (\0"Aj6\0  6\0\v@  \x07F@ A0 (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  \x07F\r@  G@ !\f\v  (\0"Aj6\0 
6\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v \x07Ak"\x07(\0!  (\0"Aj6\0  6\0 Aj!\f\0\v\0\v (\0\x8F\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \xFE!\f\v \xFD!\v@ @
Aj"\0  (\0(,\0 
(6\0\0 \0  (\0( \0\f\v
Aj"\0  (\0((\0 
(6\0\0 \0  (\0(\0\v \b \0| \0    (\0(\f\0\x006\0   (\0(\0\x006\0
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0| \0   (\0($\0\x006\0
Aj$\0\v\x7FA\f9"\0A\x006\b \0B\x007\0 \0\v\xF7 \x7F  \x006\0 A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! Ak"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A (\0(\0!  (\0"Aj6\0  :\0\0\f\v \r( \r,\0\v" A\0H"\x1BE\r \r(\0 \r \x1B-\0\0!  (\0"Aj6\0  :\0\0\f\v E\r \f( \f,\0\v" A\0H"\x1B"E\r (\0! @  \f(\0 \f \x1B \xFC
\0\0\v   j6\0\f\v (\b! (\0  \x07j"!@@  M\r\0 ,\0\0"A\0H\r\0  Atj-\0\0A\xC0\0qE\r\0 Aj!\f\v\v "A\0J@@ E  OrE@ Ak! Ak"-\0\0!  (\0"Aj6\0  :\0\0\f\v\v \x7F A0 (\0(\0A\0\v!@  (\0"Aj6\0 A\0LE@  :\0\0 Ak!\f\v\v  :\0\0\v@  F@ A0 (\0(\0!  (\0"Aj6\0  :\0\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  F\r@  G@ !\f\v  (\0"Aj6\0 
:\0\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v Ak"-\0\0!  (\0"Aj6\0  :\0\0 Aj!\f\0\v\0\v (\0c\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \x83!\f\v \x82!\v@ @
Aj"\0  (\0(,\0 
(6\0\0 \0  (\0( \0\f\v
Aj"\0  (\0((\0 
(6\0\0 \0  (\0(\0\v \b \0X \0    (\0(\f\0\0:\0\0   (\0(\0\0:\0\0
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0X \0   (\0($\0\x006\0
Aj$\0\v
\0 \0A\xA4\xDE^\v
\0 \0A\xAC\xDE^\v\xD7\x7F@A\xF6\xFF\xFF\xFF k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF! A\xF2\xFF\xFF\xFFM@  j" At"  K\x1BArAj!\v \0 \x1B! U!@ E\r\0 At"\x07E\r\0   \x07\xFC
\0\0\v@  F\r\0  kAt"\x07E\r\0 At" j  j \x07\xFC
\0\0\v AG@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\v0\0\v \0 6\v\xD8\x7F#\0A\x90k"\v$\0 \v
6\x88 \v 6\x8C@ \0 \vA\x8Cj(@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j!\f \vA(j \vAj#\0Ak"
$\0@ @
Aj" \xFE" (\0(,\0\f\v
Aj" \xFD" (\0(,\0\v \v
(6\0\\   (\0( \0 |     (\0(\0 |   \v  (\0(\f\0\x006X \v  (\0(\0\x006T   (\0(\0 X     (\0(\0 \f |   \v  (\0($\0\x006
Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
@
!@@\x7F@@@@ AF\r\0 \0 \vA\x8Cj(\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\f\v AF\r
\x07A \0: \x07(\0(\f\0\r\x07  (\0Ar6\0A\0!\0\f\v AG\r\x07\f \v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0: \v(( \vA(j" \v,\x003"A\0H\x1B(\0G\r\0 \0Q A\0:\0\0   \v(, \v,\x003" A\0H\x1BAK\x1B!
\f
\v \v( \v,\0#"
A\0H\x1B@ \0: \v( \vAj \v,\0#"
A\0H\x1B(\0F\r \v-\x003!\v \v(
A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r  (\0Ar6\0A\0!\0\f\v E\r \v  A\0G:\0\0\f\b\v   AIrrE@A\0!
AF \v-\0_A\0GqE\r \v \v(8" \vA8j \v,\0C"
A\0H\x1B!@ E\r\0 \fAk-\0\0AK\r\0@@   \vA8j
\xC0A\0H"\f\x1B \v(<
A\xFFq \f\x1BAtjF\r\0 \x07A (\0 \x07(\0(\f\0 \v(8! \v-\0C!
E\r\0 Aj!\f\v\v   \vA8j
\xC0A\0H\x1B"\fkAu"\r \v(\f \v,\0" A\0H"\x1B"M\x7F At \v(\b \vA\bj \x1Bj"
\rAtk!#\0Ak"\r$\0  \f
kA|qhE \rAj$\0\r \v-\0C!
\v(8 \v \vA8j
\xC0A\0H\x1B!\v@@  \v(8 \vA8j \v,\0C"A\0H"
\x1B \v(< 
\x1BAtjF\r\0 \0 \vA\x8Cj(\r\0 \0: (\0G\r\0 \0Q Aj!\f\v\v E\r\x07 !
 \v(8 \vA8j \v,\0C"A\0H"\x1B \v(<  \x1BAtjF\r\b  (\0Ar6\0A\0!\0\f\v@@ \0 \vA\x8Cj(\r\0\x7F \x07A\xC0\0 \0:"
\x07(\0(\f\0@ (\0" \v(\x88F@ \b \vA\x88jk (\0!\v Aj6\0 
6\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r
\v(TG\r \v(d"
\v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v
Aj6d
6\0A\0\v! \0Q\f\v\v E \v(d"
\v(hFrE@ \v(\`
F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v
Aj6d
6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj(E@ \0: \v(XF\r\v  (\0Ar6\0A\0!\0\f\v@ \0Q \v(A\0L\r@ \0 \vA\x8Cj(E@ \x07A\xC0\0 \0: \x07(\0(\f\0\r\v  (\0Ar6\0A\0!\0\f\v (\0 \v(\x88F@ \b \vA\x88jk\v \0:! (\0"Aj6\0  6\0 \v \v(Ak6\f\0\v\0\v !
(\0 \b(\0G\r\x07  (\0Ar6\0A\0!\0\f\v \0Q A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
\f\v@ E\r\0A!\x07@ \x07 ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj(E@ \0: \x07At (\0  ,\0\vA\0H\x1Bj(\0F\r\v  (\0Ar6\0A\0!\0\f\v \0Q \x07Aj!\x07\f\0\v\0\vA!\0 \v(h" \v(d"F\r\0A\0!\0 \vA\x006\0 \vA\xC8\0j   \v5 \v(\0@  (\0Ar6\0\f\vA!\0\v \vA\bj  \vAj  \vA(j  \vA8j  \vA\xC8\0j  \v(h! \vA\x006h E\r  \v(l\0\f\vA\0\f\vA\v!@ E@ \vA\bj \0(\0B\xDDA!\f\v \0 \vA\x8Cj(\r \x07A \0: \x07(\0(\f\0E\rA\0!\f\0\v\0\v !
\v Aj!\f\0\v\0\v \vA\x90j$\0 \0\v\0 \0@ \01\v \0!\v
\0 \0A\x94\xDE^\v
\0 \0A\x9C\xDE^\v\xB8\x7F (\0!\x07A\0 \0(\0" \0(A\xE3\0F"\x1BA\x7FA (\0 k"At" AM\x1B A\xFF\xFF\xFF\xFF\x07O\x1B"\b\x9D"@@ E@ \0 6\0\f\v \0(\0! @   \xFC
\0\0\v \0 6\0 E\r\0  \0(\0 \0(\0!\v \0A\xE4\x006   \x07 kj6\0  \0(\0 \bj6\0\v0\0\v\xEE\x7F#\0A\x90k"\v$\0 \v
6\x88 \v 6\x8C@ \0 \vA\x8Cj)@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j! \vA(j \vAj#\0Ak"
$\0@ @
Aj" \x83" (\0(,\0\f\v
Aj" \x82" (\0(,\0\v \v
(6\0\\   (\0( \0 X     (\0(\0 X   \v  (\0(\f\0\0:\0[ \v  (\0(\0\0:\0Z   (\0(\0 X     (\0(\0  X   \v  (\0($\0\x006
Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
@@
!@@@@@@@\x7F@@@ AF\r\0 \0 \vA\x8Cj)\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\v AF\r\r \0;"A\0N@ \x07(\b Atj-\0\0Aq\r\x07\v  (\0Ar6\0A\0!\0\f\v AG\r\f\f\v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0;A\xFFq \v(( \vA(j" \v,\x003"A\0H\x1B-\0\0G\r\0 \0S A\0:\0\0   \v(, \v,\x003" A\0H\x1BAK\x1B!
\f\v \v( \v,\0#"
A\0H\x1B@ \0;A\xFFq \v( \vAj \v,\0#"
A\0H\x1B-\0\0F\r \v-\x003!\v \v(
A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r  (\0Ar6\0A\0!\0\f\v E\r\f\v  A\0G:\0\0\f\v\v   AIrrE@A\0!
AF \v-\0_A\0GqE\r\r\v \v(8" \vA8j \v,\0C"\rA\0H"\x1B! E\r\b \fAk-\0\0AK\r\b  \v(< \r \x1Bj! \x07(\b!\f !
@ 
F\r\b
,\0\0"A\0H\r\x07 \f Atj-\0\0AqE\r\x07
Aj!
\f\0\v\0\v@@ \0 \vA\x8Cj)\r\0\x7F@ \0;"
A\0H\r\0 \x07(\b
Atj-\0\0A\xC0\0qE\r\0 (\0" \v(\x88F@ \b \vA\x88j\x84 (\0!\v Aj6\0 
:\0\0 Aj\f\v \v(L \v,\0S" A\0H\x1BE Er\r \v-\0Z
A\xFFqG\r \v(d"
\v(\`F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v
Aj6d
6\0A\0\v! \0S\f\v\v E \v(d"
\v(hFrE@ \v(\`
F@ \vA\xE8\0j \vA\xE4\0j \vA\xE0\0jk \v(d!
\v \v
Aj6d
6\0\v@ \v(A\0L\r\0@ \0 \vA\x8Cj)E@ \0;A\xFFq \v-\0[F\r\v  (\0Ar6\0A\0!\0\f\v@ \0S \v(A\0L\r@@ \0 \vA\x8Cj)\r\0 \0;"A\0H\r\0 \x07(\b Atj-\0\0A\xC0\0q\r\v  (\0Ar6\0A\0!\0\f\v (\0 \v(\x88F@ \b \vA\x88j\x84\v \0;! (\0"Aj6\0  :\0\0 \v \v(Ak6\f\0\v\0\v !
(\0 \b(\0G\r\v  (\0Ar6\0A\0!\0\f\f\v \0S A:\0\0 \vAj  \v( \v,\0#" A\0H\x1BAK\x1B!
\f
\v@ E\r\0A!@  ( ,\0\v" A\0H\x1BO\r@ \0 \vA\x8Cj)E@ \0;A\xFFq (\0  ,\0\vA\0H\x1B j-\0\0F\r\v  (\0Ar6\0A\0!\0\f\r\v \0S Aj!\f\0\v\0\vA!\0 \v(h" \v(d"F\r
A\0!\0 \vA\x006\0 \vA\xC8\0j   \v5 \v(\0@  (\0Ar6\0\f\v\vA!\0\f
\vA\0\f\vA\v!@ E@ \vA\bj \0(\0@\xC0\xAAA!\f\v \0 \vA\x8Cj)\r \0;"A\0H\r \x07(\b Atj-\0\0AqE\rA\0!\f\0\v\0\v
!\v  k"
\v(\f \v,\0"\f \fA\0H"\f\x1B"M@ \v(\b \vA\bj \f\x1B j"\r
k"
 \r
khE\r \v(8! \v-\0C!\r\v  \vA8j \r\xC0A\0H\x1B!\f\v !\v@@  \v(8 \vA8j \v,\0C"A\0H"
\x1B \v(< 
\x1BjF\r\0 \0 \vA\x8Cj)\r\0 \0;A\xFFq -\0\0G\r\0 \0S Aj!\f\v\v \r\v !
\f\v !
 \v(8 \vA8j \v,\0C"A\0H"\x1B \v(<  \x1BjF\r\0  (\0Ar6\0A\0!\0\f\v Aj!\f\v\v \vA\bj  \vAj  \vA(j  \vA8j  \vA\xC8\0j  \v(h! \vA\x006h E\r\0  \v(l\0\v \vA\x90j$\0 \0\v\v\0 \0AA-\xDF\v\v\0 \0AA-\xE1\vd\x7F#\0Ak"$\0 A\0:\0  :\0  :\0\r A%:\0\f @  :\0  :\0\r\v   (\0 k A\fj  \0(\0\xB4 j6\0 Aj$\0\vA\0    AN! -\0\0AqE@ \0 A\xD0j A\xECj  A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0   \0A\bj \0(\b(\0\0"\0 \0A\xA0j  A\0\x95 \0k"\0A\x9FL@  \0A\fmA\fo6\0\v\v@\0   \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j  A\0\x95 \0k"\0A\xA7L@  \0A\fmA\x07o6\0\v\vA\0    AO! -\0\0AqE@ \0 A\xD0j A\xECj  A\xE4\0I\x1B A\xC5\0H\x1BA\xECk6\0\v\v@\0   \0A\bj \0(\b(\0\0"\0 \0A\xA0j  A\0\x97 \0k"\0A\x9FL@  \0A\fmA\fo6\0\v\v@\0   \0A\bj \0(\b(\0\0\0"\0 \0A\xA8j  A\0\x97 \0k"\0A\xA7L@  \0A\fmA\x07o6\0\v\v\0A\v\xBD\x7F#\0Ak"
$\0 =!
Aj n"\f \f(\0(\0  6\0@@ \0"\b-\0\0"A+k\0\0\v \xC0 (\0(,\0!  (\0"\x07Aj6\0 \x07 6\0 \0Aj!\b\v@@  \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 A0 (\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 ,\0 (\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 Aj"\b!@  M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@  M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@
(\b
,\0"\x07 \x07A\0H\x1BE@ \b  (\0 (\0(0\0  (\0  \bkAtj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@  \x07M@  \b \0kAtj (\0\x8F@
("
Aj"
,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v   \x1B \rj,\0\0G\r\0  (\0"\vAj6\0 \v 6\0A\0!\v \r \r
(\b
,\0" A\0H\x1BAkIj!\r\v \x07,\0\0 (\0(,\0!  (\0"Aj6\0  6\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@  M\r Aj!\x07 ,\0\0"A.G@  (\0(,\0!  (\0"\bAj6\0 \b 6\0 \x07!\f\v\v \f \f(\0(\f\0\0!  (\0"\bAj"\v6\0 \b 6\0\f\v (\0!\v !\x07\v \x07  \v (\0(0\0  (\0  \x07kAtj"6\0     \0kAtj  F\x1B6\0
Aj 
Aj$\0\v\xC4\x7F#\0A\x90k"$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! A\x83j!@ E A\x80qEr\r\0 \b@ A0:\0\x83 A\x84j!\f\v \x07A\bG\r\0 A0:\0\x83 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\x84 A\x85j!\v A\xF8\0j  A\x90j  \x94 (x!@ A\x88\x80qA\x88\x80G\r\0@  F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A\x83j"  G! Aj"\x07 $    Aj" A\fj A\bj \x07\x90 (# \0  (\f (\b  \\ A\x90j$\0\vC\x7F#\0Ak"$\0  6\fA\xB0 A\xF0\xC7A\xCB,A A\fj"4A\xF0\xC7A\xCF,A 4 Aj$\0 \0\v\xAC\x7F#\0Ak"
$\0 >!
Aj p"\f \f(\0(\0  6\0@@ \0"\b-\0\0"A+k\0\0\v \xC0 (\0(\0!  (\0"\x07Aj6\0 \x07 :\0\0 \0Aj!\b\v@@  \b"kAL\r\0 -\0\0A0G\r\0 -\0A rA\xF8\0G\r\0 A0 (\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 ,\0 (\0(\0!\x07  (\0"\bAj6\0 \b \x07:\0\0 Aj"\b!@  M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@  M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@
(\b
,\0"\x07 \x07A\0H\x1BE@ \b  (\0 (\0( \0  (\0  \bkj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@  \x07M@  \b \0kj (\0c@
("
Aj"
,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v   \x1B \rj,\0\0G\r\0  (\0"\vAj6\0 \v :\0\0A\0!\v \r \r
(\b
,\0" A\0H\x1BAkIj!\r\v \x07,\0\0 (\0(\0!  (\0"Aj6\0  :\0\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@  M@ !\x07\f\v Aj!\x07 ,\0\0"A.G\r \f \f(\0(\f\0\0!  (\0"\bAj6\0 \b :\0\0\v \x07  (\0 (\0( \0  (\0  \x07kj"6\0     \0kj  F\x1B6\0
Aj 
Aj$\0\v  (\0(\0!  (\0"\bAj6\0 \b :\0\0 \x07!\f\0\v\0\v\xB9\x7F#\0A@j"$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! A3j!@ E A\x80qEr\r\0 \b@ A0:\x003 A4j!\f\v \x07A\bG\r\0 A0:\x003 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\x004 A5j!\v A(j  A@k  \x94 ((!@ A\x88\x80qA\x88\x80G\r\0@  F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A3j"  G! Aj"\x07 $    Aj" A\fj A\bj \x07\x93 (# \0  (\f (\b  Z A@k$\0\v\xED\b\x7F#\0Ak"$\0A\xA5\bAA\xA0 A\xEE AAA\0A\0\fA\x92\fAA\xF4 A\xA8!AAA\0A\0\fA\x88\xCE-\0\0E@A\x88\xCEA:\0\0A\xAC!A\xB8\xC8\x07\vA\xFC A\x9C%A\xD4%A\0A\x8A&AA\x8D&A\0A\x8D&A\0A\x83A\x8F&A\x07
A\xFC AA\x94&A\x98&A"A\b#\0Ak"\0$\0 \0A 6\fA\xFC A\x9CAA\x9C&A\xA8&A# \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A
6\fA\xFC A\xEDAA\xB0&A\xC0&A$ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\v6\fA\xFC A\x83AA\xC8&A\xD0&A% \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\f6\fA\xFC A\xBF
AA\xF8&A\x84'A& \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A\r6\fA\xFC A\xBB
AA\x90'A\xA0'A' \0A\fj4A\0A\0A\0 \0Aj$\0A\xFC A\xB8\xC8A\x83A\xBF
 A\x94\xCE-\0\0E@A\x94\xCEA:\0\0A\xA8'A\xC0\xC7\x07\vA\xB4*A\xE0*A\x98+A\0A\xCE+AA\x8D&A\0A\x8D&A\0A\xD7A\xD1+A
A\xB4*AA\xD4+A\xD8+A(A#\0Ak"\0$\0 \0A6\fA\xB4*A\x9CAA\xDC+A\xE8+A) \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xEDAA\xF0+A\x80,A* \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\x83AA\x88,A\x90,A+ \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBF
AA\x9C,A\xA8,A, \0A\fj4A\0A\0A\0 \0Aj$\0#\0Ak"\0$\0 \0A6\fA\xB4*A\xBB
AA\xB0,A\xC0,A- \0A\fj4A\0A\0A\0 \0Aj$\0A\xB4*A\xC0\xC7A\x83A\xBF
 A\xB0 A\xA9A\xC6,AA\xC8,A\b AjA\xEB
A\0\x92A\xB6A\x92#\0Ak"\0$\0 \0A\b6\fA\xB0 A\xC2A\xA8\xC7A\xD4,A \0A\fj"4A\xA8\xC7A\xD8,A\x1B 4 \0Aj$\0A\x8A\vA\flA\xDF\vAlA\x94\vA$lA\xE6\vA0lA\xF5
A<lA\xC8A\xC8\0lA\xB0 A\xE8,A\x94AAA\0A\xE8,A\xA3A\0A\xE8,A\xBDAA\xE8,A\xB9AA\xE8,A\xB5AA\xE8,A\xB1AA\xE8,A\x9FAA\xE8,A\x9BAA\xE8,A\x93A\x07A\xE8,A\x8FA\bA\xD0 A\xFC
A\x89-AA\x8B-A\b#\0Ak"\0$\0 \0A\x006\fA\xD0 A\x83A\xE8,A\x8E-A \0A\fj"4A\xE8,A\x92-A! 4 \0Aj$\0A\xD0  Aj$\0\v3\x7F  \0("j!@  F@ \0 6 A\0:\0\0 Aj!\f\v\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9D6\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v8\x7F#\0Ak"$\0  6\f  H6\b \0A\xEC\r (\f\xA9 A\bjI Aj$\0\v\xB1~\x7F#\0A k"\b$\0@@@  G@A\xF8\xD7(\0!\fA\xF8\xD7A\x006\0#\0Ak" $\0*#\0Ak"
$\0#\0Ak"\v$\0 \v  \bAjA\xBA \v)\0!
\v)\b7\b
7\0 \vAj$\0
)\0!
)\b7\b 7\0
Aj$\0 )\0! \b )\b7 \b 7\b Aj$\0 \b)! \b)\b!A\xF8\xD7(\0"E\r \b( G\r ! !\x07 A\xC4\0G\r\f\v A6\0\f\vA\xF8\xD7 \f6\0 \b( F\r\v A6\0 ! \x07!\v \0 7\0 \0 7\b \bA j$\0\v\xC0\x7F|#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0  \0 A\fjA\xBA )\0 )\b\xC4! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vD\0\0\0\0\0\0\0\0!\v A6\0\v Aj$\0 \v\xBC\x7F}#\0Ak"$\0@@@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0*#\0Ak"$\0  \0 A\fjA\0\xBA )\0 )\b\xAB! Aj$\0@A\xF8\xD7(\0"\0@ (\f F\r\f\vA\xF8\xD7 6\0 (\f G\r\f\v \0A\xC4\0G\r\f\v A6\0\f\vC\0\0\0\0!\v A6\0\v Aj$\0 \v\xBD\x7F~#\0Ak"$\0~ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\x7F\f\vA\xF8\xD7 6\0 (\f F\r\0\f\vB\0 \x07} \x07 A-F\x1B\f\v\v A6\0B\0\v Aj$\0\v\xD8\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFF\xFF\xFFVr\r\f\vA\xF8\xD7 6\0  (\fG\r \x07B\x80\x80\x80\x80T\r\v A6\0A\x7F\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9D6\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xDB\x7F~#\0Ak"$\0\x7F@ \0 G@@@ \0-\0\0"A-G\r\0 \0Aj"\0 G\r\0\f\vA\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xBB!\x07@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0F \x07B\xFF\xFFVr\r\f\vA\xF8\xD7 6\0  (\fG\r \x07B\x80\x80T\r\v A6\0A\xFF\xFF\f\v\v A6\0A\0\f\vA\0 \x07\xA7"\0k \0 A-F\x1B\v Aj$\0A\xFF\xFFq\v\xAC\x7F~#\0Ak"$\0@ \0 G@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F B\0U\x1B!\f\vA\xF8\xD7 6\0 (\f F\r\v\v A6\0B\0!\v Aj$\0 \v\xDD\x7F~#\0Ak"$\0\x7F@ \0 G@@A\xF8\xD7(\0!A\xF8\xD7A\x006\0* \0 A\fj \xA3!@A\xF8\xD7(\0"\0@ (\f G\r \0A\xC4\0G\r A6\0A\xFF\xFF\xFF\xFF\x07 B\0U\r\f\vA\xF8\xD7 6\0 (\f F\r\0\f\v B\xFF\xFF\xFF\xFFwW@ A6\0\f\v B\x80\x80\x80\x80\bY@ A6\0A\xFF\xFF\xFF\xFF\x07\f\v \xA7\f\v\v A6\0A\0\f\vA\x80\x80\x80\x80x\v Aj$\0\v\x88\x7F@  kAu"A\xF7\xFF\xFF\xFFI@@ AM@ \0 :\0\v\f\v Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v  k"E  FrE@ \0  \xFC
\0\0\v \0 jA\x006\0\f\v0\0\v\v\0 \0  B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\xBE\v\x86\b\x7F (\0!@@@@@@@\x7F@@@@ E\r\0 (\0"E\r\0 \0E@ !\f\v A\x006\0 !\f\v@A\xCC\xCF(\0(\0E@ \0E\r E\r\f !@ ,\0\0"@ \0 A\xFF\xBFq6\0 \0Aj!\0 Aj! Ak"\r\f\v\v \0A\x006\0 A\x006\0  k\v ! \0E\r\f\v y\vA!\x07\f\vA\0\f\vA\v!\x07@ \x07E@ -\0\0Av"Ak Au jrA\x07K\r\x7F Aj" A\x80\x80\x80qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj" A\x80\x80 qE\r\0 ,\0\0A@N@ Ak!\f\x07\v Aj\v! Ak!A!\x07\f\v@@ Aq ,\0\0"A\0Lr\r\0 (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r\0@ Ak! "Aj! ("A\x81\x82\x84\bk rA\x80\x81\x82\x84xqE\r\0\v\v \xC0A\0J@ Ak! Aj!\f\v\v A\xFFqA\xC2k"A2K\r Aj! At(\x80\x84!A\0!\x07\f\0\v\0\v@ \x07E@ E\r\x07@@ -\0\0"\x07\xC0"A\0L\r\0 Aq AIrE@@@ (\0"A\x81\x82\x84\bk rA\x80\x81\x82\x84xq\r \0 A\xFFq6\0 \0 -\06 \0 -\06\b \0 -\06\f \0Aj!\0 Aj! Ak"AK\r\0\v -\0\0!\v A\xFFq!\x07 \xC0A\0L\r\v \0 \x076\0 \0Aj!\0 Aj! Ak"\r\f \v\v \x07A\xC2k"A2K\r Aj! At(\x80\x84!A!\x07\f\v -\0\0"\bAv"Ak  AujrA\x07K\r@@\x7F Aj" \bA\x80k Atr"\x07A\0N\r\0 -\0\0A\x80k"A?K\r  \x07At"\br!\x07 Aj" \bA\0N\r\0 -\0\0A\x80k"A?K\r  \x07Atr!\x07 Aj\v! \0 \x076\0 Ak! \0Aj!\0\f\vA\xF8\xD7A6\0 Ak!\f\vA\0!\x07\f\0\v\0\v Ak! \r -\0\0!\v A\xFFq\r\0 \0@ \0A\x006\0 A\x006\0\v  k\vA\xF8\xD7A6\0 \0E\r\v  6\0\vA\x7F\v  6\0 \v#\x7F \0!@ "Aj! (\0\r\0\v  \0kAu\v\0 \0\xBA@ \0!\v\v%\x7F#\0Ak"$\0  6\f \0A\xE9 \xA9 Aj$\0\v3\x7F A\x80\x80\x80\x80O@\x85\0\v \0 U"6 \0 6\0 \0  Atj6\b\v\xC9\x7F~#\0A\x90k"$\0 A\0A\x90\xFC\v\0 A\x7F6L  \x006, A\xE2\x006  \x006T ! !#\0A\xB0k"$\0 (L@@ (E@ \xC8 (E\r\v -\0\0"E\r@@@@@ A\xFFq"\0_@@ "Aj! -\0_\r\0\v B\0J@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@  Ak"6\v  (,k\xAC )x ||!\f\v\x7F@@ \0A%F@ -\0"\0A*F\r \0A%G\r\v B\0J@ -\0\0A%F@@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"_\r\0\v Aj!\f\v ("\0 (hG@  \0Aj6 \0-\0\0!\f\v %!\v -\0\0 G@ )pB\0Y@  (Ak6\v A\0N \rr\r
\f \v ( (,k\xAC )x ||! !\f\vA\0!\x07 Aj\f\v@ \0A0k"\0A K\r\0 -\0A$G\r\0#\0Ak" 6\f   \0AtjAk  \0AK\x1B"\0Aj6\b \0(\0!\x07 Aj\f\v (\0!\x07 Aj! Aj\v!A\0!\vA\0! -\0\0"A0kA\xFFqA M@@ A
l A\xFFqjA0k! -\0! Aj! A0kA\xFFqA
I\r\0\v\v A\xFFqA\xED\0G\x7F A\0! \x07A\0G!\v -\0!A\0!
Aj\v"Aj!A!\0@@@@@@ A\xFFqA\xC1\0k:        \0      \v Aj  -\0A\xE8\0F"\0\x1B!A~A\x7F \0\x1B!\0\f\v Aj  -\0A\xEC\0F"\0\x1B!AA \0\x1B!\0\f\vA!\0\f\vA!\0\f\vA\0!\0 !\vA \0 -\0\0"\0A/qAF"\x1B!@ \0A r \0 \x1B"\fA\xDB\0F\r\0@ \fA\xEE\0G@ \fA\xE3\0G\rA  AL\x1B!\f\v \x07  \xAA\f\v B\0J@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v_\r\0\v (! )pB\0Y@  Ak"6\v  (,k\xAC )x ||!\v  \xAC"J@ ("\0 (hG@  \0Aj6\f\v %A\0H\r\v )pB\0Y@  (Ak6\vA!@@@@@@@@@@@@ \fA\xD8\0k!\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\v\0\v \fA\xC1\0k"\0AKA \0tA\xF1\0qEr\r
\v A\bj  A\0\xAD )xB\0 ( (,k\xAC}Q\r \x07E\r )! )\b! \x07 \v \fArA\xF3\0F@ A jA\x7FA\x81\xC6 A\0:\0 \fA\xF3\0G\r\b A\0:\0A A\0:\0. A\x006*\f\b\v A j -\0"\0A\xDE\0F"A\x81\xC6 A\0:\0 Aj Aj \x1B!\x7F@@ AA \x1Bj-\0\0"A-G@ A\xDD\0F\r \0A\xDE\0G!\b \f\v  \0A\xDE\0G"\b:\0N\f\v  \0A\xDE\0G"\b:\0~\v Aj\v!@@ -\0\0"\0A-G@ \0E\r \0A\xDD\0F\r
\f\vA-!\0 -\0"E A\xDD\0Fr\r\0 Aj!@  Ak-\0\0"M@ !\0\f\v@ Aj" A jj \b:\0\0  -\0\0"\0I\r\0\v\v !\v A j \0j \b:\0 Aj!\f\0\v\0\vA\b!\f\vA
!\f\vA\0!\vB\0!A\0!A\0!A\0!#\0Ak"\b$\0@ AG A$MqE@A\xF8\xD7A6\0\f\v@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0_\r\0\v@@ \0A+k\0\0\vA\x7FA\0 \0A-F\x1B! ("\0 (hG@  \0Aj6 \0-\0\0!\0\f\v %!\0\v@@@@ A\0G AGq \0A0GrE@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A_qA\xD8\0F@A!\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0AI\r )pB\0Y@  (Ak6\v B\0J\f\v \rA\b!\f\v A
\x1B" \0A\xF1\x81j-\0\0K\r\0 )pB\0Y@  (Ak6\v B\0JA\xF8\xD7A6\0\f\v A
G\r\0 \0A0k"A M@A\0!\0@ \0A
l j"\0A\x99\xB3\xE6\xCCI\x7F (" (hG@  Aj6 -\0\0\f\v %\vA0k"A Mq\r\0\v \0\xAD!\v A K\r B
~! \xAD!@@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A0k"A M  |"B\x9A\xB3\xE6\xCC\x99\xB3\xE6\xCCTqE@ A M\r\f\v B
~" \xAD"B\x7F\x85X\r\v\vA
!\f\v@@  Akq@  \0A\xF1\x81j-\0\0"K\r\f\v  \0A\xF1\x81j-\0\0"M\r AlAvA\x07q,\0\xF1\x83!@   t"r! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\x80\x80\x80\xC0\0Iq\r\0\v \xAD! \rB\x7F \xAD"\x88" T\r@ \xADB\xFF\x83  \x86\x84! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r  X\r\0\v\f\v@   lj! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\xC7\xE3\xF18Iq\r\0\v \xAD! \r \xAD!@  ~" \xADB\xFF\x83"B\x7F\x85V\r  |! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r \b B\0 B\02 \b)\bP\r\0\v\v\v  \0A\xF1\x81j-\0\0M\r\0@ \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\vA\xF1\x81j-\0\0K\r\0\vA\xF8\xD7A\xC4\x006\0A\0!B\x7F!\v )pB\0Y@  (Ak6\v ArE B\x7FQq@A\xF8\xD7A\xC4\x006\0B~!\f\v  \xAC"\x85 }!\v \bAj$\0 )xB\0 ( (,k\xAC}Q\r \x07E \fA\xF0\0GrE@ \x07 >\0\f\v \x07  \xAA\f\v \x07  \xAB8\0\f\v \x07  \xC49\0\f\v \x07 7\0 \x07 7\b\f\vA Aj \fA\xE3\0G"\x1B!\b\x7F AF@ \x07! \v@ \bAt/"E\r\v B\x007\xA8A\0!@@@ !\0@ \x7F (" (hG@  Aj6 -\0\0\f\v %\v"j-\0!E\r  :\0\x1B Aj A\x1BjA A\xA8j\x98"A~F\r\0 A\x7FF@A\0! \f\v \0@ \0 Atj (6\0 Aj!\v \vE  \bGr\r\0\v \0 \bAtAr"\bAt\x9D"\r\0\vA\0! \0!
A!\v\f\b\vA\0! \0 A\xA8j\x7F (\xA8A\0\vE\r\v \0!
\f\v \v@A\0! \b/"E\r@ !\0@ \x7F (" (hG@  Aj6 -\0\0\f\v %\v"j-\0!E@ \0! A\0\f\v \0 j :\0\0 Aj" \bG\r\0\v \0 \bAtAr"\b\x9D"\r\0\vA\0!
\0! A!\v\f\vA\0! \x07@@ \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0j-\0!@  \x07j \0:\0\0 Aj!\f \x07"\0! A\0\f\v\0\v\0\v@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v j-\0!\r\0\vA\0!\0A\0! A\0\v!
(! )pB\0Y@  Ak"6\v )x  (,k\xAC|"P   QrEr\r \v@ \x07 \x006\0\v \fA\xE3\0F\r\0
@
AtjA\x006\0\v E@A\0! \f\v  jA\0:\0\0\v ( (,k\xAC )x ||! \r \x07A\0Gj!\r\v Aj! -\0"\r\f\v\vA!\vA\0! A\0!
\v \rA\x7F \r\x1B!\r\v \vE\r !
!\f\vA\x7F!\r\v A\xB0j$\0 A\x90j$\0 \r\vC\0@ \0E\r\0@@@@ Aj\0\v \0 <\0\0\v \0 =\0\v \0 >\0\v \0 7\0\v\v\xE4\x7F~#\0A k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\x07@ B0\x88B\xFF\xFF\x83"\b\xA7"A\x81\xFF\0kA\xFDM@ \x07B\x88\xA7!@ \0P B\xFF\xFF\xFF\x83"\x07B\x80\x80\x80\bT \x07B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \0 \x07B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\vA\0  A\xFF\xFF\xFFK"\x1B!A\x81\x81\x7FA\x80\x81\x7F \x1B j!\f\v \0 \x07\x84P \bB\xFF\xFFRrE@ \x07B\x88\xA7A\x80\x80\x80r!A\xFF!\f\v A\xFE\x80K@A\xFF!\f\vA\x80\xFF\0A\x81\xFF\0 \bP"\x1B" k"A\xF0\0J@A\0!A\0!\f\v \x07 \x07B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!\x07A\0!  G@ Aj \0 \x07A\x80 k6 ) )\x84B\0R!\v  \0 \x07 g )\b"\0B\x88\xA7!@ )\0 \xAD\x84"\x07P \0B\xFF\xFF\xFF\x83"\0B\x80\x80\x80\bT \0B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \x07 \0B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\v A\x80\x80\x80s  A\xFF\xFF\xFFK"\x1B!\v A j$\0 B \x88\xA7A\x80\x80\x80\x80xq Atr r\xBE\v\x89\x7F~@@\x7F@@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A+k\0\0\v A-F E\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A:k"AuKr\r \0)pB\0S\r \0 \0(Ak6\f\v A:k! !A\0\v! AvI\r\0@ A0kA
O\r\0A\0!@  A
lj\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v!A0k! A\xCC\x99\xB3\xE6\0H A0k"A Mq\r\0\v \xAC! A
O\r\0@ \xAD B
~|!\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A0k"A M B0}"B\xAE\x8F\x85\xD7\xC7\xC2\xEB\xA3Sq\r\0\v A
O\r\0@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\vA0kA
I\r\0\v\v \0)pB\0Y@ \0 \0(Ak6\vB\0 }  \x1B!\f\vB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F! \0)pB\0S\r\0 \0 \0(Ak6B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\v \v\x842\x7F\x07~|#\0A0k"\r$\0@@ AK\r\0 At"(\xDC\x81! (\xD0\x81!@\x7F (" (hG@  Aj6 -\0\0\f\v %\v"_\r\0\vA!\b@@ A+k\0\0\vA\x7FA A-F\x1B!\b (" (hG@  Aj6 -\0\0!\f\v %!\v@@ A_qA\xC9\0F@@ A\x07F\r\x7F (" (hG@  Aj6 -\0\0\f\v %\v! ,\0\xAF\b Aj! A rF\r\0\v\v AG@ A\bF"\f\r E AIr\r \f\r\v )p"B\0Y@  (Ak6\v E AIr\r\0 B\0S!@ E@  (Ak6\v Ak"AK\r\0\v\vB\0!#\0Ak"$\0 \b\xB2C\0\0\x80\x7F\x94\xBC"A\xFF\xFF\xFFq!\b\x7F Av"A\xFFq"@ A\xFFG@ \b\xADB\x86! A\xFFqA\x80\xFF\0j\f\v \b\xADB\x86!A\xFF\xFF\f\vA\0 \bE\r\0  \b\xADB\0 \bg"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85! )\0!A\x89\xFF\0 k\v! \r 7\0 \r \xADB0\x86 Av\xADB?\x86\x84 \x847\b Aj$\0 \r)\b! \r)\0!\f\v@@@@@@ \r\0A\0! A_qA\xCE\0G\r\0@ AF\r\x7F (" (hG@  Aj6 -\0\0\f\v %\v! ,\0\xFC\r Aj! A rF\r\0\v\v \0\v@\x7F (" (hG@  Aj6 -\0\0\f\v %\vA(F@A!\f\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! )pB\0S\r  (Ak6\f\v@\x7F (" (hG@  Aj6 -\0\0\f\v %\v"A0kA
I A\xC1\0kAIr A\xDF\0FrE A\xE1\0kAOqE@ Aj!\f\v\vB\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0! A)F\r )p"B\0Y@  (Ak6\v@ @ \r\f\vA\xF8\xD7A6\0B\0!\f\v@ B\0Y@  (Ak6\v Ak"\r\0\v\f\v )pB\0Y@  (Ak6\vA\xF8\xD7A6\0\v B\0J\f\v@ A0G\r\0\x7F (" (hG@  Aj6 -\0\0\f\v %\vA_qA\xD8\0F@#\0A\xB0k"$\0\x7F (" (hG@  Aj6 -\0\0\f\v %\v!@\x7F@ A0G@@ A.G\r (" (hF\r\0  Aj6 -\0\0\f\v (" (hG\x7FA!  Aj6 -\0\0A! %\v!\f\v\v %\v"A0G@A!\v\f\v@ B}!\x7F (" (hG@  Aj6 -\0\0\f\v %\v"A0F\r\0\vA!\vA!\vB\x80\x80\x80\x80\x80\x80\xC0\xFF?!@@ !@@ A0k"\x07A
I\r\0 A.G"\f A r"A\xE1\0kAKq\r \f\r\0 \v\rA!\v !\f\v A\xD7\0k \x07 A9J\x1B!@ B\x07W@  Atj! \f\v BX@ A0j ? A j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFD?+ Aj )0 )8 ) " )("+  ) )  < )\b! )\0!\f\v E
r\r\0 A\xD0\0j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ A@k )P )X  <A!
)H! )@!\v B|!A!\v (" (hG\x7F  Aj6 -\0\0 %\v!\f\v\v~ E@@@ )pB\0Y@  ("Ak6 E\r  Ak6 \vE\r  Ak6\f\v \r\v B\0J\v A\xE0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )\`! )h\f\v B\x07W@ !@ At! B|"B\bR\r\0\v\v@@@ A_qA\xD0\0F@  \xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r @ )pB\0Y\r\f\vB\0! B\0JB\0\f\vB\0! )pB\0S\r\v  (Ak6\vB\0!\v E@ A\xF0\0jD\0\0\0\0\0\0\0\0 \b\xB7\xA6T )p! )x\f\v   \v\x1BB\x86 |B }"A\0 k\xADU@A\xF8\xD7A\xC4\x006\0 A\xA0j \b? A\x90j )\xA0 )\xA8B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A\x80j )\x90 )\x98B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )\x80! )\x88\f\v A\xE2k\xAC W@ A\0N@@ A\xA0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF\xBF\x7F<  B\x80\x80\x80\x80\x80\x80\x80\xFF?\xB2! A\x90j   )\xA0  A\0N"\x1B )\xA8  \x1B<  At"r! B}! )\x98! )\x90! A\0N\r\0\v\v~ A k\xAD|"\xA7"A\0 A\0J\x1B   \xADS\x1B"A\xF1\0O@ A\x80j \b? )\x88! )\x80!B\0\f\v A\xE0jA\x90 k\xC8T A\xD0j \b? )\xD0! A\xF0j )\xE0 )\xE8 )\xD8"\xB1 )\xF8! )\xF0\v! A\xC0j AqE  B\0B\0dA\0G A Iqq"rr A\xB0j   )\xC0 )\xC8+ A\x90j )\xB0 )\xB8  < A\xA0j  B\0  \x1BB\0  \x1B+ A\x80j )\xA0 )\xA8 )\x90 )\x98< A\xF0j )\x80 )\x88  \xBC )\xF0" )\xF8"B\0B\0dE@A\xF8\xD7A\xC4\x006\0\v A\xE0j   \xA7\xB0 )\xE0! )\xE8\f\vA\xF8\xD7A\xC4\x006\0 A\xD0j \b? A\xC0j )\xD0 )\xD8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xB0j )\xC0 )\xC8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )\xB0! )\xB8\v! \r 7 \r 7 A\xB0j$\0 \r)! \r)!\f\v )pB\0S\r\0  (Ak6\v !\x07 ! \b!\f !\bA\0!#\0A\x90\xC6\0k"$\0A\0 k" k!@\x7F@@ A0G@ A.G\r \x07(" \x07(hF\r \x07 Aj6 -\0\0\f\v \x07(" \x07(hG@ \x07 Aj6 -\0\0! \x07%!\vA!\f\v\v \x07%\v"A0F@@ B}!\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A0F\r\0\vA!\vA!\v\v A\x006\x90~@@@@ A.F" A0k"A Mr@@@ Aq@ \vE@ !A!\v\f\v E!\f\v B|! A\xFCL@  \xA7 A0F\x1B! A\x90j Atj"
\x7F  (\0A
ljA0k \v6\0A!A\0
Aj" A F"\x1B!
 j! \f\v A0F\r\0  (\x80FAr6\x80FA\xDC\x8F!\v\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A.F" A0k"A
Ir\r\0\v\v   \v\x1B! E A_qA\xC5\0GrE@@ \x07 \b\xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r\0 \bE\rB\0! \x07)pB\0S\r\0 \x07 \x07(Ak6\v  |!\f\v E! A\0H\r\v \x07)pB\0S\r\0 \x07 \x07(Ak6\v E\rA\xF8\xD7A6\0\v \x07B\0JB\0!B\0\f\v (\x90"E@ D\0\0\0\0\0\0\0\0 \f\xB7\xA6T )\b! )\0\f\v  R B Ur AMA\0  v\x1BrE@ A0j \f? A j r Aj )0 )8 ) )(+ )! )\f\v Av\xAD S@A\xF8\xD7A\xC4\x006\0 A\xE0\0j \f? A\xD0\0j )\` )hB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A@k )P )XB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )H! )@\f\v A\xE2k\xAC U@A\xF8\xD7A\xC4\x006\0 A\x90j \f? A\x80j )\x90 )\x98B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xF0\0j )\x80 )\x88B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )x! )p\f\v
@
A\bL@ A\x90j Atj"(\0!@ A
l!
Aj"
A G\r\0\v  6\0\v Aj! \v@ A N BUr \xA7"
Hr\r\0 B Q@ A\xC0j \f? A\xB0j (\x90r A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v B\bW@ A\x90j \f? A\x80j (\x90r A\xF0j )\x90 )\x98 )\x80 )\x88+ A\xE0jA\b
kAt(\xB0\x81? A\xD0j )\xF0 )\xF8 )\xE0 )\xE8\xAF )\xD8! )\xD0\f\v 
A}ljA\x1Bj"ALA\0 (\x90" v\x1B\r\0 A\xE0j \f? A\xD0j r A\xC0j )\xE0 )\xE8 )\xD0 )\xD8+ A\xB0j
AtA\x88\x81j(\0? A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v@ "Ak! A\x90j Atj"Ak(\0E\r\0\vA\0!@
A o"E@A\0!\f\v A j  B\0S\x1B!@ E@A\0!A\0!\f\vA\x80\x94\xEB\xDCA\0 kAtA\xD0\x81j(\0"\vm!\x07A\0!A\0!A\0!@ A\x90j Atj"\b  \b(\0" \vn"\bj"6\0 AjA\xFFq  E  Fq"\x1B!
A k
\x1B!
\x07 \b \vlkl! Aj" G\r\0\v E\r\0  6\0 Aj!\v
kA j!
\v@ A\x90j Atj!
A$H!\x07@@ \x07E@
A$G\r (\0A\xD1\xE9\xF9O\r\v A\xFFj! A\0!@ !\b \xAD A\x90j A\xFFq"\vAtj"5\0B\x86|"B\x81\x94\xEB\xDCT\x7FA\0  B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}! \xA7\v!  >\0 \b \b \b \v B\0R\x1B \v \bAkA\xFFq"G\x1B  \vF\x1B! \vAk!  \vG\r\0\v Ak! \b! E\r\0\v AkA\xFFq" F@ A\x90j"\b A\xFEjA\xFFqAtj" (\0 At \bj(\0r6\0 !\v
A j!
A\x90j Atj 6\0\f\v\v@@ AjA\xFFq!\b A\x90j AkA\xFFqAtj!@A A
A-J\x1B!@@ !A\0!@@@  jA\xFFq" F\r\0 A\x90j Atj(\0" At(\xA0\x81"I\r\0  I\r Aj"AG\r\v\v
A$G\r\0B\0!A\0!B\0!@   jA\xFFq"F@ AjA\xFFq"At jA\x006\x8C\v A\x80j A\x90j Atj(\0r A\xF0j  B\0B\x80\x80\x80\x80\xE5\x9A\xB7\x8E\xC0\0+ A\xE0j )\xF0 )\xF8 )\x80 )\x88< )\xE8! )\xE0! Aj"AG\r\0\v A\xD0j \f? A\xC0j   )\xD0 )\xD8+B\0! )\xC8! )\xC0! A\xF1\0j" k" A\0 A\0J\x1B  H"\b\x1B"\x07A\xF0\0M\r\f\v  j! !  F\r\0\vA\x80\x94\xEB\xDC v!\vA\x7F tA\x7Fs!A\0! !@ A\x90j"\x07 Atj"  (\0" vj"6\0 AjA\xFFq  E  Fq"\x1B!
A k
\x1B!
q \vl! AjA\xFFq" G\r\0\v E\r  \bG@ At \x07j 6\0 \b!\f\v  (\0Ar6\0\f\v\v\v A\x90jA\xE1 \x07k\xC8T A\xB0j )\x90 )\x98 \xB1 )\xB8! )\xB0! A\x80jA\xF1\0 \x07k\xC8T A\xA0j   )\x80 )\x88\xAE A\xF0j   )\xA0" )\xA8"\xBC A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\v@ AjA\xFFq" F\r\0@ A\x90j Atj(\0"A\xFF\xC9\xB5\xEEM@ E AjA\xFFq Fq\r A\xF0j \f\xB7D\0\0\0\0\0\0\xD0?\xA2T A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\f\v A\x80\xCA\xB5\xEEG@ A\xD0j \f\xB7D\0\0\0\0\0\0\xE8?\xA2T A\xC0j   )\xD0 )\xD8< )\xC8! )\xC0!\f\v \f\xB7!\x1B  AjA\xFFqF@ A\x90j \x1BD\0\0\0\0\0\0\xE0?\xA2T A\x80j   )\x90 )\x98< )\x88! )\x80!\f\v A\xB0j \x1BD\0\0\0\0\0\0\xE8?\xA2T A\xA0j   )\xB0 )\xB8< )\xA8! )\xA0!\v \x07A\xEF\0K\r\0 A\xD0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?\xAE )\xD0 )\xD8B\0B\0d\r\0 A\xC0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?< )\xC8! )\xC0!\v A\xB0j    < A\xA0j )\xB0 )\xB8  \xBC )\xA8! )\xA0!@ Ak A\xFF\xFF\xFF\xFF\x07qN\r\0  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x837\x98  7\x90 A\x80j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ )\x90 )\x98B\x80\x80\x80\x80\x80\x80\x80\xB8\xC0\0\xB2! )\x88  A\0N"\x1B! )\x80  \x1B! \b \x07 G A\0Hrq  B\0B\0dA\0GqE   j"A\xEE\0jNq\r\0A\xF8\xD7A\xC4\x006\0\v A\xF0j   \xB0 )\xF8! )\xF0\v! \r 7( \r 7 A\x90\xC6\0j$\0 \r)(! \r) !\f\vB\0!\f\vB\0!\v \0 7\0 \0 7\b \rA0j$\0\v\xC0\x7F~#\0A\x80k"$\0@@@  B\0B\0dE\r\0\x7F B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
\x7F B0\x88\xA7A\xFF\xFFq"\x07A\xFF\xFFG@A \x07\rAA 
\x84P\x1B\f\v 
\x84P\v\vE\r\0 B0\x88\xA7"\bA\xFF\xFFq"A\xFF\xFFG\r\v Aj    +  )" )"  \xAF )\b! )\0!\f\v  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83" dA\0L@ 
 d@ !\f\v A\xF0\0j  B\0B\0+ )x! )p!\f\v B0\x88\xA7A\xFF\xFFq!\x07 ~  A\xE0\0j 
B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )h"
B0\x88\xA7A\xF8\0k! )\`\v! \x07E@ A\xD0\0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )X" B0\x88\xA7A\xF8\0k!\x07 )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!\v
B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!
 \x07J@@~
\v}  V\xAD}" B\0Y@  }"\x84P@ A j  B\0B\0+ )(! ) !\f\v B\x86 B?\x88\x84\f\v
B\x86 B?\x88\x84\v!
B\x86! Ak" \x07J\r\0\v \x07!\v@
\v}  V\xAD}" B\0S@
! \f\v  }"\x84B\0R\r\0 A0j  B\0B\0+ )8! )0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@@ B?\x88 Ak! B\x86! B\x86\x84" B\x80\x80\x80\x80\x80\x80\xC0\0T\r\0\v\v \bA\x80\x80q!\x07 A\0L@ A@k  B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 A\xF8\0j \x07r\xADB0\x86\x84B\0B\x80\x80\x80\x80\x80\x80\xC0\xC3?+ )H! )@!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83  \x07r\xADB0\x86\x84!\v \0 7\0 \0 7\b A\x80j$\0\v\x87\x7F~#\0A\xD0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
 \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\f B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq"\bA\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f !\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\f\f\v \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!\f\v  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0 \f  \x84P\x1B!\fB\0!\f\v  \x84P@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xC0j 

P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )\xC8!
)\xC0!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A\xB0j  \v  \v \vP" \x1ByB\xC0\0B\0 \x1B|\xA7" Ak6  jAk! )\xB8!\v )\xB0!\v A\xA0j \vB\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86 B1\x88\x84"B\0B\x80\x80\x80\x80\xB0\xE6\xBC\x82\xF5\0 }"B\02 A\x90jB\0 )\xA8}B\0 B\02 A\x80j )\x98B\x86 )\x90B?\x88\x84"B\0 B\02 A\xF0j B\0B\0 )\x88}B\02 A\xE0j )\xF8B\x86 )\xF0B?\x88\x84"B\0 B\02 A\xD0j B\0B\0 )\xE8}B\02 A\xC0j )\xD8B\x86 )\xD0B?\x88\x84"B\0 B\02 A\xB0j B\0B\0 )\xC8}B\02 A\xA0j B\0 )\xB8B\x86 )\xB0B?\x88\x84B}"B\02 A\x90j B\x86B\0 B\02 A\xF0\0j B\0B\0 )\xA8 )\xA0" )\x98|" T\xAD| BV\xAD|}B\02 A\x80jB }B\0 B\02  \b \x07kj"\bA\xFF\xFF\0j!~ )p"B\x86"\r )\x88"B\x86 )\x80B?\x88\x84|"B\xE7\xEC\0}"B \x88"
B\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86"B \x88"~" B\x86"B \x88"\v  V\xAD \r V\xAD )xB\x86 B?\x88\x84 B?\x88|||B}"B \x88"~|"\r T\xAD \r \r B\xFF\xFF\xFF\xFF\x83" B?\x88"
B\x86\x84B\xFF\xFF\xFF\xFF\x83"
~|"\rV\xAD|  ~|  ~"
~|" T\xADB \x86 B \x88\x84| \r B \x86|" \rT\xAD|   B\xFF\xFF\xFF\xFF\x83"
~"\r  \v~|" \rT\xAD    B\xFE\xFF\xFF\xFF\x83"\r~|"V\xAD||"V\xAD|   ~" \r ~|" 
~|"
\v ~|"B \x88
V\xAD  T\xAD 
V\xAD||B \x86\x84|" T\xAD|     \r~"
\v ~|"B \x88 
T\xADB \x86\x84|"
T\xAD
B \x86|"
V\xAD||"V\xAD|  
B \x86" \r ~| T\xADB\x7F\x85"V 
Rq\xAD|"V\xAD|"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0X@  \x84! A\xD0\0j  B\x80\x80\x80\x80\x80\x80\xC0\0T"\x07\xAD"\v\x86"
 \v\x86 B\x88 \x07A?s\xAD\x88\x84"  2 \bA\xFE\xFF\0j  \x07\x1BAk! B1\x86 )X} )P"B\0R\xAD}!\vB\0 }\f\v A\xE0\0j B?\x86 B\x88\x84"
B\x88"  2 B0\x86 )h} )\`"B\0R\xAD}!\v !B\0 }\v! A\xFF\xFFN@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v~ A\0J@ \vB\x86 B?\x88\x84! B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84!\v B\x86\f\v A\x8F\x7FL@B\0!\f\v A@k
A kg A0j   A\xF0\0j6 A j   )@"
)H"\v2 )8 )(B\x86 ) "B?\x88\x84} )0" B\x86"T\xAD}!  }\v! Aj  BB\02   BB\02 \v

B\x83" |"T   T\xAD|" V  Q\x1B\xAD|"
T\xAD|"   B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )V  )"V  Q\x1Bq\xAD|"V\xAD|"  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )\0V  )\b"V  Q\x1Bq\xAD|" T\xAD| \f\x84!\f\v \0 7\0 \0 \f7\b A\xD0j$\0\v\xBF\x7F#\0A\xD0\0k"$\0@ A\x80\x80N@ A j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+ )(! ) ! A\xFF\xFFI@ A\xFF\xFF\0k!\f\v Aj  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+A\xFD\xFF  A\xFD\xFFO\x1BA\xFE\xFFk! )! )!\f\v A\x81\x80\x7FJ\r\0 A@k  B\0B\x80\x80\x80\x80\x80\x80\x809+ )H! )@! A\xF4\x80~K@ A\x8D\xFF\0j!\f\v A0j  B\0B\x80\x80\x80\x80\x80\x80\x809+A\xE8\x81}  A\xE8\x81}M\x1BA\x9A\xFEj! )8! )0!\v   B\0 A\xFF\xFF\0j\xADB0\x86+ \0 )\b7\b \0 )\x007\0 A\xD0\0j$\0\v<\0 \0 7\0 \0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x83B0\x88\xA7 B0\x88\xA7A\x80\x80qr\xADB0\x86\x847\b\v\xC0\x7F~A\x7F!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Rq\r\0 \0  \x84\x84P@A\0\v  \x83B\0Y@  R  Sq\r \0  \x85\x84B\0R\v \0B\0R  U  Q\x1B\r\0 \0  \x85\x84B\0R!\v \v8\0 \0A\xD0k \0 \0A\x93\xF1\xFF\xFF\x07J\x1B"\0Aq@A\0\v \0A\xECj"\0A\xE4\0o@A\v \0A\x90oE\v\x85\x7F~#\0A\x80k"\b$\0 @\x7F@@\x7F@@@ -\0\0"A%G@ \r
\f\x07\vA\0!A! @ -\0"\x07A-k\0\v \x07A\xDF\0F\r \x07\r\v \0
j :\0\0
Aj\f\v \x07! -\0!\x07A! \vA\0!@\x7F  j \x07"A+Fj" ,\0\0A0kA M@ \bA\fjA
B\xFF\xFF\xFF\xFF\xBE\xA7! \b(\f\f\v \b 6\fA\0! \v"\x07-\0\0"A\xC3\0k"\vAKA \vtA\x99\x80\x80qEr\r\0 "\r\0 \x07 G!\v A\xCF\0F A\xC5\0Fr\x7F \x07-\0! \x07Aj \x07\v! \bAj!\x07 ! A\0!#\0A\xD0\0k"\v$\0A\x8A !\rA0!A\xA8\x80\b!\f@ \b\x7F@@@@@@@\x7F@@@@@@@@@~@@@@@@@@@@@@@@@@@@@@@@@@@@ \xC0"A%kV!---------------------------'-\x07\b
---\r---- ------\0&-\b-\v--\f--%-\x1B-\v ("AM\r"\f*\v ("AK\r) A\x87\x80\bj\f"\v ("A\vK\r( A\x8E\x80\bj\f!\v ("A\vK\r' A\x9A\x80\bj\f \v 4B\xEC|B\xE4\0\x7F!\f#\vA\xDF\0!\v 4\f!\f!\vA\xD2!\r\f\v 4"B\xEC|!@ ("AL@  B\xEB| \xBDAF\x1B!\f\v A\xE9I\r\0 B\xED|  \xBDAF\x1B!\v A\xE7\0F\r\f \v 4\b!\f\vA! (\b"E@B\f!\f \v \xAC"B\f}  A\fJ\x1B!\f\v (Aj\xAC!A!\f\v (Aj\xAC!\f\x1B\v 4!\f\v \bA6|A\xD4!\f\vA\xA7\x80\bA\xA6\x80\b (\bA\vJ\x1B\f\vA\xF7!\r\f\vA\0!\fA\0!#\0Ak"$\0 4!~ ("\rA\fO@ \r \rA\fm"A\flk"A\fj  A\0H\x1B!\r  Auj\xAC |!\v A\fj! B}B\x88X@ \xA7"\fA\xC4\0kAu!@ \x7F \fAqE@ Ak! E\rA\f\v E\rA\0\v6\0\v \fA\x80\xE7\x84l A\x80\xA3ljA\x80\xD6\xAF\xE3\x07j\xAC\f\v B\xE4\0}" B\x90\x7F"B\x90~}"B?\x87\xA7 \xA7j!@@@ \xA7"A\x90j  B\0S\x1B"\x7F\x7F A\xC8N@ A\xACO@A!\f A\xACk\f\vA!\f A\xC8k\f\v A\xE4\0k  A\xE3\0J"\f\x1B\v"\rA\0A\v! \r\f\v Av! AqE! E\r\v  6\0\v B\x80\xE7\x84~  \fAl A\xE1\0ljj k\xACB\x80\xA3~|B\x80\xAA\xBA\xC3|\v! \rAtA\x80\xFE\0j(\0"A\x80\xA3j  (\f\x1B  \rAJ\x1B! (\f! 4\b! 4! 4\0 Aj$\0  \xAC| Ak\xACB\x80\xA3~| B\x90~| B<~|| 4$}\f\b\v 4\0!\f\v \bA6|A\xD6!\f\vA\xE4!\r\f\v ("A\x07 \x1B\xAC\f\v ( (kA\x07jA\x07n\xAD!\f\v ( (AjA\x07pkA\x07jA\x07n\xAD!\f\v \xBD\xAD!\f\v 4\v!A!\f\vA\xA9\x80\b!\f\f
\vA\xAA\x80\b!\f\f \v 4B\xEC|B\xE4\0\x81" B?\x87"\x85 }!\f
\v 4"B\xEC|! B\xA4?S\r
\v 70 \b \x07A\x9B \vA0je6| \x07!\f\v ( A\0H@ \bA\x006|A\xD7!\f\v \v ($"A\x90m"A\xE4\0l  A\x90lk\xC1A<m\xC1j6@ \b \x07A\xA1 \vA@ke6| \x07!\f\r\v ( A\0H@ \bA\x006|A\xD7!\f\r\v ((A\xB4\xDC(\0E@A\xAC\xDCA\xB0\xDCA\xC0\xDCA\xE0\xDCA\xB8\xDCA\xE0\xDC6\0A\xB4\xDCA\xC0\xDC6\0\v\f\v\v \bA6|A\xEA!\f\v\v B\xE4\0\x81!\f\v A\x80\x80\br\v \xB5\f\x07\vA\xAB\x80\b!\f\v \f \xB5!\r\v \b \x07A\xE4\0 \r  \xB4"6| \x07A\0 \x1B!\f\vA!\f\vA!\v@  \x1B"A\xDF\0G@ A-G\r \v 7 \b \x07A\x9C \vAje6| \x07!\f\v \v 7( \v 6 \b \x07A\x95 \vA je6| \x07!\f\v \v 7\b \v 6\0 \b \x07A\x8E \ve6| \x07!\f\vA\x9C\v"y6|\v \vA\xD0\0j$\0 E\r@ E@ \b(|! \f\v\x7F@@ -\0\0"A+k\0\0\v \b(|\f\v -\0! Aj! \b(|Ak\v! @ A\xFFqA0G\r\0@ ,\0"\x07A0kA K\r Aj! Ak! \x07A0F\r\0\v\v \b 6|A\0!@ "\x07Aj!  \x07j,\0\0A0kA
I\r\0\v  I\x1B!@ \0
j (A\x94qH\x7FA- A+G\r  k \x07jAA \b(\f-\0\0A\xC3\0F\x1BI\rA+\v:\0\0 Ak!
Aj!
\v  M 
Mr\r\0@ \0
jA0:\0\0
Aj!
Ak" M\r 
K\r\0\v\v \b 
k"\x07 \x07 K\x1B"\x076| \0
j  \x07Y \b(|
j\v!
Aj! 
K\r\v\v Ak

F\x1B!
A\0\v! \0
jA\0:\0\0\v \bA\x80j$\0 \v\xB8\x7F \0AF@A\xF4\x1BA\x84 (\0\x1B\v \0A\xFF\xFFq"A\xFF\xFFG \0Au"AJrE@  Atj(\0"\0A\bjA\xAF \0\x1B\vA\xD7!\0@\x7F@@@ Ak\0\v AK\rA\xB0\xFE\0\f\v A1K\rA\xC0\xFE\0\f\v AK\rA\x80\x81\v!\0 E\r\0@ \0"Aj!\0 -\0\0\r\0 Ak"\r\0\v\v \0\v,\x7F A\0H@\x85\0\v \0 9"6 \0 6\0 \0  j6\b\v
\0 \0A0kA
I\v\0 \0A0kA
I \0A rA\xE1\0kAIr\v\0 \0A r \0 \0A\xC1\0kAI\x1B\v'\0 \0A\0G \0A\xF8\xFC\0Gq \0A\x90\xFD\0Gq \0A\xF8\xDBGq \0A\x90\xDCGq\v\xE4\x7F@ -\0\0\r\0A\xFD\xBF"@ -\0\0\r\v \0A\flA\xB0\xFD\0j\xBF"@ -\0\0\r\vA\x8A\xBF"@ -\0\0\r\vA\xF2\x1B!\v@@  j-\0\0"E A/FrE@A! Aj"AG\r\f\v\v !\vA\xF2\x1B!@@@@@ -\0\0"A.F\r\0  j-\0\0\r\0 ! A\xC3\0G\r\v -\0E\r\v A\xF2\x1B\x9BE\r\0 A\xD1\x9B\r\v \0E@A\xD4\xFC\0! -\0A.F\r\vA\0\vA\xF4\xDB(\0"@@  A\bj\x9BE\r ( "\r\0\v\vA$/"@ A\xD4\xFC\0)\x007\0 A\bj"  Y  jA\0:\0\0 A\xF4\xDB(\x006 A\xF4\xDB 6\0\v A\xD4\xFC\0 \0 r\x1B!\v \v(\x7F \0(\0"@ CA\x7FG@ \0(\0E\v \0A\x006\0\vA\v(\x7F \0(\0"@ AA\x7FG@ \0(\0E\v \0A\x006\0\vA\vT\x7F@ \0(\0"E\r\0\x7F (" (F@   (\0(4\0\f\v  6\0  Aj6 \vA\x7FG\r\0 \0A\x006\0\v\v.\x7F#\0Ak"$\0  \x006\0A\x8F\f a\`A\xB0\xF1\0(\0L Aj$\0\v$\x7F@ \0(\0"E\r\0  \xC3A\x7FG\r\0 \0A\x006\0\v\v\0 \0AjK \0!\v=\x7F @ \0 \xB6 \0(!  k"E  FrE@   \xFC
\0\0\v \0  j6\v\vB\x7F \0(" \0(F@ \0 A\xFFq \0(\0(4\0\v  :\0\0 \0 \0(Aj6 A\xFFq\v\x96\x7F#\0Ak"$\0 \0 \0(\0A\fk(\0j(@  \x006\f A\0:\0\b \0 \0(\0A\fk(\0j"(E@ (H"@ \xC4\v A:\0\b\v@ -\0\bAG\r\0 \0 \0(\0A\fk(\0j(" (\0(\0\0A\x7FG\r\0 \0 \0(\0A\fk(\0jA\x99\v@ (\f"\0 \0(\0A\fk(\0j"\0(E\r\0 \0(\r\0 \0-\0A qE\r\0 (\f"\0 \0(\0A\fk(\0j("\0 \0(\0(\0\0A\x7FG\r\0 (\f"\0 \0(\0A\fk(\0jA\x99\v\v Aj$\0\v\0 \0A\bjK \0!\v\0A\x7F\v-\0 \0A\xC8\0j1 \0A<j1 \0A0j1 \0A$j1 \0Aj1 \0A\fj1\v|\x7F \0 \0(H"Ak r6H \0( \0(G@ \0A\0A\0 \0($\0\v \0A\x006 \0B\x007 \0(\0"Aq@ \0 A r6\0A\x7F\v \0 \0(, \0(0j"6\b \0 6 A\x1BtAu\v\xAD\v\x07\x7F \0 j!@@ \0("Aq\r\0 AqE\r \0(\0" j!@@@ \0 k"\0A\x90\xD8(\0G@ \0(\f! A\xFFM@  \0(\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v \0(! \0 G@ \0(\b" 6\f  6\b\f\v \0("\x7F \0Aj \0("E\r \0Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v ("AqAG\rA\x84\xD8 6\0  A~q6 \0 Ar6  6\0\v  6\f  6\b\f\vA\0!\v E\r\0@ \0("At"(\xAC\xDA \0F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \0 (F@  6\f\v  6\v E\r\v  6 \0("@  6  6\v \0("E\r\0  6  6\v@@@@ ("AqE@A\x94\xD8(\0 F@A\x94\xD8 \x006\0A\x88\xD8A\x88\xD8(\0 j"6\0 \0 Ar6 \0A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\b F@A\x90\xD8 \x006\0A\x84\xD8A\x84\xD8(\0 j"6\0 \0 Ar6 \0 j 6\0\v Axq j! (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v (!  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v  A~q6 \0 Ar6 \0 j 6\0\f\vA\0!\v E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("@  6  6\v ("E\r\0  6  6\v \0 Ar6 \0 j 6\0 \0 \bG\r\0A\x84\xD8 6\0\v A\xFFM@ A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \f\v (\b\v!  \x006\b  \x006\f \0 6\f \0 6\b\vA! A\xFF\xFF\xFF\x07M@ A& A\bvg"kvAq AtrA>s!\v \0 6 \0B\x007 AtA\xAC\xDAj!@@A\x80\xD8(\0"A t"\x07qE@A\x80\xD8  \x07r6\0  \x006\0 \0 6\f\v A AvkA\0 AG\x1Bt! (\0!@ "(Axq F\r Av! At!  Aqj"\x07("\r\0\v \x07 \x006 \0 6\v \0 \x006\f \0 \x006\b\v (\b" \x006\f  \x006\b \0A\x006 \0 6\f \0 6\b\v\v\0 \0E@A\0\v \0 \xC5\v\0 \0  A4A5\xD0\v-\0 \0A\xCC\0j1 \0A@k1 \0A4j1 \0A(j1 \0Aj1 \0Aj1\v\xBC\0@@@@@@@@@@@ A k\0\b
\b 
\b \x07\v  (\0"Aj6\0 \0 (\x006\0\v  (\0"Aj6\0 \0 2\x007\0\v  (\0"Aj6\0 \0 3\x007\0\v  (\0"Aj6\0 \0 0\0\x007\0\v  (\0"Aj6\0 \0 1\0\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 +\x009\0\v \0  \0\v\v  (\0"Aj6\0 \0 4\x007\0\v  (\0"Aj6\0 \0 5\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 )\x007\0\vo\x7F \0(\0",\0\0A0k"A K@A\0\v@A\x7F! A\xCC\x99\xB3\xE6\0M@A\x7F  A
l"j  A\xFF\xFF\xFF\xFF\x07sK\x1B!\v \0 Aj"6\0 ,\0 ! !A0k"A
I\r\0\v \v\xF5\x7F~#\0A@j"\b$\0 \b 6< \bA)j! \bA'j! \bA(j!@@@@@A\0!\x07@ !\r \x07 A\xFF\xFF\xFF\xFF\x07sJ\r \x07 j!@@@@ "\x07-\0\0"\v@@@@ \vA\xFFq"E@ \x07!\f\v A%G\r \x07!\v@ \v-\0A%G@ \v!\f\v \x07Aj!\x07 \v-\0 \vAj"!\vA%F\r\0\v\v \x07 \rk"\x07 A\xFF\xFF\xFF\xFF\x07s"J\r \0@ \0 \r \x073\v \x07\r\x07 \b 6< Aj!\x07A\x7F!@ ,\0A0k"
A K\r\0 -\0A$G\r\0 Aj!\x07A!
!\v \b \x076<A\0!\f@ \x07,\0\0"\vA k"AK@ \x07!
\f\v \x07!
A t"A\x89\xD1qE\r\0@ \b \x07Aj"
6<  \fr!\f \x07,\0"\vA k"A O\r
!\x07A t"A\x89\xD1q\r\0\v\v@ \vA*F@\x7F@
,\0A0k"A K\r\0
-\0A$G\r\0\x7F \0E@  AtjA
6\0A\0\f\v  Atj(\0\v!
Aj!A\f\v \r
Aj! \0E@ \b 6<A\0!A\0!\f\v  (\0"\x07Aj6\0 \x07(\0!A\0\v! \b 6< A\0N\rA\0 k! \fA\x80\xC0\0r!\f\f\v \bA<j\xCE"A\0H\r
\b(<!\vA\0!\x07A\x7F! \x7FA\0 -\0\0A.G\r\0 -\0A*F@\x7F@ ,\0A0k"
A K\r\0 -\0A$G\r\0 Aj!\x7F \0E@ 
AtjA
6\0A\0\f\v 
Atj(\0\v\f\v \r Aj!A\0 \0E\r\0  (\0"
Aj6\0
(\0\v! \b 6< A\0N\f\v \b Aj6< \bA<j\xCE! \b(<!A\v!@ \x07!A!
",\0\0"\x07A\xFB\0kAFI\r\v Aj! A:l \x07jA\xFF\xF0\0j-\0\0"\x07AkA\xFFqA\bI\r\0\v \b 6<@ \x07A\x1BG@ \x07E\r\f A\0N@ \0E@  Atj \x076\0\f\f\v \b  Atj)\x0070\f\v \0E\r\b \bA0j \x07  \xCD\f\v A\0N\r\vA\0!\x07 \0E\r\b\v \0-\0\0A q\r\v \fA\xFF\xFF{q"\v \f \fA\x80\xC0\0q\x1B!\fA\0!A\x93 ! !
@@\x7F@@@@@@\x7F@@@@@@@ -\0\0"\x07\xC0"ASq  \x07AqAF\x1B  \x1B"\x07A\xD8\0k! 
\0\v@ \x07A\xC1\0k\x07\v\0\v \x07A\xD3\0F\r\v\f\v \b)0!A\x93 \f\vA\0!\x07@@@@@@@ \b\0\v \b(0 6\0\f\x1B\v \b(0 6\0\f\v \b(0 \xAC7\0\f\v \b(0 ;\0\f\v \b(0 :\0\0\f\v \b(0 6\0\f\v \b(0 \xAC7\0\f\vA\b A\bM\x1B! \fA\br!\fA\xF8\0!\x07\v ! \x07A q!\r \b)0""\x1BPE@@ Ak" \x1B\xA7Aq-\0\x90u \rr:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE Pr\r \x07AvA\x93 j!A!\f\v ! \b)0""\x1BPE@@ Ak" \x1B\xA7A\x07qA0r:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE\r  k"  H\x1B! \f\v \b)0"B\0S@ \bB\0 }"70A!A\x93 \f\v \fA\x80q@A!A\x94 \f\vA\x95 A\x93 \fAq"\x1B\v!  x!\r\v  A\0Hq\r \fA\xFF\xFF{q \f \x1B!\f B\0R rE@ !\rA\0! \f\v P  \rkj"  H\x1B! \f\r\v \b-\x000!\x07\f\v\v \b(0"A\xC4 \x1B"\rA\0A\xFF\xFF\xFF\xFF\x07 A\xFF\xFF\xFF\xFF\x07O\x1B"\x07\xCA" \rk \x07 \x1B" \rj!
A\0N@ \v!\f ! \f\f\v \v!\f !
-\0\0\r\f\v\v \b)0"\x1BPE\rA\0!\x07\f \v @ \b(0\f\vA\0!\x07 \0A A\0 \f7\f\v \bA\x006\f \b \x1B>\b \b \bA\bj"\x0760A\x7F! \x07\v!\vA\0!\x07@@ \v(\0"\rE\r\0 \bAj \r\xCA"\rA\0H\r \r \x07kK\r\0 \vAj!\v \x07 \rj"\x07 I\r\v\vA=!
\x07A\0H\r\f \0A  \x07 \f7 \x07E@A\0!\x07\f\vA\0!
\b(0!\v@ \v(\0"\rE\r \bAj" \r\xCA"\r
j"
\x07K\r \0 \r3 \vAj!\v \x07
K\r\0\v\v \0A  \x07 \fA\x80\xC0\0s7  \x07 \x07 H\x1B!\x07\f\b\v  A\0Hq\r A=!
\0 \b+0  \f \x07 \0"\x07A\0N\r\x07\f
\v \x07-\0!\v \x07Aj!\x07\f\0\v\0\v \0\r E\rA!\x07@  \x07Atj(\0"\0@  \x07Atj \0  \xCDA! \x07Aj"\x07A
G\r\f\v\v\v \x07A
O@A!\f
\v@  \x07Atj(\0\rA! \x07Aj"\x07A
G\r\0\v\f \vA!
\f\v \b \x07:\0'A! !\r \v!\f\v
\rk"\v \vJ\x1B" A\xFF\xFF\xFF\xFF\x07sJ\rA=!
  j" H\x1B"\x07 K\r \0A \x07 \f7 \0  3 \0A0 \x07 \fA\x80\x80s7 \0A0  \vA\07 \0 \r \v3 \0A \x07 \fA\x80\xC0\0s7 \b(<!\f\v\v\vA\0!\f\vA=!
\vA\xF8\xD7
6\0\vA\x7F!\v \bA@k$\0 \v\xC2\x7F#\0A\xD0k"$\0  6\xCC A\xA0j"A\0A(\xFC\v\0  (\xCC6\xC8@A\0  A\xC8j A\xD0\0j   \xCFA\0H@A\x7F!\f\v \0(LA\0H \0 \0(\0"\bA_q6\0\x7F@@ \0(0E@ \0A\xD0\x0060 \0A\x006 \0B\x007 \0(,! \0 6,\f\v \0(\r\vA\x7F \0\xC9\r\v \0  A\xC8j A\xD0\0j A\xA0j  \xCF\v! @ \0A\0A\0 \0($\0 \0A\x0060 \0 6, \0A\x006 \0(! \0B\x007 A\x7F \x1B!\v \0 \0(\0"\0 \bA qr6\0A\x7F  \0A q\x1B!\r\0\v A\xD0j$\0 \v\x7F\x7F~ \0\xBD"B4\x88\xA7A\xFFq"A\xFFG| E@  \0D\0\0\0\0\0\0\0\0a\x7FA\0 \0D\0\0\0\0\0\0\xF0C\xA2 \xD1!\0 (\0A@j\v6\0 \0\v  A\xFE\x07k6\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x80\x7F\x83B\x80\x80\x80\x80\x80\x80\x80\xF0?\x84\xBF \0\v\v\0 !\v \0  l/\v$\x7F \0("\0yAj"/"\x7F  \0 YA\0\v\v0\x7F#\0Ak"$\0 \0(\0!\0  :\0   Aj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 Aj   \0(\0\x07\0  /\0;\f#\0Ak"$\0@ -\0\rAF@#\0Ak"$\0A\x9C\xCE-\0\0AqE@AA\x94,A!\0A\x9C\xCEA:\0\0A\x98\xCE \x006\0\v  -\0\f6\b A\x006A\x98\xCE(\0A\0A\0 Aj A\bj!  (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0  :\0   Aj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0  :\0  Aj \0\0 Aj$\0\v0\x7F#\0Ak"$\0 \0(\0!\0  8\f   A\fj \0\0 Aj$\0\v\x8D\x7F|#\0Ak"$\0 A\bj   \0(\0\x07\0  )\b7\0#\0Ak"$\0@ -\0AF@#\0Ak"$\0A\x90\xCE-\0\0AqE@AA\xD4&A!\0A\x90\xCEA:\0\0A\x8C\xCE \x006\0\v  *\x008\b A\x006A\x8C\xCE(\0A\0A\0 Aj A\bj!  (6\0 A\bj"\0 \xFC6 \0A\xEC\xCE6\0 \xD2 Aj$\0 \0(! \0A\x006 \0\x84\f\v A\x006\f A\xEC\xCE6\b A\bj\x84A!\v Aj$\0 Aj$\0 \v0\x7F#\0Ak"$\0 \0(\0!\0  8\f   A\fj \0\x07\0 Aj$\0\v.\x7F#\0Ak"$\0 \0(\0!\0  8\f  A\fj \0\0 Aj$\0\v\x7FA9"\0A\x006\0 \0\v\xA9\x7F   \0(\0j"\0G@@ (" (\0"kAu" \0(\b \0(\0"kAuM@  \0(" k"AuK@  G@ @   \xFC
\0\0\v \0(!\v   j"k"E  FrE@   \xFC
\0\0\v \0  j6\f\v  k"E  FrE@   \xFC
\0\0\v \0  j6\f\v \0(\0"@ \0 6 \0(\b ! \0A\x006\b \0B\x007\0\v \0 \0 \x86\xA8 \0(!  k"E  FrE@   \xFC
\0\0\v \0  j6\v\v\v\0  \0(\0j!\0A\f9 \0b\v\0  \0(\0j :\0\0\v\r\0  \0(\0j-\0\0\v\x1B\0 \0 (\b M@    \xA7\v\v8\0 \0 (\b M@    \xA7\v \0(\b"\0      \0(\0(\v\0\v\x92\x7F \0 (\b M@    \xA7\v -\x005 \0(\f! A\0:\x005 -\x004 A\0:\x004 \0Aj"     \xA6 -\x004"
r!\b -\x005"\vr!\x07@ AI\r\0 Atj! \0Aj!@ -\x006\r@
Aq@ (AF\r \0-\0\bAq\r\f\v \vAqE\r\0 \0-\0\bAqE\r\v A\0;4      \xA6 -\x005"\v \x07rAq!\x07 -\x004"
\brAq!\b A\bj" I\r\0\v\v  \x07Aq:\x005  \bAq:\x004\v\xA4\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 ME\r\0@ ( G@  (G\r\v AG\r A6 \v  6  6  ((Aj6(@ ($AG\r\0 (AG\r\0 A:\x006\v A6,\v\v\x88\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6 @ (,AF\r\0 A\0;4 \0(\b"\0   A  \0(\0(\v\0 -\x005AF@ A6, -\x004E\r\f\v A6,\v  6  ((Aj6( ($AG\r (AG\r A:\x006\v \0(\b"\0     \0(\0(
\0\v\v\xC1\x7F@ \0 (\b M@  (G\r (AF\r  6\v@ \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6 (,AF\r \0Aj" \0(\fAtj!\x07A\0!@@@ \x7F@  \x07O\r\0 A\0;4    A \xA6 -\x006\r\0 -\x005AG\r -\x004AF@ (AF\rA!A! \0-\0\bAqE\r\f\vA! \0-\0\bAq\rA\f\vAA \x1B\v6, \r\f\v A6,\f\v A\bj!\f\0\v\0\v \0(\f! \0Aj"    \x88 AI\r  Atj! \0Aj!@ \0(\b"\0AqE@ ($AG\r\v@ -\x006\r     \x88 A\bj" I\r\0\v\f\v \0AqE@@ -\x006\r ($AF\r     \x88 A\bj" I\r\0\f\v\0\v@ -\x006\r ($AF@ (AF\r\v     \x88 A\bj" I\r\0\v\f\v  6  ((Aj6( ($AG\r\0 (AG\r\0 A:\x006\v\v\xCB\x7F#\0A@j"$\0@@@ (A\xA2\xC7F@ A\x006\0\f\v@ \0  \0-\0\bAq\x7FA E\r A\xF8\xC4E"E\r -\0\bAqA\0G\vM!\v @A! (\0"\0E\r  \0(\x006\0\f\v A\xA8\xC5E"E\rA\0! (\0"@  (\0"6\0\v (\b"\x07 \0(\b"A\x7FsqA\x07q \x07A\x7Fs qA\xE0\0qr\r \0(\f"\x07(" (\f"\0(G\r\vA!\f\v A\xA0\xC7F@ \0A\xD8\xC5EE!\f\vA\0! \x07A\xA8\xC5E"@ AqE\r\x7F !A\0!@@A\0 \0E\r \0A\xA8\xC5E"\0E\r \0(\b (\b"A\x7Fsq\rA (\f"( \0(\f"\0(F\r AqE\r A\xA8\xC5E"\r\0\v A\x8C\xC6E"E\r\0  \0\xD9!\v \v!\f\v \x07A\x8C\xC6E"@ AqE\r  \0\xD9!\f\v \x07A\xC8\xC4E"E\r\0 \0A\xC8\xC4E"\0E\r\0 A\bjA\0A8\xFC\v\0  A\0G:\0; A\x7F6  6\f  \x006 A64 \0 Aj A \0(\0(\b\0 ("\0AF@  (A\0 \x1B6\0\v \0AF!\v A@k$\0 \vr\x7F \0( (\b(F@   \xA8\v \0(\f! \0Aj"   \xDA@ AI\r\0  Atj! \0Aj!\0@ \0   \xDA -\x006\r \0A\bj"\0 I\r\0\v\v\v\0 \0@ \0\xC7\v \0!\v5\0 \0( (\b(F@   \xA8\v \0(\b"\0    \0(\0(\b\0\v\0 \0( (\b(F@   \xA8\v\v\xC4\x7F#\0A\xD0\0k"$\0@\x7FA \0( (F\r\0A\0 A\xC8\xC4E"E\r\0 (\0"E\r AjA\0A8\xFC\v\0 A:\0K A\x7F6  \x006  6 A6D  Aj A (\0(\b\0 (,"\0AF@  ($6\0\v \0AF\v A\xD0\0j$\0\v A\xC16\b A\xE76 A\x9F\r6\0\x9C\0\v\x7FA\xD4\09"\0A\0A\xD4\0\xFC\v\0 \0\v\0 \0(\0 j -\0\0:\0\0A\v \0A\xEC\xE1 \v3\x7F ( (\0"k K@A!  j-\0\0!\v \0 :\0 \0 :\0\0\v$\0A\xF8\xE1-\0\0E@A\xEC\xE1A\xD8\x92jA\xF8\xE1A:\0\0\vA\xEC\xE1\v \0A\xDC\xE1 \v$\0A\xE8\xE1-\0\0E@A\xDC\xE1A\xE3\r\x80A\xE8\xE1A:\0\0\vA\xDC\xE1\v \0A\xCC\xE1 \v$\0A\xD8\xE1-\0\0E@A\xCC\xE1A\x84\x92jA\xD8\xE1A:\0\0\vA\xCC\xE1\v \0A\xBC\xE1 \v$\0A\xC8\xE1-\0\0E@A\xBC\xE1A\xBC\x80A\xC8\xE1A:\0\0\vA\xBC\xE1\v \0A\xAC\xE1 \v$\0A\xB8\xE1-\0\0E@A\xAC\xE1A\xE0\x91jA\xB8\xE1A:\0\0\vA\xAC\xE1\v \0A\xDC\xCC \v\r\0 \0( \0(\0k\v\0A\xA9\xE1-\0\0E@A\xA9\xE1A:\0\0\vA\xDC\xCC\v \0A\x9C\xE1 \v$\0A\xA8\xE1-\0\0E@A\x9C\xE1A\xBC\x91jA\xA8\xE1A:\0\0\vA\x9C\xE1\v \0A\xD0\xCC \v\0A\x99\xE1-\0\0E@A\x99\xE1A:\0\0\vA\xD0\xCC\v\x1B\0A\xF8\xE9!\0@ \0A\fk "\0A\xE0\xE9G\r\0\v\vT\0A\x98\xE1-\0\0@A\x94\xE1(\0\vA\xF8\xE9-\0\0E@A\xF8\xE9A:\0\0\vA\xE0\xE9A\xF8\xBA&A\xEC\xE9A\x84\xBB&A\x98\xE1A:\0\0A\x94\xE1A\xE0\xE96\0A\xE0\xE9\v\x1B\0A\xD8\xE9!\0@ \0A\fk "\0A\xC0\xE9G\r\0\v\vR\0A\x90\xE1-\0\0@A\x8C\xE1(\0\vA\xD8\xE9-\0\0E@A\xD8\xE9A:\0\0\vA\xC0\xE9A\xF4'A\xCC\xE9A\xF1'A\x90\xE1A:\0\0A\x8C\xE1A\xC0\xE96\0A\xC0\xE9\v\x1B\0A\xB0\xE9!\0@ \0A\fk "\0A\x90\xE7G\r\0\v\v\xF1\x7F@ \0( \0(\0"k" I@#\0A k"$\0@  k" \0(\b \0("kM@  \0("j!@  F@ \0 6  -\0\0:\0\0 Aj!\f\v\v\f\v  A\fj \0  j \0(\0k\x83 \0( \0(\0k \0\x8C"(\b"j!@  G@  -\0\0:\0\0 Aj!\f\v\v  6\b \0 \xA9 \x87\v A j$\0\f\v  I@ \0  j6\v\v\v\xB0\0A\x88\xE1-\0\0@A\x84\xE1(\0\vA\xB0\xE9-\0\0E@A\xB0\xE9A:\0\0\vA\x90\xE7A\xF0\xB6&A\x9C\xE7A\x90\xB7&A\xA8\xE7A\xB4\xB7&A\xB4\xE7A\xCC\xB7&A\xC0\xE7A\xE4\xB7&A\xCC\xE7A\xF4\xB7&A\xD8\xE7A\x88\xB8&A\xE4\xE7A\x9C\xB8&A\xF0\xE7A\xB8\xB8&A\xFC\xE7A\xE0\xB8&A\x88\xE8A\x80\xB9&A\x94\xE8A\xA4\xB9&A\xA0\xE8A\xC8\xB9&A\xAC\xE8A\xD8\xB9&A\xB8\xE8A\xE8\xB9&A\xC4\xE8A\xF8\xB9&A\xD0\xE8A\xE4\xB7&A\xDC\xE8A\x88\xBA&A\xE8\xE8A\x98\xBA&A\xF4\xE8A\xA8\xBA&A\x80\xE9A\xB8\xBA&A\x8C\xE9A\xC8\xBA&A\x98\xE9A\xD8\xBA&A\xA4\xE9A\xE8\xBA&A\x88\xE1A:\0\0A\x84\xE1A\x90\xE76\0A\x90\xE7\v\x1B\0A\x80\xE7!\0@ \0A\fk "\0A\xE0\xE4G\r\0\v\v\x98\0A\x80\xE1-\0\0@A\xFC\xE0(\0\vA\x80\xE7-\0\0E@A\x80\xE7A:\0\0\vA\xE0\xE4A\xC0\b'A\xEC\xE4A\xB7\b'A\xF8\xE4A\xDF'A\x84\xE5A\xAE'A\x90\xE5A\x86 'A\x9C\xE5A\xAA'A\xA8\xE5A\xC8\b'A\xB4\xE5A\xB8 'A\xC0\xE5A\xFA\f'A\xCC\xE5A\xE9\f'A\xD8\xE5A\xF1\f'A\xE4\xE5A\x84\r'A\xF0\xE5A\xFF\r'A\xFC\xE5A\xB8'A\x88\xE6A\x9B\r'A\x94\xE6A\x9B\f'A\xA0\xE6A\x86 'A\xAC\xE6A\xF3\r'A\xB8\xE6A\xA5'A\xC4\xE6A\xE5'A\xD0\xE6A\xDF\r'A\xDC\xE6A\xC3
'A\xE8\xE6A\xB0 'A\xF4\xE6A\x9B'A\x80\xE1A:\0\0A\xFC\xE0A\xE0\xE46\0A\xE0\xE4\v\x1B\0A\xD8\xE4!\0@ \0A\fk "\0A\xB0\xE3G\r\0\v\v\xCC\0A\xF8\xE0-\0\0@A\xF4\xE0(\0\vA\xD8\xE4-\0\0E@A\xD8\xE4A:\0\0\vA\xB0\xE3A\x9C\xB4&A\xBC\xE3A\xB8\xB4&A\xC8\xE3A\xD4\xB4&A\xD4\xE3A\xF4\xB4&A\xE0\xE3A\x9C\xB5&A\xEC\xE3A\xC0\xB5&A\xF8\xE3A\xDC\xB5&A\x84\xE4A\x80\xB6&A\x90\xE4A\x90\xB6&A\x9C\xE4A\xA0\xB6&A\xA8\xE4A\xB0\xB6&A\xB4\xE4A\xC0\xB6&A\xC0\xE4A\xD0\xB6&A\xCC\xE4A\xE0\xB6&A\xF8\xE0A:\0\0A\xF4\xE0A\xB0\xE36\0A\xB0\xE3\v\x1B\0A\xA8\xE3!\0@ \0A\fk "\0A\x80\xE2G\r\0\v\v\xBE\0A\xF0\xE0-\0\0@A\xEC\xE0(\0\vA\xA8\xE3-\0\0E@A\xA8\xE3A:\0\0\vA\x80\xE2A\xF1\b'A\x8C\xE2A\xF8\b'A\x98\xE2A\xD6\b'A\xA4\xE2A\xDE\b'A\xB0\xE2A\xCD\b'A\xBC\xE2A\xFF\b'A\xC8\xE2A\xE8\b'A\xD4\xE2A\xEF\r'A\xE0\xE2A\xF7\r'A\xEC\xE2A\x8D'A\xF8\xE2A\xCE'A\x84\xE3A\xB4 'A\x90\xE3A\xC4'A\x9C\xE3A\xE7
'A\xF0\xE0A:\0\0A\xEC\xE0A\x80\xE26\0A\x80\xE2\v
\0 \0A\xA4\x91j\v
\0 \0A\x91\x80\v\x90\x7F \0\x7F \0(" \0(\bI@  -\0\0:\0\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAj\x83 \0( \0(\0k \0\x8C"(\b -\0\0:\0\0  (\bAj6\b \0 \xA9 \0( \x87 A j$\0\v6\v
\0 \0A\x90\x91j\v
\0 \0A\x88\x80\v\f\0 \0 Aj\xA3\v\f\0 \0 A\fj\xA3\v\x07\0 \0(\f\v\x07\0 \0,\0 \v\x07\0 \0(\b\v\x07\0 \0,\0\b\v \0 \0\xE5!\v\0A\xB4*\v \0 \0\xE6!\v\0 \0(\0 Atj *\x008\0A\v\0 \0(\b"\0E@A\v \0\xED\v\x87\x7F@@  F  \bMr\r\0A! \0(\b!#\0Ak"\x07$\0 \x07 H6\fA\0   k A\xC0\xDD \x1B\x98! \x07A\fjI \x07Aj$\0@@ Aj\0\v !\v \bAj!\b  j!  j!\f\v\v \vA\x7F \0(\b!#\0Ak"$\0  H6\f A\fjI Aj$\0 \0(\b"\0E@A\v \0\xEDAF\v\x89\x7F#\0Ak"$\0  6\0\x7FA A\fj"A\0 \0(\b\xAF"\0AjAI\r\0A \0Ak"  (\0kK\r\0\x7F \x7F -\0\0!\0  (\0"Aj6\0  \0:\0\0 Ak! Aj!\fA\0\v\v\v Aj$\0\v\xBD\f\x7F#\0Ak"$\0 !\b@@  \bF@ !\b\f\v \b-\0\0E\r\0 \bAj!\b\f\v\v \x07 6\0  6\0@@\x7F@  F  Fr\r\0  )\x007\b \0(\b! #\0Ak"$\0  H6\f \b k!A\0!
#\0A\x90\bk"\f$\0 \f (\0" 6\f  \fAj \x1B!@@@ E  kAuA\x80 \x1B"\rErE@@ A\x83K Av"\v \rOrE@ !\v\f\v  \fA\fj \v \r \v \rI\x1B \xA4! \f(\f!\v A\x7FF@A\0!\rA\x7F!
\f\v \r A\0  \fAjG\x1B"k!\r  Atj! j \vkA\0 \v\x1B!
j!
\vE\r \v! \r\r\0\f\v\0\v !\v\v \vE\r\v \rE Er\r\0
! @@@  \v  \x98"
AjAM@@@
Aj\0\v \fA\x006\f\f\v A\x006\0\f\v \f \f(\f
j"\v6\f Aj! \rAk"\r\r\v !
\f\v Aj! 
k! !
\r\0\v\v @  \f(\f6\0\v \fA\x90\bj$\0 A\fjI Aj$\0@@@@
A\x7FF@@@ \x07 6\0  (\0F\r\0A!@@@   \b k A\bj \0(\b\xEE"Aj\b\0\v  6\0\f\v !\v  j! \x07(\0Aj!\f\v\v  6\0\f\v \x07 \x07(\0
Atj"6\0  F\r (\0!  \bF\r  A  \0(\b\xEEE\r\vA\f\v \x07 \x07(\0Aj"6\0  (\0Aj"6\0 !\b@  \bF\r \b-\0\0E\r \bAj!\b\f\0\v\0\v  6\0A\f\v (\0!\v  G\v Aj$\0\v !\b\f\0\v\0\v\x9F\v\x7F#\0Ak"$\0 !\b@@  \bF@ !\b\f\v \b(\0E\r\0 \bAj!\b\f\v\v \x07 6\0  6\0@@@@  F  Fr\x7F   )\x007\bA! \0(\b! #\0Ak"$\0  H6\f !  k!
A\0!\f#\0Ak"$\0@ (\0"\vE \b kAu"Er\r\0
A\0 \x1B!
@ A\fj
AI\x1B \v(\0\xC5"\rA\x7FF@A\x7F!\f\f\v \x7F
AM@
\rI\r A\fj \rY\v
\rk!
\rjA\0\v! \v(\0E@A\0!\v\f\v \f \rj!\f \vAj!\v Ak"\r\0\v\v @  \v6\0\v Aj$\0 A\fjI Aj$\0@@@@ \fAj\0\b\v \x07 6\0@  (\0F\r  (\0 \0(\b\xAF"A\x7FF\r \x07 \x07(\0 j"6\0 Aj!\f\0\v\0\v \x07 \x07(\0 \fj"6\0  F\r  \bF@ (\0! !\b\f\v Aj"A\0 \0(\b\xAF"\bA\x7FF\r  \x07(\0k \bI\r@ \b@ -\0\0! \x07 \x07(\0" Aj6\0 :\0\0 \bAk!\b Aj!\f\v\v  (\0Aj"6\0 !\b@  \bF@ !\b\f\v \b(\0E\r \bAj!\b\f\0\v\0\v  6\0\f\v (\0\v G!\f\v \x07(\0!\f\v\vA!\v Aj$\0 \v \0 \0\xF6!\v=\0 \0\x7F ( (\0"kAu K@ \0  Atj*\x008\0A\f\v \0A\0:\0\0A\0\v:\0\v\0  k"\0  \0 I\x1B\v4\0@  FE@   ,\0\0"\0 \0A\0H\x1B:\0\0 Aj! Aj!\f\v\v \v\f\0   A\0H\x1B\v*\0@  FE@  -\0\0:\0\0 Aj! Aj!\f\v\v \v9\0@  FE@  -\0\0"\0 \0A r \0A\xDB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0  A r A\xDB\0kA\xFFqA\xE6I\x1B\v:\0@  FE@  -\0\0"\0 \0A\xDF\0q \0A\xFB\0kA\xFFqA\xE6I\x1B:\0\0 Aj!\f\v\v \v\0  A\xDF\0q A\xFB\0kA\xFFqA\xE6I\x1B\v\0 \0( \0(\0kAu\v \0 \0\xF0!\v5\0@  FE@  (\0"\0  \0A\x80I\x1B:\0\0 Aj! Aj!\f\v\v \v\0   A\x80I\x1B\xC0\v*\0@  FE@  ,\0\x006\0 Aj! Aj!\f\v\v \v4\0@  FE@  (\0"\0 \0A r \0A\xDB\0kAfI\x1B6\0 Aj!\f\v\v \v\0  A r A\xDB\0kAfI\x1B\v5\0@  FE@  (\0"\0 \0A\xDF\0q \0A\xFB\0kAfI\x1B6\0 Aj!\f\v\v \v\0  A\xDF\0q A\xFB\0kAfI\x1B\v\x86\x7F@ \0( \0(\0"kAu" I@#\0A k"$\0@  k" \0(\b \0("kAuM@ \0(" Atj!@  F@ \0 6  *\x008\0 Aj!\f\v\v\f\v A\fj \0  \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8"(\b" Atj!@  G@  *\x008\0 Aj!\f\v\v  6\b \0 \x96 \xB5\v A j$\0\f\v  I@ \0  Atj6\v\v\v7\0@@  F\r\0 (\0"\0A\xFF\0K\r\0 \0At(\x90\x88 qE\r\0 Aj!\f\v\v \v7\0@@  F\r\0 (\0"\0A\xFF\0M@ \0At(\x90\x88 q\r\v Aj!\f\v\v \vF\x7F@  FE@A\0!\0  (\0"A\xFF\0M\x7F At(\x90\x88A\0\v6\0 Aj! Aj!\f\v\v \v"\0A\0!\0 A\xFF\0M\x7F At(\x90\x88 qA\0GA\0\v\v\0 \0 \0(\0(\0\v \0 \0\xF5!\v\x95\x7F \0\x7F \0(" \0(\bI@  *\x008\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAuAj\x86 \0( \0(\0kAu \0\xB8"(\b" *\x008\0  Aj6\b \0 \x96 \0( \xB5 A j$\0\v6\v\xA1\0@ ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\f\v (\0!@@@ ("AM@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFFO\r Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v AtAj"@ \0  \xFC
\0\0\v\f\v0\0\v\v\v \0 \0 \xA3\v\x9F\x07\x7F#\0A\xF0k"$\0 A\xECj"\0 $ \0=!
( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B(\0
A-
(\0(,\0F!\x07\v A\x006\xD8 B\x007\xD0 A\x006\xC8 B\x007\xC0 A\x006\xB8 B\x007\xB0  \x07 A\xECj A\xE8j A\xE4j A\xE0j A\xD0j A\xC0j A\xB0j A\xACj\xF9@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (\xAC" J@ \0 kAtj (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\f\v (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0At/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1BAtj
\x07 A\xE8j (\xE4 (\xE0 A\xD0j" A\xC0j"\x07 A\xB0j"\b \xF8  \0 (\f (\b  \\ ! \b  \x07    (\xEC# A\xF0j$\0\v0\0\v\xE4\b\x7F#\0A\xA0\bk"\0$\0 \0 7 \0 7 \0 \0A\xB0\x07j"\x076\xAC\x07 \0A\x90j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xAC\x07j \x07A\xE3 \0P"\x07A\x7FF\r \0(\xAC\x07!\r \x07At/"\v! \vE\r\v \0A\x8Cj"\b $ \b=" \0(\xAC\x07"\b \x07 \bj (\0(0\0 \x07A\0J@ \0(\xAC\x07-\0\0A-F!
\v \0A\x006\xF8 \0B\x007\xF0 \0A\x006\xE8 \0B\x007\xE0 \0A\x006\xD8 \0B\x007\xD0 
\0A\x8Cj \0A\x88j \0A\x84j \0A\x80j \0A\xF0j \0A\xE0j \0A\xD0j \0A\xCCj\xF9@\x7F \0(\xCC"\b \x07H@ \b \x07 \bkAtj \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\f\v \b \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v At/"\f! \fE\r\v  \0A,j \0A(j ( \x07Atj 
\0A\x88j \0(\x84 \0(\x80 \0A\xF0j"
\0A\xE0j"\x07 \0A\xD0j" \b\xF8   \0(, \0((  \\ \f!   \x07 
  \0(\x8C# \v! \r! \0A\xA0\bj$\0\v0\0\v\x99\x07\x7F#\0A\xB0k"$\0 A\xACj"\0 $ \0>!
( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B-\0\0
A-
(\0(\0A\xFFqF!\x07\v A\x006\xA0 B\x007\x98 A\x006\x90 B\x007\x88 A\x006\x80 B\x007x  \x07 A\xACj A\xA8j A\xA7j A\xA6j A\x98j A\x88j A\xF8\0j A\xF4\0j\xFC@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (t" J@ \0 kAtj (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\f\v (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1Bj
\x07 A\xA8j ,\0\xA7 ,\0\xA6 A\x98j" A\x88j"\x07 A\xF8\0j"\b \xFB  \0 (\f (\b  Z ! \b  \x07    (\xAC# A\xB0j$\0\v0\0\v\xDB\b\x7F#\0A\xB0k"\0$\0 \0 7 \0 7 \0 \0A\xC0j"\x076\xBC \0A\xD0j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xBCj \x07A\xE3 \0P"\x07A\x7FF\r \0(\xBC!\r \x07/"\v! \vE\r\v \0A\xCCj"\b $ \b>" \0(\xBC"\b \x07 \bj (\0( \0 \x07A\0J@ \0(\xBC-\0\0A-F!
\v \0A\x006\xC0 \0B\x007\xB8 \0A\x006\xB0 \0B\x007\xA8 \0A\x006\xA0 \0B\x007\x98 
\0A\xCCj \0A\xC8j \0A\xC7j \0A\xC6j \0A\xB8j \0A\xA8j \0A\x98j \0A\x94j\xFC@\x7F \0(\x94"\b \x07H@ \b \x07 \bkAtj \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\f\v \b \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v /"\f! \fE\r\v  \0A,j \0A(j ( \x07 j 
\0A\xC8j \0,\0\xC7 \0,\0\xC6 \0A\xB8j"
\0A\xA8j"\x07 \0A\x98j" \b\xFB   \0(, \0((  Z \f!   \x07 
  \0(\xCC# \v! \r! \0A\xB0j$\0\v0\0\v\xC0\x7F#\0A\xC0k"\0$\0 \0 6\xB8 \0 6\xBC \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07=! \0A\0:\0 \0A\xBCj   \x07 (  \0Aj  \0Aj \0Aj \0A\xB0j\x80@@ ,\0\vA\0H@ (\0A\x006\0 A\x006\f\v A\0:\0\v A\x006\0\v \0-\0AF@  A- (\0(,\0\xDD\v A0 (\0(,\0! \0("Ak! \0(!@@  O\r\0 (\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v" A\0H"
\x1B"\vO  \v (
\x1BAtjAjIqE@ \x07  A\0H" \x1B"  k"Au"
j!\x07
\bA\xFF\xFF\xFF\xFF\x07qAkA \x1B"\b kK@  \b \x07 \bk  \xFF\v At (\0  ,\0\vA\0H\x1Bj! @   \xFC
\0\0\v  jA\x006\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xA2 ( \x07 ,\0"A\0H"
\x1B!@ (\b 
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA ,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b At" @ \b Atj  \xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v \b AtjA\x006\0\f\v   j k  A\0  \xDE\v \x07 \v Aj$\0\v \0A\xBCj \0A\xB8j(@  (\0Ar6\0\v \0(\xBC \0(# \0(! \0A\x006 @  \0(\0\v \0A\xC0j$\0\v\xDD\x7F#\0A\xF0k"\x07$\0 \x07 6\xE8 \x07 6\xEC \x07A\xE3\x006\xCC \x07 \x07A\xD0j6\xC8 \x07A\xC0j" $ =!\0 \x07A\0:\0\xBF@ \x07A\xECj    (  \x07A\xBFj \0 \x07A\xC8j \x07A\xC4j \x07A\xE0j\x80E\r\0 \x07A\xEE\x1B(\0\x006\0\xB7 \x07A\xE7\x1B)\0\x007\xB0 \0 \x07A\xB0j \x07A\xBAj \x07A\x80j \0(\0(0\0 \x07Aj!\0@ \x07(\xC4" \x07(\xC8"k"A\x89N@ AvAj/"\0!\b \0E\r\v \0! \x07-\0\xBFAF@ \0A-:\0\0 \0Aj!\v \x07A\xA8j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xB0j \x07A\x80j"  \xB1 kAuj-\0\0:\0\0 Aj! Aj! \x07(\xC4!\f\v\v0\0\v0\0\v \x07A\xECj \x07A\xE8j(@  (\0Ar6\0\v \x07(\xEC \x07(\xC0# \x07(\xC8!\0 \x07A\x006\xC8 \0@ \0 \x07(\xCC\0\v \x07A\xF0j$\0\v\xAE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07>! \0A\0:\0 \0A\x8Cj   \x07 (  \0Aj  \0Aj \0Aj \0A\x84j\x85@@ ,\0\vA\0H@ (\0A\0:\0\0 A\x006\f\v A\0:\0\v A\0:\0\0\v \0-\0AF@  A- (\0(\0\xAA\v A0 (\0(\0 \0("Ak! \0(!A\xFFq!@@  O\r\0 -\0\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v" A\0H"
\x1B"\vO  \v (
\x1BjAjIqE@ \x07  A\0H" \x1B"  k"j!\x07  \bA\xFF\xFF\xFF\xFF\x07qAkA
\x1B"\b kK@  \b \x07 \bk  \xA4\v (\0  ,\0\vA\0H\x1B j! @   \xFC
\0\0\v  jA\0:\0\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xCE ( \x07 ,\0"A\0H"
\x1B!@ (\b 
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA
,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b @  \bj  \xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v  \bjA\0:\0\0\f\v   j k  A\0  \x89\v \x07 \v Aj$\0\v \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0(# \0(! \0A\x006 @  \0(\0\v \0A\x90j$\0\v\xD1\x7F#\0A\x90k"\x07$\0 \x07 6\x88 \x07 6\x8C \x07A\xE3\x006\x9C \x07 \x07A\xA0j6\x98 \x07A\x90j" $ >!\0 \x07A\0:\0\x8F@ \x07A\x8Cj    (  \x07A\x8Fj \0 \x07A\x98j \x07A\x94j \x07A\x84j\x85E\r\0 \x07A\xEE\x1B(\0\x006\0\x87 \x07A\xE7\x1B)\0\x007\x80 \0 \x07A\x80j \x07A\x8Aj \x07A\xF6\0j \0(\0( \0 \x07Aj!\0@ \x07(\x94" \x07(\x98"k"A\xE3\0N@ Aj/"\0!\b \0E\r\v \0! \x07-\0\x8FAF@ \0A-:\0\0 \0Aj!\v \x07A\x80j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xF6\0j  \xB4 \x07k \x07j-\0
:\0\0 Aj! Aj! \x07(\x94!\f\v\v0\0\v0\0\v \x07A\x8Cj \x07A\x88j)@  (\0Ar6\0\v \x07(\x8C \x07(\x90# \x07(\x98!\0 \x07A\x006\x98 \0@ \0 \x07(\x9C\0\v \x07A\x90j$\0\v\0A\xFC \v\xC7\x7F#\0A\xA0k"\b$\0 \b \bA\xA0j"6\f#\0A\x90k"\x07$\0 \x07 \x07A\x84j6 \0A\bj \x07A j" \x07Aj   \x88 \x07B\x007 \x07 6\f \b(\f \bAj"kAu! \0(\b!\0#\0Ak"$\0  \0H6\f  \x07A\fj  \x07Aj\xA4!\0 A\fjI Aj$\0 \0A\x7FF@0\0\v \b  \0Atj6\f \x07A\x90j$\0 \b(\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj (\0\xBE Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 $\0\v\xB8\0#\0A\x80k"$\0  A\xF4\0j6\f \0A\bj Aj" A\fj   \x88 (\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj ,\0\0\xC0 Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 A\x80j$\0\v\xB8\r\x7F#\0A0k"\x07$\0 \x07 6, A\x006\0 \x07 $ \x07=!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b \v\f\r\v\v \0 Aj \x07A,j   \b\x8B\f\v \0 Aj \x07A,j   \b\x8A\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07A\xA8\x86)\x007 \x07A\xA0\x86)\x007 \x07A\x98\x86)\x007\b \x07A\x90\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A\xC8\x86)\x007 \x07A\xC0\x86)\x007 \x07A\xB8\x86)\x007\b \x07A\xB0\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j!\0#\0Ak"$\0  6\f@@ \0 A\fj(\r\0 \bA \0: \b(\0(\f\0E\r\0 \0Q\f\v\v \0 A\fj(@  (\0Ar6\0\v Aj$\0\f\r\v \x07A,j!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x95" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xD0\x86A,\xFC
\0\0 \x07 \0      \x07 \x07A,jV6,\f\v\v \x07A\x90\x87(\x006 \x07A\x88\x87)\x007\b \x07A\x80\x87)\x007\0 \x07 \0      \x07 \x07AjV6,\f
\v \x07A,j   \bAN!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f \v \x07A\xB8\x87)\x007 \x07A\xB0\x87)\x007 \x07A\xA8\x87)\x007\b \x07A\xA0\x87)\x007\0 \x07 \0      \x07 \x07A jV6,\f\b\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v Aj \x07A,j   \b\x89\f\v \x07A,j   \bAN!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A,j" \0A\fj"(\r\0A \b :A\0 \b(\0(4\0A%G\r\0 Q (E\rA\v (\0r6\0\v \0Aj$\0\v \x07(,\v \x07A0j$\0\v \0  \0\0\0\vK\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# Aj A\fj   \x89 (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8A (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8B (\f Aj$\0\vF\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BAtjV\vX\x7F#\0A k"$\0 A\xB8\x87)\x007 A\xB0\x87)\x007 A\xA8\x87)\x007\b A\xA0\x87)\x007\0 \0       A j"V $\0\v\xDB\f\x7F#\0Ak"\x07$\0 \x07 6\f A\x006\0 \x07 $ \x07>!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b \v\f\r\v\v \0 Aj \x07A\fj   \b\x8E\f\v \0 Aj \x07A\fj   \b\x8D\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07B\xA5\xDA\xBD\xA9\xC2\xEC\xCB\x92\xF9\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07B\xA5\xB2\xB5\xA9\xD2\xAD\xCB\x92\xE4\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj!\0#\0Ak"$\0  6\f@@ \0 A\fj)\r\0 \0;"A\0H\r\0 \b(\b Atj-\0\0AqE\r\0 \0S\f\v\v \0 A\fj)@  (\0Ar6\0\v Aj$\0\f\r\v \x07A\fj!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x97" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xF8\x85(\0\x006\0\x07 \x07A\xF1\x85)\0\x007\0 \x07 \0      \x07 \x07A\vjW6\f\f\v\v \x07A\x80\x86-\0\0:\0 \x07A\xFC\x85(\0\x006\0 \x07 \0      \x07 \x07AjW6\f\f
\v \x07A\fj   \bAO!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f \v \x07B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\b\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v Aj \x07A\fj   \b\x8C\f\v \x07A\fj   \bAO!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A\fj" \0A\fj")\r\0A \b ;A\0 \b(\0($\0A%G\r\0 S )E\rA\v (\0r6\0\v \0Aj$\0\v \x07(\f\v \x07Aj$\0\v\x9B\x7F#\0A\xE0\0k"$\0 A\fj"   (\0 \0\b\0A\xD4\09"\0 -\0\b:\0\b \0 )\x007\0 \0A\fj A\fjb \0Aj Ajb \0A$j A$jb \0A0j A0jb \0A<j A<jb \0A\xC8\0j A\xC8\0jb \xC7 A\xE0\0j$\0 \0\vK\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# Aj A\fj   \x8C (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8D (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8E (\f Aj$\0\vC\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BjW\v;\x7F#\0Ak"$\0 B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\b \0      A\bj Aj"W $\0\v+\x7F  ("A\xB5\xFB~qA\x88r6    \x91  6\v\xB7\x07\x7F\x7F#\0A\x90k"\0$\0 \0B%7\x88 \0A\x88j"\x07ArA\x82 (\x91!\b \0 \0A\xE0j" 6\xDC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6  \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xE0j  \0A\x88j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xDCj  \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xDCj  \0A\x88j \0P\v"A\x7FF\r \0(\xDC\f\vA\0\v \0(\xDC"\x07  \x07j"
G!\v@ \0A\xE0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
 \0A\xEC\0j \0A\xE8\0j \f\x90 \0(d#   \0(l \0(h  \\! \b!! \0A\x90j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xF0k"\0$\0 \0B%7\xE8 \0A\xE8j"ArA\xD7 (\x91!\x07 \0 \0A\xC0j"\b6\xBC*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\xC0j  \0A\xE8j" \0A0j]"AL\r*! \0 9 \0A\xBCj   \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\xBCj  \0A\xE8j \0P\v"A\x7FF\r \0(\xBC\f\vA\0\v \0(\xBC"  j" G!
@ \0A\xC0j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $ 
 \0A\xCC\0j \0A\xC8\0j \v\x90 \0(D#   \0(L \0(H  \\! \x07!! \0A\xF0j$\0 \f\v0\0\v\v\xC7\x7F#\0A\xF0k"\0$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! \0A\xD0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0\xD0 Ar!\f\v \x07A\bG\r\0 \0A0:\0\xD0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\xD1 \0A\xD0jAr!\v \0A\xC8j  \0A\xE8j  \x92 \0(\xC8!\x07@ A\x88\x80qA\x88\x80G\r\0@  \x07F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0j" \x07 G! \0Aj"\b $   \x07 \0Aj" \0A\fj \0A\bj \b\x90 \0(#   \0(\f \0(\b  \\ \0A\xF0j$\0\v\r\0    \x91\v\xA8\x7F~#\0A\xF0k"$\0 A\xD0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@  \x07A\xC0\0F\r A-:\0\xD0 \0Ar!\0B\0 }\f\v \v!
\b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
\b\x1B \x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8j \0 A\xE8j
\b\x92@ A\x88\x80qA\x88\x80F@@ \0 (\xC8"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (\xC8!\v A\xD0j"\0  G!\x07 Aj"\b $ \0 \x07  Aj"\0 A\fj A\bj \b\x90 (#  \0 (\f (\b  \\ A\xF0j$\0\v\xA5\x7F#\0A\x90k"$\0 A\x83j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@  \x07A\xC0\0F\r A-:\0\x83 A\x84j!\0A\0 k\f\v \v! \b \x07A\xC0\0F"
r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
\b\x1B
\x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xF8\0j \0 A\x90j \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (x"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (x!\v A\x83j"\0  G! Aj"\x07 $ \0   Aj"\0 A\fj A\bj \x07\x90 (#  \0 (\f (\b  \\ A\x90j$\0\v\xDE\x7F#\0Ak"$\0  6\f@ -\0AqE@ \0     \0(\0( \0!\f\v  $ n!\0 (\0#  \0 \0(\0AA \x1Bj(\0\0 (\0"  ,\0\v"A\0H\x1B!@   \xC0A\0H"\0\x1B ( A\xFFq \0\x1BAtj F@ (\f!   A\fj (\0\xBE Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v+\x7F  ("A\xB5\xFB~qA\x88r6    \x94  6\v\xB7\x07\x7F\x7F#\0A\xE0k"\0$\0 \0B%7\xD8 \0A\xD8j"\x07ArA\x82 (\x91!\b \0 \0A\xB0j" 6\xAC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6  \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xB0j  \0A\xD8j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xACj  \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xACj  \0A\xD8j \0P\v"A\x7FF\r \0(\xAC\f\vA\0\v \0(\xAC"\x07  \x07j"
G!\v@ \0A\xB0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
 \0A\xEC\0j \0A\xE8\0j \f\x93 \0(d#   \0(l \0(h  Z! \b!! \0A\xE0j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xC0k"\0$\0 \0B%7\xB8 \0A\xB8j"ArA\xD7 (\x91!\x07 \0 \0A\x90j"\b6\x8C*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\x90j  \0A\xB8j" \0A0j]"AL\r*! \0 9 \0A\x8Cj   \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\x8Cj  \0A\xB8j \0P\v"A\x7FF\r \0(\x8C\f\vA\0\v \0(\x8C"  j" G!
@ \0A\x90j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $ 
 \0A\xCC\0j \0A\xC8\0j \v\x93 \0(D#   \0(L \0(H  Z! \x07!! \0A\xC0j$\0 \f\v0\0\v\v\xC3\x7F#\0A\xF0\0k"\0$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! \0A\xD0\0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0P Ar!\f\v \x07A\bG\r\0 \0A0:\0P \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0Q \0A\xD0\0jAr!\v \0A\xC8\0j  \0A\xE8\0j  \x92 \0(H!\x07@ A\x88\x80qA\x88\x80G\r\0@  \x07F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0\0j" \x07 G! \0Aj"\b $   \x07 \0Aj" \0A\fj \0A\bj \b\x93 \0(#   \0(\f \0(\b  Z \0A\xF0\0j$\0\v\r\0    \x94\v\xA5\x7F~#\0A\xF0\0k"$\0 A\xD0\0j!\0~ ("A\xCA\0q"\x07A\bF"\b B\0YrE@  \x07A\xC0\0F\r A-:\0P \0Ar!\0B\0 }\f\v \v!
\b \x07A\xC0\0F" r A\x80qE B\0SrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
\b\x1B \x1B!\b@ A\x80qE Pr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A\xC8\0j \0 A\xE8\0j
\b\x92@ A\x88\x80qA\x88\x80F@@ \0 (H"F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v (H!\v A\xD0\0j"\0  G!\x07 Aj"\b $ \0 \x07  Aj"\0 A\fj A\bj \b\x93 (#  \0 (\f (\b  Z A\xF0\0j$\0\v\x9D\x7F#\0A@j"$\0 A3j!\0\x7F ("A\xCA\0q"\x07A\bF"\b A\0NrE@  \x07A\xC0\0F\r A-:\x003 A4j!\0A\0 k\f\v \v! \b \x07A\xC0\0F"
r A\x80qE A\0HrrE@ \0A+:\0\0 \0Aj!\0\vA\bAA
\b\x1B
\x1B!\b@ E A\x80qEr\r\0 \x07A\xC0\0F@ \0A0:\0\0 \0Aj!\0\f\v \x07A\bG\r\0 \0A0:\0\0 \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0 \0Aj!\0\v A(j \0 A@k \b\x94@ A\x88\x80qA\x88\x80F@@ \0 (("F\r \0 \0-\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 \0Aj!\0\f\0\v\0\v ((!\v A3j"\0  G! Aj"\x07 $ \0   Aj"\0 A\fj A\bj \x07\x93 (#  \0 (\f (\b  Z A@k$\0\v\xDB\x7F#\0Ak"$\0  6\f@ -\0AqE@ \0     \0(\0( \0!\f\v  $ p!\0 (\0#  \0 \0(\0AA \x1Bj(\0\0 (\0"  ,\0\v"A\0H\x1B!@   \xC0A\0H"\0\x1B ( A\xFFq \0\x1Bj F@ (\f!   A\fj ,\0\0\xC0 Aj! (\0! -\0\v!\f\v\v\v Aj$\0 \v\xED\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ ="A\xD0\x85A\xEA\x85 \0A\xE0j (\0(0\0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xCCCA  \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jm\r\0 \0(\xCCB\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0  A\0H\x1B  \0\x98AG@ A6\0\v \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xC0j  \0A\xD0j  \0A\xD0j$\0\v\xBD\x7F~\x7F#\0A\xF0k"\0$\0 \0 6\xE8 \0 6\xEC \0A\xDCj  \0A\xF0j \0A\xECj \0A\xE8j\xB3 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
" \0 \0(\xD0  \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\xECj \0A\xE8j(\r\0 \0(\xCC  \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
\0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0  \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\xECC \0Aj \0Aj  \0A\xCCj \0(\xEC \0(\xE8 \0A\xDCj \0A j \0Aj \0Aj \0A\xF0j\xB2\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xE0 \0,\0\xE7" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6  \0(6\0\v \0  \0(\xCC \x99 \0)\0!\b  \0)\b7\b  \b7\0 \0A\xDCj \0A j \0( 5 \0A\xECj \0A\xE8j(@  (\0Ar6\0\v \0(\xEC \0A\xD0j  \0A\xDCj  \0A\xF0j$\0\f\vA!\v \0(\xECB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj  \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj  \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9A9\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@  (\0Ar6\0\v \0(\xDC \0A\xC0j  \0A\xCCj  \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xA6\x7F\x7F#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC \0A\xCCj  \0A\xE0j \0A\xDCj \0A\xD8j\xB3 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\xDCj \0A\xD8j(\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\xDCC \0A\x07j \0Aj  \0A\xBCj \0(\xDC \0(\xD8 \0A\xCCj \0Aj \0A\fj \0A\bj \0A\xE0j\xB2\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD0 \0,\0\xD7" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9B8\0 \0A\xCCj \0Aj \0(\f 5 \0A\xDCj \0A\xD8j(@  (\0Ar6\0\v \0(\xDC \0A\xC0j  \0A\xCCj  \0A\xE0j$\0\f\vA!\v \0(\xDCB\f\0\v\0\v\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9C7\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\x07\0 \0(\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9F;\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA07\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\xF1\x7F#\0A\xD0k"\0$\0 \0 6\xC8 \0 6\xCC R!  \0A\xD0j~! \0A\xC4j  \0A\xC4j} \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xCCj \0A\xC8j(\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xCCC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA16\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\x99\x8B.\x7F}|#\0Ak"$\0  6\f A\x006\b B\x007\0    j"  k\xC2#\0A\xE0\0k"%$\0 %A\bj! (\0"! ( k!#\0A\xC0k"$\0 A\x006\xA0 B\x007\x98 A\x006\xB0 B\x007\xA8 A\xB4j"A\x006\b B\x007\0 A\x80\xC0\0\xB6 A\x80\xC0\0\x96 A\fjA\0A0\xFC\v\0  6\b  6@\x7F Aj!\v\x7FAzA\x94-\0\0A1G\r\0A~ \vE\r \vA\x006 \v( "E@ \vA\x006( \vA/6 A/!\v \v($E@ \vA06$\vA| \v((AA\xD07 \0"E\r \v 6 A\x0068  \v6\0 A\xB4\xFE\x006A~!@ \vE\r\0 \v( E\r\0 \v($"E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0@@ (8"@ ((AG\r\v A6( A6\f\f\v \v((  \0 A\x0068 \v( A6( A6\fE\r\v \v($E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0A\0! A\x0064 B\x007, A\x006 \vA\x006\b \vB\x007 (\f"@ \v Aq60\v B\x007< A\x006$ A\x80\x806 B\x80\x80\x80\x80p7 B\xB4\xFE\x007 B\x81\x80\x80\x80p7\xC47  A\xB4
j"6p  6T  6P\vA\0 E\r\0 \v((  \v($\0 \vA\x006 \v\vE@ A\x006\xAC@@  (\0"6  ( k6A\0!\v#\0Ak"$\0A~!\x1B@ Aj"\rE\r\0 \r( E\r\0 \r($E\r\0 \r("\x07E\r\0 \x07(\0 \rG\r\0 \x07("A\xB4\xFE\0kAK\r\0 \r(\f"E\r\0 \r(\0"E@ \r(\r\v A\xBF\xFE\0F@ \x07A\xC0\xFE\x006A\xC0\xFE\0!\v \x07A\xDC\0j!- \x07A\xF2\0j!. \x07A\xF4j!" \x07A\xD8\0j!& \x07A\xF0\0j!# \x07A\xB4
j! \x07A\xF4\0j! \x07(@! \x07(<! \r("'! \r("!@@@@@@A}!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xB4\xFE\0k\x07
\r9:;<%&(\0*@BCD\v \x07(L! \f(\v \x07(L! \f%\v \x07(l! \f!\v \x07(\f!\f9\v AO\r E\r< A\bj! Aj! Ak! -\0\0 t j! AM\r ! ! !\f\v A O\r E\r; Aj! Ak! -\0\0 t j! AM\r\r ! !\f\v AO\r E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07M\r ! ! !\f\v \x07(\f"
E\r@ AO\r\0 E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! ! !\f\v E@ !A\0! ! \v!\f<\v Ar! Ak! -\0 t j! Aj!\v
AqE A\x9F\x96GrE@ \x07((E@ \x07A6(\vA\0! \x07A\0A\0A\0D"6 A\x9F\x96;\f  A\fjAD! \x07A\xB5\xFE\x006 \x07 6A\0! \x07(!\f7\v \x07($"@ A\x7F60\v A\btA\x80\xFEq A\bvjApE
AqqE@ \rA\xD96 \x07A\xD1\xFE\x006 \x07(!\f7\v AqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f7\v Av"Aq" A\bj!
A\x07M \x07(("\x7F  \x07
6(
\v
OqE@ Ak! \rA\xF46 \x07A\xD1\xFE\x006 ! \x07(!\f7\vA\0! \x07A\x006 \x07A\x80 t6 \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBD\xFE\0A\xBF\xFE\0 A\x80\xC0\0q\x1B6A\0! \x07(!\f6\v E@ !A\0! ! \v!\f:\v Ar! Ak! -\0 t j! Aj!\v \x07 6 A\xFFqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f5\v A\x80\xC0q@ \rA\x90
6 \x07A\xD1\xFE\x006 \x07(!\f5\v \x07($"@  A\bvAq6\0\v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 A\b:\0\f  A\bv:\0\r \x07 \x07( A\fjAD6\v \x07A\xB6\xFE\x006A\0!A\0!\f\v AK\r\v E\r5 Aj! Ak! -\0\0 t j! AK@ ! !\f\v A\bj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f6\v Ak! -\0 t j! Aj!\v \x07($"@  6\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  6\f \x07 \x07( A\fjAD6\v \x07A\xB7\xFE\x006A\0!A\0!\f\v AK\r\v E\r2 Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v A\bj! E@ !\f3\v Ak! -\0 t j! Aj!\v \x07($"@  A\bv6\f  A\xFFq6\b\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\v \x07A\xB8\xFE\x006A\0!A\0!A\0! \x07("A\x80\bq\r\f'\v \x07("A\x80\bqE@ !\f'\v ! AK\r\v E@A\0! ! \v!\f1\v Aj! Ak!
-\0\0 t j! A\x07K@ !
!\f\v A\bj!
E@ !\f0\v Ak! -\0 t j! Aj!\v \x07 6D \x07($"@  6\vA\0!@ A\x80qE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\vA\0!\f%\v A\bj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f.\v Ak! -\0 t j! Aj!\v \x07 AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr"6 \r 60 \x07A\xBE\xFE\x006A\0!A\0!\v \x07(E@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<A!\x1B\f/\v \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBF\xFE\x006\v\x7F@ \x07(\bE@  AK\r \r\f-\v \x07A\xCE\xFE\x006  A\x07qv! Axq! \x07(!\f)\v Ak! -\0\0 t j! Aj! A\br\v \x07 Aq6\bA\xC1\xFE\0!@@@@@ AvAqAk\0\v \x07A\x90\xDC\x006P \x07B\x89\x80\x80\x80\xD0\x007X \x07A\x90\xEC\x006T \x07A\xC7\xFE\x006\f\vA\xC4\xFE\0!\f\v \rA\x976A\xD1\xFE\0!\v \x07 6\vAk! Av! \x07(!\f'\v  A\x07qv!\x7F Axq"\b AK\r\0 E@A\0! \b! \v!\f,\v \bA\bj! Aj! Ak! -\0\0 \bt j! AK@ ! ! \f\v E@ !A\0! ! \v!\f,\v \bAj!
Aj! Ak! -\0 t j! AK@ ! !
\f\v E@ !A\0!
! \v!\f,\v \bAj! Aj! Ak! -\0
t j! A\x07K@ ! ! \f\v E@ !A\0! ! \v!\f,\v Ak! -\0 t j! Aj!A \v! A\xFF\xFFq" A\x7FsAvG@ \rA\xC2\v6 \x07A\xD1\xFE\x006 \x07(!\f'\v \x07A\xC2\xFE\x006 \x07 6DA\0!A\0!\v \x07A\xC3\xFE\x006\v \x07(D"@    I\x1B"   I\x1B"E@ \v!\f*\v @   \xFC
\0\0\v \x07 \x07(D k6D  j!  k!  j!  k! \x07(!\f%\v \x07A\xBF\xFE\x006 \x07(!\f$\v E@ !A\0! ! \v!\f(\v Ar! Ak! -\0 t j! Aj!\v \x07 Aq"A\x81j6d \x07 AvAq"Aj6h \x07 A
vAqAj"
6\` Ak! Av! AI AMqE@ \rA\x9E\v6 \x07A\xD1\xFE\x006 \x07(!\f#\v \x07A\xC5\xFE\x006A\0! \x07A\x006l\f\v \x07(l" \x07(\`"
I\r\f\v E\r\r  \x07(D:\0\0 \x07A\xC8\xFE\x006 Ak! Aj! \x07(!\f \v \x07(\f"E@A\0!\f\v@ AK@ ! \f\v E\r# A\bj! Aj! Ak!
-\0\0 t j! AK@
! !\f\v
E@ !A\0! ! \v!\f%\v Aj!
Aj! Ak!\b -\0 t j! AK@ \b!
!\f\v \bE@ !A\0!
! \v!\f%\v Aj! Aj! Ak!\b -\0
t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f%\v A r! Aj! Ak! -\0 t j!\v \r  k"
\r(j6 \x07 \x07(
j6 Aq"E  Fr\x7F  
k! \x07(! \x07\x7F \x07(@  
D\f\v  
\x82\v"6 \r 60 \x07(\f"Aq\vE\r \x07(  AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr \x07(\x1BF\r \rA\x876 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \x07A\xC0\xFE\x006\f\v !A\0!A\0! !\v \x07A\xCF\xFE\x006\f\x1B\v@ AM@ E\r Ak! -\0\0 t j! A\br! Aj!\v \x07 Aj"6l  At/\xE0[Atj A\x07q;\0 Ak! Av! "
G\r\0\v
!\v AM@A\0! "Aq"\vAG@@  At/\xE0[AtjA\0;\0 Aj! \v Aj" sAG\r\0\v\v AM@@  At"A\xE0\xDB\0j/\0AtjA\0;\0  A\xE2\xDB\0j/\0AtjA\0;\0  A\xE4\xDB\0j/\0AtjA\0;\0  A\xE6\xDB\0j/\0AtjA\0;\0 Aj"AG\r\0\v\v \x07A6l\v \x07A\x076X \x07 6P \x07 6pA\0! A\0 A # & "\xA2"\v@ \rA\xF7 6 \x07A\xD1\xFE\x006 \x07(!\f\x1B\v \x07A\xC6\xFE\x006 \x07A\x006lA\0!\v\v \x07(d" \x07(hj" K@A\x7F \x07(XtA\x7Fs! \x07(P!@ !\f ! !@@@@@@   q"Atj-\0"\b M@ !
\f\v@ E\r -\0\0 \ft!\b Aj! Ak! \fA\bj"
!\f
  \bj" q"Atj-\0"\bI\r\0\v\v  Atj/"AM@ \x07 Aj"6l  Atj ;\0
\bk!  \bv! ! \f\v\x7F\x7F@@@ Ak\0\v \bAj"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bk!  \bv!
E@ \rA\xCD
6 \x07A\xD1\xFE\x006 ! !
! \x07(!\f%\v Ak!
Av!
AqAj!\b . Atj/\0\f\v \bAj"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bkAk!  \bv"Av! A\x07qAj\f\v \bA\x07j"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bkA\x07k!  \bv"A\x07v! A\xFF\0qA\vj\v!\bA\0\v!\f \b j K\rA\0!
\bAq"E\r \b!@  Atj \f;\0 Aj! Ak!
Aj"
G\r\0\v\f\v  j!  Atj!\f"\v \b!\f\v \rA\xCD
6 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \bAO@@  Atj" \f;\0  \f;  \f;  \f; Aj! Ak"\r\0\v\v \x07 6l\v ! ! I\r\0\v\v \x07/\xF4E@ \rA\xB46 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A 6X \x07 6P \x07 6pA   # & "\xA2"\v@ \rA\xDB 6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A6\\ \x07 \x07(p6TA  \x07(dAtj \x07(h # - "\xA2"\v@ \rA\xA9
6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC7\xFE\x006A\0!\v\v \x07A\xC8\xFE\x006\v AI A\x82IrE@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6< \r("(4"\bA\x07q!( \b j!/ \b (,"0j!1 \r(\f" \r("j"$A\x81k!)   kj! \r(\0" \r(jAk!*A\x7F (\\tA\x7Fs!A\x7F (XtA\x7Fs! (T!+ (P!, (@! (<!\f (8!
(0!@ AM\x7F -\0\0 t \fj -\0 A\bjtj!\f Aj! Ar \v , \f qAtj"-\0"k! \f v!\f@@@@@ \x7F \r\x7F@@ -\0\0"E@  -\0:\0\0 Aj!\f\b\v Aq@ /!\x7F Aq"E@ ! \f\f\v\x7F  M@ ! \f\v A\bj! -\0\0 t \fj!\f Aj\v!  k! \fA\x7F tA\x7Fsq j! \f v\v! AM@ -\0\0 t j -\0 A\bjtj! Ar! Aj!\v  +  qAtj"-\0" k!  v!\f -\0\0"Aq\r@ A\xC0\0qE@  + /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f -\0\0"AqE\r\f\v\v ! A\x93\f\v A\xC0\0qE@  , /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f\f\v\vA\xBF\xFE\0 A q\rA\xF7\f\v /!\x7F Aq" M@ ! \f\v -\0\0 t \fj!\f Aj  A\bj"M\r\0 -\0 t \fj!\f Aj! Aj\v! \fA\x7F tA\x7Fsq!  k! \f v!\f  j"!  k"M\r ! k" M\r (\xC47E\rA\xA6\v6A\xD1\xFE\0\v6\f\v@@ \bE@
0 kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v  $j jk jAxK\r@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\f\v  \bK@
1 kj!  \bk" O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v / $j jk jAxM@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v \b  k"O@
!\f\vA\0! \b!
! (@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" (G\r\0\v\v \bA\bO@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  \bk!\f\v
\b kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v  $j jk jAxK\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  k!\v@ AI\r\0A\0! Ak"AnAjAq"@@  -\0\0:\0\0  -\0:\0  -\0:\0 Ak! Aj! Aj! Aj" G\r\0\v\v A I\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07  -\0\b:\0\b  -\0 :\0  -\0
:\0
 -\0\v:\0\v A\fj! A\fj! A\fk"AK\r\0\v\v E@ !\f\v  -\0\0:\0\0 AF\r Aj!\f\v  !k!@ " "-\0\0:\0\0  -\0:\0  -\0:\0 Aj! Aj! Ak"AK\r\0\v E\r  -\0\0:\0 AG@ Aj!\f\v  -\0:\0 Aj!\f\v  -\0:\0 Aj!\v *O\r\0  )I\r\v\v \r 6\f \r Avk"6\0 \r ) kA\x81j6 \r * kAj6  A\x07q"6@  \fA\x7F tA\x7Fsq6< \x07(@! \x07(<! \r(! \r(\0! \r(! \r(\f! \x07(A\xBF\xFE\0G\r \x07A\x7F6\xC87 \x07(!\f\v \x07A\x006\xC87 ! ! !@ \x07(P" A\x7F \x07(XtA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\r -\0\0 t!\b Aj! Ak! A\bj"
!
  \bj" qAtj"\b-\0"\fI\r\0\v\v \f! \b/!@ \b-\0\0"\bAkA\xFFqAK@A\0! ! !\f\v ! !@
"   Atj" A\x7F  \bjtA\x7Fs"q vAtj"-\0"\fjO@
!\b\f\v@ E\r\r -\0\0 t!\f Aj! Ak! A\bj"\b!    \fj" q vAtj"-\0"\fj \bK\r\0\v\v \b k!
 v! -\0\0!\b /!\v \x07 A\xFF\xFFq6D \x07  \fj6\xC87
\fk!  \fv! \bA\xFFq"E@ \x07A\xCD\xFE\x006 \x07(!\f\v A q@ \x07A\xBF\xFE\x006 \x07A\x7F6\xC87 \x07(!\f\v A\xC0\0q@ \rA\xF76 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC9\xFE\x006 \x07 Aq" 6L\v !
!\b@ E@ \x07(D!\f\v ! !  I@@ E\r\v Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(D A\x7F tA\x7Fsqj"6D  k!  v!\v \x07A\xCA\xFE\x006 \x07 6\xCC7\v ! ! !@ \x07(T" A\x7F \x07(\\tA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj"
!
  \bj" qAtj"\b-\0"\fI\r\0\v\v \b/! \x07\x7F \b-\0\0" AO@ ! ! \f!\b \x07(\xC87\f\v ! !@
" \f  Atj" A\x7F \fjtA\x7Fs"q \fvAtj"-\0"\bjO@ ! \f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj" ! \f   \bj" q \fvAtj"-\0"\bj K\r\0\v\v \fk!
 \fv! -\0\0! /! \x07(\xC87 \fj\v \bj6\xC87
\bk!  \bv! A\xC0\0q@ \rA\x936 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xCB\xFE\x006 \x07 Aq" 6L \x07 A\xFF\xFFq6H\v !
!\b @ ! !  I@@ E\r Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(H A\x7F tA\x7Fsqj6H  v!  k!\v \x07A\xCC\xFE\x006\v \r\vA\0! \v!\f\v\x7F \x07(H"  k"K@@  k" \x07(0M\r\0 \x07(\xC47E\r\0 \rA\xA66 \x07A\xD1\xFE\x006 \x07(!\f\v\x7F \x07(4" I@ \x07(8 \x07(,  k"kj\f\v \x07(8  kj\v!  \x07(D"  I\x1B\f\v  k! \x07(D" \v! \x07    I\x1B"
k6D
Ak!\fA\0!
A\x07q"\bE\r
!@  -\0\0:\0\0 Ak! Aj! Aj! Aj" \bG\r\0\v\f\x07\v \b
j!  \bAtj!\f\v  j!
Atj!\f\v  j!  Atj!\f\v \b
j!  \bAtj!\f\v  j!
Atj!\f\v  j!  Atj!\f\v
!\v \fA\x07O@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v 
k! \x07(D\r\0 \x07A\xC8\xFE\x006 \x07(!\f \v \x07(!\f\b\vA\0! !
! \v!\f\v\v \x07($"@ A\x006\v !\v \x07A\xB9\xFE\x006\v@ \x07(" A\x80\bqE\r\0 \x07(D"   K\x1B"\f@@ \x07($"\bE\r\0 \b("
E\r\0 \b(" \b( k"M\r\0  k \f  \fj K\x1B"@ 
j  \xFC
\0\0\v \x07(! \v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  \fD6\v \x07 \x07(D \fk"6D  \fk!  \fj!\v E\r\0 \v!\f \v \x07A\xBA\xFE\x006 \x07A\x006D\v@ \x07-\0A\bq@A\0! E\r\b@  j-\0\0!\b@ \x07($"
E\r\0
("E\r\0 \x07(D"
( O\r\0 \x07 Aj6D  j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f \v \x07($"E\r\0 A\x006\v \x07A\xBB\xFE\x006 \x07A\x006D\v@ \x07-\0Aq@A\0! E\r\x07@  j-\0\0!\b@ \x07($"
E\r\0
($"E\r\0 \x07(D"
((O\r\0 \x07 Aj6D  j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f\b\v \x07($"E\r\0 A\x006$\v \x07A\xBC\xFE\x006\v \x07("
A\x80q@@ AK@ !\f\v E\r A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v E@ !A\0! ! \v!\f\b\v Ar! Aj! Ak! -\0 t j!\v@ \x07-\0\fAqE\r\0  \x07/F\r\0 \rA\xCB6 \x07A\xD1\xFE\x006 ! \x07(!\f\vA\0!A\0! !\v \x07($"@ A60 
A vAq6,\v \x07A\0A\0A\0D"6 \r 60 \x07A\xBF\xFE\x006 \x07(!\f\v E\r \x07(E\r@ AK@ !\f\v E\r A\bj! Aj! Ak!
-\0\0 t j! AK@
! !\f\v
E@ !A\0! ! \v!\f\v Aj!
Aj! Ak!\b -\0 t j! AK@ \b!
!\f\v \bE@ !A\0!
! \v!\f\v Aj! Aj! Ak!\b -\0
t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f\v A r! Aj! Ak! -\0 t j!\v@ AqE\r\0  \x07( F\r\0 \rA\xF06 \x07A\xD1\xFE\x006 ! \x07(!\f\v\v !A\0!A\0!\v \x07A\xD0\xFE\x006\vA!\f\vA\0! \v!\v \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<@@ \x07(,E@  F\r \x07(A\xD0\xFE\0K\r\v\x7F  k! @@ \r("
(8"\vE@A!
\r((A
((tA \r( \0"\v68 \vE\r\v
(,"E@
B\x0070
A
((t"6,\v  M@ @ \v  k \xFC
\0\0\v
A\x0064\f\v 
(4"k"  I\x1B"@  \vj  k \xFC
\0\0\v  I@ k"@
(8  k \xFC
\0\0\v
64\f\vA\0!
(4 j"A\0 
(,"G\x1B64 
(0"M\r\0
 j60\v \f\v
(,60A\0\v\r \r(! \r(!\v \r \r(\b ' kj6\b \r  k" \r(j6 \x07 \x07( j6 \x07-\0\fAqE  FrE@ \r(\f k! \x07(! \x07\x7F \x07(@   D\f\v   \x82\v"6 \r 60\v \r \x07(@A\xC0\0A\0 \x07(\b\x1BjA\x80A\0 \x07("A\xBF\xFE\0F\x1BjA\x80A\x80A\0 A\xC2\xFE\0F\x1B A\xC7\xFE\0F\x1Bj6, A{ \x1B   F\x1B   'F\x1B!\x1B\f\v \x07A\xD2\xFE\x006\vA|!\x1B\v Aj$\0 \x1BAK\r A\xA8j!
(\xAC!\b (\0! ( (k!#\0A k"$\0@  k" A\0L\r\0
(\b
("\vk N@ \v \bk" H@   j"k"E  FrE@ \v  \xFC
\0\0\v
 \vj6 A\0L\r
\b \v \b j\xD1  \bj!@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v
\b \v \b j"\xD1@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v A\fj
(\0k \vj\x83 \b
(\0k
\x8C"\v(\b"j!@  G@  -\0\0:\0\0 Aj! Aj!\f\v\v \v 6\b \v(
( \bk"@ \v(\b \b \xFC
\0\0\v \v \v(\b
( \bkj6\b
\b6 \v(
(\0" \bkj! \b k"@   \xFC
\0\0\v \v 6
(\0"6
\v(6\0 \v 6
(!
\v(\b6 \v 6\b
(\b!
\v(\f6\b \v 6\f \v \v(6\0 \v\x87\v A j$\0 \x1BAG\r\0\v \r\xCB 1 A\x98j" (\xA8" (\xAC k\xE0
1 \rA\x006\\ \rA\xF8\xF9\x006@ \rA\xD0\xF9\x006\0 \rA\xE4\xF9\x006\b \rA\x88\xFA\0(\0"6\0 \r A\fk(\0jA\x8C\xFA\0(\x006\0 \rA\x006 \r \r(\0A\fk(\0j"A\x006  \rA\fj""6 A\x006\f B\x82\xA0\x80\x80\xE0\x007  E6 A jA\0A(\xFC\v\0 Aj\xF4 A\0:\0P B\x80\x80\x80\x80p7H \rA\x90\xFA\0(\0"6\b A\fk(\0 \rA\bjjA\x94\xFA\0(\x006\0 \rA\x84\xFA\0(\0"6\0 \r A\fk(\0jA\x98\xFA\0(\x006\0 \rA\x9C\xFA\0(\x006\b \r"A\xD0\xF9\x006\0 A\xE4\xF9\x006\b A\xF8\xF9\x006@ A\xA8\xF5\x006\0 Aj\xF4 B\x007 B\x007 B\x007\b B\x007 A\xE8\xF5\x006\0 B\x007( A60  A j"\vG@@ ,\0\v! \v,\0\vA\0H@ (\0  A\0H"\x1B!@ (  \x1B" \v(\bA\xFF\xFF\xFF\xFF\x07q"I@ \v 6 \v(\0! @   \xFC
\0\0\v  jA\0:\0\0\f\v \v Ak  kAj \v("A\0   \x89\v\f\v A\0H@ (\0!@ ("A
M@ \v :\0\v @ \v  \xFC
\0\0\v  \vjA\0:\0\0\f\v \vA
A
k \v-\0\vA\xFF\0q"A\0   \x89\v\f\v \v (\b6\b \v )\x007\0\v\v A\x006, ( A j" ,\0+"A\0H"\x1B!
($  \x1B! (0"A\bq@ 
6\f 
6\b 
j"6  6,\v@ AqE\r\0 
j6, A
((A\xFF\xFF\xFF\xFF\x07qAk A\0N\x1B" 
6 
6 
($ ,\0+" A\0H\x1Bj6 -\x000AqE\r\0@ A\0H@ 
A\xFF\xFF\xFF\xFF\x07j"
6 A\xFF\xFF\xFF\xFF\x07k! \f\v\v E\r\0 
j6\v#\0A\xC0k"\b$\0 \bB\x007\xB8 \bB\xCE\x8E\xCD\x8257\xB0  \bA\xB0jAf@@  (\0A\fk(\0j-\0AqE@ \b(\xB0A\xCE\x8E\xCD\x82F\r\vA\xD5\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB4AkA|M@A\xD9 \bA\xB4j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB8"A\x81\xAD\xE2O@A\xDB \bA\xB8j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b-\0\xBC"AO@ \b 6\0A\x97 \ba\`A\xB0\xF1\0(\0L B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \xCD! \b(\xB4! \bA:\0e \bA\xE8\0j"
A\0A\xC8\0\xFC\v\0 \b 6X \b \b-\0\xBC6\\ \b \b-\0\xBD6\` \b \b-\0\xBEAq:\0d
Al"AA AF\x1Blz \bA\xF4\0j"\v z \b AK":\0e \bA\x80j"AA \x1B lz \bA\x8Cj" z \bA\x98j" z \bA\xA4j"  lz  \b(h \bA\xCC\0j
u" ( (\0kf 1  \b(\x8C \bA@k u"( (\0kf 1  \b(\x98 \bA4j u"( (\0kf 1  \b(t \bA(j \vu"( (\0kf 1  \b(\x80 \bAj u"( (\0kf 1  \b(\xA4 \bAj u"( (\0kf 1@  (\0A\fk(\0j-\0Aq@A\xB6\f\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v  \bA\xD8\0j")7  )\x007\0 Aj Ajt Aj Ajt A(j A(jt A4j A4jt A@k A@kt A\xCC\0j A\xCC\0jt\v \bA\xD8\0j\xCC\v \bA\xC0j$\0 \x81\f\v Aj\xCB\v 1 A\xA8j1 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\v A\x98j  A\xC0j$\0#\0A\x90k"\b$\0 (\0! (\xCD!@@@ ( (k"\v Al"
AA \v (\0"Al"F\x1BlG@ \bA\xA568 \bA\xF8\x0064 \bA\x9F60A\xED\v \bA0ja\`A\xB0\xF1\0(\0L\f\v
( (kG@ \bA\xF9\x006< \bA<jA\xF5\xD0\f\v (, ((kAA -\0\r"Aq\x1B lG@ \bA\xCD6( \bA\xFA\x006$ \bA\x9F6 A\xED\v \bA ja\`A\xB0\xF1\0(\0L\f\v (8 (4kG@ \bA\x9E6 \bA\xFB\x006 \bA\x9F6A\xED\v \bAja\`A\xB0\xF1\0(\0L\f\v
(D (@kG@ \bA\xFC\x006< \bA<jA\xCB\xD0\f\v (P (Lk" 
lF\r \bA\x9F6\b \bA\xFD\x006 \bA\x9F6\0A\xED\v \ba\`A\xB0\xF1\0(\0L\v \0A\0:\0\b \0B\x007\0 \0A\fjA\0A\xC8\0\xFC\v\0\f\v \0A\fj"A\0A\xC8\0\xFC\v\0 \0 6\0 \0 (6 \0 -\0\f:\0\b 
w \0Aj
w \0A$j Atw \0A0j w \0A<j
w \0A\xC8\0j w@  \vF@ (\0! (!A\0!\f@
\fF\r  \fAtj}C\0\0\x80?C\0\0\x80\xBF  \fAtj/\0"\xC1A\0N\x1B!2 A\xFF\x07q!@ A
vAq"AG@ \r 2C\0\0\x808\x94 \xB3\x94C\0\0\x80:\x94\f\vC\0\0\xC0\x7F 2C\0\0\x80\x7F\x94 \x1B\f\vC\0\0\x80?!3@ Ak"A\x80N@C\0\0\0\x7F!3 A\xFFI@ A\xFF\0k!\f\vC\0\0\x80\x7F!3A\xFD  A\xFDO\x1BA\xFEk!\f\v A\x81\x7FJ\r\0C\0\0\x80\f!3 A\x9B~K@ A\xE6\0j!\f\vC\0\0\0\0!3A\xB6}  A\xB6}M\x1BA\xCCj!\v \xB3C\0\0\x80:\x94C\0\0\x80?\x92 2 3 AtA\x80\x80\x80\xFCj\xBE\x94\x94\x94\v8\0 \fAj!\f\f\0\v\0\vD\0\0\0\0\0\0\xF0?A (\bt\xB7\xA3\xB6!2 (\0! (!A\0!\f@
\fF\r  \fAtj 2  \fAlj"/\0\0 ,\0"A\xFFqAtrA\x80\x80\x80xA\0 A\0H\x1Br\xB2\x948\0 \fAj!\f\f\0\v\0\v \0(! (!A\0!\f@
\fF@ \bA\xD4\0j!\vA\0!\f Aq!\x7F \fF\x7F \0(0! (4!A\0@ @ \0($ ((! \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
\0\0 \fAtj! \bA<j!C\0\0\0\0!3  \fAtj"/\0\0 -\0Atr -\0"Atr! Av!A!\x7F A\0H\x7F  AtjC\0\0\x80? 3\x93\x918\0 A\fj!A\0  G@  Atj A\xFFq\xB3C\xF35?\x94C\0\x80\xFFC\x95"2\x8C 2 A\x80q\x1B"28\0 2 2\x94 3\x92!3 A
v!\v Ak!\f\v\v!@ AG@  At"j"  j*\0 *\0\x948\0 Aj!\f\v\v\f\v \0($ (( \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7L \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
\0\0#\0Ak"$\0 \fAlj"-\0! -\0!  -\0\0\xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*H\x948  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*L\x948\b  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*P\x94"28\f \fAtj" 28\b  )7\0 C\0\0\x80? *\f *\f\x94 * *\x94 *\b *\b\x94\x92\x92\x93"2C\0\0\0\0 2C\0\0\0\0^\x1B\x918\f Aj$\0\v \fAj!\f\f\v\v!\f@ \fG@  \fAtj}C\0\0\0\0  \fj-\0\0\xB3C\0\0\x7FC\x95"2C\0\0\x80? 2\x93\x95"3\xBC"A\x80\x80\x80\xFCF\r\0@ A\x80\x80\x80\xFC\x07kA\xFF\xFF\xFF\x87xM@ At"E@#\0Ak"C\0\0\x80\xBF8\f *\fC\0\0\0\0\x95\f\v A\x80\x80\x80\xFC\x07F\r A\x80\x80\x80xI A\0NqE@ 3 3\x93"2 2\x95\f\v 3C\0\0\0K\x94\xBCA\x80\x80\x80\xDC\0k!\vA\x98\xF1\0+\0  A\x80\x80\xCC\xF9k"A\x80\x80\x80|qk\xBE\xBB AvA\xF0q"+\x90o\xA2D\0\0\0\0\0\0\xF0\xBF\xA0"7 7\xA2"8\xA2A\xA0\xF1\0+\0 7\xA2A\xA8\xF1\0+\0\xA0\xA0 8\xA2 Au\xB7A\x90\xF1\0+\0\xA2 +\x98o\xA0 7\xA0\xA0\xB6!3\v 3\v8\0 \fAj!\f\f\v\v \0(<! (@!A\0!\f@
\fF@ (P (L"k! \0(H!A\0!@  F@ (\f!A\0!#\0A\xE0\0k"\v$\0#\0Ak"$\0A!\x7FA!A A\0L\r\0 AkAs"A\x7FsAq! AqE! AqE\v!  :\0  :\0  :\0\r -\0! -\0! -\0\r! \vA\x80\x80\x80\xFC6@ \vA\x80\x80\x80\xFC68 \vC\0\0\x80?C\0\0\x80\xBF \x1B"68\\ \vC\0\0\x80?C\0\0\x80\xBF \x1B"58X \v 68T \v 58P \vC\0\0\x80?C\0\0\x80\xBF \x1B"48L \v 48D \v 68, \v 58( \v 48$ \v 58 \v 48 \v 68\f \v 6 5\x94"38< \v 4 5\x94"284 \v 6 4\x94"480 \v 48 \v 38 \v 28 \v 4 5\x948H Aj$\0 \0( \0(\f"kAu!@  M@ \0(( \0($"kAu!A\0!@  M@@ \0(L \0(H"kAuAn" \0(\0n! \vA$j!\0A\0!A\0!@A\0!\f  M\r@  \fM@  j!\f  Atj" \0 \fAtj*\0"2 *\0\x948\0  2 *\x948  2 *\b\x948\b Aj! \fAj!\f\f\v\0\v\0\v\0\v  Atj" \v* *\0\x948\0  \v* *\x948  \v* *\b\x948\b Aj!\f\v\v \vA\xE0\0j$\0  Atj" \v*\f *\0\x948\0  \v* *\x948  \v* *\b\x948\b Aj!\f\v\v  Atj  j-\0\0\xB3C\0\0\0\xC3\x92C\0\0\0<\x948\0 Aj!\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x7FC\x95C\0\0\0\xBF\x92C\x9A\x99>\x958\0 \fAj!\f\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x80=\x94C\0\0 \xC1\x928\0 \fAj!\f\f\v\v\v \bA\x90j$\0 \xCC %A\xE0\0j$\0 1 Aj$\0\v\x81\x7F#\0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ =! (\0#  $ n!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x95 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v\xEE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ >"A\xD0\x85A\xEA\x85 \0A\xE0j (\0( \0 \0(# \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 6\f \0A\x006\b@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0A  \0A\xBCj \0A\bjA\0 \0A\xD0j \0Aj \0A\fj \0A\xE0jo\r\0 \0(\x8C@\f\v\v \0A\xC0j" \0(\xBC k" \0(\xC0 \0,\0\xCB!*! \0 6\0  A\0H\x1B  \0\x98AG@ A6\0\v \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\v\xBE\x7F~\x7F#\0A\xA0k"\0$\0 \0 6\x98 \0 6\x9C \0A\xE0j  \0A\xF0j \0A\xEFj \0A\xEEj\xB7 \0A\x006\xD8 \0B\x007\xD0 \0A\xD0j"A
" \0 \0(\xD0  \0,\0\xDBA\0H\x1B"6\xCC \0 \0A j6 \0A\x006 \0A:\0 \0A\xC5\0:\0A\0!@@@@ \0A\x9Cj \0A\x98j)\r\0 \0(\xCC  \0(\xD4 \0,\0\xDB" A\0H\x1B"jF@ \0A\xD0j" At" A
\0(\xD8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xDBA\0N\x1B" \0 \0(\xD0  \0,\0\xDBA\0H\x1B" j6\xCC\v \0(\x9CA\xC0 \0Aj \0Aj  \0A\xCCj \0,\0\xEF \0,\0\xEE \0A\xE0j \0A j \0Aj \0Aj \0A\xF0j\xB6\r\0 \rA\0! \0(\xCC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xE4 \0,\0\xEB" A\0H\x1BE\r\0 \0-\0AqE\r\0 \0(" \0A jkA\x9FJ\r\0 \0 Aj6  \0(6\0\v \0  \0(\xCC \x99 \0)\0!\b  \0)\b7\b  \b7\0 \0A\xE0j \0A j \0( 5 \0A\x9Cj \0A\x98j)@  (\0Ar6\0\v \0(\x9C \0A\xD0j  \0A\xE0j  \0A\xA0j$\0\f\vA!\v \0(\x9C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j  \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj  \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9A9\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xA7\x7F\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xD0j  \0A\xE0j \0A\xDFj \0A\xDEj\xB7 \0A\x006\xC8 \0B\x007\xC0 \0A\xC0j"A
" \0 \0(\xC0  \0,\0\xCBA\0H\x1B"6\xBC \0 \0Aj6\f \0A\x006\b \0A:\0\x07 \0A\xC5\0:\0A\0!@@@@ \0A\x8Cj \0A\x88j)\r\0 \0(\xBC  \0(\xC4 \0,\0\xCB" A\0H\x1B"jF@ \0A\xC0j" At" A
\0(\xC8A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xCBA\0N\x1B" \0 \0(\xC0  \0,\0\xCBA\0H\x1B" j6\xBC\v \0(\x8CA\xC0 \0A\x07j \0Aj  \0A\xBCj \0,\0\xDF \0,\0\xDE \0A\xD0j \0Aj \0A\fj \0A\bj \0A\xE0j\xB6\r\0 \rA\0! \0(\xBC k"A\0L\r@@ -\0\0"A+k"\x07\0\0\v A.F\rA! A0kA\xFFqA
I\r\f\v AF\r@ \x07\0\0\v -\0"A.F\rA! A0kA\xFFqA M\r\v@ \0(\xD4 \0,\0\xDB" A\0H\x1BE\r\0 \0-\0\x07AqE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xBC \x9B8\0 \0A\xD0j \0Aj \0(\f 5 \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0A\xC0j  \0A\xD0j  \0A\x90j$\0\f\vA!\v \0(\x8C@\f\0\v\0\v\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9C7\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \x9F;\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA07\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\xE6\0#\0A\xE0k"\0$\0 \0 6\xD8 \0 6\xDC R! \0A\xC8j  \0A\xD7j\x7F \0A\x006\xC0 \0B\x007\xB8 \0A\xB8j"A
" \0 \0(\xB8  \0,\0\xC3A\0H\x1B"6\xB4 \0 \0Aj6\f \0A\x006\b@@ \0A\xDCj \0A\xD8j)\r\0 \0(\xB4  \0(\xBC \0,\0\xC3" A\0H\x1B"jF@ \0A\xB8j" At" A
\0(\xC0A\xFF\xFF\xFF\xFF\x07qAk \0,\0\xC3A\0N\x1B" \0 \0(\xB8  \0,\0\xC3A\0H\x1B" j6\xB4\v \0(\xDCA\xC0   \0A\xB4j \0A\bj \0,\0\xD7 \0A\xC8j \0Aj \0A\fjA\xD0\x85o\r\0 \0(\xDC@\f\v\v@ \0(\xCC \0,\0\xD3" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA16\0 \0A\xC8j \0Aj \0(\f 5 \0A\xDCj \0A\xD8j)@  (\0Ar6\0\v \0(\xDC \0A\xB8j  \0A\xC8j  \0A\xE0j$\0\v\x81\x7F#\0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ >! (\0#  $ p!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x97 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v@\x7FA\0!\0\x7F  F\x7F \0 (\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xA2\vT\x7F@@  G@A\x7F!\0  F\r (\0" (\0"H\r  J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\v@\x7FA\0!\0\x7F  F\x7F \0 ,\0\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xCE\v^\x7F   kj!@@  G@A\x7F!\0  F\r ,\0\0" ,\0\0"\x07H\r  \x07J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\vT\x7F  \0(T" A\0 A\x80j"\xCA" k  \x1B"   K\x1B"Y \0  j"6T \0 6\b \0  j6 \v\xA8\x7F \0(T"(\0! (" \0( \0("\x07k"  I\x1B"@  \x07 Y  (\0 j"6\0  ( k"6\v    K\x1B"@   Y  (\0 j"6\0  ( k6\v A\0:\0\0 \0 \0(,"6 \0 6 \v\b\0 \0K!\v\0 \0 \0(\0A\fk(\0j\xC0\v\0 \0 \0(\0A\fk(\0j\x81\v
\0 \0A\bk\xC0\v
\0 \0A\bk\x81\v\0 \0  )\bA\0  (\0(\0\v \0 \0\xB0!\v\x95\x7F~ (," ("I@  6, !\vB\x7F!
@ Aq"\x07E AF \x07AFqr\r\0 @  ( A j ,\0+A\0H\x1Bk\xAC! \v@@@ \0\v A\bq@ (\f (\bk\xAC!\b\f\v  (k\xAC!\b\f\v !\b\v  \b|"B\0S  Ur\r\0 A\bq!@ P\r\0 @ (\fE\r\v AqE\r\0 E\r\v @  6  (\b \xA7j6\f\v Aq@  ( \xA7j6\v !
\v \0
7\b \0B\x007\0\v\x99\b\x7F A\x7FF@A\0\v \0(\b! \0(\f! \0\x7F \0(" \0(G@ \0(,\f\v \0-\x000AqE@A\x7F\v \0(,!\x07 \0(! \0A j"A\0\xAA A
\0((A\xFF\xFF\xFF\xFF\x07qAk \0,\0+A\0N\x1B" \0 \0(  \0,\0+"\bA\0H" \x1B"6 \0  \0($ \b \x1Bj6 \0   kj"6  \x07 kj\v" Aj"  I\x1B"6, \0-\x000A\bq@ \0 6 \0 \0( \0A j \0,\0+A\0H\x1B"6\b \0   kj6\f\v \0 \xC0\xC3\v\x8E\x7F \0(," \0("I@ \0 6, !\v\x7FA\x7F \0(\f" \0(\bM\r\0 A\x7FF@ \0 6 \0 Ak6\fA\0\v \0-\x000AqE@A\x7F Ak-\0\0 A\xFFqG\r\v \0 6 \0 Ak"\x006\f \0 :\0\0 \v\v_\x7F \0(," \0("I@ \0 6, !\vA\x7F!@ \0-\x000A\bqE\r\0  \0("K\x7F \0 6  \v \0(\f"\0M\r\0 \0-\0\0!\v \v\0 \0 \0(\0A\fk(\0j\xC1\v
\0 \0A\bk\xC1\v \0 \0A\f\xA5\v\0 \0AjK \0A\bk\v\f\0 \0A\fjK \0\v\0 \0 \0(\0A\fk(\0j\xC1\v \0 \0A\xA5\v\f\0 \0AjK \0\v\0 \0 \0(\0A\fk(\0j\xC5\v \0 \0A\b\xA5\v\f\0 \0A\bjK \0\v\x96\x7F@@  L\r\0 \0(" \0("O@ \0 -\0\0 \0(\0(4\0A\x7FF\r Aj! Aj!\f \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0( \v j6  j!  j!\f\v\0\v\v \v3\x7FA\x7F! \0 \0(\0($\0\0A\x7FG@ \0(\f"-\0\0! \0 Aj6\f\v \v\0A\x7F\v\x91\x7F@@  L\r\0@ \0(\f" \0("I@ \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0(\f \v j6\f\f\v \0 \0(\0((\0\0"A\x7FF\r  :\0\0A!\v  j!  j!\f\v\v \v\0 \0B\x7F7\b \0B\x007\0\v\0 \0B\x7F7\b \0B\x007\0\v\0 \0\v\f\0 \0\xC3 \0!\v\f\0 \0(<\x9E\v;\x7F \0(<#\0Ak"\0$\0  A\xFFq \0A\bj\x9E! \0)\b! \0Aj$\0B\x7F  \x1B\v)\0  (\0A\x07jAxq"Aj6\0 \0 )\0 )\b\xC49\0\v\xB4\x7F|~#\0A\xB0k"\v$\0 \vA\x006,@ \xBD"B\0S@A!A\x9D ! \x9A"\xBD!\f\v A\x80q@A!A\xA0 !\f\vA\xA3 A\x9E Aq"\x1B! E!\v@ B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0\x83B\x80\x80\x80\x80\x80\x80\x80\xF8\xFF\0Q@ \0A  Aj" A\xFF\xFF{q7 \0  3 \0A\xFB\rA\xED A q"\x1BA\xCEA\x97 \x1B  b\x1BA3 \0A   A\x80\xC0\0s7    J\x1B!\r\f\v \vAj!@@@  \vA,j\xD1" \xA0"D\0\0\0\0\0\0\0\0b@ \v \v(,"Ak6, A r"A\xE1\0G\r\f\v A r"A\xE1\0F\r \v(,!\f\f\v \v Ak"\f6, D\0\0\0\0\0\0\xB0A\xA2!\vA  A\0H\x1B!
\vA0jA\xA0A\0 \fA\0N\x1Bj"!\x07@ \x07 \xFC"6\0 \x07Aj!\x07  \xB8\xA1D\0\0\0\0e\xCD\xCDA\xA2"D\0\0\0\0\0\0\0\0b\r\0\v@ \fA\0L@ \f! \x07! !\b\f\v !\b \f! @A AO\x1B!@ \x07Ak" \bI\r\0 \xAD!\x1BB\0!@  5\0 \x1B\x86 |" B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}>\0 Ak" \bO\r\0\v B\x80\x94\xEB\xDCT\r\0 \bAk"\b >\0\v@ \b \x07"I@ Ak"\x07(\0E\r\v\v \v \v(, k" 6, !\x07 A\0J\r\0\v\v A\0H@
AjA nAj! A\xE6\0F!@A A\0 k" A O\x1B!\r@  \bM@A\0A \b(\0\x1B!\x07\f\vA\x80\x94\xEB\xDC \rv!A\x7F \rtA\x7Fs!A\0! \b!\x07@ \x07 \x07(\0" \rv j6\0  q l! \x07Aj"\x07 I\r\0\vA\0A \b(\0\x1B!\x07 E\r\0  6\0 Aj!\v \v \v(, \rj" 6,  \x07 \bj"\b \x1B" Atj   kAu J\x1B! A\0H\r\0\v\vA\0! @  \bM\r\0  \bkAuA l! A
!\x07 \b(\0"A
I\r\0@ Aj!  \x07A
l"\x07O\r\0\v\v
A\0 A\xE6\0G\x1Bk A\xE7\0F
A\0Gqk"  kAuA lA kH@ \vA0jA\x84\`A\xA4b \fA\0H\x1Bj A\x80\xC8\0j"\fA m"Atj!\rA
!\x07 \f A lk"A\x07L@@ \x07A
l!\x07 Aj"A\bG\r\0\v\v@ \r(\0"\f \f \x07n" \x07lk"E \rAj" Fq\r\0@ AqE@D\0\0\0\0\0\0@C! \x07A\x80\x94\xEB\xDCG \b \rOr\r \rAk-\0\0AqE\r\vD\0\0\0\0\0@C!\vD\0\0\0\0\0\0\xE0?D\0\0\0\0\0\0\xF0?D\0\0\0\0\0\0\xF8?  F\x1BD\0\0\0\0\0\0\xF8?  \x07Av"F\x1B  K\x1B!@ \r\0 -\0\0A-G\r\0 \x9A! \x9A!\v \r \f k"6\0  \xA0 a\r\0 \r  \x07j"6\0 A\x80\x94\xEB\xDCO@@ \rA\x006\0 \b \rAk"\rK@ \bAk"\bA\x006\0\v \r \r(\0Aj"6\0 A\xFF\x93\xEB\xDCK\r\0\v\v  \bkAuA l! A
!\x07 \b(\0"A
I\r\0@ Aj!  \x07A
l"\x07O\r\0\v\v \rAj"   I\x1B!\v@ "\f \bM"\x07E@ Ak"(\0E\r\v\v@ A\xE7\0G@ A\bq!\f\v A\x7FsA\x7F
A
\x1B" J A{Jq"\x1B j!
A\x7FA~ \x1B j! A\bq"\r\0Aw!@ \x07\r\0 \fAk(\0"E\r\0A
!A\0! A
p\r\0@ "\x07Aj!  A
l"pE\r\0\v \x07A\x7Fs!\v \f kAuA l! A_qA\xC6\0F@A\0!
 jA k"A\0 A\0J\x1B" 
J\x1B!
\f\vA\0!
 j jA k"A\0 A\0J\x1B" 
J\x1B!
\vA\x7F!\r
A\xFD\xFF\xFF\xFF\x07A\xFE\xFF\xFF\xFF\x07
r"\x1BJ\r
A\0GjAj!@ A_q"\x07A\xC6\0F@ A\xFF\xFF\xFF\xFF\x07sJ\r A\0 A\0J\x1B!\f\v  Au"s k\xAD x"kAL@@ Ak"A0:\0\0  kAH\r\0\v\v Ak" :\0\0 AkA-A+ A\0H\x1B:\0\0  k" A\xFF\xFF\xFF\xFF\x07sJ\r\v  j" A\xFF\xFF\xFF\xFF\x07sJ\r \0A   j" 7 \0  3 \0A0  A\x80\x80s7@@@ \x07A\xC6\0F@ \vAjA r!  \b \b K\x1B"!\b@ \b5\0 x!@  \bG@  \vAjM\r@ Ak"A0:\0\0  \vAjK\r\0\v\f\v  G\r\0 Ak"A0:\0\0\v \0   k3 \bAj"\b M\r\0\v @ \0A\x9AA3\v
A\0L \b \fOr\r@ \b5\0 x" \vAjK@@ Ak"A0:\0\0  \vAjK\r\0\v\v \0 A
A N\x1B3
A k! \bAj"\b \fO\r
A J !
\r\0\v\f\v@
A\0H\r\0 \f \bAj \b \fI\x1B! \vAjA r!\f \b!\x07@ \f \x075\0 \fx"F@ Ak"A0:\0\0\v@ \x07 \bG@  \vAjM\r@ Ak"A0:\0\0  \vAjK\r\0\v\f\v \0 A3 Aj!
rE\r\0 \0A\x9AA3\v \0  \f k"

H\x1B3
k!
\x07Aj"\x07 O\r
A\0N\r\0\v\v \0A0
AjAA\07 \0   k3\f\v
!\v \0A0 A jA A\07\v \0A  A\x80\xC0\0s7   J\x1B!\r\f\v  AtAuA qj! @ A\vK\r\0A\f k!D\0\0\0\0\0\x000@!@ D\0\0\0\0\0\x000@\xA2! Ak"\r\0\v -\0\0A-F@  \x9A \xA1\xA0\x9A!\f\v  \xA0 \xA1!\v  \v(,"\x07 \x07Au"s k\xAD x"F@ Ak"A0:\0\0 \v(,!\x07\v Ar!
A q!\f Ak" Aj:\0\0 AkA-A+ \x07A\0H\x1B:\0\0 A\bqE A\0Lq!\b \vAj!\x07@ \x07" \xFC"A\x90\xF5\0j-\0\0 \fr:\0\0  \xB7\xA1D\0\0\0\0\0\x000@\xA2"D\0\0\0\0\0\0\0\0a \bq \x07Aj"\x07 \vAjkAGrE@ A.:\0 Aj!\x07\v D\0\0\0\0\0\0\0\0b\r\0\vA\x7F!\r A\xFD\xFF\xFF\xFF\x07
 k"\bj"kJ\r\0 \0A   Aj \x07 \vAj"k"\x07 \x07Ak H\x1B \x07 \x1B"j" 7 \0
3 \0A0   A\x80\x80s7 \0  \x073 \0A0  \x07kA\0A\07 \0  \b3 \0A   A\x80\xC0\0s7    J\x1B!\r\v \vA\xB0j$\0 \r\v\0B\0\v\xD6\x07\x7F#\0A k"$\0  \0("6 \0(!  6  6   k"6  j! Aj!A!\x07\x7F@@@ \0(< A A\fj\v\x9E@ !\f\v@  (\f"F\r A\0H@ !\f\v A\bA\0  ("\bK" \x1Bj"  \bA\0 \x1Bk"\b (\0j6\0 A\fA \x1Bj" (\0 \bk6\0  k! \0(< " \x07 k"\x07 A\fj\v\x9EE\r\0\v\v A\x7FG\r\v \0 \0(,"6 \0 6 \0  \0(0j6 \f\v \0A\x006 \0B\x007 \0 \0(\0A r6\0A\0 \x07AF\r\0  (k\v A j$\0\v\x89\x7F#\0Ak"\0$\0@ \0A\fj \0A\bj\r\0A\xEC\xDB \0(\fAtAj/"6\0 E\r\0 \0(\b/"@A\xEC\xDB(\0" \0(\fAtjA\x006\0  E\r\vA\xEC\xDBA\x006\0\v \0Aj$\0A\x84\xCEA\x006\0A\x80\xCEA6\0\x95A\x84\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\x80\xCE6\0A\xA4\xCEA.6\0A\xA8\xCEA\x006\0\xCCA\xA8\xCEA\xA0\xCE(\x006\0A\xA0\xCEA\xA4\xCE6\0A\xCC\xCFA\xD4\xCE6\0A\xA4\xCFA\x80\x806\0A\xA0\xCFA\xC0\xEC6\0A\x84\xCFA*6\0A\xA8\xCFA\xB0\xCB(\x006\0\v\v\xBF\xBE(\0A\x80\b\v\x940123456789abcdefghijklmnopqrstuvwxyz\0load_spz\0infinity\0February\0January\0July\0Thursday\0Tuesday\0Wednesday\0Saturday\0Sunday\0Monday\0Friday\0May\0%m/%d/%y\0-+ 0X0x\0-0X+0X 0X-0x+0x 0x\0Nov\0Thu\0August\0unsigned short\0unsigned int\0invalid literal/lengths set\0invalid code lengths set\0unknown header flags set\0invalid distances set\0get\0Oct\0float\0invalid bit length repeat\0Sat\0numPoints\0colors\0UnpackOptions\0positions\0rotations\0too many length or distance symbols\0invalid stored block lengths\0scales\0alphas\0[SPZ: ERROR] Check failed: %s:%d: %s\0vf32_ptr\0Apr\0vector\0money_get error\0[SPZ ERROR] deserializePackedGaussians: read error\0October\0November\0September\0December\0unsigned char\0Mar\0/emsdk/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp\0Sep\0%I:%M:%S %p\0Sun\0Jun\0Mon\0nan\0Jan\0coordinateSystem\0CoordinateSystem\0Jul\0bool\0April\0invalid code -- missing end-of-block\0incorrect header check\0incorrect length check\0incorrect data check\0push_back\0invalid distance too far back\0Fri\0sh\0header crc mismatch\0March\0Aug\0unsigned long long\0unsigned long\0std::wstring\0basic_string\0std::string\0std::u16string\0std::u32string\0inf\x000123456789abcdef\0%.0Lf\0%Lf\0resize\0invalid window size\0true\0Tue\0false\0invalid block type\0June\0double\0shDegree\0bad_array_new_length was thrown in -fno-exceptions mode\0invalid literal/length code\0invalid distance code\0RawGaussianCloud\0unknown compression method\0[SPZ ERROR] deserializePackedGaussians: header not found\0%0*lld\0%*lld\0+%lld\0%+.4ld\0void\0locale not supported\0antialiased\0Wed\0%Y-%m-%d\0[SPZ ERROR] deserializePackedGaussians: Too many points: %d\0[SPZ ERROR] deserializePackedGaussians: Unsupported SH degree: %d\0[SPZ ERROR] deserializePackedGaussians: version not supported: %d\0Dec\0./spz/src/cc/load-spz.cc\0Feb\0%a %b %d %H:%M:%S %Y\0POSIX\0VectorUInt8T\0%H:%M:%S\0NAN\0PM\0AM\0%H:%M\0LC_ALL\0ASCII\0LANG\0RUF\0LUF\0INF\0RDF\0LDF\0UNSPECIFIED\0C\0RUB\0LUB\0RDB\0LDB\0catching a class without an object?\0emscripten::memory_view<short>\0emscripten::memory_view<unsigned short>\0emscripten::memory_view<int>\0emscripten::memory_view<unsigned int>\0emscripten::memory_view<float>\0emscripten::memory_view<uint8_t>\0emscripten::memory_view<int8_t>\0emscripten::memory_view<uint16_t>\0emscripten::memory_view<int16_t>\0emscripten::memory_view<uint64_t>\0emscripten::memory_view<int64_t>\0emscripten::memory_view<uint32_t>\0emscripten::memory_view<int32_t>\0emscripten::memory_view<char>\0emscripten::memory_view<unsigned char>\0emscripten::memory_view<signed char>\0emscripten::memory_view<long>\0emscripten::memory_view<unsigned long>\0emscripten::memory_view<double>\x000123456789\0C.UTF-8\x0001234567\0VectorFloat32\x0001\x001.3.1\0.\0-\0(packed.alphas.size()) == (numPoints)\0(null)\0(packed.colors.size()) == (numPoints * 3)\0(packed.scales.size()) == (numPoints * 3)\0(packed.sh.size()) == (numPoints * shDim * 3)\0(packed.rotations.size()) == (numPoints * (packed.usesQuaternionSmallestThree ? 4 : 3))\0(packed.positions.size()) == (numPoints * 3 * (usesFloat16 ? 2 : 3))\0%\0length_error was thrown in -fno-exceptions mode with message "%s"\0[SPZ: ERROR] Unsupported SH degree: %d
\0 \0\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0A\xA0 \v\xB60\0\0\xF0c\0\0\xF0c\0\0P\0\0\xA4d\0\x008\0\0N3spz13GaussianCloudE\0\0\0\xA4d\0\0X\0\0N3spz13UnpackOptionsE\0ppiip\0\xF0c\0\0|\0\0\xA4d\0\0\x84\0\0NSt3__26vectorIfNS_9allocatorIfEEEE\0ipp\0(e\0\0\xD4\0\0\0\0\0\0\0\0\0\xEC\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIfEE\0\0\0\0\xCCd\0\0\xF8\0\0(\0\0NSt3__227__optional_move_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\x004\0\0d\0\0NSt3__227__optional_copy_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\0p\0\0\x98\0\0NSt3__220__optional_move_baseIfLb1EEE\0\0\0\xCCd\0\0\xA4\0\0\xCC\0\0NSt3__220__optional_copy_baseIfLb1EEE\0\0\0\xCCd\0\0\xD8\0\0\0\0NSt3__223__optional_storage_baseIfLb0EEE\0\0\0\0\xA4d\0\0\f\0\0NSt3__224__optional_destruct_baseIfLb1EEE\0\0\0\xA4d\0\0@\0\0NSt3__218__sfinae_ctor_baseILb1ELb1EEE\0\0\xA4d\0\0p\0\0NSt3__220__sfinae_assign_baseILb1ELb1EEE\0\0\0\0\x84e\0\0\xAC\0\0\0\0\0\0|\0\0PNSt3__26vectorIfNS_9allocatorIfEEEE\0\0\0\0\x84e\0\0\xE4\0\0\0\0\0|\0\0PKNSt3__26vectorIfNS_9allocatorIfEEEE\0pp\0v\0vp\0\0\0\x9C\0\0pp\0\0\x98c\0\0|\0\x008d\0\0vppf\0\0\0\0\x98c\0\0|\0\0\xFCc\0\x008d\0\0vppif\0\0\0\xFCc\0\0|\0\0ipp\0\\\0\x008d\0\0\xA4d\0\0d\0\0N10emscripten3valE\0\0\xAC\0\0|\0\0\xFCc\0\0pppi\0\0\0\0\0\0\0\0\xA8c\0\0|\0\0\xFCc\0\x008d\0\0ippif\0\0\0(e\0\0\xD0\0\0\0\0\0\0\0\0\0\xE8\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIhEE\0\0\0\0\xCCd\0\0\xF4\0\0$\0\0NSt3__227__optional_move_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\x000\0\0\`\0\0NSt3__227__optional_copy_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\0l\0\0\x94\0\0NSt3__220__optional_move_baseIhLb1EEE\0\0\0\xCCd\0\0\xA0\0\0\xC8\0\0NSt3__220__optional_copy_baseIhLb1EEE\0\0\0\xCCd\0\0\xD4\0\0\0\0\0NSt3__223__optional_storage_baseIhLb0EEE\0\0\0\0\xA4d\0\0\b\0\0NSt3__224__optional_destruct_baseIhLb1EEE\0\0\0\xA4d\0\0<\0\0NSt3__26vectorIhNS_9allocatorIhEEEE\0\x84e\0\0p\0\0\0\0\0\x004\0\0PNSt3__26vectorIhNS_9allocatorIhEEEE\0\0\0\0\x84e\0\0\xA8\0\0\0\0\x004\0\0PKNSt3__26vectorIhNS_9allocatorIhEEEE\0pp\0vp\0\`\0\0pp\0\0\x98c\0\x004\0\0\xC0c\0\0vppi\0\0\0\0\x98c\0\x004\0\0\xFCc\0\0\xC0c\0\0vppii\0\0\0\xFCc\0\x004\0\0ipp\0\\\0\0\xC0c\0\0\xA8\0\x004\0\0\xFCc\0\0pppi\0\0\0\0\xA8c\0\x004\0\0\xFCc\0\0\xC0c\0\0ippii\0p\0vp\0ipp\0vppi\0ipp\0vppi\0ppp\0vppp\0\0\0Xd\0\0p\0\0N3spz16CoordinateSystemE\0p\0vp\0ipp\0vppi\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\xA4d\0\0\xB0\0\0NSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\xA4d\0\0\xF8\0\0NSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE\0\0\xA4d\0\0@\0\0NSt3__212basic_stringIDsNS_11char_traitsIDsEENS_9allocatorIDsEEEE\0\0\0\xA4d\0\0\x8C\0\0NSt3__212basic_stringIDiNS_11char_traitsIDiEENS_9allocatorIDiEEEE\0\0\0\xA4d\0\0\xD8\0\0N10emscripten11memory_viewIcEE\0\0\xA4d\0\0\0\0\0N10emscripten11memory_viewIaEE\0\0\xA4d\0\0(\0\0N10emscripten11memory_viewIhEE\0\0\xA4d\0\0P\0\0N10emscripten11memory_viewIsEE\0\0\xA4d\0\0x\0\0N10emscripten11memory_viewItEE\0\0\xA4d\0\0\xA0\0\0N10emscripten11memory_viewIiEE\0\0\xA4d\0\0\xC8\0\0N10emscripten11memory_viewIjEE\0\0\xA4d\0\0\xF0\0\0N10emscripten11memory_viewIlEE\0\0\xA4d\0\0\0\0N10emscripten11memory_viewImEE\0\0\xA4d\0\0@\0\0N10emscripten11memory_viewIxEE\0\0\xA4d\0\0h\0\0N10emscripten11memory_viewIyEE\0\0\xA4d\0\0\x90\0\0N10emscripten11memory_viewIfEE\0\0\xA4d\0\0\xB8\0\0N10emscripten11memory_viewIdEE\0A\xE43\v\xA1(\x960\x07w,a\xEE\xBAQ \x99\xC4m\x07\x8F\xF4jp5\xA5c\xE9\xA3\x95d\x9E2\x88\xDB\xA4\xB8\xDCy\xE9\xD5\xE0\x88\xD9\xD2\x97+L\xB6 \xBD|\xB1~\x07-\xB8\xE7\x91\xBF\x90d\xB7\xF2 \xB0jHq\xB9\xF3\xDEA\xBE\x84}\xD4\xDA\xEB\xE4\xDDmQ\xB5\xD4\xF4\xC7\x85\xD3\x83V\x98l\xC0\xA8kdz\xF9b\xFD\xEC\xC9e\x8AO\\\xD9lcc=\xFA\xF5\r\b\x8D\xC8 n;^iL\xE4A\`\xD5rqg\xA2\xD1\xE4<G\xD4K\xFD\x85\r\xD2k\xB5
\xA5\xFA\xA8\xB55l\x98\xB2B\xD6\xC9\xBB\xDB@\xF9\xBC\xAC\xE3l\xD82u\\\xDFE\xCF\r\xD6\xDCY=\xD1\xAB\xAC0\xD9&:\0\xDEQ\x80Q\xD7\xC8a\xD0\xBF\xB5\xF4\xB4!#\xC4\xB3V\x99\x95\xBA\xCF\xA5\xBD\xB8\x9E\xB8(\b\x88_\xB2\xD9\f\xC6$\xE9\v\xB1\x87|o/LhX\xABa\xC1=-f\xB6\x90A\xDCvq\xDB\xBC \xD2\x98*\xD5\xEF\x89\x85\xB1q\xB5\xB6\xA5\xE4\xBF\x9F3\xD4\xB8\xE8\xA2\xC9\x07x4\xF9\0\x8E\xA8 \x96\x98\xE1\xBB\rj\x7F-=m\b\x97ld\x91\\c\xE6\xF4Qkkbal\xD80e\x85N\0b\xF2\xED\x95l{\xA5\x1B\xC1\xF4\b\x82W\xC4\xF5\xC6\xD9\xB0eP\xE9\xB7\xEA\xB8\xBE\x8B|\x88\xB9\xFC\xDF\xDDbI-\xDA\xF3|\xD3\x8CeL\xD4\xFBXa\xB2M\xCEQ\xB5:t\0\xBC\xA3\xE20\xBB\xD4A\xA5\xDFJ\xD7\x95\xD8=m\xC4\xD1\xA4\xFB\xF4\xD6\xD3j\xE9iC\xFC\xD9n4F\x88g\xAD\xD0\xB8\`\xDAs-D\xE53_L
\xAA\xC9|\r\xDD<qP\xAAA'\v\xBE\x86 \f\xC9%\xB5hW\xB3\x85o \xD4f\xB9\x9F\xE4a\xCE\xF9\xDE^\x98\xC9\xD9)"\x98\xD0\xB0\xB4\xA8\xD7\xC7=\xB3Y\x81\r\xB4.;\\\xBD\xB7\xADl\xBA\xC0 \x83\xB8\xED\xB6\xB3\xBF\x9A\f\xE2\xB6\x9A\xD2\xB1t9G\xD5\xEA\xAFw\xD2\x9D&\xDB\x83\xDCs\vc\xE3\x84;d\x94>jm\r\xA8Zjz\v\xCF\xE4\x9D\xFF \x93'\xAE\0
\xB1\x9E\x07}D\x93\xF0\xD2\xA3\b\x87h\xF2\xFE\xC2i]Wb\xF7\xCBge\x80q6l\xE7knv\x1B\xD4\xFE\xE0+\xD3\x89Zz\xDA\xCCJ\xDDgo\xDF\xB9\xF9\xF9\xEF\xBE\x8EC\xBE\xB7\xD5\x8E\xB0\`\xE8\xA3\xD6\xD6~\x93\xD1\xA1\xC4\xC2\xD88R\xF2\xDFO\xF1g\xBB\xD1gW\xBC\xA6\xDD\xB5?K6\xB2H\xDA+\r\xD8L\x1B
\xAF\xF6J6\`zA\xC3\xEF\`\xDFU\xDFg\xA8\xEF\x8En1y\xBEiF\x8C\xB3a\xCB\x83f\xBC\xA0\xD2o%6\xE2hR\x95w\f\xCCG\v\xBB\xB9"/&U\xBE;\xBA\xC5(\v\xBD\xB2\x92Z\xB4+j\xB3\\\xA7\xFF\xD7\xC21\xCF\xD0\xB5\x8B\x9E\xD9,\xAE\xDE[\xB0\xC2d\x9B&\xF2c\xEC\x9C\xA3ju
\x93m\xA9 \x9C?6\xEB\x85g\x07rW\0\x82J\xBF\x95z\xB8\xE2\xAE+\xB1{8\x1B\xB6\f\x9B\x8E\xD2\x92\r\xBE\xD5\xE5\xB7\xEF\xDC|!\xDF\xDB\v\xD4\xD2\xD3\x86B\xE2\xD4\xF1\xF8\xB3\xDDhn\x83\xDA\xCD\xBE\x81[&\xB9\xF6\xE1w\xB0owG\xB7\xE6Z\b\x88pj\xFF\xCA;f\\\v\xFF\x9Ee\x8Fi\xAEb\xF8\xD3\xFFkaE\xCFlx\xE2
\xA0\xEE\xD2\r\xD7T\x83N\xC2\xB39a&g\xA7\xF7\`\xD0MGiI\xDBwn>Jj\xD1\xAE\xDCZ\xD6\xD9f\v\xDF@\xF0;\xD87S\xAE\xBC\xA9\xC5\x9E\xBB\xDE\x7F\xCF\xB2G\xE9\xFF\xB50\xF2\xBD\xBD\x8A\xC2\xBA\xCA0\x93\xB3S\xA6\xA3\xB4$6\xD0\xBA\x93\xD7\xCD)W\xDET\xBFg\xD9#.zf\xB3\xB8Ja\xC4\x1Bh]\x94+o*7\xBE\v\xB4\xA1\x8E\f\xC3\x1B\xDFZ\x8D\xEF-\0\0\0\0F;ge\x8Cv\xCE\xCA\xCAM\xA9\xAFY\xEB\xEDN\xD0\x8A+\xD5\x9D#\x84\x93\xA6D\xE1\xB2\xD6\xDB\x9D\xF4\xED\xBC\xF8>\xA0Wx\x9Br2\xEB=6\xD3\xADQ\xB6gK\xF8!p\x9F|%\xAB\xC6\xE0c\x90\xA1\x85\xA9\xDD\b*\xEF\xE6oO|@+\xAE:{L\xCB\xF06\xE5d\xB6\r\x82\x97}}\xD1Fz\x1B\v\xD3\xB7]0\xB4\xD2\xCE\x96\xF03\x88\xAD\x97VB\xE0>\xF9\xDBY\x9C\vP\xFCMk\x9B\x7F\x87&2\xD0\xC1U\xB5R\xBBT\x80v1\xDE\xCD\xDF\x9E\x98\xF6\xB8\xFB\xB9\x86'\x87\xFF\xBD@\xE25\xF0\xE9Ms\xCB\x8E(\xE0m\xCA\xC9\xA6V\xAD\xACl\x1B* cf.\xFB:\xFAh\xC0]\x9F\xA2\x8D\xF40\xE4\xB6\x93Uw\xD7\xB41+\xB0\xD1\xFBf~\xBD]~\x1B\x9C-\xE1g\xDA\x86[/\xADV\`H\xC8\xC5\xC6\f)\x83\xFDkLI\xB0\xC2\xE3\x8B\xA5\x86\xA0\xF85P\x9B\x9FP\x9A\xD66\xFF\xDC\xEDQ\x9AOK{ pr\xC3=\xDB\xB1\x85\xBC\xD4\xA4v#\xA8\xE2MD\xCD(\0\xEDbn;\x8A\x07\xFD\x9D\xCE\xE6\xBB\xA6\xA9\x83q\xEB\0,7\xD0gI3\v>\xD5u0Y\xB0\xBF}\xF0\xF9F\x97zj\xE0\xD3\x9B,\xDB\xB4\xFE\xE6\x96Q\xA0\xADz4\x81\xDD\xE5H\xC7\xE6\x82-\r\xAB+\x82K\x90L\xE7\xD86\b\x9E\rocT@\xC6\xCC{\xA1\xA9\xF0/[\xCBcJ\x91\x86\xCA\xE5\xD7\xBD\xAD\x80D\x1B\xE9a \x8E\xC8m'\xAB\x8EV@\xCE\xAF&\xDF\xB2\xE9\xB8\xD7#Pxekv\xF6\xCD2\xFC\xB0\xF6U\x99z\xBB\xFC6<\x80\x9BS8[\xC2\xCF~\`\xA5\xAA\xB4-\f\xF2k\`a\xB0/\x81'\x8BH\xE4\xED\xC6\xE1K\xAB\xFD\x86.\x8A\x8DR\xCC\xB6~7\xFB\xD7\x98@\xC0\xB0\xFD\xD3f\xF4\x95]\x93y_:\xD6+]\xB3,@\xF1kj{\x96\xA06?\xA1\xE6\rX\xC4u\xAB%3\x90{@\xF9\xDD\xD2\xEF\xBF\xE6\xB5\x8A\x9E\x96*\xF6\xD8\xADM\x93\xE0\xE4<T\xDB\x83Y\xC7}\xC7\xB8\x81F\xA0\xDDK\v r\r0n \xEB7\x8BO\xD0P\xEE\x85\x9D\xF9A\xC3\xA6\x9E$P\0\xDA\xC5;\xBD\xA0\xDCv\x9AMsj\xBB=\xEC\xFD\x8Bs7K"\xDCqpE\xB9\xE2\xD6X\xA4\xEDf=n\xA0\xCF\x92(\x9B\xA8\xF7'\rqa+j\xABf\xC3\xBB\xED]\xA4\xDE~\xFB\xE0?8\xC0\x87Z\xF2\x8D.\xF5\xB4\xB6I\x90\x95\xC6\xD6\xEC\xD3\xFD\xB1\x89\xB0&_\x8B\x7FC\xCC-;\xA2\x8A\\\xC7@[\xF5h\`\x92\r\xBB\xCB\x91D\x80\xAC\xF4\x8E\xCD[\xC8\xF6b>[P&\xDFkA\xBA\xD7&\xE8\x91\x8Fp\xB0m\f\xF6Vwi<\x1B\xDE\xC6z \xB9\xA3\xE9\x86\xFDB\xAF\xBD\x9A'e\xF03\x88#\xCBT\xED:\xE0 ^|\xDBn;\xB6\x96\xC7\x94\xF0\xAD\xA0\xF1c\v\xE4%0\x83u\xEF}*\xDA\xA9FM\xBF\x886\xD2\xC3\xCE\r\xB5\xA6@ B{{l\xD1\xDD?\x8D\x97\xE6X\xE8]\xAB\xF1G\x1B\x90\x96"K\xCF\xBEYp\xA8\xDB\x93=t\xD5fF\xA0"\xF0\0\x9BE\x95\xCA\xD6\xEC:\x8C\xED\x8B_\xAD\x9D#\xEB\xA6sF!\xEB\xDA\xE9g\xD0\xBD\x8C\xF4v\xF9m\xB2M\x9E\bx\x007\xA7>;P\xC21\xB0\xF5Dw\x8B\x92!\xBD\xC6;\x8E\xFB\xFD\\\xEBh[
.\`\x7Fo\xE4-\xD6\xC0\xA2\xB1\xA5\x83f.\xD9\xC5]I\xBC\xE0I+\x87v\xDA\x8D\xC3\x97\x9C\xB6\xA4\xF2V\xFB\r]\xC0j8\x1B3\xA4R T\xC1\x98m\xFDn\xDEV\x9A\vM\xF0\xDE\xEA\v\xCB\xB9\x8F\xC1\x86 \x87\xBDwE\xA6\xCD\xE89\xE0\xF6\x8F\\*\xBB&\xF3l\x80A\x96\xFF&w\xB9bsP\xCB\xBD5k\xAC\xD8\0\0\0\0X\x80\xE2\xD7\xF1\xB4t\xA9\x86V\xA3\xE2\rh\xE9\xBA\x8D\x8A>\v\xDC\x9DK\x8B>J\x85\xA1 \xDD\x9DC\xDEt\x1B},\x9B\xF7\xAAg\xC9\xE0?\x90+7\x96}\x94\xCE\x96\x9FC
;BR\xBB\xA0\xC4\xFB=\xF6g\xA3\xBD\xB0\xE86*\xFA\xB0\xB6\xC8-0\x9E\x8EA\xB0|Y\x8F&\xE3\xD7\xA6\xCD~ Wn&\xA0\xB5\xB9m+\x8B\xF35\xABi$\x9C-?\x87\xC4\xAD\xDDPv\x84&L\xF6f\xF1\xE5p0R\xBD\xF0\xD2\x85\xF6{\xEC\xCF\xAE\xFB\x07}X\xBB_\xFD\xBAl\x91k%/\xC9\xEB\xC7\xF8\`m\x91[8\xEDs\x8CsfM\xC6+\xE6\xAF\x82\`\xF9\xB2\xDA\xE0\x1BeM\xC65F\xCD$\xE2\xEFKrA\xB7\xCB\x90\x96\xFC@\xAE\xDC\xA4\xC0L\v\rF\xA8U\xC6\xF8\x7F\x9BPg<\xC3\xD0\x85\xEBjV\xD3H2\xD61\x9Fy]\xD5!\xDD\xED\x88[\xBB\xA1\xD0\xDBYv(\xEC\bMpl\xEA\x9A\xD9\xEA\xBC9\x81j^\xEE\xCA\xE1\`\xA4\x92a\x82s;\xE7\xD4\xD0cg6\x07\xAD\xF1\xA9D\xF5qK\x93\\\xF70w\xFF\xE7O\xFC\xC1\xAD|#z\xBE\xFAu\xD9\xE6z\x97"\xD7J^zW\xA8\x89\xD3\xD1\xFE*\x8BQ\xFD\xC0\xDA"\xB7\x98Z\xC0\`1\xDC\x96\xC3i\\t\xA7\xCA\xEBW\xFFJ \x80V\xCC_#L\xBD\xF4E\xC7\x83\xBEGai\xB4\xC17\xCA\xECA\xD5<\x9A\x8Ckdn\xBC\xCD\x9C8\x95\xDA\xC8\xDE\x97\xE4\x82\x86U/\x91P\xF6w\xB2!\xB9\x87-b\xE1\x07\xCF\xB5H\x81\x99{\xC1[\x8AE\x8B
\xA7\\\xAA\x8C\xF1\xFF\xF2\f(6\xA1\xCExn!,\xAF\xC7\xA7z\f\x9F'\x98\xDB\xD4\xAC\xA6\x91\x8C,DF%\xAA\xE5}*\xF02\xB3\xBCoq\xEB<\x8D\xA6B\xBA\xDB:9\xD2Q\xB1\x07\x98 1\xE5O\xA0\xB7\xB3\xEC\xF87Q;P\xD8\x9A\bX\xF3M\xA1\xDE\xA5\xEE\xF9^G9\xB2\xD5ys\xEAU\x9B\xA4C\xD3\xCD\x07\x1BS/\xD0\xD5\xC5\xB0\x93\x8DERD$\xC3\xE7|C\xE607\xC8\xD8zoH:\xAD\xC6\xCEl\x9EN\x8E\xD9Z\xE3S\x89c\xB1^\xAB\xE5\xE7\xFD\xF3e*\xB8\xEE;\`\xE0n\xD9\xB7I\xE8\x8Fhm\xC3\xDF\xFE\xF2\x80\x87~W.\xF8F\xF4vx\xA4#=\xF3\x9Aiesx\xBE\xCC\xF5.\x94u\xCC\xCAD\xAE\x95\xBC.wk\xB5\xA8!\xC8\xED(\xC3\xA6\xA3\xFDU\xFE#\x82W\xA5I!%\xAB\xF6\xC1\xB34\xB5\x993\xD6b0\xB5\x80\xC1h5b#\xBE\\\\{>\xBE\x8B\xD2\xB8\xE8(\x8A8
\xFFN\x95\xD7\xAF5x\xBF\x93c\xDB\xE7\x81\f\xAC\x98\xBFF\xF4]\x91]\x9E\v2\xE9\xE5\xCB\x88v\xA6\x93\b\x94q:\x8E\xC2\xD2b )\x85Oq\xFC\x98\xD8\x83\xAA;\x80H\xECx4\xD7 \xB4\xFB\0\x892\xAD\xA3\xD1\xB2Ot\x9A9q>\xC2\xB9\x93\xE9k?\xC5J3\xBF'\x9D\xFD)\xB8\xDE\xA5\xA9Z \f/\f\xAAT\xAF\xEE}$\xD07G\xA42\xE0\xEE"dC\xB6\xA2\x86\x94r[\xC4*\x8F\xB9\x83 \xEF\xB0\xDB\x89\rg\x903-\xC8\x82\xD1\xFAa\x87Y9\x84e\x8E\xF7\xFA\xCD\xAF\x92N\xB9^\x94\xACn\x92$M\x9Fp\xF3\xE4&P\xBC\x99\xC4\x87lB\x9D\xF14\xC2\x7F&\x9DD)\x85\xC5\xC4\xCBR\x8EO\xF5\xD6\xCF\xCF\x7FIAl'\xC9\xA3\xBB\xE9_<\xF8\xB1\xDF\xDE/Y\x88\x8C@\xD9j[\vRTS\xD2\xB6\xC6\xFAT\xE0e\xA2\xD4\xB2fy\xDF\xE2>\xF9=5\x97\x7Fk\x96\xCF\xFF\x89A\x84t\xB7\v\xDC\xF4U\xDCur\x7F-\xF2\xE1\xA8\xE3d~\xEB\xBB\xE4\x9C<b\xCA\x9FJ\xE2(HiY\xE9\xF4\xD5\xF0o\xA2v\xA8\xEF@\xA1\0\0\0\0\xE1\xB6R\xEF\x83k\xD4b\xDD\x86\xEA\xD7\xA8\v\xE7a\xFA\xE4\x85\xBC|d
.\xE1\f\xAEQ\xED\xF8\x8F\xC5\x85ns\xD7\xFD
y\xF9\xEB\xCF\xAB\xF3\x89-h\xA4\x7F\xF6\\\xA3.\xF9\xEA\xF1\xC1\x9B7w+z\x81%\xC4\x8B\v%\xFF=Y\xCA\x9D\xE0\xDF |V\x8D\xCF\xF2\xF29\xF5D\xA0\xD6\x97\x99&<v/t\xD3%Z2\xF3\x93\b\xDD\x91N\x8E7p\xF8\xDC\xD80\xB8F]\xD1\xB2\xB3\xD3\x92XRe\xC0\xB76o\xEEV\xD7\xD9\xBC\xB9\xB5:ST\xB2h\xBC<J\xDD\xA0E\xA5\xBF}\xC3O^\xCB\x91\xA0:\xC1\xBFA\xDBw\xED\xAE\xB9\xAAkDX9\xAB(\xE4\xE5s\xC9R\xB7\x9C\xAB\x8F1vJ9c\x99.3Mx\xCF\x85\x97\xADX\x99}L\xEE\xCB\x92$J\xB4d\xC5\xFC\xE6\x8B\xA7!\`aF\x972\x8E"\x9Do\xC3+N\x80\xA1\xF6\xC8j@@\x9A\x85\`p\x8D\xBA\x81\xC6\xDFU\xE3\x1BY\xBF\xAD\vPf\xA7%\xB1\x87w^\xE5\xCC\xF1\xB4z\xA3[l\xDE\xDC\xAD\x8Dh\x8EB\xEF\xB5\b\xA8ZGj t\xA6\x8B\xBF&I\xE9b\xA0\xA3\b\xD4\xF2Lx,.\x94\x99\x9A|{\xFBG\xFA\x91\xF1\xA8~~\xFB\x86\x9F\x9FM\xD4p\xFD\x90R\x9A&\0ut\x82\x7F\x83\x954-l\xF7\xE9\xAB\x86_\xF9irU\xD7\x88\x93\xE3\x85g\xF1>\x8D\x88QbP\xC8\xCB\xE7\xB1~\x99\b\xD3\xA3\xE22M\rVc\xEC\xB7\xA91\xD5t\xB7\xE94\xC2\xE5\\f\x9A\xF0\xBD\xD0\xC8\xDF\rN\xF5>\xBBZ\xB12\xFB\xBB\x07\`\xD9\xDA\xE6\xFE8l\xB4H\x94h\xC9\xA9":&\xCB\xFF\xBC\xCC*I\xEE#NC\xC0\xC2\xAF\xF5\x92-\xCD(\xC7,\x9EF(D:9\xDE\xA5\x8Ck1\xC7Q\xED\xDB&\xE7\xBF4B\xED\x91\xD5\xA3[\xC3:\xC1\x86E\xD0 0?\x81\xE6k\xAE\`P9A\x8D\xBF\xAB\xE3;\xEDD\x871\xC3\xA5f\x87\x91JZ\xA0\xE5\xECEO\x8DH:\xB9l\xFEhV#\xEE\xBC\xEF\x95\xBCS\x8B\x9F\x92\xB2j)\xC0]\b\xF4F\xB7\xE9BX\x99\xBA\xC8\x80x\f\x9Ao\xD1\x85\xFBgNj\x9Fm\`\x8B~\xDB2d\xB4\x8E\xFD\xB0\xE6a\x95\x99\x97t\xA2\xCBx\x7FM\x92\xF7\xC9}\x93\xC31\x9Crucs\xA8\xE5\x99\xF1\xB7v\xB1^-\xF3P\xE8\x7F25\xF9\xF6\xD3\x83\xAB\xB7\x89\x85\xF8V?\xD74\xE2Q\xFD\xD5T\xBD\xF0|\xE4\\F.\v>\x9B\xA8\xE1\xDF-\xFA\xBB'\xD4\xEFZ\x91\x86\x008L\0\xEA\xD9\xFAR\xA9\x8E\xDDH\xB4\xDC2*iZ\xD8\xCB\xDF\b7\xAF\xD5&\xD6Nct9,\xBE\xF2\xD3\xCD\b\xA0<\xA5\xAC\xDF\xCAD\x8D%&\xC7\v\xCF\xC7qY \xA3{w\xC1B\xCD%. \xA3\xC4\xC1\xA6\xF1+\xE1\x96\xE6\0 \xB4\xFBb\xFD2\x83K\`\xFE\xE7AN\xF7\xF0d*\x9A\x85\x9C\xC8\xF5\xED8\xB7\f\x8E\xE5\xECnSc\x8F\xE51\xE9\xEB\xEF\b
YM\xE7h\x84\xCB\r\x892\x99\xE2\xF9\xCAE:|\xD5z\xA1\x91?\x9B\xC3\xD0\xFF\xED1\xAB\xBF\xDE|v94\x9D\xC0k\xDB\xF5d-\xD2F\xC2v\xC0(\x97\xB9\x92\xC7\xF3\xB3\xBC&\xEE\xC9p\xD8h#\x91n:\xCC\xD1.\xA0I0\x98\xF2\xA6REtL\xB3\xF3&\xA3\xD7\xF9\bB6OZ\xADT\x92\xDCG\xB5$\x8E\xA8\xDD\x80\xF1^<6\xA3\xB1^\xEB%[\xBF]w\xB4\xDBWYU:\xE1\v\xBAX<\x8DP\xB9\x8A\xDF\xBF\xC9rg(\xC4Q\x88J\xD7b\xAB\xAF\x85\x8D\xCF\xA5\xABl.\xF9\x83L\xCE\x7Fi\xADx-\x86\xC5\xDCRp$j\0\x9FF\xB7\x86u\xA7\xD4\x9A\xC3\v\xFA{"\xBD\xA8\x94@\`.~\xA1\xD6|\x91\0\0\0\0C\xCB\xA6\x87\xC7\x90<\xD4\x84[\x9AS\xCF'\bs\x8C\xEC\xAE\xF4\b\xB74\xA7K|\x92 \x9EO\xE6\xDD\x84\xB6aY\xDF,2\x8A\xB5Qh\x95\xA3\xBE\x96\xF8$A\xD53\x82\xC6}\x99Q>R\xF7\x90\xBA m\xC3\xF9\xC2\xCBD\xB2\xBEYd\xF1u\xFF\xE3u.e\xB06\xE5\xC37\xE3\xD6A\xF1\xA0\xE7v$F}%g\x8D\xDB\xA2,\xF1I\x82o:\xEF\xEBauV\xA8\xAA\xD3\xD1\xFA2\xA3.\xB9\xF9\xA9=\xA2\x9F\xFA~i9}5\xAB]v\xDE\r\xDA\xF2\x85\x97\x89\xB1N1d}\xB3\xC8'\xB6O\xA3\xED\x8F\xE0&)\x9B\xABZ\xBB\xBB\xE8\x91<l\xCA\x87o/!\xE8\x87\xAB\xF29\xC4\`T\xBE@;\xCE\xED\xF0hjH\x8C\xFAJ\vG\\\xCD\x8F\xC6\x9E\xCC\xD7\`\xE4\xE2\xDFZ/DX\xDEt\xDE\v\x9D\xBFx\x8C\xD6\xC3\xEA\xAC\x95\bL+S\xD6xR\x98p\xFF\xF4eF]\xB7\xAE\xE0\xDA3\xF5z\x89p>\xDC;BN.x\x89\xE8\xA9\xFC\xD2r\xFA\xBF\xD4}j*V\xBB)\xE1\xF0<\xAD\xBAjo\xEEq\xCC\xE8\xA5\r^\xC8\xE6\xC6\xF8Ob\x9Db!V\xC4\x9B\x89\xFCJ\xCA7\xB1\xCDNl+\x9E\r\xA7\x8DF\xDB9\xB9\xBE\x81K#\xED\xC2\x80\x85j\xB3\x07\xACTx\xA1+\xD0#;x\x93\xE8\x9D\xFF\xD8\x94\xDF\x9B_\xA9X3\v\\\xCF\x95\x8CW\xE5sM\x9CC\xF4\xC9\xC7\xD9\xA7\x8A\f\x7F \xC1p\xED\0\x82\xBBK\x87\xE0\xD1\xD4E+wS\x90\xF5\x95\xD3\xD3SW\x88\xC9ACo\xC6_?\xFD\xE6\xF4[a\x98\xAF\xC12\xDBdg\xB5s\xCE\xB4d0\xE3\xB4^\x88\xB0\xF7\x95.7\xBC\xE9\xBC\xFF"\x90{y\x80\xC38\xB2&D\xED\x81\xA4\x82\xAEJ*\x98Vi\xDA>\xD1"\xA6\xAC\xF1am
v\xE56\x90%\xA6\xFD6\xA2\xE8\xCB\x8C\xBA\xAB\0*=/[\xB0nl\x90\xE9'\xEC\x84\xC9d'"N\xE0|\xB8\xA3\xB7\x9Av\x84\x9C\\5O:\xDB\xB1\xA0\x88\xF2\xDF\xB9\xA3\x94/\xFAh2\xA8~3\xA8\xFB=\xF8|\x95R\xDD\xAD\xD6\x99{*R\xC2\xE1y G\xFEZu\xD5\xDE\xBEsY\x9D\xE5\xE9
\xDE.O\x8D\v\xCDKH\xD6k\xCC\xCC\x8D\xF1\x9F\x8FFW\xC4:\xC58\x87\xF1c\xBF\xAA\xF9\xEC@a_k\xF9/\x94Q2\x89\xD5i@\x96\xA2\xB5\xC7\xDD\xDE'\xE7\x9E\x81\`N\x1B3Y\x85\xBD\xB4\x8C\xB6?r\xCF}\x99\xF5K&\xA6\b\xED\xA5!C\x917\0Z\x91\x86\x84\v\xD5\xC7\xCA\xADRo\`~\x83,\xAB\xD8\xA8\xF0BW\xEB;\xE4\xD0\xA0Gv\xF0\xE3\x8C\xD0wg\xD7J$$\xEC\xA3\xF1/ne\xB2\xE4\xC8\xE26\xBFR\xB1ut\xF46>\bf}\xC3\xC0\x91\xF9\x98Z\xC2\xBAS\xFCE\xAE\xCA\xE7_el\`\xDB>\xF63\x98\xF5P\xB4\xD3\x89\xC2\x94\x90Bd\xFE@W\xD2X\xC7\x82\xE1\xDA\xC1*|\x86Eq\xE6\xD5\xBA@RM\xC6\xD2r\rt\xF5\x8AV\xEE\xA6\xC9\x9DH!a7\x9B\xF0"\xFC=w\xA6\xA7\xA7$\xE5l\xA3\xAE\x93\x83\xED\xDB5i\x80\xAFW*K \xD0\xFFx\x8B\xBC\xB3-\x918\xE8\xB7\xC2{#E0_\x83es\x94%\xE2\xF7\xCF\xBF\xB1\xB46\xE6\x9Ci\xC9\xA5W\xCFN!\fUb\xC7\xF3\x9A)\xBBa\xBAjp\xC7=\xEE+]n\xAD\xE0\xFB\xE9x\xD3y/;\xDF\xA8\xBFCE\xFB\xFC\x88\xE3|\xB7\xF4q\\\xF4?\xD7\xDBpdM\x883\xAF\xEB\x9B8\xDE\xD8\xCE\x9EY\\\x95
^\xA2\x8DT"0\xAD\xE9\x96*\x93\xB2\fy\xD0y\xAA\xFEJ(8F\x81\x8E\xBF\xC2\xDA\xEC\x81\xB2k\xCAm K\x89\xA6\x86\xCC\r\xFD\x9FN6\xBA\0\0\0\0\0\b\0\x07\0 \0\0
\0\0\v\0\0\f\0\0\r\0\0\0\0\0A\x90\xDC\0\v\xA2\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0 \xC0\0\x07
\0\0\b\`\0\0\b \0\0 \xA0\0\0\b\0\0\0\b\x80\0\0\b@\0\0 \xE0\0\x07\0\0\bX\0\0\b\0\0 \x90\0\x07;\0\0\bx\0\0\b8\0\0 \xD0\0\x07\0\0\bh\0\0\b(\0\0 \xB0\0\0\b\b\0\0\b\x88\0\0\bH\0\0 \xF0\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0 \xC8\0\x07\r\0\0\bd\0\0\b$\0\0 \xA8\0\0\b\0\0\b\x84\0\0\bD\0\0 \xE8\0\x07\b\0\0\b\\\0\0\b\0\0 \x98\0\x07S\0\0\b|\0\0\b<\0\0 \xD8\0\x07\0\0\bl\0\0\b,\0\0 \xB8\0\0\b\f\0\0\b\x8C\0\0\bL\0\0 \xF8\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0 \xC4\0\x07\v\0\0\bb\0\0\b"\0\0 \xA4\0\0\b\0\0\b\x82\0\0\bB\0\0 \xE4\0\x07\x07\0\0\bZ\0\0\b\0\0 \x94\0\x07C\0\0\bz\0\0\b:\0\0 \xD4\0\x07\0\0\bj\0\0\b*\0\0 \xB4\0\0\b
\0\0\b\x8A\0\0\bJ\0\0 \xF4\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0 \xCC\0\x07\0\0\bf\0\0\b&\0\0 \xAC\0\0\b\0\0\b\x86\0\0\bF\0\0 \xEC\0\x07 \0\0\b^\0\0\b\0\0 \x9C\0\x07c\0\0\b~\0\0\b>\0\0 \xDC\0\x07\x1B\0\0\bn\0\0\b.\0\0 \xBC\0\0\b\0\0\b\x8E\0\0\bN\0\0 \xFC\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0 \xC2\0\x07
\0\0\ba\0\0\b!\0\0 \xA2\0\0\b\0\0\b\x81\0\0\bA\0\0 \xE2\0\x07\0\0\bY\0\0\b\0\0 \x92\0\x07;\0\0\by\0\0\b9\0\0 \xD2\0\x07\0\0\bi\0\0\b)\0\0 \xB2\0\0\b \0\0\b\x89\0\0\bI\0\0 \xF2\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0 \xCA\0\x07\r\0\0\be\0\0\b%\0\0 \xAA\0\0\b\0\0\b\x85\0\0\bE\0\0 \xEA\0\x07\b\0\0\b]\0\0\b\0\0 \x9A\0\x07S\0\0\b}\0\0\b=\0\0 \xDA\0\x07\0\0\bm\0\0\b-\0\0 \xBA\0\0\b\r\0\0\b\x8D\0\0\bM\0\0 \xFA\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0 \xC6\0\x07\v\0\0\bc\0\0\b#\0\0 \xA6\0\0\b\0\0\b\x83\0\0\bC\0\0 \xE6\0\x07\x07\0\0\b[\0\0\b\x1B\0\0 \x96\0\x07C\0\0\b{\0\0\b;\0\0 \xD6\0\x07\0\0\bk\0\0\b+\0\0 \xB6\0\0\b\v\0\0\b\x8B\0\0\bK\0\0 \xF6\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0 \xCE\0\x07\0\0\bg\0\0\b'\0\0 \xAE\0\0\b\x07\0\0\b\x87\0\0\bG\0\0 \xEE\0\x07 \0\0\b_\0\0\b\0\0 \x9E\0\x07c\0\0\b\x7F\0\0\b?\0\0 \xDE\0\x07\x1B\0\0\bo\0\0\b/\0\0 \xBE\0\0\b\0\0\b\x8F\0\0\bO\0\0 \xFE\0\`\x07\0\0\0\bP\0\0\b\0\bs\0\x07\0\0\bp\0\0\b0\0\0 \xC1\0\x07
\0\0\b\`\0\0\b \0\0 \xA1\0\0\b\0\0\0\b\x80\0\0\b@\0\0 \xE1\0\x07\0\0\bX\0\0\b\0\0 \x91\0\x07;\0\0\bx\0\0\b8\0\0 \xD1\0\x07\0\0\bh\0\0\b(\0\0 \xB1\0\0\b\b\0\0\b\x88\0\0\bH\0\0 \xF1\0\x07\0\0\bT\0\0\b\0\b\xE3\0\x07+\0\0\bt\0\0\b4\0\0 \xC9\0\x07\r\0\0\bd\0\0\b$\0\0 \xA9\0\0\b\0\0\b\x84\0\0\bD\0\0 \xE9\0\x07\b\0\0\b\\\0\0\b\0\0 \x99\0\x07S\0\0\b|\0\0\b<\0\0 \xD9\0\x07\0\0\bl\0\0\b,\0\0 \xB9\0\0\b\f\0\0\b\x8C\0\0\bL\0\0 \xF9\0\x07\0\0\bR\0\0\b\0\b\xA3\0\x07#\0\0\br\0\0\b2\0\0 \xC5\0\x07\v\0\0\bb\0\0\b"\0\0 \xA5\0\0\b\0\0\b\x82\0\0\bB\0\0 \xE5\0\x07\x07\0\0\bZ\0\0\b\0\0 \x95\0\x07C\0\0\bz\0\0\b:\0\0 \xD5\0\x07\0\0\bj\0\0\b*\0\0 \xB5\0\0\b
\0\0\b\x8A\0\0\bJ\0\0 \xF5\0\x07\0\0\bV\0\0\b\0@\b\0\0\x073\0\0\bv\0\0\b6\0\0 \xCD\0\x07\0\0\bf\0\0\b&\0\0 \xAD\0\0\b\0\0\b\x86\0\0\bF\0\0 \xED\0\x07 \0\0\b^\0\0\b\0\0 \x9D\0\x07c\0\0\b~\0\0\b>\0\0 \xDD\0\x07\x1B\0\0\bn\0\0\b.\0\0 \xBD\0\0\b\0\0\b\x8E\0\0\bN\0\0 \xFD\0\`\x07\0\0\0\bQ\0\0\b\0\b\x83\0\x07\0\0\bq\0\0\b1\0\0 \xC3\0\x07
\0\0\ba\0\0\b!\0\0 \xA3\0\0\b\0\0\b\x81\0\0\bA\0\0 \xE3\0\x07\0\0\bY\0\0\b\0\0 \x93\0\x07;\0\0\by\0\0\b9\0\0 \xD3\0\x07\0\0\bi\0\0\b)\0\0 \xB3\0\0\b \0\0\b\x89\0\0\bI\0\0 \xF3\0\x07\0\0\bU\0\0\b\0\b\x07+\0\0\bu\0\0\b5\0\0 \xCB\0\x07\r\0\0\be\0\0\b%\0\0 \xAB\0\0\b\0\0\b\x85\0\0\bE\0\0 \xEB\0\x07\b\0\0\b]\0\0\b\0\0 \x9B\0\x07S\0\0\b}\0\0\b=\0\0 \xDB\0\x07\0\0\bm\0\0\b-\0\0 \xBB\0\0\b\r\0\0\b\x8D\0\0\bM\0\0 \xFB\0\x07\0\0\bS\0\0\b\0\b\xC3\0\x07#\0\0\bs\0\0\b3\0\0 \xC7\0\x07\v\0\0\bc\0\0\b#\0\0 \xA7\0\0\b\0\0\b\x83\0\0\bC\0\0 \xE7\0\x07\x07\0\0\b[\0\0\b\x1B\0\0 \x97\0\x07C\0\0\b{\0\0\b;\0\0 \xD7\0\x07\0\0\bk\0\0\b+\0\0 \xB7\0\0\b\v\0\0\b\x8B\0\0\bK\0\0 \xF7\0\x07\0\0\bW\0\0\b\0@\b\0\0\x073\0\0\bw\0\0\b7\0\0 \xCF\0\x07\0\0\bg\0\0\b'\0\0 \xAF\0\0\b\x07\0\0\b\x87\0\0\bG\0\0 \xEF\0\x07 \0\0\b_\0\0\b\0\0 \x9F\0\x07c\0\0\b\x7F\0\0\b?\0\0 \xDF\0\x07\x1B\0\0\bo\0\0\b/\0\0 \xBF\0\0\b\0\0\b\x8F\0\0\bO\0\0 \xFF\0\0\0\x1B\0A\0@\0!\0  \0\b\x81\0@\0\0\0\x81\0\x1B\x07\0a\0\`\01\00\r\0\f\xC1\0@\0\0\0\0\0\0\x07\0\b\0 \0
\0\v\0\r\0\0\0\0\0\x1B\0\0#\0+\x003\0;\0C\0S\0c\0s\0\x83\0\xA3\0\xC3\0\xE3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xCB\0M\0\0\0\0\0\0\0\0\x07\0 \0\r\0\0\0!\x001\0A\0a\0\x81\0\xC1\0\x81\b\f 0@\`\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\x1B\0\0\0\0\0@\0@\0\xBE\xF3\xF8y\xECa\xF6?\xDE\xAA\x8C\x80\xF7{\xD5\xBF=\x88\xAFJ\xEDq\xF5?\xDBm\xC0\xA7\xF0\xBE\xD2\xBF\xB0\xF0\xF09\x95\xF4?g:Q\x7F\xAE\xD0\xBF\x85\xB8\xB0\x95\xC9\xF3?\xE9$\x82\xA6\xD81\xCB\xBF\xA5d\x88\f\r\xF3?Xw\xC0
OW\xC6\xBF\xA0\x8E\v{"^\xF2?\0\x81\x9C\xC7+\xAA\xC1\xBF?4JJ\xBB\xF1?^\x8C\xCEvN\xBA\xBF\xBA\xE5\x8A\xF0X#\xF1?\xCCaZ<\x97\xB1\xBF\xA7\0\x99A?\x95\xF0?\f\xE18\xF4R\xA2\xBF\0\0\0\0\0\0\xF0?\0\0\0\0\0\0\0\0\xACG\x9A\xFD\x8C\`\xEE?\x84Y\xF2]\xAA\xA5\xAA?\xA0j\xB3\xA4\xEC?\xB4.6\xAAS^\xBC?\xE6\xFCjW6 \xEB?\b\xDB w\xE5&\xC5?-\xAA\xA1c\xD1\xC2\xE9?pG"\r\x86\xC2\xCB?\xEDAx\xE6\x86\xE8?\xE1~\xA0\xC8\x8B\xD1?bHS\xF5\xDCg\xE7? \xEE\xB6W0\xD4?\xEF9\xFA\xFEB.\xE6?4\x83\xB8H\xA3\xD0\xBFj\v\xE0\v[W\xD5?#A
\xF2\xFE\xFF\xDF\xBF\xB8e\0A\xC0\xF1\0\vA\0\v\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\v\0\0\0\0\0\0\0\0\0

\x07\0\0 \v\0\0 \v\0\0\v\0\0\0\0\0A\x91\xF2\0\v!\0\0\0\0\0\0\0\0\0\v\r\0\r\0\0\0 \0\0\0 \0\0\0\0A\xCB\xF2\0\v\f\0A\xD7\xF2\0\v\0\0\0\0\0\0\0\0 \f\0\0\0\0\0\f\0\0\f\0A\x85\xF3\0\v\0A\x91\xF3\0\v\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0A\xBF\xF3\0\v\0A\xCB\xF3\0\v\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0A\x82\xF4\0\v\0\0\0\0\0\0\0\0\0 \0A\xB3\xF4\0\v\0A\xBF\xF4\0\v\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0A\xED\xF4\0\v\0A\xF9\xF4\0\v\xB8\x07\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\x000123456789ABCDEF\0\0\0\0X;\0\x006\0\0\x007\0\0\x008\0\0\x009\0\0\0:\0\0\0;\0\0\0<\0\0\0=\0\0\0>\0\0\0?\0\0\0@\0\0\0A\0\0\0B\0\0\0C\0\0\0\0\0\0\0t<\0\0D\0\0\0E\0\0\x008\0\0\x009\0\0\0F\0\0\0G\0\0\0<\0\0\0=\0\0\0>\0\0\0H\0\0\0@\0\0\0I\0\0\0B\0\0\0J\0\0\0\xCCd\0\0,;\0\0>\0\0NSt3__29basic_iosIcNS_11char_traitsIcEEEE\0\0\0\xA4d\0\0\`;\0\0NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\0\0\0\0(e\0\0\xAC;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_istreamIcNS_11char_traitsIcEEEE\0\0(e\0\0\xF4;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\0\0(e\0\0D<\0\0\0\0\0\0\0\0\x94;\0\0\0\0\0\xDC;\0\0\b\0\0NSt3__214basic_iostreamIcNS_11char_traitsIcEEEE\0\xCCd\0\0\x80<\0\0X;\0\0NSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0@\0\0\0\0\0\0\0\xB4=\0\0K\0\0\0L\0\0\x008\0\0\0\xF8\xFF\xFF\xFF\xB4=\0\0M\0\0\0N\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\xB4=\0\0O\0\0\0P\0\0\0\xD0<\0\x004=\0\0p=\0\0\x84=\0\0\x98=\0\0\xAC=\0\0\\=\0\0H=\0\0\xF8<\0\0\xE4<\0\0@\0\0\0\0\0\0\0$<\0\0Q\0\0\0R\0\0\x008\0\0\0\xF8\xFF\xFF\xFF$<\0\0S\0\0\0T\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF$<\0\0U\0\0\0V\0\0\0@\0\0\0\0\0\0\0\x94;\0\0W\0\0\0X\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\x94;\0\0Y\0\0\0Z\0\0\x008\0\0\0\0\0\0\0\xDC;\0\0[\0\0\0\\\0\0\0\xC8\xFF\xFF\xFF\xC8\xFF\xFF\xFF\xDC;\0\0]\0\0\0^\0\0\0\xCCd\0\0\xC0=\0\0$<\0\0NSt3__218basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0\0\0\0\0\0>\0\0_\0\0\0\`\0\0\0\xA4d\0\0 >\0\0NSt3__28ios_baseE\0A\xC0\xFC\0\v#\xDE\x95\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF@>\0\0\0\0\0C.UTF-8\0A\x90\xFD\0\vT>\0A\xB0\xFD\0\vGLC_CTYPE\0\0\0\0LC_NUMERIC\0\0LC_TIME\0\0\0\0\0LC_COLLATE\0\0LC_MONETARY\0LC_MESSAGES\0A\x84\xFE\0\v-\x80\xDE(\0\x80\xC8M\0\0\xA7v\0\x004\x9E\0\x80\xC7\0\x80\x9F\xEE\0\0~\x80\\@\x80\xE9g\0\xC8\x90\0U\xB8.\0A\xC0\xFE\0\v\xD2Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat\0Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday\0Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec\0January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December\0AM\0PM\0%a %b %e %T %Y\0%m/%d/%y\0%H:%M:%S\0%I:%M:%S %p\0\0\0%m/%d/%y\x000123456789\0%a %b %e %T %Y\0%H:%M:%S\0\0\0\0\0^[yY]\0^[nN]\0yes\0no\0A\xA0\x81\v\xE1\xD1t\x9E\0W\x9D\xBD*\x80pR\xFF\xFF>'
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\0\x005\0\0\0q\0\0\0k\xFF\xFF\xFF\xCE\xFB\xFF\xFF\x92\xBF\xFF\xFF\0\0\0\0\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\b \xFF\xFF\xFF\xFF\xFF\xFF\xFF
\v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF
\v\f\r\x1B !"#\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x07\0\0\0\0\0\0\0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x07\0\0\xC0\b\0\0\xC0 \0\0\xC0
\0\0\xC0\v\0\0\xC0\f\0\0\xC0\r\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\x1B\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\xC0\0\0\0\xB3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\0\0\xC3\x07\0\0\xC3\b\0\0\xC3 \0\0\xC3
\0\0\xC3\v\0\0\xC3\f\0\0\xC3\r\0\0\xD3\0\0\xC3\0\0\xC3\0\0\f\xBB\0\f\xC3\0\f\xC3\0\f\xC3\0\f\xDB\0\0\0\x000123456789abcdefABCDEFxX+-pPiInN\0%I:%M:%S %p%H:%M\0A\x90\x86\v\x81%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0%\0\0\0Y\0\0\0-\0\0\0%\0\0\0m\0\0\0-\0\0\0%\0\0\0d\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0A\xA0\x87\ve%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0\0M\0\0t\0\0\0u\0\0\0v\0\0\0\0\0\0\0dM\0\0w\0\0\0x\0\0\0v\0\0\0y\0\0\0z\0\0\0{\0\0\0|\0\0\0}\0\0\0~\0\0\0\x7F\0\0\0\x80\0A\x90\x88\v\xFD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0B\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0*\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\x002\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\x82\0\0\0\0A\x94\x90\v\xED\xBCL\0\0\x81\0\0\0\x82\0\0\0v\0\0\0\x83\0\0\0\x84\0\0\0\x85\0\0\0\x86\0\0\0\x87\0\0\0\x88\0\0\0\x89\0\0\0\0\0\0\0\x98M\0\0\x8A\0\0\0\x8B\0\0\0v\0\0\0\x8C\0\0\0\x8D\0\0\0\x8E\0\0\0\x8F\0\0\0\x90\0\0\0\0\0\0\0\xBCM\0\0\x91\0\0\0\x92\0\0\0v\0\0\0\x93\0\0\0\x94\0\0\0\x95\0\0\0\x96\0\0\0\x97\0\0\0t\0\0\0r\0\0\0u\0\0\0e\0\0\0\0\0\0\0f\0\0\0a\0\0\0l\0\0\0s\0\0\0e\0\0\0\0\0\0\0%\0\0\0m\0\0\0/\0\0\0%\0\0\0d\0\0\0/\0\0\0%\0\0\0y\0\0\0\0\0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0\0\0\0\0%\0\0\0a\0\0\0 \0\0\0%\0\0\0b\0\0\0 \0\0\0%\0\0\0d\0\0\0 \0\0\0%\0\0\0H\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0Y\0\0\0\0\0\0\0%\0\0\0I\0\0\0:\0\0\0%\0\0\0M\0\0\0:\0\0\0%\0\0\0S\0\0\0 \0\0\0%\0\0\0p\0A\x8C\x93\v\xFD'\x9CI\0\0\x98\0\0\0\x99\0\0\0v\0\0\0\xCCd\0\0\xA8I\0\0\xF0a\0\0NSt3__26locale5facetE\0\0\0\0\0\0\0J\0\0\x98\0\0\0\x9A\0\0\0v\0\0\0\x9B\0\0\0\x9C\0\0\0\x9D\0\0\0\x9E\0\0\0\x9F\0\0\0\xA0\0\0\0\xA1\0\0\0\xA2\0\0\0\xA3\0\0\0\xA4\0\0\0\xA5\0\0\0\xA6\0\0\0(e\0\0$J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIwEE\0\0\0\xA4d\0\0@J\0\0NSt3__210ctype_baseE\0\0\0\0\0\0\0\0\x88J\0\0\x98\0\0\0\xA7\0\0\0v\0\0\0\xA8\0\0\0\xA9\0\0\0\xAA\0\0\0\xAB\0\0\0\xAC\0\0\0\xAD\0\0\0\xAE\0\0\0(e\0\0\xA8J\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIcc11__mbstate_tEE\0\0\0\xA4d\0\0\xD4J\0\0NSt3__212codecvt_baseE\0\0\0\0\0\0K\0\0\x98\0\0\0\xAF\0\0\0v\0\0\0\xB0\0\0\0\xB1\0\0\0\xB2\0\0\0\xB3\0\0\0\xB4\0\0\0\xB5\0\0\0\xB6\0\0\0(e\0\0<K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsc11__mbstate_tEE\0\0\0\0\0\0\x90K\0\0\x98\0\0\0\xB7\0\0\0v\0\0\0\xB8\0\0\0\xB9\0\0\0\xBA\0\0\0\xBB\0\0\0\xBC\0\0\0\xBD\0\0\0\xBE\0\0\0(e\0\0\xB0K\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDsDu11__mbstate_tEE\0\0\0\0\0L\0\0\x98\0\0\0\xBF\0\0\0v\0\0\0\xC0\0\0\0\xC1\0\0\0\xC2\0\0\0\xC3\0\0\0\xC4\0\0\0\xC5\0\0\0\xC6\0\0\0(e\0\0$L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDic11__mbstate_tEE\0\0\0\0\0\0xL\0\0\x98\0\0\0\xC7\0\0\0v\0\0\0\xC8\0\0\0\xC9\0\0\0\xCA\0\0\0\xCB\0\0\0\xCC\0\0\0\xCD\0\0\0\xCE\0\0\0(e\0\0\x98L\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIDiDu11__mbstate_tEE\0(e\0\0\xDCL\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xCCJ\0\0\0\0\0NSt3__27codecvtIwc11__mbstate_tEE\0\0\0\xCCd\0\0\fM\0\0\x9CI\0\0NSt3__26locale5__impE\0\0\0\xCCd\0\x000M\0\0\x9CI\0\0NSt3__27collateIcEE\0\xCCd\0\0PM\0\0\x9CI\0\0NSt3__27collateIwEE\0(e\0\0\x84M\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x008J\0\0\0\0\0NSt3__25ctypeIcEE\0\0\0\xCCd\0\0\xA4M\0\0\x9CI\0\0NSt3__28numpunctIcEE\0\0\0\0\xCCd\0\0\xC8M\0\0\x9CI\0\0NSt3__28numpunctIwEE\0\0\0\0\0\0\0\0$M\0\0\xCF\0\0\0\xD0\0\0\0v\0\0\0\xD1\0\0\0\xD2\0\0\0\xD3\0\0\0\0\0\0\0DM\0\0\xD4\0\0\0\xD5\0\0\0v\0\0\0\xD6\0\0\0\xD7\0\0\0\xD8\0\0\0\0\0\0\0\`N\0\0\x98\0\0\0\xD9\0\0\0v\0\0\0\xDA\0\0\0\xDB\0\0\0\xDC\0\0\0\xDD\0\0\0\xDE\0\0\0\xDF\0\0\0\xE0\0\0\0\xE1\0\0\0\xE2\0\0\0\xE3\0\0\0\xE4\0\0\0(e\0\0\x80N\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xC4N\0\0\0\0\0\0NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\xDCN\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIcEE\0\0\0\xA4d\0\0\xFCN\0\0NSt3__214__num_get_baseE\0\0\0\0\0\0\0\0XO\0\0\x98\0\0\0\xE5\0\0\0v\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xE9\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xEE\0\0\0\xEF\0\0\0\xF0\0\0\0(e\0\0xO\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xBCO\0\0\0\0\0\0NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\xD4O\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIwEE\0\0\0\0\0\0\0 P\0\0\x98\0\0\0\xF1\0\0\0v\0\0\0\xF2\0\0\0\xF3\0\0\0\xF4\0\0\0\xF5\0\0\0\xF6\0\0\0\xF7\0\0\0\xF8\0\0\0\xF9\0\0\0(e\0\0@P\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x84P\0\0\0\0\0\0NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\x9CP\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIcEE\0\0\0\xA4d\0\0\xBCP\0\0NSt3__214__num_put_baseE\0\0\0\0\0\0\0\0\fQ\0\0\x98\0\0\0\xFA\0\0\0v\0\0\0\xFB\0\0\0\xFC\0\0\0\xFD\0\0\0\xFE\0\0\0\xFF\0\0\0\0\0\0\0\0\0\0(e\0\0,Q\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0pQ\0\0\0\0\0\0NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\x88Q\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIwEE\0\0\0\0\0\0\0\xF4Q\0\0\0\0\0\0v\0\0\0\0\0\0\0\x07\0\0\b\0\0 \0\0
\0\0\v\0\0\xF8\xFF\xFF\xFF\xF4Q\0\0\f\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0(e\0\0R\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0\x80R\0\0\0\b\0\0NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0lR\0\0NSt3__29time_baseE\0\0\xA4d\0\0\x88R\0\0NSt3__220__time_get_c_storageIcEE\0\0\0\0\0\0\0\0S\0\0\0\0\0\0v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\0\xF8\xFF\xFF\xFF\0S\0\0\0\0\0\0\0\0\0\0 \0\0!\0\0"\0\0(e\0\0(S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0pS\0\0\0\b\0\0NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\xA4d\0\0xS\0\0NSt3__220__time_get_c_storageIwEE\0\0\0\0\0\0\0\xB4S\0\0#\0\0$\0\0v\0\0\0%\0\0(e\0\0\xD4S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0$T\0\0NSt3__210__time_putE\0\0\0\0\0\0\0\0TT\0\0&\0\0'\0\0v\0\0\0(\0\0(e\0\0tT\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\0\0\0\0\xF4T\0\0\x98\0\0\0)\0\0v\0\0\0*\0\0+\0\0,\0\0-\0\0.\0\0/\0\x000\0\x001\0\x002\0\0(e\0\0U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb0EEE\0\xA4d\0\x008U\0\0NSt3__210money_baseE\0\0\0\0\0\0\0\0\x88U\0\0\x98\0\0\x003\0\0v\0\0\x004\0\x005\0\x006\0\x007\0\x008\0\x009\0\0:\0\0;\0\0<\0\0(e\0\0\xA8U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb1EEE\0\0\0\0\0\xFCU\0\0\x98\0\0\0=\0\0v\0\0\0>\0\0?\0\0@\0\0A\0\0B\0\0C\0\0D\0\0E\0\0F\0\0(e\0\0V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb0EEE\0\0\0\0\0pV\0\0\x98\0\0\0G\0\0v\0\0\0H\0\0I\0\0J\0\0K\0\0L\0\0M\0\0N\0\0O\0\0P\0\0(e\0\0\x90V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb1EEE\0\0\0\0\0\xC8V\0\0\x98\0\0\0Q\0\0v\0\0\0R\0\0S\0\0(e\0\0\xE8V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000W\0\0\0\0\0\0NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\x008W\0\0NSt3__211__money_getIcEE\0\0\0\0\0\0\0\0pW\0\0\x98\0\0\0T\0\0v\0\0\0U\0\0V\0\0(e\0\0\x90W\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xD8W\0\0\0\0\0\0NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\0\xE0W\0\0NSt3__211__money_getIwEE\0\0\0\0\0\0\0\0X\0\0\x98\0\0\0W\0\0v\0\0\0X\0\0Y\0\0(e\0\x008X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x80X\0\0\0\0\0\0NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\0\x88X\0\0NSt3__211__money_putIcEE\0\0\0\0\0\0\0\0\xC0X\0\0\x98\0\0\0Z\0\0v\0\0\0[\0\0\\\0\0(e\0\0\xE0X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0(Y\0\0\0\0\0\0NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\x000Y\0\0NSt3__211__money_putIwEE\0\0\0\0\0\0\0\0lY\0\0\x98\0\0\0]\0\0v\0\0\0^\0\0_\0\0\`\0\0(e\0\0\x8CY\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIcEE\0\0\0\0\xA4d\0\0\xACY\0\0NSt3__213messages_baseE\0\0\0\0\0\xE4Y\0\0\x98\0\0\0a\0\0v\0\0\0b\0\0c\0\0d\0\0(e\0\0Z\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIwEE\0\0\0\0S\0\0\0u\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0n\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0r\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0u\0\0\0r\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0S\0\0\0u\0\0\0n\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0\0\0\0\0T\0\0\0h\0\0\0u\0\0\0\0\0\0\0F\0\0\0r\0\0\0i\0\0\0\0\0\0\0S\0\0\0a\0\0\0t\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0r\0\0\0u\0\0\0a\0\0\0r\0\0\0y\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0c\0\0\0h\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0i\0\0\0l\0\0\0\0\0\0\0M\0\0\0a\0\0\0y\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0e\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0y\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0u\0\0\0s\0\0\0t\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0t\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0o\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0e\0\0\0m\0\0\0b\0\0\0e\0\0\0r\0\0\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0\0\0\0\0A\0\0\0M\0\0\0\0\0\0\0P\0\0\0M\0A\x94\xBB\v\x98
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\xCA\x9A;\0\0\0\0\0\0\0\x0000010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\0\0\0\0\0\0\0\x00000000010010001101000101011001111000100110101011110011011110111100010203040506071011121314151617202122232425262730313233343536374041424344454647505152535455565760616263646566677071727374757677000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0d\0\0\0\0\0\0\0\xE8\0\0\0\0\0\0'\0\0\0\0\0\0\xA0\x86\0\0\0\0\0@B\0\0\0\0\0\x80\x96\x98\0\0\0\0\0\0\xE1\xF5\0\0\0\0\0\xCA\x9A;\0\0\0\0\0\xE4\vT\0\0\0\0\xE8vH\0\0\0\0\xA5\xD4\xE8\0\0\0\0\xA0rN \0\0\0@z\xF3Z\0\0\0\x80\xC6\xA4~\x8D\0\0\0\xC1o\xF2\x86#\0\0\0\x8A]xEc\0\0d\xA7\xB3\xB6\xE0\r\0\0\xE8\x89#\xC7\x8A\xA4d\0\0\xF8a\0\0NSt3__214__shared_countE\0\0\0\0hf\0\0\xCCd\0\0$b\0\0\x98e\0\0N10__cxxabiv116__shim_type_infoE\0\0\0\0\xCCd\0\0Tb\0\0b\0\0N10__cxxabiv117__class_type_infoE\0\0\0\xCCd\0\0\x84b\0\0b\0\0N10__cxxabiv117__pbase_type_infoE\0\0\0\xCCd\0\0\xB4b\0\0xb\0\0N10__cxxabiv119__pointer_type_infoE\0\xCCd\0\0\xE4b\0\0b\0\0N10__cxxabiv120__function_type_infoE\0\0\0\0\xCCd\0\0c\0\0xb\0\0N10__cxxabiv129__pointer_to_member_type_infoE\0\0\0\0\0\0\0dc\0\0g\0\0h\0\0i\0\0j\0\0k\0\0\xCCd\0\0pc\0\0b\0\0N10__cxxabiv123__fundamental_type_infoE\0Pc\0\0\xA0c\0\0v\0Dn\0\0\0\0Pc\0\0\xB0c\0\0b\0\0\0Pc\0\0\xBCc\0\0c\0\0\0Pc\0\0\xC8c\0\0h\0\0\0Pc\0\0\xD4c\0\0a\0\0\0Pc\0\0\xE0c\0\0s\0\0\0Pc\0\0\xECc\0\0t\0\0\0Pc\0\0\xF8c\0\0i\0\0\0Pc\0\0d\0\0j\0\0\0Pc\0\0d\0\0l\0\0\0Pc\0\0d\0\0m\0\0\0Pc\0\0(d\0\0x\0\0\0Pc\0\x004d\0\0y\0\0\0Pc\0\0@d\0\0f\0\0\0Pc\0\0Ld\0\0d\0\0\0\0\0\0\0ld\0\0g\0\0l\0\0i\0\0j\0\0m\0\0\xCCd\0\0xd\0\0b\0\0N10__cxxabiv116__enum_type_infoE\0\0\0\0\0\0\0\0Hb\0\0g\0\0n\0\0i\0\0j\0\0o\0\0p\0\0q\0\0r\0\0\0\0\0\0\xECd\0\0g\0\0s\0\0i\0\0j\0\0o\0\0t\0\0u\0\0v\0\0\xCCd\0\0\xF8d\0\0Hb\0\0N10__cxxabiv120__si_class_type_infoE\0\0\0\0\0\0\0\0He\0\0g\0\0w\0\0i\0\0j\0\0o\0\0x\0\0y\0\0z\0\0\xCCd\0\0Te\0\0Hb\0\0N10__cxxabiv121__vmi_class_type_infoE\0\0\0\0\0\0\0\xA8b\0\0g\0\0{\0\0i\0\0j\0\0|\0\0\xA4d\0\0\xA0e\0\0St9type_info\0A\xB1\xCB\v\b \0\0\0\0\0\0\0A\xC4\xCB\v1\0A\xDC\xCB\v2\0\0\x003\0\0\0\xF8g\0\0\0\0A\xF4\xCB\v\0A\x84\xCC\v\xFF\xFF\xFF\xFF
\0A\xC8\xCC\v!\xB8e\0\0@v\0%m/%d/%y\0\0\0\b%H:%M:%S\0\0\0\b\0A\xF4\xCC\ve\0A\x8C\xCD\v
2\0\0\0f\0\x004v\0A\xA4\xCD\v\0A\xB4\xCD\v\b\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xF8\xCD\vhf`)),ce((await B(ne)).instance))})(),(function(){function ce(){var ne;if(o.calledRun=!0,!m){if(C=!0,vy.H(),A?.(o),(ne=o.onRuntimeInitialized)==null||ne.call(o),o.postRun)for(typeof o.postRun=="function"&&(o.postRun=[o.postRun]);o.postRun.length;){var Te=o.postRun.shift();k.push(Te)}j(k)}}if(o.preRun)for(typeof o.preRun=="function"&&(o.preRun=[o.preRun]);o.preRun.length;)q();j(G),o.setStatus?(o.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>o.setStatus(""),1),ce()},1)):ce()})(),C?r=o:r=new Promise((ce,ne)=>{A=ce,b=ne}),r}var eS=(e,t,n)=>{let i=e.vf32_ptr(t),r=t.size(),o=i>>2,s=e.HEAPF32.slice(o,o+r);if(n!==void 0)for(let a=0;a<r;a++)s[a]=n(s[a]);return s},yXe=e=>1/(1+Math.exp(-e)),AXe=e=>t=>t*e+.5,bXe=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:eS(e,t.positions),scales:eS(e,t.scales,Math.exp),rotations:eS(e,t.rotations),alphas:eS(e,t.alphas,yXe),colors:eS(e,t.colors,AXe(i)),sh:eS(e,t.sh)}},xXe=(e,t)=>{e._free(e.vf32_ptr(t.positions)),e._free(e.vf32_ptr(t.scales)),e._free(e.vf32_ptr(t.rotations)),e._free(e.vf32_ptr(t.alphas)),e._free(e.vf32_ptr(t.colors)),e._free(e.vf32_ptr(t.sh))},N0e=async(e,t)=>{var n;let i=await _Xe(),r=e instanceof Uint8Array?e:new Uint8Array(e),o=null;try{if(o=i._malloc(Uint8Array.BYTES_PER_ELEMENT*r.length),o===null)throw new Error("couldn't allocate memory");i.HEAPU8.set(r,o/Uint8Array.BYTES_PER_ELEMENT);let s=i.CoordinateSystem[((n=t?.unpackOptions)==null?void 0:n.coordinateSystem)??"UNSPECIFIED"],a=i.load_spz(o,r.length,{coordinateSystem:s}),c=bXe(i,a,t);return xXe(i,a),c}catch(s){throw s}finally{o!==null&&i._free(o)}};var TXe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var EXe=[0,9,24,45],CXe=14,vXe=1.6*1024*1024*1024;function SXe(e,t){let n=t?.attributes;if(!l(n))return;let i=n.POSITION;if(!l(i))return;let r=e?.accessors?.[i];if(!l(r)||r.count<=0)return;let o=0;for(let s in n)if(Object.prototype.hasOwnProperty.call(n,s)){let a=/SH_DEGREE_(\d+)_COEF_/.exec(s);a&&(o=Math.max(o,parseInt(a[1],10)))}return{numPoints:r.count,shDegree:o}}function wXe(e,t){let n=CXe+(EXe[t]??0);return e*n*Float32Array.BYTES_PER_ELEMENT*2}var F$=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.resourceCache,i=t.gltf,r=t.primitive,o=t.spz,s=t.gltfResource,a=t.baseResource,c=t.cacheKey;this._resourceCache=n,this._gltfResource=s,this._baseResource=a,this._gltf=i,this._primitive=r,this._spz=o,this._cacheKey=c,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=Tt.UNLOADED,this._promise=void 0,this._spzError=void 0}get cacheKey(){return this._cacheKey}get decodedData(){return this._decodedData}async load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=IXe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.PROCESSING||(l(this._spzError)&&B$(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=SXe(this._gltf,this._primitive);if(l(n)){let r=wXe(n.numPoints,n.shDegree);if(r>vXe){let o=Math.round(r/1048576);return B$(this,new oe(`SPZ data too large to decode: ${n.numPoints.toLocaleString()} splats with spherical harmonics degree ${n.shDegree} would require approximately ${o} MB, which exceeds the WASM memory limit. Consider using a lower spherical harmonics degree or splitting the dataset into smaller tiles.`)),!1}}let i=N0e(this._bufferViewTypedArray,{unpackOptions:{coordinateSystem:"UNSPECIFIED"}});if(!l(i))return!1;this._decodePromise=PXe(this,i)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function IXe(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:e._spz.bufferView,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=Tt.PROCESSING,e)}catch(n){if(e.isDestroyed())return;B$(e,n)}}function B$(e,t){throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load SPZ",t)}async function PXe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=Tt.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}var fN=F$;function dN(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.properties??{},i={};for(let r in n)if(n.hasOwnProperty(r)){let o=n[r];l(o.semantic)&&(i[o.semantic]=o)}this._id=t,this._name=e.name,this._description=e.description,this._properties=n,this._propertiesBySemantic=i,this._extras=Je(e.extras,!0),this._extensions=Je(e.extensions,!0)}dN.fromJson=function(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.class,i={};for(let r in n.properties)if(n.properties.hasOwnProperty(r)){let o=Vp.fromJson({id:r,property:n.properties[r],enums:e.enums});i[r]=o}return new dN({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(dN.prototype,{properties:{get:function(){return this._properties}},propertiesBySemantic:{get:function(){return this._propertiesBySemantic}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});dN.BATCH_TABLE_CLASS_NAME="_batchTable";var am=dN;function Y6(e){e=e??H.EMPTY_OBJECT;let t=e.value,n=e.name;this._value=t,this._name=n,this._description=e.description,this._extras=Je(e.extras,!0),this._extensions=Je(e.extensions,!0)}Y6.fromJson=function(e){return new Y6({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(Y6.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var hN=Y6;function X6(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.values,i={},r={},o=n.length;for(let a=0;a<o;++a){let c=n[a];i[c.value]=c.name,r[c.name]=c.value}let s=e.valueType??Lt.UINT16;this._values=n,this._namesByValue=i,this._valuesByName=r,this._valueType=s,this._id=t,this._name=e.name,this._description=e.description,this._extras=Je(e.extras,!0),this._extensions=Je(e.extensions,!0)}X6.fromJson=function(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.enum,i=n.values.map(function(r){return hN.fromJson(r)});return new X6({id:t,values:i,valueType:Lt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(X6.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var mN=X6;function K6(e){e=e??H.EMPTY_OBJECT;let t=e.classes??{},n=e.enums??{};this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=Je(e.extras,!0),this._extensions=Je(e.extensions,!0)}K6.fromJson=function(e){let t={};if(l(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=mN.fromJson({id:i,enum:e.enums[i]}));let n={};if(l(e.classes))for(let i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=am.fromJson({id:i,class:e.classes[i],enums:t}));return new K6({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties(K6.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var $l=K6;var k$=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.schema,i=t.resource,r=t.cacheKey;this._schema=l(n)?$l.fromJson(n):void 0,this._resource=i,this._cacheKey=r,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get schema(){return this._schema}async load(){return l(this._promise)?this._promise:l(this._schema)?(this._promise=Promise.resolve(this),this._promise):(this._promise=DXe(this),this._promise)}unload(){this._schema=void 0}};async function DXe(e){let t=e._resource;e._state=Tt.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=$l.fromJson(n),e._state=Tt.READY,e)}catch(n){if(e.isDestroyed())return;e._state=Tt.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}var aA=k$;var kd={};function tS(e){return Td(e.url)}function pN(e){let{byteOffset:t,byteLength:n}=e,i=tA(e);return l(i)&&(t=i.byteOffset??0,n=i.byteLength),`${t}-${t+n}`}function RXe(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:r,count:o}=e;return`${n}-${i}-${r}-${o}`}function L0e(e,t){return`${tS(e)}-buffer-id-${t}`}function nS(e,t,n,i){if(l(e.uri)){let r=i.getDerivedResource({url:e.uri});return tS(r)}return L0e(n,t)}function U$(e,t,n,i){let r=t.bufferView,o=e.bufferViews[r],s=o.buffer,a=e.buffers[s],c=nS(a,s,n,i),u=pN(o);return`${c}-range-${u}`}function F0e(e,t,n,i){let r=t.bufferView,o=e.bufferViews[r],s=o.buffer,a=e.buffers[s],c=nS(a,s,n,i),u=pN(o);return`${c}-range-${u}`}function B0e(e,t,n,i){let r=e.images[t],o=r.bufferView,s=r.uri;if(l(s)){let p=i.getDerivedResource({url:s});return tS(p)}let a=e.bufferViews[o],c=a.buffer,u=e.buffers[c],f=nS(u,c,n,i),d=pN(a);return`${f}-range-${d}`}function OXe(e,t){let n=ju.createSampler({gltf:e,textureInfo:t});return`${n.wrapS}-${n.wrapT}-${n.minificationFilter}-${n.magnificationFilter}`}kd.getSchemaCacheKey=function(e){let{schema:t,resource:n}=e;return l(t)?`embedded-schema:${JSON.stringify(t)}`:`external-schema:${tS(n)}`};kd.getExternalBufferCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{resource:t}=e;return`external-buffer:${tS(t)}`};kd.getEmbeddedBufferCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{parentResource:t,bufferId:n}=e;return`embedded-buffer:${L0e(t,n)}`};kd.getGltfCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltfResource:t}=e;return`gltf:${tS(t)}`};kd.getBufferViewCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:r}=e,o=t.bufferViews[n],s=o.buffer,a=t.buffers[s],c=tA(o);l(c)&&(s=c.buffer);let u=nS(a,s,i,r),f=pN(o);return`buffer-view:${u}-range-${f}`};kd.getDracoCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,draco:n,gltfResource:i,baseResource:r}=e;return`draco:${U$(t,n,i,r)}`};kd.getSpzCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,spz:n,gltfResource:i,baseResource:r}=e;return`spz:${F0e(t,n,i,r)}`};kd.getVertexBufferCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:r,bufferViewId:o,draco:s,spz:a,attributeSemantic:c,dequantize:u=!1,loadBuffer:f=!1,loadTypedArray:d=!1}=e,p="";if(u&&(p+="-dequantize"),f&&(p+="-buffer",p+=`-context-${r.context.id}`),d&&(p+="-typed-array"),l(a))return`vertex-buffer:${F0e(t,a,n,i)}-spz-${c}${p}`;if(l(s))return`vertex-buffer:${U$(t,s,n,i)}-draco-${c}${p}`;let g=t.bufferViews[o],m=g.buffer,y=t.buffers[m],A=nS(y,m,n,i),b=pN(g);return`vertex-buffer:${A}-range-${b}${p}`};kd.getIndexBufferCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:r,frameState:o,draco:s,loadBuffer:a=!1,loadTypedArray:c=!1}=e,u="";if(a&&(u+="-buffer",u+=`-context-${o.context.id}`),c&&(u+="-typed-array"),l(s))return`index-buffer:${U$(t,s,i,r)}-draco${u}`;let f=t.accessors[n],d=f.bufferView,p=t.bufferViews[d],g=p.buffer,m=t.buffers[g],y=nS(m,g,i,r),A=RXe(f,p);return`index-buffer:${y}-accessor-${A}${u}`};kd.getImageCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:r}=e;return`image:${B0e(t,n,i,r)}`};kd.getTextureCacheKey=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:r,supportedImageFormats:o,frameState:s}=e,a=n.index,c=ju.getImageIdFromTexture({gltf:t,textureId:a,supportedImageFormats:o}),u=B0e(t,c,i,r),f=OXe(t,n);return`texture:${u}-sampler-${f}-context-${s.context.id}`};var Jl=kd;function gN(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}gN.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};gN.prototype.addGeometryLoader=function(e){let t=e.cacheKey;if(this._geometrySizes.hasOwnProperty(t))return;this._geometrySizes[t]=0;let n=e.buffer,i=e.typedArray,r=0;l(n)&&(r+=n.sizeInBytes),l(i)&&(r+=i.byteLength),this.geometryByteLength+=r,this._geometrySizes[t]=r};gN.prototype.addTextureLoader=function(e){let t=e.cacheKey;if(this._textureSizes.hasOwnProperty(t))return;this._textureSizes[t]=0;let n=e.texture.sizeInBytes;this.texturesByteLength+=e.texture.sizeInBytes,this._textureSizes[t]=n};gN.prototype.removeLoader=function(e){let t=e.cacheKey,n=this._geometrySizes[t];delete this._geometrySizes[t],l(n)&&(this.geometryByteLength-=n);let i=this._textureSizes[t];delete this._textureSizes[t],l(i)&&(this.texturesByteLength-=i)};var _N=gN;function Nn(){}Nn.cacheEntries={};Nn.statistics=new _N;function MXe(e){this.referenceCount=1,this.resourceLoader=e,this._statisticsPromise=void 0}Nn.get=function(e){let t=Nn.cacheEntries[e];if(l(t))return++t.referenceCount,t.resourceLoader};Nn.add=function(e){let t=e.cacheKey;return Nn.cacheEntries[t]=new MXe(e),e};Nn.unload=function(e){let t=e.cacheKey,n=Nn.cacheEntries[t];--n.referenceCount,n.referenceCount===0&&(Nn.statistics.removeLoader(e),e.destroy(),delete Nn.cacheEntries[t])};Nn.getSchemaLoader=function(e){e=e??H.EMPTY_OBJECT;let{schema:t,resource:n}=e,i=Jl.getSchemaCacheKey({schema:t,resource:n}),r=Nn.get(i);return l(r)?r:(r=new aA({schema:t,resource:n,cacheKey:i}),Nn.add(r))};Nn.getEmbeddedBufferLoader=function(e){e=e??H.EMPTY_OBJECT;let{parentResource:t,bufferId:n,typedArray:i}=e,r=Jl.getEmbeddedBufferCacheKey({parentResource:t,bufferId:n}),o=Nn.get(r);return l(o)?o:(o=new Zx({typedArray:i,cacheKey:r}),Nn.add(o))};Nn.getExternalBufferLoader=function(e){e=e??H.EMPTY_OBJECT;let{resource:t}=e,n=Jl.getExternalBufferCacheKey({resource:t}),i=Nn.get(n);return l(i)?i:(i=new Zx({resource:t,cacheKey:n}),Nn.add(i))};Nn.getGltfJsonLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltfResource:t,baseResource:n,typedArray:i,gltfJson:r}=e,o=Jl.getGltfCacheKey({gltfResource:t}),s=Nn.get(o);return l(s)?s:(s=new Xv({resourceCache:Nn,gltfResource:t,baseResource:n,typedArray:i,gltfJson:r,cacheKey:o}),Nn.add(s))};Nn.getBufferViewLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,bufferViewId:n,gltfResource:i,baseResource:r}=e,o=Jl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:r}),s=Nn.get(o);return l(s)?s:(s=new Hv({resourceCache:Nn,gltf:t,bufferViewId:n,gltfResource:i,baseResource:r,cacheKey:o}),Nn.add(s))};Nn.getDracoLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,primitive:n,draco:i,gltfResource:r,baseResource:o}=e,s=Jl.getDracoCacheKey({gltf:t,draco:i,gltfResource:r,baseResource:o}),a=Nn.get(s);return l(a)?a:(a=new Gv({resourceCache:Nn,gltf:t,primitive:n,draco:i,gltfResource:r,baseResource:o,cacheKey:s}),Nn.add(a))};Nn.getSpzLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,primitive:n,spz:i,gltfResource:r,baseResource:o}=e,s=Jl.getSpzCacheKey({gltf:t,spz:i,gltfResource:r,baseResource:o}),a=Nn.get(s);return l(a)?a:(a=new fN({resourceCache:Nn,gltf:t,primitive:n,spz:i,gltfResource:r,baseResource:o,cacheKey:s}),Nn.add(a))};Nn.getVertexBufferLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,gltfResource:n,baseResource:i,frameState:r,bufferViewId:o,primitive:s,draco:a,spz:c,attributeSemantic:u,accessorId:f,asynchronous:d=!0,dequantize:p=!1,loadBuffer:g=!1,loadTypedArray:m=!1}=e,y=Jl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:r,bufferViewId:o,draco:a,spz:c,attributeSemantic:u,dequantize:p,loadBuffer:g,loadTypedArray:m}),A=Nn.get(y);return l(A)?A:(A=new Qv({resourceCache:Nn,gltf:t,gltfResource:n,baseResource:i,bufferViewId:o,primitive:s,draco:a,spz:c,attributeSemantic:u,accessorId:f,cacheKey:y,asynchronous:d,dequantize:p,loadBuffer:g,loadTypedArray:m}),Nn.add(A))};Nn.getIndexBufferLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,accessorId:n,gltfResource:i,baseResource:r,frameState:o,primitive:s,draco:a,asynchronous:c=!0,loadBuffer:u=!1,loadTypedArray:f=!1}=e,d=Jl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:r,frameState:o,draco:a,loadBuffer:u,loadTypedArray:f}),p=Nn.get(d);return l(p)?p:(p=new qv({resourceCache:Nn,gltf:t,accessorId:n,gltfResource:i,baseResource:r,primitive:s,draco:a,cacheKey:d,asynchronous:c,loadBuffer:u,loadTypedArray:f}),Nn.add(p))};Nn.getImageLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,imageId:n,gltfResource:i,baseResource:r}=e,o=Jl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:r}),s=Nn.get(o);return l(s)?s:(s=new Wv({resourceCache:Nn,gltf:t,imageId:n,gltfResource:i,baseResource:r,cacheKey:o}),Nn.add(s))};Nn.getTextureLoader=function(e){e=e??H.EMPTY_OBJECT;let{gltf:t,textureInfo:n,gltfResource:i,baseResource:r,supportedImageFormats:o,frameState:s,asynchronous:a=!0}=e,c=Jl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:r,supportedImageFormats:o,frameState:s}),u=Nn.get(c);return l(u)?u:(u=new Zv({resourceCache:Nn,gltf:t,textureInfo:n,gltfResource:i,baseResource:r,supportedImageFormats:o,cacheKey:c,asynchronous:a}),Nn.add(u))};Nn.clearForSpecs=function(){let e=[Qv,qv,Gv,Zv,Wv,Hv,Zx,aA,Xv],t,n=Nn.cacheEntries,i=[];for(t in n)n.hasOwnProperty(t)&&i.push(n[t]);i.sort(function(o,s){let a=e.indexOf(o.resourceLoader.constructor),c=e.indexOf(s.resourceLoader.constructor);return a-c});let r=i.length;for(let o=0;o<r;++o){let s=i[o];t=s.resourceLoader.cacheKey,l(n[t])&&(s.resourceLoader.destroy(),delete n[t])}Nn.statistics.clear()};var Li=Nn;function fc(e,t,n){this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._implicitCoordinates=n,this._subtreeLevels=t.subtreeLevels,this._subdivisionScheme=t.subdivisionScheme,this._branchingFactor=t.branchingFactor,this._metadata=void 0,this._tileMetadataTable=void 0,this._tilePropertyTableJson=void 0,this._contentMetadataTables=[],this._contentPropertyTableJsons=[],this._tileJumpBuffer=void 0,this._contentJumpBuffers=[],this._ready=!1}Object.defineProperties(fc.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}},tileMetadataTable:{get:function(){return this._tileMetadataTable}},tilePropertyTableJson:{get:function(){return this._tilePropertyTableJson}},contentMetadataTables:{get:function(){return this._contentMetadataTables}},contentPropertyTableJsons:{get:function(){return this._contentPropertyTableJsons}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}});fc.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)};fc.prototype.tileIsAvailableAtCoordinates=function(e){let t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)};fc.prototype.contentIsAvailableAtIndex=function(e,t){return t=t??0,this._contentAvailabilityBitstreams[t].getBit(e)};fc.prototype.contentIsAvailableAtCoordinates=function(e,t){let n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)};fc.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)};fc.prototype.childSubtreeIsAvailableAtCoordinates=function(e){let t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)};fc.prototype.getLevelOffset=function(e){let t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)};fc.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===Gs.OCTREE&&(t=3),e>>t};fc.fromSubtreeJson=async function(e,t,n,i,r){let o=new fc(e,i,r),s;l(t)?s={json:t,binary:void 0}:s=NXe(n);let a=s.json;o._subtreeJson=a;let c;if(tr(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let x=a.tileMetadata;c=a.propertyTables[x]}let u=[];if(l(a.contentMetadata)){let x=a.contentMetadata.length;for(let T=0;T<x;T++){let E=a.contentMetadata[T];u.push(a.propertyTables[E])}}let f,d=i.metadataSchema,p=a.subtreeMetadata;if(l(p)){let x=p.class,T=d.classes[x];f=new KM({subtreeMetadata:p,class:T})}o._metadata=f,o._tilePropertyTableJson=c,o._contentPropertyTableJsons=u;let g={constant:0};a.contentAvailabilityHeaders=[],tr(a,"3DTILES_multiple_contents")?a.contentAvailabilityHeaders=a.extensions["3DTILES_multiple_contents"].contentAvailability:Array.isArray(a.contentAvailability)?a.contentAvailabilityHeaders=a.contentAvailability:a.contentAvailabilityHeaders.push(a.contentAvailability??g);let m=LXe(a.buffers),y=FXe(a.bufferViews,m);BXe(a,y),l(c)&&k0e(c,y);for(let x=0;x<u.length;x++){let T=u[x];k0e(T,y)}let A=await kXe(o,m,s.binary),b=zXe(y,A);return VXe(o,a,i,b),l(c)&&(jXe(o,i,b),GXe(o)),HXe(o,i,b),WXe(o),o._ready=!0,o};function NXe(e){let n=new DataView(e.buffer,e.byteOffset),i=8,r=n.getUint32(i,!0);i+=8;let o=n.getUint32(i,!0);i+=8;let s=Ro(e,i,r);i+=r;let a=e.subarray(i,i+o);return{json:s,binary:a}}function LXe(e){e=l(e)?e:[];for(let t=0;t<e.length;t++){let n=e[t];n.isExternal=l(n.uri),n.isActive=!1}return e}function FXe(e,t){e=l(e)?e:[];for(let n=0;n<e.length;n++){let i=e[n],r=t[i.buffer];i.bufferHeader=r,i.isActive=!1}return e}function BXe(e,t){let n,i=e.tileAvailability;l(i.bitstream)?n=t[i.bitstream]:l(i.bufferView)&&(n=t[i.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);let r=e.contentAvailabilityHeaders;for(let s=0;s<r.length;s++)n=void 0,l(r[s].bitstream)?n=t[r[s].bitstream]:l(r[s].bufferView)&&(n=t[r[s].bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0);n=void 0;let o=e.childSubtreeAvailability;l(o.bitstream)?n=t[o.bitstream]:l(o.bufferView)&&(n=t[o.bufferView]),l(n)&&(n.isActive=!0,n.bufferHeader.isActive=!0)}function k0e(e,t){let n=e.properties,i;for(let r in n)if(n.hasOwnProperty(r)){let o=n[r],s=o.values??o.bufferView;i=t[s],i.isActive=!0,i.bufferHeader.isActive=!0;let a=o.stringOffsets??o.stringOffsetBufferView;l(a)&&(i=t[a],i.isActive=!0,i.bufferHeader.isActive=!0);let c=o.arrayOffsets??o.arrayOffsetBufferView;l(c)&&(i=t[c],i.isActive=!0,i.bufferHeader.isActive=!0)}}function kXe(e,t,n){let i=[];for(let r=0;r<t.length;r++){let o=t[r];if(!o.isActive)i.push(Promise.resolve(void 0));else if(o.isExternal){let s=UXe(e,o);i.push(s)}else i.push(Promise.resolve(n))}return Promise.all(i).then(function(r){let o={};for(let s=0;s<r.length;s++){let a=r[s];l(a)&&(o[s]=a)}return o})}async function UXe(e,t){let i=e._resource.getDerivedResource({url:t.uri}),r=Li.getExternalBufferLoader({resource:i});e._bufferLoader=r;try{await r.load()}catch(o){if(r.isDestroyed())return;throw o}return r.typedArray}function zXe(e,t){let n={};for(let i=0;i<e.length;i++){let r=e[i];if(!r.isActive)continue;let o=r.byteOffset,s=o+r.byteLength,c=t[r.buffer].subarray(o,s);n[i]=c}return n}function VXe(e,t,n,i){let r=n.branchingFactor,o=n.subtreeLevels,s=(Math.pow(r,o)-1)/(r-1),a=Math.pow(r,o),c=tr(t,"3DTILES_metadata"),u=l(e._tilePropertyTableJson),f=c||u;e._tileAvailability=z$(t.tileAvailability,i,s,f);let d=e._contentPropertyTableJsons.length>0;f=f||d;for(let p=0;p<t.contentAvailabilityHeaders.length;p++){let g=z$(t.contentAvailabilityHeaders[p],i,s,f);e._contentAvailabilityBitstreams.push(g)}e._childSubtreeAvailability=z$(t.childSubtreeAvailability,i,a)}function z$(e,t,n,i){if(l(e.constant))return new Vv({constant:!!e.constant,lengthBits:n,availableCount:e.availableCount});let r;return l(e.bitstream)?r=t[e.bitstream]:l(e.bufferView)&&(r=t[e.bufferView]),new Vv({bitstream:r,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function jXe(e,t,n){let i=e._tilePropertyTableJson,r=e._tileAvailability.availableCount,o=t.metadataSchema,s=i.class,a=o.classes[s];e._tileMetadataTable=new Fd({class:a,count:r,properties:i.properties,bufferViews:n})}function HXe(e,t,n){let i=e._contentPropertyTableJsons,r=e._contentAvailabilityBitstreams,o=t.metadataSchema,s=e._contentMetadataTables;for(let a=0;a<i.length;a++){let c=i[a],f=r[a].availableCount,d=c.class,p=o.classes[d],g=new Fd({class:p,count:f,properties:c.properties,bufferViews:n});s.push(g)}}function U0e(e){let t=0,n=e.lengthBits,i=e.availableCount,r;i<256?r=new Uint8Array(n):i<65536?r=new Uint16Array(n):r=new Uint32Array(n);for(let o=0;o<e.lengthBits;o++)e.getBit(o)&&(r[o]=t,t++);return r}function GXe(e){let t=U0e(e._tileAvailability);e._tileJumpBuffer=t}function WXe(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let r=n[i],o=U0e(r);t.push(o)}}fc.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new oe("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex};fc.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new oe("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function qXe(e,t){if(!l(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function YXe(e,t,n){let i=e._contentMetadataTables;if(!l(i))return;let r=i[n];if(!l(r))return;let o=e._contentAvailabilityBitstreams[n],s=e.getTileIndex(t);if(o.getBit(s))return e._contentJumpBuffers[n][s]}fc.prototype.getTileMetadataView=function(e){let t=qXe(this,e);if(!l(t))return;let n=this._tileMetadataTable;return new jv({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};fc.prototype.getContentMetadataView=function(e,t){let n=YXe(this,e,t);if(!l(n))return;let i=this._contentMetadataTables[t],r=this._contentPropertyTableJsons[t];return new jv({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:r})};fc.prototype.isDestroyed=function(){return!1};fc.prototype.destroy=function(){return l(this._bufferLoader)&&Li.unload(this._bufferLoader),le(this)};var Lg=fc;var z0e={ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILESET_TILE_COUNT:"TILESET_TILE_COUNT",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"};Object.freeze(z0e);var Ud=z0e;var cA={};cA.parseAllBoundingVolumeSemantics=function(e,t){return{boundingVolume:cA.parseBoundingVolumeSemantic(e,t),minimumHeight:cA._parseMinimumHeight(e,t),maximumHeight:cA._parseMaximumHeight(e,t)}};cA.parseBoundingVolumeSemantic=function(e,t){let n=`${e}_BOUNDING_BOX`,i=t.getPropertyBySemantic(n);if(l(i))return{box:i};let r=`${e}_BOUNDING_REGION`,o=t.getPropertyBySemantic(r);if(l(o))return{region:o};let s=`${e}_BOUNDING_SPHERE`,a=t.getPropertyBySemantic(s);if(l(a))return{sphere:a}};cA._parseMinimumHeight=function(e,t){let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};cA._parseMaximumHeight=function(e,t){let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var lA=cA;var iS=class e{constructor(t,n,i){let r=n.implicitTileset,o=n.implicitCoordinates;this._implicitTileset=r,this._implicitCoordinates=o,this._implicitSubtree=void 0,this._tileset=t,this._tile=n,this._resource=i,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let s=o.getTemplateValues(),a=r.subtreeUriTemplate.getDerivedResource({templateValues:s});this._url=a.getUrlComponent(!0),this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._url}get metadata(){}set metadata(t){}get batchTable(){}get group(){return this._group}set group(t){this._group=t}static async fromSubtreeJson(t,n,i,r,o,s){s=s??0;let a;l(o)&&(a=new Uint8Array(o,s));let c=n.implicitTileset,u=n.implicitCoordinates,f=await Lg.fromSubtreeJson(i,r,a,c,u),d=new e(t,n,i);return d._implicitSubtree=f,XXe(d,f),d._ready=!0,d}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),le(this)}};function XXe(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,r=$Xe(e,t,n,i),o=e._tileset.statistics;n.children.push(r.rootTile),o.numberOfTilesTotal++;let s=KXe(e,t,r.bottomRow);for(let a=0;a<s.length;a++){let c=s[a],u=c.tile,f=oKe(e,u,c.childIndex);u.children.push(f),o.numberOfTilesTotal++}}function KXe(e,t,n){let i=[],r=e._implicitTileset.branchingFactor;for(let o=0;o<n.length;o++){let s=n[o];if(l(s))for(let a=0;a<r;a++){let c=o*r+a;t.childSubtreeIsAvailableAtIndex(c)&&i.push({tile:s,childIndex:a})}}return i}function $Xe(e,t,n,i){let s=V0e(e,t,n,i,0,!0),a=e._tileset.statistics,c=[s],u=[],f=e._implicitTileset;for(let d=1;d<f.subtreeLevels;d++){let p=t.getLevelOffset(d),g=f.branchingFactor*c.length;for(let m=0;m<g;m++){let y=p+m;if(!t.tileIsAvailableAtIndex(y)){u.push(void 0);continue}let A=t.getParentMortonIndex(m),b=c[A],x=m%f.branchingFactor,T=V0e(e,t,b,x,y);b.children.push(T),a.numberOfTilesTotal++,u.push(T)}c=u,u=[]}return{rootTile:s,bottomRow:c}}function j0e(e,t,n){let i=Ud.TILE_GEOMETRIC_ERROR;return l(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function V0e(e,t,n,i,r,o){let s=e._implicitTileset,a;o??!1?a=n.implicitCoordinates:a=n.implicitCoordinates.getChildCoordinates(i);let c,u;l(t.tilePropertyTableJson)&&(c=t.getTileMetadataView(a),u=lA.parseAllBoundingVolumeSemantics("TILE",c));let d=t.contentPropertyTableJsons.length,p=!1;for(let v=0;v<d;v++)if(t.contentIsAvailableAtCoordinates(a,v)){p=!0;break}let g=QXe(s,a,i,o,n,u),m=[];for(let v=0;v<s.contentCount;v++){if(!t.contentIsAvailableAtIndex(r,v))continue;let R={uri:s.contentUriTemplates[v].getDerivedResource({templateValues:a.getTemplateValues()}).url},O;if(t.contentPropertyTableJsons.length>0){let _=t.getContentMetadataView(a,v);O=lA.parseAllBoundingVolumeSemantics("CONTENT",_)}let L=eKe(g,O);l(L)&&(R.boundingVolume=L),m.push(Ot(R,s.contentHeaders[v]))}let y=j0e(c,s,a),A={boundingVolume:g,geometricError:y,refine:s.refine,contents:m},b=!0,x=Je(s.tileHeader,b);delete x.boundingVolume,delete x.transform,delete x.metadata;let T=Ot(A,x,b),E=Y0e(e,s.baseResource,T,n);return E.implicitCoordinates=a,E.implicitSubtree=t,E.metadata=c,E.hasImplicitContentMetadata=p,E}function $6(e,t){return l(e)&&l(t)&&(l(t.minimumHeight)||l(t.maximumHeight))&&(tr(e,"3DTILES_bounding_volume_S2")||l(e.region))}function j$(e,t){l(t)&&(tr(e,"3DTILES_bounding_volume_S2")?ZXe(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):l(e.region)&&JXe(e.region,t.minimumHeight,t.maximumHeight))}function JXe(e,t,n){l(t)&&(e[4]=t),l(n)&&(e[5]=n)}function ZXe(e,t,n){l(t)&&(e.minimumHeight=t),l(n)&&(e.maximumHeight=n)}function QXe(e,t,n,i,r,o){let s;return!l(o)||!l(o.boundingVolume)||!$6(o.boundingVolume,o)&&$6(e.boundingVolume,o)?s=H0e(e,t,n,i??!1,r):s=o.boundingVolume,j$(s,o),s}function eKe(e,t){let n;return l(t)&&(n=t.boundingVolume),$6(n,t)?j$(n,t):$6(e,t)&&(n=Je(e,!0),j$(n,t)),n}function H0e(e,t,n,i,r){let o=e.boundingVolume;return tr(o,"3DTILES_bounding_volume_S2")?G0e(i,r,n,t.level,t.x,t.y,t.z):l(o.region)?{region:q0e(o.region,t.level,t.x,t.y,t.z)}:{box:W0e(o.box,t.level,t.x,t.y,t.z)}}function G0e(e,t,n,i,r,o,s){let a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:Pg.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};let c=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),u=c%2===0?Uv.encode2D(i,r,o):Uv.encode2D(i,o,r),f=Pg.fromFacePositionLevel(c,BigInt(u),i),d,p;if(l(s)){let g=(a.maximumHeight+a.minimumHeight)/2;d=n<4?a.minimumHeight:g,p=n<4?g:a.maximumHeight}else d=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:Pg.getTokenFromId(f._cellId),minimumHeight:d,maximumHeight:p}}}}var tKe=new h,nKe=new h,V$=new h,iKe=new $;function W0e(e,t,n,i,r){if(t===0)return e;let o=h.unpack(e,0,nKe),s=$.unpack(e,3,iKe),a=Math.pow(2,-t),c=-1+(2*n+1)*a,u=-1+(2*i+1)*a,f=0,d=h.fromElements(a,a,1,tKe);l(r)&&(f=-1+(2*r+1)*a,d.z=a);let p=h.fromElements(c,u,f,V$);p=$.multiplyByVector(s,p,V$),p=h.add(p,o,V$);let g=$.clone(s);g=$.multiplyByScale(g,d,g);let m=new Array(12);return h.pack(p,m),$.pack(g,m,3),m}var rKe=new ie;function q0e(e,t,n,i,r){if(t===0)return e.slice();let o=ie.unpack(e,0,rKe),s=e[4],a=e[5],c=Math.pow(2,-t),u=c*o.width,f=D.negativePiToPi(o.west+n*u),d=D.negativePiToPi(f+u),p=c*o.height,g=D.negativePiToPi(o.south+i*p),m=D.negativePiToPi(g+p),y=s,A=a;if(l(r)){let b=c*(a-s);y+=r*b,A=y+b}return[f,g,d,m,y,A]}function oKe(e,t,n){let i=e._implicitTileset,r=t.implicitCoordinates.getChildCoordinates(n),o=H0e(i,r,n,!1,t),s=j0e(void 0,i,r),a=i.subtreeUriTemplate.getDerivedResource({templateValues:r.getTemplateValues()}).url,c={boundingVolume:o,geometricError:s,refine:i.refine,contents:[{uri:a}]},u=Y0e(e,i.baseResource,c,t);return u.implicitTileset=i,u.implicitCoordinates=r,u}function Y0e(e,t,n,i){let r=e._tile.constructor;return new r(e._tileset,t,n,i)}iS._deriveBoundingBox=W0e;iS._deriveBoundingRegion=q0e;iS._deriveBoundingVolumeS2=G0e;var rS=iS;var X0e={NONE:0,REPEAT:1,MIRRORED_REPEAT:2};Object.freeze(X0e);var Hu=X0e;function oS(e,t){this._distance=t,this._normal=new K0e(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(oS.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!h.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),h.clone(e,this._normal._cartesian3)}}});oS.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new oS(e.normal,e.distance),t};oS.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new oS(e.normal,e.distance)};function K0e(e,t){this._clippingPlane=t,this._cartesian3=h.clone(e)}Object.defineProperties(K0e.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){l(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}});var ia=oS;function sl(e){e=e??H.EMPTY_OBJECT,this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=e.enabled??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this.edgeColor=z.clone(e.edgeColor??z.WHITE),this.edgeWidth=e.edgeWidth??0,this.planeAdded=new be,this.planeRemoved=new be,this._owner=void 0;let t=e.unionClippingRegions??!1;this._unionClippingRegions=t,this._testIntersection=t?ege:tge,this._uint8View=void 0,this._float32View=void 0,this._clippingPlanesTexture=void 0;let n=e.planes;if(l(n)){let i=n.length;for(let r=0;r<i;++r)this.add(n[r])}}function ege(e){return e===$t.OUTSIDE}function tge(e){return e===$t.INSIDE}Object.defineProperties(sl.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?ege:tge)}},enabled:{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e)}},texture:{get:function(){return this._clippingPlanesTexture}},owner:{get:function(){return this._owner}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});function $0e(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}sl.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){$0e(n,i)},e.index=t,$0e(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};sl.prototype.get=function(e){return this._planes[e]};function nge(e,t){let n=e.length;for(let i=0;i<n;++i)if(sn.equals(e[i],t))return i;return-1}sl.prototype.contains=function(e){return nge(this._planes,e)!==-1};sl.prototype.remove=function(e){let t=this._planes,n=nge(t,e);if(n===-1)return!1;e instanceof ia&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let r=n;r<i;++r){let o=t[r+1];t[r]=o,o instanceof ia&&(o.index=r)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};sl.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof ia&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var sKe=new se,aKe=new se;function J0e(e,t,n){let i=e._uint8View,r=e._planes,o=0;for(let s=t;s<n;++s){let a=r[s],c=cn.octEncodeToCartesian4(a.normal,aKe);i[o]=c.x,i[o+1]=c.y,i[o+2]=c.z,i[o+3]=c.w;let u=se.packFloat(a.distance,sKe);i[o+4]=u.x,i[o+5]=u.y,i[o+6]=u.z,i[o+7]=u.w,o+=8}}function Z0e(e,t,n){let i=e._float32View,r=e._planes,o=0;for(let s=t;s<n;++s){let a=r[s],c=a.normal;i[o]=c.x,i[o+1]=c.y,i[o+2]=c.z,i[o+3]=a.distance,o+=4}}function ige(e,t){let n=Ut.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var cKe=new U;sl.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=sl.useFloatTexture(n),r=i?this.length:this.length*2;if(l(t)){let s=t.width*t.height;(s<r||r<.25*s)&&(t.destroy(),t=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(t)){let s=ige(r,cKe);s.y*=2,i?(t=new Dt({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT,sampler:Ht.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Dt({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:Ht.NEAREST,flipY:!1}),this._uint8View=new Uint8Array(s.x*s.y*4)),this._clippingPlanesTexture=t,this._multipleDirtyPlanes=!0}let o=this._dirtyIndex;if(!(!this._multipleDirtyPlanes&&o===-1)){if(this._multipleDirtyPlanes)i?(Z0e(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(J0e(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._uint8View}}));else{let s,a;i?(a=Math.floor(o/t.width),s=Math.floor(o-a*t.width),Z0e(this,o,o+1),t.copyFrom({source:{width:1,height:1,arrayBufferView:this._float32View},xOffset:s,yOffset:a})):(a=Math.floor(o*2/t.width),s=Math.floor(o*2-a*t.width),J0e(this,o,o+1),t.copyFrom({source:{width:2,height:1,arrayBufferView:this._uint8View},xOffset:s,yOffset:a}))}this._multipleDirtyPlanes=!1,this._dirtyIndex=-1}};var lKe=new N,Q0e=new sn(h.UNIT_X,0);sl.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,r=this.modelMatrix;l(t)&&(r=N.multiply(t,r,lKe));let o=$t.INSIDE;!this.unionClippingRegions&&i>0&&(o=$t.OUTSIDE);for(let s=0;s<i;++s){let a=n[s];sn.transform(a,r,Q0e);let c=e.intersectPlane(Q0e);if(c===$t.INTERSECTING)o=c;else if(this._testIntersection(c))return c}return o};sl.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};sl.useFloatTexture=function(e){return e.floatingPointTexture};sl.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let r=sl.useFloatTexture(t)?e.length:e.length*2,o=ige(r,n);return o.y*=2,o};sl.prototype.isDestroyed=function(){return!1};sl.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),le(this)};var bs=sl;function W$(e,t,n=2){let i=t&&t.length,r=i?t[0]*n:e.length,o=oge(e,0,r,n,!0),s=[];if(!o||o.next===o.prev)return s;let a,c,u;if(i&&(o=mKe(e,t,o,n)),e.length>80*n){a=e[0],c=e[1];let f=a,d=c;for(let p=n;p<r;p+=n){let g=e[p],m=e[p+1];g<a&&(a=g),m<c&&(c=m),g>f&&(f=g),m>d&&(d=m)}u=Math.max(f-a,d-c),u=u!==0?32767/u:0}return AN(o,s,n,a,c,u,0),s}function oge(e,t,n,i,r){let o;if(r===vKe(e,t,n,i)>0)for(let s=t;s<n;s+=i)o=rge(s/i|0,e[s],e[s+1],o);else for(let s=n-i;s>=t;s-=i)o=rge(s/i|0,e[s],e[s+1],o);return o&&sS(o,o.next)&&(xN(o),o=o.next),o}function sT(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(sS(n,n.next)||xs(n.prev,n,n.next)===0)){if(xN(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function AN(e,t,n,i,r,o,s){if(!e)return;!s&&o&&AKe(e,i,r,o);let a=e;for(;e.prev!==e.next;){let c=e.prev,u=e.next;if(o?fKe(e,i,r,o):uKe(e)){t.push(c.i,e.i,u.i),xN(e),e=u.next,a=u.next;continue}if(e=u,e===a){s?s===1?(e=dKe(sT(e),t),AN(e,t,n,i,r,o,2)):s===2&&hKe(e,t,n,i,r,o):AN(sT(e),t,n,i,r,o,1);break}}}function uKe(e){let t=e.prev,n=e,i=e.next;if(xs(t,n,i)>=0)return!1;let r=t.x,o=n.x,s=i.x,a=t.y,c=n.y,u=i.y,f=Math.min(r,o,s),d=Math.min(a,c,u),p=Math.max(r,o,s),g=Math.max(a,c,u),m=i.next;for(;m!==t;){if(m.x>=f&&m.x<=p&&m.y>=d&&m.y<=g&&yN(r,a,o,c,s,u,m.x,m.y)&&xs(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function fKe(e,t,n,i){let r=e.prev,o=e,s=e.next;if(xs(r,o,s)>=0)return!1;let a=r.x,c=o.x,u=s.x,f=r.y,d=o.y,p=s.y,g=Math.min(a,c,u),m=Math.min(f,d,p),y=Math.max(a,c,u),A=Math.max(f,d,p),b=H$(g,m,t,n,i),x=H$(y,A,t,n,i),T=e.prevZ,E=e.nextZ;for(;T&&T.z>=b&&E&&E.z<=x;){if(T.x>=g&&T.x<=y&&T.y>=m&&T.y<=A&&T!==r&&T!==s&&yN(a,f,c,d,u,p,T.x,T.y)&&xs(T.prev,T,T.next)>=0||(T=T.prevZ,E.x>=g&&E.x<=y&&E.y>=m&&E.y<=A&&E!==r&&E!==s&&yN(a,f,c,d,u,p,E.x,E.y)&&xs(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;T&&T.z>=b;){if(T.x>=g&&T.x<=y&&T.y>=m&&T.y<=A&&T!==r&&T!==s&&yN(a,f,c,d,u,p,T.x,T.y)&&xs(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;E&&E.z<=x;){if(E.x>=g&&E.x<=y&&E.y>=m&&E.y<=A&&E!==r&&E!==s&&yN(a,f,c,d,u,p,E.x,E.y)&&xs(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function dKe(e,t){let n=e;do{let i=n.prev,r=n.next.next;!sS(i,r)&&age(i,n,n.next,r)&&bN(i,r)&&bN(r,i)&&(t.push(i.i,n.i,r.i),xN(n),xN(n.next),n=e=r),n=n.next}while(n!==e);return sT(n)}function hKe(e,t,n,i,r,o){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&TKe(s,a)){let c=cge(s,a);s=sT(s,s.next),c=sT(c,c.next),AN(s,t,n,i,r,o,0),AN(c,t,n,i,r,o,0);return}a=a.next}s=s.next}while(s!==e)}function mKe(e,t,n,i){let r=[];for(let o=0,s=t.length;o<s;o++){let a=t[o]*i,c=o<s-1?t[o+1]*i:e.length,u=oge(e,a,c,i,!1);u===u.next&&(u.steiner=!0),r.push(xKe(u))}r.sort(pKe);for(let o=0;o<r.length;o++)n=gKe(r[o],n);return n}function pKe(e,t){let n=e.x-t.x;if(n===0&&(n=e.y-t.y,n===0)){let i=(e.next.y-e.y)/(e.next.x-e.x),r=(t.next.y-t.y)/(t.next.x-t.x);n=i-r}return n}function gKe(e,t){let n=_Ke(e,t);if(!n)return t;let i=cge(n,e);return sT(i,i.next),sT(n,n.next)}function _Ke(e,t){let n=t,i=e.x,r=e.y,o=-1/0,s;if(sS(e,n))return n;do{if(sS(e,n.next))return n.next;if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){let d=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(d<=i&&d>o&&(o=d,s=n.x<n.next.x?n:n.next,d===i))return s}n=n.next}while(n!==t);if(!s)return null;let a=s,c=s.x,u=s.y,f=1/0;n=s;do{if(i>=n.x&&n.x>=c&&i!==n.x&&sge(r<u?i:o,r,c,u,r<u?o:i,r,n.x,n.y)){let d=Math.abs(r-n.y)/(i-n.x);bN(n,e)&&(d<f||d===f&&(n.x>s.x||n.x===s.x&&yKe(s,n)))&&(s=n,f=d)}n=n.next}while(n!==a);return s}function yKe(e,t){return xs(e.prev,e,t.prev)<0&&xs(t.next,e,e.next)<0}function AKe(e,t,n,i){let r=e;do r.z===0&&(r.z=H$(r.x,r.y,t,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e);r.prevZ.nextZ=null,r.prevZ=null,bKe(r)}function bKe(e){let t,n=1;do{let i=e,r;e=null;let o=null;for(t=0;i;){t++;let s=i,a=0;for(let u=0;u<n&&(a++,s=s.nextZ,!!s);u++);let c=n;for(;a>0||c>0&&s;)a!==0&&(c===0||!s||i.z<=s.z)?(r=i,i=i.nextZ,a--):(r=s,s=s.nextZ,c--),o?o.nextZ=r:e=r,r.prevZ=o,o=r;i=s}o.nextZ=null,n*=2}while(t>1);return e}function H$(e,t,n,i,r){return e=(e-n)*r|0,t=(t-i)*r|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function xKe(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function sge(e,t,n,i,r,o,s,a){return(r-s)*(t-a)>=(e-s)*(o-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(o-a)>=(r-s)*(i-a)}function yN(e,t,n,i,r,o,s,a){return!(e===s&&t===a)&&sge(e,t,n,i,r,o,s,a)}function TKe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!EKe(e,t)&&(bN(e,t)&&bN(t,e)&&CKe(e,t)&&(xs(e.prev,e,t.prev)||xs(e,t.prev,t))||sS(e,t)&&xs(e.prev,e,e.next)>0&&xs(t.prev,t,t.next)>0)}function xs(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function sS(e,t){return e.x===t.x&&e.y===t.y}function age(e,t,n,i){let r=Z6(xs(e,t,n)),o=Z6(xs(e,t,i)),s=Z6(xs(n,i,e)),a=Z6(xs(n,i,t));return!!(r!==o&&s!==a||r===0&&J6(e,n,t)||o===0&&J6(e,i,t)||s===0&&J6(n,e,i)||a===0&&J6(n,t,i))}function J6(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Z6(e){return e>0?1:e<0?-1:0}function EKe(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&age(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function bN(e,t){return xs(e.prev,e,e.next)<0?xs(e,t,e.next)>=0&&xs(e,e.prev,t)>=0:xs(e,t,e.prev)<0||xs(e,e.next,t)<0}function CKe(e,t){let n=e,i=!1,r=(e.x+t.x)/2,o=(e.y+t.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function cge(e,t){let n=G$(e.i,e.x,e.y),i=G$(t.i,t.x,t.y),r=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function rge(e,t,n,i){let r=G$(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function xN(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function G$(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function vKe(e,t,n,i){let r=0;for(let o=t,s=n-i;o<n;o+=i)r+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return r}var SKe=new h,wKe=new h,uA={};uA.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,r=0;r<t;i=r++){let o=e[i],s=e[r];n+=o.x*s.y-s.x*o.y}return n*.5};uA.computeWindingOrder2D=function(e){return uA.computeArea2D(e)>0?ea.COUNTER_CLOCKWISE:ea.CLOCKWISE};uA.triangulate=function(e,t){let n=U.packArray(e);return W$(n,t,2)};var dge=new h,hge=new h,mge=new h,lge=new h,uge=new h,fge=new h,Fg=new h,pge=new U,gge=new U,_ge=new U,aS=new U;uA.computeSubdivision=function(e,t,n,i,r){r=r??D.RADIANS_PER_DEGREE;let o=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let T=t[a];if(u[d++]=T.x,u[d++]=T.y,u[d++]=T.z,o){let E=i[a];f[p++]=E.x,f[p++]=E.y}}let g=[],m={},y=e.maximumRadius,A=D.chordLength(r,y),b=A*A;for(;s.length>0;){let T=s.pop(),E=s.pop(),v=s.pop(),S=h.fromArray(u,v*3,dge),I=h.fromArray(u,E*3,hge),R=h.fromArray(u,T*3,mge),O,L,_;o&&(O=U.fromArray(f,v*2,pge),L=U.fromArray(f,E*2,gge),_=U.fromArray(f,T*2,_ge));let C=h.multiplyByScalar(h.normalize(S,lge),y,lge),w=h.multiplyByScalar(h.normalize(I,uge),y,uge),P=h.multiplyByScalar(h.normalize(R,fge),y,fge),M=h.magnitudeSquared(h.subtract(C,w,Fg)),F=h.magnitudeSquared(h.subtract(w,P,Fg)),V=h.magnitudeSquared(h.subtract(P,C,Fg)),B=Math.max(M,F,V),j,k,G;B>b?M===B?(j=`${Math.min(v,E)} ${Math.max(v,E)}`,a=m[j],l(a)||(k=h.add(S,I,Fg),h.multiplyByScalar(k,.5,k),u.push(k.x,k.y,k.z),a=u.length/3-1,m[j]=a,o&&(G=U.add(O,L,aS),U.multiplyByScalar(G,.5,G),f.push(G.x,G.y))),s.push(v,a,T),s.push(a,E,T)):F===B?(j=`${Math.min(E,T)} ${Math.max(E,T)}`,a=m[j],l(a)||(k=h.add(I,R,Fg),h.multiplyByScalar(k,.5,k),u.push(k.x,k.y,k.z),a=u.length/3-1,m[j]=a,o&&(G=U.add(L,_,aS),U.multiplyByScalar(G,.5,G),f.push(G.x,G.y))),s.push(E,a,v),s.push(a,T,v)):V===B&&(j=`${Math.min(T,v)} ${Math.max(T,v)}`,a=m[j],l(a)||(k=h.add(R,S,Fg),h.multiplyByScalar(k,.5,k),u.push(k.x,k.y,k.z),a=u.length/3-1,m[j]=a,o&&(G=U.add(_,O,aS),U.multiplyByScalar(G,.5,G),f.push(G.x,G.y))),s.push(T,a,E),s.push(a,v,E)):(g.push(v),g.push(E),g.push(T))}let x={attributes:{position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Oe.TRIANGLES};return o&&(x.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),new St(x)};var IKe=new he,PKe=new he,DKe=new he,q$=new he;uA.computeRhumbLineSubdivision=function(e,t,n,i,r){r=r??D.RADIANS_PER_DEGREE;let o=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let v=t[a];if(u[d++]=v.x,u[d++]=v.y,u[d++]=v.z,o){let S=i[a];f[p++]=S.x,f[p++]=S.y}}let g=[],m={},y=e.maximumRadius,A=D.chordLength(r,y),b=new Dc(void 0,void 0,e),x=new Dc(void 0,void 0,e),T=new Dc(void 0,void 0,e);for(;s.length>0;){let v=s.pop(),S=s.pop(),I=s.pop(),R=h.fromArray(u,I*3,dge),O=h.fromArray(u,S*3,hge),L=h.fromArray(u,v*3,mge),_,C,w;o&&(_=U.fromArray(f,I*2,pge),C=U.fromArray(f,S*2,gge),w=U.fromArray(f,v*2,_ge));let P=e.cartesianToCartographic(R,IKe),M=e.cartesianToCartographic(O,PKe),F=e.cartesianToCartographic(L,DKe);b.setEndPoints(P,M);let V=b.surfaceDistance;x.setEndPoints(M,F);let B=x.surfaceDistance;T.setEndPoints(F,P);let j=T.surfaceDistance,k=Math.max(V,B,j),G,q,Q,W,J;k>A?V===k?(G=`${Math.min(I,S)} ${Math.max(I,S)}`,a=m[G],l(a)||(q=b.interpolateUsingFraction(.5,q$),Q=(P.height+M.height)*.5,W=h.fromRadians(q.longitude,q.latitude,Q,e,Fg),u.push(W.x,W.y,W.z),a=u.length/3-1,m[G]=a,o&&(J=U.add(_,C,aS),U.multiplyByScalar(J,.5,J),f.push(J.x,J.y))),s.push(I,a,v),s.push(a,S,v)):B===k?(G=`${Math.min(S,v)} ${Math.max(S,v)}`,a=m[G],l(a)||(q=x.interpolateUsingFraction(.5,q$),Q=(M.height+F.height)*.5,W=h.fromRadians(q.longitude,q.latitude,Q,e,Fg),u.push(W.x,W.y,W.z),a=u.length/3-1,m[G]=a,o&&(J=U.add(C,w,aS),U.multiplyByScalar(J,.5,J),f.push(J.x,J.y))),s.push(S,a,I),s.push(a,v,I)):j===k&&(G=`${Math.min(v,I)} ${Math.max(v,I)}`,a=m[G],l(a)||(q=T.interpolateUsingFraction(.5,q$),Q=(F.height+P.height)*.5,W=h.fromRadians(q.longitude,q.latitude,Q,e,Fg),u.push(W.x,W.y,W.z),a=u.length/3-1,m[G]=a,o&&(J=U.add(w,_,aS),U.multiplyByScalar(J,.5,J),f.push(J.x,J.y))),s.push(v,a,S),s.push(a,I,S)):(g.push(I),g.push(S),g.push(v))}let E={attributes:{position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Oe.TRIANGLES};return o&&(E.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),new St(E)};uA.scaleToGeodeticHeight=function(e,t,n,i){n=n??ee.default;let r=SKe,o=wKe;if(t=t??0,i=i??!0,l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,o),i&&(o=n.scaleToGeodeticSurface(o,o)),t!==0&&(r=n.geodeticSurfaceNormal(o,r),h.multiplyByScalar(r,t,r),h.add(o,r,o)),e[a]=o.x,e[a+1]=o.y,e[a+2]=o.z}return e};var fi=uA;function fA(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(fA.prototype,{length:{get:function(){return this._length}}});fA.prototype.enqueue=function(e){this._array.push(e),this._length++};fA.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};fA.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};fA.prototype.contains=function(e){return this._array.indexOf(e)!==-1};fA.prototype.clear=function(){this._array.length=this._offset=this._length=0};fA.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var dA=fA;var Oo={};Oo.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let r=i.pop();if(!l(r))continue;n+=2;let o=r.positions,s=r.holes;if(l(o)&&o.length>0&&(n+=o.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};Oo.packPolygonHierarchy=function(e,t,n,i){let r=[e];for(;r.length>0;){let o=r.pop();if(!l(o))continue;let s=o.positions,a=o.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(l(a)){let c=a.length;for(let u=0;u<c;++u)r.push(a[u])}}return n};Oo.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],r=e[t++],o=new Array(i),s=r>0?new Array(r):void 0;for(let a=0;a<i;++a,t+=n.packedLength)o[a]=n.unpack(e,t);for(let a=0;a<r;++a)s[a]=Oo.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:o,holes:s,startingIndex:t}};var aT=new U;function bge(e,t,n,i){return U.subtract(t,e,aT),U.multiplyByScalar(aT,n/i,aT),U.add(e,aT,aT),[aT.x,aT.y]}var hA=new h;function RKe(e,t,n,i){return h.subtract(t,e,hA),h.multiplyByScalar(hA,n/i,hA),h.add(e,hA,hA),[hA.x,hA.y,hA.z]}Oo.subdivideLineCount=function(e,t,n){let r=h.distance(e,t)/n,o=Math.max(0,Math.ceil(D.log2(r)));return Math.pow(2,o)};var eH=new he,tH=new he,OKe=new he,MKe=new h,Q6=new Dc;Oo.subdivideRhumbLineCount=function(e,t,n,i){let r=e.cartesianToCartographic(t,eH),o=e.cartesianToCartographic(n,tH),a=new Dc(r,o,e).surfaceDistance/i,c=Math.max(0,Math.ceil(D.log2(a)));return Math.pow(2,c)};Oo.subdivideTexcoordLine=function(e,t,n,i,r,o){let s=Oo.subdivideLineCount(n,i,r),a=U.distance(e,t),c=a/s,u=o;u.length=s*2;let f=0;for(let d=0;d<s;d++){let p=bge(e,t,d*c,a);u[f++]=p[0],u[f++]=p[1]}return u};Oo.subdivideLine=function(e,t,n,i){let r=Oo.subdivideLineCount(e,t,n),o=h.distance(e,t),s=o/r;l(i)||(i=[]);let a=i;a.length=r*3;let c=0;for(let u=0;u<r;u++){let f=RKe(e,t,u*s,o);a[c++]=f[0],a[c++]=f[1],a[c++]=f[2]}return a};Oo.subdivideTexcoordRhumbLine=function(e,t,n,i,r,o,s){let a=n.cartesianToCartographic(i,eH),c=n.cartesianToCartographic(r,tH);Q6.setEndPoints(a,c);let u=Q6.surfaceDistance/o,f=Math.max(0,Math.ceil(D.log2(u))),d=Math.pow(2,f),p=U.distance(e,t),g=p/d,m=s;m.length=d*2;let y=0;for(let A=0;A<d;A++){let b=bge(e,t,A*g,p);m[y++]=b[0],m[y++]=b[1]}return m};Oo.subdivideRhumbLine=function(e,t,n,i,r){let o=e.cartesianToCartographic(t,eH),s=e.cartesianToCartographic(n,tH),a=new Dc(o,s,e);if(l(r)||(r=[]),a.surfaceDistance<=i)return r.length=3,r[0]=t.x,r[1]=t.y,r[2]=t.z,r;let c=a.surfaceDistance/i,u=Math.max(0,Math.ceil(D.log2(c))),f=Math.pow(2,u),d=a.surfaceDistance/f,p=r;p.length=f*3;let g=0;for(let m=0;m<f;m++){let y=a.interpolateUsingSurfaceDistance(m*d,OKe),A=e.cartographicToCartesian(y,MKe);p[g++]=A.x,p[g++]=A.y,p[g++]=A.z}return p};var NKe=new h,LKe=new h,FKe=new h,BKe=new h;Oo.scaleToGeodeticHeightExtruded=function(e,t,n,i,r){i=i??ee.default;let o=NKe,s=LKe,a=FKe,c=BKe;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,a),i.geodeticSurfaceNormal(a,o),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(o,n,s),s=h.add(c,s,s),u[d+f]=s.x,u[d+1+f]=s.y,u[d+2+f]=s.z,r&&(c=h.clone(a,c)),s=h.multiplyByScalar(o,t,s),s=h.add(c,s,s),u[d]=s.x,u[d+1]=s.y,u[d+2]=s.z}return e};Oo.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],r=new dA;r.enqueue(e);let o,s,a;for(;r.length!==0;){let c=r.dequeue(),u=c.positions;if(t)for(a=u.length,o=0;o<a;o++)n.scaleToGeodeticSurface(u[o],u[o]);if(u=Fr(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(o=0;o<f;o++){let d=c.holes[o],p=d.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=Fr(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let g=0;for(l(d.holes)&&(g=d.holes.length),s=0;s<g;s++)r.enqueue(d.holes[s])}i.push(u)}return i};var kKe=new he;function UKe(e,t,n){let i=n.cartesianToCartographic(e,eH),r=n.cartesianToCartographic(t,tH);if(Math.sign(i.latitude)===Math.sign(r.latitude))return;Q6.setEndPoints(i,r);let o=Q6.findIntersectionWithLatitude(0,kKe);if(!l(o))return;let s=Math.min(i.longitude,r.longitude),a=Math.max(i.longitude,r.longitude);if(Math.abs(a-s)>D.PI){let c=s;s=a,a=c}if(!(o.longitude<s||o.longitude>a))return n.cartographicToCartesian(o)}function zKe(e,t,n,i){if(i===ln.RHUMB)return UKe(e,t,n);let r=_i.lineSegmentPlane(e,t,sn.ORIGIN_XY_PLANE);if(l(r))return n.scaleToGeodeticSurface(r,r)}var VKe=new he;function jKe(e,t,n){let i=[],r,o,s,a,c,u=0;for(;u<e.length;){r=e[u],o=e[(u+1)%e.length],s=D.sign(r.z),a=D.sign(o.z);let f=d=>t.cartesianToCartographic(d,VKe).longitude;if(s===0)i.push({position:u,type:s,visited:!1,next:a,theta:f(r)});else if(a!==0){if(c=zKe(r,o,t,n),++u,!l(c))continue;e.splice(u,0,c),i.push({position:u,type:s,visited:!1,next:a,theta:f(c)})}++u}return i}function xge(e,t,n,i,r,o,s){let a=[],c=o,u=d=>p=>p.position===d,f=[];do{let d=n[c];a.push(d);let p=i.findIndex(u(c)),g=i[p];if(!l(g)){++c;continue}let{visited:m,type:y,next:A}=g;if(g.visited=!0,y===0){if(A===0){let E=i[p-(s?1:-1)];if(E?.position===c+1)E.visited=!0;else{++c;continue}}if(!m&&s&&A>0||o===c&&!s&&A<0){++c;continue}}if(!(s?y>=0:y<=0)){++c;continue}m||f.push(c);let x=p+(s?1:-1),T=i[x];if(!l(T)){++c;continue}c=T.position}while(c<n.length&&c>=0&&c!==o&&a.length<n.length);e.splice(t,r,a);for(let d of f)t=xge(e,t+1,n,i,0,d,!s);return t}Oo.splitPolygonsOnEquator=function(e,t,n,i){l(i)||(i=[]),i.splice(0,0,...e),i.length=e.length;let r=0;for(;r<i.length;){let o=i[r],s=o.slice();if(o.length<3){i[r]=s,++r;continue}let a=jKe(s,t,n);if(s.length===o.length||a.length<=1){i[r]=s,++r;continue}a.sort((u,f)=>u.theta-f.theta);let c=s[0].z>=0;r=xge(i,r,s,a,1,0,c)}return i};Oo.polygonsFromHierarchy=function(e,t,n,i,r,o){let s=[],a=[],c=new dA;c.enqueue(e);let u=l(o);for(;c.length!==0;){let f=c.dequeue(),d=f.positions,p=f.holes,g,m;if(i)for(m=d.length,g=0;g<m;g++)r.scaleToGeodeticSurface(d[g],d[g]);if(t||(d=Fr(d,h.equalsEpsilon,!0)),d.length<3)continue;let y=n(d);if(!l(y))continue;let A=[],b=fi.computeWindingOrder2D(y);if(b===ea.CLOCKWISE&&(y.reverse(),d=d.slice().reverse()),u){u=!1;let S=[d];if(S=o(S,S),S.length>1){for(let I of S)c.enqueue(new Rc(I,p));continue}}let x=d.slice(),T=l(p)?p.length:0,E=[],v;for(g=0;g<T;g++){let S=p[g],I=S.positions;if(i)for(m=I.length,v=0;v<m;++v)r.scaleToGeodeticSurface(I[v],I[v]);if(t||(I=Fr(I,h.equalsEpsilon,!0)),I.length<3)continue;let R=n(I);if(!l(R))continue;b=fi.computeWindingOrder2D(R),b===ea.CLOCKWISE&&(R.reverse(),I=I.slice().reverse()),E.push(I),A.push(x.length),x=x.concat(I),y=y.concat(R);let O=0;for(l(S.holes)&&(O=S.holes.length),v=0;v<O;v++)c.enqueue(S.holes[v])}s.push({outerRing:d,holes:E}),a.push({positions:x,positions2D:y,holes:A})}return{hierarchy:s,polygons:a}};var HKe=new U,GKe=new h,WKe=new Le,qKe=new $;Oo.computeBoundingRectangle=function(e,t,n,i,r){let o=Le.fromAxisAngle(e,i,WKe),s=$.fromQuaternion(o,qKe),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let g=h.clone(n[p],GKe);$.multiplyByVector(s,g,g);let m=t(g,HKe);l(m)&&(a=Math.min(a,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return r.x=a,r.y=u,r.width=c-a,r.height=f-u,r};Oo.createGeometryFromPositions=function(e,t,n,i,r,o,s){let a=fi.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(r){let d=c.length,p=new Array(d*3),g=0;for(let A=0;A<d;A++){let b=c[A];p[g++]=b.x,p[g++]=b.y,p[g++]=b.z}let m={attributes:{position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Oe.TRIANGLES};u&&(m.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:U.packArray(f)}));let y=new St(m);return o.normal?Gn.computeNormal(y):y}if(s===ln.GEODESIC)return fi.computeSubdivision(e,c,a,f,i);if(s===ln.RHUMB)return fi.computeRhumbLineSubdivision(e,c,a,f,i)};var yge=[],Age=[],YKe=new h,XKe=new h;Oo.computeWallGeometry=function(e,t,n,i,r,o){let s,a,c,u,f,d,p,g,m,y=e.length,A=0,b=0,x=l(t),T=x?t.positions:void 0;if(r)for(a=y*3*2,s=new Array(a*2),x&&(m=y*2*2,g=new Array(m*2)),c=0;c<y;c++)u=e[c],f=e[(c+1)%y],s[A]=s[A+a]=u.x,++A,s[A]=s[A+a]=u.y,++A,s[A]=s[A+a]=u.z,++A,s[A]=s[A+a]=f.x,++A,s[A]=s[A+a]=f.y,++A,s[A]=s[A+a]=f.z,++A,x&&(d=T[c],p=T[(c+1)%y],g[b]=g[b+m]=d.x,++b,g[b]=g[b+m]=d.y,++b,g[b]=g[b+m]=p.x,++b,g[b]=g[b+m]=p.y,++b);else{let R=D.chordLength(i,n.maximumRadius),O=0;if(o===ln.GEODESIC)for(c=0;c<y;c++)O+=Oo.subdivideLineCount(e[c],e[(c+1)%y],R);else if(o===ln.RHUMB)for(c=0;c<y;c++)O+=Oo.subdivideRhumbLineCount(n,e[c],e[(c+1)%y],R);for(a=(O+y)*3,s=new Array(a*2),x&&(m=(O+y)*2,g=new Array(m*2)),c=0;c<y;c++){u=e[c],f=e[(c+1)%y];let L,_;x&&(d=T[c],p=T[(c+1)%y]),o===ln.GEODESIC?(L=Oo.subdivideLine(u,f,R,Age),x&&(_=Oo.subdivideTexcoordLine(d,p,u,f,R,yge))):o===ln.RHUMB&&(L=Oo.subdivideRhumbLine(n,u,f,R,Age),x&&(_=Oo.subdivideTexcoordRhumbLine(d,p,n,u,f,R,yge)));let C=L.length;for(let w=0;w<C;++w,++A)s[A]=L[w],s[A+a]=L[w];if(s[A]=f.x,s[A+a]=f.x,++A,s[A]=f.y,s[A+a]=f.y,++A,s[A]=f.z,s[A+a]=f.z,++A,x){let w=_.length;for(let P=0;P<w;++P,++b)g[b]=_[P],g[b+m]=_[P];g[b]=p.x,g[b+m]=p.x,++b,g[b]=p.y,g[b+m]=p.y,++b}}}y=s.length;let E=je.createTypedArray(y/3,y-e.length*6),v=0;for(y/=6,c=0;c<y;c++){let R=c,O=R+1,L=R+y,_=L+1;u=h.fromArray(s,R*3,YKe),f=h.fromArray(s,O*3,XKe),!h.equalsEpsilon(u,f,D.EPSILON10,D.EPSILON10)&&(E[v++]=R,E[v++]=L,E[v++]=O,E[v++]=O,E[v++]=L,E[v++]=_)}let S={attributes:new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s})}),indices:E,primitiveType:Oe.TRIANGLES};return x&&(S.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:g})),new St(S)};var ni=Oo;function Ts(e,t){this.position=e,l(this.position)||(this.position=new U),this.tangentPlane=t,l(this.tangentPlane)||(this.tangentPlane=Ts.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(Ts.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let e=U.magnitude(this.position),t=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(D.PI_OVER_TWO-2*Math.atan2(e,t))}},longitude:{get:function(){let e=D.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=D.TWO_PI),e}}});var cS=new he,KKe=new h;Ts.prototype.getLatitude=function(e){l(e)||(e=ee.default),cS.latitude=this.conformalLatitude,cS.longitude=this.longitude,cS.height=0;let t=this.ellipsoid.cartographicToCartesian(cS,KKe);return e.cartesianToCartographic(t,cS),cS.latitude};var $Ke=new pn,JKe=new h,ZKe=new h;Ts.fromCartesian=function(e,t){let n=D.signNotZero(e.z),i=Ts.NORTH_POLE_TANGENT_PLANE,r=Ts.SOUTH_POLE;n<0&&(i=Ts.SOUTH_POLE_TANGENT_PLANE,r=Ts.NORTH_POLE);let o=$Ke;o.origin=i.ellipsoid.scaleToGeocentricSurface(e,o.origin),o.direction=h.subtract(o.origin,r,JKe),h.normalize(o.direction,o.direction);let s=_i.rayPlane(o,i.plane,ZKe),a=h.subtract(s,r,s),c=h.dot(i.xAxis,a),u=n*h.dot(i.yAxis,a);return l(t)?(t.position=new U(c,u),t.tangentPlane=i,t):new Ts(new U(c,u),i)};Ts.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=Ts.fromCartesian(e[i],t[i]);return t};Ts.clone=function(e,t){if(l(e))return l(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new Ts(e.position,e.tangentPlane)};Ts.HALF_UNIT_SPHERE=Object.freeze(new ee(.5,.5,.5));Ts.NORTH_POLE=Object.freeze(new h(0,0,.5));Ts.SOUTH_POLE=Object.freeze(new h(0,0,-.5));Ts.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Vs(Ts.NORTH_POLE,Ts.HALF_UNIT_SPHERE));Ts.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Vs(Ts.SOUTH_POLE,Ts.HALF_UNIT_SPHERE));var al=Ts;var QKe=new he,Tge=new he;function e$e(e,t,n,i){let o=i.cartesianToCartographic(e,QKe).height,s=i.cartesianToCartographic(t,Tge);s.height=o,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,Tge);a.height=o-100,i.cartographicToCartesian(a,n)}var Ege=new et,t$e=new h,n$e=new h,i$e=new h,r$e=new h,o$e=new h,s$e=new h,nH=new h,Wp=new h,lS=new h,a$e=new U,c$e=new U,l$e=new h,Cge=new Le,u$e=new $,f$e=new $;function Y$(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,r=n.attributes.position.values,o=l(n.attributes.st)?n.attributes.st.values:void 0,s=r.length,a=e.wall,c=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let f=e.boundingRectangle,d=e.rotationAxis,p=e.projectTo2d,g=e.ellipsoid,m=e.stRotation,y=e.perPositionHeight,A=a$e;A.x=f.x,A.y=f.y;let b=t.st?new Float32Array(2*(s/3)):void 0,x;t.normal&&(y&&c&&!a?x=n.attributes.normal.values:x=new Float32Array(s));let T=t.tangent?new Float32Array(s):void 0,E=t.bitangent?new Float32Array(s):void 0,v=i?new Float32Array(s):void 0,S=0,I=0,R=n$e,O=i$e,L=r$e,_=!0,C=u$e,w=f$e;if(m!==0){let F=Le.fromAxisAngle(d,m,Cge);C=$.fromQuaternion(F,C),F=Le.fromAxisAngle(d,-m,Cge),w=$.fromQuaternion(F,w)}else C=$.clone($.IDENTITY,C),w=$.clone($.IDENTITY,w);let P=0,M=0;c&&u&&(P=s/2,M=s/3,s/=2);for(let F=0;F<s;F+=3){let V=h.fromArray(r,F,l$e);if(t.st&&!l(o)){let B=$.multiplyByVector(C,V,t$e);B=g.scaleToGeodeticSurface(B,B);let j=p([B],c$e)[0];U.subtract(j,A,j);let k=D.clamp(j.x/f.width,0,1),G=D.clamp(j.y/f.height,0,1);u&&(b[S+M]=k,b[S+1+M]=G),c&&(b[S]=k,b[S+1]=G),S+=2}if(t.normal||t.tangent||t.bitangent||i){let B=I+1,j=I+2;if(a){if(F+3<s){let k=h.fromArray(r,F+3,o$e);if(_){let G=h.fromArray(r,F+s,s$e);y&&e$e(V,k,G,g),h.subtract(k,V,k),h.subtract(G,V,G),R=h.normalize(h.cross(G,k,R),R),_=!1}h.equalsEpsilon(k,V,D.EPSILON10)&&(_=!0)}(t.tangent||t.bitangent)&&(L=g.geodeticSurfaceNormal(V,L),t.tangent&&(O=h.normalize(h.cross(L,R,O),O)))}else R=g.geodeticSurfaceNormal(V,R),(t.tangent||t.bitangent)&&(y&&(nH=h.fromArray(x,I,nH),Wp=h.cross(h.UNIT_Z,nH,Wp),Wp=h.normalize($.multiplyByVector(w,Wp,Wp),Wp),t.bitangent&&(lS=h.normalize(h.cross(nH,Wp,lS),lS))),O=h.cross(h.UNIT_Z,R,O),O=h.normalize($.multiplyByVector(w,O,O),O),t.bitangent&&(L=h.normalize(h.cross(R,O,L),L)));t.normal&&(e.wall?(x[I+P]=R.x,x[B+P]=R.y,x[j+P]=R.z):u&&(x[I+P]=-R.x,x[B+P]=-R.y,x[j+P]=-R.z),(c&&!y||a)&&(x[I]=R.x,x[B]=R.y,x[j]=R.z)),i&&(a&&(R=g.geodeticSurfaceNormal(V,R)),v[I+P]=-R.x,v[B+P]=-R.y,v[j+P]=-R.z),t.tangent&&(e.wall?(T[I+P]=O.x,T[B+P]=O.y,T[j+P]=O.z):u&&(T[I+P]=-O.x,T[B+P]=-O.y,T[j+P]=-O.z),c&&(y?(T[I]=Wp.x,T[B]=Wp.y,T[j]=Wp.z):(T[I]=O.x,T[B]=O.y,T[j]=O.z))),t.bitangent&&(u&&(E[I+P]=L.x,E[B+P]=L.y,E[j+P]=L.z),c&&(y?(E[I]=lS.x,E[B]=lS.y,E[j]=lS.z):(E[I]=L.x,E[B]=L.y,E[j]=L.z))),I+=3}}t.st&&!l(o)&&(n.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:b})),t.normal&&(n.attributes.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:x})),t.tangent&&(n.attributes.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(n.attributes.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:E})),i&&(n.attributes.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:v}))}if(e.extrude&&l(e.offsetAttribute)){let f=r.length/3,d=new Uint8Array(f);if(e.offsetAttribute===mn.TOP)c&&u||a?d=d.fill(1,0,f/2):c&&(d=d.fill(1));else{let p=e.offsetAttribute===mn.NONE?0:1;d=d.fill(p)}n.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return n}var vge=[];function d$e(e,t,n,i,r,o,s,a,c,u){let f={walls:[]},d;if(s||a){let x=ni.createGeometryFromPositions(e,t,n,i,o,c,u),T=x.attributes.position.values,E=x.indices,v,S;if(s&&a){let I=T.concat(T);v=I.length/3,S=je.createTypedArray(v,E.length*2),S.set(E);let R=E.length,O=v/2;for(d=0;d<R;d+=3){let L=S[d]+O,_=S[d+1]+O,C=S[d+2]+O;S[d+R]=C,S[d+1+R]=_,S[d+2+R]=L}if(x.attributes.position.values=I,o&&c.normal){let L=x.attributes.normal.values;x.attributes.normal.values=new Float32Array(I.length),x.attributes.normal.values.set(L)}if(c.st&&l(n)){let L=x.attributes.st.values;x.attributes.st.values=new Float32Array(v*2),x.attributes.st.values=L.concat(L)}x.indices=S}else if(a){for(v=T.length/3,S=je.createTypedArray(v,E.length),d=0;d<E.length;d+=3)S[d]=E[d+2],S[d+1]=E[d+1],S[d+2]=E[d];x.indices=S}f.topAndBottom=new Ft({geometry:x})}let p=r.outerRing,g=Vs.fromPoints(p,e),m=g.projectPointsOntoPlane(p,vge),y=fi.computeWindingOrder2D(m);y===ea.CLOCKWISE&&(p=p.slice().reverse());let A=ni.computeWallGeometry(p,n,e,i,o,u);f.walls.push(new Ft({geometry:A}));let b=r.holes;for(d=0;d<b.length;d++){let x=b[d];m=g.projectPointsOntoPlane(x,vge),y=fi.computeWindingOrder2D(m),y===ea.COUNTER_CLOCKWISE&&(x=x.slice().reverse()),A=ni.computeWallGeometry(x,n,e,i,o,u),f.walls.push(new Ft({geometry:A}))}return f}function Vd(e){let t=e.polygonHierarchy,n=e.vertexFormat??Be.DEFAULT,i=e.ellipsoid??ee.default,r=e.granularity??D.RADIANS_PER_DEGREE,o=e.stRotation??0,s=e.textureCoordinates,a=e.perPositionHeight??!1,c=a&&l(e.extrudedHeight),u=e.height??0,f=e.extrudedHeight??u;if(!c){let d=Math.max(u,f);f=Math.min(u,f),u=d}this._vertexFormat=Be.clone(n),this._ellipsoid=ee.clone(i),this._granularity=r,this._stRotation=o,this._height=u,this._extrudedHeight=f,this._closeTop=e.closeTop??!0,this._closeBottom=e.closeBottom??!0,this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=c,this._shadowVolume=e.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=e.arcType??ln.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=ni.computeHierarchyPackedLength(t,h)+ee.packedLength+Be.packedLength+(s?ni.computeHierarchyPackedLength(s,U):1)+12}Vd.fromPositions=function(e){e=e??H.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new Vd(t)};Vd.pack=function(e,t,n){return n=n??0,n=ni.packPolygonHierarchy(e._polygonHierarchy,t,n,h),ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=e._offsetAttribute??-1,t[n++]=e._arcType,l(e._textureCoordinates)?n=ni.packPolygonHierarchy(e._textureCoordinates,t,n,U):t[n++]=-1,t[n]=e.packedLength,t};var h$e=ee.clone(ee.UNIT_SPHERE),m$e=new Be,p$e={polygonHierarchy:{}};Vd.unpack=function(e,t,n){t=t??0;let i=ni.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let r=ee.unpack(e,t,h$e);t+=ee.packedLength;let o=Be.unpack(e,t,m$e);t+=Be.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++]===1,d=e[t++]===1,p=e[t++]===1,g=e[t++]===1,m=e[t++]===1,y=e[t++],A=e[t++],b=e[t]===-1?void 0:ni.unpackPolygonHierarchy(e,t,U);l(b)?(t=b.startingIndex,delete b.startingIndex):t++;let x=e[t];return l(n)||(n=new Vd(p$e)),n._polygonHierarchy=i,n._ellipsoid=ee.clone(r,n._ellipsoid),n._vertexFormat=Be.clone(o,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=u,n._perPositionHeightExtrude=f,n._perPositionHeight=d,n._closeTop=p,n._closeBottom=g,n._shadowVolume=m,n._offsetAttribute=y===-1?void 0:y,n._arcType=A,n._textureCoordinates=b,n.packedLength=x,n};var g$e=new U,_$e=new U,y$e=new al;function Sge(e,t,n,i,r,o){let s=e.longitude,a=s>=0?s:s+D.TWO_PI;r.westOverIdl=Math.min(r.westOverIdl,a),r.eastOverIdl=Math.max(r.eastOverIdl,a),o.west=Math.min(o.west,s),o.east=Math.max(o.east,s);let c=e.getLatitude(n),u=c;if(o.south=Math.min(o.south,c),o.north=Math.max(o.north,c),i!==ln.RHUMB){let p=U.subtract(t.position,e.position,g$e),g=U.dot(t.position,p)/U.dot(p,p);if(g>0&&g<1){let m=U.add(t.position,U.multiplyByScalar(p,-g,p),_$e),y=al.clone(t,y$e);y.position=m;let A=y.getLatitude(n);o.south=Math.min(o.south,A),o.north=Math.max(o.north,A),Math.abs(c)>Math.abs(A)&&(u=A)}}let f=t.x*e.y-e.x*t.y,d=Math.sign(f);d!==0&&(d*=U.angleBetween(t.position,e.position)),u>=0&&(r.northAngle+=d),u<=0&&(r.southAngle+=d)}var wge=new al,A$e=new al,zd={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Vd.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ie),e.length<3)return i;i.west=Number.POSITIVE_INFINITY,i.east=Number.NEGATIVE_INFINITY,i.south=Number.POSITIVE_INFINITY,i.north=Number.NEGATIVE_INFINITY,zd.northAngle=0,zd.southAngle=0,zd.westOverIdl=Number.POSITIVE_INFINITY,zd.eastOverIdl=Number.NEGATIVE_INFINITY;let r=e.length,o=al.fromCartesian(e[0],A$e);for(let s=1;s<r;s++){let a=al.fromCartesian(e[s],wge);Sge(a,o,t,n,zd,i),o=al.clone(a,o)}return Sge(al.fromCartesian(e[0],wge),o,t,n,zd,i),i.east-i.west>zd.eastOverIdl-zd.westOverIdl&&(i.west=zd.westOverIdl,i.east=zd.eastOverIdl,i.east>D.PI&&(i.east=i.east-D.TWO_PI),i.west>D.PI&&(i.west=i.west-D.TWO_PI)),D.equalsEpsilon(Math.abs(zd.northAngle),D.TWO_PI,D.EPSILON10)&&(i.north=D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),D.equalsEpsilon(Math.abs(zd.southAngle),D.TWO_PI,D.EPSILON10)&&(i.south=-D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),i};var b$e=new al;function x$e(e,t,n){return e.height>=D.PI||e.width>=D.PI?al.fromCartesian(t[0],b$e).tangentPlane:Vs.fromPoints(t,n)}var Ige=new he;function T$e(e,t,n){return(i,r)=>{if(e.height>=D.PI||e.width>=D.PI){if(e.south<0&&e.north>0){l(r)||(r=[]);for(let s=0;s<i.length;++s){let a=n.cartesianToCartographic(i[s],Ige);r[s]=new U(a.longitude/D.PI,a.latitude/D.PI_OVER_TWO)}return r.length=i.length,r}return al.fromCartesianArray(i,r)}return Vs.fromPoints(t,n).projectPointsOntoPlane(i,r)}}function E$e(e,t,n){if(e.height>=D.PI||e.width>=D.PI)return(r,o)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(r,Ige);return l(o)||(o=new U),o.x=s.longitude/D.PI,o.y=s.latitude/D.PI_OVER_TWO,o}return al.fromCartesian(r,o)};let i=Vs.fromPoints(t,n);return(r,o)=>i.projectPointsOntoPlane(r,o)}function C$e(e,t,n,i){return(r,o)=>!i&&(e.height>=D.PI_OVER_TWO||e.width>=2*D.PI_OVER_THREE)?ni.splitPolygonsOnEquator(r,t,n,o):r}function v$e(e,t,n,i){if(t.height>=D.PI||t.width>=D.PI)return et.fromRectangle(t,void 0,Ege);let r=e,o=Vs.fromPoints(r,n);return ni.computeBoundingRectangle(o.plane.normal,o.projectPointOntoPlane.bind(o),r,i,Ege)}Vd.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,r=e._stRotation,o=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,u=e._arcType,f=e._textureCoordinates,d=l(f),p=o.positions;if(p.length<3)return;let g=e.rectangle,m=ni.polygonsFromHierarchy(o,d,T$e(g,p,n),!s,n,C$e(g,n,u,s)),y=m.hierarchy,A=m.polygons,b=function(P){return P},x=d?ni.polygonsFromHierarchy(f,!0,b,!1,n).polygons:void 0;if(y.length===0)return;let T=y[0].outerRing,E=v$e(T,g,n,r),v=[],S=e._height,I=e._extrudedHeight,R=e._perPositionHeightExtrude||!D.equalsEpsilon(S,I,0,D.EPSILON2),O={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:x$e(g,T,n).plane.normal,projectTo2d:E$e(g,T,n),boundingRectangle:E,ellipsoid:n,stRotation:r,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},L;if(R)for(O.extrude=!0,O.top=a,O.bottom=c,O.shadowVolume=e._shadowVolume,O.offsetAttribute=e._offsetAttribute,L=0;L<A.length;L++){let P=d$e(n,A[L],d?x[L]:void 0,i,y[L],s,a,c,t,u),M;a&&c?(M=P.topAndBottom,O.geometry=ni.scaleToGeodeticHeightExtruded(M.geometry,S,I,n,s)):a?(M=P.topAndBottom,M.geometry.attributes.position.values=fi.scaleToGeodeticHeight(M.geometry.attributes.position.values,S,n,!s),O.geometry=M.geometry):c&&(M=P.topAndBottom,M.geometry.attributes.position.values=fi.scaleToGeodeticHeight(M.geometry.attributes.position.values,I,n,!0),O.geometry=M.geometry),(a||c)&&(O.wall=!1,M.geometry=Y$(O),v.push(M));let F=P.walls;O.wall=!0;for(let V=0;V<F.length;V++){let B=F[V];O.geometry=ni.scaleToGeodeticHeightExtruded(B.geometry,S,I,n,s),B.geometry=Y$(O),v.push(B)}}else for(L=0;L<A.length;L++){let P=new Ft({geometry:ni.createGeometryFromPositions(n,A[L],d?x[L]:void 0,i,s,t,u)});if(P.geometry.attributes.position.values=fi.scaleToGeodeticHeight(P.geometry.attributes.position.values,S,n,!s),O.geometry=P.geometry,P.geometry=Y$(O),l(e._offsetAttribute)){let M=P.geometry.attributes.position.values.length,F=e._offsetAttribute===mn.NONE?0:1,V=new Uint8Array(M/3).fill(F);P.geometry.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}v.push(P)}let _=Gn.combineInstances(v)[0];_.attributes.position.values=new Float64Array(_.attributes.position.values),_.indices=je.createTypedArray(_.attributes.position.values.length/3,_.indices);let C=_.attributes,w=ue.fromVertices(C.position.values);return t.position||delete C.position,new St({attributes:C,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:w,offsetAttribute:e._offsetAttribute})};Vd.createShadowVolume=function(e,t,n){let i=e._granularity,r=e._ellipsoid,o=t(i,r),s=n(i,r);return new Vd({polygonHierarchy:e._polygonHierarchy,ellipsoid:r,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:o,height:s,vertexFormat:Be.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function S$e(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,r=e.rectangle;return St._textureCoordinateRotationPoints(i,t,n,r)}Object.defineProperties(Vd.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=Vd.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=S$e(this)),this._textureCoordinateRotationPoints}}});var qp=Vd;function uS(e){this._ellipsoid=e.ellipsoid??ee.default,this._positions=iH(e.positions),this._holes=l(e.holes)?e.holes.map(iH):[],this._rectangle=qp.computeRectangleFromPositions(this._positions,this._ellipsoid),X$(this._positions),Pge(this._holes)}function iH(e){if(!l(e))return;let t=e.length,n=Array(t);for(let i=0;i<t;i++)n[i]=h.clone(e[i]);return n}function X$(e){for(let t=0;t<e.length;t++)Object.freeze(e[t]);return Object.freeze(e)}function Pge(e){for(let t=0;t<e.length;t++)X$(e[t]);return Object.freeze(e)}function w$e(e,t){if(!l(e)&&!l(t))return!0;if(l(e)!==l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++){let r=e[i],o=t[i];if(!h.equals(r,o))return!1}return!0}function I$e(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!w$e(e[n],t[n]))return!1;return!0}Object.defineProperties(uS.prototype,{length:{get:function(){let e=this._positions.length,t=this._holes;for(let n=0;n<t.length;n++)e+=t[n].length;return e}},positions:{get:function(){return this._positions}},holes:{get:function(){return this._holes}},ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}}});uS.clone=function(e,t){return l(t)?(t._ellipsoid=e.ellipsoid,t._positions=iH(e.positions),t._holes=e.holes.map(iH),t._rectangle=qp.computeRectangleFromPositions(t._positions,t._ellipsoid),X$(t._positions),Pge(t._holes),t):new uS({positions:e.positions,holes:e.holes,ellipsoid:e.ellipsoid})};uS.equals=function(e,t){return e.ellipsoid.equals(t.ellipsoid)&&e.positions===t.positions&&I$e(e.holes,t.holes)};uS.prototype.computeRectangle=function(e){return qr("ClippingPolygon.computeRectangle","ClippingPolygon.computeRectangle is deprecated as of CesiumJS 1.145 and will be removed in 1.147. Use the ClippingPolygon.rectangle property instead."),ie.clone(this._rectangle,e)};var fS=uS;var Dge={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Object.freeze(Dge);var Fi=Dge;var TN=class TN{constructor(t=H.EMPTY_OBJECT){ut(this,"_renderContext",null);this.show=t.show??!0,this._heightReference=t.heightReference??We.NONE,this._blendOption=t.blendOption??Fi.TRANSLUCENT,this._modelMatrix=N.clone(t.modelMatrix??N.IDENTITY),this._boundingVolume=ue.clone(t.boundingVolume??new ue,new ue),this._boundingVolumeAutoUpdate=!l(t.boundingVolume),this._allowPicking=t.allowPicking??!1,this._pickIds=new Map,this._customPickObjects=[],this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._primitiveCount=0,this._primitiveCountMax=t.primitiveCountMax??TN.DEFAULT_CAPACITY,this._primitiveView=null,this._positionCount=0,this._positionCountMax=t.vertexCountMax??TN.DEFAULT_CAPACITY,this._positionView=null,this._positionDatatype=t.positionDatatype??Y.DOUBLE,this._positionNormalized=t.positionNormalized??!1,this._materialView=null,this._dirtyOffset=0,this._dirtyCount=0,this._dirtyBoundingVolume=!1,this._version=0,this._allocatePrimitiveBuffer(),this._allocatePositionBuffer(),this._allocateMaterialBuffer()}_getCollectionClass(){pe.throwInstantiationError()}_getPrimitiveClass(){pe.throwInstantiationError()}_getMaterialClass(){pe.throwInstantiationError()}_allocatePrimitiveBuffer(){let t=this._getPrimitiveClass().Layout;this._primitiveView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.__BYTE_LENGTH))}_allocatePositionBuffer(){this._positionView=Y.createTypedArray(this._positionDatatype,this._positionCountMax*3)}_allocateMaterialBuffer(){let t=this._getMaterialClass();this._materialView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.packedLength))}isDestroyed(){return!1}destroy(){this._customPickObjects.length=0;for(let t of this._pickIds.values())for(let n of t)n.destroy();l(this._renderContext)&&(this._renderContext.destroy(),this._renderContext=void 0,this._dirtyOffset=0,this._dirtyCount=this.primitiveCount)}sort(t,n=new Uint32Array(this.primitiveCount)){let i=this._getPrimitiveClass(),r=this._getCollectionClass(),{primitiveCount:o}=this,s=new i,a=new i,c=new Uint32Array(o);for(let f=0;f<o;f++)c[f]=f;c.sort((f,d)=>t(this.get(f,s),this.get(d,a)));for(let f=0;f<o;f++)n[c[f]]=f;let u=this._cloneEmpty();for(let f=0;f<o;f++){let d=this.get(c[f],s),p=u.add({},a);i.clone(d,p)}return r._replaceBuffers(u,this),this._dirtyOffset=0,this._dirtyCount=o,n}static clone(t,n,i){if(l(i))return this._cloneFiltered(t,n,i);let r=t._getPrimitiveClass().Layout,o=t._getMaterialClass(),s=t._getPrimitiveClass();this._copySubDataView(t._primitiveView,n._primitiveView,t.primitiveCount*r.__BYTE_LENGTH),this._copySubArray(t._positionView,n._positionView,t.vertexCount*3),this._copySubDataView(t._materialView,n._materialView,t.primitiveCount*o.packedLength),n._primitiveCount=t._primitiveCount,n._positionCount=t._positionCount;let a=t._customPickObjects,c=n._customPickObjects;c.length=0;let u=new s;for(let f=0,d=n.primitiveCount;f<d;f++)c[f]=a[f],n.get(f,u)._pickId=0;return n._dirtyOffset=0,n._dirtyCount=n.primitiveCount,t.boundingVolume.clone(n.boundingVolume),n}static _cloneFiltered(t,n,i){let r=t._getPrimitiveClass(),o=new r,s=new r,a=t._customPickObjects,c=n._customPickObjects;c.length=0;for(let u=0,f=t._primitiveCount;u<f;u++){if(t.get(u,o),!i(o,u))continue;let d=n._primitiveCount;r.clone(o,n.add({},s)),l(a[u])&&(c[d]=a[u])}return n}static fromCollection(t,n=H.EMPTY_OBJECT,i){let r=t._cloneEmpty(n);return t._getCollectionClass().clone(t,r,i),r}_cloneEmptyBaseArgs(t){return{primitiveCountMax:this.primitiveCountMax,vertexCountMax:this.vertexCountMax,positionDatatype:this.positionDatatype,positionNormalized:this.positionNormalized,modelMatrix:this._modelMatrix,show:this.show,debugShowBoundingVolume:this.debugShowBoundingVolume,blendOption:this._blendOption,allowPicking:this._allowPicking,boundingVolume:this._boundingVolumeAutoUpdate?void 0:this._boundingVolume,...t}}_cloneEmpty(t){pe.throwInstantiationError()}static _replaceBuffers(t,n){n._primitiveView=t._primitiveView,n._positionView=t._positionView,n._materialView=t._materialView}_updateBoundingVolume(){let t=this._positionView.subarray(0,this._positionCount*3);this._positionNormalized&&(t=cn.dequantize(t,this._positionDatatype,Vt.VEC3,this._positionCount)),ue.fromVertices(t,h.ZERO,3,this._boundingVolume),ue.transform(this._boundingVolume,this._modelMatrix,this._boundingVolume),this._dirtyBoundingVolume=!1}_updatePickIds(t){let n=this._pickIds.get(t);if(n&&n.length===this._primitiveCount)return;n||(n=[],this._pickIds.set(t,n));let i=this,r=this._getPrimitiveClass(),o=new r;for(let s=n.length,a=this._primitiveCount;s<a;s++){this.get(s,o);let c=this._customPickObjects[s]||{collection:this,index:s,get primitive(){return i.get(s,new r)}},u=t.createPickId(c);o._pickId=u.key,n.push(u)}}get(t,n){return n._collection=this,n._index=t,n._byteOffset=t*this._getPrimitiveClass().Layout.__BYTE_LENGTH,n}add(t=H.EMPTY_OBJECT,n){let i=this._getMaterialClass(),r=this._primitiveCount++;return n=this.get(r,n),n.featureId=t.featureId??r,n.show=t.show??!0,n.setMaterial(t.material??i.DEFAULT_MATERIAL),n._pickId=0,n._dirty=!0,l(t.pickObject)&&(this._customPickObjects[r]=t.pickObject),n}_makeDirty(t){this._dirtyCount===0?(this._dirtyCount=1,this._dirtyOffset=t):t<this._dirtyOffset?(this._dirtyCount+=this._dirtyOffset-t,this._dirtyOffset=t):t+1>this._dirtyOffset+this._dirtyCount&&(this._dirtyCount=t+1-this._dirtyOffset)}_makeClean(){this._dirtyCount>0&&(this._dirtyCount=0,this._dirtyOffset=0,this._version++)}_makeDirtyBoundingVolume(){this._boundingVolumeAutoUpdate&&(this._dirtyBoundingVolume=!0)}update(t){t.mode!==re.SCENE3D&&_t("bufferprim-scenemode","BufferPrimitiveCollection requires SceneMode.SCENE3D."),this._dirtyBoundingVolume&&this._updateBoundingVolume(),this._allowPicking&&this._updatePickIds(t.context)}_isRendered(t){let n=t.passes;return this.show&&!_s(this._heightReference)&&(n.render||n.pick)}get primitiveCount(){return this._primitiveCount}get primitiveCountMax(){return this._primitiveCountMax}get byteLength(){return this._primitiveView.byteLength+this._positionView.byteLength+this._materialView.byteLength}get vertexCount(){return this._positionCount}get vertexCountMax(){return this._positionCountMax}get modelMatrix(){return this._modelMatrix}get boundingVolume(){return this._dirtyBoundingVolume&&this._updateBoundingVolume(),this._boundingVolume}get positionDatatype(){return this._positionDatatype}get positionNormalized(){return this._positionNormalized}get heightReference(){return this._heightReference}static _copySubArray(t,n,i){for(let r=0;r<i;r++)n[r]=t[r]}static _copySubDataView(t,n,i){this._copySubArray(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(n.buffer,n.byteOffset,n.byteLength/4),i/4)}toJSON(){let t=this._getPrimitiveClass(),n=new t,i=[];for(let r=0,o=this.primitiveCount;r<o;r++)i.push(this.get(r,n).toJSON());return i}};ut(TN,"Error",{ERR_RESIZE:"BufferPrimitive range cannot be resized after initialization.",ERR_CAPACITY:"BufferPrimitiveCollection capacity exceeded.",ERR_MULTIPLE_OF_FOUR:"BufferPrimitive byte length must be a multiple of 4.",ERR_OUT_OF_RANGE:"BufferPrimitive buffer access out of range."});var rH=TN;rH.DEFAULT_CAPACITY=1024;var ra=rH;var cm=class cm{constructor(){ut(this,"_collection",null);ut(this,"_index",-1);ut(this,"_byteOffset",-1)}static clone(t,n){let i=t._collection._getMaterialClass();return n.featureId=t.featureId,n.show=t.show,n.setMaterial(t.getMaterial(new i)),n}_isResizable(){return this._index===this._collection.primitiveCount-1}get featureId(){return this._getUint32(cm.Layout.FEATURE_ID_U32)}set featureId(t){this._setUint32(cm.Layout.FEATURE_ID_U32,t)}get show(){return this._getUint8(cm.Layout.SHOW_U8)===1}set show(t){this._setUint8(cm.Layout.SHOW_U8,t?1:0)}getMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.unpack(n._materialView,this._index*i.packedLength,t)}setMaterial(t){let n=this._collection,i=n._getMaterialClass();return i.pack(t,n._materialView,this._index*i.packedLength),this._dirty=!0,t}get _dirty(){return this._getUint8(cm.Layout.DIRTY_U8)===1}set _dirty(t){this._collection._primitiveView.setUint8(this._byteOffset+cm.Layout.DIRTY_U8,t?1:0),t&&this._collection._makeDirty(this._index)}get _pickId(){return this._getUint32(cm.Layout.PICK_ID_U32)}set _pickId(t){this._setUint32(cm.Layout.PICK_ID_U32,t)}_getUint8(t){return this._collection._primitiveView.getUint8(this._byteOffset+t)}_setUint8(t,n){this._collection._primitiveView.setUint8(this._byteOffset+t,n),this._dirty=!0}_getUint32(t){return this._collection._primitiveView.getUint32(this._byteOffset+t,!0)}_setUint32(t,n){this._collection._primitiveView.setUint32(this._byteOffset+t,n,!0),this._dirty=!0}_getFloat32(t){return this._collection._primitiveView.getFloat32(this._byteOffset+t,!0)}_setFloat32(t,n){this._collection._primitiveView.setFloat32(this._byteOffset+t,n,!0),this._dirty=!0}toJSON(){let n=this._collection._getMaterialClass();return{featureId:this.featureId,show:this.show,dirty:this._dirty,material:this.getMaterial(new n).toJSON()}}};ut(cm,"Layout",{FEATURE_ID_U32:0,SHOW_U8:4,DIRTY_U8:5,PICK_ID_U32:8,__BYTE_LENGTH:12});var K$=cm,ss=K$;var{ERR_CAPACITY:d1n,ERR_RESIZE:h1n,ERR_OUT_OF_RANGE:m1n}=ra.Error,jd=class jd extends ss{constructor(){super(...arguments);ut(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i.setHoles(n.getHoles()),i.setTriangles(n.getTriangles()),i}get vertexOffset(){return this._getUint32(jd.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(jd.Layout.POSITION_COUNT_U32)}getPositions(n){return this._getPositionsRange(0,this.vertexCount,n)}setPositions(n){let i=this._collection,r=this.vertexOffset,o=this.vertexCount,s=n.length/3,a=i.vertexCount+s-o;i._positionCount=a,this._setUint32(jd.Layout.POSITION_COUNT_U32,s);let c=i._positionView;for(let u=0;u<s;u++)c[(r+u)*3]=n[u*3],c[(r+u)*3+1]=n[u*3+1],c[(r+u)*3+2]=n[u*3+2];this._dirty=!0,i._makeDirtyBoundingVolume()}get outerVertexOffset(){return this.vertexOffset}get outerVertexCount(){return this.holeCount>0?this.getHoles()[0]:this.vertexCount}getOuterPositions(n){return this._getPositionsRange(0,this.outerVertexCount,n)}get holeOffset(){return this._getUint32(jd.Layout.HOLE_OFFSET_U32)}get holeCount(){return this._getUint32(jd.Layout.HOLE_COUNT_U32)}getHoles(n){let{holeOffset:i,holeCount:r}=this,o=this._collection._holeIndexView;if(!l(n)){let s=o.byteOffset+i*o.BYTES_PER_ELEMENT,a=o.constructor;return new a(o.buffer,s,r)}for(let s=0;s<r;s++)n[s]=o[i+s];return n}setHoles(n){let i=this._collection,r=this.holeOffset,o=this.holeCount,s=n.length,a=i.holeCount+s-o;i._holeCount=a,this._setUint32(jd.Layout.HOLE_COUNT_U32,s);let c=i._holeIndexView;for(let u=0;u<s;u++)c[r+u]=n[u];this._dirty=!0}getHoleVertexCount(n){let i=this.getHoles(),r=i[n];return n===i.length-1?this.vertexCount-r:i[n+1]-r}getHolePositions(n,i){let o=this.getHoles()[n],s=this.getHoleVertexCount(n);return this._getPositionsRange(o,s,i)}_getPositionsRange(n,i,r){let o=this._collection,s=this._collection._positionView,a=this.vertexOffset+n;if(!l(r)){let c=s.byteOffset+a*3*s.BYTES_PER_ELEMENT,u=s.constructor;return new u(s.buffer,c,i*3)}for(let c=0;c<i;c++)r[c*3]=s[(a+c)*3],r[c*3+1]=s[(a+c)*3+1],r[c*3+2]=s[(a+c)*3+2];return r}get triangleOffset(){return this._getUint32(jd.Layout.TRIANGLE_OFFSET_U32)}get triangleCount(){return this._getUint32(jd.Layout.TRIANGLE_COUNT_U32)}getTriangles(n){let{triangleOffset:i,triangleCount:r}=this,o=this._collection._triangleIndexView;if(!l(n)){let s=o.byteOffset+i*3*o.BYTES_PER_ELEMENT,a=o.constructor;return new a(o.buffer,s,r*3)}for(let s=0;s<r;s++)n[s*3]=o[(i+s)*3],n[s*3+1]=o[(i+s)*3+1],n[s*3+2]=o[(i+s)*3+2];return n}setTriangles(n){let i=this._collection,r=this.triangleOffset,o=this.triangleCount,s=n.length/3,a=i.triangleCount+s-o;i._triangleCount+=s-o,this._setUint32(jd.Layout.TRIANGLE_COUNT_U32,s);let c=i._triangleIndexView;for(let u=0;u<s;u++)c[(r+u)*3]=n[u*3],c[(r+u)*3+1]=n[u*3+1],c[(r+u)*3+2]=n[u*3+2];this._dirty=!0}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions()),holes:Array.from(this.getHoles()),triangles:Array.from(this.getTriangles())}}};ut(jd,"Layout",{...ss.Layout,POSITION_OFFSET_U32:ss.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ss.Layout.__BYTE_LENGTH+4,HOLE_OFFSET_U32:ss.Layout.__BYTE_LENGTH+8,HOLE_COUNT_U32:ss.Layout.__BYTE_LENGTH+12,TRIANGLE_OFFSET_U32:ss.Layout.__BYTE_LENGTH+16,TRIANGLE_COUNT_U32:ss.Layout.__BYTE_LENGTH+20,__BYTE_LENGTH:ss.Layout.__BYTE_LENGTH+24});var $$=jd,Mo=$$;var EN=`#ifdef USE_FLOAT64
in vec3 positionHigh;
in vec3 positionLow;
#else
in vec3 position;
#endif
in vec4 pickColor;
in vec3 showColorAlpha;
out vec4 v_pickColor;
out vec4 v_color;
void main()
{
float show = showColorAlpha.x;
vec4 color = czm_decodeRGB8(showColorAlpha.y);
float alpha = showColorAlpha.z;
#ifdef USE_FLOAT64
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
#else
vec4 positionEC = czm_modelView * vec4(position, 1.0);
#endif
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= alpha * show;
gl_Position *= show;
}
`;var CN=`in vec4 v_pickColor;
in vec4 v_color;
void main()
{
if (v_color.a < 0.005)
{
discard;
}
out_FragColor = czm_gammaCorrect(v_color);
czm_writeLogDepth();
}
`;var vN=class{constructor(t=H.EMPTY_OBJECT){this.color=z.clone(t.color??z.WHITE),this.outlineColor=z.clone(t.outlineColor??z.WHITE),this.outlineWidth=t.outlineWidth??0}static get packedLength(){return this.Layout.__BYTE_LENGTH}static pack(t,n,i){n.setUint32(this.Layout.COLOR_U32+i,t.color.toRgba(),!0),n.setUint32(this.Layout.OUTLINE_COLOR_U32+i,t.outlineColor.toRgba(),!0),n.setUint8(this.Layout.OUTLINE_WIDTH_U8+i,t.outlineWidth)}static unpack(t,n,i){return z.fromRgba(t.getUint32(this.Layout.COLOR_U32+n,!0),i.color),z.fromRgba(t.getUint32(this.Layout.OUTLINE_COLOR_U32+n,!0),i.outlineColor),i.outlineWidth=t.getUint8(this.Layout.OUTLINE_WIDTH_U8+n),i}toJSON(){return{color:this.color.toCssHexString(),outlineColor:this.outlineColor.toCssHexString(),outlineWidth:this.outlineWidth}}};ut(vN,"Layout",{COLOR_U32:0,OUTLINE_COLOR_U32:4,OUTLINE_WIDTH_U8:8,__BYTE_LENGTH:12}),ut(vN,"DEFAULT_MATERIAL");var Zl=vN;var oH=class oH extends Zl{constructor(t=H.EMPTY_OBJECT){super(t)}};ut(oH,"DEFAULT_MATERIAL",Object.freeze(new oH));var J$=oH,Of=J$;var Z$={positionHigh:0,positionLow:1,pickColor:2,showColorAlpha:3},Rge={position:0,pickColor:1,showColorAlpha:2},_a=new Mo,Q$=new Of,SN=new z,Oge=new h,eJ=new Sn;function P$e(e,t,n){let i=t.context;n=n||{destroy:R$e};let r=e._positionDatatype===Y.DOUBLE,o=r?Z$:Rge;if(!l(n.attributeArrays)||!l(n.indexArray)){let{vertexCountMax:c,triangleCountMax:u}=e;n.indexArray=je.createTypedArray(c,u*3),n.attributeArrays={...r?{positionHigh:new Float32Array(c*3),positionLow:new Float32Array(c*3)}:{position:e._positionView},pickColor:new Uint8Array(c*4),showColorAlpha:new Float32Array(c*3)}}if(e._dirtyCount>0){let{attributeArrays:c}=n,{_dirtyOffset:u,_dirtyCount:f}=e,d=c.positionHigh,p=c.positionLow,g=n.indexArray,m=c.pickColor,y=c.showColorAlpha;for(let A=u,b=u+f;A<b;A++){if(e.get(A,_a),!_a._dirty)continue;let x=_a.triangleOffset,T=_a.vertexOffset,E=_a.getTriangles();for(let R=0,O=_a.triangleCount;R<O;R++)g[x*3]=T+E[R*3],g[x*3+1]=T+E[R*3+1],g[x*3+2]=T+E[R*3+2],x++;let v=_a.show,S=r?_a.getPositions():null;_a.getMaterial(Q$);let I=cn.encodeRGB8(Q$.color);z.fromRgba(_a._pickId,SN);for(let R=0,O=_a.vertexCount;R<O;R++)r&&(h.fromArray(S,R*3,Oge),Sn.fromCartesian(Oge,eJ),h.pack(eJ.high,d,T*3),h.pack(eJ.low,p,T*3)),m[T*4]=z.floatToByte(SN.red),m[T*4+1]=z.floatToByte(SN.green),m[T*4+2]=z.floatToByte(SN.blue),m[T*4+3]=z.floatToByte(SN.alpha),y[T*3]=v?1:0,y[T*3+1]=I,y[T*3+2]=Q$.color.alpha,T++;_a._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:u,vertexOffset:f,vertexCount:d}=D$e(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,u);for(let p in o)if(Object.hasOwn(o,p)){let g=p;n.vertexArray.copyAttributeFromRange(o[g],n.attributeArrays[g],f,d)}}}else{let{attributeArrays:c}=n;n.vertexArray=new zn({context:i,indexBuffer:nt.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Me.STATIC_DRAW,indexDatatype:je.fromTypedArray(n.indexArray)}),attributes:[...r?[{index:Z$.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Me.STATIC_DRAW})},{index:Z$.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Me.STATIC_DRAW})}]:[{index:Rge.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:nt.createVertexBuffer({typedArray:c.position,context:i,usage:Me.STATIC_DRAW})}],{index:o.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:nt.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Me.STATIC_DRAW})},{index:o.showColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.showColorAlpha,context:i,usage:Me.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ge.fromCache({blending:e._blendOption===Fi.OPAQUE?tn.DISABLED:tn.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=en.fromCache({context:i,vertexShaderSource:new Ye({sources:[EN],defines:r?["USE_FLOAT64"]:[]}),fragmentShaderSource:new Ye({sources:[CN]}),attributeLocations:o}));let s=e.triangleCount*3;l(n.command)||(n.command=new at({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Oe.TRIANGLES,pass:e._blendOption===Fi.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:s,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let a=n.command;return a.count!==s&&(a.count=s),a.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(a.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(a),e._makeClean(),n}function D$e(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,_a);let i=_a.vertexOffset,r=_a.triangleOffset*3;e.get(t+n-1,_a);let o=_a.vertexOffset+_a.vertexCount-i,s=(_a.triangleOffset+_a.triangleCount)*3-r;return{indexOffset:r,indexCount:s,vertexOffset:i,vertexCount:o}}function R$e(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ge.removeFromCache(e.renderState)}var wN=P$e;var{ERR_CAPACITY:iRn}=ra.Error,tJ=class e extends ra{constructor(t=H.EMPTY_OBJECT){super(t),this._holeCount=0,this._holeCountMax=t.holeCountMax??ra.DEFAULT_CAPACITY,this._holeIndexView=null,this._triangleCount=0,this._triangleCountMax=t.triangleCountMax??ra.DEFAULT_CAPACITY,this._triangleIndexView=null,this._allocateHoleIndexBuffer(),this._allocateTriangleIndexBuffer()}_getCollectionClass(){return e}_getPrimitiveClass(){return Mo}_getMaterialClass(){return Of}_allocateHoleIndexBuffer(){this._holeIndexView=je.createTypedArray(this._positionCountMax,this._holeCountMax)}_allocateTriangleIndexBuffer(){this._triangleIndexView=je.createTypedArray(this._positionCountMax,this._triangleCountMax*3)}static clone(t,n,i){return super.clone(t,n,i),l(i)||(this._copySubArray(t._holeIndexView,n._holeIndexView,t.holeCount),this._copySubArray(t._triangleIndexView,n._triangleIndexView,t._triangleCount*3),n._holeCount=t._holeCount,n._triangleCount=t._triangleCount),n}static fromCollection(t,n,i){return super.fromCollection(t,n,i)}_cloneEmpty(t=H.EMPTY_OBJECT){return new e({holeCountMax:this.holeCountMax,triangleCountMax:this.triangleCountMax,...this._cloneEmptyBaseArgs(t)})}static _replaceBuffers(t,n){super._replaceBuffers(t,n),n._holeIndexView=t._holeIndexView,n._triangleIndexView=t._triangleIndexView}add(t,n=new Mo){super.add(t,n);let i=this._positionCount;n._setUint32(Mo.Layout.POSITION_OFFSET_U32,i),n._setUint32(Mo.Layout.POSITION_COUNT_U32,0);let r=this._holeCount;n._setUint32(Mo.Layout.HOLE_OFFSET_U32,r),n._setUint32(Mo.Layout.HOLE_COUNT_U32,0);let o=this._triangleCount;return n._setUint32(Mo.Layout.TRIANGLE_OFFSET_U32,o),n._setUint32(Mo.Layout.TRIANGLE_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),l(t.holes)&&n.setHoles(t.holes),l(t.triangles)&&n.setTriangles(t.triangles),n}update(t){super.update(t),this._isRendered(t)&&(this._renderContext=wN(this,t,this._renderContext))}get byteLength(){return super.byteLength+this._holeIndexView.byteLength+this._triangleIndexView.byteLength}get holeCount(){return this._holeCount}get holeCountMax(){return this._holeCountMax}get triangleCount(){return this._triangleCount}get triangleCountMax(){return this._triangleCountMax}},Ua=tJ;var{ERR_RESIZE:cRn,ERR_CAPACITY:lRn}=ra.Error,dS=class dS extends ss{constructor(){super(...arguments);ut(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i}get vertexOffset(){return this._getUint32(dS.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(dS.Layout.POSITION_COUNT_U32)}getPositions(n){let{vertexOffset:i,vertexCount:r}=this,o=this._collection._positionView;if(!l(n)){let s=o.byteOffset+i*3*o.BYTES_PER_ELEMENT,a=o.constructor;return new a(o.buffer,s,r*3)}for(let s=0;s<r;s++)n[s*3]=o[(i+s)*3],n[s*3+1]=o[(i+s)*3+1],n[s*3+2]=o[(i+s)*3+2];return n}setPositions(n){let i=this._collection,r=this.vertexOffset,o=this.vertexCount,s=n.length/3,a=i._positionCount+s-o;i._positionCount=a,this._setUint32(dS.Layout.POSITION_COUNT_U32,s);let c=i._positionView;for(let u=0;u<s;u++)c[(r+u)*3]=n[u*3],c[(r+u)*3+1]=n[u*3+1],c[(r+u)*3+2]=n[u*3+2];this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions())}}};ut(dS,"Layout",{...ss.Layout,POSITION_OFFSET_U32:ss.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:ss.Layout.__BYTE_LENGTH+4,__BYTE_LENGTH:ss.Layout.__BYTE_LENGTH+8});var nJ=dS,ya=nJ;var IN=class IN extends Zl{constructor(t=H.EMPTY_OBJECT){super(t),this.width=t.width??1}static pack(t,n,i){super.pack(t,n,i),n.setFloat32(this.Layout.WIDTH_F32+i,t.width,!0)}static unpack(t,n,i){return super.unpack(t,n,i),i.width=t.getFloat32(this.Layout.WIDTH_F32+n,!0),i}toJSON(){return{...super.toJSON(),width:this.width}}};ut(IN,"Layout",{...Zl.Layout,WIDTH_F32:Zl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Zl.Layout.__BYTE_LENGTH+4}),ut(IN,"DEFAULT_MATERIAL",Object.freeze(new IN));var iJ=IN,Mf=iJ;var Mge=16,O$e=.35,Nge=new ya,M$e=new Mf,Lge=new Mo,N$e=new Of,L$e=new h,F$e=new h,B$e=new he,k$e=new U,U$e=new U,PN=new z,oJ=class{static packPolylineCollectionData(t,n,i){if(l(i)&&t._dirtyCount===0&&t._version===i.version)return i;let r=t.primitiveCount,o=t.boundingVolume,s=ie.fromBoundingSphere(o,n),a=jge(t,n),c=new Float32Array(r),u=new Uint8Array(r*4),f=new Uint8Array(r*4),d=t.widthUnits==="meters";for(let p=0;p<r;p++){let g=t.get(p,Nge),m=g.getMaterial(M$e);c[p]=d?-m.width:m.width,u[p*4]=z.floatToByte(m.color.red),u[p*4+1]=z.floatToByte(m.color.green),u[p*4+2]=z.floatToByte(m.color.blue),u[p*4+3]=z.floatToByte(m.color.alpha),Fge(f,p,g._pickId)}return Object.assign(i??{},{version:t._version,rectangle:s,positions:a,widths:c,widthInMeters:d,colors:u,pickColors:f})}static packPolylineSegments(t,n,i,r){r.polylineSegments??(r.polylineSegments=[]),r.widths??(r.widths=[]),r.colors??(r.colors=[]),r.pickColors??(r.pickColors=[]),r.polylineSegmentPrimitiveIndices??(r.polylineSegmentPrimitiveIndices=[]),r.primitiveCount??(r.primitiveCount=0),r.rectangle??(r.rectangle=ie.clone(i));let o=i.width,s=t.primitiveCount,a=n.positions;for(let c=0;c<s;c++){let u=t.get(c,Nge);if(!u.show)continue;let f=u.vertexCount,d=u.vertexOffset,p=Math.max(D.EPSILON3,Bge(n.widths[c],r));for(let g=0;g+1<f;g++){let m=U.fromArray(a,(d+g)*2,k$e),y=U.fromArray(a,(d+g+1)*2,U$e);z$e(m,y,i,o),V$e(m,y,p)&&(r.polylineSegments.push([m.x,m.y,y.x,y.y]),r.polylineSegmentPrimitiveIndices.push(r.primitiveCount+c))}}r.widths.push(n.widths),r.colors.push(n.colors),r.pickColors.push(n.pickColors),s>0&&(r.hasPixelWidths||(r.hasPixelWidths=!n.widthInMeters),r.hasMeterWidths||(r.hasMeterWidths=n.widthInMeters)),r.primitiveCount+=s}static packPolylineGrid(t){let n=t.polylineSegments,i=t.polylineSegmentPrimitiveIndices,r=Math.max(1,Math.ceil(Math.sqrt(n.length/Mge))),o=new Array(r*r);for(let A=0;A<o.length;A++)o[A]=[];let s=0,a=O$e/r,c=sH(t.widths);for(let A=0;A<n.length;A++){let b=n[A],x=Math.max(a,Bge(c[i[A]],t)),T=Math.max(0,Math.min(b[0],b[2])-x),E=Math.min(1,Math.max(b[0],b[2])+x),v=Math.max(0,Math.min(b[1],b[3])-x),S=Math.min(1,Math.max(b[1],b[3])+x),I=mA(Math.floor(T*r),r),R=mA(Math.floor(E*r),r),O=mA(Math.floor(v*r),r),L=mA(Math.floor(S*r),r);for(let _=O;_<=L;_++)for(let C=I;C<=R;C++)o[_*r+C].push(A),s++}let[u,f]=aH(s),d=u*f,p=new Float32Array(d*4).fill(-1),g=new Float32Array(d).fill(-1),m=new Uint32Array(o.length+2);m[0]=r,m[1]=r;let y=0;for(let A=0;A<o.length;A++){let b=o[A];for(let x=0;x<b.length;x++){let T=b[x],E=n[T];p[y*4]=E[0],p[y*4+1]=E[1],p[y*4+2]=E[2],p[y*4+3]=E[3];let v=i[T];g[y]=v,y++}m[A+2]=y}t.polylineSegmentTexels=p,t.polylineSegmentTextureWidth=u,t.polylineSegmentTextureHeight=f,t.polylineSegmentPrimitiveIndicesTexels=g,t.polylineGridCellIndices=m}static packPolygonCollectionData(t,n,i){if(l(i)&&t._dirtyCount===0&&t._version===i.version)return i;let r=t.primitiveCount,o=t.boundingVolume,s=ie.fromBoundingSphere(o,n),a=jge(t,n),c=new Float32Array(r),u=new Uint8Array(r*4),f=new Uint8Array(r*4);for(let d=0;d<r;d++){let p=t.get(d,Lge),g=p.getMaterial(N$e);u[d*4]=z.floatToByte(g.color.red),u[d*4+1]=z.floatToByte(g.color.green),u[d*4+2]=z.floatToByte(g.color.blue),u[d*4+3]=z.floatToByte(g.color.alpha),Fge(f,d,p._pickId)}return Object.assign(i??{},{version:t._version,rectangle:s,positions:a,widths:c,colors:u,pickColors:f})}static packPolygonRings(t,n,i,r){r.polygonRings??(r.polygonRings=[]),r.polygonRingPrimitiveIndices??(r.polygonRingPrimitiveIndices=[]),r.widths??(r.widths=[]),r.colors??(r.colors=[]),r.pickColors??(r.pickColors=[]),r.primitiveCount??(r.primitiveCount=0),r.rectangle??(r.rectangle=ie.clone(i));let o=i.width,s=t.primitiveCount,a=n.positions;for(let c=0;c<s;c++){let u=t.get(c,Lge);if(!u.show)continue;let f=u.vertexOffset,d=u.vertexCount,p=u.getHoles();for(let g=0;g<=p.length;g++){let m=g===0?0:p[g-1],A=(g===p.length?d:p[g])-m;if(A<3)continue;let b=j$e(a,f+m,A,i,o),x=zge(b,A,-D.EPSILON3,1+D.EPSILON3,-D.EPSILON3,1+D.EPSILON3,Uge);x.vertexCount<3||(r.polygonRings.push(x.positions.slice(0,x.vertexCount*2)),r.polygonRingPrimitiveIndices.push(r.primitiveCount+c))}}r.widths.push(n.widths),r.colors.push(n.colors),r.pickColors.push(n.pickColors),r.primitiveCount+=s}static packPolygonGrid(t){let n=t.polygonRings,i=t.polygonRingPrimitiveIndices,r=0;for(let y=0;y<n.length;y++)r+=n[y].length/2;let o=Math.max(1,Math.ceil(Math.sqrt(r/Mge))),s=new Array(o*o);for(let y=0;y<s.length;y++)s[y]=[];let a=0;for(let y=0;y<n.length;y++){let A=n[y],b=i[y],x=A.length/2,T=1/0,E=1/0,v=-1/0,S=-1/0;for(let _=0;_<x;_++)T=Math.min(T,A[_*2]),v=Math.max(v,A[_*2]),E=Math.min(E,A[_*2+1]),S=Math.max(S,A[_*2+1]);let I=mA(Math.floor(T*o),o),R=mA(Math.floor(v*o),o),O=mA(Math.floor(E*o),o),L=mA(Math.floor(S*o),o);for(let _=O;_<=L;_++)for(let C=I;C<=R;C++){let w=zge(A,x,C/o-D.EPSILON5,(C+1)/o+D.EPSILON5,_/o-D.EPSILON5,(_+1)/o+D.EPSILON5,Uge),P=w.vertexCount;if(P<3)continue;let M=w.positions,F=s[_*o+C];for(let V=0;V<P;V++){let B=(V+1)%P,j=M[V*2],k=M[V*2+1],G=M[B*2],q=M[B*2+1];k!==q&&(F.push(j,k,G,q,b),a++)}}}let[c,u]=aH(a),f=c*u,d=new Float32Array(f*4).fill(-1),p=new Float32Array(f).fill(-1),g=new Uint32Array(s.length+2);g[0]=o,g[1]=o;let m=0;for(let y=0;y<s.length;y++){let A=s[y];for(let b=0;b<A.length;b+=5)d[m*4]=A[b],d[m*4+1]=A[b+1],d[m*4+2]=A[b+2],d[m*4+3]=A[b+3],p[m]=A[b+4],m++;g[y+2]=m}t.polygonEdgeTexels=d,t.polygonEdgeTextureWidth=c,t.polygonEdgeTextureHeight=u,t.polygonEdgePrimitiveIndicesTexels=p,t.polygonGridCellIndices=g}static packPrimitiveTextures(t,n){let[i,r]=aH(n.primitiveCount),o=new Float32Array(i*r);o.set(sH(n.widths)),n.widthTexture=new Dt({context:t,pixelFormat:Ke.RED,pixelDatatype:ze.FLOAT,source:{width:i,height:r,arrayBufferView:o},sampler:Ht.NEAREST,flipY:!1});let s=new Uint8Array(i*r*4);s.set(sH(n.colors)),n.colorTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{width:i,height:r,arrayBufferView:s},sampler:Ht.NEAREST,flipY:!1});let a=new Uint8Array(i*r*4);a.set(sH(n.pickColors)),n.pickColorTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{width:i,height:r,arrayBufferView:a},sampler:Ht.NEAREST,flipY:!1})}static packPolylineTextures(t,n){n.polylineSegmentTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT,source:{width:n.polylineSegmentTextureWidth,height:n.polylineSegmentTextureHeight,arrayBufferView:n.polylineSegmentTexels},sampler:Ht.NEAREST,flipY:!1}),n.polylineSegmentPrimitiveIndicesTexture=new Dt({context:t,pixelFormat:Ke.RED,pixelDatatype:ze.FLOAT,source:{width:n.polylineSegmentTextureWidth,height:n.polylineSegmentTextureHeight,arrayBufferView:n.polylineSegmentPrimitiveIndicesTexels},sampler:Ht.NEAREST,flipY:!1}),n.polylineGridCellIndicesTexture=Vge(t,n.polylineGridCellIndices)}static packPolygonTextures(t,n){n.polygonEdgeTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT,source:{width:n.polygonEdgeTextureWidth,height:n.polygonEdgeTextureHeight,arrayBufferView:n.polygonEdgeTexels},sampler:Ht.NEAREST,flipY:!1}),n.polygonEdgePrimitiveIndicesTexture=new Dt({context:t,pixelFormat:Ke.RED,pixelDatatype:ze.FLOAT,source:{width:n.polygonEdgeTextureWidth,height:n.polygonEdgeTextureHeight,arrayBufferView:n.polygonEdgePrimitiveIndicesTexels},sampler:Ht.NEAREST,flipY:!1}),n.polygonGridCellIndicesTexture=Vge(t,n.polygonGridCellIndices)}static freeResources(t){t.polylineSegmentTexture?.destroy(),t.widthTexture?.destroy(),t.colorTexture?.destroy(),t.pickColorTexture?.destroy(),t.polylineSegmentPrimitiveIndicesTexture?.destroy(),t.polylineGridCellIndicesTexture?.destroy(),t.polygonEdgeTexture?.destroy(),t.polygonEdgePrimitiveIndicesTexture?.destroy(),t.polygonGridCellIndicesTexture?.destroy()}};function Fge(e,t,n){z.fromRgba(n,PN),e[t*4]=z.floatToByte(PN.red),e[t*4+1]=z.floatToByte(PN.green),e[t*4+2]=z.floatToByte(PN.blue),e[t*4+3]=z.floatToByte(PN.alpha)}function Bge(e,t){if(e>=0)return(e+1)*.5/t.minimumTileScreenPixels;let n=t.metersPerUv;return-e*.5/Math.min(n.x,n.y)}function z$e(e,t,n,i){let r=e.x,o=t.x;o=r+D.negativePiToPi(o-r);let s=n.west+i*.5,a=s+D.negativePiToPi(r-s)-r;r+=a,o+=a;let c=n.north-n.south;e.x=(r-n.west)/i,e.y=(e.y-n.south)/c,t.x=(o-n.west)/i,t.y=(t.y-n.south)/c}function V$e(e,t,n){let i=-n,r=1+n,o=0,s=1,a=e.x,c=e.y,u=t.x,f=t.y,d=u-a,p=f-c,g=[-d,d,-p,p],m=[a-i,r-a,c-i,r-c];for(let y=0;y<4;y++){if(Math.abs(g[y])<1e-12){if(m[y]<0)return!1;continue}let A=m[y]/g[y];if(g[y]<0?o=Math.max(o,A):s=Math.min(s,A),o>s)return!1}return e.x=a+o*d,e.y=c+o*p,t.x=a+s*d,t.y=c+s*p,!0}function mA(e,t){return Math.max(0,Math.min(t-1,e))}var rJ=new Float64Array(512),kge=new Float64Array(512),Uge={positions:new Float64Array(512),vertexCount:0};function j$e(e,t,n,i,r){rJ.length<n*2&&(rJ=new Float64Array(n*4));let o=rJ,s=i.north-i.south,a=e[t*2];o[0]=a,o[1]=e[t*2+1];for(let d=1;d<n;d++){let p=a+D.negativePiToPi(e[(t+d)*2]-a);o[d*2]=p,o[d*2+1]=e[(t+d)*2+1],a=p}let c=i.west+r*.5,u=o[0],f=c+D.negativePiToPi(u-c)-u;for(let d=0;d<n;d++)o[d*2]=(o[d*2]+f-i.west)/r,o[d*2+1]=(o[d*2+1]-i.south)/s;return o}function zge(e,t,n,i,r,o,s){let a=e,c=t;for(let u=0;u<4;u++){let f=u>>1,d=(u&1)===0?1:-1,p=u===0?n:u===1?i:u===2?r:o,g=c*4+4,m=(u&1)===0,y=m?kge:s.positions;y.length<g&&(y=new Float64Array(g*2),m?kge=y:s.positions=y);let A=0,b=a[(c-1)*2],x=a[(c-1)*2+1],T=d*((f===0?b:x)-p)>=0;for(let E=0;E<c;E++){let v=a[E*2],S=a[E*2+1],I=d*((f===0?v:S)-p)>=0;if(I!==T){let R=f===0?(p-b)/(v-b):(p-x)/(S-x);y[A*2]=f===0?p:b+R*(v-b),y[A*2+1]=f===0?x+R*(S-x):p,A++}I&&(y[A*2]=v,y[A*2+1]=S,A++),b=v,x=S,T=I}if(A===0)return s.vertexCount=0,s;a=y,c=A}return s.vertexCount=c,s}function aH(e){let t=D.nextPowerOfTwo(Math.max(1,Math.ceil(Math.sqrt(e)))),n=D.nextPowerOfTwo(Math.max(1,Math.ceil(e/t)));return[t,n]}function Vge(e,t){let[n,i]=aH(t.length),r=new Float32Array(n*i);return r.set(t),new Dt({context:e,pixelFormat:Ke.RED,pixelDatatype:ze.FLOAT,source:{width:n,height:i,arrayBufferView:r},sampler:Ht.NEAREST,flipY:!1})}function jge(e,t,n){l(n)||(n=new Float64Array(e._positionCountMax*2));let i=e._positionView,r=e.modelMatrix;for(let o=0;o<e._positionCount;o++){let s=h.fromArray(i,o*3,L$e),a=N.multiplyByPoint(r,s,F$e),c=t.cartesianToCartographic(a,B$e);n[o*2]=c.longitude,n[o*2+1]=c.latitude}return n}function sH(e){let t=0;for(let o of e)t+=o.byteLength;let n=e[0].constructor,i=new n(t/n.BYTES_PER_ELEMENT),r=0;for(let o of e)i.set(o,r),r+=o.length;return i}var Es=oJ;var cJ=new Mo,sJ="ClippingPolygonCollection.quality is deprecated as of CesiumJS 1.145 and will be removed in 1.147. Signed distance field clipping was replaced with vector clipping, so this property no longer has any effect.",aJ="ClippingPolygonCollection.debugShowDistanceTexture is deprecated as of CesiumJS 1.145 and will be removed in 1.147. Signed distance field clipping was replaced with vector clipping, so this property no longer has any effect.",H$e="ClippingPolygonCollection.isDestroyed is deprecated as of CesiumJS 1.145 and will be removed in 1.147. The collection no longer holds any GPU resources of its own, so it does not need to be destroyed.",G$e="ClippingPolygonCollection.destroy is deprecated as of CesiumJS 1.145 and will be removed in 1.147. The collection no longer holds any GPU resources of its own, so it does not need to be destroyed.";function cl(e){e=e??H.EMPTY_OBJECT,this._polygons=[];let t=e.polygons??[],n=0,i=0;for(let r=0;r<t.length;++r)n+=t[r].length,i+=t[r].holes.length;this._dirty=!1,this._bufferPolygonCollection=new Ua({show:!1,allowPicking:!1,primitiveCountMax:2*t.length,vertexCountMax:2*n,holeCountMax:i>0?2*i:0,triangleCountMax:0});for(let r=0;r<t.length;++r){let o=this._bufferPolygonCollection.primitiveCount;this._bufferPolygonCollection.add(Gge(t[r]),cJ),this._polygons.push({clippingPolygon:t[r],bufferIndex:o})}l(e.debugShowDistanceTexture)&&qr("ClippingPolygonCollection.debugShowDistanceTexture",aJ),this._debugShowDistanceTexture=e.debugShowDistanceTexture??!1,this.enabled=e.enabled??!0,this.inverse=e.inverse??!1,l(e.quality)&&qr("ClippingPolygonCollection.quality",sJ),this._quality=e.quality??1,this.polygonAdded=new be,this.polygonRemoved=new be,this.ellipsoid=e.ellipsoid??ee.default,this._owner=void 0,this._vectorCollectionData=Es.packPolygonCollectionData(this._bufferPolygonCollection,this.ellipsoid)}Object.defineProperties(cl.prototype,{length:{get:function(){return this._polygons.length}},debugShowDistanceTexture:{get:function(){return qr("ClippingPolygonCollection.debugShowDistanceTexture",aJ),this._debugShowDistanceTexture},set:function(e){qr("ClippingPolygonCollection.debugShowDistanceTexture",aJ),this._debugShowDistanceTexture=e}},quality:{get:function(){return qr("ClippingPolygonCollection.quality",sJ),this._quality},set:function(e){qr("ClippingPolygonCollection.quality",sJ),this._quality=e}},owner:{get:function(){return this._owner}},clippingPolygonsState:{get:function(){return!this.enabled||this.length===0?0:this.inverse?-1:1}}});function Gge(e){let t=e.positions,n=e.holes,i=new Float64Array(e.length*3),r=0;for(let s=0;s<t.length;s++)h.pack(t[s],i,r*3),r++;if(n.length===0)return{positions:i,holes:void 0};let o=new Uint32Array(n.length);for(let s=0;s<n.length;s++){let a=n[s];o[s]=r;for(let c=0;c<a.length;c++)h.pack(a[c],i,r*3),r++}return{positions:i,holes:o}}function W$e(e,t,n){let i=e._bufferPolygonCollection,r=i.primitiveCount+1,o=i.vertexCount+t,s=i.holeCount+n;if(r<=i.primitiveCountMax&&o<=i.vertexCountMax&&s<=i.holeCountMax)return i;let a=e._polygons.length!==i.primitiveCount,c=Ua.fromCollection(i,{primitiveCountMax:D.nextPowerOfTwo(r),vertexCountMax:D.nextPowerOfTwo(o),holeCountMax:D.nextPowerOfTwo(s)},a?u=>u.show:void 0);if(i.destroy(),e._bufferPolygonCollection=c,a){let u=e._polygons;for(let f=0;f<u.length;++f)u[f].bufferIndex=f}return c}function Wge(e,t){e._bufferPolygonCollection.get(t.bufferIndex,cJ).show=!1,t.bufferIndex=-1}cl.prototype.add=function(e){let t=this._polygons.length,n=W$e(this,e.length,e.holes.length);return this._polygons.push({clippingPolygon:e,bufferIndex:n.primitiveCount}),n.add(Gge(e),cJ),this._dirty=!0,this.polygonAdded.raiseEvent(e,t),e};cl.prototype.get=function(e){return this._polygons[e]?.clippingPolygon};cl.prototype.contains=function(e){return this._polygons.some(t=>fS.equals(t.clippingPolygon,e))};cl.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(r=>fS.equals(r.clippingPolygon,e));if(n===-1)return!1;let[i]=t.splice(n,1);return Wge(this,i),this._dirty=!0,this.polygonRemoved.raiseEvent(i.clippingPolygon,n),!0};cl.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;n<t;++n){let i=e[n];Wge(this,i),this.polygonRemoved.raiseEvent(i.clippingPolygon,n)}this._dirty=!0,this._polygons=[]};cl.prototype.update=function(e){if(!cl.isSupported(e))throw new oe("ClippingPolygonCollections are only supported for WebGL 2.");this._dirty&&(this._dirty=!1,this.length!==0&&(this._vectorCollectionData=Es.packPolygonCollectionData(this._bufferPolygonCollection,this.ellipsoid)))};var Hge=new ie,q$e=new ie;cl.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,r=$t.OUTSIDE;this.inverse&&(r=$t.INSIDE);let o=e.rectangle;if(!l(o)&&l(e.boundingVolume?.computeCorners)){let s=e.boundingVolume.computeCorners();o=ie.fromCartesianArray(s,t,Hge)}l(o)||(o=ie.fromBoundingSphere(e.boundingSphere,t,Hge));for(let s=0;s<i;++s){let a=n[s].clippingPolygon,c=ie.intersection(o,a.rectangle,q$e);if(l(c))return $t.INTERSECTING}return r};cl.setOwner=function(e,t,n){e!==t[n]&&(t[n]=void 0,l(e)&&(e._owner=t,t[n]=e))};cl.prototype.requestRectangleData=function(e,t){let n={rectangle:ie.clone(e),polygonRings:[]};return this.length===0||(Es.packPolygonRings(this._bufferPolygonCollection,this._vectorCollectionData,e,n),n.polygonRings.length===0)||(Es.packPolygonGrid(n),Es.packPolygonTextures(t,n)),n};cl.releaseRectangleData=function(e){Es.freeResources(e)};cl.isSupported=function(e){return e?.context.webgl2};cl.prototype.isDestroyed=function(){return qr("ClippingPolygonCollection.isDestroyed",H$e),!1};cl.prototype.destroy=function(){return qr("ClippingPolygonCollection.destroy",G$e),le(this)};var Mc=cl;function qge(e){e=e??H.EMPTY_OBJECT,this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=e.persists??!1,this.pass=Ie.COMPUTE,this.owner=e.owner}qge.prototype.execute=function(e){e.execute(this)};var Nf=qge;var hS={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};hS.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?hS.SUNLIGHT:hS.SCENE_LIGHT:hS.NONE};Object.freeze(hS);var Bg=hS;function Yge(){this.lightIntensity=10,this.rayleighCoefficient=new h(55e-7,13e-6,284e-7),this.mieCoefficient=new h(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=Bg.NONE}Yge.requiresColorCorrect=function(e){return!(D.equalsEpsilon(e.hueShift,0,D.EPSILON7)&&D.equalsEpsilon(e.saturationShift,0,D.EPSILON7)&&D.equalsEpsilon(e.brightnessShift,0,D.EPSILON7))};var cT=Yge;var lm=`uniform vec3 u_radiiAndDynamicAtmosphereColor;
uniform float u_atmosphereLightIntensity;
uniform float u_atmosphereRayleighScaleHeight;
uniform float u_atmosphereMieScaleHeight;
uniform float u_atmosphereMieAnisotropy;
uniform vec3 u_atmosphereRayleighCoefficient;
uniform vec3 u_atmosphereMieCoefficient;
const float ATMOSPHERE_THICKNESS = 111e3;
const int PRIMARY_STEPS_MAX = 16;
const int LIGHT_STEPS_MAX = 4;
void computeScattering(
czm_ray primaryRay,
float primaryRayLength,
vec3 lightDirection,
float atmosphereInnerRadius,
out vec3 rayleighColor,
out vec3 mieColor,
out float opacity
) {
rayleighColor = vec3(0.0);
mieColor = vec3(0.0);
opacity = 0.0;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
vec3 origin = vec3(0.0);
czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
return;
}
float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
float start_0 = primaryRayAtmosphereIntersect.start;
primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
float x_o_a = start_0 - ATMOSPHERE_THICKNESS;
float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0);
int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0);
float rayPositionLength = primaryRayAtmosphereIntersect.start;
float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
vec3 rayleighAccumulation = vec3(0.0);
vec3 mieAccumulation = vec3(0.0);
vec2 opticalDepth = vec2(0.0);
vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);
for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
if (i >= PRIMARY_STEPS) {
break;
}
vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
opticalDepth += sampleDensity;
czm_ray lightRay = czm_ray(samplePosition, lightDirection);
czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
float lightPositionLength = 0.0;
vec2 lightOpticalDepth = vec2(0.0);
for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
if (j >= LIGHT_STEPS) {
break;
}
vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
float lightHeight = length(lightPosition) - atmosphereInnerRadius;
lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
lightPositionLength += lightStepLength;
}
vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
rayleighAccumulation += sampleDensity.x * attenuation;
mieAccumulation += sampleDensity.y * attenuation;
rayPositionLength += (rayStepLength += rayStepLengthIncrease);
}
rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
mieColor = u_atmosphereMieCoefficient * mieAccumulation;
opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
}
vec4 computeAtmosphereColor(
vec3 positionWC,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = u_atmosphereMieAnisotropy;
float GSq = G * G;
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;
return vec4(color, opacity);
}
`;var DN=`uniform samplerCube u_radianceMap;
in vec2 v_textureCoordinates;
const float twoSqrtPi = 2.0 * sqrt(czm_pi);
float computeShBasis(int index, vec3 s) {
if (index == 0) {
return 1.0 / twoSqrtPi;
}
if (index == 1) {
return -sqrt(3.0) * s.y / twoSqrtPi;
}
if (index == 2) {
return sqrt(3.0) * s.z / twoSqrtPi;
}
if (index == 3) {
return -sqrt(3.0) * s.x / twoSqrtPi;
}
if (index == 4) {
return sqrt(15.0) * s.y * s.x / twoSqrtPi;
}
if (index == 5) {
return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
}
if (index == 6) {
return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
}
if (index == 7) {
return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
}
if (index == 8) {
return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
}
return 0.0;
}
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
const int samples = 256;
const float solidAngle = 1.0 / float(samples);
void main() {
vec2 uv = v_textureCoordinates.xy * 3.0;
int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));
for (int i = 0; i < samples; ++i) {
vec2 xi = hammersley2D(i, samples);
float phi = czm_twoPi * xi.x;
float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));
float Ylm = computeShBasis(coefficientIndex, direction);
vec3 lookupDirection = -direction.xyz;
lookupDirection.z = -lookupDirection.z;
vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);
out_FragColor += Ylm * color * solidAngle * sinTheta;
}
}
`;var RN=`precision highp float;
in vec2 v_textureCoordinates;
uniform vec3 u_faceDirection;
uniform vec3 u_positionWC;
uniform mat4 u_enuToFixedFrame;
uniform vec4 u_brightnessSaturationGammaIntensity;
uniform vec4 u_groundColor;
vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
vec2 scaledUV = uv * 2.0 - 1.0;
if (faceDir.x != 0.0) {
return vec4(faceDir.x, scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
} else if (faceDir.y != 0.0) {
return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
} else {
return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0);
}
}
void main() {
float height = length(u_positionWC);
float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);
vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);
float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;
vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
vec3 normalizedDirection = normalize(direction);
czm_ray ray = czm_ray(positionWC, normalizedDirection);
czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
if (!czm_isEmpty(intersection)) {
intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
}
bool onEllipsoid = intersection.start >= 0.0;
float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);
vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
vec3 mieColor;
vec3 rayleighColor;
float opacity;
czm_computeScattering(
ray,
rayLength,
lightDirectionWC,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);
#ifdef ATMOSPHERE_COLOR_CORRECT
const bool ignoreBlackPixels = true;
atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
#endif
vec3 lookupDirection = -normalizedDirection;
lookupDirection.x = -lookupDirection.x;
lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
lookupDirection.x = -lookupDirection.x;
float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha);
float intensity = u_brightnessSaturationGammaIntensity.w;
vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);
vec3 up = normalize(positionWC);
float occlusion = max(dot(lightDirectionWC, up), 0.05);
vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));
vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);
float brightness = u_brightnessSaturationGammaIntensity.x;
float saturation = u_brightnessSaturationGammaIntensity.y;
float gamma = u_brightnessSaturationGammaIntensity.z;
#ifdef ENVIRONMENT_COLOR_CORRECT
color.rgb = mix(vec3(0.0), color.rgb, brightness);
color.rgb = czm_saturation(color.rgb, saturation);
#endif
color.rgb = pow(color.rgb, vec3(gamma));
color.rgb = czm_gammaCorrect(color.rgb);
out_FragColor = color;
}
`;var ON=`precision highp float;
in vec3 v_textureCoordinates;
uniform float u_roughness;
uniform samplerCube u_radianceTexture;
uniform vec3 u_faceDirection;
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float phi = czm_twoPi * xi.x;
float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangentX = normalize(cross(upVector, N));
vec3 tangentY = cross(N, tangentX);
return tangentX * H.x + tangentY * H.y + N * H.z;
}
const int samples = 128;
void main() {
vec3 normal = u_faceDirection;
vec3 V = normalize(v_textureCoordinates);
float roughness = u_roughness;
vec4 color = vec4(0.0);
float weight = 0.0;
for (int i = 0; i < samples; ++i) {
vec2 xi = hammersley2D(i, samples);
vec3 H = importanceSampleGGX(xi, roughness, V);
vec3 L = 2.0 * dot(V, H) * H - V;
float NdotL = max(dot(V, L), 0.0);
if (NdotL > 0.0) {
color += vec4(czm_textureCube(u_radianceTexture, L).rgb, 1.0) * NdotL;
weight += NdotL;
}
}
out_FragColor = color / weight;
}
`;var MN=`in vec3 position;
out vec3 v_textureCoordinates;
uniform vec3 u_faceDirection;
vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
vec2 scaledUV = uv;
if (faceDir.x != 0.0) {
return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
} else if (faceDir.y != 0.0) {
return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
} else {
return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z);
}
}
void main()
{
v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
v_textureCoordinates.y = -v_textureCoordinates.y;
v_textureCoordinates.z = -v_textureCoordinates.z;
gl_Position = vec4(position, 1.0);
}
`;function Ci(e){this._position=void 0,this._radianceMapDirty=!1,this._radianceCommandsDirty=!1,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1,this._irradianceTextureDirty=!1,this._sphericalHarmonicCoefficientsDirty=!1,this._shouldRegenerateShaders=!1,this._shouldReset=!1,e=e??H.EMPTY_OBJECT;let t=Math.max(Math.floor(Math.min(e.mipmapLevels??7,Math.log2(Ut.maximumCubeMapSize))),0);this._mipmapLevels=t;let n=Math.max(t-1,0)*6;this._radianceMapComputeCommands=new Array(6),this._convolutionComputeCommands=new Array(n),this._irradianceComputeCommand=void 0,this._radianceMapFS=void 0,this._irradianceMapFS=void 0,this._convolveSP=void 0,this._va=void 0,this._radianceMapTextures=new Array(6),this._specularMapTextures=new Array(n),this._radianceCubeMap=void 0,this._irradianceMapTexture=void 0,this._sphericalHarmonicCoefficients=Ci.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new K;let i=Math.max(Math.pow(2,t-1),1);this._textureDimensions=new U(i,i),this._radiiAndDynamicAtmosphereColor=new h,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=e.enabled??!0,this.shouldUpdate=!0,this.maximumSecondsDifference=e.maximumSecondsDifference??3600,this.maximumPositionEpsilon=e.maximumPositionEpsilon??1e3,this.atmosphereScatteringIntensity=e.atmosphereScatteringIntensity??2,this.gamma=e.gamma??1,this.brightness=e.brightness??1,this.saturation=e.saturation??1,this.groundColor=e.groundColor??Ci.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(Ci.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){h.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=h.clone(e,this._position),this._shouldReset=!0)}},radianceCubeMap:{get:function(){return this._radianceCubeMap}},maximumMipmapLevel:{get:function(){return this._mipmapLevels}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}}});Ci._maximumComputeCommandCount=8;Ci._activeComputeCommandCount=0;Ci._nextFrameCommandQueue=[];Ci._queueCommand=(e,t)=>{if(Ci._activeComputeCommandCount>=Ci._maximumComputeCommandCount){Ci._nextFrameCommandQueue.push(e);return}t.commandList.push(e),Ci._activeComputeCommandCount++};Ci._updateCommandQueue=e=>{if(Ci._maximumComputeCommandCount=Math.log2(Ut.maximumCubeMapSize),Ci._nextFrameCommandQueue.length>0&&Ci._activeComputeCommandCount<Ci._maximumComputeCommandCount){let t=Ci._nextFrameCommandQueue.shift();for(;l(t)&&Ci._activeComputeCommandCount<Ci._maximumComputeCommandCount;){if(t.owner.isDestroyed()||t.canceled){t=Ci._nextFrameCommandQueue.shift();continue}e.commandList.push(t),Ci._activeComputeCommandCount++,t=Ci._nextFrameCommandQueue.shift()}l(t)&&Ci._nextFrameCommandQueue.push(t)}};Ci.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};Ci.prototype.reset=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)l(this._radianceMapComputeCommands[t])&&(this._radianceMapComputeCommands[t].canceled=!0),this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)l(this._convolutionComputeCommands[t])&&(this._convolutionComputeCommands[t].canceled=!0),this._convolutionComputeCommands[t]=void 0;l(this._irradianceComputeCommand)&&(this._irradianceComputeCommand.canceled=!0,this._irradianceComputeCommand=void 0),this._radianceMapDirty=!0,this._radianceCommandsDirty=!0,this._convolutionsCommandsDirty=!1,this._irradianceCommandDirty=!1};var Y$e=new h,X$e=new h;function K$e(e,t){let n=e._position,i=t.atmosphere,r=t.mapProjection.ellipsoid,o=r.scaleToGeodeticSurface(n,X$e),s=1.025,a=Y$e,c=l(o)?h.magnitude(o):r.maximumRadius;return a.x=c*s,a.y=c,a.z=i.dynamicLighting,!h.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,a)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(h.clone(a,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var Xge=new h,$$e=new N,J$e=new se,Z$e=new z;function Q$e(e,t){let n=t.context,i=e._textureDimensions;if(l(e._radianceCubeMap)||(e._radianceCubeMap=new ts({context:n,width:i.x,height:i.y,pixelDatatype:ze.UNSIGNED_BYTE,pixelFormat:Ke.RGBA})),e._radianceCommandsDirty){let r=e._radianceMapFS;l(r)||(r=new Ye({sources:[lm,RN]}),e._radianceMapFS=r),cT.requiresColorCorrect(t.atmosphere)&&r.defines.push("ATMOSPHERE_COLOR_CORRECT");let o=e._position,s=e._radiiAndDynamicAtmosphereColor,a=t.mapProjection.ellipsoid,c=At.eastNorthUpToFixedFrame(o,a,$$e),u=J$e;u.x=e.brightness,u.y=e.saturation,u.z=e.gamma,u.w=e.atmosphereScatteringIntensity,(e.brightness!==1||e.saturation!==1||e.gamma!==1)&&r.defines.push("ENVIRONMENT_COLOR_CORRECT");let f=0;for(let d of ts.faceNames()){let p=e._radianceMapTextures[f];l(p)&&!p.isDestroyed()&&p.destroy(),p=new Dt({context:n,width:i.x,height:i.y,pixelDatatype:ze.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),e._radianceMapTextures[f]=p;let g=f,m=new Nf({fragmentShaderSource:r,outputTexture:p,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>s,u_enuToFixedFrame:()=>c,u_faceDirection:()=>ts.getDirection(d,Xge),u_positionWC:()=>o,u_brightnessSaturationGammaIntensity:()=>u,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,Z$e)},owner:e});m.postExecute=()=>{if(e.isDestroyed()||m.canceled){Ci._activeComputeCommandCount--;return}let y=e._radianceMapComputeCommands;y[g]=void 0;let A=new ys({context:n,colorTextures:[e._radianceMapTextures[g]]});A._bind(),e._radianceCubeMap[d].copyFromFramebuffer(),A._unBind(),A.destroy(),Ci._activeComputeCommandCount--,y.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[f]=m,Ci._queueCommand(m,t),f++}e._radianceCommandsDirty=!1}}function eJe(e,t){let n=e._radianceCubeMap;n.generateMipmap();let i=e._mipmapLevels,r=e._textureDimensions,o=r.x/2,s=r.y/2,a=t.context,c=0,u=()=>{let p=e._specularMapTextures.length;c>=p&&(e._irradianceCommandDirty=!0,i>1&&(n.sampler=new Ht({minificationFilter:Wt.LINEAR_MIPMAP_LINEAR}),e._shouldRegenerateShaders=!0,e._va.destroy(),e._va=void 0,e._convolveSP.destroy(),e._convolveSP=void 0))},f=(p,g,m,y,A)=>()=>{if(e.isDestroyed()||p.canceled){Ci._activeComputeCommandCount--;return}let b=e._convolutionComputeCommands;b[g]=void 0,n.copyFace(t,m,y,A),c++,Ci._activeComputeCommandCount--,m.destroy(),e._specularMapTextures[g]=void 0,u()},d=0;for(let p=1;p<i;++p){for(let g of ts.faceNames()){l(e._specularMapTextures[d])&&e._specularMapTextures[d].destroy();let m=e._specularMapTextures[d]=new Dt({context:a,width:o,height:s,pixelDatatype:ze.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),y=e._va;l(y)||(y=ts.createVertexArray(a,g),e._va=y);let A=e._convolveSP;l(A)||(A=en.fromCache({context:a,vertexShaderSource:MN,fragmentShaderSource:ON,attributeLocations:{positions:0}}),e._convolveSP=A);let b=new Nf({shaderProgram:A,vertexArray:y,outputTexture:m,persists:!0,owner:e,uniformMap:{u_roughness:()=>p/(i-1),u_radianceTexture:()=>n??a.defaultTexture,u_faceDirection:()=>ts.getDirection(g,Xge)}});b.postExecute=f(b,d,m,g,p),e._convolutionComputeCommands[d]=b,Ci._queueCommand(b,t),++d}o/=2,s/=2}u()}var Kge=new U(3,3);function tJe(e,t){let n=t.context,i=Kge,r=e._irradianceMapTexture;l(r)&&!r.isDestroyed()&&r.destroy(),r=new Dt({context:n,width:i.x,height:i.y,pixelDatatype:ze.FLOAT,pixelFormat:Ke.RGBA}),e._irradianceMapTexture=r;let o=e._irradianceMapFS;l(o)||(o=new Ye({sources:[DN]}),e._irradianceMapFS=o);let s=new Nf({fragmentShaderSource:o,outputTexture:r,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});s.postExecute=()=>{if(e.isDestroyed()||s.canceled){Ci._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,Ci._activeComputeCommandCount--},e._irradianceComputeCommand=s,Ci._queueCommand(s,t),e._irradianceTextureDirty=!0}function nJe(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new ys({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),r=Kge,o=n.readPixels({x:0,y:0,width:r.x,height:r.y,framebuffer:i});for(let s=0;s<9;++s)e._sphericalHarmonicCoefficients[s]=h.unpack(o,s*4),h.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}Ci.prototype.update=function(e){let t=e.mode;if(!(Ci.isDynamicUpdateSupported(e)&&this._mipmapLevels>=1)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===re.MORPHING){this._shouldRegenerateShaders=!1;return}Ci._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,r=K$e(this,e)||i===Bg.SUNLIGHT&&!K.equalsEpsilon(e.time,this._lastTime,this.maximumSecondsDifference);if(this._shouldReset||r){this.reset(),this._shouldReset=!1,this._lastTime=K.clone(e.time,this._lastTime);return}if(this._radianceMapDirty&&(Q$e(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(eJe(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(tJe(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){nJe(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};Ci.prototype.isDestroyed=function(){return!1};Ci.prototype.destroy=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t<e;++t)this._radianceMapComputeCommands[t]=void 0;e=this._convolutionComputeCommands.length;for(let t=0;t<e;++t)this._convolutionComputeCommands[t]=void 0;this._irradianceMapComputeCommand=void 0,e=this._radianceMapTextures.length;for(let t=0;t<e;++t)this._radianceMapTextures[t]=this._radianceMapTextures[t]&&!this._radianceMapTextures[t].isDestroyed()&&this._radianceMapTextures[t].destroy();e=this._specularMapTextures.length;for(let t=0;t<e;++t)this._specularMapTextures[t]=this._specularMapTextures[t]&&!this._specularMapTextures[t].isDestroyed()&&this._specularMapTextures[t].destroy();return this._radianceCubeMap=this._radianceCubeMap&&this._radianceCubeMap.destroy(),this._irradianceMapTexture=this._irradianceMapTexture&&!this._irradianceMapTexture.isDestroyed()&&this._irradianceMapTexture.destroy(),l(this._va)&&this._va.destroy(),l(this._convolveSP)&&this._convolveSP.destroy(),le(this)};Ci.isDynamicUpdateSupported=function(e){let t=e.context;return t.halfFloatingPointTexture||t.colorBufferFloat};Ci.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(z.fromCssColorString("#717145"));Ci.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS=Object.freeze([Object.freeze(new h(.35449,.35449,.35449)),h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO,h.ZERO]);var kg=Ci;var mS={HIGHLIGHT:0,REPLACE:1,MIX:2};mS.getColorBlend=function(e,t){if(e===mS.HIGHLIGHT)return 0;if(e===mS.REPLACE)return 1;if(e===mS.MIX)return D.clamp(t,D.EPSILON4,1)};Object.freeze(mS);var ll=mS;var $ge={SURFACES_ONLY:0,SURFACES_AND_EDGES:1,EDGES_ONLY:2};Object.freeze($ge);var Hd=$ge;var Jge={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"};Object.freeze(Jge);var ul=Jge;var Zge={STEP:0,LINEAR:1,CUBICSPLINE:2};Object.freeze(Zge);var um=Zge;var Qge={};function NN(e){this._count=e.count,this._properties=Je(e.properties,!0)}NN.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,Qge)};NN.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,Qge,e)};NN.prototype.getProperty=function(e,t){let n=this._properties[t];if(l(n))return Je(n[e],!0)};NN.prototype.setProperty=function(e,t,n){let i=this._properties[t];l(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=Je(n,!0)};var Ug=NN;function Nc(e){e=e??H.EMPTY_OBJECT,this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy,this._texture=e.texture}Object.defineProperties(Nc.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(l(this._metadataTable))return this._metadataTable.class}},properties:{get:function(){if(l(this._metadataTable))return this._metadataTable.properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},byteLength:{get:function(){let e=0;return l(this._metadataTable)&&(e+=this._metadataTable.byteLength),l(this._batchTableHierarchy)&&(e+=this._batchTableHierarchy.byteLength),e}},texture:{get:function(){return this._texture}}});Nc.prototype.hasProperty=function(e,t){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(t)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.hasProperty(e,t)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(t))};Nc.prototype.hasPropertyBySemantic=function(e,t){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Nc.prototype.propertyExists=function(e){return!!(l(this._metadataTable)&&this._metadataTable.hasProperty(e)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.propertyExists(e)||l(this._jsonMetadataTable)&&this._jsonMetadataTable.hasProperty(e))};Nc.prototype.propertyExistsBySemantic=function(e){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var lJ=[];Nc.prototype.getPropertyIds=function(e,t){if(t=l(t)?t:[],t.length=0,l(this._metadataTable)){let n=this._metadataTable.getPropertyIds(lJ);ti(t,n)}if(l(this._batchTableHierarchy)){let n=this._batchTableHierarchy.getPropertyIds(e,lJ);ti(t,n)}if(l(this._jsonMetadataTable)){let n=this._jsonMetadataTable.getPropertyIds(lJ);ti(t,n)}return t};Nc.prototype.getProperty=function(e,t){let n;if(l(this._metadataTable)&&(n=this._metadataTable.getProperty(e,t),l(n))||l(this._batchTableHierarchy)&&(n=this._batchTableHierarchy.getProperty(e,t),l(n))||l(this._jsonMetadataTable)&&(n=this._jsonMetadataTable.getProperty(e,t),l(n)))return n};Nc.prototype.setProperty=function(e,t,n){l(this._metadataTable)&&this._metadataTable.setProperty(e,t,n)||l(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,n)||(l(this._jsonMetadataTable)||(this._jsonMetadataTable=new Ug({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Nc.prototype.getPropertyBySemantic=function(e,t){if(l(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Nc.prototype.setPropertyBySemantic=function(e,t,n){return l(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Nc.prototype.getPropertyTypedArray=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Nc.prototype.getPropertyTypedArrayBySemantic=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};Nc.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Nc.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Nc.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Nc.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),le(this)};var Ql=Nc;function e_e(e){e=e??H.EMPTY_OBJECT;let t=e.property,n=e.classProperty,i=e.textures,r=l(t.channels)?t.channels:[0],o=t,s=ju.createModelTextureReader({textureInfo:o,channels:iJe(r),texture:i[o.index]});this._min=t.min,this._max=t.max;let a=t.offset,c=t.scale,u=n.hasValueTransform||l(a)||l(c);a=a??n.offset,c=c??n.scale,a=n.unpackVectorAndMatrixTypes(a),c=n.unpackVectorAndMatrixTypes(c),this._offset=a,this._scale=c,this._hasValueTransform=u,this._textureReader=s,this._classProperty=n,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(e_e.prototype,{textureReader:{get:function(){return this._textureReader}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});function iJe(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var LN=e_e;function uJ(e){e=e??H.EMPTY_OBJECT;let t=e.propertyTexture,n=e.class,i=e.textures,r=t.extensions,o=t.extras,s={};if(l(t.properties))for(let a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new LN({property:t.properties[a],classProperty:n.properties[a],textures:i}));this._name=e.name,this._id=e.id,this._class=n,this._properties=s,this._extras=o,this._extensions=r}Object.defineProperties(uJ.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});uJ.prototype.getProperty=function(e){return this._properties[e]};var zg=uJ;function t_e(e){e=e??H.EMPTY_OBJECT;let t=e.property,n=e.classProperty;this._attribute=t.attribute,this._classProperty=n,this._min=t.min,this._max=t.max;let i=t.offset,r=t.scale,o=n.hasValueTransform||l(i)||l(r);i=i??n.offset,r=r??n.scale,i=n.unpackVectorAndMatrixTypes(i),r=n.unpackVectorAndMatrixTypes(r),this._offset=i,this._scale=r,this._hasValueTransform=o,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(t_e.prototype,{attribute:{get:function(){return this._attribute}},hasValueTransform:{get:function(){return this._hasValueTransform}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},classProperty:{get:function(){return this._classProperty}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var FN=t_e;function fJ(e){e=e??H.EMPTY_OBJECT;let t=e.propertyAttribute,n=e.class,i={};if(l(t.properties))for(let r in t.properties)t.properties.hasOwnProperty(r)&&(i[r]=new FN({property:t.properties[r],classProperty:n.properties[r]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(fJ.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},class:{get:function(){return this._class}},properties:{get:function(){return this._properties}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});fJ.prototype.getProperty=function(e){return this._properties[e]};var lT=fJ;function pS(e){e=e??H.EMPTY_OBJECT,this._schema=e.schema;let t=e.propertyTables;this._propertyTableCount=l(t)?t.length:0,this._propertyTables=t??[],this._propertyTextures=e.propertyTextures??[],this._propertyAttributes=e.propertyAttributes??[],this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(pS.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}},propertyTextures:{get:function(){return this._propertyTextures}},propertyAttributes:{get:function(){return this._propertyAttributes}},propertyTablesByteLength:{get:function(){if(!l(this._propertyTables))return 0;let e=0,t=this._propertyTables.length;for(let n=0;n<t;n++)e+=this._propertyTables[n].byteLength;return e}}});pS.prototype.getPropertyTable=function(e){return this._propertyTables[e]};pS.prototype.getPropertyTexture=function(e){return this._propertyTextures[e]};pS.prototype.getPropertyAttribute=function(e){return this._propertyAttributes[e]};pS.prototype.destroy=function(){let e=this._propertyTables;for(let t=0;t<e.length;t++)e[t]=e[t]&&e[t].destroy();return le(this)};var za=pS;function rJe(e){e=e??H.EMPTY_OBJECT;let t=e.extension,n=e.schema,i=[];if(l(t.propertyTables))for(let s=0;s<t.propertyTables.length;s++){let a=t.propertyTables[s],c=n.classes[a.class],u=oJe(a,e.bufferViews,c,e.context),f=new Fd({count:a.count,properties:a.properties,class:c,bufferViews:e.bufferViews});i.push(new Ql({id:s,name:a.name,count:a.count,metadataTable:f,extras:a.extras,extensions:a.extensions,texture:u}))}let r=[];if(l(t.propertyTextures))for(let s=0;s<t.propertyTextures.length;s++){let a=t.propertyTextures[s];r.push(new zg({id:s,name:a.name,propertyTexture:a,class:n.classes[a.class],textures:e.textures}))}let o=[];if(l(t.propertyAttributes))for(let s=0;s<t.propertyAttributes.length;s++){let a=t.propertyAttributes[s];o.push(new lT({id:s,name:a.name,class:n.classes[a.class],propertyAttribute:a}))}return new za({schema:n,propertyTables:i,propertyTextures:r,propertyAttributes:o,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var BN=4;function oJe(e,t,n,i){let r=e.properties;if(!l(r))return;let o=e.count,s;try{s=sJe(r,t,n,o)}catch(f){console.warn(`Failed to create texture for property table "${e.name}": ${f.message}`);return}let a=s.length;if(a===0)return;if(o>Ut.maximumTextureSize||a>Ut.maximumTextureSize){_t("PropertyTableTextureExceedsMaximumSize",`Cannot create a texture for the property table "${e.name}" because it exceeds the maximum texture size of ${Ut.maximumTextureSize}.`);return}let c=cJe(s,o),u=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST});return Dt.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:u,flipY:!1,source:{width:o,height:a,arrayBufferView:c}})}function sJe(e,t,n,i){let r=[],o=n.properties;for(let[s,a]of Object.entries(o)){if(!a.isGpuCompatible(BN))continue;let c=e[s],u=l(c)?t[c.values]:aJe(a,i),f=u.length,d=a.cpuBytesPerElement(),p=f/d;if(p!==i)throw new oe(`Property with ID: "${s}" has (${p}), which does not match number of features in the property table: (${i}).`);r.push({view:u,classProperty:a})}return r}function aJe(e,t){let n=e.noData,i=bt.getComponentCount(e.type),r=e.isArray?e.arrayLength:1;e.type===bt.ENUM&&(n=e.enumType.valuesByName[n]),i===1&&(n=[n]),r===1&&(n=[n]);let o=e.cpuBytesPerElement(),s=Lt.getSizeInBytes(e.valueType),a=new ArrayBuffer(o*t),c=new DataView(a),u=Lt.getDataViewAccessors(c,e.valueType);for(let f=0;f<t;f++)for(let d=0;d<r;d++)for(let p=0;p<i;p++){let g=d*i+p;u.set(o*f+g*s,n[d][p])}return new Uint8Array(a)}function cJe(e,t){let n=e.length,i=new Uint8Array(n*t*BN),r=new DataView(i.buffer,i.byteOffset,i.byteLength);for(let o=0;o<n;o++){let s=e[o],a=s.classProperty,c=o*t*BN,u=a.valueType,f=Lt.gpuComponentType(u);if(u!==f){uJe(s,r,c);continue}lJe(s,i,c)}return i}function lJe(e,t,n){let i=e.view,r=e.classProperty.cpuBytesPerElement(),o=i.length/r;for(let s=0;s<o;s++){let a=s*r,c=n+s*BN;t.set(i.subarray(a,a+r),c)}}function uJe(e,t,n){let i=e.classProperty,r=e.view,o=i.valueType,s=Lt.gpuComponentType(o),a=i.cpuBytesPerElement(),c=r.length/a,u=new DataView(r.buffer,r.byteOffset,r.byteLength),f=Lt.getDataViewAccessors(u,o),d=Lt.getDataViewAccessors(t,s),p=Lt.downcastFunction(o);for(let g=0;g<c;g++){let m=g*a,y=n+g*BN,A=f.get(m);d.set(y,p(A))}}var kN=rJe;function fJe(e){e=e??H.EMPTY_OBJECT;let t=e.extension,n=e.schema,i,r=[],o;if(l(t.featureTables))for(o=Object.keys(t.featureTables).sort(),i=0;i<o.length;i++){let a=o[i],c=t.featureTables[a],u=n.classes[c.class],f=new Fd({count:c.count,properties:c.properties,class:u,bufferViews:e.bufferViews});r.push(new Ql({id:a,count:c.count,metadataTable:f,extras:c.extras,extensions:c.extensions}))}let s=[];if(l(t.featureTextures))for(o=Object.keys(t.featureTextures).sort(),i=0;i<o.length;i++){let a=o[i],c=t.featureTextures[a];s.push(new zg({id:a,propertyTexture:dJe(c),class:n.classes[c.class],textures:e.textures}))}return new za({schema:n,propertyTables:r,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function dJe(e){let t={class:e.class,properties:{}},n=e.properties;for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o={channels:hJe(r.channels),extras:r.extras,extensions:r.extensions};t.properties[i]=Ot(r.texture,o,!0)}return t}function hJe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]="rgba".indexOf(e[i]);return n}var UN=fJe;var dJ=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let{gltf:n,extension:i,extensionLegacy:r,gltfResource:o,baseResource:s,supportedImageFormats:a,frameState:c,cacheKey:u,asynchronous:f=!0}=t;this._gltfResource=o,this._baseResource=s,this._gltf=n,this._extension=i,this._extensionLegacy=r,this._supportedImageFormats=a,this._frameState=c,this._cacheKey=u,this._asynchronous=f,this._bufferViewLoaders=[],this._bufferViewIds=[],this._textureLoaders=[],this._textureIds=[],this._schemaLoader=void 0,this._structuralMetadata=void 0,this._state=Tt.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get structuralMetadata(){return this._structuralMetadata}load(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=mJe(this),this._promise)}process(t){if(this._state===Tt.READY)return!0;if(this._state!==Tt.LOADED)return!1;let n=this._textureLoaders,i=n.length,r=!0;for(let c=0;c<i;++c){let f=n[c].process(t);r=r&&f}if(!r)return!1;let o=this._schemaLoader.schema,s={};for(let c=0;c<this._bufferViewIds.length;++c){let u=this._bufferViewIds[c],f=this._bufferViewLoaders[c];if(!f.isDestroyed()){let d=new Uint8Array(f.typedArray);s[u]=d}}let a={};for(let c=0;c<this._textureIds.length;++c){let u=this._textureIds[c],f=n[c];f.isDestroyed()||(a[u]=f.texture)}return l(this._extension)?this._structuralMetadata=kN({extension:this._extension,schema:o,bufferViews:s,textures:a,context:t.context}):this._structuralMetadata=UN({extension:this._extensionLegacy,schema:o,bufferViews:s,textures:a}),n_e(this),this._state=Tt.READY,!0}unload(){n_e(this),SJe(this),l(this._schemaLoader)&&Li.unload(this._schemaLoader),this._schemaLoader=void 0,l(this._structuralMetadata)&&this._structuralMetadata.destroy(),this._structuralMetadata=void 0}};async function mJe(e){try{let t=AJe(e),n=CJe(e),i=vJe(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=Tt.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=Tt.FAILED,e.getError("Failed to load structural metadata",t)}}function pJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],r=i.values,o=i.arrayOffsets,s=i.stringOffsets;l(r)&&(t[r]=!0),l(o)&&(t[o]=!0),l(s)&&(t[s]=!0)}}function gJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],r=i.bufferView,o=i.arrayOffsetBufferView,s=i.stringOffsetBufferView;l(r)&&(t[r]=!0),l(o)&&(t[o]=!0),l(s)&&(t[s]=!0)}}function _Je(e){let t=e.propertyTables,n={};if(l(t))for(let i=0;i<t.length;i++){let r=t[i];pJe(r.properties,n)}return n}function yJe(e){let t=e.featureTables,n={};if(l(t)){for(let i in t)if(t.hasOwnProperty(i)){let o=t[i].properties;l(o)&&gJe(o,n)}}return n}async function AJe(e){let t;l(e._extension)?t=_Je(e._extension):t=yJe(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let r=Li.getBufferViewLoader({gltf:e._gltf,bufferViewId:parseInt(i),gltfResource:e._gltfResource,baseResource:e._baseResource});e._bufferViewLoaders.push(r),e._bufferViewIds.push(i),n.push(r.load())}return Promise.all(n)}function bJe(e){let t={},n=e.propertyTextures;if(l(n))for(let i=0;i<n.length;i++){let o=n[i].properties;l(o)&&xJe(o,t)}return t}function xJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function TJe(e){let t={},n=e.featureTextures;if(l(n)){for(let i in n)if(n.hasOwnProperty(i)){let o=n[i].properties;l(o)&&EJe(o,t)}}return t}function EJe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let r=e[n].texture;t[r.index]=r}}function CJe(e){let t;l(e._extension)?t=bJe(e._extension):t=TJe(e._extensionLegacy);let n=e._gltf,i=e._gltfResource,r=e._baseResource,o=e._supportedImageFormats,s=e._frameState,a=e._asynchronous,c=[];for(let u in t)if(t.hasOwnProperty(u)){let f=Li.getTextureLoader({gltf:n,textureInfo:t[u],gltfResource:i,baseResource:r,supportedImageFormats:o,frameState:s,asynchronous:a});e._textureLoaders.push(f),e._textureIds.push(u),c.push(f.load())}return Promise.all(c)}async function vJe(e){let t=e._extension??e._extensionLegacy,n;if(l(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=Li.getSchemaLoader({resource:i})}else n=Li.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}function n_e(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)Li.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function SJe(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)Li.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}var zN=dJ;var uT={TRANSLATION:"TRANSLATION",ROTATION:"ROTATION",SCALE:"SCALE",FEATURE_ID:"_FEATURE_ID"};uT.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"TRANSLATION":return uT.TRANSLATION;case"ROTATION":return uT.ROTATION;case"SCALE":return uT.SCALE;case"_FEATURE_ID":return uT.FEATURE_ID}};Object.freeze(uT);var No=uT;var wJe=65534,IJe=255;function cH(e){e=e??H.EMPTY_OBJECT;let t=e.triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;this._triangleIndices=t,this._originalVertexCount=i,this._edges=new o_e(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],PJe(this)}Object.defineProperties(cH.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function PJe(e){let t=e._triangleIndices,n=e._edges,i=[],r=e._extraVertices,o=e._originalVertexCount,s={};for(let a=0;a<t.length;a+=3){let c=t[a],u=t[a+1],f=t[a+2],d=!1,p=d||n.hasEdge(c,u),g=d||n.hasEdge(u,f),m=d||n.hasEdge(f,c),y=i_e(i,c,u,f,p,g,m);for(;l(y);){let A=s[y];if(!l(A)){A=o+r.length;let b=y;for(;b>=o;)b=r[b-o];r.push(b),s[y]=A}A>wJe&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):A>IJe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===c?(c=A,t[a]=A):y===u?(u=A,t[a+1]=A):(f=A,t[a+2]=A),y=i_e(i,c,u,f,p,g,m)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function i_e(e,t,n,i,r,o,s){let a=s?1:0,c=r?1:0,u=0,f=hJ(e,t,a,c,u);if(f===0)return t;let d=0,p=r?1:0,g=o?1:0,m=hJ(e,n,d,p,g);if(m===0)return n;let y=s?1:0,A=0,b=o?1:0,x=hJ(e,i,y,A,b);if(x===0)return i;let T=f&m&x,E,v,S;if(T&1)E=0,v=1,S=2;else if(T&2)E=0,S=1,v=2;else if(T&4)v=0,E=1,S=2;else if(T&8)v=0,S=1,E=2;else if(T&16)S=0,E=1,v=2;else if(T&32)S=0,v=1,E=2;else{let L=mJ(f),_=mJ(m),C=mJ(x);return L<_&&L<C?t:_<C?n:i}let I=t*3;e[I+E]=a,e[I+v]=c,e[I+S]=u;let R=n*3;e[R+E]=d,e[R+v]=p,e[R+S]=g;let O=i*3;e[O+E]=y,e[O+v]=A,e[O+S]=b}function hJ(e,t,n,i,r){let o=t*3,s=e[o],a=e[o+1],c=e[o+2];return l(s)?(s===n&&a===i&&c===r)<<0|(s===n&&a===r&&c===i)<<1|(s===i&&a===n&&c===r)<<2|(s===i&&a===r&&c===n)<<3|(s===r&&a===n&&c===i)<<4|(s===r&&a===i&&c===n)<<5:63}function mJ(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}cH.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,r=t.length,o=e.constructor,s=new o(e.length+r*i);s.set(e);for(let a=0;a<r;a++){let c=t[a]*i,u=n+a*i;for(let f=0;f<i;f++)s[u+f]=s[c+f]}return s};cH.createTexture=function(e){let t=e.cache.modelOutliningCache;if(l(t)||(t=e.cache.modelOutliningCache={}),l(t.outlineTexture))return t.outlineTexture;let n=Math.min(4096,Ut.maximumTextureSize),i=n,r=r_e(i),o=[];for(;i>1;)i>>=1,o.push(r_e(i));let s=new Dt({context:e,source:{arrayBufferView:r,mipLevels:o},width:n,height:1,pixelFormat:Ke.LUMINANCE,sampler:new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR_MIPMAP_LINEAR,magnificationFilter:Zn.LINEAR})});return t.outlineTexture=s,s};function r_e(e){let t=new Uint8Array(e);return t[e-1]=192,e===8?t[e-1]=96:e===4?t[e-1]=48:e===2?t[e-1]=24:e===1&&(t[e-1]=12),t}function o_e(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n<e.length;n+=2){let i=e[n],r=e[n+1],o=Math.min(i,r),s=Math.max(i,r),a=o*this._originalVertexCount+s;this._edges.add(a)}}o_e.prototype.hasEdge=function(e,t){let n=Math.min(e,t),i=Math.max(e,t),r=n*this._originalVertexCount+i;return this._edges.has(r)};var fT=cH;function s_e(e){this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function DJe(e){this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function lH(e){this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0,this.needsGaussianSplats=!1}lH.prototype.postProcess=function(e){this.needsOutlines&&(RJe(this),NJe(this,e)),this.needsGaussianSplats&&MJe(this,e)};function RJe(e){let t=e.primitive,n=t.indices,i=t.attributes[0].count,r=new fT({triangleIndices:n.typedArray,outlineIndices:e.outlineIndices,originalVertexCount:i});n.typedArray=r.updatedTriangleIndices,n.indexDatatype=je.fromTypedArray(n.typedArray);let o=OJe(r.outlineCoordinates),s=new s_e(o);s.loadBuffer=!0,s.loadTypedArray=!1,e.attributePlans.push(s),t.outlineCoordinates=s.attribute;let a=e.attributePlans,c=e.attributePlans.length;for(let u=0;u<c;u++){let f=a[u].attribute;f.typedArray=r.updateAttribute(f.typedArray)}}function OJe(e){let t=new Cn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=Y.FLOAT,t.type=Vt.VEC3,t.normalized=!1,t.count=e.length/3,t}function MJe(e,t){let n=e.attributePlans,i=n.length;for(let r=0;r<i;r++){let o=n[r];o.loadBuffer=!1,o.loadTypedArray=!0}}function NJe(e,t){LJe(e.attributePlans,t),l(e.indicesPlan)&&FJe(e.indicesPlan,t)}function LJe(e,t){let n=e.length;for(let i=0;i<n;i++){let r=e[i],o=r.attribute,s=o.typedArray;if(r.loadBuffer){let a=nt.createVertexBuffer({typedArray:s,context:t,usage:Me.STATIC_DRAW});a.vertexArrayDestroyable=!1,o.buffer=a}r.loadTypedArray||(o.typedArray=void 0)}}function FJe(e,t){let n=e.indices;if(e.loadBuffer){let i=nt.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Me.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}lH.AttributeLoadPlan=s_e;lH.IndicesLoadPlan=DJe;var dT=lH;function BJe(e){e=e??H.EMPTY_OBJECT,this.webp=e.webp??!1,this.basis=e.basis??!1}var VN=BJe;function a_e(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(a_e.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var jN=a_e;function c_e(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(c_e.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var HN=c_e;function l_e(e){this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(l_e.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var GN=l_e;var u_e={Direct:"Direct",Indirect:"Indirect"};Object.freeze(u_e);var pA=u_e;function f_e(e){this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect}Object.defineProperties(f_e.prototype,{storageType:{get:function(){return this._storageType}},anchorPointsIndirect:{get:function(){return this._anchorPointsIndirect}},anchorPointsDirect:{get:function(){return this._anchorPointsDirect}},intraTileCorrelationGroups:{get:function(){return this._intraTileCorrelationGroups}},covarianceDirect:{get:function(){return this._covarianceDirect}}});var gS=f_e;function d_e(e){this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(d_e.prototype,{A:{get:function(){return this._A}},alpha:{get:function(){return this._alpha}},beta:{get:function(){return this._beta}},T:{get:function(){return this._T}}});var WN=d_e;function _S(){}function h_e(e){return new $(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function kJe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h);return new jN({position:t,adjustmentParams:n})}function UJe(e){let t=h.fromArray(e.position,0,new h),n=h.fromArray(e.adjustmentParams,0,new h),i=h_e(e.covarianceMatrix);return new HN({position:t,adjustmentParams:n,covarianceMatrix:i})}function zJe(e){let t=e.groupFlags,n=h.fromArray(e.rotationThetas,0,new h),i=[];for(let o of e.params){let s=new WN({A:o.A,alpha:o.alpha,beta:o.beta,T:o.T});i.push(s)}return new GN({groupFlags:t,rotationThetas:n,params:i})}_S.load=function(e){let t=e.storageType;if(t===pA.Direct)return _S.loadDirect(e);if(t===pA.Indirect)return _S.loadIndirect(e);throw new oe(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};_S.loadDirect=function(e){let t=[],n=e.anchorPointsDirect;for(let o of n){let s=kJe(o);t.push(s)}let i=h_e(e.covarianceDirectUpperTriangle);return new gS({storageType:pA.Direct,anchorPointsDirect:t,covarianceDirect:i})};_S.loadIndirect=function(e){let t=[],n=e.anchorPointsIndirect;for(let s of n){let a=UJe(s);t.push(a)}let i=e.intraTileCorrelationGroups,r=[];for(let s of i){let a=zJe(s);r.push(a)}return new gS({storageType:pA.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:r})};var qN=_S;function m_e(e){this._traits=e.traits,this._noData=e.noData,this._offset=e.offset,this._scale=e.scale,this._index=e.index,this._texCoord=e.texCoord}Object.defineProperties(m_e.prototype,{traits:{get:function(){return this._traits}},noData:{get:function(){return this._noData}},offset:{get:function(){return this._offset}},scale:{get:function(){return this._scale}},index:{get:function(){return this._index}},texCoord:{get:function(){return this._texCoord}}});var YN=m_e;function p_e(e){this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(p_e.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var XN=p_e;function g_e(e){this._ppeTextures=e}Object.defineProperties(g_e.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var KN=g_e;function as(e){e=e??H.EMPTY_OBJECT;let t=e.gltf,n=e.extension,i=e.gltfResource,r=e.baseResource,o=e.supportedImageFormats,s=e.frameState,a=e.cacheKey,c=e.asynchronous??!0;this._gltfResource=i,this._baseResource=r,this._gltf=t,this._extension=n,this._supportedImageFormats=o,this._frameState=s,this._cacheKey=a,this._asynchronous=c,this._textureLoaders=[],this._textureIds=[],this._meshPrimitiveGpmLocal=void 0,this._structuralMetadata=void 0,this._state=Tt.UNLOADED,this._promise=void 0}l(Object.create)&&(as.prototype=Object.create(nr.prototype),as.prototype.constructor=as);Object.defineProperties(as.prototype,{cacheKey:{get:function(){return this._cacheKey}},meshPrimitiveGpmLocal:{get:function(){return this._meshPrimitiveGpmLocal}},structuralMetadata:{get:function(){return this._structuralMetadata}}});as.prototype._loadResources=async function(){try{return await this._loadTextures(),this.isDestroyed()?void 0:(this._gltf=void 0,this._state=Tt.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=Tt.FAILED,this.getError("Failed to load GPM data",e)}};as.prototype.load=function(){return l(this._promise)?this._promise:(this._state=Tt.LOADING,this._promise=this._loadResources(this),this._promise)};function VJe(e){let t={},n=e.ppeTextures;if(l(n))for(let i=0;i<n.length;i++){let r=n[i];t[r.index]=r}return t}as.prototype._loadTextures=function(){let e;l(this._extension)&&(e=VJe(this._extension));let t=this._gltf,n=this._gltfResource,i=this._baseResource,r=this._supportedImageFormats,o=this._frameState,s=this._asynchronous,a=[];for(let c in e)if(e.hasOwnProperty(c)){let u=Li.getTextureLoader({gltf:t,textureInfo:e[c],gltfResource:n,baseResource:i,supportedImageFormats:r,frameState:o,asynchronous:s});this._textureLoaders.push(u),this._textureIds.push(c),a.push(u.load())}return Promise.all(a)};as.ppeTexturesMetadataSchemaCache=new Map;as._createPpeTextureClassJson=function(e,t){let n=e.traits,i=n.source,r=e.offset??0,o=(e.scale??1)*255;return{name:`PPE texture class ${t}`,properties:{[i]:{name:"PPE",type:"SCALAR",componentType:"UINT8",normalized:!0,offset:r,scale:o,min:n.min,max:n.max}}}};as._obtainPpeTexturesMetadataSchema=function(e){let n=as._collectPpeTexturePropertyIdentifiers(e).toString(),i=as.ppeTexturesMetadataSchemaCache.get(n);if(l(i))return i;let o={id:`PPE_TEXTURE_SCHEMA_${as.ppeTexturesMetadataSchemaCache.size}`,classes:{}},s=e.ppeTextures;for(let a=0;a<s.length;a++){let c=s[a],u=`ppeTexture_${a}`,f=as._createPpeTextureClassJson(c,a);o.classes[u]=f}return i=$l.fromJson(o),as.ppeTexturesMetadataSchemaCache.set(n,i),i};as._collectPpeTexturePropertyIdentifiers=function(e){let t=[],n=e.ppeTextures;for(let i=0;i<n.length;i++){let r=n[i],o=as._createPpeTextureClassJson(r,i),s=JSON.stringify(o);t.push(s)}return t};as._convertToStructuralMetadata=function(e,t){let n=[],i=as._obtainPpeTexturesMetadataSchema(e),r=e.ppeTextures;for(let s=0;s<r.length;s++){let a=r[s],c=`ppeTexture_${s}`,f=a.traits.source,d=i.classes[c],p={class:c,properties:{[f]:{index:a.index,texCoord:a.texCoord}}};n.push(new zg({id:s,name:a.name,propertyTexture:p,class:d,textures:t}))}return new za({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};as.prototype.process=function(e){if(this._state===Tt.READY)return!0;if(this._state!==Tt.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let u=0;u<n;++u){let d=t[u].process(e);i=i&&d}if(!i)return!1;let r={};for(let u=0;u<this._textureIds.length;++u){let f=this._textureIds[u],d=t[u];d.isDestroyed()||(r[f]=d.texture)}let o=[],s=this._extension;if(l(s.ppeTextures)){let u=s.ppeTextures;for(let f of u){let d=f.traits,p=new XN({min:d.min,max:d.max,source:d.source}),g=new YN({traits:p,noData:f.noData,offset:f.offset,scale:f.scale,index:f.index,texCoord:f.texCoord});o.push(g)}}let a=new KN(o);this._meshPrimitiveGpmLocal=a;let c=as._convertToStructuralMetadata(a,r);return this._structuralMetadata=c,this._state=Tt.READY,!0};as.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)Li.unload(e[n]);this._textureLoaders.length=0,this._textureIds.length=0};as.prototype.unload=function(){this._unloadTextures(),this._gltf=void 0,this._extension=void 0,this._structuralMetadata=void 0};var $N=as;function jJe(e){let n=(e.extensions??H.EMPTY_OBJECT).EXT_mesh_primitive_restart,i=e.primitives;if(!l(n))return i;let r=[];ti(r,i);for(let o of n.primitiveGroups){let s=o.primitives[0];if(!l(s)||!i[s])return i;let a={...i[s],indices:o.indices};switch(a.mode){case te.TRIANGLE_FAN:case te.TRIANGLE_STRIP:case te.LINE_STRIP:case te.LINE_LOOP:break;default:return i}for(let c of o.primitives){let u=r[c];if(!l(u?.indices)||u.mode!==a.mode)return i;r[c]=void 0}r[s]=a}return r.filter(l)}var JN=jJe;var{Attribute:HJe,Indices:GJe,FeatureIdAttribute:y_e,FeatureIdTexture:A_e,FeatureIdImplicitRange:b_e,MorphTarget:WJe,Primitive:qJe,Instances:YJe,Skin:XJe,Node:KJe,AnimatedPropertyType:$Je,AnimationSampler:JJe,AnimationTarget:ZJe,AnimationChannel:QJe,Animation:eZe,ArticulationStage:tZe,Articulation:nZe,Asset:iZe,Scene:rZe,Components:oZe,MetallicRoughness:sZe,SpecularGlossiness:aZe,Specular:cZe,Anisotropy:pJ,Clearcoat:gJ,PlanarFill:lZe,LineStyle:uZe,Material:fZe,Vector:dZe,Polygon:hZe}=Cn,so={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8},_J=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let{gltfResource:n,typedArray:i,releaseGltfJson:r=!1,asynchronous:o=!0,incrementallyLoadTextures:s=!0,upAxis:a=Hi.Y,forwardAxis:c=Hi.Z,loadAttributesAsTypedArray:u=!1,loadAttributesFor2D:f=!1,enablePick:d=!1,loadIndicesForWireframe:p=!1,loadPrimitiveOutline:g=!0,loadForClassification:m=!1,renameBatchIdSemantic:y=!1}=t,{baseResource:A=n.clone()}=t;this._gltfJson=t.gltfJson,this._gltfResource=n,this._baseResource=A,this._typedArray=i,this._releaseGltfJson=r,this._asynchronous=o,this._incrementallyLoadTextures=s,this._upAxis=a,this._forwardAxis=c,this._loadAttributesAsTypedArray=u,this._loadAttributesFor2D=f,this._enablePick=d,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=g,this._loadForClassification=m,this._renameBatchIdSemantic=y,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=so.NOT_LOADED,this._textureState=so.NOT_LOADED,this._promise=void 0,this._processError=void 0,this._textureErrors=[],this._primitiveLoadPlans=[],this._loaderPromises=[],this._textureLoaders=[],this._texturesPromises=[],this._textureCallbacks=[],this._bufferViewLoaders=[],this._geometryLoaders=[],this._geometryCallbacks=[],this._structuralMetadataLoader=void 0,this._meshPrimitiveGpmLoader=void 0,this._loadResourcesPromise=void 0,this._resourcesLoaded=!1,this._texturesLoaded=!1,this._supportedImageFormats=void 0,this._postProcessBuffers=[],this._components=void 0}get cacheKey(){}get components(){return this._components}get gltfJson(){return l(this._gltfJsonLoader)?this._gltfJsonLoader.gltf:this._gltfJson}get incrementallyLoadTextures(){return this._incrementallyLoadTextures}get texturesLoaded(){return this._texturesLoaded}async load(){return l(this._promise)?this._promise:(this._promise=mZe(this),this._promise)}_process(t){return this._state===so.READY?!0:(this._state===so.PROCESSING&&gZe(this,t),this._resourcesLoaded&&this._state===so.POST_PROCESSING&&(_Ze(this,t.context),this._state=so.PROCESSED),this._resourcesLoaded&&this._state===so.PROCESSED?(__e(this),this._typedArray=void 0,this._state=so.READY,!0):!1)}_processTextures(t){if(this._textureState===so.READY)return!0;if(this._textureState!==so.PROCESSING)return!1;let n=!0,i=this._textureLoaders;for(let r=0;r<i.length;++r){let o=i[r].process(t);o&&l(this._textureCallbacks[r])&&(this._textureCallbacks[r](),this._textureCallbacks[r]=void 0),n=n&&o}return n?(this._textureState=so.READY,this._texturesLoaded=!0,!0):!1}process(t){if(this._state===so.LOADED&&!l(this._loadResourcesPromise)&&(this._loadResourcesPromise=pZe(this,t).then(()=>{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),l(this._processError)){this._state=so.FAILED;let o=this._processError;this._processError=void 0,uH(this,o)}let n=this._textureErrors.pop();if(l(n)){let o=this.getError("Failed to load glTF texture",n);throw o.name="TextureError",o}if(this._state===so.FAILED)return!1;let i=!1;try{i=this._process(t)}catch(o){this._state=so.FAILED,uH(this,o)}let r=!1;try{r=this._processTextures(t)}catch(o){this._textureState=so.FAILED,uH(this,o)}return this._incrementallyLoadTextures?i:i&&r}isUnloaded(){return this._state===so.UNLOADED}unload(){l(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&Li.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,PQe(this),__e(this),DQe(this),RQe(this),OQe(this),MQe(this),this._components=void 0,this._typedArray=void 0,this._state=so.UNLOADED}};async function mZe(e){e._state=so.LOADING,e._textureState=so.LOADING;try{let t=Li.getGltfJsonLoader({gltfResource:e._gltfResource,baseResource:e._baseResource,typedArray:e._typedArray,gltfJson:e._gltfJson});return e._gltfJsonLoader=t,await t.load(),e.isDestroyed()||e.isUnloaded()||t.isDestroyed()?void 0:(e._state=so.LOADED,e._textureState=so.LOADED,e)}catch(t){if(e.isDestroyed())return;e._state=so.FAILED,e._textureState=so.FAILED,uH(e,t)}}async function pZe(e,t){dn.supportsWebP.initialized||await dn.supportsWebP.initialize(),e._supportedImageFormats=new VN({webp:dn.supportsWebP(),basis:t.context.supportsBasis});let n=IQe(e,t);return e._state=so.PROCESSING,e._textureState=so.PROCESSING,l(e._gltfJsonLoader)&&e._releaseGltfJson&&(Li.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}function uH(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function gZe(e,t){let n=!0,i=e._geometryLoaders;for(let s=0;s<i.length;++s){let a=i[s].process(t);a&&l(e._geometryCallbacks[s])&&(e._geometryCallbacks[s](),e._geometryCallbacks[s]=void 0),n=n&&a}let r=e._structuralMetadataLoader;if(l(r)){let s=r.process(t);s&&(e._components.structuralMetadata=r.structuralMetadata),n=n&&s}let o=e._meshPrimitiveGpmLoader;if(l(o)){let s=o.process(t);s&&(l(e._components.structuralMetadata)&&_t("structural-metadata-gpm","The model defines both the 'EXT_structural_metadata' extension and the 'NGA_gpm_local' extension. The data from the 'EXT_structural_metadata' extension will be replaced with the data from the 'NGA_gpm_local' extension, and will no longer be available for styling and picking."),e._components.structuralMetadata=o.structuralMetadata),n=n&&s}n&&(e._state=so.POST_PROCESSING)}function _Ze(e,t){let n=e._primitiveLoadPlans;for(let i=0;i<n.length;i++){let r=n[i];r.postProcess(t),(r.needsOutlines||r.needsGaussianSplats)&&yZe(e,r)}}function yZe(e,t){let n=e._postProcessBuffers,i=t.primitive,r=i.outlineCoordinates;l(r)&&n.push(r.buffer);let o=i.attributes;for(let a=0;a<o.length;a++){let c=o[a];l(c.buffer)&&n.push(c.buffer)}let s=i.indices;l(s)&&l(s.buffer)&&n.push(s.buffer)}function AZe(e,t,n,i,r,o,s,a,c){let u=e.gltfJson,d=u.accessors[t].bufferView;return Li.getVertexBufferLoader({gltf:u,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:d,primitive:i,draco:r,spz:o,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:s,loadTypedArray:a})}function bZe(e,t,n,i,r,o,s){return Li.getIndexBufferLoader({gltf:e.gltfJson,accessorId:t,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:s,primitive:n,draco:i,asynchronous:e._asynchronous,loadBuffer:r,loadTypedArray:o})}function x_e(e,t){let n=Li.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function yJ(e,t,n){let i=t.byteOffset,r=Vu(e,t),o=t.count,s=Rf(t.type),a=t.componentType,c=Y.getSizeInBytes(a),u=c*s,f=o*s;if(r===u)return n=new Uint8Array(n),Y.createArrayBufferView(a,n.buffer,n.byteOffset+i,f);let d=Y.createTypedArray(a,f),p=new DataView(n.buffer),g=new Array(s),m=Ng(t.componentType);i=n.byteOffset+i;for(let y=0;y<o;++y){m(p,i,s,c,g);for(let A=0;A<s;++A)d[y*s+A]=g[A];i+=r}return d}function xZe(e,t){let n=e.type;if(n===Vt.SCALAR)return t.fill(0);let i=Vt.getMathType(n);return t.fill(i.clone(i.ZERO))}function TZe(e,t,n,i){let r=e.type,o=e.count;if(r===Vt.SCALAR)for(let s=0;s<o;s++)n[s]=t[s];else if(r===Vt.VEC4&&i)for(let s=0;s<o;s++)n[s]=Le.unpack(t,s*4);else{let s=Vt.getMathType(r),a=Vt.getNumberOfComponents(r);for(let c=0;c<o;c++)n[c]=s.unpack(t,c*a)}return n}async function EZe(e,t,n,i,r){let{gltfJson:o}=e;if(await t.load(),e.isDestroyed())return;let s=yJ(o,n,t.typedArray);i=i??!1,TZe(n,s,r,i)}function ZN(e,t,n){let i=new Array(t.count),r=t.bufferView;if(l(r)){let o=x_e(e,r),s=EZe(e,o,t,n,i);return e._loaderPromises.push(s),i}return xZe(t,i)}function fm(e,t){let n=Y.createTypedArray(t.componentType,t.count*Vt.getNumberOfComponents(t.type));if(!l(t.bufferView))return n;let i=x_e(e,t.bufferView),{gltfJson:r}=e,o=i.load().then(()=>{if(e.isDestroyed())return;let s=yJ(r,t,i.typedArray);n.set(s)});return e._loaderPromises.push(o),n}function Gu(e,t){if(l(t))return e===Number?t[0]:e.unpack(t)}function CZe(e){return e===Number?0:new e}function vZe(e){switch(e){case Y.BYTE:return 127;case Y.UNSIGNED_BYTE:return 255;case Y.SHORT:return 32767;case Y.UNSIGNED_SHORT:return 65535;default:return 1}}var SZe={VEC2:new U(-1,-1),VEC3:new h(-1,-1,-1),VEC4:new se(-1,-1,-1,-1)};function wZe(e,t){let n=vZe(e.componentDatatype),i=SZe[e.type],r=e.min;l(r)&&(r=t.divideByScalar(r,n,r),r=t.maximumByComponent(r,i,r));let o=e.max;l(o)&&(o=t.divideByScalar(o,n,o),o=t.maximumByComponent(o,i,o)),e.min=r,e.max=o}function IZe(e,t,n){let i=e.decodeMatrix,r=Gu(n,e.decodedMin),o=Gu(n,e.decodedMax);l(r)&&l(o)&&(t.min=r,t.max=o);let s=new Cn.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,i.length===4?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):i.length===9?(s.quantizedVolumeOffset=new U(i[6],i[7]),s.quantizedVolumeStepSize=new U(i[0],i[4])):i.length===16?(s.quantizedVolumeOffset=new h(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new h(i[0],i[5],i[10])):i.length===25&&(s.quantizedVolumeOffset=new se(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new se(i[0],i[6],i[12],i[18])),t.quantization=s}function PZe(e,t,n,i,r){let o=e.accessors[t],s=Vt.getMathType(o.type),a=o.normalized??!1,c=new HJe;c.name=n,c.semantic=i,c.setIndex=r,c.constant=CZe(s),c.componentDatatype=o.componentType,c.normalized=a,c.count=o.count,c.type=o.type,c.min=Gu(s,o.min),c.max=Gu(s,o.max),c.byteOffset=o.byteOffset,c.byteStride=Vu(e,o),tr(o,"WEB3D_quantized_attributes")&&IZe(o.extensions.WEB3D_quantized_attributes,c,s);let u=c.semantic===ct.POSITION||c.semantic===ct.NORMAL||c.semantic===ct.TANGENT||c.semantic===ct.TEXCOORD||c.semantic===ct.FEATURE_ID||c.semantic===ct.SCALE||c.semantic===ct.ROTATION;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&u&&wZe(c,s),c}function T_e(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var DZe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function AJ(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let r=t.fromGltfSemantic(i),o=DZe;return o.gltfSemantic=n,o.renamedSemantic=i,o.modelSemantic=r,o}function RZe(e){let t=e===ct.POSITION,n=e===ct.FEATURE_ID,i=e===ct.TEXCOORD;return t||n||i}function OZe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){let r=l(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=Y.createArrayBufferView(r,t.typedArray.buffer)}}function MZe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,n&&(e.buffer=t.buffer),i&&l(t.typedArray)&&(e.typedArray=Y.createArrayBufferView(e.componentDatatype,t.typedArray.buffer)),e.semantic===ct.POSITION){let r=s=>{let a=1/0,c=-1/0,u=1/0,f=-1/0,d=1/0,p=-1/0;for(let g=0;g<s.length;g+=3){let m=s[g],y=s[g+1],A=s[g+2];a=Math.min(a,m),c=Math.max(c,m),u=Math.min(u,y),f=Math.max(f,y),d=Math.min(d,A),p=Math.max(p,A)}return[new h(a,u,d),new h(c,f,p)]},o=e.typedArray;[e.min,e.max]=r(o)}}function NZe(e,t,n,i,r,o){if(r&&(n.buffer=i.buffer),o){let s=i.typedArray;n.typedArray=yJ(e,t,s),r||(n.byteOffset=0,n.byteStride=void 0)}}function E_e(e,t,n,i,r,o,s,a,c){let u=e.gltfJson,f=u.accessors[t],d=f.bufferView,p=n.gltfSemantic,g=n.renamedSemantic,m=n.modelSemantic,y=l(m)?T_e(g):void 0,b=PZe(u,t,p,m,y);if(!l(r)&&!l(d)&&!l(o))return b;let x=AZe(e,t,p,i,r,o,s,a,c),T=e._geometryLoaders.length;e._geometryLoaders.push(x);let E=x.load();return e._loaderPromises.push(E),e._geometryCallbacks[T]=()=>{l(r)&&l(r.attributes)&&l(r.attributes[p])?OZe(b,x,s,a):l(o)?MZe(b,x,s,a):NZe(u,f,b,x,s,a)},b}function C_e(e,t,n,i,r,o,s,a,c){let u=n.modelSemantic,f=u===ct.POSITION,d=u===ct.FEATURE_ID,p=f&&!s&&e._loadAttributesFor2D&&!c.scene3DOnly,g=f&&e._enablePick&&!c.context.webgl2,m=e._loadForClassification&&d,y=e._loadAttributesAsTypedArray,A=!y,b=y||p||g||m,E=E_e(e,t,n,i,r,o,a?!1:A,a?!0:b,c),v=new dT.AttributeLoadPlan(E);return v.loadBuffer=A,v.loadTypedArray=b,v}function LZe(e,t,n,i,r){let o=e.gltfJson.accessors,s=l(n.ROTATION),a=l(n.TRANSLATION)&&l(o[n.TRANSLATION].min)&&l(o[n.TRANSLATION].max),c=AJ(e,No,i),u=c.modelSemantic,f=u===No.TRANSLATION||u===No.ROTATION||u===No.SCALE,d=u===No.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&f||!r.context.instancedArrays,g=e._enablePick&&!r.context.webgl2,m=!p,y=e._loadAttributesFor2D&&!r.scene3DOnly;return E_e(e,t,c,void 0,void 0,void 0,m,p||d&&(!a||y||g),r)}function FZe(e,t,n,i,r,o){let s=e.gltfJson.accessors[t],a=s.bufferView,c=n.extensions??H.EMPTY_OBJECT,u=c.KHR_draco_mesh_compression,f=l(c.EXT_mesh_primitive_edge_visibility);if(!l(u)&&!l(a))return;let d=new GJe;d.count=s.count;let p=e._loadAttributesAsTypedArray,g=(e._loadIndicesForWireframe||e._enablePick)&&!o.context.webgl2,m=e._loadForClassification&&i,A=!p,b=p||g||m||f,E=bZe(e,t,n,u,r?!1:A,r?!0:b,o),v=e._geometryLoaders.length;e._geometryLoaders.push(E);let S=E.load();e._loaderPromises.push(S),e._geometryCallbacks[v]=()=>{d.indexDatatype=E.indexDatatype,d.buffer=E.buffer,d.typedArray=E.typedArray};let I=new dT.IndicesLoadPlan(d);return I.loadBuffer=A,I.loadTypedArray=b,I}function BZe(e,t,n){return new Ht({wrapR:e.wrapR,wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:t??e.minificationFilter,magnificationFilter:n??e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}function eu(e,t,n,i,r){let o=e.gltfJson,s=ju.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(s))return;let a=Li.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),c=ju.createModelTextureReader({textureInfo:t}),u=e._textureLoaders.length;e._textureLoaders.push(a);let f=a.load().catch(d=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw d;e._textureState=so.FAILED,e._textureErrors.push(d)}});return e._texturesPromises.push(f),e._textureCallbacks[u]=()=>{let d=a.texture;c.texture=d,(l(i)||l(r))&&(d.sampler=BZe(d.sampler,i,r))},c}function kZe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:r,diffuseFactor:o,specularFactor:s,glossinessFactor:a}=t,c=new aZe;return l(i)&&(c.diffuseTexture=eu(e,i,n)),l(r)&&(c.specularGlossinessTexture=eu(e,r,n)),c.diffuseFactor=Gu(se,o),c.specularFactor=Gu(h,s),c.glossinessFactor=a,c}function UZe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:r,baseColorFactor:o,metallicFactor:s,roughnessFactor:a}=t,c=new sZe;return l(i)&&(c.baseColorTexture=eu(e,i,n)),l(r)&&(c.metallicRoughnessTexture=eu(e,r,n)),c.baseColorFactor=Gu(se,o),c.metallicFactor=s,c.roughnessFactor=a,c}function zZe(e,t,n){let{specularFactor:i,specularTexture:r,specularColorFactor:o,specularColorTexture:s}=t,a=new cZe;return l(r)&&(a.specularTexture=eu(e,r,n)),l(s)&&(a.specularColorTexture=eu(e,s,n)),a.specularFactor=i,a.specularColorFactor=Gu(h,o),a}function VZe(e,t,n){let{anisotropyStrength:i=pJ.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:r=pJ.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:o}=t,s=new pJ;return l(o)&&(s.anisotropyTexture=eu(e,o,n)),s.anisotropyStrength=i,s.anisotropyRotation=r,s}function jZe(e,t,n){let{clearcoatFactor:i=gJ.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:r,clearcoatRoughnessFactor:o=gJ.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new gJ;return l(r)&&(c.clearcoatTexture=eu(e,r,n)),l(s)&&(c.clearcoatRoughnessTexture=eu(e,s,n)),l(a)&&(c.clearcoatNormalTexture=eu(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=o,c}function HZe(e){return new lZe(e)}function GZe(e){if(!l(e))return;let t=new uZe;if(l(e.width)){let n=e.width;n>0&&Math.floor(n)===n&&(t.width=n)}if(l(e.pattern)){let n=e.pattern;n>=0&&n<=65535&&Math.floor(n)===n&&(t.pattern=n)}if(!(!l(t.width)&&!l(t.pattern)))return t}function WZe(e,t,n){let i=new fZe,r=t.extensions??H.EMPTY_OBJECT,o=r.KHR_materials_pbrSpecularGlossiness,s=r.KHR_materials_specular,a=r.KHR_materials_anisotropy,c=r.KHR_materials_clearcoat,u=t.pbrMetallicRoughness,f=r.BENTLEY_materials_planar_fill;i.unlit=l(r.KHR_materials_unlit),l(o)?i.specularGlossiness=kZe(e,o,n):(l(u)&&(i.metallicRoughness=UZe(e,u,n)),l(s)&&!i.unlit&&(i.specular=zZe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=VZe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=jZe(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=eu(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=eu(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=eu(e,t.occlusionTexture,n)),i.emissiveFactor=Gu(h,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,l(f)&&(i.planarFill=HZe(f));let d=r.BENTLEY_materials_point_style;if(l(d)&&l(d.diameter)){let p=d.diameter;p>=1&&(i.pointDiameter=Math.floor(p))}return i.lineStyle=GZe(r.BENTLEY_materials_line_style),i}function v_e(e,t){let n=new y_e;return n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.propertyTableId=e.propertyTable,n.setIndex=e.attribute,n.label=e.label,n.positionalLabel=t,n}function S_e(e,t,n,i){let r=new y_e,o=e.featureIds;return r.featureCount=n,r.propertyTableId=t,r.setIndex=T_e(o.attribute),r.positionalLabel=i,r}function w_e(e,t){let n=new b_e;return n.propertyTableId=e.propertyTable,n.featureCount=e.featureCount,n.nullFeatureId=e.nullFeatureId,n.label=e.label,n.positionalLabel=t,n.offset=0,n.repeat=1,n}function I_e(e,t,n,i){let r=new b_e,o=e.featureIds;r.propertyTableId=t,r.featureCount=n,r.offset=o.constant??0;let s=o.divisor??0;return r.repeat=s===0?void 0:s,r.positionalLabel=i,r}function qZe(e,t,n,i){let r=new A_e;r.featureCount=t.featureCount,r.nullFeatureId=t.nullFeatureId,r.propertyTableId=t.propertyTable,r.label=t.label,r.positionalLabel=i;let o=t.texture;r.textureReader=eu(e,o,n,Wt.NEAREST,Zn.NEAREST);let a=(l(o.channels)?o.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return r.textureReader.channels=a,r}function YZe(e,t,n,i,r,o){let s=new A_e,a=t.featureIds,c=a.texture;return s.featureCount=r,s.propertyTableId=n,s.textureReader=eu(e,c,i,Wt.NEAREST,Zn.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=o,s}function XZe(e,t,n,i,r){let o=new WJe,s=void 0,a=void 0,c=void 0,u=!1;for(let f in t){if(!t.hasOwnProperty(f))continue;let d=t[f],p=AJ(e,ct,f),g=C_e(e,d,p,s,a,c,u,n,r);o.attributes.push(g.attribute),i.attributePlans.push(g)}return o}function KZe(e){let i=e?.KHR_gaussian_splatting?.extensions?.KHR_gaussian_splatting_compression_spz_2;if(l(i))return i}function P_e(e,t){if(!l(t))return;let n=e.gltfJson.materials;if(!l(n)||t<0||t>=n.length)return;let i=n[t];if(!l(i))return;let r=i.pbrMetallicRoughness??H.EMPTY_OBJECT,o=Gu(se,r.baseColorFactor);return l(o)?o:new se(1,1,1,1)}function $Ze(e){switch(e){case Y.UNSIGNED_BYTE:return 255;case Y.UNSIGNED_SHORT:return 65535;case Y.UNSIGNED_INT:return 4294967295;default:throw new oe("EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.")}}function JZe(e,t,n){if(!l(t)||t.length===0)return;let i=new Array(t.length);for(let r=0;r<t.length;r++){let o=t[r]??H.EMPTY_OBJECT,s=o.indices,a=e.gltfJson.accessors[s];if(!l(a))throw new oe("Edge visibility line string accessor not found!");let c=fm(e,a),u=$Ze(a.componentType),f=l(o.material)?o.material:n;i[r]={indices:c,restartIndex:u,componentType:a.componentType,materialColor:P_e(e,f)}}return i}function ZZe(e,t){if(!l(t))return;let n={},i=t.visibility;if(l(i)){let r=e.gltfJson.accessors[i];if(!l(r))throw new oe("Edge visibility accessor not found!");n.visibility=fm(e,r)}if(n.materialColor=P_e(e,t.material),l(t.silhouetteNormals)){let r=e.gltfJson.accessors[t.silhouetteNormals];l(r)&&(n.silhouetteNormals=fm(e,r))}return l(t.lineStrings)&&(n.lineStrings=JZe(e,t.lineStrings,t.material)),n}function QZe(e,t,n,i){let r=new qJe,o=new dT(r);e._primitiveLoadPlans.push(o);let s=t.material;l(s)&&(r.material=WZe(e,e.gltfJson.materials[s],i));let a=t.extensions??H.EMPTY_OBJECT,c=a.EXT_mesh_polygon;l(c)&&(r.polygon=tQe(e,t,c));let u=a.CESIUM_mesh_vector;l(u)&&(r.vector=nQe(e,u));let f=!1,d=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(d)&&(f=!0,o.needsOutlines=!0,o.outlineIndices=eQe(e,d,o)),r.edgeVisibility=ZZe(e,a.EXT_mesh_primitive_edge_visibility);let p=KZe(a);l(p)&&(f=!0,o.needsGaussianSplats=!0);let g=e._loadForClassification,m=a.KHR_draco_mesh_compression,y=!1,A=t.attributes;if(l(A))for(let O in A){if(!A.hasOwnProperty(O))continue;let L=A[O],_=AJ(e,ct,O),C=_.modelSemantic;if(g&&!RZe(C))continue;C===ct.FEATURE_ID&&(y=!0);let w=C_e(e,L,_,t,m,p,n,f,i);o.attributePlans.push(w),r.attributes.push(w.attribute)}let b=t.targets;if(l(b)&&!g)for(let O=0;O<b.length;++O)r.morphTargets.push(XZe(e,b[O],f,o,i));let x=t.indices;if(l(x)){let O=FZe(e,x,t,y,f,i);l(O)&&(o.indicesPlan=O,r.indices=O.indices)}let T=a.EXT_structural_metadata,E=a.EXT_mesh_features,v=a.EXT_feature_metadata,S=l(v),I=a.NGA_gpm_local;l(E)?iQe(e,r,E,i):S&&rQe(e,r,v,i),l(T)?oQe(r,T):S&&sQe(e,r,v),l(I)&&aQe(r,I);let R=t.mode;if(g&&R!==Oe.TRIANGLES)throw new oe("Only triangle meshes can be used for classification.");return r.primitiveType=R,r}function eQe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return ZN(e,i,!1)}function tQe(e,t,n){let i=new hZe,r=e.gltfJson.accessors;return i.count=n.count,t.mode===Oe.LINE_LOOP?(i.loopIndices=fm(e,r[t.indices]),i.loopIndicesOffsets=fm(e,r[n.indicesOffsets]),i.triangleIndices=fm(e,r[n.triangleIndices]),i.triangleIndicesOffsets=fm(e,r[n.triangleIndicesOffsets])):t.mode===Oe.TRIANGLES&&(i.loopIndices=fm(e,r[n.loopIndices]),i.loopIndicesOffsets=fm(e,r[n.loopIndicesOffsets]),i.triangleIndices=fm(e,r[t.indices]),i.triangleIndicesOffsets=fm(e,r[n.indicesOffsets])),i}function nQe(e,t){if(!l(t))return;let n=new dZe;n.vector=t.vector,n.count=t.count;let i=e.gltfJson.accessors;function r(o,s){if(l(o))return ZN(e,i[o])}return n.polygonAttributeOffsets=r(t.polygonAttributeOffsets,"polygonAttributeOffsets"),n.polygonHoleCounts=r(t.polygonHoleCounts,"polygonHoleCounts"),n.polygonHoleOffsets=r(t.polygonHoleOffsets,"polygonHoleOffsets"),n.polygonIndicesOffsets=r(t.polygonIndicesOffsets,"polygonIndicesOffsets"),n}function iQe(e,t,n,i){let r;l(n)&&l(n.featureIds)?r=n.featureIds:r=[];for(let o=0;o<r.length;o++){let s=r[o],a=`featureId_${o}`,c;l(s.texture)?c=qZe(e,s,i,a):l(s.attribute)?c=v_e(s,a):c=w_e(s,a),t.featureIds.push(c)}}function rQe(e,t,n,i){let{featureTables:r}=e.gltfJson.extensions.EXT_feature_metadata,o=0,s=n.featureIdAttributes;if(l(s))for(let c=0;c<s.length;++c){let u=s[c],f=u.featureTable,d=e._sortedPropertyTableIds.indexOf(f),p=r[f].count,g=`featureId_${o}`;o++;let m;l(u.featureIds.attribute)?m=S_e(u,d,p,g):m=I_e(u,d,p,g),t.featureIds.push(m)}let a=n.featureIdTextures;if(l(a))for(let c=0;c<a.length;++c){let u=a[c],f=u.featureTable,d=e._sortedPropertyTableIds.indexOf(f),p=r[f].count,g=`featureId_${o}`;o++;let m=YZe(e,u,d,i,p,g);t.featureIds.push(m)}}function oQe(e,t){if(!l(t))return;let{propertyTextures:n,propertyAttributes:i}=t;l(n)&&(e.propertyTextureIds=n),l(i)&&(e.propertyAttributeIds=i)}function sQe(e,t,n){l(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function aQe(e,t){let n=t.ppeTextures??[];for(let i=0;i<n.length;i++)e.propertyTextureIds.push(i)}function cQe(e,t,n){let i=t.EXT_mesh_gpu_instancing,r=new YJe,o=i.attributes;if(l(o))for(let u in o){if(!o.hasOwnProperty(u))continue;let f=o[u];r.attributes.push(LZe(e,f,o,u,n))}let s=i.extensions??H.EMPTY_OBJECT,a=t.EXT_instance_features,c=s.EXT_feature_metadata;return l(a)?lQe(r,a):l(c)&&uQe(e.gltfJson,r,c,e._sortedPropertyTableIds),r}function lQe(e,t){let n=t.featureIds;for(let i=0;i<n.length;i++){let r=n[i],o=`instanceFeatureId_${i}`,s;l(r.attribute)?s=v_e(r,o):s=w_e(r,o),e.featureIds.push(s)}}function uQe(e,t,n,i){let r=e.extensions.EXT_feature_metadata.featureTables,o=n.featureIdAttributes;if(l(o))for(let s=0;s<o.length;++s){let a=o[s],c=a.featureTable,u=i.indexOf(c),f=r[c].count,d=`instanceFeatureId_${s}`,p;l(a.featureIds.attribute)?p=S_e(a,u,f,d):p=I_e(a,u,f,d),t.featureIds.push(p)}}function fQe(e,t,n){let i=new KJe;i.name=t.name,i.matrix=Gu(N,t.matrix),i.translation=Gu(h,t.translation),i.rotation=Gu(Le,t.rotation),i.scale=Gu(h,t.scale);let r=t.extensions??H.EMPTY_OBJECT,o=r.EXT_mesh_gpu_instancing,s=r.AGI_articulations,a=r.CESIUM_mesh_vector;if(l(o)){if(e._loadForClassification)throw new oe("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=cQe(e,r,n)}l(s)&&(i.articulationName=s.articulationName),l(a)&&(i.meshVector=a);let c=t.mesh;if(l(c)){let u=e.gltfJson.meshes[c],f=JN(u);for(let g=0;g<f.length;++g)i.primitives.push(QZe(e,f[g],l(i.instances),n));let d=t.weights??u.weights,p=i.primitives[0].morphTargets;i.morphWeights=l(d)?d.slice():new Array(p.length).fill(0)}return i}function dQe(e,t){let n=e.gltfJson.nodes;if(!l(n))return[];let i=n.map(function(r,o){let s=fQe(e,r,t);return s.index=o,s});for(let r=0;r<i.length;++r){let o=n[r].children;if(l(o))for(let s=0;s<o.length;++s)i[r].children.push(i[o[s]])}return i}function hQe(e,t,n){let i=new XJe,r=t.joints;i.joints=r.map(s=>n[s]);let o=t.inverseBindMatrices;if(l(o)){let s=e.gltfJson.accessors[o];i.inverseBindMatrices=ZN(e,s)}else i.inverseBindMatrices=new Array(r.length).fill(N.IDENTITY);return i}function mQe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(o,s){let a=hQe(e,o,t);return a.index=s,a}),r=e.gltfJson.nodes;for(let o=0;o<t.length;++o){let s=r[o].skin;l(s)&&(t[o].skin=i[s])}return i}async function pQe(e,t,n,i){let r=new zN({gltf:e.gltfJson,extension:t,extensionLegacy:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._structuralMetadataLoader=r,r.load()}async function gQe(e,t,n,i){let r=new $N({gltf:t,extension:n,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:i,asynchronous:e._asynchronous});return e._meshPrimitiveGpmLoader=r,r.load()}function _Qe(e,t){let n=new JJe,i=e.gltfJson.accessors,r=i[t.input];n.input=ZN(e,r);let o=t.interpolation;n.interpolation=um[o]??um.LINEAR;let s=i[t.output];return n.output=ZN(e,s,!0),n}function yQe(e,t){let n=new ZJe,i=e.node;if(!l(i))return;n.node=t[i];let r=e.path.toUpperCase();return n.path=$Je[r],n}function AQe(e,t,n){let i=new QJe,r=e.sampler;return i.sampler=t[r],i.target=yQe(e.target,n),i}function bQe(e,t,n){let i=new eZe;i.name=t.name;let r=t.samplers.map(function(s,a){let c=_Qe(e,s);return c.index=a,c}),o=t.channels.map(function(s){return AQe(s,r,n)});return i.samplers=r,i.channels=o,i}function xQe(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!l(n)?[]:n.map(function(r,o){let s=bQe(e,r,t);return s.index=o,s})}function TQe(e){let t=new tZe;t.name=e.name;let n=e.type.toUpperCase();return t.type=ul[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function EQe(e){let t=new nZe;return t.name=e.name,t.stages=e.stages.map(TQe),t}function CQe(e){let n=(e.extensions??H.EMPTY_OBJECT).AGI_articulations?.articulations;return l(n)?n.map(EQe):[]}function vQe(e){let t;return l(e.scenes)&&l(e.scene)&&(t=e.scenes[e.scene].nodes),t=t??e.nodes,t=l(t)?t:[],t}function SQe(e,t){let n=new rZe,i=vQe(e);return n.nodes=i.map(function(r){return t[r]}),n}var wQe=new h;function IQe(e,t){let n=e.gltfJson,i=n.extensions??H.EMPTY_OBJECT,r=i.EXT_structural_metadata,o=i.EXT_feature_metadata,s=i.CESIUM_RTC;if(l(o)){let x=o.featureTables,T=o.featureTextures,E=l(x)?x:[],v=l(T)?T:[];e._sortedPropertyTableIds=Object.keys(E).sort(),e._sortedFeatureTextureIds=Object.keys(v).sort()}let a=dQe(e,t),c=mQe(e,a),u=xQe(e,a),f=CQe(n),d=SQe(n,a),p=new oZe,g=new iZe,m=n.asset.copyright;if(l(m)){let x=m.split(";").map(function(T){return new It(T.trim())});g.credits=x}if(p.asset=g,p.scene=d,p.nodes=a,p.skins=c,p.animations=u,p.articulations=f,p.upAxis=e._upAxis,p.forwardAxis=e._forwardAxis,l(s)){let x=h.fromArray(s.center,0,wQe);p.transform=N.fromTranslation(x,p.transform)}if(e._components=p,l(r)||l(o)){let x=pQe(e,r,o,t);e._loaderPromises.push(x)}let y=i.NGA_gpm_local;if(l(y)){let x=qN.load(y);e._components.extensions.NGA_gpm_local=x}let A=n.meshes;if(l(A))for(let x of A){let T=x.primitives;if(l(T))for(let E of T){let v=E.extensions;if(l(v)){let S=v.NGA_gpm_local;if(l(S)){let I=gQe(e,n,S,t);e._loaderPromises.push(I)}}}}let b=[];return ti(b,e._loaderPromises),e._incrementallyLoadTextures||ti(b,e._texturesPromises),Promise.all(b)}function PQe(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._textureLoaders.length=0}function __e(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._bufferViewLoaders.length=0}function DQe(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&Li.unload(t[n]);e._geometryLoaders.length=0}function RQe(e){let t=e._postProcessBuffers;for(let n=0;n<t.length;n++){let i=t[n];i.isDestroyed()||i.destroy()}t.length=0}function OQe(e){l(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function MQe(e){l(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}var Lf=_J;function yS(e){e=e??H.EMPTY_OBJECT;let{context:t,width:n,height:i,colorRenderbuffers:r,colorTextures:o,depthStencilRenderbuffer:s,depthStencilTexture:a,destroyAttachments:c}=e;if(this._width=n,this._height=i,l(r)!==l(o))throw new pe("Both color renderbuffer and texture attachments must be provided.");if(l(s)!==l(a))throw new pe("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new ys({context:t,colorRenderbuffers:r,depthStencilRenderbuffer:s,destroyAttachments:c}),this._colorFramebuffer=new ys({context:t,colorTextures:o,depthStencilTexture:a,destroyAttachments:c})}yS.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};yS.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};yS.prototype.blitFramebuffers=function(e,t){this._renderFramebuffer.bindRead(),this._colorFramebuffer.bindDraw();let n=e._gl,i=0;this._colorFramebuffer._colorTextures.length>0&&(i|=n.COLOR_BUFFER_BIT),l(this._colorFramebuffer.depthStencilTexture)&&(i|=n.DEPTH_BUFFER_BIT|(t?n.STENCIL_BUFFER_BIT:0)),n.blitFramebuffer(0,0,this._width,this._height,0,0,this._width,this._height,i,n.NEAREST),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null)};yS.prototype.isDestroyed=function(){return!1};yS.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),le(this)};var QN=yS;var tu={RGBA4:te.RGBA4,RGBA8:te.RGBA8,RGBA16F:te.RGBA16F,RGBA32F:te.RGBA32F,RGB5_A1:te.RGB5_A1,RGB565:te.RGB565,DEPTH_COMPONENT16:te.DEPTH_COMPONENT16,STENCIL_INDEX8:te.STENCIL_INDEX8,DEPTH_STENCIL:te.DEPTH_STENCIL,DEPTH24_STENCIL8:te.DEPTH24_STENCIL8,validate:function(e){return e===tu.RGBA4||e===tu.RGBA8||e===tu.RGBA16F||e===tu.RGBA32F||e===tu.RGB5_A1||e===tu.RGB565||e===tu.DEPTH_COMPONENT16||e===tu.STENCIL_INDEX8||e===tu.DEPTH_STENCIL||e===tu.DEPTH24_STENCIL8},getColorFormat:function(e){return e===te.FLOAT?tu.RGBA32F:e===te.HALF_FLOAT_OES?tu.RGBA16F:tu.RGBA8}};Object.freeze(tu);var nu=tu;function eL(e){e=e??H.EMPTY_OBJECT;let t=e.context,n=t._gl,i=Ut.maximumRenderbufferSize,r=e.format??nu.RGBA4,o=l(e.width)?e.width:t.drawingBufferWidth,s=l(e.height)?e.height:t.drawingBufferHeight,a=e.numSamples??1;this._gl=n,this._format=r,this._width=o,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,r,o,s):n.renderbufferStorage(n.RENDERBUFFER,r,o,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(eL.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});eL.prototype._getRenderbuffer=function(){return this._renderbuffer};eL.prototype.isDestroyed=function(){return!1};eL.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),le(this)};var Ff=eL;function Aa(e){e=e??H.EMPTY_OBJECT,this._numSamples=e.numSamples??1,this._colorAttachmentsLength=e.colorAttachmentsLength??1,this._color=e.color??!0,this._depth=e.depth??!1,this._depthStencil=e.depthStencil??!1,this._supportsDepthTexture=e.supportsDepthTexture??!1,this._createColorAttachments=e.createColorAttachments??!0,this._createDepthAttachments=e.createDepthAttachments??!0,this._pixelDatatype=e.pixelDatatype,this._pixelFormat=e.pixelFormat,this._width=void 0,this._height=void 0,this._framebuffer=void 0,this._multisampleFramebuffer=void 0,this._colorTextures=void 0,this._color&&(this._colorTextures=new Array(this._colorAttachmentsLength),this._colorRenderbuffers=new Array(this._colorAttachmentsLength)),this._colorRenderbuffer=void 0,this._depthStencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthRenderbuffer=void 0,this._depthTexture=void 0,this._attachmentsDirty=!1}Object.defineProperties(Aa.prototype,{framebuffer:{get:function(){return this._numSamples>1?this._multisampleFramebuffer.getRenderFramebuffer():this._framebuffer}},numSamples:{get:function(){return this._numSamples}},status:{get:function(){return this.framebuffer.status}}});Aa.prototype.isDirty=function(e,t,n,i,r){n=n??1;let o=this._width!==e||this._height!==t,s=this._numSamples!==n,a=l(i)&&this._pixelDatatype!==i||l(r)&&this._pixelFormat!==r,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||o||s||a||!c||this._color&&!l(this._colorTextures[0])};Aa.prototype.update=function(e,t,n,i,r,o){if(i=e.msaa?i??1:1,r=r??(this._color?this._pixelDatatype??ze.UNSIGNED_BYTE:void 0),o=o??(this._color?this._pixelFormat??Ke.RGBA:void 0),this.isDirty(t,n,i,r,o)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=r,this._pixelFormat=o,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s<this._colorAttachmentsLength;++s)if(this._colorTextures[s]=new Dt({context:e,width:t,height:n,pixelFormat:o,pixelDatatype:r,sampler:Ht.NEAREST}),this._numSamples>1){let a=nu.getColorFormat(r);this._colorRenderbuffers[s]=new Ff({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Dt({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:Ht.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new Ff({context:e,width:t,height:n,format:nu.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new Ff({context:e,width:t,height:n,format:nu.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Dt({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_COMPONENT,pixelDatatype:ze.UNSIGNED_INT,sampler:Ht.NEAREST}):this._depthRenderbuffer=new Ff({context:e,width:t,height:n,format:nu.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new QN({context:e,width:this._width,height:this._height,colorTextures:this._colorTextures,colorRenderbuffers:this._colorRenderbuffers,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1}):this._framebuffer=new ys({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};Aa.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};Aa.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};Aa.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};Aa.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};Aa.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};Aa.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};Aa.prototype.getDepthTexture=function(){return this._depthTexture};Aa.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};Aa.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};Aa.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};Aa.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};Aa.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};Aa.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};Aa.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};Aa.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};Aa.prototype.destroy=function(){if(this._color){let e=this._colorTextures,t=this._colorRenderbuffers;for(let n=0;n<e.length;++n){let i=e[n];this._createColorAttachments&&l(i)&&!i.isDestroyed()&&i.destroy(),l(i)&&i.isDestroyed()&&(e[n]=void 0);let r=t[n];this._createColorAttachments&&l(r)&&!r.isDestroyed()&&r.destroy(),l(r)&&r.isDestroyed()&&(t[n]=void 0)}}this._depthStencil&&(this._createDepthAttachments&&(this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()),l(this._depthStencilTexture)&&this._depthStencilTexture.isDestroyed()&&(this._depthStencilTexture=void 0),l(this._depthStencilRenderbuffer)&&this._depthStencilRenderbuffer.isDestroyed()&&(this._depthStencilRenderbuffer=void 0)),this._depth&&(this._createDepthAttachments&&(this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy()),l(this._depthTexture)&&this._depthTexture.isDestroyed()&&(this._depthTexture=void 0),l(this._depthRenderbuffer)&&this._depthRenderbuffer.isDestroyed()&&(this._depthRenderbuffer=void 0)),this.destroyFramebuffer()};var ai=Aa;var tL=`uniform sampler2D u_pointCloud_colorGBuffer;
uniform sampler2D u_pointCloud_depthGBuffer;
uniform vec2 u_distanceAndEdlStrength;
in vec2 v_textureCoordinates;
vec2 neighborContribution(float log2Depth, vec2 offset)
{
float dist = u_distanceAndEdlStrength.x;
vec2 texCoordOrig = v_textureCoordinates + offset * dist;
vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);
float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));
if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
return vec2(0.0);
}
float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
}
void main()
{
float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
eyeCoordinate /= eyeCoordinate.w;
float log2Depth = log2(-eyeCoordinate.z);
if (depthOrLogDepth == 0.0)
{
discard;
}
vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);
vec2 texelSize = 1.0 / czm_viewport.zw;
vec2 responseAndCount = vec2(0.0);
responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));
float response = responseAndCount.x / responseAndCount.y;
float strength = u_distanceAndEdlStrength.y;
float shade = exp(-response * 300.0 * strength);
color.rgb *= shade;
out_FragColor = vec4(color);
gl_FragDepth = depthOrLogDepth;
}
`;function AS(){this._framebuffer=new ai({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(AS.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});function NQe(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var bJ=new U;function LQe(e,t){let n=new Ye({defines:["LOG_DEPTH_WRITE"],sources:[tL]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return bJ.x=e._radius,bJ.y=e._strength,bJ}},r=Ge.fromCache({blending:tn.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Yt.setCesium3DTileBit(),stencilMask:Yt.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:r,pass:Ie.CESIUM_3D_TILE,owner:e}),e._clearCommand=new ui({framebuffer:e.framebuffer,color:new z(0,0,0,0),depth:1,renderState:Ge.fromCache(),pass:Ie.CESIUM_3D_TILE,owner:e})}function FQe(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),LQe(e,t)}function D_e(e){return e.drawBuffers&&e.fragmentDepth}AS.isSupported=D_e;function BQe(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!l(n)){let i=t._attributeLocations,r=t.fragmentShaderSource.clone();r.sources.splice(0,0,`layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;`),r.sources=r.sources.map(function(o){return o=Ye.replaceMain(o,"czm_point_cloud_post_process_main"),o=o.replaceAll(/out_FragColor/g,"out_FragData_0"),o}),r.sources.push(`void main()
{
czm_point_cloud_post_process_main();
#ifdef LOG_DEPTH
czm_writeLogDepth();
out_FragData_1 = czm_packDepth(gl_FragDepth);
#else
out_FragData_1 = czm_packDepth(gl_FragCoord.z);
#endif
}`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:r,attributeLocations:i})}return n}AS.prototype.update=function(e,t,n,i){if(!D_e(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,FQe(this,e.context);let r,o=e.commandList,s=o.length;for(r=t;r<s;++r){let u=o[r];if(u.primitiveType!==Oe.POINTS||u.pass===Ie.TRANSLUCENT)continue;let f,d,p=u.derivedCommands.pointCloudProcessor;l(p)&&(f=p.command,d=p.originalShaderProgram),(!l(f)||u.dirty||d!==u.shaderProgram||f.framebuffer!==this.framebuffer)&&(f=at.shallowClone(u,f),f.framebuffer=this.framebuffer,f.shaderProgram=BQe(e.context,u.shaderProgram),f.castShadows=!1,f.receiveShadows=!1,l(p)||(p={command:f,originalShaderProgram:u.shaderProgram},u.derivedCommands.pointCloudProcessor=p),p.originalShaderProgram=u.shaderProgram),o[r]=f}let a=this._clearCommand,c=this._drawCommand;c.boundingVolume=i,o.push(c),o.push(a)};AS.prototype.isDestroyed=function(){return!1};AS.prototype.destroy=function(){return NQe(this),le(this)};var Vg=AS;function R_e(e){let t=e??{};this.attenuation=t.attenuation??!1,this.geometricErrorScale=t.geometricErrorScale??1,this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=t.eyeDomeLighting??!0,this.eyeDomeLightingStrength=t.eyeDomeLightingStrength??1,this.eyeDomeLightingRadius=t.eyeDomeLightingRadius??1,this.backFaceCulling=t.backFaceCulling??!1,this.normalShading=t.normalShading??!0}R_e.isSupported=function(e){return Vg.isSupported(e.context)};var Yp=R_e;var Lc={},kQe=new se(0,0,0,1),fl=new se,UQe=new et,xJ=new U,TJ=new U;Lc.worldToWindowCoordinates=function(e,t,n){return Lc.worldWithEyeOffsetToWindowCoordinates(e,t,h.ZERO,n)};var O_e=new se,M_e=new h;function nL(e,t,n,i){let r=n.viewMatrix,o=N.multiplyByVector(r,se.fromElements(e.x,e.y,e.z,1,O_e),O_e),s=h.multiplyComponents(t,h.normalize(o,M_e),M_e);return o.x+=t.x+s.x,o.y+=t.y+s.y,o.z+=s.z,N.multiplyByVector(n.frustum.projectionMatrix,o,i)}var zQe=new he(Math.PI,D.PI_OVER_TWO),VQe=new h,jQe=new h;Lc.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){let r=e.frameState,o=Lc.computeActualEllipsoidPosition(r,t,kQe);if(!l(o))return;let s=e.canvas,a=UQe;a.x=0,a.y=0,a.width=s.clientWidth,a.height=s.clientHeight;let c=e.camera,u=!1;if(r.mode===re.SCENE2D){let f=e.mapProjection,d=zQe,p=f.project(d,VQe),g=h.clone(c.position,jQe),m=c.frustum.clone(),y=N.computeViewportTransformation(a,0,1,new N),A=c.frustum.projectionMatrix,b=c.positionWC.y,x=h.fromElements(D.sign(b)*p.x-b,0,-c.positionWC.x),T=At.pointToGLWindowCoordinates(A,y,x);if(b===0||T.x<=0||T.x>=s.clientWidth)u=!0;else{if(T.x>s.clientWidth*.5){a.width=T.x,c.frustum.right=p.x-b,fl=nL(o,n,c,fl),Lc.clipToGLWindowCoordinates(a,fl,xJ),a.x+=T.x,c.position.x=-c.position.x;let E=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-E,fl=nL(o,n,c,fl),Lc.clipToGLWindowCoordinates(a,fl,TJ)}else{a.x+=T.x,a.width-=T.x,c.frustum.left=-p.x-b,fl=nL(o,n,c,fl),Lc.clipToGLWindowCoordinates(a,fl,xJ),a.x=a.x-a.width,c.position.x=-c.position.x;let E=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-E,fl=nL(o,n,c,fl),Lc.clipToGLWindowCoordinates(a,fl,TJ)}h.clone(g,c.position),c.frustum=m.clone(),i=U.clone(xJ,i),(i.x<0||i.x>s.clientWidth)&&(i.x=TJ.x)}}if(r.mode!==re.SCENE2D||u){if(fl=nL(o,n,c,fl),fl.z<0&&!(c.frustum instanceof gn)&&!(c.frustum instanceof As))return;i=Lc.clipToGLWindowCoordinates(a,fl,i)}return i.y=s.clientHeight-i.y,i};Lc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=Lc.worldToWindowCoordinates(e,t,n),!!l(n))return Lc.transformWindowToDrawingBuffer(e,n,n)};var jg=new h,HQe=new he;Lc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===re.SCENE3D)return h.clone(t,n);let r=e.mapProjection,o=r.ellipsoid.cartesianToCartographic(t,HQe);if(!l(o))return;if(r.project(o,jg),i===re.COLUMBUS_VIEW)return h.fromElements(jg.z,jg.x,jg.y,n);if(i===re.SCENE2D)return h.fromElements(0,jg.x,jg.y,n);let s=e.morphTime;return h.fromElements(D.lerp(jg.z,t.x,s),D.lerp(jg.x,t.y,s),D.lerp(jg.y,t.z,s),n)};var N_e=new h,L_e=new h,F_e=new N;Lc.clipToGLWindowCoordinates=function(e,t,n){return h.divideByScalar(t,t.w,N_e),N.computeViewportTransformation(e,0,1,F_e),N.multiplyByPoint(F_e,N_e,L_e),U.fromCartesian3(L_e,n)};Lc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,r=e.drawingBufferWidth/i.clientWidth,o=e.drawingBufferHeight/i.clientHeight;return U.fromElements(t.x*r,t.y*o,n)};var GQe=new se,B_e=new se;Lc.drawingBufferToWorldCoordinates=function(e,t,n,i){let o=e.context.uniformState,s=o.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let g=n*o.log2FarDepthFromNearPlusOne,m=Math.pow(2,g)-1;n=c*(1-a/(m+a))/(c-a)}let u=e.view.passState.viewport,f=se.clone(se.UNIT_W,GQe);f.x=(t.x-u.x)/u.width*2-1,f.y=(t.y-u.y)/u.height*2-1,f.z=n*2-1,f.w=1;let d,p=e.camera.frustum;if(l(p.fovy)){d=N.multiplyByVector(o.inverseViewProjection,f,B_e);let g=1/d.w;h.multiplyByScalar(d,g,d)}else{let g=p.offCenterFrustum;l(g)&&(p=g),d=B_e,d.x=(f.x*(p.right-p.left)+p.left+p.right)*.5,d.y=(f.y*(p.top-p.bottom)+p.bottom+p.top)*.5,d.z=(f.z*(a-c)-a-c)*.5,d.w=1,d=N.multiplyByVector(o.inverseView,d,d)}return h.fromCartesian4(d,i)};var dr=Lc;var bS={};bS._deprecationWarning=qr;var Hg=Uint32Array.BYTES_PER_ELEMENT;bS.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),r=new DataView(e);t+=Hg;let o=r.getUint32(t,!0);if(o!==1)throw new oe(`Only Batched 3D Model version 1 is supported. Version ${o} is not.`);t+=Hg;let s=r.getUint32(t,!0);t+=Hg;let a=r.getUint32(t,!0);t+=Hg;let c=r.getUint32(t,!0);t+=Hg;let u=r.getUint32(t,!0);t+=Hg;let f=r.getUint32(t,!0);t+=Hg;let d;u>=570425344?(t-=Hg*2,d=a,u=c,f=0,a=0,c=0,bS._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):f>=570425344&&(t-=Hg,d=u,u=a,f=c,a=0,c=0,bS._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;a===0?p={BATCH_LENGTH:d??0}:(p=Ro(i,t,a),t+=a);let g=new Uint8Array(e,t,c);t+=c;let m,y;u>0&&(m=Ro(i,t,u),t+=u,f>0&&(y=new Uint8Array(e,t,f),y=new Uint8Array(y),t+=f));let A=n+s-t;if(A===0)throw new oe("glTF byte length must be greater than 0.");let b;return t%4===0?b=new Uint8Array(e,t,A):(bS._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),b=new Uint8Array(i.subarray(t,t+A))),{batchLength:d,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:y,gltf:b}};var iL=bS;function rL(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function k_e(e,t,n,i,r,o){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=Y.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+o,r*i),s[t]=a),a}function WQe(e,t,n,i){let r=e._cachedTypedArrays,o=r[t];return l(o)||(o=Y.createTypedArray(n,i),r[t]=o),o}rL.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??Y.UNSIGNED_INT,n=n??1,k_e(this,e,t,n,1,i.byteOffset)):i};rL.prototype.hasProperty=function(e){return l(this.json[e])};rL.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=Y.fromName(i.componentType)),k_e(this,e,t,n,this.featuresLength,i.byteOffset)):WQe(this,e,t,i)};rL.prototype.getProperty=function(e,t,n,i,r){let o=this.json[e];if(!l(o))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a<n;++a)r[a]=s[n*i+a];return r};var dm=rL;function oL(e){let t=e.count,n=e.batchTable,i=e.binaryBody,r=e.parseAsPropertyAttributes??!1,o=e.customAttributeOutput,s=qQe(n),a;l(s.jsonProperties)&&(a=new Ug({count:t,properties:s.jsonProperties}));let c;l(s.hierarchy)&&(c=new qx({extension:s.hierarchy,binaryBody:i}));let u=am.BATCH_TABLE_CLASS_NAME,f=s.binaryProperties,d,p,g;if(r){let A=XQe(t,u,f,i,o);g=A.transcodedSchema,p=[new lT({propertyAttribute:A.propertyAttributeJson,class:A.transcodedClass})]}else{let A=YQe(t,u,f,i);g=A.transcodedSchema;let b=A.featureTableJson;d=new Fd({count:b.count,properties:b.properties,class:A.transcodedClass,bufferViews:A.bufferViewsTypedArrays}),p=[]}let m=[];if(l(d)||l(a)||l(c)){let A=new Ql({id:0,name:"Batch Table",count:t,metadataTable:d,jsonMetadataTable:a,batchTableHierarchy:c});m.push(A)}let y={schema:g,propertyTables:m,propertyAttributes:p,extensions:s.extensions,extras:s.extras};return new za(y)}function qQe(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,r;l(t)?(oL._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),r=t):l(i)&&(r=i["3DTILES_batch_table_hierarchy"]);let o,s={};for(let a in e){if(!e.hasOwnProperty(a)||a==="HIERARCHY"||a==="extensions"||a==="extras")continue;let c=e[a];Array.isArray(c)?(o=l(o)?o:{},o[a]=c):s[a]=c}return{binaryProperties:s,jsonProperties:o,hierarchy:r,extras:n,extensions:i}}function YQe(e,t,n,i){let r={},o={},s={},a=0;for(let d in n){if(!n.hasOwnProperty(d))continue;if(!l(i))throw new oe(`Property ${d} requires a batch table binary.`);let p=n[d],g=Nd(p);o[d]={bufferView:a},r[d]=U_e(p),s[a]=g.createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e),a++}let c={classes:{}};c.classes[t]={properties:r};let u=$l.fromJson(c);return{featureTableJson:{class:t,count:e,properties:o},bufferViewsTypedArrays:s,transcodedSchema:u,transcodedClass:u.classes[t]}}function XQe(e,t,n,i,r){let o={},s={},a=0;for(let d in n){if(!n.hasOwnProperty(d))continue;let p=n[d];if(!l(i)&&!l(p.typedArray))throw new oe(`Property ${d} requires a batch table binary.`);let g=xt.sanitizeGlslIdentifier(d);(g===""||o.hasOwnProperty(g))&&(g=`property_${a}`,a++);let m=U_e(p);m.name=d,o[g]=m;let y=g.toUpperCase();y.startsWith("_")||(y=`_${y}`);let A=p.typedArray;l(A)||(A=Nd(p).createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e));let b=new Cn.Attribute;b.name=y,b.count=e,b.type=p.type;let x=Y.fromTypedArray(A);(x===Y.INT||x===Y.UNSIGNED_INT||x===Y.DOUBLE)&&(oL._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${y}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),A=new Float32Array(A)),b.componentDatatype=Y.fromTypedArray(A),b.typedArray=A,r.push(b),s[g]={attribute:y}}let c={classes:{}};c.classes[t]={properties:o};let u=$l.fromJson(c);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:u,transcodedClass:u.classes[t]}}function U_e(e){let t=KQe(e.componentType);return{type:e.type,componentType:t}}function KQe(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}oL._deprecationWarning=qr;oL._oneTimeWarning=_t;var Gg=oL;var hT={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},$Qe=Cn.FeatureIdAttribute,EJ=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.b3dmResource,i=t.baseResource,r=t.arrayBuffer,o=t.byteOffset??0,s=t.releaseGltfJson??!1,a=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,u=t.upAxis??Hi.Y,f=t.forwardAxis??Hi.X,d=t.loadAttributesAsTypedArray??!1,p=t.loadAttributesFor2D??!1,g=t.enablePick??!1,m=t.loadIndicesForWireframe??!1,y=t.loadPrimitiveOutline??!0,A=t.loadForClassification??!1;i=l(i)?i:n.clone(),this._b3dmResource=n,this._baseResource=i,this._arrayBuffer=r,this._byteOffset=o,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=u,this._forwardAxis=f,this._loadAttributesAsTypedArray=d,this._loadAttributesFor2D=p,this._enablePick=g,this._loadIndicesForWireframe=m,this._loadPrimitiveOutline=y,this._loadForClassification=A,this._state=hT.UNLOADED,this._promise=void 0,this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=N.IDENTITY}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=iL.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,r=t.batchTableJson,o=t.batchTableBinary,s=new dm(n,i),a=s.getGlobalProperty("BATCH_LENGTH");this._batchLength=a;let c=s.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(c)&&(this._transform=N.fromTranslation(h.fromArray(c))),this._batchTable={json:r,binary:o};let u=new Lf({typedArray:t.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=u,this._state=hT.LOADING;let f=this;return this._promise=u.load().then(function(){if(!f.isDestroyed())return f._state=hT.PROCESSING,f}).catch(function(d){if(!f.isDestroyed())return JQe(f,d)}),this._promise}process(t){if(this._state===hT.READY)return!0;if(this._state!==hT.PROCESSING||!this._gltfLoader.process(t))return!1;let i=this._gltfLoader.components;return i.transform=N.multiplyTransformation(this._transform,i.transform,i.transform),ZQe(this,i),this._components=i,this._arrayBuffer=void 0,this._state=hT.READY,!0}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),this._components=void 0,this._arrayBuffer=void 0}};function JQe(e,t){return e.unload(),e._state=hT.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}function ZQe(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let r;if(l(n.json))r=Gg({count:i,batchTable:n.json,binaryBody:n.binary});else{let a=new Ql({name:am.BATCH_TABLE_CLASS_NAME,count:i});r=new za({schema:{},propertyTables:[a]})}let o=t.scene.nodes,s=o.length;for(let a=0;a<s;a++)z_e(o[a]);t.structuralMetadata=r}function z_e(e){let t=e.children.length;for(let i=0;i<t;i++)z_e(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let r=e.primitives[i],o=xt.getAttributeBySemantic(r,ct.FEATURE_ID);if(l(o)){o.setIndex=0;let s=new $Qe;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",r.featureIds.push(s)}}}var sL=EJ;var CJ=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT,this._geoJson=t.geoJson,this._components=void 0}get cacheKey(){}get components(){return this._components}load(){return Promise.resolve(this)}process(t){return l(this._components)||(this._components=det(this._geoJson,t),this._geoJson=void 0),!0}unload(){this._components=void 0}};function QQe(){this.lines=void 0,this.points=void 0,this.properties=void 0}function eet(){this.features=[]}function vJ(e){let t=e[0],n=e[1],i=e[2]??0;return new h(t,n,i)}function SJ(e){let t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=vJ(e[r]);return[n]}function tet(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=SJ(e[i])[0];return n}function V_e(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=SJ(e[i])[0];return n}function net(e){let t=e.length,n=[];for(let i=0;i<t;i++){let r=V_e(e[i]);ti(n,r)}return n}function iet(e){return[vJ(e)]}function ret(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=vJ(e[i]);return n}var oet={LineString:SJ,MultiLineString:tet,MultiPolygon:net,Polygon:V_e,MultiPoint:ret,Point:iet},set={LineString:Oe.LINES,MultiLineString:Oe.LINES,MultiPolygon:Oe.LINES,Polygon:Oe.LINES,MultiPoint:Oe.POINTS,Point:Oe.POINTS};function j_e(e,t){if(!l(e.geometry))return;let n=e.geometry.type,i=oet[n],r=set[n],o=e.geometry.coordinates;if(!l(i)||!l(o))return;let s=new QQe;r===Oe.LINES?s.lines=i(o):r===Oe.POINTS&&(s.points=i(o)),s.properties=e.properties,t.features.push(s)}function aet(e,t){let n=e.features,i=n.length;for(let r=0;r<i;r++)j_e(n[r],t)}var cet={FeatureCollection:aet,Feature:j_e},fH=new h;function uet(e,t,n){let i=0,r=0,o=e.length;for(let O=0;O<o;O++){let L=e[O];if(l(L.lines)){let _=L.lines.length;for(let C=0;C<_;C++){let w=L.lines[C];i+=w.length,r+=(w.length-1)*2}}}let s=new Float32Array(i*3),a=new Float32Array(i),c=je.createTypedArray(i,r),u=je.fromTypedArray(c),f=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),d=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),p=0,g=0;for(let O=0;O<o;O++){let L=e[O];if(!l(L.lines))continue;let _=L.lines.length;for(let C=0;C<_;C++){let w=L.lines[C],P=w.length;for(let M=0;M<P;M++){let F=w[M],V=h.fromDegrees(F.x,F.y,F.z,ee.WGS84,fH),B=N.multiplyByPoint(t,V,fH);h.minimumByComponent(f,B,f),h.maximumByComponent(d,B,d),h.pack(B,s,p*3),a[p]=O,M<P-1&&(c[g*2]=p,c[g*2+1]=p+1,g++),p++}}}let m=nt.createVertexBuffer({typedArray:s,context:n.context,usage:Me.STATIC_DRAW});m.vertexArrayDestroyable=!1;let y=nt.createVertexBuffer({typedArray:a,context:n.context,usage:Me.STATIC_DRAW});y.vertexArrayDestroyable=!1;let A=nt.createIndexBuffer({typedArray:c,context:n.context,usage:Me.STATIC_DRAW,indexDatatype:u});A.vertexArrayDestroyable=!1;let b=new Cn.Attribute;b.semantic=ct.POSITION,b.componentDatatype=Y.FLOAT,b.type=Vt.VEC3,b.count=i,b.min=f,b.max=d,b.buffer=m;let x=new Cn.Attribute;x.semantic=ct.FEATURE_ID,x.setIndex=0,x.componentDatatype=Y.FLOAT,x.type=Vt.SCALAR,x.count=i,x.buffer=y;let T=[b,x],E=new Cn.Material;E.unlit=!0;let v=new Cn.Indices;v.indexDatatype=u,v.count=c.length,v.buffer=A;let S=new Cn.FeatureIdAttribute;S.featureCount=o,S.propertyTableId=0,S.setIndex=0,S.positionalLabel="featureId_0";let I=[S],R=new Cn.Primitive;return R.attributes=T,R.indices=v,R.featureIds=I,R.primitiveType=Oe.LINES,R.material=E,R}function fet(e,t,n){let i=0,r=e.length;for(let T=0;T<r;T++){let E=e[T];l(E.points)&&(i+=E.points.length)}let o=new Float32Array(i*3),s=new Float32Array(i),a=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),u=0;for(let T=0;T<r;T++){let E=e[T];if(!l(E.points))continue;let v=E.points.length;for(let S=0;S<v;S++){let I=E.points[S],R=h.fromDegrees(I.x,I.y,I.z,ee.WGS84,fH),O=N.multiplyByPoint(t,R,fH);h.minimumByComponent(a,O,a),h.maximumByComponent(c,O,c),h.pack(O,o,u*3),s[u]=T,u++}}let f=nt.createVertexBuffer({typedArray:o,context:n.context,usage:Me.STATIC_DRAW});f.vertexArrayDestroyable=!1;let d=nt.createVertexBuffer({typedArray:s,context:n.context,usage:Me.STATIC_DRAW});d.vertexArrayDestroyable=!1;let p=new Cn.Attribute;p.semantic=ct.POSITION,p.componentDatatype=Y.FLOAT,p.type=Vt.VEC3,p.count=i,p.min=a,p.max=c,p.buffer=f;let g=new Cn.Attribute;g.semantic=ct.FEATURE_ID,g.setIndex=0,g.componentDatatype=Y.FLOAT,g.type=Vt.SCALAR,g.count=i,g.buffer=d;let m=[p,g],y=new Cn.Material;y.unlit=!0;let A=new Cn.FeatureIdAttribute;A.featureCount=r,A.propertyTableId=0,A.setIndex=0,A.positionalLabel="featureId_0";let b=[A],x=new Cn.Primitive;return x.attributes=m,x.featureIds=b,x.primitiveType=Oe.POINTS,x.material=y,x}function det(e,t){let n=new eet,i=cet[e.type];l(i)&&i(e,n);let r=n.features,o=r.length;if(o===0)throw new oe("GeoJSON must have at least one feature");let s={};for(let O=0;O<o;O++){let _=r[O].properties??H.EMPTY_OBJECT;for(let C in _)_.hasOwnProperty(C)&&(l(s[C])||(s[C]=new Array(o)))}for(let O=0;O<o;O++){let L=r[O];for(let _ in s)if(s.hasOwnProperty(_)){let C=L.properties[_]??"";s[_][O]=C}}let a=new Ug({count:o,properties:s}),u=[new Ql({id:0,count:o,jsonMetadataTable:a})],f=$l.fromJson({}),d=new za({schema:f,propertyTables:u}),p=new h(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),g=new h(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),m=!1,y=!1;for(let O=0;O<o;O++){let L=r[O];if(l(L.lines)){m=!0;let _=L.lines.length;for(let C=0;C<_;C++){let w=L.lines[C],P=w.length;for(let M=0;M<P;M++)h.minimumByComponent(p,w[M],p),h.maximumByComponent(g,w[M],g)}}if(l(L.points)){y=!0;let _=L.points.length;for(let C=0;C<_;C++){let w=L.points[C];h.minimumByComponent(p,w,p),h.maximumByComponent(g,w,g)}}}let A=h.midpoint(p,g,new h),b=h.fromDegrees(A.x,A.y,A.z,ee.WGS84,new h),x=At.eastNorthUpToFixedFrame(b,ee.WGS84,new N),T=N.inverseTransformation(x,new N),E=[];m&&E.push(uet(r,T,t)),y&&E.push(fet(r,T,t));let v=new Cn.Node;v.index=0,v.primitives=E;let S=[v],I=new Cn.Scene;I.nodes=S;let R=new Cn.Components;return R.scene=I,R.nodes=S,R.transform=x,R.structuralMetadata=d,R}var aL=CJ;var dH={};dH._deprecationWarning=qr;var gA=Uint32Array.BYTES_PER_ELEMENT;dH.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),r=new DataView(e);t+=gA;let o=r.getUint32(t,!0);if(o!==1)throw new oe(`Only Instanced 3D Model version 1 is supported. Version ${o} is not.`);t+=gA;let s=r.getUint32(t,!0);t+=gA;let a=r.getUint32(t,!0);if(a===0)throw new oe("featureTableJsonByteLength is zero, the feature table must be defined.");t+=gA;let c=r.getUint32(t,!0);t+=gA;let u=r.getUint32(t,!0);t+=gA;let f=r.getUint32(t,!0);t+=gA;let d=r.getUint32(t,!0);if(d!==1&&d!==0)throw new oe(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${d} is not.`);t+=gA;let p=Ro(i,t,a);t+=a;let g=new Uint8Array(e,t,c);t+=c;let m,y;u>0&&(m=Ro(i,t,u),t+=u,f>0&&(y=new Uint8Array(e,t,f),y=new Uint8Array(y),t+=f));let A=n+s-t;if(A===0)throw new oe("glTF byte length must be greater than 0.");let b;return t%4===0?b=new Uint8Array(e,t,A):(dH._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),b=new Uint8Array(i.subarray(t,t+A))),{gltfFormat:d,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:y,gltf:b}};var cL=dH;var Wg={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},hH=Cn.Attribute,het=Cn.FeatureIdAttribute,G_e=Cn.Instances,wJ=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.i3dmResource,i=t.arrayBuffer,r=t.baseResource,o=t.byteOffset??0,s=t.releaseGltfJson??!1,a=t.asynchronous??!0,c=t.incrementallyLoadTextures??!0,u=t.upAxis??Hi.Y,f=t.forwardAxis??Hi.X,d=t.loadAttributesAsTypedArray??!1,p=t.loadIndicesForWireframe??!1,g=t.loadPrimitiveOutline??!0,m=t.enablePick??!1;r=l(r)?r:n.clone(),this._i3dmResource=n,this._baseResource=r,this._arrayBuffer=i,this._byteOffset=o,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=u,this._forwardAxis=f,this._loadAttributesAsTypedArray=d,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=g,this._enablePick=m,this._state=Wg.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=N.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}get texturesLoaded(){return this._gltfLoader?.texturesLoaded}get cacheKey(){}get components(){return this._components}load(){if(l(this._promise))return this._promise;let t=cL.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,r=t.batchTableJson,o=t.batchTableBinary,s=t.gltfFormat,a=new dm(n,i);this._featureTable=a;let c=a.getGlobalProperty("INSTANCES_LENGTH");if(a.featuresLength=c,!l(c))throw new oe("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=c;let u=a.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(u)&&(this._transform=N.fromTranslation(h.fromArray(u))),this._batchTable={json:r,binary:o};let f={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(s===0){let p=ku(t.gltf);p=p.replace(/[\s\0]+$/,"");let g=this._baseResource.getDerivedResource({url:p});f.gltfResource=g,f.baseResource=g}else f.gltfResource=this._i3dmResource,f.typedArray=t.gltf;let d=new Lf(f);return this._gltfLoader=d,this._state=Wg.LOADING,this._promise=d.load().then(()=>{if(!this.isDestroyed())return this._state=Wg.PROCESSING,this}).catch(p=>{if(!this.isDestroyed())throw met(this,p)}),this._promise}process(t){if(this._state===Wg.READY)return!0;let n=this._gltfLoader,i=!1;if(this._state===Wg.PROCESSING&&(i=n.process(t)),!i)return!1;let r=n.components;return r.transform=N.multiplyTransformation(this._transform,r.transform,r.transform),_et(this,r,t),pet(this,r),this._components=r,this._arrayBuffer=void 0,this._state=Wg.READY,!0}isUnloaded(){return this._state===Wg.UNLOADED}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),Tet(this),this._components=void 0,this._arrayBuffer=void 0,this._state=Wg.UNLOADED}};function met(e,t){return e.unload(),e._state=Wg.FAILED,e.getError("Failed to load i3dm",t)}function pet(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let r;if(l(n.json))r=Gg({count:i,batchTable:n.json,binaryBody:n.binary});else{let o=new Ql({name:am.BATCH_TABLE_CLASS_NAME,count:i});r=new za({schema:{},propertyTables:[o]})}t.structuralMetadata=r}var mH=new h,IJ=new Array(4),get=new N;function _et(e,t,n){let i,r=e._featureTable,o=e._instancesLength;if(o===0)return;let s=r.getGlobalProperty("RTC_CENTER",Y.FLOAT,3),a=r.getGlobalProperty("EAST_NORTH_UP"),c=r.hasProperty("NORMAL_UP")||r.hasProperty("NORMAL_UP_OCT32P")||a,u=r.hasProperty("SCALE")||r.hasProperty("SCALE_NON_UNIFORM"),f=Aet(r,o),d;c&&(d=new Float32Array(4*o));let p;u&&(p=new Float32Array(3*o));let g=new Float32Array(o),m=h.unpackArray(f),y,A=new h,b=new h,x=new h,T=new $,E=new Le,v=new Array(4),S=new h,I=new Array(3),R=new N;if(!l(s)||h.equals(h.unpack(s),h.ZERO)){let B=ue.fromPoints(m);for(i=0;i<m.length;i++)h.subtract(m[i],B.center,mH),f[3*i+0]=mH.x,f[3*i+1]=mH.y,f[3*i+2]=mH.z;let j=N.fromTranslation(B.center,get);t.transform=N.multiplyTransformation(j,t.transform,t.transform)}for(i=0;i<o;i++){y=h.clone(m[i]),l(s)&&h.add(y,h.unpack(s),y),c&&(bet(r,a,i,E,y,b,A,x,T,R),Le.pack(E,v,0),d[4*i+0]=v[0],d[4*i+1]=v[1],d[4*i+2]=v[2],d[4*i+3]=v[3]),u&&(xet(r,i,S),h.pack(S,I,0),p[3*i+0]=I[0],p[3*i+1]=I[1],p[3*i+2]=I[2]);let B=r.getProperty("BATCH_ID",Y.UNSIGNED_SHORT,1,i);l(B)||(B=i),g[i]=B}let O=new G_e;O.transformInWorldSpace=!0;let L=e._buffers,_=new hH;if(_.name="Instance Translation",_.semantic=No.TRANSLATION,_.componentDatatype=Y.FLOAT,_.type=Vt.VEC3,_.count=o,_.typedArray=f,!c){let B=nt.createVertexBuffer({context:n.context,typedArray:f,usage:Me.STATIC_DRAW});B.vertexArrayDestroyable=!1,L.push(B),_.buffer=B}if(O.attributes.push(_),c){let B=new hH;B.name="Instance Rotation",B.semantic=No.ROTATION,B.componentDatatype=Y.FLOAT,B.type=Vt.VEC4,B.count=o,B.typedArray=d,O.attributes.push(B)}if(u){let B=new hH;if(B.name="Instance Scale",B.semantic=No.SCALE,B.componentDatatype=Y.FLOAT,B.type=Vt.VEC3,B.count=o,c)B.typedArray=p;else{let j=nt.createVertexBuffer({context:n.context,typedArray:p,usage:Me.STATIC_DRAW});j.vertexArrayDestroyable=!1,L.push(j),B.buffer=j}O.attributes.push(B)}let C=new hH;C.name="Instance Feature ID",C.setIndex=0,C.semantic=No.FEATURE_ID,C.componentDatatype=Y.FLOAT,C.type=Vt.SCALAR,C.count=o;let w=nt.createVertexBuffer({context:n.context,typedArray:g,usage:Me.STATIC_DRAW});w.vertexArrayDestroyable=!1,L.push(w),C.buffer=w,O.attributes.push(C);let P=new het;P.propertyTableId=0,P.setIndex=0,P.positionalLabel="instanceFeatureId_0",O.featureIds.push(P);let M=t.nodes,F=M.length,V=!1;for(i=0;i<F;i++){let B=M[i];B.primitives.length>0&&(B.instances=V?yet(O):O,V=!0)}}function yet(e){let t=new G_e;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let r=0;r<i;r++){let o=Je(n[r],!1);t.attributes.push(o)}return t.featureIds=e.featureIds,t}function Aet(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",Y.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",Y.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Y.FLOAT,3);if(!l(i))throw new oe("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let r=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Y.FLOAT,3);if(!l(r))throw new oe("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=new Float32Array(n.length);for(let s=0;s<n.length/3;s++)for(let a=0;a<3;a++){let c=3*s+a;o[c]=n[c]/65535*r[a]+i[a]}return o}else throw new oe("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var H_e=new Array(4);function bet(e,t,n,i,r,o,s,a,c,u){let f=e.getProperty("NORMAL_UP",Y.FLOAT,3,n,IJ),d=e.getProperty("NORMAL_RIGHT",Y.FLOAT,3,n,H_e),p=!1;if(l(f)){if(!l(d))throw new oe("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");h.unpack(f,0,o),h.unpack(d,0,s),p=!0}else{let g=e.getProperty("NORMAL_UP_OCT32P",Y.UNSIGNED_SHORT,2,n,IJ),m=e.getProperty("NORMAL_RIGHT_OCT32P",Y.UNSIGNED_SHORT,2,n,H_e);if(l(g)){if(!l(m))throw new oe("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");cn.octDecodeInRange(g[0],g[1],65535,o),cn.octDecodeInRange(m[0],m[1],65535,s),p=!0}else t?(At.eastNorthUpToFixedFrame(r,ee.WGS84,u),N.getMatrix3(u,c)):$.clone($.IDENTITY,c)}p&&(h.cross(s,o,a),h.normalize(a,a),$.setColumn(c,0,s,c),$.setColumn(c,1,o,c),$.setColumn(c,2,a,c)),Le.fromRotationMatrix(c,i)}function xet(e,t,n){n=h.fromElements(1,1,1,n);let i=e.getProperty("SCALE",Y.FLOAT,1,t);l(i)&&h.multiplyByScalar(n,i,n);let r=e.getProperty("SCALE_NON_UNIFORM",Y.FLOAT,3,t,IJ);l(r)&&(n.x*=r[0],n.y*=r[1],n.z*=r[2])}function Tet(e){let t=e._buffers,n=t.length;for(let i=0;i<n;i++){let r=t[i];r.isDestroyed()||r.destroy()}t.length=0}var lL=wJ;var W_e={STOPPED:0,ANIMATING:1};Object.freeze(W_e);var hm=W_e;function xS(){this.times=void 0,this.points=void 0,pe.throwInstantiationError()}xS.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Le)return Le};xS.prototype.evaluate=pe.throwInstantiationError;xS.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=t??0,e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let r;if(e>n[t])for(r=t;r<i-1&&!(e>=n[r]&&e<n[r+1]);++r);else for(r=t-1;r>=0&&!(e>=n[r]&&e<n[r+1]);--r);return r===i-1&&(r=i-2),r};xS.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],r=n-i,o;return e<i&&(o=Math.floor((i-e)/r)+1,e+=o*r),e>n&&(o=Math.floor((e-n)/r)+1,e-=o*r),e};xS.prototype.clampTime=function(e){let t=this.times;return D.clamp(e,t[0],t[t.length-1])};var Dr=xS;function TS(e){this._value=e,this._valueType=Dr.getPointType(e)}Object.defineProperties(TS.prototype,{value:{get:function(){return this._value}}});TS.prototype.findTimeInterval=function(e){};TS.prototype.wrapTime=function(e){return 0};TS.prototype.clampTime=function(e){return 0};TS.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var uL=TS;function ES(e){e=e??H.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=Dr.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(ES.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});ES.prototype.findTimeInterval=Dr.prototype.findTimeInterval;ES.prototype.wrapTime=Dr.prototype.wrapTime;ES.prototype.clampTime=Dr.prototype.clampTime;ES.prototype.evaluate=function(e,t){let n=this.points,i=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-i[r])/(i[r+1]-i[r]);return this._pointType===Number?(1-o)*n[r]+o*n[r+1]:(l(t)||(t=new h),h.lerp(n[r],n[r+1],o,t))};var _A=ES;var q_e={};q_e.solve=function(e,t,n,i){let r=new Array(n.length),o=new Array(i.length),s=new Array(i.length),a;for(a=0;a<o.length;a++)o[a]=new h,s[a]=new h;r[0]=n[0]/t[0],o[0]=h.multiplyByScalar(i[0],1/t[0],o[0]);let c;for(a=1;a<r.length;++a)c=1/(t[a]-r[a-1]*e[a-1]),r[a]=n[a]*c,o[a]=h.subtract(i[a],h.multiplyByScalar(o[a-1],e[a-1],o[a]),o[a]),o[a]=h.multiplyByScalar(o[a],c,o[a]);for(c=1/(t[a]-r[a-1]*e[a-1]),o[a]=h.subtract(i[a],h.multiplyByScalar(o[a-1],e[a-1],o[a]),o[a]),o[a]=h.multiplyByScalar(o[a],c,o[a]),s[s.length-1]=o[o.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(o[a],h.multiplyByScalar(s[a+1],r[a],s[a]),s[a]);return s};var CS=q_e;var Y_e=[],X_e=[],K_e=[],$_e=[];function Eet(e,t,n){let i=Y_e,r=K_e,o=X_e,s=$_e;i.length=r.length=e.length-1,o.length=s.length=e.length;let a;i[0]=o[0]=1,r[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a<i.length-1;++a)i[a]=r[a]=1,o[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,r[a]=1,o[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),o[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),CS.solve(i,o,r,s)}function Cet(e){let t=Y_e,n=K_e,i=X_e,r=$_e;t.length=n.length=e.length-1,i.length=r.length=e.length;let o;t[0]=n[0]=1,i[0]=2;let s=r[0];for(l(s)||(s=r[0]=new h),h.subtract(e[1],e[0],s),h.multiplyByScalar(s,3,s),o=1;o<t.length;++o)t[o]=n[o]=1,i[o]=4,s=r[o],l(s)||(s=r[o]=new h),h.subtract(e[o+1],e[o-1],s),h.multiplyByScalar(s,3,s);return i[o]=2,s=r[o],l(s)||(s=r[o]=new h),h.subtract(e[o],e[o-1],s),h.multiplyByScalar(s,3,s),CS.solve(t,i,n,r)}function Wu(e){e=e??H.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.inTangents,r=e.outTangents;this._times=n,this._points=t,this._pointType=Dr.getPointType(t[0]),this._inTangents=i,this._outTangents=r,this._lastTimeIndex=0}Object.defineProperties(Wu.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});Wu.createC1=function(e){e=e??H.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.tangents,r=i.slice(0,i.length-1),o=i.slice(1,i.length);return new Wu({times:t,points:n,inTangents:o,outTangents:r})};Wu.createNaturalCubic=function(e){e=e??H.EMPTY_OBJECT;let t=e.times,n=e.points;if(n.length<3)return new _A({points:n,times:t});let i=Cet(n),r=i.slice(0,i.length-1),o=i.slice(1,i.length);return new Wu({times:t,points:n,inTangents:o,outTangents:r})};Wu.createClampedCubic=function(e){e=e??H.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.firstTangent,r=e.lastTangent,o=Dr.getPointType(n[0]);if(n.length<3)return new _A({points:n,times:t});let s=Eet(n,i,r),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new Wu({times:t,points:n,inTangents:c,outTangents:a})};Wu.hermiteCoefficientMatrix=new N(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);Wu.prototype.findTimeInterval=Dr.prototype.findTimeInterval;var vet=new se,vS=new h;Wu.prototype.wrapTime=Dr.prototype.wrapTime;Wu.prototype.clampTime=Dr.prototype.clampTime;Wu.prototype.evaluate=function(e,t){let n=this.points,i=this.times,r=this.inTangents,o=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,u=vet;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=N.multiplyByVector(Wu.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let d=this._pointType;return d===Number?n[s]*f.x+n[s+1]*f.y+o[s]*f.z+r[s]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[s],f.x,t),d.multiplyByScalar(n[s+1],f.y,vS),d.add(t,vS,t),d.multiplyByScalar(o[s],f.z,vS),d.add(t,vS,t),d.multiplyByScalar(r[s],f.w,vS),d.add(t,vS,t))};var yA=Wu;function SS(e){e=e??H.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=Dr.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(SS.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});SS.prototype.findTimeInterval=Dr.prototype.findTimeInterval;SS.prototype.wrapTime=Dr.prototype.wrapTime;SS.prototype.clampTime=Dr.prototype.clampTime;SS.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,r=this._pointType;return r===Number?n[i]:(l(t)||(t=new r),r.clone(n[i],t))};var fL=SS;function wet(e){let t=e.points,n=e.times;return function(i,r){l(r)||(r=new Le);let o=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[o])/(n[o+1]-n[o]),a=t[o],c=t[o+1];return Le.fastSlerp(a,c,s,r)}}function wS(e){e=e??H.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=wet(this),this._lastTimeIndex=0}Object.defineProperties(wS.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});wS.prototype.findTimeInterval=Dr.prototype.findTimeInterval;wS.prototype.wrapTime=Dr.prototype.wrapTime;wS.prototype.clampTime=Dr.prototype.clampTime;wS.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var dL=wS;var IS=Cn.AnimatedPropertyType;function PJ(e){e=e??H.EMPTY_OBJECT;let t=e.channel,n=e.runtimeAnimation,i=e.runtimeNode;this._channel=t,this._runtimeAnimation=n,this._runtimeNode=i,this._splines=[],this._path=void 0,Oet(this)}Object.defineProperties(PJ.prototype,{channel:{get:function(){return this._channel}},runtimeAnimation:{get:function(){return this._runtimeAnimation}},runtimeNode:{get:function(){return this._runtimeNode}},splines:{get:function(){return this._splines}}});function Iet(e,t){let n=[],i=[],r=[],o=t.length;for(let s=0;s<o;s+=3)i.push(t[s]),n.push(t[s+1]),r.push(t[s+2]);return i.splice(0,1),r.length=r.length-1,new yA({times:e,points:n,inTangents:i,outTangents:r})}function J_e(e,t,n,i){if(e.length===1&&t.length===1)return new uL(t[0]);switch(n){case um.STEP:return new fL({times:e,points:t});case um.CUBICSPLINE:return Iet(e,t);case um.LINEAR:return i===IS.ROTATION?new dL({times:e,points:t}):new _A({times:e,points:t})}}function Pet(e,t,n,i,r){let o=[];if(i===IS.WEIGHTS){let a=t.length/r,c,u;for(c=0;c<r;c++){let f=new Array(a),d=c;if(n===um.CUBICSPLINE)for(u=0;u<a;u+=3)f[u]=t[d],f[u+1]=t[d+r],f[u+2]=t[d+2*r],d+=r*3;else for(u=0;u<a;u++)f[u]=t[d],d+=r;o.push(J_e(e,f,n,i))}}else o.push(J_e(e,t,n,i));return o}var Det=new h,Ret=new Le;function Oet(e){let t=e._channel,n=t.sampler,i=n.input,r=n.output,o=n.interpolation,a=t.target.path,c=e._runtimeNode,u=l(c.morphWeights)?c.morphWeights.length:1,f=Pet(i,r,o,a,u);e._splines=f,e._path=a}PJ.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,r=this._runtimeNode;if(n===IS.WEIGHTS){let o=r.morphWeights,s=o.length;for(let a=0;a<s;a++){let c=t[a],u=i.clampAnimations?c.clampTime(e):c.wrapTime(e);o[a]=c.evaluate(u)}}else{if(r.userAnimated)return;{let o=t[0],s=i.clampAnimations?o.clampTime(e):o.wrapTime(e);n===IS.TRANSLATION||n===IS.SCALE?r[n]=o.evaluate(s,Det):n===IS.ROTATION&&(r[n]=o.evaluate(s,Ret))}}};var hL=PJ;function DJ(e,t,n){this._animation=t,this._name=t.name,this._runtimeChannels=void 0,this._startTime=K.clone(n.startTime),this._delay=n.delay??0,this._stopTime=K.clone(n.stopTime),this.removeOnStop=n.removeOnStop??!1,this._multiplier=n.multiplier??1,this._reverse=n.reverse??!1,this._loop=n.loop??Hu.NONE,this._startOffset=n.startOffset??0,this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new be,this.update=new be,this.stop=new be,this._state=hm.STOPPED,this._computedStartTime=void 0,this._duration=void 0;let i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,Met(this)}Object.defineProperties(DJ.prototype,{animation:{get:function(){return this._animation}},name:{get:function(){return this._name}},runtimeChannels:{get:function(){return this._runtimeChannels}},model:{get:function(){return this._model}},localStartTime:{get:function(){return this._localStartTime}},localStopTime:{get:function(){return this._localStopTime}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}},startOffset:{get:function(){return this._startOffset}},animationTime:{get:function(){return this._animationTime}}});function Met(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=e._model.sceneGraph,o=e._animation.channels,s=o.length,a=[];for(let c=0;c<s;c++){let u=o[c],f=u.target;if(!l(f))continue;let d=f.node.index,p=i._runtimeNodes[d],g=new hL({channel:u,runtimeAnimation:e,runtimeNode:p}),m=u.sampler.input;t=Math.min(t,m[0]),n=Math.max(n,m[m.length-1]),a.push(g)}e._runtimeChannels=a,e._localStartTime=t,e._localStopTime=n}DJ.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var mL=DJ;function qg(e){this.animationAdded=new be,this.animationRemoved=new be,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(qg.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function RJ(e,t,n){let i=e._model,r=new mL(i,t,n);return e._runtimeAnimations.push(r),e.animationAdded.raiseEvent(i,r),r}qg.prototype.add=function(e){e=e??H.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=e.index;if(l(i))return RJ(this,n[i],e);let r=n.length;for(let o=0;o<r;++o)if(n[o].name===e.name){i=o;break}return RJ(this,n[i],e)};qg.prototype.addAll=function(e){e=e??H.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=[],r=n.length;for(let o=0;o<r;++o){let s=RJ(this,n[o],e);i.push(s)}return i};qg.prototype.remove=function(e){if(!l(e))return!1;let t=this._runtimeAnimations,n=t.indexOf(e);return n!==-1?(t.splice(n,1),this.animationRemoved.raiseEvent(this._model,e),!0):!1};qg.prototype.removeAll=function(){let e=this._model,t=this._runtimeAnimations,n=t.length;this._runtimeAnimations.length=0;for(let i=0;i<n;++i)this.animationRemoved.raiseEvent(e,t[i])};qg.prototype.contains=function(e){return l(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};qg.prototype.get=function(e){return this._runtimeAnimations[e]};var pH=[];function Net(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}qg.prototype.update=function(e){let t=this._runtimeAnimations,n=t.length;if(n===0)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&K.equals(e.time,this._previousTime))return!1;this._previousTime=K.clone(e.time,this._previousTime);let i=!1,r=e.time,o=this._model;for(let s=0;s<n;++s){let a=t[s];l(a._computedStartTime)||(a._computedStartTime=K.addSeconds(a.startTime??r,a.delay,new K)),l(a._duration)||(a._duration=a.localStopTime*(1/a.multiplier));let c=a._computedStartTime,u=a._duration,f=a.stopTime,d=K.lessThanOrEquals(c,r),p=l(f)&&K.greaterThan(r,f),g=0;if(u!==0){let A=K.secondsDifference(p?f:r,c);g=l(a._animationTime)?a._animationTime(u,A):A/u}let m=a.loop===Hu.REPEAT||a.loop===Hu.MIRRORED_REPEAT,y=(d||m&&!l(a.startTime))&&(g<=1||m)&&!p;if(g===a._prevAnimationDelta){let A=a._state===hm.STOPPED;if(y!==A)continue}if(a._prevAnimationDelta=g,y||a._state===hm.ANIMATING){if(y&&a._state===hm.STOPPED&&(a._state=hm.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Hu.REPEAT)g=g-Math.floor(g);else if(a.loop===Hu.MIRRORED_REPEAT){let x=Math.floor(g),T=g-x;g=x%2===1?1-T:T}let A=a.startOffset;a.reverse&&(g=1-g,A=-A);let b=g*u*a.multiplier+A;b=D.clamp(b,a.localStartTime,a.localStopTime),a.animate(b),a.update.numberOfListeners>0&&(a._updateEventTime=b,e.afterRender.push(a._raiseUpdateEvent)),i=!0,y||(a._state=hm.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&pH.push(a))}}n=pH.length;for(let s=0;s<n;++s){let a=pH[s];t.splice(t.indexOf(a),1),e.afterRender.push(Net(this,o,a))}return pH.length=0,i};var pL=qg;function mT(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(mT.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return l(this._color)||(this._color=new z),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}},featureId:{get:function(){return this._featureId}}});mT.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)};mT.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)};mT.prototype.getPropertyInherited=function(e){return this._featureTable.hasPropertyBySemantic(this._featureId,e)?this._featureTable.getPropertyBySemantic(this._featureId,e):this._featureTable.getProperty(this._featureId,e)};mT.prototype.getPropertyIds=function(e){return this._featureTable.getPropertyIds(e)};mT.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)};var gL=mT;var PS={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};PS.getStyleCommandsNeeded=function(e,t){return t===0?PS.ALL_OPAQUE:t===e?PS.ALL_TRANSLUCENT:PS.OPAQUE_AND_TRANSLUCENT};Object.freeze(PS);var mm=PS;var Yg={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};Yg.is3DTiles=function(e){switch(e){case Yg.TILE_GLTF:case Yg.TILE_B3DM:case Yg.TILE_I3DM:case Yg.TILE_PNTS:case Yg.TILE_GEOJSON:return!0;case Yg.GLTF:return!1}};Object.freeze(Yg);var Wo=Yg;function Cs(e){let t=e.model,n=e.propertyTable;this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=mm.ALL_OPAQUE,Let(this)}Object.defineProperties(Cs.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},batchTextureByteLength:{get:function(){return l(this._batchTexture)?this._batchTexture.byteLength:0}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}});function Let(e){let t=e._model,n=Wo.is3DTiles(t.type),i=e._propertyTable.count;if(i===0)return;let r,o=new Array(i);if(n){let s=t.content;for(r=0;r<i;r++)o[r]=new na(s,r)}else for(r=0;r<i;r++)o[r]=new gL({model:t,featureId:r,featureTable:e});e._features=o,e._featuresLength=i,e._batchTexture=new Kl({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}Cs.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=mm.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};Cs.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};Cs.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};Cs.prototype.getShow=function(e){return this._batchTexture.getShow(e)};Cs.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};Cs.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};Cs.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};Cs.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};Cs.prototype.getFeature=function(e){return this._features[e]};Cs.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};Cs.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};Cs.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};Cs.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};Cs.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};Cs.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};Cs.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};Cs.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};Cs.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var Fet=new z;Cs.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(Kl.DEFAULT_COLOR_VALUE),this.setAllShow(Kl.DEFAULT_SHOW_VALUE);return}for(let t=0;t<this._featuresLength;t++){let n=this.getFeature(t),i=l(e.color)?e.color.evaluateColor(n,Fet)??Kl.DEFAULT_COLOR_VALUE:Kl.DEFAULT_COLOR_VALUE,r=l(e.show)?e.show.evaluate(n)??Kl.DEFAULT_SHOW_VALUE:Kl.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,r)}};Cs.prototype.isDestroyed=function(){return!1};Cs.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),le(this)};var _L=Cs;var AA={NONE:0,VERTEX:1,FRAGMENT:2,BOTH:3};AA.includesVertexShader=function(e){return(e&AA.VERTEX)!==0};AA.includesFragmentShader=function(e){return(e&AA.FRAGMENT)!==0};AA.union=function(...e){let t=0;for(let n=0;n<e.length;n++)t|=e[n];return t};AA.intersection=function(...e){let t=e[0];for(let n=1;n<e.length;n++)t&=e[n];return t};Object.freeze(AA);var de=AA;var Z_e={name:"TilesetPipelineStage"};Z_e.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,de.FRAGMENT);let o={u_polygonOffset:function(){return U.ZERO}};e.uniformMap=Ot(o,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=Yt.setCesium3DTileBit(),i.stencilMask=Yt.CESIUM_3D_TILE_MASK};var yL=Z_e;var AL=`vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
vec2 p = abs(pos);
vec2 inverseRadii = 1.0 / radii;
vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
vec2 tTrigs = vec2(0.70710678118);
vec2 v = radii * tTrigs;
vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
vec2 q = normalize(p - evolute) * length(v - evolute);
tTrigs = (q + evolute) * inverseRadii;
tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
v = radii * tTrigs;
return v * sign(pos);
}
vec3 computeEllipsoidPositionWC(vec3 positionMC) {
vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
}
void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
vec3 fogColor = groundAtmosphereColor.rgb;
const float NONE = 0.0;
if (czm_atmosphereDynamicLighting != NONE) {
float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
fogColor *= darken;
}
#ifndef HDR
fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
fogColor.rgb = czm_inverseGamma(fogColor.rgb);
#endif
vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
color = vec4(withFog, color.a);
}
void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
vec3 rayleighColor;
vec3 mieColor;
float opacity;
vec3 positionWC;
vec3 lightDirection;
if (false) {
positionWC = computeEllipsoidPositionWC(attributes.positionMC);
lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
czm_computeGroundAtmosphereScattering(
positionWC,
lightDirection,
rayleighColor,
mieColor,
opacity
);
} else {
positionWC = attributes.positionWC;
lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
rayleighColor = v_atmosphereRayleighColor;
mieColor = v_atmosphereMieColor;
opacity = v_atmosphereOpacity;
}
const bool ignoreBlackPixels = true;
rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
if (u_isInFog) {
float distanceToCamera = length(attributes.positionEC);
applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
} else {
}
}
`;var bL=`void atmosphereStage(ProcessedAttributes attributes) {
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
czm_computeGroundAtmosphereScattering(
v_positionWC,
lightDirection,
v_atmosphereRayleighColor,
v_atmosphereMieColor,
v_atmosphereOpacity
);
}
`;var Q_e={name:"AtmospherePipelineStage"};Q_e.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,de.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,de.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([bL]),i.addFragmentLines([AL]),i.addUniform("bool","u_isInFog",de.FRAGMENT),e.uniformMap.u_isInFog=function(){let r=h.distance(n.camera.positionWC,t.boundingSphere.center);return D.fog(r,n.fog.density)>D.EPSILON3}};var xL=Q_e;var TL=`#ifdef DIFFUSE_IBL
vec3 sampleDiffuseEnvironment(vec3 cubeDir)
{
#ifdef CUSTOM_SPHERICAL_HARMONICS
return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
#else
return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
#endif
}
#endif
#ifdef SPECULAR_IBL
vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
{
#ifdef CUSTOM_SPECULAR_IBL
float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
#else
float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
#endif
}
vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
{
vec3 f90 = max(vec3(1.0 - roughness), f0);
vec3 F = fresnelSchlick2(f0, f90, NdotV);
vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
return specularSample * (F * brdfLut.x + brdfLut.y);
}
#endif
#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
vec3 f0 = material.specular;
float roughness = material.roughness;
float specularWeight = 1.0;
#ifdef USE_SPECULAR
specularWeight = material.specularWeight;
#endif
float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
vec3 f90 = max(vec3(1.0 - roughness), f0);
vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
#ifdef DIFFUSE_IBL
vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
vec3 irradiance = sampleDiffuseEnvironment(normalMC);
vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
#else
vec3 diffuseContribution = vec3(0.0);
#endif
#ifdef USE_ANISOTROPY
vec3 anisotropyDirection = material.anisotropicB;
vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
#else
vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
#endif
#ifdef SPECULAR_IBL
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
#else
vec3 specularContribution = vec3(0.0);
#endif
return diffuseContribution + specularContribution;
}
#endif
`;var eye={name:"ImageBasedLightingPipelineStage"},Bet=new U;eye.process=function(e,t,n){let i=t.imageBasedLighting,r=t.environmentMapManager,o=e.shaderBuilder,s;l(i.specularEnvironmentMaps)||(s=r.radianceCubeMap);let a=i.sphericalHarmonicCoefficients??r.sphericalHarmonicCoefficients;o.addDefine("USE_IBL_LIGHTING",void 0,de.FRAGMENT),o.addUniform("vec2","model_iblFactor",de.FRAGMENT),nm.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&o.addUniform("mat3","model_iblReferenceFrameMatrix",de.FRAGMENT),l(s)&&o.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,de.BOTH),l(a)&&l(a[0])?(o.addDefine("DIFFUSE_IBL",void 0,de.FRAGMENT),o.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,de.FRAGMENT),o.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",de.FRAGMENT)):i.useDefaultSphericalHarmonics&&o.addDefine("DIFFUSE_IBL",void 0,de.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(s)?(o.addDefine("SPECULAR_IBL",void 0,de.FRAGMENT),o.addDefine("CUSTOM_SPECULAR_IBL",void 0,de.FRAGMENT),o.addUniform("samplerCube","model_specularEnvironmentMaps",de.FRAGMENT),o.addUniform("float","model_specularEnvironmentMapsMaximumLOD",de.FRAGMENT)):t.useDefaultSpecularMaps&&o.addDefine("SPECULAR_IBL",void 0,de.FRAGMENT)),o.addFragmentLines(TL);let c={model_iblFactor:function(){return U.multiplyByScalar(i.imageBasedLightingFactor,r?.intensity||1,Bet)},model_iblReferenceFrameMatrix:function(){return t._iblReferenceFrameMatrix},model_sphericalHarmonicCoefficients:function(){return a},model_specularEnvironmentMaps:function(){return i.specularEnvironmentCubeMap.texture},model_specularEnvironmentMapsMaximumLOD:function(){return i.specularEnvironmentCubeMap.maximumMipmapLevel}};l(s)&&(c.model_specularEnvironmentMaps=function(){return s},c.model_specularEnvironmentMapsMaximumLOD=function(){return r.maximumMipmapLevel}),e.uniformMap=Ot(c,e.uniformMap)};var EL=eye;var ket=D.EPSILON16;function MJ(e){e=e??H.EMPTY_OBJECT;let t=e.stage,n=e.runtimeArticulation;this._stage=t,this._runtimeArticulation=n,this._name=t.name,this._type=t.type,this._minimumValue=t.minimumValue,this._maximumValue=t.maximumValue,this._currentValue=t.initialValue}Object.defineProperties(MJ.prototype,{stage:{get:function(){return this._stage}},runtimeArticulation:{get:function(){return this._runtimeArticulation}},name:{get:function(){return this._name}},type:{get:function(){return this._type}},minimumValue:{get:function(){return this._minimumValue}},maximumValue:{get:function(){return this._maximumValue}},currentValue:{get:function(){return this._currentValue},set:function(e){e=D.clamp(e,this.minimumValue,this.maximumValue),D.equalsEpsilon(this._currentValue,e,ket)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var Uet=new h,OJ=new $;MJ.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=Uet,r;switch(t){case ul.XROTATE:r=$.fromRotationX(D.toRadians(n),OJ),e=N.multiplyByMatrix3(e,r,e);break;case ul.YROTATE:r=$.fromRotationY(D.toRadians(n),OJ),e=N.multiplyByMatrix3(e,r,e);break;case ul.ZROTATE:r=$.fromRotationZ(D.toRadians(n),OJ),e=N.multiplyByMatrix3(e,r,e);break;case ul.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=N.multiplyByTranslation(e,i,e);break;case ul.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=N.multiplyByTranslation(e,i,e);break;case ul.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=N.multiplyByTranslation(e,i,e);break;case ul.XSCALE:i.x=n,i.y=1,i.z=1,e=N.multiplyByScale(e,i,e);break;case ul.YSCALE:i.x=1,i.y=n,i.z=1,e=N.multiplyByScale(e,i,e);break;case ul.ZSCALE:i.x=1,i.y=1,i.z=n,e=N.multiplyByScale(e,i,e);break;case ul.UNIFORMSCALE:e=N.multiplyByUniformScale(e,n,e);break;default:break}return e};var CL=MJ;function gH(e){e=e??H.EMPTY_OBJECT;let t=e.articulation,n=e.sceneGraph;this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,zet(this)}Object.defineProperties(gH.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function zet(e){let n=e.articulation.stages,i=n.length,r=e._runtimeStages,o=e._runtimeStagesByName;for(let s=0;s<i;s++){let a=n[s],c=new CL({stage:a,runtimeArticulation:e});r.push(c);let u=a.name;o[u]=c}}gH.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];l(n)&&(n.currentValue=t)};var Vet=new N,jet=new N;gH.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=N.clone(N.IDENTITY,Vet),t,n=this._runtimeStages,i=n.length;for(t=0;t<i;t++)e=n[t].applyStageToMatrix(e);let r=this._runtimeNodes,o=r.length;for(t=0;t<o;t++){let s=r[t],a=N.multiplyTransformation(s.originalTransform,e,jet);s.transform=a}};var vL=gH;var SL=`void modelColorStage(inout czm_modelMaterial material)
{
material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
float highlight = ceil(model_colorBlend);
material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
material.alpha *= model_color.a;
}
`;var DS={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};DS.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,de.FRAGMENT),i.addFragmentLines(SL);let r={},o=t.color;o.alpha===0&&!t.hasSilhouette(n)&&(e.renderStateOptions.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),o.alpha<1&&(e.alphaOptions.pass=Ie.TRANSLUCENT),i.addUniform("vec4",DS.COLOR_UNIFORM_NAME,de.FRAGMENT),r[DS.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",DS.COLOR_BLEND_UNIFORM_NAME,de.FRAGMENT),r[DS.COLOR_BLEND_UNIFORM_NAME]=function(){return ll.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Ot(r,e.uniformMap)};var bA=DS;var wL=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
vec4 getClippingPlane(
highp sampler2D packedClippingPlanes,
int clippingPlaneNumber,
mat4 transform
) {
int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
float u = (float(pixX) + 0.5) * pixelWidth;
float v = (float(pixY) + 0.5) * pixelHeight;
vec4 plane = texture(packedClippingPlanes, vec2(u, v));
return czm_transformPlane(plane, transform);
}
#else
vec4 getClippingPlane(
highp sampler2D packedClippingPlanes,
int clippingPlaneNumber,
mat4 transform
) {
int clippingPlaneStartIndex = clippingPlaneNumber * 2;
int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
float u = (float(pixX) + 0.5) * pixelWidth;
float v = (float(pixY) + 0.5) * pixelHeight;
vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
vec4 plane;
plane.xyz = czm_octDecode(oct, 65535.0);
plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
return czm_transformPlane(plane, transform);
}
#endif
float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float pixelWidth = czm_metersPerPixel(position);
#ifdef UNION_CLIPPING_REGIONS
float clipAmount;
#else
float clipAmount = 0.0;
bool clipped = true;
#endif
for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
#ifdef UNION_CLIPPING_REGIONS
clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
if (amount <= 0.0) {
discard;
}
#else
clipAmount = max(amount, clipAmount);
clipped = clipped && (amount <= 0.0);
#endif
}
#ifndef UNION_CLIPPING_REGIONS
if (clipped) {
discard;
}
#endif
return clipAmount;
}
void modelClippingPlanesStage(inout vec4 color)
{
float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
color = clippingPlanesEdgeColor;
}
}
`;var tye={name:"ModelClippingPlanesPipelineStage"},Het=new U,Get=new N,Wet=new N;tye.process=function(e,t,n){let i=t.clippingPlanes,r=n.context,o=e.shaderBuilder;o.addDefine("HAS_CLIPPING_PLANES",void 0,de.FRAGMENT),o.addDefine("CLIPPING_PLANES_LENGTH",i.length,de.FRAGMENT),i.unionClippingRegions&&o.addDefine("UNION_CLIPPING_REGIONS",void 0,de.FRAGMENT),bs.useFloatTexture(r)&&o.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,de.FRAGMENT);let s=bs.getTextureResolution(i,r,Het);o.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,de.FRAGMENT),o.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,de.FRAGMENT),o.addUniform("sampler2D","model_clippingPlanes",de.FRAGMENT),o.addUniform("vec4","model_clippingPlanesEdgeStyle",de.FRAGMENT),o.addUniform("mat4","model_clippingPlanesMatrix",de.FRAGMENT),o.addFragmentLines(wL);let a={model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){let c=z.clone(i.edgeColor);return c.alpha=i.edgeWidth,c},model_clippingPlanesMatrix:function(){let c=N.transpose(r.uniformState.inverseView3D,Get);return N.multiply(c,t._clippingPlanesMatrix,Wet)}};e.uniformMap=Ot(a,e.uniformMap)};var IL=tye;var PL=`void modelClippingPolygonsStage()
{
bool insideAny = vectorClip(v_clippingUv);
#ifdef CLIPPING_INVERSE
if (!insideAny)
{
discard;
}
#else
if (insideAny)
{
discard;
}
#endif
}
`;var DL=`void modelClippingPolygonsStage()
{
vec2 delta = czm_eyeToCartographicDelta(v_positionEC).xy;
v_clippingUv = u_clippingCameraUv + delta * u_clippingRectangleInverseSize;
}
`;var Xg=`uniform highp sampler2D u_vectorColorTexture;
uniform highp sampler2D u_vectorPickColorTexture;
int vectorPickPrimitiveIndex = -1;
#ifdef HAS_VECTOR_POLYLINES
uniform highp sampler2D u_vectorSegmentTexture;
uniform highp sampler2D u_vectorWidthTexture;
uniform highp sampler2D u_vectorSegmentPrimitiveIndicesTexture;
uniform highp sampler2D u_vectorGridCellIndicesTexture;
#ifdef VECTOR_WIDTH_IN_METERS
uniform vec2 u_vectorMetersPerUv;
#endif
#endif
#ifdef HAS_VECTOR_POLYGONS
uniform highp sampler2D u_vectorPolygonEdgeTexture;
uniform highp sampler2D u_vectorPolygonEdgePrimitiveIndicesTexture;
uniform highp sampler2D u_vectorPolygonGridCellIndicesTexture;
#endif
uniform highp sampler2D u_clippingEdgeTexture;
uniform highp sampler2D u_clippingEdgePrimitiveIndicesTexture;
uniform highp sampler2D u_clippingGridCellIndicesTexture;
vec2 vectorOffsetToLine(vec2 p, vec4 line)
{
vec2 a = line.xy;
vec2 b = line.zw;
vec2 ab = b - a;
float abLengthSquared = dot(ab, ab);
if (abLengthSquared < 1.0e-8)
{
return p - a;
}
float t = clamp(dot(p - a, ab) / abLengthSquared, 0.0, 1.0);
return p - (a + t * ab);
}
ivec2 vectorIndexToUv(int index, ivec2 size)
{
int v = index / size.x;
int u = index - v * size.x;
return ivec2(u, v);
}
ivec2 vectorCellRange(vec2 uv, highp sampler2D gridCellIndicesTexture)
{
ivec2 headerSize = textureSize(gridCellIndicesTexture, 0);
if (headerSize.x * headerSize.y < 3)
{
return ivec2(0);
}
int gridWidth = int(texelFetch(gridCellIndicesTexture, vectorIndexToUv(0, headerSize), 0).r);
int gridHeight = int(texelFetch(gridCellIndicesTexture, vectorIndexToUv(1, headerSize), 0).r);
int cellX = clamp(int(uv.x * float(gridWidth)), 0, gridWidth - 1);
int cellY = clamp(int(uv.y * float(gridHeight)), 0, gridHeight - 1);
int cellIndex = cellX + cellY * gridWidth;
int indexEnd = int(texelFetch(gridCellIndicesTexture, vectorIndexToUv(cellIndex + 2, headerSize), 0).r);
int indexStart = cellIndex == 0
? 0
: int(texelFetch(gridCellIndicesTexture, vectorIndexToUv(cellIndex + 1, headerSize), 0).r);
return ivec2(indexStart, indexEnd);
}
#ifdef VECTOR_ANTIALIAS
const float vectorCoverageRadius = 0.5;
#else
const float vectorCoverageRadius = 0.0;
#endif
vec4 vectorPolylineRender(vec2 vectorUv, vec4 baseColor)
{
#ifdef HAS_VECTOR_POLYLINES
mat2 screenFromUv = inverse(mat2(dFdx(vectorUv), dFdy(vectorUv)));
#ifdef VECTOR_WIDTH_IN_METERS
mat2 metersFromUv = mat2(u_vectorMetersPerUv.x, 0.0, 0.0, u_vectorMetersPerUv.y);
float pixelsPerMeter = 1.0 / max(
length(metersFromUv * dFdx(vectorUv)),
length(metersFromUv * dFdy(vectorUv)));
#endif
ivec2 headerSize = textureSize(u_vectorGridCellIndicesTexture, 0);
if (headerSize.x * headerSize.y < 3)
{
return baseColor;
}
ivec2 range = vectorCellRange(vectorUv, u_vectorGridCellIndicesTexture);
ivec2 segmentTextureSize = textureSize(u_vectorSegmentTexture, 0);
ivec2 primitiveTextureSize = textureSize(u_vectorWidthTexture, 0);
float nearestEdgeDistance = 1.0e30;
int nearestPrimitiveIndex = -1;
for (int i = range.x; i < range.y; i++)
{
ivec2 segmentUv = vectorIndexToUv(i, segmentTextureSize);
vec4 segment = texelFetch(u_vectorSegmentTexture, segmentUv, 0);
int primitiveIndex = int(texelFetch(u_vectorSegmentPrimitiveIndicesTexture, segmentUv, 0).r);
ivec2 primitiveUv = vectorIndexToUv(primitiveIndex, primitiveTextureSize);
float width = texelFetch(u_vectorWidthTexture, primitiveUv, 0).r;
float halfWidth = abs(width) * 0.5;
vec2 offsetToLine = vectorOffsetToLine(vectorUv, segment);
#if defined(VECTOR_WIDTH_MIXED_UNITS)
float edgeDistance = width < 0.0
? (length(metersFromUv * offsetToLine) - halfWidth) * pixelsPerMeter
: length(screenFromUv * offsetToLine) - halfWidth;
#elif defined(VECTOR_WIDTH_IN_METERS)
float edgeDistance = (length(metersFromUv * offsetToLine) - halfWidth) * pixelsPerMeter;
#else
float edgeDistance = length(screenFromUv * offsetToLine) - halfWidth;
#endif
if (edgeDistance < nearestEdgeDistance)
{
nearestEdgeDistance = edgeDistance;
nearestPrimitiveIndex = primitiveIndex;
}
if (nearestEdgeDistance <= -vectorCoverageRadius)
{
break;
}
}
if (nearestEdgeDistance > vectorCoverageRadius)
{
return baseColor;
}
#ifdef VECTOR_ANTIALIAS
float coverage = 1.0 - smoothstep(-vectorCoverageRadius, vectorCoverageRadius, nearestEdgeDistance);
#else
float coverage = 1.0;
#endif
vectorPickPrimitiveIndex = nearestPrimitiveIndex;
ivec2 primitiveUv = vectorIndexToUv(nearestPrimitiveIndex, primitiveTextureSize);
vec4 vectorColor = texelFetch(u_vectorColorTexture, primitiveUv, 0);
vectorColor.a *= coverage;
return vectorColor * vec4(vectorColor.aaa, 1.0) + baseColor * (1.0 - vectorColor.a);
#else
return baseColor;
#endif
}
vec4 vectorCompositePolygonFill(vec4 baseColor, int primitiveIndex, bool inside, ivec2 primitiveTextureSize)
{
if (!inside || primitiveIndex < 0)
{
return baseColor;
}
vectorPickPrimitiveIndex = primitiveIndex;
ivec2 primitiveUv = vectorIndexToUv(primitiveIndex, primitiveTextureSize);
vec4 fillColor = texelFetch(u_vectorColorTexture, primitiveUv, 0);
return fillColor * vec4(fillColor.aaa, 1.0) + baseColor * (1.0 - fillColor.a);
}
bool vectorEdgeCrossesRay(vec4 edge, vec2 p)
{
if ((edge.y > p.y) == (edge.w > p.y))
{
return false;
}
float t = (p.y - edge.y) / (edge.w - edge.y);
float xIntersect = edge.x + t * (edge.z - edge.x);
return p.x < xIntersect;
}
vec4 vectorPolygonRender(vec2 vectorUv, vec4 baseColor)
{
#ifdef HAS_VECTOR_POLYGONS
ivec2 range = vectorCellRange(vectorUv, u_vectorPolygonGridCellIndicesTexture);
ivec2 edgeTextureSize = textureSize(u_vectorPolygonEdgeTexture, 0);
ivec2 primitiveTextureSize = textureSize(u_vectorColorTexture, 0);
int currentPrimitive = -1;
bool inside = false;
for (int i = range.x; i < range.y; i++)
{
ivec2 edgeUv = vectorIndexToUv(i, edgeTextureSize);
vec4 edge = texelFetch(u_vectorPolygonEdgeTexture, edgeUv, 0);
int primitiveIndex = int(texelFetch(u_vectorPolygonEdgePrimitiveIndicesTexture, edgeUv, 0).r);
if (primitiveIndex != currentPrimitive)
{
baseColor = vectorCompositePolygonFill(baseColor, currentPrimitive, inside, primitiveTextureSize);
currentPrimitive = primitiveIndex;
inside = false;
}
if (vectorEdgeCrossesRay(edge, vectorUv))
{
inside = !inside;
}
}
baseColor = vectorCompositePolygonFill(baseColor, currentPrimitive, inside, primitiveTextureSize);
return baseColor;
#else
return baseColor;
#endif
}
vec4 vectorPickColorOver(vec4 surfacePickColor)
{
if (vectorPickPrimitiveIndex < 0)
{
return surfacePickColor;
}
ivec2 primitiveTextureSize = textureSize(u_vectorPickColorTexture, 0);
return texelFetch(u_vectorPickColorTexture, vectorIndexToUv(vectorPickPrimitiveIndex, primitiveTextureSize), 0);
}
bool vectorClip(vec2 uv)
{
uv = clamp(uv, vec2(0.0), vec2(1.0));
ivec2 range = vectorCellRange(uv, u_clippingGridCellIndicesTexture);
ivec2 edgeTextureSize = textureSize(u_clippingEdgeTexture, 0);
int currentPrimitive = -1;
bool inside = false;
for (int i = range.x; i < range.y; i++)
{
ivec2 edgeUv = vectorIndexToUv(i, edgeTextureSize);
int primitiveIndex = int(texelFetch(u_clippingEdgePrimitiveIndicesTexture, edgeUv, 0).r);
if (primitiveIndex != currentPrimitive)
{
if (inside)
{
return true;
}
currentPrimitive = primitiveIndex;
inside = false;
}
vec4 edge = texelFetch(u_clippingEdgeTexture, edgeUv, 0);
if (vectorEdgeCrossesRay(edge, uv))
{
inside = !inside;
}
}
return inside;
}
`;var iye={name:"ModelClippingPolygonsPipelineStage"},qet=new U,Yet=new U,nye=ie.MAX_VALUE;iye.process=function(e,t,n){let i=t.clippingPolygons,r=e.shaderBuilder;r.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,de.BOTH),i.inverse&&r.addDefine("CLIPPING_INVERSE",void 0,de.FRAGMENT),r.addVarying("vec2","v_clippingUv"),r.addUniform("vec2","u_clippingCameraUv",de.VERTEX),r.addUniform("vec2","u_clippingRectangleInverseSize",de.VERTEX),r.addVertexLines(DL),r.addFragmentLines(Xg),r.addFragmentLines(PL);let o={u_clippingCameraUv:function(){let s=t._clippingPolygonData?.rectangle??nye,a=s.width*.5,c=s.west+a,u=n.camera.positionCartographic,f=D.negativePiToPi(u.longitude-c)+a;return U.fromElements(f/s.width,(u.latitude-s.south)/s.height,qet)},u_clippingRectangleInverseSize:function(){let s=t._clippingPolygonData?.rectangle??nye;return U.fromElements(1/s.width,1/s.height,Yet)},u_clippingEdgeTexture:function(){return t._clippingPolygonData?.polygonEdgeTexture??n.context.defaultTexture},u_clippingEdgePrimitiveIndicesTexture:function(){return t._clippingPolygonData?.polygonEdgePrimitiveIndicesTexture??n.context.defaultTexture},u_clippingGridCellIndicesTexture:function(){return t._clippingPolygonData?.polygonGridCellIndicesTexture??n.context.defaultTexture}};e.uniformMap=Ot(o,e.uniformMap)};var RL=iye;var OL=`void modelVectorLookupStage(ProcessedAttributes attributes)
{
vec2 delta = czm_eyeToCartographicDelta(v_positionEC).xy;
v_vectorUv = u_vectorCameraUv + delta * u_vectorRectangleInverseSize;
}
`;var ML=`void modelVectorLookupStage(inout vec4 color)
{
color = vectorPolygonRender(v_vectorUv, color);
color = vectorPolylineRender(v_vectorUv, color);
}
`;var Xet={name:"ModelVectorLookupPipelineStage",process:Jet},Ket=new U,$et=new U;function Jet(e,t,n){let i=e.shaderBuilder,r=t._vectorData,o=r.hasPolylines,s=r.hasPolygons;i.addDefine("HAS_VECTOR_LOOKUP",void 0,de.BOTH),o&&(i.addDefine("HAS_VECTOR_POLYLINES",void 0,de.FRAGMENT),r.hasMeterWidths&&(i.addDefine("VECTOR_WIDTH_IN_METERS",void 0,de.FRAGMENT),r.hasPixelWidths&&i.addDefine("VECTOR_WIDTH_MIXED_UNITS",void 0,de.FRAGMENT),i.addUniform("vec2","u_vectorMetersPerUv",de.FRAGMENT))),s&&i.addDefine("HAS_VECTOR_POLYGONS",void 0,de.FRAGMENT),i.addUniform("vec2","u_vectorCameraUv",de.VERTEX),i.addUniform("vec2","u_vectorRectangleInverseSize",de.VERTEX),i.addVarying("vec2","v_vectorUv"),i.addVertexLines(OL),i.addFragmentLines(Xg),i.addFragmentLines(ML);let a=r.rectangle,c=function(){return n.context.defaultTexture},u={u_vectorCameraUv:function(){let f=t._vectorData?.rectangle??a,d=n.camera.positionCartographic,p=f.width*.5,g=f.west+p,m=D.negativePiToPi(d.longitude-g)+p;return U.fromElements(m/f.width,(d.latitude-f.south)/f.height,Ket)},u_vectorRectangleInverseSize:function(){let f=t._vectorData?.rectangle??a;return U.fromElements(1/f.width,1/f.height,$et)},u_vectorColorTexture:function(){return t._vectorData?.colorTexture??c()},u_vectorPickColorTexture:function(){return t._vectorData?.pickColorTexture??c()}};o&&(u.u_vectorSegmentTexture=function(){return t._vectorData?.polylineSegmentTexture??c()},u.u_vectorWidthTexture=function(){return t._vectorData?.widthTexture??c()},u.u_vectorSegmentPrimitiveIndicesTexture=function(){return t._vectorData?.polylineSegmentPrimitiveIndicesTexture??c()},u.u_vectorGridCellIndicesTexture=function(){return t._vectorData?.polylineGridCellIndicesTexture??c()},r.hasMeterWidths&&(u.u_vectorMetersPerUv=function(){return t._vectorData.metersPerUv})),s&&(u.u_vectorPolygonEdgeTexture=function(){return t._vectorData?.polygonEdgeTexture??c()},u.u_vectorPolygonEdgePrimitiveIndicesTexture=function(){return t._vectorData?.polygonEdgePrimitiveIndicesTexture??c()},u.u_vectorPolygonGridCellIndicesTexture=function(){return t._vectorData?.polygonGridCellIndicesTexture??c()}),e.uniformMap=Ot(u,e.uniformMap)}var NL=Xet;function rye(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(rye.prototype,{name:{get:function(){return this._runtimeNode._name}},id:{get:function(){return this._runtimeNode._id}},show:{get:function(){return this._runtimeNode.show},set:function(e){this._runtimeNode.show=e}},matrix:{get:function(){return this._runtimeNode.transform},set:function(e){l(e)?(this._runtimeNode.transform=e,this._runtimeNode.userAnimated=!0,this._model._userAnimationDirty=!0):(this._runtimeNode.transform=this.originalMatrix,this._runtimeNode.userAnimated=!1)}},originalMatrix:{get:function(){return this._runtimeNode.originalTransform}}});var LL=rye;var FL=`mat4 getInstancingTransform()
{
mat4 instancingTransform;
#ifdef HAS_INSTANCE_MATRICES
instancingTransform = mat4(
a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0,
a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0,
a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0,
a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0
);
#else
vec3 translation = vec3(0.0, 0.0, 0.0);
vec3 scale = vec3(1.0, 1.0, 1.0);
#ifdef HAS_INSTANCE_TRANSLATION
translation = a_instanceTranslation;
#endif
#ifdef HAS_INSTANCE_SCALE
scale = a_instanceScale;
#endif
instancingTransform = mat4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
translation.x, translation.y, translation.z, 1.0
);
#endif
return instancingTransform;
}
#ifdef USE_2D_INSTANCING
mat4 getInstancingTransform2D()
{
mat4 instancingTransform2D;
#ifdef HAS_INSTANCE_MATRICES
instancingTransform2D = mat4(
a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0,
a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0,
a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0,
a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0
);
#else
vec3 translation2D = vec3(0.0, 0.0, 0.0);
vec3 scale = vec3(1.0, 1.0, 1.0);
#ifdef HAS_INSTANCE_TRANSLATION
translation2D = a_instanceTranslation2D;
#endif
#ifdef HAS_INSTANCE_SCALE
scale = a_instanceScale;
#endif
instancingTransform2D = mat4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
translation2D.x, translation2D.y, translation2D.z, 1.0
);
#endif
return instancingTransform2D;
}
#endif
`;var BL=`void instancingStage(inout ProcessedAttributes attributes)
{
vec3 positionMC = attributes.positionMC;
mat4 instancingTransform = getInstancingTransform();
attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
#endif
#ifdef USE_2D_INSTANCING
mat4 instancingTransform2D = getInstancingTransform2D();
attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
#endif
}
`;var kL=`void legacyInstancingStage(
inout ProcessedAttributes attributes,
out mat4 instanceModelView,
out mat3 instanceModelViewInverseTranspose)
{
vec3 positionMC = attributes.positionMC;
mat4 instancingTransform = getInstancingTransform();
mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
instanceModelView = u_instance_modifiedModelView;
instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);
attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
#ifdef USE_2D_INSTANCING
mat4 instancingTransform2D = getInstancingTransform2D();
attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
#endif
}
`;var _H=new N,Zet=new N,Qet=new N,sye={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:fye,_transformsToTypedArray:LJ};sye.process=function(e,t,n){let i=t.instances,r=i.attributes[0].count,o=e.shaderBuilder;o.addDefine("HAS_INSTANCING"),o.addVertexLines(FL);let s=e.model,a=s.sceneGraph,c=e.runtimeNode,u=n.mode!==re.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,f=s._enablePick&&!n.context.webgl2,d=[];mtt(e,n,i,d,u,f),_tt(e,n,i,d);let p={};if(i.transformInWorldSpace?(o.addDefine("USE_LEGACY_INSTANCING",void 0,de.VERTEX),o.addUniform("mat4","u_instance_modifiedModelView",de.VERTEX),o.addUniform("mat4","u_instance_nodeTransform",de.VERTEX),p.u_instance_modifiedModelView=function(){let g=N.multiplyTransformation(s.modelMatrix,a.components.transform,_H);return u?N.multiplyTransformation(n.context.uniformState.view3D,g,_H):(n.mode!==re.SCENE3D&&(g=At.basisTo2D(n.mapProjection,g,_H)),N.multiplyTransformation(n.context.uniformState.view,g,_H))},p.u_instance_nodeTransform=function(){return N.multiplyTransformation(a.axisCorrectionMatrix,c.computedTransform,Zet)},o.addVertexLines(kL)):o.addVertexLines(BL),u){o.addDefine("USE_2D_INSTANCING",void 0,de.VERTEX),o.addUniform("mat4","u_modelView2D",de.VERTEX);let g=n.context,m=N.fromTranslation(c.instancingReferencePoint2D,new N);p.u_modelView2D=function(){return N.multiplyTransformation(g.uniformState.view,m,Qet)}}e.uniformMap=Ot(p,e.uniformMap),e.instanceCount=r,ti(e.attributes,d)};var UL=new N,ett=new h;function ttt(e,t,n,i,r){let o=N.multiplyTransformation(t,e,UL);return o=N.multiplyTransformation(o,n,UL),r=At.basisTo2D(i.mapProjection,o,r),r}function ntt(e,t,n,i,r){let o=N.fromTranslation(e,UL),s=N.multiplyTransformation(t,o,UL);s=N.multiplyTransformation(s,n,UL);let a=N.getTranslation(s,ett);return r=dr.computeActualEllipsoidPosition(i,a,r),r}function aye(e,t,n){let i=e.model,r=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(N.multiplyTransformation(i.modelMatrix,r.components.transform,t),N.multiplyTransformation(r.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=N.clone(r.computedModelMatrix,t),N.multiplyTransformation(t,e.runtimeNode.computedTransform,t),N.clone(N.IDENTITY,n))}var cye=new N,lye=new N,itt=new N,rtt=new h;function ott(e,t,n,i){let r=cye,o=lye;aye(t,r,o);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let u=0;u<c;u++){let f=e[u],d=ttt(f,r,o,n,itt),p=N.getTranslation(d,rtt),g=h.subtract(p,a,p);i[u]=N.setTranslation(d,g,i[u])}return i}function stt(e,t,n,i){let r=cye,o=lye;aye(t,r,o);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let u=0;u<c;u++){let f=e[u],d=ntt(f,r,o,n,f);i[u]=h.subtract(d,a,i[u])}return i}var att=new h,ctt=new h;function uye(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,r=N.multiplyByPoint(i,n.instancingTranslationMin,att),o=dr.computeActualEllipsoidPosition(t,r,r),s=N.multiplyByPoint(i,n.instancingTranslationMax,ctt),a=dr.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=h.lerp(o,a,.5,new h)}function LJ(e){let n=e.length,i=new Float32Array(n*12);for(let r=0;r<n;r++){let o=e[r],s=12*r;i[s+0]=o[0],i[s+1]=o[4],i[s+2]=o[8],i[s+3]=o[12],i[s+4]=o[1],i[s+5]=o[5],i[s+6]=o[9],i[s+7]=o[13],i[s+8]=o[2],i[s+9]=o[6],i[s+10]=o[10],i[s+11]=o[14]}return i}function ltt(e){let n=e.length,i=new Float32Array(n*3);for(let r=0;r<n;r++){let o=e[r],s=3*r;i[s+0]=o[0],i[s+1]=o[4],i[s+2]=o[8]}return i}var utt=new h,ftt=new Le,dtt=new h;function fye(e,t,n){let i=new Array(t),r=xt.getAttributeBySemantic(e,No.TRANSLATION),o=xt.getAttributeBySemantic(e,No.ROTATION),s=xt.getAttributeBySemantic(e,No.SCALE),a=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),u=l(r),f=l(o),d=l(s),p=u?r.typedArray:new Float32Array(t*3),g=f?o.typedArray:new Float32Array(t*4);f&&o.normalized&&(g=cn.dequantize(g,o.componentDatatype,o.type,t));let m;d?m=s.typedArray:(m=new Float32Array(t*3),m.fill(1));for(let A=0;A<t;A++){let b=new h(p[A*3],p[A*3+1],p[A*3+2],utt);h.maximumByComponent(a,b,a),h.minimumByComponent(c,b,c);let x=new Le(g[A*4],g[A*4+1],g[A*4+2],f?g[A*4+3]:1,ftt),T=new h(m[A*3],m[A*3+1],m[A*3+2],dtt),E=N.fromTranslationQuaternionRotationScale(b,x,T,new N);i[A]=E}let y=n.runtimeNode;return y.instancingTranslationMin=c,y.instancingTranslationMax=a,u&&(r.typedArray=void 0),f&&(o.typedArray=void 0),d&&(s.typedArray=void 0),i}function htt(e,t,n){let i=new Array(t),r=e.typedArray,o=new h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let c=0;c<t;c++){let u=new h(r[c*3],r[c*3+1],r[c*3+2]);i[c]=u,h.minimumByComponent(o,u,o),h.maximumByComponent(s,u,s)}let a=n.runtimeNode;return a.instancingTranslationMin=o,a.instancingTranslationMax=s,e.typedArray=void 0,i}function FJ(e,t){let n=nt.createVertexBuffer({context:t.context,typedArray:e,usage:Me.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function mtt(e,t,n,i,r,o){let s=xt.getAttributeBySemantic(n,No.ROTATION);l(s)||o?ptt(e,n,i,t,r,o):gtt(e,n,i,t,r)}function ptt(e,t,n,i,r,o){let s=e.shaderBuilder,a=t.attributes[0].count,c=e.model,u=e.runtimeNode;s.addDefine("HAS_INSTANCE_MATRICES");let f="Transform",d,p=u.instancingTransformsBuffer;if(!l(p)){d=fye(t,a,e);let A=LJ(d);p=FJ(A,i),c._modelResources.push(p),o&&(u.transformsTypedArray=A),u.instancingTransformsBuffer=p}if(oye(e,p,n,f),!r)return;let g=Je(i);g.mode=re.COLUMBUS_VIEW,uye(e,g);let m=u.instancingTransformsBuffer2D;if(!l(m)){let A=ott(d,e,g,d),b=LJ(A);m=FJ(b,i),c._modelResources.push(m),u.instancingTransformsBuffer2D=m}oye(e,m,n,"Transform2D")}function gtt(e,t,n,i,r,o){let s=e.shaderBuilder,a=e.runtimeNode,c=xt.getAttributeBySemantic(t,No.TRANSLATION),u=xt.getAttributeBySemantic(t,No.SCALE);if(l(u)&&(s.addDefine("HAS_INSTANCE_SCALE"),NJ(e,u.buffer,u.byteOffset,u.byteStride,n,"Scale")),!l(c))return;let f,d=c.typedArray;if(l(d)?f=htt(c,c.count,e):l(a.instancingTranslationMin)||(a.instancingTranslationMin=c.min,a.instancingTranslationMax=c.max),s.addDefine("HAS_INSTANCE_TRANSLATION"),NJ(e,c.buffer,c.byteOffset,c.byteStride,n,"Translation"),!r&&!o)return;let g=Je(i);g.mode=re.COLUMBUS_VIEW,uye(e,g);let m=a.instancingTranslationBuffer2D;if(!l(m)){let x=stt(f,e,g,f),T=ltt(x);o&&(a.transformsTypedArray=T),m=FJ(T,i),e.model._modelResources.push(m),a.instancingTranslationBuffer2D=m}if(!r)return;NJ(e,m,0,void 0,n,"Translation2D")}function oye(e,t,n,i){let o=Y.getSizeInBytes(Y.FLOAT),s=o*12,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:o*4,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:o*8,strideInBytes:s,instanceDivisor:1}],c=e.shaderBuilder;c.addAttribute("vec4",`a_instancing${i}Row0`),c.addAttribute("vec4",`a_instancing${i}Row1`),c.addAttribute("vec4",`a_instancing${i}Row2`),ti(n,a)}function NJ(e,t,n,i,r,o){r.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${o}`)}function _tt(e,t,n,i){let r=n.attributes,o=e.shaderBuilder;for(let s=0;s<r.length;s++){let a=r[s];a.semantic===No.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Vt.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),o.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var zL=sye;var dye=[],BJ={};BJ.name="ModelMatrixUpdateStage";BJ.update=function(e,t,n){let i=n.mode!==re.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){if(!e.show)return;let r=i?t._computedModelMatrix2D:t._computedModelMatrix;hye(e,t,r,e.transformToRoot,0),e._transformDirty=!1}};function ytt(e,t,n){e.modelMatrix=N.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=xt.getCullFace(e.modelMatrix,e.primitiveType)}function hye(e,t,n,i,r){let o,s=dye[r];l(s)||(s=dye[r]=new N),i=N.multiplyTransformation(i,e.transform,s),e.updateComputedTransform();let a=e.runtimePrimitives.length;for(o=0;o<a;o++){let u=e.runtimePrimitives[o];ytt(u.drawCommand,n,i)}let c=e.children.length;for(o=0;o<c;o++){let u=t._runtimeNodes[e.children[o]];if(u._transformToRoot=N.clone(i,u._transformToRoot),!u.show){u._transformDirty=!0;continue}hye(u,t,n,i,r+1),u._transformDirty=!1}}var VL=BJ;var mye={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:pye,_countGeneratedBuffers:gye};mye.process=function(e,t,n){let i=e.model.statistics,r=t.instances,o=e.runtimeNode;pye(i,r),gye(i,o)};function pye(e,t){if(!l(t))return;let n=t.attributes,i=n.length;for(let r=0;r<i;r++){let o=n[r];l(o.buffer)&&e.addBuffer(o.buffer,!1)}}function gye(e,t){l(t.instancingTransformsBuffer)&&e.addBuffer(t.instancingTransformsBuffer,!1),l(t.instancingTransformsBuffer2D)&&e.addBuffer(t.instancingTransformsBuffer2D,!1),l(t.instancingTranslationBuffer2D)&&e.addBuffer(t.instancingTranslationBuffer2D,!1)}var jL=mye;function RS(e){e=e??H.EMPTY_OBJECT;let t=e.node,n=e.transform,i=e.transformToRoot,r=e.sceneGraph,o=e.children;this._node=t,this._name=t.name,this._id=t.index,this._sceneGraph=r,this._children=o,this._originalTransform=N.clone(n,this._originalTransform),this._transform=N.clone(n,this._transform),this._transformToRoot=N.clone(i,this._transformToRoot),this._computedTransform=new N,this._transformDirty=!1,this._transformParameters=void 0,this._morphWeights=[],this._runtimeSkin=void 0,this._computedJointMatrices=[],this.show=!0,this.userAnimated=!1,this.pipelineStages=[],this.runtimePrimitives=[],this.updateStages=[],this.instancingTranslationMin=void 0,this.instancingTranslationMax=void 0,this.instancingTransformsBuffer=void 0,this.instancingTransformsBuffer2D=void 0,this.instancingTranslationBuffer2D=void 0,this.instancingReferencePoint2D=void 0,Att(this)}Object.defineProperties(RS.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=N.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return l(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){let t=this._transformParameters,n=t.translation;h.equals(n,e)||(t.translation=h.clone(e,t.translation),kJ(this,t))}},rotation:{get:function(){return l(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters,n=t.rotation;Le.equals(n,e)||(t.rotation=Le.clone(e,t.rotation),kJ(this,t))}},scale:{get:function(){return l(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters,n=t.scale;h.equals(n,e)||(t.scale=h.clone(e,t.scale),kJ(this,t))}},morphWeights:{get:function(){return this._morphWeights},set:function(e){let t=e.length;for(let n=0;n<t;n++)this._morphWeights[n]=e[n]}},runtimeSkin:{get:function(){return this._runtimeSkin}},computedJointMatrices:{get:function(){return this._computedJointMatrices}}});function Att(e){let t=e.transform,n=e.transformToRoot,i=e._computedTransform;e._computedTransform=N.multiply(n,t,i);let r=e.node;l(r.matrix)||(e._transformParameters=new Gy(r.translation,r.rotation,r.scale)),l(r.morphWeights)&&(e._morphWeights=r.morphWeights.slice());let o=r.articulationName;if(l(o)){let c=e.sceneGraph._runtimeArticulations[o];l(c)&&c.runtimeNodes.push(e)}}function kJ(e,t){e._transformDirty=!0,e._transform=N.fromTranslationRotationScale(t,e._transform)}RS.prototype.getChild=function(e){return this.sceneGraph._runtimeNodes[this.children[e]]};RS.prototype.configurePipeline=function(){let e=this.node,t=this.pipelineStages;t.length=0;let n=this.updateStages;n.length=0,l(e.instances)&&t.push(zL),t.push(jL),n.push(VL)};RS.prototype.updateComputedTransform=function(){this._computedTransform=N.multiply(this._transformToRoot,this._transform,this._computedTransform)};RS.prototype.updateJointMatrices=function(){let e=this._runtimeSkin;if(!l(e))return;e.updateJointMatrices();let t=this._computedJointMatrices,n=e.jointMatrices,i=n.length;for(let r=0;r<i;r++){l(t[r])||(t[r]=new N);let o=N.multiplyTransformation(this.transformToRoot,this.transform,t[r]),s=N.inverseTransformation(o,t[r]);t[r]=N.multiplyTransformation(s,n[r],t[r])}};var HL=RS;var _ye={name:"AlphaPipelineStage"};_ye.process=function(e,t,n){let i=e.alphaOptions,r=e.model;i.pass=i.pass??r.opaquePass;let o=e.renderStateOptions;i.pass===Ie.TRANSLUCENT&&(o.cull.enabled=!1,o.depthMask=!1,o.blending=tn.ALPHA_BLEND);let s=e.shaderBuilder,a=e.uniformMap;l(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,de.FRAGMENT),s.addUniform("float","u_alphaCutoff",de.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})};var GL=_ye;var yye={name:"BatchTexturePipelineStage"};yye.process=function(e,t,n){let i=e.shaderBuilder,r={},o=e.model,s=o.featureTables[o.featureTableId],a=s.featuresLength;i.addUniform("int","model_featuresLength"),r.model_featuresLength=function(){return a};let c=s.batchTexture;i.addUniform("sampler2D","model_batchTexture"),r.model_batchTexture=function(){return c.batchTexture??c.defaultTexture},i.addUniform("vec4","model_textureStep"),r.model_textureStep=function(){return c.textureStep},c.textureDimensions.y>1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),r.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=Ot(r,e.uniformMap)};var WL=yye;var Aye={name:"ClassificationPipelineStage"};Aye.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,de.BOTH);let r=e.runtimePrimitive;l(r.batchLengths)||btt(t,r)};function btt(e,t){let n=xt.getAttributeBySemantic(e,ct.POSITION);if(!l(n))throw new oe("Primitives must have a position attribute to be used for classification.");let i,r=e.indices,o=l(r);o&&(i=r.typedArray,r.typedArray=void 0);let s=o?r.count:n.count,a=xt.getAttributeBySemantic(e,ct.FEATURE_ID,0);if(!l(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let c=a.typedArray;a.typedArray=void 0;let u=[],f=[0],d=o?i[0]:0,p=c[d],g=0;for(let y=1;y<s;y++){let A=o?i[y]:y,b=c[A];if(b!==p){let x=y-g,T=y;u.push(x),f.push(T),g=T,p=b}}let m=s-g;u.push(m),t.batchLengths=u,t.batchOffsets=f}var qL=Aye;var YL=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
{
bool styleTranslucent = (featureColor.a != 1.0);
if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
{
#ifdef HAS_SILHOUETTE
positionMC *= float(model_silhouettePass);
#else
positionMC *= 0.0;
#endif
}
else if (czm_pass != czm_passTranslucent && styleTranslucent)
{
positionMC *= 0.0;
}
}
void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
{
float show = ceil(feature.color.a);
positionMC *= show;
#if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
filterByPassType(positionMC, feature.color);
#endif
}
`;var XL=`void filterByPassType(vec4 featureColor)
{
bool styleTranslucent = (featureColor.a != 1.0);
if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
{
#ifdef HAS_SILHOUETTE
if(!model_silhouettePass) {
discard;
}
#else
discard;
#endif
}
else if (czm_pass != czm_passTranslucent && styleTranslucent)
{
discard;
}
}
void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
{
vec4 featureColor = feature.color;
if (featureColor.a == 0.0)
{
discard;
}
#if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
filterByPassType(featureColor);
#endif
featureColor = czm_gammaCorrect(featureColor);
#ifdef HAS_CLASSIFICATION
material.diffuse = featureColor.rgb * featureColor.a;
#else
float highlight = ceil(model_colorBlend);
material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
#endif
material.alpha *= featureColor.a;
}
`;var bye={name:"CPUStylingPipelineStage"};bye.process=function(e,t,n){let i=e.model,r=e.shaderBuilder;r.addVertexLines(YL),r.addFragmentLines(XL),r.addDefine("USE_CPU_STYLING",void 0,de.BOTH),l(i.color)||(r.addUniform("float",bA.COLOR_BLEND_UNIFORM_NAME,de.FRAGMENT),e.uniformMap[bA.COLOR_BLEND_UNIFORM_NAME]=function(){return ll.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),r.addUniform("bool","model_commandTranslucent",de.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Ie.TRANSLUCENT}};var KL=bye;var UJ={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};UJ.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};Object.freeze(UJ);var Kg=UJ;var $L=`void customShaderStage(
inout czm_modelVertexOutput vsOutput,
inout ProcessedAttributes attributes,
FeatureIds featureIds,
Metadata metadata,
MetadataClass metadataClass,
MetadataStatistics metadataStatistics
) {
VertexInput vsInput;
initializeInputStruct(vsInput, attributes);
vsInput.featureIds = featureIds;
vsInput.metadata = metadata;
vsInput.metadataClass = metadataClass;
vsInput.metadataStatistics = metadataStatistics;
vertexMain(vsInput, vsOutput);
attributes.positionMC = vsOutput.positionMC;
}
`;var JL=`void customShaderStage(
inout czm_modelMaterial material,
ProcessedAttributes attributes,
FeatureIds featureIds,
Metadata metadata,
MetadataClass metadataClass,
MetadataStatistics metadataStatistics
) {
FragmentInput fsInput;
initializeInputStruct(fsInput, attributes);
fsInput.featureIds = featureIds;
fsInput.metadata = metadata;
fsInput.metadataClass = metadataClass;
fsInput.metadataStatistics = metadataStatistics;
fragmentMain(fsInput, material);
}
`;var ZL=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
initializeFeatureIds(featureIds, attributes);
initializeFeatureIdAliases(featureIds);
}
`;var QL=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
{
initializeFeatureIds(featureIds, attributes);
initializeFeatureIdAliases(featureIds);
setFeatureIdVaryings();
}
`;var hr={name:"FeatureIdPipelineStage",STRUCT_ID_FEATURE_IDS_VS:"FeatureIdsVS",STRUCT_ID_FEATURE_IDS_FS:"FeatureIdsFS",STRUCT_NAME_FEATURE_IDS:"FeatureIds",FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS:"initializeFeatureIdsVS",FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS:"initializeFeatureIdsFS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS:"initializeFeatureIdAliasesVS",FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS:"initializeFeatureIdAliasesFS",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS:"void initializeFeatureIds(out FeatureIds featureIds, ProcessedAttributes attributes)",FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES:"void initializeFeatureIdAliases(inout FeatureIds featureIds)",FUNCTION_ID_SET_FEATURE_ID_VARYINGS:"setFeatureIdVaryings",FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS:"void setFeatureIdVaryings()"};hr.process=function(e,t,n){let i=e.shaderBuilder;xtt(i);let r=e.runtimeNode.node.instances;l(r)&&Ttt(e,r,n),Ett(e,t,n),i.addVertexLines(QL),i.addFragmentLines(ZL)};function xtt(e){e.addStruct(hr.STRUCT_ID_FEATURE_IDS_VS,hr.STRUCT_NAME_FEATURE_IDS,de.VERTEX),e.addStruct(hr.STRUCT_ID_FEATURE_IDS_FS,hr.STRUCT_NAME_FEATURE_IDS,de.FRAGMENT),e.addFunction(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,hr.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,de.VERTEX),e.addFunction(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,hr.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,de.FRAGMENT),e.addFunction(hr.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,hr.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,de.VERTEX),e.addFunction(hr.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,hr.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,de.FRAGMENT),e.addFunction(hr.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,hr.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,de.VERTEX)}function Ttt(e,t,n){let i=t.featureIds,r=t.attributes[0].count;for(let o=0;o<i.length;o++){let s=i[o],a=s.positionalLabel;s instanceof Cn.FeatureIdAttribute?Ctt(e,s,a):xye(e,s,a,r,1,n);let c=s.label;l(c)&&Tye(e,a,c,de.BOTH)}}function Ett(e,t,n){let i=t.featureIds,o=xt.getAttributeBySemantic(t,ct.POSITION).count;for(let s=0;s<i.length;s++){let a=i[s],c=a.positionalLabel,u=de.BOTH;a instanceof Cn.FeatureIdAttribute?vtt(e,a,c):a instanceof Cn.FeatureIdImplicitRange?xye(e,a,c,o,void 0,n):(Stt(e,a,c,s,n),u=de.FRAGMENT);let f=a.label;l(f)&&Tye(e,c,f,u)}}function Ctt(e,t,n){let i=e.shaderBuilder;i.addStructField(hr.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(hr.STRUCT_ID_FEATURE_IDS_FS,"int",n);let r=t.setIndex,o=n.replace(/_\d+$/,"_"),s=`a_${o}${r}`,a=`v_${o}${r}`,c=`featureIds.${n} = int(czm_round(${s}));`,u=`featureIds.${n} = int(czm_round(${a}));`;i.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[c]),i.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[u]),i.addVarying("float",a),i.addFunctionLines(hr.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function vtt(e,t,n){let i=e.shaderBuilder;i.addStructField(hr.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(hr.STRUCT_ID_FEATURE_IDS_FS,"int",n);let r=t.setIndex,o=n.replace(/_\d+$/,"_"),s=[`featureIds.${n} = int(czm_round(attributes.${o}${r}));`];i.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function xye(e,t,n,i,r,o){wtt(e,t,i,r,o);let s=e.shaderBuilder,a=`a_implicit_${n}`;s.addAttribute("float",a);let c=`v_implicit_${n}`;s.addVarying("float",c),s.addStructField(hr.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(hr.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(hr.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${c} = ${a};`]),s.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${c}));`])}function Stt(e,t,n,i,r){let o=`u_featureIdTexture_${i}`,s=e.uniformMap,a=t.textureReader;s[o]=function(){return a.texture??r.context.defaultTexture};let c=a.channels,u=e.shaderBuilder;u.addStructField(hr.STRUCT_ID_FEATURE_IDS_FS,"int",n),u.addUniform("sampler2D",o,de.FRAGMENT);let d=`v_texCoord_${a.texCoord}`,p=d,g=a.transform;if(l(g)&&!$.equals(g,$.IDENTITY)){let A=`${o}Transform`;u.addUniform("mat3",A,de.FRAGMENT),s[A]=function(){return g},p=`vec2(${A} * vec3(${d}, 1.0))`}let m=`texture(${o}, ${p}).${c}`,y=`featureIds.${n} = czm_unpackUint(${m});`;u.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[y])}function Tye(e,t,n,i){let r=e.shaderBuilder,o=de.includesVertexShader(i);o&&r.addStructField(hr.STRUCT_ID_FEATURE_IDS_VS,"int",n),r.addStructField(hr.STRUCT_ID_FEATURE_IDS_FS,"int",n);let s=[`featureIds.${n} = featureIds.${t};`];o&&r.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),r.addFunctionLines(hr.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}function wtt(e,t,n,i,r){let o=e.model,s,a;if(l(t.repeat)){let u=Itt(t,n);s=nt.createVertexBuffer({context:r.context,typedArray:u,usage:Me.STATIC_DRAW}),s.vertexArrayDestroyable=!1,o._pipelineResources.push(s),o.statistics.addBuffer(s,!1)}else a=[t.offset];let c={index:e.attributeIndex++,instanceDivisor:i,value:a,vertexBuffer:s,normalize:!1,componentsPerAttribute:1,componentDatatype:Y.FLOAT,strideInBytes:Y.getSizeInBytes(Y.FLOAT),offsetInBytes:0};e.attributes.push(c)}function Itt(e,t){let n=e.offset,i=e.repeat,r=new Float32Array(t);for(let o=0;o<t;o++)r[o]=n+Math.floor(o/i);return r}var xA=hr;var eF=`void metadataStage(
FeatureIds featureIds,
out Metadata metadata,
out MetadataClass metadataClass,
out MetadataStatistics metadataStatistics,
ProcessedAttributes attributes
)
{
initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
}
`;var tF=`void metadataStage(
FeatureIds featureIds,
out Metadata metadata,
out MetadataClass metadataClass,
out MetadataStatistics metadataStatistics,
ProcessedAttributes attributes
)
{
initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
setMetadataVaryings();
}
`;var Di={name:"MetadataPipelineStage",STRUCT_ID_METADATA_VS:"MetadataVS",STRUCT_ID_METADATA_FS:"MetadataFS",STRUCT_NAME_METADATA:"Metadata",STRUCT_ID_METADATA_CLASS_VS:"MetadataClassVS",STRUCT_ID_METADATA_CLASS_FS:"MetadataClassFS",STRUCT_NAME_METADATA_CLASS:"MetadataClass",STRUCT_ID_METADATA_STATISTICS_VS:"MetadataStatisticsVS",STRUCT_ID_METADATA_STATISTICS_FS:"MetadataStatisticsFS",STRUCT_NAME_METADATA_STATISTICS:"MetadataStatistics",FUNCTION_ID_INITIALIZE_METADATA_VS:"initializeMetadataVS",FUNCTION_ID_INITIALIZE_METADATA_FS:"initializeMetadataFS",FUNCTION_SIGNATURE_INITIALIZE_METADATA:"void initializeMetadata(FeatureIds featureIds, out Metadata metadata, out MetadataClass metadataClass, out MetadataStatistics metadataStatistics, ProcessedAttributes attributes)",FUNCTION_ID_SET_METADATA_VARYINGS:"setMetadataVaryings",FUNCTION_SIGNATURE_SET_METADATA_VARYINGS:"void setMetadataVaryings()",METADATA_CLASS_FIELDS:[{specName:"noData",shaderName:"noData"},{specName:"default",shaderName:"defaultValue"},{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"}],METADATA_STATISTICS_FIELDS:[{specName:"min",shaderName:"minValue"},{specName:"max",shaderName:"maxValue"},{specName:"mean",shaderName:"mean",type:"float"},{specName:"median",shaderName:"median"},{specName:"standardDeviation",shaderName:"standardDeviation",type:"float"},{specName:"variance",shaderName:"variance",type:"float"},{specName:"sum",shaderName:"sum"}]};Di.process=function(e,t,n){let{shaderBuilder:i,model:r}=e,{structuralMetadata:o={},content:s}=r,a=s?.tileset.metadataExtension?.statistics,c=n.context.webgl2,u=Ytt(r,t),f=Ptt(o.propertyAttributes,t,a),d=Rtt(o.propertyTextures,a),p=Ntt(o.propertyTables,t,e,a,u),g=f.concat(d).concat(p);Btt(i,g),ztt(i),i.addVertexLines(tF),i.addFragmentLines(eF);for(let m=0;m<f.length;m++){let y=f[m];Vtt(e,y)}for(let m=0;m<d.length;m++){let y=d[m];Htt(e,y,c)}for(let m=0;m<p.length;m++){let y=p[m];Wtt(e,y,c)}};function Ptt(e,t,n){return l(e)?e.flatMap(i=>Dtt(i,t,n)):[]}function Dtt(e,t,n){let{getAttributeByName:i,getAttributeInfo:r,sanitizeGlslIdentifier:o}=xt,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),u=new Array(c.length);for(let f=0;f<c.length;f++){let[d,p]=c[f],g=i(t,p.attribute),{glslType:m,variableName:y}=r(g);u[f]={metadataVariable:o(d),property:p,classProperty:p.classProperty,type:p.classProperty.type,glslType:m,variableName:y,propertyStatistics:a?.properties[d],shaderDestination:de.BOTH}}return u}function Rtt(e,t){return l(e)?e.flatMap(n=>Ott(n,t)):[]}function Ott(e,t){let{sanitizeGlslIdentifier:n}=xt,i=e.class.id,r=t?.classes[i],o=Object.entries(e.properties).filter(([a,c])=>{let u=c.textureReader.channels.length;return c.classProperty.isGpuCompatible(u)}),s=new Array(o.length);for(let a=0;a<o.length;a++){let[c,u]=o[a];s[a]={metadataVariable:n(c),property:u,classProperty:u.classProperty,type:u.classProperty.type,glslType:u.classProperty.getGlslType(),propertyStatistics:r?.properties[c],shaderDestination:de.FRAGMENT}}return s}var Mtt=4;function Ntt(e,t,n,i,r){if(!l(e))return[];let o=Ftt(n,t);return e.filter(s=>l(s.class)&&o.has(String(s.id))).flatMap(s=>Ltt(s,o,i,r))}function Ltt(e,t,n,i){let{sanitizeGlslIdentifier:r}=xt,o=e.class,s=n?.classes[o.id],a=t.get(String(e.id))??{},c=a.shaderDestination??de.BOTH,u=e.properties,f=o.properties,d=[],p=0;for(let[g,m]of Object.entries(f)){if(!m.isGpuCompatible(Mtt))continue;let y=u[g],A=de.intersection($tt(g,i),c);if(A===de.NONE){p++;continue}d.push({metadataVariable:r(g),property:y,classProperty:m,type:m.type,glslType:m.getGlslType(),propertyStatistics:s?.properties[g],shaderDestination:A,propertyTable:e,featureIdVariableName:a.variableName,propertyInfoIndex:p}),p++}return d}function Ftt(e,t){let n=new Map;function i(a,c){let u=a?.propertyTableId;if(!l(u))return;let f=String(u),d={variableName:a.positionalLabel,shaderDestination:c},p=n.get(f);l(p)&&console.warn(`Multiple feature ID sets reference the same property table ${u} in primitive. Only one will be used.`),n.set(f,d)}let r=t?.featureIds??[];for(let a=0;a<r.length;a++){let c=r[a],u=l(c?.textureReader);i(c,u?de.FRAGMENT:de.BOTH)}let s=e.runtimeNode?.node?.instances?.featureIds??[];for(let a=0;a<s.length;a++){let c=s[a];i(c,de.BOTH)}return n}function Btt(e,t){let n=new Set,i=new Set;for(let a=0;a<t.length;a++){let{type:c,glslType:u,propertyStatistics:f}=t[a];n.add(u),l(f)&&c!==bt.ENUM&&i.add(u)}let r=Di.METADATA_CLASS_FIELDS;for(let a of n){let c=`${a}MetadataClass`;s(c,a,r)}let o=Di.METADATA_STATISTICS_FIELDS;for(let a of i){let c=`${a}MetadataStatistics`;s(c,a,o)}function s(a,c,u){e.addStruct(a,a,de.BOTH);for(let f=0;f<u.length;f++){let{shaderName:d}=u[f],p=u[f].type==="float"?Utt(c):c;e.addStructField(a,p,d)}}}var ktt={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function Utt(e){let t=ktt[e];return l(t)?t:e}function ztt(e){e.addStruct(Di.STRUCT_ID_METADATA_VS,Di.STRUCT_NAME_METADATA,de.VERTEX),e.addStruct(Di.STRUCT_ID_METADATA_FS,Di.STRUCT_NAME_METADATA,de.FRAGMENT),e.addStruct(Di.STRUCT_ID_METADATA_CLASS_VS,Di.STRUCT_NAME_METADATA_CLASS,de.VERTEX),e.addStruct(Di.STRUCT_ID_METADATA_CLASS_FS,Di.STRUCT_NAME_METADATA_CLASS,de.FRAGMENT),e.addStruct(Di.STRUCT_ID_METADATA_STATISTICS_VS,Di.STRUCT_NAME_METADATA_STATISTICS,de.VERTEX),e.addStruct(Di.STRUCT_ID_METADATA_STATISTICS_FS,Di.STRUCT_NAME_METADATA_STATISTICS,de.FRAGMENT),e.addFunction(Di.FUNCTION_ID_INITIALIZE_METADATA_VS,Di.FUNCTION_SIGNATURE_INITIALIZE_METADATA,de.VERTEX),e.addFunction(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,Di.FUNCTION_SIGNATURE_INITIALIZE_METADATA,de.FRAGMENT),e.addFunction(Di.FUNCTION_ID_SET_METADATA_VARYINGS,Di.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,de.VERTEX)}function Vtt(e,t){jtt(e,t),zJ(e.shaderBuilder,t),VJ(e.shaderBuilder,t)}function jtt(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:r,glslType:o}=t,s=jJ({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:o,metadataVariable:i,shaderDestination:de.BOTH,property:r});n.addStructField(Di.STRUCT_ID_METADATA_VS,o,i),n.addStructField(Di.STRUCT_ID_METADATA_FS,o,i);let a=`metadata.${i} = ${s};`;n.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])}function Htt(e,t,n){Gtt(e,t,n),zJ(e.shaderBuilder,t),VJ(e.shaderBuilder,t)}function Gtt(e,t,n){let{shaderBuilder:i,uniformMap:r}=e,{metadataVariable:o,glslType:s,property:a}=t,{texCoord:c,channels:u,index:f,texture:d,transform:p}=a.textureReader,g=`u_propertyTexture_${f}`,m=[];r.hasOwnProperty(g)||(i.addUniform("sampler2D",g,de.FRAGMENT),r[g]=()=>d),i.addStructField(Di.STRUCT_ID_METADATA_FS,s,o);let y=`attributes.texCoord_${c}`,A=y;if(l(p)&&!$.equals(p,$.IDENTITY)){let S=`${g}Transform`;i.addUniform("mat3",S,de.FRAGMENT),r[S]=function(){return p},A=`vec2(${S} * vec3(${y}, 1.0))`}let b=`texture(${g}, ${A}).${u}`,x=a.classProperty,T;n?T=x.unpackTextureInShader(b,u,o,m):T=x.unpackTextureInShaderWebGL1(b);let E=jJ({valueExpression:T,renderResources:e,glslType:s,metadataVariable:o,shaderDestination:de.FRAGMENT,property:a}),v=`metadata.${o} = ${E};`;m.push(v),i.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,m)}function zJ(e,t){let n=t.classProperty,{metadataVariable:i,glslType:r,shaderDestination:o}=t,s=Eye(Di.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,r),a=`${r}MetadataClass`;e.addStructField(Di.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,s),de.includesVertexShader(o)&&(e.addStructField(Di.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function VJ(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:r,glslType:o}=t;if(r===bt.ENUM)return;let s=Di.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=Eye(s,n,a,o),u=`${o}MetadataStatistics`;e.addStructField(Di.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,c),de.includesVertexShader(t.shaderDestination)&&(e.addStructField(Di.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function Wtt(e,t,n){qtt(e,t,n),zJ(e.shaderBuilder,t),VJ(e.shaderBuilder,t)}function qtt(e,t,n){let{shaderBuilder:i,uniformMap:r}=e,{metadataVariable:o,glslType:s,property:a,featureIdVariableName:c,propertyTable:u,propertyInfoIndex:f}=t;if(!n){_t("PropertyTableCustomShader","Property table support for custom shaders requires WebGL2.");return}if(!l(c)||!l(u.texture))return;let d=`u_propertyTableTexture_${u.id}`,p=[];r.hasOwnProperty(d)||(i.addUniform("sampler2D",d,de.BOTH),r[d]=()=>u.texture);let g=t.shaderDestination;de.includesVertexShader(g)&&i.addStructField(Di.STRUCT_ID_METADATA_VS,s,o),de.includesFragmentShader(g)&&i.addStructField(Di.STRUCT_ID_METADATA_FS,s,o);let y=`ivec2(${`featureIds.${c}`}, ${f})`,A=`texelFetch(${d}, ${y}, 0)`,b=t.classProperty,x=b.unpackTextureInShader(A,"rgba",o,p),T=jJ({valueExpression:x,renderResources:e,glslType:s,metadataVariable:o,shaderDestination:g,property:a??b}),E=`metadata.${o} = ${T};`;p.push(E),de.includesVertexShader(g)&&i.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_VS,p),de.includesFragmentShader(g)&&i.addFunctionLines(Di.FUNCTION_ID_INITIALIZE_METADATA_FS,p)}function Eye(e,t,n,i){function r(o){let s=t[o.specName];if(l(s))return`${n}.${o.shaderName} = ${i}(${s});`}return l(t)?e.map(r).filter(l):[]}function jJ(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,r=`u_${i}_offset`,o=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:u}=e;s.addUniform(c,r,u),s.addUniform(c,o,u);let{offset:f,scale:d}=n;return a[r]=()=>f,a[o]=()=>d,`czm_valueTransform(${r}, ${o}, ${t})`}function Ytt(e,t){let n=new Set,i=new Set;return Xtt(e,n,i),Ktt(e,t,n,i),{usedInVertex:n,usedInFragment:i}}function Xtt(e,t,n){let i=e.customShader;if(!l(i))return;let r=i.usedVariablesFragment?.metadataSet??{};for(let s in r)r.hasOwnProperty(s)&&n.add(s);let o=i.usedVariablesVertex?.metadataSet??{};for(let s in o)o.hasOwnProperty(s)&&t.add(s)}function Ktt(e,t,n,i){let r=e.style;if(!(l(r)&&t.primitiveType===Oe.POINTS))return;let s=r.color?.getVariables?.()??[];for(let u of s)n.add(u),i.add(u);let a=r.show?.getVariables?.()??[];for(let u of a)n.add(u),i.add(u);let c=r.pointSize?.getVariables?.()??[];for(let u of c)n.add(u)}function $tt(e,t){let n=t.usedInFragment.has(e)?de.FRAGMENT:de.NONE,i=t.usedInVertex.has(e)?de.VERTEX:de.NONE;return de.union(n,i)}var Gd=Di;var Cye={INHERIT:0,OPAQUE:1,TRANSLUCENT:2};Object.freeze(Cye);var TA=Cye;var Va={name:"CustomShaderPipelineStage",STRUCT_ID_ATTRIBUTES_VS:"AttributesVS",STRUCT_ID_ATTRIBUTES_FS:"AttributesFS",STRUCT_NAME_ATTRIBUTES:"Attributes",STRUCT_ID_VERTEX_INPUT:"VertexInput",STRUCT_NAME_VERTEX_INPUT:"VertexInput",STRUCT_ID_FRAGMENT_INPUT:"FragmentInput",STRUCT_NAME_FRAGMENT_INPUT:"FragmentInput",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS:"initializeInputStructVS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS:"void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS:"initializeInputStructFS",FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS:"void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",_oneTimeWarning:_t};Va.process=function(e,t,n){let{shaderBuilder:i,model:r,alphaOptions:o}=e,{customShader:s}=r,{lightingModel:a,translucencyMode:c}=s;l(a)&&(e.lightingOptions.lightingModel=a),c===TA.TRANSLUCENT?o.pass=Ie.TRANSLUCENT:c===TA.OPAQUE&&(o.pass=void 0);let u=rnt(s,t,e);if(!u.customShaderEnabled)return;if(cnt(i,s,u),u.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,de.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,de.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,de.FRAGMENT);let p=Kg.getDefineName(s.mode);i.addDefine(p,void 0,de.FRAGMENT)}let f=s.uniforms;for(let p in f)if(f.hasOwnProperty(p)){let g=f[p];i.addUniform(g.type,p)}let d=s.varyings;for(let p in d)if(d.hasOwnProperty(p)){let g=d[p];i.addVarying(g,p)}e.uniformMap=Ot(e.uniformMap,s.uniformMap)};function Jtt(e){let t={};for(let n=0;n<e.length;n++){let i=xt.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var Ztt={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},Qtt={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function vye(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=Ztt[t],i=Qtt[t];if(l(n))return{attributeField:[n,e],value:i}}function ent(e,t,n){if(!l(e.vertexShaderText))return{enabled:!1};let i=e.usedVariablesVertex;if(!Iye(i.metadataSet,n))return{enabled:!1};let r=i.attributeSet,o=Sye(t,r,!1),s=wye(t,r,!1),a,c=[],u=[];for(let f in o){if(!o.hasOwnProperty(f))continue;let p=[o[f].glslType,f];c.push(p),a=`vsInput.attributes.${f} = attributes.${f};`,u.push(a)}for(let f=0;f<s.length;f++){let d=s[f],p=vye(d);if(!l(p))return Va._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${d}, disabling custom vertex shader`),{enabled:!1};c.push(p.attributeField),a=`vsInput.attributes.${d} = ${p.value};`,u.push(a)}return{enabled:!0,attributeFields:c,initializationLines:u}}function tnt(e){let t=[],n=[],i=e.usedVariablesFragment.attributeSet;return i.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),n.push("fsInput.attributes.positionWC = attributes.positionWC;")),i.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),n.push("fsInput.attributes.positionEC = attributes.positionEC;")),{attributeFields:t,initializationLines:n}}function nnt(e,t,n){if(!l(e.fragmentShaderText))return{enabled:!1};let i=e.usedVariablesFragment;if(!Iye(i.metadataSet,n))return{enabled:!1};let r=i.attributeSet,o=Sye(t,r,!0),s=wye(t,r,!0),a,c=[],u=[];for(let d in o){if(!o.hasOwnProperty(d))continue;let g=[o[d].glslType,d];c.push(g),a=`fsInput.attributes.${d} = attributes.${d};`,u.push(a)}for(let d=0;d<s.length;d++){let p=s[d],g=vye(p);if(!l(g))return Va._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS",`Primitive is missing attribute ${p}, disabling custom fragment shader.`),{enabled:!1};c.push(g.attributeField),a=`fsInput.attributes.${p} = ${g.value};`,u.push(a)}let f=tnt(e);return{enabled:!0,attributeFields:c.concat(f.attributeFields),initializationLines:f.initializationLines.concat(u)}}var int={positionWC:!0,positionEC:!0};function Sye(e,t,n){let i={};for(let r in e){if(!e.hasOwnProperty(r))continue;let o=e[r],s=r;n&&r==="normalMC"?s="normalEC":n&&r==="tangentMC"&&(s="tangentEC",o.glslType="vec3"),t.hasOwnProperty(s)&&(i[s]=o)}return i}function wye(e,t,n){let i=[];for(let r in t){if(!t.hasOwnProperty(r)||int.hasOwnProperty(r))continue;let o=r;n&&r==="normalEC"?o="normalMC":n&&r==="tangentEC"&&(o="tangentMC"),e.hasOwnProperty(o)||i.push(r)}return i}function rnt(e,t,n){let i=Jtt(t.attributes),r=lnt(t,n.model.structuralMetadata),o=ent(e,i,r),s=nnt(e,i,r),c=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&s.enabled;return{vertexLines:o,fragmentLines:s,customShaderEnabled:o.enabled||s.enabled,shouldComputePositionWC:c}}function ont(e,t){let n=Va.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,Va.STRUCT_NAME_ATTRIBUTES,de.VERTEX);let{attributeFields:i,initializationLines:r}=t;for(let s=0;s<i.length;s++){let[a,c]=i[s];e.addStructField(n,a,c)}n=Va.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,Va.STRUCT_NAME_VERTEX_INPUT,de.VERTEX),e.addStructField(n,Va.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,xA.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Gd.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Gd.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Gd.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let o=Va.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(o,Va.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,de.VERTEX),e.addFunctionLines(o,r)}function snt(e,t){let n=Va.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,Va.STRUCT_NAME_ATTRIBUTES,de.FRAGMENT);let{attributeFields:i,initializationLines:r}=t;for(let s=0;s<i.length;s++){let[a,c]=i[s];e.addStructField(n,a,c)}n=Va.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,Va.STRUCT_NAME_FRAGMENT_INPUT,de.FRAGMENT),e.addStructField(n,Va.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,xA.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Gd.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Gd.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Gd.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let o=Va.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(o,Va.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,de.FRAGMENT),e.addFunctionLines(o,r)}var ant=[];function cnt(e,t,n){let{vertexLines:i,fragmentLines:r}=n,o=ant;i.enabled&&(ont(e,i),o.length=0,o.push("#line 0",t.vertexShaderText,$L),e.addVertexLines(o)),r.enabled&&(snt(e,r),o.length=0,o.push("#line 0",t.fragmentShaderText,JL),e.addFragmentLines(o))}function lnt(e,t){if(!l(t))return new Set;let n=e.propertyTextureIds,i=e.propertyAttributeIds,r=l(e.featureIds)?e.featureIds.map(a=>a.propertyTableId):[],o=new Set;function s(a,c){for(let u of a){let d=c[u].class.properties;Object.keys(d).forEach(p=>o.add(p))}}return s(n,t.propertyTextures),s(i,t.propertyAttributes),s(r,t.propertyTables),o}function Iye(e,t){for(let n in e)if(e.hasOwnProperty(n)&&!t.has(n))return Va._oneTimeWarning("CustomShaderPipelineStage.checkMetadataCompatibility",`A custom shader uses metadata property "${n}" which is not present for all primitives in the tileset. Disabling the custom shader for these primitives.`),!1;return!0}var nF=Va;var iF={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};iF.process=function(e,t,n){let i=e.shaderBuilder,r=e.model,o=l(r.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,de.VERTEX),i.addFunction(iF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,iF.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,de.VERTEX);let s=t.attributes;for(let a=0;a<s.length;a++){let c=s[a],u=c.quantization;if(!l(u))continue;let f=c.semantic===ct.POSITION,d=c.semantic===ct.TEXCOORD;if(o&&!f&&!d)continue;let p=xt.getAttributeInfo(c);fnt(i,p),unt(e,p)}};function unt(e,t){let n=e.shaderBuilder,i=e.uniformMap,r=t.variableName,o=t.attribute.quantization;if(o.octEncoded){let s=`model_normalizationRange_${r}`;n.addUniform("float",s,de.VERTEX),i[s]=function(){return o.normalizationRange}}else{let s=`model_quantizedVolumeOffset_${r}`,a=`model_quantizedVolumeStepSize_${r}`,c=t.glslType;n.addUniform(c,s,de.VERTEX),n.addUniform(c,a,de.VERTEX);let u=o.quantizedVolumeOffset,f=o.quantizedVolumeStepSize;/^color_\d+$/.test(r)&&(u=Pye(u,0),f=Pye(f,1)),i[s]=function(){return u},i[a]=function(){return f}}}function Pye(e,t){return e instanceof se?e:new se(e.x,e.y,e.z,t)}function fnt(e,t){let n=t.variableName,i=t.attribute.quantization,r;i.octEncoded?r=dnt(n,i):r=hnt(n),e.addFunctionLines(iF.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[r])}function dnt(e,t){let n=`attributes.${e}`,i=`a_quantized_${e}`,r=`model_normalizationRange_${e}`,o=t.octEncodedZXY?".zxy":".xyz";return`${n} = czm_octDecode(${i}, ${r})${o};`}function hnt(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,r=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${r};`}var rF=iF;var oF=`void edgeDetectionStage(inout vec4 color, inout FeatureIds featureIds) {
if (u_isEdgePass) {
return;
}
vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;
vec4 edgeColor = texture(czm_edgeColorTexture, screenCoord);
vec4 edgeId = texture(czm_edgeIdTexture, screenCoord);
float edgeDepthWin = czm_unpackDepth(texture(czm_edgeDepthTexture, screenCoord));
float n = czm_currentFrustum.x;
float f = czm_currentFrustum.y;
vec4 geomEC = czm_windowToEyeCoordinates(gl_FragCoord);
float geomDepthLinear = -geomEC.z;
float z_ndc_edge = edgeDepthWin * 2.0 - 1.0;
float edgeDepthLinear = (2.0 * n * f) / (f + n - z_ndc_edge * (f - n));
float d = abs(edgeDepthLinear - geomDepthLinear);
float pixelStepLinear = fwidth(geomDepthLinear);
float rel = geomDepthLinear * 0.0005;
float eps = max(n * 1e-4, max(pixelStepLinear * 1.5, rel));
if (d < eps && edgeId.r > 0.0) {
#ifdef HAS_EDGE_FEATURE_ID
float edgeFeatureId = edgeId.g;
float currentFeatureId = float(featureIds.featureId_0);
#endif
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
bool isBackground = geomDepthLinear > globeDepth;
bool drawEdge = isBackground;
#ifdef HAS_EDGE_FEATURE_ID
bool hasEdgeFeature = edgeFeatureId > 0.0;
bool hasCurrentFeature = currentFeatureId > 0.0;
bool featuresMatch = edgeFeatureId == currentFeatureId;
drawEdge = drawEdge || !hasEdgeFeature || !hasCurrentFeature || featuresMatch;
#else
drawEdge = true;
#endif
if (drawEdge) {
color = edgeColor;
}
}
}
`;var Dye={name:"EdgeDetectionPipelineStage"};Dye.process=function(e){e.shaderBuilder.addFragmentLines([oF])};var sF=Dye;var aF=`#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
layout(location = 1) out vec4 out_id;
layout(location = 2) out vec4 out_edgeDepth;
#endif
void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
{
#ifdef HAS_EDGE_VISIBILITY
if (!u_isEdgePass) {
return;
}
float edgeTypeInt = v_edgeType * 255.0;
if (edgeTypeInt < 0.5) {
discard;
}
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
if (v_shouldDiscard > 0.5) {
discard;
}
}
vec4 finalColor = color;
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
if (v_edgeColor.a >= 0.0) {
finalColor = v_edgeColor;
}
#endif
#ifdef HAS_LINE_PATTERN
const float maskLength = 16.0;
float dashPosition = fract(v_lineCoord / maskLength);
float maskIndex = floor(dashPosition * maskLength);
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
if (mod(maskTest, 2.0) < 1.0) {
discard;
}
#endif
color = finalColor;
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
out_id = vec4(0.0);
out_id.r = edgeTypeInt;
#ifdef HAS_EDGE_FEATURE_ID
out_id.g = float(featureIds.featureId_0);
#else
out_id.g = 0.0;
#endif
out_edgeDepth = czm_packDepth(gl_FragCoord.z);
#endif
#endif
}
`;var cF=`#ifdef HAS_EDGE_VISIBILITY
void edgeVisibilityStageVS() {
if (!u_isEdgePass) {
return;
}
v_edgeType = a_edgeType;
v_faceNormalAView = czm_normal * a_faceNormalA;
v_faceNormalBView = czm_normal * a_faceNormalB;
v_edgeOffset = a_edgeOffset;
v_shouldDiscard = 0.0;
float edgeTypeInt = a_edgeType * 255.0;
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
vec3 normalA = normalize(v_faceNormalAView);
vec3 normalB = normalize(v_faceNormalBView);
const float perpTol = 2.5e-4;
vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
vec3 toEye1 = normalize(-currentPosEC.xyz);
float dotA1 = dot(normalA, toEye1);
float dotB1 = dot(normalB, toEye1);
vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
vec3 toEye2 = normalize(-otherPosEC.xyz);
float dotA2 = dot(normalA, toEye2);
float dotB2 = dot(normalB, toEye2);
if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
v_shouldDiscard = 1.0;
}
}
#ifdef HAS_EDGE_FEATURE_ID
v_featureId_0 = a_edgeFeatureId;
#endif
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
v_edgeColor = a_edgeColor;
#endif
#ifdef HAS_LINE_PATTERN
#ifdef HAS_EDGE_CUMULATIVE_DISTANCE
v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
#else
vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
vec2 windowDir = otherScreen - currentScreen;
const float textureCoordinateBase = 8192.0;
if (abs(windowDir.x) > abs(windowDir.y)) {
v_lineCoord = textureCoordinateBase + currentScreen.x;
} else {
v_lineCoord = textureCoordinateBase + currentScreen.y;
}
#endif
#endif
vec4 posClip = gl_Position;
if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
vec4 currentClip = posClip;
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
vec2 currentNDC = currentClip.xy / currentClip.w;
vec2 otherNDC = otherClip.xy / otherClip.w;
vec2 edgeDirNDC = otherNDC - currentNDC;
if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
edgeDirNDC = -edgeDirNDC;
}
edgeDirNDC = normalize(edgeDirNDC);
vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
float lineWidthPixels = u_lineWidth;
vec2 viewportSize = czm_viewport.zw;
vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
posClip.xy += offsetClip;
}
gl_Position = posClip;
}
#endif
`;var HJ=class e{static readAttributeAsTypedArray(t){let n=e.readAttributeAsRawCompactTypedArray(t),i=t.normalized,r=t.quantization;if(!l(r)&&!i)return n;let o=t.type,s=t.count,a=n;return i&&(a=cn.dequantize(n,t.componentDatatype,o,s)),l(r)?e.dequantize(a,s,o,r):a}static readAttributeAsRawCompactTypedArray(t){let n=t.type,i=t.count,r=Vt.getNumberOfComponents(n),o=i*r,s=t.componentDatatype,a=t.quantization;l(a)&&(s=a.componentDatatype);let c=t.buffer,u=t.byteOffset,f=t.byteStride,d=Y.getSizeInBytes(s),p=r*d,g=!l(f)||f===p;if(l(t.typedArray))return t.typedArray;if(g){let v=Y.createTypedArray(s,o);return c.getBufferData(v,u),v}let y=new Uint8Array(c.sizeInBytes);c.getBufferData(y);let A=Y.createTypedArray(s,o),b=f??p,x=new DataView(y.buffer,y.byteOffset,y.byteLength),T=new Array(r),E=e.createComponentsReader(s);for(let v=0;v<i;++v){let S=u+v*b;E(x,S,r,T);for(let I=0;I<r;++I)A[v*r+I]=T[I]}return A}static dequantize(t,n,i,r){if(r.octEncoded){let a=e.octDecode(t,n,r.normalizationRange,void 0);return r.octEncodedZXY&&e.convertZxyToXyz(a,a),a}let o=r.quantizedVolumeStepSize,s=r.quantizedVolumeOffset;if(i===Vt.SCALAR)return e.dequantize1D(t,n,o,s,void 0);if(i===Vt.VEC2)return e.dequantize2D(t,n,o,s,void 0);if(i===Vt.VEC3)return e.dequantize3D(t,n,o,s,void 0);if(i===Vt.VEC4)return e.dequantize4D(t,n,o,s,void 0);throw new pe(`Element type for dequantization must be SCALAR, VEC2, VEC3, or VEC4, but is ${i}`)}static octDecode(t,n,i,r){l(r)||(r=new Float32Array(t.length));let o=new h;for(let s=0;s<n;s++)h.unpack(t,s*3,o),cn.octDecodeInRange(o.x,o.y,i,o),h.pack(o,r,s*3);return r}static convertZxyToXyz(t,n,i){l(i)||(i=new Float32Array(t.length));let r=0;for(let o=0;o<n;o++,r+=3){let s=t[r+0],a=t[r+1],c=t[r+2];i[r+0]=a,i[r+1]=c,i[r+2]=s}return i}static dequantize1D(t,n,i,r,o){l(o)||(o=new Float32Array(t.length));for(let s=0;s<n;s++){let c=t[s]*i+r;o[s]=c}return o}static dequantize2D(t,n,i,r,o){l(o)||(o=new Float32Array(t.length));let s=new U;for(let a=0;a<n;a++)U.unpack(t,a*2,s),U.multiplyComponents(s,i,s),U.add(s,r,s),U.pack(s,o,a*2);return o}static dequantize3D(t,n,i,r,o){l(o)||(o=new Float32Array(t.length));let s=new h;for(let a=0;a<n;a++)h.unpack(t,a*3,s),h.multiplyComponents(s,i,s),h.add(s,r,s),h.pack(s,o,a*3);return o}static dequantize4D(t,n,i,r,o){l(o)||(o=new Float32Array(t.length));let s=new se;for(let a=0;a<n;a++)se.unpack(t,a*4,s),se.multiplyComponents(s,i,s),se.add(s,r,s),se.pack(s,o,a*4);return o}static createComponentsReader(t){let n=e.createComponentReader(t),i=Y.getSizeInBytes(t);return function(r,o,s,a){let c=o;for(let u=0;u<s;++u)a[u]=n(r,c),c+=i}}static createComponentReader(t){switch(t){case Y.BYTE:return function(n,i){return n.getInt8(i)};case Y.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case Y.SHORT:return function(n,i){return n.getInt16(i,!0)};case Y.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case Y.INT:return function(n,i){return n.getInt32(i,!0)};case Y.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case Y.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case Y.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new pe(`The componentType must be a valid ComponentDatatype, but is ${t}`)}static transform3D(t,n,i){l(i)||(i=new Float32Array(t.length));let r=new h,o=t.length/3;for(let s=0;s<o;s++)h.unpack(t,s*3,r),N.multiplyByPoint(n,r,r),h.pack(r,i,s*3);return i}static readImplicitRangeAsTypedArray(t,n){let i=n.attributes[0]?.count??0,r=t.offset,o=t.repeat,s=new Float32Array(i);if(l(o))for(let a=0;a<i;a++)s[a]=r+Math.floor(a/o);else s.fill(r);return s}static readIndicesAsTypedArray(t){let n=t.typedArray;if(l(n))return n;let i=t.buffer,r=t.count,o=t.indexDatatype,s=e.createIndexTypedArray(o,r);return i.getBufferData(s),s}static readIndicesAsTriangleIndicesTypedArray(t,n){let i=e.readIndicesAsTypedArray(t);if(n===Oe.TRIANGLES)return i;if(n===Oe.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===Oe.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new pe(`The primitiveType must be TRIANGLES (${Oe.TRIANGLES}, TRIANGLE_STRIP (${Oe.TRIANGLE_STRIP}, or TRIANGLE_FAN (${Oe.TRIANGLE_FAN}, but is ${n}`)}static convertTriangleStripToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)i%2===1?(n[i*3+0]=t[i+0],n[i*3+1]=t[i+2],n[i*3+2]=t[i+1]):(n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2]);return n}static convertTriangleFanToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2];return n}static createIndexTypedArray(t,n){switch(t){case je.UNSIGNED_BYTE:return new Uint8Array(n);case je.UNSIGNED_SHORT:return new Uint16Array(n);case je.UNSIGNED_INT:return new Uint32Array(n)}throw new pe(`The indexDatatype must be UNSIGNED_BYTE (${je.UNSIGNED_BYTE}, UNSIGNED_SHORT (${je.UNSIGNED_SHORT}, or UNSIGNED_INT (${je.UNSIGNED_INT}, but is ${t}`)}static forEachPrimitive(t,n,i){let r=n?.mapProjection,o=n?.instanceFeatureIdLabel,s=t.sceneGraph;if(!l(s))return;let a={nodeComputedTransform:new N,modelMatrix:new N,computedModelMatrix:new N},c=s._runtimeNodes,u=c.length;for(let f=0;f<u;f++){let d=c[f],p=e.computeNodeTransforms(d,s,t,a),g=p.computedModelMatrix;l(r)&&(g=At.basisTo2D(r,g,g));let m=e.computeInstanceTransforms(d,g,p.nodeComputedTransform,p.modelMatrix),y=l(o)?e.computeInstanceFeatureIds(d,o):void 0,A=[];for(let x=0;x<m.length;x++)A.push({transform:m[x],featureId:l(y)?y[x]:void 0});let b=d.runtimePrimitives.length;for(let x=0;x<b;x++){let T=d.runtimePrimitives[x];i(T,T.primitive,A,g)}}}static computeNodeTransforms(t,n,i,r){let o=t.node,s=N.clone(t.computedTransform,r.nodeComputedTransform),a=N.clone(n.computedModelMatrix,r.modelMatrix),c=o.instances;l(c)&&c.transformInWorldSpace&&(a=N.multiplyTransformation(i.modelMatrix,n.components.transform,a),s=N.multiplyTransformation(n.axisCorrectionMatrix,t.computedTransform,s));let u=N.multiplyTransformation(a,s,r.computedModelMatrix);return r.computedModelMatrix=u,r.nodeComputedTransform=s,r.modelMatrix=a,r}static computeInstanceTransforms(t,n,i,r){let o=[],a=t.node.instances;if(l(a)){let c=a.attributes[0].count,u=a.attributes[0].componentDatatype,f=12,d=t.transformsTypedArray;if(!l(d)){let p=t.instancingTransformsBuffer;l(p)&&(d=Y.createTypedArray(u,c*f),p.getBufferData(d))}l(d)?e.computeInstanceTransformsFromTypedArray(d,c,o):e.computeInstanceTransformsFromAttributes(a,c,o);for(let p=0;p<o.length;p++){let g=o[p];a.transformInWorldSpace?(N.multiplyTransformation(g,i,g),N.multiplyTransformation(r,g,g)):N.multiplyTransformation(n,g,g)}}return o.length===0&&o.push(n),o}static computeInstanceFeatureIds(t,n){let r=t.node.instances;if(!l(r))return;let o=xt.getFeatureIdsByLabel(r.featureIds,n);if(!l(o))return;let s;if("setIndex"in o){let c=xt.getAttributeBySemantic(r,ct.FEATURE_ID,o.setIndex);l(c)&&(s=e.readAttributeAsTypedArray(c))}if("offset"in o&&(s=e.readImplicitRangeAsTypedArray(o,r)),!l(s))return;let a=new Array(s.length);for(let c=0;c<s.length;c++)a[c]=s[c];return a}static computeInstanceTransformsFromTypedArray(t,n,i){for(let o=0;o<n;o++){let s=o*12,a=new N(t[s],t[s+1],t[s+2],t[s+3],t[s+4],t[s+5],t[s+6],t[s+7],t[s+8],t[s+9],t[s+10],t[s+11],0,0,0,1);i.push(a)}}static computeInstanceTransformsFromAttributes(t,n,i){let r=xt.getAttributeBySemantic(t,No.TRANSLATION),o=xt.getAttributeBySemantic(t,No.ROTATION),s=xt.getAttributeBySemantic(t,No.SCALE),a=l(r),c=l(o),u=l(s);if(!a&&!c&&!u)return;let f,d,p;a&&(f=e.readAttributeAsRawCompactTypedArray(r)),c&&(d=e.readAttributeAsRawCompactTypedArray(o)),u&&(p=e.readAttributeAsRawCompactTypedArray(s));for(let g=0;g<n;g++){let m=a?new h(f[g*3],f[g*3+1],f[g*3+2]):h.ZERO,y=c?new Le(d[g*4],d[g*4+1],d[g*4+2],d[g*4+3]):Le.IDENTITY,A=u?new h(p[g*3],p[g*3+1],p[g*3+2]):h.ONE,b=N.fromTranslationQuaternionRotationScale(m,y,A,new N);i.push(b)}}},ba=HJ;var OS=Object.freeze({HIDDEN:0,SILHOUETTE:1,HARD:2,REPEATED_HARD:3}),Rye={name:"EdgeVisibilityPipelineStage"};Rye.process=function(e,t,n){if(!l(t.edgeVisibility))return;n.edgeVisibilityRequested=!0;let i=e.shaderBuilder;i.addDefine("HAS_EDGE_VISIBILITY",void 0,de.BOTH),i.addDefine("HAS_EDGE_VISIBILITY_MRT",void 0,de.FRAGMENT),i.addFragmentLines(aF),i.addVertexLines(cF),i.addUniform("bool","u_isEdgePass",de.BOTH);let r=t.material,o=l(r)?r.lineStyle:void 0;(!l(o)||!l(o.width))&&i.addUniform("float","u_lineWidth",de.VERTEX);let s=i.addAttribute("float","a_edgeType");i.addVarying("float","v_edgeType","flat");let a=i.addAttribute("float","a_edgeFeatureId"),c=i.addAttribute("vec3","a_faceNormalA"),u=i.addAttribute("vec3","a_faceNormalB");i.addVarying("vec3","v_faceNormalAView","flat"),i.addVarying("vec3","v_faceNormalBView","flat"),i.addVarying("float","v_shouldDiscard","flat");let f=i.addAttribute("vec3","a_edgeOtherPos"),d=i.addAttribute("float","a_edgeOffset");i.addVarying("float","v_edgeOffset");let p=pnt(t);if(!l(p)||!l(p.edgeIndices)||p.edgeIndices.length===0)return;let g=e.runtimePrimitive.primitive,m=gnt(g),A=p.edgeData.some(function(R){return l(R.color)})||l(m),b;A&&(b=i.addAttribute("vec4","a_edgeColor"),i.addVarying("vec4","v_edgeColor","flat"),i.addDefine("HAS_EDGE_COLOR_ATTRIBUTE",void 0,de.BOTH));let x,T,E=xt.getAttributeBySemantic(t,"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE");l(E)&&(x=E,T=i.addAttribute("float","a_edgeCumulativeDistance"),i.addDefine("HAS_EDGE_CUMULATIVE_DISTANCE",void 0,de.VERTEX));let v=mnt(p.edgeIndices,p.edgeData,t.edgeVisibility),S=_nt(p.edgeIndices,p.edgeData,e,n.context,s,c,u,a,b,f,d,m,t.edgeVisibility,v,x,T);if(!l(S))return;S.hasEdgeFeatureIds&&i.addDefine("HAS_EDGE_FEATURE_ID",void 0,de.BOTH),e.uniformMap.u_isEdgePass=function(){return!1},l(e.uniformMap.u_lineWidth)||(e.uniformMap.u_lineWidth=function(){return 1}),l(x)&&(l(e.uniformMap.u_pixelsPerWorld)||(e.uniformMap.u_pixelsPerWorld=function(){return 1}));let I=l(o)&&l(o.width)?o.width*n.pixelRatio:void 0;e.edgeGeometry={vertexArray:S.vertexArray,indexCount:S.indexCount,primitiveType:Oe.TRIANGLES,pass:Ie.CESIUM_3D_TILE_EDGES,lineWidth:I}};function mnt(e,t,n){let i=e.length/2,r=new Float32Array(i*6),o=n.silhouetteNormals;if(!l(o))return r;let s=o.length/3,a=new Float32Array(o.length),c=new h;for(let u=0;u<s;u++)c.x=o[u*3],c.y=o[u*3+1],c.z=o[u*3+2],h.magnitudeSquared(c)>0?h.normalize(c,c):(c.x=0,c.y=0,c.z=1),a[u*3]=c.x,a[u*3+1]=c.y,a[u*3+2]=c.z;for(let u=0;u<i;u++){let{edgeType:f,silhouetteEdgeIndex:d}=t[u];if(f!==OS.SILHOUETTE||d<0)continue;let p=d*2;if((p+1)*3+2>=a.length)continue;let g=p*3,m=(p+1)*3,y=u*6;r[y]=a[g],r[y+1]=a[g+1],r[y+2]=a[g+2],r[y+3]=a[m],r[y+4]=a[m+1],r[y+5]=a[m+2]}return r}function pnt(e){let t=e.edgeVisibility;if(!l(t))return[];let n=t.visibility,i=e.indices,r=t.lineStrings,o=e.attributes,s=l(o)&&o.length>0?o[0].count:0,a=l(n)&&l(i)&&l(i.typedArray)&&i.typedArray.length>0,c=l(r)&&r.length>0;if(!a&&!c)return[];let u=a?i.typedArray:void 0,f=[],d=[],p=new Set,g=0,m=t.materialColor;if(a){let y=0,A=u.length,b=n;for(let x=0;x+2<A;x+=3){let T=u[x],E=u[x+1],v=u[x+2];for(let S=0;S<3;S++){let I,R;S===0?(I=T,R=E):S===1?(I=E,R=v):(I=v,R=T);let O=Math.floor(y/4),L=y%4*2;if(y++,O>=b.length)break;let C=b[O]>>L&3;if(C===OS.HIDDEN)continue;let w=Math.min(I,R),P=Math.max(I,R),M=`${w},${P}`;if(p.has(M))continue;p.add(M),f.push(I,R);let F=-1;C===OS.SILHOUETTE&&(F=g,g++),d.push({edgeType:C===OS.REPEATED_HARD?OS.HARD:C,silhouetteEdgeIndex:F,color:m})}}}if(c)for(let y=0;y<r.length;y++){let A=r[y];if(!l(A)||!l(A.indices))continue;let b=A.indices;if(!l(b)||b.length<2)continue;let x=A.restartIndex,T=l(A.materialColor)?A.materialColor:m,E;for(let v=0;v<b.length;v++){let S=b[v];if(l(x)&&S===x){E=void 0;continue}if(!l(E)){E=S;continue}let I=E,R=S;if(E=S,I===R||s>0&&(I<0||I>=s||R<0||R>=s))continue;let O=Math.min(I,R),L=Math.max(I,R),_=`${O},${L}`;p.has(_)||(p.add(_),f.push(I,R),d.push({edgeType:OS.HARD,silhouetteEdgeIndex:-1,color:l(T)?T:void 0}))}}return{edgeIndices:f,edgeData:d,silhouetteEdgeCount:g}}function gnt(e){if(!l(e))return;let t=xt.getAttributeBySemantic(e,ct.COLOR);if(!l(t))return;let n=Vt.getNumberOfComponents(t.type);if(n!==3&&n!==4)return;let i=t.typedArray;if(l(i)||(i=ba.readAttributeAsTypedArray(t)),!l(i))return;let r=t.count;if(!l(r)||r===0||i.length<r*n)return;let o=i instanceof Float32Array||i instanceof Float64Array,s=i instanceof Uint8Array,a=i instanceof Uint16Array;if(!o&&!s&&!a)return;let c=new Float32Array(r*4),u=function(f){let d;return o?d=f:s?d=f/255:a&&(d=f/65535),Math.min(Math.max(d,0),1)};for(let f=0;f<r;f++){let d=f*n,p=f*4;c[p]=u(i[d]),c[p+1]=u(i[d+1]),c[p+2]=u(i[d+2]),n===4?c[p+3]=u(i[d+3]):c[p+3]=1}return{colors:c,count:r}}function _nt(e,t,n,i,r,o,s,a,c,u,f,d,p,g,m,y){if(!l(e)||e.length===0)return;let A=t.length,x=A*4,T=0,E=xt.getAttributeBySemantic(n.runtimePrimitive.primitive,ct.POSITION),v=l(E.typedArray)?E.typedArray:ba.readAttributeAsTypedArray(E),S=new Float32Array(x*3),I=new Float32Array(x),R=new Float32Array(x*3),O=new Float32Array(x*3),L=new Float32Array(x*3),_=new Float32Array(x),C=l(m),w=C?new Float32Array(x):void 0,P;C&&(P=l(m.typedArray)?m.typedArray:ba.readAttributeAsTypedArray(m));let M=l(c),F=M?new Float32Array(x*4):void 0,V=l(d)?d.colors:void 0,B=l(d)?d.count:0;function j($e){if(!M)return;let Pe=$e*4;F[Pe]=0,F[Pe+1]=0,F[Pe+2]=0,F[Pe+3]=-1}function k($e,Pe){if(!M)return;let qe=$e*4,st=l(Pe.x)?Pe.x:Pe[0],vt=l(Pe.y)?Pe.y:Pe[1],Gt=l(Pe.z)?Pe.z:Pe[2],lt=l(Pe.w)?Pe.w:l(Pe[3])?Pe[3]:1;F[qe]=st,F[qe+1]=vt,F[qe+2]=Gt,F[qe+3]=lt}function G($e,Pe){if(!M)return;if(Pe>=B){j($e);return}let qe=Pe*4,st=$e*4;F[st]=V[qe],F[st+1]=V[qe+1],F[st+2]=V[qe+2],F[st+3]=V[qe+3]}for(let $e=0;$e<A;$e++){let Pe=e[$e*2],qe=e[$e*2+1],vt=t[$e].edgeType/255,Gt=v[Pe*3],lt=v[Pe*3+1],mt=v[Pe*3+2],ft=v[qe*3],Xt=v[qe*3+1],rt=v[qe*3+2],ht=$e*4;S[ht*3]=Gt,S[ht*3+1]=lt,S[ht*3+2]=mt,L[ht*3]=ft,L[ht*3+1]=Xt,L[ht*3+2]=rt,_[ht]=-1,I[ht]=vt,S[(ht+1)*3]=Gt,S[(ht+1)*3+1]=lt,S[(ht+1)*3+2]=mt,L[(ht+1)*3]=ft,L[(ht+1)*3+1]=Xt,L[(ht+1)*3+2]=rt,_[ht+1]=1,I[ht+1]=vt,S[(ht+2)*3]=ft,S[(ht+2)*3+1]=Xt,S[(ht+2)*3+2]=rt,L[(ht+2)*3]=Gt,L[(ht+2)*3+1]=lt,L[(ht+2)*3+2]=mt,_[ht+2]=1,I[ht+2]=vt,S[(ht+3)*3]=ft,S[(ht+3)*3+1]=Xt,S[(ht+3)*3+2]=rt,L[(ht+3)*3]=Gt,L[(ht+3)*3+1]=lt,L[(ht+3)*3+2]=mt,_[ht+3]=-1,I[ht+3]=vt;let Bi=t[$e].color;if(l(Bi))for(let nn=0;nn<4;nn++)k(ht+nn,Bi);else if(l(V))for(let nn=0;nn<4;nn++)G(ht+nn,Pe);else for(let nn=0;nn<4;nn++)j(ht+nn);if(C){let nn=P[Pe],Wn=P[qe];w[ht]=nn,w[ht+1]=nn,w[ht+2]=Wn,w[ht+3]=Wn}let Xn=$e*6,bi=g[Xn],Wi=g[Xn+1],wi=g[Xn+2],hi=g[Xn+3],xi=g[Xn+4],jn=g[Xn+5];for(let nn=0;nn<4;nn++)R[(ht+nn)*3]=bi,R[(ht+nn)*3+1]=Wi,R[(ht+nn)*3+2]=wi,O[(ht+nn)*3]=hi,O[(ht+nn)*3+1]=xi,O[(ht+nn)*3+2]=jn}let q=nt.createVertexBuffer({context:i,typedArray:S,usage:Me.STATIC_DRAW}),Q=nt.createVertexBuffer({context:i,typedArray:I,usage:Me.STATIC_DRAW}),W=nt.createVertexBuffer({context:i,typedArray:R,usage:Me.STATIC_DRAW}),J=nt.createVertexBuffer({context:i,typedArray:O,usage:Me.STATIC_DRAW}),Z=nt.createVertexBuffer({context:i,typedArray:L,usage:Me.STATIC_DRAW}),ae=nt.createVertexBuffer({context:i,typedArray:_,usage:Me.STATIC_DRAW}),Ae=M?nt.createVertexBuffer({context:i,typedArray:F,usage:Me.STATIC_DRAW}):void 0,fe=C?nt.createVertexBuffer({context:i,typedArray:w,usage:Me.STATIC_DRAW}):void 0,ge=A*2*3,we=x>65534,Se=we?new Uint32Array(ge):new Uint16Array(ge);for(let $e=0;$e<A;$e++){let Pe=$e*4,qe=$e*6;Se[qe]=Pe,Se[qe+1]=Pe+1,Se[qe+2]=Pe+2,Se[qe+3]=Pe,Se[qe+4]=Pe+2,Se[qe+5]=Pe+3}let Re=nt.createIndexBuffer({context:i,typedArray:Se,usage:Me.STATIC_DRAW,indexDatatype:we?je.UNSIGNED_INT:je.UNSIGNED_SHORT}),Qe=[{index:T,vertexBuffer:q,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:r,vertexBuffer:Q,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1},{index:o,vertexBuffer:W,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:s,vertexBuffer:J,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:u,vertexBuffer:Z,componentsPerAttribute:3,componentDatatype:Y.FLOAT,normalize:!1},{index:f,vertexBuffer:ae,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1}];M&&Qe.push({index:c,vertexBuffer:Ae,componentsPerAttribute:4,componentDatatype:Y.FLOAT,normalize:!1}),C&&Qe.push({index:y,vertexBuffer:fe,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1});let He=n.runtimePrimitive.primitive;if(l(He.featureIds)&&He.featureIds.length>0){let $e=He.featureIds[0];if(l($e.setIndex)){let Pe=He.attributes.find(qe=>qe.semantic===ct.FEATURE_ID&&qe.setIndex===$e.setIndex);if(l(Pe)){let qe=l(Pe.typedArray)?Pe.typedArray:ba.readAttributeAsTypedArray(Pe),st=new Float32Array(x);for(let Gt=0;Gt<A;Gt++){let lt=e[Gt*2],mt=lt<qe.length?qe[lt]:0;for(let ft=0;ft<4;ft++)st[Gt*4+ft]=mt}let vt=nt.createVertexBuffer({context:i,typedArray:st,usage:Me.STATIC_DRAW});Qe.push({index:a,vertexBuffer:vt,componentsPerAttribute:1,componentDatatype:Y.FLOAT,normalize:!1})}}}return{vertexArray:new zn({context:i,attributes:Qe,indexBuffer:Re}),indexCount:ge,hasEdgeFeatureIds:l(He.featureIds)&&He.featureIds.length>0}}var lF=Rye;var uF=`void geometryStage(out ProcessedAttributes attributes)
{
attributes.positionMC = v_positionMC;
attributes.positionEC = v_positionEC;
#if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
attributes.positionWC = v_positionWC;
#endif
#ifdef HAS_NORMALS
attributes.normalEC = normalize(v_normalEC);
#endif
#ifdef HAS_TANGENTS
attributes.tangentEC = normalize(v_tangentEC);
#endif
#ifdef HAS_BITANGENTS
attributes.bitangentEC = normalize(v_bitangentEC);
#endif
setDynamicVaryings(attributes);
}
`;var fF=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
{
vec4 computedPosition;
vec3 positionMC = attributes.positionMC;
v_positionMC = positionMC;
v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
vec3 position2D = attributes.position2D;
vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
computedPosition = czm_projection * vec4(positionEC, 1.0);
#else
computedPosition = czm_projection * vec4(v_positionEC, 1.0);
#endif
#if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
#endif
#ifdef HAS_NORMALS
v_normalEC = normalize(normal * attributes.normalMC);
#endif
#ifdef HAS_TANGENTS
v_tangentEC = normalize(normal * attributes.tangentMC);
#endif
#ifdef HAS_BITANGENTS
v_bitangentEC = normalize(normal * attributes.bitangentMC);
#endif
setDynamicVaryings(attributes);
return computedPosition;
}
`;var MS=`vec2 computeSt(float featureId)
{
float stepX = model_textureStep.x;
float centerX = model_textureStep.y;
#ifdef MULTILINE_BATCH_TEXTURE
float stepY = model_textureStep.z;
float centerY = model_textureStep.w;
float xId = mod(featureId, model_textureDimensions.x);
float yId = floor(featureId / model_textureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
#else
return vec2(centerX + (featureId * stepX), 0.5);
#endif
}
void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
{
int featureId = featureIds.SELECTED_FEATURE_ID;
if (featureId < model_featuresLength)
{
vec2 featureSt = computeSt(float(featureId));
feature.id = featureId;
feature.st = featureSt;
feature.color = texture(model_batchTexture, featureSt);
}
else
{
feature.id = model_featuresLength + 1;
feature.st = vec2(0.0);
feature.color = vec4(1.0);
}
#ifdef HAS_NULL_FEATURE_ID
if (featureId == model_nullFeatureId) {
feature.id = featureId;
feature.st = vec2(0.0);
feature.color = vec4(1.0);
}
#endif
}
`;var dF={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};dF.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let r=e.model,o=e.runtimeNode.node,s=ynt(r,o,t),a=s.shaderDestination;i.addDefine("HAS_SELECTED_FEATURE_ID",void 0,a),i.addDefine("SELECTED_FEATURE_ID",s.variableName,a),i.addDefine(s.featureIdDefine,void 0,a),Ant(i);let c=s.featureIds.nullFeatureId,u=e.uniformMap;l(c)&&(i.addDefine("HAS_NULL_FEATURE_ID",void 0,a),i.addUniform("int","model_nullFeatureId",a),u.model_nullFeatureId=function(){return c}),s.shaderDestination===de.BOTH&&i.addVertexLines(MS),i.addFragmentLines(MS)};function Oye(e){return e instanceof Cn.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function Mye(e){return e instanceof Cn.FeatureIdTexture?de.FRAGMENT:de.BOTH}function ynt(e,t,n){let i,r;return l(t.instances)&&(r=xt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(r))?(i=r.label??r.positionalLabel,{featureIds:r,variableName:i,shaderDestination:Mye(r),featureIdDefine:Oye(r)}):(r=xt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=r.label??r.positionalLabel,{featureIds:r,variableName:i,shaderDestination:Mye(r),featureIdDefine:Oye(r)})}function Ant(e){e.addStructField(dF.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(dF.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(dF.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var EA=dF;var ja={name:"GeometryPipelineStage",STRUCT_ID_PROCESSED_ATTRIBUTES_VS:"ProcessedAttributesVS",STRUCT_ID_PROCESSED_ATTRIBUTES_FS:"ProcessedAttributesFS",STRUCT_NAME_PROCESSED_ATTRIBUTES:"ProcessedAttributes",FUNCTION_ID_INITIALIZE_ATTRIBUTES:"initializeAttributes",FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES:"void initializeAttributes(out ProcessedAttributes attributes)",FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS:"setDynamicVaryingsVS",FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS:"setDynamicVaryingsFS",FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS:"void setDynamicVaryings(inout ProcessedAttributes attributes)"};ja.process=function(e,t,n){let{shaderBuilder:i,model:r}=e;i.addStruct(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",de.VERTEX),i.addStruct(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",de.FRAGMENT),i.addStruct(EA.STRUCT_ID_SELECTED_FEATURE,EA.STRUCT_NAME_SELECTED_FEATURE,de.BOTH),i.addFunction(ja.FUNCTION_ID_INITIALIZE_ATTRIBUTES,ja.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,de.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(ja.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,ja.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,de.VERTEX),i.addFunction(ja.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,ja.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,de.FRAGMENT),r.type===Wo.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,de.FRAGMENT);let o=n.mode!==re.SCENE3D&&!n.scene3DOnly&&r._projectTo2D,s=l(e.runtimeNode.node.instances),a=o&&!s,c=t.attributes.length;for(let u=0;u<c;u++){let f=t.attributes[u],d=Vt.getAttributeLocationCount(f.type),p=f.semantic===ct.POSITION,g;d>1?(g=e.attributeIndex,e.attributeIndex+=d):p&&!a?g=0:g=e.attributeIndex++;let m=!p&&t.primitiveType===Oe.POINTS&&n.context.webgl2?"flat":void 0;bnt(e,f,g,d,o,s,m)}Pnt(i,t.attributes),t.primitiveType===Oe.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(fF),i.addFragmentLines(uF)};function bnt(e,t,n,i,r,o,s){let a=e.shaderBuilder,c=xt.getAttributeInfo(t),u=r&&!o;i>1?Ent(e,t,n,i):Tnt(e,t,n,u),vnt(a,c,u),Cnt(a,c,s),l(t.semantic)&&xnt(a,t),Snt(a,c,r),wnt(a,c,u),Int(a,c)}function xnt(e,t){let{semantic:n,setIndex:i}=t;switch(n){case ct.NORMAL:e.addDefine("HAS_NORMALS");break;case ct.TANGENT:e.addDefine("HAS_TANGENTS");break;case ct.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case ct.TEXCOORD:case ct.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function Tnt(e,t,n,i){let{quantization:r,semantic:o,setIndex:s}=t,{type:a,componentDatatype:c}=l(r)?r:t;o===ct.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let u=o===ct.POSITION,f=u?0:n,d=Vt.getNumberOfComponents(a),p={index:f,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:d,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!u||!i)return;let g=e.runtimePrimitive.positionBuffer2D,m={index:n,vertexBuffer:g,count:t.count,componentsPerAttribute:d,componentDatatype:Y.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(m)}function Ent(e,t,n,i){let{quantization:r,normalized:o}=t,{type:s,componentDatatype:a}=l(r)?r:t,u=Vt.getNumberOfComponents(s)/i,f=Y.getSizeInBytes(a),d=u*f,p=t.byteStride;for(let g=0;g<i;g++){let m=t.byteOffset+g*d,y={index:n+g,vertexBuffer:t.buffer,componentsPerAttribute:u,componentDatatype:a,offsetInBytes:m,strideInBytes:p,normalize:o};e.attributes.push(y)}}function Cnt(e,t,n){let i=t.variableName,r=`v_${i}`,o;i==="normalMC"?(r="v_normalEC",o=t.glslType):i==="tangentMC"?(o="vec3",r="v_tangentEC"):o=t.glslType,e.addVarying(o,r,n)}function vnt(e,t,n){let i=t.attribute.semantic,r=t.variableName,o,s;t.isQuantized?(o=`a_quantized_${r}`,s=t.quantizedGlslType):(o=`a_${r}`,s=t.glslType);let a=i===ct.POSITION;a?e.setPositionAttribute(s,o):e.addAttribute(s,o),a&&n&&e.addAttribute("vec3","a_position2D")}function Snt(e,t,n){let i=ja.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,r=ja.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,{variableName:o,glslType:s}=t;o==="tangentMC"?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(i,"float","tangentSignMC"),e.addStructField(r,"vec3","tangentEC")):o==="normalMC"?(e.addStructField(i,"vec3","normalMC"),e.addStructField(r,"vec3","normalEC")):(e.addStructField(i,s,o),e.addStructField(r,s,o)),o==="positionMC"&&n&&e.addStructField(i,"vec3","position2D")}function wnt(e,t,n){let i=ja.FUNCTION_ID_INITIALIZE_ATTRIBUTES,r=t.variableName;if(r==="positionMC"&&n&&e.addFunctionLines(i,["attributes.position2D = a_position2D;"]),t.isQuantized)return;let s=[];r==="tangentMC"?(s.push("attributes.tangentMC = a_tangentMC.xyz;"),s.push("attributes.tangentSignMC = a_tangentMC.w;")):s.push(`attributes.${r} = a_${r};`),e.addFunctionLines(i,s)}function Int(e,t){let{semantic:n,setIndex:i}=t.attribute;if(l(n)&&!l(i))return;let r=ja.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,o=t.variableName,s=`v_${o} = attributes.${o};`;e.addFunctionLines(r,[s]),r=ja.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${o} = v_${o};`,e.addFunctionLines(r,[s])}function Pnt(e,t){let n=!1,i=!1;for(let r=0;r<t.length;r++){let o=t[r];o.semantic===ct.NORMAL?n=!0:o.semantic===ct.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(ja.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var hF=ja;var GJ=new he,WJ=new he,Nye=new h,Lye=new h,qJ=class{constructor(t){ut(this,"_rectangleSouthwestInMeters");ut(this,"_rectangleNortheastInMeters");if(t=t??H.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??ee.default,this._numberOfLevelZeroTilesX=t.numberOfLevelZeroTilesX??1,this._numberOfLevelZeroTilesY=t.numberOfLevelZeroTilesY??1,this._projection=new yi(this._ellipsoid),l(t.rectangleSouthwestInMeters)&&l(t.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=t.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=t.rectangleNortheastInMeters;else{let r=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new U(-r,-r),this._rectangleNortheastInMeters=new U(r,r)}let{x:n,y:i}=this._rectangleSouthwestInMeters;h.fromElements(n,i,0,Nye),this._projection.unproject(Nye,GJ),{x:n,y:i}=this._rectangleNortheastInMeters,h.fromElements(n,i,0,Lye),this._projection.unproject(Lye,WJ),this._rectangle=new ie(GJ.longitude,GJ.latitude,WJ.longitude,WJ.latitude)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}getNumberOfXTilesAtLevel(t){return this._numberOfLevelZeroTilesX<<t}getNumberOfYTilesAtLevel(t){return this._numberOfLevelZeroTilesY<<t}rectangleToNativeRectangle(t,n){let i=this._projection,r=i.project(ie.southwest(t)),o=i.project(ie.northeast(t));return l(n)?(n.west=r.x,n.south=r.y,n.east=o.x,n.north=o.y,n):new ie(r.x,r.y,o.x,o.y)}tileXYToNativeRectangle(t,n,i,r){let o=this.getNumberOfXTilesAtLevel(i),s=this.getNumberOfYTilesAtLevel(i),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,c=this._rectangleSouthwestInMeters.x+t*a,u=this._rectangleSouthwestInMeters.x+(t+1)*a,f=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/s,d=this._rectangleNortheastInMeters.y-n*f,p=this._rectangleNortheastInMeters.y-(n+1)*f;return l(r)?(r.west=c,r.south=p,r.east=u,r.north=d,r):new ie(c,p,u,d)}tileXYToRectangle(t,n,i,r){let o=this.tileXYToNativeRectangle(t,n,i,r),s=this._projection,a=s.unproject(new h(o.west,o.south)),c=s.unproject(new h(o.east,o.north));return o.west=a.longitude,o.south=a.latitude,o.east=c.longitude,o.north=c.latitude,o}positionToTileXY(t,n,i){let r=this._rectangle;if(!ie.contains(r,t))return;let o=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),c=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,f=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/s,p=this._projection.project(t),g=p.x-this._rectangleSouthwestInMeters.x,m=this._rectangleNortheastInMeters.y-p.y,y=g/c|0;y>=o&&(y=o-1);let A=m/f|0;return A>=s&&(A=s-1),l(i)?(i.x=y,i.y=A,i):new U(y,A)}},Lo=qJ;var YJ,Fye="AAPTaeRGM19PsTpo1ePVkJZk4Tg..zqn3rpU4kUaF-8QMW-oWZntlxvKhdUFXLBoo5dQwRNEKd1EoKJh-Ha2zxbrz2Nhz2tV_gLVZTQwFHLzJHKwsGDz4GTKV8jeUgb12Ci9CeU_9sOrauJYnGK2vHhtSSAQ-73rmKzNG_2lZ0zuCCEKslxCmXUw2mT1Cpk0RoCCtDheWByX1e7Lnb3LKCBDt9VhGFSGCOiaFfizFRLld8LWukKgxCgluTpKgUuUi4OytX84roEpm6mP7PE91AT1_5Uash6To",NS={};NS.defaultAccessToken=Fye;NS.defaultWorldImageryServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});NS.defaultWorldHillshadeServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});NS.defaultWorldOceanServer=new De({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});NS.getDefaultTokenCredit=function(e){if(e===Fye){if(!l(YJ)){let t='<b> This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i> with an API key from your ArcGIS Developer account before using the ArcGIS tile services. You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';YJ=new It(t,!0)}return YJ}};var Bf=NS;function XJ(e){e=e??H.EMPTY_OBJECT,this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=De.createIfNeeded(e.missingImageUrl),n=this;function i(o){l(o.blob)&&(n._missingImageByteLength=o.blob.size);let s=kh(o);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=o.width,u=e.pixelsToCheck;for(let f=0,d=u.length;a&&f<d;++f){let p=u[f],g=p.x*4+p.y*c;s[g+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function r(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(r)}XJ.prototype.isReady=function(){return this._isReady};XJ.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=kh(e),r=e.width;for(let o=0,s=t.length;o<s;++o){let a=t[o],c=a.x*4+a.y*r;for(let u=0;u<4;++u){let f=c+u;if(i[f]!==n[f])return!1}}return!0};var mF=XJ;function KJ(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}KJ.prototype.configureNameFromProperties=function(e){let t=10,n;for(let i in e)if(e.hasOwnProperty(i)&&e[i]){let r=i.toLowerCase();t>1&&r==="name"?(t=1,n=i):t>2&&r==="title"?(t=2,n=i):t>3&&/name/i.test(i)?(t=3,n=i):t>4&&/title/i.test(i)&&(t=4,n=i)}l(n)&&(this.name=e[n])};KJ.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let r in n)if(n.hasOwnProperty(r)){let o=n[r];l(o)&&(typeof o=="object"?i+=`<tr><td>${r}</td><td>${t(o)}</td></tr>`:i+=`<tr><td>${r}</td><td>${o}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var pm=KJ;function LS(){pe.throwInstantiationError()}Object.defineProperties(LS.prototype,{rectangle:{get:pe.throwInstantiationError},tileWidth:{get:pe.throwInstantiationError},tileHeight:{get:pe.throwInstantiationError},maximumLevel:{get:pe.throwInstantiationError},minimumLevel:{get:pe.throwInstantiationError},tilingScheme:{get:pe.throwInstantiationError},tileDiscardPolicy:{get:pe.throwInstantiationError},errorEvent:{get:pe.throwInstantiationError},credit:{get:pe.throwInstantiationError},proxy:{get:pe.throwInstantiationError},hasAlphaChannel:{get:pe.throwInstantiationError}});LS.prototype.getTileCredits=function(e,t,n){pe.throwInstantiationError()};LS.prototype.requestImage=function(e,t,n,i){pe.throwInstantiationError()};LS.prototype.pickFeatures=function(e,t,n,i,r){pe.throwInstantiationError()};var Dnt=/\.ktx2$/i;LS.loadImage=function(e,t){let n=De.createIfNeeded(t);return Dnt.test(n.url)?Ou(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var kf=LS;var Bye={SATELLITE:1,OCEANS:2,HILLSHADE:3};Object.freeze(Bye);var gm=Bye;function kye(e){this.useTiles=e.usePreCachedTilesIfAvailable??!0;let t=e.ellipsoid;this.tilingScheme=e.tilingScheme??new er({ellipsoid:t}),this.rectangle=e.rectangle??this.tilingScheme.rectangle,this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new It(n)),this.credit=n,this.tileCredits=void 0,this.tileDiscardPolicy=e.tileDiscardPolicy,this.tileWidth=e.tileWidth??256,this.tileHeight=e.tileHeight??256,this.maximumLevel=e.maximumLevel}kye.prototype.build=function(e){e._useTiles=this.useTiles,e._tilingScheme=this.tilingScheme,e._rectangle=this.rectangle,e._credit=this.credit,e._tileCredits=this.tileCredits,e._tileDiscardPolicy=this.tileDiscardPolicy,e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,this.useTiles&&!l(this.tileDiscardPolicy)&&(e._tileDiscardPolicy=new mF({missingImageUrl:Uye(e,0,0,this.maximumLevel).url,pixelsToCheck:[new U(0,0),new U(200,20),new U(20,200),new U(80,110),new U(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function Rnt(e,t){let n=e.tileInfo;if(!l(n))t.useTiles=!1;else{if(t.tileWidth=n.rows,t.tileHeight=n.cols,n.spatialReference.wkid===102100||n.spatialReference.wkid===102113)t.tilingScheme=new Lo({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new er({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new oe(i)}if(t.maximumLevel=e.tileInfo.lods.length-1,l(e.fullExtent)){if(l(e.fullExtent.spatialReference)&&l(e.fullExtent.spatialReference.wkid))if(e.fullExtent.spatialReference.wkid===102100||e.fullExtent.spatialReference.wkid===102113){let i=new yi,r=e.fullExtent,o=i.unproject(new h(Math.max(r.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(r.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new h(Math.min(r.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(r.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ie(o.longitude,o.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ie.fromDegrees(e.fullExtent.xmin,e.fullExtent.ymin,e.fullExtent.xmax,e.fullExtent.ymax);else{let i=`fullExtent.spatialReference WKID ${e.fullExtent.spatialReference.wkid} is not supported.`;throw new oe(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new It(e.copyrightText)]:t.credit=new It(e.copyrightText))}function Ont(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new oe(n)}async function Mnt(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();Rnt(i,t)}catch(i){Ont(e,i)}}function Xp(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new er({ellipsoid:e.ellipsoid}),this._useTiles=e.usePreCachedTilesIfAvailable??!0,this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._layers=e.layers,this._credit=e.credit,this._tileCredits=void 0,this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new be}Xp.fromBasemapType=async function(e,t){t=t??H.EMPTY_OBJECT;let n,i,r;switch(e){case gm.SATELLITE:{n=t.token??Bf.defaultAccessToken,i=De.createIfNeeded(Bf.defaultWorldImageryServer),i.appendForwardSlash();let o=Bf.getDefaultTokenCredit(n);l(o)&&(r=It.clone(o))}break;case gm.OCEANS:{n=t.token??Bf.defaultAccessToken,i=De.createIfNeeded(Bf.defaultWorldOceanServer),i.appendForwardSlash();let o=Bf.getDefaultTokenCredit(n);l(o)&&(r=It.clone(o))}break;case gm.HILLSHADE:{n=t.token??Bf.defaultAccessToken,i=De.createIfNeeded(Bf.defaultWorldHillshadeServer),i.appendForwardSlash();let o=Bf.getDefaultTokenCredit(n);l(o)&&(r=It.clone(o))}break;default:}return Xp.fromUrl(i,{...t,token:n,credit:r,usePreCachedTilesIfAvailable:!0})};function Uye(e,t,n,i,r){let o;if(e._useTiles)o=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:r});else{let s=e._tilingScheme.tileXYToNativeRectangle(t,n,i),c={bbox:`${s.west},${s.south},${s.east},${s.north}`,size:`${e._tileWidth},${e._tileHeight}`,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof Ui?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),o=e._resource.getDerivedResource({url:"export",request:r,queryParameters:c})}return o}Object.defineProperties(Xp.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}});Xp.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=De.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new Xp(t);i._resource=n;let r=new kye(t);return(t.usePreCachedTilesIfAvailable??!0)&&await Mnt(n,r),r.build(i),i};Xp.prototype.getTileCredits=function(e,t,n){return this._tileCredits};Xp.prototype.requestImage=function(e,t,n,i){return kf.loadImage(this,Uye(this,e,t,n,i))};Xp.prototype.pickFeatures=function(e,t,n,i,r){if(!this.enablePickFeatures)return;let o=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,c;if(this._tilingScheme.projection instanceof Ui)s=D.toDegrees(i),a=D.toDegrees(r),c="4326";else{let p=this._tilingScheme.projection.project(new he(i,r,0));s=p.x,a=p.y,c="3857"}let u="visible";l(this._layers)&&(u+=`:${this._layers}`);let f={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${o.west},${o.south},${o.east},${o.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:u};return this._resource.getDerivedResource({url:"identify",queryParameters:f}).fetchJson().then(function(p){let g=[],m=p.results;if(!l(m))return g;for(let y=0;y<m.length;++y){let A=m[y],b=new pm;if(b.data=A,b.name=A.value,b.properties=A.attributes,b.configureDescriptionFromProperties(A.attributes),A.geometryType==="esriGeometryPoint"&&A.geometry){let x=A.geometry.spatialReference&&A.geometry.spatialReference.wkid?A.geometry.spatialReference.wkid:4326;if(x===4326||x===4283)b.position=he.fromDegrees(A.geometry.x,A.geometry.y,A.geometry.z);else if(x===102100||x===900913||x===3857){let T=new yi;b.position=T.unproject(new h(A.geometry.x,A.geometry.y,A.geometry.z))}}g.push(b)}return g})};Xp._metadataCache={};var $g=Xp;function Nnt(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let r=e.stack;return l(r)&&(t+=`
${r}`),t}var Kp=Nnt;function yH(e,t,n,i,r,o,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=r,this.timesRetried=o??0,this.retry=!1,this.error=s}yH.reportError=function(e,t,n,i,r,o,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=r,c.y=o,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new yH(t,i,r,o,s,0,a),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Kp(i)}`),c};yH.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Zr=yH;var zye={AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"};Object.freeze(zye);var FS=zye;function pF(e){}pF.prototype.isReady=function(){return!0};pF.prototype.shouldDiscardImage=function(e){return pF.EMPTY_IMAGE===e};var AH;Object.defineProperties(pF,{EMPTY_IMAGE:{get:function(){return l(AH)||(AH=new Image,AH.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),AH}}});var BS=pF;function Vye(e){this.tileWidth=void 0,this.tileHeight=void 0,this.maximumLevel=void 0,this.imageUrlSubdomains=void 0,this.imageUrlTemplate=void 0,this.attributionList=void 0}Vye.prototype.build=function(e){e._tileWidth=this.tileWidth,e._tileHeight=this.tileHeight,e._maximumLevel=this.maximumLevel,e._imageUrlSubdomains=this.imageUrlSubdomains,e._imageUrlTemplate=this.imageUrlTemplate;let t=e._attributionList=this.attributionList;t||(t=[]),e._attributionList=t;for(let n=0,i=t.length;n<i;++n){let r=t[n];if(r.credit instanceof It)break;r.credit=new It(r.attribution);let o=r.coverageAreas;for(let s=0,a=r.coverageAreas.length;s<a;++s){let c=o[s],u=c.bbox;c.bbox=new ie(D.toRadians(u[1]),D.toRadians(u[0]),D.toRadians(u[3]),D.toRadians(u[2]))}}};function Lnt(e,t){if(e.resourceSets.length!==1)throw new oe("metadata does not specify one resource in resourceSets");let n=e.resourceSets[0].resources[0];t.tileWidth=n.imageWidth,t.tileHeight=n.imageHeight,t.maximumLevel=n.zoomMax-1,t.imageUrlSubdomains=n.imageUrlSubdomains,t.imageUrlTemplate=n.imageUrl;let i=n.imageryProviders;l(n.imageryProviders)&&(i=n.imageryProviders.filter(r=>r.coverageAreas?.some(o=>l(o.bbox)))),t.attributionList=i}function Fnt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Zr.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new oe(i)}async function Bnt(e,t,n){let i=e.url,r=xa._metadataCache[i];l(r)||(r=e.fetchJson(),xa._metadataCache[i]=r);try{let o=await r;return Lnt(o,t)}catch(o){Fnt(e,o,n)}}function xa(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=e.mapStyle??FS.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new BS),this._proxy=e.proxy,this._credit=new It(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${xa.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Lo({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new be}Object.defineProperties(xa.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});xa.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=t.mapStyle??FS.AERIAL,r=De.createIfNeeded(e);r.appendForwardSlash();let o={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(o.mapLayer=t.mapLayer),l(t.culture)&&(o.culture=t.culture);let s=r.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:o}),a=new xa(t);a._resource=r;let c=new Vye(t);return await Bnt(s,c),c.build(a),a};var knt=new ie;xa.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,knt);return Vnt(this._attributionList,n,i)};xa.prototype.requestImage=function(e,t,n,i){let r=kf.loadImage(this,Unt(this,e,t,n,i));if(l(r))return r.catch(function(o){return l(o.blob)&&o.blob.size===0?BS.EMPTY_IMAGE:Promise.reject(o)})};xa.prototype.pickFeatures=function(e,t,n,i,r){};xa.tileXYToQuadKey=function(e,t,n){let i="";for(let r=n;r>=0;--r){let o=1<<r,s=0;(e&o)!==0&&(s|=1),(t&o)!==0&&(s|=2),i+=s}return i};xa.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let r=i;r>=0;--r){let o=1<<r,s=+e[i-r];(s&1)!==0&&(t|=o),(s&2)!==0&&(n|=o)}return{x:t,y:n,level:i}};xa._logoUrl=void 0;Object.defineProperties(xa,{logoUrl:{get:function(){return l(xa._logoUrl)||(xa._logoUrl=Zt("Assets/Images/bing_maps_credit.png")),xa._logoUrl},set:function(e){xa._logoUrl=e}}});function Unt(e,t,n,i,r){let o=e._imageUrlTemplate,s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:o,request:r,templateValues:{quadkey:xa.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var znt=new ie;function Vnt(e,t,n){++t;let i=[];for(let r=0,o=e.length;r<o;++r){let s=e[r],a=s.coverageAreas,c=!1;for(let u=0,f=s.coverageAreas.length;!c&&u<f;++u){let d=a[u];if(t>=d.zoomMin&&t<=d.zoomMax){let p=ie.intersection(n,d.bbox,znt);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}xa._metadataCache={};var gF=xa;var jye=/{[^}]+}/g,Hye={x:Wnt,y:Ynt,z:$nt,s:Jnt,reverseX:qnt,reverseY:Xnt,reverseZ:Knt,westDegrees:Znt,southDegrees:Qnt,eastDegrees:eit,northDegrees:tit,westProjected:nit,southProjected:iit,eastProjected:rit,northProjected:oit,width:sit,height:ait},jnt=Ot(Hye,{i:cit,j:lit,reverseI:uit,reverseJ:fit,longitudeDegrees:hit,latitudeDegrees:mit,longitudeProjected:pit,latitudeProjected:git,format:yit});function _F(e){e=e??H.EMPTY_OBJECT,this._errorEvent=new be;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(e.pickFeaturesUrl);this._resource=t,this._urlSchemeZeroPadding=e.urlSchemeZeroPadding,this._getFeatureInfoFormats=e.getFeatureInfoFormats,this._pickFeaturesResource=n;let i=e.subdomains;Array.isArray(i)?i=i.slice():l(i)&&i.length>0?i=i.split(""):i=["a","b","c"],this._subdomains=i,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._minimumLevel=e.minimumLevel??0,this._maximumLevel=e.maximumLevel,this._tilingScheme=e.tilingScheme??new Lo({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=ie.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let r=e.credit;typeof r=="string"&&(r=new It(r)),this._credit=r,this._hasAlphaChannel=e.hasAlphaChannel??!0;let o=e.customTags,s=Ot(Hye,o),a=Ot(jnt,o);this._tags=s,this._pickFeaturesTags=a,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this.enablePickFeatures=e.enablePickFeatures??!0}Object.defineProperties(_F.prototype,{url:{get:function(){return this._resource.url}},urlSchemeZeroPadding:{get:function(){return this._urlSchemeZeroPadding}},pickFeaturesUrl:{get:function(){return this._pickFeaturesResource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return this._hasAlphaChannel}}});_F.prototype.getTileCredits=function(e,t,n){};_F.prototype.requestImage=function(e,t,n,i){return kf.loadImage(this,Hnt(this,e,t,n,i))};_F.prototype.pickFeatures=function(e,t,n,i,r){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let o=0,s=this;function a(u,f){return u.callback(f)}function c(){if(o>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let u=s._getFeatureInfoFormats[o],f=Gnt(s,e,t,n,i,r,u.format);return++o,u.type==="json"?f.fetchJson().then(u.callback).catch(c):u.type==="xml"?f.fetchXML().then(u.callback).catch(c):u.type==="text"||u.type==="html"?f.fetchText().then(u.callback).catch(c):f.fetch({responseType:u.format}).then(a.bind(void 0,u)).catch(c)}return c()};var bH=!1,Uf=new ie,xH=!1,yF=new ie;function Hnt(e,t,n,i,r){bH=!1,xH=!1;let o=e._resource,s=o.getUrlComponent(!0),a=e._tags,c={},u=s.match(jye);return l(u)&&u.forEach(function(f){let d=f.substring(1,f.length-1);l(a[d])&&(c[d]=a[d](e,t,n,i))}),o.getDerivedResource({request:r,templateValues:c})}var $J=!1,US=new U,JJ=!1;function Gnt(e,t,n,i,r,o,s){bH=!1,xH=!1,$J=!1,JJ=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),u=e._pickFeaturesTags,f={},d=c.match(jye);return l(d)&&d.forEach(function(p){let g=p.substring(1,p.length-1);l(u[g])&&(f[g]=u[g](e,t,n,i,r,o,s))}),a.getDerivedResource({templateValues:f})}function zS(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let r=i.length;r>1&&(n=n.length>=r?n:new Array(r-n.toString().length+1).join("0")+n)}}return n}function Wnt(e,t,n,i){return zS(e,"{x}",t)}function qnt(e,t,n,i){let r=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return zS(e,"{reverseX}",r)}function Ynt(e,t,n,i){return zS(e,"{y}",n)}function Xnt(e,t,n,i){let r=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return zS(e,"{reverseY}",r)}function Knt(e,t,n,i){let r=e.maximumLevel,o=l(r)&&i<r?r-i-1:i;return zS(e,"{reverseZ}",o)}function $nt(e,t,n,i){return zS(e,"{z}",i)}function Jnt(e,t,n,i){let r=(t+n+i)%e._subdomains.length;return e._subdomains[r]}function TH(e,t,n,i){bH||(e.tilingScheme.tileXYToRectangle(t,n,i,Uf),Uf.west=D.toDegrees(Uf.west),Uf.south=D.toDegrees(Uf.south),Uf.east=D.toDegrees(Uf.east),Uf.north=D.toDegrees(Uf.north),bH=!0)}function Znt(e,t,n,i){return TH(e,t,n,i),Uf.west}function Qnt(e,t,n,i){return TH(e,t,n,i),Uf.south}function eit(e,t,n,i){return TH(e,t,n,i),Uf.east}function tit(e,t,n,i){return TH(e,t,n,i),Uf.north}function EH(e,t,n,i){xH||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,yF),xH=!0)}function nit(e,t,n,i){return EH(e,t,n,i),yF.west}function iit(e,t,n,i){return EH(e,t,n,i),yF.south}function rit(e,t,n,i){return EH(e,t,n,i),yF.east}function oit(e,t,n,i){return EH(e,t,n,i),yF.north}function sit(e,t,n,i){return e.tileWidth}function ait(e,t,n,i){return e.tileHeight}function cit(e,t,n,i,r,o,s){return CH(e,t,n,i,r,o),US.x}function lit(e,t,n,i,r,o,s){return CH(e,t,n,i,r,o),US.y}function uit(e,t,n,i,r,o,s){return CH(e,t,n,i,r,o),e.tileWidth-US.x-1}function fit(e,t,n,i,r,o,s){return CH(e,t,n,i,r,o),e.tileHeight-US.y-1}var dit=new ie,kS=new h;function CH(e,t,n,i,r,o,s){if($J)return;ZJ(e,t,n,i,r,o);let a=kS,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,dit);US.x=e.tileWidth*(a.x-c.west)/c.width|0,US.y=e.tileHeight*(c.north-a.y)/c.height|0,$J=!0}function hit(e,t,n,i,r,o,s){return D.toDegrees(r)}function mit(e,t,n,i,r,o,s){return D.toDegrees(o)}function pit(e,t,n,i,r,o,s){return ZJ(e,t,n,i,r,o),kS.x}function git(e,t,n,i,r,o,s){return ZJ(e,t,n,i,r,o),kS.y}var _it=new he;function ZJ(e,t,n,i,r,o,s){if(!JJ){if(e.tilingScheme.projection instanceof Ui)kS.x=D.toDegrees(r),kS.y=D.toDegrees(o);else{let a=_it;a.longitude=r,a.latitude=o,e.tilingScheme.projection.project(a,kS)}JJ=!0}}function yit(e,t,n,i,r,o,s){return s}var vs=_F;function Wd(e){vs.call(this,e)}Wd._requestMetadata=async function(e,t,n,i){try{let r=await n.fetchXML();return Wd._metadataSuccess(r,e,t,n,i)}catch(r){if(r instanceof wp)return Wd._metadataFailure(e,t);throw r}};Wd.fromUrl=async function(e,t){let n=De.createIfNeeded(e);n.appendForwardSlash();let i=n,r=n.getDerivedResource({url:"tilemapresource.xml"});t=t??H.EMPTY_OBJECT;let o=await Wd._requestMetadata(t,i,r);return new Wd(o)};l(Object.create)&&(Wd.prototype=Object.create(vs.prototype),Wd.prototype.constructor=Wd);function Gye(e,t){return e.west<t.rectangle.west&&(e.west=t.rectangle.west),e.east>t.rectangle.east&&(e.east=t.rectangle.east),e.south<t.rectangle.south&&(e.south=t.rectangle.south),e.north>t.rectangle.north&&(e.north=t.rectangle.north),e}function Wye(e,t,n){let i=e.positionToTileXY(ie.southwest(t),n),r=e.positionToTileXY(ie.northeast(t),n);return(Math.abs(r.x-i.x)+1)*(Math.abs(r.y-i.y)+1)>4?0:n}Wd._metadataSuccess=function(e,t,n,i,r){let o=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,u,f,d,p=[],g=e.childNodes[0].childNodes;for(let R=0;R<g.length;R++)if(o.test(g.item(R).nodeName))u=g.item(R);else if(a.test(g.item(R).nodeName)){d=g.item(R);let O=g.item(R).childNodes;for(let L=0;L<O.length;L++)s.test(O.item(L).nodeName)&&p.push(O.item(L))}else c.test(g.item(R).nodeName)&&(f=g.item(R));let m;if(!l(d)||!l(f))throw m=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(r)&&Zr.reportError(void 0,r,r.errorEvent,m),new oe(m);let y=t.fileExtension??u.getAttribute("extension"),A=t.tileWidth??parseInt(u.getAttribute("width"),10),b=t.tileHeight??parseInt(u.getAttribute("height"),10),x=t.minimumLevel??parseInt(p[0].getAttribute("order"),10),T=t.maximumLevel??parseInt(p[p.length-1].getAttribute("order"),10),E=d.getAttribute("profile"),v=t.tilingScheme;if(!l(v))if(E==="geodetic"||E==="global-geodetic")v=new er({ellipsoid:t.ellipsoid});else if(E==="mercator"||E==="global-mercator")v=new Lo({ellipsoid:t.ellipsoid});else throw m=`${i.url} specifies an unsupported profile attribute, ${E}.`,l(r)&&Zr.reportError(void 0,r,r.errorEvent,m),new oe(m);let S=ie.clone(t.rectangle);if(!l(S)){let R,O,L,_;t.flipXY??!1?(L=new U(parseFloat(f.getAttribute("miny")),parseFloat(f.getAttribute("minx"))),_=new U(parseFloat(f.getAttribute("maxy")),parseFloat(f.getAttribute("maxx")))):(L=new U(parseFloat(f.getAttribute("minx")),parseFloat(f.getAttribute("miny"))),_=new U(parseFloat(f.getAttribute("maxx")),parseFloat(f.getAttribute("maxy"))));let w=E==="geodetic"||E==="mercator";if(v.projection instanceof Ui||w)R=he.fromDegrees(L.x,L.y),O=he.fromDegrees(_.x,_.y);else{let P=v.projection;R=P.unproject(L),O=P.unproject(_)}S=new ie(R.longitude,R.latitude,O.longitude,O.latitude)}return S=Gye(S,v),x=Wye(v,S,x),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${y}`}),tilingScheme:v,rectangle:S,tileWidth:A,tileHeight:b,minimumLevel:x,maximumLevel:T,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Wd._metadataFailure=function(e,t){let n=e.fileExtension??"png",i=e.tileWidth??256,r=e.tileHeight??256,o=e.maximumLevel,s=l(e.tilingScheme)?e.tilingScheme:new Lo({ellipsoid:e.ellipsoid}),a=e.rectangle??s.rectangle;a=Gye(a,s);let c=Wye(s,a,e.minimumLevel);return{url:t.getDerivedResource({url:`{z}/{x}/{reverseY}.${n}`}),tilingScheme:s,rectangle:a,tileWidth:i,tileHeight:r,minimumLevel:c,maximumLevel:o,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit}};var CA=Wd;function qye(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}qye.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function Ait(e,t){let n;try{n=JSON.parse(e)}catch{n=JSON.parse(e.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}let i;for(let r=0;r<n.layers.length;r++)if(n.layers[r].id===t.channel){i=n.layers[r];break}if(!l(i)){let r=`Could not find layer with channel (id) of ${t.channel}.`;throw new oe(r)}if(!l(i.version)){let r=`Could not find a version in channel (id) ${t.channel}.`;throw new oe(r)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new er({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ie(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new Lo({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let r=`Unsupported projection ${n.projection}.`;throw new oe(r)}return!0}function bit(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),Zr.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new oe(i)}async function xit(e,t,n){try{let i=await e.fetchText();Ait(i,t)}catch(i){bit(i,e,n)}}function qu(e){e=e??{},this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1.9,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new It(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${qu.logoUrl}" title="Google Imagery"/></a>`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new be}Object.defineProperties(qu.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},version:{get:function(){return this._version}},requestType:{get:function(){return this._requestType}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});qu.fromUrl=async function(e,t,n){n=n??{};let i=n.path??"/default_map",r=De.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});r.appendForwardSlash();let o=r.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new qye(n);s.channel=t,await xit(o,s);let a=new qu(n);return s.build(a),a._resource=r,a._url=e,a._path=i,a};qu.prototype.getTileCredits=function(e,t,n){};qu.prototype.requestImage=function(e,t,n,i){let r=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return kf.loadImage(this,r)};qu.prototype.pickFeatures=function(e,t,n,i,r){};qu._logoUrl=void 0;Object.defineProperties(qu,{logoUrl:{get:function(){return l(qu._logoUrl)||(qu._logoUrl=Zt("Assets/Images/google_earth_credit.png")),qu._logoUrl},set:function(e){qu._logoUrl=e}}});var AF=qu;var Tit=/\/$/,Yye=new It('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function VS(e){e=e??H.EMPTY_OBJECT;let t=e.mapId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=De.createIfNeeded(e.url??"https://{s}.tiles.mapbox.com/v4/");this._mapId=t,this._accessToken=n;let r=e.format??"png";/\./.test(r)||(r=`.${r}`),this._format=r;let o=i.getUrlComponent();Tit.test(o)||(o+="/"),o+=`${t}/{z}/{x}/{y}${this._format}`,i.url=o,i.setQueryParameters({access_token:n});let s;l(e.credit)?(s=e.credit,typeof s=="string"&&(s=new It(s))):s=Yye,this._resource=i,this._imageryProvider=new vs({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(VS.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});VS.prototype.getTileCredits=function(e,t,n){};VS.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};VS.prototype.pickFeatures=function(e,t,n,i,r){return this._imageryProvider.pickFeatures(e,t,n,i,r)};VS._defaultCredit=Yye;var bF=VS;function pT(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let t=e.rectangle??ie.MAX_VALUE,n=new er({rectangle:t,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=n,this._image=void 0,this._texture=void 0,this._hasError=!1,this._errorEvent=new be;let i=e.credit;typeof i=="string"&&(i=new It(i)),this._credit=i;let r=De.createIfNeeded(e.url);this._resource=r,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(pT.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return 0}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}});function Eit(e,t,n,i){let r=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(r+=`: ${t.message}`);let o=Zr.reportError(i,n,l(n)?n._errorEvent:void 0,r,0,0,0,t);if(o.retry)return QJ(e,n,o);throw l(n)&&(n._hasError=!0),new oe(r)}async function QJ(e,t,n){try{return await kf.loadImage(null,e)}catch(i){return Eit(e,i,t,n)}}pT.fromUrl=async function(e,t){let n=De.createIfNeeded(e),i=await QJ(n);t=t??H.EMPTY_OBJECT;let r=new pT({...t,url:e,tileWidth:i.width,tileHeight:i.height});return r._image=i,r};pT.prototype.getTileCredits=function(e,t,n){};pT.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let r=await QJ(this._resource,this);return this._image=r,Zr.reportSuccess(this._errorEvent),r}return this._image};pT.prototype.pickFeatures=function(e,t,n,i,r){};var xF=pT;function Cit(e,t,n){this.type=e,l(t)||(e==="json"?t="application/json":e==="xml"?t="text/xml":e==="html"?t="text/html":e==="text"&&(t="text/plain")),this.format=t,l(n)||(e==="json"?n=vit:e==="xml"?n=Pit:(e==="html"||e==="text")&&(n=Xye)),this.callback=n}function vit(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let r=n[i],o=new pm;if(o.data=r,o.properties=r.properties,o.configureNameFromProperties(r.properties),o.configureDescriptionFromProperties(r.properties),l(r.geometry)&&r.geometry.type==="Point"){let s=r.geometry.coordinates[0],a=r.geometry.coordinates[1];o.position=he.fromDegrees(s,a)}t.push(o)}return t}var eZ="http://www.mapinfo.com/mxp",Sit="http://www.esri.com/wms",wit="http://www.opengis.net/wfs",Iit="http://www.opengis.net/gml";function Pit(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===eZ)return Dit(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===Sit)return Rit(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===wit)return Oit(e);if(t.localName==="ServiceExceptionReport")throw new oe(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?Mit(e):Nit(e)}function Dit(e){let t=[],i=e.documentElement.getElementsByTagNameNS(eZ,"Feature");for(let r=0;r<i.length;++r){let o=i[r],s={},a=o.getElementsByTagNameNS(eZ,"Val");for(let u=0;u<a.length;++u){let f=a[u];if(f.hasAttribute("ref")){let d=f.getAttribute("ref"),p=f.textContent.trim();s[d]=p}}let c=new pm;c.data=o,c.properties=s,c.configureNameFromProperties(s),c.configureDescriptionFromProperties(s),t.push(c)}return t}function Rit(e){let t=e.documentElement,n=[],i,r=t.getElementsByTagNameNS("*","FIELDS");if(r.length>0)for(let o=0;o<r.length;++o){let s=r[o];i={};let a=s.attributes;for(let c=0;c<a.length;++c){let u=a[c];i[u.name]=u.value}n.push(vH(s,i))}else{let o=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<o.length;++s){let a=o[s];i={};let c=a.childNodes;for(let u=0;u<c.length;++u){let f=c[u];f.nodeType===Node.ELEMENT_NODE&&(i[f.localName]=f.textContent)}n.push(vH(a,i))}}return n}function Oit(e){let t=[],i=e.documentElement.getElementsByTagNameNS(Iit,"featureMember");for(let r=0;r<i.length;++r){let o=i[r],s={};tZ(o,s),t.push(vH(o,s))}return t}function Mit(e){let t=[],n,i=e.documentElement.childNodes;for(let o=0;o<i.length;o++)if(i[o].nodeType===Node.ELEMENT_NODE){n=i[o];break}if(!l(n))throw new oe("Unable to find first child of the feature info xml document");let r=n.childNodes;for(let o=0;o<r.length;++o){let s=r[o];if(s.nodeType===Node.ELEMENT_NODE){let a={};tZ(s,a),t.push(vH(s,a))}}return t}function tZ(e,t){let n=!0;for(let i=0;i<e.childNodes.length;++i){let r=e.childNodes[i];r.nodeType===Node.ELEMENT_NODE&&(n=!1),!(r.localName==="Point"||r.localName==="LineString"||r.localName==="Polygon"||r.localName==="boundedBy")&&r.hasChildNodes()&&tZ(r,t)&&(t[r.localName]=r.textContent)}return n}function vH(e,t){let n=new pm;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function Nit(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let r=new pm;return r.data=e,r.description=n.innerHTML,[r]}var Lit=/<body>\s*<\/body>/im,Fit=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,Bit=/<title>([\s\S]*)<\/title>/im;function Xye(e){if(Lit.test(e)||Fit.test(e))return;let t,n=Bit.exec(e);n&&n.length>1&&(t=n[1]);let i=new pm;return i.name=t,i.description=e,i.data=e,[i]}var _m=Cit;function TF(e){e=e??H.EMPTY_OBJECT,this._tileCache={},this._tilesRequestedForInterval=[];let t=this._clock=e.clock;this._times=e.times,this._requestImageFunction=e.requestImageFunction,this._reloadFunction=e.reloadFunction,this._currentIntervalIndex=-1,t.onTick.addEventListener(this._clockOnTick,this),this._clockOnTick(t)}Object.defineProperties(TF.prototype,{clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}});TF.prototype.getFromCache=function(e,t,n,i){let r=Kye(e,t,n),o,s=this._tileCache[this._currentIntervalIndex];if(l(s)&&l(s[r])){let a=s[r];o=a.promise.catch(function(c){throw i.state=a.request.state,c}),delete s[r]}return o};TF.prototype.checkApproachingInterval=function(e,t,n,i){let r=Kye(e,t,n),o=this._tilesRequestedForInterval,s=$ye(this),a={key:r,priorityFunction:i.priorityFunction};(!l(s)||!Jye(this,a,s))&&o.push(a),o.length>=512&&o.splice(0,256)};TF.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),r=this._currentIntervalIndex;if(i!==r){let s=this._tileCache[r];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[r],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let o=$ye(this);if(l(o)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=Jye(this,c,o),a||s.push(c)}}};function Kye(e,t,n){return`${e}-${t}-${n}`}function kit(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function $ye(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,r=n.canAnimate&&n.shouldAnimate,o=n.multiplier;if(!r&&o!==0)return;let s,a=t.indexOf(i);if(a<0)return;let c=t.get(a);return o>0?(s=K.secondsDifference(c.stop,i),++a):(s=K.secondsDifference(c.start,i),--a),s/=o,a>=0&&s<=5?t.get(a):void 0}function Jye(e,t,n){let i=e._times.indexOf(n.start),r=e._tileCache,o=r[i];l(o)||(o=r[i]={});let s=t.key;if(l(o[s]))return!0;let a=kit(s),c=new wo({throttle:!1,throttleByServer:!0,type:Zs.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(a.x,a.y,a.level,c,n);return l(u)?(o[s]={promise:u,request:c},!0):!1}var gT=TF;var Uit=[3034,3035,3042,3043,3044],zit=[4471,4559];function ym(e){if(e=e??H.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new pe("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(ym.DefaultParameters,!0),n.setQueryParameters(ym.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(Zye(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Zye(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new gT({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,u,f){return Qye(i,s,a,c,u,f)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let r={};if(r.layers=e.layers,r.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",r.width="{width}",r.height="{height}",parseFloat(t.queryParameters.version)>=1.3){r.crs=e.crs??(e.tilingScheme&&e.tilingScheme.projection instanceof yi?"EPSG:3857":"CRS:84");let s=r.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!zit.includes(a)||Uit.includes(a))&&(r.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else r.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof yi?"EPSG:3857":"EPSG:4326");t.setQueryParameters(r,!0),n.setQueryParameters(r,!0);let o={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(o.i="{i}",o.j="{j}"):(o.x="{i}",o.y="{j}"),n.setQueryParameters(o,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new vs({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new er({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??ym.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function Qye(e,t,n,i,r,o){let s=l(o)?o.data:void 0,a=e._tileProvider;return l(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,r)}function Vit(e,t,n,i,r,o,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,r,o)}Object.defineProperties(ym.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});ym.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};ym.prototype.requestImage=function(e,t,n,i){let r,o=this._timeDynamicImagery,s;return l(o)&&(s=o.currentInterval,r=o.getFromCache(e,t,n,i)),l(r)||(r=Qye(this,e,t,n,i,s)),l(r)&&l(o)&&o.checkApproachingInterval(e,t,n,i),r};ym.prototype.pickFeatures=function(e,t,n,i,r){let o=this._timeDynamicImagery,s=l(o)?o.currentInterval:void 0;return Vit(this,e,t,n,i,r,s)};ym.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});ym.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});ym.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new _m("json","application/json")),Object.freeze(new _m("xml","text/xml")),Object.freeze(new _m("text","text/html"))]);function Zye(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var EF=ym;function zf(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=De.createIfNeeded(e.url),n=De.createIfNeeded(this._getFeatureInfoUrl),i=e.style,r=e.tileMatrixSetID,o=t.url,s=e.format??"image/jpeg",a=o.match(/{/g);if(!l(a)||a.length===1&&/{s}/.test(o)?(t.setQueryParameters(zf.DefaultParameters,!0),this._useKvp=!0):(t.setTemplateValues(zf.DefaultParameters,!0),this._useKvp=!1),this._useKvp){n.setQueryParameters(zf.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setQueryParameters(eAe(e.getFeatureInfoParameters));let f={infoformat:"{format}",i:"{i}",j:"{j}"};n.setQueryParameters(f,!0)}else n.setTemplateValues(zf.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setTemplateValues(eAe(e.getFeatureInfoParameters));this._resource=t,this._tileMatrixLabels=e.tileMatrixLabels,this._format=s,this._dimensions=e.dimensions,this._tilematrixset=r;let c={};c.tilematrix="{TileMatrix}",c.layer=e.layer,c.style=i,c.tilerow="{TileRow}",c.tilecol="{TileCol}",c.tilematrixset=r,this._useKvp?(t.setQueryParameters(c,!0),t.setQueryParameters({format:s},!0),n.setQueryParameters({format:s},!0),n.setQueryParameters(c,!0)):(c.Style=i,t.setTemplateValues(c),t.setTemplateValues({format:s}),n.setTemplateValues(c));let u=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new gT({clock:e.clock,times:e.times,requestImageFunction:function(f,d,p,g,m){return tAe(u,f,d,p,g,m)},reloadFunction:function(){l(u._reload)&&u._reload()}})),this._errorEvent=new be,this._tileProvider=new vs({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Lo({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??zf.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures??(this._useKvp||l(e.getFeatureInfoUrl)),customTags:Hit(this)})}function tAe(e,t,n,i,r,o){let s=e._tileProvider;return nAe(e,s._resource,o),s.requestImage(t,n,i,r)}function jit(e,t,n,i,r,o,s){let a=e._tileProvider;return nAe(e,a._pickFeaturesResource,s),a.pickFeatures(t,n,i,r,o)}Object.defineProperties(zf.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return!0}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});zf.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};zf.prototype.requestImage=function(e,t,n,i){let r,o=this._timeDynamicImagery,s;return l(o)&&(s=o.currentInterval,r=o.getFromCache(e,t,n,i)),l(r)||(r=tAe(this,e,t,n,i,s)),l(r)&&l(o)&&o.checkApproachingInterval(e,t,n,i),r};zf.prototype.pickFeatures=function(e,t,n,i,r){let o=this._timeDynamicImagery,s=l(o)?o.currentInterval:void 0;return jit(this,e,t,n,i,r,s)};zf.DefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});zf.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetFeatureInfo"});zf.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new _m("json","application/json")),Object.freeze(new _m("xml","text/xml")),Object.freeze(new _m("text","text/html"))]);function nAe(e,t,n){let i=e._dimensions,r=l(n)?n.data:void 0;if(!e._useKvp)l(i)&&t.setTemplateValues(i),l(r)&&t.setTemplateValues(r);else{let o={};l(i)&&(o=Ot(o,i)),l(r)&&(o=Ot(o,r)),t.setQueryParameters(o)}}function Hit(e){function t(n){let i=e._tileMatrixLabels;return l(i)?i[n]:n.toString()}return{TileMatrix:function(n,i,r,o){return t(o)},tilematrix:function(n,i,r,o){return t(o)},TileRow:function(n,i,r){return r.toString()},tilerow:function(n,i,r){return r.toString()},TileCol:function(n,i,r){return i.toString()},tilecol:function(n,i,r){return i.toString()},TileMatrixSet:function(n){return e._tilematrixset},tilematrixset:function(n){return e._tilematrixset}}}function eAe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var CF=zf;var jS={};jS.defaultApiKey=void 0;jS.mapTilesApiEndpoint=new De({url:"https://tile.googleapis.com/"});jS.defaultStreetViewStaticApiKey=void 0;jS.streetViewStaticApiEndpoint=new De({url:"https://maps.googleapis.com/maps/api/streetview"});jS.getDefaultCredit=function(){return new It('<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-6px">',!0)};var Ta=jS;var iAe=/\/$/;function Jg(e){e=e??H.EMPTY_OBJECT,this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._session=e.session,this._key=e.key,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight;let t=e.url instanceof Ho?e.url:De.createIfNeeded(e.url??Ta.mapTilesApiEndpoint),n=t.getUrlComponent();iAe.test(n)||(n+="/");let i=`${n}v1/2dtiles/{z}/{x}/{y}`;this._viewportUrl=`${n}tile/v1/viewport`,t.url=i,t.setQueryParameters({session:encodeURIComponent(e.session),key:encodeURIComponent(e.key)}),this._resource=t.clone();let r;l(e.credit)&&(r=e.credit,typeof r=="string"&&(r=new It(r)));let o=new vs({url:t,credit:r,tileWidth:e.tileWidth,tileHeight:e.tileHeight,ellipsoid:e.ellipsoid,rectangle:e.rectangle,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel});o._resource=t,this._imageryProvider=o,this._tileCredits=t.credits,this._attributionsByLevel=void 0}Object.defineProperties(Jg.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});Jg.fromIonAssetId=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US";let t=e.overlayLayerType,n=rAe(e),i=Ho._createEndpointResource(e.assetId,{queryParameters:{options:JSON.stringify(n)}}),r={language:e.language,region:e.region,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle,credit:e.credit},o=await i.fetchJson(),s=o.options.url;return delete o.options.url,o.options={...o.options,...r},nZ(s,o,i)};Jg.fromUrl=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US",e.url=e.url??Ta.mapTilesApiEndpoint,e.key=e.key??Ta.defaultApiKey;let t=e.overlayLayerType,n=await Wit(e);return new Jg({...n,...e,credit:e.credit??Ta.getDefaultCredit()})};Jg.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let r=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(r):r};Jg.prototype.requestImage=function(e,t,n,i){let r=this._imageryProvider.requestImage(e,t,n,i);if(l(r))return l(this._attributionsByLevel)?r:Promise.all([r,this.getViewportCredits()]).then(o=>o[0])};Jg.prototype.pickFeatures=function(e,t,n,i,r){};Jg.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let r=0;r<e+1;r++)t.push(Git(this._resource,this._viewportUrl,r));let n=await Promise.all(t),i=new Map;for(let r=0;r<e+1;r++){let o=[],s=n[r];if(s){let a=new It(s);o.push(a)}i.set(r,o)}return this._attributionsByLevel=i,i};async function Git(e,t,n){return(await e.getDerivedResource({url:t,queryParameters:{zoom:n,north:90,south:-90,east:180,west:-180},data:JSON.stringify(H.EMPTY_OBJECT)}).fetchJson()).copyright}function rAe(e){let{mapType:t,overlayLayerType:n,styles:i}=e,r={mapType:t,overlay:!1};return t==="terrain"&&!l(n)&&(r.layerTypes=["layerRoadmap"]),l(n)&&(r.mapType="satellite",r.overlay=!0,r.layerTypes=[n]),l(i)&&(r.styles=i),r}async function Wit(e){let{language:t,region:n,key:i,url:r}=e,o=rAe(e),s=r.url??r;iAe.test(s)||(s+="/");let a=await De.post({url:`${s}v1/createSession`,queryParameters:{key:i},data:JSON.stringify({...o,language:t,region:n})});return JSON.parse(a)}var vF=Jg;var qit=/\/$/;function HS(e){e=e??{};let t=e.tilesetId??"microsoft.imagery";this._maximumLevel=e.maximumLevel??22,this._minimumLevel=e.minimumLevel??0,this._subscriptionKey=e.subscriptionKey??e["subscription-key"],this._tilesetId=e.tilesetId;let n=e.url instanceof Ho?e.url:De.createIfNeeded(e.url??"https://atlas.microsoft.com/"),i=n.getUrlComponent();qit.test(i)||(i+="/");let r=`${i}map/tile`;this._viewportUrl=`${i}map/attribution`,n.url=r,n.setQueryParameters({"api-version":"2024-04-01",tilesetId:t,"subscription-key":this._subscriptionKey,zoom:"{z}",x:"{x}",y:"{y}"}),this._resource=n;let o;l(e.credit)&&(o=e.credit,typeof o=="string"&&(o=new It(o)));let s=new vs({...e,maximumLevel:this._maximumLevel,minimumLevel:this._minimumLevel,url:n,credit:o});s._resource=n,this._imageryProvider=s,this._tileCredits=n.credits,this._attributionsByLevel=void 0}Object.defineProperties(HS.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});HS.prototype.getTileCredits=function(e,t,n){if(!l(this._attributionsByLevel)||!l(this._tileCredits))return;let r=this._attributionsByLevel.get(n);return l(this._tileCredits)?this._tileCredits.concat(r):r};HS.prototype.requestImage=function(e,t,n,i){let r=this._imageryProvider.requestImage(e,t,n,i);if(l(r))return l(this._attributionsByLevel)?r:Promise.all([r,this.getViewportCredits()]).then(o=>o[0])};HS.prototype.pickFeatures=function(e,t,n,i,r){};HS.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let r=0;r<e+1;r++)t.push(Yit(this._resource,this._viewportUrl,this._subscriptionKey,this._tilesetId,r));let n=await Promise.all(t),i=new Map;for(let r=0;r<e+1;r++){let o=[],s=n[r].join(",");if(s){let a=new It(s);o.push(a)}i.set(r,o)}return this._attributionsByLevel=i,i};async function Yit(e,t,n,i,r){return(await e.getDerivedResource({url:t,queryParameters:{zoom:r,bounds:"-180,-90,180,90"},data:JSON.stringify(H.EMPTY_OBJECT)}).fetchJson()).copyrights}var SF=HS;var Xit=async(e,t,n)=>CA.fromUrl(new Ho(t,n)),Kit=async(e,{options:t})=>$g.fromUrl(e,t),$it=async(e,{options:t})=>gF.fromUrl(e,t),Jit=async(e,{options:t})=>{let n=t.channel;return delete t.channel,AF.fromUrl(e,n,t)},Zit=async(e,{options:t})=>new bF({url:e,...t}),Qit=async(e,{options:t})=>xF.fromUrl(e,t),ert=async(e,{options:t})=>CA.fromUrl(e,t),trt=async(e,{options:t})=>new vs({url:e,...t}),nrt=async(e,{options:t})=>new EF({url:e,...t}),irt=async(e,{options:t})=>new CF({url:e,...t}),nZ=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new Ho(t,n),r=(o,s)=>{delete s.externalType,s.url=e;let{options:a}=s;o.setQueryParameters({session:a.session,key:a.key})};return i.refreshCallback=r,new vF({...t.options,url:i})},rrt=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new Ho(t,n),r=(o,s)=>{delete s.externalType,s.url=e;let{options:a}=s;o.setQueryParameters({"subscription-key":a["subscription-key"]})};return i.refreshCallback=r,new SF({...t.options,url:i})},ort={ARCGIS_MAPSERVER:Kit,BING:$it,GOOGLE_EARTH:Jit,MAPBOX:Zit,SINGLE_TILE:Qit,TMS:ert,URL_TEMPLATE:trt,WMS:nrt,WMTS:irt,GOOGLE_2D_MAPS:nZ,AZURE_MAPS:rrt,defaultFactoryCallback:Xit},GS=Object.freeze(ort);function $p(){this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileCredits=void 0,this._errorEvent=new be}Object.defineProperties($p.prototype,{rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}},proxy:{get:function(){}}});$p.fromAssetId=async function(e,t){t=t??H.EMPTY_OBJECT;let n=Ho._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,r=$p._endpointCache[i];l(r)||(r=n.fetchJson(),$p._endpointCache[i]=r);let o=await r;if(o.type!=="IMAGERY")throw new oe(`Cesium ion asset ${e} is not an imagery asset.`);let s=o.externalType,a=GS.defaultFactoryCallback;o=Je(o,!0),o.options=o.options??{};let c=o.options?.url;if(delete t.url,l(s)&&(a=GS[s],!l(a)))throw new oe(`Unrecognized Cesium ion imagery type: ${s}`);let u=await a(c,o,n),f=new $p(t);return u.errorEvent.addEventListener(function(d){d.provider=f,f._errorEvent.raiseEvent(d)}),f._tileCredits=Ho.getCreditsFromEndpoint(o,n),f._imageryProvider=u,f};$p.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};$p.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};$p.prototype.pickFeatures=function(e,t,n,i,r){return this._imageryProvider.pickFeatures(e,t,n,i,r)};$p._endpointCache={};var iu=$p;var oAe={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4};Object.freeze(oAe);var Zg=oAe;function srt(e){e=e??H.EMPTY_OBJECT;let t=e.style??Zg.AERIAL;return iu.fromAssetId(t)}var Qg=srt;function Ws(){pe.throwInstantiationError()}Object.defineProperties(Ws.prototype,{errorEvent:{get:pe.throwInstantiationError},credit:{get:pe.throwInstantiationError},tilingScheme:{get:pe.throwInstantiationError},hasWaterMask:{get:pe.throwInstantiationError},hasVertexNormals:{get:pe.throwInstantiationError},availability:{get:pe.throwInstantiationError}});var sAe=[];Ws.getRegularGridIndices=function(e,t){let n=sAe[e];l(n)||(sAe[e]=n=[]);let i=n[t];return l(i)||(e*t<D.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),uAe(e,t,i,0)),i};var aAe=[];Ws.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=aAe[e];l(n)||(aAe[e]=n=[]);let i=n[t];if(!l(i)){let r=Ws.getRegularGridIndices(e,t),o=lAe(e,t),s=o.westIndicesSouthToNorth,a=o.southIndicesEastToWest,c=o.eastIndicesNorthToSouth,u=o.northIndicesWestToEast;i=n[t]={indices:r,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var cAe=[];Ws.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=cAe[e];l(n)||(cAe[e]=n=[]);let i=n[t];if(!l(i)){let r=e*t,o=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,c=r+s,u=o+a,f=lAe(e,t),d=f.westIndicesSouthToNorth,p=f.southIndicesEastToWest,g=f.eastIndicesNorthToSouth,m=f.northIndicesWestToEast,y=je.createTypedArray(c,u);uAe(e,t,y,0),Ws.addSkirtIndices(d,p,g,m,r,y,o),i=n[t]={indices:y,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:g,northIndicesWestToEast:m,indexCountWithoutSkirts:o}}return i};Ws.getSkirtVertexCount=function(e,t,n,i){return e.length+t.length+n.length+i.length};Ws.getSkirtIndexCount=function(e){return(e-4)*2*3};Ws.getSkirtIndexCountWithFilledCorners=function(e){return((e-4)*2+4)*3};Ws.addSkirtIndices=function(e,t,n,i,r,o,s){let a=r;s=SH(e,a,o,s),a+=e.length,s=SH(t,a,o,s),a+=t.length,s=SH(n,a,o,s),a+=n.length,SH(i,a,o,s)};Ws.addSkirtIndicesWithFilledCorners=function(e,t,n,i,r,o,s){Ws.addSkirtIndices(e,t,n,i,r,o,s);let a=Ws.getSkirtVertexCount(e,t,n,i),c=Ws.getSkirtIndexCount(a),u=s+c,f=e[0],d=i[0],p=n[0],g=t[0],m=r,y=m+e.length-1,A=y+1,b=A+t.length-1,x=b+1,T=x+n.length-1,E=T+1,v=E+i.length-1;o[u+0]=f,o[u+1]=m,o[u+2]=b,o[u+3]=g,o[u+4]=A,o[u+5]=T,o[u+6]=p,o[u+7]=x,o[u+8]=v,o[u+9]=d,o[u+10]=E,o[u+11]=y};function lAe(e,t){let n=new Array(t),i=new Array(e),r=new Array(t),o=new Array(e),s;for(s=0;s<e;++s)o[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)r[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:r,northIndicesWestToEast:o}}function uAe(e,t,n,i){let r=0;for(let o=0;o<t-1;++o){for(let s=0;s<e-1;++s){let a=r,c=a+e,u=c+1,f=a+1;n[i++]=a,n[i++]=c,n[i++]=f,n[i++]=f,n[i++]=c,n[i++]=u,++r}++r}}function SH(e,t,n,i){let r=e[0],o=e.length;for(let s=1;s<o;++s){let a=e[s];n[i++]=r,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,r=a,++t}return i}Ws.heightmapTerrainQuality=.25;Ws.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Ws.heightmapTerrainQuality/(t*n)};Ws.prototype.requestTileGeometry=pe.throwInstantiationError;Ws.prototype.getLevelMaximumGeometricError=pe.throwInstantiationError;Ws.prototype.getTileDataAvailable=pe.throwInstantiationError;Ws.prototype.loadTileDataAvailability=pe.throwInstantiationError;var Xr=Ws;var wF=`uniform sampler2D u_texture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(u_texture, v_textureCoordinates);
}
`;var IF=`in vec4 position;
in float webMercatorT;
uniform vec2 u_textureDimensions;
out vec2 v_textureCoordinates;
void main()
{
v_textureCoordinates = vec2(position.x, webMercatorT);
gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
}
`;var fAe={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7};Object.freeze(fAe);var Vn=fAe;function WS(e,t,n,i,r){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let o=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(o,s,a)}this.state=Vn.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!l(r)&&e.ready&&(r=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=r}WS.createPlaceholder=function(e){let t=new WS(e,0,0,0);return t.addReference(),t.state=Vn.PLACEHOLDER,t};WS.prototype.addReference=function(){++this.referenceCount};WS.prototype.releaseReference=function(){return--this.referenceCount,this.referenceCount===0?(this.imageryLayer.removeImageryFromCache(this),l(this.parent)&&this.parent.releaseReference(),l(this.image)&&l(this.image.destroy)&&this.image.destroy(),l(this.texture)&&this.texture.destroy(),l(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),le(this),0):this.referenceCount};WS.prototype.processStateMachine=function(e,t,n){this.state===Vn.UNLOADED&&!n&&(this.state=Vn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Vn.RECEIVED&&(this.state=Vn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Vn.READY&&t&&!this.texture;(this.state===Vn.TEXTURE_LOADED||i)&&(this.state=Vn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var qS=WS;function iZ(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}iZ.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};iZ.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,r=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Vn.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this),!0;let o=i.parent,s;for(;l(o)&&(o.state!==Vn.READY||!this.useWebMercatorT&&!l(o.texture));)o.state!==Vn.FAILED&&o.state!==Vn.INVALID&&(s=s||o),o=o.parent;return this.readyImagery!==o&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=o,l(o)&&(o.addReference(),this.textureTranslationAndScale=r._calculateTextureTranslationAndScale(e,this))),i.state===Vn.FAILED||i.state===Vn.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var YS=iZ;function Gi(e,t){this._imageryProvider=e,this._readyEvent=new be,this._errorEvent=new be,t=t??H.EMPTY_OBJECT,e=e??H.EMPTY_OBJECT,this.alpha=t.alpha??e._defaultAlpha??1,this.nightAlpha=t.nightAlpha??e._defaultNightAlpha??1,this.dayAlpha=t.dayAlpha??e._defaultDayAlpha??1,this.brightness=t.brightness??e._defaultBrightness??Gi.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??Gi.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??Gi.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??Gi.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??Gi.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??Gi.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??Gi.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??Gi.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??ie.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new YS(qS.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=t.colorToAlphaThreshold??Gi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(Gi.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},ready:{get:function(){return l(this._imageryProvider)}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},rectangle:{get:function(){return this._rectangle}}});Gi.DEFAULT_BRIGHTNESS=1;Gi.DEFAULT_CONTRAST=1;Gi.DEFAULT_HUE=0;Gi.DEFAULT_SATURATION=1;Gi.DEFAULT_GAMMA=1;Gi.DEFAULT_SPLIT=Vo.NONE;Gi.DEFAULT_MINIFICATION_FILTER=Wt.LINEAR;Gi.DEFAULT_MAGNIFICATION_FILTER=Zn.LINEAR;Gi.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;Gi.fromProviderAsync=function(e,t){let n=new Gi(void 0,t);return frt(n,Promise.resolve(e)),n};Gi.fromWorldImagery=function(e){return e=e??H.EMPTY_OBJECT,Gi.fromProviderAsync(Qg({style:e.style}),e)};Gi.prototype.isBaseLayer=function(){return this._isBaseLayer};Gi.prototype.isDestroyed=function(){return!1};Gi.prototype.destroy=function(){return le(this)};var mAe=new ie,dAe=new ie,rZ=new ie,pAe=new ie;Gi.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ie.intersection(e.rectangle,t)};Gi.prototype._createTileImagerySkeletons=function(e,t,n){let i=e.data;if(!l(t)||l(this._minimumTerrainLevel)&&e.level<this._minimumTerrainLevel||l(this._maximumTerrainLevel)&&e.level>this._maximumTerrainLevel)return!1;l(n)||(n=i.imagery.length);let r=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let o=r.tilingScheme.projection instanceof yi&&e.rectangle.north<yi.MaximumLatitude&&e.rectangle.south>-yi.MaximumLatitude,s=ie.intersection(r.rectangle,this._rectangle,mAe),a=ie.intersection(e.rectangle,s,dAe);if(!l(a)){if(!this.isBaseLayer())return!1;let w=s,P=e.rectangle;a=dAe,P.south>=w.north?a.north=a.south=w.north:P.north<=w.south?a.north=a.south=w.south:(a.south=Math.max(P.south,w.south),a.north=Math.min(P.north,w.north)),P.west>=w.east?a.west=a.east=w.east:P.east<=w.west?a.west=a.east=w.west:(a.west=Math.max(P.west,w.west),a.east=Math.min(P.east,w.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let f=1*t.getLevelMaximumGeometricError(e.level),d=lrt(this,f,c);d=Math.max(0,d);let p=r.maximumLevel;if(d>p&&(d=p),l(r.minimumLevel)){let w=r.minimumLevel;d<w&&(d=w)}let g=r.tilingScheme,m=g.positionToTileXY(ie.northwest(a),d),y=g.positionToTileXY(ie.southeast(a),d),A=e.rectangle.width/512,b=e.rectangle.height/512,x=g.tileXYToRectangle(m.x,m.y,d);Math.abs(x.south-e.rectangle.north)<b&&m.y<y.y&&++m.y,Math.abs(x.east-e.rectangle.west)<A&&m.x<y.x&&++m.x;let T=g.tileXYToRectangle(y.x,y.y,d);Math.abs(T.north-e.rectangle.south)<b&&y.y>m.y&&--y.y,Math.abs(T.west-e.rectangle.east)<A&&y.x>m.x&&--y.x;let E=ie.clone(e.rectangle,pAe),v=g.tileXYToRectangle(m.x,m.y,d),S=ie.intersection(v,s,rZ),I;o?(g.rectangleToNativeRectangle(E,E),g.rectangleToNativeRectangle(v,v),g.rectangleToNativeRectangle(S,S),g.rectangleToNativeRectangle(s,s),I=g.tileXYToNativeRectangle.bind(g),A=E.width/512,b=E.height/512):I=g.tileXYToRectangle.bind(g);let R,O=0,L=1,_;!this.isBaseLayer()&&Math.abs(S.west-E.west)>=A&&(O=Math.min(1,(S.west-E.west)/E.width)),!this.isBaseLayer()&&Math.abs(S.north-E.north)>=b&&(L=Math.max(0,(S.north-E.south)/E.height));let C=L;for(let w=m.x;w<=y.x;w++)if(R=O,v=I(w,m.y,d),S=ie.simpleIntersection(v,s,rZ),!!l(S)){O=Math.min(1,(S.east-E.west)/E.width),w===y.x&&(this.isBaseLayer()||Math.abs(S.east-E.east)<A)&&(O=1),L=C;for(let P=m.y;P<=y.y;P++){if(_=L,v=I(w,P,d),S=ie.simpleIntersection(v,s,rZ),!l(S))continue;L=Math.max(0,(S.south-E.south)/E.height),P===y.y&&(this.isBaseLayer()||Math.abs(S.south-E.south)<b)&&(L=0);let M=new se(R,L,O,_),F=this.getImageryFromCache(w,P,d);i.imagery.splice(n,0,new YS(F,M,o)),++n}}return!0};Gi.prototype._calculateTextureTranslationAndScale=function(e,t){let n=t.readyImagery.rectangle,i=e.rectangle;if(t.useWebMercatorT){let c=t.readyImagery.imageryLayer.imageryProvider.tilingScheme;n=c.rectangleToNativeRectangle(n,mAe),i=c.rectangleToNativeRectangle(i,pAe)}let r=i.width,o=i.height,s=r/n.width,a=o/n.height;return new se(s*(i.west-n.west)/r,a*(i.south-n.south)/o,s,a)};Gi.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return r();e.image=s,e.state=Vn.RECEIVED,e.request=void 0,Zr.reportSuccess(n._requestImageError)}function r(s){if(e.request.state===Ti.CANCELLED){e.state=Vn.UNLOADED,e.request=void 0;return}e.state=Vn.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Zr.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&o()}function o(){let s=new wo({throttle:!1,throttleByServer:!0,type:Zs.IMAGERY});e.request=s,e.state=Vn.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=Vn.UNLOADED,e.request=void 0;return}l(t.getTileCredits)&&(e.credits=t.getTileCredits(e.x,e.y,e.level)),a.then(function(c){i(c)}).catch(function(c){r(c)})}o()};Gi.prototype._createTextureWebGL=function(e,t){let n=new Ht({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Dt({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Dt({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Ke.RGBA:Ke.RGB,sampler:n})};Gi.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let o=n.tileDiscardPolicy;if(l(o)){if(!o.isReady()){t.state=Vn.RECEIVED;return}if(o.shouldDiscardImage(i)){t.state=Vn.INVALID;return}}}let r=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof yi?t.textureWebMercator=r:t.texture=r,t.image=void 0,t.state=Vn.TEXTURE_LOADED};function hAe(e,t,n){return`${e}:${t}:${n}`}Gi.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===Wt.LINEAR&&i===Zn.LINEAR&&!Ke.isCompressedFormat(t.pixelFormat)&&D.isPowerOfTwo(t.width)&&D.isPowerOfTwo(t.height)){n=Wt.LINEAR_MIPMAP_LINEAR;let o=Ut.maximumTextureFilterAnisotropy,s=Math.min(o,this._maximumAnisotropy??o),a=hAe(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let u=c[a];l(u)||(u=c[a]=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(Pd.NICEST),t.sampler=u}else{let o=hAe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[o];l(a)||(a=s[o]=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};Gi.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,r=t.rectangle,o=e.context;if(n=n??!0,n&&!(this._imageryProvider.tilingScheme.projection instanceof Ui)&&r.width/i.width>1e-5){let s=this;t.addReference();let a=new Nf({persists:!0,owner:this,preExecute:function(c){crt(c,o,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(o,c),t.state=Vn.READY,t.releaseReference()},canceled:function(){t.state=Vn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(o,i),t.state=Vn.READY};Gi.prototype.queueReprojectionCommands=function(e){let t=this._reprojectComputeCommands,n=t.length;for(let i=0;i<n;++i)e.commandList.push(t[i]);t.length=0};Gi.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};Gi.prototype.getImageryFromCache=function(e,t,n,i){let r=gAe(e,t,n),o=this._imageryCache[r];return l(o)||(o=new qS(this,e,t,n,i),this._imageryCache[r]=o),o.addReference(),o};Gi.prototype.removeImageryFromCache=function(e){let t=gAe(e.x,e.y,e.level);delete this._imageryCache[t]};function gAe(e,t,n){return JSON.stringify([e,t,n])}var wH={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new U,texture:void 0},art=dn.supportsTypedArrays()?new Float32Array(128):void 0;function crt(e,t,n,i){let r=t.cache.imageryLayer_reproject;if(!l(r)){r=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){l(this.framebuffer)&&this.framebuffer.destroy(),l(this.vertexArray)&&this.vertexArray.destroy(),l(this.shaderProgram)&&this.shaderProgram.destroy()}};let A=new Float32Array(256),b=0;for(let S=0;S<64;++S){let I=S/63;A[b++]=0,A[b++]=I,A[b++]=1,A[b++]=I}let x={position:0,webMercatorT:1},T=Xr.getRegularGridIndices(2,64),E=nt.createIndexBuffer({context:t,typedArray:T,usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT});r.vertexArray=new zn({context:t,attributes:[{index:x.position,vertexBuffer:nt.createVertexBuffer({context:t,typedArray:A,usage:Me.STATIC_DRAW}),componentsPerAttribute:2},{index:x.webMercatorT,vertexBuffer:nt.createVertexBuffer({context:t,sizeInBytes:512,usage:Me.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:E});let v=new Ye({sources:[IF]});r.shaderProgram=en.fromCache({context:t,vertexShaderSource:v,fragmentShaderSource:wF,attributeLocations:x}),r.sampler=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:Zn.LINEAR})}n.sampler=r.sampler;let o=n.width,s=n.height;wH.textureDimensions.x=o,wH.textureDimensions.y=s,wH.texture=n;let a=Math.sin(i.south),c=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let f=1/(.5*Math.log((1+a)/(1-a))-c),d=new Dt({context:t,width:o,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});D.isPowerOfTwo(o)&&D.isPowerOfTwo(s)&&d.generateMipmap(Pd.NICEST);let p=i.south,g=i.north,m=art,y=0;for(let A=0;A<64;++A){let b=A/63,x=D.lerp(p,g,b);a=Math.sin(x);let E=(.5*Math.log((1+a)/(1-a))-c)*f;m[y++]=E,m[y++]=E}r.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(m),e.shaderProgram=r.shaderProgram,e.outputTexture=d,e.uniformMap=wH,e.vertexArray=r.vertexArray}function lrt(e,t,n){let i=e._imageryProvider,r=i.tilingScheme,o=r.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Ui?1:Math.cos(n),a=r.rectangle,u=o.maximumRadius*a.width*s/(i.tileWidth*r.getNumberOfXTilesAtLevel(0))/t,f=Math.log(u)/Math.log(2);return Math.round(f)|0}function urt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function frt(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){urt(e._errorEvent,i)}}var Ss=Gi;var oZ=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},PF=oZ;var sZ=class{constructor(t,n,i,r){this._minX=t??0,this._minY=n??0,this._maxX=i??0,this._maxY=r??0}get minX(){return this._minX}set minX(t){this._minX=t}get minY(){return this._minY}set minY(t){this._minY=t}get maxX(){return this._maxX}set maxX(t){this._maxX=t}get maxY(){return this._maxY}set maxY(t){this._maxY=t}contains(t,n){return t>=this.minX&&t<this.maxX&&n>=this.minY&&n<this.maxY}containsExclusive(t,n){return t>this.minX&&t<this.maxX&&n>this.minY&&n<this.maxY}containsInclusive(t,n){return t>=this.minX&&t<=this.maxX&&n>=this.minY&&n<=this.maxY}},XS=sZ;var drt=new ie,_Ae=new ie,hrt=new ie,mrt=new ie,prt=new ie,grt=new ie,aZ=class e{constructor(t,n,i,r,o){this._x=t,this._y=n,this._level=i,this._textureCoordinateRectangle=r,this._imagery=o}get x(){return this._x}get y(){return this._y}get level(){return this._level}get textureCoordinateRectangle(){return this._textureCoordinateRectangle}get imagery(){return this._imagery}static createImageryCoverages(t,n,i){if(!n.show)return[];let r=n.imageryProvider,o=e._clampImageryLevel(r,i),s=ie.intersection(r.rectangle,n.rectangle,drt),a=r.tilingScheme,c=e._computeImageryRange(t,s,a,o),u=mrt;a.rectangleToNativeRectangle(t,u);let f=prt;a.rectangleToNativeRectangle(s,f);let d=(g,m,y)=>{let A=a.tileXYToRectangle(g,m,y),b=ie.intersection(A,s,hrt);if(!l(b))return;let x=grt;return a.rectangleToNativeRectangle(b,x),x};return e._computeImageryCoverages(n,c,o,u,d)}static _clampImageryLevel(t,n){let i=t.minimumLevel??0,r=t.maximumLevel??Number.POSITIVE_INFINITY,o=Math.min(r-1,Math.max(i,n));return Math.floor(o)}static _computeImageryRange(t,n,i,r){let o=e._computeOverlappedRectangle(t,n),s=i.positionToTileXY(ie.northwest(o),r),a=i.positionToTileXY(ie.southeast(o),r),c=new XS;c.minX=s.x,c.minY=s.y,c.maxX=a.x,c.maxY=a.y;let u=t.width/512,f=t.height/512,d=i.tileXYToRectangle(c.minX,c.minY,r);Math.abs(d.south-t.north)<f&&c.minY<c.maxY&&++c.minY,Math.abs(d.east-t.west)<u&&c.minX<c.maxX&&++c.minX;let m=i.tileXYToRectangle(c.maxX,c.maxY,r);return Math.abs(m.north-t.south)<f&&c.maxY>c.minY&&--c.maxY,Math.abs(m.west-t.east)<u&&c.maxX>c.minX&&--c.maxX,c}static _clampRectangle(t,n,i){return l(i)||(i=new ie),t.south>=n.north?i.north=i.south=n.north:t.north<=n.south?i.north=i.south=n.south:(i.south=Math.max(t.south,n.south),i.north=Math.min(t.north,n.north)),t.west>=n.east?i.west=i.east=n.east:t.east<=n.west?i.west=i.east=n.west:(i.west=Math.max(t.west,n.west),i.east=Math.min(t.east,n.east)),i}static _computeOverlappedRectangle(t,n){let i=ie.intersection(t,n,_Ae);return l(i)?i:e._clampRectangle(t,n,_Ae)}static _computeImageryCoverages(t,n,i,r,o){let s=[];for(let a=n.minX;a<=n.maxX;a++){let c=o(a,n.maxY,i);if(l(c))for(let u=n.minY;u<=n.maxY;u++){let f=o(a,u,i);if(!l(f))continue;let d=e._localizeToCartesianRectangle(f,r,void 0),p=t.getImageryFromCache(a,u,i),g=new e(a,u,i,d,p);s.push(g)}}return s}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new XS);let r=1/n.width,o=1/n.height;return i.minX=(t.west-n.west)*r,i.minY=(t.south-n.south)*o,i.maxX=(t.east-n.west)*r,i.maxY=(t.north-n.south)*o,i}},KS=aZ;var cZ=class e{static createTextureCoordinatesForMappedPositions(t,n){let i=t.cartographicPositions,r=t.cartographicBoundingRectangle,o=t.numPositions;return e._createTextureCoordinates(i,o,r,n)}static _createTextureCoordinates(t,n,i,r){let o=new et;et.fromRectangle(i,r,o);let s=e.createProjectedPositions(t,r),a=e.computeTexCoords(s,o);return e.createTypedArrayFromCartesians2(n,a)}static createTextureCoordinatesAttributeForMappedPositions(t,n){let i=e.createTextureCoordinatesForMappedPositions(t,n);return e.createTexCoordAttribute(i)}static createCartographicPositions(t,n,i){let r=ba.readAttributeAsTypedArray(t),o=t.type,s=Vt.getNumberOfComponents(o),a=e.createIterableCartesian3FromTypedArray(r,s),c=e.transformCartesians3(a,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new h,r=t.length/n;return{[Symbol.iterator]:function*(){for(let s=0;s<r;s++)i.x=t[s*n+0],i.y=t[s*n+1],i.z=t[s*n+2],yield i}}}static map(t,n){return{[Symbol.iterator]:function*(){for(let r of t)yield n(r)}}}static computeCartographicBoundingRectangle(t,n){l(n)||(n=new ie);let i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(let a of t)i=Math.max(i,a.latitude),r=Math.min(r,a.latitude),o=Math.max(o,a.longitude),s=Math.min(s,a.longitude);return n.north=i,n.south=r,n.east=o,n.west=s,n}static transformCartesians3(t,n){let i=new h;return e.map(t,o=>(N.multiplyByPoint(n,o,i),i))}static transformToCartographic(t,n){let i=new he;return e.map(t,o=>(n.cartesianToCartographic(o,i),i))}static createProjectedPositions(t,n){let i=new h;return e.map(t,o=>(n.project(o,i),i))}static computeTexCoords(t,n){let i=new U,r=1/n.width,o=1/n.height;return e.map(t,a=>{let c=(a.x-n.x)*r,u=(a.y-n.y)*o,f=Math.min(Math.max(c,0),1),d=Math.min(Math.max(u,0),1);return i.x=f,i.y=d,i})}static createTypedArrayFromCartesians2(t,n){let i=new Float32Array(t*2),r=0;for(let o of n)i[r*2+0]=o.x,i[r*2+1]=o.y,r++;return i}static createTexCoordAttribute(t){return{name:"Imagery Texture Coordinates",semantic:ct.TEXCOORD,setIndex:0,componentDatatype:Y.FLOAT,type:Vt.VEC2,normalized:!1,count:t.length/2,min:void 0,max:void 0,constant:new U(0,0),quantization:void 0,typedArray:t,byteOffset:0,byteStride:void 0}}},_T=cZ;var lZ=class{constructor(t,n,i,r){this._cartographicPositions=t,this._numPositions=n,this._cartographicBoundingRectangle=i,this._ellipsoid=r}get cartographicPositions(){return this._cartographicPositions}get numPositions(){return this._numPositions}get cartographicBoundingRectangle(){return this._cartographicBoundingRectangle}get ellipsoid(){return this._ellipsoid}},DF=lZ;var uZ=class e{constructor(t,n,i){this._model=t,this._runtimeNode=n,this._runtimePrimitive=i,this._mappedPositionsPerEllipsoid=void 0,this._mappedPositionsModelMatrix=new N,this._lastImageryLayersModificationCounter=0,this._imageryTexCoordAttributesPerProjection=void 0,this._currentImageryLayers=void 0,this._coveragesPerLayer=void 0,this._allImageriesReady=!1}coveragesForImageryLayer(t){let r=this._model.imageryLayers.indexOf(t);if(r===-1)throw new pe("Imagery layer is not part of the model");let o=this._coveragesPerLayer;if(!l(o))throw new pe("The coveragesPerLayer have not been computed yet");return o[r]}update(t){let n=this._model,o=n.content.tileset.imageryLayersModificationCounter;this._lastImageryLayersModificationCounter!==o&&(delete this._mappedPositionsPerEllipsoid,this._lastImageryLayersModificationCounter=o),this._mappedPositionsNeedUpdate&&(n.resetDrawCommands(),this._mappedPositionsPerEllipsoid=this._computeMappedPositionsPerEllipsoid(),this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes()),l(this._imageryTexCoordAttributesPerProjection)||(this._imageryTexCoordAttributesPerProjection=this._computeImageryTexCoordsAttributesPerProjection(),this._uploadImageryTexCoordAttributes(t.context)),l(this._coveragesPerLayer)||(this._computeCoveragesPerLayer(),this._allImageriesReady=!1),this._allImageriesReady||this._updateImageries(t)}_deleteCoveragesPerLayer(){let t=this._coveragesPerLayer;if(!l(t))return;let n=this._currentImageryLayers,i=t.length;for(let r=0;r<i;r++){let o=n[r],s=t[r];this._deleteCoverages(o,s)}delete this._currentImageryLayers,delete this._coveragesPerLayer}_deleteCoverages(t,n){if(t.isDestroyed())return;let i=n.length;for(let r=0;r<i;r++)n[r].imagery.releaseReference()}_uploadImageryTexCoordAttributes(t){let n=this._imageryTexCoordAttributesPerProjection;if(!l(n))return;let i=n.length;for(let r=0;r<i;r++){let o=n[r],s=nt.createVertexBuffer({context:t,typedArray:o.typedArray,usage:Me.STATIC_DRAW});s.vertexArrayDestroyable=!1,o.buffer=s}}_destroyImageryTexCoordAttributes(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++){let r=t[i];l(r)&&(l(r.buffer)&&(r.buffer.isDestroyed()||r.buffer.destroy()),t[i]=void 0)}delete this._imageryTexCoordAttributesPerProjection}get _mappedPositionsNeedUpdate(){if(!l(this._mappedPositionsPerEllipsoid))return!0;let t=this._model,n=this._mappedPositionsModelMatrix;return!N.equals(t.modelMatrix,n)}_computeMappedPositionsPerEllipsoid(){let t=this._model,n=this._runtimeNode,i=this._runtimePrimitive,r=e._obtainPrimitivePositionAttribute(i.primitive),o=r.count,s=e._computePrimitivePositionTransform(t,n,void 0),a=[],c=e._computeUniqueEllipsoids(t.imageryLayers),u=c.length;for(let f=0;f<u;f++){let d=c[f],p=_T.createCartographicPositions(r,s,d),g=_T.computeCartographicBoundingRectangle(p),m=new DF(p,o,g,d);a.push(m)}return N.clone(t.modelMatrix,this._mappedPositionsModelMatrix),a}static _computeUniqueEllipsoids(t){let n=new Set,i=t.length;for(let r=0;r<i;r++){let o=t.get(r),s=e._getEllipsoid(o);n.add(s)}return[...n]}_computeImageryTexCoordsAttributesPerProjection(){let n=this._model.imageryLayers,i=e._extractProjections(n),r=[...new Set(i)];return this._createImageryTexCoordAttributes(r)}static _extractProjections(t){let n=[],i=t.length;for(let r=0;r<i;r++){let o=t.get(r),s=e._getProjection(o);n.push(s)}return n}static _getProjection(t){return t.imageryProvider.tilingScheme.projection}_createImageryTexCoordAttributes(t){let n=[],i=t.length;for(let r=0;r<i;r++){let o=t[r],s=o.ellipsoid,a=this.mappedPositionsForEllipsoid(s),c=_T.createTextureCoordinatesAttributeForMappedPositions(a,o);n.push(c)}return n}_computeCoveragesPerLayer(){let t=[],n=[],r=this._model.imageryLayers,o=r.length;for(let s=0;s<o;s++){let a=r.get(s),c=this._computeCoverage(a);t.push(c),n.push(a)}this._coveragesPerLayer=t,this._currentImageryLayers=n}_computeCoverage(t){let i=this.mappedPositionsForImageryLayer(t).cartographicBoundingRectangle,r=this._computeImageryLevel(t,i);return KS.createImageryCoverages(i,t,r)}_computeImageryLevel(t,n){let i=t.imageryProvider,o=i.tilingScheme.rectangle,s=1,a=n.width,c=o.width;n.height>n.width&&(a=n.height,c=o.height);let u=Math.log2(s*c/a);return KS._clampImageryLevel(i,u)}_updateImageries(t){let n=this._model,i=this._coveragesPerLayer,r=i.length,o=!0;for(let s=0;s<r;s++){let a=i[s],c=a.length;for(let u=0;u<c;u++){let d=a[u].imagery;d.state===Vn.READY||d.state===Vn.FAILED||d.state===Vn.INVALID||(o=!1,d.processStateMachine(t,!1,!1))}}o&&n.resetDrawCommands(),this._allImageriesReady=o}mappedPositionsForImageryLayer(t){let n=e._getEllipsoid(t);return this.mappedPositionsForEllipsoid(n)}mappedPositionsForEllipsoid(t){let n=this._mappedPositionsPerEllipsoid;if(!l(n))throw new pe("The mappedPositions have not been computed yet");let i=n.length;for(let r=0;r<i;r++){let o=n[r];if(o.ellipsoid===t)return o}throw new pe(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new pe("The imagery texture coordinate attributes have not been computed yet");return this._imageryTexCoordAttributesPerProjection}get ready(){let t=this._coveragesPerLayer;return l(t)?this._allImageriesReady:!1}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes(),le(this)}static _computePrimitivePositionTransform(t,n,i){l(i)||(i=new N);let r=t.sceneGraph;return N.clone(N.IDENTITY,i),N.multiply(i,t.modelMatrix,i),N.multiply(i,r.components.transform,i),N.multiply(i,r.axisCorrectionMatrix,i),N.multiply(i,n.computedTransform,i),i}static _obtainPrimitivePositionAttribute(t){let n=xt.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new pe("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},yT=uZ;var fZ=class{constructor(t,n,i,r,o){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=r,this.imageryTexCoordAttributeSetIndex=o}},RF=fZ;var _rt=!1,yrt=new ie,Art=new ie,dZ=class e{static process(t,n,i){let r=t.model,o=n.modelPrimitiveImagery;if(!l(o)||!o.ready)return;let s=r.imageryLayers,a=yT._extractProjections(s),c=[...new Set(a)],u=e._computeIndexMapping(a,c),f=e._createImageryInputs(s,o,u);if(f.length===0)return;f.length>10&&(_t("imagery-texture-units",`Warning: Draped imagery requires ${f.length} texture units, truncating`),f.length=10),e._addImageryTexCoordAttributesToRenderResources(o,t);let d=[];for(let p=0;p<s.length;p++)d.push(s.get(p));e._processImageryInputs(d,t,f,c.length)}static _addImageryTexCoordAttributesToRenderResources(t,n){let i=t.imageryTexCoordAttributesPerProjection();for(let r of i)e._addImageryTexCoordAttributeToRenderResources(r,n)}static _addImageryTexCoordAttributeToRenderResources(t,n){let i=Vt.getNumberOfComponents(t.type),r={index:n.attributeIndex++,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:i,componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};n.attributes.push(r)}static _processImageryInputs(t,n,i,r){let o=n.shaderBuilder,s=e._computeImageryFlags(t),a=i.length;o.addDefine("HAS_IMAGERY"),o.addDefine(`IMAGERY_TEXTURE_UNITS ${a}`),e._addAttributes(o,r),e._defineUniforms(o,s),e._buildSampleAndBlendFunction(o,s),e._createMainImageryShader(o,i,s);let c=n.uniformMap,u=e._createImageryUniforms(i);e._setImageryUniforms(c,u)}static _addAttributes(t,n){for(let o=0;o<n;o++)t.addAttribute("vec2",`a_imagery_texCoord_${o}`),t.addVarying("vec2",`v_imagery_texCoord_${o}`);let i="initializeImageryAttributes",r=`void ${i}()`;t.addFunction(i,r,de.VERTEX);for(let o=0;o<n;o++)t.addFunctionLines(i,[`v_imagery_texCoord_${o} = a_imagery_texCoord_${o};`])}static _computeImageryFlags(t){let n=new PF;for(let i=0;i<t.length;i++){let r=t[i];n.alpha|=r.alpha!==1,n.brightness|=r.brightness!==Ss.DEFAULT_BRIGHTNESS,n.contrast|=r.contrast!==Ss.DEFAULT_CONTRAST,n.hue|=r.hue!==Ss.DEFAULT_HUE,n.saturation|=r.saturation!==Ss.DEFAULT_SATURATION,n.gamma|=r.gamma!==Ss.DEFAULT_GAMMA;let o=l(r.colorToAlpha)&&r.colorToAlphaThreshold>0;n.colorToAlpha|=o}return n}static _defineUniforms(t,n){t.addUniform("sampler2D","u_imageryTextures[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",de.FRAGMENT)}static _createSampleAndBlendFunctionSignature(t){let n="sampleAndBlend",i=[];i.push("vec4 previousColor"),i.push("sampler2D textureToSample"),i.push("vec2 textureCoordinates"),i.push("vec4 textureCoordinateRectangle"),i.push("vec4 textureCoordinateTranslationAndScale"),t.alpha&&i.push("float textureAlpha"),t.brightness&&i.push("float textureBrightness"),t.contrast&&i.push("float textureContrast"),t.hue&&i.push("float textureHue"),t.saturation&&i.push("float textureSaturation"),t.gamma&&i.push("float textureOneOverGamma"),t.colorToAlpha&&i.push("vec4 colorToAlpha");let r=i.join(", ");return`vec4 ${n}(${r})`}static _buildSampleAndBlendFunction(t,n){let i="sampleAndBlend",r=e._createSampleAndBlendFunctionSignature(n);t.addFunction(i,r,de.FRAGMENT),t.addFunctionLines(i,["float effectiveAlpha = 1.0;"]),n.alpha&&t.addFunctionLines(i,["effectiveAlpha = textureAlpha;"]),t.addFunctionLines(i,["if (textureCoordinates.x < textureCoordinateRectangle.x) effectiveAlpha = 0.0;","if (textureCoordinates.x > textureCoordinateRectangle.z) effectiveAlpha = 0.0;","if (textureCoordinates.y < textureCoordinateRectangle.y) effectiveAlpha = 0.0;","if (textureCoordinates.y > textureCoordinateRectangle.w) effectiveAlpha = 0.0;","vec2 translation = textureCoordinateTranslationAndScale.xy;","vec2 scale = textureCoordinateTranslationAndScale.zw;","vec2 effectiveTextureCoordinates = textureCoordinates * scale + translation;","vec4 value = texture(textureToSample, effectiveTextureCoordinates);","value = czm_srgbToLinear(value);","vec3 color = value.rgb;","float alpha = value.a;"]),n.colorToAlpha&&t.addFunctionLines(i,["vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);","colorDiff.r = czm_maximumComponent(colorDiff);","alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);"]),n.gamma?t.addFunctionLines(i,["color = pow(color, vec3(textureOneOverGamma));"]):t.addFunctionLines(i,["vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));","color = tempColor.rgb;","alpha = tempColor.a;"]),n.brightness&&t.addFunctionLines(i,["color = mix(vec3(0.0), color, textureBrightness);"]),n.contrast&&t.addFunctionLines(i,["color = mix(vec3(0.5), color, textureContrast);"]),n.hue&&t.addFunctionLines(i,["color = czm_hue(color, textureHue);"]),n.saturation&&t.addFunctionLines(i,["color = czm_saturation(color, textureSaturation);"]),t.addFunctionLines(i,["float sourceAlpha = alpha * effectiveAlpha;","float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);","outAlpha += sign(outAlpha) - 1.0;","vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;","vec4 result = vec4(outColor, max(outAlpha, 0.0));"]),_rt&&t.addFunctionLines(i,["if (abs(textureCoordinates.x - textureCoordinateRectangle.x) < (1.0/256.0) || "," abs(textureCoordinates.x - textureCoordinateRectangle.z) < (1.0/256.0) || "," abs(textureCoordinates.y - textureCoordinateRectangle.y) < (1.0/256.0) || "," abs(textureCoordinates.y - textureCoordinateRectangle.w) < (1.0/256.0))","{"," result = vec4(1.0, 0.0, 0.0, effectiveAlpha);","}"]),t.addFunctionLines(i,["return result;"])}static _createSampleAndBlendCallArguments(t,n,i){let r=`v_imagery_texCoord_${n}`,o=[];return o.push("blendedBaseColor"),o.push(`u_imageryTextures[${i}]`),o.push(`${r}`),o.push(`u_imageryTextureCoordinateRectangle[${i}]`),o.push(`u_imageryTextureTranslationAndScale[${i}]`),t.alpha&&o.push(`u_imageryTextureAlpha[${i}]`),t.brightness&&o.push(`u_imageryTextureBrightness[${i}]`),t.contrast&&o.push(`u_imageryTextureContrast[${i}]`),t.hue&&o.push(`u_imageryTextureHue[${i}]`),t.saturation&&o.push(`u_imageryTextureSaturation[${i}]`),t.gamma&&o.push(`u_imageryTextureOneOverGamma[${i}]`),t.colorToAlpha&&o.push(`u_imageryTextureColorToAlpha[${i}]`),o.join(", ")}static _createMainImageryShader(t,n,i){let r="blendBaseColorWithImagery";t.addFunction(r,"vec4 blendBaseColorWithImagery(vec4 baseColorWithAlpha)",de.FRAGMENT),t.addFunctionLines(r,["vec4 blendedBaseColor = baseColorWithAlpha;"]);for(let o=0;o<n.length;o++){let a=n[o].imageryTexCoordAttributeSetIndex,c=e._createSampleAndBlendCallArguments(i,a,o);t.addFunctionLines(r,[`blendedBaseColor = sampleAndBlend(${c});`])}t.addFunctionLines(r,["return blendedBaseColor;"])}static _createImageryUniforms(t){let n=t.length,i={};i.imageryTextures=Array(n),i.imageryTextureCoordinateRectangle=Array(n),i.imageryTextureTranslationAndScale=Array(n),i.imageryTextureAlpha=Array(n),i.imageryTextureBrightness=Array(n),i.imageryTextureContrast=Array(n),i.imageryTextureHue=Array(n),i.imageryTextureSaturation=Array(n),i.imageryTextureOneOverGamma=Array(n),i.imageryTextureColorToAlpha=Array(n);for(let r=0;r<n;r++){let o=t[r],s=o.imageryLayer,a=o.texture,c=o.textureCoordinateRectangle,u=o.textureTranslationAndScale;i.imageryTextures[r]=a,i.imageryTextureTranslationAndScale[r]=u,i.imageryTextureCoordinateRectangle[r]=c,i.imageryTextureAlpha[r]=s.alpha,i.imageryTextureBrightness[r]=s.brightness,i.imageryTextureContrast[r]=s.contrast,i.imageryTextureHue[r]=s.hue,i.imageryTextureSaturation[r]=s.saturation,i.imageryTextureOneOverGamma[r]=1/s.gamma;let f=i.imageryTextureColorToAlpha[r];if(l(f)||(f=new se,i.imageryTextureColorToAlpha[r]=f),l(s.colorToAlpha)&&s.colorToAlphaThreshold>0){let p=s.colorToAlpha;f.x=p.red,f.y=p.green,f.z=p.blue,f.w=s.colorToAlphaThreshold}else f.w=-1}return i}static _setImageryUniforms(t,n){for(let i in n)if(n.hasOwnProperty(i)){let r=`u_${i}`;t[r]=function(){return n[i]}}}static _createImageryInputs(t,n,i){let r=[];for(let o=0;o<t.length;o++){let s=t.get(o);if(!s.show)continue;let a=i[o],u=n.mappedPositionsForImageryLayer(s).cartographicBoundingRectangle,f=n.coveragesForImageryLayer(s);for(let d=0;d<f.length;d++){let p=f[d],g=e._createImageryInput(s,p,u,a);l(g)&&r.push(g)}}return r}static _createImageryInput(t,n,i,r){let o=n.imagery;if(o.state===Vn.FAILED||o.state===Vn.INVALID)return;let s=o.textureWebMercator;if(!l(s)&&(s=o.texture,!l(s))){o.state===Vn.READY&&console.log(`Imagery at ${n.x}, ${n.y} (level ${n.level}) does not have any texture - state ${o.state}`);return}let a=e._computeTextureTranslationAndScale(t,i,o.rectangle),c=n.textureCoordinateRectangle,u=new se(c.minX,c.minY,c.maxX,c.maxY);return new RF(t,s,a,u,r)}static _computeTextureTranslationAndScale(t,n,i){let r=t.imageryProvider.tilingScheme,o=r.rectangleToNativeRectangle(n,yrt),s=r.rectangleToNativeRectangle(i,Art);return e._computeTextureTranslationAndScaleFromNative(o,s)}static _computeTextureTranslationAndScaleFromNative(t,n){let i=1/n.width,r=1/n.height,o=t.west-n.west,s=t.south-n.south,a=o*i,c=s*r,u=t.width*i,f=t.height*r;return new se(a,c,u,f)}static _computeIndexMapping(t,n){let i=[],r=t.length;for(let o=0;o<r;o++){let s=t[o],a=n.indexOf(s);i.push(a)}return i}},OF=dZ;var MF=`#ifdef USE_IBL_LIGHTING
vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
vec3 viewDirection = -normalize(position);
vec3 iblColor = textureIBL(viewDirection, normal, material);
return iblColor;
#endif
return vec3(0.0);
}
#endif
#ifdef USE_CLEARCOAT
vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
vec3 viewDirection = -normalize(position);
vec3 halfwayDirection = normalize(viewDirection + lightDirection);
vec3 normal = material.clearcoatNormal;
float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);
vec3 f0 = vec3(0.04);
vec3 f90 = vec3(1.0);
float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
vec3 F = fresnelSchlick2(f0, f90, NdotV);
float roughness = material.clearcoatRoughness;
float alphaRoughness = roughness * roughness;
float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
vec3 directReflection = F * directStrength * NdotL;
vec3 color = lightColorHdr * directReflection;
#ifdef SPECULAR_IBL
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
color += iblColor * material.occlusion;
#endif
float clearcoatFactor = material.clearcoatFactor;
vec3 clearcoatColor = color * clearcoatFactor;
return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
}
#endif
#if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
{
#ifdef USE_CUSTOM_LIGHT_COLOR
vec3 lightColorHdr = model_lightColorHdr;
#else
vec3 lightColorHdr = czm_lightColorHdr;
#endif
vec3 viewDirection = -normalize(position);
vec3 normal = material.normalEC;
vec3 lightDirection = normalize(czm_lightDirectionEC);
vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
vec3 directColor = lightColorHdr * directLighting;
vec3 color = directColor + material.emissive;
#ifdef USE_IBL_LIGHTING
color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
#endif
#ifdef USE_CLEARCOAT
color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
#endif
return color;
}
#endif
void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
{
#ifdef LIGHTING_PBR
#ifdef HAS_NORMALS
vec3 color = computePbrLighting(material, attributes.positionEC);
#else
vec3 color = material.diffuse * material.occlusion + material.emissive;
#endif
#ifndef HDR
color = czm_pbrNeutralTonemapping(color);
#endif
#else // unlit
vec3 color = material.diffuse;
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
color = czm_gammaCorrect(color);
#elif !defined(HDR)
color = czm_linearToSrgb(color);
#endif
material.diffuse = color;
}
`;var yAe={UNLIT:0,PBR:1};Object.freeze(yAe);var Jp=yAe;var AAe={name:"LightingPipelineStage"};AAe.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:r}=e;if(l(n.lightColor)){r.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,de.FRAGMENT),r.addUniform("vec3","model_lightColorHdr",de.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:o}=i;o===Jp.PBR?r.addDefine("LIGHTING_PBR",void 0,de.FRAGMENT):r.addDefine("LIGHTING_UNLIT",void 0,de.FRAGMENT),r.addFragmentLines(MF)};var NF=AAe;var LF=`bool isDefaultStyleColor(vec3 color)
{
return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
}
vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
{
vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
return color;
}
#ifdef HAS_NORMAL_TEXTURE
vec2 getNormalTexCoords()
{
vec2 texCoord = TEXCOORD_NORMAL;
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
texCoord = czm_computeTextureTransform(texCoord, u_normalTextureTransform);
#endif
return texCoord;
}
#endif
#if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
{
vec2 tex_dx = dFdx(normalTexCoords);
vec2 tex_dy = dFdy(normalTexCoords);
float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
return tangent / determinant;
}
#endif
#ifdef USE_ANISOTROPY
struct NormalInfo {
vec3 tangent;
vec3 bitangent;
vec3 normal;
vec3 geometryNormal;
};
NormalInfo getNormalInfo(ProcessedAttributes attributes)
{
vec3 geometryNormal = attributes.normalEC;
#ifdef HAS_NORMAL_TEXTURE
vec2 normalTexCoords = getNormalTexCoords();
#endif
#ifdef HAS_BITANGENTS
vec3 tangent = attributes.tangentEC;
vec3 bitangent = attributes.bitangentEC;
#else // Assume HAS_NORMAL_TEXTURE
vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
vec3 bitangent = normalize(cross(geometryNormal, tangent));
#endif
#ifdef HAS_NORMAL_TEXTURE
mat3 tbn = mat3(tangent, bitangent, geometryNormal);
vec3 normalSample;
#if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
#else
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
#endif
#else
normalSample = texture(u_normalTexture, normalTexCoords).rgb;
#endif
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_normalTextureScale;
#endif
vec3 normal = normalize(tbn * normalSample);
#else
vec3 normal = geometryNormal;
#endif
#ifdef HAS_DOUBLE_SIDED_MATERIAL
if (czm_backFacing()) {
tangent *= -1.0;
bitangent *= -1.0;
normal *= -1.0;
geometryNormal *= -1.0;
}
#endif
NormalInfo normalInfo;
normalInfo.tangent = tangent;
normalInfo.bitangent = bitangent;
normalInfo.normal = normal;
normalInfo.geometryNormal = geometryNormal;
return normalInfo;
}
#endif
#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
vec2 normalTexCoords = getNormalTexCoords();
#ifdef HAS_BITANGENTS
vec3 t = attributes.tangentEC;
vec3 b = attributes.bitangentEC;
#else
vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
t = normalize(t - geometryNormal * dot(geometryNormal, t));
vec3 b = normalize(cross(geometryNormal, t));
#endif
mat3 tbn = mat3(t, b, geometryNormal);
vec3 normalSample;
#if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
#else
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
#endif
#else
normalSample = texture(u_normalTexture, normalTexCoords).rgb;
#endif
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_normalTextureScale;
#endif
return normalize(tbn * normalSample);
}
#endif
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
#endif
#ifdef HAS_BITANGENTS
vec3 t = attributes.tangentEC;
vec3 b = attributes.bitangentEC;
#else
vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
t = normalize(t - geometryNormal * dot(geometryNormal, t));
vec3 b = normalize(cross(geometryNormal, t));
#endif
mat3 tbn = mat3(t, b, geometryNormal);
vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_clearcoatNormalTextureScale;
#endif
return normalize(tbn * normalSample);
}
#endif
#ifdef HAS_NORMALS
vec3 computeNormal(ProcessedAttributes attributes)
{
vec3 normal = attributes.normalEC;
#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
normal = getNormalFromTexture(attributes, normal);
#endif
#ifdef HAS_DOUBLE_SIDED_MATERIAL
if (czm_backFacing()) {
normal = -normal;
}
#endif
return normal;
}
#endif
#ifdef HAS_BASE_COLOR_TEXTURE
vec4 getBaseColorFromTexture()
{
vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
#ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
baseColorTexCoords = czm_computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
#endif
vec4 baseColorWithAlpha;
#if defined(HAS_BASE_COLOR_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams, u_baseColorTextureTransform));
#else
baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams));
#endif
#else
baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
#endif
#ifdef HAS_BASE_COLOR_FACTOR
baseColorWithAlpha *= u_baseColorFactor;
#endif
return baseColorWithAlpha;
}
#endif
#ifdef HAS_EMISSIVE_TEXTURE
vec3 getEmissiveFromTexture()
{
vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
#ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
emissiveTexCoords = czm_computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
#endif
vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
#ifdef HAS_EMISSIVE_FACTOR
emissive *= u_emissiveFactor;
#endif
return emissive;
}
#endif
#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
void setSpecularGlossiness(inout czm_modelMaterial material)
{
#ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
#ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
specularGlossinessTexCoords = czm_computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
#endif
vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
vec3 specular = specularGlossiness.rgb;
float glossiness = specularGlossiness.a;
#ifdef HAS_LEGACY_SPECULAR_FACTOR
specular *= u_legacySpecularFactor;
#endif
#ifdef HAS_GLOSSINESS_FACTOR
glossiness *= u_glossinessFactor;
#endif
#else
#ifdef HAS_LEGACY_SPECULAR_FACTOR
vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
#else
vec3 specular = vec3(1.0);
#endif
#ifdef HAS_GLOSSINESS_FACTOR
float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
#else
float glossiness = 1.0;
#endif
#endif
#ifdef HAS_DIFFUSE_TEXTURE
vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
#ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
diffuseTexCoords = czm_computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
#endif
vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
#ifdef HAS_DIFFUSE_FACTOR
diffuse *= u_diffuseFactor;
#endif
#elif defined(HAS_DIFFUSE_FACTOR)
vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
#else
vec4 diffuse = vec4(1.0);
#endif
material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
material.alpha = diffuse.a;
material.specular = specular;
material.roughness = 1.0 - glossiness;
}
#elif defined(LIGHTING_PBR)
float setMetallicRoughness(inout czm_modelMaterial material)
{
#ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
#ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
metallicRoughnessTexCoords = czm_computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
#endif
vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
#ifdef HAS_METALLIC_FACTOR
metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
#endif
#ifdef HAS_ROUGHNESS_FACTOR
roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
#endif
#else
#ifdef HAS_METALLIC_FACTOR
float metalness = clamp(u_metallicFactor, 0.0, 1.0);
#else
float metalness = 1.0;
#endif
#ifdef HAS_ROUGHNESS_FACTOR
float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
#else
float roughness = 1.0;
#endif
#endif
const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
material.specular = f0;
material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
material.roughness = roughness;
return metalness;
}
#ifdef USE_SPECULAR
void setSpecular(inout czm_modelMaterial material, in float metalness)
{
#ifdef HAS_SPECULAR_TEXTURE
vec2 specularTexCoords = TEXCOORD_SPECULAR;
#ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
specularTexCoords = czm_computeTextureTransform(specularTexCoords, u_specularTextureTransform);
#endif
float specularWeight = texture(u_specularTexture, specularTexCoords).a;
#ifdef HAS_SPECULAR_FACTOR
specularWeight *= u_specularFactor;
#endif
#else
#ifdef HAS_SPECULAR_FACTOR
float specularWeight = u_specularFactor;
#else
float specularWeight = 1.0;
#endif
#endif
#ifdef HAS_SPECULAR_COLOR_TEXTURE
vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
#ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
specularColorTexCoords = czm_computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
#endif
vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
#ifdef HAS_SPECULAR_COLOR_FACTOR
specularColorFactor *= u_specularColorFactor;
#endif
#else
#ifdef HAS_SPECULAR_COLOR_FACTOR
vec3 specularColorFactor = u_specularColorFactor;
#else
vec3 specularColorFactor = vec3(1.0);
#endif
#endif
material.specularWeight = specularWeight;
vec3 f0 = material.specular;
vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
}
#endif
#ifdef USE_ANISOTROPY
void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
{
mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
float anisotropyStrength = u_anisotropy.z;
vec2 direction = vec2(1.0, 0.0);
#ifdef HAS_ANISOTROPY_TEXTURE
vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
#ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
anisotropyTexCoords = czm_computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
#endif
vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
direction = anisotropySample.rg * 2.0 - vec2(1.0);
anisotropyStrength *= anisotropySample.b;
#endif
direction = rotation * direction;
mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
material.anisotropicT = anisotropicT;
material.anisotropicB = anisotropicB;
material.anisotropyStrength = anisotropyStrength;
}
#endif
#ifdef USE_CLEARCOAT
void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
{
#ifdef HAS_CLEARCOAT_TEXTURE
vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
#ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
clearcoatTexCoords = czm_computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
#endif
float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
#ifdef HAS_CLEARCOAT_FACTOR
clearcoatFactor *= u_clearcoatFactor;
#endif
#else
#ifdef HAS_CLEARCOAT_FACTOR
float clearcoatFactor = u_clearcoatFactor;
#else
float clearcoatFactor = 0.0;
#endif
#endif
#ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
#ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
clearcoatRoughnessTexCoords = czm_computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
#endif
float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
#ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
clearcoatRoughness *= u_clearcoatRoughnessFactor;
#endif
#else
#ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
float clearcoatRoughness = u_clearcoatRoughnessFactor;
#else
float clearcoatRoughness = 0.0;
#endif
#endif
material.clearcoatFactor = clearcoatFactor;
material.clearcoatRoughness = clearcoatRoughness;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
#else
material.clearcoatNormal = attributes.normalEC;
#endif
}
#endif
#endif
void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
{
#ifdef USE_ANISOTROPY
NormalInfo normalInfo = getNormalInfo(attributes);
material.normalEC = normalInfo.normal;
#elif defined(HAS_NORMALS)
material.normalEC = computeNormal(attributes);
#endif
vec4 baseColorWithAlpha = vec4(1.0);
#ifdef HAS_BACKGROUND_FILL
baseColorWithAlpha = czm_srgbToLinear(czm_backgroundColor);
#elif defined(HAS_BASE_COLOR_TEXTURE)
baseColorWithAlpha = getBaseColorFromTexture();
#elif defined(HAS_BASE_COLOR_FACTOR)
baseColorWithAlpha = u_baseColorFactor;
#endif
#ifdef HAS_IMAGERY
baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
#endif // HAS_IMAGERY
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
baseColorWithAlpha = v_pointCloudColor;
#elif defined(HAS_COLOR_0)
vec4 color = attributes.color_0;
#ifdef HAS_SRGB_COLOR
color = czm_srgbToLinear(color);
#endif
baseColorWithAlpha *= color;
#endif
#ifdef USE_CPU_STYLING
baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
#endif
material.baseColor = baseColorWithAlpha;
material.diffuse = baseColorWithAlpha.rgb;
material.alpha = baseColorWithAlpha.a;
#ifdef HAS_OCCLUSION_TEXTURE
vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
#ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
occlusionTexCoords = czm_computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
#endif
material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
#endif
#ifdef HAS_EMISSIVE_TEXTURE
material.emissive = getEmissiveFromTexture();
#elif defined(HAS_EMISSIVE_FACTOR)
material.emissive = u_emissiveFactor;
#endif
#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
setSpecularGlossiness(material);
#elif defined(LIGHTING_PBR)
float metalness = setMetallicRoughness(material);
#ifdef USE_SPECULAR
setSpecular(material, metalness);
#endif
#ifdef USE_ANISOTROPY
setAnisotropy(material, normalInfo);
#endif
#ifdef USE_CLEARCOAT
setClearcoat(material, attributes);
#endif
#endif
}
`;var FF=`#ifdef HAS_CONSTANT_LOD
float modelScaleX = length(czm_model[0].xyz);
float modelScaleY = length(czm_model[1].xyz);
float modelScaleZ = length(czm_model[2].xyz);
float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;
vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;
v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;
v_constantLodUvCustom.z = u_constantLodDistance / modelScale;
#endif
`;var BF=`#ifdef HAS_CONSTANT_LOD
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
bool atClampBoundary = atMaxClamp || atMinClamp;
float effectiveDistance = atMaxClamp ? constantLodParams.y :
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
float logDepth = log2(effectiveDistance);
logDepth = clamp(logDepth, -10.0, 20.0);
float f = fract(logDepth);
float p = floor(logDepth);
if (atClampBoundary) {
float clampedP = ceil(logDepth);
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
return texture(textureSampler, tc);
}
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
}
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
bool atClampBoundary = atMaxClamp || atMinClamp;
float effectiveDistance = atMaxClamp ? constantLodParams.y :
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
float logDepth = log2(effectiveDistance);
logDepth = clamp(logDepth, -10.0, 20.0);
float f = fract(logDepth);
float p = floor(logDepth);
if (atClampBoundary) {
float clampedP = ceil(logDepth);
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
tc = czm_computeTextureTransform(tc, textureTransform);
return texture(textureSampler, tc);
}
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
tc1 = czm_computeTextureTransform(tc1, textureTransform);
tc2 = czm_computeTextureTransform(tc2, textureTransform);
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
}
#endif
`;var{Material:brt,MetallicRoughness:hZ,SpecularGlossiness:mZ,Specular:bAe,Clearcoat:xAe}=Cn,TAe={name:"MaterialPipelineStage",_processTexture:Yu,_processTextureTransform:EAe};TAe.process=function(e,t,n){let i=t.material,{model:r,uniformMap:o,shaderBuilder:s}=e;l(o.u_constantLodDistance)||(o.u_constantLodDistance=function(){let x=r.boundingSphere,T=n.camera;if(l(x)&&l(T)){let E=h.distance(T.positionWC,x.center);return Math.max(E,.1)}return 1});let a=l(r.classificationType),c=a,{defaultTexture:u,defaultNormalTexture:f,defaultEmissiveTexture:d}=n.context;vrt(i,o,s,u,f,d,c,e),l(i.specularGlossiness)?Srt(i.specularGlossiness,o,s,u,c,e):(l(i.specular)&&xt.supportedExtensions.KHR_materials_specular&&wrt(i.specular,o,s,u,c),l(i.anisotropy)&&xt.supportedExtensions.KHR_materials_anisotropy&&Prt(i.anisotropy,o,s,u,c),l(i.clearcoat)&&xt.supportedExtensions.KHR_materials_clearcoat&&Drt(i.clearcoat,o,s,u,c),Rrt(i.metallicRoughness,o,s,u,c,e));let p=xt.getAttributeBySemantic(t,ct.NORMAL),g=l(r.pointCloudShading)&&!r.pointCloudShading.normalShading;l(i.planarFill)&&xrt(i.planarFill,t,e,n);let m=l(i.planarFill)&&i.planarFill.backgroundFill,y=e.lightingOptions;i.unlit||!p||a||g||m?y.lightingModel=Jp.UNLIT:y.lightingModel=Jp.PBR;let A=r.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=A;let b=e.alphaOptions;i.alphaMode===Gp.BLEND?b.pass=Ie.TRANSLUCENT:i.alphaMode===Gp.MASK&&(b.alphaCutoff=i.alphaCutoff),l(i.pointDiameter)&&(s.addDefine("HAS_POINT_DIAMETER",void 0,de.BOTH),s.addUniform("float","u_pointDiameter",de.VERTEX),o.u_pointDiameter=function(){return i.pointDiameter*n.pixelRatio}),l(i.lineStyle)&&Ert(i.lineStyle,t,n,o,s),s.addFragmentLines(LF),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,de.BOTH)};function xrt(e,t,n,i){let{uniformMap:r,shaderBuilder:o}=n;if(i.planarFillRequested=!0,o.addDefine("HAS_PLANAR_FILL_DEPTH",void 0,de.FRAGMENT),e.backgroundFill&&o.addDefine("HAS_BACKGROUND_FILL",void 0,de.FRAGMENT),!(l(t.featureIds)&&t.featureIds.length>0))return;let a=t.featureIds[0].positionalLabel;o.addDefine("PLANAR_FILL_FEATURE_ID",a,de.FRAGMENT),e.behind?o.addDefine("HAS_PLANAR_FILL_BEHIND",void 0,de.FRAGMENT):(n.planarFillIdPass=!0,o.addDefine("HAS_PLANAR_FILL_ID_PASS",void 0,de.FRAGMENT),o.addUniform("bool","u_isPlanarFillIdPass",de.FRAGMENT),r.u_isPlanarFillIdPass=function(){return!1})}function Trt(e,t,n,i,r,o){let s=n.constantLod;if(!l(s)||!l(o))return;let a=`HAS_${r}_CONSTANT_LOD`;if(e.addDefine(a,void 0,de.BOTH),!l(t.u_constantLodOffset)){e.addDefine("HAS_CONSTANT_LOD",void 0,de.BOTH),e.addVarying("vec3","v_constantLodUvCustom"),e.addUniform("vec2","u_constantLodOffset",de.VERTEX),e.addUniform("float","u_constantLodDistance",de.VERTEX),e.addUniform("mat4","u_constantLodWorldToEnu",de.VERTEX),e.addFragmentLines(BF);let u=FF.split(`
`).filter(f=>!f.trim().startsWith("//")||f.includes("#"));e.addFunctionLines("setDynamicVaryingsVS",u)}let c=`${i}ConstantLodParams`;if(e.addUniform("vec3",c,de.FRAGMENT),t[c]=function(){return new h(s.minClampDistance,s.maxClampDistance,s.repetitions)},!l(t.u_constantLodOffset)){t.u_constantLodOffset=function(){return s.offset};let u=N.clone(N.IDENTITY),f=!1;t.u_constantLodWorldToEnu=function(){if(!f){let d=o.model.boundingSphere;if(l(d)){let p=d.center,g=At.eastNorthUpToFixedFrame(p);N.inverse(g,u),f=!0}}return f?u:N.IDENTITY}}}function Ert(e,t,n,i,r){let{width:o,pattern:s}=e;l(o)&&(r.addUniform("float","u_lineWidth",de.VERTEX),i.u_lineWidth=function(){return o*n.pixelRatio}),l(s)&&(r.addDefine("HAS_LINE_PATTERN",void 0,de.BOTH),r.addUniform("float","u_linePattern",de.FRAGMENT),r.addVarying("float","v_lineCoord"),i.u_linePattern=function(){return s});let a=xt.getAttributeBySemantic(t,ct.CUMULATIVE_DISTANCE);if(l(s)&&l(a)&&(t.primitiveType===Oe.LINES||t.primitiveType===Oe.TRIANGLE_STRIP)){r.addDefine("HAS_LINE_CUMULATIVE_DISTANCE",void 0,de.VERTEX),a.normalized&&r.addDefine("LINE_CUM_DIST_NORMALIZED",void 0,de.VERTEX),r.addUniform("float","u_cumulativeDistanceMax",de.VERTEX),r.addUniform("float","u_pixelsPerWorld",de.VERTEX);let c=l(a.max)?a.max:1;i.u_cumulativeDistanceMax=function(){return c},i.u_pixelsPerWorld=function(){let f=n.camera.frustum,d=1,p;return l(f.right)&&l(f.left)?p=f.right-f.left:l(f.width)&&(p=f.width),l(p)&&p>0&&(d=n.context.drawingBufferWidth/p),d};let u=xt.getAttributeInfo(a).variableName;r.addVertexLines(`
#ifdef HAS_LINE_CUMULATIVE_DISTANCE
void lineStyleStageVS(in ProcessedAttributes attributes)
{
float cumDist = attributes.${u};
#ifdef LINE_CUM_DIST_NORMALIZED
cumDist *= u_cumulativeDistanceMax;
#endif
const float textureCoordinateBase = 8192.0;
v_lineCoord = textureCoordinateBase + cumDist * u_pixelsPerWorld;
}
#endif
`)}else l(s)&&r.addVertexLines(`
#ifdef HAS_LINE_PATTERN
void lineStyleStageVS(in ProcessedAttributes attributes)
{
vec4 posClip = gl_Position;
vec2 screenPos = ((posClip.xy / posClip.w) * 0.5 + 0.5) * czm_viewport.zw;
const float textureCoordinateBase = 8192.0;
if (czm_viewport.z > czm_viewport.w) {
v_lineCoord = textureCoordinateBase + screenPos.x;
} else {
v_lineCoord = textureCoordinateBase + screenPos.y;
}
}
#endif
`)}function EAe(e,t,n,i,r){let o=`HAS_${r}_TEXTURE_TRANSFORM`;e.addDefine(o,void 0,de.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,de.FRAGMENT),t[s]=function(){return n.transform}}function Crt(e,t,n,i,r){let o=`HAS_${r}_TEXTURE_SCALE`;e.addDefine(o,void 0,de.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,de.FRAGMENT),t[s]=function(){return n.scale}}function Yu(e,t,n,i,r,o,s){e.addUniform("sampler2D",i,de.FRAGMENT),t[i]=function(){return n.texture??o};let a=`HAS_${r}_TEXTURE`;e.addDefine(a,void 0,de.FRAGMENT);let u=`v_texCoord_${n.texCoord}`,f=`TEXCOORD_${r}`;e.addDefine(f,u,de.FRAGMENT);let d=n.transform;l(d)&&!$.equals(d,$.IDENTITY)&&EAe(e,t,n,i,r);let{scale:p}=n;l(p)&&p!==1&&Crt(e,t,n,i,r),Trt(e,t,n,i,r,s)}function vrt(e,t,n,i,r,o,s,a){let{emissiveFactor:c,emissiveTexture:u,normalTexture:f,occlusionTexture:d}=e;l(c)&&!h.equals(c,brt.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",de.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,de.FRAGMENT),l(u)&&!s&&Yu(n,t,u,"u_emissiveTexture","EMISSIVE",o));let p;if(l(e.metallicRoughness)&&l(e.metallicRoughness.baseColorTexture)&&l(e.metallicRoughness.baseColorTexture.constantLod)?p=e.metallicRoughness.baseColorTexture.constantLod:l(e.specularGlossiness)&&l(e.specularGlossiness.diffuseTexture)&&l(e.specularGlossiness.diffuseTexture.constantLod)&&(p=e.specularGlossiness.diffuseTexture.constantLod),l(f)&&!s){let g=f;l(f.constantLod)&&l(p)&&(g=Object.create(Object.getPrototypeOf(f)),Object.assign(g,f),g.constantLod=p),Yu(n,t,g,"u_normalTexture","NORMAL",r,a)}l(d)&&!s&&Yu(n,t,d,"u_occlusionTexture","OCCLUSION",i)}function Srt(e,t,n,i,r,o){let{diffuseTexture:s,diffuseFactor:a,specularGlossinessTexture:c,specularFactor:u,glossinessFactor:f}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,de.FRAGMENT),l(s)&&!r&&Yu(n,t,s,"u_diffuseTexture","DIFFUSE",i,o),l(a)&&!se.equals(a,mZ.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",de.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,de.FRAGMENT)),l(c)&&!r&&Yu(n,t,c,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(u)&&!h.equals(u,mZ.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",de.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,de.FRAGMENT)),l(f)&&f!==mZ.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",de.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,de.FRAGMENT))}function wrt(e,t,n,i,r){let{specularTexture:o,specularFactor:s,specularColorTexture:a,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,de.FRAGMENT),l(o)&&!r&&Yu(n,t,o,"u_specularTexture","SPECULAR",i),l(s)&&s!==bAe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",de.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,de.FRAGMENT)),l(a)&&!r&&Yu(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!h.equals(c,bAe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",de.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,de.FRAGMENT))}var Irt=new h;function Prt(e,t,n,i,r){let{anisotropyStrength:o,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,de.FRAGMENT),l(a)&&!r&&Yu(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(s),u=Math.sin(s);n.addUniform("vec3","u_anisotropy",de.FRAGMENT),t.u_anisotropy=function(){return h.fromElements(c,u,o,Irt)}}function Drt(e,t,n,i,r){let{clearcoatFactor:o,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:c,clearcoatNormalTexture:u}=e;n.addDefine("USE_CLEARCOAT",void 0,de.FRAGMENT),l(o)&&o!==xAe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",de.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,de.FRAGMENT)),l(s)&&!r&&Yu(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),l(a)&&o!==xAe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",de.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,de.FRAGMENT)),l(c)&&!r&&Yu(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(u)&&!r&&Yu(n,t,u,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function Rrt(e,t,n,i,r,o){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,de.FRAGMENT);let s=e.baseColorTexture;l(s)&&!r&&Yu(n,t,s,"u_baseColorTexture","BASE_COLOR",i,o);let a=e.baseColorFactor;l(a)&&!se.equals(a,hZ.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",de.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,de.FRAGMENT));let c=e.metallicRoughnessTexture;l(c)&&!r&&Yu(n,t,c,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let u=e.metallicFactor;l(u)&&u!==hZ.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",de.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,de.FRAGMENT));let f=e.roughnessFactor;l(f)&&f!==hZ.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",de.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,de.FRAGMENT))}var kF=TAe;var ru={name:"MetadataPickingPipelineStage",METADATA_PICKING_ENABLED:"METADATA_PICKING_ENABLED",METADATA_PICKING_VALUE_TYPE:"METADATA_PICKING_VALUE_TYPE",METADATA_PICKING_VALUE_STRING:"METADATA_PICKING_VALUE_STRING",METADATA_PICKING_VALUE_COMPONENT_X:"METADATA_PICKING_VALUE_COMPONENT_X",METADATA_PICKING_VALUE_COMPONENT_Y:"METADATA_PICKING_VALUE_COMPONENT_Y",METADATA_PICKING_VALUE_COMPONENT_Z:"METADATA_PICKING_VALUE_COMPONENT_Z",METADATA_PICKING_VALUE_COMPONENT_W:"METADATA_PICKING_VALUE_COMPONENT_W"};ru.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(ru.METADATA_PICKING_VALUE_TYPE,"float",de.FRAGMENT),i.addDefine(ru.METADATA_PICKING_VALUE_STRING,"0.0",de.FRAGMENT),i.addDefine(ru.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",de.FRAGMENT),i.addDefine(ru.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",de.FRAGMENT),i.addDefine(ru.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",de.FRAGMENT),i.addDefine(ru.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",de.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",de.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${ru.METADATA_PICKING_VALUE_TYPE} value = ${ru.METADATA_PICKING_VALUE_TYPE}(${ru.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${ru.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${ru.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${ru.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${ru.METADATA_PICKING_VALUE_COMPONENT_W};`],de.FRAGMENT)};var Vf=ru;var UF=`void morphTargetsStage(inout ProcessedAttributes attributes)
{
vec3 positionMC = attributes.positionMC;
attributes.positionMC = getMorphedPosition(positionMC);
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = getMorphedNormal(normalMC);
#endif
#ifdef HAS_TANGENTS
vec3 tangentMC = attributes.tangentMC;
attributes.tangentMC = getMorphedTangent(tangentMC);
#endif
}
`;var Fc={name:"MorphTargetsPipelineStage",FUNCTION_ID_GET_MORPHED_POSITION:"getMorphedPosition",FUNCTION_SIGNATURE_GET_MORPHED_POSITION:"vec3 getMorphedPosition(in vec3 position)",FUNCTION_ID_GET_MORPHED_NORMAL:"getMorphedNormal",FUNCTION_SIGNATURE_GET_MORPHED_NORMAL:"vec3 getMorphedNormal(in vec3 normal)",FUNCTION_ID_GET_MORPHED_TANGENT:"getMorphedTangent",FUNCTION_SIGNATURE_GET_MORPHED_TANGENT:"vec3 getMorphedTangent(in vec3 tangent)"};Fc.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,de.VERTEX),Brt(n);let i=t.morphTargets.length;for(let a=0;a<i;a++){let c=t.morphTargets[a].attributes,u=c.length;for(let f=0;f<u;f++){let d=c[f],p=d.semantic;p!==ct.POSITION&&p!==ct.NORMAL&&p!==ct.TANGENT||(Mrt(e,d,e.attributeIndex,a),e.attributeIndex++)}}krt(n);let o=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${o}]`,de.VERTEX),n.addVertexLines(UF);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=Ot(s,e.uniformMap)};var Ort={attributeString:void 0,functionId:void 0};function Mrt(e,t,n,i){let r=e.shaderBuilder;Nrt(e,t,n);let o=Lrt(t,Ort);Frt(r,o,i)}function Nrt(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Vt.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function Lrt(e,t){switch(e.semantic){case ct.POSITION:t.attributeString="Position",t.functionId=Fc.FUNCTION_ID_GET_MORPHED_POSITION;break;case ct.NORMAL:t.attributeString="Normal",t.functionId=Fc.FUNCTION_ID_GET_MORPHED_NORMAL;break;case ct.TANGENT:t.attributeString="Tangent",t.functionId=Fc.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function Frt(e,t,n){let i=t.attributeString,r=`a_target${i}_${n}`,o=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",r),e.addFunctionLines(t.functionId,[o])}function Brt(e){e.addFunction(Fc.FUNCTION_ID_GET_MORPHED_POSITION,Fc.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,de.VERTEX),e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(Fc.FUNCTION_ID_GET_MORPHED_NORMAL,Fc.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,de.VERTEX),e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(Fc.FUNCTION_ID_GET_MORPHED_TANGENT,Fc.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,de.VERTEX),e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function krt(e){e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(Fc.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var zF=Fc;var CAe={name:"PickingPipelineStage"};function pZ(e){return`vec4(rgba8UnormToUint32(${e}), isEdge ? 1.0 : 0.0, -v_positionEC.z, 0.0)`}CAe.process=function(e,t,n){let i=n.context,r=e.runtimeNode,o=e.shaderBuilder,s=e.model,a=r.node.instances;if(e.hasPropertyTable)Urt(e,t,a,i);else if(l(a))zrt(e,i);else{let c=vAe(e),u=i.createPickId(c);s._pipelineResources.push(u),s._pickIds.push(u),o.addUniform("vec4","czm_pickColor",de.FRAGMENT);let f=e.uniformMap;f.czm_pickColor=function(){return u.color},e.pickId="czm_pickColor",e.snapId=pZ(e.pickId)}!l(s.classificationType)&&s.hasDrapedVectors()&&(e.pickId=`vectorPickColorOver(${e.pickId})`)};function vAe(e,t){let n=e.model;if(l(n.pickObject))return n.pickObject;let i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},r;if(Wo.is3DTiles(n.type)){let o=n.content;r={content:o,primitive:o.tileset,detail:i}}else r={primitive:n,detail:i};return r.id=n.id,l(t)&&(r.instanceId=t),r}function Urt(e,t,n){let i=e.model,r,o,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;l(i.featureTableId)?r=i.featureTableId:l(n)?(o=xt.getFeatureIdsByLabel(n.featureIds,a),r=o.propertyTableId):(o=xt.getFeatureIdsByLabel(t.featureIds,s),r=o.propertyTableId);let c=i.featureTables[r];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",de.FRAGMENT);let f=c.batchTexture;e.uniformMap.model_pickTexture=function(){return f.pickTexture??f.defaultTexture},e.pickId="((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))",e.snapId=pZ(e.pickId)}function zrt(e,t){let n=e.instanceCount,i=new Array(n),r=new Uint8Array(n*4),o=e.model,s=o._pipelineResources;for(let d=0;d<n;d++){let p=vAe(e,d),g=t.createPickId(p);s.push(g),i[d]=g;let m=g.color;r[d*4+0]=z.floatToByte(m.red),r[d*4+1]=z.floatToByte(m.green),r[d*4+2]=z.floatToByte(m.blue),r[d*4+3]=z.floatToByte(m.alpha)}o._pickIds=i;let a=nt.createVertexBuffer({context:t,typedArray:r,usage:Me.STATIC_DRAW});a.vertexArrayDestroyable=!1,o.statistics.addBuffer(a,!1),s.push(a);let u={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(u);let f=e.shaderBuilder;f.addDefine("USE_PICKING",void 0,de.BOTH),f.addAttribute("vec4","a_pickColor"),f.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor",e.snapId=pZ(e.pickId)}var VF=CAe;var SAe={ADD:0,REPLACE:1};Object.freeze(SAe);var yo=SAe;var jF=`float getPointSizeFromAttenuation(vec3 positionEC) {
float pointSize = model_pointCloudParameters.x;
float geometricError = model_pointCloudParameters.y;
float depthMultiplier = model_pointCloudParameters.z;
float depth = -positionEC.z;
return min((geometricError / depth) * depthMultiplier, pointSize);
}
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
}
#endif
#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#elif defined(HAS_POINT_CLOUD_ATTENUATION)
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
return getPointSizeFromAttenuation(v_positionEC);
}
#endif
#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
float pointCloudBackFaceCullingStage() {
#if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
return step(-v_normalEC.z, 0.0);
#else
return 1.0;
#endif
}
#endif
`;var Vrt=new se,IAe={name:"PointCloudStylingPipelineStage"};IAe.process=function(e,t,n){let i=e.shaderBuilder,r=e.model,o=r.style,s=r.structuralMetadata,a=l(s)?s.propertyAttributes:void 0,c=l(r.featureTableId)&&r.featureTables[r.featureTableId].featuresLength>0,u=!l(a)&&c;if(l(o)&&!u){let y=Wrt(a),A=qrt(o,y);Yrt(i,A);let x=Xrt(A).indexOf("normalMC")>=0,T=xt.getAttributeBySemantic(t,ct.NORMAL);if(x&&!T)throw new oe("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,de.VERTEX),A.styleTranslucent&&(e.alphaOptions.pass=Ie.TRANSLUCENT)}let f=r.pointCloudShading;f.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,de.VERTEX),f.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,de.VERTEX);let d,p,g;Wo.is3DTiles(r.type)&&(p=!0,d=r.content,g=d.tile.refine===yo.ADD),i.addUniform("vec4","model_pointCloudParameters",de.VERTEX),i.addVertexLines(jF);let m=e.uniformMap;m.model_pointCloudParameters=function(){let y=Vrt,A=1;p&&(A=g?5:d.tileset.memoryAdjustedScreenSpaceError),y.x=f.maximumAttenuation??A,y.x*=n.pixelRatio;let b=jrt(e,t,f,d);y.y=b*f.geometricErrorScale;let x=n.context,T=n.camera.frustum,E;return n.mode===re.SCENE2D||T instanceof gn?E=Number.POSITIVE_INFINITY:E=x.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=E,p&&(y.w=d.tileset.timeSinceLoad),y}};var wAe=new h;function jrt(e,t,n,i){if(l(i)){let f=i.tile.geometricError;if(f>0)return f}if(l(n.baseResolution))return n.baseResolution;let r=xt.getAttributeBySemantic(t,ct.POSITION),o=r.count,s=e.runtimeNode.transform,a=h.subtract(r.max,r.min,wAe);a=N.multiplyByPointAsVector(s,a,wAe);let c=a.x*a.y*a.z;return D.cbrt(c/o)}var Hrt={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},Grt={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function Wrt(e){let t=Je(Grt);if(!l(e))return t;for(let n=0;n<e.length;n++){let r=e[n].properties;for(let o in r)r.hasOwnProperty(o)&&(t[o]=`metadata.${o}`)}return t}var gZ="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function qrt(e,t){let n=Hrt,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${gZ})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${gZ})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${gZ})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function Yrt(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,de.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,de.BOTH),e.addVertexLines(i),e.addVarying("float","v_pointCloudShow"));let r=t.pointSizeStyleFunction;l(r)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,de.VERTEX),e.addVertexLines(r))}function _Z(e,t){let n=/attributes\.(\w+)/g,i=n.exec(e);for(;i!==null;){let r=i[1];t.indexOf(r)===-1&&t.push(r),i=n.exec(e)}}function Xrt(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,r=[];return l(t)&&_Z(t,r),l(n)&&_Z(n,r),l(i)&&_Z(i,r),r}var HF=IAe;var GF=`void primitiveOutlineStage() {
v_outlineCoordinates = a_outlineCoordinates;
}
`;var WF=`void primitiveOutlineStage(inout czm_modelMaterial material) {
if (!model_showOutline) {
return;
}
float outlineX =
texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
float outlineY =
texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
float outlineZ =
texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
float outlineness = max(outlineX, max(outlineY, outlineZ));
material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
}
`;var PAe={name:"PrimitiveOutlinePipelineStage"};PAe.process=function(e,t,n){let i=e.shaderBuilder,r=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,de.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let o=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:o.buffer,componentsPerAttribute:Vt.getNumberOfComponents(o.type),componentDatatype:o.componentDatatype,offsetInBytes:o.byteOffset,strideInBytes:o.byteStride,normalize:o.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",de.FRAGMENT);let a=fT.createTexture(n.context);r.model_outlineTexture=function(){return a};let c=e.model;i.addUniform("vec4","model_outlineColor",de.FRAGMENT),r.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",de.FRAGMENT),r.model_showOutline=function(){return c.showOutline},i.addVertexLines(GF),i.addFragmentLines(WF)};var qF=PAe;var DAe={name:"PrimitiveStatisticsPipelineStage",_countGeometry:RAe,_count2DPositions:OAe,_countMorphTargetAttributes:MAe,_countMaterialTextures:NAe,_countFeatureIdTextures:LAe,_countBinaryMetadata:FAe};DAe.process=function(e,t,n){let i=e.model,r=i.statistics;RAe(r,t),OAe(r,e.runtimePrimitive),MAe(r,t),NAe(r,t.material),LAe(r,t.featureIds),FAe(r,i)};function RAe(e,t){let n=l(t.indices)?t.indices.count:xt.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Oe.POINTS?e.pointsLength+=n:Oe.isTriangles(i)&&(e.trianglesLength+=Krt(i,n));let r=t.attributes,o=r.length;for(let c=0;c<o;c++){let u=r[c];if(l(u.buffer)){let f=l(u.typedArray);e.addBuffer(u.buffer,f)}}let s=t.outlineCoordinates;l(s)&&l(s.buffer)&&e.addBuffer(s.buffer,!1);let a=t.indices;if(l(a)&&l(a.buffer)){let c=l(a.typedArray);e.addBuffer(a.buffer,c)}}function Krt(e,t){switch(e){case Oe.TRIANGLES:return t/3;case Oe.TRIANGLE_STRIP:case Oe.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function OAe(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function MAe(e,t){let n=t.morphTargets;if(!l(n))return;let i=!1,r=n.length;for(let o=0;o<r;o++){let s=n[o].attributes,a=s.length;for(let c=0;c<a;c++){let u=s[c];l(u.buffer)&&e.addBuffer(u.buffer,i)}}}function NAe(e,t){let n=$rt(t),i=n.length;for(let r=0;r<i;r++){let o=n[r];l(o)&&l(o.texture)&&e.addTexture(o.texture)}}function $rt(e){let t=e.metallicRoughness,n=[e.emissiveTexture,e.normalTexture,e.occlusionTexture,t.baseColorTexture,t.metallicRoughnessTexture],i=e.specularGlossiness;return l(i)&&(n.push(i.diffuseTexture),n.push(i.specularGlossinessTexture)),n}function LAe(e,t){let n=t.length;for(let i=0;i<n;i++){let r=t[i];if(r instanceof Cn.FeatureIdTexture){let o=r.textureReader;l(o.texture)&&e.addTexture(o.texture)}}}function FAe(e,t){let n=t.structuralMetadata;l(n)&&(Jrt(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);let i=t.featureTables;if(!l(i))return;let r=i.length;for(let o=0;o<r;o++){let s=i[o];e.addBatchTexture(s.batchTexture)}}function Jrt(e,t){let n=t.propertyTextures;if(!l(n))return;let i=n.length;for(let r=0;r<i;r++){let s=n[r].properties;for(let a in s)if(s.hasOwnProperty(a)){let u=s[a].textureReader;l(u.texture)&&e.addTexture(u.texture)}}}var YF=DAe;var Zrt=new N,Qrt=new N,BAe={name:"SceneMode2DPipelineStage"};BAe.process=function(e,t,n){let i=xt.getAttributeBySemantic(t,ct.POSITION),r=e.shaderBuilder,o=e.model,s=o.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,c=N.multiplyTransformation(s,a,Zrt),u=not(e,c,n),f=e.runtimePrimitive;f.boundingSphere2D=u;let d=e.runtimeNode.node.instances;if(l(d))return;if(l(i.typedArray)){let y=oot(i,c,u,n);f.positionBuffer2D=y,o._modelResources.push(y),i.typedArray=void 0}r.addDefine("USE_2D_POSITIONS",void 0,de.VERTEX),r.addUniform("mat4","u_modelView2D",de.VERTEX);let p=N.fromTranslation(u.center,new N),g=n.context,m={u_modelView2D:function(){return N.multiplyTransformation(g.uniformState.view,p,Qrt)}};e.uniformMap=Ot(m,e.uniformMap)};var eot=new h,tot=new h;function not(e,t,n){let i=N.multiplyByPoint(t,e.positionMin,eot),r=dr.computeActualEllipsoidPosition(n,i,i),o=N.multiplyByPoint(t,e.positionMax,tot),s=dr.computeActualEllipsoidPosition(n,o,o);return ue.fromCornerPoints(r,s,new ue)}var kAe=new h;function iot(e,t){let n=e.length,i=new Float32Array(n),r=t.quantizedVolumeOffset,o=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){let a=h.fromArray(e,s,kAe),c=h.multiplyComponents(a,o,a),u=h.add(c,r,c);i[s]=u.x,i[s+1]=u.y,i[s+2]=u.z}return i}function rot(e,t,n,i){let r;l(e.quantization)?r=iot(e.typedArray,e.quantization):r=e.typedArray.slice();let o=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=r.length,a=l(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let c=o;c<s;c+=a){let u=h.fromArray(r,c,kAe);if(isNaN(u.x)||isNaN(u.y)||isNaN(u.z))continue;let f=N.multiplyByPoint(t,u,u),d=dr.computeActualEllipsoidPosition(i,f,f),p=h.subtract(d,n,d);r[c]=p.x,r[c+1]=p.y,r[c+2]=p.z}return r}function oot(e,t,n,i){let r=Je(i);r.mode=re.COLUMBUS_VIEW;let o=n.center,s=rot(e,t,o,r),a=nt.createVertexBuffer({context:i.context,typedArray:s,usage:Me.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var XF=BAe;var KF=`void skinningStage(inout ProcessedAttributes attributes)
{
mat4 skinningMatrix = getSkinningMatrix();
mat3 skinningMatrixMat3 = mat3(skinningMatrix);
vec4 positionMC = vec4(attributes.positionMC, 1.0);
attributes.positionMC = vec3(skinningMatrix * positionMC);
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = skinningMatrixMat3 * normalMC;
#endif
#ifdef HAS_TANGENTS
vec3 tangentMC = attributes.tangentMC;
attributes.tangentMC = skinningMatrixMat3 * tangentMC;
#endif
}
`;var AT={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};AT.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,de.VERTEX),aot(n,t);let i=e.runtimeNode,r=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${r.length}]`,de.VERTEX),n.addVertexLines(KF);let o={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=Ot(o,e.uniformMap)};function sot(e){let t=-1,n=e.attributes,i=n.length;for(let r=0;r<i;r++){let o=n[r];(o.semantic===ct.JOINTS||o.semantic===ct.WEIGHTS)&&(t=Math.max(t,o.setIndex))}return t}function aot(e,t){e.addFunction(AT.FUNCTION_ID_GET_SKINNING_MATRIX,AT.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,de.VERTEX),e.addFunctionLines(AT.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,r,o=["x","y","z","w"],s=sot(t);for(i=0;i<=s;i++)for(r=0;r<=3;r++){let c=o[r],u=`skinnedMatrix += a_weights_${i}.${c} * u_jointMatrices[int(a_joints_${i}.${c})];`;e.addFunctionLines(AT.FUNCTION_ID_GET_SKINNING_MATRIX,[u])}e.addFunctionLines(AT.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var $F=AT;var JF=`void verticalExaggerationStage(
inout ProcessedAttributes attributes
) {
vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
vec3 vertexEllipsoidNormalEC = normalize(centerToVertex);
float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexEllipsoidNormalEC);
float smallAngleVersine = 0.5 * sinTheta * sinTheta;
float versine = isSmallAngle ? smallAngleVersine : exactVersine;
float dHeight = dot(vertexPositionEC, vertexEllipsoidNormalEC) - eyeToCenter * versine;
float vertexHeight = czm_eyeHeight + dHeight;
vec3 exaggerationDirectionScaledMC = (czm_inverseModelView * vec4(vertexEllipsoidNormalEC, 0.0)).xyz;
float stretch = u_verticalExaggerationAndRelativeHeight.x;
float shift = u_verticalExaggerationAndRelativeHeight.y;
float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
attributes.positionMC += exaggeration * exaggerationDirectionScaledMC;
}
`;var UAe={name:"VerticalExaggerationPipelineStage"},cot=new U;UAe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:r}=e;i.addVertexLines(JF),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,de.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",de.VERTEX),r.u_verticalExaggerationAndRelativeHeight=function(){return U.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,cot)}};var ZF=UAe;var yZ={};function lot(e){let t=je.createTypedArray(e,e*2),n=e,i=0;for(let r=0;r<n;r+=3)t[i++]=r,t[i++]=r+1,t[i++]=r+1,t[i++]=r+2,t[i++]=r+2,t[i++]=r;return t}function uot(e,t){let n=t.length,i=je.createTypedArray(e,n*2),r=0;for(let o=0;o<n;o+=3){let s=t[o],a=t[o+1],c=t[o+2];i[r++]=s,i[r++]=a,i[r++]=a,i[r++]=c,i[r++]=c,i[r++]=s}return i}function fot(e){let t=e-2,n=2+t*4,i=je.createTypedArray(e,n),r=0;i[r++]=0,i[r++]=1;for(let o=0;o<t;o++)i[r++]=o+1,i[r++]=o+2,i[r++]=o+2,i[r++]=o;return i}function dot(e,t){let i=t.length-2,r=2+i*4,o=je.createTypedArray(e,r),s=0;o[s++]=t[0],o[s++]=t[1];for(let a=0;a<i;a++){let c=t[a],u=t[a+1],f=t[a+2];o[s++]=u,o[s++]=f,o[s++]=f,o[s++]=c}return o}function hot(e){let t=e-2,n=2+t*4,i=je.createTypedArray(e,n),r=0;i[r++]=0,i[r++]=1;for(let o=0;o<t;o++)i[r++]=o+1,i[r++]=o+2,i[r++]=o+2,i[r++]=0;return i}function mot(e,t){let i=t.length-2,r=2+i*4,o=je.createTypedArray(e,r),s=0,a=t[0];o[s++]=a,o[s++]=t[1];for(let c=0;c<i;c++){let u=t[c+1],f=t[c+2];o[s++]=u,o[s++]=f,o[s++]=f,o[s++]=a}return o}yZ.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Oe.TRIANGLES)return i?uot(t,n):lot(t);if(e===Oe.TRIANGLE_STRIP)return i?dot(t,n):fot(t);if(e===Oe.TRIANGLE_FAN)return i?mot(t,n):hot(t)};yZ.getWireframeIndicesCount=function(e,t){return e===Oe.TRIANGLES?t*2:e===Oe.TRIANGLE_STRIP||e===Oe.TRIANGLE_FAN?2+(t-2)*4:t};var $S=yZ;var zAe={name:"WireframePipelineStage"};zAe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,de.FRAGMENT);let r=e.model,o=pot(t,e.indices,n);r._pipelineResources.push(o),e.wireframeIndexBuffer=o,r.statistics.addBuffer(o,!1);let a=e.primitiveType,c=e.count;e.primitiveType=Oe.LINES,e.count=$S.getWireframeIndicesCount(a,c)};function pot(e,t,n){let r=xt.getAttributeBySemantic(e,ct.POSITION).count,o=n.context.webgl2,s;if(l(t)){let f=t.buffer,d=t.count;l(f)&&o?(s=f.sizeInBytes===d?new Uint8Array(d):je.createTypedArray(r,d),f.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,c=$S.createWireframeIndices(a,r,s),u=je.fromSizeInBytes(c.BYTES_PER_ELEMENT);return nt.createIndexBuffer({context:n.context,typedArray:c,usage:Me.STATIC_DRAW,indexDatatype:u})}var QF=zAe;function VAe(e){e=e??H.EMPTY_OBJECT;let t=e.primitive,n=e.node,i=e.model;this.primitive=t,this.node=n,this.model=i,this.pipelineStages=[],this.drawCommand=void 0,this.boundingSphere=void 0,this.boundingSphere2D=void 0,this.positionBuffer2D=void 0,this.batchLengths=void 0,this.batchOffsets=void 0,this.updateStages=[]}VAe.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,r=this.model,o=r.customShader,s=r.style,a=e.context.webgl2,u=e.mode!==re.SCENE3D&&!e.scene3DOnly&&r._projectTo2D,f=e.verticalExaggeration!==1&&r.hasVerticalExaggeration,d=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),g=l(r.imageryLayers)&&r.imageryLayers.length>0,m=l(o),A=!(m&&l(o.fragmentShaderText))||o.mode!==Kg.REPLACE_MATERIAL,b=xt.hasQuantizedAttributes(n.attributes),x=r.debugWireframe&&Oe.isTriangles(n.primitiveType)&&(r._enableDebugWireframe||a),T=r.pointCloudShading,E=l(T)&&T.attenuation,v=l(T)&&T.backFaceCulling,S=n.primitiveType===Oe.POINTS&&(l(s)||E||v),I=r._enableShowOutline&&l(n.outlineCoordinates),R=l(n.edgeVisibility),O=got(r,i,n),L=l(r.classificationType);u&&t.push(XF),t.push(hF),x&&t.push(QF),L&&t.push(qL),d&&t.push(zF),p&&t.push($F),S&&t.push(HF),b&&t.push(rF),g&&(I?_t("outlines-and-draping","Primitive outlines disable imagery draping"):t.push(OF)),A&&t.push(kF),t.push(xA),t.push(Gd),t.push(Vf),O.hasPropertyTable&&(t.push(EA),t.push(WL),t.push(KL)),f&&t.push(ZF),m&&t.push(nF),t.push(NF),r.allowPicking&&t.push(VF),I&&t.push(qF),R&&(e.edgeVisibilityRequested=!0,t.push(lF),t.push(sF)),t.push(GL),t.push(YF)};function got(e,t,n){let i;return l(t.instances)&&(i=xt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=xt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var eB=VAe;function AZ(e){e=e??H.EMPTY_OBJECT,this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],_ot(this)}Object.defineProperties(AZ.prototype,{skin:{get:function(){return this._skin}},sceneGraph:{get:function(){return this._sceneGraph}},inverseBindMatrices:{get:function(){return this._inverseBindMatrices}},joints:{get:function(){return this._joints}},jointMatrices:{get:function(){return this._jointMatrices}}});function _ot(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,r=i.length,o=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c<r;c++){let u=i[c].index,f=o[u];s.push(f);let d=n[c],p=jAe(f,d,new N);a.push(p)}}function jAe(e,t,n){let i=N.multiplyTransformation(e.transformToRoot,e.transform,n);return n=N.multiplyTransformation(i,t,n),n}AZ.prototype.updateJointMatrices=function(){let e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++){let i=this.joints[n],r=this.inverseBindMatrices[n];e[n]=jAe(i,r,e[n])}};var tB=AZ;function yot(){this.pass=void 0,this.alphaCutoff=void 0}var bT=yot;function bZ(e){this.name=e,this.fields=[]}bZ.prototype.addField=function(e,t){let n=` ${e} ${t};`;this.fields.push(n)};bZ.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var nB=bZ;function xZ(e){this.signature=e,this.body=[]}xZ.prototype.addLines=function(e){let t=this.body;if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;i++)t.push(` ${e[i]}`)}else t.push(` ${e}`)};xZ.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var iB=xZ;function ou(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(ou.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});ou.prototype.addDefine=function(e,t,n){n=n??de.BOTH;let i=e;l(t)&&(i+=` ${t.toString()}`),de.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),de.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};ou.prototype.addStruct=function(e,t,n){this._structs[e]=new nB(t),de.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),de.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};ou.prototype.addStructField=function(e,t,n){this._structs[e].addField(t,n)};ou.prototype.addFunction=function(e,t,n){this._functions[e]=new iB(t),de.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),de.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};ou.prototype.addFunctionLines=function(e,t){this._functions[e].addLines(t)};ou.prototype.addUniform=function(e,t,n){n=n??de.BOTH;let i=`uniform ${e} ${t};`;de.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),de.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};ou.prototype.setPositionAttribute=function(e,t){return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};ou.prototype.addAttribute=function(e,t){let n=`in ${e} ${t};`;this._attributeLines.push(n);let i=this._nextAttributeLocation;return this._attributeLocations[t]=i,this._nextAttributeLocation+=bot(e),i};ou.prototype.addVarying=function(e,t,n){n=l(n)?`${n} `:"";let i=`${e} ${t};`;this._vertexShaderParts.varyingLines.push(`${n}out ${i}`),this._fragmentShaderParts.varyingLines.push(`${n}in ${i}`)};ou.prototype.addVertexLines=function(e){let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?ti(t,e):t.push(e)};ou.prototype.addFragmentLines=function(e){let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?ti(t,e):t.push(e)};ou.prototype.buildShaderProgram=function(e){let t=l(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=Aot(this),i=xot(this),r=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
`),o=new Ye({defines:this._vertexShaderParts.defineLines,sources:[r]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
`),a=new Ye({defines:this._fragmentShaderParts.defineLines,sources:[s]});return en.fromCache({context:e,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:this._attributeLocations})};ou.prototype.clone=function(){return Je(this,!0)};function Aot(e){let t=[],n=[],i,r=e._vertexShaderParts.structIds,o,s,a;for(i=0;i<r.length;i++)o=r[i],s=e._structs[o],a=s.generateGlslLines(),ti(t,a);for(r=e._fragmentShaderParts.structIds,i=0;i<r.length;i++)o=r[i],s=e._structs[o],a=s.generateGlslLines(),ti(n,a);return{vertexLines:t,fragmentLines:n}}function bot(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function xot(e){let t=[],n=[],i,r=e._vertexShaderParts.functionIds,o,s,a;for(i=0;i<r.length;i++)o=r[i],s=e._functions[o],a=s.generateGlslLines(),ti(t,a);for(r=e._fragmentShaderParts.functionIds,i=0;i<r.length;i++)o=r[i],s=e._functions[o],a=s.generateGlslLines(),ti(n,a);return{vertexLines:t,fragmentLines:n}}var e_=ou;function Tot(e){this.shaderBuilder=new e_,this.model=e,this.uniformMap={},this.alphaOptions=new bT,this.renderStateOptions=Ge.getState(Ge.fromCache({depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var rB=Tot;var oB=`void silhouetteStage(inout vec4 color) {
if(model_silhouettePass) {
color = czm_gammaCorrect(model_silhouetteColor);
}
}
`;var sB=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
#ifdef HAS_NORMALS
if(model_silhouettePass) {
vec3 normal = normalize(czm_normal3D * attributes.normalMC);
normal.x *= czm_projection[0][0];
normal.y *= czm_projection[1][1];
positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
}
#endif
}
`;var IH={name:"ModelSilhouettePipelineStage"};IH.silhouettesLength=0;IH.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++IH.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,de.BOTH),i.addVertexLines(sB),i.addFragmentLines(oB),i.addUniform("vec4","model_silhouetteColor",de.FRAGMENT),i.addUniform("float","model_silhouetteSize",de.VERTEX),i.addUniform("bool","model_silhouettePass",de.BOTH);let r={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=Ot(r,e.uniformMap),e.hasSilhouette=!0};var aB=IH;var cB=`void modelSplitterStage()
{
#ifndef SHADOW_MAP
if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
#endif
}
`;var PH={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};PH.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,de.FRAGMENT),i.addFragmentLines(cB);let r={};i.addUniform("float",PH.SPLIT_DIRECTION_UNIFORM_NAME,de.FRAGMENT),r[PH.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Ot(r,e.uniformMap)};var lB=PH;function Eot(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=Je(e.uniformMap),this.alphaOptions=Je(e.alphaOptions),this.renderStateOptions=Je(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.runtimeNode=t,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0,this.primitiveRenderResources=[]}var uB=Eot;function Cot(e){e=e??H.EMPTY_OBJECT,this.lightingModel=e.lightingModel??Jp.UNLIT}var fB=Cot;function vot(e,t){this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.uniformMap=Je(e.uniformMap),this.alphaOptions=Je(e.alphaOptions),this.renderStateOptions=Je(e.renderStateOptions,!0),this.hasSilhouette=e.hasSilhouette,this.hasSkipLevelOfDetail=e.hasSkipLevelOfDetail,this.planarFillIdPass=!1,this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=l(n.indices)?n.indices.count:xt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=xt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=h.clone(i.min,new h),this.positionMax=h.clone(i.max,new h),this.boundingSphere=ue.fromCornerPoints(this.positionMin,this.positionMax,new ue),this.lightingOptions=new fB,this.pickId=void 0,this.snapId=void 0}var dB=vot;function EZ(e){e=e??H.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._command=t,this._model=i,this._runtimePrimitive=n.runtimePrimitive,this._modelMatrix=t.modelMatrix,this._boundingVolume=t.boundingVolume,this._cullFace=t.renderState.cull.face;let r=i.classificationType;this._classificationType=r,this._classifiesTerrain=r!==Qn.CESIUM_3D_TILE,this._classifies3DTiles=r!==Qn.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],Pot(this)}function Sot(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:Rt.KEEP,zFail:Rt.DECREMENT_WRAP,zPass:Rt.KEEP},backFunction:e,backOperation:{fail:Rt.KEEP,zFail:Rt.INCREMENT_WRAP,zPass:Rt.KEEP},reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL},depthMask:!1}}var wot={stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND},Iot={stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},backFunction:ei.NOT_EQUAL,backOperation:{fail:Rt.ZERO,zFail:Rt.ZERO,zPass:Rt.ZERO},reference:0,mask:Yt.CLASSIFICATION_MASK},stencilMask:Yt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},WAe=[];function Pot(e){let t=e._command,n=WAe;if(e._useDebugWireframe){t.pass=Ie.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=hB(e,n,e._commandListDebugWireframe);let o=e._commandListDebugWireframe,s=o.length;for(let a=0;a<s;a++){let c=o[a];c.count*=2,c.offset*=2}return}let r=e.model.allowPicking;if(e._classifiesTerrain){let o=Ie.TERRAIN_CLASSIFICATION,s=TZ(t,o),a=HAe(t,o);n.length=0,n.push(s,a),e._commandListTerrain=hB(e,n,e._commandListTerrain),r&&(e._commandListTerrainPicking=GAe(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let o=Ie.CESIUM_3D_TILE_CLASSIFICATION,s=TZ(t,o),a=HAe(t,o);n.length=0,n.push(s,a),e._commandList3DTiles=hB(e,n,e._commandList3DTiles),r&&(e._commandList3DTilesPicking=GAe(e,n,e._commandList3DTilesPicking))}}function hB(e,t,n){let i=e._runtimePrimitive,r=i.batchLengths,o=i.batchOffsets,s=r.length,a=t.length;for(let c=0;c<s;c++){let u=r[c],f=o[c];for(let d=0;d<a;d++){let p=t[d],g=at.shallowClone(p);g.count=u,g.offset=f,n.push(g)}}return n}function TZ(e,t){let n=at.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Ie.TERRAIN_CLASSIFICATION?ei.ALWAYS:ei.EQUAL,r=Sot(i);return n.renderState=Ge.fromCache(r),n}function HAe(e,t){let n=at.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Ge.fromCache(wot),n}var Dot=[];function GAe(e,t,n){let i=Ge.fromCache(Iot),r=t[0],o=t[1],s=at.shallowClone(r);s.cull=!0,s.pickOnly=!0;let a=at.shallowClone(o);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let c=Dot;return c.length=0,c.push(s,a),hB(e,c,n)}Object.defineProperties(EZ.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},batchLengths:{get:function(){return this._runtimePrimitive.batchLengths}},batchOffsets:{get:function(){return this._runtimePrimitive.batchOffsets}},model:{get:function(){return this._model}},classificationType:{get:function(){return this._classificationType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix);let t=this._runtimePrimitive.boundingSphere;this._boundingVolume=ue.transform(t,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}});EZ.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){ti(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&ti(t,this._commandListTerrain),this._classifies3DTiles&&ti(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let r=Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,o=TZ(this._command,r),s=WAe;s.length=0,s.push(o),this._commandListIgnoreShow=hB(this,s,this._commandListIgnoreShow)}ti(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&ti(t,this._commandListTerrainPicking),this._classifies3DTiles&&ti(t,this._commandList3DTilesPicking)),t};var mB=EZ;function JS(e){e=e??H.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._model=i;let r=n.runtimePrimitive;this._runtimePrimitive=r,this._primitiveRenderResources=n;let o=t.pass===Ie.TRANSLUCENT,a=!r.primitive.material.doubleSided&&!o,c=n.hasSilhouette,u=!o&&!c,f=n.hasSkipLevelOfDetail&&!o,d=c,p=l(n.edgeGeometry);this._command=t,this._modelMatrix=N.clone(t.modelMatrix),this._boundingVolume=ue.clone(t.boundingVolume),this._modelMatrix2D=new N,this._boundingVolume2D=new ue,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=a,this._needsTranslucentCommand=u,this._needsSkipLevelOfDetailCommands=f,this._needsSilhouetteCommands=d,this._needsEdgeCommands=p,this._needsPlanarFillIdCommand=n.planarFillIdPass,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._edgeCommand=void 0,this._edgeSnapCommand=void 0,this._planarFillIdCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,Rot(this)}function qd(e){this.command=e.command,this.updateShadows=e.updateShadows,this.updateBackFaceCulling=e.updateBackFaceCulling,this.updateCullFace=e.updateCullFace,this.updateDebugShowBoundingVolume=e.updateDebugShowBoundingVolume,this.is2D=e.is2D??!1,this.derivedCommand2D=void 0}qd.clone=function(e){return new qd({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function Rot(e){let t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;let n=e._model,i=e._usesBackFaceCulling,r=e._derivedCommands;if(e._originalCommand=new qd({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),r.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new qd({command:kot(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),r.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new qd({command:Wot(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new qd({command:qot(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),r.push(e._skipLodBackfaceCommand),r.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new qd({command:Uot(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new qd({command:zot(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),r.push(e._silhouetteModelCommand),r.push(e._silhouetteColorCommand)),e._needsEdgeCommands){let o=e._primitiveRenderResources,s=o.edgeGeometry,a=l(s.lineWidth)?s.lineWidth:1,c=1;e._edgeCommand=new qd({command:qAe(t,o,a),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),e._edgeSnapCommand=new qd({command:qAe(t,o,c),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),r.push(e._edgeCommand),r.push(e._edgeSnapCommand)}e._needsPlanarFillIdCommand&&(e._planarFillIdCommand=new qd({command:Vot(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),r.push(e._planarFillIdCommand)),e._primitiveRenderResources=void 0}Object.defineProperties(JS.prototype,{command:{get:function(){return this._command}},runtimePrimitive:{get:function(){return this._runtimePrimitive}},model:{get:function(){return this._model}},primitiveType:{get:function(){return this._command.primitiveType}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=ue.transform(this.runtimePrimitive.boundingSphere,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},shadows:{get:function(){return this._shadows},set:function(e){this._shadows=e,Mot(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,Not(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,Lot(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,Fot(this))}}});function Oot(e,t){let n=e._modelMatrix;e._modelMatrix2D=N.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=D.sign(n[13])*2*D.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=ue.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}function Mot(e){let t=e.shadows,n=Dn.castShadows(t),i=Dn.receiveShadows(t),r=e._derivedCommands;for(let o=0;o<r.length;++o){let s=r[o];if(s.updateShadows){let a=s.command;a.castShadows=n,a.receiveShadows=i}}}function Not(e){let t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){let r=n[i];if(r.updateBackFaceCulling){let o=r.command,s=Je(o.renderState,!0);s.cull.enabled=t,o.renderState=Ge.fromCache(s)}}}function Lot(e){let t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){let r=n[i];if(r.updateCullFace){let o=r.command,s=Je(o.renderState,!0);s.cull.face=t,o.renderState=Ge.fromCache(s)}}}function Fot(e){let t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){let r=n[i];if(r.updateDebugShowBoundingVolume){let o=r.command;o.debugShowBoundingVolume=t}}}JS.prototype.pushCommands=function(e,t){let n=DH(this,e);n&&!this._has2DCommands&&(Bot(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(Oot(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==mm.ALL_OPAQUE&&Zp(t,this._translucentCommand,n),i===mm.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:r,tile:o}=this._model.content;if(r.hasMixedContent){o._finalResolution||Zp(r._backfaceCommands,this._skipLodBackfaceCommand,n),jot(this,o,n),Zp(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){Zp(t,this._silhouetteModelCommand,n);return}return this._model.edgeDisplayMode===Hd.EDGES_ONLY&&this._needsEdgeCommands||Zp(t,this._originalCommand,n),t}};JS.prototype.pushSilhouetteCommands=function(e,t){let n=DH(this,e);return Zp(t,this._silhouetteColorCommand,n),t};JS.prototype.pushEdgeCommands=function(e,t){if(!l(this._edgeCommand))return t;let n=this._model.edgeDisplayMode,i=e.passes,r=DH(this,e);if(i.snap){let s=this._edgeSnapCommand;return s.command.pass=Ie.CESIUM_3D_TILE_EDGES_DIRECT,l(s.derivedCommand2D)&&(s.derivedCommand2D.command.pass=Ie.CESIUM_3D_TILE_EDGES_DIRECT),Zp(t,s,r),t}if(i.pick){if(n!==Hd.EDGES_ONLY)return t;let s=this._edgeCommand;return s.command.pass=Ie.CESIUM_3D_TILE_EDGES_DIRECT,l(s.derivedCommand2D)&&(s.derivedCommand2D.command.pass=Ie.CESIUM_3D_TILE_EDGES_DIRECT),Zp(t,s,r),t}if(n===Hd.SURFACES_ONLY)return t;let o=n===Hd.EDGES_ONLY?Ie.CESIUM_3D_TILE_EDGES_DIRECT:Ie.CESIUM_3D_TILE_EDGES;return this._edgeCommand.command.pass=o,l(this._edgeCommand.derivedCommand2D)&&(this._edgeCommand.derivedCommand2D.command.pass=o),Zp(t,this._edgeCommand,r),t};JS.prototype.pushPlanarFillIdCommands=function(e,t){if(!l(this._planarFillIdCommand))return t;let n=DH(this,e);return Zp(t,this._planarFillIdCommand,n),t};function Zp(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function DH(e,t){if(t.mode!==re.SCENE2D||e.model._projectTo2D)return!1;let i=e.model.sceneGraph._boundingSphere2D,r=i.center.y-i.radius,o=i.center.y+i.radius,s=t.mapProjection.ellipsoid.maximumRadius*D.PI;return r<s&&o>s||r<-s&&o>-s}function t_(e,t){if(!l(t))return;let n=qd.clone(t),i=at.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function Bot(e){t_(e,e._originalCommand),t_(e,e._translucentCommand),t_(e,e._skipLodBackfaceCommand),t_(e,e._skipLodStencilCommand),t_(e,e._silhouetteModelCommand),t_(e,e._silhouetteColorCommand),t_(e,e._edgeCommand),t_(e,e._edgeSnapCommand),t_(e,e._planarFillIdCommand)}function kot(e){let t=at.shallowClone(e);t.pass=Ie.TRANSLUCENT;let n=Je(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=tn.ALPHA_BLEND,t.renderState=Ge.fromCache(n),t}function Uot(e,t){let n=t._silhouetteId%255,i=at.shallowClone(e),r=Je(e.renderState,!0);return r.stencilTest={enabled:!0,frontFunction:te.ALWAYS,backFunction:te.ALWAYS,reference:n,mask:-1,frontOperation:{fail:te.KEEP,zFail:te.KEEP,zPass:te.REPLACE},backOperation:{fail:te.KEEP,zFail:te.KEEP,zPass:te.REPLACE}},t.isInvisible()&&(r.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Ge.fromCache(r),i}function zot(e,t){let n=t._silhouetteId%255,i=at.shallowClone(e),r=Je(e.renderState,!0);r.cull.enabled=!1,(e.pass===Ie.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Ie.TRANSLUCENT,r.depthMask=!1,r.blending=tn.ALPHA_BLEND),r.stencilTest={enabled:!0,frontFunction:te.NOTEQUAL,backFunction:te.NOTEQUAL,reference:n,mask:-1,frontOperation:{fail:te.KEEP,zFail:te.KEEP,zPass:te.KEEP},backOperation:{fail:te.KEEP,zFail:te.KEEP,zPass:te.KEEP}};let s=Je(e.uniformMap);return s.model_silhouettePass=function(){return!0},i.renderState=Ge.fromCache(r),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function qAe(e,t,n){let i=t.edgeGeometry,r=at.shallowClone(e);r.vertexArray=i.vertexArray,r.primitiveType=i.primitiveType,r.count=i.indexCount,l(i.shaderProgram)&&(r.shaderProgram=i.shaderProgram),r.pass=i.pass;let o=Je(e.uniformMap);return o.u_isEdgePass=function(){return!0},o.u_lineWidth=function(){return n},r.uniformMap=o,r.castShadows=!1,r.receiveShadows=!1,r}function Vot(e){let t=at.shallowClone(e);t.pass=Ie.CESIUM_3D_TILE_PLANAR_FILL_ID,t.castShadows=!1,t.receiveShadows=!1;let n=Je(e.renderState,!0);n.blending.enabled=!1,t.renderState=Ge.fromCache(n);let i=Je(e.uniformMap);return i.u_isPlanarFillIdPass=function(){return!0},t.uniformMap=i,t}function jot(e,t,n){let i=e._skipLodStencilCommand,r=i.command,o=t._selectionDepth,s=Hot(r);if(o!==s){let a=Got(o),c=Je(r.renderState,!0);c.stencilTest.reference=a,r.renderState=Ge.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function Hot(e){return(e.renderState.stencilTest.reference&Yt.SKIP_LOD_MASK)>>>Yt.SKIP_LOD_BIT_SHIFT}function Got(e){return Yt.CESIUM_3D_TILE_MASK|e<<Yt.SKIP_LOD_BIT_SHIFT}function Wot(e){let t=at.shallowClone(e),n=Je(e.renderState,!0);n.cull.enabled=!0,n.cull.face=Vi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=Je(t.uniformMap),r=new U(5,5);return i.u_polygonOffset=function(){return r},t.renderState=Ge.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function qot(e){let t=at.shallowClone(e),n=Je(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Yt.SKIP_LOD_MASK,i.reference=Yt.CESIUM_3D_TILE_MASK,i.frontFunction=ei.GREATER_OR_EQUAL,i.frontOperation.zPass=Rt.REPLACE,i.backFunction=ei.GREATER_OR_EQUAL,i.backOperation.zPass=Rt.REPLACE,n.stencilMask=Yt.CESIUM_3D_TILE_MASK|Yt.SKIP_LOD_MASK,t.renderState=Ge.fromCache(n),t}var pB=JS;var gB=`precision highp float;
czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
czm_modelVertexOutput vsOutput;
vsOutput.positionMC = positionMC;
vsOutput.pointSize = 1.0;
return vsOutput;
}
void main()
{
ProcessedAttributes attributes;
initializeAttributes(attributes);
#ifdef HAS_IMAGERY
initializeImageryAttributes();
#endif
#ifdef USE_DEQUANTIZATION
dequantizationStage(attributes);
#endif
#ifdef HAS_MORPH_TARGETS
morphTargetsStage(attributes);
#endif
#ifdef HAS_SKINNING
skinningStage(attributes);
#endif
#ifdef HAS_PRIMITIVE_OUTLINE
primitiveOutlineStage();
#endif
#ifdef HAS_BITANGENTS
attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
#endif
FeatureIds featureIds;
featureIdStage(featureIds, attributes);
#ifdef HAS_SELECTED_FEATURE_ID
SelectedFeature feature;
selectedFeatureIdStage(feature, featureIds);
cpuStylingStage(attributes.positionMC, feature);
#endif
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
mat4 modelView = czm_modelView3D;
mat3 normal = czm_normal3D;
#else
mat4 modelView = czm_modelView;
mat3 normal = czm_normal;
#endif
#ifdef HAS_INSTANCING
#ifdef USE_LEGACY_INSTANCING
mat4 instanceModelView;
mat3 instanceModelViewInverseTranspose;
legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
modelView = instanceModelView;
normal = instanceModelViewInverseTranspose;
#else
instancingStage(attributes);
#endif
#ifdef USE_PICKING
v_pickColor = a_pickColor;
#endif
#endif
Metadata metadata;
MetadataClass metadataClass;
MetadataStatistics metadataStatistics;
metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
#ifdef HAS_VERTICAL_EXAGGERATION
verticalExaggerationStage(attributes);
#endif
#ifdef HAS_CUSTOM_VERTEX_SHADER
czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
#endif
vec4 positionClip = geometryStage(attributes, modelView, normal);
#ifdef ENABLE_CLIPPING_POLYGONS
modelClippingPolygonsStage();
#endif
#if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
lineStyleStageVS(attributes);
#endif
#ifdef HAS_ATMOSPHERE
atmosphereStage(attributes);
#endif
#ifdef HAS_VECTOR_LOOKUP
modelVectorLookupStage(attributes);
#endif
#ifdef HAS_SILHOUETTE
silhouetteStage(attributes, positionClip);
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float show = pointCloudShowStylingStage(attributes, metadata);
#else
float show = 1.0;
#endif
#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
show *= pointCloudBackFaceCullingStage();
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
#endif
#ifdef PRIMITIVE_TYPE_POINTS
#ifdef HAS_CUSTOM_VERTEX_SHADER
gl_PointSize = vsOutput.pointSize;
#elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
#elif defined(HAS_POINT_DIAMETER)
gl_PointSize = u_pointDiameter;
#else
gl_PointSize = 1.0;
#endif
gl_PointSize *= show;
#endif
gl_Position = positionClip;
#ifdef HAS_EDGE_VISIBILITY
edgeVisibilityStageVS();
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
v_pointCloudShow = show;
#endif
}
`;var _B=`precision highp float;
const float PLANAR_DEPTH_PULL = 0.9995;
const float BEHIND_DEPTH_PUSH = 1.0002;
const float FEATURE_ID_TOLERANCE = 0.5;
const float FEATURE_ID_OFFSET = 1.0;
czm_modelMaterial defaultModelMaterial()
{
czm_modelMaterial material;
material.diffuse = vec3(0.0);
material.specular = vec3(1.0);
material.roughness = 1.0;
material.occlusion = 1.0;
material.normalEC = vec3(0.0, 0.0, 1.0);
material.emissive = vec3(0.0);
material.alpha = 1.0;
return material;
}
vec4 handleAlpha(vec3 color, float alpha)
{
#ifdef ALPHA_MODE_MASK
if (alpha < u_alphaCutoff) {
discard;
}
#endif
return vec4(color, alpha);
}
void lineStyleStage()
{
#if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
const float maskLength = 16.0;
float dashPosition = fract(v_lineCoord / maskLength);
float maskIndex = floor(dashPosition * maskLength);
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
if (mod(maskTest, 2.0) < 1.0) {
discard;
}
#endif
}
SelectedFeature selectedFeature;
bool isEdge = false;
void main()
{
#if defined(PRIMITIVE_TYPE_POINTS) && defined(HAS_POINT_DIAMETER)
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
if (distanceToCenter > 0.5) {
discard;
}
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
if (v_pointCloudShow == 0.0)
{
discard;
}
#endif
#ifdef HAS_MODEL_SPLITTER
modelSplitterStage();
#endif
czm_modelMaterial material = defaultModelMaterial();
ProcessedAttributes attributes;
geometryStage(attributes);
FeatureIds featureIds;
featureIdStage(featureIds, attributes);
#ifdef HAS_PLANAR_FILL_ID_PASS
if (u_isPlanarFillIdPass) {
float fid = float(featureIds.PLANAR_FILL_FEATURE_ID) + FEATURE_ID_OFFSET;
out_FragColor = vec4(fid, 0.0, 0.0, 1.0);
#ifdef LOG_DEPTH
czm_writeLogDepth();
#endif
return;
}
#endif
Metadata metadata;
MetadataClass metadataClass;
MetadataStatistics metadataStatistics;
metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
#ifndef METADATA_PICKING_ENABLED
#ifdef HAS_SELECTED_FEATURE_ID
selectedFeatureIdStage(selectedFeature, featureIds);
#endif
#ifndef CUSTOM_SHADER_REPLACE_MATERIAL
materialStage(material, attributes, selectedFeature);
#endif
#ifdef HAS_CUSTOM_FRAGMENT_SHADER
customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
#endif
lightingStage(material, attributes);
#ifdef HAS_SELECTED_FEATURE_ID
cpuStylingStage(material, selectedFeature);
#endif
#ifdef HAS_MODEL_COLOR
modelColorStage(material);
#endif
#ifdef HAS_PRIMITIVE_OUTLINE
primitiveOutlineStage(material);
#endif
vec4 color = handleAlpha(material.diffuse, material.alpha);
#else
vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
metadataPickingStage(metadata, metadataClass, metadataValues);
vec4 color = metadataValues;
#endif
lineStyleStage();
#ifdef HAS_CLIPPING_PLANES
modelClippingPlanesStage(color);
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
modelClippingPolygonsStage();
#endif
#ifdef HAS_VECTOR_LOOKUP
modelVectorLookupStage(color);
#endif
#ifndef METADATA_PICKING_ENABLED
#if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
silhouetteStage(color);
#endif
#ifdef HAS_ATMOSPHERE
atmosphereStage(color, attributes);
#endif
#ifdef HAS_EDGE_VISIBILITY
edgeVisibilityStage(color, featureIds);
edgeDetectionStage(color, featureIds);
if (u_isEdgePass) {
isEdge = true;
}
#endif
#endif
out_FragColor = color;
#ifdef LOG_DEPTH
czm_writeLogDepth();
#endif
#ifdef HAS_PLANAR_FILL_DEPTH
gl_FragDepth *= PLANAR_DEPTH_PULL;
#endif
#ifdef HAS_PLANAR_FILL_BEHIND
{
vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;
float storedEncoded = texture(czm_planarFillIdTexture, screenCoord).r;
float storedFeatureId = storedEncoded - FEATURE_ID_OFFSET;
float myFeatureId = float(featureIds.PLANAR_FILL_FEATURE_ID);
if (storedFeatureId >= 0.0 && abs(storedFeatureId - myFeatureId) < FEATURE_ID_TOLERANCE) {
gl_FragDepth *= BEHIND_DEPTH_PUSH;
}
}
#endif
}
`;function YAe(){}YAe.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=Yot(e,n,t),r=Xot(e,i,t),o=e.model;return l(o.classificationType)?new mB({primitiveRenderResources:e,command:r}):new pB({primitiveRenderResources:e,command:r})};function Yot(e,t,n){t.addVertexLines(gB),t.addFragmentLines(_B);let i=e.model,r=t.buildShaderProgram(n.context);return i._pipelineResources.push(r),r}function Xot(e,t,n){let i=Kot(e),r=new zn({context:n.context,indexBuffer:i,attributes:e.attributes}),o=e.model;o._pipelineResources.push(r);let s=e.alphaOptions.pass,a=o.sceneGraph,c=n.mode===re.SCENE3D,u,f;if(!c&&!n.scene3DOnly&&o._projectTo2D)u=N.multiplyTransformation(a._computedModelMatrix,e.runtimeNode.computedTransform,new N),f=e.runtimePrimitive.boundingSphere2D;else{let x=c?a._computedModelMatrix:a._computedModelMatrix2D;u=N.multiplyTransformation(x,e.runtimeNode.computedTransform,new N),f=ue.transform(e.boundingSphere,u)}let d=Je(Ge.fromCache(e.renderStateOptions),!0);d.cull.face=xt.getCullFace(u,e.primitiveType),d=Ge.fromCache(d);let p=l(o.classificationType),g=p?!1:Dn.castShadows(o.shadows),m=p?!1:Dn.receiveShadows(o.shadows),y=p?void 0:e.pickId,A=p?void 0:e.snapId;return new at({boundingVolume:f,modelMatrix:u,uniformMap:e.uniformMap,renderState:d,vertexArray:r,shaderProgram:t,cull:o.cull,pass:s,count:e.count,owner:o,pickId:y,snapId:A,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:o.debugShowBoundingVolume,castShadows:g,receiveShadows:m})}function Kot(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var yB=YAe;function dl(e){e=e??H.EMPTY_OBJECT;let t=e.modelComponents;this._model=e.model,this._components=t,this._pipelineStages=[],this._updateStages=[],this._runtimeNodes=[],this._rootNodes=[],this._skinnedNodes=[],this._runtimeSkins=[],this.modelPipelineStages=[],this._boundingSphere=void 0,this._positionMin=void 0,this._positionMax=void 0,this._boundingSphere2D=void 0,this._computedModelMatrix=N.clone(N.IDENTITY),this._computedModelMatrix2D=N.clone(N.IDENTITY),this._axisCorrectionMatrix=xt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new N),this._runtimeArticulations={},$ot(this)}Object.defineProperties(dl.prototype,{components:{get:function(){return this._components}},computedModelMatrix:{get:function(){return this._computedModelMatrix}},axisCorrectionMatrix:{get:function(){return this._axisCorrectionMatrix}},boundingSphere:{get:function(){return this._boundingSphere}}});function $ot(e){let t=e._components,n=t.scene,r=e._model.modelMatrix;XAe(e,r);let o=t.articulations,s=o.length,a=e._runtimeArticulations;for(let x=0;x<s;x++){let T=o[x],E=new vL({articulation:T,sceneGraph:e}),v=E.name;a[v]=E}let c=t.nodes,u=c.length;e._runtimeNodes=new Array(u);let d=n.nodes.length,p=N.IDENTITY;for(let x=0;x<d;x++){let T=n.nodes[x],E=KAe(e,T,p);e._rootNodes.push(E)}let g=t.skins,m=e._runtimeSkins,y=g.length;for(let x=0;x<y;x++){let T=g[x];m.push(new tB({skin:T,sceneGraph:e}))}let A=e._skinnedNodes,b=A.length;for(let x=0;x<b;x++){let T=A[x],E=e._runtimeNodes[T],S=c[T].skin.index;E._runtimeSkin=m[S],E.updateJointMatrices()}e.applyArticulations()}function XAe(e,t){let n=e._components,i=e._model;e._computedModelMatrix=N.multiplyTransformation(t,n.transform,e._computedModelMatrix),e._computedModelMatrix=N.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=N.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}var Jot=new h;function Zot(e,t){let n=e._computedModelMatrix,i=N.getTranslation(n,Jot);if(!h.equals(i,h.ZERO))e._computedModelMatrix2D=At.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let r=e.boundingSphere.center,o=At.ellipsoidTo2DModelMatrix(t.mapProjection,r,e._computedModelMatrix2D);e._computedModelMatrix2D=N.multiply(o,n,e._computedModelMatrix2D)}e._boundingSphere2D=ue.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}function KAe(e,t,n){let i=[],r=xt.getNodeTransform(t),o=t.children.length;for(let f=0;f<o;f++){let d=t.children[f],p=N.multiplyTransformation(n,r,new N),g=KAe(e,d,p);i.push(g)}let s=new HL({node:t,transform:r,transformToRoot:n,children:i,sceneGraph:e}),a=t.primitives.length;for(let f=0;f<a;f++)s.runtimePrimitives.push(new eB({primitive:t.primitives[f],node:t,model:e._model}));let c=t.index;e._runtimeNodes[c]=s,l(t.skin)&&e._skinnedNodes.push(c);let u=t.name;if(l(u)){let f=e._model,d=new LL(f,s);f._nodesByName[u]=d}return c}var Qot=new h,est=new h,tst=new h,nst=new h;dl.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};dl.prototype.buildRenderResources=function(e){let t=this._model,n=new rB(t);t.statistics.clear(),this.configurePipeline(e);let i=this.modelPipelineStages;for(let r=0;r<i.length;r++)i[r].process(n,t,e);for(let r=0;r<this._runtimeNodes.length;r++){let o=this._runtimeNodes[r];if(!l(o))continue;o.configurePipeline();let s=o.pipelineStages,a=new uB(n,o);n.nodeRenderResources[r]=a;for(let c=0;c<s.length;c++)s[c].process(a,o.node,e);for(let c=0;c<o.runtimePrimitives.length;c++){let u=o.runtimePrimitives[c];u.configurePipeline(e);let f=u.pipelineStages,d=new dB(a,u);a.primitiveRenderResources[c]=d;for(let p=0;p<f.length;p++)f[p].process(d,u.primitive,e)}}return n};dl.prototype.computeBoundingVolumes=function(e){let t=this._model,n=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Qot),i=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,est);for(let r=0;r<this._runtimeNodes.length;r++){let o=this._runtimeNodes[r];if(!l(o))continue;let s=e.nodeRenderResources[r],a=o.computedTransform;for(let c=0;c<o.runtimePrimitives.length;c++){let u=o.runtimePrimitives[c],f=s.primitiveRenderResources[c];u.boundingSphere=ue.clone(f.boundingSphere,new ue);let d=N.multiplyByPoint(a,f.positionMin,tst),p=N.multiplyByPoint(a,f.positionMax,nst);h.minimumByComponent(n,d,n),h.minimumByComponent(n,p,n),h.maximumByComponent(i,p,i),h.maximumByComponent(i,d,i)}}this._positionMin=h.clone(n,this._positionMin),this._positionMax=h.clone(i,this._positionMax),this._boundingSphere=ue.fromCornerPoints(n,i,new ue),this._boundingSphere=ue.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=ue.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=ue.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};dl.prototype.createDrawCommands=function(e,t){for(let n=0;n<this._runtimeNodes.length;n++){let i=this._runtimeNodes[n];if(!l(i))continue;let r=e.nodeRenderResources[n];for(let o=0;o<i.runtimePrimitives.length;o++){let s=i.runtimePrimitives[o],a=r.primitiveRenderResources[o],c=yB.buildModelDrawCommand(a,t);s.drawCommand=c}}};dl.prototype.configurePipeline=function(e){let t=this.modelPipelineStages;t.length=0;let n=this._model,i=e.fog.enabled&&e.fog.renderable;if(l(n.color)&&t.push(bA),l(n.classificationType))return;n.imageBasedLighting.enabled&&t.push(EL),n.isClippingEnabled()&&t.push(IL);let r=(n._clippingPolygonData?.polygonRings.length??0)>0;n.isClippingPolygonsEnabled()&&r&&t.push(RL),n.hasDrapedVectors()&&t.push(NL),n.hasSilhouette(e)&&t.push(aB),l(n.splitDirection)&&n.splitDirection!==Vo.NONE&&t.push(lB),Wo.is3DTiles(n.type)&&t.push(yL),i&&t.push(xL)};dl.prototype.update=function(e,t){let n,i,r;for(n=0;n<this._runtimeNodes.length;n++){let o=this._runtimeNodes[n];if(!l(o))continue;for(i=0;i<o.updateStages.length;i++)o.updateStages[i].update(o,this,e);let s=e.mode!==re.SCENE3D&&this._model._projectTo2D;for(t&&!s&&this.updateJointMatrices(),i=0;i<o.runtimePrimitives.length;i++){let a=o.runtimePrimitives[i];for(r=0;r<a.updateStages.length;r++)a.updateStages[r].update(a,this)}}};dl.prototype.updateModelMatrix=function(e,t){XAe(this,e),t.mode!==re.SCENE3D&&Zot(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let r=this._runtimeNodes[n[i]];r._transformDirty=!0}};dl.prototype.updateJointMatrices=function(){let e=this._skinnedNodes,t=e.length;for(let n=0;n<t;n++){let i=e[n];this._runtimeNodes[i].updateJointMatrices()}};function $Ae(e,t,n,i,r){if(n&&!t.show)return;let o=t.children.length;for(let c=0;c<o;c++){let u=t.getChild(c);$Ae(e,u,n,i,r)}let s=t.runtimePrimitives,a=s.length;for(let c=0;c<a;c++){let u=s[c];i(u,r)}}function RH(e,t,n,i){let r=e._rootNodes,o=r.length;for(let s=0;s<o;s++){let a=r[s],c=e._runtimeNodes[a];$Ae(e,c,t,n,i)}}var ist={backFaceCulling:void 0};dl.prototype.updateBackFaceCulling=function(e){let t=ist;t.backFaceCulling=e,RH(this,!1,rst,t)};function rst(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var ost={shadowMode:void 0};dl.prototype.updateShadows=function(e){let t=ost;t.shadowMode=e,RH(this,!1,sst,t)};function sst(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var ast={debugShowBoundingVolume:void 0};dl.prototype.updateShowBoundingVolume=function(e){let t=ast;t.debugShowBoundingVolume=e,RH(this,!1,cst,t)};function cst(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var JAe=[],ZAe=[],QAe=[],lst={frameState:void 0,hasSilhouette:void 0};dl.prototype.pushDrawCommands=function(e){let t=JAe;t.length=0;let n=ZAe;n.length=0;let i=QAe;i.length=0;let r=lst;r.hasSilhouette=this._model.hasSilhouette(e),r.frameState=e,RH(this,!0,ust,r),ti(e.commandList,t),ti(e.commandList,n),ti(e.commandList,i)};function ust(e,t){let n=t.frameState,i=t.hasSilhouette,r=n.passes,o=JAe,s=ZAe,a=QAe,c=e.drawCommand;c.pushCommands(n,n.commandList);let u=e.primitive.material;l(u)&&l(u.planarFill)&&(n.planarFillRequested=!0),i&&!r.pick&&c.pushSilhouetteCommands(n,o),l(c.pushEdgeCommands)&&c.pushEdgeCommands(n,s),l(c.pushPlanarFillIdCommands)&&c.pushPlanarFillIdCommands(n,a)}dl.prototype.setArticulationStage=function(e,t){let n=e.split(" ");if(n.length!==2)return;let i=n[0],r=n[1],o=this._runtimeArticulations[i];l(o)&&o.setArticulationStage(r,t)};dl.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var AB=dl;function vA(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap=new kt}Object.defineProperties(vA.prototype,{batchTexturesByteLength:{get:function(){let e=this._batchTextureIdMap.length,t=this._batchTextureIdMap.values,n=0;for(let i=0;i<e;i++)n+=t[i].byteLength;return n}}});vA.prototype.clear=function(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap.removeAll()};vA.prototype.addBuffer=function(e,t){if(!this._bufferIdSet.hasOwnProperty(e._id)){let n=t?2:1;this.geometryByteLength+=e.sizeInBytes*n}this._bufferIdSet[e._id]=!0};vA.prototype.addTexture=function(e){this._textureIdByteLengths.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes,this._textureIdByteLengths[e._id]=e.sizeInBytes)};vA.prototype.getTextureIds=function(){return Object.keys(this._textureIdByteLengths)};vA.prototype.getTextureByteLengthById=function(e){return this._textureIdByteLengths[e]};vA.prototype.addBatchTexture=function(e){this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var bB=vA;var ibe=Qo(gj(),1);var ebe={},xT=Uint32Array.BYTES_PER_ELEMENT;ebe.parse=function(e,t){t=t??0;let n=new Uint8Array(e),i=new DataView(e);t+=xT;let r=i.getUint32(t,!0);if(r!==1)throw new oe(`Only Point Cloud tile version 1 is supported. Version ${r} is not.`);t+=xT,t+=xT;let o=i.getUint32(t,!0);if(o===0)throw new oe("Feature table must have a byte length greater than zero");t+=xT;let s=i.getUint32(t,!0);t+=xT;let a=i.getUint32(t,!0);t+=xT;let c=i.getUint32(t,!0);t+=xT;let u=Ro(n,t,o);t+=o;let f=new Uint8Array(e,t,s);t+=s;let d,p;a>0&&(d=Ro(n,t,a),Object.keys(d).length===0&&(d=void 0),t+=a,c>0&&(p=new Uint8Array(e,t,c),p=new Uint8Array(p)));let g=new dm(u,f),m=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=m,!l(m))throw new oe("Feature table global property: POINTS_LENGTH must be defined");let y=g.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(y)&&(y=h.unpack(y));let A=dst(g,d);if(A.rtcCenter=y,A.pointsLength=m,!A.hasPositions){let b=hst(g);A.positions=b,A.hasPositions=A.hasPositions||l(b)}if(!A.hasPositions)throw new oe("Either POSITION or POSITION_QUANTIZED must be defined.");if(!A.hasNormals){let b=pst(g);A.normals=b,A.hasNormals=A.hasNormals||l(b)}if(!A.hasColors){let b=mst(g);A.colors=b,A.hasColors=A.hasColors||l(b),A.hasConstantColor=l(A.constantColor),A.isTranslucent=l(b)&&b.isTranslucent}if(!A.hasBatchIds){let b=gst(g);A.batchIds=b,A.hasBatchIds=A.hasBatchIds||l(b)}if(A.hasBatchIds){let b=g.getGlobalProperty("BATCH_LENGTH");if(!l(b))throw new oe("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");A.batchLength=b}return(l(d)||l(p))&&(A.batchTableJson=d,A.batchTableBinary=p),fst(A),A};function fst(e){let t=e.batchTableJson;if(!l(t))return;let n=e.batchTableBinary;if(l(n))return;let i=Object.keys(e.draco?.batchTableProperties??{}),r=[];for(let o of Object.keys(t)){let a=t[o].byteOffset;l(a)&&(i.includes(o)||r.push(o))}for(let o of r)_t("PntsParser-invalidBinaryBodyReference",`The point cloud data contained a binary property ${o} that could not be resolved - skipping`),delete t[o]}function dst(e,t){let n=e.json,i,r,o,s=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(a)&&(o=a.properties);let c,u,f,d,p;if(l(s)){r=s.properties;let m=s.byteOffset,y=s.byteLength;if(!l(r)||!l(m)||!l(y))throw new oe("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(m,m+y),c=l(r.POSITION),u=l(r.RGB)||l(r.RGBA),f=l(r.NORMAL),d=l(r.BATCH_ID),p=l(r.RGBA)}let g;return l(i)&&(g={buffer:i,featureTableProperties:r,batchTableProperties:o,properties:Ot(r,o),dequantizeInShader:!0}),{draco:g,hasPositions:c,hasColors:u,isTranslucent:p,hasNormals:f,hasBatchIds:d}}function hst(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",Y.FLOAT,3),{name:ct.POSITION,semantic:ct.POSITION,typedArray:n,isQuantized:!1,componentDatatype:Y.FLOAT,type:Vt.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",Y.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Y.FLOAT,3);if(!l(i))throw new oe("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let r=65535,o=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Y.FLOAT,3);if(!l(o))throw new oe("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:ct.POSITION,semantic:ct.POSITION,typedArray:n,isQuantized:!0,componentDatatype:Y.FLOAT,type:Vt.VEC3,quantizedRange:r,quantizedVolumeOffset:h.unpack(o),quantizedVolumeScale:h.unpack(i),quantizedComponentDatatype:Y.UNSIGNED_SHORT,quantizedType:Vt.VEC3}}}function mst(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",Y.UNSIGNED_BYTE,4),{name:ct.COLOR,semantic:ct.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.UNSIGNED_BYTE,type:Vt.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",Y.UNSIGNED_BYTE,3),{name:"COLOR",semantic:ct.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.UNSIGNED_BYTE,type:Vt.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",Y.UNSIGNED_SHORT,1),{name:"COLOR",semantic:ct.COLOR,setIndex:0,typedArray:n,componentDatatype:Y.FLOAT,type:Vt.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",Y.UNSIGNED_BYTE,4),r=i[3],o=z.fromBytes(i[0],i[1],i[2],r),s=r<255;return{name:ct.COLOR,semantic:ct.COLOR,setIndex:0,constantColor:o,componentDatatype:Y.FLOAT,type:Vt.VEC4,isQuantized:!1,isTranslucent:s}}}function pst(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",Y.FLOAT,3),{name:ct.NORMAL,semantic:ct.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:Y.FLOAT,type:Vt.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",Y.UNSIGNED_BYTE,2),{name:ct.NORMAL,semantic:ct.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:Vt.VEC2,quantizedComponentDatatype:Y.UNSIGNED_BYTE,componentDatatype:Y.FLOAT,type:Vt.VEC3}}function gst(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",Y.UNSIGNED_SHORT,1);return{name:ct.FEATURE_ID,semantic:ct.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:Y.fromTypedArray(n),type:Vt.SCALAR}}}var TT=ebe;var _st=Cn.Components,yst=Cn.Scene,Ast=Cn.Node,bst=Cn.Primitive,xst=Cn.Attribute,tbe=Cn.Quantization,Tst=Cn.FeatureIdAttribute,Est=Cn.Material,Cst=Cn.MetallicRoughness,CZ=class extends nr{constructor(t){super(),t=t??H.EMPTY_OBJECT;let n=t.arrayBuffer,i=t.byteOffset??0;this._arrayBuffer=n,this._byteOffset=i,this._loadAttributesFor2D=t.loadAttributesFor2D??!1,this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=Tt.UNLOADED,this._buffers=[],this._components=void 0,this._transform=N.IDENTITY}get cacheKey(){}get components(){return this._components}get transform(){return this._transform}load(){if(l(this._promise))return this._promise;this._parsedContent=TT.parse(this._arrayBuffer,this._byteOffset),this._state=Tt.PROCESSING,this._promise=Promise.resolve(this)}process(t){if(l(this._error)){let n=this._error;throw this._error=void 0,n}if(this._state===Tt.READY)return!0;if(this._state===Tt.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=vst(this,t.context)}return!1}unload(){let t=this._buffers;for(let n=0;n<t.length;n++)t[n].destroy();t.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0}};function vst(e,t){let i=e._parsedContent.draco,r;if(l(i)?r=Og.decodePointCloud(i,t):r=Promise.resolve(),!!l(r))return e._decodePromise=r,r.then(function(o){if(!e.isDestroyed())return l(o)&&Sst(e,i,o),Bst(e,t),e._state=Tt.READY,e}).catch(function(o){e.unload(),e._state=Tt.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,o)})}function Sst(e,t,n){e._state=Tt.READY;let i=e._parsedContent,r;if(l(n.POSITION)){if(r={name:"POSITION",semantic:ct.POSITION,typedArray:n.POSITION.array,componentDatatype:Y.FLOAT,type:Vt.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,u=h.fromElements(c,c,c),f=h.unpack(a.minValues),d=(1<<a.quantizationBits)-1;r.isQuantized=!0,r.quantizedRange=d,r.quantizedVolumeOffset=f,r.quantizedVolumeScale=u,r.quantizedComponentDatatype=d<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT,r.quantizedType=Vt.VEC3}i.positions=r}if(l(n.NORMAL)){if(r={name:"NORMAL",semantic:ct.NORMAL,typedArray:n.NORMAL.array,componentDatatype:Y.FLOAT,type:Vt.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},l(n.NORMAL.data.quantization)){let a=(1<<n.NORMAL.data.quantization.quantizationBits)-1;r.quantizedRange=a,r.octEncoded=!0,r.octEncodedZXY=!0,r.quantizedComponentDatatype=Y.UNSIGNED_BYTE,r.quantizedType=Vt.VEC2}i.normals=r}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:ct.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:Y.UNSIGNED_BYTE,type:Vt.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:ct.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:Y.UNSIGNED_BYTE,type:Vt.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:ct.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:Y.fromTypedArray(a),type:Vt.SCALAR}}let o=i.batchTableJson,s=t.batchTableProperties;for(let a in s)if(s.hasOwnProperty(a)){let c=n[a];l(o)||(o={}),i.hasDracoBatchTable=!0;let u=c.data;o[a]={byteOffset:u.byteOffset,type:wst(u.componentsPerAttribute),componentType:Ist(u.componentDatatype),typedArray:c.array}}i.batchTableJson=o}function wst(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function Ist(e){switch(e){case te.BYTE:return"BYTE";case te.UNSIGNED_BYTE:return"UNSIGNED_BYTE";case te.SHORT:return"SHORT";case te.UNSIGNED_SHORT:return"UNSIGNED_SHORT";case te.INT:return"INT";case te.UNSIGNED_INT:return"UNSIGNED_INT";case te.DOUBLE:return"DOUBLE";case te.FLOAT:return"FLOAT"}}function xB(e,t,n){let i=t.typedArray,r;if(t.octEncoded&&(r=new tbe,r.octEncoded=t.octEncoded,r.octEncodedZXY=t.octEncodedZXY,r.normalizationRange=t.quantizedRange,r.type=t.quantizedType,r.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){r=new tbe;let a=t.quantizedRange;r.normalizationRange=a,r.quantizedVolumeOffset=h.ZERO;let c=t.quantizedVolumeScale;r.quantizedVolumeDimensions=c,r.quantizedVolumeStepSize=h.divideByScalar(c,a,new h),r.componentDatatype=t.quantizedComponentDatatype,r.type=t.quantizedType}let o=new xst;if(o.name=t.name,o.semantic=t.semantic,o.setIndex=t.setIndex,o.componentDatatype=t.componentDatatype,o.type=t.type,o.normalized=t.normalized??!1,o.min=t.min,o.max=t.max,o.quantization=r,t.isRGB565&&(i=cn.decodeRGB565(i)),l(t.constantColor)){let a=new Array(4);o.constant=z.pack(t.constantColor,a)}else{let a=nt.createVertexBuffer({typedArray:i,context:n,usage:Me.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),o.buffer=a}let s=e._loadAttributesFor2D;return o.semantic===ct.POSITION&&s&&(o.typedArray=i),o}var nbe,OH;function Pst(e){if(!l(OH)){nbe=new ibe.default(0),OH=new Array(e);for(let t=0;t<e;++t)OH[t]=nbe.random()}return OH}var Dst=new h,Rst=new h,Ost=new h;function Mst(e){let t=e.typedArray,n=20,i=t.length/3,r=Math.min(i,n),o=Pst(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=h.fromElements(s,s,s,Dst),u=h.fromElements(a,a,a,Rst),f,d,p;if(e.isQuantized)c=h.ZERO,u=e.quantizedVolumeScale;else for(f=0;f<r;++f)d=Math.floor(o[f]*i),p=h.unpack(t,d*3,Ost),h.minimumByComponent(c,p,c),h.maximumByComponent(u,p,u);e.min=h.clone(c),e.max=h.clone(u)}var Nst={name:ct.COLOR,semantic:ct.COLOR,setIndex:0,constantColor:z.DARKGRAY,componentDatatype:Y.FLOAT,type:Vt.VEC4,isQuantized:!1,isTranslucent:!1};function Lst(e,t,n){let i=[],r,o=t.positions;return l(o)&&(Mst(o),r=xB(e,o,n),r.count=t.pointsLength,i.push(r)),l(t.normals)&&(r=xB(e,t.normals,n),r.count=t.pointsLength,i.push(r)),l(t.colors)?(r=xB(e,t.colors,n),r.count=t.pointsLength,i.push(r)):(r=xB(e,Nst,n),r.count=t.pointsLength,i.push(r)),l(t.batchIds)&&(r=xB(e,t.batchIds,n),r.count=t.pointsLength,i.push(r)),i}function Fst(e,t){let n=e.batchLength,i=e.pointsLength,r=e.batchTableJson,o=e.batchTableBinary,s=!l(e.batchIds);return l(o)||l(r)||e.hasDracoBatchTable?Gg({count:n??i,batchTable:r,binaryBody:o,parseAsPropertyAttributes:s,customAttributeOutput:t}):new za({schema:{},propertyTables:[]})}function Bst(e,t){let n=e._parsedContent,i=new Cst;i.metallicFactor=0,i.roughnessFactor=.9;let r=new Est;r.metallicRoughness=i;let o=n.colors;l(o)&&o.isTranslucent&&(r.alphaMode=Gp.BLEND);let s=!l(n.normals);r.unlit=s;let a=new bst;if(a.attributes=Lst(e,n,t),a.primitiveType=Oe.POINTS,a.material=r,l(n.batchIds)){let g=new Tst;g.propertyTableId=0,g.setIndex=0,g.positionalLabel="featureId_0",a.featureIds.push(g)}let c=new Ast;c.index=0,c.primitives=[a];let u=new yst;u.nodes=[c],u.upAxis=Hi.Z,u.forwardAxis=Hi.X;let f=new _st;f.scene=u,f.nodes=[c];let d=[];f.structuralMetadata=Fst(n,d),d.length>0&&kst(e,a,d,t),l(n.rtcCenter)&&(f.transform=N.multiplyByTranslation(f.transform,n.rtcCenter,f.transform));let p=n.positions;l(p)&&p.isQuantized&&(f.transform=N.multiplyByTranslation(f.transform,p.quantizedVolumeOffset,f.transform)),e._components=f,e._parsedContent=void 0,e._arrayBuffer=void 0}function kst(e,t,n,i){let r=t.attributes,o=n.length;for(let s=0;s<o;s++){let a=n[s],c=nt.createVertexBuffer({typedArray:a.typedArray,context:i,usage:Me.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),a.buffer=c,a.typedArray=void 0,r.push(a)}t.propertyAttributeIds=[0]}var TB=CZ;var MH=new h,rbe=new h,obe=new h,EB=new h,Ust=new h,zst=new h,Vst=new he,jst=new ue;function NH(e,t,n,i){let r=t*n;return i.x=e[r],i.y=e[r+1],i.z=e[r+2],i}var Hst=32,vZ=new Map,SZ=[];function Gst(e,t,n,i,r,o){let s=e.origin.x,a=e.origin.y,c=e.origin.z,u=e.direction.x,f=e.direction.y,d=e.direction.z,p=D.EPSILON6;for(let g=0;g<i;g+=3){let m=n[g]*3,y=n[g+1]*3,A=n[g+2]*3,b=t[m],x=t[m+1],T=t[m+2],E=t[y]-b,v=t[y+1]-x,S=t[y+2]-T,I=t[A]-b,R=t[A+1]-x,O=t[A+2]-T,L=f*O-d*R,_=d*I-u*O,C=u*R-f*I,w=E*L+v*_+S*C,P=s-b,M=a-x,F=c-T,V;if(r){if(w<p)continue;let B=P*L+M*_+F*C;if(B<0||B>w)continue;let j=M*S-F*v,k=F*E-P*S,G=P*v-M*E,q=u*j+f*k+d*G;if(q<0||B+q>w)continue;V=(I*j+R*k+O*G)/w}else{if(Math.abs(w)<p)continue;let B=1/w,j=(P*L+M*_+F*C)*B;if(j<0||j>1)continue;let k=M*S-F*v,G=F*E-P*S,q=P*v-M*E,Q=(u*k+f*G+d*q)*B;if(Q<0||j+Q>1)continue;V=(I*k+R*G+O*q)*B}V>=0&&V<o&&(o=V)}return o}function ZS(e,t,n,i,r,o,s){if(!e._ready||n.mode===re.MORPHING)return;let a=Number.MAX_VALUE;o=o??ee.default,i=i??1,r=r??0;let c=n.mode!==re.SCENE3D?n.mapProjection:void 0;if(ba.forEachPrimitive(e,{mapProjection:c},function(u,f,d,p){if(l(u.boundingSphere)&&d.length===1){let T=ue.transform(u.boundingSphere,p,jst),E=_i.raySphere(t,T);if(!l(E))return}if(!l(f.indices))return;let g,m,y=xt.getAttributeBySemantic(f,ct.POSITION),A=vZ.get(f);l(A)||(A={},l(y)&&(A.vertices=ba.readAttributeAsTypedArray(y)),l(f.indices)&&(A.indices=ba.readIndicesAsTypedArray(f.indices)),vZ.set(f,A),SZ.push(f),SZ.length>Hst&&vZ.delete(SZ.shift())),l(y)&&(m=Vt.getNumberOfComponents(y.type),g=A.vertices);let b=A.indices;if(!l(b)||!l(g))return;let x=b.length;if(d.length===1&&i===1){let T=d[0].transform;if(!l(A.world)||!N.equals(A.worldTransform,T)){let I=g.length/m,R=new Float64Array(I*3);for(let O=0;O<I;O++)NH(g,O,m,MH),N.multiplyByPoint(T,MH,EB),R[O*3]=EB.x,R[O*3+1]=EB.y,R[O*3+2]=EB.z;A.world=R,A.worldTransform=N.clone(T,A.worldTransform)}let E=A.world,v=e.backFaceCulling??!0,S=Gst(t,E,b,x,v,a);S<a&&(a=S);return}for(let T=0;T<x;T+=3){let E=b[T],v=b[T+1],S=b[T+2];NH(g,E,m,MH),NH(g,v,m,rbe),NH(g,S,m,obe);for(let I of d){let R=N.multiplyByPoint(I.transform,MH,EB),O=N.multiplyByPoint(I.transform,rbe,Ust),L=N.multiplyByPoint(I.transform,obe,zst);i!==1&&(Ar.getPosition(R,o,i,r,R),Ar.getPosition(O,o,i,r,O),Ar.getPosition(L,o,i,r,L));let _=_i.rayTriangleParametric(t,R,O,L,e.backFaceCulling??!0);l(_)&&_<a&&_>=0&&(a=_)}}}),a!==Number.MAX_VALUE){if(s=pn.getPoint(t,a,s),n.mode!==re.SCENE3D){h.fromElements(s.y,s.z,s.x,s);let u=n.mapProjection,f=u.ellipsoid,d=u.unproject(s,Vst);f.cartographicToCartesian(d,s)}return s}}var wZ=class{constructor(t){this.show=t.show,this.alpha=t.alpha,this.brightness=t.brightness,this.contrast=t.contrast,this.hue=t.hue,this.saturation=t.saturation,this.gamma=t.gamma,this.colorToAlpha=t.colorToAlpha}},CB=wZ;var IZ=class{constructor(t){this._model=t,this._modelPrimitiveImageries=void 0,this._imageryConfigurations=[]}update(t){if(!this._hasImagery){this._deleteModelPrimitiveImageries();return}this._allImageryLayersReady&&(l(this._modelPrimitiveImageries)||(this._modelPrimitiveImageries=this._createModelPrimitiveImageries()),this._updateModelPrimitiveImageries(t),this._checkForModifiedImageryConfigurations())}_createModelPrimitiveImageries(){let t=this._model,n=this._collectRuntimeNodesAndPrimitives(),i=[],r=n.length;for(let o=0;o<r;o++){let s=n[o],a=s.runtimeNode,c=s.runtimePrimitive,u=new yT(t,a,c);c.primitive.modelPrimitiveImagery=u,i.push(u)}return i}_collectRuntimeNodesAndPrimitives(){let i=this._model.sceneGraph._runtimeNodes,r=[];for(let o=0;o<i.length;o++){let s=i[o];if(l(s))for(let a=0;a<s.runtimePrimitives.length;a++){let c=s.runtimePrimitives[a];r.push({runtimeNode:s,runtimePrimitive:c})}}return r}_updateModelPrimitiveImageries(t){if(!l(this._modelPrimitiveImageries))throw new pe("The modelPrimitiveImageries have not been created");let n=this._modelPrimitiveImageries,i=n.length;for(let r=0;r<i;r++)n[r].update(t)}_deleteModelPrimitiveImageries(){let t=this._modelPrimitiveImageries;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++)t[i].destroy();delete this._modelPrimitiveImageries,this._model.resetDrawCommands()}get ready(){return this._hasImagery?!(!this._allImageryLayersReady||!this._allModelPrimitiveImageriesReady):!0}get _hasImagery(){let n=this._model.imageryLayers;return l(n)&&n.length>0}get _allImageryLayersReady(){if(!this._hasImagery)return!0;let t=this._model.imageryLayers,n=t.length;for(let i=0;i<n;i++)if(!t.get(i).ready)return!1;return!0}get _allModelPrimitiveImageriesReady(){let t=this._modelPrimitiveImageries;if(!l(t))return!1;let n=t.length;for(let i=0;i<n;i++)if(!t[i].ready)return!1;return!0}_checkForModifiedImageryConfigurations(){this._imageryConfigurationsModified()&&(this._updateImageryConfigurations(),this._model.resetDrawCommands())}_imageryConfigurationsModified(){let n=this._model.imageryLayers,i=this._imageryConfigurations;if(n.length!==i.length)return!0;for(let r=0;r<n.length;r++){let o=n.get(r),s=i[r];if(o.show!==s.show||o.alpha!==s.alpha||o.brightness!==s.brightness||o.contrast!==s.contrast||o.hue!==s.hue||o.saturation!==s.saturation||o.gamma!==s.gamma||o.colorToAlpha!==s.colorToAlpha)return!0}return!1}_updateImageryConfigurations(){let n=this._model.imageryLayers,i=this._imageryConfigurations;i.length=n.length;for(let r=0;r<n.length;r++){let o=n.get(r);i[r]=new CB(o)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),le(this)}},vB=IZ;function Cr(e){e=e??H.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??Wo.GLTF,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=N.clone(this.modelMatrix),this._scale=e.scale??1,this._minimumPixelSize=e.minimumPixelSize??0,this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=$.clone($.IDENTITY),this._clippingPlanesMatrix=N.clone(N.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new pL(this),this._clampAnimations=e.clampAnimations??!0,this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=z.clone(e.color),this._colorBlendMode=e.colorBlendMode??ll.HIGHLIGHT,this._colorBlendAmount=e.colorBlendAmount??.5;let t=e.silhouetteColor??z.RED;this._silhouetteColor=z.clone(t),this._silhouetteSize=e.silhouetteSize??0,this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=e.cull??!0,this._opaquePass=e.opaquePass??Ie.OPAQUE,this._allowPicking=e.allowPicking??!0,this._show=e.show??!0,this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new ue,this._initialRadius=void 0,this._heightReference=e.heightReference??We.NONE,this._heightDirty=this._heightReference!==We.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=e.enableVerticalExaggeration??!0,this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0,this._heightAboveSurface=void 0,this._lastSurfaceHeight=void 0,this._lastSurfaceQueryFrame=-1,this._lastSurfaceQueryMissed=!1;let r=e.scene;l(r)&&l(r.terrainProviderChanged)&&(this._terrainProviderChangedCallback=r.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=r,this._distanceDisplayCondition=e.distanceDisplayCondition;let o=new Yp(e.pointCloudShading);this._pointCloudShading=o,this._attenuation=o.attenuation,this._pointCloudBackFaceCulling=o.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?bs.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0;let a=e.clippingPolygons;l(a)&&a.owner===void 0?Mc.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._clippingPolygonsNeedRebake=!1,this._removeClippingPolygonAdded=void 0,this._removeClippingPolygonRemoved=void 0,cbe(this),this._vectorData=void 0,this._vectorLookupFlags=0,this._clippingPolygonData=void 0,this._rectangle=new ie,this._modelImagery=new vB(this),this._lightColor=h.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new Gx,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new kg(e.environmentMapOptions);kg.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??Dn.ENABLED,this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this._enableShowOutline=e.enableShowOutline??!0,this._debugWireframe=e.debugWireframe??!1,this._edgeDisplayMode=e.edgeDisplayMode??Hd.SURFACES_ONLY,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Wo.GLTF&&_t("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltf, otherwise debugWireframe will be ignored.");let u=e.credit;typeof u=="string"&&(u=new It(u)),this._credits=[],this._credit=u,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Vo.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??z.BLACK,this._classificationType=e.classificationType,this._statistics=new bB,this._sceneMode=void 0,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this._fogRenderable=void 0,this._skipLevelOfDetail=!1,this._ignoreCommands=e.ignoreCommands??!1,this._errorEvent=new be,this._readyEvent=new be,this._texturesReadyEvent=new be,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function PZ(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function Wst(e,t){let n=e._featureTables,i=t.propertyTables,r=i.length;for(let o=0;o<r;o++){let s=i[o],a=new _L({model:e,propertyTable:s});n.push(a)}return n}function qst(e,t){let n=t._featureIdLabel,i=t._instanceFeatureIdLabel,r,o,s,a;for(r=0;r<e.nodes.length;r++)if(a=e.nodes[r],l(a.instances)&&(s=xt.getFeatureIdsByLabel(a.instances.featureIds,i),l(s)&&l(s.propertyTableId)))return s.propertyTableId;for(r=0;r<e.nodes.length;r++)for(a=e.nodes[r],o=0;o<a.primitives.length;o++){let c=a.primitives[o],u=xt.getFeatureIdsByLabel(c.featureIds,n);if(l(u))return u.propertyTableId}if(t._featureTables.length===1)return 0}function OZ(e,t){if(!l(e)&&!l(t))return!1;if(l(e)!==l(t))return!0;let n=e.alpha,i=t.alpha;return Math.floor(n)!==Math.floor(i)||Math.ceil(n)!==Math.ceil(i)}Object.defineProperties(Cr.prototype,{ready:{get:function(){return this._ready}},errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},incrementallyLoadTextures:{get:function(){return this._loader.incrementallyLoadTextures??!1}},texturesReadyEvent:{get:function(){return this._texturesReadyEvent}},loader:{get:function(){return this._loader}},statistics:{get:function(){return this._statistics}},activeAnimations:{get:function(){return this._activeAnimations}},clampAnimations:{get:function(){return this._clampAnimations},set:function(e){this._clampAnimations=e}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){e!==this._pointCloudShading&&this.resetDrawCommands(),this._pointCloudShading=e}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},sceneGraph:{get:function(){return this._sceneGraph}},content:{get:function(){return this._content}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightDirty=!0),this._heightReference=e}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=jt.clone(e,this._distanceDisplayCondition)}},structuralMetadata:{get:function(){return this._sceneGraph.components.structuralMetadata}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},id:{get:function(){return this._id},set:function(e){e!==this._id&&(this._idDirty=!0),this._id=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}},color:{get:function(){return this._color},set:function(e){OZ(e,this._color)&&this.resetDrawCommands(),this._color=z.clone(e,this._color)}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},silhouetteColor:{get:function(){return this._silhouetteColor},set:function(e){if(!z.equals(e,this._silhouetteColor)){let t=OZ(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=z.clone(e,this._silhouetteColor)}},silhouetteSize:{get:function(){return this._silhouetteSize},set:function(e){if(e!==this._silhouetteSize){let t=this._silhouetteSize,n=e>0&&t===0||e===0&&t>0;this._silhouetteDirty=this._silhouetteDirty||n,this._backFaceCullingDirty=this._backFaceCullingDirty||n}this._silhouetteSize=e}},heightAboveSurface:{get:function(){return this._heightAboveSurface}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return ube(this,e),this._boundingSphere}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},debugWireframe:{get:function(){return this._debugWireframe},set:function(e){this._debugWireframe!==e&&this.resetDrawCommands(),this._debugWireframe=e,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Wo.GLTF&&_t("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},edgeDisplayMode:{get:function(){return this._edgeDisplayMode},set:function(e){this._edgeDisplayMode=e}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(bs.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Mc.setOwner(e,this,"_clippingPolygons"),cbe(this),this.resetDrawCommands(),this._clippingPolygonsState=0,this._clippingPolygonsNeedRebake=!0,l(this._clippingPolygonData)&&(Mc.releaseRectangleData(this._clippingPolygonData),this._clippingPolygonData=void 0))}},enableVerticalExaggeration:{get:function(){return this._enableVerticalExaggeration},set:function(e){e!==this._enableVerticalExaggeration&&this.resetDrawCommands(),this._enableVerticalExaggeration=e}},hasVerticalExaggeration:{get:function(){return this._hasVerticalExaggeration}},imageryLayers:{get:function(){if(l(this._content)){let e=this._content.tileset;if(l(e))return e.imageryLayers}}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=h.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},environmentMapManager:{get:function(){return this._environmentMapManager},set:function(e){e!==this.environmentMapManager&&(kg.setOwner(e,this,"_environmentMapManager"),this.resetDrawCommands())}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){e!==this._backFaceCulling&&(this._backFaceCullingDirty=!0),this._backFaceCulling=e}},scale:{get:function(){return this._scale},set:function(e){e!==this._scale&&(this._updateModelMatrix=!0),this._scale=e}},computedScale:{get:function(){return this._computedScale}},minimumPixelSize:{get:function(){return this._minimumPixelSize},set:function(e){e!==this._minimumPixelSize&&(this._updateModelMatrix=!0),this._minimumPixelSize=e}},maximumScale:{get:function(){return this._maximumScale},set:function(e){e!==this._maximumScale&&(this._updateModelMatrix=!0),this._maximumScale=e}},shadows:{get:function(){return this._shadows},set:function(e){e!==this._shadows&&(this._shadowsDirty=!0),this._shadows=e}},credit:{get:function(){return this._credit}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen!==e&&(this._showCreditsOnScreenDirty=!0),this._showCreditsOnScreen=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&this.resetDrawCommands(),this._splitDirection=e}},classificationType:{get:function(){return this._classificationType}},pickIds:{get:function(){return this._pickIds}},styleCommandsNeeded:{get:function(){return this._styleCommandsNeeded}}});Cr.prototype.getRectangle=function(e){let t=this._content?.tile?.contentBoundingVolume;return l(t?.rectangle)?t.rectangle:(e=e??this._scene?.ellipsoid??ee.default,ie.fromBoundingSphere(this.boundingSphere,e,this._rectangle))};Cr.prototype.getNode=function(e){return this._nodesByName[e]};Cr.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};Cr.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};Cr.prototype.getExtension=function(e){return this._loader.components.extensions[e]};Cr.prototype.makeStyleDirty=function(){this._styleDirty=!0};Cr.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var Yst=new N,Xst=new $,Kst=new N;Cr.prototype.update=function(e){let t=!1;try{t=$st(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")PZ(this,i);else{let r=xt.getError("model",this._resource,i);PZ(this,r)}}if(Jst(this,e),Zst(this,e),Qst(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let s=xt.getError("model",this._resource,new oe("Failed to load model."));PZ(s),this._rejectLoad=this._rejectLoad&&this._rejectLoad(s)}let r=i.structuralMetadata;l(r)&&r.propertyTableCount>0&&Wst(this,r);let o=new AB({model:this,modelComponents:i});this._sceneGraph=o,this._gltfCredits=o.components.asset.credits}if(!this._resourcesLoaded||e.mode===re.MORPHING)return;let n=this._modelImagery;if(n.update(e),!(!n.ready&&!(this._content?.tileset?._asynchronouslyLoadImagery??!1))){if(eat(this),tat(this),nat(this,e),iat(this),rat(this,e),oat(this,e),sat(this,e),aat(this,e),uat(this,e),fat(this,e),dat(this,e),hat(this,e),this._defaultTexture=e.context.defaultTexture,mat(this,e),gat(this,e),Aat(this),bat(this,e),Cat(this,e),!this._ready){e.afterRender.push(()=>{this._ready=!0,this._readyEvent.raiseEvent(this)});return}this._loader.incrementallyLoadTextures&&!this._texturesLoaded&&this._loader.texturesLoaded&&(this.resetDrawCommands(),this._texturesLoaded=!0,this._texturesReadyEvent.raiseEvent(this)),Tat(this),vat(this,e),Sat(this),Iat(this,e)}};function $st(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function Jst(e,t){l(e._customShader)&&e._customShader.update(t)}function Zst(e,t){let n=e._environmentMapManager,i=t.passes.pick||t.passes.pickVoxel;e._ready&&n.owner===e&&!i&&(n.position=e._boundingSphere.center,n.shouldUpdate=!l(e._imageBasedLighting.sphericalHarmonicCoefficients)||!l(e._imageBasedLighting.specularEnvironmentMaps),n.update(t),n.shouldRegenerateShaders&&e.resetDrawCommands())}function Qst(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function eat(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=qst(t,e),e._styleDirty=!0,e.resetDrawCommands())}function tat(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function nat(e,t){let n=e._featureTables,i=n.length,r=!1;for(let o=0;o<i;o++)n[o].update(t),n[o].styleCommandsNeededDirty&&(r=!0);r&&abe(e)}function abe(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=mm.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function iat(e){let t=e.pointCloudShading;t.attenuation!==e._attenuation&&(e.resetDrawCommands(),e._attenuation=t.attenuation),t.backFaceCulling!==e._pointCloudBackFaceCulling&&(e.resetDrawCommands(),e._pointCloudBackFaceCulling=t.backFaceCulling)}function rat(e,t){e._silhouetteDirty&&(dbe(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function oat(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function sat(e,t){let n=0;e.isClippingEnabled()&&(e._clippingPlanes.owner===e&&e._clippingPlanes.update(t),n=e._clippingPlanes.clippingPlanesState),n!==e._clippingPlanesState&&(e.resetDrawCommands(),e._clippingPlanesState=n)}function cbe(e){e._removeClippingPolygonAdded=e._removeClippingPolygonAdded&&e._removeClippingPolygonAdded(),e._removeClippingPolygonRemoved=e._removeClippingPolygonRemoved&&e._removeClippingPolygonRemoved();let t=e._clippingPolygons;if(!l(t)||t.owner!==e)return;let n=()=>{e._clippingPolygonsNeedRebake=!0};e._removeClippingPolygonAdded=t.polygonAdded.addEventListener(n),e._removeClippingPolygonRemoved=t.polygonRemoved.addEventListener(n)}function aat(e,t){let n=e._clippingPolygons,i=e.isClippingPolygonsEnabled(),r=0;i&&(n.owner===e&&n.update(t),r=n.clippingPolygonsState),r!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=r);let o=(e._clippingPolygonData?.polygonRings.length??0)>0;if(e._clippingPolygonsNeedRebake&&(e._clippingPolygonsNeedRebake=!1,l(e._clippingPolygonData)&&(Mc.releaseRectangleData(e._clippingPolygonData),e._clippingPolygonData=void 0)),!i||!e._ready)return;l(e._clippingPolygonData)||(e._clippingPolygonData=n.requestRectangleData(e.getRectangle(n.ellipsoid),t.context));let s=(e._clippingPolygonData?.polygonRings.length??0)>0;o!==s&&e.resetDrawCommands()}var cat=new ie;function lbe(e){l(e._vectorData)&&(e._scene?.vectorProvider?.releaseTileData(e._vectorData),e._vectorData=void 0)}function lat(e){if(e?.show!==!0)return 0;let t=1;return t|=e.hasPolylines?2:0,t|=e.hasPolygons?4:0,t}function uat(e,t){let n=e._scene?.vectorProvider;if(l(n)&&l(e._content)&&e.ready&&t.mode===re.SCENE3D){let o=e._content?.tile?.contentBoundingVolume.rectangle??ie.fromBoundingSphere(e.boundingSphere,n.ellipsoid,cat);e._vectorData=l(e._vectorData)?n.updateDataForRectangle(o,t.context,e._vectorData,We.CLAMP_TO_3D_TILE):n.requestDataForRectangle(o,t.context,We.CLAMP_TO_3D_TILE)}else lbe(e);let r=lat(e._vectorData);r!==e._vectorLookupFlags&&(e.resetDrawCommands(),e._vectorLookupFlags=r)}function fat(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function dat(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function hat(e,t){if(e.enableVerticalExaggeration){let n=t.verticalExaggeration!==1;e.hasVerticalExaggeration!==n&&(e.resetDrawCommands(),e._hasVerticalExaggeration=n)}else e.hasVerticalExaggeration&&(e.resetDrawCommands(),e._hasVerticalExaggeration=!1)}function mat(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function pat(e,t){if(e===t)return!0;if(!l(e)||!l(t))return!1;for(let n=0;n<16;n++)if(e[n]!==t[n])return!1;return!0}function MZ(e,t){if(!l(e)||!l(t))return N.clone(e,t);for(let n=0;n<16;n++)t[n]=e[n];return t}function gat(e,t){pat(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=MZ(e.modelMatrix,e._modelMatrix))}var SA=new h,DZ=new he,_at=new he,yat=200,sbe=30;function Aat(e){let t=e.heightReference!==We.NONE&&l(e._scene)&&e._scene.frameState.frameNumber-e._lastSurfaceQueryFrame>=sbe;if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0&&!t)return;if(!e._updateModelMatrix&&!e._heightDirty&&l(e._removeUpdateHeightCallback)&&!t){e._updateModelMatrix=!0;return}let n=e._scene;if(!l(n)||e.heightReference===We.NONE){l(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0),e._clampedModelMatrix=void 0;return}let i=n.ellipsoid??ee.default,r=e.modelMatrix;SA.x=r[12],SA.y=r[13],SA.z=r[14];let o=i.cartesianToCartographic(SA,_at);l(e._clampedModelMatrix)||(e._clampedModelMatrix=N.clone(r,new N));let s=n.frameState.frameNumber,a=e.heightReference===We.CLIP_TO_GROUND,c=s-e._lastSurfaceQueryFrame<sbe,u=a&&l(e._lastSurfaceHeight)&&o.height>e._lastSurfaceHeight+yat,f=u&&c,d=a&&c&&e._lastSurfaceQueryMissed;if(!((a&&e._lastSurfaceQueryMissed||u)&&l(e._removeUpdateHeightCallback))){l(e._removeUpdateHeightCallback)&&e._removeUpdateHeightCallback();let y=he.clone(o),A=Nat(e,i,y);e._removeUpdateHeightCallback=n.updateHeight(y,b=>{let x=n.getHeight(y,e.heightReference);l(x)&&(b.height=x,e._lastSurfaceQueryFrame=n.frameState.frameNumber,e._lastSurfaceQueryMissed=!1),e._lastSurfaceHeight=b.height,A(b)},e.heightReference)}let m;f||d?m=e._lastSurfaceHeight:(e._lastSurfaceQueryFrame=s,m=n.getHeight(o,e.heightReference),e._lastSurfaceQueryMissed=!l(m),l(m)?e._lastSurfaceHeight=m:m=e._lastSurfaceHeight),l(m)?(he.clone(o,DZ),DZ.height=m,fbe(e,i,o,DZ)):MZ(r,e._clampedModelMatrix),e._heightDirty=!1,e._updateModelMatrix=!0}function bat(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;ube(e,n),xat(e,n,t)}function ube(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=h.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=ue.transform(e._boundingSphere,t,e._boundingSphere)}function xat(e,t,n){let i=e.scale;if(e.minimumPixelSize!==0&&!e._projectTo2D){let r=n.context,o=Math.max(r.drawingBufferWidth,r.drawingBufferHeight);N.getTranslation(t,SA),e._sceneMode!==re.SCENE3D&&dr.computeActualEllipsoidPosition(n,SA,SA);let s=e._boundingSphere.radius,a=Pat(SA,s,n),c=1/a;Math.min(c*(2*s),o)<e.minimumPixelSize&&(i=e.minimumPixelSize*a/(2*e._initialRadius))}e._computedScale=l(e.maximumScale)?Math.min(e.maximumScale,i):i}function Tat(e){if(!e._idDirty)return;e._idDirty=!1;let t=e._id,n=e._pickIds,i=n.length;for(let r=0;r<i;++r)n[r].object.id=t}var Eat=new $(1,0,0,0,0,1,0,-1,0);function Cat(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,r=t.context,o=Xst,s=Yst;if(s=N.multiply(r.uniformState.view3D,i,s),o=N.getRotation(s,o),o=$.transpose(o,o),e._iblReferenceFrameMatrix=$.multiply(Eat,o,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=N.multiply(i,e._clippingPlanes.modelMatrix,Kst);e._clippingPlanesMatrix=N.inverseTranspose(a,e._clippingPlanesMatrix)}}function vat(e,t){let n=e._sceneGraph;if(e._updateModelMatrix||e._minimumPixelSize!==0){let r=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(r,t),e._updateModelMatrix&&(e._clippingPolygonsNeedRebake=!0),e._updateModelMatrix=!1}e._backFaceCullingDirty&&(n.updateBackFaceCulling(e._backFaceCulling),e._backFaceCullingDirty=!1),e._shadowsDirty&&(n.updateShadows(e._shadows),e._shadowsDirty=!1),e._debugShowBoundingVolumeDirty&&(n.updateShowBoundingVolume(e._debugShowBoundingVolume),e._debugShowBoundingVolumeDirty=!1);let i=!1;!l(e.classificationType)&&e._show&&(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}function Sat(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let s=It.clone(e._credit);s.showOnScreen=s.showOnScreen||t,e._credits.push(s)}let n=e._resourceCredits,i=n.length;for(let s=0;s<i;s++){let a=It.clone(n[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}let r=e._gltfCredits,o=r.length;for(let s=0;s<o;s++){let a=It.clone(r[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function wat(e){return e.isClippingPolygonsEnabled()&&e._clippingPolygons.inverse&&(e._clippingPolygonData?.polygonRings.length??0)===0}function Iat(e,t){let n=Fat(e,t),i=e.isInvisible(),r=e.hasSilhouette(t),o=e._show&&e._computedScale!==0&&n&&(!i||r)&&!wat(e),s=t.passes,a=s.render||s.pick&&e.allowPicking;o&&!e._ignoreCommands&&a&&(Bat(e,t),e._sceneGraph.pushDrawCommands(t))}var RZ=new ue;function Pat(e,t,n){return RZ.center=e,RZ.radius=t,n.camera.getPixelSize(RZ,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var LH=new h,Dat=new h,FH=new h,Rat=new h,Oat=new N;function Mat(e,t,n){let i=e._sceneGraph;if(!l(i)||!l(i._positionMin))return 0;let r=i._positionMin,o=i._positionMax,s=t.geodeticSurfaceNormalCartographic(n,Rat),a=N.multiplyTransformation(i._components.transform,i._axisCorrectionMatrix,Oat),c=e.scale,u=e.modelMatrix,f=0;for(let d=0;d<8;d++){let p=h.fromElements(d&1?o.x:r.x,d&2?o.y:r.y,d&4?o.z:r.z,Dat);h.multiplyByScalar(p,c,p),N.multiplyByPoint(a,p,FH),N.multiplyByPointAsVector(u,FH,FH);let g=h.dot(FH,s);g<f&&(f=g)}return-f}function fbe(e,t,n,i){if(e.heightReference===We.CLIP_TO_GROUND){let o=i.height+Mat(e,t,i);e._heightAboveSurface=Math.max(0,n.height-o),i.height=Math.max(n.height,o)}else Fy(e.heightReference)&&(i.height+=n.height);t.cartographicToCartesian(i,LH);let r=e._clampedModelMatrix;MZ(e.modelMatrix,r),r[12]=LH.x,r[13]=LH.y,r[14]=LH.z,e._heightDirty=!0}function Nat(e,t,n){return function(i){fbe(e,t,n,i)}}var Lat=new h;function Fat(e,t){let n=e.distanceDisplayCondition;if(!l(n))return!0;let i=n.near*n.near,r=n.far*n.far,o;if(t.mode===re.SCENE2D){let a=(t.camera.frustum.right-t.camera.frustum.left)*.5;o=a*a}else{let s=N.getTranslation(e.modelMatrix,Lat);dr.computeActualEllipsoidPosition(t,s,s),o=h.distanceSquared(s,t.camera.positionWC)}return o>=i&&o<=r}function Bat(e,t){let n=t.creditDisplay,i=e._credits,r=i.length;for(let o=0;o<r;o++)n.addCreditToNextFrame(i[o])}Cr.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};Cr.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function dbe(e){return e.context.stencilBuffer}Cr.prototype.hasSilhouette=function(e){return dbe(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};Cr.prototype.hasSkipLevelOfDetail=function(e){if(!Wo.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};Cr.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};Cr.prototype.pick=function(e,t,n,i,r){return ZS(this,e,t,n,i,r)};Cr.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};Cr.prototype.hasDrapedVectors=function(){return this._vectorData?.show===!0};Cr.prototype.isDestroyed=function(){return!1};Cr.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let r=t.length;for(let o=0;o<r;o++)t[o].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),lbe(this),l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),l(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0),this._removeClippingPolygonAdded=this._removeClippingPolygonAdded&&this._removeClippingPolygonAdded(),this._removeClippingPolygonRemoved=this._removeClippingPolygonRemoved&&this._removeClippingPolygonRemoved();let n=this._clippingPlanes;l(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0,l(this._clippingPolygonData)&&Mc.releaseRectangleData(this._clippingPolygonData),this._clippingPolygonData=void 0,this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0;let i=this._environmentMapManager;!i.isDestroyed()&&i.owner===this&&i.destroy(),this._environmentMapManager=void 0,le(this)};Cr.prototype.destroyPipelineResources=function(){let e=this._pipelineResources;for(let t=0;t<e.length;t++)e[t].destroy();this._pipelineResources.length=0,this._pickIds.length=0};Cr.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};Cr.fromGltfAsync=async function(e){e=e??H.EMPTY_OBJECT;let t=e.url??e.gltf,n={releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},i=e.basePath??"",r=De.createIfNeeded(i);l(t.asset)?(n.gltfJson=t,n.baseResource=r,n.gltfResource=r):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=r,n.gltfResource=r):n.gltfResource=De.createIfNeeded(t);let o=new Lf(n),a=l(e.content)?Wo.TILE_GLTF:Wo.GLTF,c=n.gltfResource,u=SB(o,a,e);u.resource=c,u.environmentMapOptions=e.environmentMapOptions;try{await o.load()}catch(g){throw o.destroy(),xt.getError("model",c,g)}let f=e.gltfCallback;l(f)&&f(o.gltfJson);let d=new Cr(u),p=d._resource.credits;if(l(p)){let g=p.length;for(let m=0;m<g;m++)d._resourceCredits.push(It.clone(p[m]))}return d};Cr.fromB3dm=async function(e){let t={b3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},n=new sL(t);try{await n.load();let i=SB(n,Wo.TILE_B3DM,e);return new Cr(i)}catch(i){throw n.destroy(),i}};Cr.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new TB(t);try{await n.load();let i=SB(n,Wo.TILE_PNTS,e);return new Cr(i)}catch(i){throw n.destroy(),i}};Cr.fromI3dm=async function(e){let t={i3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline},n=new lL(t);try{await n.load();let i=SB(n,Wo.TILE_I3DM,e);return new Cr(i)}catch(i){throw n.destroy(),i}};Cr.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new aL(t),i=SB(n,Wo.TILE_GEOJSON,e);return new Cr(i)};var kat=new z;Cr.prototype.applyColorAndShow=function(e){let t=z.clone(this._color,kat),n=l(e)&&l(e.color),i=l(e)&&l(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):z.clone(z.WHITE,this._color),this._show=i?e.show.evaluate(void 0):!0,OZ(t,this._color)&&this.resetDrawCommands()};Cr.prototype.applyStyle=function(e){let t=this.type===Wo.TILE_PNTS,n=l(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,r=l(i)&&l(i[0]);if(t&&(!n||r)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),abe(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function SB(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,enableVerticalExaggeration:n.enableVerticalExaggeration,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,edgeDisplayMode:n.edgeDisplayMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var jf=Cr;var NZ=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){let t=this._model,n=t.featureTables,i=t.featureTableId;return l(n)&&l(n[i])?n[i].featuresLength:0}get pointsLength(){return this._model.statistics.pointsLength}get trianglesLength(){return this._model.statistics.trianglesLength}get geometryByteLength(){return this._model.statistics.geometryByteLength}get texturesByteLength(){return this._model.statistics.texturesByteLength}get batchTableByteLength(){let t=this._model.statistics;return t.propertyTablesByteLength+t.batchTexturesByteLength}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){let t=this._model,n=t.featureTables,i=t.featureTableId;if(l(n)&&l(n[i]))return n[i]}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getTextureIds(){return this._model.statistics.getTextureIds()}getTextureByteLengthById(t){return this._model.statistics.getTextureByteLengthById(t)}getExtension(t){return this._model.getExtension(t)}getFeature(t){let n=this._model,i=n.featureTableId;return n.featureTables[i].getFeature(t)}hasProperty(t,n){let i=this._model,r=i.featureTableId;return l(r)?i.featureTables[r].hasProperty(t,n):!1}applyDebugSettings(t,n){n=t?n:z.WHITE,this.featuresLength===0?this._model.color=n:l(this.batchTable)&&this.batchTable.setAllColor(n)}applyStyle(t){this._model.style=t}update(t,n){let i=this._model,r=this._tile;i.colorBlendAmount=t.colorBlendAmount,i.colorBlendMode=t.colorBlendMode,i.modelMatrix=r.computedTransform,i.customShader=t.customShader,i.featureIdLabel=t.featureIdLabel,i.instanceFeatureIdLabel=t.instanceFeatureIdLabel,i.lightColor=t.lightColor,i.imageBasedLighting=t.imageBasedLighting,i.backFaceCulling=t.backFaceCulling,i.shadows=t.shadows,i.showCreditsOnScreen=t.showCreditsOnScreen,i.splitDirection=t.splitDirection,i.debugWireframe=t.debugWireframe,i.edgeDisplayMode=t.edgeDisplayMode,i.showOutline=t.showOutline,i.outlineColor=t.outlineColor,i.pointCloudShading=t.pointCloudShading;let o=t.clippingPlanes;i.referenceMatrix=t.clippingPlanesOriginMatrix,l(o)&&r.clippingPlanesDirty&&(i._clippingPlanes=o.enabled&&r._isClipped?o:void 0);let s=t.environmentMapManager;i.environmentMapManager!==o&&(i._environmentMapManager=s),l(o)&&l(i._clippingPlanes)&&i._clippingPlanes!==o&&(i._clippingPlanes=o,i._clippingPlanesState=0);let a=t.clippingPolygons;l(a)&&r.clippingPolygonsDirty&&(i._clippingPolygons=a.enabled&&r._isClippedByPolygon?a:void 0),l(a)&&l(i._clippingPolygons)&&i._clippingPolygons!==a&&(i._clippingPolygons=a,i._clippingPolygonsState=0),r.clippingPolygonsNeedRebake&&(i._clippingPolygonsNeedRebake=!0),i.update(n),!this._ready&&i.ready&&(i.activeAnimations.addAll({loop:Hu.REPEAT}),this._ready=!0)}isDestroyed(){return!1}destroy(){return this._model=this._model&&this._model.destroy(),le(this)}static async fromGltf(t,n,i,r){let o=new e(t,n,i),a=wB(t,n,o,{gltf:r,basePath:i}),c=t.vectorClassificationOnly?void 0:t.classificationType;a.classificationType=c;let u=await jf.fromGltfAsync(a);return o._model=u,o}static async fromB3dm(t,n,i,r,o){let s=new e(t,n,i),c=wB(t,n,s,{arrayBuffer:r,byteOffset:o,resource:i}),u=t.vectorClassificationOnly?void 0:t.classificationType;c.classificationType=u;let f=await jf.fromB3dm(c);return s._model=f,s}static async fromI3dm(t,n,i,r,o){let s=new e(t,n,i),c=wB(t,n,s,{arrayBuffer:r,byteOffset:o,resource:i}),u=await jf.fromI3dm(c);return s._model=u,s}static async fromPnts(t,n,i,r,o){let s=new e(t,n,i),c=wB(t,n,s,{arrayBuffer:r,byteOffset:o,resource:i}),u=await jf.fromPnts(c);return s._model=u,s}static async fromGeoJson(t,n,i,r){let o=new e(t,n,i),a=wB(t,n,o,{geoJson:r,resource:i}),c=await jf.fromGeoJson(a);return o._model=c,o}pick(t,n,i){if(!l(this._model)||!this._ready)return;let r=n.verticalExaggeration,o=n.verticalExaggerationRelativeHeight;return this._model.pick(t,n,r,o,ee.WGS84,i)}};function wB(e,t,n,i){let r={cull:!1,releaseGltfJson:!0,opaquePass:Ie.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,scene:e._scene,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount,lightColor:e.lightColor,imageBasedLighting:e.imageBasedLighting,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,pointCloudShading:e.pointCloudShading,clippingPlanes:e.clippingPlanes,backFaceCulling:e.backFaceCulling,shadows:e.shadows,showCreditsOnScreen:e.showCreditsOnScreen,splitDirection:e.splitDirection,enableDebugWireframe:e._enableDebugWireframe,debugWireframe:e.debugWireframe,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableShowOutline:e._enableShowOutline,showOutline:e.showOutline,outlineColor:e.outlineColor};return Ot(i,r)}var Hf=NZ;var LZ=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}static fromJson(t,n,i,r){let o=new e(t,n,i);return o._tileset.loadTileset(o._resource,r,o._tile),o._ready=!0,o}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return le(this)}},IB=LZ;function Ha(e,t,n,i){let r=Ha._verifyAttributes(t);n=n??0;let o=[],s={},a,c,u=r.length;for(let d=0;d<u;++d){let p=r[d];if(p.vertexBuffer){o.push(p);continue}c=p.usage,a=s[c],l(a)||(a=s[c]=[]),a.push(p)}function f(d,p){return Y.getSizeInBytes(p.componentDatatype)-Y.getSizeInBytes(d.componentDatatype)}this._allBuffers=[];for(c in s)if(s.hasOwnProperty(c)){a=s[c],a.sort(f);let d=Ha._vertexSizeInBytes(a),p=a[0].usage,g={vertexSizeInBytes:d,vertexBuffer:void 0,usage:p,needsCommit:!1,arrayBuffer:void 0,arrayViews:Ha._createArrayViews(a,d)};this._allBuffers.push(g)}this._size=0,this._instanced=i??!1,this._precreated=o,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}Ha._verifyAttributes=function(e){let t=[];for(let i=0;i<e.length;++i){let r=e[i],o={index:r.index??i,enabled:r.enabled??!0,componentsPerAttribute:r.componentsPerAttribute,componentDatatype:r.componentDatatype??Y.FLOAT,normalize:r.normalize??!1,vertexBuffer:r.vertexBuffer,usage:r.usage??Me.STATIC_DRAW};t.push(o)}let n=new Array(t.length);for(let i=0;i<t.length;++i){let o=t[i].index;n[o]=!0}return t};Ha._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let s=0;s<n;++s){let a=e[s];t+=a.componentsPerAttribute*Y.getSizeInBytes(a.componentDatatype)}let i=n>0?Y.getSizeInBytes(e[0].componentDatatype):0,r=i>0?t%i:0,o=r===0?0:i-r;return t+=o,t};Ha._createArrayViews=function(e,t){let n=[],i=0,r=e.length;for(let o=0;o<r;++o){let s=e[o],a=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:a,normalize:s.normalize,offsetInBytes:i,vertexSizeInComponentType:t/Y.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*Y.getSizeInBytes(a)}return n};Ha.prototype.resize=function(e){this._size=e;let t=this._allBuffers;this.writers=[];for(let n=0,i=t.length;n<i;++n){let r=t[n];Ha._resize(r,this._size),Ha._appendWriters(this.writers,r)}FZ(this)};Ha._resize=function(e,t){if(e.vertexSizeInBytes>0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let o=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c<a;++c)o[c]=s[c]}let i=e.arrayViews,r=i.length;for(let o=0;o<r;++o){let s=i[o];s.view=Y.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};var Uat=[function(e,t,n){return function(i,r){t[i*n]=r,e.needsCommit=!0}},function(e,t,n){return function(i,r,o){let s=i*n;t[s]=r,t[s+1]=o,e.needsCommit=!0}},function(e,t,n){return function(i,r,o,s){let a=i*n;t[a]=r,t[a+1]=o,t[a+2]=s,e.needsCommit=!0}},function(e,t,n){return function(i,r,o,s,a){let c=i*n;t[c]=r,t[c+1]=o,t[c+2]=s,t[c+3]=a,e.needsCommit=!0}}];Ha._appendWriters=function(e,t){let n=t.arrayViews,i=n.length;for(let r=0;r<i;++r){let o=n[r];e[o.index]=Uat[o.componentsPerAttribute-1](t,o.view,o.vertexSizeInComponentType)}};Ha.prototype.commit=function(e){let t=!1,n=this._allBuffers,i,r,o;for(r=0,o=n.length;r<o;++r)i=n[r],t=zat(this,i)||t;if(t||!l(this.va)){FZ(this);let s=this.va=[],a=D.SIXTY_FOUR_KILOBYTES-4,c=l(e)&&!this._instanced?Math.ceil(this._size/a):1;for(let u=0;u<c;++u){let f=[];for(r=0,o=n.length;r<o;++r){i=n[r];let d=u*(i.vertexSizeInBytes*a);Ha._appendAttributes(f,i,d,this._instanced)}f=f.concat(this._precreated),s.push({va:new zn({context:this._context,attributes:f,indexBuffer:e}),indicesCount:1.5*(u!==c-1?a:this._size%a)})}}};function zat(e,t){if(t.needsCommit&&t.vertexSizeInBytes>0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,r=l(n);if(!r||n.sizeInBytes<i)return r&&n.destroy(),t.vertexBuffer=nt.createVertexBuffer({context:e._context,typedArray:t.arrayBuffer,usage:t.usage}),t.vertexBuffer.vertexArrayDestroyable=!1,!0;t.vertexBuffer.copyFromArrayView(t.arrayBuffer)}return!1}Ha._appendAttributes=function(e,t,n,i){let r=t.arrayViews,o=r.length;for(let s=0;s<o;++s){let a=r[s];e.push({index:a.index,enabled:a.enabled,componentsPerAttribute:a.componentsPerAttribute,componentDatatype:a.componentDatatype,normalize:a.normalize,vertexBuffer:t.vertexBuffer,offsetInBytes:n+a.offsetInBytes,strideInBytes:t.vertexSizeInBytes,instanceDivisor:i?1:0})}};Ha.prototype.subCommit=function(e,t){let n=this._allBuffers;for(let i=0,r=n.length;i<r;++i)Vat(n[i],e,t)};function Vat(e,t,n){if(e.needsCommit&&e.vertexSizeInBytes>0){let i=e.vertexSizeInBytes*t,r=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,r),i)}}Ha.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function FZ(e){let t=e.va;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].va.destroy();e.va=void 0}Ha.prototype.isDestroyed=function(){return!1};Ha.prototype.destroy=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t){let i=e[t];i.vertexBuffer=i.vertexBuffer&&i.vertexBuffer.destroy()}return FZ(this),le(this)};var n_=Ha;var PB=`uniform sampler2D u_atlas;
uniform float u_coarseDepthTestDistance;
uniform float u_threePointDepthTestDistance;
#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
in vec2 v_textureCoordinates;
in vec4 v_pickColor;
in vec4 v_color;
flat in vec2 v_splitDirectionAndEllipsoidDepthEC;
#ifdef SDF
in vec4 v_outlineColor;
in float v_outlineWidth;
#endif
in vec4 v_compressed;
const float SHIFT_LEFT1 = 2.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;
float getGlobeDepthAtCoords(vec2 st)
{
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
if (logDepthOrDepth == 0.0)
{
return 0.0;
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
return eyeCoordinate.z / eyeCoordinate.w;
}
#ifdef SDF
float getDistance(vec2 position)
{
return texture(u_atlas, position).r;
}
vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
{
float distance = getDistance(position);
if (outlineWidth > 0.0)
{
float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
return vec4(sdfColor.rgb, sdfColor.a * alpha);
}
else
{
float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
return vec4(v_color.rgb, v_color.a * alpha);
}
}
#endif
bool getDepthTestEnabled() {
float temp = v_compressed.y;
temp = temp * SHIFT_RIGHT1;
float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
return temp2 != 0.0;
}
float getRelativeEyeDepth(float eyeDepth, float distanceToEllipsoid, float epsilon) {
float depthDifferential = eyeDepth - distanceToEllipsoid;
float depthRatio = abs(depthDifferential / distanceToEllipsoid);
if (depthRatio < epsilon) {
return 0.0;
}
return depthDifferential;
}
void doDepthTest(float eyeDepth, float globeDepth) {
#ifdef VS_THREE_POINT_DEPTH_CHECK
if (eyeDepth > -u_threePointDepthTestDistance) {
if (eyeDepth == 0.0) {
discard;
}
return;
}
#endif
bool useGlobeDepth = eyeDepth > -u_coarseDepthTestDistance;
if (useGlobeDepth && globeDepth == 0.0) {
return;
}
if (useGlobeDepth && getRelativeEyeDepth(eyeDepth, globeDepth, czm_epsilon1) < 0.0) {
discard;
}
}
#ifdef LOG_DEPTH
void writeDepth(float eyeDepth, float globeDepth, float distanceToEllipsoid) {
float depthArg = v_depthFromNearPlusOne;
if (globeDepth != 0.0 && getRelativeEyeDepth(eyeDepth, distanceToEllipsoid, czm_epsilon3) > 0.0) {
float globeDepthFromNearPlusOne = (-globeDepth - czm_currentFrustum.x) + 1.0;
float nudge = max(globeDepthFromNearPlusOne * 5e-6, czm_epsilon7);
float globeOnTop = max(1.0, globeDepthFromNearPlusOne - nudge);
depthArg = min(depthArg, globeOnTop);
}
czm_writeLogDepth(depthArg);
}
#endif
void main()
{
if (v_splitDirectionAndEllipsoidDepthEC.x < 0.0 && gl_FragCoord.x > czm_splitPosition) {
discard;
}
if (v_splitDirectionAndEllipsoidDepthEC.x > 0.0 && gl_FragCoord.x < czm_splitPosition) {
discard;
}
if (getDepthTestEnabled()) {
vec2 fragSt = gl_FragCoord.xy / czm_viewport.zw;
float eyeDepth = v_compressed.x;
float globeDepth = getGlobeDepthAtCoords(fragSt);
float distanceToEllipsoid = -v_splitDirectionAndEllipsoidDepthEC.y;
doDepthTest(eyeDepth, globeDepth);
#ifdef LOG_DEPTH
writeDepth(eyeDepth, globeDepth, distanceToEllipsoid);
#endif
}
vec4 color = texture(u_atlas, v_textureCoordinates);
#ifdef SDF
float outlineWidth = v_outlineWidth;
vec4 outlineColor = v_outlineColor;
float distance = getDistance(v_textureCoordinates);
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float smoothing = fwidth(distance);
vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));
vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
color = (center + color1 + color2 + color3 + color4)/5.0;
#else
float smoothing = 1.0/32.0;
color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
#endif
color = czm_gammaCorrect(color);
#else
color = czm_gammaCorrect(color);
color *= czm_gammaCorrect(v_color);
#endif
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
if (color.a < 0.005)
{
discard;
}
#else
#ifdef OPAQUE
if (color.a < 0.995)
{
discard;
}
#else
if (color.a >= 0.995)
{
discard;
}
#endif
#endif
#ifdef VECTOR_TILE
color *= u_highlightColor;
#endif
out_FragColor = color;
}
`;var DB=`uniform float u_threePointDepthTestDistance;
in vec2 direction;
in vec4 positionHighAndScale;
in vec4 positionLowAndRotation;
in vec4 compressedAttribute0;
in vec4 compressedAttribute1;
in vec4 compressedAttribute2;
in vec4 eyeOffset;
in vec4 scaleByDistance;
in vec4 pixelOffsetScaleByDistance;
in vec4 compressedAttribute3;
in vec2 sdf;
in float splitDirection;
#ifdef VS_THREE_POINT_DEPTH_CHECK
in vec4 textureCoordinateBoundsOrLabelTranslate;
#endif
#ifdef VECTOR_TILE
in float a_batchId;
#endif
out vec2 v_textureCoordinates;
out vec4 v_compressed;
out vec4 v_pickColor;
out vec4 v_color;
flat out vec2 v_splitDirectionAndEllipsoidDepthEC;
#ifdef SDF
out vec4 v_outlineColor;
out float v_outlineWidth;
#endif
const float UPPER_BOUND = 32768.0;
const float SHIFT_LEFT16 = 65536.0;
const float SHIFT_LEFT12 = 4096.0;
const float SHIFT_LEFT8 = 256.0;
const float SHIFT_LEFT7 = 128.0;
const float SHIFT_LEFT5 = 32.0;
const float SHIFT_LEFT3 = 8.0;
const float SHIFT_LEFT2 = 4.0;
const float SHIFT_LEFT1 = 2.0;
const float SHIFT_RIGHT12 = 1.0 / 4096.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
const float SHIFT_RIGHT7 = 1.0 / 128.0;
const float SHIFT_RIGHT5 = 1.0 / 32.0;
const float SHIFT_RIGHT3 = 1.0 / 8.0;
const float SHIFT_RIGHT2 = 1.0 / 4.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;
vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)
{
vec2 halfSize = imageSize * scale * 0.5;
halfSize *= ((direction * 2.0) - 1.0);
vec2 originTranslate = origin * abs(halfSize);
#if defined(ROTATION) || defined(ALIGNED_AXIS)
if (validAlignedAxis || rotation != 0.0)
{
float angle = rotation;
if (validAlignedAxis)
{
vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
}
float cosTheta = cos(angle);
float sinTheta = sin(angle);
rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
halfSize = rotationMatrix * halfSize;
}
else
{
rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
}
#endif
mpp = czm_metersPerPixel(positionEC);
positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
positionEC.xy += (translate + pixelOffset) * mpp;
return positionEC;
}
#ifdef VS_THREE_POINT_DEPTH_CHECK
float getGlobeDepth(vec4 positionEC)
{
vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
if (globeDepth == 0.0)
{
return 0.0;
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
return eyeCoordinate.z / eyeCoordinate.w;
}
#endif
void main()
{
vec3 positionHigh = positionHighAndScale.xyz;
vec3 positionLow = positionLowAndRotation.xyz;
float scale = positionHighAndScale.w;
#if defined(ROTATION) || defined(ALIGNED_AXIS)
float rotation = positionLowAndRotation.w;
#else
float rotation = 0.0;
#endif
float compressed = compressedAttribute0.x;
vec2 pixelOffset;
pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
compressed -= pixelOffset.x * SHIFT_LEFT7;
pixelOffset.x -= UPPER_BOUND;
vec2 origin;
origin.x = floor(compressed * SHIFT_RIGHT5);
compressed -= origin.x * SHIFT_LEFT5;
origin.y = floor(compressed * SHIFT_RIGHT3);
compressed -= origin.y * SHIFT_LEFT3;
origin -= vec2(1.0);
float show = floor(compressed * SHIFT_RIGHT2);
compressed -= show * SHIFT_LEFT2;
vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;
float temp = compressedAttribute0.y * SHIFT_RIGHT8;
pixelOffset.y = -(floor(temp) - UPPER_BOUND);
vec2 translate;
translate.y = (temp - floor(temp)) * SHIFT_LEFT16;
temp = compressedAttribute0.z * SHIFT_RIGHT8;
translate.x = floor(temp) - UPPER_BOUND;
translate.x *= SHIFT_RIGHT2;
translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
translate.y -= UPPER_BOUND;
translate.y *= SHIFT_RIGHT2;
temp = compressedAttribute1.x * SHIFT_RIGHT8;
float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);
vec2 imageSize = vec2(floor(temp), temp2);
#ifdef EYE_DISTANCE_TRANSLUCENCY
vec4 translucencyByDistance;
translucencyByDistance.x = compressedAttribute1.z;
translucencyByDistance.z = compressedAttribute1.w;
translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
temp = compressedAttribute1.y * SHIFT_RIGHT8;
translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif
#ifdef VS_THREE_POINT_DEPTH_CHECK
temp = compressedAttribute3.w;
temp = temp * SHIFT_RIGHT12;
vec2 dimensions;
dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
dimensions.x = floor(temp);
#endif
#ifdef ALIGNED_AXIS
vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
temp = compressedAttribute2.z * SHIFT_RIGHT5;
bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
#else
vec3 alignedAxis = vec3(0.0);
bool validAlignedAxis = false;
#endif
vec4 color = czm_decodeRGB8(compressedAttribute2.x);
vec4 pickColor = czm_decodeRGB8(compressedAttribute2.y);
temp = compressedAttribute2.z * SHIFT_RIGHT8;
bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
temp = floor(temp) * SHIFT_RIGHT8;
pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
pickColor.a /= 255.0;
color.a = floor(temp);
color.a /= 255.0;
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
positionEC.xyz *= show;
#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
lengthSq = czm_eyeHeight2D.y;
}
else
{
lengthSq = dot(positionEC.xyz, positionEC.xyz);
}
#endif
#ifdef EYE_DISTANCE_SCALING
float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
scale *= distanceScale;
translate *= distanceScale;
if (scale == 0.0)
{
positionEC.xyz = vec3(0.0);
}
#endif
float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
if (translucency == 0.0)
{
positionEC.xyz = vec3(0.0);
}
#endif
#ifdef EYE_DISTANCE_PIXEL_OFFSET
float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
pixelOffset *= pixelOffsetScale;
#endif
#ifdef DISTANCE_DISPLAY_CONDITION
float nearSq = compressedAttribute3.x;
float farSq = compressedAttribute3.y;
if (lengthSq < nearSq || lengthSq > farSq)
{
positionEC.xyz = vec3(0.0);
}
#endif
mat2 rotationMatrix;
float mpp;
float enableDepthCheck = 1.0;
#ifdef DISABLE_DEPTH_DISTANCE
float disableDepthTestDistanceSq = compressedAttribute3.z;
if (disableDepthTestDistanceSq == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
{
disableDepthTestDistanceSq = czm_minimumDisableDepthTestDistance;
}
if (lengthSq < disableDepthTestDistanceSq || disableDepthTestDistanceSq < 0.0)
{
enableDepthCheck = 0.0;
}
#endif
v_splitDirectionAndEllipsoidDepthEC.y = czm_infinity;
vec3 ellipsoidCenter = czm_view[3].xyz;
vec3 rayDirection = normalize(positionEC.xyz);
czm_ray ray = czm_ray(vec3(0.0), rayDirection);
vec3 ellipsoid_inverseRadii = czm_ellipsoidInverseRadii;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
if (!czm_isEmpty(intersection))
{
v_splitDirectionAndEllipsoidDepthEC.y = intersection.start;
}
v_compressed.y = enableDepthCheck;
#ifdef VS_THREE_POINT_DEPTH_CHECK
if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
float depthsilon = 10.0;
vec2 depthOrigin;
depthOrigin.x = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
depthOrigin.x = czm_branchFreeTernary(depthOrigin.x == 0.0, origin.x, depthOrigin.x - 2.0);
depthOrigin.y = origin.y;
vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth1 = getGlobeDepth(pEC1);
if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
{
vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth2 = getGlobeDepth(pEC2);
if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
{
vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth3 = getGlobeDepth(pEC3);
if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
{
positionEC.xyz = vec3(0.0);
}
}
}
}
#endif
v_compressed.x = positionEC.z;
positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
gl_Position = czm_projection * positionEC;
v_textureCoordinates = textureCoordinates;
#ifdef LOG_DEPTH
czm_vertexLogDepth();
#endif
#ifdef DISABLE_DEPTH_DISTANCE
if (disableDepthTestDistanceSq != 0.0)
{
float zclip = gl_Position.z / gl_Position.w;
bool clipped = (zclip < -1.0 || zclip > 1.0);
if (!clipped && (disableDepthTestDistanceSq < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistanceSq)))
{
gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = 1.0;
#endif
}
}
#endif
#ifdef SDF
vec4 outlineColor = czm_decodeRGB8(sdf.x);
float outlineWidth;
temp = sdf.y;
temp = temp * SHIFT_RIGHT8;
float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
temp = floor(temp) * SHIFT_RIGHT8;
outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
outlineColor.a = floor(temp);
outlineColor.a /= 255.0;
v_outlineWidth = outlineWidth / 255.0;
v_outlineColor = outlineColor;
v_outlineColor.a *= translucency;
#endif
v_pickColor = pickColor;
v_color = color;
v_color.a *= translucency;
v_splitDirectionAndEllipsoidDepthEC.x = splitDirection;
}
`;var jat=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),qs=jat;function Am(e){this._billboardCollection=e,this._id=void 0,this._loadState=qs.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(Am.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===qs.LOADED}},hasImage:{get:function(){return this._loadState!==qs.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});Am.prototype.unload=async function(){this._loadState!==qs.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=qs.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};Am.prototype.loadImage=async function(e,t,n,i){if(this._id===e)return;let r=this._billboardCollection,o=r.billboardTextureCache,s=o.get(e);if(l(s)&&t.loadState===qs.LOADING||t.loadState===qs.LOADED){Am.clone(s,this);return}l(s)||(s=new Am(r),o.set(e,s)),s._id=this._id=e,s._loadState=this._loadState=qs.LOADING,s._loadError=this._loadError=void 0;let a,c=this._billboardCollection.textureAtlas;try{let f=c.addImage(e,t,n,i);typeof f=="number"?a=f:a=await f}catch(f){if(s._loadState=qs.ERROR,s._loadError=f,this._id!==e)return;this._loadState=qs.ERROR,this._loadError=f;return}if(!l(a)||a===-1){if(s._loadState=qs.FAILED,s._index=-1,this._id!==e)return;this._loadState=qs.FAILED,this._index=-1;return}s._index=a,s._loadState=qs.LOADED;let u=c.rectangles[a];s._width=u.width,s._height=u.height,this._id===e&&(this._index=a,this._loadState=qs.LOADED,this._width=u.width,this._height=u.height,this.dirty=!0)};Am.prototype.addImageSubRegion=function(e,t){this._id=e,this._loadError=void 0,this._hasSubregion=!0;let i=this._billboardCollection.textureAtlas.addImageSubRegion(e,t);if(typeof i=="number"){this.setImageSubRegion(i,t);return}this.loadImageSubRegion(e,t,i)};Am.prototype.loadImageSubRegion=async function(e,t,n){let i;try{this._loadState=qs.LOADING,i=await n}catch(r){this._loadState=qs.ERROR,this._loadError=r;return}this._id===e&&(this._loadState=qs.LOADED,this.setImageSubRegion(i,t))};Am.prototype.setImageSubRegion=function(e,t){if(this._index!==e){if(!l(e)||e===-1){this._loadState=qs.FAILED,this._index=-1,this._width=void 0,this._height=void 0;return}this._width=t.width,this._height=t.height,this._index=e,this.dirty=!0}};Am.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};Am.clone=function(e,t){if(t._id=e._id,t._loadState=e._loadState,t._loadError=void 0,t._index=e._index,t._width=e._width,t._height=e._height,t._hasSubregion=e._hasSubregion,e.ready){t.dirty=!0;return}return(async()=>{let i=e._id;await e._billboardCollection.textureAtlas._indexPromiseById.get(i),t._id===i&&(e._hasSubregion&&await Promise.resolve(),t._id=i,t._loadState=e._loadState,t._loadError=e._loadError,t._index=e._index,t._width=e._width,t._height=e._height,t.dirty=!0)})(),t};var i_=Am;function Ni(e,t){e=e??H.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,r=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=qt.clone(n)),l(i)&&(i=qt.clone(i)),l(r)&&(r=qt.clone(r)),l(o)&&(o=jt.clone(o)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.clone(this._position),this._pixelOffset=U.clone(e.pixelOffset??U.ZERO),this._translate=new U(0,0),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._heightReference=e.heightReference??We.NONE,this._verticalOrigin=e.verticalOrigin??Hn.CENTER,this._horizontalOrigin=e.horizontalOrigin??zi.CENTER,this._scale=e.scale??1,this._color=z.clone(e.color??z.WHITE),this._rotation=e.rotation??0,this._alignedAxis=h.clone(e.alignedAxis??h.ZERO),this._width=e.width,this._height=e.height,this._scaleByDistance=r,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=e.sizeInMeters??!1,this._distanceDisplayCondition=o,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=e.collection??t,this._pickId=void 0,this._pickPrimitive=e._pickPrimitive??this,this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageTexture=new i_(t),this._imageId=e.imageId,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;let s=e.image;l(s)&&(this._computeImageTextureProperties(e.imageId,s),this._imageTexture.loadImage(this._imageId,s,this._imageWidth,this._imageHeight)),l(e.imageSubRegion)&&this._imageTexture.addImageSubRegion(this._imageId,e.imageSubRegion),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._lastSurfaceHeight=void 0,this._lastSurfaceQueryFrame=-1,this._lastSurfaceQueryMissed=!1,this._clampedToSurface=!1,this._clampingCartesian=void 0,this._clampingHeight=0,this._clampingHeightValid=!1,this._mode=re.SCENE3D,this._clusterShow=!0,this._outlineColor=z.clone(e.outlineColor??z.BLACK),this._outlineWidth=e.outlineWidth??0,this._updateClamping(),this._splitDirection=e.splitDirection??Vo.NONE,this._positionFromParent=!1}var hbe=Ni.SHOW_INDEX=0,kH=Ni.POSITION_INDEX=1,Tbe=Ni.PIXEL_OFFSET_INDEX=2,Hat=Ni.EYE_OFFSET_INDEX=3,Gat=Ni.HORIZONTAL_ORIGIN_INDEX=4,Wat=Ni.VERTICAL_ORIGIN_INDEX=5,qat=Ni.SCALE_INDEX=6,mbe=Ni.IMAGE_INDEX_INDEX=7,pbe=Ni.COLOR_INDEX=8,Yat=Ni.ROTATION_INDEX=9,Xat=Ni.ALIGNED_AXIS_INDEX=10,Kat=Ni.SCALE_BY_DISTANCE_INDEX=11,$at=Ni.TRANSLUCENCY_BY_DISTANCE_INDEX=12,Jat=Ni.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,Zat=Ni.DISTANCE_DISPLAY_CONDITION=14,Qat=Ni.DISABLE_DEPTH_DISTANCE=15;Ni.TEXTURE_COORDINATE_BOUNDS=16;var gbe=Ni.SDF_INDEX=17,ect=Ni.SPLIT_DIRECTION_INDEX=18;Ni.NUMBER_OF_PROPERTIES=19;function Fo(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}function BZ(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z}function ET(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new h(e.x,e.y,e.z)}Object.defineProperties(Ni.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Fo(this,hbe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;BZ(t,e)||(ET(e,t),ET(e,this._actualPosition),this._updateClamping(),Fo(this,kH))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),Fo(this,kH))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;U.equals(t,e)||(U.clone(e,t),Fo(this,Tbe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;qt.equals(t,e)||(this._scaleByDistance=qt.clone(e,t),Fo(this,Kat))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;qt.equals(t,e)||(this._translucencyByDistance=qt.clone(e,t),Fo(this,$at))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;qt.equals(t,e)||(this._pixelOffsetScaleByDistance=qt.clone(e,t),Fo(this,Jat))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;h.equals(t,e)||(h.clone(e,t),Fo(this,Hat))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Fo(this,Gat))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,Fo(this,Wat))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,Fo(this,qat))}},color:{get:function(){return this._color},set:function(e){let t=this._color;z.equals(t,e)||(z.clone(e,t),Fo(this,pbe))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,Fo(this,Yat))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;h.equals(t,e)||(h.clone(e,t),Fo(this,Xat))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,Fo(this,mbe))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,Fo(this,mbe))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,Fo(this,pbe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){jt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=jt.clone(e,this._distanceDisplayCondition),Fo(this,Zat))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Fo(this,Qat))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,l(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageTexture.id},set:function(e){if(!l(e)){this._imageTexture.unload();return}this._computeImageTextureProperties(void 0,e),this._imageTexture.loadImage(this._imageId,e,this._imageWidth,this._imageHeight)}},ready:{get:function(){return this._imageTexture.ready}},loadError:{get:function(){return this._imageTexture.loadError}},textureDirty:{get:function(){return this._imageTexture.dirty},set:function(e){this._imageTexture.dirty=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=ET(e,this._actualClampedPosition),Fo(this,kH)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Fo(this,hbe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),Fo(this,gbe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Fo(this,gbe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Fo(this,ect))}}});Ni.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};Ni.prototype._updateClamping=function(){Ni._updateClamping(this._billboardCollection,this)};var UH=new he,tct=new he,_be=200,ybe=30;function Abe(e,t,n,i){let r=t.cartographicToCartesian(i,e._clampedPosition);Fy(e._heightReference)?e._mode===re.SCENE3D?(i.height+=n.height,t.cartographicToCartesian(i,r)):r.x+=n.height:e._heightReference===We.CLIP_TO_GROUND&&n.height>i.height&&(e._mode===re.SCENE3D?(i.height=n.height,t.cartographicToCartesian(i,r)):r.x=n.height),e._clampedPosition=r}Ni._updateClamping=function(e,t){if(!l(e)||!l(e._scene))return;let n=e._scene,i=n.ellipsoid??ee.default,r=n.frameState.mode,o=r!==t._mode;if(t._mode=r,(t._heightReference===We.NONE||o)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0,t._lastSurfaceHeight=void 0,t._clampedToSurface=!1),t._heightReference===We.NONE||t._positionFromParent||!l(t._position))return;let s=n.frameState.frameNumber;if(t._clampingHeightValid&&t._heightReference===We.CLIP_TO_GROUND&&r===re.SCENE3D&&l(t._removeCallbackFunc)&&l(t._lastSurfaceHeight)&&s-t._lastSurfaceQueryFrame<ybe){let A=t._position,b=t._clampingCartesian,x=A.x-b.x,T=A.y-b.y,E=A.z-b.z,v=Math.sqrt(x*x+T*T+E*E);if(t._clampingHeight-v>t._lastSurfaceHeight+_be){t._clampedToSurface=!0,t._clampedPosition=A;return}}let a=i.cartesianToCartographic(t._position,tct);if(!l(a)){t._actualClampedPosition=void 0,t._clampingHeightValid=!1;return}t._clampingCartesian=ET(t._position,t._clampingCartesian),t._clampingHeight=a.height,t._clampingHeightValid=!0;let c=t._heightReference===We.CLIP_TO_GROUND,u=s-t._lastSurfaceQueryFrame<ybe,f=c&&l(t._lastSurfaceHeight)&&a.height>t._lastSurfaceHeight+_be,d=f&&u,p=c&&u&&t._lastSurfaceQueryMissed;if(!((c&&t._lastSurfaceQueryMissed||f)&&l(t._removeCallbackFunc))){l(t._removeCallbackFunc)&&t._removeCallbackFunc();let A=he.clone(a);t._removeCallbackFunc=n.updateHeight(A,b=>{let x=n.getHeight(A,t._heightReference);l(x)&&(b.height=x,t._lastSurfaceQueryFrame=n.frameState.frameNumber,t._lastSurfaceQueryMissed=!1),t._lastSurfaceHeight=b.height,t._clampedToSurface=!0,Abe(t,i,A,b)},t._heightReference)}he.clone(a,UH);let y;d||p?y=t._lastSurfaceHeight:(t._lastSurfaceQueryFrame=s,y=n.getHeight(a,t._heightReference),t._lastSurfaceQueryMissed=!l(y),l(y)?t._lastSurfaceHeight=y:y=t._lastSurfaceHeight),t._clampedToSurface=l(y),l(y)&&(UH.height=y),Abe(t,i,a,UH)};Ni.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};Ni.prototype.setImage=function(e,t){this._computeImageTextureProperties(e,t),this._imageTexture.loadImage(this._imageId,t,this._imageWidth,this._imageHeight)};Ni.prototype.setImageTexture=function(e){i_.clone(e,this._imageTexture)};var bbe=512;Ni.prototype._computeImageTextureProperties=function(e,t){if(this._imageWidth=void 0,this._imageHeight=void 0,!l(t)){this._imageId=$n();return}let n;typeof t=="string"?n=t:t instanceof De?n=t._url:l(t.src)&&(n=t.src),this._imageId=e??n??$n(),l(this._width)&&l(this._height)&&!this._sizeInMeters&&nct(n)&&(this._imageWidth=Math.min(this._width,bbe),this._imageHeight=Math.min(this._height,bbe))};function nct(e){return l(e)?Uh(e)?e.startsWith("data:image/svg+xml"):ng(e)==="svg":!1}Ni.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};Ni.prototype._setTranslate=function(e){let t=this._translate;U.equals(t,e)||(U.clone(e,t),Fo(this,Tbe))};Ni.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};Ni.prototype._setActualPosition=function(e){l(this._clampedPosition)||h.clone(e,this._actualPosition),Fo(this,kH)};var xbe=new se;Ni._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===re.SCENE3D?t:(N.multiplyByPoint(i,t,xbe),dr.computeActualEllipsoidPosition(n,xbe))};var Ebe=new h;Ni._computeScreenSpacePosition=function(e,t,n,i,r,o){let s=N.multiplyByPoint(e,t,Ebe),a=dr.worldWithEyeOffsetToWindowCoordinates(r,s,n,o);if(l(a))return U.add(a,i,a),a};var BH=new U(0,0);Ni.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new U),U.clone(this._pixelOffset,BH),U.add(BH,this._translate,BH);let i=n.modelMatrix,r=this._position;if(l(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==re.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(r,UH);r=a.cartographicToCartesian(c,Ebe),i=N.IDENTITY}return Ni._computeScreenSpacePosition(i,r,this._eyeOffset,BH,e,t)};Ni.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,r=e.height,o=e.scale;i*=o,r*=o;let s=t.x;e.horizontalOrigin===zi.RIGHT?s-=i:e.horizontalOrigin===zi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?a-=r:e.verticalOrigin===Hn.CENTER&&(a-=r*.5),l(n)||(n=new et),n.x=s,n.y=a,n.width=i,n.height=r,n};Ni.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&this.image===e.image&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&z.equals(this._color,e._color)&&U.equals(this._pixelOffset,e._pixelOffset)&&U.equals(this._translate,e._translate)&&h.equals(this._eyeOffset,e._eyeOffset)&&qt.equals(this._scaleByDistance,e._scaleByDistance)&&qt.equals(this._translucencyByDistance,e._translucencyByDistance)&&qt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&jt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};Ni.prototype._destroy=function(){l(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0};var Br=Ni;var ict={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Ga=Object.freeze(ict);function RB({x:e,y:t,width:n,height:i}){this.rectangle=new et(e,t,n,i),this.childNode1=void 0,this.childNode2=void 0,this.index=void 0}function kZ({width:e,height:t,borderPadding:n}){this._width=e,this._height=t,this._borderPadding=n,this._root=new RB({x:n,y:n,width:e-2*n,height:t-2*n})}kZ.prototype.pack=function(e,{width:t,height:n}){let i=this._findNode(this._root,{width:t,height:n});if(l(i))return i.index=e,i};kZ.prototype._findNode=function(e,{width:t,height:n}){if(l(e)){if(!l(e.childNode1)&&!l(e.childNode2)){if(l(e.index))return;let{rectangle:i}=e,r=i.width,o=i.height,s=r-t,a=o-n;if(s<0||a<0)return;if(s===0&&a===0)return e;let c=this._borderPadding;if(s>a){e.childNode1=new RB({x:i.x,y:i.y,width:t,height:o});let f=s-c;return f>0&&(e.childNode2=new RB({x:i.x+t+c,y:i.y,width:f,height:o})),this._findNode(e.childNode1,{width:t,height:n})}e.childNode1=new RB({x:i.x,y:i.y,width:r,height:n});let u=a-c;return u>0&&(e.childNode2=new RB({x:i.x,y:i.y+n+c,width:r,height:u})),this._findNode(e.childNode1,{width:t,height:n})}return this._findNode(e.childNode1,{width:t,height:n})||this._findNode(e.childNode2,{width:t,height:n})}};var QS=kZ;var Cbe=16;function su(e){e=e??H.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new U(Cbe,Cbe);this._pixelFormat=e.pixelFormat??Ke.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=$n(),this._imagesToAddQueue=[],this._indexById=new Map,this._indexPromiseById=new Map,this._nextIndex=0}Object.defineProperties(su.prototype,{borderWidthInPixels:{get:function(){return this._borderWidthInPixels}},rectangles:{get:function(){return this._rectangles}},texture:{get:function(){return this._texture}},pixelFormat:{get:function(){return this._pixelFormat}},sampler:{get:function(){return this._sampler}},numberOfImages:{get:function(){return this._nextIndex}},guid:{get:function(){return this._guid}},sizeInBytes:{get:function(){return l(this._texture)?this._texture.sizeInBytes:0}}});su.prototype.computeTextureCoordinates=function(e,t){let n=this._texture,i=this._rectangles[e];if(l(t)||(t=new et),!l(i))return t.x=0,t.y=0,t.width=0,t.height=0,t;let r=n.width,o=n.height,s=i.width,a=i.height,c=i.x,u=i.y,f=this._subRegions.get(e);if(l(f)){let d=this._rectangles[f];c+=d.x,u+=d.y}return t.x=c/r,t.y=u/o,t.width=s/r,t.height=a/o,t};su.prototype._copyFromTexture=function(e,t,n,i){let r=this._pixelFormat,o=this._sampler,s=new Dt({context:e,height:n,width:t,pixelFormat:r,sampler:o}),a=e._gl,c=s._textureTarget,u=this._texture,f=new ys({context:e,colorTextures:[u],destroyAttachments:!1});a.activeTexture(a.TEXTURE0),a.bindTexture(c,s._texture),f._bind();let d=this.rectangles,p=this._subRegions;for(let g=0;g<d.length;++g){let m=i[g],y=d[g];if(!l(m)||!l(y)||l(p.get(g)))continue;let{x:A,y:b,width:x,height:T}=m;a.copyTexSubImage2D(c,0,A,b,y.x,y.y,x,T)}return a.bindTexture(c,null),s._initialized=!0,f._unBind(),f.destroy(),s};su.prototype._resize=function(e,t=0){let n=this._borderWidthInPixels,i=this._rectangles,r=this._imagesToAddQueue,o=this._texture,s=o.width,a=o.height,c=this._subRegions,u=i.map((A,b)=>new vbe({index:b,image:A})).filter((A,b)=>l(A.image)&&!l(c.get(b))),f=0,d=0,p=0;for(let A=t;A<r.length;++A){let{width:b,height:x}=r[A].image;f=Math.max(f,b),d=Math.max(d,x),p+=b*x,u.push(r[A])}for(s=D.nextPowerOfTwo(Math.max(f,s)),a=D.nextPowerOfTwo(Math.max(d,a));p>=s*a;)s>a?a*=2:s*=2;u.sort(({image:A},{image:b})=>b.height*b.width-A.height*A.width);let g=new Array(this._nextIndex);for(let A of this._subRegions.keys())l(c.get(A))&&(g[A]=i[A]);let m,y=!1;for(;!y;){m=new QS({height:a,width:s,borderPadding:n});let A;for(A=0;A<u.length;++A){let{index:b,image:x}=u[A];if(!l(x))continue;let T=m.pack(b,x);if(!l(T)){s>a?a*=2:s*=2;break}g[b]=T.rectangle}y=A===u.length}this._texturePacker=m,this._texture=this._copyFromTexture(e,s,a,g),o.destroy(),this._rectangles=g,this._guid=$n()};su.prototype.getImageIndex=function(e){return this._indexById.get(e)};su.prototype._copyImageToTexture=function({index:e,image:t,resolve:n,reject:i}){let r=this._texture,o=this._rectangles[e];try{r.copyFrom({source:t,xOffset:o.x,yOffset:o.y}),l(n)&&n(e)}catch(s){if(l(i)){i(s);return}}};function vbe({index:e,image:t,resolve:n,reject:i}){this.index=e,this.image=t,this.resolve=n,this.reject=i,this.rectangle=void 0}su.prototype._addImage=function(e,t){return new Promise((n,i)=>{this._imagesToAddQueue.push(new vbe({index:e,image:t,resolve:n,reject:i})),this._imagesToAddQueue.sort(({image:r},{image:o})=>o.height*o.width-r.height*r.width)})};su.prototype._processImageQueue=function(e){let t=this._imagesToAddQueue;if(t.length===0)return!1;this._rectangles.length=this._nextIndex;let n,i;for(n=0;n<t.length;++n){let r=t[n],{image:o,index:s}=r,a=this._texturePacker.pack(s,o);if(!l(a)){try{this._resize(e,n)}catch(c){i=c,l(r.reject)&&r.reject(i)}break}this._rectangles[s]=a.rectangle}if(l(i)){for(n=n+1;n<t.length;++n){let{resolve:r}=t[n];l(r)&&r(-1)}return t.length=0,!1}for(let r=0;r<t.length;++r)this._copyImageToTexture(t[r]);return t.length=0,!0};su.prototype.update=function(e){if(!l(this._texture)){let t=this._initialSize.x,n=this._initialSize.y,i=this._pixelFormat,r=this._sampler,o=this._borderWidthInPixels;this._texture=new Dt({context:e,width:t,height:n,pixelFormat:i,sampler:r}),this._texturePacker=new QS({height:n,width:t,borderPadding:o})}return this._processImageQueue(e)};async function rct(e,t){return typeof e=="function"&&(e=e(t)),(typeof e=="string"||e instanceof De)&&(e=De.createIfNeeded(e).fetchImage()),e}su.prototype.addImage=function(e,t,n,i){let r=this._indexPromiseById.get(e),o=this._indexById.get(e);return l(r)?r:l(o)?o:(o=this._nextIndex++,this._indexById.set(e,o),r=(async()=>{let a=await rct(t,e);if(this.isDestroyed()||!l(a))return this._indexPromiseById.delete(e),-1;l(n)&&(a.width=n),l(i)&&(a.height=i);let c=await this._addImage(o,a);return this._indexPromiseById.delete(e),c})(),this._indexPromiseById.set(e,r),r)};su.prototype.getCachedImageSubRegion=function(e,t,n){let i=this._indexPromiseById.get(e);for(let[r,o]of this._subRegions.entries())if(n===o&&this._rectangles[r].equals(t))return i?i.then(a=>a===-1?-1:r):r};su.prototype.addImageSubRegion=function(e,t){let n=this._indexById.get(e);if(!l(n))throw new oe(`image with id "${e}" not found in the atlas.`);let i=this.getCachedImageSubRegion(e,t,n);return l(i)?i:(i=this._nextIndex++,this._subRegions.set(i,n),this._rectangles[i]=t.clone(),(this._indexPromiseById.get(e)??Promise.resolve(n)).then(o=>{if(o===-1)return-1;let s=this._rectangles[o];return i}))};su.prototype.isDestroyed=function(){return!1};su.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),this._imagesToAddQueue.forEach(({resolve:e})=>{l(e)&&e(-1)}),le(this)};var CT=su;var oct=Br.SHOW_INDEX,OB=Br.POSITION_INDEX,wbe=Br.PIXEL_OFFSET_INDEX,Ibe=Br.EYE_OFFSET_INDEX,sct=Br.HORIZONTAL_ORIGIN_INDEX,act=Br.VERTICAL_ORIGIN_INDEX,cct=Br.SCALE_INDEX,vT=Br.IMAGE_INDEX_INDEX,Pbe=Br.COLOR_INDEX,lct=Br.ROTATION_INDEX,uct=Br.ALIGNED_AXIS_INDEX,Dbe=Br.SCALE_BY_DISTANCE_INDEX,Rbe=Br.TRANSLUCENCY_BY_DISTANCE_INDEX,Obe=Br.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,Mbe=Br.DISTANCE_DISPLAY_CONDITION,fct=Br.DISABLE_DEPTH_DISTANCE,dct=Br.TEXTURE_COORDINATE_BOUNDS,Nbe=Br.SDF_INDEX,Lbe=Br.SPLIT_DIRECTION_INDEX,GZ=Br.NUMBER_OF_PROPERTIES,zr={direction:0,positionHighAndScale:1,positionLowAndRotation:2,compressedAttribute0:3,compressedAttribute1:4,compressedAttribute2:5,eyeOffset:6,scaleByDistance:7,pixelOffsetScaleByDistance:8,compressedAttribute3:9,textureCoordinateBoundsOrLabelTranslate:10,a_batchId:11,sdf:12,splitDirection:13};function Xd(e){e=e??H.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=e.textureAtlas;l(t)||(t=new CT),this._textureAtlas=t,this._textureAtlasGUID=t.guid,this._destroyTextureAtlas=!0,this._billboardTextureCache=new Map,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!1,this._shaderRotation=!1,this._compiledShaderRotation=!1,this._shaderAlignedAxis=!1,this._compiledShaderAlignedAxis=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderPixelOffsetScaleByDistance=!1,this._compiledShaderPixelOffsetScaleByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._shaderClampToGround=!1,this._compiledShaderClampToGround=!1,this._propertiesChanged=new Uint32Array(GZ),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new ue,this._baseVolumeWC=new ue,this._baseVolume2D=new ue,this._boundingVolume=new ue,this._boundingVolumeDirty=!1,this._colorCommands=[],this._allBillboardsReady=!1,this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowTextureAtlas=e.debugShowTextureAtlas??!1,this.blendOption=e.blendOption??Fi.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._buffersUsage=[Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW],this._highlightColor=z.clone(z.WHITE),this._coarseDepthTestDistance=e.coarseDepthTestDistance??ee.default.minimumRadius/10,this._threePointDepthTestDistance=e.threePointDepthTestDistance??ee.default.minimumRadius/1e3,this._uniforms={u_atlas:()=>this.textureAtlas.texture,u_highlightColor:()=>this._highlightColor,u_coarseDepthTestDistance:()=>this._coarseDepthTestDistance,u_threePointDepthTestDistance:()=>this._threePointDepthTestDistance};let n=this._scene;l(n)&&l(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,r=i.length;for(let o=0;o<r;++o)l(i[o])&&i[o]._updateClamping()},this))}Object.defineProperties(Xd.prototype,{length:{get:function(){return WZ(this),this._billboards.length}},textureAtlas:{get:function(){return this._textureAtlas},set:function(e){this._textureAtlas!==e&&(this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._textureAtlas=e)}},destroyTextureAtlas:{get:function(){return this._destroyTextureAtlas},set:function(e){this._destroyTextureAtlas=e}},sizeInBytes:{get:function(){return this._textureAtlas.sizeInBytes}},ready:{get:function(){return this._allBillboardsReady}},billboardTextureCache:{get:function(){return this._billboardTextureCache}},coarseDepthTestDistance:{get:function(){return this._coarseDepthTestDistance},set:function(e){this._coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._threePointDepthTestDistance},set:function(e){this._threePointDepthTestDistance=e}}});function Fbe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Xd.prototype.add=function(e){let t=new Br(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};Xd.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Xd.prototype.removeAll=function(){Fbe(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function WZ(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;let t=[],n=e._billboards,i=n.length;for(let r=0,o=0;r<i;++r){let s=n[r];l(s)&&(s._index=o++,t.push(s))}e._billboards=t}}Xd.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};Xd.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};Xd.prototype.get=function(e){return WZ(this),this._billboards[e]};function Sbe(e){let t=e.cache.billboardCollection_indexBufferInstanced;return l(t)||(t=nt.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function hct(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return l(t)||(t=nt.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Me.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}Xd.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<GZ;++i){let r=n[i]===0?Me.STATIC_DRAW:Me.STREAM_DRAW;t=t||e[i]!==r,e[i]=r}return t};function mct(e,t,n,i,r){let o=[{index:zr.positionHighAndScale,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[OB]},{index:zr.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[OB]},{index:zr.compressedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[wbe]},{index:zr.compressedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Rbe]},{index:zr.compressedAttribute2,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Pbe]},{index:zr.eyeOffset,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Ibe]},{index:zr.scaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Dbe]},{index:zr.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Obe]},{index:zr.compressedAttribute3,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[Mbe]},{index:zr.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[dct]},{index:zr.splitDirection,componentsPerAttribute:1,componentDatatype:Y.FLOAT,usage:n[Lbe]},{index:zr.direction,componentsPerAttribute:2,componentDatatype:Y.FLOAT,vertexBuffer:hct(e)}];return l(i)&&o.push({index:zr.a_batchId,componentsPerAttribute:1,componentDatatype:Y.FLOAT,bufferUsage:Me.STATIC_DRAW}),r&&o.push({index:zr.sdf,componentsPerAttribute:2,componentDatatype:Y.FLOAT,usage:n[Nbe]}),new n_(e,o,t,!0)}var UZ=new Sn;function Bbe(e,t){let n=e.center,i=t.x-n.x,r=t.y-n.y,o=t.z-n.z,s=Math.sqrt(i*i+r*r+o*o);s>e.radius&&(e.radius=s)}function kbe(e,t,n,i){let r=n[zr.positionHighAndScale],o=n[zr.positionLowAndRotation],s=i._getActualPosition();e._mode===re.SCENE3D&&(Bbe(e._baseVolume,s),e._boundingVolumeDirty=!0),Sn.fromCartesian(s,UZ);let a=i.scale,c=i.rotation;c!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,a);let u=UZ.high,f=UZ.low;r(i._index,u.x,u.y,u.z,a),o(i._index,f.x,f.y,f.z,c)}var wA=new U,Yd=32768,qZ=65536,zZ=4096,ST=256,pct=128,gct=32,_ct=8,zH=4,yct=1/256,Ube=new et;function zbe(e,t,n,i){let r=n[zr.compressedAttribute0],o=i.pixelOffset,s=o.x,a=o.y,c=i._translate,u=c.x,f=c.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(s+u),Math.abs(-a+f));let d=i.horizontalOrigin,p=i._verticalOrigin,g=i.show&&i.clusterShow;i.color.alpha===0&&(g=!1),p===Hn.BASELINE&&(p=Hn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&d===zi.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===Hn.CENTER;let m=0,y=0;if(i.ready){let I=i.computeTextureCoordinates(Ube);m=I.x,y=I.y}let A=Math.floor(D.clamp(s,-Yd,Yd)+Yd)*pct;A+=(d+1)*gct,A+=(p+1)*_ct,A+=(g?1:0)*zH;let b=Math.floor(D.clamp(a,-Yd,Yd)+Yd)*ST,x=Math.floor(D.clamp(u*zH,-Yd,Yd)+Yd)*ST,T=(D.clamp(f*zH,-Yd,Yd)+Yd)*yct,E=Math.floor(T),v=Math.floor((T-E)*ST);b+=E,x+=v,wA.x=m,wA.y=y;let S=cn.compressTextureCoordinates(wA);r(i._index,A,b,x,S)}function Vbe(e,t,n,i){let r=n[zr.compressedAttribute1],o=i.alignedAxis;h.equals(o,h.ZERO)||(o=h.normalize(o,new h),e._shaderAlignedAxis=!0);let s=0,a=1,c=1,u=1,f=i.translucencyByDistance;l(f)&&(s=f.near,a=f.nearValue,c=f.far,u=f.farValue,(a!==1||u!==1)&&(e._shaderTranslucencyByDistance=!0));let d=Math.round(i.width??0);e._maxSize=Math.max(e._maxSize,d);let p=D.clamp(d,0,qZ),g=0;Math.abs(h.magnitudeSquared(o)-1)<D.EPSILON6&&(g=cn.octEncodeFloat(o)),a=D.clamp(a,0,1),a=a===1?255:a*255|0,p=p*ST+a,u=D.clamp(u,0,1),u=u===1?255:u*255|0,g=g*ST+u,r(i._index,p,g,s,c)}function jZ(e,t,n,i){let r=n[zr.compressedAttribute2],o=i.color,s=l(e._batchTable)?z.WHITE:i.getPickId(t.context).color,a=i.sizeInMeters?1:0,c=i.alignedAxis,u=h.equals(c,h.ZERO)?c:h.normalize(c,new h),f=Math.abs(h.magnitudeSquared(u)-1)<D.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&a===1;let d=i.height??0;e._maxSize=Math.max(e._maxSize,d);let p=i._labelHorizontalOrigin??-2;p+=2;let g=cn.encodeRGB8(o),m=cn.encodeRGB8(s),y=z.floatToByte(o.alpha)*qZ+z.floatToByte(s.alpha)*ST+(a*2+f),A=d*zH+p;r(i._index,g,m,y,A)}function HZ(e,t,n,i){let r=n[zr.eyeOffset],o=i.eyeOffset,s=o.z;if(i._heightReference!==We.NONE&&(s*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(o.x),Math.abs(o.y),Math.abs(s)),wA.x=0,wA.y=0,i.ready){let c=i.computeTextureCoordinates(Ube);wA.x=c.width,wA.y=c.height}let a=cn.compressTextureCoordinates(wA);r(i._index,o.x,o.y,s,a)}function jbe(e,t,n,i){let r=n[zr.scaleByDistance],o=0,s=1,a=1,c=1,u=i.scaleByDistance;l(u)&&(o=u.near,s=u.nearValue,a=u.far,c=u.farValue,(s!==1||c!==1)&&(e._shaderScaleByDistance=!0)),r(i._index,o,s,a,c)}function Hbe(e,t,n,i){let r=n[zr.pixelOffsetScaleByDistance],o=0,s=1,a=1,c=1,u=i.pixelOffsetScaleByDistance;l(u)&&(o=u.near,s=u.nearValue,a=u.far,c=u.farValue,(s!==1||c!==1)&&(e._shaderPixelOffsetScaleByDistance=!0)),r(i._index,o,s,a,c)}function Gbe(e,t,n,i){let r=n[zr.compressedAttribute3],o=0,s=Number.MAX_VALUE,a=i.distanceDisplayCondition;l(a)&&(o=a.near,s=a.far,o*=o,s*=s,e._shaderDistanceDisplayCondition=!0);let c=i.disableDepthTestDistance,u=_s(i.heightReference)&&t.context.depthTexture;c*=c,(u||c>0)&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1));let f,d;l(i._labelDimensions)?(d=i._labelDimensions.x,f=i._labelDimensions.y):(d=i.width??0,f=i.height??0);let p=Math.floor(D.clamp(d,0,zZ)),g=Math.floor(D.clamp(f,0,zZ)),m=p*zZ+g;r(i._index,o,s,c,m)}function Wbe(e,t,n,i){if(_s(i.heightReference)){let a=e._scene,c=t.context,u=t.globeTranslucencyState.translucent,f=l(a.globe)&&a.globe.depthTestAgainstTerrain;e._shaderClampToGround=c.depthTexture&&!u&&f}let r=n[zr.textureCoordinateBoundsOrLabelTranslate],o=0,s=0;l(i._labelTranslate)&&(o=i._labelTranslate.x,s=i._labelTranslate.y),r(i._index,o,s,0,0)}function Act(e,t,n,i){if(!l(e._batchTable))return;let r=n[zr.a_batchId],o=i._batchIndex;r(i._index,o)}function qbe(e,t,n,i){if(!e._sdf)return;let r=n[zr.sdf],o=i.outlineColor,s=i.outlineWidth,a=cn.encodeRGB8(o),c=s/Ga.RADIUS,u=z.floatToByte(o.alpha)*qZ+z.floatToByte(c)*ST;r(i._index,a,u)}function Ybe(e,t,n,i){let r=n[zr.splitDirection],o=0,s=i.splitDirection;l(s)&&(o=s),r(i._index,o)}function bct(e,t,n,i){kbe(e,t,n,i),zbe(e,t,n,i),Vbe(e,t,n,i),jZ(e,t,n,i),HZ(e,t,n,i),jbe(e,t,n,i),Hbe(e,t,n,i),Gbe(e,t,n,i),Wbe(e,t,n,i),Act(e,t,n,i),qbe(e,t,n,i),Ybe(e,t,n,i)}function VZ(e,t,n,i,r,o){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let u=t[c],f=u.position,d=Br._computeActualPosition(u,f,i,r);l(d)&&(u._setActualPosition(d),o?a.push(d):Bbe(s,d))}o&&ue.fromPoints(a,s)}function xct(e,t){let n=t.mode,i=e._billboards,r=e._billboardsToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==re.SCENE3D&&!N.equals(o,e.modelMatrix)?(e._mode=n,N.clone(e.modelMatrix,o),e._createVertexArray=!0,(n===re.SCENE3D||n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&VZ(e,i,i.length,t,o,!0)):n===re.MORPHING?VZ(e,i,i.length,t,o,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&VZ(e,r,e._billboardsToUpdateIndex,t,o,!1)}function Tct(e,t,n){let i=1;(!e._allSizedInMeters||e._maxPixelOffset!==0)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let r=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(r*=.5);let o=i*e._maxPixelOffset+e._maxEyeOffset;n.radius+=r+o}function Ect(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(billboard_texture, v_textureCoordinates);
}
`,{uniformMap:{billboard_texture:function(){return e.textureAtlas.texture}}});return i.pass=Ie.OVERLAY,i}var Cct=[];Xd.prototype.update=function(e){if(WZ(this),!this.show)return;let t=e.context;if(!t.instancedArrays||!(Ut.maximumVertexTextureImageUnits>0))throw new pe("Beginning in CesiumJS 1.140, billboards and labels require device support for WebGL 2, or WebGL 1 with ANGLE_instanced_arrays and MAX_VERTEX_TEXTURE_IMAGE_UNITS > 0. For more information or to share feedback, see: https://github.com/CesiumGS/cesium/issues/13053");let n=this._billboards,i=n.length,r=!0;for(let I=0;I<i;++I){let R=n[I];l(R.loadError)&&(console.error(`Error loading image for billboard: ${R.loadError}`),R.image=void 0),R.textureDirty&&this._updateBillboard(R,vT),R.show&&(r=r&&R.ready)}let o=this._textureAtlas;if(e.afterRender.push(()=>{if(!this.isDestroyed())return o.update(e.context)}),!l(o.texture))return;xct(this,e),n=this._billboards,i=n.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,u=o.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let d,p=e.passes,g=p.pick;if(f||!g&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let I=0;I<GZ;++I)c[I]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=mct(t,i,this._buffersUsage,this._batchTable,this._sdf),d=this._vaf.writers;for(let I=0;I<i;++I){let R=this._billboards[I];R._dirty=!1,R.textureDirty=!1,bct(this,e,d,R)}this._vaf.commit(Sbe(t))}this._billboardsToUpdateIndex=0}else if(a>0){let I=Cct;I.length=0,(c[OB]||c[lct]||c[cct])&&I.push(kbe),(c[vT]||c[wbe]||c[sct]||c[act]||c[oct])&&(I.push(zbe),I.push(HZ)),(c[vT]||c[uct]||c[Rbe])&&(I.push(Vbe),I.push(jZ)),(c[vT]||c[Pbe])&&I.push(jZ),(c[vT]||c[Ibe])&&I.push(HZ),c[Dbe]&&I.push(jbe),c[Obe]&&I.push(Hbe),(c[Mbe]||c[fct]||c[vT]||c[OB])&&I.push(Gbe),(c[vT]||c[OB])&&I.push(Wbe),c[Nbe]&&I.push(qbe),c[Lbe]&&I.push(Ybe);let R=I.length;if(d=this._vaf.writers,a/i>.1){for(let O=0;O<a;++O){let L=s[O];L._dirty=!1,L.textureDirty=!1;for(let _=0;_<R;++_)I[_](this,e,d,L)}this._vaf.commit(Sbe(t))}else{for(let O=0;O<a;++O){let L=s[O];L._dirty=!1,L.textureDirty=!1;for(let _=0;_<R;++_)I[_](this,e,d,L);this._vaf.subCommit(L._index,1)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>i*1.5&&(s.length=i),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ue.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,y=N.IDENTITY;e.mode===re.SCENE3D?(y=this.modelMatrix,m=ue.clone(this._baseVolumeWC,this._boundingVolume)):m=ue.clone(this._baseVolume2D,this._boundingVolume),Tct(this,e,m);let A=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,A){this._blendOption===Fi.OPAQUE||this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ge.fromCache({depthTest:{enabled:!0,func:te.LESS},depthMask:!0}):this._rsOpaque=void 0;let I=this._blendOption===Fi.TRANSLUCENT;this._blendOption===Fi.TRANSLUCENT||this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ge.fromCache({depthTest:{enabled:!0,func:I?te.LEQUAL:te.LESS},depthMask:I,blending:tn.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let b,x,T,E,v;if(A||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){b=DB,x=PB,v=["INSTANCED"],l(this._batchTable)&&(v.push("VECTOR_TILE"),b=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(b),x=this._batchTable.getFragmentShaderCallback(!1,void 0)(x)),T=new Ye({defines:v,sources:[b]}),this._shaderRotation&&T.defines.push("ROTATION"),this._shaderAlignedAxis&&T.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&T.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&T.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&T.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&T.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&T.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&T.defines.push("VS_THREE_POINT_DEPTH_CHECK");let I=1-Ga.CUTOFF;this._sdf&&T.defines.push("SDF");let R=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT&&(E=new Ye({defines:["OPAQUE",R],sources:[x]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${I}`)),this._sp=en.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:zr}),E=new Ye({defines:["TRANSLUCENT",R],sources:[x]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=en.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:zr})),this._blendOption===Fi.OPAQUE&&(E=new Ye({defines:[R],sources:[x]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${I}`)),this._sp=en.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:zr})),this._blendOption===Fi.TRANSLUCENT&&(E=new Ye({defines:[R],sources:[x]}),this._shaderClampToGround&&E.defines.push("VS_THREE_POINT_DEPTH_CHECK"),this._sdf&&(E.defines.push("SDF"),E.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=en.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:zr})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let S=e.commandList;if(p.render||p.pick){let I=this._colorCommands,R=this._blendOption===Fi.OPAQUE,O=this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT,L=this._vaf.va,_=L.length,C=this._uniforms,w;l(this._batchTable)?(C=this._batchTable.getUniformMapCallback()(C),w=this._batchTable.getPickId()):w="v_pickColor",I.length=_;let P=O?_*2:_;for(let M=0;M<P;++M){let F=I[M];l(F)||(F=I[M]=new at);let V=R||O&&M%2===0;F.pass=V||!O?Ie.OPAQUE:Ie.TRANSLUCENT,F.owner=this;let B=O?Math.floor(M/2):M;F.boundingVolume=m,F.modelMatrix=y,F.count=L[B].indicesCount,F.shaderProgram=V?this._sp:this._spTranslucent,F.uniformMap=C,F.vertexArray=L[B].va,F.renderState=V?this._rsOpaque:this._rsTranslucent,F.debugShowBoundingVolume=this.debugShowBoundingVolume,F.pickId=w,F.count=6,F.instanceCount=i,S.push(F)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=Ect(this,e.context)),S.push(this.debugCommand))}this._allBillboardsReady=r};Xd.prototype.isDestroyed=function(){return!1};Xd.prototype.destroy=function(){return l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),Fbe(this._billboards),le(this)};var Gf=Xd;function vct(e,t,n,i,r){return function(){let o=document.createElement("canvas"),s=r+2*i;o.height=o.width=s;let a=o.getContext("2d");return a.clearRect(0,0,s,s),i!==0&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,r/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,r/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),o}}var wT=vct;var Sct=new he,bm=class{constructor(t,n,i,r,o){this._content=t,this._billboard=i,this._label=r,this._polyline=o,this._batchId=n,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),ew(this)}get show(){return this._label.show}set show(t){this._label.show=t,this._billboard.show=t,this._polyline.show=t}get color(){return this._color}set color(t){this._color=z.clone(t,this._color),ew(this)}get pointSize(){return this._pointSize}set pointSize(t){this._pointSize=t,ew(this)}get pointOutlineColor(){return this._pointOutlineColor}set pointOutlineColor(t){this._pointOutlineColor=z.clone(t,this._pointOutlineColor),ew(this)}get pointOutlineWidth(){return this._pointOutlineWidth}set pointOutlineWidth(t){this._pointOutlineWidth=t,ew(this)}get labelColor(){return this._label.fillColor}set labelColor(t){this._label.fillColor=t,this._polyline.show=this._label.show&&t.alpha>0}get labelOutlineColor(){return this._label.outlineColor}set labelOutlineColor(t){this._label.outlineColor=t}get labelOutlineWidth(){return this._label.outlineWidth}set labelOutlineWidth(t){this._label.outlineWidth=t}get font(){return this._label.font}set font(t){this._label.font=t}get labelStyle(){return this._label.style}set labelStyle(t){this._label.style=t}get labelText(){return this._label.text}set labelText(t){l(t)||(t=""),this._label.text=t}get backgroundColor(){return this._label.backgroundColor}set backgroundColor(t){this._label.backgroundColor=t}get backgroundPadding(){return this._label.backgroundPadding}set backgroundPadding(t){this._label.backgroundPadding=t}get backgroundEnabled(){return this._label.showBackground}set backgroundEnabled(t){this._label.showBackground=t}get scaleByDistance(){return this._label.scaleByDistance}set scaleByDistance(t){this._label.scaleByDistance=t,this._billboard.scaleByDistance=t}get translucencyByDistance(){return this._label.translucencyByDistance}set translucencyByDistance(t){this._label.translucencyByDistance=t,this._billboard.translucencyByDistance=t}get distanceDisplayCondition(){return this._label.distanceDisplayCondition}set distanceDisplayCondition(t){this._label.distanceDisplayCondition=t,this._polyline.distanceDisplayCondition=t,this._billboard.distanceDisplayCondition=t}get heightOffset(){return this._heightOffset}set heightOffset(t){let n=this._heightOffset??0,i=this._content.tileset.ellipsoid,r=i.cartesianToCartographic(this._billboard.position,Sct);r.height=r.height-n+t;let o=i.cartographicToCartesian(r);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=t}get anchorLineEnabled(){return this._polyline.show}set anchorLineEnabled(t){this._polyline.show=t}get anchorLineColor(){return this._polyline.material.uniforms.color}set anchorLineColor(t){this._polyline.material.uniforms.color=z.clone(t,this._polyline.material.uniforms.color)}get image(){return this._billboardImage}set image(t){let n=this._billboardImage!==t;this._billboardImage=t,n&&ew(this)}get disableDepthTestDistance(){return this._label.disableDepthTestDistance}set disableDepthTestDistance(t){this._label.disableDepthTestDistance=t,this._billboard.disableDepthTestDistance=t}get horizontalOrigin(){return this._billboard.horizontalOrigin}set horizontalOrigin(t){this._billboard.horizontalOrigin=t}get verticalOrigin(){return this._billboard.verticalOrigin}set verticalOrigin(t){this._billboard.verticalOrigin=t}get labelHorizontalOrigin(){return this._label.horizontalOrigin}set labelHorizontalOrigin(t){this._label.horizontalOrigin=t}get labelVerticalOrigin(){return this._label.verticalOrigin}set labelVerticalOrigin(t){this._label.verticalOrigin=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get pickIds(){let t=this._pickIds;return t[0]=this._billboard.pickId,t[1]=this._label.pickId,t[2]=this._polyline.pickId,t}hasProperty(t){return this._content.batchTable.hasProperty(this._batchId,t)}getPropertyIds(t){return this._content.batchTable.getPropertyIds(this._batchId,t)}getProperty(t){return this._content.batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return na.getPropertyInherited(this._content,this._batchId,t)}setProperty(t,n){this._content.batchTable.setProperty(this._batchId,t,n),this._content.featurePropertiesDirty=!0}isExactClass(t){return this._content.batchTable.isExactClass(this._batchId,t)}isClass(t){return this._content.batchTable.isClass(this._batchId,t)}getExactClassName(){return this._content.batchTable.getExactClassName(this._batchId)}};ut(bm,"defaultColor",z.WHITE),ut(bm,"defaultPointOutlineColor",z.BLACK),ut(bm,"defaultPointOutlineWidth",0),ut(bm,"defaultPointSize",8);function ew(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=e._color??bm.defaultColor,i=e._pointOutlineColor??bm.defaultPointOutlineColor,r=e._pointOutlineWidth??bm.defaultPointOutlineWidth,o=e._pointSize??bm.defaultPointSize,s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,u=e._billboardSize;if(z.equals(n,s)&&z.equals(i,a)&&r===c&&o===u)return;e._billboardColor=z.clone(n,e._billboardColor),e._billboardOutlineColor=z.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=r,e._billboardSize=o;let f=n.alpha,d=n.toCssColorString(),p=i.toCssColorString(),g=JSON.stringify([d,o,p,r]);t.setImage(g,wT(f,d,p,r,o))}var r_=bm;function wct(e,t){let n=e.measureText(t);if(!/\S/.test(t))return{width:n.width,height:0,ascent:0,descent:0,minx:0};let r=Math.round(n.actualBoundingBoxAscent),o=Math.round(n.actualBoundingBoxDescent),s=Math.max(r+o,1);return{width:n.width,height:s,ascent:r,descent:o,minx:-Math.round(n.actualBoundingBoxLeft)}}var IT;function Ict(e,t){if(e==="")return;t=t??H.EMPTY_OBJECT;let n=t.font??"10px sans-serif",i=t.stroke??!1,r=t.fill??!0,o=t.strokeWidth??1,s=t.backgroundColor??z.TRANSPARENT,a=t.padding??0,c=a*2,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;let f=u.getContext("2d",{willReadFrequently:!0});l(IT)||(l(f.imageSmoothingEnabled)?IT="imageSmoothingEnabled":l(f.mozImageSmoothingEnabled)?IT="mozImageSmoothingEnabled":l(f.webkitImageSmoothingEnabled)?IT="webkitImageSmoothingEnabled":l(f.msImageSmoothingEnabled)&&(IT="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=o,f[IT]=!1,u.style.visibility="hidden",document.body.appendChild(u);let d=wct(f,e);u.dimensions=d,document.body.removeChild(u),u.style.visibility="";let p=!/\S/.test(e),g=i&&!p?Math.ceil(o/2):0,m=g*2,y=-d.minx+g,A=Math.ceil(d.width)+y+c+g,b=d.height+c+m,x=d.ascent+a+g;if(u.width=A,u.height=b,f.font=n,f.lineJoin="round",f.lineWidth=o,f[IT]=!1,s!==z.TRANSPARENT&&(f.fillStyle=s.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let T=t.strokeColor??z.BLACK;f.strokeStyle=T.toCssColorString(),f.strokeText(e,y+a,x)}if(r){let T=t.fillColor??z.WHITE;f.fillStyle=T.toCssColorString(),f.fillText(e,y+a,x)}return u}var PT=Ict;var sxe=Qo(Jbe(),1);var Zbe={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2};Object.freeze(Zbe);var Ao=Zbe;var Qbe={},exe=0,Dct=256,Rct=new z(.165,.165,.165,.8),Oct=new U(7,5),oa=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function DT(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function NB(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function LB(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function nxe(e){let t=Qbe[e._font];if(!l(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(LB(n,"line-height"));isNaN(i)&&(i=void 0),t={family:LB(n,"font-family"),size:LB(n,"font-size").replace("px",""),style:LB(n,"font-style"),weight:LB(n,"font-weight"),lineHeight:i},document.body.removeChild(n),exe<Dct&&(Qbe[e._font]=t,exe++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function xm(e,t){e=e??H.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,r=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=qt.clone(n)),l(i)&&(i=qt.clone(i)),l(r)&&(r=qt.clone(r)),l(o)&&(o=jt.clone(o)),this._renderedText=void 0,this._text=void 0,this._show=e.show??!0,this._font=e.font??"30px sans-serif",this._fillColor=z.clone(e.fillColor??z.WHITE),this._outlineColor=z.clone(e.outlineColor??z.BLACK),this._outlineWidth=e.outlineWidth??1,this._showBackground=e.showBackground??!1,this._backgroundColor=z.clone(e.backgroundColor??Rct),this._backgroundPadding=U.clone(e.backgroundPadding??Oct),this._style=e.style??Ao.FILL,this._verticalOrigin=e.verticalOrigin??Hn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??zi.LEFT,this._pixelOffset=U.clone(e.pixelOffset??U.ZERO),this._eyeOffset=h.clone(e.eyeOffset??h.ZERO),this._position=h.clone(e.position??h.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=r,this._heightReference=e.heightReference??We.NONE,this._distanceDisplayCondition=o,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._lastSurfaceHeight=void 0,this._lastSurfaceQueryFrame=-1,this._lastSurfaceQueryMissed=!1,this._clampedToSurface=!1,this._clampingCartesian=void 0,this._clampingHeight=0,this._clampingHeightValid=!1,this._mode=void 0,this._clusterShow=!0,this.text=e.text??"",this._relativeSize=1,nxe(this),this._updateClamping()}Object.defineProperties(xm.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i].billboard;l(o)&&(o.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!BZ(t,e)){ET(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r].billboard;l(s)&&(s.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i].billboard;l(o)&&(o.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),NB(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=xm.filterUnsupportedCharacters(e);this._renderedText=xm.enableRightToLeftDetection?kct(t):t,DT(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,DT(this),nxe(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;z.equals(t,e)||(z.clone(e,t),DT(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),DT(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,DT(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,DT(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!z.equals(t,e)){z.clone(e,t);let n=this._backgroundBillboard;l(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){let t=this._backgroundPadding;U.equals(t,e)||(U.clone(e,t),NB(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,DT(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!U.equals(t,e)){U.clone(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r];l(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!qt.equals(t,e)){this._translucencyByDistance=qt.clone(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r];l(s.billboard)&&(s.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;if(!qt.equals(t,e)){this._pixelOffsetScaleByDistance=qt.clone(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r];l(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;if(!qt.equals(t,e)){this._scaleByDistance=qt.clone(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r];l(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let r=0,o=n.length;r<o;r++){let s=n[r];l(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,NB(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),NB(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),NB(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!jt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=jt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=ET(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,r=t.length;i<r;i++){let o=t[i];l(o.billboard)&&(o.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}},ready:{get:function(){if(this._rebindAllGlyphs||this._repositionAllGlyphs||l(this._backgroundBillboard)&&!this._backgroundBillboard.ready)return!1;let e=this._glyphs;for(let t=0,n=e.length;t<n;t++){let i=e[t];if(l(i.billboard)&&!i.billboard.ready)return!1}return!0}}});xm.prototype._updateClamping=function(){Br._updateClamping(this._labelCollection,this)};xm.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new U);let i=this._labelCollection.modelMatrix,r=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Br._computeScreenSpacePosition(i,r,this._eyeOffset,this._pixelOffset,e,t)};xm.getScreenSpaceBoundingBox=function(e,t,n){let i,r,o,s,a=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,r=t.y-c._translate.y,o=c.width*a,s=c.height*a,e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?r-=s:e.verticalOrigin===Hn.CENTER&&(r-=s*.5);else{i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;let u=0,f=0,d=e._glyphs,p=d.length;for(let g=0;g<p;++g){let m=d[g],y=m.billboard;if(!l(y))continue;let A=t.x+y._translate.x,b=t.y-y._translate.y,x=m.dimensions.width*a,T=m.dimensions.height*a;e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?b-=T:e.verticalOrigin===Hn.CENTER&&(b-=T*.5),e._verticalOrigin===Hn.TOP?b+=Ga.PADDING*a:(e._verticalOrigin===Hn.BOTTOM||e._verticalOrigin===Hn.BASELINE)&&(b-=Ga.PADDING*a),i=Math.min(i,A),r=Math.min(r,b),u=Math.max(u,A+x),f=Math.max(f,b+T)}o=u-i,s=f-r}return l(n)||(n=new et),n.x=i,n.y=r,n.width=o,n.height=s,n};xm.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};xm.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&h.equals(this._position,e._position)&&z.equals(this._fillColor,e._fillColor)&&z.equals(this._outlineColor,e._outlineColor)&&z.equals(this._backgroundColor,e._backgroundColor)&&U.equals(this._backgroundPadding,e._backgroundPadding)&&U.equals(this._pixelOffset,e._pixelOffset)&&h.equals(this._eyeOffset,e._eyeOffset)&&qt.equals(this._translucencyByDistance,e._translucencyByDistance)&&qt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&qt.equals(this._scaleByDistance,e._scaleByDistance)&&jt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};xm.prototype.isDestroyed=function(){return!1};xm.enableRightToLeftDetection=!1;function Mct(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,r=[],o="",s=oa.LTR,a="",c=e.length;for(let u=0;u<c;++u){let f=e.charAt(u);t.test(f)?a=oa.RTL:n.test(f)?a=oa.LTR:i.test(f)?a=oa.BRACKETS:a=oa.WEAK,u===0&&(s=a),s===a&&a!==oa.BRACKETS?o+=f:(o!==""&&r.push({Type:s,Word:o}),s=a,o=f)}return r.push({Type:a,Word:o}),r}function Nct(e){return e.split("").reverse().join("")}function FB(e,t,n){return e.slice(0,t)+n+e.slice(t)}function Lct(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var Fct="\u05D0-\u05EA",Bct="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",txe=new RegExp(`[${Fct}${Bct}]`);function kct(e){let t=e.split(`
`),n="";for(let i=0;i<t.length;i++){let r=t[i],o=txe.test(r.charAt(0)),s=Mct(r,txe),a=0,c="";for(let u=0;u<s.length;++u){let f=s[u],d=f.Type===oa.BRACKETS?Lct(f.Word):Nct(f.Word);o?f.Type===oa.RTL?(c=d+c,a=0):f.Type===oa.LTR?(c=FB(c,a,f.Word),a+=f.Word.length):(f.Type===oa.WEAK||f.Type===oa.BRACKETS)&&(f.Type===oa.WEAK&&s[u-1].Type===oa.BRACKETS?c=d+c:s[u-1].Type===oa.RTL?(c=d+c,a=0):s.length>u+1?s[u+1].Type===oa.RTL?(c=d+c,a=0):(c=FB(c,a,f.Word),a+=f.Word.length):c=FB(c,0,d)):f.Type===oa.RTL?c=FB(c,a,d):f.Type===oa.LTR?(c+=f.Word,a=c.length):(f.Type===oa.WEAK||f.Type===oa.BRACKETS)&&(u>0&&s[u-1].Type===oa.RTL?s.length>u+1?s[u+1].Type===oa.RTL?c=FB(c,a,d):(c+=f.Word,a=c.length):c+=f.Word:(c+=f.Word,a=c.length))}n+=c,i<t.length-1&&(n+=`
`)}return n}var IA=xm;var axe=Qo(ixe(),1);function zct(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var Vct=1.2,rxe="ID_WHITE_PIXEL",YZ=new U(4,4),jct=new et(1,1,1,1);function Hct(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let r=document.createElement("canvas");r.width=YZ.x,r.height=YZ.y;let o=r.getContext("2d");o.fillStyle="#fff",o.fillRect(0,0,r.width,r.height),n.loadImage(rxe,r),n.addImageSubRegion(rxe,jct)}let i=e.add({collection:t});return i.setImageTexture(n),i._positionFromParent=!0,i._labelTranslate=new U,i}var o_={};function Gct(e,t,n,i,r,o){return o_.font=t,o_.fillColor=n,o_.strokeColor=i,o_.strokeWidth=r,o_.padding=Ga.PADDING,o_.fill=o===Ao.FILL||o===Ao.FILL_AND_OUTLINE,o_.stroke=o===Ao.OUTLINE||o===Ao.FILL_AND_OUTLINE,o_.backgroundColor=z.BLACK,PT(e,o_)}function XZ(e,t){let n=t.billboard;l(n)&&(n.show=!1,n._clampedPosition=void 0,l(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}var Wct=new axe.default,qct=/\s/;function Yct(e,t){let n=t._renderedText,i=Wct.splitGraphemes(n),r=i.length,o=t._glyphs,s=o.length;if(t._relativeSize=t._fontSize/Ga.FONT_SIZE,r<s)for(let p=r;p<s;++p)XZ(e,o[p]);o.length=r;let a=t._backgroundBillboard,c=e._backgroundBillboardCollection;t._showBackground&&!l(a)&&(a=Hct(c,e),t._backgroundBillboard=a),Xct(c,t,a);let u=e._glyphBillboardCollection,f=u.billboardTextureCache,d=e._textDimensionsCache;for(let p=0;p<r;++p){let g=i[p],m=t._verticalOrigin,y=JSON.stringify([g,t._fontFamily,t._fontStyle,t._fontWeight,+m]),A=d[y],b=f.get(y);if(!l(b)||!l(A)){b=new i_(u),f.set(y,b);let v=`${t._fontStyle} ${t._fontWeight} ${Ga.FONT_SIZE}px ${t._fontFamily}`,S=Gct(g,v,z.WHITE,z.WHITE,0,Ao.FILL);if(A=S.dimensions,d[y]=A,S.width>0&&S.height>0&&!qct.test(g)){let I=(0,sxe.default)(S,{cutoff:Ga.CUTOFF,radius:Ga.RADIUS}),R=S.getContext("2d"),O=S.width,L=S.height,_=R.getImageData(0,0,O,L);for(let C=0;C<O;C++)for(let w=0;w<L;w++){let P=w*O+C,M=I[P]*255,F=P*4;_.data[F+0]=M,_.data[F+1]=M,_.data[F+2]=M,_.data[F+3]=M}R.putImageData(_,0,0),b.loadImage(y,S)}}let x=o[p];if(l(x)||(x=new zct,x.dimensions=A,x.billboardTexture=b,o[p]=x),x.billboardTexture.id!==y&&(x.billboardTexture=b,x.dimensions=A),!b.hasImage){XZ(e,x);continue}let T=x.billboard,E=e._spareBillboards;l(T)||(E.length>0?T=E.pop():(T=u.add({collection:e}),T._labelDimensions=new U,T._labelTranslate=new U,T._positionFromParent=!0),x.billboard=T),T.setImageTexture(b),T.show=t._show,T.position=t._position,T.eyeOffset=t._eyeOffset,T.pixelOffset=t._pixelOffset,T.horizontalOrigin=zi.LEFT,T.verticalOrigin=t._verticalOrigin,T.heightReference=t._heightReference,l(t._clampedPosition)&&(T._clampedPosition=t._clampedPosition),T.scale=t.totalScale,T.pickPrimitive=t,T.id=t._id,T.translucencyByDistance=t._translucencyByDistance,T.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,T.scaleByDistance=t._scaleByDistance,T.distanceDisplayCondition=t._distanceDisplayCondition,T.disableDepthTestDistance=t._disableDepthTestDistance,T._batchIndex=t._batchIndex,T.outlineColor=t.outlineColor,t.style===Ao.FILL_AND_OUTLINE?(T.color=t._fillColor,T.outlineWidth=t.outlineWidth):t.style===Ao.FILL?(T.color=t._fillColor,T.outlineWidth=0):t.style===Ao.OUTLINE&&(T.color=z.TRANSPARENT,T.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function Xct(e,t,n){if(!l(n))return;let i=t.show&&t._showBackground&&t._renderedText.split(`
`).join("").length>0;if(t.show&&!i){e.remove(n),t._backgroundBillboard=void 0;return}n.color=t._backgroundColor,n.show=t._show,n.position=t._position,n.eyeOffset=t._eyeOffset,n.pixelOffset=t._pixelOffset,n.horizontalOrigin=zi.LEFT,n.verticalOrigin=t._verticalOrigin,n.heightReference=t._heightReference,l(t._clampedPosition)&&(n._clampedPosition=t._clampedPosition),n.scale=t.totalScale,n.pickPrimitive=t,n.id=t._id,n.translucencyByDistance=t._translucencyByDistance,n.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,n.scaleByDistance=t._scaleByDistance,n.distanceDisplayCondition=t._distanceDisplayCondition,n.disableDepthTestDistance=t._disableDepthTestDistance,n.clusterShow=t.clusterShow}function oxe(e,t,n){return t===zi.CENTER?-e/2:t===zi.RIGHT?-(e+n.x):n.x}var qo=new U,Kct=new U;function $ct(e){let t=e._glyphs,n=e._renderedText,i=0,r=0,o=[],s=Number.NEGATIVE_INFINITY,a=0,c=1,u=t.length,f=e._backgroundBillboard,d=U.clone(l(f)?e._backgroundPadding:U.ZERO,Kct);d.x/=e._relativeSize,d.y/=e._relativeSize;for(let O=0;O<u;++O){if(n.charAt(O)===`
`){o.push(i),++c,i=0;continue}let _=t[O].dimensions;l(_)&&(a=Math.max(a,_.height-_.descent),s=Math.max(s,_.descent),i+=_.width-_.minx,O<u-1&&(i+=t[O+1].dimensions.minx),r=Math.max(r,i))}o.push(i);let p=a+s,g=e.totalScale,m=e._horizontalOrigin,y=e._verticalOrigin,A=0,b=o[A],x=oxe(b,m,d),T=(l(e._lineHeight)?e._lineHeight:Vct*e._fontSize)/e._relativeSize,E=T*(c-1),v=r,S=p+E;l(f)&&(v+=d.x*2,S+=d.y*2,f._labelHorizontalOrigin=m),qo.x=x*g,qo.y=0;let I=!0,R=0;for(let O=0;O<u;++O){if(n.charAt(O)===`
`){++A,R+=T,b=o[A],x=oxe(b,m,d),qo.x=x*g,I=!0;continue}let L=t[O],_=L.dimensions;if(l(_)&&(y===Hn.TOP?(qo.y=_.height-a-d.y,qo.y+=Ga.PADDING):y===Hn.CENTER?qo.y=(E+_.height-a)/2:y===Hn.BASELINE?(qo.y=E,qo.y-=Ga.PADDING):(qo.y=E+s+d.y,qo.y-=Ga.PADDING),qo.y=(qo.y-_.descent-R)*g,I&&(qo.x-=Ga.PADDING*g,I=!1),l(L.billboard)&&(L.billboard._setTranslate(qo),L.billboard._labelDimensions.x=v,L.billboard._labelDimensions.y=S,L.billboard._labelHorizontalOrigin=m,_s(e.heightReference)&&(L.billboard._labelTranslate=U.clone(qo,L.billboard._labelTranslate))),O<u-1)){let C=t[O+1];qo.x+=(_.width-_.minx+C.dimensions.minx)*g}}l(f)&&n.split(`
`).join("").length>0&&(m===zi.CENTER?x=-r/2-d.x:m===zi.RIGHT?x=-(r+d.x*2):x=0,qo.x=x*g,y===Hn.TOP?qo.y=p-a-s:y===Hn.CENTER?qo.y=(p-a)/2-s:y===Hn.BASELINE?qo.y=-d.y-s:qo.y=0,qo.y=qo.y*g,f.width=v,f.height=S,f._setTranslate(qo),f._labelTranslate=U.clone(qo,f._labelTranslate))}function cxe(e,t){let n=t._glyphs;for(let i=0,r=n.length;i<r;++i)XZ(e,n[i]);l(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,l(t._removeCallbackFunc)&&t._removeCallbackFunc(),le(t)}function Qp(e){e=e??H.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new Gf({scene:this._scene,textureAtlas:new CT({initialSize:YZ}),coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new i_(t),this._glyphBillboardCollection=new Gf({scene:this._scene,batchTable:this._batchTable,coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance}),this._glyphBillboardCollection._sdf=!0,this._spareBillboards=[],this._textDimensionsCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=z.clone(z.WHITE),this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Fi.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(Qp.prototype,{length:{get:function(){return this._labels.length}},sizeInBytes:{get:function(){return this._glyphBillboardCollection.sizeInBytes+this._backgroundBillboardCollection.sizeInBytes}},ready:{get:function(){let e=this._backgroundBillboardCollection.get(0);return l(e)&&!e.ready?!1:this._glyphBillboardCollection.ready}},coarseDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.coarseDepthTestDistance},set:function(e){this._backgroundBillboardCollection.coarseDepthTestDistance=e,this._glyphBillboardCollection.coarseDepthTestDistance=e}},threePointDepthTestDistance:{get:function(){return this._backgroundBillboardCollection.threePointDepthTestDistance},set:function(e){this._backgroundBillboardCollection.threePointDepthTestDistance=e,this._glyphBillboardCollection.threePointDepthTestDistance=e}}});Qp.prototype.add=function(e){let t=new IA(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Qp.prototype.remove=function(e){if(l(e)&&e._labelCollection===this){let t=this._labels.indexOf(e);if(t!==-1)return this._labels.splice(t,1),cxe(this,e),!0}return!1};Qp.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)cxe(this,e[t]);e.length=0};Qp.prototype.contains=function(e){return l(e)&&e._labelCollection===this};Qp.prototype.get=function(e){return this._labels[e]};Qp.prototype.update=function(e){if(!this.show)return;let t=this._glyphBillboardCollection,n=this._backgroundBillboardCollection;t.modelMatrix=this.modelMatrix,t.debugShowBoundingVolume=this.debugShowBoundingVolume,n.modelMatrix=this.modelMatrix,n.debugShowBoundingVolume=this.debugShowBoundingVolume;let i=this._labelsToUpdate.length;for(let o=0;o<i;++o){let s=this._labelsToUpdate[o];if(s.isDestroyed())continue;let a=s._glyphs.length;s._rebindAllGlyphs&&(Yct(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&($ct(s),s._repositionAllGlyphs=!1);let c=s._glyphs.length-a;this._totalGlyphCount+=c}let r=n.length>0?Fi.TRANSLUCENT:this.blendOption;t.blendOption=r,n.blendOption=r,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};Qp.prototype.isDestroyed=function(){return!1};Qp.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),le(this)};var e0=Qp;var BB=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 position2DHigh;
in vec3 position2DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 prevPosition2DHigh;
in vec3 prevPosition2DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec3 nextPosition2DHigh;
in vec3 nextPosition2DLow;
in vec4 texCoordExpandAndBatchIndex;
out vec2 v_st;
out float v_width;
out vec4 v_pickColor;
out float v_polylineAngle;
void main()
{
float texCoord = texCoordExpandAndBatchIndex.x;
float expandDir = texCoordExpandAndBatchIndex.y;
bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
float batchTableIndex = texCoordExpandAndBatchIndex.w;
vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
float width = widthAndShow.x + 0.5;
float show = widthAndShow.y;
if (width < 1.0)
{
show = 0.0;
}
vec4 pickColor = batchTable_getPickColor(batchTableIndex);
vec4 p, prev, next;
if (czm_morphTime == 1.0)
{
p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
}
else if (czm_morphTime == 0.0)
{
p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
}
else
{
p = czm_columbusViewMorph(
czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
czm_morphTime);
prev = czm_columbusViewMorph(
czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
czm_morphTime);
next = czm_columbusViewMorph(
czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
czm_morphTime);
}
#ifdef DISTANCE_DISPLAY_CONDITION
vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
vec3 centerLow = centerLowAndRadius.xyz;
float radius = centerLowAndRadius.w;
vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
lengthSq = czm_eyeHeight2D.y;
}
else
{
vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
}
float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
if (lengthSq < nearSq || lengthSq > farSq)
{
show = 0.0;
}
#endif
float polylineAngle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
gl_Position = czm_viewportOrthographic * positionWC * show;
v_st.s = texCoord;
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
v_width = width;
v_pickColor = pickColor;
v_polylineAngle = polylineAngle;
}
`;var au={};au.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};au.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var Jct=new he;au.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let r=0;r<n;r++){let o=e[r];i[r]=t.cartesianToCartographic(o,Jct).height}return i};var Zct=new N,Qct=new h,lxe=new h,elt=new sn(h.UNIT_X,0),uxe=new h,tlt=new sn(h.UNIT_X,0),nlt=new h,ilt=new h,$Z=[];function dxe(e,t,n){let i=$Z;i.length=e;let r;if(t===n){for(r=0;r<e;r++)i[r]=t;return i}let s=(n-t)/e;for(r=0;r<e;r++){let a=t+r*s;i[r]=a}return i}var HH=new he,jH=new he,PA=new h,JZ=new h,rlt=new h,KZ=new _g,kB=new Dc;function olt(e,t,n,i,r,o,s,a){let c=i.scaleToGeodeticSurface(e,JZ),u=i.scaleToGeodeticSurface(t,rlt),f=au.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,HH),p=i.cartesianToCartographic(u,jH),g=dxe(f,r,o);KZ.setEndPoints(d,p);let m=KZ.surfaceDistance/f,y=a;d.height=r;let A=i.cartographicToCartesian(d,PA);h.pack(A,s,y),y+=3;for(let b=1;b<f;b++){let x=KZ.interpolateUsingSurfaceDistance(b*m,jH);x.height=g[b],A=i.cartographicToCartesian(x,PA),h.pack(A,s,y),y+=3}return y}function slt(e,t,n,i,r,o,s,a){let c=i.cartesianToCartographic(e,HH),u=i.cartesianToCartographic(t,jH),f=au.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=dxe(f,r,o);kB.ellipsoid.equals(i)||(kB=new Dc(void 0,void 0,i)),kB.setEndPoints(c,u);let p=kB.surfaceDistance/f,g=a;c.height=r;let m=i.cartographicToCartesian(c,PA);h.pack(m,s,g),g+=3;for(let y=1;y<f;y++){let A=kB.interpolateUsingSurfaceDistance(y*p,jH);A.height=d[y],m=i.cartographicToCartesian(A,PA),h.pack(m,s,g),g+=3}return g}au.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??N.IDENTITY;let r=N.inverseTransformation(t,Zct),o=N.multiplyByPoint(r,h.ZERO,Qct),s=h.normalize(N.multiplyByPointAsVector(r,h.UNIT_Y,lxe),lxe),a=sn.fromPointNormal(o,s,elt),c=h.normalize(N.multiplyByPointAsVector(r,h.UNIT_X,uxe),uxe),u=sn.fromPointNormal(o,c,tlt),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let g=1;g<p;++g){let m=e[g];if(sn.getPointDistance(u,d)<0||sn.getPointDistance(u,m)<0){let y=_i.lineSegmentPlane(d,m,a,nlt);if(l(y)){let A=h.multiplyByScalar(s,5e-9,ilt);sn.getPointDistance(a,d)<0&&h.negate(A,A),n.push(h.add(y,A,new h)),i.push(f+1),h.negate(A,A),n.push(h.add(y,A,new h)),f=1}}n.push(h.clone(e[g])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};au.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ee.default,r=e.height??0,o=Array.isArray(r);if(n<1)return[];if(n===1){let y=i.scaleToGeodeticSurface(t[0],JZ);if(r=o?r[0]:r,r!==0){let A=i.geodeticSurfaceNormal(y,PA);h.multiplyByScalar(A,r,A),h.add(y,A,y)}return[y.x,y.y,y.z]}let s=e.minDistance;if(!l(s)){let y=e.granularity??D.RADIANS_PER_DEGREE;s=D.chordLength(y,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=au.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let y=t[c],A=t[c+1],b=o?r[c]:r,x=o?r[c+1]:r;d=olt(y,A,s,i,b,x,f,d)}$Z.length=0;let p=t[n-1],g=i.cartesianToCartographic(p,HH);g.height=o?r[n-1]:r;let m=i.cartographicToCartesian(g,PA);return h.pack(m,f,u-3),f};var fxe=new he,alt=new he;au.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ee.default,r=e.height??0,o=Array.isArray(r);if(n<1)return[];if(n===1){let b=i.scaleToGeodeticSurface(t[0],JZ);if(r=o?r[0]:r,r!==0){let x=i.geodeticSurfaceNormal(b,PA);h.multiplyByScalar(x,r,x),h.add(b,x,b)}return[b.x,b.y,b.z]}let s=e.granularity??D.RADIANS_PER_DEGREE,a=0,c,u=i.cartesianToCartographic(t[0],fxe),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],alt),a+=au.numberOfPointsRhumbLine(u,f,s),u=he.clone(f,fxe);let d=(a+1)*3,p=new Array(d),g=0;for(c=0;c<n-1;c++){let b=t[c],x=t[c+1],T=o?r[c]:r,E=o?r[c+1]:r;g=slt(b,x,s,i,T,E,p,g)}$Z.length=0;let m=t[n-1],y=i.cartesianToCartographic(m,HH);y.height=o?r[n-1]:r;let A=i.cartographicToCartesian(y,PA);return h.pack(A,p,d-3),p};au.generateCartesianArc=function(e){let t=au.generateArc(e),n=t.length/3,i=new Array(n);for(let r=0;r<n;r++)i[r]=h.unpack(t,r*3);return i};au.generateCartesianRhumbArc=function(e){let t=au.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let r=0;r<n;r++)i[r]=h.unpack(t,r*3);return i};var ir=au;function Wf(e,t){e=e??H.EMPTY_OBJECT,this._show=e.show??!0,this._width=e.width??1,this._loop=e.loop??!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,l(this._material)||(this._material=Qi.fromType(Qi.ColorType,{color:new z(1,1,1,1)}));let n=e.positions;l(n)||(n=[]),this._positions=n,this._actualPositions=Fr(n,h.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(h.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=N.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=ir.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(mxe),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=ue.fromPoints(this._actualPositions),this._boundingVolumeWC=ue.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new ue}var hxe=Wf.POSITION_INDEX=0,clt=Wf.SHOW_INDEX=1,llt=Wf.WIDTH_INDEX=2,ult=Wf.MATERIAL_INDEX=3,UB=Wf.POSITION_SIZE_INDEX=4,flt=Wf.DISTANCE_DISPLAY_CONDITION=5,mxe=Wf.NUMBER_OF_PROPERTIES=6;function s_(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(Wf.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,s_(this,clt))}},positions:{get:function(){return this._positions},set:function(e){let t=Fr(e,h.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(h.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&s_(this,UB),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=ue.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=ue.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),s_(this,hxe),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,s_(this,ult))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,s_(this,llt))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!h.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(h.clone(t[0]))):t.length>2&&h.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,s_(this,UB)}}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!l(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){jt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=jt.clone(e,this._distanceDisplayCondition),s_(this,flt))}}});Wf.prototype.update=function(){let e=N.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[hxe]>0||this._propertiesChanged[UB]>0;if((!N.equals(e,this._modelMatrix)||i)&&(this._segments=ir.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=ue.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=N.clone(e,this._modelMatrix),this._segments.positions.length!==t)s_(this,UB);else{let r=n.length;for(let o=0;o<r;++o)if(n[o]!==this._segments.lengths[o]){s_(this,UB);break}}};Wf.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};Wf.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<mxe-1;++t)e[t]=0};Wf.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var Kd=Wf;var dlt=Kd.SHOW_INDEX,hlt=Kd.WIDTH_INDEX,QZ=Kd.POSITION_INDEX,mlt=Kd.MATERIAL_INDEX,pxe=Kd.POSITION_SIZE_INDEX,plt=Kd.DISTANCE_DISPLAY_CONDITION,Txe=Kd.NUMBER_OF_PROPERTIES,Xu={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function Tm(e){e=e??H.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Txe),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Me.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=z.clone(z.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(Tm.prototype,{length:{get:function(){return eQ(this),this._polylines.length}}});Tm.prototype.add=function(e){let t=new Kd(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};Tm.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,l(e._bucket)){let t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1};Tm.prototype.removeAll=function(){tQ(this),wxe(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};Tm.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};Tm.prototype.get=function(e){return eQ(this),this._polylines[e]};function glt(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:Y.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:Y.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:Y.FLOAT,componentsPerAttribute:2}];e._batchTable=new xx(t,n,e._polylines.length)}var Exe=new Sn,Cxe=new se,vxe=new U;Tm.prototype.update=function(e){if(eQ(this),this._polylines.length===0||!this.show)return;Tlt(this,e);let t=e.context,n=e.mapProjection,i,r=this._propertiesChanged;if(this._createBatchTable){if(Ut.maximumVertexTextureImageUnits===0)throw new oe("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");glt(this,t),this._createBatchTable=!1}if(this._createVertexArray||ylt(this))yxe(this,t,n);else if(this._polylinesUpdated){let c=this._polylinesToUpdate;if(this._mode!==re.SCENE3D){let u=c.length;for(let f=0;f<u;++f)i=c[f],i.update()}if(r[pxe]||r[mlt])yxe(this,t,n);else{let u=c.length,f=this._polylineBuckets;for(let d=0;d<u;++d){i=c[d],r=i._propertiesChanged;let p=i._bucket,g=0;for(let m in f)if(f.hasOwnProperty(m)){if(f[m]===p){r[QZ]&&p.writeUpdate(g,i,this._positionBuffer,n);break}g+=f[m].lengthOfPositions}if((r[dlt]||r[hlt])&&this._batchTable.setBatchedAttribute(i._index,0,new U(i._width,i._show)),this._batchTable.attributes.length>2){if(r[QZ]||r[pxe]){let m=e.mode===re.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Sn.fromCartesian(m.center,Exe),A=se.fromElements(y.low.x,y.low.y,y.low.z,m.radius,Cxe);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,A)}if(r[plt]){let m=vxe;m.x=0,m.y=Number.MAX_VALUE;let y=i.distanceDisplayCondition;l(y)&&(m.x=y.near,m.y=y.far),this._batchTable.setBatchedAttribute(i._index,4,m)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}r=this._propertiesChanged;for(let c=0;c<Txe;++c)r[c]=0;let o=N.IDENTITY;e.mode===re.SCENE3D&&(o=this.modelMatrix);let s=e.passes,a=e.morphTime!==0;if((!l(this._opaqueRS)||this._opaqueRS.depthTest.enabled!==a)&&(this._opaqueRS=Ge.fromCache({depthMask:a,depthTest:{enabled:a}})),(!l(this._translucentRS)||this._translucentRS.depthTest.enabled!==a)&&(this._translucentRS=Ge.fromCache({blending:tn.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;_lt(this,e,c,o)}};var zB=new ue,gxe=new ue;function _lt(e,t,n,i){let r=t.context,o=t.commandList,s=n.length,a=0,c=!0,u=e._vertexArrays,f=e.debugShowBoundingVolume,p=e._batchTable.getUniformMapCallback(),g=u.length;for(let m=0;m<g;++m){let y=u[m],A=y.buckets,b=A.length;for(let x=0;x<b;++x){let T=A[x],E=T.offset,v=T.bucket.shaderProgram,S=T.bucket.polylines,I=S.length,R,O,L=0,_,C;for(let w=0;w<I;++w){let P=S[w],M=blt(P._material);if(M!==R){if(l(R)&&L>0){let j=O.isTranslucent();a>=s?(_=new at({owner:e}),n.push(_)):_=n[a],++a,C=Ot(p(O._uniforms),e._uniformMap),_.boundingVolume=ue.clone(zB,_.boundingVolume),_.modelMatrix=i,_.shaderProgram=v,_.vertexArray=y.va,_.renderState=j?e._translucentRS:e._opaqueRS,_.pass=j?Ie.TRANSLUCENT:Ie.OPAQUE,_.debugShowBoundingVolume=f,_.pickId="v_pickColor",_.uniformMap=C,_.count=L,_.offset=E,E+=L,L=0,c=!0,o.push(_)}O=P._material,O.update(r),R=M}let F=P._locatorBuckets,V=F.length;for(let j=0;j<V;++j){let k=F[j];k.locator===T&&(L+=k.count)}let B;t.mode===re.SCENE3D?B=P._boundingVolumeWC:t.mode===re.COLUMBUS_VIEW?B=P._boundingVolume2D:t.mode===re.SCENE2D?l(P._boundingVolume2D)&&(B=ue.clone(P._boundingVolume2D,gxe),B.center.x=0):l(P._boundingVolumeWC)&&l(P._boundingVolume2D)&&(B=ue.union(P._boundingVolumeWC,P._boundingVolume2D,gxe)),c?(c=!1,ue.clone(B,zB)):ue.union(B,zB,zB)}l(R)&&L>0&&(a>=s?(_=new at({owner:e}),n.push(_)):_=n[a],++a,C=Ot(p(O._uniforms),e._uniformMap),_.boundingVolume=ue.clone(zB,_.boundingVolume),_.modelMatrix=i,_.shaderProgram=v,_.vertexArray=y.va,_.renderState=O.isTranslucent()?e._translucentRS:e._opaqueRS,_.pass=O.isTranslucent()?Ie.TRANSLUCENT:Ie.OPAQUE,_.debugShowBoundingVolume=f,_.pickId="v_pickColor",_.uniformMap=C,_.count=L,_.offset=E,c=!0,o.push(_)),R=void 0}}n.length=a}Tm.prototype.isDestroyed=function(){return!1};Tm.prototype.destroy=function(){return Sxe(this),tQ(this),wxe(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),le(this)};function ylt(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[QZ]?(i.bufferUsage!==Me.STREAM_DRAW&&(t=!0,i.bufferUsage=Me.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Me.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Me.STATIC_DRAW):i.frameCount--),t}var _xe=[0,0,0];function yxe(e,t,n){e._createVertexArray=!1,tQ(e),Sxe(e),xlt(e);let i=[[]],r,o=e._batchTable,s=e._useHighlightColor,a=[0],c=0,u=[[]],f=0,d=e._polylineBuckets,p,g;for(p in d)d.hasOwnProperty(p)&&(g=d[p],g.updateShader(t,o,s),f+=g.lengthOfPositions);if(f>0){let m=e._mode,y=new Float32Array(6*f*3),A=new Float32Array(f*4),b,x=0,T=0,E=0;for(p in d)if(d.hasOwnProperty(p)){g=d[p],g.write(y,A,x,T,E,o,t,n),m===re.MORPHING&&(l(b)||(b=new Float32Array(6*f*3)),g.writeForMorph(b,x));let C=g.lengthOfPositions;x+=6*C*3,T+=C*4,E+=C*4,c=g.updateIndices(i,a,u,c)}let v=e._positionBufferUsage.bufferUsage,S=Me.STATIC_DRAW;e._positionBuffer=nt.createVertexBuffer({context:t,typedArray:y,usage:v});let I;l(b)&&(I=nt.createVertexBuffer({context:t,typedArray:b,usage:v})),e._texCoordExpandAndBatchIndexBuffer=nt.createVertexBuffer({context:t,typedArray:A,usage:S});let R=3*Float32Array.BYTES_PER_ELEMENT,O=4*Float32Array.BYTES_PER_ELEMENT,L=0,_=i.length;for(let C=0;C<_;++C)if(r=i[C],r.length>0){let w=new Uint16Array(r),P=nt.createIndexBuffer({context:t,typedArray:w,usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT});L+=a[C];let M=6*(C*(R*D.SIXTY_FOUR_KILOBYTES)-L*R),F=R+M,V=R+F,B=R+V,j=R+B,k=R+j,G=C*(O*D.SIXTY_FOUR_KILOBYTES)-L*O,q=[{index:Xu.position3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:M,strideInBytes:6*R},{index:Xu.position3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:F,strideInBytes:6*R},{index:Xu.position2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:M,strideInBytes:6*R},{index:Xu.position2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:F,strideInBytes:6*R},{index:Xu.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:V,strideInBytes:6*R},{index:Xu.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:B,strideInBytes:6*R},{index:Xu.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:V,strideInBytes:6*R},{index:Xu.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:B,strideInBytes:6*R},{index:Xu.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Xu.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:k,strideInBytes:6*R},{index:Xu.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:j,strideInBytes:6*R},{index:Xu.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:Y.FLOAT,offsetInBytes:k,strideInBytes:6*R},{index:Xu.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:Y.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:G}],Q,W,J,Z;m===re.SCENE3D?(W=e._positionBuffer,Q="vertexBuffer",J=_xe,Z="value"):m===re.SCENE2D||m===re.COLUMBUS_VIEW?(W=_xe,Q="value",J=e._positionBuffer,Z="vertexBuffer"):(W=I,Q="vertexBuffer",J=e._positionBuffer,Z="vertexBuffer"),q[0][Q]=W,q[1][Q]=W,q[2][Z]=J,q[3][Z]=J,q[4][Q]=W,q[5][Q]=W,q[6][Z]=J,q[7][Z]=J,q[8][Q]=W,q[9][Q]=W,q[10][Z]=J,q[11][Z]=J;let ae=new zn({context:t,attributes:q,indexBuffer:P});e._vertexArrays.push({va:ae,buckets:u[C]})}}}function Alt(e,t){return t instanceof Dt?t.id:t}var GH=[];function blt(e){let t=Qi._uniformList[e.type],n=t.length;GH.length=2*n;let i=0;for(let r=0;r<n;++r){let o=t[r];GH[i]=o,GH[i+1]=e._uniforms[o](),i+=2}return`${e.type}:${JSON.stringify(GH,Alt)}`}function xlt(e){let t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},r=e._polylines,o=r.length;for(let s=0;s<o;++s){let a=r[s];if(a._actualPositions.length>1){a.update();let c=a.material,u=i[c.type];l(u)||(u=i[c.type]=new t0(c,t,n)),u.addPolyline(a)}}}function Tlt(e,t){let n=t.mode;(e._mode!==n||!N.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=N.clone(e.modelMatrix),e._createVertexArray=!0)}function eQ(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,r,o=e._polylines.length;for(let s=0;s<o;++s)r=e._polylines[s],r.isDestroyed||(r._index=i++,n.push(r),t.push(r));e._polylines=t,e._polylinesToUpdate=n}}function tQ(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){let r=t[i]._bucket;l(r)&&(r.shaderProgram=r.shaderProgram&&r.shaderProgram.destroy())}}function Sxe(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}Tm.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function wxe(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function ZZ(e,t,n){this.count=e,this.offset=t,this.bucket=n}function t0(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}t0.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};t0.prototype.updateShader=function(e,t,n){if(l(this.shaderProgram))return;let i=["DISTANCE_DISPLAY_CONDITION"];n&&i.push("VECTOR_TILE"),this.material.shaderSource.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&i.push("POLYLINE_DASH"),i.push("CLIP_POLYLINE");let r=new Ye({defines:i,sources:[`in vec4 v_pickColor;
`,this.material.shaderSource,wx]}),o=t.getVertexShaderCallback()(BB),s=new Ye({defines:i,sources:[Hl,o]});this.shaderProgram=en.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:r,attributeLocations:Xu})};function Ixe(e){return h.dot(h.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(sn.ORIGIN_ZX_PLANE)===$t.INTERSECTING}t0.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===re.SCENE3D||!Ixe(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let r=0;r<t;++r)n+=i[r]*4-4;return n};var Ea=new h,$d=new h,Jd=new h,WH=new h,Elt=new se,Clt=new U;t0.prototype.write=function(e,t,n,i,r,o,s,a){let c=this.mode,u=a.ellipsoid.maximumRadius*D.PI,f=this.polylines,d=f.length;for(let p=0;p<d;++p){let g=f[p],m=g.width,y=g.show&&m>0,A=g._index,b=this.getSegments(g,a),x=b.positions,T=b.lengths,E=x.length,v=g.getPickId(s).color,S=0,I=0,R;for(let V=0;V<E;++V){V===0?g._loop?R=x[E-2]:(R=WH,h.subtract(x[0],x[1],R),h.add(x[0],R,R)):R=x[V-1],h.clone(R,$d),h.clone(x[V],Ea),V===E-1?g._loop?R=x[1]:(R=WH,h.subtract(x[E-1],x[E-2],R),h.add(x[E-1],R,R)):R=x[V+1],h.clone(R,Jd);let B=T[S];V===I+B&&(I+=B,++S);let j=V-I===0,k=V===I+T[S]-1;c===re.SCENE2D&&($d.z=0,Ea.z=0,Jd.z=0),(c===re.SCENE2D||c===re.MORPHING)&&(j||k)&&u-Math.abs(Ea.x)<1&&((Ea.x<0&&$d.x>0||Ea.x>0&&$d.x<0)&&h.clone(Ea,$d),(Ea.x<0&&Jd.x>0||Ea.x>0&&Jd.x<0)&&h.clone(Ea,Jd));let G=j?2:0,q=k?2:4;for(let Q=G;Q<q;++Q){Sn.writeElements(Ea,e,n),Sn.writeElements($d,e,n+6),Sn.writeElements(Jd,e,n+12);let W=Q-2<0?-1:1;t[r]=V/(E-1),t[r+1]=2*(Q%2)-1,t[r+2]=W,t[r+3]=A,n+=18,r+=4}}let O=Elt;O.x=z.floatToByte(v.red),O.y=z.floatToByte(v.green),O.z=z.floatToByte(v.blue),O.w=z.floatToByte(v.alpha);let L=Clt;L.x=m,L.y=y?1:0;let _=c===re.SCENE2D?g._boundingVolume2D:g._boundingVolumeWC,C=Sn.fromCartesian(_.center,Exe),w=C.high,P=se.fromElements(C.low.x,C.low.y,C.low.z,_.radius,Cxe),M=vxe;M.x=0,M.y=Number.MAX_VALUE;let F=g.distanceDisplayCondition;l(F)&&(M.x=F.near,M.y=F.far),o.setBatchedAttribute(A,0,L),o.setBatchedAttribute(A,1,O),o.attributes.length>2&&(o.setBatchedAttribute(A,2,w),o.setBatchedAttribute(A,3,P),o.setBatchedAttribute(A,4,M))}};var vlt=new h,Slt=new h,wlt=new h,Axe=new h;t0.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,r=i.length;for(let o=0;o<r;++o){let s=i[o],a=s._segments.positions,c=s._segments.lengths,u=a.length,f=0,d=0;for(let p=0;p<u;++p){let g;p===0?s._loop?g=a[u-2]:(g=Axe,h.subtract(a[0],a[1],g),h.add(a[0],g,g)):g=a[p-1],g=N.multiplyByPoint(n,g,Slt);let m=N.multiplyByPoint(n,a[p],vlt),y;p===u-1?s._loop?y=a[1]:(y=Axe,h.subtract(a[u-1],a[u-2],y),h.add(a[u-1],y,y)):y=a[p+1],y=N.multiplyByPoint(n,y,wlt);let A=c[f];p===d+A&&(d+=A,++f);let b=p-d===0,x=p===d+c[f]-1,T=b?2:0,E=x?2:4;for(let v=T;v<E;++v)Sn.writeElements(m,e,t),Sn.writeElements(g,e,t+6),Sn.writeElements(y,e,t+12),t+=18}}};var Ilt=new Array(1);t0.prototype.updateIndices=function(e,t,n,i){let r=n.length-1,o=new ZZ(0,i,this);n[r].push(o);let s=0,a=e[e.length-1],c=0;a.length>0&&(c=a[a.length-1]+1);let u=this.polylines,f=u.length;for(let d=0;d<f;++d){let p=u[d];p._locatorBuckets=[];let g;if(this.mode===re.SCENE3D){g=Ilt;let y=p._actualPositions.length;if(y>0)g[0]=y;else continue}else g=p._segments.lengths;let m=g.length;if(m>0){let y=0;for(let A=0;A<m;++A){let b=g[A]-1;for(let x=0;x<b;++x)c+4>D.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:o,count:y}),y=0,t.push(4),a=[],e.push(a),c=0,o.count=s,s=0,i=0,o=new ZZ(0,0,this),n[++r]=[o]),a.push(c,c+2,c+1),a.push(c+1,c+2,c+3),y+=6,s+=6,i+=6,c+=4}p._locatorBuckets.push({locator:o,count:y}),c+4>D.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),c=0,o.count=s,i=0,s=0,o=new ZZ(0,0,this),n[++r]=[o])}p._clean()}return o.count=s,i};t0.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let r=0;r<i;++r){let o=t[r];if(o===e)break;n+=o._actualLength}return n};var tw={positions:void 0,lengths:void 0},bxe=new Array(1),Plt=new h,Dlt=new he;t0.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===re.SCENE3D)return bxe[0]=n.length,tw.positions=n,tw.lengths=bxe,tw;Ixe(e)&&(n=e._segments.positions);let i=t.ellipsoid,r=[],o=this.modelMatrix,s=n.length,a,c=Plt;for(let u=0;u<s;++u)a=n[u],c=N.multiplyByPoint(o,a,c),r.push(t.project(i.cartesianToCartographic(c,Dlt)));if(r.length>0){e._boundingVolume2D=ue.fromPoints(r,e._boundingVolume2D);let u=e._boundingVolume2D.center;e._boundingVolume2D.center=new h(u.z,u.x,u.y)}return tw.positions=r,tw.lengths=e._segments.lengths,tw};var xxe;t0.prototype.writeUpdate=function(e,t,n,i){let r=this.mode,o=i.ellipsoid.maximumRadius*D.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=xxe,c=6*s*3;!l(a)||a.length<c?a=xxe=new Float32Array(c):a.length>c&&(a=new Float32Array(a.buffer,0,c));let u=this.getSegments(t,i),f=u.positions,d=u.lengths,p=0,g=0,m=0,y;s=f.length;for(let A=0;A<s;++A){A===0?t._loop?y=f[s-2]:(y=WH,h.subtract(f[0],f[1],y),h.add(f[0],y,y)):y=f[A-1],h.clone(y,$d),h.clone(f[A],Ea),A===s-1?t._loop?y=f[1]:(y=WH,h.subtract(f[s-1],f[s-2],y),h.add(f[s-1],y,y)):y=f[A+1],h.clone(y,Jd);let b=d[g];A===m+b&&(m+=b,++g);let x=A-m===0,T=A===m+d[g]-1;r===re.SCENE2D&&($d.z=0,Ea.z=0,Jd.z=0),(r===re.SCENE2D||r===re.MORPHING)&&(x||T)&&o-Math.abs(Ea.x)<1&&((Ea.x<0&&$d.x>0||Ea.x>0&&$d.x<0)&&h.clone(Ea,$d),(Ea.x<0&&Jd.x>0||Ea.x>0&&Jd.x<0)&&h.clone(Ea,Jd));let E=x?2:0,v=T?2:4;for(let S=E;S<v;++S)Sn.writeElements(Ea,a,p),Sn.writeElements($d,a,p+6),Sn.writeElements(Jd,a,p+12),p+=18}n.copyFromArrayView(a,18*Float32Array.BYTES_PER_ELEMENT*e)}};var Em=Tm;function DA(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._heightReference=e.heightReference,this._billboardCollection=new Gf({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new e0({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new Em,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(DA.prototype,{ready:{get:function(){return this._ready}},pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){let e=this._billboardCollection.sizeInBytes,t=this._labelCollection.sizeInBytes;return e+t}}});function Rlt(e,t){let n=e._rectangle,i=e._minHeight,r=e._maxHeight,o=2+ie.packedLength+ee.packedLength,s=new Float64Array(o),a=0;return s[a++]=i,s[a++]=r,ie.pack(n,s,a),a+=ie.packedLength,ee.pack(t,s,a),s}var Olt=new Jn("createVectorTilePoints",5),Mlt=new h;function Nlt(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=Rlt(e,t));let r=[n.buffer,i.buffer],o={positions:n.buffer,packedBuffer:i.buffer},s=Olt.scheduleTask(o,r);if(l(s))return s.then(a=>{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let c=e._billboardCollection,u=e._labelCollection,f=e._polylineCollection;n=e._positions;let d=e._batchIds,p=n.length/3,g=e._heightReference??We.NONE;for(let m=0;m<p;++m){let y=d[m],A=h.unpack(n,m*3,Mlt),b=c.add();b.position=A,b._batchIndex=y,b.heightReference=g;let x=u.add();x.text=" ",x.position=A,x._batchIndex=y,x.heightReference=g;let T=f.add();T.positions=[h.clone(A),h.clone(A)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}DA.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,r=this._polylineCollection,o=this._batchIds,s=o.length;for(let a=0;a<s;++a){let c=o[a],u=n.get(a),f=i.get(a),d=r.get(a);t[c]=new r_(e,c,u,f,d)}};DA.prototype.applyDebugSettings=function(e,t){e?(z.clone(t,this._billboardCollection._highlightColor),z.clone(t,this._labelCollection._highlightColor),z.clone(t,this._polylineCollection._highlightColor)):(z.clone(z.WHITE,this._billboardCollection._highlightColor),z.clone(z.WHITE,this._labelCollection._highlightColor),z.clone(z.WHITE,this._polylineCollection._highlightColor))};function Llt(e,t){let n=e._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];s.show=!0,s.pointSize=r_.defaultPointSize,s.color=r_.defaultColor,s.pointOutlineColor=r_.defaultPointOutlineColor,s.pointOutlineWidth=r_.defaultPointOutlineWidth,s.labelColor=z.WHITE,s.labelOutlineColor=z.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=Ao.FILL,s.labelText=void 0,s.backgroundColor=new z(.165,.165,.165,.8),s.backgroundPadding=new U(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=z.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=zi.CENTER,s.verticalOrigin=Hn.CENTER,s.labelHorizontalOrigin=zi.RIGHT,s.labelVerticalOrigin=Hn.BASELINE}}var Flt=new z,Blt=new z,klt=new z,Ult=new z,zlt=new z,Vlt=new z,VB=new qt,jB=new qt,nQ=new jt;DA.prototype.applyStyle=function(e,t){if(!l(e)){Llt(this,t);return}let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];if(l(e.show)&&(s.show=e.show.evaluate(s)),l(e.pointSize)&&(s.pointSize=e.pointSize.evaluate(s)),l(e.color)&&(s.color=e.color.evaluateColor(s,Flt)),l(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,Blt)),l(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),l(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,klt)),l(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,Ult)),l(e.labelOutlineWidth)&&(s.labelOutlineWidth=e.labelOutlineWidth.evaluate(s)),l(e.font)&&(s.font=e.font.evaluate(s)),l(e.labelStyle)&&(s.labelStyle=e.labelStyle.evaluate(s)),l(e.labelText)?s.labelText=e.labelText.evaluate(s):s.labelText=void 0,l(e.backgroundColor)&&(s.backgroundColor=e.backgroundColor.evaluateColor(s,zlt)),l(e.backgroundPadding)&&(s.backgroundPadding=e.backgroundPadding.evaluate(s)),l(e.backgroundEnabled)&&(s.backgroundEnabled=e.backgroundEnabled.evaluate(s)),l(e.scaleByDistance)){let a=e.scaleByDistance.evaluate(s);l(a)?(VB.near=a.x,VB.nearValue=a.y,VB.far=a.z,VB.farValue=a.w,s.scaleByDistance=VB):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);l(a)?(jB.near=a.x,jB.nearValue=a.y,jB.far=a.z,jB.farValue=a.w,s.translucencyByDistance=jB):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);l(a)?(nQ.near=a.x,nQ.far=a.y,s.distanceDisplayCondition=nQ):s.distanceDisplayCondition=void 0}else s.distanceDisplayCondition=void 0;l(e.heightOffset)&&(s.heightOffset=e.heightOffset.evaluate(s)),l(e.anchorLineEnabled)&&(s.anchorLineEnabled=e.anchorLineEnabled.evaluate(s)),l(e.anchorLineColor)&&(s.anchorLineColor=e.anchorLineColor.evaluateColor(s,Vlt)),l(e.image)?s.image=e.image.evaluate(s):s.image=void 0,l(e.disableDepthTestDistance)&&(s.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(s)),l(e.horizontalOrigin)&&(s.horizontalOrigin=e.horizontalOrigin.evaluate(s)),l(e.verticalOrigin)&&(s.verticalOrigin=e.verticalOrigin.evaluate(s)),l(e.labelHorizontalOrigin)&&(s.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(s)),l(e.labelVerticalOrigin)&&(s.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(s))}};DA.prototype.update=function(e){if(!this._ready&&(l(this._promise)||(this._promise=Nlt(this,e.mapProjection.ellipsoid)),l(this._error))){let t=this._error;throw this._error=void 0,t}this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e)};DA.prototype.isDestroyed=function(){return!1};DA.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),le(this)};var HB=DA;function a_(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=e.ellipsoid??ee.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e.center??h.ZERO,this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Qn.BOTH}Object.defineProperties(a_.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});function jlt(e){let t=new Float64Array(3+h.packedLength+ee.packedLength+ie.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,h.pack(e._center,t,n),n+=h.packedLength,ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,ie.pack(e._rectangle,t,n),t}function Hlt(e,t){let n=1,i=t[n++],r=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)r[a]=Qt.unpack(t,n),n+=Qt.packedLength;let o=t[n++],s=e._batchedIndices=new Array(o);for(let a=0;a<o;++a){let c=z.unpack(t,n);n+=z.packedLength;let u=t[n++],f=t[n++],d=t[n++],p=new Array(d);for(let g=0;g<d;++g)p[g]=t[n++];s[a]=new zp({color:c,offset:u,count:f,batchIds:p})}}var Glt=new Jn("createVectorTilePolygons",5),Wlt=new z;function qlt(e){if(l(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,r=e._indices,o=e._transferrableBatchIds,s=e._batchTableColors,a=e._packedBuffer;if(!l(s)){t=e._positions=e._positions.slice(),n=e._counts=e._counts.slice(),i=e._indexCounts=e._indexCounts.slice(),r=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(ie.center(e._rectangle)),o=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(o.length);let g=e._batchTable,m=s.length;for(let y=0;y<m;++y){let A=g.getColor(y,Wlt);s[y]=A.toRgba()}a=e._packedBuffer=jlt(e)}let c=[t.buffer,n.buffer,i.buffer,r.buffer,o.buffer,s.buffer,a.buffer],u={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:r.buffer,batchIds:o.buffer,batchTableColors:s.buffer},f=e._polygonMinimumHeights,d=e._polygonMaximumHeights;l(f)&&l(d)&&(f=f.slice(),d=d.slice(),c.push(f.buffer,d.buffer),u.minimumHeights=f,u.maximumHeights=d);let p=Glt.scheduleTask(u,c);if(l(p))return p.then(g=>{if(e.isDestroyed())return;e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;let m=new Float64Array(g.packedBuffer),y=m[0];Hlt(e,m),e._indices=je.getSizeInBytes(y)===2?new Uint16Array(g.indices):new Uint32Array(g.indices),e._indexOffsets=new Uint32Array(g.indexOffsets),e._indexCounts=new Uint32Array(g.indexCounts),e._batchedPositions=new Float32Array(g.positions),e._vertexBatchIds=new Uint16Array(g.batchIds),Ylt(e),e._ready=!0}).catch(g=>{e.isDestroyed()||(e._error=g)})}function Ylt(e){l(e._primitive)||(e._primitive=new Kx({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0)}a_.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};a_.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};a_.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};a_.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};a_.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=qlt(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};a_.prototype.isDestroyed=function(){return!1};a_.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),le(this)};var GB=a_;var WB=`in vec4 currentPosition;
in vec4 previousPosition;
in vec4 nextPosition;
in vec2 expandAndWidth;
in float a_batchId;
uniform mat4 u_modifiedModelView;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = u_modifiedModelView * currentPosition;
vec4 prev = u_modifiedModelView * previousPosition;
vec4 next = u_modifiedModelView * nextPosition;
float angle;
vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
}
`;function Cm(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ee.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._boundingVolume=e.boundingVolume,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._currentPositions=void 0,this._previousPositions=void 0,this._nextPositions=void 0,this._expandAndWidth=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Cm.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function Xlt(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,r=e._ellipsoid,o=e._center,s=2+ie.packedLength+ee.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ie.pack(t,a,c),c+=ie.packedLength,ee.pack(r,a,c),c+=ee.packedLength,h.pack(o,a,c),a}var Klt=new Jn("createVectorTilePolylines",5),nw={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function $lt(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,r=e._counts,o=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),r=e._counts=r.slice(),o=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=Xlt(e));let a=[n.buffer,i.buffer,r.buffer,o.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=Klt.scheduleTask(c,a);if(l(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._currentPositions=new Float32Array(f.currentPositions),e._previousPositions=new Float32Array(f.previousPositions),e._nextPositions=new Float32Array(f.nextPositions),e._expandAndWidth=new Float32Array(f.expandAndWidth),e._vertexBatchIds=new Uint16Array(f.batchIds);let d=f.indexDatatype;e._indices=d===je.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),Jlt(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function Jlt(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,r=e._nextPositions,o=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+r.byteLength;c+=o.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let u=nt.createVertexBuffer({context:t,typedArray:i,usage:Me.STATIC_DRAW}),f=nt.createVertexBuffer({context:t,typedArray:n,usage:Me.STATIC_DRAW}),d=nt.createVertexBuffer({context:t,typedArray:r,usage:Me.STATIC_DRAW}),p=nt.createVertexBuffer({context:t,typedArray:o,usage:Me.STATIC_DRAW}),g=nt.createVertexBuffer({context:t,typedArray:s,usage:Me.STATIC_DRAW}),m=nt.createIndexBuffer({context:t,typedArray:a,usage:Me.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?je.UNSIGNED_SHORT:je.UNSIGNED_INT}),y=[{index:nw.previousPosition,vertexBuffer:u,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:nw.currentPosition,vertexBuffer:f,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:nw.nextPosition,vertexBuffer:d,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:nw.expandAndWidth,vertexBuffer:p,componentDatatype:Y.FLOAT,componentsPerAttribute:2},{index:nw.a_batchId,vertexBuffer:g,componentDatatype:Y.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new zn({context:t,attributes:y,indexBuffer:m}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._currentPositions=void 0,e._previousPositions=void 0,e._nextPositions=void 0,e._expandAndWidth=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var qB=new N,Pxe=new h;function Zlt(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return N.clone(n,qB),N.multiplyByPoint(qB,e._center,Pxe),N.setTranslation(qB,Pxe,qB),qB},u_highlightColor:function(){return e._highlightColor}})}function Qlt(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=Ge.fromCache({blending:tn.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var eut=`uniform vec4 u_highlightColor;
void main()
{
out_FragColor = u_highlightColor;
}
`;function tut(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(WB),r=n.getFragmentShaderCallback(!1,void 0,!1)(eut),o=new Ye({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Hl,i]}),s=new Ye({defines:["VECTOR_TILE"],sources:[r]});e._sp=en.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:nw})}function nut(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new at({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Ie.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}Cm.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,r=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let o,s,a=n.length,c=0,u=0;for(o=0;o<a;++o)n[o]===t&&(c+=r[o+1]-r[o]);if(c===0)return;let f=new Float64Array(c*3);for(o=0;o<a;++o)if(n[o]===t){let d=r[o],p=r[o+1]-d;for(s=0;s<p;++s){let g=(d+s)*3;f[u++]=i[g],f[u++]=i[g+1],f[u++]=i[g+2]}}return f};Cm.prototype.getPositions=function(e){return Cm.getPolylinePositions(this,e)};Cm.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r];t[o]=new na(e,o)}};Cm.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function iut(e,t){let n=e._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];s.show=!0,s.color=z.WHITE}}var rut=new z,out=z.WHITE,sut=!0;Cm.prototype.applyStyle=function(e,t){if(!l(e)){iut(this,t);return}let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];s.color=l(e.color)?e.color.evaluateColor(s,rut):out,s.show=l(e.show)?e.show.evaluate(s):sut}};Cm.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=$lt(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}Zlt(this,t),tut(this,t),Qlt(this);let n=e.passes;(n.render||n.pick)&&nut(this,e)};Cm.prototype.isDestroyed=function(){return!1};Cm.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),le(this)};var RT=Cm;var YB=`in vec3 startEllipsoidNormal;
in vec3 endEllipsoidNormal;
in vec4 startPositionAndHeight;
in vec4 endPositionAndHeight;
in vec4 startFaceNormalAndVertexCorner;
in vec4 endFaceNormalAndHalfWidth;
in float a_batchId;
uniform mat4 u_modifiedModelView;
uniform vec2 u_minimumMaximumVectorHeights;
out vec4 v_startPlaneEC;
out vec4 v_endPlaneEC;
out vec4 v_rightPlaneEC;
out float v_halfWidth;
out vec3 v_volumeUpEC;
void main()
{
float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251);
float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd));
vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
vec3 right = normalize(cross(forward, startEllipsoidNormal));
vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
position.xyz += forward * isEnd;
v_volumeUpEC = czm_normal * normalize(cross(right, forward));
float offset;
vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);
offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
position.xyz += offset * ellipsoidNormal;
position = u_modifiedModelView * position;
right = czm_normal * right;
vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
vec3 miterPushNormal = czm_normal * normalize(scratchNormal);
offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position));
offset = offset / dot(miterPushNormal, right);
position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));
gl_Position = czm_depthClamp(czm_projection * position);
position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
v_rightPlaneEC = vec4(right, -dot(right, position.xyz));
position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
v_halfWidth = endFaceNormalAndHalfWidth.w;
}
`;var XB=`in vec4 v_startPlaneEC;
in vec4 v_endPlaneEC;
in vec4 v_rightPlaneEC;
in float v_halfWidth;
in vec3 v_volumeUpEC;
uniform vec4 u_highlightColor;
void main()
{
float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
eyeCoordinate /= eyeCoordinate.w;
float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);
halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));
float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);
if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
out_FragColor = u_highlightColor;
czm_writeDepthClamp();
}
`;function c_(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ee.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new U(Mi._defaultMinTerrainHeight,Mi._defaultMaxTerrainHeight),this._boundingVolume=Qt.fromRectangle(e.rectangle,Mi._defaultMinTerrainHeight,Mi._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=z.clone(z.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(c_.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function aut(e,t,n){let i=Mi.getMinimumMaximumHeights(t,n),r=i.minimumTerrainHeight,o=i.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=r,s.y=o;let a=e._boundingVolume,c=e._rectangle;Qt.fromRectangle(c,r,o,n,a)}function cut(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,r=e._ellipsoid,o=e._center,s=2+ie.packedLength+ee.packedLength+h.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ie.pack(t,a,c),c+=ie.packedLength,ee.pack(r,a,c),c+=ee.packedLength,h.pack(o,a,c),a}var lut=new Jn("createVectorTileClampedPolylines"),RA={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function uut(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,r=e._counts,o=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),r=e._counts=r.slice(),o=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=cut(e));let a=[n.buffer,i.buffer,r.buffer,o.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:r.buffer,batchIds:o.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=lut.scheduleTask(c,a);if(l(u))return u.then(function(f){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(f.decodedPositions),e._decodedPositionOffsets=new Uint32Array(f.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(f.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(f.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(f.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(f.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(f.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(f.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(f.vertexBatchIds);let d=f.indexDatatype;e._indices=d===je.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),fut(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function fut(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,r=e._startPositionAndHeights,o=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,u=e._indices,f=n.byteLength+i.byteLength;f+=r.byteLength+o.byteLength,f+=s.byteLength+a.byteLength,f+=c.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=f;let d=nt.createVertexBuffer({context:t,typedArray:n,usage:Me.STATIC_DRAW}),p=nt.createVertexBuffer({context:t,typedArray:i,usage:Me.STATIC_DRAW}),g=nt.createVertexBuffer({context:t,typedArray:r,usage:Me.STATIC_DRAW}),m=nt.createVertexBuffer({context:t,typedArray:o,usage:Me.STATIC_DRAW}),y=nt.createVertexBuffer({context:t,typedArray:s,usage:Me.STATIC_DRAW}),A=nt.createVertexBuffer({context:t,typedArray:a,usage:Me.STATIC_DRAW}),b=nt.createVertexBuffer({context:t,typedArray:c,usage:Me.STATIC_DRAW}),x=nt.createIndexBuffer({context:t,typedArray:u,usage:Me.STATIC_DRAW,indexDatatype:u.BYTES_PER_ELEMENT===2?je.UNSIGNED_SHORT:je.UNSIGNED_INT}),T=[{index:RA.startEllipsoidNormal,vertexBuffer:d,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:RA.endEllipsoidNormal,vertexBuffer:p,componentDatatype:Y.FLOAT,componentsPerAttribute:3},{index:RA.startPositionAndHeight,vertexBuffer:g,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:RA.endPositionAndHeight,vertexBuffer:m,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:RA.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:RA.endFaceNormalAndHalfWidth,vertexBuffer:A,componentDatatype:Y.FLOAT,componentsPerAttribute:4},{index:RA.a_batchId,vertexBuffer:b,componentDatatype:Y.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new zn({context:t,attributes:T,indexBuffer:x}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var KB=new N,Dxe=new h;function dut(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return N.clone(n,KB),N.multiplyByPoint(KB,e._center,Dxe),N.setTranslation(KB,Dxe,KB),KB},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function Rxe(e){return Ge.fromCache({cull:{enabled:!0,face:Vi.FRONT},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:ei.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:ei.EQUAL,backOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK}})}function hut(e){l(e._rs)||(e._rs=Rxe(!1),e._rs3DTiles=Rxe(!0))}function mut(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(YB),r=n.getFragmentShaderCallback(!1,void 0,!0)(XB),o=new Ye({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Hl,i]}),s=new Ye({defines:["VECTOR_TILE"],sources:[r]});e._sp=en.fromCache({context:t,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:RA})}function put(e,t){let n=e._command;if(!l(e._command)){let r=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new at({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:r,boundingVolume:e._boundingVolume,pass:Ie.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let o=at.shallowClone(n,n.derivedCommands.tileset);o.renderState=e._rs3DTiles,o.pass=Ie.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=o}let i=e._classificationType;(i===Qn.TERRAIN||i===Qn.BOTH)&&t.commandList.push(n),(i===Qn.CESIUM_3D_TILE||i===Qn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}c_.prototype.getPositions=function(e){return RT.getPolylinePositions(this,e)};c_.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r];t[o]=new na(e,o)}};c_.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function gut(e,t){let n=e._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];s.show=!0,s.color=z.WHITE}}var _ut=new z,yut=z.WHITE,Aut=!0;c_.prototype.applyStyle=function(e,t){if(!l(e)){gut(this,t);return}let n=this._batchIds,i=n.length;for(let r=0;r<i;++r){let o=n[r],s=t[o];s.color=l(e.color)?e.color.evaluateColor(s,_ut):yut,s.show=l(e.show)?e.show.evaluate(s):Aut}};function but(e){return Mi.initialize().then(function(){aut(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}c_.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=but(this).then(uut(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}dut(this,t),mut(this,t),hut(this);let n=e.passes;(n.render||n.pick)&&put(this,e)};c_.prototype.isDestroyed=function(){return!1};c_.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),le(this)};var $B=c_;var iQ=32767,xut=new he,Tut=new h;function Eut(e,t,n,i,r){let o=e.length/3,s=e.subarray(0,o),a=e.subarray(o,2*o),c=e.subarray(2*o,3*o);cn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<o;++f){let d=s[f],p=a[f],g=c[f],m=D.lerp(t.west,t.east,d/iQ),y=D.lerp(t.south,t.north,p/iQ),A=D.lerp(n,i,g/iQ),b=he.fromRadians(m,y,A,xut),x=r.cartographicToCartesian(b,Tut);h.pack(x,u,f*3)}return u}var JB=Eut;var oQ=class{constructor(t,n,i,r,o){this._tileset=t,this._tile=n,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,Iut(this,r,o)}get featuresLength(){return l(this._batchTable)?this._batchTable.featuresLength:0}get pointsLength(){return l(this._points)?this._points.pointsLength:0}get trianglesLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.trianglesLength),l(this._polylines)&&(t+=this._polylines.trianglesLength),t}get geometryByteLength(){let t=0;return l(this._polygons)&&(t+=this._polygons.geometryByteLength),l(this._polylines)&&(t+=this._polylines.geometryByteLength),t}get texturesByteLength(){return l(this._points)?this._points.texturesByteLength:0}get batchTableByteLength(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get batchTable(){return this._batchTable}get group(){return this._group}set group(t){this._group=t}hasProperty(t,n){return this._batchTable.hasProperty(t,n)}getFeature(t){return l(this._features)||rQ(this),this._features[t]}applyDebugSettings(t,n){l(this._polygons)&&this._polygons.applyDebugSettings(t,n),l(this._polylines)&&this._polylines.applyDebugSettings(t,n),l(this._points)&&this._points.applyDebugSettings(t,n)}applyStyle(t){l(this._features)||rQ(this),l(this._polygons)&&this._polygons.applyStyle(t,this._features),l(this._polylines)&&this._polylines.applyStyle(t,this._features),l(this._points)&&this._points.applyStyle(t,this._features)}update(t,n){let i=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(n),i=i&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(n),i=i&&this._polylines.ready),l(this._points)&&(this._points.update(n),i=i&&this._points.ready),l(this._batchTable)&&i&&(l(this._features)||rQ(this),this._batchTable.update(t,n),this._ready=!0)}pick(t,n,i){}getPolylinePositions(t){let n=this._polylines;if(l(n))return n.getPositions(t)}isDestroyed(){return!1}destroy(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),le(this)}};function Cut(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function vut(e,t){let n,i,r,o,s=e.POLYGONS_LENGTH??0,a=e.POLYLINES_LENGTH??0,c=e.POINTS_LENGTH??0;if(s>0&&l(e.POLYGON_BATCH_IDS)){let p=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,p,s)}if(a>0&&l(e.POLYLINE_BATCH_IDS)){let p=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,a)}if(c>0&&l(e.POINT_BATCH_IDS)){let p=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,p,c)}let u=l(n)||l(i)||l(r),f=s>0&&!l(n)||a>0&&!l(i)||c>0&&!l(r);if(u&&f)throw new oe("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(r)){let p=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),o=0;o<s;++o)n[o]=p++;if(!l(i)&&a>0)for(i=new Uint16Array(a),o=0;o<a;++o)i[o]=p++;if(!l(r)&&c>0)for(r=new Uint16Array(c),o=0;o<c;++o)r[o]=p++}return{polygons:n,polylines:i,points:r}}var vm=Uint32Array.BYTES_PER_ELEMENT;function Sut(e){return new RT(e)}function wut(e){return new $B(e)}function Iut(e,t,n){n=n??0;let i=new Uint8Array(t),r=new DataView(t);n+=vm;let o=r.getUint32(n,!0);if(o!==1)throw new oe(`Only Vector tile version 1 is supported. Version ${o} is not.`);n+=vm;let s=r.getUint32(n,!0);if(n+=vm,s===0){e._ready=!0;return}let a=r.getUint32(n,!0);if(n+=vm,a===0)throw new oe("Feature table must have a byte length greater than zero");let c=r.getUint32(n,!0);n+=vm;let u=r.getUint32(n,!0);n+=vm;let f=r.getUint32(n,!0);n+=vm;let d=r.getUint32(n,!0);n+=vm;let p=r.getUint32(n,!0);n+=vm;let g=r.getUint32(n,!0);n+=vm,n+=vm;let m=Ro(i,n,a);n+=a;let y=new Uint8Array(t,n,c);n+=c;let A,b;u>0&&(A=Ro(i,n,u),n+=u,f>0&&(b=new Uint8Array(t,n,f),b=new Uint8Array(b),n+=f));let x=m.POLYGONS_LENGTH??0,T=m.POLYLINES_LENGTH??0,E=m.POINTS_LENGTH??0,v=x+T+E,S=new rm(e,v,A,b,Cut(e));if(e._batchTable=S,v===0)return;let I=new dm(m,y),R=I.getGlobalProperty("REGION");if(!l(R))throw new oe("Feature table global property: REGION must be defined");let O=ie.unpack(R),L=R[4],_=R[5],C=e._tile.computedTransform,w=I.getGlobalProperty("RTC_CENTER",Y.FLOAT,3);l(w)?(w=h.unpack(w),N.multiplyByPoint(C,w,w)):(w=ie.center(O),w.height=D.lerp(L,_,.5),w=ee.WGS84.cartographicToCartesian(w));let P=vut(m,y);if(n+=(4-n%4)%4,x>0){I.featuresLength=x;let F=I.getPropertyArray("POLYGON_COUNTS",Y.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_COUNT",Y.UNSIGNED_INT,1);if(!l(F))throw new oe("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let V=I.getPropertyArray("POLYGON_INDEX_COUNTS",Y.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_INDEX_COUNT",Y.UNSIGNED_INT,1);if(!l(V))throw new oe("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let B=F.reduce(function(W,J){return W+J*2},0),j=V.reduce(function(W,J){return W+J},0),k=new Uint32Array(t,n,j);n+=d;let G=new Uint16Array(t,n,B);n+=p;let q,Q;l(m.POLYGON_MINIMUM_HEIGHTS)&&l(m.POLYGON_MAXIMUM_HEIGHTS)&&(q=I.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",Y.FLOAT,1),Q=I.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",Y.FLOAT,1)),e._polygons=new GB({positions:G,counts:F,indexCounts:V,indices:k,minimumHeight:L,maximumHeight:_,polygonMinimumHeights:q,polygonMaximumHeights:Q,center:w,rectangle:O,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,batchIds:P.polygons,modelMatrix:C})}let M=e._tileset;if(T>0){I.featuresLength=T;let F=I.getPropertyArray("POLYLINE_COUNTS",Y.UNSIGNED_INT,1)??I.getPropertyArray("POLYLINE_COUNT",Y.UNSIGNED_INT,1);if(!l(F))throw new oe("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let V=I.getPropertyArray("POLYLINE_WIDTHS",Y.UNSIGNED_SHORT,1);if(!l(V)){V=new Uint16Array(T);for(let q=0;q<T;++q)V[q]=2}let B=F.reduce(function(q,Q){return q+Q*3},0),j=new Uint16Array(t,n,B);n+=g;let k=M.examineVectorLinesFunction;if(l(k)){let q=JB(new Uint16Array(j),O,L,_,ee.WGS84);Put(q,F,P.polylines,S,e.url,k)}let G=Sut;l(M.classificationType)&&(G=wut),e._polylines=G({positions:j,widths:V,counts:F,batchIds:P.polylines,minimumHeight:L,maximumHeight:_,center:w,rectangle:O,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:S,classificationType:M.classificationType,keepDecodedPositions:M.vectorKeepDecodedPositions})}if(E>0){let F=new Uint16Array(t,n,E*3);e._points=new HB({positions:F,batchIds:P.points,minimumHeight:L,maximumHeight:_,rectangle:O,batchTable:S,heightReference:M.heightReference,scene:M.scene})}}function rQ(e){let t=e.featuresLength;if(!l(e._features)&&t>0){let n=new Array(t);l(e._polygons)&&e._polygons.createFeatures(e,n),l(e._polylines)&&e._polylines.createFeatures(e,n),l(e._points)&&e._points.createFeatures(e,n),e._features=n}}function Put(e,t,n,i,r,o){let s=t.length,a=0;for(let c=0;c<s;c++){let u=t[c]*3,f=e.slice(a,a+u);a+=u,o(f,n[c],r,i)}}var ZB=oQ;var{ERR_CAPACITY:Cti}=ra.Error,Dut=new h,qH=class qH extends ss{constructor(){super(...arguments);ut(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPosition(n.getPosition(Dut)),i}get vertexOffset(){return this._getUint32(qH.Layout.POSITION_OFFSET_U32)}get vertexCount(){return 1}getPosition(n){let i=this._collection._positionView;return h.fromArray(i,this.vertexOffset*3,n)}setPosition(n){let i=this._collection,r=this.vertexOffset;i._positionView[r*3]=n.x,i._positionView[r*3+1]=n.y,i._positionView[r*3+2]=n.z,this._dirty=!0,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),position:h.pack(this.getPosition(),[])}}};ut(qH,"Layout",{...ss.Layout,POSITION_OFFSET_U32:ss.Layout.__BYTE_LENGTH,__BYTE_LENGTH:ss.Layout.__BYTE_LENGTH+4});var sQ=qH,Bc=sQ;var QB=`#ifdef USE_FLOAT64
in vec3 positionHigh;
in vec3 positionLow;
#else
in vec3 position;
#endif
in vec4 pickColor;
in vec4 showPixelSizeColorAlpha;
in vec3 outlineWidthColorAlpha;
out vec4 v_pickColor;
out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerRadiusFrac;
void main()
{
float show = showPixelSizeColorAlpha.x;
float pixelSize = showPixelSizeColorAlpha.y;
vec4 color = czm_decodeRGB8(showPixelSizeColorAlpha.z);
float alpha = showPixelSizeColorAlpha.w;
float outlineWidth = outlineWidthColorAlpha.x;
vec4 outlineColor = czm_decodeRGB8(outlineWidthColorAlpha.y);
float outlineAlpha = outlineWidthColorAlpha.z;
float innerRadius = 0.5 * pixelSize * czm_pixelRatio;
float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;
#ifdef USE_FLOAT64
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
#else
vec4 positionEC = czm_modelView * vec4(position, 1.0);
#endif
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= alpha * show;
v_outlineColor = outlineColor;
v_outlineColor.a *= outlineAlpha * show;
v_innerRadiusFrac = innerRadius / outerRadius;
gl_PointSize = 2.0 * outerRadius * show;
gl_Position *= show;
}
`;var e2=`in vec4 v_pickColor;
in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerRadiusFrac;
void main()
{
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
float delta = fwidth(distanceToCenter);
float outerLimit = 0.5;
float innerLimit = 0.5 * v_innerRadiusFrac;
float outerAlpha = 1.0 - smoothstep(max(0.0, outerLimit - delta), outerLimit, distanceToCenter);
float innerAlpha = 1.0 - smoothstep(innerLimit - delta, innerLimit, distanceToCenter);
vec4 color = vec4(mix(v_outlineColor.rgb, v_color.rgb, innerAlpha), outerAlpha);
color.a *= mix(v_outlineColor.a, v_color.a, innerAlpha);
if (color.a < 0.005)
{
discard;
}
out_FragColor = czm_gammaCorrect(color);
czm_writeLogDepth();
}
`;var t2=class t2 extends Zl{constructor(t=H.EMPTY_OBJECT){super(t),this.size=t.size??1}static pack(t,n,i){super.pack(t,n,i),n.setUint8(this.Layout.SIZE_U8+i,t.size)}static unpack(t,n,i){return super.unpack(t,n,i),i.size=t.getUint8(this.Layout.SIZE_U8+n),i}toJSON(){return{...super.toJSON(),size:this.size}}};ut(t2,"Layout",{...Zl.Layout,SIZE_U8:Zl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Zl.Layout.__BYTE_LENGTH+4}),ut(t2,"DEFAULT_MATERIAL",Object.freeze(new t2));var aQ=t2,Sm=aQ;var cQ={positionHigh:0,positionLow:1,pickColor:2,showSizeColorAlpha:3,outlineWidthColorAlpha:4},Oxe={position:0,pickColor:1,showSizeColorAlpha:2,outlineWidthColorAlpha:3},OT=new Bc,wm=new Sm,n2=new z,Mxe=new h,lQ=new Sn;function Rut(e,t,n){let i=t.context;n=n||{destroy:Out};let r=e._positionDatatype===Y.DOUBLE,o=r?cQ:Oxe;if(!l(n.attributeArrays)){let a=e.primitiveCountMax;n.attributeArrays={...r?{positionHigh:new Float32Array(a*3),positionLow:new Float32Array(a*3)}:{position:e._positionView},pickColor:new Uint8Array(a*4),showSizeColorAlpha:new Float32Array(a*4),outlineWidthColorAlpha:new Float32Array(a*3)}}if(e._dirtyCount>0){let{attributeArrays:a}=n,c=a.positionHigh,u=a.positionLow,f=a.pickColor,d=a.showSizeColorAlpha,p=a.outlineWidthColorAlpha,{_dirtyOffset:g,_dirtyCount:m}=e;for(let y=g,A=g+m;y<A;y++)e.get(y,OT),OT._dirty&&(r&&(OT.getPosition(Mxe),Sn.fromCartesian(Mxe,lQ),h.pack(lQ.high,c,y*3),h.pack(lQ.low,u,y*3)),OT.getMaterial(wm),z.fromRgba(OT._pickId,n2),f[y*4]=z.floatToByte(n2.red),f[y*4+1]=z.floatToByte(n2.green),f[y*4+2]=z.floatToByte(n2.blue),f[y*4+3]=z.floatToByte(n2.alpha),d[y*4]=OT.show?1:0,d[y*4+1]=wm.size,d[y*4+2]=cn.encodeRGB8(wm.color),d[y*4+3]=wm.color.alpha,p[y*3]=wm.outlineWidth,p[y*3+1]=cn.encodeRGB8(wm.outlineWidth>0?wm.outlineColor:wm.color),p[y*3+2]=wm.outlineWidth>0?wm.outlineColor.alpha:wm.color.alpha,OT._dirty=!1)}if(l(n.vertexArray)){if(e._dirtyCount>0){for(let a in o)if(Object.hasOwn(o,a)){let c=a;n.vertexArray.copyAttributeFromRange(o[c],n.attributeArrays[c],e._dirtyOffset,e._dirtyCount)}}}else{let{attributeArrays:a}=n;n.vertexArray=new zn({context:i,attributes:[...r?[{index:cQ.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:a.positionHigh,context:i,usage:Me.STATIC_DRAW})},{index:cQ.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:a.positionLow,context:i,usage:Me.STATIC_DRAW})}]:[{index:Oxe.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:nt.createVertexBuffer({typedArray:e._positionView,context:i,usage:Me.STATIC_DRAW})}],{index:o.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:nt.createVertexBuffer({typedArray:a.pickColor,context:i,usage:Me.STATIC_DRAW})},{index:o.showSizeColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:4,vertexBuffer:nt.createVertexBuffer({typedArray:a.showSizeColorAlpha,context:i,usage:Me.STATIC_DRAW})},{index:o.outlineWidthColorAlpha,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:a.outlineWidthColorAlpha,context:i,usage:Me.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ge.fromCache({blending:e._blendOption===Fi.OPAQUE?tn.DISABLED:tn.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=en.fromCache({context:i,vertexShaderSource:new Ye({sources:[QB],defines:r?["USE_FLOAT64"]:[]}),fragmentShaderSource:new Ye({sources:[e2]}),attributeLocations:o})),l(n.command)||(n.command=new at({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Oe.POINTS,pass:e._blendOption===Fi.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:e.primitiveCount,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let s=n.command;return s.count!==e.primitiveCount&&(s.count=e.primitiveCount),s.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(s.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(s),e._makeClean(),n}function Out(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ge.removeFromCache(e.renderState)}var i2=Rut;var uQ=class e extends ra{constructor(t=H.EMPTY_OBJECT){super({...t,vertexCountMax:t.primitiveCountMax})}_getCollectionClass(){return e}_getPrimitiveClass(){return Bc}_getMaterialClass(){return Sm}_cloneEmpty(t=H.EMPTY_OBJECT){return new e(this._cloneEmptyBaseArgs(t))}add(t,n=new Bc){return super.add(t,n),n._setUint32(Bc.Layout.POSITION_OFFSET_U32,this._positionCount++),n.setPosition(t.position??h.ZERO),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=i2(this,t,this._renderContext))}},Ku=uQ;var r2=`#ifdef USE_FLOAT64
in vec3 positionHigh;
in vec3 positionLow;
in vec3 prevPositionHigh;
in vec3 prevPositionLow;
in vec3 nextPositionHigh;
in vec3 nextPositionLow;
#else
in vec3 position;
in vec3 prevPosition;
in vec3 nextPosition;
#endif
in vec4 pickColor;
in vec4 showColorWidthAndTexCoord;
in float alpha;
out vec4 v_pickColor;
out vec4 v_color;
out vec2 v_st;
out float v_width;
out float v_polylineAngle;
void main()
{
float show = showColorWidthAndTexCoord.x;
vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
float signedWidth = showColorWidthAndTexCoord.z;
float texCoord = showColorWidthAndTexCoord.w;
bool usePrevious = texCoord == 1.0;
float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
float polylineAngle;
#ifdef USE_FLOAT64
vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
#else
vec4 positionEC = czm_modelView * vec4(position, 1.0);
vec4 prevPositionEC = czm_modelView * vec4(prevPosition, 1.0);
vec4 nextPositionEC = czm_modelView * vec4(nextPosition, 1.0);
#endif
float width = abs(signedWidth);
if (signedWidth < 0.0)
{
width /= max(czm_metersPerPixel(positionEC), czm_epsilon7);
}
#ifdef USE_FLOAT64
vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
#else
vec4 positionWC = getPolylineWindowCoordinatesEC(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
#endif
gl_Position = czm_viewportOrthographic * positionWC * show;
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= alpha / 255.0 * show;
v_st.s = texCoord;
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
v_width = width;
v_polylineAngle = polylineAngle;
}
`;var o2=`in vec4 v_pickColor;
in vec4 v_color;
void main()
{
if (v_color.a < 0.005)
{
discard;
}
out_FragColor = czm_gammaCorrect(v_color);
czm_writeLogDepth();
}
`;var MT={positionHigh:0,positionLow:1,prevPositionHigh:2,prevPositionLow:3,nextPositionHigh:4,nextPositionLow:5,pickColor:6,showColorWidthAndTexCoord:7,alpha:8},YH={position:0,prevPosition:1,nextPosition:2,pickColor:3,showColorWidthAndTexCoord:4,alpha:5},hl=new ya,s2=new Mf,a2=new z,Nxe=new h,Lxe=new h,Fxe=new h,fQ=new Sn,dQ=new Sn,hQ=new Sn;function Mut(e,t,n){let i=t.context;n=n||{destroy:Fut};let r=e._positionDatatype===Y.DOUBLE,o=r?MT:YH;if(!l(n.attributeArrays)||!l(n.indexArray)){let c=e.vertexCountMax-e.primitiveCount,u=e.vertexCountMax*2;n.indexArray=je.createTypedArray(u,c*6),n.attributeArrays={...r?{positionHigh:new Float32Array(u*3),positionLow:new Float32Array(u*3),prevPositionHigh:new Float32Array(u*3),prevPositionLow:new Float32Array(u*3),nextPositionHigh:new Float32Array(u*3),nextPositionLow:new Float32Array(u*3)}:{position:Y.createTypedArray(e._positionDatatype,u*3),prevPosition:Y.createTypedArray(e._positionDatatype,u*3),nextPosition:Y.createTypedArray(e._positionDatatype,u*3)},pickColor:new Uint8Array(u*4),showColorWidthAndTexCoord:new Float32Array(u*4),alpha:new Uint8Array(u)}}if(e._dirtyCount>0){let{_dirtyOffset:c,_dirtyCount:u}=e,f=e.widthUnits==="meters",d=n.indexArray,{pickColor:p,showColorWidthAndTexCoord:g,alpha:m,position:y,prevPosition:A,nextPosition:b,positionHigh:x,positionLow:T,prevPositionHigh:E,prevPositionLow:v,nextPositionHigh:S,nextPositionLow:I}=n.attributeArrays;for(let R=c,O=c+u;R<O;R++){if(e.get(R,hl),!hl._dirty)continue;hl.getMaterial(s2);let L=cn.encodeRGB8(s2.color),_=s2.color.alpha,C=f?-s2.width:s2.width;z.fromRgba(hl._pickId,a2);let w=hl.show,P=hl.vertexOffset*2,M=(hl.vertexOffset-R)*6,F=e._positionView,V=hl.vertexOffset*3;for(let B=0,j=hl.vertexCount;B<j;B++){let k=B===0,G=B===j-1,q=F[V+B*3],Q=F[V+B*3+1],W=F[V+B*3+2],J,Z,ae,Ae,fe,xe;k?(Ae=F[V+3],fe=F[V+3+1],xe=F[V+3+2],J=2*q-Ae,Z=2*Q-fe,ae=2*W-xe):G?(J=F[V+(B-1)*3],Z=F[V+(B-1)*3+1],ae=F[V+(B-1)*3+2],Ae=2*q-J,fe=2*Q-Z,xe=2*W-ae):(J=F[V+(B-1)*3],Z=F[V+(B-1)*3+1],ae=F[V+(B-1)*3+2],Ae=F[V+(B+1)*3],fe=F[V+(B+1)*3+1],xe=F[V+(B+1)*3+2]),G||(d[M]=P,d[M+1]=P+1,d[M+2]=P+2,d[M+3]=P+2,d[M+4]=P+1,d[M+5]=P+3,M+=6),r&&(h.fromElements(q,Q,W,Nxe),h.fromElements(J,Z,ae,Lxe),h.fromElements(Ae,fe,xe,Fxe),Sn.fromCartesian(Nxe,fQ),Sn.fromCartesian(Lxe,dQ),Sn.fromCartesian(Fxe,hQ));for(let ge=0;ge<2;ge++)r?(h.pack(fQ.high,x,P*3),h.pack(fQ.low,T,P*3),h.pack(dQ.high,E,P*3),h.pack(dQ.low,v,P*3),h.pack(hQ.high,S,P*3),h.pack(hQ.low,I,P*3)):(y[P*3]=q,y[P*3+1]=Q,y[P*3+2]=W,A[P*3]=J,A[P*3+1]=Z,A[P*3+2]=ae,b[P*3]=Ae,b[P*3+1]=fe,b[P*3+2]=xe),p[P*4]=z.floatToByte(a2.red),p[P*4+1]=z.floatToByte(a2.green),p[P*4+2]=z.floatToByte(a2.blue),p[P*4+3]=z.floatToByte(a2.alpha),g[P*4]=w?1:0,g[P*4+1]=L,g[P*4+2]=C,g[P*4+3]=B/(j-1),m[P]=_*255,P++}hl._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:c,indexCount:u,vertexOffset:f,vertexCount:d}=Lut(e);n.vertexArray.copyIndexFromRange(n.indexArray,c,u);for(let p in o)if(Object.hasOwn(o,p)){let g=p;n.vertexArray.copyAttributeFromRange(o[g],n.attributeArrays[g],f,d)}}}else{let c=n.attributeArrays;n.vertexArray=new zn({context:i,indexBuffer:nt.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Me.STATIC_DRAW,indexDatatype:je.fromTypedArray(n.indexArray)}),attributes:[...r?[{index:MT.positionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.positionHigh,context:i,usage:Me.STATIC_DRAW})},{index:MT.positionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.positionLow,context:i,usage:Me.STATIC_DRAW})},{index:MT.prevPositionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.prevPositionHigh,context:i,usage:Me.STATIC_DRAW})},{index:MT.prevPositionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.prevPositionLow,context:i,usage:Me.STATIC_DRAW})},{index:MT.nextPositionHigh,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.nextPositionHigh,context:i,usage:Me.STATIC_DRAW})},{index:MT.nextPositionLow,componentDatatype:Y.FLOAT,componentsPerAttribute:3,vertexBuffer:nt.createVertexBuffer({typedArray:c.nextPositionLow,context:i,usage:Me.STATIC_DRAW})}]:[{index:YH.position,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:nt.createVertexBuffer({typedArray:c.position,context:i,usage:Me.STATIC_DRAW})},{index:YH.prevPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:nt.createVertexBuffer({typedArray:c.prevPosition,context:i,usage:Me.STATIC_DRAW})},{index:YH.nextPosition,componentDatatype:e._positionDatatype,componentsPerAttribute:3,normalize:e._positionNormalized,vertexBuffer:nt.createVertexBuffer({typedArray:c.nextPosition,context:i,usage:Me.STATIC_DRAW})}],{index:o.pickColor,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:nt.createVertexBuffer({typedArray:c.pickColor,context:i,usage:Me.STATIC_DRAW})},{index:o.showColorWidthAndTexCoord,componentDatatype:Y.FLOAT,componentsPerAttribute:4,vertexBuffer:nt.createVertexBuffer({typedArray:c.showColorWidthAndTexCoord,context:i,usage:Me.STATIC_DRAW})},{index:o.alpha,componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,vertexBuffer:nt.createVertexBuffer({typedArray:c.alpha,context:i,usage:Me.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=Ge.fromCache({blending:e._blendOption===Fi.OPAQUE?tn.DISABLED:tn.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=en.fromCache({context:i,vertexShaderSource:new Ye({sources:[Hl,r2],defines:r?["USE_FLOAT64"]:[]}),fragmentShaderSource:new Ye({sources:[o2]}),attributeLocations:o}));let s=Nut(e);l(n.command)||(n.command=new at({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:Oe.TRIANGLES,pass:e._blendOption===Fi.OPAQUE?Ie.OPAQUE:Ie.TRANSLUCENT,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:s,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolume,debugShowBoundingVolume:e.debugShowBoundingVolume}));let a=n.command;return a.count!==s&&(a.count=s),a.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(a.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(a),e._makeClean(),n}function Nut(e){return(e.vertexCount-e.primitiveCount)*6}function Lut(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,hl);let i=hl.vertexOffset*2,o=(hl.vertexOffset-t)*6;e.get(t+n-1,hl);let s=(hl.vertexOffset+hl.vertexCount)*2-i,c=(s/2-n)*6;return{indexOffset:o,indexCount:c,vertexOffset:i,vertexCount:s}}function Fut(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&Ge.removeFromCache(e.renderState)}var c2=Mut;var mQ=class e extends ra{constructor(t=H.EMPTY_OBJECT){super(t);let n=t.widthUnits??"pixels";this._widthUnits=n}get widthUnits(){return this._widthUnits}_getCollectionClass(){return e}_getPrimitiveClass(){return ya}_getMaterialClass(){return Mf}_cloneEmpty(t=H.EMPTY_OBJECT){return new e({widthUnits:this._widthUnits,...this._cloneEmptyBaseArgs(t)})}add(t,n=new ya){super.add(t,n);let i=this._positionCount;return n._setUint32(ya.Layout.POSITION_OFFSET_U32,i),n._setUint32(ya.Layout.POSITION_COUNT_U32,0),l(t.positions)&&n.setPositions(t.positions),n}update(t){super.update(t),this._isRendered(t)&&(this._renderContext=c2(this,t,this._renderContext))}},ml=mQ;function iw(e,t){this._conditionsExpression=Je(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,kut(this,t)}Object.defineProperties(iw.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function But(e,t){this.condition=e,this.expression=t}function kut(e,t){let n=[],i=e._conditions;if(!l(i))return;let r=i.length;for(let o=0;o<r;++o){let s=i[o],a=String(s[0]),c=String(s[1]);n.push(new But(new Ld(a,t),new Ld(c,t)))}e._runtimeConditions=n}iw.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let r=0;r<i;++r){let o=n[r];if(o.condition.evaluate(e))return o.expression.evaluate(e,t)}};iw.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let r=0;r<i;++r){let o=n[r];if(o.condition.evaluate(e))return o.expression.evaluateColor(e,t)}};iw.prototype.getShaderFunction=function(e,t,n,i){let r=this._runtimeConditions;if(!l(r)||r.length===0)return;let o="",s=r.length;for(let a=0;a<s;++a){let c=r[a],u=c.condition.getShaderExpression(t,n),f=c.expression.getShaderExpression(t,n);o+=` ${a===0?"if":"else if"} (${u})
{
return ${f};
}
`}return o=`${i} ${e}
{
${o} return ${i}(1.0);
}
`,o};iw.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let r=t[i];ti(e,r.condition.getVariables()),ti(e,r.expression.getVariables())}return e=e.filter(function(i,r,o){return o.indexOf(i)===r}),e};var l2=iw;function OA(e){this._style={},this._ready=!1,this._show=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._labelColor=void 0,this._labelOutlineColor=void 0,this._labelOutlineWidth=void 0,this._font=void 0,this._labelStyle=void 0,this._labelText=void 0,this._backgroundColor=void 0,this._backgroundPadding=void 0,this._backgroundEnabled=void 0,this._scaleByDistance=void 0,this._translucencyByDistance=void 0,this._distanceDisplayCondition=void 0,this._heightOffset=void 0,this._anchorLineEnabled=void 0,this._anchorLineColor=void 0,this._image=void 0,this._disableDepthTestDistance=void 0,this._horizontalOrigin=void 0,this._verticalOrigin=void 0,this._labelHorizontalOrigin=void 0,this._labelVerticalOrigin=void 0,this._meta=void 0,this._lineWidth=void 0,this._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,Uut(this,e)}function Uut(e,t){t=Je(t,!0)??e._style,e._style=t,e.show=t.show,e.color=t.color,e.pointSize=t.pointSize,e.pointOutlineColor=t.pointOutlineColor,e.pointOutlineWidth=t.pointOutlineWidth,e.labelColor=t.labelColor,e.labelOutlineColor=t.labelOutlineColor,e.labelOutlineWidth=t.labelOutlineWidth,e.labelStyle=t.labelStyle,e.font=t.font,e.labelText=t.labelText,e.backgroundColor=t.backgroundColor,e.backgroundPadding=t.backgroundPadding,e.backgroundEnabled=t.backgroundEnabled,e.scaleByDistance=t.scaleByDistance,e.translucencyByDistance=t.translucencyByDistance,e.distanceDisplayCondition=t.distanceDisplayCondition,e.heightOffset=t.heightOffset,e.anchorLineEnabled=t.anchorLineEnabled,e.anchorLineColor=t.anchorLineColor,e.image=t.image,e.disableDepthTestDistance=t.disableDepthTestDistance,e.horizontalOrigin=t.horizontalOrigin,e.verticalOrigin=t.verticalOrigin,e.labelHorizontalOrigin=t.labelHorizontalOrigin,e.labelVerticalOrigin=t.labelVerticalOrigin,e.lineWidth=t.lineWidth;let n={};if(l(t.meta)){let i=t.defines,r=t.meta??H.EMPTY_OBJECT;for(let o in r)r.hasOwnProperty(o)&&(n[o]=new Ld(r[o],i))}e._meta=n,e._ready=!0}function bo(e,t){let n=(e._style??H.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new Ld(String(t));if(typeof t=="string")return new Ld(t,n);if(l(t.conditions))return new l2(t,n)}else return;return t}function xo(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return Je(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(OA.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=bo(this,e),this._style.show=xo(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=bo(this,e),this._style.color=xo(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=bo(this,e),this._style.pointSize=xo(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=bo(this,e),this._style.pointOutlineColor=xo(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=bo(this,e),this._style.pointOutlineWidth=xo(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=bo(this,e),this._style.labelColor=xo(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=bo(this,e),this._style.labelOutlineColor=xo(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=bo(this,e),this._style.labelOutlineWidth=xo(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=bo(this,e),this._style.font=xo(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=bo(this,e),this._style.labelStyle=xo(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=bo(this,e),this._style.labelText=xo(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=bo(this,e),this._style.backgroundColor=xo(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=bo(this,e),this._style.backgroundPadding=xo(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=bo(this,e),this._style.backgroundEnabled=xo(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=bo(this,e),this._style.scaleByDistance=xo(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=bo(this,e),this._style.translucencyByDistance=xo(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=bo(this,e),this._style.distanceDisplayCondition=xo(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=bo(this,e),this._style.heightOffset=xo(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=bo(this,e),this._style.anchorLineEnabled=xo(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=bo(this,e),this._style.anchorLineColor=xo(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=bo(this,e),this._style.image=xo(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=bo(this,e),this._style.disableDepthTestDistance=xo(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=bo(this,e),this._style.horizontalOrigin=xo(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=bo(this,e),this._style.verticalOrigin=xo(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=bo(this,e),this._style.labelHorizontalOrigin=xo(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=bo(this,e),this._style.labelVerticalOrigin=xo(this._labelVerticalOrigin)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){this._lineWidth=bo(this,e),this._style.lineWidth=xo(this._lineWidth)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});OA.fromUrl=function(e){return De.createIfNeeded(e).fetchJson(e).then(function(n){return new OA(n)})};OA.prototype.getColorShaderFunction=function(e,t,n){return this._colorShaderFunctionReady?(n.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,l(this.color)&&l(this.color.getShaderFunction)?this._colorShaderFunction=this.color.getShaderFunction(e,t,n,"vec4"):this._colorShaderFunction=void 0,this._colorShaderTranslucent=n.translucent,this._colorShaderFunction)};OA.prototype.getShowShaderFunction=function(e,t,n){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,l(this.show)&&l(this.show.getShaderFunction)?this._showShaderFunction=this.show.getShaderFunction(e,t,n,"bool"):this._showShaderFunction=void 0,this._showShaderFunction)};OA.prototype.getPointSizeShaderFunction=function(e,t,n){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,l(this.pointSize)&&l(this.pointSize.getShaderFunction)?this._pointSizeShaderFunction=this.pointSize.getShaderFunction(e,t,n,"float"):this._pointSizeShaderFunction=void 0,this._pointSizeShaderFunction)};OA.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&ti(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&ti(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&ti(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var l_=OA;var Uxe=new ie,Bxe=new ie,pQ=new ie,XH=new Map;XH.set(ml,{packCollectionData:Es.packPolylineCollectionData,packTilePrimitives:Es.packPolylineSegments});XH.set(Ua,{packCollectionData:Es.packPolygonCollectionData,packTilePrimitives:Es.packPolygonRings});var gQ=class{constructor(t){this._tilingScheme=t.tilingScheme,this.antialias=t.antialias??!0,this.minimumTileScreenPixels=t.minimumTileScreenPixels??256,this._heightReferenceByCollection=new Map,this._collectionDataCache=new WeakMap,this._markedThisFrame=new Set,this._markedFrameNumber=-1,this._dirtyRectangles=[]}get tilingScheme(){return this._tilingScheme}set tilingScheme(t){this._tilingScheme=t}get ellipsoid(){return this._tilingScheme.ellipsoid}remove(t){this._markedThisFrame.delete(t),this._heightReferenceByCollection.delete(t)&&this._markCollectionRegionDirty(t)}has(t){return this._heightReferenceByCollection.has(t)}static isSupported(t){return XH.has(t.constructor)}markForFrame(t,n,i){this._beginFrame(n),this._markedThisFrame.add(t),this._heightReferenceByCollection.has(t)||this._markCollectionRegionDirty(t),this._heightReferenceByCollection.set(t,i)}_beginFrame(t){if(t!==this._markedFrameNumber){for(let n of this._heightReferenceByCollection.keys())this._markedThisFrame.has(n)||(this._heightReferenceByCollection.delete(n),this._markCollectionRegionDirty(n));this._markedThisFrame.clear(),this._markedFrameNumber=t}}_markCollectionRegionDirty(t){let n=ie.fromBoundingSphere(t.boundingVolume,this._tilingScheme.ellipsoid,new ie);this._dirtyRectangles.push(n)}requestTileData(t,n,i,r,o){let s=this._tilingScheme.tileXYToRectangle(t,n,i,Uxe);return this.requestDataForRectangle(s,r,o)}requestDataForRectangle(t,n,i){let r=this._tilingScheme,o=this._heightReferenceByCollection,s={show:!0,hasPolylines:!1,hasPolygons:!1,rectangle:ie.clone(t),collectionVersions:new Map,minimumTileScreenPixels:this.minimumTileScreenPixels,metersPerUv:zut(t,r.ellipsoid)};for(let[u,f]of o){if(!kxe(f,i))continue;let d=ie.fromBoundingSphere(u.boundingVolume,r.ellipsoid,Bxe);if(!!!ie.intersection(t,d,pQ))continue;let g=XH.get(u.constructor),m=this._getCollectionDataCached(u,g.packCollectionData);s.collectionVersions.set(u,m.version),g.packTilePrimitives(u,m,t,s)}let a=l(s.polylineSegments)&&s.polylineSegments.length>0,c=l(s.polygonRings)&&s.polygonRings.length>0;return s.hasPolylines=a,s.hasPolygons=c,!a&&!c?(s.show=!1,s):(a&&(Es.packPolylineGrid(s),Es.packPolylineTextures(n,s)),c&&(Es.packPolygonGrid(s),Es.packPolygonTextures(n,s)),Es.packPrimitiveTextures(n,s),s)}releaseTileData(t){Es.freeResources(t)}updateTileData(t,n,i,r,o,s){let a=this._dirtyRectangles,c=this._tilingScheme;return Vut(t,n,i,a,c)?(this.releaseTileData(o),this.requestTileData(t,n,i,r,s)):o}updateDataForRectangle(t,n,i,r){return this._isStale(i,t,r)?(this.releaseTileData(i),this.requestDataForRectangle(t,n,r)):i}_isStale(t,n,i){if(!ie.equals(t.rectangle,n))return!0;let r=t.collectionVersions,o=this._heightReferenceByCollection,s=0;for(let[a,c]of o){if(!kxe(c,i))continue;let u=ie.fromBoundingSphere(a.boundingVolume,this._tilingScheme.ellipsoid,Bxe),f=!!ie.intersection(n,u,pQ),d=r.get(a);if(!f){if(l(d))return!0;continue}if(!l(d)||(s++,a._dirtyCount>0||d!==a._version))return!0}return s!==r.size}makeClean(){this._dirtyRectangles.length=0}update(t){l(t)&&this._beginFrame(t);for(let n of this._heightReferenceByCollection.keys()){let i=this._collectionDataCache.get(n);!l(i)||!(n._dirtyCount>0||i.version!==n._version)||(l(i.rectangle)&&this._dirtyRectangles.push(ie.clone(i.rectangle)),this._markCollectionRegionDirty(n))}}_getCollectionDataCached(t,n){let i=this._collectionDataCache.get(t),r=t._dirtyCount>0,o=i?.version!==t._version;if(l(i)&&!r&&!o)return i;let s=this.ellipsoid,a=n(t,s,i);return a.version=t._version+(r?1:0),a.rectangle=ie.fromBoundingSphere(t.boundingVolume,s,a.rectangle),this._collectionDataCache.set(t,a),t._makeClean(),a}};function kxe(e,t){return e===We.CLAMP_TO_GROUND||e===t}function zut(e,t){let n=t.maximumRadius,i=(e.south+e.north)*.5;return new U(e.width*n*Math.cos(i),e.height*n)}function Vut(e,t,n,i,r){if(i.length===0)return!1;let o=r.tileXYToRectangle(e,t,n,Uxe);for(let s=0;s<i.length;s++)if(ie.intersection(o,i[s],pQ))return!0;return!1}var u_=gQ;var zxe=new Bc,Vxe=new ya,jxe=new Mo,jut=new Sm,Hut=new Mf,Gut=new Of,_Q=class{constructor(t,n,i=0){ut(this,"_color",new z);ut(this,"_outlineColor",new z);this._content=t,this._batchId=n,this._batchTableId=i,this._primitivesByCollection=new Map}addPrimitiveByCollection(t,n){let i=this._primitivesByCollection.get(t);i||(i=[],this._primitivesByCollection.set(t,i)),i.push(n)}get show(){for(let t of this._iteratePrimitives())if(t.show)return!0;return!1}set show(t){for(let n of this._iteratePrimitives())n.show=t}get color(){for(let t of this._iterateMaterials())return z.clone(t.color,this._color);return z.clone(z.WHITE,this._color)}set color(t){for(let n of this._iterateMaterials())z.clone(t,n.color)}get pointSize(){for(let t of this._iteratePointMaterials())return t.size;return 1}set pointSize(t){for(let n of this._iteratePointMaterials())n.size=t}get pointOutlineColor(){for(let t of this._iteratePointMaterials())return z.clone(t.outlineColor,this._outlineColor);return z.clone(z.WHITE,this._outlineColor)}set pointOutlineColor(t){for(let n of this._iteratePointMaterials())z.clone(t,n.outlineColor)}get pointOutlineWidth(){for(let t of this._iteratePointMaterials())return t.outlineWidth;return 0}set pointOutlineWidth(t){for(let n of this._iteratePointMaterials())n.outlineWidth=t}get lineWidth(){for(let t of this._iteratePolylineMaterials())return t.width;return 1}set lineWidth(t){for(let n of this._iteratePolylineMaterials())n.width=t}get lineOutlineColor(){for(let t of this._iteratePolylineMaterials())return z.clone(t.outlineColor,this._outlineColor);return z.clone(z.WHITE,this._outlineColor)}set lineOutlineColor(t){for(let n of this._iteratePolylineMaterials())z.clone(t,n.outlineColor)}get lineOutlineWidth(){for(let t of this._iteratePolylineMaterials())return t.outlineWidth;return 0}set lineOutlineWidth(t){for(let n of this._iteratePolylineMaterials())n.outlineWidth=t}get polygonOutlineColor(){for(let t of this._iteratePolygonMaterials())return z.clone(t.outlineColor,this._outlineColor);return z.clone(z.WHITE,this._outlineColor)}set polygonOutlineColor(t){for(let n of this._iteratePolygonMaterials())z.clone(t,n.outlineColor)}get polygonOutlineWidth(){for(let t of this._iteratePolygonMaterials())return t.outlineWidth;return 0}set polygonOutlineWidth(t){for(let n of this._iteratePolygonMaterials())n.outlineWidth=t}get content(){return this._content}get tileset(){return this._content.tileset}get primitive(){return this._content.tileset}get featureId(){return this._batchId}get _batchTable(){return this._content.batchTables[this._batchTableId]}get pickIds(){let t=[];for(let n of this._iteratePrimitives())t.push(n._pickId);return t}hasProperty(t){return l(this._batchTable)?this._batchTable.hasProperty(this._batchId,t):!1}getPropertyIds(t){return l(this._batchTable)?this._batchTable.getPropertyIds(this._batchId,t):[]}getProperty(t){if(l(this._batchTable))return this._batchTable.getProperty(this._batchId,t)}getPropertyInherited(t){return na.getPropertyInherited(this._content,this._batchId,t,this._batchTable)}setProperty(t,n){throw new pe("Not implemented")}isExactClass(t){return l(this._batchTable)?this._batchTable.isExactClass(this._batchId,t):!1}isClass(t){return l(this._batchTable)?this._batchTable.isClass(this._batchId,t):!1}getExactClassName(){if(l(this._batchTable))return this._batchTable.getExactClassName(this._batchId)}*_iteratePrimitives(){yield*this._iteratePrimitivesWith(Ku,zxe),yield*this._iteratePrimitivesWith(ml,Vxe),yield*this._iteratePrimitivesWith(Ua,jxe)}*_iteratePrimitivesWith(t,n){let i=this._content._collections;for(let r=0;r<i.length;r++){let o=i[r],s=this._primitivesByCollection.get(r);if(s&&o instanceof t)for(let a of s)o.get(a,n),yield n}}*_iterateMaterials(){yield*this._iteratePointMaterials(),yield*this._iteratePolylineMaterials(),yield*this._iteratePolygonMaterials()}*_iteratePointMaterials(){yield*this._iterateMaterialsWith(Ku,zxe,jut)}*_iteratePolylineMaterials(){yield*this._iterateMaterialsWith(ml,Vxe,Hut)}*_iteratePolygonMaterials(){yield*this._iterateMaterialsWith(Ua,jxe,Gut)}*_iterateMaterialsWith(t,n,i){for(let r of this._iteratePrimitivesWith(t,n))r.getMaterial(i),yield i,r.setMaterial(i)}},NT=_Q;var Hxe=new h,Wut=new Bc,qut=new ya,Wxe=new Mo;function Yut(e,t){let n=t.scene.nodes,i={collections:[],collectionLocalMatrices:[],collectionFeatureTableIds:new Map,featuresByTableId:new Map};for(let r=0;r<n.length;r++)qxe(e,n[r],N.IDENTITY,i);return i}function KH(e){let t=e.BYTES_PER_ELEMENT*8;return Math.pow(2,t)-1}function Xut(e){let t={pointPrimitiveCount:0,pointVertexCount:0,polylinePrimitiveCount:0,polylineVertexCount:0,polygonPrimitiveCount:0,polygonVertexCount:0,polygonHoleCount:0,polygonTriangleCount:0},n=e.vector,i=e.polygon,r=e.primitiveType,s=xt.getAttributeBySemantic(e,ct.POSITION).count,a=e.indices?ba.readIndicesAsTypedArray(e.indices):void 0;if(r===Oe.POINTS)t.pointPrimitiveCount+=s,t.pointVertexCount+=s;else if(r===Oe.LINE_STRIP){let c=n?n.count:Gxe(a);t.polylinePrimitiveCount+=c,t.polylineVertexCount+=a.length-c+1}else if(r===Oe.TRIANGLES||r===Oe.LINE_LOOP)if(n){t.polygonPrimitiveCount+=n.count,t.polygonVertexCount+=s,t.polygonTriangleCount+=a.length/3;let c=n.polygonHoleCounts;if(c)for(let u=0;u<c.length;u++)t.polygonHoleCount+=c[u]}else{let c=Gxe(i.loopIndices);t.polygonPrimitiveCount+=i.count,t.polygonVertexCount+=i.loopIndices.length-c+1,t.polygonTriangleCount+=i.triangleIndices.length,t.polygonHoleCount+=c-i.count}else throw new oe(`Unexpected primitive type: ${r}`);return t}function Gxe(e){let t=KH(e),n=0;for(let i=0;i<e.length;i++)e[i]===t&&i+1<e.length&&n++;return n+1}function Kut(e,t,n,i,r){let o=xt.getAttributeBySemantic(t,ct.POSITION),s=o.typedArray??(n.positionNormalized?ba.readAttributeAsRawCompactTypedArray(o):ba.readAttributeAsTypedArray(o)),a=t.indices?ba.readIndicesAsTypedArray(t.indices):void 0,c=$ut(e,t,r);n instanceof Ku?Jut(n,i,s,a,c):n instanceof ml?Zut(n,i,s,a,c):n instanceof Ua&&(l(t.vector)?Qut(n,i,s,a,c,t.vector):eft(n,i,s,c,t.polygon))}function $ut(e,t,n){let i=e.tileset.featureIdLabel,r=xt.getFeatureIdsByLabel(t.featureIds,i);if(!(r instanceof Cn.FeatureIdAttribute))return()=>{};let o=xt.getAttributeBySemantic(t,ct.FEATURE_ID,r.setIndex),s=o.typedArray??ba.readAttributeAsTypedArray(o);for(let a=0;a<s.length;a++){let c=s[a];if(!n.has(c)){let u=new NT(e,c,r.propertyTableId);n.set(c,u)}}return function(c){let u=s[c];if(u!==r.nullFeatureId)return n.get(u)}}function Jut(e,t,n,i,r){let o=n.length/3;for(let s=0,a=i?i.length:o;s<a;s++){let c=i?i[s]:s;h.fromArray(n,c*3,Hxe);let u=r(c);u&&u.addPrimitiveByCollection(t,s),e.add({position:Hxe,pickObject:u,featureId:u?.featureId},Wut)}}function Zut(e,t,n,i,r){let o=KH(i),s=0,a=0,c=0;for(let u=0;u<i.length;u++){if(i[u]===o?a=u-s:u+1===i.length&&(a=u+1-s),a===0)continue;let d=s+a,p=i.subarray(s,d),g=Yxe(n,p,3),m=r(i[s]);m&&m.addPrimitiveByCollection(t,c),e.add({positions:g,pickObject:m,featureId:m?.featureId},qut),s=u+1,a=0,c++}}function Qut(e,t,n,i,r,o){let s=o.polygonAttributeOffsets,a=o.polygonIndicesOffsets,c=o.polygonHoleCounts,u=o.polygonHoleOffsets,f=n.length/3,d=s.length;for(let p=0;p<d;p++){let g=s[p],m=p+1<d?s[p+1]:f,y=n.subarray(g*3,m*3),A;if(l(c)&&c[p]>0){let v=c[p];A=u.slice(p,p+v);for(let S=0;S<v;S++)A[S]-=g}let b=a[p],x=p+1<d?a[p+1]:i.length,T=i.slice(b,x);for(let v=0;v<T.length;v++)T[v]-=g;let E=r(g);E&&E.addPrimitiveByCollection(t,p),e.add({positions:y,triangles:T,holes:A,pickObject:E,featureId:E?.featureId},Wxe)}}function eft(e,t,n,i,r){let o=r.loopIndices.constructor,s=new o(r.loopIndices.length),a=KH(r.loopIndices);for(let c=0;c<r.count;c++){let u=c+1===r.count,f=r.loopIndicesOffsets[c],d=u?r.loopIndices.length:r.loopIndicesOffsets[c+1],p=r.loopIndices.subarray(f,d),g=Yxe(n,p,3,s),m=[];for(let x=0;x<p.length;x++){let T=x+1===p.length;p[x]===a&&!T&&m.push(x)}let y=new o(m),A;if(l(r.triangleIndices)){let x=r.triangleIndicesOffsets[c],T=u?r.triangleIndices.length:r.triangleIndicesOffsets[c+1];A=r.triangleIndices.subarray(x,T);for(let E=0;E<A.length;E++)A[E]=s[A[E]]}else throw new Error("Runtime triangulation not yet supported.");let b=i(p[0]);b&&b.addPrimitiveByCollection(t,c),e.add({positions:g,triangles:A,holes:y,pickObject:b,featureId:b?.featureId},Wxe)}}function qxe(e,t,n,i){let r=xt.getNodeTransform(t),o=N.multiplyTransformation(n,r,new N),s=t.primitives;for(let c=0;c<s.length;c++){let u=s[c],f=u.primitiveType,d,p=Xut(u),g=xt.getAttributeBySemantic(u,ct.POSITION),m=g.normalized??!1,y=g.componentDatatype;f===Oe.POINTS?d=new Ku({primitiveCountMax:p.pointPrimitiveCount,allowPicking:!0,positionNormalized:m,positionDatatype:y}):f===Oe.LINE_STRIP?d=new ml({primitiveCountMax:p.polylinePrimitiveCount,vertexCountMax:p.polylineVertexCount,allowPicking:!0,positionNormalized:m,positionDatatype:y}):(f===Oe.TRIANGLES||f===Oe.LINE_LOOP)&&(d=new Ua({primitiveCountMax:p.polygonPrimitiveCount,vertexCountMax:p.polygonVertexCount,holeCountMax:p.polygonHoleCount,triangleCountMax:p.polygonTriangleCount,allowPicking:!0,positionNormalized:m,positionDatatype:y}));let b=u.featureIds?.[0]?.propertyTableId;i.featuresByTableId.has(b)||i.featuresByTableId.set(b,new Map),i.collections.push(d),i.collectionLocalMatrices.push(N.clone(o)),i.collectionFeatureTableIds.set(d,b),Kut(e,u,d,i.collections.length-1,i.featuresByTableId.get(b))}let a=t.children;for(let c=0;c<a.length;c++)qxe(e,a[c],o,i)}function Yxe(e,t,n,i){let r=KH(t),o=0;for(let u=0;u<t.length;u++)t[u]!==r&&o++;let s=e.constructor,a=new s(o*n),c=0;for(let u=0;u<t.length;u++){let f=t[u];if(i&&(i[f]=f===r?r:c),f!==r){for(let d=0;d<n;d++)a[c*n+d]=e[f*n+d];c++}}return a}var u2=Yut;var $H=new Bc,JH=new ya,ZH=new Mo,f2=new Sm,yQ=new Mf,Xxe=new Of,Kxe=new N,AQ=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._collections=[],this._collectionLocalMatrices=[],this._collectionFeatureTableIds=new Map,this._featuresByTableId=new Map,this._metadata=void 0,this._group=void 0,this.featurePropertiesDirty=!1,this._ready=!1,this._modelMatrix=N.clone(N.IDENTITY)}get featuresLength(){return this.batchTables.reduce((t,n)=>t+n.featuresLength,0)}get pointsLength(){return this._collections.filter(t=>t instanceof Ku).reduce((t,n)=>t+n.primitiveCount,0)}get trianglesLength(){return this._collections.reduce((t,n)=>n instanceof Ua?t+n.triangleCount:n instanceof ml?t+(n.vertexCount-n.primitiveCount)*2:t,0)}get geometryByteLength(){return this._collections.reduce((t,n)=>t+n.byteLength,0)}get texturesByteLength(){return 0}get batchTableByteLength(){return this.batchTables.reduce((t,n)=>t+n.batchTableByteLength,0)}get innerContents(){}get ready(){return this._ready}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTables(){return this._model._featureTables}get batchTable(){throw new pe("Deprecated: Use `content.batchTables`.")}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}getFeature(t,n){return this._featuresByTableId.get(n)?.get(t)}hasProperty(t,n,i){let r=this.getFeature(t,i);return r?r.hasProperty(n):!1}applyDebugSettings(t,n){let i=t?`color("${n.toCssHexString()}", 1.0)`:'color("white", 1.0)';this.applyStyle(new l_({color:i}))}applyStyle(t){let n=o=>o instanceof Ku,i=o=>o instanceof ml,r=o=>o instanceof Ua;for(let o of this._collections.filter(n)){let s=this._collectionFeatureTableIds.get(o);for(let a=0,c=o.primitiveCount;a<c;a++){o.get(a,$H);let u=this.getFeature($H.featureId,s);l(t.show)&&($H.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,f2.color),l(t.pointSize)&&(f2.size=t.pointSize.evaluate(u)),l(t.pointOutlineWidth)&&(f2.outlineWidth=t.pointOutlineWidth.evaluate(u)),l(t.pointOutlineColor)&&t.pointOutlineColor.evaluate(u,f2.outlineColor),$H.setMaterial(f2)}}for(let o of this._collections.filter(i)){let s=this._collectionFeatureTableIds.get(o);for(let a=0,c=o.primitiveCount;a<c;a++){o.get(a,JH);let u=this.getFeature(JH.featureId,s);l(t.show)&&(JH.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,yQ.color),l(t.lineWidth)&&(yQ.width=t.lineWidth.evaluate(u)),JH.setMaterial(yQ)}}for(let o of this._collections.filter(r)){let s=this._collectionFeatureTableIds.get(o);for(let a=0,c=o.primitiveCount;a<c;a++){o.get(a,ZH);let u=this.getFeature(ZH.featureId,s);l(t.show)&&(ZH.show=t.show.evaluate(u)),l(t.color)&&t.color.evaluate(u,Xxe.color),ZH.setMaterial(Xxe)}}}update(t,n){let i=this._tileset,r=i._scene?.vectorProvider;if(l(this._model)&&!this._ready){let s=this._model;s.modelMatrix=this._tile.computedTransform,s.update(n),s.ready&&(nft(this),this._ready=!0)}N.multiplyTransformation(this._tile.computedTransform,this._modelMatrix,Kxe);let o=l(r)&&this._tile._selectedFrame===n.frameNumber;for(let s=0;s<this._collections.length;s++){let a=this._collections[s];N.multiplyTransformation(Kxe,this._collectionLocalMatrices[s],a.modelMatrix),!_s(i._heightReference)||!u_.isSupported(a)?a.update(n):o&&r.markForFrame(a,n.frameNumber,i._heightReference)}}pick(t,n,i){}isDestroyed(){return!1}destroy(){let t=this._tileset._scene?.vectorProvider;this._model?.destroy(),this._model=void 0;for(let n of this._collections)t?.remove(n),n.destroy();return this._collections.length=0,le(this)}static async fromGltf(t,n,i,r){let o=new e(t,n,i),s=tft(t,n,o,r),a=await jf.fromGltfAsync(s);return a.show=!1,o._model=a,o}};function tft(e,t,n,i){return{gltf:i,basePath:n._resource,cull:!1,releaseGltfJson:!0,opaquePass:Ie.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,content:n,featureIdLabel:e.featureIdLabel,instanceFeatureIdLabel:e.instanceFeatureIdLabel,projectTo2D:e._projectTo2D,enablePick:e._enablePick,enableDebugWireframe:e._enableDebugWireframe,enableShowOutline:!1}}function nft(e){let t=e._model.sceneGraph.components,n=xt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new N);N.multiplyTransformation(t.transform,n,e._modelMatrix);let i=u2(e,t);e._collections=i.collections,e._collectionLocalMatrices=i.collectionLocalMatrices,e._collectionFeatureTableIds=i.collectionFeatureTableIds,e._featuresByTableId=i.featuresByTableId}var MA=AQ;function dc(){}dc._maxSortingConcurrency=Math.max(dn.hardwareConcurrency-1,1);dc._sorterTaskProcessor=void 0;dc._taskProcessorReady=!1;dc._error=void 0;dc._getSorterTaskProcessor=function(){if(!l(dc._sorterTaskProcessor)){let e=new Jn("gaussianSplatSorter",dc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?dc._taskProcessorReady=!0:dc._error=new oe("Gaussian splat sorter could not be initialized.")}).catch(t=>{dc._error=t}),dc._sorterTaskProcessor=e}return dc._sorterTaskProcessor};dc.radixSortIndexes=function(e){let t=dc._getSorterTaskProcessor();if(l(dc._error))throw dc._error;if(dc._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var LT=dc;function hc(){}hc._maxSortingConcurrency=Math.max(dn.hardwareConcurrency-1,1);hc._textureTaskProcessor=void 0;hc._taskProcessorReady=!1;hc._error=void 0;hc._getTextureTaskProcessor=function(){if(!l(hc._textureTaskProcessor)){let e=new Jn("gaussianSplatTextureGenerator",hc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?hc._taskProcessorReady=!0:hc._error=new oe("Gaussian splat sorter could not be initialized.")}).catch(t=>{hc._error=t}),hc._textureTaskProcessor=e}return hc._textureTaskProcessor};hc.generateFromAttributes=function(e){let t=hc._getTextureTaskProcessor();if(l(hc._error))throw hc._error;if(!hc._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var d2=hc;function ift(e){let t=new e_;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=Ge.getState(Ge.fromCache({depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL}})),this.alphaOptions=new bT,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,de.FRAGMENT)}var h2=ift;var m2=`#if defined(HAS_SPHERICAL_HARMONICS)
const uint coefficientCount[3] = uint[3](3u,8u,15u);
const float SH_C1 = 0.48860251;
const float SH_C2[5] = float[5](
1.092548430,
-1.09254843,
0.315391565,
-1.09254843,
0.546274215
);
const float SH_C3[7] = float[7](
-0.59004358,
2.890611442,
-0.45704579,
0.373176332,
-0.45704579,
1.445305721,
-0.59004358
);
uvec2 loadSHCoeff(uint splatID, int index) {
ivec2 shTexSize = textureSize(u_sphericalHarmonicsTexture, 0);
uint dims = coefficientCount[uint(u_sphericalHarmonicsDegree)-1u];
uint splatsPerRow = uint(shTexSize.x) / dims;
uint shIndex = (splatID%splatsPerRow) * dims + uint(index);
ivec2 shPosCoord = ivec2(shIndex, splatID / splatsPerRow);
return texelFetch(u_sphericalHarmonicsTexture, shPosCoord, 0).rg;
}
vec3 halfToVec3(uvec2 packed) {
return vec3(unpackHalf2x16(packed.x), unpackHalf2x16(packed.y).x);
}
vec3 loadAndExpandSHCoeff(uint splatID, int index) {
uvec2 coeff = loadSHCoeff(splatID, index);
return halfToVec3(coeff);
}
vec3 evaluateSH(uint splatID, vec3 viewDir) {
vec3 result = vec3(0.0);
int coeffIndex = 0;
float x = viewDir.x, y = viewDir.y, z = viewDir.z;
if (u_sphericalHarmonicsDegree >= 1.) {
vec3 sh1 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh2 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh3 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += -SH_C1 * y * sh1 + SH_C1 * z * sh2 - SH_C1 * x * sh3;
if (u_sphericalHarmonicsDegree >= 2.) {
float xx = x * x;
float yy = y * y;
float zz = z * z;
float xy = x * y;
float yz = y * z;
float xz = x * z;
vec3 sh4 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh5 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh6 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh7 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh8 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += SH_C2[0] * xy * sh4 +
SH_C2[1] * yz * sh5 +
SH_C2[2] * (2.0f * zz - xx - yy) * sh6 +
SH_C2[3] * xz * sh7 +
SH_C2[4] * (xx - yy) * sh8;
if (u_sphericalHarmonicsDegree >= 3.) {
vec3 sh9 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh10 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh11 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh12 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh13 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh14 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh15 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += SH_C3[0] * y * (3.0f * xx - yy) * sh9 +
SH_C3[1] * xy * z * sh10 +
SH_C3[2] * y * (4.0f * zz - xx - yy) * sh11 +
SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh12 +
SH_C3[4] * x * (4.0f * zz - xx - yy) * sh13 +
SH_C3[5] * z * (xx - yy) * sh14 +
SH_C3[6] * x * (xx - 3.0f * yy) * sh15;
}
}
}
return result;
}
#endif
vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) {
vec4 t = vec4(viewPos, 1.0);
vec2 focal = vec2(czm_projection[0][0] * czm_viewport.z, czm_projection[1][1] * czm_viewport.w);
vec2 J1 = focal / t.z;
vec2 J2 = -focal * vec2(t.x, t.y) / (t.z * t.z);
mat3 J = mat3(
J1.x, 0.0, J2.x,
0.0, J1.y, J2.y,
0.0, 0.0, 0.0
);
mat3 R = mat3(czm_modelView);
mat3 Vrk_view = R * Vrk * transpose(R);
mat3 cov = transpose(J) * Vrk_view * J;
float diagonal1 = cov[0][0] + .3;
float offDiagonal = cov[0][1];
float diagonal2 = cov[1][1] + .3;
float mid = 0.5 * (diagonal1 + diagonal2);
float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
float lambda1 = mid + radius;
float lambda2 = max(mid - radius, 0.1);
vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));
return vec4(
min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
);
}
highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);
void main() {
uint texIdx = uint(a_splatIndex);
uint rowMask = uint(u_splatRowMask);
uint rowShift = uint(u_splatRowShift);
ivec2 posCoord = ivec2(int((texIdx & rowMask) << 1), int(texIdx >> rowShift));
vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );
vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
vec4 clipPosition = czm_projection * splatViewPos;
float clip = 1.2 * clipPosition.w;
if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
clipPosition.y < -clip || clipPosition.y > clip) {
gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
return;
}
ivec2 covCoord = ivec2(int(((texIdx & rowMask) << 1) | 1u), int(texIdx >> rowShift));
uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));
gl_Position = clipPosition;
vec2 u1 = unpackHalf2x16(covariance.x) ;
vec2 u2 = unpackHalf2x16(covariance.y);
vec2 u3 = unpackHalf2x16(covariance.z);
mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);
vec4 covVectors = calcCovVectors(splatViewPos.xyz, Vrk);
if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
gl_Position = discardVec;
return;
}
vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
gl_Position += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * gl_Position.w, 0, 0);
gl_Position.z = clamp(gl_Position.z, -abs(gl_Position.w), abs(gl_Position.w));
v_vertPos = corner ;
v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
#if defined(HAS_SPHERICAL_HARMONICS)
vec4 splatWC = czm_inverseView * splatViewPos;
vec3 viewDirModel = normalize(u_inverseModelRotation * (splatWC.xyz - u_cameraPositionWC.xyz));
v_splatColor.rgb += evaluateSH(texIdx, viewDirModel).rgb;
#endif
v_splitDirection = u_splitDirection;
}
`;var p2=`void main() {
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
float A = -dot(v_vertPos, v_vertPos);
if (A < -4.) {
discard;
}
float B = exp(A * 4.) * v_splatColor.a ;
out_FragColor = vec4(v_splatColor.rgb * B , B);
}
`;var FT=new N,tTe=new N,g2=new N,vi=new $,_2=new Le,rft=new h,oft=new Le,sft=new h,aft=1e-12,QH=1e-5,bQ=1e-7,Wa={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4},Ys={BUILDING:"BUILDING",TEXTURE_PENDING:"TEXTURE_PENDING",TEXTURE_READY:"TEXTURE_READY",SORTING:"SORTING",READY:"READY"},cft=2,lft=30,uft=3,fft=.008726646259971648,dft=1;function hft(e,t){let n=e._lastSteadySortFrameNumber>=0?t.frameNumber-e._lastSteadySortFrameNumber:Number.POSITIVE_INFINITY;if(e._lastSteadySortFrameNumber>=0&&n<uft)return!1;let i=t.camera;return l(i)?!e._hasLastSteadySortCameraPosition||!e._hasLastSteadySortCameraDirection||h.distance(i.positionWC,e._lastSteadySortCameraPosition)>=dft?!0:h.angleBetween(i.directionWC,e._lastSteadySortCameraDirection)>=fft:!1}function $xe(e,t){e._lastSteadySortFrameNumber=t.frameNumber;let n=t.camera;l(n)&&(h.clone(n.positionWC,e._lastSteadySortCameraPosition),e._hasLastSteadySortCameraPosition=!0,h.clone(n.directionWC,e._lastSteadySortCameraDirection),e._hasLastSteadySortCameraDirection=!0)}function mft(e,t){let n=e._selectedTileSet;if(!l(n)||n.size!==t.length)return!0;for(let i=0;i<t.length;i++)if(!n.has(t[i]))return!0;return!1}function Jxe(e,t){return l(t)&&t.requestId===e._sortRequestId&&t.dataGeneration===e._splatDataGeneration}function xQ(e){l(e)&&(l(e.gaussianSplatTexture)&&(e.gaussianSplatTexture.destroy(),e.gaussianSplatTexture=void 0),l(e.sphericalHarmonicsTexture)&&(e.sphericalHarmonicsTexture.destroy(),e.sphericalHarmonicsTexture=void 0))}function Zxe(e,t,n){if(!l(t))return;e._retiredTextures.push({texture:t,frameNumber:n})}function pft(e,t){let n=e._retiredTextures;if(!l(n)||n.length===0)return;let i=[];for(let r=0;r<n.length;r++){let o=n[r];t-o.frameNumber>0?o.texture.destroy():i.push(o)}e._retiredTextures=i}function gft(e,t){let n=e?.[t];return l(n)?n.buffer:void 0}function _ft(e,t,n,i){let r=e._aggregateScratchBuffers[t];l(r)||(r=[],e._aggregateScratchBuffers[t]=r);let o=gft(e._snapshot,t);for(let a=0;a<r.length;a++){let c=r[a];if(c.length>=i&&c.buffer!==o)return c}let s=Y.createTypedArray(n,i);return r.push(s),s}function yft(e,t){return e.length===t?e:e.subarray(0,t)}function Aft(e,t,n){if(!l(t.indexes)||t.state!==Ys.READY)throw new pe("Committing snapshot before it is READY.");let i=n.frameNumber,r=e._snapshot,o=l(r)?r.gaussianSplatTexture:e.gaussianSplatTexture;l(o)&&o!==t.gaussianSplatTexture&&Zxe(e,o,i);let s=l(r)?r.sphericalHarmonicsTexture:e.sphericalHarmonicsTexture;l(s)&&s!==t.sphericalHarmonicsTexture&&Zxe(e,s,i),e._snapshot=t,e._positions=t.positions,e._rotations=t.rotations,e._scales=t.scales,e._colors=t.colors,e._shData=t.shData,e._sphericalHarmonicsDegree=t.sphericalHarmonicsDegree,e._numSplats=t.numSplats,e._indexes=t.indexes,e.gaussianSplatTexture=t.gaussianSplatTexture,e.sphericalHarmonicsTexture=t.sphericalHarmonicsTexture,e._lastTextureWidth=t.lastTextureWidth,e._lastTextureHeight=t.lastTextureHeight,e._splatRowMask=t.splatRowMask,e._splatRowShift=t.splatRowShift,e._splatBudgetSSEScale=t.splatBudgetSSEScale??1,e._hasGaussianSplatTexture=l(t.gaussianSplatTexture),e._needsGaussianSplatTexture=!1,e._gaussianSplatTexturePending=!1,e._vertexArray=void 0,e._vertexArrayLen=-1,e._drawCommand=void 0,e._sorterPromise=void 0,e._activeSort=void 0,e._sorterState=Wa.IDLE,e._dirty=!1}async function bft(e,t,n,i){try{let r=await i,o=Ut.maximumTextureSize,s=o,a=Math.ceil(n.numSplats/(o/2)),c=Math.log2(o/2),u=o/2-1;if(a>o){let g=n.numSplats;a=o;let m=s/2;if(n.numSplats=o*m,n.positions=n.positions.subarray(0,n.numSplats*3),n.rotations=n.rotations.subarray(0,n.numSplats*4),n.scales=n.scales.subarray(0,n.numSplats*3),n.colors=n.colors.subarray(0,n.numSplats*4),l(n.shData)){let y=n.shData.length/g;n.shData=n.shData.subarray(0,Math.floor(n.numSplats*y))}n.splatBudgetSSEScale=g/n.numSplats,console.warn(`[GaussianSplat][HARD CAP] ${g} splats exceed the maximum texture capacity (${o}\xD7${m} = ${n.numSplats} splats at width=${s}). Rendering only the first ${n.numSplats} splats to avoid a WebGL crash. Increasing maximumScreenSpaceError by ${n.splatBudgetSSEScale.toFixed(2)}x next frame.`)}else n.splatBudgetSSEScale=1;let f=s*a*4,d;f<=r.data.length?d=r.data.subarray(0,f):(d=new Uint32Array(f),d.set(r.data));let p={width:s,height:a,data:d};if(n.splatRowMask=u,n.splatRowShift=c,e._pendingSnapshot!==n){n.state=Ys.BUILDING;return}if(!l(n.gaussianSplatTexture))n.gaussianSplatTexture=eTe(t.context,p);else if(n.lastTextureHeight!==p.height||n.lastTextureWidth!==p.width){let g=n.gaussianSplatTexture;n.gaussianSplatTexture=eTe(t.context,p),g.destroy()}else n.gaussianSplatTexture.copyFrom({source:{width:p.width,height:p.height,arrayBufferView:p.data}});if(n.lastTextureHeight=p.height,n.lastTextureWidth=p.width,l(n.shData)&&n.sphericalHarmonicsDegree>0){let g=n.sphericalHarmonicsTexture,m=Ut.maximumTextureSize,y=n.shCoefficientCount/3,A=Math.floor(m/y),b=A*(y*2),x=Math.ceil(n.numSplats/A);if(x>m)console.warn(`[GaussianSplat][SHTexture] ${n.numSplats} splats require SH height ${x} > maxTex ${m}. Disabling spherical harmonics for this snapshot (color-only fallback).`),n.sphericalHarmonicsDegree=0,l(g)&&g.destroy(),n.sphericalHarmonicsTexture=void 0;else{let T=new Uint32Array(m*x*2),E=0;for(let v=0;E<n.shData.length;v+=m*2)T.set(n.shData.subarray(E,E+b),v),E+=b;n.sphericalHarmonicsTexture=Tft(t.context,{data:T,width:m,height:x}),l(g)&&g.destroy()}}n.state=Ys.TEXTURE_READY}catch(r){console.error("Error generating Gaussian splat texture:",r),n.state=Ys.BUILDING}}async function xft(e,t,n,i){try{let r=await i;if(!l(n)||n.snapshot!==e._pendingSnapshot)return;let o=n.expectedCount,s=o,a=r?.length;if(o!==s||a!==o){e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ys.SORTING&&(n.snapshot.state=Ys.TEXTURE_READY);return}let c=n.snapshot;c.indexes=r,c.state=Ys.READY,e._pendingSortPromise=void 0,e._pendingSort=void 0,Aft(e,c,t),e._pendingSnapshot=void 0,cu.buildGSplatDrawCommand(e,t)}catch(r){if(!l(n)||n.snapshot!==e._pendingSnapshot)return;e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Ys.SORTING&&(n.snapshot.state=Ys.TEXTURE_READY),e._sorterState=Wa.ERROR,e._sorterError=r}}async function Qxe(e,t,n){try{let i=await n,r=Jxe(e,t),o=t?.expectedCount,s=o,a=i?.length;if(!r||(o!==s||a!==o)){r&&(e._sorterPromise=void 0,e._sorterState=Wa.IDLE);return}e._indexes=i,e._sorterState=Wa.SORTED}catch(i){if(!Jxe(e,t))return;e._sorterState=Wa.ERROR,e._sorterError=i}}function Tft(e,t){return new Dt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RG_INTEGER,pixelDatatype:ze.UNSIGNED_INT,flipY:!1,sampler:Ht.NEAREST})}function eTe(e,t){return new Dt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RGBA_INTEGER,pixelDatatype:ze.UNSIGNED_INT,flipY:!1,sampler:Ht.NEAREST})}function cu(e){e=e??H.EMPTY_OBJECT,this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,this._numSplats=0,this._needsGaussianSplatTexture=!0,this._snapshot=void 0,this._pendingSnapshot=void 0,this._retiredTextures=[],this._aggregateScratchBuffers={positions:[],scales:[],rotations:[],colors:[]},this._scratchAggregateShBuffer=void 0,this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0,this._prevViewMatrix=new N,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0,this._lastTextureWidth=0,this._lastTextureHeight=0,this._vertexArray=void 0,this._vertexArrayLen=-1,this._splitDirection=Vo.NONE,this._dirty=!1,this._tileset=e.tileset,this._baseTilesetUpdate=this._tileset.update,this._tileset.update=this._wrappedUpdate.bind(this),this._tileset.tileLoad.addEventListener(this.onTileLoad,this),this._tileset.tileVisible.addEventListener(this.onTileVisible,this),this.selectedTileLength=0,this._selectedTileSet=new Set,this._ready=!1,this._hasGaussianSplatTexture=!1,this._gaussianSplatTexturePending=!1,this._drawCommand=void 0,this._drawCommandModelMatrix=new N,this._rootTransform=void 0,this._axisCorrectionMatrix=xt.getAxisCorrectionMatrix(Hi.Y,Hi.X,new N),this._shInverseRotation=new $,this._isDestroyed=!1,this._sorterState=Wa.IDLE,this._sorterPromise=void 0,this._splatDataGeneration=0,this._sortRequestId=0,this._activeSort=void 0,this._pendingSortPromise=void 0,this._pendingSort=void 0,this._lastSteadySortFrameNumber=-1,this._lastSteadySortCameraPosition=new h,this._hasLastSteadySortCameraPosition=!1,this._lastSteadySortCameraDirection=new h,this._hasLastSteadySortCameraDirection=!1,this._sorterError=void 0,this._splatRowMask=0,this._splatRowShift=0,this._splatBudgetSSEScale=1}Object.defineProperties(cu.prototype,{ready:{get:function(){return this._ready}},isStable:{get:function(){return!this._dirty&&(!l(this._pendingSnapshot)||this._pendingSnapshot.state===Ys.READY)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});cu.prototype._wrappedUpdate=function(e){let t=this._tileset;if(this._splatBudgetSSEScale!==1){let n=t.maximumScreenSpaceError;t.maximumScreenSpaceError*=this._splatBudgetSSEScale,this._baseTilesetUpdate.call(t,e),t.maximumScreenSpaceError=n}else this._baseTilesetUpdate.call(t,e);this.update(e)};cu.prototype.destroy=function(){if(this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,xQ(this._pendingSnapshot),xQ(this._snapshot),l(this._retiredTextures))for(let t=0;t<this._retiredTextures.length;t++)this._retiredTextures[t].texture.destroy();this._retiredTextures=[],this._pendingSnapshot=void 0,this._snapshot=void 0,this._aggregateScratchBuffers=void 0,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0;let e=this._drawCommand;return l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),l(this._vertexArray)&&(this._vertexArray.destroy(),this._vertexArray=void 0),this._tileset.update=this._baseTilesetUpdate.bind(this._tileset),le(this)};cu.prototype.isDestroyed=function(){return this._isDestroyed};cu.prototype.onTileLoad=function(e){this._dirty=!0};cu.prototype.onTileVisible=function(e){};cu.transformTile=function(e){let t=e.computedTransform,n=e.content.gltfPrimitive,i=e.tileset.gaussianSplatPrimitive;i._rootTransform===void 0&&(i._rootTransform=At.eastNorthUpToFixedFrame(e.tileset.boundingSphere.center));let r=i._rootTransform,o=N.multiplyTransformation(t,i._axisCorrectionMatrix,FT);N.multiplyTransformation(o,e.content.worldTransform,o);let s=N.inverse(r,tTe),a=N.multiplyTransformation(s,o,FT),c=e.content._lastSplatTransform;if(e.content._transformed&&l(c)&&N.equalsEpsilon(a,c,aft))return;let u=e.content.positions,f=e.content.rotations,d=e.content.scales,p=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]),g=Math.sqrt(a[4]*a[4]+a[5]*a[5]+a[6]*a[6]),m=Math.sqrt(a[8]*a[8]+a[9]*a[9]+a[10]*a[10]);vi[0]=a[0]/p,vi[1]=a[1]/p,vi[2]=a[2]/p,vi[3]=a[4]/g,vi[4]=a[5]/g,vi[5]=a[6]/g,vi[6]=a[8]/m,vi[7]=a[9]/m,vi[8]=a[10]/m;let y=vi[0]*vi[3]+vi[1]*vi[4]+vi[2]*vi[5],A=vi[0]*vi[6]+vi[1]*vi[7]+vi[2]*vi[8],b=vi[3]*vi[6]+vi[4]*vi[7]+vi[5]*vi[8],x=Math.abs(p-1)<=bQ&&Math.abs(g-1)<=bQ&&Math.abs(m-1)<=bQ,T=Math.abs(y)<=QH&&Math.abs(A)<=QH&&Math.abs(b)<=QH,E=vi[0]*(vi[4]*vi[8]-vi[5]*vi[7])-vi[3]*(vi[1]*vi[8]-vi[2]*vi[7])+vi[6]*(vi[1]*vi[5]-vi[2]*vi[4]),v=x&&T&&Math.abs(E-1)<=QH;Le.fromRotationMatrix(vi,_2),Le.normalize(_2,_2);let S=xt.getAttributeBySemantic(n,ct.POSITION).typedArray,I=xt.getAttributeBySemantic(n,ct.ROTATION).typedArray,R=xt.getAttributeBySemantic(n,ct.SCALE).typedArray,O=rft,L=oft,_=sft;for(let C=0;C<S.length/3;++C)O.x=S[C*3],O.y=S[C*3+1],O.z=S[C*3+2],L.x=I[C*4],L.y=I[C*4+1],L.z=I[C*4+2],L.w=I[C*4+3],_.x=R[C*3],_.y=R[C*3+1],_.z=R[C*3+2],v?(N.multiplyByPoint(a,O,O),Le.multiply(_2,L,L),Le.normalize(L,L)):(N.fromTranslationQuaternionRotationScale(O,L,_,g2),N.multiplyTransformation(a,g2,g2),N.getTranslation(g2,O),N.getScale(g2,_),Le.multiply(_2,L,L),Le.normalize(L,L)),u[C*3]=O.x,u[C*3+1]=O.y,u[C*3+2]=O.z,f[C*4]=L.x,f[C*4+1]=L.y,f[C*4+2]=L.z,f[C*4+3]=L.w,d[C*3]=_.x,d[C*3+1]=_.y,d[C*3+2]=_.z;e.content._lastSplatTransform=N.clone(a,e.content._lastSplatTransform),e.content._transformed=!0};cu.generateSplatTexture=function(e,t,n){if(!l(n)||n.state!==Ys.BUILDING)return;n.state=Ys.TEXTURE_PENDING;let i=d2.generateFromAttributes({attributes:{positions:new Float32Array(n.positions),scales:new Float32Array(n.scales),rotations:new Float32Array(n.rotations),colors:new Uint8Array(n.colors)},count:n.numSplats});if(!l(i)){n.state=Ys.BUILDING;return}bft(e,t,n,i)};cu.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new h2(e),{shaderBuilder:r}=i,o=i.renderStateOptions;o.cull.enabled=!1,o.depthMask=!1,o.depthTest.enabled=!0,o.blending=tn.PRE_MULTIPLIED_ALPHA_BLEND,i.alphaOptions.pass=Ie.GAUSSIAN_SPLATS,r.addAttribute("vec2","a_screenQuadPosition"),r.addAttribute("float","a_splatIndex"),r.addVarying("vec4","v_splatColor"),r.addVarying("vec2","v_vertPos"),r.addUniform("float","u_splitDirection",de.VERTEX),r.addVarying("float","v_splitDirection"),r.addUniform("highp usampler2D","u_splatAttributeTexture",de.VERTEX),r.addUniform("float","u_sphericalHarmonicsDegree",de.VERTEX),r.addUniform("float","u_splatScale",de.VERTEX),r.addUniform("vec3","u_cameraPositionWC",de.VERTEX),r.addUniform("mat3","u_inverseModelRotation",de.VERTEX);let s=i.uniformMap;r.addUniform("int","u_splatRowMask",de.VERTEX),r.addUniform("int","u_splatRowShift",de.VERTEX);let a=e.gaussianSplatTexture;s.u_splatAttributeTexture=function(){return a},s.u_splatRowMask=function(){return e._splatRowMask},s.u_splatRowShift=function(){return e._splatRowShift},e._sphericalHarmonicsDegree>0&&(r.addDefine("HAS_SPHERICAL_HARMONICS","1",de.VERTEX),r.addUniform("highp usampler2D","u_sphericalHarmonicsTexture",de.VERTEX),s.u_sphericalHarmonicsTexture=function(){return e.sphericalHarmonicsTexture}),s.u_sphericalHarmonicsDegree=function(){return e._sphericalHarmonicsDegree},s.u_cameraPositionWC=function(){return h.clone(t.camera.positionWC)},s.u_inverseModelRotation=function(){return e._shInverseRotation},s.u_splitDirection=function(){return e.splitDirection};let c=l(e._indexes)?e._indexes.length:e._numSplats;i.instanceCount=c,i.count=4,i.primitiveType=Oe.TRIANGLE_STRIP,r.addVertexLines(m2),r.addFragmentLines(p2);let u=r.buildShaderProgram(t.context),f=Je(Ge.fromCache(i.renderStateOptions),!0);f.cull.face=xt.getCullFace(n.modelMatrix,Oe.TRIANGLE_STRIP),f=Ge.fromCache(f);let d={screenQuadPosition:0,splatIndex:2},p=new Cn.Attribute;if(p.name="_SPLAT_INDEXES",p.typedArray=e._indexes,p.componentDatatype=Y.UNSIGNED_INT,p.type=Vt.SCALAR,p.normalized=!1,p.count=i.instanceCount,p.constant=0,p.instanceDivisor=1,!l(e._vertexArray)||e._indexes.length>e._vertexArrayLen){let b=new St({attributes:{screenQuadPosition:new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...p,variableName:"splatIndex"}},primitiveType:Oe.TRIANGLE_STRIP});e._vertexArray=zn.fromGeometry({context:t.context,geometry:b,attributeLocations:d,bufferUsage:Me.DYNAMIC_DRAW,interleave:!1})}else e._vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(e._indexes);e._vertexArrayLen=e._indexes.length;let m=N.clone(e._rootTransform,e._drawCommandModelMatrix),y=e._vertexArray,A=new at({boundingVolume:n.boundingSphere,modelMatrix:m,uniformMap:s,renderState:f,vertexArray:y,shaderProgram:u,cull:o.cull.enabled,pass:Ie.GAUSSIAN_SPLATS,count:i.count,owner:e,instanceCount:i.instanceCount,primitiveType:Oe.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=A};cu.prototype.update=function(e){let t=this._tileset;if(pft(this,e.frameNumber),!t.show)return;if(this._drawCommand&&e.commandList.push(this._drawCommand),t._modelMatrixChanged){this._dirty=!0;return}let n=l(this._rootTransform);if(e.passes.pick===!0)return;this.splitDirection!==t.splitDirection&&(this.splitDirection=t.splitDirection);let i=e.camera;if(l(i)){if(this._sorterState===Wa.IDLE){let r=t._selectedTiles.length!==0&&mft(this,t._selectedTiles);t._selectedTiles.length===0?(this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0):r?this._selectedTilesStableFrames=0:this._selectedTilesStableFrames++,(r||this._dirty)&&(this._needsSnapshotRebuild=!0);let o=this._selectedTilesStableFrames>=cft,s=!l(this._snapshot)&&!l(this._pendingSnapshot)&&!l(this._drawCommand);this._needsSnapshotRebuild&&t._selectedTiles.length!==0?this._snapshotRebuildStallFrames++:this._snapshotRebuildStallFrames=0;let a=o||s||this._snapshotRebuildStallFrames>=lft;if(!(this._dirty||this._needsSnapshotRebuild||r||l(this._pendingSnapshot)||l(this._pendingSortPromise)||!l(this._drawCommand))&&N.equals(i.viewMatrix,this._prevViewMatrix))return;if(t._selectedTiles.length!==0&&this._needsSnapshotRebuild&&a){this._splatDataGeneration++,this._activeSort=void 0,this._sorterPromise=void 0,this._sorterState=Wa.IDLE,this._pendingSortPromise=void 0,this._pendingSort=void 0,l(this._pendingSnapshot)&&xQ(this._pendingSnapshot);let u=t._selectedTiles;this._rootTransform=At.eastNorthUpToFixedFrame(t.boundingSphere.center);{let E=u[0],v=N.multiplyTransformation(E.computedTransform,this._axisCorrectionMatrix,tTe);N.multiplyTransformation(v,E.content.worldTransform??N.IDENTITY,v),N.getRotation(N.inverse(v,v),this._shInverseRotation)}for(let E of u)cu.transformTile(E);let f=u.reduce((E,v)=>E+v.content.pointsLength,0),d=(E,v,S,I)=>{let R,O=0,L=0;for(let _ of u){let C=S(_.content),w=l(I)?I:Vt.getNumberOfComponents(C.type),P=l(C.typedArray)?C.typedArray:C;L+=P.length,l(R)||(R=_ft(this,E,v,f*w))}if(!l(R))return Y.createTypedArray(v,0);for(let _ of u){let C=_.content,w=S(C),P=l(w.typedArray)?w.typedArray:w;R.set(P,O),O+=P.length}return yft(R,L)},p=()=>{let E=0;for(let R of u)if(R.content.sphericalHarmonicsDegree>0){switch(R.content.sphericalHarmonicsDegree){case 1:E=9;break;case 2:E=24;break;case 3:E=45;break}break}if(E===0)return;let v=f*(E*(2/3));(!l(this._scratchAggregateShBuffer)||this._scratchAggregateShBuffer.length<v)&&(this._scratchAggregateShBuffer=new Uint32Array(v));let S=this._scratchAggregateShBuffer,I=0;for(let R of u){let O=R.content.packedSphericalHarmonicsData;R.content.sphericalHarmonicsDegree>0&&(S.set(O,I),I+=O.length)}return I<S.length?S.subarray(0,I):S},g=d("positions",Y.FLOAT,E=>E.positions,3),m=d("scales",Y.FLOAT,E=>E.scales,3),y=d("rotations",Y.FLOAT,E=>E.rotations,4),A=d("colors",Y.UNSIGNED_BYTE,E=>xt.getAttributeBySemantic(E.gltfPrimitive,ct.COLOR)),b=u[0].content.sphericalHarmonicsDegree,x=b>0?u[0].content.sphericalHarmonicsCoefficientCount:0,T=p();this._pendingSnapshot={generation:this._splatDataGeneration,positions:g,rotations:y,scales:m,colors:A,shData:T,sphericalHarmonicsDegree:b,shCoefficientCount:x,numSplats:f,indexes:void 0,gaussianSplatTexture:void 0,sphericalHarmonicsTexture:void 0,lastTextureWidth:0,lastTextureHeight:0,splatRowMask:0,splatRowShift:0,state:Ys.BUILDING},this.selectedTileLength=t._selectedTiles.length,this._selectedTileSet=new Set(t._selectedTiles),this._dirty=!1,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0}if(l(this._pendingSnapshot)){let u=this._pendingSnapshot;if(u.state===Ys.BUILDING){cu.generateSplatTexture(this,e,u);return}if(u.state===Ys.TEXTURE_PENDING||u.state===Ys.TEXTURE_READY&&!l(u.gaussianSplatTexture)||!n)return;if(N.clone(i.viewMatrix,this._prevViewMatrix),N.multiply(i.viewMatrix,this._rootTransform,FT),u.state===Ys.TEXTURE_READY&&!l(this._pendingSortPromise)){let f=++this._sortRequestId,d=this._splatDataGeneration;this._pendingSort={requestId:f,dataGeneration:d,expectedCount:u.numSplats,snapshot:u};let p=LT.radixSortIndexes({primitive:{positions:new Float32Array(u.positions),modelView:Float32Array.from(FT),count:u.numSplats},sortType:"Index"});if(!l(p)){this._pendingSortPromise=void 0,this._pendingSort=void 0,u.state=Ys.TEXTURE_READY;return}this._pendingSortPromise=p,u.state=Ys.SORTING;let g=this._pendingSort;xft(this,e,g,p);return}if(!l(this._pendingSortPromise)){u.state===Ys.SORTING&&(u.state=Ys.TEXTURE_READY);return}return}if(this._numSplats===0||!n)return;if(N.clone(i.viewMatrix,this._prevViewMatrix),N.multiply(i.viewMatrix,this._rootTransform,FT),!l(this._sorterPromise)){if(!hft(this,e))return;let u=++this._sortRequestId,f=this._splatDataGeneration,d=this._numSplats;this._activeSort={requestId:u,dataGeneration:f,expectedCount:d};let p=LT.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(FT),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=p,l(p)){$xe(this,e);let g=this._activeSort;this._sorterState=Wa.SORTING,Qxe(this,g,p);return}}if(!l(this._sorterPromise)){this._sorterState=Wa.WAITING;return}this._sorterState=Wa.SORTING;return}else if(this._sorterState===Wa.WAITING){if(!l(this._sorterPromise)){let r=++this._sortRequestId,o=this._splatDataGeneration,s=this._numSplats;this._activeSort={requestId:r,dataGeneration:o,expectedCount:s};let a=LT.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(FT),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=a,l(a)){$xe(this,e);let c=this._activeSort;this._sorterState=Wa.SORTING,Qxe(this,c,a);return}}if(!l(this._sorterPromise)){this._sorterState=Wa.WAITING;return}this._sorterState=Wa.SORTING;return}else{if(this._sorterState===Wa.SORTING)return;if(this._sorterState===Wa.SORTED)cu.buildGSplatDrawCommand(this,e),this._sorterState=Wa.IDLE,this._dirty=!1,this._sorterPromise=void 0,this._activeSort=void 0;else if(this._sorterState===Wa.ERROR)throw this._sorterError}this._dirty=!1}};var y2=cu;var EQ=class e{constructor(t,n,i,r){this._tileset=n,this._tile=i,this._resource=r,this._loader=t,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new y2({tileset:this._tileset})),this._positions=void 0,this._rotations=void 0,this._scales=void 0,this.gltfPrimitive=void 0,this.worldTransform=void 0,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1,this._transformed=!1,this._sphericalHarmonicsDegree=0,this._sphericalHarmonicsCoefficientCount=0,this._packedSphericalHarmonicsData=void 0,this._lastSplatTransform=void 0}static tilesetRequiresGaussianSplattingExt(t){let n=!1;return t.isGltfExtensionRequired instanceof Function&&(n=t.isGltfExtensionRequired("KHR_gaussian_splatting")&&t.isGltfExtensionRequired("KHR_gaussian_splatting_compression_spz_2"),t.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")&&qr("KHR_spz_gaussian_splats_compression",`Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions
Please retile your tileset with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.`)),n}get featuresLength(){return 0}get pointsLength(){return this.gltfPrimitive.attributes[0].count}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){let t=this._tileset?.gaussianSplatPrimitive;if(!l(t))return 0;let n=t.gaussianSplatTexture,i=t.selectedTileLength;return!l(n)||i===0?0:n.sizeInBytes/i}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return this._ready}get transformed(){return this._transformed}get tileset(){return this._tileset}get tile(){return this._tile}get url(){return this._resource.getUrlComponent(!0)}get batchTable(){}get metadata(){return this._metadata}set metadata(t){this._metadata=t}get group(){return this._group}set group(t){this._group=t}get positions(){return this._positions}get rotations(){return this._rotations}get scales(){return this._scales}get sphericalHarmonicsCoefficientCount(){return this._sphericalHarmonicsCoefficientCount}get sphericalHarmonicsDegree(){return this._sphericalHarmonicsDegree}get packedSphericalHarmonicsData(){return this._packedSphericalHarmonicsData}static async fromGltf(t,n,i,r){let o=i,s=De.createIfNeeded(o),a={releaseGltfJson:!1,upAxis:Hi.Y,forwardAxis:Hi.Z};l(r.asset)?(a.gltfJson=r,a.baseResource=s,a.gltfResource=s):r instanceof Uint8Array?(a.typedArray=r,a.baseResource=s,a.gltfResource=s):a.gltfResource=De.createIfNeeded(r);let c=new Lf(a);try{await c.load()}catch(u){throw c.destroy(),new oe(`Failed to load glTF: ${u.message}`)}return new e(c,t,n,i)}update(t,n){let i=this._loader;if(!this._ready){if(n.afterRender.push(()=>!0),!l(i)){this._ready=!0;return}if(this._resourcesLoaded){this.gltfPrimitive=i.components.scene.nodes[0].primitives[0],this.worldTransform=i.components.scene.nodes[0].matrix,this._ready=!0,this._positions=xt.getAttributeBySemantic(this.gltfPrimitive,ct.POSITION).typedArray.slice(),this._rotations=xt.getAttributeBySemantic(this.gltfPrimitive,ct.ROTATION).typedArray.slice(),this._scales=xt.getAttributeBySemantic(this.gltfPrimitive,ct.SCALE).typedArray.slice();let{l:r,n:o}=Cft(this.gltfPrimitive.attributes);this._sphericalHarmonicsDegree=r,this._sphericalHarmonicsCoefficientCount=o,this._packedSphericalHarmonicsData=Ift(this);return}this._resourcesLoaded=i.process(n)}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}pick(t,n,i){}isDestroyed(){return this.isDestroyed}destroy(){return this.splatPrimitive=void 0,this._tile=void 0,this._tileset=void 0,this._resource=void 0,this._ready=!1,this._group=void 0,this._metadata=void 0,this._resourcesLoaded=!1,this._lastSplatTransform=void 0,l(this._loader)&&(this._loader.destroy(),this._loader=void 0),le(this)}};function Eft(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function Cft(e){switch(e.filter(n=>n.name.includes("SH_DEGREE_")).length){default:case 0:return{l:0,n:0};case 3:return{l:1,n:9};case 8:return{l:2,n:24};case 15:return{l:3,n:45}}}var nTe=new ArrayBuffer(4),vft=new Float32Array(nTe),Sft=new Uint32Array(nTe);function TQ(e){vft[0]=e;let t=Sft[0],n=t>>31&1,i=t>>23&255,r=t&8388607,o;if(i===255)o=n<<15|31744|(r?512:0);else if(i===0)o=n<<15;else{let s=i-127+15;s>=31?o=n<<15|31744:s<=0?o=n<<15:o=n<<15|s<<10|r>>>13}return o}function wft(e){let t=Eft(e),n="_COEF_",i=t.length,r=e.indexOf(n,i),o=parseInt(e.slice(i,r),10),s=parseInt(e.slice(r+n.length),10);return{l:o,n:s}}function Ift(e){let t=e.sphericalHarmonicsDegree,n=e.sphericalHarmonicsCoefficientCount,i=e.pointsLength*(n*(2/3)),r=new Uint32Array(i),o=e.gltfPrimitive.attributes.filter(u=>u.name.includes("SH_DEGREE_")),s=0,a=[0,9,24];switch(t){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}o.sort((u,f)=>u.name<f.name?-1:u.name>f.name?1:0);let c=s*(2/3);for(let u=0;u<o.length;u++){let{l:f,n:d}=wft(o[u].name);for(let p=0;p<e.pointsLength;p++){let g=a[f-1]*2/3,m=p*c+g+d*2,y=p*3;r[m]=TQ(o[u].typedArray[y])|TQ(o[u].typedArray[y+1])<<16,r[m+1]=TQ(o[u].typedArray[y+2])}}return r}var NA=EQ;var iTe={b3dm:function(e,t,n,i,r){return Hf.fromB3dm(e,t,n,i,r)},pnts:function(e,t,n,i,r){return Hf.fromPnts(e,t,n,i,r)},i3dm:function(e,t,n,i,r){return Hf.fromI3dm(e,t,n,i,r)},cmpt:function(e,t,n,i,r){return GM.fromTileType(e,t,n,i,r,iTe)},externalTileset:function(e,t,n,i){return IB.fromJson(e,t,n,i)},geom:function(e,t,n,i,r){return new YM(e,t,n,i,r)},vctr:function(e,t,n,i,r){return new ZB(e,t,n,i,r)},subt:function(e,t,n,i,r){return rS.fromSubtreeJson(e,t,n,void 0,i,r)},subtreeJson:function(e,t,n,i){return rS.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,r){if(i.byteLength<12)throw new oe("Invalid glb content");let a=new DataView(i,r).getUint32(8,!0),c=new Uint8Array(i,r,a);return NA.tilesetRequiresGaussianSplattingExt(e)?NA.fromGltf(e,t,n,c):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?MA.fromGltf(e,t,n,c):Hf.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){return NA.tilesetRequiresGaussianSplattingExt(e)?NA.fromGltf(e,t,n,i):e.hasExtension("3DTILES_content_gltf_vector")||e.isGltfExtensionUsed("CESIUM_mesh_vector")?MA.fromGltf(e,t,n,i):Hf.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return Hf.fromGeoJson(e,t,n,i)}},BT=iTe;var rTe={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5};Object.freeze(rTe);var Rr=rTe;var Zd={BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",COMPOSITE:"cmpt",POINT_CLOUD:"pnts",VECTOR:"vctr",GEOMETRY:"geom",GLTF:"gltf",GLTF_BINARY:"glb",IMPLICIT_SUBTREE:"subt",IMPLICIT_SUBTREE_JSON:"subtreeJson",EXTERNAL_TILESET:"externalTileset",MULTIPLE_CONTENT:"multipleContent",GEOJSON:"geoJson",VOXEL_BINARY:"voxl",VOXEL_JSON:"voxelJson"};Zd.isBinaryFormat=function(e){switch(e){case Zd.BATCHED_3D_MODEL:case Zd.INSTANCED_3D_MODEL:case Zd.COMPOSITE:case Zd.POINT_CLOUD:case Zd.VECTOR:case Zd.GEOMETRY:case Zd.IMPLICIT_SUBTREE:case Zd.VOXEL_BINARY:case Zd.GLTF_BINARY:return!0;default:return!1}};Object.freeze(Zd);var Ca=Zd;var oTe={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0};Object.freeze(oTe);var Qd=oTe;var va={RENDER:0,PICK:1,SHADOW:2,PRELOAD:3,PRELOAD_FLIGHT:4,REQUEST_RENDER_MODE_DEFER_CHECK:5,MOST_DETAILED_PRELOAD:6,MOST_DETAILED_PICK:7,NUMBER_OF_PASSES:8},f_=new Array(va.NUMBER_OF_PASSES);f_[va.RENDER]=Object.freeze({pass:va.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});f_[va.PICK]=Object.freeze({pass:va.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});f_[va.SHADOW]=Object.freeze({pass:va.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});f_[va.PRELOAD]=Object.freeze({pass:va.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});f_[va.PRELOAD_FLIGHT]=Object.freeze({pass:va.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});f_[va.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:va.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});f_[va.MOST_DETAILED_PRELOAD]=Object.freeze({pass:va.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});f_[va.MOST_DETAILED_PICK]=Object.freeze({pass:va.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});va.getPassOptions=function(e){return f_[e]};Object.freeze(va);var ao=va;var CQ=class{constructor(t,n){this._tileset=t,this._tile=n,this.featurePropertiesDirty=!1}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){}get ready(){return!0}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){}applyStyle(t){}update(t,n){}pick(t,n,i){}isDestroyed(){return!1}destroy(){return le(this)}},n0=CQ;function d_(e){e=e??H.EMPTY_OBJECT;let t=e.content,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(d_.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});d_.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};d_.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};d_.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};d_.prototype.getProperty=function(e){return Yn.getProperty(e,this._properties,this._class)};d_.prototype.setProperty=function(e,t){return Yn.setProperty(e,t,this._properties,this._class)};d_.prototype.getPropertyBySemantic=function(e){return Yn.getPropertyBySemantic(e,this._properties,this._class)};d_.prototype.setPropertyBySemantic=function(e,t){return Yn.setPropertyBySemantic(e,t,this._properties,this._class)};var A2=d_;function vQ(e,t){let n=tr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){vQ._oneTimeWarning("findContentMetadata-missing-root-schema","Could not find a metadata schema for content metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??H.EMPTY_OBJECT;if(l(n.class)){let r=i[n.class];return new A2({content:n,class:r})}}vQ._oneTimeWarning=_t;var kT=vQ;function Pft(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,r=tr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if(typeof r=="number")return i[r];let o=n.groupIds.findIndex(function(s){return s===r});return o>=0?i[o]:void 0}var UT=Pft;function h_(e){e=e??H.EMPTY_OBJECT;let t=e.tile,n=e.class;this._class=n,this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(h_.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});h_.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};h_.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};h_.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};h_.prototype.getProperty=function(e){return Yn.getProperty(e,this._properties,this._class)};h_.prototype.setProperty=function(e,t){return Yn.setProperty(e,t,this._properties,this._class)};h_.prototype.getPropertyBySemantic=function(e){return Yn.getPropertyBySemantic(e,this._properties,this._class)};h_.prototype.setPropertyBySemantic=function(e,t){return Yn.setPropertyBySemantic(e,t,this._properties,this._class)};var b2=h_;function SQ(e,t){let n=tr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){SQ._oneTimeWarning("findTileMetadata-missing-root-schema","Could not find a metadata schema for tile metadata. For tilesets that contain external tilesets, make sure the schema is added to the root tileset.json.");return}let i=e.schema.classes??H.EMPTY_OBJECT;if(l(n.class)){let r=i[n.class];return new b2({tile:n,class:r})}}SQ._oneTimeWarning=_t;var x2=SQ;function Dft(e){let t=new Uint8Array(e),n=im(t);if(n==="glTF"&&(n="glb"),Ca.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=Rft(t);if(l(i.root))return{contentType:Ca.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:Ca.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:Ca.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:Ca.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:Ca.VOXEL_JSON,jsonPayload:i};throw new oe("Invalid tile content.")}function Rft(e){let t;try{t=Ro(e)}catch{throw new oe("Invalid tile content.")}return t}var m_=Dft;var wQ=class{constructor(t,n,i,r){this._tileset=t,this._tile=n,this._tilesetResource=i,this._contents=[],this._contentsCreated=!1;let o=l(r.contents)?r.contents:r.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let s=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(s),this._requests=new Array(s),this._ready=!1,this._innerContentResources=new Array(s),this._serverKeys=new Array(s);for(let a=0;a<s;a++){let c=i.getDerivedResource({url:o[a].uri}),u=Kc.getServerKey(c.getUrlComponent());this._innerContentResources[a]=c,this._serverKeys[a]=u}}get featurePropertiesDirty(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)if(t[i].featurePropertiesDirty)return!0;return!1}set featurePropertiesDirty(t){let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].featurePropertiesDirty=t}get featuresLength(){return 0}get pointsLength(){return 0}get trianglesLength(){return 0}get geometryByteLength(){return 0}get texturesByteLength(){return 0}get batchTableByteLength(){return 0}get innerContents(){return this._contents}get ready(){return this._contentsCreated?this._ready:!1}get tileset(){return this._tileset}get tile(){return this._tile}get url(){}get metadata(){}set metadata(t){}get batchTable(){}get group(){}set group(t){}get innerContentUrls(){return this._innerContentHeaders.map(function(t){return t.uri})}requestInnerContents(){if(!Oft(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let t=this._innerContentHeaders;IQ(this,t.length);let n=this._cancelCount;for(let i=0;i<t.length;i++)this._arrayFetchPromises[i]=Mft(this,i,n,this._tile._contentState);return Nft(this)}cancelRequests(){for(let t=0;t<this._requests.length;t++){let n=this._requests[t];l(n)&&n.cancel()}}hasProperty(t,n){return!1}getFeature(t){}applyDebugSettings(t,n){let i=this._contents,r=i.length;for(let o=0;o<r;++o)i[o].applyDebugSettings(t,n)}applyStyle(t){let n=this._contents,i=n.length;for(let r=0;r<i;++r)n[r].applyStyle(t)}update(t,n){let i=this._contents,r=i.length,o=!0;for(let s=0;s<r;++s)i[s].update(t,n),o=o&&i[s].ready;!this._ready&&o&&(this._ready=!0)}pick(t,n,i){if(!this._ready)return;let r,o=Number.POSITIVE_INFINITY,s=this._contents,a=s.length;for(let c=0;c<a;++c){let u=s[c].pick(t,n,i);if(!l(u))continue;let f=h.distance(t.origin,u);f<o&&(r=u,o=f)}if(l(r))return i}isDestroyed(){return!1}destroy(){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].destroy();return le(this)}};function IQ(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function sTe(e,t){e._cancelCount++,e._tile._contentState=t;let n=e.tileset.statistics;n.numberOfPendingRequests-=e._requestsInFlight,n.numberOfAttemptedRequests+=e._requestsInFlight,e._requestsInFlight=0;let i=e._innerContentHeaders.length;e._arrayFetchPromises=new Array(i)}function Oft(e){let t={};for(let n=0;n<e.length;n++){let i=e[n];l(t[i])?t[i]++:t[i]=1}for(let n in t)if(t.hasOwnProperty(n)&&!Kc.serverHasOpenSlots(n,t[n]))return!1;return Kc.heapHasOpenSlots(e.length)}function Mft(e,t,n,i){let r=e._innerContentResources[t].clone(),o=e.tile,s=function(){return o._priority},a=e._serverKeys[t],c=new wo({throttle:!0,throttleByServer:!0,type:Zs.TILES3D,priorityFunction:s,serverKey:a});r.request=c,e._requests[t]=c;let u=r.fetchArrayBuffer();if(l(u))return u.then(function(f){if(!(n<e._cancelCount)){if(r.request.cancelled||r.request.state===Ti.CANCELLED){sTe(e,i);return}return IQ(e,-1),f}}).catch(function(f){if(!(n<e._cancelCount)){if(r.request.cancelled||r.request.state===Ti.CANCELLED){sTe(e,i);return}IQ(e,-1),aTe(e,t,f)}})}async function Nft(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((o,s)=>Lft(e,o,s)),r=await Promise.all(i);if(e._contentsCreated=!0,e._contents=r.filter(l),e._externalTilesetCount===e._contents.length){let o=e._tile;o.hasRenderableContent=!1}return r}async function Lft(e,t,n){if(l(t))try{let i=m_(t),r=e._tileset,o=e._innerContentResources[n],s=e._tile;i.contentType===Ca.EXTERNAL_TILESET&&(e._externalTilesetCount++,s.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===Ca.GEOMETRY||i.contentType===Ca.VECTOR;let a,c=BT[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(r,s,o,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(r,s,o,i.jsonPayload));let u=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let d=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=d.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=kT(r,u));let f=UT(r,u);return l(f)&&(a.group=new Wx({metadata:f})),a}catch(i){aTe(e,n,i)}}function aTe(e,t,n){let i=e._tileset,r=e._innerContentResources[t].url,o=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:r,message:o}):(console.log(`A content failed to load: ${r}`),console.log(`Error: ${o}`))}var T2=wQ;var cTe=Math.cos,lTe=Math.sin,Fft=Math.sqrt,PQ={};PQ.computePosition=function(e,t,n,i,r,o,s){let a=t.radiiSquared,c=e.nwCorner,u=e.boundingRectangle,f=c.latitude-e.granYCos*i+r*e.granXSin,d=cTe(f),p=lTe(f),g=a.z*p,m=c.longitude+i*e.granYSin+r*e.granXCos,y=d*cTe(m),A=d*lTe(m),b=a.x*y,x=a.y*A,T=Fft(b*y+x*A+g*p);if(o.x=b/T,o.y=x/T,o.z=g/T,n){let E=e.stNwCorner;l(E)?(f=E.latitude-e.stGranYCos*i+r*e.stGranXSin,m=E.longitude+i*e.stGranYSin+r*e.stGranXCos,s.x=(m-e.stWest)*e.lonScalar,s.y=(f-e.stSouth)*e.latScalar):(s.x=(m-u.west)*e.lonScalar,s.y=(f-u.south)*e.latScalar)}};var Bft=new Xi,eh=new h,kft=new he,eG=new h,E2=new Ui;function uTe(e,t,n,i,r,o,s){let a=Math.cos(t),c=i*a,u=n*a,f=Math.sin(t),d=i*f,p=n*f;E2._ellipsoid=ee.default,eh=E2.project(e,eh),eh=h.subtract(eh,eG,eh);let g=Xi.fromRotation(t,Bft);eh=Xi.multiplyByVector(g,eh,eh),eh=h.add(eh,eG,eh),e=E2.unproject(eh,e),o-=1,s-=1;let m=e.latitude,y=m+o*p,A=m-c*s,b=m-c*s+o*p,x=Math.max(m,y,A,b),T=Math.min(m,y,A,b),E=e.longitude,v=E+o*u,S=E+s*d,I=E+s*d+o*u,R=Math.max(E,v,S,I),O=Math.min(E,v,S,I);return{north:x,south:T,east:R,west:O,granYCos:c,granYSin:d,granXCos:u,granXSin:p,nwCorner:e}}PQ.computeOptions=function(e,t,n,i,r,o,s){let a=e.east,c=e.west,u=e.north,f=e.south,d=!1,p=!1;u===D.PI_OVER_TWO&&(d=!0),f===-D.PI_OVER_TWO&&(p=!0);let g,m=u-f;c>a?g=D.TWO_PI-c+a:g=a-c;let y=Math.ceil(g/t)+1,A=Math.ceil(m/t)+1,b=g/(y-1),x=m/(A-1),T=ie.northwest(e,o),E=ie.center(e,kft);(n!==0||i!==0)&&(E.longitude<T.longitude&&(E.longitude+=D.TWO_PI),E2._ellipsoid=ee.default,eG=E2.project(E,eG));let v=x,S=b,I=0,R=0,O=ie.clone(e,r),L={granYCos:v,granYSin:I,granXCos:S,granXSin:R,nwCorner:T,boundingRectangle:O,width:y,height:A,northCap:d,southCap:p};if(n!==0){let _=uTe(T,n,b,x,E,y,A);u=_.north,f=_.south,a=_.east,c=_.west,L.granYCos=_.granYCos,L.granYSin=_.granYSin,L.granXCos=_.granXCos,L.granXSin=_.granXSin,O.north=u,O.south=f,O.east=a,O.west=c}if(i!==0){n=n-i;let _=ie.northwest(O,s),C=uTe(_,n,b,x,E,y,A);L.stGranYCos=C.granYCos,L.stGranXCos=C.granXCos,L.stGranYSin=C.granYSin,L.stGranXSin=C.granXSin,L.stNwCorner=_,L.stWest=C.west,L.stSouth=C.south}return L};var Sa=PQ;var Uft=new ue,zft=new ue,Vft=new h,jft=new ie;function fTe(e,t){let n=e._ellipsoid,i=t.height,r=t.width,o=t.northCap,s=t.southCap,a=i,c=2,u=0,f=4;o&&(c-=1,a-=1,u+=1,f-=2),s&&(c-=1,a-=1,u+=1,f-=2),u+=c*r+2*a-f;let d=new Float64Array(u*3),p=0,g=0,m,y=Vft;if(o)Sa.computePosition(t,n,!1,g,0,y),d[p++]=y.x,d[p++]=y.y,d[p++]=y.z;else for(m=0;m<r;m++)Sa.computePosition(t,n,!1,g,m,y),d[p++]=y.x,d[p++]=y.y,d[p++]=y.z;for(m=r-1,g=1;g<i;g++)Sa.computePosition(t,n,!1,g,m,y),d[p++]=y.x,d[p++]=y.y,d[p++]=y.z;if(g=i-1,!s)for(m=r-2;m>=0;m--)Sa.computePosition(t,n,!1,g,m,y),d[p++]=y.x,d[p++]=y.y,d[p++]=y.z;for(m=0,g=i-2;g>0;g--)Sa.computePosition(t,n,!1,g,m,y),d[p++]=y.x,d[p++]=y.y,d[p++]=y.z;let A=d.length/3*2,b=je.createTypedArray(d.length/3,A),x=0;for(let E=0;E<d.length/3-1;E++)b[x++]=E,b[x++]=E+1;b[x++]=d.length/3-1,b[x]=0;let T=new St({attributes:new Tn,primitiveType:Oe.LINES});return T.attributes.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d}),T.indices=b,T}function Hft(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,r=e._ellipsoid,o=fTe(e,t),s=t.height,a=t.width,c=fi.scaleToGeodeticHeight(o.attributes.position.values,n,r,!1),u=c.length,f=new Float64Array(u*2);f.set(c);let d=fi.scaleToGeodeticHeight(o.attributes.position.values,i,r);f.set(d,u),o.attributes.position.values=f;let p=t.northCap,g=t.southCap,m=4;p&&(m-=1),g&&(m-=1);let y=(f.length/3+m)*2,A=je.createTypedArray(f.length/3,y);u=f.length/6;let b=0;for(let T=0;T<u-1;T++)A[b++]=T,A[b++]=T+1,A[b++]=T+u,A[b++]=T+u+1;A[b++]=u-1,A[b++]=0,A[b++]=u+u-1,A[b++]=u,A[b++]=0,A[b++]=u;let x;if(p)x=s-1;else{let T=a-1;A[b++]=T,A[b++]=T+u,x=a+s-2}if(A[b++]=x,A[b++]=x+u,!g){let T=a+x-1;A[b++]=T,A[b]=T+u}return o.indices=A,o}function ow(e){e=e??H.EMPTY_OBJECT;let t=e.rectangle,n=e.granularity??D.RADIANS_PER_DEGREE,i=e.ellipsoid??ee.default,r=e.rotation??0,o=e.height??0,s=e.extrudedHeight??o;this._rectangle=ie.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(o,s),this._rotation=r,this._extrudedHeight=Math.min(o,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}ow.packedLength=ie.packedLength+ee.packedLength+5;ow.pack=function(e,t,n){return n=n??0,ie.pack(e._rectangle,t,n),n+=ie.packedLength,ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=e._offsetAttribute??-1,t};var dTe=new ie,hTe=ee.clone(ee.UNIT_SPHERE),rw={rectangle:dTe,ellipsoid:hTe,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};ow.unpack=function(e,t,n){t=t??0;let i=ie.unpack(e,t,dTe);t+=ie.packedLength;let r=ee.unpack(e,t,hTe);t+=ee.packedLength;let o=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t];return l(n)?(n._rectangle=ie.clone(i,n._rectangle),n._ellipsoid=ee.clone(r,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=u===-1?void 0:u,n):(rw.granularity=o,rw.height=s,rw.rotation=a,rw.extrudedHeight=c,rw.offsetAttribute=u===-1?void 0:u,new ow(rw))};var Gft=new he;ow.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=Sa.computeOptions(t,e._granularity,e._rotation,0,jft,Gft),r,o;if(D.equalsEpsilon(t.north,t.south,D.EPSILON10)||D.equalsEpsilon(t.east,t.west,D.EPSILON10))return;let s=e._surfaceHeight,a=e._extrudedHeight,c=!D.equalsEpsilon(s,a,0,D.EPSILON2),u;if(c){if(r=Hft(e,i),l(e._offsetAttribute)){let p=r.attributes.position.values.length/3,g=new Uint8Array(p);e._offsetAttribute===mn.TOP?g=g.fill(1,0,p/2):(u=e._offsetAttribute===mn.NONE?0:1,g=g.fill(u)),r.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let f=ue.fromRectangle3D(t,n,s,zft),d=ue.fromRectangle3D(t,n,a,Uft);o=ue.union(f,d)}else{if(r=fTe(e,i),r.attributes.position.values=fi.scaleToGeodeticHeight(r.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let f=r.attributes.position.values.length;u=e._offsetAttribute===mn.NONE?0:1;let d=new Uint8Array(f/3).fill(u);r.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}o=ue.fromRectangle3D(t,n,s)}return new St({attributes:r.attributes,indices:r.indices,primitiveType:Oe.LINES,boundingSphere:o,offsetAttribute:e._offsetAttribute})};var zT=ow;function aw(e){this.rectangle=ie.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new h,this.northeastCornerCartesian=new h,this.westNormal=new h,this.southNormal=new h,this.eastNormal=new h,this.northNormal=new h;let t=e.ellipsoid??ee.WGS84;Kft(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(aw.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});aw.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=Qt.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=ue.fromOrientedBoundingBox(this._orientedBoundingBox)};var mTe=new h,tG=new h,pTe=new h,Wft=new h,qft=new h,Yft=new h,Xft=new h,th=new he,gTe=new sn(h.UNIT_X,0),sw=new pn;function Kft(e,t,n){n.cartographicToCartesian(ie.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(ie.northeast(t),e.northeastCornerCartesian),th.longitude=t.west,th.latitude=(t.south+t.north)*.5,th.height=0;let i=n.cartographicToCartesian(th,Yft),r=h.cross(i,h.UNIT_Z,Wft);h.normalize(r,e.westNormal),th.longitude=t.east;let o=n.cartographicToCartesian(th,Xft),s=h.cross(h.UNIT_Z,o,mTe);h.normalize(s,e.eastNormal);let a=h.subtract(i,o,mTe);h.magnitude(a)===0&&(a=h.clone(r,a));let c=h.normalize(a,qft),u=t.south,f;if(u>0){th.longitude=(t.west+t.east)*.5,th.latitude=u;let y=n.cartographicToCartesian(th,sw.origin);h.clone(c,sw.direction);let A=sn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,gTe);_i.rayPlane(sw,A,e.southwestCornerCartesian),f=n.geodeticSurfaceNormal(y,tG)}else f=n.geodeticSurfaceNormalCartographic(ie.southeast(t),tG);let d=h.cross(f,a,pTe);h.normalize(d,e.southNormal);let p=t.north,g;if(p<0){th.longitude=(t.west+t.east)*.5,th.latitude=p;let y=n.cartographicToCartesian(th,sw.origin);h.negate(c,sw.direction);let A=sn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,gTe);_i.rayPlane(sw,A,e.northeastCornerCartesian),g=n.geodeticSurfaceNormal(y,tG)}else g=n.geodeticSurfaceNormalCartographic(ie.northwest(t),tG);let m=h.cross(a,g,pTe);h.normalize(m,e.northNormal)}var $ft=new h,Jft=new h,Zft=new h(0,-1,0),Qft=new h(0,0,-1),_Te=new h;function edt(e,t){let n=t.camera,i=n.positionWC,r=n.positionCartographic,o=0;if(!ie.contains(e.rectangle,r)){let u=e.southwestCornerCartesian,f=e.northeastCornerCartesian,d=e.westNormal,p=e.southNormal,g=e.eastNormal,m=e.northNormal;t.mode!==re.SCENE3D&&(u=t.mapProjection.project(ie.southwest(e.rectangle),$ft),u.z=u.y,u.y=u.x,u.x=0,f=t.mapProjection.project(ie.northeast(e.rectangle),Jft),f.z=f.y,f.y=f.x,f.x=0,d=Zft,g=h.UNIT_Y,p=Qft,m=h.UNIT_Z);let y=h.subtract(i,u,_Te),A=h.dot(y,d),b=h.dot(y,p),x=h.subtract(i,f,_Te),T=h.dot(x,g),E=h.dot(x,m);A>0?o+=A*A:T>0&&(o+=T*T),b>0?o+=b*b:E>0&&(o+=E*E)}let s,a,c;if(t.mode===re.SCENE3D?(s=r.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let u=s-c;o+=u*u}else if(s<a){let u=a-s;o+=u*u}return Math.sqrt(o)}aw.prototype.distanceToCamera=function(e){let t=edt(this,e);if(e.mode===re.SCENE3D&&l(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};aw.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};aw.prototype.createDebugVolume=function(e){let t=N.clone(N.IDENTITY),n=new zT({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new Ft({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}});return new On({geometryInstances:i,appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})};var qf=aw;var C2={},tdt=new h,yTe=new h,ATe=new h,bTe=new h,xTe=new Qt;C2.validOutline=function(e){let n=Qt.fromPoints(e,xTe).halfAxes,i=$.getColumn(n,0,yTe),r=$.getColumn(n,1,ATe),o=$.getColumn(n,2,bTe),s=h.magnitude(i),a=h.magnitude(r),c=h.magnitude(o);return!(s===0&&(a===0||c===0)||a===0&&c===0)};C2.computeProjectTo2DArguments=function(e,t,n,i){let r=Qt.fromPoints(e,xTe),o=r.halfAxes,s=$.getColumn(o,0,yTe),a=$.getColumn(o,1,ATe),c=$.getColumn(o,2,bTe),u=h.magnitude(s),f=h.magnitude(a),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let g,m;return(p===f||p===d)&&(g=s),p===u?g=a:p===d&&(m=a),(p===u||p===f)&&(m=c),h.normalize(g,n),h.normalize(m,i),h.clone(r.center,t),!0};function TTe(e,t,n,i,r){let o=h.subtract(e,t,tdt),s=h.dot(n,o),a=h.dot(i,o);return U.fromElements(s,a,r)}C2.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let r=new Array(i.length);for(let o=0;o<i.length;o++)r[o]=TTe(i[o],e,t,n);return r}};C2.createProjectPointTo2DFunction=function(e,t,n){return function(i,r){return TTe(i,e,t,n,r)}};var p_=C2;function ndt(e){let t=e.length,n=new Float64Array(t*3),i=je.createTypedArray(t,t*2),r=0,o=0;for(let a=0;a<t;a++){let c=e[a];n[r++]=c.x,n[r++]=c.y,n[r++]=c.z,i[o++]=a,i[o++]=(a+1)%t}let s=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:n})});return new St({attributes:s,indices:i,primitiveType:Oe.LINES})}function VT(e){e=e??H.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=ni.computeHierarchyPackedLength(t,h)+1}VT.fromPositions=function(e){e=e??H.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new VT(t)};VT.pack=function(e,t,n){return n=n??0,n=ni.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var idt={polygonHierarchy:{}};VT.unpack=function(e,t,n){t=t??0;let i=ni.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let r=e[t];return l(n)||(n=new VT(idt)),n._polygonHierarchy=i,n.packedLength=r,n};VT.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Fr(n,h.equalsEpsilon,!0),n.length<3||!p_.validOutline(n))return;let r=ni.polygonOutlinesFromHierarchy(t,!1);if(r.length===0)return;let o=[];for(let c=0;c<r.length;c++){let u=new Ft({geometry:ndt(r[c])});o.push(u)}let s=Gn.combineInstances(o)[0],a=ue.fromPoints(t.positions);return new St({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var nh=VT;var nG=new he;function v2(e){let t=Pg.fromToken(e.token),n=e.minimumHeight??0,i=e.maximumHeight??0,r=e.ellipsoid??ee.WGS84;this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=r;let o=ddt(t,n,i,r);this._boundingPlanes=o;let s=gdt(o);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=BQ(o[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=h.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=BQ(o[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=BQ(o[2+a],[s[a%4],s[(a+1)%4],s[4+(a+1)%4],s[4+a]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],a=0;a<4;a++)this._planeVertices.push([this._vertices[a%4],this._vertices[(a+1)%4],this._vertices[4+(a+1)%4],this._vertices[4+a]]);let c=t.getCenter();nG=r.cartesianToCartographic(c,nG),nG.height=(i+n)/2,this.center=r.cartographicToCartesian(nG,c),this._boundingSphere=ue.fromPoints(s)}var rdt=new h,odt=new he,sdt=new h,adt=new he,cdt=new h,ldt=new h,udt=new h,fdt=new h;function ddt(e,t,n,i){let r=new Array(6),o=e.getCenter(),s=i.geodeticSurfaceNormal(o,rdt),a=i.cartesianToCartographic(o,odt);a.height=n;let c=i.cartographicToCartesian(a,sdt),u=sn.fromPointNormal(c,s);r[0]=u;let f=0,d,p=[],g,m;for(d=0;d<4;d++){g=e.getVertex(d),p[d]=g,m=i.cartesianToCartographic(g,adt),m.height=t;let A=sn.getPointDistance(u,i.cartographicToCartesian(m,cdt));A<f&&(f=A)}let y=sn.clone(u);for(y.normal=h.negate(y.normal,y.normal),y.distance=y.distance*-1+f,r[1]=y,d=0;d<4;d++){g=p[d];let A=p[(d+1)%4],b=i.geodeticSurfaceNormal(g,ldt),x=h.subtract(A,g,fdt),T=h.cross(x,b,udt);T=h.normalize(T,T),r[2+d]=sn.fromPointNormal(g,T)}return r}var jT=new h,HT=new h,GT=new h,DQ=new h,RQ=new h,OQ=new h,hdt=new h,mdt=new h,pdt=new h,MQ=new h,NQ=new h,LQ=new h,LA=new h,i0=new $;function ETe(e,t,n){jT=e.normal,HT=t.normal,GT=n.normal,DQ=h.multiplyByScalar(e.normal,-e.distance,DQ),RQ=h.multiplyByScalar(t.normal,-t.distance,RQ),OQ=h.multiplyByScalar(n.normal,-n.distance,OQ),MQ=h.multiplyByScalar(h.cross(HT,GT,hdt),h.dot(DQ,jT),MQ),NQ=h.multiplyByScalar(h.cross(GT,jT,mdt),h.dot(RQ,HT),NQ),LQ=h.multiplyByScalar(h.cross(jT,HT,pdt),h.dot(OQ,GT),LQ),i0[0]=jT.x,i0[1]=HT.x,i0[2]=GT.x,i0[3]=jT.y,i0[4]=HT.y,i0[5]=GT.y,i0[6]=jT.z,i0[7]=HT.z,i0[8]=GT.z;let i=$.determinant(i0);return LA=h.add(MQ,NQ,LA),LA=h.add(LA,LQ,LA),new h(LA.x/i,LA.y/i,LA.z/i)}function gdt(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=ETe(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=ETe(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var FQ=new h,cw=new h;function BQ(e,t){let n=[];for(let i=0;i<4;i++)FQ=h.subtract(t[(i+1)%4],t[i],FQ),cw=h.cross(e.normal,FQ,cw),cw=h.normalize(cw,cw),n[i]=h.clone(cw);return n}Object.defineProperties(v2.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var kQ=new h;v2.prototype.distanceToCamera=function(e){let t=e.camera.positionWC,n=[],i=[],r;sn.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),r=this._edgeNormals[0]):sn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),r=this._edgeNormals[1]);let o,s;for(o=0;o<4;o++)s=2+o,sn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),r=this._edgeNormals[s]);if(n.length===0)return 0;let a,c;if(n.length===1)return c=this._boundingPlanes[n[0]],a=UQ(sn.projectPointOntoPlane(c,t,kQ),i[0],c,r),h.distance(a,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=CTe(t,p[0],p[1]),h.distance(a,t)}let f=Number.MAX_VALUE,d;for(o=0;o<2;o++)c=this._boundingPlanes[n[o]],a=UQ(sn.projectPointOntoPlane(c,t,kQ),i[o],c,this._edgeNormals[n[o]]),d=h.distanceSquared(a,t),d<f&&(f=d);return Math.sqrt(f)}else if(n.length>3)return a=UQ(sn.projectPointOntoPlane(this._boundingPlanes[1],t,kQ),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),h.distance(a,t);let u=n[1]===2&&n[2]===5?0:1;return n[0]===0?h.distance(t,this._vertices[(n[1]-2+u)%4]):h.distance(t,this._vertices[4+(n[1]-2+u)%4])};var _dt=new h,ydt=new h;function CTe(e,t,n){let i=h.subtract(n,t,_dt),r=h.subtract(e,t,ydt),o=h.dot(i,r);if(o<=0)return t;let s=h.dot(i,i);return o>=s?n:(o=o/s,new h((1-o)*t.x+o*n.x,(1-o)*t.y+o*n.y,(1-o)*t.z+o*n.z))}var Adt=new sn(h.UNIT_X,0);function UQ(e,t,n,i){let r=Number.MAX_VALUE,o,s,a;for(let c=0;c<t.length;c++){let u=sn.fromPointNormal(t[c],i[c],Adt);sn.getPointDistance(u,e)<0||(a=CTe(e,t[c],t[(c+1)%4]),o=h.distance(e,a),o<r&&(r=o,s=a))}return l(s)?s:e}v2.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)h.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?$t.INSIDE:n===this._vertices.length?$t.OUTSIDE:$t.INTERSECTING};v2.prototype.createDebugVolume=function(e){let t=N.clone(N.IDENTITY),n=new nh({polygonHierarchy:{positions:this._planeVertices[0]}}),i=nh.createGeometry(n),r=new Ft({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}}),o=new nh({polygonHierarchy:{positions:this._planeVertices[1]}}),s=nh.createGeometry(o),a=new Ft({geometry:s,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}}),c=[];for(let u=0;u<4;u++){let f=new nh({polygonHierarchy:{positions:this._planeVertices[2+u]}}),d=nh.createGeometry(f);c[u]=new Ft({geometry:d,id:"outline",modelMatrix:t,attributes:{color:Jt.fromColor(e)}})}return new On({geometryInstances:[c[0],c[1],c[2],c[3],a,r],appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})};var S2=v2;var bdt=new h(1,1,1),iG=Math.cos,rG=Math.sin;function lw(e){e=e??H.EMPTY_OBJECT;let t=e.radii??bdt,n=e.innerRadii??t,i=e.minimumClock??0,r=e.maximumClock??D.TWO_PI,o=e.minimumCone??0,s=e.maximumCone??D.PI,a=Math.round(e.stackPartitions??10),c=Math.round(e.slicePartitions??8),u=Math.round(e.subdivisions??128);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=r,this._minimumCone=o,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}lw.packedLength=2*h.packedLength+8;lw.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=e._offsetAttribute??-1,t};var vTe=new h,STe=new h,g_={radii:vTe,innerRadii:STe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};lw.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,vTe);t+=h.packedLength;let r=h.unpack(e,t,STe);t+=h.packedLength;let o=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(r,n._innerRadii),n._minimumClock=o,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(g_.minimumClock=o,g_.maximumClock=s,g_.minimumCone=a,g_.maximumCone=c,g_.stackPartitions=u,g_.slicePartitions=f,g_.subdivisions=d,g_.offsetAttribute=p===-1?void 0:p,new lw(g_))};lw.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,r=e._maximumClock,o=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=ee.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(r-i)/D.TWO_PI),f=Math.round(f*Math.abs(s-o)/D.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,g=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,y=!1;g&&(p=2,o>0&&(m=!0,d+=u),s<Math.PI&&(y=!0,d+=u));let A=a*p*(f+u),b=new Float64Array(A*3),x=2*(A+d-(u+f)*p),T=je.createTypedArray(A,x),E,v,S,I,R=0,O=new Array(f),L=new Array(f);for(E=0;E<f;E++)I=o+E*(s-o)/(f-1),O[E]=rG(I),L[E]=iG(I);let _=new Array(a),C=new Array(a);for(E=0;E<a;E++)S=i+E*(r-i)/(a-1),_[E]=rG(S),C[E]=iG(S);for(E=0;E<f;E++)for(v=0;v<a;v++)b[R++]=t.x*O[E]*C[v],b[R++]=t.y*O[E]*_[v],b[R++]=t.z*L[E];if(g)for(E=0;E<f;E++)for(v=0;v<a;v++)b[R++]=n.x*O[E]*C[v],b[R++]=n.y*O[E]*_[v],b[R++]=n.z*L[E];for(O.length=a,L.length=a,E=0;E<a;E++)I=o+E*(s-o)/(a-1),O[E]=rG(I),L[E]=iG(I);for(_.length=u,C.length=u,E=0;E<u;E++)S=i+E*(r-i)/(u-1),_[E]=rG(S),C[E]=iG(S);for(E=0;E<a;E++)for(v=0;v<u;v++)b[R++]=t.x*O[E]*C[v],b[R++]=t.y*O[E]*_[v],b[R++]=t.z*L[E];if(g)for(E=0;E<a;E++)for(v=0;v<u;v++)b[R++]=n.x*O[E]*C[v],b[R++]=n.y*O[E]*_[v],b[R++]=n.z*L[E];for(R=0,E=0;E<f*p;E++){let M=E*a;for(v=0;v<a-1;v++)T[R++]=M+v,T[R++]=M+v+1}let w=f*a*p;for(E=0;E<u;E++)for(v=0;v<a-1;v++)T[R++]=w+E+v*u,T[R++]=w+E+(v+1)*u;if(g)for(w=f*a*p+u*a,E=0;E<u;E++)for(v=0;v<a-1;v++)T[R++]=w+E+v*u,T[R++]=w+E+(v+1)*u;if(g){let M=f*a*p,F=M+a*u;if(m)for(E=0;E<u;E++)T[R++]=M+E,T[R++]=F+E;if(y)for(M+=a*u-u,F+=a*u-u,E=0;E<u;E++)T[R++]=M+E,T[R++]=F+E}let P=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:b})});if(l(e._offsetAttribute)){let M=b.length,F=e._offsetAttribute===mn.NONE?0:1,V=new Uint8Array(M/3).fill(F);P.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return new St({attributes:P,indices:T,primitiveType:Oe.LINES,boundingSphere:ue.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var Yf=lw;function uw(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new Yf(i),this._workerName="createSphereOutlineGeometry"}uw.packedLength=Yf.packedLength;uw.pack=function(e,t,n){return Yf.pack(e._ellipsoidGeometry,t,n)};var xdt=new Yf,WT={radius:void 0,radii:new h,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};uw.unpack=function(e,t,n){let i=Yf.unpack(e,t,xdt);return WT.stackPartitions=i._stackPartitions,WT.slicePartitions=i._slicePartitions,WT.subdivisions=i._subdivisions,l(n)?(h.clone(i._radii,WT.radii),n._ellipsoidGeometry=new Yf(WT),n):(WT.radius=i._radii.x,new uw(WT))};uw.createGeometry=function(e){return Yf.createGeometry(e._ellipsoidGeometry)};var __=uw;function fw(e,t){t===0&&(t=D.EPSILON7),this._boundingSphere=new ue(e,t)}Object.defineProperties(fw.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}});fw.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,h.distance(t.center,e.camera.positionWC)-t.radius)};fw.prototype.intersectPlane=function(e){return ue.intersectPlane(this._boundingSphere,e)};fw.prototype.update=function(e,t){h.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};fw.prototype.createDebugVolume=function(e){let t=new __({radius:this.radius}),n=N.fromTranslation(this.center,N.clone(N.IDENTITY)),i=new Ft({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Jt.fromColor(e)}});return new On({geometryInstances:i,appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})};var y_=fw;var Tdt=new h,Edt=new h,Cdt=new h,vdt=new h;function qT(e,t,n){n=h.cross(e,t,n);let i=h.magnitude(n);return h.multiplyByScalar(n,D.EPSILON7/i,n)}function zQ(e,t){let n=h.normalize(e,vdt),i=h.equalsEpsilon(n,h.UNIT_X,D.EPSILON6)?h.UNIT_Y:h.UNIT_X;return qT(e,i,t)}function wTe(e){let t=$.getColumn(e,0,Tdt),n=$.getColumn(e,1,Edt),i=$.getColumn(e,2,Cdt),r=h.equals(t,h.ZERO),o=h.equals(n,h.ZERO),s=h.equals(i,h.ZERO);return!r&&!o&&!s?e:r&&o&&s?(e[0]=D.EPSILON7,e[4]=D.EPSILON7,e[8]=D.EPSILON7,e):(r&&!o&&!s?t=qT(n,i,t):!r&&o&&!s?n=qT(t,i,n):!r&&!o&&s?i=qT(n,t,i):r?o?s||(t=zQ(i,t),n=qT(i,t,n)):(t=zQ(n,t),i=qT(n,t,i)):(n=zQ(t,n),i=qT(n,t,i)),$.setColumn(e,0,t,e),$.setColumn(e,1,n,e),$.setColumn(e,2,i,e),e)}function dw(e,t){t=wTe(t),this._orientedBoundingBox=new Qt(e,t),this._boundingSphere=ue.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(dw.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});dw.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};dw.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};dw.prototype.update=function(e,t){h.clone(e,this._orientedBoundingBox.center),t=wTe(t),$.clone(t,this._orientedBoundingBox.halfAxes),ue.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};dw.prototype.createDebugVolume=function(e){let t=new Hh({minimum:new h(-1,-1,-1),maximum:new h(1,1,1)}),n=N.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new Ft({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Jt.fromColor(e)}});return new On({geometryInstances:i,appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})};var $u=dw;function co(e,t,n,i){this._tileset=e,this._header=n;let r=l(n.contents),o=r&&n.contents.length>1||tr(n,"3DTILES_multiple_contents"),s=r&&!o?n.contents[0]:n.content;this._contentHeader=s,this.transform=l(n.transform)?N.unpack(n.transform):N.clone(N.IDENTITY);let a=l(i)?i.computedTransform:e.modelMatrix,c=N.multiply(a,this.transform,new N),u=l(i)?i._initialTransform:N.IDENTITY;this._initialTransform=N.multiply(u,this.transform,new N),this.computedTransform=c,this.metadata=x2(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let f;l(s)&&l(s.boundingVolume)&&(f=this.createBoundingVolume(s.boundingVolume,c)),this._contentBoundingVolume=f,this._contentBoundingVolume2D=void 0;let d;l(n.viewerRequestVolume)&&(d=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=d,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,co._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale();let p;l(n.refine)?((n.refine==="replace"||n.refine==="add")&&co._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?yo.REPLACE:yo.ADD):l(i)?p=i.refine:p=yo.REPLACE,this.refine=p,this.children=[],this.parent=i;let g,m=!1,y,A,b;if(o)y=Rr.UNLOADED,A=De.createIfNeeded(t).clone();else if(l(s)){let v=s.uri;l(s.url)&&(co._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),v=s.url),v===""?(co._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),g=new n0(e,this),m=!0,y=Rr.READY):(y=Rr.UNLOADED,b=v)}else g=new n0(e,this),m=!0,y=Rr.READY;this._content=g,this._contentResourceValue=A,this._contentBaseResource=l(b)?t:void 0,this._contentUri=b,this._contentState=y,this._expiredContent=void 0,this._serverKeyValue=void 0,this.hasEmptyContent=m,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasRenderableContent=!m,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=o,this.cacheNode=void 0;let x=n.expire,T,E;l(x)&&(T=x.duration,l(x.date)&&(E=K.fromIso8601(x.date))),this.expireDuration=T,this.expireDate=E,this.lastStyleTime=0,this._optimChildrenWithinParent=Qd.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.clippingPolygonsNeedRebake=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._wasSelectedLastFrame=!1,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._isClippedByPolygon=!1,this._clippingPlanesState=0,this._clippingPolygonsState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=z.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new K,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}co._deprecationWarning=qr;function ITe(e){let t=De.createIfNeeded(e._contentBaseResource).getDerivedResource({url:e._contentUri});e._contentResourceValue=t,e._serverKeyValue=Kc.getServerKey(t.getUrlComponent()),e._contentBaseResource=void 0,e._contentUri=void 0}Object.defineProperties(co.prototype,{_contentResource:{get:function(){return l(this._contentUri)&&ITe(this),this._contentResourceValue},set:function(e){this._contentResourceValue=e,this._contentBaseResource=void 0,this._contentUri=void 0}},_serverKey:{get:function(){return l(this._contentUri)&&ITe(this),this._serverKeyValue},set:function(e){this._serverKeyValue=e}},tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return this._contentBoundingVolume??this._boundingVolume}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},isVisible:{get:function(){return this._visible&&this._inRequestVolume}},extras:{get:function(){return this._header.extras}},color:{get:function(){return l(this._color)||(this._color=new z),z.clone(this._color)},set:function(e){this._color=z.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&this.hasRenderableContent||l(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===Rr.READY}},contentUnloaded:{get:function(){return this._contentState===Rr.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===Rr.EXPIRED}},contentFailed:{get:function(){return this._contentState===Rr.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var FA=new h;function Sdt(e,t){let{tileset:n,boundingSphere:i}=e,{radius:r,center:o}=i,{camera:s}=t,a=h.multiplyByScalar(s.directionWC,e._centerZDepth,FA),c=h.add(s.positionWC,a,FA),u=h.subtract(c,o,FA);if(h.magnitude(u)>r){let E=h.normalize(u,FA),v=h.multiplyByScalar(E,r,FA),S=h.add(o,v,FA),I=h.subtract(S,s.positionWC,FA),R=h.normalize(I,FA);e._foveatedFactor=1-Math.abs(h.dot(s.directionWC,R))}else e._foveatedFactor=0;let p=e.refine===yo.REPLACE,g=n.isSkippingLevelOfDetail;if(p&&!g||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&g||n._pass===ao.PRELOAD_FLIGHT||n._pass===ao.PRELOAD)return!1;let m=1-Math.cos(s.frustum.fov*.5),y=n.foveatedConeSize*m;if(e._foveatedFactor<=y)return!1;let A=m-y,b=D.clamp((e._foveatedFactor-y)/A,0,1),x=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,b),T=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-x<=T}var NTe=new K;co.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,r=n??1,o=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?o:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,u=a.frustum,f=c.drawingBufferWidth,d=c.drawingBufferHeight*r,p;if(e.mode===re.SCENE2D||u instanceof gn){let g=u.offCenterFrustum;l(g)&&(u=g);let m=Math.max(u.top-u.bottom,u.right-u.left)/Math.max(f,d);p=s/m}else{let g=Math.max(this._distanceToCamera,D.EPSILON7),m=u.sseDenominator;if(p=s*d/(g*m),i.dynamicScreenSpaceError){let y=i._dynamicScreenSpaceErrorComputedDensity,A=i.dynamicScreenSpaceErrorFactor,b=D.fog(g,y)*A;p-=b}}return p/=e.pixelRatio,p};function wdt(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let r=t.parent,o=t._screenSpaceErrorProgressiveResolution<=n,s=l(r)&&r._screenSpaceErrorProgressiveResolution>n;return o&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function Idt(e,t){let n=t.parent,r=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-r}co.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,r=l(t)?t._visibilityPlaneMask:ta.MASK_INDETERMINATE;this.updateTransform(i,e),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,n.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==ta.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Idt(n,this),this._priorityProgressiveResolution=wdt(n,this),this.priorityDeferred=Sdt(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};co.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=K.now(NTe);K.lessThan(this.expireDate,e)&&(this._contentState=Rr.EXPIRED,this._expiredContent=this._content)}};function Pdt(e){if(!l(e.expireDuration))return;let t=K.now(NTe);K.addSeconds(t,e.expireDuration,t),l(e.expireDate)?K.lessThan(e.expireDate,t)&&K.clone(t,e.expireDate):e.expireDate=K.clone(t)}function Ddt(e){return function(){return e._priority}}co.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?Rdt(this):Mdt(this)};function Rdt(e){let t=e._content,n=e._tileset;if(!l(t)){let r=tr(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new T2(n,e,e._contentResource.clone(),r),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=Rr.LOADING,i.then(r=>{if(!e.isDestroyed()&&l(r))return e._contentState=Rr.PROCESSING,t}).catch(r=>{if(!e.isDestroyed())throw e._contentState=Rr.FAILED,r})}async function Odt(e,t,n,i,r){let o=e._contentState;e._contentState=Rr.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await r}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===Ti.CANCELLED){e._contentState=o,++t.statistics.numberOfAttemptedRequests;return}if(LTe(e,a))return i&&(e.expireDate=void 0),e._content=new n0(t,e),PTe(e),e._contentState=Rr.PROCESSING,e._content;throw e._contentState=Rr.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===Ti.CANCELLED){e._contentState=o,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await Ndt(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,a instanceof n0&&PTe(e),e._contentState=Rr.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=Rr.FAILED,a}}function Mdt(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new wo({throttle:!0,throttleByServer:!0,type:Zs.TILES3D,priorityFunction:Ddt(e),serverKey:e._serverKey});e._request=i,t.request=i;let r=e._tileset,o=t.fetchArrayBuffer();if(!l(o)){++r.statistics.numberOfAttemptedRequests;return}return Odt(e,r,i,n,o)}function LTe(e,t){let i=e._tileset?._runtimeContentCodec?.missingTilePolicy;return!l(i)||!l(t.statusCode)?!1:i.statusCodes.includes(t.statusCode)}function PTe(e){e.hasEmptyContent=!0,e.hasRenderableContent=!1}co._isEmptyTile=LTe;async function Ndt(e,t){let n=e._tileset,i=n?._runtimeContentCodec;if(l(i)&&typeof i.createContent=="function"){let u=await Promise.resolve(i.createContent(n,e,e._contentResource,t));return e.isDestroyed()?void 0:u}let r=m_(t);n._disableSkipLevelOfDetail=n._disableSkipLevelOfDetail||r.contentType===Ca.GEOMETRY||r.contentType===Ca.VECTOR,(r.contentType===Ca.IMPLICIT_SUBTREE||r.contentType===Ca.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),r.contentType===Ca.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let o,s=BT[r.contentType];if(e.isDestroyed())return;l(r.binaryPayload)?o=await Promise.resolve(s(n,e,e._contentResource,r.binaryPayload.buffer,0)):o=await Promise.resolve(s(n,e,e._contentResource,r.jsonPayload));let a=e._contentHeader;if(e.hasImplicitContentMetadata){let u=e.implicitSubtree,f=e.implicitCoordinates;o.metadata=u.getContentMetadataView(f,0)}else e.hasImplicitContent||(o.metadata=kT(n,a));let c=UT(n,a);return l(c)&&(o.group=new Wx({metadata:c})),o}co.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};co.prototype.unloadTilesetContent=function(){this.hasTilesetContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Rr.UNLOADED,this._expiredContent=void 0,this.expireDate=void 0,this.hasTilesetContent=!1,this.hasRenderableContent=!0,this._selectedFrame=0,this.lastStyleTime=0)};co.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=Rr.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,this.clippingPolygonsNeedRebake=!1,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var FTe=new ue;function jQ(e,t){if(t.mode!==re.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=ue.projectTo2D(n,t.mapProjection,FTe);e._boundingVolume2D=new y_(i.center,i.radius)}return t.mode!==re.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Ldt(e,t){if(t.mode!==re.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=ue.projectTo2D(n,t.mapProjection,FTe);e._contentBoundingVolume2D=new y_(i.center,i.radius)}return t.mode!==re.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}co.prototype.visibility=function(e,t){let n=e.cullingVolume,i=jQ(this,e),r=this._tileset,o=r.clippingPlanes;if(l(o)&&o.enabled){let a=o.computeIntersectionWithBoundingVolume(i,r.clippingPlanesOriginMatrix);if(this._isClipped=a!==$t.INSIDE,a===$t.OUTSIDE)return ta.MASK_OUTSIDE}let s=r.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==$t.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};co.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return $t.INSIDE;if(this._visibilityPlaneMask===ta.MASK_INSIDE)return $t.INSIDE;let t=e.cullingVolume,n=Ldt(this,e),i=this._tileset,r=i.clippingPlanes;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==$t.INSIDE,s===$t.OUTSIDE)return $t.OUTSIDE}let o=i.clippingPolygons;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==$t.OUTSIDE,s===$t.INSIDE)return $t.OUTSIDE}return t.computeVisibility(n)};co.prototype.distanceToTile=function(e){return jQ(this,e).distanceToCamera(e)};var Fdt=new h;co.prototype.distanceToTileCenter=function(e){let n=jQ(this,e).boundingVolume,i=h.subtract(n.center,e.camera.positionWC,Fdt);return h.dot(e.camera.directionWC,i)};co.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var BTe=new $,kTe=new h,Bdt=new $,HQ=new h,UTe=new ie,zTe=new Qt,VQ=new N;function kdt(e,t,n){let i=h.fromElements(e[0],e[1],e[2],HQ),r=$.fromArray(e,3,Bdt);i=N.multiplyByPoint(t,i,i);let o=N.getMatrix3(t,BTe);return r=$.multiply(o,r,r),l(n)?(n.update(i,r),n):new $u(i,r)}function DTe(e,t,n,i){let r=ie.unpack(e,0,UTe),o=e[4],s=e[5],a=Qt.fromRectangle(r,o,s,ee.WGS84,zTe),c=a.center,u=a.halfAxes;t=N.multiplyTransformation(t,N.inverseTransformation(n,VQ),VQ),c=N.multiplyByPoint(t,c,c);let f=N.getMatrix3(t,BTe);return u=$.multiply(f,u,u),l(i)&&i instanceof $u?(i.update(c,u),i):new $u(c,u)}function Udt(e,t,n,i){if(!N.equalsEpsilon(t,n,D.EPSILON8))return i instanceof $u?DTe(e,t,n,i):DTe(e,t,n,void 0);let r=ie.unpack(e,0,UTe);return i instanceof qf?(i.rectangle=ie.clone(r,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ee.WGS84),i):new qf({rectangle:r,minimumHeight:e[4],maximumHeight:e[5]})}function zdt(e,t,n){let i=h.fromElements(e[0],e[1],e[2],HQ),r=e[3];i=N.multiplyByPoint(t,i,i);let o=N.getScale(t,kTe),s=h.maximumComponent(o);return r*=s,l(n)?(n.update(i,r),n):new y_(i,r)}co.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,r;if(l(i)&&(r=lA.parseBoundingVolumeSemantic("TILE",i)),l(r)&&(e=r),!l(e))throw new oe("boundingVolume must be defined");if(tr(e,"3DTILES_bounding_volume_S2"))return new S2(e.extensions["3DTILES_bounding_volume_S2"]);let{box:o,region:s,sphere:a}=e;if(l(o)){let c=kdt(o,t,n);return this._verticalExaggeration!==1&&RTe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=Udt(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof $u?RTe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=Ar.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=Ar.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ee.WGS84))),c}if(l(a)){let c=zdt(a,t,n);if(this._verticalExaggeration!==1){let u=Ar.getPosition(c.center,ee.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,HQ),f=c.radius*this._verticalExaggeration;c.update(u,f)}return c}throw new oe("boundingVolume must contain a sphere, region, or box")};var Vdt=h.unpackArray(new Array(24).fill(0));function RTe(e,t,n){let i=e.boundingVolume.computeCorners(Vdt).map(o=>Ar.getPosition(o,ee.WGS84,t,n,o)),r=Qt.fromPoints(i,zTe);e.update(r.center,r.halfAxes)}co.prototype.updateTransform=function(e,t){e=e??N.IDENTITY;let n=N.multiplyTransformation(e,this.transform,VQ),i=!N.equals(n,this.computedTransform),r=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!r)return;i&&N.clone(n,this.computedTransform),r&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let o=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(o.boundingVolume,this.computedTransform,this._boundingVolume),l(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(s.boundingVolume,this.computedTransform,this._contentBoundingVolume)),l(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(o.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()};co.prototype.updateGeometricErrorScale=function(){let e=N.getScale(this.computedTransform,kTe),t=h.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function jdt(e,t,n,i){if(!i.isRender)return;let r=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),o=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!r;if(o){let c;e._finalResolution?e.hasRenderableContent?c=z.WHITE:c=z.DARKGRAY:c=z.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=Jt.toValue(c,u.color)}else!o&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&r?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(z.BLUE)),e._debugContentBoundingVolume.update(n)):!t.debugShowContentBoundingVolume&&l(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&l(e._viewerRequestVolume)?(l(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(z.YELLOW)),e._debugViewerRequestVolume.update(n)):!t.debugShowViewerRequestVolume&&l(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());let s=t.debugColorizeTiles&&!e._debugColorizeTiles||l(t._heatmap.tilePropertyName),a=!t.debugColorizeTiles&&e._debugColorizeTiles;s?(t._heatmap.colorize(e,n),e._debugColorizeTiles=!0,e.color=e._debugColor):a&&(e._debugColorizeTiles=!1,e.color=z.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function Hdt(e,t,n){let i=e._expiredContent;if(!e.hasMultipleContents&&l(i)){if(!e.contentReady){try{i.update(t,n)}catch{}return}e._expiredContent.destroy(),e._expiredContent=void 0}if(l(e.content))try{e.content.update(t,n)}catch(r){throw e._contentState=Rr.FAILED,r}}function Gdt(e,t){let n=t.clippingPlanes,i=0;l(n)&&e._isClipped&&n.enabled&&(i=n.clippingPlanesState),i!==e._clippingPlanesState&&(e._clippingPlanesState=i,e.clippingPlanesDirty=!0)}function Wdt(e,t){let n=t.clippingPolygons,i=0;l(n)&&e._isClippedByPolygon&&n.enabled&&(i=n.clippingPolygonsState),i!==e._clippingPolygonsState&&(e._clippingPolygonsState=i,e.clippingPolygonsDirty=!0)}co.prototype.update=function(e,t,n){let{commandList:i}=t,r=i.length;Gdt(this,e),Wdt(this,e),jdt(this,e,t,n),Hdt(this,e,t);let o=i.length;this._commandsLength=o-r;for(let s=r;s<o;++s){let a=i[s],c=a.pass===Ie.TRANSLUCENT;a.depthForTranslucentClassification=c}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1,this.clippingPolygonsNeedRebake=!1};var OTe=[];co.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(Pdt(this),this._selectedFrame=0,this.lastStyleTime=0,K.now(this._loadTimestamp),this._contentState=Rr.READY,!this.hasTilesetContent&&!this.hasImplicitContent&&(e._statistics.incrementLoadCounts(this.content),++e._statistics.numberOfTilesWithContentReady,++e._statistics.numberOfLoadedTilesTotal,e._cache.add(this)));let n=t.commandList;t.commandList=OTe;try{this._content.update(e,t)}catch(i){throw this._contentState=Rr.FAILED,i}OTe.length=0,t.commandList=n};function MTe(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function oG(e,t,n){return Math.max(D.normalize(e,t,n)-D.EPSILON7,0)}co.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,r=4,o=1,s=0,a=r,c=s+a,u=r,f=c+u,d=o,p=Math.pow(10,f),g=f+d,m=o,y=Math.pow(10,g),A=g+m,b=Math.pow(10,A),x=oG(this._depth,n.depth,i.depth);x=t?1-x:x;let E=!e.isSkippingLevelOfDetail&&this.refine===yo.REPLACE?oG(this._priorityHolder._distanceToCamera,n.distance,i.distance):oG(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),v=MTe(E,a,s),S=this._priorityProgressiveResolution?0:p,I=oG(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),R=MTe(I,u,c),O=this.priorityDeferred?y:0,L=e._pass===ao.PRELOAD_FLIGHT?0:b;this._priority=x+v+S+R+O+L};co.prototype.isDestroyed=function(){return!1};co.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),le(this)};var ih=co;function A_(e){e=e??H.EMPTY_OBJECT;let t=e.id,n=e.group,i=e.class,r=l(n.properties)?n.properties:{};this._class=i,this._properties=r,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(A_.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});A_.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};A_.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};A_.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};A_.prototype.getProperty=function(e){return Yn.getProperty(e,this._properties,this._class)};A_.prototype.setProperty=function(e,t){return Yn.setProperty(e,t,this._properties,this._class)};A_.prototype.getPropertyBySemantic=function(e){return Yn.getPropertyBySemantic(e,this._properties,this._class)};A_.prototype.setPropertyBySemantic=function(e,t){return Yn.setPropertyBySemantic(e,t,this._properties,this._class)};var hw=A_;function b_(e){e=e??H.EMPTY_OBJECT;let t=e.tileset,n=e.class,i=l(t.properties)?t.properties:{};this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(b_.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});b_.prototype.hasProperty=function(e){return Yn.hasProperty(e,this._properties,this._class)};b_.prototype.hasPropertyBySemantic=function(e){return Yn.hasPropertyBySemantic(e,this._properties,this._class)};b_.prototype.getPropertyIds=function(e){return Yn.getPropertyIds(this._properties,this._class,e)};b_.prototype.getProperty=function(e){return Yn.getProperty(e,this._properties,this._class)};b_.prototype.setProperty=function(e,t){return Yn.setProperty(e,t,this._properties,this._class)};b_.prototype.getPropertyBySemantic=function(e){return Yn.getPropertyBySemantic(e,this._properties,this._class)};b_.prototype.setPropertyBySemantic=function(e,t){return Yn.setPropertyBySemantic(e,t,this._properties,this._class)};var w2=b_;function VTe(e){e=e??H.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,r;l(i)&&(r=new w2({tileset:i,class:n.classes[i.class]}));let o=[],s=[],a=t.groups;if(Array.isArray(a)){let c=a.length;for(let u=0;u<c;u++){let f=a[u];s.push(new hw({group:f,class:n.classes[f.class]}))}}else if(l(a)){o=Object.keys(a).sort();let c=o.length;for(let u=0;u<c;u++){let f=o[u];if(a.hasOwnProperty(f)){let d=a[f];s.push(new hw({id:f,group:a[f],class:n.classes[d.class]}))}}}this._schema=n,this._groups=s,this._groupIds=o,this._tileset=r,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(VTe.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},groupIds:{get:function(){return this._groupIds}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var YT=VTe;var jTe={},qdt=new h;jTe.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof $u||i instanceof qf){let r=i._orientedBoundingBox;e._optimChildrenWithinParent=Qd.USE_OPTIMIZATION;for(let o=0;o<n;++o){let a=t[o].boundingVolume;if(!(a instanceof $u||a instanceof qf)){e._optimChildrenWithinParent=Qd.SKIP_OPTIMIZATION;break}let c=a._orientedBoundingBox,u=h.subtract(c.center,r.center,qdt),f=h.magnitude(u);h.divideByScalar(u,f,u);let d=Math.abs(r.halfAxes[0]*u.x)+Math.abs(r.halfAxes[1]*u.y)+Math.abs(r.halfAxes[2]*u.z)+Math.abs(r.halfAxes[3]*u.x)+Math.abs(r.halfAxes[4]*u.y)+Math.abs(r.halfAxes[5]*u.z)+Math.abs(r.halfAxes[6]*u.x)+Math.abs(r.halfAxes[7]*u.y)+Math.abs(r.halfAxes[8]*u.z),p=Math.abs(c.halfAxes[0]*u.x)+Math.abs(c.halfAxes[1]*u.y)+Math.abs(c.halfAxes[2]*u.z)+Math.abs(c.halfAxes[3]*u.x)+Math.abs(c.halfAxes[4]*u.y)+Math.abs(c.halfAxes[5]*u.z)+Math.abs(c.halfAxes[6]*u.x)+Math.abs(c.halfAxes[7]*u.y)+Math.abs(c.halfAxes[8]*u.z);if(d<=p+f){e._optimChildrenWithinParent=Qd.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Qd.USE_OPTIMIZATION};var I2=jTe;function P2(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(P2.prototype,{length:{get:function(){return this._length}}});function Ydt(e,t,n){this.item=e,this.previous=t,this.next=n}P2.prototype.add=function(e){let t=new Ydt(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function HTe(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}P2.prototype.remove=function(e){l(e)&&(HTe(this,e),--this._length)};P2.prototype.splice=function(e,t){if(e===t)return;HTe(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var D2=P2;function BA(){this._list=new D2,this._sentinel=this._list.add(),this._trimTiles=!1}BA.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};BA.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};BA.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};BA.prototype.forEachLoadedTile=function(e){for(let t=this._list.head;l(t);t=t.next)l(t.item)&&e(t.item)};BA.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};BA.prototype.unloadTiles=function(e,t){let n=this._trimTiles;this._trimTiles=!1;let i=this._list,r=this._sentinel,o=i.head;for(;o!==r&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){let s=o.item;o=o.next,this.unloadTile(e,s,t)}};BA.prototype.trim=function(){this._trimTiles=!0};var R2=BA;function sG(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function WQ(e,t){let n;return t==="_loadTimestamp"?n=K.toDate(e).getTime():n=e,n}sG.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=WQ(e,n),this._referenceMaximum[n]=WQ(t,n)};function Xdt(e,t){let n=e.tilePropertyName;if(l(n)){let i=WQ(t[n],n);return l(i)?(e._maximum=Math.max(i,e._maximum),e._minimum=Math.min(i,e._minimum),i):(e.tilePropertyName=void 0,i)}}var GQ=[new z(.1,.1,.1,1),new z(.153,.278,.878,1),new z(.827,.231,.49,1),new z(.827,.188,.22,1),new z(1,.592,.259,1),new z(1,.843,0,1)];sG.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=Xdt(this,e),r=this._previousMinimum,o=this._previousMaximum;if(r===Number.MAX_VALUE||o===-Number.MAX_VALUE)return;let s=o-r+D.EPSILON7,c=D.clamp(i-r,0,s)/s,u=GQ.length-1,f=c*u,d=Math.floor(f),p=Math.ceil(f),g=f-d,m=GQ[d],y=GQ[p],A=z.clone(z.WHITE);A.red=D.lerp(m.red,y.red,g),A.green=D.lerp(m.green,y.green,g),A.blue=D.lerp(m.blue,y.blue,g),e._debugColor=A};sG.prototype.resetMinimumMaximum=function(){let e=this.tilePropertyName;if(l(e)){let t=this._referenceMinimum[e],n=this._referenceMaximum[e],i=l(t)&&l(n);this._previousMinimum=i?t:this._minimum,this._previousMaximum=i?n:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}};var O2=sG;function mw(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.texturesReferenceCounterById={},this.batchTableByteLength=0}mw.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};mw.prototype.incrementSelectionCounts=function(e){this.numberOfFeaturesSelected+=e.featuresLength,this.numberOfPointsSelected+=e.pointsLength,this.numberOfTrianglesSelected+=e.trianglesLength;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementSelectionCounts(t[i])}};mw.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof Hf))this.texturesByteLength+=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let r=this.texturesReferenceCounterById[i]??0;if(r===0){let o=e.getTextureByteLengthById(i);this.texturesByteLength+=o}this.texturesReferenceCounterById[i]=r+1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementLoadCounts(t[i])}};mw.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof Hf))this.texturesByteLength-=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let r=this.texturesReferenceCounterById[i];if(r===1){delete this.texturesReferenceCounterById[i];let o=e.getTextureByteLengthById(i);this.texturesByteLength-=o}else this.texturesReferenceCounterById[i]=r-1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.decrementLoadCounts(t[i])}};mw.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.batchTableByteLength=e.batchTableByteLength};var Im=mw;function M2(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(M2.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});M2.prototype.makeDirty=function(){this._styleDirty=!0};M2.prototype.resetDirty=function(){this._styleDirty=!1};M2.prototype.applyStyle=function(e){if(!l(e.root)||l(this._style)&&!this._style._ready)return;let t=this._styleDirty;t&&++this._lastStyleTime;let n=this._lastStyleTime,i=e._statistics,r=t?e._selectedTiles:e._selectedTilesToStyle,o=r.length;for(let s=0;s<o;++s){let a=r[s];if(a.lastStyleTime!==n){let c=a.content;a.lastStyleTime=n,c.applyStyle(this._style),i.numberOfFeaturesStyled+=c.featuresLength,++i.numberOfTilesStyled}}};var N2=M2;function GTe(e,t,n){this.context=e,this.commandList=[],this.panoramaCommandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=re.SCENE3D,this.morphTime=re.getMorphTime(re.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=n,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,pickVoxel:!1,snap:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,renderable:!1,density:void 0,visualDensityScalar:void 0,sse:void 0,minimumBrightness:void 0},this.atmosphere=void 0,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.splitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0,this.pickingMetadata=!1,this.pickedMetadataInfo=void 0,this.edgeVisibilityRequested=!1,this.planarFillRequested=!1}GTe.maximumFrameNumber=15e6;var kA=GTe;function Kdt(e,t,n){let i=tr(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;let r=t.boundingVolume;if(!l(r.box)&&!l(r.region)&&!tr(r,"3DTILES_bounding_volume_S2")&&!tr(r,"3DTILES_bounding_volume_cylinder"))throw new oe("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=r,this.refine=t.refine,this.subtreeUriTemplate=new De({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];let o=$dt(t);for(let s=0;s<o.length;s++){let a=o[s];this.contentHeaders.push(Je(a,!0));let c=new De({url:a.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=Jdt(t),this.subdivisionScheme=Gs[i.subdivisionScheme],this.branchingFactor=Gs.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,l(i.availableLevels)?this.availableLevels=i.availableLevels:this.availableLevels=i.maximumLevel+1}function $dt(e){if(tr(e,"3DTILES_multiple_contents")){let t=e.extensions["3DTILES_multiple_contents"];return l(t.contents)?t.contents:t.content}return l(e.contents)?e.contents:l(e.content)?[e.content]:[]}function Jdt(e){let t=Je(e,!0);return l(t.extensions)&&(delete t.extensions["3DTILES_implicit_tiling"],delete t.extensions["3DTILES_multiple_contents"],Object.keys(t.extensions).length===0&&delete t.extensions),delete t.implicitTiling,delete t.contents,delete t.content,t}var r0=Kdt;var L2={};function WTe(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function qQ(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function qTe(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function YQ(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}L2.encode2D=function(e,t){return(WTe(e)|WTe(t)<<1)>>>0};L2.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=qTe(e),t[1]=qTe(e>>1),t};L2.encode3D=function(e,t,n){return qQ(e)|qQ(t)<<1|qQ(n)<<2};L2.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=YQ(e),t[1]=YQ(e>>1),t[2]=YQ(e>>2),t};var UA=L2;function To(e){this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===Gs.OCTREE&&(this.z=e.z)}Object.defineProperties(To.prototype,{childIndex:{get:function(){let e=0;return e|=this.x&1,e|=(this.y&1)<<1,this.subdivisionScheme===Gs.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Gs.OCTREE?UA.encode3D(this.x,this.y,this.z):UA.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===Gs.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3,t=this.mortonIndex;return e+t}}});To.prototype.getDescendantCoordinates=function(e){let t=this.level+e.level,n=(this.x<<e.level)+e.x,i=(this.y<<e.level)+e.y;if(this.subdivisionScheme===Gs.OCTREE){let r=(this.z<<e.level)+e.z;return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:r})}return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};To.prototype.getAncestorCoordinates=function(e){let t=1<<e,n=this.level-e,i=Math.floor(this.x/t),r=Math.floor(this.y/t);if(this.subdivisionScheme===Gs.OCTREE){let o=Math.floor(this.z/t);return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:r,z:o})}return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:r})};To.prototype.getOffsetCoordinates=function(e){let t=e.level-this.level,n=1<<t,i=e.x%n,r=e.y%n;if(this.subdivisionScheme===Gs.OCTREE){let o=e.z%n;return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:r,z:o})}return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:r})};To.prototype.getChildCoordinates=function(e){let t=this.level+1,n=2*this.x+e%2,i=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===Gs.OCTREE){let r=2*this.z+Math.floor(e/4)%2;return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:r})}return new To({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};To.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};To.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};To.prototype.isAncestor=function(e){let t=e.level-this.level;if(t<=0)return!1;let n=e.x>>t,i=e.y>>t,r=this.x===n,o=this.y===i;if(this.subdivisionScheme===Gs.OCTREE){let s=e.z>>t,a=this.z===s;return r&&o&&a}return r&&o};To.prototype.isEqual=function(e){return this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme===Gs.OCTREE?this.z===e.z:!0)};To.prototype.isImplicitTilesetRoot=function(){return this.level===0};To.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};To.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};To.prototype.getTemplateValues=function(){let e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===Gs.OCTREE&&(e.z=this.z),e};var YTe=[0,0,0];To.fromMortonIndex=function(e,t,n,i){let r;return e===Gs.OCTREE?(r=UA.decode3D(i,YTe),new To({subdivisionScheme:e,subtreeLevels:t,level:n,x:r[0],y:r[1],z:r[2]})):(r=UA.decode2D(i,YTe),new To({subdivisionScheme:e,subtreeLevels:t,level:n,x:r[0],y:r[1]}))};To.fromTileIndex=function(e,t,n){let i,r,o;return e===Gs.OCTREE?(i=Math.floor(D.log2(7*n+1)/3),r=((1<<3*i)-1)/7,o=n-r):(i=Math.floor(D.log2(3*n+1)/2),r=((1<<2*i)-1)/3,o=n-r),To.fromMortonIndex(e,t,i,o)};var o0=To;function x_(){}x_.selectTiles=function(e,t){pe.throwInstantiationError()};x_.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};x_.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};x_.selectTile=function(e,t){if(e.contentVisibility(t)===$t.OUTSIDE)return;e._wasSelectedLastFrame=!0;let{content:n,tileset:i}=e;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,e.lastStyleTime=0,i._selectedTilesToStyle.push(e)):e._selectedFrame<t.frameNumber-1&&(i._selectedTilesToStyle.push(e),e._wasSelectedLastFrame=!1),e._selectedFrame=t.frameNumber,i._selectedTiles.push(e)};x_.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};x_.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};x_.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!Zdt(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function Zdt(e,t){let{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;let{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:r}=t.camera,o=i!==0?i:r,s=Math.max(e.boundingSphere.radius*2,1);return n.cullRequestsWhileMovingMultiplier*o/s<1}x_.updateTile=function(e,t){XTe(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,tht(e),e._shouldSelect=!1,e._finalResolution=!0};function XTe(e,t){if(e.updateVisibility(t),!e.isVisible)return;let n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let o=e.children[0];XTe(o,t),e._visible=o._visible;return}if(Qdt(e,t)){e._visible=!1;return}let i=e.refine===yo.REPLACE,r=e._optimChildrenWithinParent===Qd.USE_OPTIMIZATION;if(i&&r&&n&&!eht(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function Qdt(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==yo.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function eht(e,t){let n=!1,i=e.children;for(let r=0;r<i.length;++r){let o=i[r];o.updateVisibility(t),n=n||o.isVisible}return n}function tht(e){let t=e.tileset._minimumPriority,n=e.tileset._maximumPriority,i=e._priorityHolder;n.distance=Math.max(i._distanceToCamera,n.distance),t.distance=Math.min(i._distanceToCamera,t.distance),n.depth=Math.max(e._depth,n.depth),t.depth=Math.min(e._depth,t.depth),n.foveatedFactor=Math.max(i._foveatedFactor,n.foveatedFactor),t.foveatedFactor=Math.min(i._foveatedFactor,t.foveatedFactor),n.reverseScreenSpaceError=Math.max(e._priorityReverseScreenSpaceError,n.reverseScreenSpaceError),t.reverseScreenSpaceError=Math.min(e._priorityReverseScreenSpaceError,t.reverseScreenSpaceError)}var qa=x_;function KTe(){}var F2={stack:new Xl,stackMaximumLength:0};KTe.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e.hasMixedContent=!1;let n=!0,i=e.root;if(i.updateVisibility(t),!i.isVisible)return n;let{touchTile:r,visitTile:o}=qa,s=F2.stack;for(s.push(i);s.length>0;){F2.stackMaximumLength=Math.max(F2.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===yo.ADD,u=a.refine===yo.REPLACE,f=nht(a);f&&iht(a,s,t),(c||u&&!f)&&(rht(e,a),r(a,t),oht(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),o(a,t)}return F2.stack.trim(F2.stackMaximumLength),n};function nht(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function iht(e,t,n){let{children:i}=e;for(let r=0;r<i.length;++r){let o=i[r];o.updateVisibility(n),o.isVisible&&t.push(o)}}function rht(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function oht(e,t){e.contentAvailable&&e.contentVisibility(t)!==$t.OUTSIDE&&e.tileset._selectedTiles.push(e)}var B2=KTe;function $Te(){}var k2={stack:new Xl,stackMaximumLength:0},U2={stack:new Xl,stackMaximumLength:0};$Te.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(qa.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;aht(n,t),k2.stack.trim(k2.stackMaximumLength),U2.stack.trim(U2.stackMaximumLength);let i=e._requestedTiles;for(let r=0;r<i.length;++r)i[r].updatePriority()};function XQ(e,t){e.contentAvailable&&qa.selectTile(e,t)}function sht(e,t,n){let i=e.refine===yo.REPLACE,{tileset:r,children:o}=e,{updateTile:s,loadTile:a,touchTile:c}=qa;for(let m=0;m<o.length;++m)s(o[m],n);o.sort(qa.sortChildrenByDistanceToCamera);let u=i&&e.hasRenderableContent,f=!0,d=!1,p=-1,g=Number.MAX_VALUE;for(let m=0;m<o.length;++m){let y=o[m];if(y.isVisible?(t.push(y),y._foveatedFactor<g&&(p=m,g=y._foveatedFactor),d=!0):(u||r.loadSiblings)&&(y._foveatedFactor<g&&(p=m,g=y._foveatedFactor),a(y,n),c(y,n)),u){let A;y._inRequestVolume?y.hasRenderableContent?A=y.contentAvailable:A=cht(y,n):A=!1,f=f&&A}}if(d||(f=!1),p!==-1&&i){let m=o[p];m._wasMinPriorityChild=!0;let y=(e._wasMinPriorityChild||e===r.root)&&g<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;y._foveatedFactor=Math.min(m._foveatedFactor,y._foveatedFactor),y._distanceToCamera=Math.min(m._distanceToCamera,y._distanceToCamera);for(let A=0;A<o.length;++A)o[A]._priorityHolder=y}return f}function aht(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:r,visitTile:o,touchTile:s}=qa,a=k2.stack;for(a.push(e);a.length>0;){k2.stackMaximumLength=Math.max(k2.stackMaximumLength,a.length);let c=a.pop(),u=c.parent,f=!l(u)||u._refines;c._refines=i(c)?sht(c,a,t)&&f:!1;let d=!c._refines&&f;c.hasRenderableContent?c.refine===yo.ADD?(XQ(c,t),r(c,t)):c.refine===yo.REPLACE&&(r(c,t),d&&XQ(c,t)):(n._emptyTiles.push(c),r(c,t),d&&XQ(c,t)),o(c,t),s(c,t)}}function cht(e,t){let{canTraverse:n,updateTile:i,loadTile:r,touchTile:o}=qa,s=e.tileset.hasExtension("3DTILES_content_gltf_vector"),a=!0,c=U2.stack;for(c.push(e);c.length>0;){U2.stackMaximumLength=Math.max(U2.stackMaximumLength,c.length);let u=c.pop(),f=u.children,d=f.length,p=!u.hasRenderableContent&&n(u);if((s?u.hasRenderableContent:!p)&&!u.contentAvailable&&(a=!1),i(u,t),u.isVisible||(r(u,t),o(u,t)),p)for(let m=0;m<d;++m){let y=f[m];c.push(y)}}return e.hasEmptyContent||a}var z2=$Te;function JTe(){}var V2={stack:new Xl,stackMaximumLength:0},j2={stack:new Xl,stackMaximumLength:0},T_={stack:new Xl,stackMaximumLength:0,ancestorStack:new Xl,ancestorStackMaximumLength:0},lht=2;JTe.selectTiles=function(e,t){if(e._requestedTiles.length=0,e.debugFreezeFrame)return;e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e.hasMixedContent=!1;let n=e.root;if(qa.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;pht(n,t),ght(n,t),V2.stack.trim(V2.stackMaximumLength),j2.stack.trim(j2.stackMaximumLength),T_.stack.trim(T_.stackMaximumLength),T_.ancestorStack.trim(T_.ancestorStackMaximumLength);let i=e._requestedTiles;for(let r=0;r<i.length;++r)i[r].updatePriority()};function uht(e,t){let{updateTile:n,touchTile:i,selectTile:r}=qa,o=j2.stack;for(o.push(e);o.length>0;){j2.stackMaximumLength=Math.max(j2.stackMaximumLength,o.length);let a=o.pop().children;for(let c=0;c<a.length;++c){let u=a[c];u.isVisible&&(u.contentAvailable?(n(u,t),i(u,t),r(u,t)):u._depth-e._depth<lht&&o.push(u))}}}function aG(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:uht(e,t)}function fht(e,t){e._ancestorWithContent=void 0,e._ancestorWithContentAvailable=void 0;let{parent:n}=e;if(!l(n))return;let i=!n.hasUnloadedRenderableContent||n._requestedFrame===t.frameNumber;e._ancestorWithContent=i?n:n._ancestorWithContent,e._ancestorWithContentAvailable=n.contentAvailable?n:n._ancestorWithContentAvailable}function dht(e,t){let n=t._ancestorWithContent;return!e.immediatelyLoadDesiredLevelOfDetail&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf||l(n)&&t._screenSpaceError<n._screenSpaceError/e.skipScreenSpaceErrorFactor&&t._depth>n._depth+e.skipLevels)}function hht(e,t,n){let{tileset:i,children:r}=e,{updateTile:o,loadTile:s,touchTile:a}=qa;for(let u=0;u<r.length;++u)o(r[u],n);r.sort(qa.sortChildrenByDistanceToCamera);let c=!1;for(let u=0;u<r.length;++u){let f=r[u];f.isVisible?(t.push(f),c=!0):i.loadSiblings&&(s(f,n),a(f,n))}return c}function mht(e,t){let{tileset:n}=e;return n.immediatelyLoadDesiredLevelOfDetail?!1:l(e._ancestorWithContent)?e._screenSpaceError===0?e.parent._screenSpaceError>t:e._screenSpaceError>t:!0}function pht(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:r,loadTile:o,visitTile:s,touchTile:a}=qa,c=V2.stack;for(c.push(e);c.length>0;){V2.stackMaximumLength=Math.max(V2.stackMaximumLength,c.length);let u=c.pop();fht(u,t);let f=u.parent,d=!l(f)||f._refines;u._refines=r(u)?hht(u,c,t)&&d:!1;let p=!u._refines&&d;u.hasRenderableContent?u.refine===yo.ADD?(aG(u,t),o(u,t)):u.refine===yo.REPLACE&&(mht(u,i)?(o(u,t),p&&aG(u,t)):p?(aG(u,t),o(u,t)):dht(n,u)&&o(u,t)):(n._emptyTiles.push(u),o(u,t),p&&aG(u,t)),s(u,t),a(u,t)}}function ght(e,t){let{selectTile:n,canTraverse:i}=qa,{stack:r,ancestorStack:o}=T_,s;for(r.push(e);r.length>0||o.length>0;){if(T_.stackMaximumLength=Math.max(T_.stackMaximumLength,r.length),T_.ancestorStackMaximumLength=Math.max(T_.ancestorStackMaximumLength,o.length),o.length>0){let u=o.peek();if(u._stackLength===r.length){o.pop(),u!==s&&(u._finalResolution=!1),n(u,t);continue}}let a=r.pop();if(!l(a))continue;let c=i(a);if(a._shouldSelect)if(a.refine===yo.ADD)n(a,t);else{if(a._selectionDepth=o.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!c){n(a,t);continue}o.push(a),a._stackLength=r.length}if(c){let u=a.children;for(let f=0;f<u.length;++f){let d=u[f];d.isVisible&&r.push(d)}}}}var H2=JTe;function wa(){this._layers=[],this.layerAdded=new be,this.layerRemoved=new be,this.layerMoved=new be,this.layerShownOrHidden=new be}Object.defineProperties(wa.prototype,{length:{get:function(){return this._layers.length}}});wa.prototype.add=function(e,t){l(t)?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t);let i=e.readyEvent.addEventListener(()=>{this.layerShownOrHidden.raiseEvent(e,e._layerIndex,e.show),i()})};wa.prototype.addImageryProvider=function(e,t){let n=new Ss(e);return this.add(n,t),n};wa.prototype.remove=function(e,t){t=t??!0;let n=this._layers.indexOf(e);return n!==-1?(this._layers.splice(n,1),this._update(),this.layerRemoved.raiseEvent(e,n),t&&e.destroy(),!0):!1};wa.prototype.removeAll=function(e){e=e??!0;let t=this._layers;for(let n=0,i=t.length;n<i;n++){let r=t[n];this.layerRemoved.raiseEvent(r,n),e&&r.destroy()}this._layers=[]};wa.prototype.contains=function(e){return this.indexOf(e)!==-1};wa.prototype.indexOf=function(e){return this._layers.indexOf(e)};wa.prototype.get=function(e){return this._layers[e]};function cG(e,t){return e.indexOf(t)}function ZTe(e,t,n){let i=e._layers;if(t=D.clamp(t,0,i.length-1),n=D.clamp(n,0,i.length-1),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e._update(),e.layerMoved.raiseEvent(r,n,t)}wa.prototype.raise=function(e){let t=cG(this._layers,e);ZTe(this,t,t+1)};wa.prototype.lower=function(e){let t=cG(this._layers,e);ZTe(this,t,t-1)};wa.prototype.raiseToTop=function(e){let t=cG(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))};wa.prototype.lowerToBottom=function(e){let t=cG(this._layers,e);t!==0&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var QTe=new ie;function eEe(e,t,n,i){let r=e.globe._surface._tilesToRender,o;for(let a=0;!l(o)&&a<r.length;++a){let c=r[a];ie.contains(c.rectangle,t)&&(o=c)}if(!l(o))return;let s=o.data.imagery;for(let a=s.length-1;a>=0;--a){let c=s[a],u=c.readyImagery;if(!l(u)||!u.imageryLayer.ready)continue;let f=u.imageryLayer.imageryProvider;if(n&&!l(f.pickFeatures)||!ie.contains(u.rectangle,t))continue;let d=QTe,p=1/1024;d.west=D.lerp(o.rectangle.west,o.rectangle.east,c.textureCoordinateRectangle.x-p),d.east=D.lerp(o.rectangle.west,o.rectangle.east,c.textureCoordinateRectangle.z+p),d.south=D.lerp(o.rectangle.south,o.rectangle.north,c.textureCoordinateRectangle.y-p),d.north=D.lerp(o.rectangle.south,o.rectangle.north,c.textureCoordinateRectangle.w+p),ie.contains(d,t)&&i(u)}}wa.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),r=[];if(eEe(t,i,!1,function(o){r.push(o.imageryLayer)}),r.length!==0)return r};var _ht=new ie,yht=new ie,KQ=new U,$Q=new U,Aht=new he,bht=new he;function xht(e,t,n,i){let r=n.imageryProvider.tilingScheme,o=r.rectangleToNativeRectangle(e,_ht),s=1/1024,a=yht;a.west=D.lerp(o.west,o.east,t.minX-s),a.east=D.lerp(o.west,o.east,t.maxX+s),a.south=D.lerp(o.south,o.north,t.minY-s),a.north=D.lerp(o.south,o.north,t.maxY+s),l(i)||(i=new ie);let c=r.projection;if(c instanceof Ui)return i.west=D.toRadians(a.west),i.south=D.toRadians(a.south),i.east=D.toRadians(a.east),i.north=D.toRadians(a.north),i;KQ.x=a.west,KQ.y=a.south,$Q.x=a.east,$Q.y=a.north;let u=c.unproject(KQ,Aht),f=c.unproject($Q,bht);return i.west=u.longitude,i.south=u.latitude,i.east=f.longitude,i.north=f.latitude,i}function Tht(e,t,n){let i=e._modelImagery;if(!l(i))return;let r=i._modelPrimitiveImageries;if(l(r))for(let o=0;o<r.length;o++){let s=r[o],a=s._coveragesPerLayer;if(l(a))for(let c=a.length-1;c>=0;--c){let u=a[c];for(let f=0;f<u.length;f++){let d=u[f],p=d.imagery,g=p.imageryLayer,m=g.imageryProvider;if(!l(m.pickFeatures)||!l(p)||p.state!==Vn.READY||!ie.contains(p.rectangle,t))continue;let A=s.mappedPositionsForImageryLayer(g).cartographicBoundingRectangle,b=xht(A,d.textureCoordinateRectangle,g,QTe);ie.contains(b,t)&&n(p)}}}}wa.prototype.pickImageryLayerFeatures=function(e,t){let n;l(t.globe)&&(n=t.globe.pick(e,t));let i;if(!l(n)){let c=t.pickFromRay(e);if(!l(c)||(n=c.position,!l(n)))return;l(c.object)&&l(c.object.detail)&&(i=c.object.detail.model)}let r=t.ellipsoid.cartesianToCartographic(n),o=[],s=[];function a(c){if(!c.imageryLayer.ready)return;let f=c.imageryLayer.imageryProvider.pickFeatures(c.x,c.y,c.level,r.longitude,r.latitude);l(f)&&(o.push(f),s.push(c.imageryLayer))}if(l(t.globe)&&eEe(t,r,!0,function(c){a(c)}),l(i)&&Tht(i,r,function(c){a(c)}),o.length!==0)return Promise.all(o).then(function(c){let u=[];for(let f=0;f<c.length;++f){let d=c[f],p=s[f];if(l(d)&&d.length>0)for(let g=0;g<d.length;++g){let m=d[g];m.imageryLayer=p,l(m.position)||(m.position=r),u.push(m)}}return u})};wa.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};wa.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};wa.prototype.isDestroyed=function(){return!1};wa.prototype.destroy=function(){return this.removeAll(!0),le(this)};wa.prototype._update=function(){let e=!0,t=this._layers,n,i,r,o;for(r=0,o=t.length;r<o;++r)i=t[r],i._layerIndex=r,i.show?(i._isBaseLayer=e,e=!1):i._isBaseLayer=!1,i.show!==i._show&&(l(i._show)&&(l(n)||(n=[]),n.push(i)),i._show=i.show);if(l(n))for(r=0,o=n.length;r<o;++r)i=n[r],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var XT=wa;function lo(e){e=e??H.EMPTY_OBJECT,this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._scaledGeometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._modelUpAxis=void 0,this._modelForwardAxis=void 0,this._cache=new R2,this._externalTilesetTiles=[],this._externalTilesetSweepIndex=0,this._externalTilesetSweepCount=8,this._externalTilesetIdleFrames=e.externalTilesetIdleFrames??120,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._cullWithChildrenBounds=e.cullWithChildrenBounds??!0,this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new Xl,this._maximumScreenSpaceError=e.maximumScreenSpaceError??16,this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=e.cacheBytes??512*1024*1024;let t=e.maximumCacheOverflowBytes??512*1024*1024;this._maximumCacheOverflowBytes=t,this._styleEngine=new N2,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?N.clone(e.modelMatrix):N.clone(N.IDENTITY),this._addHeightCallbacks=[],this._statistics=new Im,this._statisticsLast=new Im,this._statisticsPerPass=new Array(ao.NUMBER_OF_PASSES);for(let r=0;r<ao.NUMBER_OF_PASSES;++r)this._statisticsPerPass[r]=new Im;this._requestedTilesInFlight=[],this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,reverseScreenSpaceError:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,reverseScreenSpaceError:Number.MAX_VALUE},this._heatmap=new O2(e.debugHeatmapTilePropertyName),this.cullRequestsWhileMoving=e.cullRequestsWhileMoving??!0,this._cullRequestsWhileMoving=!1,this.cullRequestsWhileMovingMultiplier=e.cullRequestsWhileMovingMultiplier??60,this.progressiveResolutionHeightFraction=D.clamp(e.progressiveResolutionHeightFraction??.3,0,.5),this.preferLeaves=e.preferLeaves??!1,this._tilesLoaded=!1,this._initialTilesLoaded=!1,this._tileDebugLabels=void 0,this._classificationType=e.classificationType,this._heightReference=e.heightReference,this._scene=e.scene,this._ellipsoid=e.ellipsoid??ee.WGS84,this._initialClippingPlanesOriginMatrix=N.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=e.vectorClassificationOnly??!1,this._vectorKeepDecodedPositions=e.vectorKeepDecodedPositions??!1,this._imageryLayers=new XT(this),this._imageryLayersModificationCounter=0,this._imageryLayersListener=()=>{this._imageryLayersModificationCounter++},this.imageryLayers.layerAdded.addEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.addEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.addEventListener(this._imageryLayersListener),this._asynchronouslyLoadImagery=e.asynchronouslyLoadImagery??!1,this.preloadWhenHidden=e.preloadWhenHidden??!1,this.preloadFlightDestinations=e.preloadFlightDestinations??!0,this._pass=void 0,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError??!0,this.foveatedScreenSpaceError=e.foveatedScreenSpaceError??!0,this._foveatedConeSize=e.foveatedConeSize??.1,this._foveatedMinimumScreenSpaceErrorRelaxation=e.foveatedMinimumScreenSpaceErrorRelaxation??0,this.foveatedInterpolationCallback=e.foveatedInterpolationCallback??D.lerp,this.foveatedTimeDelay=e.foveatedTimeDelay??.2,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity??2e-4,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor??24,this.dynamicScreenSpaceErrorHeightFalloff=e.dynamicScreenSpaceErrorHeightFalloff??.25,this._dynamicScreenSpaceErrorComputedDensity=0,this.shadows=e.shadows??Dn.ENABLED,this.show=e.show??!0,this.colorBlendMode=Uu.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new Yp(e.pointCloudShading),this._pointCloudEyeDomeLighting=new Vg,this.loadProgress=new be,this.allTilesLoaded=new be,this.initialTilesLoaded=new be,this.tileLoad=new be,this.tileUnload=new be,this.tileFailed=new be,this.tileVisible=new be,this.skipLevelOfDetail=e.skipLevelOfDetail??!1,this._disableSkipLevelOfDetail=!1,this._runtimeContentCodec=void 0,this.baseScreenSpaceError=e.baseScreenSpaceError??1024,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor??16,this.skipLevels=e.skipLevels??1,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail??!1,this.loadSiblings=e.loadSiblings??!1,this._clippingPlanes=void 0,l(e.clippingPlanes)&&bs.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,this._clippingPolygonsNeedRebake=!1,this._removeClippingPolygonAdded=void 0,this._removeClippingPolygonRemoved=void 0,l(e.clippingPolygons)&&(Mc.setOwner(e.clippingPolygons,this,"_clippingPolygons"),oEe(this)),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new Gx,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new kg(e.environmentMapOptions),this.lightColor=e.lightColor,this.backFaceCulling=e.backFaceCulling??!0,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??z.BLACK,this.splitDirection=e.splitDirection??Vo.NONE,this.enableCollision=e.enableCollision??!1,this.maximumHeightQueryGeometricError=e.maximumHeightQueryGeometricError??500,this._projectTo2D=e.projectTo2D??!1,this._enablePick=e.enablePick??!1,this.debugFreezeFrame=e.debugFreezeFrame??!1,this.debugColorizeTiles=e.debugColorizeTiles??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this.debugWireframe=e.debugWireframe??!1,this.debugWireframe===!0&&this._enableDebugWireframe===!1&&_t("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.edgeDisplayMode=e.edgeDisplayMode??Hd.SURFACES_ONLY,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowContentBoundingVolume=e.debugShowContentBoundingVolume??!1,this.debugShowViewerRequestVolume=e.debugShowViewerRequestVolume??!1,this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=e.debugShowGeometricError??!1,this.debugShowRenderingStatistics=e.debugShowRenderingStatistics??!1,this.debugShowMemoryUsage=e.debugShowMemoryUsage??!1,this.debugShowUrl=e.debugShowUrl??!1,this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}Object.defineProperties(lo.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){return this._asset}},extensions:{get:function(){return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){bs.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Mc.setOwner(e,this,"_clippingPolygons"),oEe(this),this._clippingPolygonsNeedRebake=!0}},imageryLayers:{get:function(){return this._imageryLayers}},imageryLayersModificationCounter:{get:function(){return this._imageryLayersModificationCounter}},asynchronouslyLoadImagery:{get:function(){return this._asynchronouslyLoadImagery}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return qr("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},hasMixedContent:{get:function(){return this._hasMixedContent},set:function(e){this._hasMixedContent=e}},isSkippingLevelOfDetail:{get:function(){return this.skipLevelOfDetail&&!l(this._classificationType)&&!this._disableSkipLevelOfDetail&&!this._allTilesAdditive}},metadataExtension:{get:function(){return this._metadataExtension}},metadata:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.tileset}},schema:{get:function(){if(l(this._metadataExtension))return this._metadataExtension.schema}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){this._maximumScreenSpaceError=e,this._memoryAdjustedScreenSpaceError=e}},cacheBytes:{get:function(){return this._cacheBytes},set:function(e){this._cacheBytes=e}},maximumCacheOverflowBytes:{get:function(){return this._maximumCacheOverflowBytes},set:function(e){this._maximumCacheOverflowBytes=e}},externalTilesetIdleFrames:{get:function(){return this._externalTilesetIdleFrames},set:function(e){this._externalTilesetIdleFrames=e}},memoryAdjustedScreenSpaceError:{get:function(){return this._memoryAdjustedScreenSpaceError}},pointCloudShading:{get:function(){return this._pointCloudShading},set:function(e){this._pointCloudShading=e}},root:{get:function(){return this._root}},boundingSphere:{get:function(){return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){let e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return l(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(N.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):N.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},heightReference:{get:function(){return this._heightReference}},scene:{get:function(){return this._scene}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){return this._extras}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1)}},environmentMapManager:{get:function(){return this._environmentMapManager}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}},showCreditsOnScreen:{get:function(){return this._showCreditsOnScreen},set:function(e){this._showCreditsOnScreen=e,uEe(this)}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),this._instanceFeatureIdLabel=e}}});lo.fromIonAssetId=async function(e,t){let n=await Ho.fromAssetId(e);return lo.fromUrl(n,t)};lo.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=De.createIfNeeded(e),i;n.extension==="json"?i=n.getBaseUri(!0):n.isDataUri&&(i="");let r=await lo.loadJson(n),o=await Eht(n,r),s=new lo(t);s._resource=n,s._url=n.url,s._basePath=i,s._metadataExtension=o,s._geometricError=r.geometricError,s._scaledGeometricError=r.geometricError;let a=r.asset;s._asset=a,s._extras=r.extras,uEe(s);let c=l(r.asset.gltfUpAxis)?Hi.fromName(r.asset.gltfUpAxis):Hi.Y,u=t.modelUpAxis??c,f=t.modelForwardAxis??Hi.X;s._properties=r.properties,s._extensionsUsed=r.extensionsUsed,s._extensions=r.extensions,s._modelUpAxis=u,s._modelForwardAxis=f,s._root=s.loadTileset(n,r);let p=s._root.createBoundingVolume(r.root.boundingVolume,N.IDENTITY).boundingSphere.center,g=s._ellipsoid.cartesianToCartographic(p);return l(g)&&g.height>Mi._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=At.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=N.clone(s._initialClippingPlanesOriginMatrix),s};lo.loadJson=function(e){return De.createIfNeeded(e).fetchJson()};lo.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};lo.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new oe("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new oe("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&lo.checkSupportedExtensions(t.extensionsRequired);let r=this._statistics;l(n)&&this._externalTilesetTiles.push(n);let o=i.tilesetVersion;l(o)&&(this._basePath+=`?v=${o}`,e=e.clone(),e.setQueryParameters({v:o}));let s=tEe(this,e,t.root,n);l(n)&&(n.children.push(s),s._depth=n._depth+1);let a=[];for(a.push(s);a.length>0;){let c=a.pop();++r.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===yo.ADD;let u=c._header.children;if(l(u))for(let f=0;f<u.length;++f){let d=u[f],p=tEe(this,e,d,c);c.children.push(p),p._depth=c._depth+1,a.push(p)}this._cullWithChildrenBounds&&I2.checkChildrenWithinParent(c)}return s};function tEe(e,t,n,i){if(!(l(n.implicitTiling)||tr(n,"3DTILES_implicit_tiling")))return new ih(e,t,n,i);let o=e.schema,s=new r0(t,n,o),a=new o0({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),c=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,f=Je(n,!0);f.contents=[{uri:c}],delete f.content,delete f.extensions;let d=new ih(e,t,f,i);return d.implicitTileset=s,d.implicitCoordinates=a,d}async function Eht(e,t){let n=tr(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(l(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=Li.getSchemaLoader({resource:e});else if(l(n.schema))i=Li.getSchemaLoader({schema:n.schema});else return;await i.load();let r=new YT({schema:i.schema,metadataJson:n});return Li.unload(i),r}var nEe=new h,Cht=new he,vht=new N,Sht=new h,wht=new h,Iht=new h,Pht=new h;function Dht(e,t){let n,i,r,o,s,a=t.camera,c=e._root,u=c.contentBoundingVolume;if(u instanceof qf)n=h.normalize(a.positionWC,nEe),i=a.directionWC,r=a.positionCartographic.height,o=u.minimumHeight,s=u.maximumHeight;else{let y=N.inverseTransformation(c.computedTransform,vht),A=t.mapProjection.ellipsoid,b=u.boundingVolume,x=N.multiplyByPoint(y,b.center,Sht);if(h.magnitude(x)>A.minimumRadius){let T=he.fromCartesian(x,A,Cht);n=h.normalize(a.positionWC,nEe),i=a.directionWC,r=a.positionCartographic.height,o=0,s=T.height*2}else{let T=N.multiplyByPoint(y,a.positionWC,wht);if(n=h.UNIT_Z,i=N.multiplyByPointAsVector(y,a.directionWC,Iht),i=h.normalize(i,i),r=T.z,u instanceof $u){let E=$.getColumn(b.halfAxes,2,Pht),v=h.magnitude(E);o=x.z-v,s=x.z+v}else if(u instanceof y_){let E=b.radius;o=x.z-E,s=x.z+E}}}let f=e.dynamicScreenSpaceErrorHeightFalloff,d=o+(s-o)*f,p=s,g=D.clamp((r-d)/(p-d),0,1),m=1-Math.abs(h.dot(i,n));m=m*(1-g),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*m}function Rht(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,r=t.requestContent();l(r)&&(r.then(o=>{!l(o)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(o=>{sEe(o,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?cEe(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function rEe(e,t){return e._priority-t._priority}lo.prototype.postPassesUpdate=function(e){l(this._root)&&(Oht(this,e),$ht(this,e),this._cache.unloadTiles(this,lEe),Xht(this,e),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};function oEe(e){e._removeClippingPolygonAdded=e._removeClippingPolygonAdded&&e._removeClippingPolygonAdded(),e._removeClippingPolygonRemoved=e._removeClippingPolygonRemoved&&e._removeClippingPolygonRemoved();let t=e._clippingPolygons;if(!l(t))return;let n=()=>{e._clippingPolygonsNeedRebake=!0};e._removeClippingPolygonAdded=t.polygonAdded.addEventListener(n),e._removeClippingPolygonRemoved=t.polygonRemoved.addEventListener(n)}lo.prototype.prePassesUpdate=function(e){if(!l(this._root))return;Uht(this,e);let t=this._clippingPlanes;this._clippingPlanesOriginMatrixDirty=!0,l(t)&&t.enabled&&t.update(e);let n=this._clippingPolygons;l(n)&&n.enabled&&n.update(e),this._clippingPolygonsNeedRebake&&(this._clippingPolygonsNeedRebake=!1,this._cache.forEachLoadedTile(i=>{i.clippingPolygonsNeedRebake=!0})),l(this._loadTimestamp)||(this._loadTimestamp=K.clone(e.time)),this._timeSinceLoad=Math.max(K.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&Dht(this,e),e.newFrame&&this._cache.reset()};function Oht(e,t){let n=e._requestedTilesInFlight,i=0;for(let r=0;r<n.length;++r){let o=n[r],s=t.frameNumber-o._touchedFrame>=1;if(o._contentState!==Rr.LOADING){++i;continue}else if(s){o.cancelRequests(),++i;continue}i>0&&(n[r-i]=o)}n.length-=i}function Mht(e){let t=e._requestedTiles;t.sort(rEe);for(let n=0;n<t.length;++n)Rht(e,t[n])}function sEe(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);let r=l(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:r}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${r}`),console.log(e.stack))}function Nht(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let r=t[i];if(r.isDestroyed()||r._contentState!==Rr.PROCESSING){++n;continue}n>0&&(t[i-n]=r)}t.length-=n}var Lht=new he,Fht=new he,Bht=new h;function kht(e,t,n){if(!e.enableCollision||!e.show||t._wasSelectedLastFrame)return;let i=e._addHeightCallbacks,r=t.boundingSphere,o=i.length;for(let s=0;s<o;++s){let a=i[s];if(a.invoked)continue;let c=a.ellipsoid,u=he.clone(a.positionCartographic,Lht),f=he.fromCartesian(r.center,c,Fht);l(f)&&(u.height=f.height);let d=he.toCartesian(u,c,Bht);h.distance(d,r.center)<=r.radius&&(a.invoked=!0,n.afterRender.push(()=>{l(a.callback)&&a.callback(),a.invoked=!1}))}}function Uht(e,t){Nht(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:r,statistics:o}=e,s=i+r,a=!1;for(let c=0;c<n.length;++c){if(e.totalMemoryUsageInBytes>s){a=!0;break}let u=n[c];try{u.process(e,t),u.contentReady&&(--o.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(f){--o.numberOfTilesProcessing,sEe(f,e,u)}}e.totalMemoryUsageInBytes<i?Vht(e):a&&n.length>0&&zht(e)}function zht(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(rEe)}function Vht(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var lG=new h,jht={maximumFractionDigits:3};function iEe(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,jht):Math.round(t).toLocaleString()}function JQ(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,r=h.clone(i,lG);if(l(t))r.x+=.75*(t[0]+t[3]+t[6]),r.y+=.75*(t[1]+t[4]+t[7]),r.z+=.75*(t[2]+t[5]+t[8]);else if(l(n)){let o=h.normalize(i,lG);o=h.multiplyByScalar(o,.75*n,lG),r=h.add(o,i,lG)}return r}function ZQ(e,t,n){let i="",r=0;if(t.debugShowGeometricError&&(i+=`
Geometric error: ${e.geometricError}`,r++),t.debugShowRenderingStatistics&&(i+=`
Commands: ${e.commandsLength}`,r++,e.content.pointsLength>0&&(i+=`
Points: ${e.content.pointsLength}`,r++),e.content.trianglesLength>0&&(i+=`
Triangles: ${e.content.trianglesLength}`,r++),i+=`
Features: ${e.content.featuresLength}`,r++),t.debugShowMemoryUsage&&(i+=`
Texture Memory: ${iEe(e.content.texturesByteLength)}`,i+=`
Geometry Memory: ${iEe(e.content.geometryByteLength)}`,r+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`
- ${s[a]}`;r+=s.length}else i+=`
Url: ${e._contentHeader.uri}`,r++;let o={text:i.substring(1),position:n,font:`${19-r}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(o)}function Hht(e,t){let n=e._selectedTiles,i=n.length,r=e._emptyTiles,o=r.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(l(e.debugPickedTile)){let s=l(e.debugPickPosition)?e.debugPickPosition:JQ(e.debugPickedTile),a=ZQ(e.debugPickedTile,e,s);a.pixelOffset=new U(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];ZQ(a,e,JQ(a))}for(let s=0;s<o;++s){let a=r[s];(a.hasTilesetContent||a.hasImplicitContent)&&ZQ(a,e,JQ(a))}}e._tileDebugLabels.update(t)}function Ght(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;let{commandList:i,context:r}=t,o=i.length,s=e._selectedTiles,a=e.isSkippingLevelOfDetail&&e._hasMixedContent&&r.stencilBuffer&&s.length>0;e._backfaceCommands.length=0,a&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new ui({stencil:0,pass:Ie.CESIUM_3D_TILE,renderState:Ge.fromCache({stencilMask:Yt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:u}=e,f=n.isRender,d=i.length;for(let m=0;m<s.length;++m){let y=s[m];f&&u.raiseEvent(y),kht(e,y,t),y.update(e,t,n),c.incrementSelectionCounts(y.content),++c.selected}let p=e._emptyTiles;for(let m=0;m<p.length;++m)p[m].update(e,t,n);let g=i.length-d;if(e._backfaceCommands.trim(),a){let m=e._backfaceCommands.values,y=m.length;i.length+=y;for(let A=g-1;A>=0;--A)i[d+y+A]=i[d+A];for(let A=0;A<y;++A)i[d+A]=m[A]}g=i.length-o,c.numberOfCommands=g,f&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&g>0&&e._pointCloudEyeDomeLighting.update(t,o,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new e0),Hht(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var aEe=[],Wht=[];function cEe(e,t){let n=t,i=aEe;for(i.push(t);i.length>0;){t=i.pop();let r=t.children;for(let o=0;o<r.length;++o)i.push(r[o]);t!==n&&(Kht(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function lEe(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function uG(e,t){let n=e-t;return n<0?n+kA.maximumFrameNumber:n}var qht=64;function Yht(e,t,n){let i=Wht;for(i.length=0,i.push(e);i.length>0;){let r=i.pop(),o=r._contentState;if(o===Rr.LOADING||o===Rr.PROCESSING||!r.hasEmptyContent&&!r.hasTilesetContent&&o!==Rr.UNLOADED&&o!==Rr.FAILED||l(r.cacheNode)||Math.min(uG(t,r._visitedFrame),uG(t,r._touchedFrame),uG(t,r._selectedFrame),uG(t,r._requestedFrame))<n)return i.length=0,!0;let c=r.children;for(let u=0;u<c.length;++u)i.push(c[u])}return!1}function Xht(e,t){let n=e._externalTilesetTiles,i=t.frameNumber,r=e._externalTilesetIdleFrames,o=e._externalTilesetSweepCount,s=0,a=0;for(;s<o&&a<qht&&n.length>0;){++a,e._externalTilesetSweepIndex>=n.length&&(e._externalTilesetSweepIndex=0);let c=e._externalTilesetSweepIndex,u=n[c];if(u.isDestroyed()||!u.hasTilesetContent||u.children.length===0){n.splice(c,1);continue}++e._externalTilesetSweepIndex,++s,!Yht(u,i,r)&&(cEe(e,u),u.unloadTilesetContent(),n.splice(c,1),e._externalTilesetSweepIndex=c)}}function Kht(e,t){e._cache.unloadTile(e,t,lEe),t.destroy()}lo.prototype.trimLoadedTiles=function(){this._cache.trim()};function $ht(e,t){let n=e._statistics,i=e._statisticsLast,r=n.numberOfPendingRequests,o=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;Im.clone(n,i);let c=r!==s||o!==a;c&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(r,o),!0}),e._tilesLoaded=n.numberOfPendingRequests===0&&n.numberOfTilesProcessing===0&&n.numberOfAttemptedRequests===0,c&&e._tilesLoaded&&(t.afterRender.push(function(){return e.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e.initialTilesLoaded.raiseEvent(),!0})))}function Jht(e){e._heatmap.resetMinimumMaximum(),e._minimumPriority.depth=Number.MAX_VALUE,e._maximumPriority.depth=-Number.MAX_VALUE,e._minimumPriority.foveatedFactor=Number.MAX_VALUE,e._maximumPriority.foveatedFactor=-Number.MAX_VALUE,e._minimumPriority.distance=Number.MAX_VALUE,e._maximumPriority.distance=-Number.MAX_VALUE,e._minimumPriority.reverseScreenSpaceError=Number.MAX_VALUE,e._maximumPriority.reverseScreenSpaceError=-Number.MAX_VALUE}function Zht(e,t){t.frameNumber===e._updatedModelMatrixFrame&&l(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!N.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=N.clone(e.modelMatrix,e._previousModelMatrix)))}function Qht(e,t,n,i){if(t.mode===re.MORPHING||!l(e._root))return!1;let r=e._statistics;r.clear(),++e._updatedVisibilityFrame,Jht(e),Zht(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let o=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&Mht(e),Ght(e,t,i),Im.clone(r,n),i.isRender){let s=e._credits;if(l(s)&&r.selected!==0)for(let a=0;a<s.length;++a){let c=s[a];t.creditDisplay.addCreditToNextFrame(c)}}return o}function uEe(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(It.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let r=0;r<i.length;++r){let o=i[r];t.push(new It(o.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}lo.prototype.getTraversal=function(e){let{pass:t}=e;return t===ao.MOST_DETAILED_PRELOAD||t===ao.MOST_DETAILED_PICK?B2:this.isSkippingLevelOfDetail?H2:z2};lo.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};lo.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===ao.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===ao.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===ao.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,r=e.camera,o=e.cullingVolume;t.ready=!1;let s=ao.getPassOptions(n),a=s.ignoreCommands,c=t.commandList??i,u=c.length;if(e.commandList=c,e.camera=t.camera??r,e.cullingVolume=t.cullingVolume??o,s.isRender){let d=this._environmentMapManager;l(this._root)&&(d.position=this.boundingSphere.center),d.update(e)}let f=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=Qht(this,e,f,s)),a&&(c.length=u),e.commandList=i,e.camera=r,e.cullingVolume=o};lo.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};lo.prototype.isDestroyed=function(){return!1};lo.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._removeClippingPolygonAdded=this._removeClippingPolygonAdded&&this._removeClippingPolygonAdded(),this._removeClippingPolygonRemoved=this._removeClippingPolygonRemoved&&this._removeClippingPolygonRemoved(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=void 0,l(this._root)){let e=aEe;for(e.push(this._root);e.length>0;){let t=e.pop();t.destroy();let n=t.children;for(let i=0;i<n.length;++i)e.push(n[i])}}return this._root=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0,this._environmentMapManager.isDestroyed()||this._environmentMapManager.destroy(),this._environmentMapManager=void 0,this._imageryLayers.isDestroyed()||(this.imageryLayers.layerAdded.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerRemoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerMoved.removeEventListener(this._imageryLayersListener),this.imageryLayers.layerShownOrHidden.removeEventListener(this._imageryLayersListener),this._imageryLayers.destroy()),this._imageryLayers=void 0,le(this)};lo.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_content_gltf_vector":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0};lo.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!lo.supportedExtensions[e[t]])throw new oe(`Unsupported 3D Tiles Extension: ${e[t]}`)};var emt=new pn,tmt=new h,nmt=new h,imt=new he;lo.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=ee.WGS84);let i=emt,r=n.cartographicToCartesian(e,tmt),o=n.geodeticSurfaceNormal(r,i.direction);i.origin=h.add(r,h.multiplyByScalar(o,2*n.maximumRadius,i.origin),i.origin),i.direction=h.negate(o,i.direction);let s=this.pick(i,t.frameState,nmt,this.maximumHeightQueryGeometricError);if(l(s))return n.cartesianToCartographic(s,imt)?.height};lo.prototype.updateHeight=function(e,t,n){n=n??ee.WGS84;let i={positionCartographic:e,ellipsoid:n,callback:t,invoked:!1},r=()=>{let o=this._addHeightCallbacks,s=o.length;for(let a=0;a<s;++a)if(o[a]===i){o.splice(a,1);break}i.callback&&(i.callback=void 0)};return this._addHeightCallbacks.push(i),r};var rmt=new h;lo.prototype.pick=function(e,t,n,i){if(!t.context.webgl2&&!this._enablePick)return;let r=this._selectedTiles,o=r.length,s=[],a=e.origin.x,c=e.origin.y,u=e.origin.z,f=e.direction.x,d=e.direction.y,p=e.direction.z,g=f*f+d*d+p*p;for(let b=0;b<o;++b){let x=r[b];if(l(i)&&x.geometricError>i||!l(x.content))continue;let T=x.contentBoundingVolume.boundingSphere,E=T.center,v=a-E.x,S=c-E.y,I=u-E.z,R=2*(f*v+d*S+p*I),O=v*v+S*S+I*I-T.radius*T.radius;R*R-4*g*O<0||s.push(x)}let m=s.length,y,A=Number.POSITIVE_INFINITY;for(let b=0;b<m;++b){let T=s[b].content.pick(e,t,rmt);if(l(T)){let E=h.distanceSquared(T,e.origin);E<A&&(A=E,y=h.clone(T,n))}}return y};lo.prototype.isGltfExtensionUsed=function(e){if(this.hasExtension("3DTILES_content_gltf")){if(!l(this.extensions))return!1;let t=this.extensions["3DTILES_content_gltf"]?.extensionsUsed;return l(t)?t.indexOf(e)>-1:!1}return!1};lo.prototype.isGltfExtensionRequired=function(e){if(this.isGltfExtensionUsed(e)){let t=this.extensions["3DTILES_content_gltf"].extensionsRequired;return l(t)?t.indexOf(e)>-1:!1}return!1};var Yo=lo;var omt=new N;function zA(e,t){t.collectionChanged.addEventListener(zA.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new kt,this._onCollectionChanged(t,t.values,[],[])}zA.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let r=0,o=t.length;r<o;r++){let s=t[r],a=s._tileset,c,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&X.getValueOrDefault(a._show,e,!0),d;f&&(d=s.computeModelMatrix(e,omt),c=De.createIfNeeded(X.getValueOrUndefined(a._uri,e)));let p=l(u)?u.tilesetPrimitive:void 0;if(!f){l(p)&&(p.show=!1);continue}(!l(u)||c.url!==u.url)&&(l(p)&&i.removeAndDestroy(p),delete n[s.id],smt(c,n,s,i)),l(p)&&(p.show=!0,l(d)&&(p.modelMatrix=d),p.maximumScreenSpaceError=X.getValueOrDefault(a.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};zA.prototype.isDestroyed=function(){return!1};zA.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(zA.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)QQ(this,e[i],t,n);return le(this)};zA.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return Pt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(ue.clone(i.boundingSphere,t),Pt.DONE):Pt.FAILED:Pt.PENDING};zA.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s=this._entitiesToVisualize,a=this._tilesetHash,c=this._primitives;for(r=t.length-1;r>-1;r--)o=t[r],l(o._tileset)&&s.set(o.id,o);for(r=i.length-1;r>-1;r--)o=i[r],l(o._tileset)?s.set(o.id,o):(QQ(this,o,a,c),s.remove(o.id));for(r=n.length-1;r>-1;r--)o=n[r],QQ(this,o,a,c),s.remove(o.id)};function QQ(e,t,n,i){let r=n[t.id];l(r)&&(l(r.tilesetPrimitive)&&i.removeAndDestroy(r.tilesetPrimitive),delete n[t.id])}async function smt(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let r=await Yo.fromUrl(e);if(r.id=n,i.add(r),!l(t[n.id]))return;t[n.id].tilesetPrimitive=r}catch(r){console.error(r),t[n.id].loadFail=!0}}var G2=zA;var amt=z.WHITE,cmt=z.BLACK,lmt=new U(2,2);function pw(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(pw.prototype,{isConstant:{get:function(){return X.isConstant(this._evenColor)&&X.isConstant(this._oddColor)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:me("evenColor"),oddColor:me("oddColor"),repeat:me("repeat")});pw.prototype.getType=function(e){return"Checkerboard"};var umt=new K;pw.prototype.getValue=function(e,t){return l(e)||(e=K.now(umt)),l(t)||(t={}),t.lightColor=X.getValueOrClonedDefault(this._evenColor,e,amt,t.lightColor),t.darkColor=X.getValueOrClonedDefault(this._oddColor,e,cmt,t.darkColor),t.repeat=X.getValueOrDefault(this._repeat,e,lmt),t};pw.prototype.equals=function(e){return this===e||e instanceof pw&&X.equals(this._evenColor,e._evenColor)&&X.equals(this._oddColor,e._oddColor)&&X.equals(this._repeat,e._repeat)};var gw=pw;var fEe={id:void 0};function W2(e){if(e._firing){e._refire=!0;return}if(e._suspendCount===0){let t=e._addedEntities,n=e._removedEntities,i=e._changedEntities;if(i.length!==0||t.length!==0||n.length!==0){e._firing=!0;do{e._refire=!1;let r=t.values.slice(0),o=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,r,o,s)}while(e._refire);e._firing=!1}}}function pl(e){this._owner=e,this._entities=new kt,this._addedEntities=new kt,this._removedEntities=new kt,this._changedEntities=new kt,this._suspendCount=0,this._collectionChanged=new be,this._id=$n(),this._show=!0,this._firing=!1,this._refire=!1}pl.prototype.suspendEvents=function(){this._suspendCount++};pl.prototype.resumeEvents=function(){this._suspendCount--,W2(this)};Object.defineProperties(pl.prototype,{collectionChanged:{get:function(){return this._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._entities.values}},show:{get:function(){return this._show},set:function(e){if(e===this._show)return;this.suspendEvents();let t,n=[],i=this._entities.values,r=i.length;for(t=0;t<r;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<r;t++){let o=n[t],s=i[t];o!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,o)}this.resumeEvents()}},owner:{get:function(){return this._owner}}});pl.prototype.computeAvailability=function(){let e=tt.MAXIMUM_VALUE,t=tt.MINIMUM_VALUE,n=this._entities.values;for(let i=0,r=n.length;i<r;i++){let s=n[i].availability;if(l(s)){let a=s.start,c=s.stop;K.lessThan(a,e)&&!a.equals(tt.MINIMUM_VALUE)&&(e=a),K.greaterThan(c,t)&&!c.equals(tt.MAXIMUM_VALUE)&&(t=c)}}return tt.MAXIMUM_VALUE.equals(e)&&(e=tt.MINIMUM_VALUE),tt.MINIMUM_VALUE.equals(t)&&(t=tt.MAXIMUM_VALUE),new En({start:e,stop:t})};pl.prototype.add=function(e){e instanceof Jr||(e=new Jr(e));let t=e.id,n=this._entities;if(n.contains(t))throw new pe(`An entity with id ${t} already exists in this collection.`);return e.entityCollection=this,n.set(t,e),this._removedEntities.remove(t)||this._addedEntities.set(t,e),e.definitionChanged.addEventListener(pl.prototype._onEntityDefinitionChanged,this),W2(this),e};pl.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};pl.prototype.contains=function(e){return this._entities.get(e.id)===e};pl.prototype.removeById=function(e){if(!l(e))return!1;let n=this._entities.get(e);return this._entities.remove(e)?(this._addedEntities.remove(e)||(this._removedEntities.set(e,n),this._changedEntities.remove(e)),this._entities.remove(e),n.definitionChanged.removeEventListener(pl.prototype._onEntityDefinitionChanged,this),W2(this),!0):!1};pl.prototype.removeAll=function(){let e=this._entities,t=e.length,n=e.values,i=this._addedEntities,r=this._removedEntities;for(let o=0;o<t;o++){let s=n[o],a=s.id,c=i.get(a);l(c)||(s.definitionChanged.removeEventListener(pl.prototype._onEntityDefinitionChanged,this),r.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),W2(this)};pl.prototype.getById=function(e){return this._entities.get(e)};pl.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(fEe.id=e,t=new Jr(fEe),this.add(t)),t};pl.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),W2(this)};var Ya=pl;var fG={id:void 0},_w=new Array(2);function eee(e){let t=e.propertyNames,n=t.length;for(let i=0;i<n;i++)e[t[i]]=void 0;e._name=void 0,e._availability=void 0}function dEe(e,t,n,i){_w[0]=n,_w[1]=i.id,t[JSON.stringify(_w)]=i.definitionChanged.addEventListener(ws.prototype._onDefinitionChanged,e)}function hEe(e,t,n,i){_w[0]=n,_w[1]=i.id;let r=JSON.stringify(_w);t[r](),t[r]=void 0}function VA(e){if(e._shouldRecomposite=!0,e._suspendCount!==0)return;let t=e._collections,n=t.length,i=e._collectionsCopy,r=i.length,o,s,a,c,u,f=e._composite,d=new Ya(e),p=e._eventHash,g;for(o=0;o<r;o++)for(u=i[o],u.collectionChanged.removeEventListener(ws.prototype._onCollectionChanged,e),a=u.values,g=u.id,c=a.length-1;c>-1;c--)s=a[c],hEe(e,p,g,s);for(o=n-1;o>=0;o--)for(u=t[o],u.collectionChanged.addEventListener(ws.prototype._onCollectionChanged,e),a=u.values,g=u.id,c=a.length-1;c>-1;c--){s=a[c],dEe(e,p,g,s);let y=d.getById(s.id);l(y)||(y=f.getById(s.id),l(y)?eee(y):(fG.id=s.id,y=new Jr(fG)),d.add(y)),y.merge(s)}e._collectionsCopy=t.slice(0),f.suspendEvents(),f.removeAll();let m=d.values;for(o=0;o<m.length;o++)f.add(m[o]);f.resumeEvents()}function ws(e,t){this._owner=t,this._composite=new Ya(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=$n(),this._eventHash={},VA(this),this._shouldRecomposite=!1}Object.defineProperties(ws.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}});ws.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):this._collections.push(e),VA(this)};ws.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),VA(this),!0):!1};ws.prototype.removeAllCollections=function(){this._collections.length=0,VA(this)};ws.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};ws.prototype.contains=function(e){return this._composite.contains(e)};ws.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};ws.prototype.getCollection=function(e){return this._collections[e]};ws.prototype.getCollectionsLength=function(){return this._collections.length};function dG(e,t){return e.indexOf(t)}function mEe(e,t,n){let i=e._collections;if(t=D.clamp(t,0,i.length-1),n=D.clamp(n,0,i.length-1),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,VA(e)}ws.prototype.raiseCollection=function(e){let t=dG(this._collections,e);mEe(this,t,t+1)};ws.prototype.lowerCollection=function(e){let t=dG(this._collections,e);mEe(this,t,t-1)};ws.prototype.raiseCollectionToTop=function(e){let t=dG(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),VA(this))};ws.prototype.lowerCollectionToBottom=function(e){let t=dG(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),VA(this))};ws.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};ws.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(VA(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};ws.prototype.computeAvailability=function(){return this._composite.computeAvailability()};ws.prototype.getById=function(e){return this._composite.getById(e)};ws.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,r=i.length,o=this._composite;o.suspendEvents();let s,a,c,u,f=n.length,d=this._eventHash,p=e.id;for(s=0;s<f;s++){let m=n[s];hEe(this,d,p,m);let y=m.id;for(a=r-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(u)||(u=o.getById(y),eee(u)),u.merge(c));l(u)||o.removeById(y),u=void 0}let g=t.length;for(s=0;s<g;s++){let m=t[s];dEe(this,d,p,m);let y=m.id;for(a=r-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(u)||(u=o.getById(y),l(u)?eee(u):(fG.id=y,u=new Jr(fG),o.add(u))),u.merge(c));u=void 0}o.resumeEvents()};ws.prototype._onDefinitionChanged=function(e,t,n,i){let r=this._collections,o=this._composite,s=r.length,a=e.id,c=o.getById(a),u=c[t],f=!l(u),d=!0;for(let p=s-1;p>=0;p--){let g=r[p].getById(e.id);if(l(g)){let m=g[t];if(l(m)){if(d)if(d=!1,l(m.merge)&&l(m.clone))u=m.clone(u);else{u=m;break}u.merge(m)}}}f&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=u};var tee=ws;function nee(){this._removalFunctions=[]}nee.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let r=this;return function(){i();let o=r._removalFunctions;o.splice(o.indexOf(i),1)}};nee.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Xo=nee;function oee(e,t){return K.compare(e.start,t.start)}function Is(e){if(this._intervals=[],this._changedEvent=new be,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(Is.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});Is.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Is))return!1;let n=this._intervals,i=e._intervals,r=n.length;if(r!==i.length)return!1;for(let o=0;o<r;o++)if(!En.equals(n[o],i[o],t))return!1;return!0};Is.prototype.get=function(e){return this._intervals[e]};Is.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Is.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Is.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Is.prototype.contains=function(e){return this.indexOf(e)>=0};var iee=new En;Is.prototype.indexOf=function(e){let t=this._intervals;iee.start=e,iee.stop=e;let n=vr(t,iee,oee);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&En.contains(t[n-1],e)?n-1:~n)};Is.prototype.findInterval=function(e){e=e??H.EMPTY_OBJECT;let t=e.start,n=e.stop,i=e.isStartIncluded,r=e.isStopIncluded,o=this._intervals;for(let s=0,a=o.length;s<a;s++){let c=o[s];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(r)||c.isStopIncluded===r))return o[s]}};Is.prototype.addInterval=function(e,t){if(e.isEmpty)return;let n=this._intervals;if(n.length===0||K.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=vr(n,e,oee);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let r;for(i>0&&(r=K.compare(n[i-1].stop,e.start),(r>0||r===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(K.greaterThan(e.stop,n[i-1].stop)?e=new En({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new En({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(r=K.compare(n[i-1].stop,e.stop),(r>0||r===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new En({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new En({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(r=K.compare(e.stop,n[i].start),r>0||r===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new En({start:e.start,stop:K.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:K.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new En({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Is.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=vr(t,e,oee);n<0&&(n=~n);let i=!1;for(n>0&&(K.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(K.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new En({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new En({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new En({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&K.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new En({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new En({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(K.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new En({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Is.prototype.intersect=function(e,t,n){let i=new Is,r=0,o=0,s=this._intervals,a=e._intervals;for(;r<s.length&&o<a.length;){let c=s[r],u=a[o];if(K.lessThan(c.stop,u.start))++r;else if(K.lessThan(u.stop,c.start))++o;else{if(l(n)||l(t)&&t(c.data,u.data)||!l(t)&&u.data===c.data){let f=En.intersect(c,u,new En,n);f.isEmpty||i.addInterval(f,t)}K.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++r:++o}}return i};Is.fromJulianDateArray=function(e,t){l(t)||(t=new Is);let n=e.julianDates,i=n.length,r=e.dataCallback,o=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.leadingInterval??!1,c=e.trailingInterval??!1,u,f=0;a&&(++f,u=new En({start:tt.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!o}),u.data=l(r)?r(u,t.length):t.length,t.addInterval(u));for(let d=0;d<i-1;++d){let p=n[d],g=n[d+1];u=new En({start:p,stop:g,isStartIncluded:t.length===f?o:!0,isStopIncluded:d===i-2?s:!1}),u.data=l(r)?r(u,t.length):t.length,t.addInterval(u)}return c&&(u=new En({start:n[i-1],stop:tt.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=l(r)?r(u,t.length):t.length,t.addInterval(u)),t};var gl=new Bh,q2=[0,31,28,31,30,31,30,31,31,30,31,30,31];function ree(e,t,n){l(n)||(n=new K),K.toGregorianDate(e,gl);let i=gl.millisecond+t.millisecond,r=gl.second+t.second,o=gl.minute+t.minute,s=gl.hour+t.hour,a=gl.day+t.day,c=gl.month+t.month,u=gl.year+t.year;for(i>=1e3&&(r+=Math.floor(i/1e3),i=i%1e3),r>=60&&(o+=Math.floor(r/60),r=r%60),o>=60&&(s+=Math.floor(o/60),o=o%60),s>=24&&(a+=Math.floor(s/24),s=s%24),q2[2]=Bl(u)?29:28;a>q2[c]||c>=13;)a>q2[c]&&(a-=q2[c],++c),c>=13&&(--c,u+=Math.floor(c/12),c=c%12,++c),q2[2]=Bl(u)?29:28;return gl.millisecond=i,gl.second=r,gl.minute=o,gl.hour=s,gl.day=a,gl.month=c,gl.year=u,K.fromGregorianDate(gl,n)}var fmt=new K,dmt=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function pEe(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(dmt);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),K.toGregorianDate(K.fromIso8601(e,fmt),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var Y2=new Bh;Is.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=K.fromIso8601(n[0]),r=K.fromIso8601(n[1]),o=[];if(!pEe(n[2],Y2))o.push(i,r);else{let s=K.clone(i);for(o.push(s);K.compare(s,r)<0;)s=ree(s,Y2),K.compare(r,s)<=0&&K.clone(r,s),o.push(s)}return Is.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Is.fromIso8601DateArray=function(e,t){return Is.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return K.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Is.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,r=e.relativeToPrevious??!1,o=[],s,a,c=i.length;for(let u=0;u<c;++u)(pEe(i[u],Y2)||u===0)&&(r&&l(a)?s=ree(a,Y2):s=ree(n,Y2),o.push(s),a=s);return Is.fromJulianDateArray({julianDates:o,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var Ps=Is;function hmt(e,t,n,i){function r(){n.raiseEvent(e)}let o=[];t.removeAll();let s=i.length;for(let a=0;a<s;a++){let c=i.get(a);l(c.data)&&o.indexOf(c.data)===-1&&t.add(c.data.definitionChanged,r)}}function KT(){this._eventHelper=new Xo,this._definitionChanged=new be,this._intervals=new Ps,this._intervals.changedEvent.addEventListener(KT.prototype._intervalsChanged,this)}Object.defineProperties(KT.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var mmt=new K;KT.prototype.getValue=function(e,t){l(e)||(e=K.now(mmt));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};KT.prototype.equals=function(e){return this===e||e instanceof KT&&this._intervals.equals(e._intervals,X.equals)};KT.prototype._intervalsChanged=function(){hmt(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var _l=KT;function jA(){this._definitionChanged=new be,this._composite=new _l,this._composite.definitionChanged.addEventListener(jA.prototype._raiseDefinitionChanged,this)}Object.defineProperties(jA.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});jA.prototype.getType=function(e){let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(t))return t.getType(e)};var pmt=new K;jA.prototype.getValue=function(e,t){l(e)||(e=K.now(pmt));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};jA.prototype.equals=function(e){return this===e||e instanceof jA&&this._composite.equals(e._composite,X.equals)};jA.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var yw=jA;function HA(e){this._referenceFrame=e??ji.FIXED,this._definitionChanged=new be,this._composite=new _l,this._composite.definitionChanged.addEventListener(HA.prototype._raiseDefinitionChanged,this)}Object.defineProperties(HA.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}});var gmt=new K;HA.prototype.getValue=function(e,t){return l(e)||(e=K.now(gmt)),this.getValueInReferenceFrame(e,ji.FIXED,t)};HA.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(i))return i.getValueInReferenceFrame(e,t,n)};HA.prototype.equals=function(e){return this===e||e instanceof HA&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,X.equals)};HA.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var mc=HA;var gEe={ROUNDED:0,MITERED:1,BEVELED:2};Object.freeze(gEe);var rr=gEe;var pc=[new h,new h],_mt=new h,ymt=new h,Amt=new h,bmt=new h,xmt=new h,Tmt=new h,Emt=new h,Cmt=new h,vmt=new h,Aw=new h,hG=new h,X2={},see=new he;function Smt(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let r=e[i];see=t.cartesianToCartographic(r,see),n[i]=see.height,e[i]=t.scaleToGeodeticSurface(r,r)}return n}function aee(e,t,n,i){let r=e[0],o=e[1],s=h.angleBetween(r,o),a=Math.ceil(s/i),c=new Array(a),u;if(t===n){for(u=0;u<a;u++)c[u]=t;return c.push(n),c}let d=(n-t)/a;for(u=1;u<a;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var mG=new h,pG=new h;function wmt(e,t,n,i){let r=new Vs(n,i),o=r.projectPointOntoPlane(h.add(n,e,mG),mG),s=r.projectPointOntoPlane(h.add(n,t,pG),pG),a=U.angleBetween(o,s);return s.x*o.y-s.y*o.x>=0?-a:a}var Imt=new h(-1,0,0),$T=new N,Pmt=new N,cee=new $,Dmt=$.IDENTITY.clone(),Rmt=new h,Omt=new se,_Ee=new h;function E_(e,t,n,i,r,o,s,a){let c=Rmt,u=Omt;$T=At.eastNorthUpToFixedFrame(e,r,$T),c=N.multiplyByPointAsVector($T,Imt,c),c=h.normalize(c,c);let f=wmt(c,t,e,r);cee=$.fromRotationZ(f,cee),_Ee.z=o,$T=N.multiplyTransformation($T,N.fromRotationTranslation(cee,_Ee,Pmt),$T);let d=Dmt;d[0]=s;for(let p=0;p<a;p++)for(let g=0;g<n.length;g+=3)u=h.fromArray(n,g,u),u=$.multiplyByVector(d,u,u),u=N.multiplyByPoint($T,u,u),i.push(u.x,u.y,u.z);return i}var Mmt=new h;function lee(e,t,n,i,r,o,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,Mmt);i=E_(c,t,n,i,r,o[a/3],s,1)}return i}function Nmt(e,t){let n=e.length,i=new Array(n*6),r=0,o=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[r++]=a.x-o,i[r++]=0,i[r++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-o,f=a.y-s;i[r++]=u,i[r++]=0,i[r++]=f,i[r++]=u,i[r++]=0,i[r++]=f}return a=e[0],i[r++]=a.x-o,i[r++]=0,i[r]=a.y-s,i}function yEe(e,t){let n=e.length,i=new Array(n*3),r=0,o=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[r++]=e[a].x-o,i[r++]=0,i[r++]=e[a].y-s;return i}var AEe=new Le,bEe=new h,xEe=new $;function TEe(e,t,n,i,r,o,s,a,c,u){let f=h.angleBetween(h.subtract(t,e,Aw),h.subtract(n,e,hG)),d=i===rr.BEVELED?0:Math.ceil(f/D.toRadians(5)),p;r?p=$.fromQuaternion(Le.fromAxisAngle(h.negate(e,Aw),f/(d+1),AEe),xEe):p=$.fromQuaternion(Le.fromAxisAngle(e,f/(d+1),AEe),xEe);let g,m;if(t=h.clone(t,bEe),d>0){let y=u?2:1;for(let A=0;A<d;A++)t=$.multiplyByVector(p,t,t),g=h.subtract(t,e,Aw),g=h.normalize(g,g),r||(g=h.negate(g,g)),m=o.scaleToGeodeticSurface(t,hG),s=E_(m,g,a,s,o,c,1,y)}else g=h.subtract(t,e,Aw),g=h.normalize(g,g),r||(g=h.negate(g,g)),m=o.scaleToGeodeticSurface(t,hG),s=E_(m,g,a,s,o,c,1,1),n=h.clone(n,bEe),g=h.subtract(n,e,Aw),g=h.normalize(g,g),r||(g=h.negate(g,g)),m=o.scaleToGeodeticSurface(n,hG),s=E_(m,g,a,s,o,c,1,1);return s}X2.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,r=0;r<t;i=r++){let o=e[i],s=e[r];U.equals(o,s)||n.push(s)}return n};X2.angleIsGreaterThanPi=function(e,t,n,i){let r=new Vs(n,i),o=r.projectPointOntoPlane(h.add(n,e,mG),mG),s=r.projectPointOntoPlane(h.add(n,t,pG),pG);return s.x*o.y-s.y*o.x>=0};var Lmt=new h,Fmt=new h;X2.computePositions=function(e,t,n,i,r){let o=i._ellipsoid,s=Smt(e,o),a=i._granularity,c=i._cornerType,u=r?Nmt(t,n):yEe(t,n),f=r?yEe(t,n):void 0,d=n.height/2,p=n.width/2,g=e.length,m=[],y=r?[]:void 0,A=_mt,b=ymt,x=Amt,T=bmt,E=xmt,v=Tmt,S=Emt,I=Cmt,R=vmt,O=e[0],L=e[1];T=o.geodeticSurfaceNormal(O,T),A=h.subtract(L,O,A),A=h.normalize(A,A),I=h.cross(T,A,I),I=h.normalize(I,I);let _=s[0],C=s[1];r&&(y=E_(O,I,f,y,o,_+d,1,1)),R=h.clone(O,R),O=L,b=h.negate(A,b);let w,P;for(let V=1;V<g-1;V++){let B=r?2:1;if(L=e[V+1],O.equals(L)){_t("Positions are too close and are considered equivalent with rounding error.");continue}A=h.subtract(L,O,A),A=h.normalize(A,A),T=o.geodeticSurfaceNormal(O,T);let j=h.multiplyByScalar(T,h.dot(A,T),Lmt);h.subtract(A,j,j),h.normalize(j,j);let k=h.multiplyByScalar(T,h.dot(b,T),Fmt);if(h.subtract(b,k,k),h.normalize(k,k),!D.equalsEpsilon(Math.abs(h.dot(j,k)),1,D.EPSILON7)){x=h.add(A,b,x),x=h.normalize(x,x),x=h.cross(x,T,x),x=h.cross(T,x,x),x=h.normalize(x,x);let q=1/Math.max(.25,h.magnitude(h.cross(x,b,Aw))),Q=X2.angleIsGreaterThanPi(A,b,O,o);Q?(E=h.add(O,h.multiplyByScalar(x,q*p,x),E),v=h.add(E,h.multiplyByScalar(I,p,v),v),pc[0]=h.clone(R,pc[0]),pc[1]=h.clone(v,pc[1]),w=aee(pc,_+d,C+d,a),P=ir.generateArc({positions:pc,granularity:a,ellipsoid:o}),m=lee(P,I,u,m,o,w,1),I=h.cross(T,A,I),I=h.normalize(I,I),S=h.add(E,h.multiplyByScalar(I,p,S),S),c===rr.ROUNDED||c===rr.BEVELED?TEe(E,v,S,c,Q,o,m,u,C+d,r):(x=h.negate(x,x),m=E_(O,x,u,m,o,C+d,q,B)),R=h.clone(S,R)):(E=h.add(O,h.multiplyByScalar(x,q*p,x),E),v=h.add(E,h.multiplyByScalar(I,-p,v),v),pc[0]=h.clone(R,pc[0]),pc[1]=h.clone(v,pc[1]),w=aee(pc,_+d,C+d,a),P=ir.generateArc({positions:pc,granularity:a,ellipsoid:o}),m=lee(P,I,u,m,o,w,1),I=h.cross(T,A,I),I=h.normalize(I,I),S=h.add(E,h.multiplyByScalar(I,-p,S),S),c===rr.ROUNDED||c===rr.BEVELED?TEe(E,v,S,c,Q,o,m,u,C+d,r):m=E_(O,x,u,m,o,C+d,q,B),R=h.clone(S,R)),b=h.negate(A,b)}else m=E_(R,I,u,m,o,_+d,1,1),R=O;_=C,C=s[V+1],O=L}pc[0]=h.clone(R,pc[0]),pc[1]=h.clone(O,pc[1]),w=aee(pc,_+d,C+d,a),P=ir.generateArc({positions:pc,granularity:a,ellipsoid:o}),m=lee(P,I,u,m,o,w,1),r&&(y=E_(O,I,f,y,o,C+d,1,1)),g=m.length;let M=r?g+y.length:g,F=new Float64Array(M);return F.set(m),r&&F.set(y,g),F};var Pm=X2;var fee={},bw=new h,wEe=new h,Bmt=new h,EEe=new h,lu=[new h,new h],IEe=new h,PEe=new h,DEe=new h,kmt=new h,Umt=new h,zmt=new h,Vmt=new h,jmt=new h,Hmt=new h,Gmt=new h,CEe=new Le,vEe=new $;function gG(e,t,n,i,r){let o=h.angleBetween(h.subtract(t,e,bw),h.subtract(n,e,wEe)),s=i===rr.BEVELED?1:Math.ceil(o/D.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let u;r?u=$.fromQuaternion(Le.fromAxisAngle(h.negate(e,bw),o/s,CEe),vEe):u=$.fromQuaternion(Le.fromAxisAngle(e,o/s,CEe),vEe);let f=0;t=h.clone(t,bw);for(let d=0;d<s;d++)t=$.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function Wmt(e){let t=IEe,n=PEe,i=DEe,r=e[1];n=h.fromArray(e[1],r.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let o=gG(t,n,i,rr.ROUNDED,!1),s=e.length-1,a=e[s-1];r=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(r,0,i),t=h.midpoint(n,i,t);let c=gG(t,n,i,rr.ROUNDED,!1);return[o,c]}function SEe(e,t,n,i){let r=bw;return i?r=h.add(e,t,r):(t=h.negate(t,t),r=h.add(e,t,r)),[r.x,r.y,r.z,n.x,n.y,n.z]}function uee(e,t,n,i){let r=new Array(e.length),o=new Array(e.length),s=h.multiplyByScalar(t,n,bw),a=h.negate(s,wEe),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,Bmt),p=h.add(d,a,EEe);r[c++]=p.x,r[c++]=p.y,r[c++]=p.z;let g=h.add(d,s,EEe);o[u--]=g.z,o[u--]=g.y,o[u--]=g.x}return i.push(r,o),i}fee.addAttribute=function(e,t,n,i){let r=t.x,o=t.y,s=t.z;l(n)&&(e[n]=r,e[n+1]=o,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=o,e[i-2]=r)};var qmt=new h,Ymt=new h;fee.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,r=e.width/2,o=e.cornerType,s=e.saveAttributes,a=IEe,c=PEe,u=DEe,f=kmt,d=Umt,p=zmt,g=Vmt,m=jmt,y=Hmt,A=Gmt,b=[],x=s?[]:void 0,T=s?[]:void 0,E=n[0],v=n[1];c=h.normalize(h.subtract(v,E,c),c),a=i.geodeticSurfaceNormal(E,a),f=h.normalize(h.cross(a,c,f),f),s&&(x.push(f.x,f.y,f.z),T.push(a.x,a.y,a.z)),g=h.clone(E,g),E=v,u=h.negate(c,u);let S,I=[],R,O=n.length;for(R=1;R<O-1;R++){a=i.geodeticSurfaceNormal(E,a),v=n[R+1],c=h.normalize(h.subtract(v,E,c),c);let _=h.multiplyByScalar(a,h.dot(c,a),qmt);h.subtract(c,_,_),h.normalize(_,_);let C=h.multiplyByScalar(a,h.dot(u,a),Ymt);if(h.subtract(u,C,C),h.normalize(C,C),!D.equalsEpsilon(Math.abs(h.dot(_,C)),1,D.EPSILON7)){d=h.normalize(h.add(c,u,d),d),d=h.cross(d,a,d),d=h.cross(a,d,d),d=h.normalize(d,d);let P=r/Math.max(.25,h.magnitude(h.cross(d,u,bw))),M=Pm.angleIsGreaterThanPi(c,u,E,i);d=h.multiplyByScalar(d,P,d),M?(m=h.add(E,d,m),A=h.add(m,h.multiplyByScalar(f,r,A),A),y=h.add(m,h.multiplyByScalar(f,r*2,y),y),lu[0]=h.clone(g,lu[0]),lu[1]=h.clone(A,lu[1]),S=ir.generateArc({positions:lu,granularity:t,ellipsoid:i}),b=uee(S,f,r,b),s&&(x.push(f.x,f.y,f.z),T.push(a.x,a.y,a.z)),p=h.clone(y,p),f=h.normalize(h.cross(a,c,f),f),y=h.add(m,h.multiplyByScalar(f,r*2,y),y),g=h.add(m,h.multiplyByScalar(f,r,g),g),o===rr.ROUNDED||o===rr.BEVELED?I.push({leftPositions:gG(m,p,y,o,M)}):I.push({leftPositions:SEe(E,h.negate(d,d),y,M)})):(y=h.add(E,d,y),A=h.add(y,h.negate(h.multiplyByScalar(f,r,A),A),A),m=h.add(y,h.negate(h.multiplyByScalar(f,r*2,m),m),m),lu[0]=h.clone(g,lu[0]),lu[1]=h.clone(A,lu[1]),S=ir.generateArc({positions:lu,granularity:t,ellipsoid:i}),b=uee(S,f,r,b),s&&(x.push(f.x,f.y,f.z),T.push(a.x,a.y,a.z)),p=h.clone(m,p),f=h.normalize(h.cross(a,c,f),f),m=h.add(y,h.negate(h.multiplyByScalar(f,r*2,m),m),m),g=h.add(y,h.negate(h.multiplyByScalar(f,r,g),g),g),o===rr.ROUNDED||o===rr.BEVELED?I.push({rightPositions:gG(y,p,m,o,M)}):I.push({rightPositions:SEe(E,d,m,M)})),u=h.negate(c,u)}E=v}a=i.geodeticSurfaceNormal(E,a),lu[0]=h.clone(g,lu[0]),lu[1]=h.clone(E,lu[1]),S=ir.generateArc({positions:lu,granularity:t,ellipsoid:i}),b=uee(S,f,r,b),s&&(x.push(f.x,f.y,f.z),T.push(a.x,a.y,a.z));let L;return o===rr.ROUNDED&&(L=Wmt(b)),{positions:b,corners:I,lefts:x,normals:T,endPositions:L}};var mr=fee;var MEe=new h,NEe=new h,_G=new h,yG=new h,Xmt=new h,LEe=new h,GA=new h,xw=new h;function FEe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Dm(e,t,n,i,r,o){let s=e.normals,a=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,GA),GA);o.normal&&mr.addAttribute(s,t,i,r),o.tangent&&mr.addAttribute(a,u,i,r),o.bitangent&&mr.addAttribute(c,n,i,r)}function BEe(e,t,n){let i=e.positions,r=e.corners,o=e.endPositions,s=e.lefts,a=e.normals,c=new Tn,u=0,f=0,d,p=0,g;for(d=0;d<i.length;d+=2)g=i[d].length-3,u+=g,p+=g*2,f+=i[d+1].length-3;for(u+=3,f+=3,d=0;d<r.length;d++){let J=r[d].leftPositions;l(J)?(g=J.length,u+=g,p+=g):(g=r[d].rightPositions.length,f+=g,p+=g)}let m=l(o),y;m&&(y=o[0].length-3,u+=y,f+=y,y/=3,p+=y*6);let A=u+f,b=new Float64Array(A),x=t.normal?new Float32Array(A):void 0,T=t.tangent?new Float32Array(A):void 0,E=t.bitangent?new Float32Array(A):void 0,v={normals:x,tangents:T,bitangents:E},S=0,I=A-1,R,O,L,_,C=MEe,w=NEe,P,M,F=y/2,V=je.createTypedArray(A/3,p),B=0;if(m){M=_G,P=yG;let J=o[0];for(C=h.fromArray(a,0,C),w=h.fromArray(s,0,w),d=0;d<F;d++)M=h.fromArray(J,(F-1-d)*3,M),P=h.fromArray(J,(F+d)*3,P),mr.addAttribute(b,P,S),mr.addAttribute(b,M,void 0,I),Dm(v,C,w,S,I,t),O=S/3,_=O+1,R=(I-2)/3,L=R-1,V[B++]=R,V[B++]=O,V[B++]=L,V[B++]=L,V[B++]=O,V[B++]=_,S+=3,I-=3}let j=0,k=0,G=i[j++],q=i[j++];b.set(G,S),b.set(q,I-q.length+1),w=h.fromArray(s,k,w);let Q,W;for(g=q.length-3,d=0;d<g;d+=3)Q=n.geodeticSurfaceNormal(h.fromArray(G,d,GA),GA),W=n.geodeticSurfaceNormal(h.fromArray(q,g-d,xw),xw),C=h.normalize(h.add(Q,W,C),C),Dm(v,C,w,S,I,t),O=S/3,_=O+1,R=(I-2)/3,L=R-1,V[B++]=R,V[B++]=O,V[B++]=L,V[B++]=L,V[B++]=O,V[B++]=_,S+=3,I-=3;for(Q=n.geodeticSurfaceNormal(h.fromArray(G,g,GA),GA),W=n.geodeticSurfaceNormal(h.fromArray(q,g,xw),xw),C=h.normalize(h.add(Q,W,C),C),k+=3,d=0;d<r.length;d++){let J,Z=r[d],ae=Z.leftPositions,Ae=Z.rightPositions,fe,xe,ge=LEe,we=_G,Se=yG;if(C=h.fromArray(a,k,C),l(ae)){for(Dm(v,C,w,void 0,I,t),I-=3,fe=_,xe=L,J=0;J<ae.length/3;J++)ge=h.fromArray(ae,J*3,ge),V[B++]=fe,V[B++]=xe-J-1,V[B++]=xe-J,mr.addAttribute(b,ge,void 0,I),we=h.fromArray(b,(xe-J-1)*3,we),Se=h.fromArray(b,fe*3,Se),w=h.normalize(h.subtract(we,Se,w),w),Dm(v,C,w,void 0,I,t),I-=3;ge=h.fromArray(b,fe*3,ge),we=h.subtract(h.fromArray(b,xe*3,we),ge,we),Se=h.subtract(h.fromArray(b,(xe-J)*3,Se),ge,Se),w=h.normalize(h.add(we,Se,w),w),Dm(v,C,w,S,void 0,t),S+=3}else{for(Dm(v,C,w,S,void 0,t),S+=3,fe=L,xe=_,J=0;J<Ae.length/3;J++)ge=h.fromArray(Ae,J*3,ge),V[B++]=fe,V[B++]=xe+J,V[B++]=xe+J+1,mr.addAttribute(b,ge,S),we=h.fromArray(b,fe*3,we),Se=h.fromArray(b,(xe+J)*3,Se),w=h.normalize(h.subtract(we,Se,w),w),Dm(v,C,w,S,void 0,t),S+=3;ge=h.fromArray(b,fe*3,ge),we=h.subtract(h.fromArray(b,(xe+J)*3,we),ge,we),Se=h.subtract(h.fromArray(b,xe*3,Se),ge,Se),w=h.normalize(h.negate(h.add(Se,we,w),w),w),Dm(v,C,w,void 0,I,t),I-=3}for(G=i[j++],q=i[j++],G.splice(0,3),q.splice(q.length-3,3),b.set(G,S),b.set(q,I-q.length+1),g=q.length-3,k+=3,w=h.fromArray(s,k,w),J=0;J<q.length;J+=3)Q=n.geodeticSurfaceNormal(h.fromArray(G,J,GA),GA),W=n.geodeticSurfaceNormal(h.fromArray(q,g-J,xw),xw),C=h.normalize(h.add(Q,W,C),C),Dm(v,C,w,S,I,t),_=S/3,O=_-1,L=(I-2)/3,R=L+1,V[B++]=R,V[B++]=O,V[B++]=L,V[B++]=L,V[B++]=O,V[B++]=_,S+=3,I-=3;S-=3,I+=3}if(C=h.fromArray(a,a.length-3,C),Dm(v,C,w,S,I,t),m){S+=3,I-=3,M=_G,P=yG;let J=o[1];for(d=0;d<F;d++)M=h.fromArray(J,(y-d-1)*3,M),P=h.fromArray(J,d*3,P),mr.addAttribute(b,M,void 0,I),mr.addAttribute(b,P,S),Dm(v,C,w,S,I,t),_=S/3,O=_-1,L=(I-2)/3,R=L+1,V[B++]=R,V[B++]=O,V[B++]=L,V[B++]=L,V[B++]=O,V[B++]=_,S+=3,I-=3}if(c.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:b}),t.st){let J=new Float32Array(A/3*2),Z,ae,Ae=0;if(m){u/=3,f/=3;let fe=Math.PI/(y+1);ae=1/(u-y+1),Z=1/(f-y+1);let xe,ge=y/2;for(d=ge+1;d<y+1;d++)xe=D.PI_OVER_TWO+fe*d,J[Ae++]=Z*(1+Math.cos(xe)),J[Ae++]=.5*(1+Math.sin(xe));for(d=1;d<f-y+1;d++)J[Ae++]=d*Z,J[Ae++]=0;for(d=y;d>ge;d--)xe=D.PI_OVER_TWO-d*fe,J[Ae++]=1-Z*(1+Math.cos(xe)),J[Ae++]=.5*(1+Math.sin(xe));for(d=ge;d>0;d--)xe=D.PI_OVER_TWO-fe*d,J[Ae++]=1-ae*(1+Math.cos(xe)),J[Ae++]=.5*(1+Math.sin(xe));for(d=u-y;d>0;d--)J[Ae++]=d*ae,J[Ae++]=1;for(d=1;d<ge+1;d++)xe=D.PI_OVER_TWO+fe*d,J[Ae++]=ae*(1+Math.cos(xe)),J[Ae++]=.5*(1+Math.sin(xe))}else{for(u/=3,f/=3,ae=1/(u-1),Z=1/(f-1),d=0;d<f;d++)J[Ae++]=d*Z,J[Ae++]=0;for(d=u;d>0;d--)J[Ae++]=(d-1)*ae,J[Ae++]=1}c.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:v.normals})),t.tangent&&(c.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:v.tangents})),t.bitangent&&(c.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:v.bitangents})),{attributes:c,indices:V}}function Kmt(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,r;(t.normal||t.bitangent)&&(i=e.normal.values,r=e.bitangent.values);let o=e.position.values.length/18,s=o*3,a=o*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,d=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,g=MEe,m=NEe,y=_G,A=yG,b=Xmt,x=LEe,T=c;for(u=0;u<s;u+=3){let E=T+c;g=h.fromArray(n,u,g),m=h.fromArray(n,u+s,m),y=h.fromArray(n,(u+3)%s,y),m=h.subtract(m,g,m),y=h.subtract(y,g,y),A=h.normalize(h.cross(m,y,A),A),t.normal&&(mr.addAttribute(f,A,E),mr.addAttribute(f,A,E+3),mr.addAttribute(f,A,T),mr.addAttribute(f,A,T+3)),(t.tangent||t.bitangent)&&(x=h.fromArray(i,u,x),t.bitangent&&(mr.addAttribute(p,x,E),mr.addAttribute(p,x,E+3),mr.addAttribute(p,x,T),mr.addAttribute(p,x,T+3)),t.tangent&&(b=h.normalize(h.cross(x,A,b),b),mr.addAttribute(d,b,E),mr.addAttribute(d,b,E+3),mr.addAttribute(d,b,T),mr.addAttribute(d,b,T+3))),T+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(r),p.set(r,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let E=e.tangent.values;d.set(E),d.set(E,s),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(a*6);d.set(f),d.set(f,a);let p=a*2;for(let g=0;g<2;g++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<a;u+=2){let m=f[u],y=f[u+1];d[p++]=m,d[p++]=y,d[p++]=m,d[p++]=y}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function dee(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let r=e[i],o=e[i+1],s=e[i+2];n[t++]=r,n[t++]=o,n[t++]=s,n[t++]=r,n[t++]=o,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t]=e[2],n}function $mt(e,t){let n=new Be({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,r=mr.computePositions(e),o=BEe(r,n,i),s=e.height,a=e.extrudedHeight,c=o.attributes,u=o.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),g=new Float64Array(d);g.set(f);let m=new Float64Array(d*4);f=fi.scaleToGeodeticHeight(f,s,i),m=dee(f,0,m),g=fi.scaleToGeodeticHeight(g,a,i),m=dee(g,d*2,m),p.set(f),p.set(g,d),p.set(m,d*2),c.position.values=p,c=Kmt(c,t);let y,A=d/3;if(e.shadowVolume){let O=c.normal.values;d=O.length;let L=new Float32Array(d*6);for(y=0;y<d;y++)O[y]=-O[y];L.set(O,d),L=dee(O,d*4,L),c.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:L}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let O=new Uint8Array(A*6);if(e.offsetAttribute===mn.TOP)O=O.fill(1,0,A).fill(1,A*2,A*4);else{let L=e.offsetAttribute===mn.NONE?0:1;O=O.fill(L)}c.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}let b=u.length,x=A+A,T=je.createTypedArray(p.length/3,b*2+x*3);T.set(u);let E=b;for(y=0;y<b;y+=3){let O=u[y],L=u[y+1],_=u[y+2];T[E++]=_+A,T[E++]=L+A,T[E++]=O+A}let v,S,I,R;for(y=0;y<x;y+=2)v=y+x,S=v+x,I=v+1,R=S+1,T[E++]=v,T[E++]=S,T[E++]=I,T[E++]=I,T[E++]=S,T[E++]=R;return{attributes:c,indices:T}}var REe=new h,K2=new h,oh=new he;function OEe(e,t,n,i,r,o){let s=h.subtract(t,e,REe);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,K2),c=h.cross(s,a,REe);h.multiplyByScalar(c,i,c);let u=r.latitude,f=r.longitude,d=o.latitude,p=o.longitude;h.add(e,c,K2),n.cartesianToCartographic(K2,oh);let g=oh.latitude,m=oh.longitude;u=Math.min(u,g),f=Math.min(f,m),d=Math.max(d,g),p=Math.max(p,m),h.subtract(e,c,K2),n.cartesianToCartographic(K2,oh),g=oh.latitude,m=oh.longitude,u=Math.min(u,g),f=Math.min(f,m),d=Math.max(d,g),p=Math.max(p,m),r.latitude=u,r.longitude=f,o.latitude=d,o.longitude=p}var rh=new h,$2=new h,Ju=new he,Zu=new he;function kEe(e,t,n,i,r){e=FEe(e,t);let o=Fr(e,h.equalsEpsilon),s=o.length;if(s<2||n<=0)return new ie;let a=n*.5;Ju.latitude=Number.POSITIVE_INFINITY,Ju.longitude=Number.POSITIVE_INFINITY,Zu.latitude=Number.NEGATIVE_INFINITY,Zu.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===rr.ROUNDED){let p=o[0];h.subtract(p,o[1],rh),h.normalize(rh,rh),h.multiplyByScalar(rh,a,rh),h.add(p,rh,$2),t.cartesianToCartographic($2,oh),c=oh.latitude,u=oh.longitude,Ju.latitude=Math.min(Ju.latitude,c),Ju.longitude=Math.min(Ju.longitude,u),Zu.latitude=Math.max(Zu.latitude,c),Zu.longitude=Math.max(Zu.longitude,u)}for(let p=0;p<s-1;++p)OEe(o[p],o[p+1],t,a,Ju,Zu);let f=o[s-1];h.subtract(f,o[s-2],rh),h.normalize(rh,rh),h.multiplyByScalar(rh,a,rh),h.add(f,rh,$2),OEe(f,$2,t,a,Ju,Zu),i===rr.ROUNDED&&(t.cartesianToCartographic($2,oh),c=oh.latitude,u=oh.longitude,Ju.latitude=Math.min(Ju.latitude,c),Ju.longitude=Math.min(Ju.longitude,u),Zu.latitude=Math.max(Zu.latitude,c),Zu.longitude=Math.max(Zu.longitude,u));let d=l(r)?r:new ie;return d.north=Zu.latitude,d.south=Ju.latitude,d.east=Zu.longitude,d.west=Ju.longitude,d}function v_(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,r=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._vertexFormat=Be.clone(e.vertexFormat??Be.DEFAULT),this._width=n,this._height=Math.max(i,r),this._extrudedHeight=Math.min(i,r),this._cornerType=e.cornerType??rr.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._shadowVolume=e.shadowVolume??!1,this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+ee.packedLength+Be.packedLength+7}v_.pack=function(e,t,n){n=n??0;let i=e._positions,r=i.length;t[n++]=r;for(let o=0;o<r;++o,n+=h.packedLength)h.pack(i[o],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var UEe=ee.clone(ee.UNIT_SPHERE),zEe=new Be,C_={positions:void 0,ellipsoid:UEe,vertexFormat:zEe,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};v_.unpack=function(e,t,n){t=t??0;let i=e[t++],r=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)r[m]=h.unpack(e,t);let o=ee.unpack(e,t,UEe);t+=ee.packedLength;let s=Be.unpack(e,t,zEe);t+=Be.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,g=e[t];return l(n)?(n._positions=r,n._ellipsoid=ee.clone(o,n._ellipsoid),n._vertexFormat=Be.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=g===-1?void 0:g,n):(C_.positions=r,C_.width=a,C_.height=c,C_.extrudedHeight=u,C_.cornerType=f,C_.granularity=d,C_.shadowVolume=p,C_.offsetAttribute=g===-1?void 0:g,new v_(C_))};v_.computeRectangle=function(e,t){e=e??H.EMPTY_OBJECT;let n=e.positions,i=e.width,r=e.ellipsoid??ee.default,o=e.cornerType??rr.ROUNDED;return kEe(n,r,i,o,t)};v_.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=FEe(t,i);let r=Fr(t,h.equalsEpsilon);if(r.length<2||n<=0)return;let o=e._height,s=e._extrudedHeight,a=!D.equalsEpsilon(o,s,0,D.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:r,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=o,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=$mt(u,c);else{let g=mr.computePositions(u);if(f=BEe(g,c,i),f.attributes.position.values=fi.scaleToGeodeticHeight(f.attributes.position.values,o,i),l(e._offsetAttribute)){let m=e._offsetAttribute===mn.NONE?0:1,y=f.attributes.position.values.length,A=new Uint8Array(y/3).fill(m);f.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}}let d=f.attributes,p=ue.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new St({attributes:d,indices:f.indices,primitiveType:Oe.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};v_.createShadowVolume=function(e,t,n){let i=e._granularity,r=e._ellipsoid,o=t(i,r),s=n(i,r);return new v_({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:r,granularity:i,extrudedHeight:o,height:s,vertexFormat:Be.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(v_.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=kEe(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var JT=v_;var VEe=new h,jEe=new h,Jmt=new h;function Zmt(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function HEe(e,t){let n=[],i=e.positions,r=e.corners,o=e.endPositions,s=new Tn,a,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<r.length;f++){let M=r[f].leftPositions;l(M)?(p=M.length,c+=p,d+=p/3*2):(p=r[f].rightPositions.length,u+=p,d+=p/3*2)}let g=l(o),m;g&&(m=o[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let y=c+u,A=new Float64Array(y),b=0,x=y-1,T,E,v,S,I,R,O=m/2,L=je.createTypedArray(y/3,d+4),_=0;if(L[_++]=b/3,L[_++]=(x-2)/3,g){n.push(b/3),R=VEe,I=jEe;let M=o[0];for(f=0;f<O;f++)R=h.fromArray(M,(O-1-f)*3,R),I=h.fromArray(M,(O+f)*3,I),mr.addAttribute(A,I,b),mr.addAttribute(A,R,void 0,x),E=b/3,S=E+1,T=(x-2)/3,v=T-1,L[_++]=T,L[_++]=v,L[_++]=E,L[_++]=S,b+=3,x-=3}let C=0,w=i[C++],P=i[C++];for(A.set(w,b),A.set(P,x-P.length+1),p=P.length-3,n.push(b/3,(x-2)/3),f=0;f<p;f+=3)E=b/3,S=E+1,T=(x-2)/3,v=T-1,L[_++]=T,L[_++]=v,L[_++]=E,L[_++]=S,b+=3,x-=3;for(f=0;f<r.length;f++){let M;a=r[f];let F=a.leftPositions,V=a.rightPositions,B,j=Jmt;if(l(F)){for(x-=3,B=v,n.push(S),M=0;M<F.length/3;M++)j=h.fromArray(F,M*3,j),L[_++]=B-M-1,L[_++]=B-M,mr.addAttribute(A,j,void 0,x),x-=3;n.push(B-Math.floor(F.length/6)),t===rr.BEVELED&&n.push((x-2)/3+1),b+=3}else{for(b+=3,B=S,n.push(v),M=0;M<V.length/3;M++)j=h.fromArray(V,M*3,j),L[_++]=B+M,L[_++]=B+M+1,mr.addAttribute(A,j,b),b+=3;n.push(B+Math.floor(V.length/6)),t===rr.BEVELED&&n.push(b/3-1),x-=3}for(w=i[C++],P=i[C++],w.splice(0,3),P.splice(P.length-3,3),A.set(w,b),A.set(P,x-P.length+1),M=0;M<P.length;M+=3)S=b/3,E=S-1,v=(x-2)/3,T=v+1,L[_++]=T,L[_++]=v,L[_++]=E,L[_++]=S,b+=3,x-=3;b-=3,x+=3,n.push(b/3,(x-2)/3)}if(g){b+=3,x-=3,R=VEe,I=jEe;let M=o[1];for(f=0;f<O;f++)R=h.fromArray(M,(m-f-1)*3,R),I=h.fromArray(M,f*3,I),mr.addAttribute(A,R,void 0,x),mr.addAttribute(A,I,b),S=b/3,E=S-1,v=(x-2)/3,T=v+1,L[_++]=T,L[_++]=v,L[_++]=E,L[_++]=S,b+=3,x-=3;n.push(b/3)}else n.push(b/3,(x-2)/3);return L[_++]=b/3,L[_]=(x-2)/3,s.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:A}),{attributes:s,indices:L,wallIndices:n}}function Qmt(e){let t=e.ellipsoid,n=mr.computePositions(e),i=HEe(n,e.cornerType),r=i.wallIndices,o=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=fi.scaleToGeodeticHeight(u,o,t),d=fi.scaleToGeodeticHeight(d,s,t),p.set(u),p.set(d,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let T=new Uint8Array(f*2);if(e.offsetAttribute===mn.TOP)T=T.fill(1,0,f);else{let E=e.offsetAttribute===mn.NONE?0:1;T=T.fill(E)}a.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}let g,m=c.length,y=je.createTypedArray(p.length/3,(m+r.length)*2);y.set(c);let A=m;for(g=0;g<m;g+=2){let T=c[g],E=c[g+1];y[A++]=T+f,y[A++]=E+f}let b,x;for(g=0;g<r.length;g++)b=r[g],x=b+f,y[A++]=b,y[A++]=x;return{attributes:a,indices:y}}function J2(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,r=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._width=n,this._height=Math.max(i,r),this._extrudedHeight=Math.min(i,r),this._cornerType=e.cornerType??rr.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+ee.packedLength+6}J2.pack=function(e,t,n){n=n??0;let i=e._positions,r=i.length;t[n++]=r;for(let o=0;o<r;++o,n+=h.packedLength)h.pack(i[o],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=e._offsetAttribute??-1,t};var GEe=ee.clone(ee.UNIT_SPHERE),WA={positions:void 0,ellipsoid:GEe,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};J2.unpack=function(e,t,n){t=t??0;let i=e[t++],r=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)r[p]=h.unpack(e,t);let o=ee.unpack(e,t,GEe);t+=ee.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=r,n._ellipsoid=ee.clone(o,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(WA.positions=r,WA.width=s,WA.height=a,WA.extrudedHeight=c,WA.cornerType=u,WA.granularity=f,WA.offsetAttribute=d===-1?void 0:d,new J2(WA))};J2.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Zmt(t,i);let r=Fr(t,h.equalsEpsilon);if(r.length<2||n<=0)return;let o=e._height,s=e._extrudedHeight,a=!D.equalsEpsilon(o,s,0,D.EPSILON2),c={ellipsoid:i,positions:r,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=o,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=Qmt(c);else{let p=mr.computePositions(c);if(u=HEe(p,c.cornerType),u.attributes.position.values=fi.scaleToGeodeticHeight(u.attributes.position.values,o,i),l(e._offsetAttribute)){let g=u.attributes.position.values.length,m=e._offsetAttribute===mn.NONE?0:1,y=new Uint8Array(g/3).fill(m);u.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let f=u.attributes,d=ue.fromVertices(f.position.values,void 0,3);return new St({attributes:f,indices:u.indices,primitiveType:Oe.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var Z2=J2;var ept=new li(0);function uu(e){Pi.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(uu.prototype=Object.create(Pi.prototype),uu.prototype.constructor=uu);Object.defineProperties(uu.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});uu.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&Vl.isSupported(this._scene)};uu.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};uu.prototype._computeCenter=pe.throwInstantiationError;uu.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Pi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let r=this._entity[this._geometryPropertyName];if(!l(r))return;l(r.zIndex)&&(l(r.height)||l(r.extrudedHeight))&&_t(_t.geometryZIndex),this._zIndex=r.zIndex??ept,l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let o=r.heightReference,s=r.extrudedHeightReference;if(l(o)||l(s)){let a=new em(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new Ux(this._scene,a,o,s)}};uu.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Pi.prototype.destroy.call(this)};uu.getGeometryHeight=function(e,t){if(!l(e)){t!==We.NONE&&_t(_t.geometryHeightReference);return}return _s(t)?0:e};uu.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==We.NONE&&_t(_t.geometryExtrudedHeightReference);return}return _s(t)?uu.CLAMP_TO_GROUND:e};uu.CLAMP_TO_GROUND="clamp";uu.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=We.NONE),(!l(n)||!l(i))&&(i=We.NONE);let r=0;if(t!==We.NONE&&r++,i===We.RELATIVE_TO_GROUND&&r++,r===2)return mn.ALL;if(r===1)return mn.TOP};var ii=uu;var WEe=new z,qEe=h.ZERO,YEe=new h,XEe=new ie;function tpt(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function Rm(e,t){ii.call(this,{entity:e,scene:t,geometryOptions:new tpt(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(Rm.prototype=Object.create(ii.prototype),Rm.prototype.constructor=Rm);Rm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let r;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(r=this._materialProperty.color.getValue(e,WEe)),l(r)||(r=z.WHITE),i.color=Jt.fromColor(r)}return l(this._options.offsetAttribute)&&(i.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,qEe,YEe))),new Ft({id:t,geometry:new JT(this._options),attributes:i})};Rm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,WEe),r={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,qEe,YEe))),new Ft({id:t,geometry:new Z2(this._options),attributes:r})};Rm.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return h.clone(n[Math.floor(n.length/2)],t)};Rm.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||Pi.prototype._isHidden.call(this,e,t)};Rm.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.width)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.cornerType)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};Rm.prototype._setStaticOptions=function(e,t){let n=X.getValueOrUndefined(t.height,tt.MINIMUM_VALUE),i=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),r=X.getValueOrUndefined(t.extrudedHeight,tt.MINIMUM_VALUE),o=X.getValueOrDefault(t.extrudedHeightReference,tt.MINIMUM_VALUE,We.NONE);l(r)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Kt?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(tt.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(tt.MINIMUM_VALUE),s.granularity=X.getValueOrUndefined(t.granularity,tt.MINIMUM_VALUE),s.cornerType=X.getValueOrUndefined(t.cornerType,tt.MINIMUM_VALUE),s.offsetAttribute=ii.computeGeometryOffsetAttribute(n,i,r,o),s.height=ii.getGeometryHeight(n,i),r=ii.getGeometryExtrudedHeight(r,o),r===ii.CLAMP_TO_GROUND&&(r=Mi.getMinimumMaximumHeights(JT.computeRectangle(s,XEe)).minimumTerrainHeight),s.extrudedHeight=r};Rm.DynamicGeometryUpdater=Tw;function Tw(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Tw.prototype=Object.create(Ii.prototype),Tw.prototype.constructor=Tw);Tw.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||Ii.prototype._isHidden.call(this,e,t,n)};Tw.prototype._setOptions=function(e,t,n){let i=this._options,r=X.getValueOrUndefined(t.height,n),o=X.getValueOrDefault(t.heightReference,n,We.NONE),s=X.getValueOrUndefined(t.extrudedHeight,n),a=X.getValueOrDefault(t.extrudedHeightReference,n,We.NONE);l(s)&&!l(r)&&(r=0),i.positions=X.getValueOrUndefined(t.positions,n),i.width=X.getValueOrUndefined(t.width,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.cornerType=X.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=ii.computeGeometryOffsetAttribute(r,o,s,a),i.height=ii.getGeometryHeight(r,o),s=ii.getGeometryExtrudedHeight(s,a),s===ii.CLAMP_TO_GROUND&&(s=Mi.getMinimumMaximumHeights(JT.computeRectangle(i,XEe)).minimumTerrainHeight),i.extrudedHeight=s};var Q2=Rm;function AG(){pe.throwInstantiationError()}Object.defineProperties(AG.prototype,{name:{get:pe.throwInstantiationError},clock:{get:pe.throwInstantiationError},entities:{get:pe.throwInstantiationError},isLoading:{get:pe.throwInstantiationError},changedEvent:{get:pe.throwInstantiationError},errorEvent:{get:pe.throwInstantiationError},loadingEvent:{get:pe.throwInstantiationError},show:{get:pe.throwInstantiationError},clustering:{get:pe.throwInstantiationError}});AG.prototype.update=function(e){pe.throwInstantiationError()};AG.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var Ds=AG;function s0(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(s0.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var KEe=new h;s0.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,KEe);return mee(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};s0.prototype.isScaledSpacePointVisible=function(e){return mee(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var npt=new h;s0.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,r;return l(t)&&t<0&&n.minimumRadius>-t?(r=npt,r.x=this._cameraPosition.x/(n.radii.x+t),r.y=this._cameraPosition.y/(n.radii.y+t),r.z=this._cameraPosition.z/(n.radii.z+t),i=r.x*r.x+r.y*r.y+r.z*r.z-1):(r=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),mee(e,r,i)};s0.prototype.computeHorizonCullingPoint=function(e,t,n){return ZEe(this._ellipsoid,e,t,n)};var $Ee=ee.clone(ee.UNIT_SPHERE);s0.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let r=JEe(this._ellipsoid,n,$Ee);return ZEe(r,e,t,i)};s0.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,r){return QEe(this._ellipsoid,e,t,n,i,r)};s0.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,r,o){let s=JEe(this._ellipsoid,r,$Ee);return QEe(s,e,t,n,i,o)};var ipt=[];s0.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ie.subsample(e,t,0,ipt),r=ue.fromPoints(i);if(!(h.magnitude(r.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(r.center,i,n)};var rpt=new h;function JEe(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,rpt);e=ee.fromCartesian3(i,n)}return e}function ZEe(e,t,n,i){l(i)||(i=new h);let r=nCe(e,t),o=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],u=eCe(e,c,r);if(u<0)return;o=Math.max(o,u)}return tCe(r,o,i)}var bG=new h;function QEe(e,t,n,i,r,o){l(o)||(o=new h),i=i??3,r=r??h.ZERO;let s=nCe(e,t),a=0;for(let c=0,u=n.length;c<u;c+=i){bG.x=n[c]+r.x,bG.y=n[c+1]+r.y,bG.z=n[c+2]+r.z;let f=eCe(e,bG,s);if(f<0)return;a=Math.max(a,f)}return tCe(s,a,o)}function mee(e,t,n){let i=t,r=n,o=h.subtract(e,i,KEe),s=-h.dot(o,i);return!(r<0?s>0:s>r&&s*s/h.magnitudeSquared(o)>r)}var opt=new h,spt=new h;function eCe(e,t,n){let i=e.transformPositionToScaledSpace(t,opt),r=h.magnitudeSquared(i),o=Math.sqrt(r),s=h.divideByScalar(i,o,spt);r=Math.max(1,r),o=Math.max(1,o);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),u=1/o,f=Math.sqrt(r-1)*u;return 1/(a*u-c*f)}function tCe(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var hee=new h;function nCe(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,hee),h.normalize(hee,hee))}var Om=s0;function cs(e,t){e=e??H.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=qt.clone(n)),l(i)&&(i=qt.clone(i)),l(r)&&(r=jt.clone(r)),this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),this._actualPosition=h.clone(this._position),this._color=z.clone(e.color??z.WHITE),this._outlineColor=z.clone(e.outlineColor??z.TRANSPARENT),this._outlineWidth=e.outlineWidth??0,this._pixelSize=e.pixelSize??10,this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance??0,this._id=e.id,this._collection=e.collection??t,this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1,this._splitDirection=e.splitDirection??Vo.NONE}var iCe=cs.SHOW_INDEX=0,sCe=cs.POSITION_INDEX=1,apt=cs.COLOR_INDEX=2,cpt=cs.OUTLINE_COLOR_INDEX=3,lpt=cs.OUTLINE_WIDTH_INDEX=4,upt=cs.PIXEL_SIZE_INDEX=5,fpt=cs.SCALE_BY_DISTANCE_INDEX=6,dpt=cs.TRANSLUCENCY_BY_DISTANCE_INDEX=7,hpt=cs.DISTANCE_DISPLAY_CONDITION_INDEX=8,mpt=cs.DISABLE_DEPTH_DISTANCE_INDEX=9,ppt=cs.SPLIT_DIRECTION_INDEX=10;cs.NUMBER_OF_PROPERTIES=11;function Xf(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(cs.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Xf(this,iCe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),h.clone(e,this._actualPosition),Xf(this,sCe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;qt.equals(t,e)||(this._scaleByDistance=qt.clone(e,t),Xf(this,fpt))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;qt.equals(t,e)||(this._translucencyByDistance=qt.clone(e,t),Xf(this,dpt))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Xf(this,upt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;z.equals(t,e)||(z.clone(e,t),Xf(this,apt))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),Xf(this,cpt))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Xf(this,lpt))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){jt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=jt.clone(e,this._distanceDisplayCondition),Xf(this,hpt))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Xf(this,mpt))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Xf(this,iCe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Xf(this,ppt))}}});cs.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};cs.prototype._getActualPosition=function(){return this._actualPosition};cs.prototype._setActualPosition=function(e){h.clone(e,this._actualPosition),Xf(this,sCe)};var rCe=new se;cs._computeActualPosition=function(e,t,n){return t.mode===re.SCENE3D?e:(N.multiplyByPoint(n,e,rCe),dr.computeActualEllipsoidPosition(t,rCe))};var oCe=new se;cs._computeScreenSpacePosition=function(e,t,n,i){let r=N.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,oCe),oCe);return dr.worldToWindowCoordinates(n,r,i)};cs.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new U);let i=n.modelMatrix,r=cs._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(r))return r.y=e.canvas.clientHeight-r.y,r};cs.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,r=i*.5,o=t.x-r,s=t.y-r,a=i,c=i;return l(n)||(n=new et),n.x=o,n.y=s,n.width=a,n.height=c,n};cs.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&h.equals(this._position,e._position)&&z.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&z.equals(this._outlineColor,e._outlineColor)&&qt.equals(this._scaleByDistance,e._scaleByDistance)&&qt.equals(this._translucencyByDistance,e._translucencyByDistance)&&jt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};cs.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var Ia=cs;var qA=`in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerPercent;
in float v_pixelDistance;
in vec4 v_pickColor;
in float v_splitDirection;
void main()
{
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
float maxDistance = max(0.0, 0.5 - v_pixelDistance);
float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
vec4 color = mix(v_outlineColor, v_color, innerAlpha);
color.a *= wholeAlpha;
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
if (color.a < 0.005)
{
discard;
}
#else
#ifdef OPAQUE
if (color.a < 0.995)
{
discard;
}
#else
if (color.a >= 0.995)
{
discard;
}
#endif
#endif
out_FragColor = czm_gammaCorrect(color);
czm_writeLogDepth();
}
`;var ek=`uniform float u_maxTotalPointSize;
in vec4 positionHighAndSize;
in vec4 positionLowAndOutline;
in vec4 compressedAttribute0;
in vec4 compressedAttribute1;
in vec4 scaleByDistance;
in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection;
out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerPercent;
out float v_pixelDistance;
out vec4 v_pickColor;
out float v_splitDirection;
const float SHIFT_LEFT8 = 256.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
void main()
{
vec3 positionHigh = positionHighAndSize.xyz;
vec3 positionLow = positionLowAndOutline.xyz;
float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
float totalSize = positionHighAndSize.w + outlineWidthBothSides;
float outlinePercent = outlineWidthBothSides / totalSize;
totalSize *= czm_pixelRatio;
float temp = compressedAttribute1.x * SHIFT_RIGHT8;
float show = floor(temp);
#ifdef EYE_DISTANCE_TRANSLUCENCY
vec4 translucencyByDistance;
translucencyByDistance.x = compressedAttribute1.z;
translucencyByDistance.z = compressedAttribute1.w;
translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
temp = compressedAttribute1.y * SHIFT_RIGHT8;
translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif
vec4 color = czm_decodeRGB8(compressedAttribute0.x);
vec4 outlineColor = czm_decodeRGB8(compressedAttribute0.y);
vec4 pickColor = czm_decodeRGB8(compressedAttribute0.z);
vec4 alphaPacked = czm_decodeRGB8(compressedAttribute0.w);
color.a = alphaPacked.x;
outlineColor.a = alphaPacked.y;
pickColor.a = alphaPacked.z;
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
lengthSq = czm_eyeHeight2D.y;
}
else
{
lengthSq = dot(positionEC.xyz, positionEC.xyz);
}
#endif
#ifdef EYE_DISTANCE_SCALING
totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
#endif
if (totalSize > 0.0) {
totalSize += 3.0;
}
totalSize = min(totalSize, u_maxTotalPointSize);
if (totalSize < 1.0)
{
positionEC.xyz = vec3(0.0);
totalSize = 1.0;
}
float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
if (translucency < 0.004)
{
positionEC.xyz = vec3(0.0);
}
#endif
#ifdef DISTANCE_DISPLAY_CONDITION
float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
if (lengthSq < nearSq || lengthSq > farSq) {
positionEC.xyz = vec3(0.0, 0.0, 1.0);
}
#endif
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
#ifdef DISABLE_DEPTH_DISTANCE
float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
{
disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
}
if (disableDepthTestDistance != 0.0)
{
float zclip = gl_Position.z / gl_Position.w;
bool clipped = (zclip < -1.0 || zclip > 1.0);
if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
{
gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
czm_vertexLogDepth(vec4(czm_currentFrustum.x));
#endif
}
}
#endif
v_color = color;
v_color.a *= translucency * show;
v_outlineColor = outlineColor;
v_outlineColor.a *= translucency * show;
v_innerPercent = 1.0 - outlinePercent;
v_pixelDistance = 2.0 / totalSize;
gl_PointSize = totalSize * show;
gl_Position *= show;
v_pickColor = pickColor;
v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
}
`;var gpt=Ia.SHOW_INDEX,_ee=Ia.POSITION_INDEX,aCe=Ia.COLOR_INDEX,_pt=Ia.OUTLINE_COLOR_INDEX,ypt=Ia.OUTLINE_WIDTH_INDEX,Apt=Ia.PIXEL_SIZE_INDEX,cCe=Ia.SCALE_BY_DISTANCE_INDEX,lCe=Ia.TRANSLUCENCY_BY_DISTANCE_INDEX,uCe=Ia.DISTANCE_DISPLAY_CONDITION_INDEX,bpt=Ia.DISABLE_DEPTH_DISTANCE_INDEX,xpt=Ia.SPLIT_DIRECTION_INDEX,yee=Ia.NUMBER_OF_PROPERTIES,yl={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function sh(e){e=e??H.EMPTY_OBJECT,this._sp=void 0,this._spTranslucent=void 0,this._rsOpaque=void 0,this._rsTranslucent=void 0,this._vaf=void 0,this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!1,this._shaderScaleByDistance=!1,this._compiledShaderScaleByDistance=!1,this._shaderTranslucencyByDistance=!1,this._compiledShaderTranslucencyByDistance=!1,this._shaderDistanceDisplayCondition=!1,this._compiledShaderDistanceDisplayCondition=!1,this._shaderDisableDepthDistance=!1,this._compiledShaderDisableDepthDistance=!1,this._propertiesChanged=new Uint32Array(yee),this._maxPixelSize=1,this._baseVolume=new ue,this._baseVolumeWC=new ue,this._baseVolume2D=new ue,this._boundingVolume=new ue,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=N.clone(N.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Fi.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW,Me.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(sh.prototype,{length:{get:function(){return Aee(this),this._pointPrimitives.length}}});function fCe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}sh.prototype.add=function(e){let t=new Ia(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};sh.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};sh.prototype.removeAll=function(){fCe(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function Aee(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;let t=[],n=e._pointPrimitives,i=n.length;for(let r=0,o=0;r<i;++r){let s=n[r];s&&(s._index=o++,t.push(s))}e._pointPrimitives=t}}sh.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};sh.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};sh.prototype.get=function(e){return Aee(this),this._pointPrimitives[e]};sh.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<yee;++i){let r=n[i]===0?Me.STATIC_DRAW:Me.STREAM_DRAW;t=t||e[i]!==r,e[i]=r}return t};function Tpt(e,t,n){return new n_(e,[{index:yl.positionHighAndSize,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[_ee]},{index:yl.positionLowAndShow,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[_ee]},{index:yl.compressedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[aCe]},{index:yl.compressedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[lCe]},{index:yl.scaleByDistance,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[cCe]},{index:yl.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:n[uCe]}],t)}var pee=new Sn,xG=new z;function dCe(e,t,n,i){let r=i._index,o=i._getActualPosition();e._mode===re.SCENE3D&&(ue.expand(e._baseVolume,o,e._baseVolume),e._boundingVolumeDirty=!0),Sn.fromCartesian(o,pee);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let c=n[yl.positionHighAndSize],u=pee.high;c(r,u.x,u.y,u.z,s);let f=n[yl.positionLowAndOutline],d=pee.low;f(r,d.x,d.y,d.z,a)}var Ept=256;function hCe(e,t,n,i){let r=i._index,o=i.color,s=i.outlineColor,a=i.getPickId(t).color;xG.red=o.alpha,xG.green=s.alpha,xG.blue=a.alpha;let c=n[yl.compressedAttribute0];c(r,cn.encodeRGB8(o),cn.encodeRGB8(s),cn.encodeRGB8(a),cn.encodeRGB8(xG))}function mCe(e,t,n,i){let r=i._index,o=0,s=1,a=1,c=1,u=i.translucencyByDistance;l(u)&&(o=u.near,s=u.nearValue,a=u.far,c=u.farValue,(s!==1||c!==1)&&(e._shaderTranslucencyByDistance=!0));let f=i.show&&i.clusterShow;i.color.alpha===0&&i.outlineColor.alpha===0&&(f=!1),s=D.clamp(s,0,1),s=s===1?255:s*255|0;let d=(f?1:0)*Ept+s;c=D.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,g=n[yl.compressedAttribute1];g(r,d,p,o,a)}function pCe(e,t,n,i){let r=i._index,o=n[yl.scaleByDistance],s=0,a=1,c=1,u=1,f=i.scaleByDistance;l(f)&&(s=f.near,a=f.nearValue,c=f.far,u=f.farValue,(a!==1||u!==1)&&(e._shaderScaleByDistance=!0)),o(r,s,a,c,u)}function gCe(e,t,n,i){let r=i._index,o=n[yl.distanceDisplayConditionAndDisableDepthAndSplitDirection],s=0,a=Number.MAX_VALUE,c=i.distanceDisplayCondition;l(c)&&(s=c.near,a=c.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let u=i.disableDepthTestDistance;u*=u,u>0&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let f=0,d=i.splitDirection;l(d)&&(f=d),o(r,s,a,u,f)}function Cpt(e,t,n,i){dCe(e,t,n,i),hCe(e,t,n,i),mCe(e,t,n,i),pCe(e,t,n,i),gCe(e,t,n,i)}function gee(e,t,n,i,r,o){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let u=t[c],f=u.position,d=Ia._computeActualPosition(f,i,r);l(d)&&(u._setActualPosition(d),o?a.push(d):ue.expand(s,d,s))}o&&ue.fromPoints(a,s)}function vpt(e,t){let n=t.mode,i=e._pointPrimitives,r=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==re.SCENE3D&&!N.equals(o,e.modelMatrix)?(e._mode=n,N.clone(e.modelMatrix,o),e._createVertexArray=!0,(n===re.SCENE3D||n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&gee(e,i,i.length,t,o,!0)):n===re.MORPHING?gee(e,i,i.length,t,o,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&gee(e,r,e._pointPrimitivesToUpdateIndex,t,o,!1)}function Spt(e,t,n){let r=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=r}var wpt=[];sh.prototype.update=function(e){if(Aee(this),!this.show)return;this._maxTotalPointSize=Ut.maximumAliasedPointSize,vpt(this,e);let n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,r=this._pointPrimitivesToUpdateIndex,o=this._propertiesChanged,s=this._createVertexArray,a,c=e.context,u=e.passes,f=u.pick;if(s||!f&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let v=0;v<yee;++v)o[v]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Tpt(c,n,this._buffersUsage),a=this._vaf.writers;for(let v=0;v<n;++v){let S=this._pointPrimitives[v];S._dirty=!1,Cpt(this,c,a,S)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(r>0){let v=wpt;v.length=0,(o[_ee]||o[ypt]||o[Apt])&&v.push(dCe),(o[aCe]||o[_pt])&&v.push(hCe),(o[gpt]||o[lCe])&&v.push(mCe),o[cCe]&&v.push(pCe),(o[uCe]||o[bpt]||o[xpt])&&v.push(gCe);let S=v.length;if(a=this._vaf.writers,r/n>.1){for(let I=0;I<r;++I){let R=i[I];R._dirty=!1;for(let O=0;O<S;++O)v[O](this,c,a,R)}this._vaf.commit()}else{for(let I=0;I<r;++I){let R=i[I];R._dirty=!1;for(let O=0;O<S;++O)v[O](this,c,a,R);this._vaf.subCommit(R._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(r>n*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,ue.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let d,p=N.IDENTITY;e.mode===re.SCENE3D?(p=this.modelMatrix,d=ue.clone(this._baseVolumeWC,this._boundingVolume)):d=ue.clone(this._baseVolume2D,this._boundingVolume),Spt(this,e,d);let g=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,g&&(this._blendOption===Fi.OPAQUE||this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ge.fromCache({depthTest:{enabled:!0,func:te.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Fi.TRANSLUCENT||this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ge.fromCache({depthTest:{enabled:!0,func:te.LEQUAL},depthMask:!1,blending:tn.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let m,y;(g||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(m=new Ye({sources:[ek]}),this._shaderScaleByDistance&&m.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&m.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&m.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&m.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT&&(y=new Ye({defines:["OPAQUE"],sources:[qA]}),this._sp=en.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:y,attributeLocations:yl}),y=new Ye({defines:["TRANSLUCENT"],sources:[qA]}),this._spTranslucent=en.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:y,attributeLocations:yl})),this._blendOption===Fi.OPAQUE&&(y=new Ye({sources:[qA]}),this._sp=en.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:y,attributeLocations:yl})),this._blendOption===Fi.TRANSLUCENT&&(y=new Ye({sources:[qA]}),this._spTranslucent=en.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:y,attributeLocations:yl})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let A,b,x,T,E=e.commandList;if(u.render||f){let v=this._colorCommands,S=this._blendOption===Fi.OPAQUE,I=this._blendOption===Fi.OPAQUE_AND_TRANSLUCENT;A=this._vaf.va,b=A.length,v.length=b;let R=I?b*2:b;for(T=0;T<R;++T){let O=S||I&&T%2===0;x=v[T],l(x)||(x=v[T]=new at),x.primitiveType=Oe.POINTS,x.pass=O||!I?Ie.OPAQUE:Ie.TRANSLUCENT,x.owner=this;let L=I?Math.floor(T/2):T;x.boundingVolume=d,x.modelMatrix=p,x.shaderProgram=O?this._sp:this._spTranslucent,x.uniformMap=this._uniforms,x.vertexArray=A[L].va,x.renderState=O?this._rsOpaque:this._rsTranslucent,x.debugShowBoundingVolume=this.debugShowBoundingVolume,x.pickId="v_pickColor",E.push(x)}}};sh.prototype.isDestroyed=function(){return!1};sh.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),fCe(this._pointPrimitives),le(this)};var Ew=sh;var _Ce=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],bee=1,tk=8,ls=new Uint32Array(96),ik=class e{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[n,i]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let r=i>>4;if(r!==bee)throw new Error(`Got v${r} data when expected v${bee}.`);let o=_Ce[i&15];if(!o)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,o,void 0,t)}constructor(t,n=64,i=Float64Array,r=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let s=_Ce.indexOf(this.ArrayType),a=t*2*this.ArrayType.BYTES_PER_ELEMENT,c=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${i}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,tk,t),this.coords=new i(o,tk+c+u,t*2),this._pos=t*2,this._finished=!0;else{let f=this.data=new r(tk+a+c+u);this.ids=new this.IndexArrayType(f,tk,t),this.coords=new i(f,tk+c+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(f,0,2).set([219,(bee<<4)+s]),new Uint16Array(f,2,1)[0]=n,new Uint32Array(f,4,1)[0]=t}}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Tee(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:a}=this;ls[0]=0,ls[1]=o.length-1,ls[2]=0;let c=3,u=[];for(;c>0;){let f=ls[--c],d=ls[--c],p=ls[--c];if(d-p<=a){for(let A=p;A<=d;A++){let b=s[2*A],x=s[2*A+1];b>=t&&b<=i&&x>=n&&x<=r&&u.push(o[A])}continue}let g=p+d>>1,m=s[2*g],y=s[2*g+1];m>=t&&m<=i&&y>=n&&y<=r&&u.push(o[g]),(f===0?t<=m:n<=y)&&(ls[c++]=p,ls[c++]=g-1,ls[c++]=1-f),(f===0?i>=m:r>=y)&&(ls[c++]=g+1,ls[c++]=d,ls[c++]=1-f)}return u}within(t,n,i){let r=[];return this.withinInto(t,n,i,r),r}withinInto(t,n,i,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:s,nodeSize:a}=this;ls[0]=0,ls[1]=o.length-1,ls[2]=0;let c=3,u=0,f=i*i;for(;c>0;){let d=ls[--c],p=ls[--c],g=ls[--c];if(p-g<=a){for(let b=g;b<=p;b++)yCe(s[2*b],s[2*b+1],t,n)<=f&&(r[u++]=o[b]);continue}let m=g+p>>1,y=s[2*m],A=s[2*m+1];yCe(y,A,t,n)<=f&&(r[u++]=o[m]),(d===0?t-i<=y:n-i<=A)&&(ls[c++]=g,ls[c++]=m-1,ls[c++]=1-d),(d===0?t+i>=y:n+i>=A)&&(ls[c++]=m+1,ls[c++]=p,ls[c++]=1-d)}return u}};function Tee(e,t,n,i,r,o){if(r-i<=n)return;let s=i+r>>1;ACe(e,t,s,i,r,o),Tee(e,t,n,i,s-1,1-o),Tee(e,t,n,s+1,r,1-o)}function ACe(e,t,n,i,r,o){for(;r>i;){if(r-i>600){let u=r-i+1,f=n-i+1,d=Math.log(u),p=.5*Math.exp(2*d/3),g=.5*Math.sqrt(d*p*(u-p)/u)*(f-u/2<0?-1:1),m=Math.max(i,Math.floor(n-f*p/u+g)),y=Math.min(r,Math.floor(n+(u-f)*p/u+g));ACe(e,t,n,m,y,o)}let s=t[2*n+o],a=i,c=r;for(nk(e,t,i,n),t[2*r+o]>s&&nk(e,t,i,r);a<c;){for(nk(e,t,a,c),a++,c--;t[2*a+o]<s;)a++;for(;t[2*c+o]>s;)c--}t[2*i+o]===s?nk(e,t,i,c):(c++,nk(e,t,c,r)),c<=n&&(i=c+1),n<=c&&(r=c-1)}}function nk(e,t,n,i){xee(e,n,i),xee(t,2*n,2*i),xee(t,2*n+1,2*i+1)}function xee(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function yCe(e,t,n,i){let r=e-n,o=t-i;return r*r+o*o}function Mm(e){e=e??H.EMPTY_OBJECT,this._enabled=e.enabled??!1,this._pixelRange=e.pixelRange??80,this._minimumClusterSize=e.minimumClusterSize??2,this._clusterBillboards=e.clusterBillboards??!0,this._clusterLabels=e.clusterLabels??!0,this._clusterPoints=e.clusterPoints??!0,this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new be,this.show=e.show??!0}function bCe(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var Ipt=new et;function xCe(e,t,n,i,r){if(l(e._labelCollection)&&i._clusterLabels?r=IA.getScreenSpaceBoundingBox(e,t,r):l(e._billboardCollection)&&i._clusterBillboards?r=Br.getScreenSpaceBoundingBox(e,t,r):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(r=Ia.getScreenSpaceBoundingBox(e,t,r)),bCe(r,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&ECe(i,e.id.id)&&l(e.id._label)){let o=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(o),a=IA.getScreenSpaceBoundingBox(s,t,Ipt);bCe(a,n),r=et.union(r,a,r)}return r}function Ppt(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&ECe(t,e.id.id)&&l(e.id._label)){let n=t._collectionIndicesByEntity[e.id.id].labelIndex,i=t._labelCollection.get(n);i.clusterShow=!0}}function TCe(e,t,n,i){let r={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=n,r.billboard.position=r.label.position=r.point.position=e,i._clusterEvent.raiseEvent(n,r)}function ECe(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function Eee(e,t,n,i,r){if(!l(e))return;let o=e.length;for(let s=0;s<o;++s){let a=e.get(s);if(a.clusterShow=!1,!a.show||r._scene.mode===re.SCENE3D&&!i.isPointVisible(a.position))continue;let c=r._clusterLabels&&l(a._labelCollection),u=r._clusterBillboards&&l(a.id._billboard),f=r._clusterPoints&&l(a.id._point);if(c&&(f||u))continue;let d=a.computeScreenSpacePosition(n);l(d)&&t.push({index:s,collection:e,clustered:!1,coord:d})}}var Dpt=new et,Rpt=new et,Opt=new et;function Mpt(e){return function(t){if(l(t)&&t<.05||!e.enabled)return;let n=e._scene,i=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if(!l(i)&&!l(r)&&!l(o)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let s=e._clusterLabelCollection,a=e._clusterBillboardCollection,c=e._clusterPointCollection;l(s)?s.removeAll():s=e._clusterLabelCollection=new e0({scene:n}),l(a)?a.removeAll():a=e._clusterBillboardCollection=new Gf({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new Ew;let u=e._pixelRange,f=e._minimumClusterSize,d=e._previousClusters,p=[],g=e._previousHeight,m=n.camera.positionCartographic.height,y=n.ellipsoid,A=n.camera.positionWC,b=new Om(y,A),x=[];e._clusterLabels&&Eee(i,x,n,b,e),e._clusterBillboards&&Eee(r,x,n,b,e),e._clusterPoints&&Eee(o,x,n,b,e);let T,E,v,S,I,R,O,L,_,C,w,P;if(x.length>0){let M=new ik(x.length,64,Float64Array);for(let F=0;F<x.length;++F)M.add(x[F].coord.x,x[F].coord.y);if(M.finish(),m<g)for(v=d.length,T=0;T<v;++T){let F=d[T];if(!b.isPointVisible(F.position))continue;let V=Br._computeScreenSpacePosition(N.IDENTITY,F.position,h.ZERO,U.ZERO,n);if(!l(V))continue;let B=1-m/g,j=F.width=F.width*B,k=F.height=F.height*B;j=Math.max(j,F.minimumWidth),k=Math.max(k,F.minimumHeight);let G=V.x-j*.5,q=V.y-k*.5,Q=V.x+j,W=V.y+k;for(I=M.range(G,q,Q,W),R=I.length,C=0,_=[],E=0;E<R;++E)O=I[E],L=x[O],L.clustered||(++C,w=L.collection,P=L.index,_.push(w.get(P).id));if(C>=f)for(TCe(F.position,C,_,e),p.push(F),E=0;E<R;++E)x[I[E]].clustered=!0}for(v=x.length,T=0;T<v;++T){let F=x[T];if(F.clustered)continue;F.clustered=!0,w=F.collection,P=F.index;let V=w.get(P);S=xCe(V,F.coord,u,e,Dpt);let B=et.clone(S,Rpt);I=M.range(S.x,S.y,S.x+S.width,S.y+S.height),R=I.length;let j=h.clone(V.position);for(C=1,_=[V.id],E=0;E<R;++E)if(O=I[E],L=x[O],!L.clustered){let k=L.collection.get(L.index),G=xCe(k,L.coord,u,e,Opt);h.add(k.position,j,j),et.union(B,G,B),++C,_.push(k.id)}if(C>=f){let k=h.multiplyByScalar(j,1/C,j);for(TCe(k,C,_,e),p.push({position:k,width:B.width,height:B.height,minimumWidth:S.width,minimumHeight:S.height}),E=0;E<R;++E)x[I[E]].clustered=!0}else Ppt(V,e)}}s.length===0&&(s.destroy(),e._clusterLabelCollection=void 0),a.length===0&&(a.destroy(),e._clusterBillboardCollection=void 0),c.length===0&&(c.destroy(),e._clusterPointCollection=void 0),e._previousClusters=p,e._previousHeight=m}}Mm.prototype._initialize=function(e){this._scene=e;let t=Mpt(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(Mm.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get:function(){return this._pixelRange},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get:function(){return this._minimumClusterSize},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get:function(){return this._clusterEvent}},clusterBillboards:{get:function(){return this._clusterBillboards},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get:function(){return this._clusterLabels},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get:function(){return this._clusterPoints},set:function(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}},ready:{get:function(){return!this._enabledDirty&&!this._clusterDirty&&(!l(this._billboardCollection)||this._billboardCollection.ready)&&(!l(this._labelCollection)||this._labelCollection.ready)}}});function vee(e,t,n,i){return function(r){let o=this[e];l(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let s=this._collectionIndicesByEntity[r.id];if(l(s)||(s=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),l(o)&&l(s[i]))return o.get(s[i]);l(o)||(o=this[e]=new t({scene:this._scene}));let a,c,u=this[n];u.length>0?(a=u.shift(),c=o.get(a)):(c=o.add(),a=o.length-1),s[i]=a;let f=this;return Promise.resolve().then(function(){f._clusterDirty=!0}),c}}function See(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}Mm.prototype.getLabel=vee("_labelCollection",e0,"_unusedLabelIndices","labelIndex");Mm.prototype.removeLabel=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._labelCollection)||!l(t)||!l(t.labelIndex))return;let n=t.labelIndex;t.labelIndex=void 0,See(this,e.id);let i=this._labelCollection.get(n);i.show=!1,i.text="",i.id=void 0,this._unusedLabelIndices.push(n),this._clusterDirty=!0};Mm.prototype.getBillboard=vee("_billboardCollection",Gf,"_unusedBillboardIndices","billboardIndex");Mm.prototype.removeBillboard=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._billboardCollection)||!l(t)||!l(t.billboardIndex))return;let n=t.billboardIndex;t.billboardIndex=void 0,See(this,e.id);let i=this._billboardCollection.get(n);i.id=void 0,i.show=!1,i.image=void 0,this._unusedBillboardIndices.push(n),this._clusterDirty=!0};Mm.prototype.getPoint=vee("_pointCollection",Ew,"_unusedPointIndices","pointIndex");Mm.prototype.removePoint=function(e){let t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!l(this._pointCollection)||!l(t)||!l(t.pointIndex))return;let n=t.pointIndex;t.pointIndex=void 0,See(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function Cee(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function Npt(e){e.enabled||(l(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),l(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),l(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,Cee(e._labelCollection),Cee(e._billboardCollection),Cee(e._pointCollection))}Mm.prototype.update=function(e){if(!this.show)return;let t,n=this._labelCollection;l(n)&&n.length>0&&!n.ready&&(t=e.commandList,e.commandList=[],n.update(e),e.commandList=t);let i=this._billboardCollection;l(i)&&i.length>0&&!i.ready&&(t=e.commandList,e.commandList=[],i.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,Npt(this),this._clusterDirty=!0),this._clusterDirty&&(this._cluster(),this._clusterDirty=l(n)&&!n.ready||l(i)&&!i.ready),l(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),l(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),l(this._clusterPointCollection)&&this._clusterPointCollection.update(e),l(n)&&n.update(e),l(i)&&i.update(e),l(this._pointCollection)&&this._pointCollection.update(e)};Mm.prototype.destroy=function(){l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Kf=Mm;function wee(e){this._name=e,this._clock=void 0,this._changed=new be,this._error=new be,this._isLoading=!1,this._loading=new be,this._entityCollection=new Ya(this),this._entityCluster=new Kf}Object.defineProperties(wee.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){Ds.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});wee.prototype.update=function(e){return!0};var rk=wee;var CCe={};CCe.computePositions=function(e,t,n,i,r){let o=e*.5,s=-o,a=i+i,c=r?2*a:a,u=new Float64Array(c*3),f,d=0,p=0,g=r?a*3:0,m=r?(a+i)*3:i*3;for(f=0;f<i;f++){let y=f/i*D.TWO_PI,A=Math.cos(y),b=Math.sin(y),x=A*n,T=b*n,E=A*t,v=b*t;u[p+g]=x,u[p+g+1]=T,u[p+g+2]=s,u[p+m]=E,u[p+m+1]=v,u[p+m+2]=o,p+=3,r&&(u[d++]=x,u[d++]=T,u[d++]=s,u[d++]=E,u[d++]=v,u[d++]=o)}return u};var ZT=CCe;var Iee=new U,Lpt=new h,Fpt=new h,Bpt=new h,kpt=new h;function S_(e){e=e??H.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,r=e.vertexFormat??Be.DEFAULT,o=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Be.clone(r),this._slices=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}S_.packedLength=Be.packedLength+5;S_.pack=function(e,t,n){return n=n??0,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var vCe=new Be,Cw={vertexFormat:vCe,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};S_.unpack=function(e,t,n){t=t??0;let i=Be.unpack(e,t,vCe);t+=Be.packedLength;let r=e[t++],o=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Be.clone(i,n._vertexFormat),n._length=r,n._topRadius=o,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(Cw.length=r,Cw.topRadius=o,Cw.bottomRadius=s,Cw.slices=a,Cw.offsetAttribute=c===-1?void 0:c,new S_(Cw))};S_.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,r=e._vertexFormat,o=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o+o,a=o+s,c=s+s,u=ZT.computePositions(t,n,i,o,!0),f=r.st?new Float32Array(c*2):void 0,d=r.normal?new Float32Array(c*3):void 0,p=r.tangent?new Float32Array(c*3):void 0,g=r.bitangent?new Float32Array(c*3):void 0,m,y=r.normal||r.tangent||r.bitangent;if(y){let I=r.tangent||r.bitangent,R=0,O=0,L=0,_=Math.atan2(i-n,t),C=Lpt;C.z=Math.sin(_);let w=Math.cos(_),P=Bpt,M=Fpt;for(m=0;m<o;m++){let F=m/o*D.TWO_PI,V=w*Math.cos(F),B=w*Math.sin(F);y&&(C.x=V,C.y=B,I&&(P=h.normalize(h.cross(h.UNIT_Z,C,P),P)),r.normal&&(d[R++]=C.x,d[R++]=C.y,d[R++]=C.z,d[R++]=C.x,d[R++]=C.y,d[R++]=C.z),r.tangent&&(p[O++]=P.x,p[O++]=P.y,p[O++]=P.z,p[O++]=P.x,p[O++]=P.y,p[O++]=P.z),r.bitangent&&(M=h.normalize(h.cross(C,P,M),M),g[L++]=M.x,g[L++]=M.y,g[L++]=M.z,g[L++]=M.x,g[L++]=M.y,g[L++]=M.z))}for(m=0;m<o;m++)r.normal&&(d[R++]=0,d[R++]=0,d[R++]=-1),r.tangent&&(p[O++]=1,p[O++]=0,p[O++]=0),r.bitangent&&(g[L++]=0,g[L++]=-1,g[L++]=0);for(m=0;m<o;m++)r.normal&&(d[R++]=0,d[R++]=0,d[R++]=1),r.tangent&&(p[O++]=1,p[O++]=0,p[O++]=0),r.bitangent&&(g[L++]=0,g[L++]=1,g[L++]=0)}let A=12*o-12,b=je.createTypedArray(c,A),x=0,T=0;for(m=0;m<o-1;m++)b[x++]=T,b[x++]=T+2,b[x++]=T+3,b[x++]=T,b[x++]=T+3,b[x++]=T+1,T+=2;for(b[x++]=s-2,b[x++]=0,b[x++]=1,b[x++]=s-2,b[x++]=1,b[x++]=s-1,m=1;m<o-1;m++)b[x++]=s+m+1,b[x++]=s+m,b[x++]=s;for(m=1;m<o-1;m++)b[x++]=a,b[x++]=a+m,b[x++]=a+m+1;let E=0;if(r.st){let I=Math.max(n,i);for(m=0;m<c;m++){let R=h.fromArray(u,m*3,kpt);f[E++]=(R.x+I)/(2*I),f[E++]=(R.y+I)/(2*I)}}let v=new Tn;r.position&&(v.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:u})),r.normal&&(v.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:d})),r.tangent&&(v.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),r.bitangent&&(v.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),r.st&&(v.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:f})),Iee.x=t*.5,Iee.y=Math.max(i,n);let S=new ue(h.ZERO,U.magnitude(Iee));if(l(e._offsetAttribute)){t=u.length;let I=e._offsetAttribute===mn.NONE?0:1,R=new Uint8Array(t/3).fill(I);v.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return new St({attributes:v,indices:b,primitiveType:Oe.TRIANGLES,boundingSphere:S,offsetAttribute:e._offsetAttribute})};var Pee;S_.getUnitCylinder=function(){return l(Pee)||(Pee=S_.createGeometry(new S_({topRadius:1,bottomRadius:1,length:1,vertexFormat:Be.POSITION_ONLY}))),Pee};var ok=S_;var Dee=new U;function vw(e){e=e??H.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,r=e.slices??128,o=Math.max(e.numberOfVerticalLines??16,0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=r,this._numberOfVerticalLines=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}vw.packedLength=6;vw.pack=function(e,t,n){return n=n??0,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var QT={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};vw.unpack=function(e,t,n){t=t??0;let i=e[t++],r=e[t++],o=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=r,n._bottomRadius=o,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(QT.length=i,QT.topRadius=r,QT.bottomRadius=o,QT.slices=s,QT.numberOfVerticalLines=a,QT.offsetAttribute=c===-1?void 0:c,new vw(QT))};vw.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,r=e._slices,o=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r*2,a=ZT.computePositions(t,n,i,r,!1),c=r*2,u;if(o>0){let y=Math.min(o,r);u=Math.round(r/y),c+=y}let f=je.createTypedArray(s,c*2),d=0,p;for(p=0;p<r-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+r,f[d++]=p+1+r;if(f[d++]=r-1,f[d++]=0,f[d++]=r+r-1,f[d++]=r,o>0)for(p=0;p<r;p+=u)f[d++]=p,f[d++]=p+r;let g=new Tn;g.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:a}),Dee.x=t*.5,Dee.y=Math.max(i,n);let m=new ue(h.ZERO,U.magnitude(Dee));if(l(e._offsetAttribute)){t=a.length;let y=e._offsetAttribute===mn.NONE?0:1,A=new Uint8Array(t/3).fill(y);g.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}return new St({attributes:g,indices:f,primitiveType:Oe.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var sk=vw;var SCe=h.ZERO,wCe=new h,Upt=new h,ICe=new z;function zpt(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function $f(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new zpt(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&($f.prototype=Object.create(Pi.prototype),$f.prototype.constructor=$f);Object.defineProperties($f.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});$f.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),o=Kn.fromDistanceDisplayCondition(r),s={show:i,distanceDisplayCondition:o,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,ICe)),l(a)||(a=z.WHITE),s.color=Jt.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,SCe,wCe))),new Ft({id:t,geometry:new ok(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};$f.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,ICe),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,SCe,wCe))),new Ft({id:t,geometry:new sk(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:o})};$f.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};$f.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||Pi.prototype._isHidden.call(this,e,t)};$f.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!X.isConstant(t.slices)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.numberOfVerticalLines)};$f.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(tt.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(tt.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(tt.MINIMUM_VALUE),i.slices=X.getValueOrUndefined(t.slices,tt.MINIMUM_VALUE),i.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,tt.MINIMUM_VALUE),i.offsetAttribute=n!==We.NONE?mn.ALL:void 0};$f.prototype._onEntityPropertyChanged=vg;$f.DynamicGeometryUpdater=Sw;function Sw(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Sw.prototype=Object.create(Ii.prototype),Sw.prototype.constructor=Sw);Sw.prototype._isHidden=function(e,t,n){let i=this._options,r=X.getValueOrUndefined(e.position,n,Upt);return!l(r)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||Ii.prototype._isHidden.call(this,e,t,n)};Sw.prototype._setOptions=function(e,t,n){let i=X.getValueOrDefault(t.heightReference,n,We.NONE),r=this._options;r.length=X.getValueOrUndefined(t.length,n),r.topRadius=X.getValueOrUndefined(t.topRadius,n),r.bottomRadius=X.getValueOrUndefined(t.bottomRadius,n),r.slices=X.getValueOrUndefined(t.slices,n),r.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,n),r.offsetAttribute=i!==We.NONE?mn.ALL:void 0};var ak=$f;var PCe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2};Object.freeze(PCe);var Rs=PCe;var DCe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2};Object.freeze(DCe);var Vr=DCe;var RCe={NONE:0,HOLD:1,EXTRAPOLATE:2,LINEAR_EXTRAPOLATE:3};Object.freeze(RCe);var fu=RCe;var OCe=Qo(xf(),1);function Vpt(e){let t=new OCe.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var w_=Vpt;var jpt=D.factorial;function Ree(e,t,n,i,r,o){let s=0,a,c,u;if(i>0){for(c=0;c<r;c++){for(a=!1,u=0;u<o.length&&!a;u++)c===o[u]&&(a=!0);a||(o.push(c),s+=Ree(e,t,n,i-1,r,o),o.splice(o.length-1,1))}return s}for(s=1,c=0;c<r;c++){for(a=!1,u=0;u<o.length&&!a;u++)c===o[u]&&(a=!0);a||(s*=e-n[t[c]])}return s}var Hpt=[],Oee=class{static get type(){return"Hermite"}static getRequiredDataPoints(t,n){return n=n??0,Math.max(Math.floor((t+1)/(n+1)),2)}static interpolateOrderZero(t,n,i,r,o){l(o)||(o=new Array(r));let s,a,c,u,f,d,p=n.length,g=new Array(r);for(s=0;s<r;s++){o[s]=0;let b=new Array(p);for(g[s]=b,a=0;a<p;a++)b[a]=[]}let m=p,y=new Array(m);for(s=0;s<m;s++)y[s]=s;let A=p-1;for(u=0;u<r;u++){for(a=0;a<m;a++)d=y[a]*r+u,g[u][0].push(i[d]);for(s=1;s<m;s++){let b=!1;for(a=0;a<m-s;a++){let x=n[y[a]],T=n[y[a+s]],E;T-x<=0?(d=y[a]*r+r*s+u,E=i[d],g[u][s].push(E/jpt(s))):(E=g[u][s-1][a+1]-g[u][s-1][a],g[u][s].push(E/(T-x))),b=b||E!==0}b||(A=s-1)}}for(c=0,f=0;c<=f;c++)for(s=c;s<=A;s++){let b=Ree(t,y,n,c,s,[]);for(u=0;u<r;u++){let x=g[u][s][0];o[u+c*r]+=x*b}}return o}static interpolate(t,n,i,r,o,s,a){let c=r*(s+1);l(a)||(a=new Array(c));for(let x=0;x<c;x++)a[x]=0;let u=n.length,f=new Array(u*(o+1)),d;for(d=0;d<u;d++)for(let x=0;x<o+1;x++)f[d*(o+1)+x]=d;let p=f.length,g=Hpt,m=Gpt(g,f,n,i,r,o),y=[],A=p*(p+1)/2,b=Math.min(m,s);for(let x=0;x<=b;x++)for(d=x;d<=m;d++){y.length=0;let T=Ree(t,f,n,x,d,y),E=Math.floor(d*(1-d)/2)+p*d;for(let v=0;v<r;v++){let S=Math.floor(v*A),I=g[S+E];a[v+x*r]+=I*T}}return a}};function Gpt(e,t,n,i,r,o){let s,a,c=-1,u=t.length,f=u*(u+1)/2;for(let d=0;d<r;d++){let p=Math.floor(d*f);for(s=0;s<u;s++)a=t[s]*r*(o+1)+d,e[p+s]=i[a];for(let g=1;g<u;g++){let m=0,y=Math.floor(g*(1-g)/2)+u*g,A=!1;for(s=0;s<u-g;s++){let b=n[t[s]],x=n[t[s+g]],T,E;if(x-b<=0)a=t[s]*r*(o+1)+r*g+d,T=i[a],E=T/D.factorial(g),e[p+y+m]=E,m++;else{let v=Math.floor((g-1)*(2-g)/2)+u*(g-1);T=e[p+v+s+1]-e[p+v+s],E=T/(x-b),e[p+y+m]=E,m++}A=A||T!==0}A&&(c=Math.max(c,g))}}return c}var ck=Oee;var Mee=class{static get type(){return"Lagrange"}static getRequiredDataPoints(t){return Math.max(t+1,2)}static interpolateOrderZero(t,n,i,r,o){l(o)||(o=new Array(r));let s,a,c=n.length;for(s=0;s<r;s++)o[s]=0;for(s=0;s<c;s++){let u=1;for(a=0;a<c;a++)if(a!==s){let f=n[s]-n[a];u*=(t-n[a])/f}for(a=0;a<r;a++)o[a]+=u*i[s*r+a]}return o}},lk=Mee;var Nee=class{static get type(){return"Linear"}static getRequiredDataPoints(t){return 2}static interpolateOrderZero(t,n,i,r,o){l(o)||(o=new Array(r));let s,a,c,u=n[0],f=n[1];for(s=0;s<r;s++)a=i[s],c=i[s+r],o[s]=((c-a)*t+f*a-u*c)/(f-u);return o}},YA=Nee;function Al(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}Al.fromCartesian3=function(e,t){let n=e.x,i=e.y,r=e.z,o=n*n+i*i;return l(t)||(t=new Al),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(o),r),t.magnitude=Math.sqrt(o+r*r),t};Al.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Al(e.clock,e.cone,e.magnitude)};Al.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Al(e.clock,e.cone,1)};Al.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};Al.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};Al.prototype.equals=function(e){return Al.equals(this,e)};Al.prototype.clone=function(e){return Al.clone(this,e)};Al.prototype.equalsEpsilon=function(e,t){return Al.equalsEpsilon(this,e,t)};Al.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var uk=Al;var pk=Qo(xf(),1);var Lee;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?Lee=function(){return performance.now()}:Lee=function(){return Date.now()};var xn=Lee;function Fee(e){e=e??H.EMPTY_OBJECT;let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=K.clone(t):l(n)?t=K.clone(n):l(i)?t=K.addDays(i,-1,new K):t=K.now(),l(n)?n=K.clone(n):n=K.clone(t),l(i)?i=K.clone(i):i=K.addDays(n,1,new K),this.startTime=n,this.stopTime=i,this.clockRange=e.clockRange??Rs.UNBOUNDED,this.canAnimate=e.canAnimate??!0,this.onTick=new be,this.onStop=new be,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=xn(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??Vr.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(Fee.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){K.equals(this._currentTime,e)||(this._clockStep===Vr.SYSTEM_CLOCK&&(this._clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===Vr.SYSTEM_CLOCK&&(this._clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===Vr.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=K.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===Vr.SYSTEM_CLOCK&&(this._clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});Fee.prototype.tick=function(){let e=xn(),t=K.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===Vr.SYSTEM_CLOCK)t=K.now(t);else{let i=this._multiplier;if(n===Vr.TICK_DEPENDENT)t=K.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=K.addSeconds(t,i*(a/1e3),t)}let r=this.clockRange,o=this.startTime,s=this.stopTime;if(r===Rs.CLAMPED)K.lessThan(t,o)?t=K.clone(o,t):K.greaterThan(t,s)&&(t=K.clone(s,t),this.onStop.raiseEvent(this));else if(r===Rs.LOOP_STOP)for(K.lessThan(t,o)&&(t=K.clone(o,t));K.greaterThan(t,s);)t=K.addSeconds(o,K.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Nm=Fee;function eE(){this._definitionChanged=new be,this._startTime=void 0,this._stopTime=void 0,this._currentTime=void 0,this._clockRange=void 0,this._clockStep=void 0,this._multiplier=void 0}Object.defineProperties(eE.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:Wl("startTime"),stopTime:Wl("stopTime"),currentTime:Wl("currentTime"),clockRange:Wl("clockRange"),clockStep:Wl("clockStep"),multiplier:Wl("multiplier")});eE.prototype.clone=function(e){return l(e)||(e=new eE),e.startTime=this.startTime,e.stopTime=this.stopTime,e.currentTime=this.currentTime,e.clockRange=this.clockRange,e.clockStep=this.clockStep,e.multiplier=this.multiplier,e};eE.prototype.equals=function(e){return this===e||l(e)&&K.equals(this.startTime,e.startTime)&&K.equals(this.stopTime,e.stopTime)&&K.equals(this.currentTime,e.currentTime)&&this.clockRange===e.clockRange&&this.clockStep===e.clockStep&&this.multiplier===e.multiplier};eE.prototype.merge=function(e){this.startTime=this.startTime??e.startTime,this.stopTime=this.stopTime??e.stopTime,this.currentTime=this.currentTime??e.currentTime,this.clockRange=this.clockRange??e.clockRange,this.clockStep=this.clockStep??e.clockStep,this.multiplier=this.multiplier??e.multiplier};eE.prototype.getValue=function(e){return l(e)||(e=new Nm),e.startTime=this.startTime??e.startTime,e.stopTime=this.stopTime??e.stopTime,e.currentTime=this.currentTime??e.currentTime,e.clockRange=this.clockRange??e.clockRange,e.multiplier=this.multiplier??e.multiplier,e.clockStep=this.clockStep??e.clockStep,e};var Lm=eE;var Wpt=z.WHITE,qpt=.1,Ypt=new U(8,8),Xpt=new U(0,0),Kpt=new U(1,1);function ww(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(ww.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._cellAlpha)&&X.isConstant(this._lineCount)&&X.isConstant(this._lineThickness)&&X.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color"),cellAlpha:me("cellAlpha"),lineCount:me("lineCount"),lineThickness:me("lineThickness"),lineOffset:me("lineOffset")});ww.prototype.getType=function(e){return"Grid"};var $pt=new K;ww.prototype.getValue=function(e,t){return l(e)||(e=K.now($pt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,Wpt,t.color),t.cellAlpha=X.getValueOrDefault(this._cellAlpha,e,qpt),t.lineCount=X.getValueOrClonedDefault(this._lineCount,e,Ypt,t.lineCount),t.lineThickness=X.getValueOrClonedDefault(this._lineThickness,e,Kpt,t.lineThickness),t.lineOffset=X.getValueOrClonedDefault(this._lineOffset,e,Xpt,t.lineOffset),t};ww.prototype.equals=function(e){return this===e||e instanceof ww&&X.equals(this._color,e._color)&&X.equals(this._cellAlpha,e._cellAlpha)&&X.equals(this._lineCount,e._lineCount)&&X.equals(this._lineThickness,e._lineThickness)&&X.equals(this._lineOffset,e._lineOffset)};var Iw=ww;var MCe={WHOLE:0,PORTIONS:1};Object.freeze(MCe);var a0=MCe;function Pw(e){this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(Pw.prototype,{isConstant:{get:function(){return X.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color")});Pw.prototype.getType=function(e){return"PolylineArrow"};var Jpt=new K;Pw.prototype.getValue=function(e,t){return l(e)||(e=K.now(Jpt)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,z.WHITE,t.color),t};Pw.prototype.equals=function(e){return this===e||e instanceof Pw&&X.equals(this._color,e._color)};var Dw=Pw;var Zpt=z.WHITE,Qpt=z.TRANSPARENT,e0t=16,t0t=255;function Rw(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(Rw.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._gapColor)&&X.isConstant(this._dashLength)&&X.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color"),gapColor:me("gapColor"),dashLength:me("dashLength"),dashPattern:me("dashPattern")});Rw.prototype.getType=function(e){return"PolylineDash"};var n0t=new K;Rw.prototype.getValue=function(e,t){return l(e)||(e=K.now(n0t)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,Zpt,t.color),t.gapColor=X.getValueOrClonedDefault(this._gapColor,e,Qpt,t.gapColor),t.dashLength=X.getValueOrDefault(this._dashLength,e,e0t,t.dashLength),t.dashPattern=X.getValueOrDefault(this._dashPattern,e,t0t,t.dashPattern),t};Rw.prototype.equals=function(e){return this===e||e instanceof Rw&&X.equals(this._color,e._color)&&X.equals(this._gapColor,e._gapColor)&&X.equals(this._dashLength,e._dashLength)&&X.equals(this._dashPattern,e._dashPattern)};var Ow=Rw;var i0t=z.WHITE,r0t=.25,o0t=1;function Mw(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(Mw.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color"),glowPower:me("glowPower"),taperPower:me("taperPower")});Mw.prototype.getType=function(e){return"PolylineGlow"};var s0t=new K;Mw.prototype.getValue=function(e,t){return l(e)||(e=K.now(s0t)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,i0t,t.color),t.glowPower=X.getValueOrDefault(this._glowPower,e,r0t,t.glowPower),t.taperPower=X.getValueOrDefault(this._taperPower,e,o0t,t.taperPower),t};Mw.prototype.equals=function(e){return this===e||e instanceof Mw&&X.equals(this._color,e._color)&&X.equals(this._glowPower,e._glowPower)&&X.equals(this._taperPower,e._taperPower)};var Nw=Mw;var a0t=z.WHITE,c0t=z.BLACK,l0t=1;function Lw(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(Lw.prototype,{isConstant:{get:function(){return X.isConstant(this._color)&&X.isConstant(this._outlineColor)&&X.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:me("color"),outlineColor:me("outlineColor"),outlineWidth:me("outlineWidth")});Lw.prototype.getType=function(e){return"PolylineOutline"};var u0t=new K;Lw.prototype.getValue=function(e,t){return l(e)||(e=K.now(u0t)),l(t)||(t={}),t.color=X.getValueOrClonedDefault(this._color,e,a0t,t.color),t.outlineColor=X.getValueOrClonedDefault(this._outlineColor,e,c0t,t.outlineColor),t.outlineWidth=X.getValueOrDefault(this._outlineWidth,e,l0t),t};Lw.prototype.equals=function(e){return this===e||e instanceof Lw&&X.equals(this._color,e._color)&&X.equals(this._outlineColor,e._outlineColor)&&X.equals(this._outlineWidth,e._outlineWidth)};var XA=Lw;function I_(e,t){this._value=void 0,this._definitionChanged=new be,this._eventHelper=new Xo,this._referenceFrame=t??ji.FIXED,this.setValue(e)}Object.defineProperties(I_.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!X.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var f0t=new K;I_.prototype.getValue=function(e,t){return l(e)||(e=K.now(f0t)),this.getValueInReferenceFrame(e,ji.FIXED,t)};I_.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._value;if(!l(i))return;let r=i.length;l(n)||(n=new Array(r));let o=0,s=0;for(;o<r;){let c=i[o].getValueInReferenceFrame(e,t,n[o]);l(c)&&(n[s]=c,s++),o++}return n.length=s,n};I_.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let r=e[i];l(r)&&t.add(r.definitionChanged,I_.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};I_.prototype.equals=function(e){return this===e||e instanceof I_&&this._referenceFrame===e._referenceFrame&&X.arrayEquals(this._value,e._value)};I_.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var P_=I_;function KA(e){this._value=void 0,this._definitionChanged=new be,this._eventHelper=new Xo,this.setValue(e)}Object.defineProperties(KA.prototype,{isConstant:{get:function(){let e=this._value;if(!l(e))return!0;let t=e.length;for(let n=0;n<t;n++)if(!X.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});var d0t=new K;KA.prototype.getValue=function(e,t){l(e)||(e=K.now(d0t));let n=this._value;if(!l(n))return;let i=n.length;l(t)||(t=new Array(i));let r=0,o=0;for(;r<i;){let a=this._value[r].getValue(e,t[r]);l(a)&&(t[o]=a,o++),r++}return t.length=o,t};KA.prototype.setValue=function(e){let t=this._eventHelper;if(t.removeAll(),l(e)){this._value=e.slice();let n=e.length;for(let i=0;i<n;i++){let r=e[i];l(r)&&t.add(r.definitionChanged,KA.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};KA.prototype.equals=function(e){return this===e||e instanceof KA&&X.arrayEquals(this._value,e._value)};KA.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Fw=KA;function NCe(e,t,n){let i=new WeakRef(t),r=e.addEventListener(function(){let o=i.deref();l(o)?n.apply(o,arguments):r()});return r}function tE(e){let t=e._targetProperty;if(!l(t)){let n=e._targetEntity;if(!l(n)){if(n=e._targetCollection.getById(e._targetId),!l(n)){e._targetEntity=e._targetProperty=void 0;return}e._removeTargetListener=NCe(n.definitionChanged,e,ah.prototype._onTargetEntityDefinitionChanged),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let r=0,o=i.length;r<o&&l(t);++r)t=t[i[r]];e._targetProperty=t}return t}function ah(e,t,n){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new be,this._removeTargetListener=void 0,NCe(e.collectionChanged,this,ah.prototype._onCollectionChanged)}Object.defineProperties(ah.prototype,{isConstant:{get:function(){return X.isConstant(tE(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=tE(this);return l(e)?e.referenceFrame:void 0}},targetId:{get:function(){return this._targetId}},targetCollection:{get:function(){return this._targetCollection}},targetPropertyNames:{get:function(){return this._targetPropertyNames}},resolvedProperty:{get:function(){return tE(this)}}});ah.fromString=function(e,t){let n,i=[],r=!0,o=!1,s="";for(let a=0;a<t.length;++a){let c=t.charAt(a);o?(s+=c,o=!1):c==="\\"?o=!0:r&&c==="#"?(n=s,r=!1,s=""):!r&&c==="."?(i.push(s),s=""):s+=c}return i.push(s),new ah(e,n,i)};var h0t=new K;ah.prototype.getValue=function(e,t){let n=tE(this);return l(e)||(e=K.now(h0t)),l(n)?n.getValue(e,t):void 0};ah.prototype.getValueInReferenceFrame=function(e,t,n){let i=tE(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};ah.prototype.getType=function(e){let t=tE(this);return l(t)?t.getType(e):void 0};ah.prototype.equals=function(e){if(this===e)return!0;let t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;let i=this._targetPropertyNames.length;for(let r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0};ah.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};ah.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(this._removeTargetListener(),this._removeTargetListener=void 0,this._targetEntity=this._targetProperty=void 0):l(i)||(i=tE(this),l(i)&&this._definitionChanged.raiseEvent(this))};var D_=ah;var m0t={packedLength:1,pack:function(e,t,n){return n=n??0,t[n]=e,t},unpack:function(e,t,n){return t=t??0,e[t]},convertPackedArrayForInterpolation:function(e,t,n,i){l(i)||(i=[]),t=t??0,n=n??e.length;let r;for(let o=0,s=n-t+1;o<s;o++){let a=e[t+o];o===0||Math.abs(r-a)<Math.PI?i[o]=a:i[o]=a-D.TWO_PI,r=a}},unpackInterpolationResult:function(e,t,n,i,r){return r=e[0],r<0?r+D.TWO_PI:r}},ch=m0t;var LCe={packedLength:1,pack:function(e,t,n){n=n??0,t[n]=e},unpack:function(e,t,n){return t=t??0,e[t]}};function FCe(e,t,n){let i,r=e.length,o=n.length,s=r+o;if(e.length=s,r!==t){let a=r-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<o;i++)e[t++]=n[i]}function BCe(e,t){return e instanceof K?e:typeof e=="string"?K.fromIso8601(e):K.addSeconds(t,e,new K)}var Bee=[],kee=[];function TG(e,t,n,i,r){let o=0,s,a,c,u,f,d;for(;o<i.length;){f=BCe(i[o],e),c=vr(t,f,K.compare);let p=0,g=0;if(c<0){for(c=~c,u=c*r,a=void 0,d=t[c];o<i.length&&(f=BCe(i[o],e),!(l(a)&&K.compare(a,f)>=0||l(d)&&K.compare(f,d)>=0));){for(Bee[p++]=f,o=o+1,s=0;s<r;s++)kee[g++]=i[o],o=o+1;a=f}p>0&&(kee.length=g,FCe(n,u,kee),Bee.length=p,FCe(t,c,Bee))}else{for(s=0;s<r;s++)o++,n[c*r+s]=i[o];o++}}}function lh(e,t){let n=e;n===Number&&(n=LCe);let i=n.packedLength,r=n.packedInterpolationLength??i,o=0,s;if(l(t)){let a=t.length;s=new Array(a);for(let c=0;c<a;c++){let u=t[c];u===Number&&(u=LCe);let f=u.packedLength;i+=f,r+=u.packedInterpolationLength??f,s[c]=u}o=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=YA,this._lastInterpolationAlgorithm=YA,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=r,this._updateTableLength=!0,this._interpolationResult=new Array(r),this._definitionChanged=new be,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=o,this._forwardExtrapolationType=fu.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=fu.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(lh.prototype,{isConstant:{get:function(){return this._values.length===0}},definitionChanged:{get:function(){return this._definitionChanged}},type:{get:function(){return this._type}},derivativeTypes:{get:function(){return this._derivativeTypes}},interpolationDegree:{get:function(){return this._interpolationDegree}},interpolationAlgorithm:{get:function(){return this._interpolationAlgorithm}},forwardExtrapolationType:{get:function(){return this._forwardExtrapolationType},set:function(e){this._forwardExtrapolationType!==e&&(this._forwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},forwardExtrapolationDuration:{get:function(){return this._forwardExtrapolationDuration},set:function(e){this._forwardExtrapolationDuration!==e&&(this._forwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationType:{get:function(){return this._backwardExtrapolationType},set:function(e){this._backwardExtrapolationType!==e&&(this._backwardExtrapolationType=e,this._definitionChanged.raiseEvent(this))}},backwardExtrapolationDuration:{get:function(){return this._backwardExtrapolationDuration},set:function(e){this._backwardExtrapolationDuration!==e&&(this._backwardExtrapolationDuration=e,this._definitionChanged.raiseEvent(this))}}});var p0t=new K;lh.prototype.getValue=function(e,t){l(e)||(e=K.now(p0t));let n=this._times,i=n.length;if(i===0)return;let r,o=this._innerType,s=this._values,a=vr(n,e,K.compare);var c=!1;if(a<0){if(a=~a,a===0){let S=n[a];if(r=this._backwardExtrapolationDuration,this._backwardExtrapolationType===fu.NONE||r!==0&&K.secondsDifference(S,e)>r)return;if(this._backwardExtrapolationType===fu.HOLD)return o.unpack(s,0,t);c=this._backwardExtrapolationType===fu.LINEAR_EXTRAPOLATE}if(a>=i){a=i-1;let S=n[a];if(r=this._forwardExtrapolationDuration,this._forwardExtrapolationType===fu.NONE||r!==0&&K.secondsDifference(e,S)>r)return;if(this._forwardExtrapolationType===fu.HOLD)return a=i-1,o.unpack(s,a*o.packedLength,t);c=this._forwardExtrapolationType===fu.LINEAR_EXTRAPOLATE}let d=this._xTable,p=this._yTable;var u,f;c?(u=Cesium.LinearApproximation,f=1):(u=this._interpolationAlgorithm,f=this._interpolationDegree),this._lastInterpolationAlgorithm!=u&&(this._lastInterpolationAlgorithm=u,this._updateTableLength=!0);let g=this._packedInterpolationLength,m=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let S=Math.min(u.getRequiredDataPoints(f,m),i);S!==this._numberOfPoints&&(this._numberOfPoints=S,d.length=S,p.length=S*g)}let y=this._numberOfPoints-1;if(y<1)return;let A=0,b=i-1;if(b-A+1>=y+1){let S=a-(y/2|0)-1;S<A&&(S=A);let I=S+y;I>b&&(I=b,S=I-y,S<A&&(S=A)),A=S,b=I}let T=b-A+1;for(let S=0;S<T;++S)d[S]=K.secondsDifference(n[A+S],n[b]);if(l(o.convertPackedArrayForInterpolation))o.convertPackedArrayForInterpolation(s,A,b,p);else{let S=0,I=this._packedLength,R=A*I,O=(b+1)*I;for(;R<O;)p[S]=s[R],R++,S++}let E=K.secondsDifference(e,n[b]),v;if(m===0||!l(u.interpolate))v=u.interpolateOrderZero(E,d,p,g,this._interpolationResult);else{let S=Math.floor(g/(m+1));v=u.interpolate(E,d,p,S,m,m,this._interpolationResult)}return l(o.unpackInterpolationResult)?o.unpackInterpolationResult(v,s,A,b,t):o.unpack(v,0,t)}return o.unpack(s,a*this._packedLength,t)};lh.prototype.setInterpolationOptions=function(e){if(!l(e))return;let t=!1,n=e.interpolationAlgorithm,i=e.interpolationDegree;l(n)&&this._interpolationAlgorithm!==n&&(this._interpolationAlgorithm=n,t=!0),l(i)&&this._interpolationDegree!==i&&(this._interpolationDegree=i,t=!0),t&&(this._updateTableLength=!0,this._definitionChanged.raiseEvent(this))};lh.prototype.addSample=function(e,t,n){let i=this._innerDerivativeTypes,r=l(i),o=this._innerType,s=[];if(s.push(e),o.pack(t,s,s.length),r){let a=i.length;for(let c=0;c<a;c++)i[c].pack(n[c],s,s.length)}TG(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};lh.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,r=l(i),o=this._innerType,s=e.length,a=[];for(let c=0;c<s;c++)if(a.push(e[c]),o.pack(t[c],a,a.length),r){let u=n[c],f=i.length;for(let d=0;d<f;d++)i[d].pack(u[d],a,a.length)}TG(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};lh.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};lh.prototype.addSamplesPackedArray=function(e,t){TG(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};lh.prototype.removeSample=function(e){let t=vr(this._times,e,K.compare);return t<0?!1:(kCe(this,t,1),!0)};function kCe(e,t,n){let i=e._packedLength;e._times.splice(t,n),e._values.splice(t*i,n*i),e._updateTableLength=!0,e._definitionChanged.raiseEvent(e)}lh.prototype.removeSamples=function(e){let t=this._times,n=vr(t,e.start,K.compare);n<0?n=~n:e.isStartIncluded||++n;let i=vr(t,e.stop,K.compare);i<0?i=~i:e.isStopIncluded&&++i,kCe(this,n,i-n)};lh.prototype.equals=function(e){if(this===e)return!0;if(!l(e)||this._type!==e._type||this._interpolationDegree!==e._interpolationDegree||this._interpolationAlgorithm!==e._interpolationAlgorithm)return!1;let t=this._derivativeTypes,n=l(t),i=e._derivativeTypes,r=l(i);if(n!==r)return!1;let o,s;if(n){if(s=t.length,s!==i.length)return!1;for(o=0;o<s;o++)if(t[o]!==i[o])return!1}let a=this._times,c=e._times;if(s=a.length,s!==c.length)return!1;for(o=0;o<s;o++)if(!K.equals(a[o],c[o]))return!1;let u=this._values,f=e._values;for(s=u.length,o=0;o<s;o++)if(u[o]!==f[o])return!1;return!0};lh._mergeNewSamples=TG;var Jf=lh;function uh(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=h}this._numberOfDerivatives=t,this._property=new Jf(h,n),this._definitionChanged=new be,this._referenceFrame=e??ji.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(uh.prototype,{isConstant:{get:function(){return this._property.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}},interpolationDegree:{get:function(){return this._property.interpolationDegree}},interpolationAlgorithm:{get:function(){return this._property.interpolationAlgorithm}},numberOfDerivatives:{get:function(){return this._numberOfDerivatives}},forwardExtrapolationType:{get:function(){return this._property.forwardExtrapolationType},set:function(e){this._property.forwardExtrapolationType=e}},forwardExtrapolationDuration:{get:function(){return this._property.forwardExtrapolationDuration},set:function(e){this._property.forwardExtrapolationDuration=e}},backwardExtrapolationType:{get:function(){return this._property.backwardExtrapolationType},set:function(e){this._property.backwardExtrapolationType=e}},backwardExtrapolationDuration:{get:function(){return this._property.backwardExtrapolationDuration},set:function(e){this._property.backwardExtrapolationDuration=e}}});var g0t=new K;uh.prototype.getValue=function(e,t){return l(e)||(e=K.now(g0t)),this.getValueInReferenceFrame(e,ji.FIXED,t)};uh.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return $h.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};uh.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};uh.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};uh.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};uh.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};uh.prototype.removeSample=function(e){return this._property.removeSample(e)};uh.prototype.removeSamples=function(e){this._property.removeSamples(e)};uh.prototype.equals=function(e){return this===e||e instanceof uh&&X.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var gc=uh;var UCe={HORIZONTAL:0,VERTICAL:1};Object.freeze(UCe);var Fm=UCe;var _0t=Fm.HORIZONTAL,y0t=z.WHITE,A0t=z.BLACK,b0t=0,x0t=1;function Bw(e){e=e??H.EMPTY_OBJECT,this._definitionChanged=new be,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(Bw.prototype,{isConstant:{get:function(){return X.isConstant(this._orientation)&&X.isConstant(this._evenColor)&&X.isConstant(this._oddColor)&&X.isConstant(this._offset)&&X.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:me("orientation"),evenColor:me("evenColor"),oddColor:me("oddColor"),offset:me("offset"),repeat:me("repeat")});Bw.prototype.getType=function(e){return"Stripe"};var T0t=new K;Bw.prototype.getValue=function(e,t){return l(e)||(e=K.now(T0t)),l(t)||(t={}),t.horizontal=X.getValueOrDefault(this._orientation,e,_0t)===Fm.HORIZONTAL,t.evenColor=X.getValueOrClonedDefault(this._evenColor,e,y0t,t.evenColor),t.oddColor=X.getValueOrClonedDefault(this._oddColor,e,A0t,t.oddColor),t.offset=X.getValueOrDefault(this._offset,e,b0t),t.repeat=X.getValueOrDefault(this._repeat,e,x0t),t};Bw.prototype.equals=function(e){return this===e||e instanceof Bw&&X.equals(this._orientation,e._orientation)&&X.equals(this._evenColor,e._evenColor)&&X.equals(this._oddColor,e._oddColor)&&X.equals(this._offset,e._offset)&&X.equals(this._repeat,e._repeat)};var kw=Bw;function $A(e){this._definitionChanged=new be,this._intervals=new Ps,this._intervals.changedEvent.addEventListener($A.prototype._intervalsChanged,this),this._referenceFrame=e??ji.FIXED}Object.defineProperties($A.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}});var E0t=new K;$A.prototype.getValue=function(e,t){return l(e)||(e=K.now(E0t)),this.getValueInReferenceFrame(e,ji.FIXED,t)};$A.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return $h.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};$A.prototype.equals=function(e){return this===e||e instanceof $A&&this._intervals.equals(e._intervals,X.equals)&&this._referenceFrame===e._referenceFrame};$A.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var R_=$A;function nE(){this._definitionChanged=new be,this._intervals=new Ps,this._intervals.changedEvent.addEventListener(nE.prototype._intervalsChanged,this)}Object.defineProperties(nE.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var C0t=new K;nE.prototype.getValue=function(e,t){l(e)||(e=K.now(C0t));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};nE.prototype.equals=function(e){return this===e||e instanceof nE&&this._intervals.equals(e._intervals,X.equals)};nE.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var O_=nE;function Uw(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new be,this._normalize=t??!0,this.position=e}Object.defineProperties(Uw.prototype,{isConstant:{get:function(){return X.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){let t=this._position;t!==e&&(l(t)&&this._subscription(),this._position=e,l(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var v0t=new h,zCe=new h,VCe=new K,S0t=new K,Uee=1/60;Uw.prototype.getValue=function(e,t){return this._getValue(e,t)};Uw.prototype._getValue=function(e,t,n){l(e)||(e=K.now(S0t)),l(t)||(t=new h);let i=this._position;if(X.isConstant(i))return this._normalize?void 0:h.clone(h.ZERO,t);let r=i.getValue(e,v0t),o=i.getValue(K.addSeconds(e,Uee,VCe),zCe);if(!l(r)||!l(o)&&(o=r,r=i.getValue(K.addSeconds(e,-Uee,VCe),zCe),!l(r)))return;if(h.equals(r,o))return this._normalize?void 0:h.clone(h.ZERO,t);l(n)&&r.clone(n);let s=h.subtract(o,r,t);return this._normalize?h.normalize(s,t):h.divideByScalar(s,Uee,t)};Uw.prototype.equals=function(e){return this===e||e instanceof Uw&&X.equals(this._position,e._position)};var M_=Uw;function fk(e,t){this._velocityVectorProperty=new M_(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new be,this.ellipsoid=t??ee.default;let n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}Object.defineProperties(fk.prototype,{isConstant:{get:function(){return X.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var jCe=new h,w0t=new h,HCe=new $,I0t=new K;fk.prototype.getValue=function(e,t){l(e)||(e=K.now(I0t));let n=this._velocityVectorProperty._getValue(e,w0t,jCe);if(l(n))return At.rotationMatrixFromPositionVelocity(jCe,n,this._ellipsoid,HCe),Le.fromRotationMatrix(HCe,t)};fk.prototype.equals=function(e){return this===e||e instanceof fk&&X.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var dk=fk;var N_={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};N_.validate=function(e){return e===N_.COMPLETE||e===N_.BELOW_ELLIPSOID_HORIZON||e===N_.ABOVE_ELLIPSOID_HORIZON};N_.toString=function(e){switch(e){case N_.COMPLETE:return"COMPLETE";case N_.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case N_.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new pe("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var zw=N_;function JA(){}JA.packedLength=h.packedLength;JA.unpack=h.unpack;JA.pack=h.pack;var zee;function hk(e,t){return t[0]==="#"&&(t=zee+t),D_.fromString(e,t)}function GCe(e,t,n){if(l(n.reference))return hk(t,n.reference);if(l(n.velocityReference)){let i=hk(t,n.velocityReference);switch(e){case h:case JA:return new M_(i,e===JA);case Le:return new dk(i)}}throw new oe(`${JSON.stringify(n)} is not valid CZML.`)}function P0t(e,t){return new em(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var pr=new h,du=new uk,bl=new he,iE=new En,EG=new Le;function D0t(e){let t=e.rgbaf;if(l(t))return t;let n=e.rgba;if(!l(n))return;let i=n.length;if(i===z.packedLength)return[z.byteToFloat(n[0]),z.byteToFloat(n[1]),z.byteToFloat(n[2]),z.byteToFloat(n[3])];t=new Array(i);for(let r=0;r<i;r+=5)t[r]=n[r],t[r+1]=z.byteToFloat(n[r+1]),t[r+2]=z.byteToFloat(n[r+2]),t[r+3]=z.byteToFloat(n[r+3]),t[r+4]=z.byteToFloat(n[r+4]);return t}function WCe(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):De.createIfNeeded(n)}function R0t(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===ie.packedLength)return[D.toRadians(n[0]),D.toRadians(n[1]),D.toRadians(n[2]),D.toRadians(n[3])];t=new Array(i);for(let r=0;r<i;r+=5)t[r]=n[r],t[r+1]=D.toRadians(n[r+1]),t[r+2]=D.toRadians(n[r+2]),t[r+3]=D.toRadians(n[r+3]),t[r+4]=D.toRadians(n[r+4]);return t}function O0t(e){let t=e.length;if(du.magnitude=1,t===2)return du.clock=e[0],du.cone=e[1],h.fromSpherical(du,pr),[pr.x,pr.y,pr.z];let n=new Array(t/3*4);for(let i=0,r=0;i<t;i+=3,r+=4)n[r]=e[i],du.clock=e[i+1],du.cone=e[i+2],h.fromSpherical(du,pr),n[r+1]=pr.x,n[r+2]=pr.y,n[r+3]=pr.z;return n}function M0t(e){let t=e.length;if(t===3)return du.clock=e[0],du.cone=e[1],du.magnitude=e[2],h.fromSpherical(du,pr),[pr.x,pr.y,pr.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],du.clock=e[i+1],du.cone=e[i+2],du.magnitude=e[i+3],h.fromSpherical(du,pr),n[i+1]=pr.x,n[i+2]=pr.y,n[i+3]=pr.z;return n}function N0t(e){let t=e.length;if(t===3)return bl.longitude=e[0],bl.latitude=e[1],bl.height=e[2],ee.default.cartographicToCartesian(bl,pr),[pr.x,pr.y,pr.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],bl.longitude=e[i+1],bl.latitude=e[i+2],bl.height=e[i+3],ee.default.cartographicToCartesian(bl,pr),n[i+1]=pr.x,n[i+2]=pr.y,n[i+3]=pr.z;return n}function L0t(e){let t=e.length;if(t===3)return bl.longitude=D.toRadians(e[0]),bl.latitude=D.toRadians(e[1]),bl.height=e[2],ee.default.cartographicToCartesian(bl,pr),[pr.x,pr.y,pr.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],bl.longitude=D.toRadians(e[i+1]),bl.latitude=D.toRadians(e[i+2]),bl.height=e[i+3],ee.default.cartographicToCartesian(bl,pr),n[i+1]=pr.x,n[i+2]=pr.y,n[i+3]=pr.z;return n}function Vee(e){let t=e.cartesian;if(l(t))return t;let n=e.cartesianVelocity;if(l(n))return n;let i=e.unitCartesian;if(l(i))return i;let r=e.unitSpherical;if(l(r))return O0t(r);let o=e.spherical;if(l(o))return M0t(o);let s=e.cartographicRadians;if(l(s))return N0t(s);let a=e.cartographicDegrees;if(l(a))return L0t(a);throw new oe(`${JSON.stringify(e)} is not a valid CZML interval.`)}function qCe(e,t){h.unpack(e,t,pr),h.normalize(pr,pr),h.pack(pr,e,t)}function F0t(e){let t=Vee(e);if(t.length===3)return qCe(t,0),t;for(let n=1;n<t.length;n+=4)qCe(t,n);return t}function YCe(e,t){Le.unpack(e,t,EG),Le.normalize(EG,EG),Le.pack(EG,e,t)}function B0t(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return YCe(t,0),t;for(let n=1;n<t.length;n+=5)YCe(t,n)}return t}function XCe(e){return typeof e=="boolean"?Boolean:typeof e=="number"?Number:typeof e=="string"?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?et:e.hasOwnProperty("cartesian2")?U:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?h:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?JA:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?z:e.hasOwnProperty("arcType")?ln:e.hasOwnProperty("classificationType")?Qn:e.hasOwnProperty("colorBlendMode")?ll:e.hasOwnProperty("cornerType")?rr:e.hasOwnProperty("heightReference")?We:e.hasOwnProperty("horizontalOrigin")?zi:e.hasOwnProperty("date")?K:e.hasOwnProperty("labelStyle")?Ao:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?qt:e.hasOwnProperty("distanceDisplayCondition")?jt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Le:e.hasOwnProperty("pathMode")?a0:e.hasOwnProperty("shadowMode")?Dn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?Fm:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?ie:e.hasOwnProperty("uri")?pk.default:e.hasOwnProperty("verticalOrigin")?Hn:Object}function k0t(e,t,n){switch(e){case ln:return ln[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case et:return t.boundingRectangle;case U:return t.cartesian2;case h:return Vee(t);case JA:return F0t(t);case z:return D0t(t);case Qn:return Qn[t.classificationType??t];case ll:return ll[t.colorBlendMode??t];case rr:return rr[t.cornerType??t];case We:return We[t.heightReference??t];case zi:return zi[t.horizontalOrigin??t];case Image:return WCe(t,n);case K:return K.fromIso8601(t.date??t);case Ao:return Ao[t.labelStyle??t];case Number:return t.number??t;case qt:return t.nearFarScalar;case jt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case a0:return a0[t.pathMode??t];case Le:return B0t(t);case ch:return t.number??t;case zw:return zw[t.portionToDisplay??t];case Dn:return Dn[t.shadowMode??t.shadows??t];case String:return t.string??t;case Fm:return Fm[t.stripeOrientation??t];case ie:return R0t(t);case pk.default:return WCe(t,n);case Hn:return Hn[t.verticalOrigin??t];default:throw new oe(`Unknown CzmlDataSource interval type: ${e}`)}}var U0t={HERMITE:ck,LAGRANGE:lk,LINEAR:YA};function CG(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:U0t[n],interpolationDegree:i});let r=e.forwardExtrapolationType;l(r)&&(t.forwardExtrapolationType=fu[r]);let o=e.forwardExtrapolationDuration;l(o)&&(t.forwardExtrapolationDuration=o);let s=e.backwardExtrapolationType;l(s)&&(t.backwardExtrapolationType=fu[s]);let a=e.backwardExtrapolationDuration;l(a)&&(t.backwardExtrapolationDuration=a)}var KCe={iso8601:void 0};function Ko(e){if(l(e))return KCe.iso8601=e,En.fromIso8601(KCe)}function jee(e){let t=tt.MAXIMUM_INTERVAL.clone();return t.data=e,t}function $Ce(e){let t=new _l;return t.intervals.addInterval(jee(e)),t}function JCe(e){let t=new mc(e.referenceFrame);return t.intervals.addInterval(jee(e)),t}function vG(e,t,n,i,r,o,s){let a=Ko(i.interval);l(r)&&(l(a)?a=En.intersect(a,r,iE):a=r);let c,u,f,d=!l(i.reference)&&!l(i.velocityReference),p=l(a)&&!a.equals(tt.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return cve(t[n],a)}let g=!1;if(d){if(u=k0t(e,i,o),!l(u))return;c=e.packedLength??1,f=u.length??1,g=!l(i.array)&&typeof u!="string"&&f>c&&e!==Object}let m=typeof e.unpack=="function"&&e!==ch;if(!g&&!p){d?t[n]=new li(m?e.unpack(u,0):u):t[n]=GCe(e,s,i);return}let y=t[n],A,b=i.epoch;if(l(b)&&(A=K.fromIso8601(b)),g&&!p){y instanceof Jf||(t[n]=y=new Jf(e)),y.addSamplesPackedArray(u,A),CG(i,y);return}let x;if(!g&&p){a=a.clone(),d?a.data=m?e.unpack(u,0):u:a.data=GCe(e,s,i),l(y)||(t[n]=y=d?new O_:new _l),d&&y instanceof O_?y.intervals.addInterval(a):y instanceof _l?(d&&(a.data=new li(a.data)),y.intervals.addInterval(a)):(t[n]=y=$Ce(y),d&&(a.data=new li(a.data)),y.intervals.addInterval(a));return}l(y)||(t[n]=y=new _l),y instanceof _l||(t[n]=y=$Ce(y));let T=y.intervals;x=T.findInterval(a),(!l(x)||!(x.data instanceof Jf))&&(x=a.clone(),x.data=new Jf(e),T.addInterval(x)),x.data.addSamplesPackedArray(u,A),CG(i,x.data)}function cve(e,t){if(e instanceof Jf){e.removeSamples(t);return}else if(e instanceof O_){e.intervals.removeInterval(t);return}else if(e instanceof _l){let n=e.intervals;for(let i=0;i<n.length;++i){let r=En.intersect(n.get(i),t,iE);r.isEmpty||cve(r.data,t)}n.removeInterval(t);return}}function Ee(e,t,n,i,r,o,s){if(l(i))if(Array.isArray(i))for(let a=0,c=i.length;a<c;++a)vG(e,t,n,i[a],r,o,s);else vG(e,t,n,i,r,o,s)}function ZCe(e,t,n,i,r,o){let s=Ko(n.interval);l(i)&&(l(s)?s=En.intersect(s,i,iE):s=i);let a=l(n.cartesianVelocity)?1:0,c=h.packedLength*(a+1),u,f,d=!l(n.reference),p=l(s)&&!s.equals(tt.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return lve(e[t],s)}let g,m=!1;if(d&&(l(n.referenceFrame)&&(g=ji[n.referenceFrame]),g=g??ji.FIXED,u=Vee(n),f=u.length??1,m=f>c),!m&&!p){d?e[t]=new Gl(h.unpack(u),g):e[t]=hk(o,n.reference);return}let y=e[t],A,b=n.epoch;if(l(b)&&(A=K.fromIso8601(b)),m&&!p){(!(y instanceof gc)||l(g)&&y.referenceFrame!==g)&&(e[t]=y=new gc(g,a)),y.addSamplesPackedArray(u,A),CG(n,y);return}let x;if(!m&&p){s=s.clone(),d?s.data=h.unpack(u):s.data=hk(o,n.reference),l(y)||(d?y=new R_(g):y=new mc(g),e[t]=y),d&&y instanceof R_&&l(g)&&y.referenceFrame===g?y.intervals.addInterval(s):y instanceof mc?(d&&(s.data=new Gl(s.data,g)),y.intervals.addInterval(s)):(e[t]=y=JCe(y),d&&(s.data=new Gl(s.data,g)),y.intervals.addInterval(s));return}l(y)?y instanceof mc||(e[t]=y=JCe(y)):e[t]=y=new mc(g);let T=y.intervals;x=T.findInterval(s),(!l(x)||!(x.data instanceof gc)||l(g)&&x.data.referenceFrame!==g)&&(x=s.clone(),x.data=new gc(g,a),T.addInterval(x)),x.data.addSamplesPackedArray(u,A),CG(n,x.data)}function lve(e,t){if(e instanceof gc){e.removeSamples(t);return}else if(e instanceof R_){e.intervals.removeInterval(t);return}else if(e instanceof mc){let n=e.intervals;for(let i=0;i<n.length;++i){let r=En.intersect(n.get(i),t,iE);r.isEmpty||lve(r.data,t)}n.removeInterval(t);return}}function uve(e,t,n,i,r,o){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)ZCe(e,t,n[s],i,r,o);else ZCe(e,t,n,i,r,o)}function QCe(e,t,n,i){l(n.references)?SG(e,t,n.references,n.interval,i,Fw,_l):(l(n.cartesian2)?n.array=U.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=U.unpackArray(n.cartesian)),l(n.array)&&Ee(Array,e,t,n,void 0,void 0,i))}function eve(e,t,n,i,r,o){let s=Ko(n.interval);l(i)&&(l(s)?s=En.intersect(s,i,iE):s=i);let a=e[t],c,u;if(l(s)){a instanceof yw||(a=new yw,e[t]=a);let d=a.intervals;u=d.findInterval({start:s.start,stop:s.stop}),l(u)?c=u.data:(u=s.clone(),d.addInterval(u))}else c=a;let f;l(n.solidColor)?(c instanceof Kt||(c=new Kt),f=n.solidColor,Ee(z,c,"color",f.color,void 0,void 0,o)):l(n.grid)?(c instanceof Iw||(c=new Iw),f=n.grid,Ee(z,c,"color",f.color,void 0,r,o),Ee(Number,c,"cellAlpha",f.cellAlpha,void 0,r,o),Ee(U,c,"lineCount",f.lineCount,void 0,r,o),Ee(U,c,"lineThickness",f.lineThickness,void 0,r,o),Ee(U,c,"lineOffset",f.lineOffset,void 0,r,o)):l(n.image)?(c instanceof Hy||(c=new Hy),f=n.image,Ee(Image,c,"image",f.image,void 0,r,o),Ee(U,c,"repeat",f.repeat,void 0,r,o),Ee(z,c,"color",f.color,void 0,r,o),Ee(Boolean,c,"transparent",f.transparent,void 0,r,o)):l(n.stripe)?(c instanceof kw||(c=new kw),f=n.stripe,Ee(Fm,c,"orientation",f.orientation,void 0,r,o),Ee(z,c,"evenColor",f.evenColor,void 0,r,o),Ee(z,c,"oddColor",f.oddColor,void 0,r,o),Ee(Number,c,"offset",f.offset,void 0,r,o),Ee(Number,c,"repeat",f.repeat,void 0,r,o)):l(n.polylineOutline)?(c instanceof XA||(c=new XA),f=n.polylineOutline,Ee(z,c,"color",f.color,void 0,r,o),Ee(z,c,"outlineColor",f.outlineColor,void 0,r,o),Ee(Number,c,"outlineWidth",f.outlineWidth,void 0,r,o)):l(n.polylineGlow)?(c instanceof Nw||(c=new Nw),f=n.polylineGlow,Ee(z,c,"color",f.color,void 0,r,o),Ee(Number,c,"glowPower",f.glowPower,void 0,r,o),Ee(Number,c,"taperPower",f.taperPower,void 0,r,o)):l(n.polylineArrow)?(c instanceof Dw||(c=new Dw),f=n.polylineArrow,Ee(z,c,"color",f.color,void 0,void 0,o)):l(n.polylineDash)?(c instanceof Ow||(c=new Ow),f=n.polylineDash,Ee(z,c,"color",f.color,void 0,void 0,o),Ee(z,c,"gapColor",f.gapColor,void 0,void 0,o),Ee(Number,c,"dashLength",f.dashLength,void 0,r,o),Ee(Number,c,"dashPattern",f.dashPattern,void 0,r,o)):l(n.checkerboard)&&(c instanceof gw||(c=new gw),f=n.checkerboard,Ee(z,c,"evenColor",f.evenColor,void 0,r,o),Ee(z,c,"oddColor",f.oddColor,void 0,r,o),Ee(U,c,"repeat",f.repeat,void 0,r,o)),l(u)?u.data=c:e[t]=c}function Zf(e,t,n,i,r,o){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)eve(e,t,n[s],i,r,o);else eve(e,t,n,i,r,o)}function z0t(e,t,n,i){let r=t.name;l(r)&&(e.name=t.name)}function V0t(e,t,n,i){let r=t.description;l(r)&&Ee(String,e,"description",r,void 0,i,n)}function j0t(e,t,n,i){let r=t.position;l(r)&&uve(e,"position",r,void 0,i,n)}function H0t(e,t,n,i){let r=t.viewFrom;l(r)&&Ee(h,e,"viewFrom",r,void 0,i,n)}function G0t(e,t,n,i){let r=t.orientation;l(r)&&Ee(Le,e,"orientation",r,void 0,i,n)}function W0t(e,t,n,i){let r=t.properties;if(l(r)){l(e.properties)||(e.properties=new ql);for(let o in r)if(r.hasOwnProperty(o)){e.properties.hasProperty(o)||e.properties.addProperty(o);let s=r[o];if(Array.isArray(s))for(let a=0,c=s.length;a<c;++a)vG(XCe(s[a]),e.properties,o,s[a],void 0,i,n);else vG(XCe(s),e.properties,o,s,void 0,i,n)}}}function SG(e,t,n,i,r,o,s){let a=n.map(function(c){return hk(r,c)});if(l(i)){i=Ko(i);let c=e[t];if(!(c instanceof s)){let u=new s;u.intervals.addInterval(jee(c)),e[t]=c=u}i.data=new o(a),c.intervals.addInterval(i)}else e[t]=new o(a)}function tve(e,t,n,i){let r=n.references;l(r)?SG(e,t,r,n.interval,i,Fw,_l):Ee(Array,e,t,n,void 0,void 0,i)}function nve(e,t,n,i){if(l(n))if(Array.isArray(n))for(let r=0,o=n.length;r<o;++r)tve(e,t,n[r],i);else tve(e,t,n,i)}function ive(e,t,n,i){let r=n.references;l(r)?SG(e,t,r,n.interval,i,P_,mc):(l(n.cartesian)?n.array=h.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=h.fromRadiansArrayHeights(n.cartographicRadians,ee.default):l(n.cartographicDegrees)&&(n.array=h.fromDegreesArrayHeights(n.cartographicDegrees,ee.default)),l(n.array)&&Ee(Array,e,t,n,void 0,void 0,i))}function gk(e,t,n,i){if(l(n))if(Array.isArray(n))for(let r=0,o=n.length;r<o;++r)ive(e,t,n[r],i);else ive(e,t,n,i)}function q0t(e){return h.unpackArray(e)}function Y0t(e){return h.fromRadiansArrayHeights(e,ee.default)}function X0t(e){return h.fromDegreesArrayHeights(e,ee.default)}function rve(e,t,n,i){let r=n.references;if(l(r)){let o=r.map(function(s){let a={};return SG(a,"positions",s,n.interval,i,P_,mc),a.positions});e[t]=new P_(o)}else l(n.cartesian)?n.array=n.cartesian.map(q0t):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(Y0t):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(X0t)),l(n.array)&&Ee(Array,e,t,n,void 0,void 0,i)}function K0t(e,t,n,i){if(l(n))if(Array.isArray(n))for(let r=0,o=n.length;r<o;++r)rve(e,t,n[r],i);else rve(e,t,n,i)}function $0t(e,t,n,i){if(l(n))if(Array.isArray(n))for(let r=0,o=n.length;r<o;r++)QCe(e,t,n[r],i);else QCe(e,t,n,i)}function J0t(e,t,n,i){let r=t.availability;if(!l(r))return;let o;if(Array.isArray(r))for(let s=0,a=r.length;s<a;++s)l(o)||(o=new Ps),o.addInterval(Ko(r[s]));else o=new Ps,o.addInterval(Ko(r));e.availability=o}function Z0t(e,t,n,i,r){l(t)&&Ee(JA,e,"alignedAxis",t,n,i,r)}function Q0t(e,t,n,i){let r=t.billboard;if(!l(r))return;let o=Ko(r.interval),s=e.billboard;l(s)||(e.billboard=s=new qc),Ee(Boolean,s,"show",r.show,o,i,n),Ee(Image,s,"image",r.image,o,i,n),Ee(Number,s,"scale",r.scale,o,i,n),Ee(U,s,"pixelOffset",r.pixelOffset,o,i,n),Ee(h,s,"eyeOffset",r.eyeOffset,o,i,n),Ee(zi,s,"horizontalOrigin",r.horizontalOrigin,o,i,n),Ee(Hn,s,"verticalOrigin",r.verticalOrigin,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(z,s,"color",r.color,o,i,n),Ee(ch,s,"rotation",r.rotation,o,i,n),Z0t(s,r.alignedAxis,o,i,n),Ee(Boolean,s,"sizeInMeters",r.sizeInMeters,o,i,n),Ee(Number,s,"width",r.width,o,i,n),Ee(Number,s,"height",r.height,o,i,n),Ee(qt,s,"scaleByDistance",r.scaleByDistance,o,i,n),Ee(qt,s,"translucencyByDistance",r.translucencyByDistance,o,i,n),Ee(qt,s,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,i,n),Ee(et,s,"imageSubRegion",r.imageSubRegion,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Number,s,"disableDepthTestDistance",r.disableDepthTestDistance,o,i,n)}function egt(e,t,n,i){let r=t.box;if(!l(r))return;let o=Ko(r.interval),s=e.box;l(s)||(e.box=s=new Px),Ee(Boolean,s,"show",r.show,o,i,n),Ee(h,s,"dimensions",r.dimensions,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n)}function tgt(e,t,n,i){let r=t.corridor;if(!l(r))return;let o=Ko(r.interval),s=e.corridor;l(s)||(e.corridor=s=new Rx),Ee(Boolean,s,"show",r.show,o,i,n),gk(s,"positions",r.positions,n),Ee(Number,s,"width",r.width,o,i,n),Ee(Number,s,"height",r.height,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Number,s,"extrudedHeight",r.extrudedHeight,o,i,n),Ee(We,s,"extrudedHeightReference",r.extrudedHeightReference,o,i,n),Ee(rr,s,"cornerType",r.cornerType,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Qn,s,"classificationType",r.classificationType,o,i,n),Ee(Number,s,"zIndex",r.zIndex,o,i,n)}function ngt(e,t,n,i){let r=t.cylinder;if(!l(r))return;let o=Ko(r.interval),s=e.cylinder;l(s)||(e.cylinder=s=new Ox),Ee(Boolean,s,"show",r.show,o,i,n),Ee(Number,s,"length",r.length,o,i,n),Ee(Number,s,"topRadius",r.topRadius,o,i,n),Ee(Number,s,"bottomRadius",r.bottomRadius,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Number,s,"numberOfVerticalLines",r.numberOfVerticalLines,o,i,n),Ee(Number,s,"slices",r.slices,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n)}function igt(e,t){let n=e.version;if(l(n)&&typeof n=="string"){let o=n.split(".");if(o.length===2){if(o[0]!=="1")throw new oe("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new oe("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");let i=t._documentPacket;l(e.name)&&(i.name=e.name);let r=e.clock;if(l(r)){let o=i.clock;l(o)?(o.interval=r.interval??o.interval,o.currentTime=r.currentTime??o.currentTime,o.range=r.range??o.range,o.step=r.step??o.step,o.multiplier=r.multiplier??o.multiplier):i.clock={interval:r.interval,currentTime:r.currentTime,range:r.range,step:r.step,multiplier:r.multiplier}}}function rgt(e,t,n,i){let r=t.ellipse;if(!l(r))return;let o=Ko(r.interval),s=e.ellipse;l(s)||(e.ellipse=s=new Mx),Ee(Boolean,s,"show",r.show,o,i,n),Ee(Number,s,"semiMajorAxis",r.semiMajorAxis,o,i,n),Ee(Number,s,"semiMinorAxis",r.semiMinorAxis,o,i,n),Ee(Number,s,"height",r.height,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Number,s,"extrudedHeight",r.extrudedHeight,o,i,n),Ee(We,s,"extrudedHeightReference",r.extrudedHeightReference,o,i,n),Ee(ch,s,"rotation",r.rotation,o,i,n),Ee(ch,s,"stRotation",r.stRotation,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Number,s,"numberOfVerticalLines",r.numberOfVerticalLines,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Qn,s,"classificationType",r.classificationType,o,i,n),Ee(Number,s,"zIndex",r.zIndex,o,i,n)}function ogt(e,t,n,i){let r=t.ellipsoid;if(!l(r))return;let o=Ko(r.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new Nx),Ee(Boolean,s,"show",r.show,o,i,n),Ee(h,s,"radii",r.radii,o,i,n),Ee(h,s,"innerRadii",r.innerRadii,o,i,n),Ee(Number,s,"minimumClock",r.minimumClock,o,i,n),Ee(Number,s,"maximumClock",r.maximumClock,o,i,n),Ee(Number,s,"minimumCone",r.minimumCone,o,i,n),Ee(Number,s,"maximumCone",r.maximumCone,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Number,s,"stackPartitions",r.stackPartitions,o,i,n),Ee(Number,s,"slicePartitions",r.slicePartitions,o,i,n),Ee(Number,s,"subdivisions",r.subdivisions,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n)}function sgt(e,t,n,i){let r=t.label;if(!l(r))return;let o=Ko(r.interval),s=e.label;l(s)||(e.label=s=new Jh),Ee(Boolean,s,"show",r.show,o,i,n),Ee(String,s,"text",r.text,o,i,n),Ee(String,s,"font",r.font,o,i,n),Ee(Ao,s,"style",r.style,o,i,n),Ee(Number,s,"scale",r.scale,o,i,n),Ee(Boolean,s,"showBackground",r.showBackground,o,i,n),Ee(z,s,"backgroundColor",r.backgroundColor,o,i,n),Ee(U,s,"backgroundPadding",r.backgroundPadding,o,i,n),Ee(U,s,"pixelOffset",r.pixelOffset,o,i,n),Ee(h,s,"eyeOffset",r.eyeOffset,o,i,n),Ee(zi,s,"horizontalOrigin",r.horizontalOrigin,o,i,n),Ee(Hn,s,"verticalOrigin",r.verticalOrigin,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(z,s,"fillColor",r.fillColor,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(qt,s,"translucencyByDistance",r.translucencyByDistance,o,i,n),Ee(qt,s,"pixelOffsetScaleByDistance",r.pixelOffsetScaleByDistance,o,i,n),Ee(qt,s,"scaleByDistance",r.scaleByDistance,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Number,s,"disableDepthTestDistance",r.disableDepthTestDistance,o,i,n)}function agt(e,t,n,i){let r=t.model;if(!l(r))return;let o=Ko(r.interval),s=e.model;l(s)||(e.model=s=new Tg),Ee(Boolean,s,"show",r.show,o,i,n),Ee(pk.default,s,"uri",r.gltf,o,i,n),Ee(Number,s,"scale",r.scale,o,i,n),Ee(Number,s,"minimumPixelSize",r.minimumPixelSize,o,i,n),Ee(Number,s,"maximumScale",r.maximumScale,o,i,n),Ee(Boolean,s,"incrementallyLoadTextures",r.incrementallyLoadTextures,o,i,n),Ee(Boolean,s,"runAnimations",r.runAnimations,o,i,n),Ee(Boolean,s,"clampAnimations",r.clampAnimations,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(z,s,"silhouetteColor",r.silhouetteColor,o,i,n),Ee(Number,s,"silhouetteSize",r.silhouetteSize,o,i,n),Ee(z,s,"color",r.color,o,i,n),Ee(ll,s,"colorBlendMode",r.colorBlendMode,o,i,n),Ee(Number,s,"colorBlendAmount",r.colorBlendAmount,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n);let a,c,u=r.nodeTransformations;if(l(u))if(Array.isArray(u))for(a=0,c=u.length;a<c;++a)ove(s,u[a],o,i,n);else ove(s,u,o,i,n);let f=r.articulations;if(l(f))if(Array.isArray(f))for(a=0,c=f.length;a<c;++a)sve(s,f[a],o,i,n);else sve(s,f,o,i,n)}function ove(e,t,n,i,r){let o=Ko(t.interval);l(n)&&(l(o)?o=En.intersect(o,n,iE):o=n);let s=e.nodeTransformations,a=Object.keys(t);for(let c=0,u=a.length;c<u;++c){let f=a[c];if(f==="interval")continue;let d=t[f];if(!l(d))continue;l(s)||(e.nodeTransformations=s=new ql),s.hasProperty(f)||s.addProperty(f);let p=s[f];l(p)||(s[f]=p=new Lx),Ee(h,p,"translation",d.translation,o,i,r),Ee(Le,p,"rotation",d.rotation,o,i,r),Ee(h,p,"scale",d.scale,o,i,r)}}function sve(e,t,n,i,r){let o=Ko(t.interval);l(n)&&(l(o)?o=En.intersect(o,n,iE):o=n);let s=e.articulations,a=Object.keys(t);for(let c=0,u=a.length;c<u;++c){let f=a[c];if(f==="interval")continue;let d=t[f];l(d)&&(l(s)||(e.articulations=s=new ql),s.hasProperty(f)||s.addProperty(f),Ee(Number,s,f,d,o,i,r))}}function cgt(e,t,n,i){let r=t.path;if(!l(r))return;let o=Ko(r.interval),s=e.path;l(s)||(e.path=s=new Eg),Ee(Boolean,s,"show",r.show,o,i,n),Ee(Number,s,"leadTime",r.leadTime,o,i,n),Ee(Number,s,"trailTime",r.trailTime,o,i,n),Ee(Number,s,"width",r.width,o,i,n),Ee(Number,s,"resolution",r.resolution,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(String,s,"relativeTo",r.relativeTo,o,i,n),Ee(a0,s,"materialMode",r.materialMode,o,i,n)}function lgt(e,t,n,i){let r=t.point;if(!l(r))return;let o=Ko(r.interval),s=e.point;l(s)||(e.point=s=new Bx),Ee(Boolean,s,"show",r.show,o,i,n),Ee(Number,s,"pixelSize",r.pixelSize,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(z,s,"color",r.color,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(qt,s,"scaleByDistance",r.scaleByDistance,o,i,n),Ee(qt,s,"translucencyByDistance",r.translucencyByDistance,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Number,s,"disableDepthTestDistance",r.disableDepthTestDistance,o,i,n)}function mk(e){this.polygon=e,this._definitionChanged=new be}Object.defineProperties(mk.prototype,{isConstant:{get:function(){let e=this.polygon._positions,t=this.polygon._holes;return(!l(e)||e.isConstant)&&(!l(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}});mk.prototype.getValue=function(e,t){let n;l(this.polygon._positions)&&(n=this.polygon._positions.getValue(e));let i;return l(this.polygon._holes)&&(i=this.polygon._holes.getValue(e),l(i)&&(i=i.map(function(r){return new Rc(r)}))),l(t)?(t.positions=n,t.holes=i,t):new Rc(n,i)};mk.prototype.equals=function(e){return this===e||e instanceof mk&&X.equals(this.polygon._positions,e.polygon._positions)&&X.equals(this.polygon._holes,e.polygon._holes)};function ugt(e,t,n,i){let r=t.polygon;if(!l(r))return;let o=Ko(r.interval),s=e.polygon;l(s)||(e.polygon=s=new Zh),Ee(Boolean,s,"show",r.show,o,i,n),gk(s,"_positions",r.positions,n),K0t(s,"_holes",r.holes,n),(l(s._positions)||l(s._holes))&&(s.hierarchy=new mk(s)),Ee(Number,s,"height",r.height,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Number,s,"extrudedHeight",r.extrudedHeight,o,i,n),Ee(We,s,"extrudedHeightReference",r.extrudedHeightReference,o,i,n),Ee(ch,s,"stRotation",r.stRotation,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Boolean,s,"perPositionHeight",r.perPositionHeight,o,i,n),Ee(Boolean,s,"closeTop",r.closeTop,o,i,n),Ee(Boolean,s,"closeBottom",r.closeBottom,o,i,n),Ee(ln,s,"arcType",r.arcType,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Qn,s,"classificationType",r.classificationType,o,i,n),Ee(Number,s,"zIndex",r.zIndex,o,i,n)}function fgt(e){return e?ln.GEODESIC:ln.NONE}function dgt(e,t,n,i){let r=t.polyline;if(!l(r))return;let o=Ko(r.interval),s=e.polyline;if(l(s)||(e.polyline=s=new el),Ee(Boolean,s,"show",r.show,o,i,n),gk(s,"positions",r.positions,n),Ee(Number,s,"width",r.width,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Zf(s,"material",r.material,o,i,n),Zf(s,"depthFailMaterial",r.depthFailMaterial,o,i,n),Ee(ln,s,"arcType",r.arcType,o,i,n),Ee(Boolean,s,"clampToGround",r.clampToGround,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Qn,s,"classificationType",r.classificationType,o,i,n),Ee(Number,s,"zIndex",r.zIndex,o,i,n),l(r.followSurface)&&!l(r.arcType)){let a={};Ee(Boolean,a,"followSurface",r.followSurface,o,i,n),s.arcType=P0t(a.followSurface,fgt)}}function hgt(e,t,n,i){let r=t.polylineVolume;if(!l(r))return;let o=Ko(r.interval),s=e.polylineVolume;l(s)||(e.polylineVolume=s=new kx),gk(s,"positions",r.positions,n),$0t(s,"shape",r.shape,n),Ee(Boolean,s,"show",r.show,o,i,n),Ee(rr,s,"cornerType",r.cornerType,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n)}function mgt(e,t,n,i){let r=t.rectangle;if(!l(r))return;let o=Ko(r.interval),s=e.rectangle;l(s)||(e.rectangle=s=new Qh),Ee(Boolean,s,"show",r.show,o,i,n),Ee(ie,s,"coordinates",r.coordinates,o,i,n),Ee(Number,s,"height",r.height,o,i,n),Ee(We,s,"heightReference",r.heightReference,o,i,n),Ee(Number,s,"extrudedHeight",r.extrudedHeight,o,i,n),Ee(We,s,"extrudedHeightReference",r.extrudedHeightReference,o,i,n),Ee(ch,s,"rotation",r.rotation,o,i,n),Ee(ch,s,"stRotation",r.stRotation,o,i,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n),Ee(Qn,s,"classificationType",r.classificationType,o,i,n),Ee(Number,s,"zIndex",r.zIndex,o,i,n)}function pgt(e,t,n,i){let r=t.tileset;if(!l(r))return;let o=Ko(r.interval),s=e.tileset;l(s)||(e.tileset=s=new Fx),Ee(Boolean,s,"show",r.show,o,i,n),Ee(pk.default,s,"uri",r.uri,o,i,n),Ee(Number,s,"maximumScreenSpaceError",r.maximumScreenSpaceError,o,i,n)}function ggt(e,t,n,i){let r=t.wall;if(!l(r))return;let o=Ko(r.interval),s=e.wall;l(s)||(e.wall=s=new Cg),Ee(Boolean,s,"show",r.show,o,i,n),gk(s,"positions",r.positions,n),nve(s,"minimumHeights",r.minimumHeights,n),nve(s,"maximumHeights",r.maximumHeights,n),Ee(Number,s,"granularity",r.granularity,o,i,n),Ee(Boolean,s,"fill",r.fill,o,i,n),Zf(s,"material",r.material,o,i,n),Ee(Boolean,s,"outline",r.outline,o,i,n),Ee(z,s,"outlineColor",r.outlineColor,o,i,n),Ee(Number,s,"outlineWidth",r.outlineWidth,o,i,n),Ee(Dn,s,"shadows",r.shadows,o,i,n),Ee(jt,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,i,n)}function ave(e,t,n,i,r){let o=e.id;if(l(o)||(o=$n()),zee=o,!l(r._version)&&o!=="document")throw new oe("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(o);else if(o==="document")igt(e,r);else{let s=t.getOrCreateEntity(o),a=e.parent;l(a)&&(s.parent=t.getOrCreateEntity(a));for(let c=n.length-1;c>-1;c--)n[c](s,e,t,i)}zee=void 0}function _gt(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let r=e._entityCollection.computeAvailability();if(!r.start.equals(tt.MINIMUM_VALUE)){let o=r.start,s=r.stop,a=K.secondsDifference(s,o),c=Math.round(a/120);return t=new Lm,t.startTime=K.clone(o),t.stopTime=K.clone(s),t.clockRange=Rs.LOOP_STOP,t.multiplier=c,t.currentTime=K.clone(o),t.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new Lm,t.startTime=tt.MINIMUM_VALUE.clone(),t.stopTime=tt.MAXIMUM_VALUE.clone(),t.currentTime=tt.MINIMUM_VALUE.clone(),t.clockRange=Rs.LOOP_STOP,t.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=Ko(n.interval);return l(i)&&(t.startTime=i.start,t.stopTime=i.stop),l(n.currentTime)&&(t.currentTime=K.fromIso8601(n.currentTime)),l(n.range)&&(t.clockRange=Rs[n.range]??Rs.LOOP_STOP),l(n.step)&&(t.clockStep=Vr[n.step]??Vr.SYSTEM_CLOCK_MULTIPLIER),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function fve(e,t,n,i){n=n??H.EMPTY_OBJECT;let r=t,o=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new It(s)),e._credit=s,typeof t=="string"||t instanceof De){t=De.createIfNeeded(t),r=t.fetchJson(),o=o??t.clone();let a=e._resourceCredits,c=t.credits;if(l(c)){let u=c.length;for(let f=0;f<u;f++)a.push(c[f])}}return o=De.createIfNeeded(o),Ds.setLoading(e,!0),Promise.resolve(r).then(function(a){return ygt(e,a,o,i)}).catch(function(a){return Ds.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function ygt(e,t,n,i){Ds.setLoading(e,!0);let r=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new dve,r.removeAll()),sa._processCzml(t,r,n,void 0,e);let o=_gt(e),s=e._documentPacket;return l(s.name)&&e._name!==s.name?(e._name=s.name,o=!0):!l(e._name)&&l(n)&&(e._name=w_(n.getUrlComponent()),o=!0),Ds.setLoading(e,!1),o&&e._changed.raiseEvent(e),e}function dve(){this.name=void 0,this.clock=void 0}function sa(e){this._name=e,this._changed=new be,this._error=new be,this._isLoading=!1,this._loading=new be,this._clock=void 0,this._documentPacket=new dve,this._version=void 0,this._entityCollection=new Ya(this),this._entityCluster=new Kf,this._credit=void 0,this._resourceCredits=[]}sa.load=function(e,t){return new sa().load(e,t)};Object.defineProperties(sa.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});sa.updaters=[Q0t,egt,tgt,ngt,rgt,ogt,sgt,agt,z0t,V0t,cgt,lgt,ugt,dgt,hgt,W0t,mgt,j0t,pgt,H0t,ggt,G0t,J0t];sa.registerUpdater=function(e){sa.updaters.includes(e)||sa.updaters.push(e)};sa.unregisterUpdater=function(e){if(sa.updaters.includes(e)){let t=sa.updaters.indexOf(e);sa.updaters.splice(t,1)}};sa.prototype.process=function(e,t){return fve(this,e,t,!1)};sa.prototype.load=function(e,t){return fve(this,e,t,!0)};sa.prototype.update=function(e){return!0};sa.processPacketData=Ee;sa.processPositionPacketData=uve;sa.processMaterialPacketData=Zf;sa._processCzml=function(e,t,n,i,r){if(i=i??sa.updaters,Array.isArray(e))for(let o=0,s=e.length;o<s;++o)ave(e[o],t,i,n,r);else ave(e,t,i,n,r)};var _k=sa;function hu(){this._dataSources=[],this._dataSourceAdded=new be,this._dataSourceRemoved=new be,this._dataSourceMoved=new be}Object.defineProperties(hu.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}});hu.prototype.add=function(e){let t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})};hu.prototype.remove=function(e,t){t=t??!1;let n=this._dataSources.indexOf(e);return n!==-1?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&typeof e.destroy=="function"&&e.destroy(),!0):!1};hu.prototype.removeAll=function(e){e=e??!1;let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let r=t[n];this._dataSourceRemoved.raiseEvent(this,r),e&&typeof r.destroy=="function"&&r.destroy()}this._dataSources=[]};hu.prototype.contains=function(e){return this.indexOf(e)!==-1};hu.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};hu.prototype.get=function(e){return this._dataSources[e]};hu.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function wG(e,t){return e.indexOf(t)}function hve(e,t,n){let i=e._dataSources,r=i.length-1;if(t=D.clamp(t,0,r),n=D.clamp(n,0,r),t===n)return;let o=i[t];i[t]=i[n],i[n]=o,e.dataSourceMoved.raiseEvent(o,n,t)}hu.prototype.raise=function(e){let t=wG(this._dataSources,e);hve(this,t,t+1)};hu.prototype.lower=function(e){let t=wG(this._dataSources,e);hve(this,t,t-1)};hu.prototype.raiseToTop=function(e){let t=wG(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))};hu.prototype.lowerToBottom=function(e){let t=wG(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};hu.prototype.isDestroyed=function(){return!1};hu.prototype.destroy=function(){return this.removeAll(!0),le(this)};var yk=hu;function _c(e){e=e??H.EMPTY_OBJECT,this._primitives=[],this._guid=$n(),this._primitiveAdded=new be,this._primitiveRemoved=new be,this._zIndex=void 0,this.show=e.show??!0,this.destroyPrimitives=e.destroyPrimitives??!0,this._countReferences=e.countReferences??!1}Object.defineProperties(_c.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});_c.prototype.add=function(e,t){let n=l(t),i=e._external=e._external||{},r=i._composites=i._composites||{};return r[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._countReferences&&(l(i._referenceCount)?++i._referenceCount:i._referenceCount=1),this._primitiveAdded.raiseEvent(e),e};_c.prototype.remove=function(e){if(this.contains(e)){let t=this._primitives.indexOf(e);if(t!==-1)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this._countReferences&&e._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||e._external._referenceCount<=0)&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1};_c.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};_c.prototype.removeAll=function(){let e=this._primitives,t=e.length;for(let n=0;n<t;++n){let i=e[n];delete i._external._composites[this._guid],this._countReferences&&i._external._referenceCount--,this.destroyPrimitives&&(!this._countReferences||i._external._referenceCount<=0)&&i.destroy(),this._primitiveRemoved.raiseEvent(i)}this._primitives=[]};_c.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function IG(e,t){return e._primitives.indexOf(t)}_c.prototype.raise=function(e){if(l(e)){let t=IG(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};_c.prototype.raiseToTop=function(e){if(l(e)){let t=IG(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};_c.prototype.lower=function(e){if(l(e)){let t=IG(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};_c.prototype.lowerToBottom=function(e){if(l(e)){let t=IG(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};_c.prototype.get=function(e){return this._primitives[e]};_c.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};_c.prototype.prePassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.prePassesUpdate)&&i.prePassesUpdate(e)}};_c.prototype.updateForPass=function(e,t){let n=this._primitives;for(let i=0;i<n.length;++i){let r=n[i];l(r.updateForPass)&&r.updateForPass(e,t)}};_c.prototype.postPassesUpdate=function(e){let t=this._primitives;for(let n=0;n<t.length;++n){let i=t[n];l(i.postPassesUpdate)&&i.postPassesUpdate(e)}};_c.prototype.isDestroyed=function(){return!1};_c.prototype.destroy=function(){return this.removeAll(),le(this)};var xl=_c;function c0(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(c0.prototype,{length:{get:function(){return this._length}}});c0.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new xl({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,r=0;for(;r<i.length&&i[r]._zIndex<t;)r++;i.splice(r,0,n)}return n.add(e),this._length++,e._zIndex=t,e};c0.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};c0.prototype.remove=function(e,t){if(this.contains(e)){let n=e._zIndex,i=this._collections[n],r;return t?r=i.remove(e):r=i.removeAndDestroy(e),r&&this._length--,i.length===0&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),r}return!1};c0.prototype.removeAll=function(){let e=this._collectionsArray;for(let t=0;t<e.length;t++){let n=e[t];n.destroyPrimitives=!0,n.destroy()}this._collections={},this._collectionsArray=[],this._length=0};c0.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};c0.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};c0.prototype.isDestroyed=function(){return!1};c0.prototype.destroy=function(){return this.removeAll(),le(this)};var Ak=c0;function Vw(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new kt}Vw.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};Vw.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};Vw.prototype.update=function(e){let t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0};Vw.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};Vw.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):Pt.FAILED};var rE=Vw;var Gee={},PG=new h,mve=new h,pve=new Le,gve=new $;function jw(e,t,n,i,r,o,s,a,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),PG),h.multiplyByScalar(n,Math.sin(f),mve),h.add(PG,mve,PG);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=o/Math.sqrt(s*d+r*p)/a;return Le.fromAxisAngle(PG,m,pve),$.fromQuaternion(pve,gve),$.multiplyByVector(gve,c,u),h.normalize(u,u),h.multiplyByScalar(u,a,u),u}var _ve=new h,yve=new h,Hee=new h,Agt=new h;Gee.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,r=t.height,o=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,g=h.fromArray(e,f,_ve);i.scaleToGeodeticSurface(g,g);let m=h.clone(g,yve),y=i.geodeticSurfaceNormal(g,Agt),A=h.multiplyByScalar(y,r,Hee);h.add(g,A,g),n&&(h.multiplyByScalar(y,o,A),h.add(m,A,m),a[f+u]=m.x,a[d+u]=m.y,a[p+u]=m.z),a[f]=g.x,a[d]=g.y,a[p]=g.z}return a};var bgt=new h,xgt=new h,Tgt=new h;Gee.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,r=e.semiMajorAxis,o=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=r*r,f=r*i,d=h.magnitude(s),p=h.normalize(s,bgt),g=h.cross(h.UNIT_Z,s,xgt);g=h.normalize(g,g);let m=h.cross(p,g,Tgt),y=1+Math.ceil(D.PI_OVER_TWO/a),A=D.PI_OVER_TWO/(y-1),b=D.PI_OVER_TWO-y*A;b<0&&(y-=Math.ceil(Math.abs(b)/A));let x=2*(y*(y+2)),T=t?new Array(x*3):void 0,E=0,v=_ve,S=yve,I=y*4*3,R=I-1,O=0,L=n?new Array(I):void 0,_,C,w,P,M;for(b=D.PI_OVER_TWO,v=jw(b,o,m,g,c,f,u,d,p,v),t&&(T[E++]=v.x,T[E++]=v.y,T[E++]=v.z),n&&(L[R--]=v.z,L[R--]=v.y,L[R--]=v.x),b=D.PI_OVER_TWO-A,_=1;_<y+1;++_){if(v=jw(b,o,m,g,c,f,u,d,p,v),S=jw(Math.PI-b,o,m,g,c,f,u,d,p,S),t){for(T[E++]=v.x,T[E++]=v.y,T[E++]=v.z,w=2*_+2,C=1;C<w-1;++C)P=C/(w-1),M=h.lerp(v,S,P,Hee),T[E++]=M.x,T[E++]=M.y,T[E++]=M.z;T[E++]=S.x,T[E++]=S.y,T[E++]=S.z}n&&(L[R--]=v.z,L[R--]=v.y,L[R--]=v.x,L[O++]=S.x,L[O++]=S.y,L[O++]=S.z),b=D.PI_OVER_TWO-(_+1)*A}for(_=y;_>1;--_){if(b=D.PI_OVER_TWO-(_-1)*A,v=jw(-b,o,m,g,c,f,u,d,p,v),S=jw(b+Math.PI,o,m,g,c,f,u,d,p,S),t){for(T[E++]=v.x,T[E++]=v.y,T[E++]=v.z,w=2*(_-1)+2,C=1;C<w-1;++C)P=C/(w-1),M=h.lerp(v,S,P,Hee),T[E++]=M.x,T[E++]=M.y,T[E++]=M.z;T[E++]=S.x,T[E++]=S.y,T[E++]=S.z}n&&(L[R--]=v.z,L[R--]=v.y,L[R--]=v.x,L[O++]=S.x,L[O++]=S.y,L[O++]=S.z)}b=D.PI_OVER_TWO,v=jw(-b,o,m,g,c,f,u,d,p,v);let F={};return t&&(T[E++]=v.x,T[E++]=v.y,T[E]=v.z,F.positions=T,F.numPts=y),n&&(L[R--]=v.z,L[R--]=v.y,L[R]=v.x,F.outerPositions=L),F};var Qu=Gee;var Hw=new h,Wee=new h,qee=new h,Ave=new h,Pa=new U,bve=new $,Egt=new $,Yee=new Le,xve=new h,Tve=new h,Eve=new h,OG=new he,Cve=new h,vve=new U,Sve=new U;function wve(e,t,n){let i=t.vertexFormat,r=t.center,o=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,g=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,y=f?new Float32Array(u*3):void 0,A=0,b=xve,x=Tve,T=Eve,E=new Ui(a),v=E.project(a.cartesianToCartographic(r,OG),Cve),S=a.scaleToGeodeticSurface(r,Hw);a.geodeticSurfaceNormal(S,S);let I=bve,R=Egt;if(c!==0){let M=Le.fromAxisAngle(S,c,Yee);I=$.fromQuaternion(M,I),M=Le.fromAxisAngle(S,-c,Yee),R=$.fromQuaternion(M,R)}else I=$.clone($.IDENTITY,I),R=$.clone($.IDENTITY,R);let O=U.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,vve),L=U.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Sve),_=e.length,C=n?_:0,w=C/3*2;for(let M=0;M<_;M+=3){let F=M+1,V=M+2,B=h.fromArray(e,M,Hw);if(i.st){let j=$.multiplyByVector(I,B,Wee),k=E.project(a.cartesianToCartographic(j,OG),qee);h.subtract(k,v,k),Pa.x=(k.x+o)/(2*o),Pa.y=(k.y+s)/(2*s),O.x=Math.min(Pa.x,O.x),O.y=Math.min(Pa.y,O.y),L.x=Math.max(Pa.x,L.x),L.y=Math.max(Pa.y,L.y),n&&(d[A+w]=Pa.x,d[A+1+w]=Pa.y),d[A++]=Pa.x,d[A++]=Pa.y}(i.normal||i.tangent||i.bitangent||f)&&(b=a.geodeticSurfaceNormal(B,b),f&&(y[M+C]=-b.x,y[F+C]=-b.y,y[V+C]=-b.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(x=h.normalize(h.cross(h.UNIT_Z,b,x),x),$.multiplyByVector(R,x,x)),i.normal&&(p[M]=b.x,p[F]=b.y,p[V]=b.z,n&&(p[M+C]=-b.x,p[F+C]=-b.y,p[V+C]=-b.z)),i.tangent&&(g[M]=x.x,g[F]=x.y,g[V]=x.z,n&&(g[M+C]=-x.x,g[F+C]=-x.y,g[V+C]=-x.z)),i.bitangent&&(T=h.normalize(h.cross(b,x,T),T),m[M]=T.x,m[F]=T.y,m[V]=T.z,n&&(m[M+C]=T.x,m[F+C]=T.y,m[V+C]=T.z))))}if(i.st){_=d.length;for(let M=0;M<_;M+=2)d[M]=(d[M]-O.x)/(L.x-O.x),d[M+1]=(d[M+1]-O.y)/(L.y-O.y)}let P=new Tn;if(i.position){let M=Qu.raisePositionsToHeight(e,t,n);P.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:M})}if(i.st&&(P.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(P.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(P.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),i.bitangent&&(P.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),f&&(P.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:y})),n&&l(t.offsetAttribute)){let M=new Uint8Array(u);if(t.offsetAttribute===mn.TOP)M=M.fill(1,0,u/2);else{let F=t.offsetAttribute===mn.NONE?0:1;M=M.fill(F)}P.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return P}function Ive(e){let t=new Array(12*(e*(e+1))-6),n=0,i,r,o,s,a;for(i=0,o=1,s=0;s<3;s++)t[n++]=o++,t[n++]=i,t[n++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,i=(s-1)*s-1,t[n++]=o++,t[n++]=i,t[n++]=o,r=2*s,a=0;a<r-1;++a)t[n++]=o,t[n++]=i++,t[n++]=i,t[n++]=o++,t[n++]=i,t[n++]=o;t[n++]=o++,t[n++]=i,t[n++]=o}for(r=e*2,++o,++i,s=0;s<r-1;++s)t[n++]=o,t[n++]=i++,t[n++]=i,t[n++]=o++,t[n++]=i,t[n++]=o;for(t[n++]=o,t[n++]=i++,t[n++]=i,t[n++]=o++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=o,r=2*s,a=0;a<r-1;++a)t[n++]=o,t[n++]=i++,t[n++]=i,t[n++]=o++,t[n++]=i,t[n++]=o;t[n++]=i++,t[n++]=i++,t[n++]=o++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=o;return t}var oE=new h;function Cgt(e){let t=e.center;oE=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,oE),e.height,oE),oE=h.add(t,oE,oE);let n=new ue(oE,e.semiMajorAxis),i=Qu.computeEllipsePositions(e,!0,!1),r=i.positions,o=i.numPts,s=wve(r,e,!1),a=Ive(o);return a=je.createTypedArray(r.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function vgt(e,t){let n=t.vertexFormat,i=t.center,r=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,g=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,y=n.bitangent?new Float32Array(f*3):void 0,A=t.shadowVolume,b=A?new Float32Array(f*3):void 0,x=0,T=xve,E=Tve,v=Eve,S=new Ui(s),I=S.project(s.cartesianToCartographic(i,OG),Cve),R=s.scaleToGeodeticSurface(i,Hw);s.geodeticSurfaceNormal(R,R);let O=Le.fromAxisAngle(R,u,Yee),L=$.fromQuaternion(O,bve),_=U.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,vve),C=U.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Sve),w=e.length,P=w/3*2;for(let F=0;F<w;F+=3){let V=F+1,B=F+2,j=h.fromArray(e,F,Hw),k;if(n.st){let q=$.multiplyByVector(L,j,Wee),Q=S.project(s.cartesianToCartographic(q,OG),qee);h.subtract(Q,I,Q),Pa.x=(Q.x+r)/(2*r),Pa.y=(Q.y+o)/(2*o),_.x=Math.min(Pa.x,_.x),_.y=Math.min(Pa.y,_.y),C.x=Math.max(Pa.x,C.x),C.y=Math.max(Pa.y,C.y),p[x+P]=Pa.x,p[x+1+P]=Pa.y,p[x++]=Pa.x,p[x++]=Pa.y}j=s.scaleToGeodeticSurface(j,j),k=h.clone(j,Wee),T=s.geodeticSurfaceNormal(j,T),A&&(b[F+w]=-T.x,b[V+w]=-T.y,b[B+w]=-T.z);let G=h.multiplyByScalar(T,a,Ave);if(j=h.add(j,G,j),G=h.multiplyByScalar(T,c,G),k=h.add(k,G,k),n.position&&(d[F+w]=k.x,d[V+w]=k.y,d[B+w]=k.z,d[F]=j.x,d[V]=j.y,d[B]=j.z),n.normal||n.tangent||n.bitangent){v=h.clone(T,v);let q=h.fromArray(e,(F+3)%w,Ave);h.subtract(q,j,q);let Q=h.subtract(k,j,qee);T=h.normalize(h.cross(Q,q,T),T),n.normal&&(g[F]=T.x,g[V]=T.y,g[B]=T.z,g[F+w]=T.x,g[V+w]=T.y,g[B+w]=T.z),n.tangent&&(E=h.normalize(h.cross(v,T,E),E),m[F]=E.x,m[V]=E.y,m[B]=E.z,m[F+w]=E.x,m[F+1+w]=E.y,m[F+2+w]=E.z),n.bitangent&&(y[F]=v.x,y[V]=v.y,y[B]=v.z,y[F+w]=v.x,y[V+w]=v.y,y[B+w]=v.z)}}if(n.st){w=p.length;for(let F=0;F<w;F+=2)p[F]=(p[F]-_.x)/(C.x-_.x),p[F+1]=(p[F+1]-_.y)/(C.y-_.y)}let M=new Tn;if(n.position&&(M.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(M.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(M.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),n.tangent&&(M.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(M.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:y})),A&&(M.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:b})),l(t.offsetAttribute)){let F=new Uint8Array(f);if(t.offsetAttribute===mn.TOP)F=F.fill(1,0,f/2);else{let V=t.offsetAttribute===mn.NONE?0:1;F=F.fill(V)}M.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:F})}return M}function Sgt(e){let t=e.length/3,n=je.createTypedArray(t,t*6),i=0;for(let r=0;r<t;r++){let o=r,s=r+t,a=(o+1)%t,c=a+t;n[i++]=o,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var DG=new ue,RG=new ue;function wgt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,r=h.multiplyByScalar(n.geodeticSurfaceNormal(t,Hw),e.height,Hw);DG.center=h.add(t,r,DG.center),DG.radius=i,r=h.multiplyByScalar(n.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),RG.center=h.add(t,r,RG.center),RG.radius=i;let o=Qu.computeEllipsePositions(e,!0,!0),s=o.positions,a=o.numPts,c=o.outerPositions,u=ue.union(DG,RG),f=wve(s,e,!0),d=Ive(a),p=d.length;d.length=p*2;let g=s.length/3;for(let E=0;E<p;E+=3)d[E+p]=d[E+2]+g,d[E+1+p]=d[E+1]+g,d[E+2+p]=d[E]+g;let m=je.createTypedArray(g*2/3,d),y=new St({attributes:f,indices:m,primitiveType:Oe.TRIANGLES}),A=vgt(c,e);d=Sgt(c);let b=je.createTypedArray(c.length*2/3,d),x=new St({attributes:A,indices:b,primitiveType:Oe.TRIANGLES}),T=Gn.combineInstances([new Ft({geometry:y}),new Ft({geometry:x})]);return{boundingSphere:u,attributes:T[0].attributes,indices:T[0].indices}}function Pve(e,t,n,i,r,o,s){let c=Qu.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:r},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=ie.fromCartesianArray(f,o,s);return d.width>D.PI&&(d.north=d.north>0?D.PI_OVER_TWO-D.EPSILON7:d.north,d.south=d.south<0?D.EPSILON7-D.PI_OVER_TWO:d.south,d.east=D.PI,d.west=-D.PI),d}function u0(e){e=e??H.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ee.default,i=e.semiMajorAxis,r=e.semiMinorAxis,o=e.granularity??D.RADIANS_PER_DEGREE,s=e.vertexFormat??Be.DEFAULT,a=e.height??0,c=e.extrudedHeight??a;this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=r,this._ellipsoid=ee.clone(n),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._height=Math.max(c,a),this._granularity=o,this._vertexFormat=Be.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=e.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}u0.packedLength=h.packedLength+ee.packedLength+Be.packedLength+9;u0.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.packedLength,ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var Dve=new h,Rve=new ee,Ove=new Be,l0={center:Dve,ellipsoid:Rve,vertexFormat:Ove,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};u0.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,Dve);t+=h.packedLength;let r=ee.unpack(e,t,Rve);t+=ee.packedLength;let o=Be.unpack(e,t,Ove);t+=Be.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],g=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=ee.clone(r,n._ellipsoid),n._vertexFormat=Be.clone(o,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=m===-1?void 0:m,n):(l0.height=f,l0.extrudedHeight=p,l0.granularity=d,l0.stRotation=u,l0.rotation=c,l0.semiMajorAxis=s,l0.semiMinorAxis=a,l0.shadowVolume=g,l0.offsetAttribute=m===-1?void 0:m,new u0(l0))};u0.computeRectangle=function(e,t){e=e??H.EMPTY_OBJECT;let n=e.center,i=e.ellipsoid??ee.default,r=e.semiMajorAxis,o=e.semiMinorAxis,s=e.granularity??D.RADIANS_PER_DEGREE,a=e.rotation??0;return Pve(n,r,o,a,s,i,t)};u0.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!D.equalsEpsilon(t,n,0,D.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let r={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},o;if(i)r.extrudedHeight=n,r.shadowVolume=e._shadowVolume,r.offsetAttribute=e._offsetAttribute,o=wgt(r);else if(o=Cgt(r),l(e._offsetAttribute)){let s=o.attributes.position.values.length,a=e._offsetAttribute===mn.NONE?0:1,c=new Uint8Array(s/3).fill(a);o.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new St({attributes:o.attributes,indices:o.indices,primitiveType:Oe.TRIANGLES,boundingSphere:o.boundingSphere,offsetAttribute:e._offsetAttribute})};u0.createShadowVolume=function(e,t,n){let i=e._granularity,r=e._ellipsoid,o=t(i,r),s=n(i,r);return new u0({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:r,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:o,height:s,vertexFormat:Be.POSITION_ONLY,shadowVolume:!0})};function Igt(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Qu.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,r=i.length/3,o=new Array(r);for(let c=0;c<r;++c)o[c]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return St._textureCoordinateRotationPoints(o,t,s,a)}Object.defineProperties(u0.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Pve(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Igt(this)),this._textureCoordinateRotationPoints}}});var mu=u0;var Mve=new h,sE=new h;function Pgt(e){let t=e.center;sE=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,sE),e.height,sE),sE=h.add(t,sE,sE);let n=new ue(sE,e.semiMajorAxis),i=Qu.computeEllipsePositions(e,!1,!0).outerPositions,r=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:Qu.raisePositionsToHeight(i,e,!1)})}),o=i.length/3,s=je.createTypedArray(o,o*2),a=0;for(let c=0;c<o;++c)s[a++]=c,s[a++]=(c+1)%o;return{boundingSphere:n,attributes:r,indices:s}}var MG=new ue,NG=new ue;function Dgt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,r=h.multiplyByScalar(n.geodeticSurfaceNormal(t,Mve),e.height,Mve);MG.center=h.add(t,r,MG.center),MG.radius=i,r=h.multiplyByScalar(n.geodeticSurfaceNormal(t,r),e.extrudedHeight,r),NG.center=h.add(t,r,NG.center),NG.radius=i;let o=Qu.computeEllipsePositions(e,!1,!0).outerPositions,s=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:Qu.raisePositionsToHeight(o,e,!0)})});o=s.position.values;let a=ue.union(MG,NG),c=o.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===mn.TOP)m=m.fill(1,0,c/2);else{let y=e.offsetAttribute===mn.NONE?0:1;m=m.fill(y)}s.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=e.numberOfVerticalLines??16;u=D.clamp(u,0,c/2);let f=je.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let g;if(u>0){let m=Math.min(u,c);g=Math.round(c/m);let y=Math.min(g*u,c);for(p=0;p<y;p+=g)f[d++]=p,f[d++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function Gw(e){e=e??H.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ee.default,i=e.semiMajorAxis,r=e.semiMinorAxis,o=e.granularity??D.RADIANS_PER_DEGREE,s=e.height??0,a=e.extrudedHeight??s;this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=r,this._ellipsoid=ee.clone(n),this._rotation=e.rotation??0,this._height=Math.max(a,s),this._granularity=o,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(e.numberOfVerticalLines??16,0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}Gw.packedLength=h.packedLength+ee.packedLength+8;Gw.pack=function(e,t,n){return n=n??0,h.pack(e._center,t,n),n+=h.packedLength,ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var Nve=new h,Lve=new ee,L_={center:Nve,ellipsoid:Lve,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};Gw.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,Nve);t+=h.packedLength;let r=ee.unpack(e,t,Lve);t+=ee.packedLength;let o=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=ee.clone(r,n._ellipsoid),n._semiMajorAxis=o,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(L_.height=c,L_.extrudedHeight=f,L_.granularity=u,L_.rotation=a,L_.semiMajorAxis=o,L_.semiMinorAxis=s,L_.numberOfVerticalLines=d,L_.offsetAttribute=p===-1?void 0:p,new Gw(L_))};Gw.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!D.equalsEpsilon(t,n,0,D.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let r={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},o;if(i)r.extrudedHeight=n,r.offsetAttribute=e._offsetAttribute,o=Dgt(r);else if(o=Pgt(r),l(e._offsetAttribute)){let s=o.attributes.position.values.length,a=e._offsetAttribute===mn.NONE?0:1,c=new Uint8Array(s/3).fill(a);o.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new St({attributes:o.attributes,indices:o.indices,primitiveType:Oe.LINES,boundingSphere:o.boundingSphere,offsetAttribute:e._offsetAttribute})};var Qf=Gw;var Fve=new z,Bve=h.ZERO,kve=new h,Uve=new ie;function Rgt(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Bm(e,t){ii.call(this,{entity:e,scene:t,geometryOptions:new Rgt(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(Bm.prototype=Object.create(ii.prototype),Bm.prototype.constructor=Bm);Bm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let r;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(r=this._materialProperty.color.getValue(e,Fve)),l(r)||(r=z.WHITE),i.color=Jt.fromColor(r)}return l(this._options.offsetAttribute)&&(i.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Bve,kve))),new Ft({id:t,geometry:new mu(this._options),attributes:i})};Bm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Fve),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Bve,kve))),new Ft({id:t,geometry:new Qf(this._options),attributes:o})};Bm.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};Bm.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||Pi.prototype._isHidden.call(this,e,t)};Bm.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!X.isConstant(t.rotation)||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.numberOfVerticalLines)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};Bm.prototype._setStaticOptions=function(e,t){let n=X.getValueOrUndefined(t.height,tt.MINIMUM_VALUE),i=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),r=X.getValueOrUndefined(t.extrudedHeight,tt.MINIMUM_VALUE),o=X.getValueOrDefault(t.extrudedHeightReference,tt.MINIMUM_VALUE,We.NONE);l(r)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Kt?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(tt.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(tt.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(tt.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=X.getValueOrUndefined(t.rotation,tt.MINIMUM_VALUE),s.granularity=X.getValueOrUndefined(t.granularity,tt.MINIMUM_VALUE),s.stRotation=X.getValueOrUndefined(t.stRotation,tt.MINIMUM_VALUE),s.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,tt.MINIMUM_VALUE),s.offsetAttribute=ii.computeGeometryOffsetAttribute(n,i,r,o),s.height=ii.getGeometryHeight(n,i),r=ii.getGeometryExtrudedHeight(r,o),r===ii.CLAMP_TO_GROUND&&(r=Mi.getMinimumMaximumHeights(mu.computeRectangle(s,Uve)).minimumTerrainHeight),s.extrudedHeight=r};Bm.DynamicGeometryUpdater=Ww;function Ww(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Ww.prototype=Object.create(Ii.prototype),Ww.prototype.constructor=Ww);Ww.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||Ii.prototype._isHidden.call(this,e,t,n)};Ww.prototype._setOptions=function(e,t,n){let i=this._options,r=X.getValueOrUndefined(t.height,n),o=X.getValueOrDefault(t.heightReference,n,We.NONE),s=X.getValueOrUndefined(t.extrudedHeight,n),a=X.getValueOrDefault(t.extrudedHeightReference,n,We.NONE);l(s)&&!l(r)&&(r=0),i.center=X.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=X.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=X.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=X.getValueOrUndefined(t.rotation,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=X.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=ii.computeGeometryOffsetAttribute(r,o,s,a),i.height=ii.getGeometryHeight(r,o),s=ii.getGeometryExtrudedHeight(s,a),s===ii.CLAMP_TO_GROUND&&(s=Mi.getMinimumMaximumHeights(mu.computeRectangle(i,Uve)).minimumTerrainHeight),i.extrudedHeight=s};var bk=Bm;var Ogt=new h,Mgt=new h,Ngt=new h,Lgt=new h,Fgt=new h,Bgt=new h(1,1,1),zve=Math.cos,Vve=Math.sin;function F_(e){e=e??H.EMPTY_OBJECT;let t=e.radii??Bgt,n=e.innerRadii??t,i=e.minimumClock??0,r=e.maximumClock??D.TWO_PI,o=e.minimumCone??0,s=e.maximumCone??D.PI,a=Math.round(e.stackPartitions??64),c=Math.round(e.slicePartitions??64),u=e.vertexFormat??Be.DEFAULT;this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=r,this._minimumCone=o,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Be.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}F_.packedLength=2*h.packedLength+Be.packedLength+7;F_.pack=function(e,t,n){return n=n??0,h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=e._offsetAttribute??-1,t};var jve=new h,Hve=new h,Gve=new Be,ZA={radii:jve,innerRadii:Hve,vertexFormat:Gve,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};F_.unpack=function(e,t,n){t=t??0;let i=h.unpack(e,t,jve);t+=h.packedLength;let r=h.unpack(e,t,Hve);t+=h.packedLength;let o=Be.unpack(e,t,Gve);t+=Be.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(r,n._innerRadii),n._vertexFormat=Be.clone(o,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(ZA.minimumClock=s,ZA.maximumClock=a,ZA.minimumCone=c,ZA.maximumCone=u,ZA.stackPartitions=f,ZA.slicePartitions=d,ZA.offsetAttribute=p===-1?void 0:p,new F_(ZA))};F_.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,r=e._maximumClock,o=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(r-i)/D.TWO_PI),u=Math.round(u*Math.abs(s-o)/D.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,g=[o],m=[i];for(f=0;f<u;f++)g.push(o+f*(s-o)/(u-1));for(g.push(s),d=0;d<c;d++)m.push(i+d*(r-i)/(c-1));m.push(r);let y=g.length,A=m.length,b=0,x=1,T=n.x!==t.x||n.y!==t.y||n.z!==t.z,E=!1,v=!1,S=!1;T&&(x=2,o>0&&(E=!0,b+=c-1),s<Math.PI&&(v=!0,b+=c-1),(r-i)%D.TWO_PI?(S=!0,b+=(u-1)*2+1):b+=1);let I=A*y*x,R=new Float64Array(I*3),O=new Array(I).fill(!1),L=new Array(I).fill(!1),_=c*u*x,C=6*(_+b+1-(c+u)*x),w=je.createTypedArray(_,C),P=a.normal?new Float32Array(I*3):void 0,M=a.tangent?new Float32Array(I*3):void 0,F=a.bitangent?new Float32Array(I*3):void 0,V=a.st?new Float32Array(I*2):void 0,B=new Array(y),j=new Array(y);for(f=0;f<y;f++)B[f]=Vve(g[f]),j[f]=zve(g[f]);let k=new Array(A),G=new Array(A);for(d=0;d<A;d++)G[d]=zve(m[d]),k[d]=Vve(m[d]);for(f=0;f<y;f++)for(d=0;d<A;d++)R[p++]=t.x*B[f]*G[d],R[p++]=t.y*B[f]*k[d],R[p++]=t.z*j[f];let q=I/2;if(T)for(f=0;f<y;f++)for(d=0;d<A;d++)R[p++]=n.x*B[f]*G[d],R[p++]=n.y*B[f]*k[d],R[p++]=n.z*j[f],O[q]=!0,f>0&&f!==y-1&&d!==0&&d!==A-1&&(L[q]=!0),q++;p=0;let Q,W;for(f=1;f<y-2;f++)for(Q=f*A,W=(f+1)*A,d=1;d<A-2;d++)w[p++]=W+d,w[p++]=W+d+1,w[p++]=Q+d+1,w[p++]=W+d,w[p++]=Q+d+1,w[p++]=Q+d;if(T){let He=y*A;for(f=1;f<y-2;f++)for(Q=He+f*A,W=He+(f+1)*A,d=1;d<A-2;d++)w[p++]=W+d,w[p++]=Q+d,w[p++]=Q+d+1,w[p++]=W+d,w[p++]=Q+d+1,w[p++]=W+d+1}let J,Z;if(T){if(E)for(Z=y*A,f=1;f<A-2;f++)w[p++]=f,w[p++]=f+1,w[p++]=Z+f+1,w[p++]=f,w[p++]=Z+f+1,w[p++]=Z+f;if(v)for(J=y*A-A,Z=y*A*x-A,f=1;f<A-2;f++)w[p++]=J+f+1,w[p++]=J+f,w[p++]=Z+f,w[p++]=J+f+1,w[p++]=Z+f,w[p++]=Z+f+1}if(S){for(f=1;f<y-2;f++)Z=A*y+A*f,J=A*f,w[p++]=Z,w[p++]=J+A,w[p++]=J,w[p++]=Z,w[p++]=Z+A,w[p++]=J+A;for(f=1;f<y-2;f++)Z=A*y+A*(f+1)-1,J=A*(f+1)-1,w[p++]=J+A,w[p++]=Z,w[p++]=J,w[p++]=J+A,w[p++]=Z+A,w[p++]=Z}let ae=new Tn;a.position&&(ae.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:R}));let Ae=0,fe=0,xe=0,ge=0,we=I/2,Se,Re=ee.fromCartesian3(t),Qe=ee.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<I;f++){Se=O[f]?Qe:Re;let He=h.fromArray(R,f*3,Ogt),Xe=Se.geodeticSurfaceNormal(He,Mgt);if(L[f]&&h.negate(Xe,Xe),a.st){let $e=U.negate(Xe,Fgt);V[Ae++]=Math.atan2($e.y,$e.x)/D.TWO_PI+.5,V[Ae++]=Math.asin(Xe.z)/Math.PI+.5}if(a.normal&&(P[fe++]=Xe.x,P[fe++]=Xe.y,P[fe++]=Xe.z),a.tangent||a.bitangent){let $e=Ngt,Pe=0,qe;if(O[f]&&(Pe=we),!E&&f>=Pe&&f<Pe+A*2?qe=h.UNIT_X:qe=h.UNIT_Z,h.cross(qe,Xe,$e),h.normalize($e,$e),a.tangent&&(M[xe++]=$e.x,M[xe++]=$e.y,M[xe++]=$e.z),a.bitangent){let st=h.cross(Xe,$e,Lgt);h.normalize(st,st),F[ge++]=st.x,F[ge++]=st.y,F[ge++]=st.z}}}a.st&&(ae.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),a.normal&&(ae.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:P})),a.tangent&&(ae.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:M})),a.bitangent&&(ae.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:F}))}if(l(e._offsetAttribute)){let He=R.length,Xe=e._offsetAttribute===mn.NONE?0:1,$e=new Uint8Array(He/3).fill(Xe);ae.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:$e})}return new St({attributes:ae,indices:w,primitiveType:Oe.TRIANGLES,boundingSphere:ue.fromEllipsoid(Re),offsetAttribute:e._offsetAttribute})};var Xee;F_.getUnitEllipsoid=function(){return l(Xee)||(Xee=F_.createGeometry(new F_({radii:new h(1,1,1),vertexFormat:Be.POSITION_ONLY}))),Xee};var Xa=F_;var kgt=new Kt(z.WHITE),Kee=h.ZERO,$ee=new h,Ugt=new h,zgt=new h,Jee=new z,Vgt=new h(1,1,1);function jgt(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function ed(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new jgt(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(ed.prototype=Object.create(Pi.prototype),ed.prototype.constructor=ed);Object.defineProperties(ed.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ed.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,r=i.isAvailable(e),o,s=new Pn(r&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),c=Kn.fromDistanceDisplayCondition(a),u={show:s,distanceDisplayCondition:c,color:void 0,offset:void 0};if(this._materialProperty instanceof Kt){let f;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(f=this._materialProperty.color.getValue(e,Jee)),l(f)||(f=z.WHITE),o=Jt.fromColor(f),u.color=o}return l(this._options.offsetAttribute)&&(u.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Kee,$ee))),new Ft({id:i,geometry:new Xa(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:u})};ed.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,r=i.isAvailable(e),o=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Jee),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Pn(r&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(o),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(s),offset:void 0};return l(this._options.offsetAttribute)&&(a.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Kee,$ee))),new Ft({id:i,geometry:new Yf(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};ed.prototype._computeCenter=function(e,t){return X.getValueOrUndefined(this._entity.position,e,t)};ed.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||Pi.prototype._isHidden.call(this,e,t)};ed.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.radii.isConstant||!X.isConstant(t.innerRadii)||!X.isConstant(t.stackPartitions)||!X.isConstant(t.slicePartitions)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.minimumClock)||!X.isConstant(t.maximumClock)||!X.isConstant(t.minimumCone)||!X.isConstant(t.maximumCone)||!X.isConstant(t.subdivisions)};ed.prototype._setStaticOptions=function(e,t){let n=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Kt?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(tt.MINIMUM_VALUE,i.radii),i.innerRadii=X.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=X.getValueOrUndefined(t.minimumClock,tt.MINIMUM_VALUE),i.maximumClock=X.getValueOrUndefined(t.maximumClock,tt.MINIMUM_VALUE),i.minimumCone=X.getValueOrUndefined(t.minimumCone,tt.MINIMUM_VALUE),i.maximumCone=X.getValueOrUndefined(t.maximumCone,tt.MINIMUM_VALUE),i.stackPartitions=X.getValueOrUndefined(t.stackPartitions,tt.MINIMUM_VALUE),i.slicePartitions=X.getValueOrUndefined(t.slicePartitions,tt.MINIMUM_VALUE),i.subdivisions=X.getValueOrUndefined(t.subdivisions,tt.MINIMUM_VALUE),i.offsetAttribute=n!==We.NONE?mn.ALL:void 0};ed.prototype._onEntityPropertyChanged=vg;ed.DynamicGeometryUpdater=xk;function xk(e,t,n){Ii.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new N,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new h,this._material={}}l(Object.create)&&(xk.prototype=Object.create(Ii.prototype),xk.prototype.constructor=xk);xk.prototype.update=function(e){let t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!X.getValueOrDefault(n.show,e,!0)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let i=X.getValueOrUndefined(n.radii,e,Ugt),r=l(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,i.z*.5,this._scene.ellipsoid,this._modelMatrix):void 0;if(!l(r)||!l(i)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let o=X.getValueOrDefault(n.fill,e,!0),s=X.getValueOrDefault(n.outline,e,!1),a=X.getValueOrClonedDefault(n.outlineColor,e,z.BLACK,Jee),c=_o.getValue(e,n.material??kgt,this._material),u=X.getValueOrUndefined(n.innerRadii,e,zgt),f=X.getValueOrUndefined(n.minimumClock,e),d=X.getValueOrUndefined(n.maximumClock,e),p=X.getValueOrUndefined(n.minimumCone,e),g=X.getValueOrUndefined(n.maximumCone,e),m=X.getValueOrUndefined(n.stackPartitions,e),y=X.getValueOrUndefined(n.slicePartitions,e),A=X.getValueOrUndefined(n.subdivisions,e),b=X.getValueOrDefault(n.outlineWidth,e,1),x=X.getValueOrDefault(n.heightReference,e,We.NONE),T=x!==We.NONE?mn.ALL:void 0,E=this._scene.mode,v=E===re.SCENE3D&&x===We.NONE,S=this._options,I=this._geometryUpdater.shadowsProperty.getValue(e),O=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),L=X.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,Kee,$ee);if(!v||this._lastSceneMode!==E||!l(this._primitive)||S.stackPartitions!==m||S.slicePartitions!==y||l(u)&&!h.equals(S.innerRadii!==u)||S.minimumClock!==f||S.maximumClock!==d||S.minimumCone!==p||S.maximumCone!==g||S.subdivisions!==A||this._lastOutlineWidth!==b||S.offsetAttribute!==T){let C=this._primitives;C.removeAndDestroy(this._primitive),C.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=E,this._lastOutlineWidth=b,S.stackPartitions=m,S.slicePartitions=y,S.subdivisions=A,S.offsetAttribute=T,S.radii=h.clone(v?Vgt:i,S.radii),l(u)?v?S.innerRadii=h.fromElements(u.x/i.x,u.y/i.y,u.z/i.z,S.innerRadii):S.innerRadii=h.clone(u,S.innerRadii):S.innerRadii=void 0,S.minimumClock=f,S.maximumClock=d,S.minimumCone=p,S.maximumCone=g;let w=new Er({material:c,translucent:c.isTranslucent(),closed:!0});S.vertexFormat=w.vertexFormat;let P=this._geometryUpdater.createFillGeometryInstance(e,v,this._modelMatrix);this._primitive=C.add(new On({geometryInstances:P,appearance:w,asynchronous:!1,shadows:I}));let M=this._geometryUpdater.createOutlineGeometryInstance(e,v,this._modelMatrix);this._outlinePrimitive=C.add(new On({geometryInstances:M,appearance:new yn({flat:!0,translucent:M.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(b)}}),asynchronous:!1,shadows:I})),this._lastShow=o,this._lastOutlineShow=s,this._lastOutlineColor=z.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=O,this._lastOffset=h.clone(L,this._lastOffset)}else if(this._primitive.ready){let C=this._primitive,w=this._outlinePrimitive;C.show=!0,w.show=!0,C.appearance.material=c;let P=this._attributes;l(P)||(P=C.getGeometryInstanceAttributes(t),this._attributes=P),o!==this._lastShow&&(P.show=Pn.toValue(o,P.show),this._lastShow=o);let M=this._outlineAttributes;l(M)||(M=w.getGeometryInstanceAttributes(t),this._outlineAttributes=M),s!==this._lastOutlineShow&&(M.show=Pn.toValue(s,M.show),this._lastOutlineShow=s),z.equals(a,this._lastOutlineColor)||(M.color=Jt.toValue(a,M.color),z.clone(a,this._lastOutlineColor)),jt.equals(O,this._lastDistanceDisplayCondition)||(P.distanceDisplayCondition=Kn.toValue(O,P.distanceDisplayCondition),M.distanceDisplayCondition=Kn.toValue(O,M.distanceDisplayCondition),jt.clone(O,this._lastDistanceDisplayCondition)),h.equals(L,this._lastOffset)||(P.offset=xr.toValue(L,P.offset),M.offset=xr.toValue(L,P.offset),h.clone(L,this._lastOffset))}v&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),r=N.multiplyByScale(r,i,r),this._primitive.modelMatrix=r,this._outlinePrimitive.modelMatrix=r)};var Tk=ed;function qw(e){e=e??H.EMPTY_OBJECT;let t=e.vertexFormat??Be.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}qw.packedLength=Be.packedLength;qw.pack=function(e,t,n){return n=n??0,Be.pack(e._vertexFormat,t,n),t};var Wve=new Be,Hgt={vertexFormat:Wve};qw.unpack=function(e,t,n){t=t??0;let i=Be.unpack(e,t,Wve);return l(n)?(n._vertexFormat=Be.clone(i,n._vertexFormat),n):new qw(Hgt)};var LG=new h(-.5,-.5,0),FG=new h(.5,.5,0);qw.createGeometry=function(e){let t=e._vertexFormat,n=new Tn,i,r;if(t.position){if(r=new Float64Array(12),r[0]=LG.x,r[1]=LG.y,r[2]=0,r[3]=FG.x,r[4]=LG.y,r[5]=0,r[6]=FG.x,r[7]=FG.y,r[8]=0,r[9]=LG.x,r[10]=FG.y,r[11]=0,n.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:r}),t.normal){let o=new Float32Array(12);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=1,n.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:o})}if(t.st){let o=new Float32Array(8);o[0]=0,o[1]=0,o[2]=1,o[3]=0,o[4]=1,o[5]=1,o[6]=0,o[7]=1,n.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:o})}if(t.tangent){let o=new Float32Array(12);o[0]=1,o[1]=0,o[2]=0,o[3]=1,o[4]=0,o[5]=0,o[6]=1,o[7]=0,o[8]=0,o[9]=1,o[10]=0,o[11]=0,n.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:o})}if(t.bitangent){let o=new Float32Array(12);o[0]=0,o[1]=1,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=1,o[8]=0,o[9]=0,o[10]=1,o[11]=0,n.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:o})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new St({attributes:n,indices:i,primitiveType:Oe.TRIANGLES,boundingSphere:new ue(h.ZERO,Math.sqrt(2))})};var Ek=qw;function Yw(){this._workerName="createPlaneOutlineGeometry"}Yw.packedLength=0;Yw.pack=function(e,t){return t};Yw.unpack=function(e,t,n){return l(n)?n:new Yw};var QA=new h(-.5,-.5,0),BG=new h(.5,.5,0);Yw.createGeometry=function(){let e=new Tn,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=QA.x,n[1]=QA.y,n[2]=QA.z,n[3]=BG.x,n[4]=QA.y,n[5]=QA.z,n[6]=BG.x,n[7]=BG.y,n[8]=QA.z,n[9]=QA.x,n[10]=BG.y,n[11]=QA.z,e.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new St({attributes:e,indices:t,primitiveType:Oe.LINES,boundingSphere:new ue(h.ZERO,Math.sqrt(2))})};var Ck=Yw;var Ggt=new h,qve=new z;function Wgt(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function fh(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new Wgt(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(fh.prototype=Object.create(Pi.prototype),fh.prototype.constructor=fh);fh.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,r,o=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let g;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(g=this._materialProperty.color.getValue(e,qve)),l(g)||(g=z.WHITE),r=Jt.fromColor(g),i={show:o,distanceDisplayCondition:a,color:r}}else i={show:o,distanceDisplayCondition:a};let c=t.plane,u=this._options,f=t.computeModelMatrix(e),d=X.getValueOrDefault(c.plane,e,u.plane),p=X.getValueOrUndefined(c.dimensions,e,u.dimensions);return u.plane=d,u.dimensions=p,f=Zee(d,p,f,f),new Ft({id:t,geometry:new Ek(this._options),modelMatrix:f,attributes:i})};fh.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,qve),r=this._distanceDisplayConditionProperty.getValue(e),o=t.plane,s=this._options,a=t.computeModelMatrix(e),c=X.getValueOrDefault(o.plane,e,s.plane),u=X.getValueOrUndefined(o.dimensions,e,s.dimensions);return s.plane=c,s.dimensions=u,a=Zee(c,u,a,a),new Ft({id:t,geometry:new Ck,modelMatrix:a,attributes:{show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r)}})};fh.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||Pi.prototype._isHidden.call(this,e,t)};fh.prototype._getIsClosed=function(e){return!1};fh.prototype._isDynamic=function(e,t){return!e.position.isConstant||!X.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!X.isConstant(t.outlineWidth)};fh.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=this._options;i.vertexFormat=n?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(tt.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(tt.MINIMUM_VALUE,i.dimensions)};fh.DynamicGeometryUpdater=Xw;function Xw(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Xw.prototype=Object.create(Ii.prototype),Xw.prototype.constructor=Xw);Xw.prototype._isHidden=function(e,t,n){let i=this._options,r=X.getValueOrUndefined(e.position,n,Ggt);return!l(r)||!l(i.plane)||!l(i.dimensions)||Ii.prototype._isHidden.call(this,e,t,n)};Xw.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=X.getValueOrDefault(t.plane,n,i.plane),i.dimensions=X.getValueOrUndefined(t.dimensions,n,i.dimensions)};var qgt=new h,Ygt=new h,Xgt=new h,Kgt=new h,$gt=new $,Jgt=new $,Zgt=new N;function Zee(e,t,n,i){let r=e.normal,o=e.distance,s=h.multiplyByScalar(r,-o,Xgt),a=h.clone(h.UNIT_Z,Ygt);D.equalsEpsilon(Math.abs(h.dot(a,r)),1,D.EPSILON8)&&(a=h.clone(h.UNIT_Y,a));let c=h.cross(a,r,qgt);a=h.cross(r,c,a),h.normalize(c,c),h.normalize(a,a);let u=$gt;$.setColumn(u,0,c,u),$.setColumn(u,1,a,u),$.setColumn(u,2,r,u);let f=h.fromElements(t.x,t.y,1,Kgt),d=$.multiplyByScale(u,f,Jgt),p=N.fromRotationTranslation(d,s,Zgt);return N.multiplyTransformation(n,p,i)}fh.createPrimitiveMatrix=Zee;var vk=fh;var Qgt=new h,e_t=new et,t_t=new U,n_t=new U,i_t=new h,r_t=new h,o_t=new h,Sk=new h,s_t=new h,a_t=new h,Yve=new Le,c_t=new $,l_t=new $,u_t=new h;function f_t(e,t,n,i,r,o,s,a,c){let u=e.positions,f=fi.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=je.createTypedArray(u.length,f.length);d.set(f);let p=c_t;if(i!==0){let _=Le.fromAxisAngle(s,i,Yve);if(p=$.fromQuaternion(_,p),t.tangent||t.bitangent){_=Le.fromAxisAngle(s,-i,Yve);let C=$.fromQuaternion(_,l_t);a=h.normalize($.multiplyByVector(C,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=$.clone($.IDENTITY,p);let g=n_t;t.st&&(g.x=n.x,g.y=n.y);let m=u.length,y=m*3,A=new Float64Array(y),b=t.normal?new Float32Array(y):void 0,x=t.tangent?new Float32Array(y):void 0,T=t.bitangent?new Float32Array(y):void 0,E=t.st?new Float32Array(m*2):void 0,v=0,S=0,I=0,R=0,O=0;for(let _=0;_<m;_++){let C=u[_];if(A[v++]=C.x,A[v++]=C.y,A[v++]=C.z,t.st)if(l(r)&&r.positions.length===m)E[O++]=r.positions[_].x,E[O++]=r.positions[_].y;else{let w=$.multiplyByVector(p,C,Qgt),P=o(w,t_t);U.subtract(P,g,P);let M=D.clamp(P.x/n.width,0,1),F=D.clamp(P.y/n.height,0,1);E[O++]=M,E[O++]=F}t.normal&&(b[S++]=s.x,b[S++]=s.y,b[S++]=s.z),t.tangent&&(x[R++]=a.x,x[R++]=a.y,x[R++]=a.z),t.bitangent&&(T[I++]=c.x,T[I++]=c.y,T[I++]=c.z)}let L=new Tn;return t.position&&(L.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:A})),t.normal&&(L.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:b})),t.tangent&&(L.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(L.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:T})),t.st&&(L.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:E})),new St({attributes:L,indices:d,primitiveType:Oe.TRIANGLES})}function aE(e){e=e??H.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Be.DEFAULT;this._vertexFormat=Be.clone(i),this._polygonHierarchy=t,this._stRotation=e.stRotation??0,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=ni.computeHierarchyPackedLength(t,h)+Be.packedLength+ee.packedLength+(l(n)?ni.computeHierarchyPackedLength(n,U):1)+2}aE.fromPositions=function(e){e=e??H.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new aE(t)};aE.pack=function(e,t,n){return n=n??0,n=ni.packPolygonHierarchy(e._polygonHierarchy,t,n,h),ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=ni.packPolygonHierarchy(e._textureCoordinates,t,n,U):t[n++]=-1,t[n]=e.packedLength,t};var d_t=ee.clone(ee.UNIT_SPHERE),h_t=new Be,m_t={polygonHierarchy:{}};aE.unpack=function(e,t,n){t=t??0;let i=ni.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let r=ee.unpack(e,t,d_t);t+=ee.packedLength;let o=Be.unpack(e,t,h_t);t+=Be.packedLength;let s=e[t++],a=e[t]===-1?void 0:ni.unpackPolygonHierarchy(e,t,U);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t];return l(n)||(n=new aE(m_t)),n._polygonHierarchy=i,n._ellipsoid=ee.clone(r,n._ellipsoid),n._vertexFormat=Be.clone(o,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};aE.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,r=e._textureCoordinates,o=l(r),s=n.positions;if(s=Fr(s,h.equalsEpsilon,!0),s.length<3)return;let a=i_t,c=r_t,u=o_t,f=s_t,d=a_t;if(!p_.computeProjectTo2DArguments(s,Sk,f,d))return;if(a=h.cross(f,d,a),a=h.normalize(a,a),!h.equalsEpsilon(Sk,h.ZERO,D.EPSILON6)){let O=e._ellipsoid.geodeticSurfaceNormal(Sk,u_t);h.dot(a,O)<0&&(a=h.negate(a,a),f=h.negate(f,f))}let g=p_.createProjectPointsTo2DFunction(Sk,f,d),m=p_.createProjectPointTo2DFunction(Sk,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let y=ni.polygonsFromHierarchy(n,o,g,!1),A=y.hierarchy,b=y.polygons,x=function(O){return O},T=o?ni.polygonsFromHierarchy(r,!0,x,!1).polygons:void 0;if(A.length===0)return;s=A[0].outerRing;let E=ue.fromPoints(s),v=ni.computeBoundingRectangle(a,m,s,i,e_t),S=[];for(let O=0;O<b.length;O++){let L=new Ft({geometry:f_t(b[O],t,v,i,o?T[O]:void 0,m,a,c,u)});S.push(L)}let I=Gn.combineInstances(S)[0];I.attributes.position.values=new Float64Array(I.attributes.position.values),I.indices=je.createTypedArray(I.attributes.position.values.length/3,I.indices);let R=I.attributes;return t.position||delete R.position,new St({attributes:R,indices:I.indices,primitiveType:I.primitiveType,boundingSphere:E})};var wk=aE;var Xve=[],kG=[];function p_t(e,t,n,i,r){let s=Vs.fromPoints(t,e).projectPointsOntoPlane(t,Xve);fi.computeWindingOrder2D(s)===ea.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=0;if(i)for(c=new Float64Array(f*2*3),u=0;u<f;u++){let m=t[u],y=t[(u+1)%f];c[d++]=m.x,c[d++]=m.y,c[d++]=m.z,c[d++]=y.x,c[d++]=y.y,c[d++]=y.z}else{let m=0;if(r===ln.GEODESIC)for(u=0;u<f;u++)m+=ni.subdivideLineCount(t[u],t[(u+1)%f],n);else if(r===ln.RHUMB)for(u=0;u<f;u++)m+=ni.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(m*3),u=0;u<f;u++){let y;r===ln.GEODESIC?y=ni.subdivideLine(t[u],t[(u+1)%f],n,kG):r===ln.RHUMB&&(y=ni.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,kG));let A=y.length;for(let b=0;b<A;++b)c[d++]=y[b]}}f=c.length/3;let p=f*2,g=je.createTypedArray(f,p);for(d=0,u=0;u<f-1;u++)g[d++]=u,g[d++]=u+1;return g[d++]=f-1,g[d]=0,new Ft({geometry:new St({attributes:new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})}),indices:g,primitiveType:Oe.LINES})})}function g_t(e,t,n,i,r){let s=Vs.fromPoints(t,e).projectPointsOntoPlane(t,Xve);fi.computeWindingOrder2D(s)===ea.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=new Array(f),p=0;if(i)for(c=new Float64Array(f*2*3*2),u=0;u<f;++u){d[u]=p/3;let A=t[u],b=t[(u+1)%f];c[p++]=A.x,c[p++]=A.y,c[p++]=A.z,c[p++]=b.x,c[p++]=b.y,c[p++]=b.z}else{let A=0;if(r===ln.GEODESIC)for(u=0;u<f;u++)A+=ni.subdivideLineCount(t[u],t[(u+1)%f],n);else if(r===ln.RHUMB)for(u=0;u<f;u++)A+=ni.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(A*3*2),u=0;u<f;++u){d[u]=p/3;let b;r===ln.GEODESIC?b=ni.subdivideLine(t[u],t[(u+1)%f],n,kG):r===ln.RHUMB&&(b=ni.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,kG));let x=b.length;for(let T=0;T<x;++T)c[p++]=b[T]}}f=c.length/6;let g=d.length,m=(f*2+g)*2,y=je.createTypedArray(f+g,m);for(p=0,u=0;u<f;++u)y[p++]=u,y[p++]=(u+1)%f,y[p++]=u+f,y[p++]=(u+1)%f+f;for(u=0;u<g;u++){let A=d[u];y[p++]=A,y[p++]=A+f}return new Ft({geometry:new St({attributes:new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})}),indices:y,primitiveType:Oe.LINES})})}function cE(e){let t=e.polygonHierarchy,n=e.ellipsoid??ee.default,i=e.granularity??D.RADIANS_PER_DEGREE,r=e.perPositionHeight??!1,o=r&&l(e.extrudedHeight),s=e.arcType??ln.GEODESIC,a=e.height??0,c=e.extrudedHeight??a;if(!o){let u=Math.max(a,c);c=Math.min(a,c),a=u}this._ellipsoid=ee.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=o,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=ni.computeHierarchyPackedLength(t,h)+ee.packedLength+8}cE.pack=function(e,t,n){return n=n??0,n=ni.packPolygonHierarchy(e._polygonHierarchy,t,n,h),ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=e._offsetAttribute??-1,t[n]=e.packedLength,t};var __t=ee.clone(ee.UNIT_SPHERE),y_t={polygonHierarchy:{}};cE.unpack=function(e,t,n){t=t??0;let i=ni.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let r=ee.unpack(e,t,__t);t+=ee.packedLength;let o=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,u=e[t++]===1,f=e[t++],d=e[t++],p=e[t];return l(n)||(n=new cE(y_t)),n._polygonHierarchy=i,n._ellipsoid=ee.clone(r,n._ellipsoid),n._height=o,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=c,n._arcType=f,n._offsetAttribute=d===-1?void 0:d,n.packedLength=p,n};cE.fromPositions=function(e){e=e??H.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new cE(t)};cE.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,r=e._perPositionHeight,o=e._arcType,s=ni.polygonOutlinesFromHierarchy(i,!r,t);if(s.length===0)return;let a,c=[],u=D.chordLength(n,t.maximumRadius),f=e._height,d=e._extrudedHeight,p=e._perPositionHeightExtrude||!D.equalsEpsilon(f,d,0,D.EPSILON2),g,m;if(p)for(m=0;m<s.length;m++){if(a=g_t(t,s[m],u,r,o),a.geometry=ni.scaleToGeodeticHeightExtruded(a.geometry,f,d,t,r),l(e._offsetAttribute)){let b=a.geometry.attributes.position.values.length/3,x=new Uint8Array(b);e._offsetAttribute===mn.TOP?x=x.fill(1,0,b/2):(g=e._offsetAttribute===mn.NONE?0:1,x=x.fill(g)),a.geometry.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}c.push(a)}else for(m=0;m<s.length;m++){if(a=p_t(t,s[m],u,r,o),a.geometry.attributes.position.values=fi.scaleToGeodeticHeight(a.geometry.attributes.position.values,f,t,!r),l(e._offsetAttribute)){let b=a.geometry.attributes.position.values.length;g=e._offsetAttribute===mn.NONE?0:1;let x=new Uint8Array(b/3).fill(g);a.geometry.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}c.push(a)}let y=Gn.combineInstances(c)[0],A=ue.fromVertices(y.attributes.position.values);return new St({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:A,offsetAttribute:e._offsetAttribute})};var Ik=cE;var Kve="Entity polygons cannot have both height and perPositionHeight. height will be ignored",$ve="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",Jve=new z,Zve=h.ZERO,Qve=new h,eSe=new ie,A_t=[],b_t=new U;function x_t(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function td(e,t){ii.call(this,{entity:e,scene:t,geometryOptions:new x_t(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(td.prototype=Object.create(ii.prototype),td.prototype.constructor=td);td.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,r={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,Jve)),l(s)||(s=z.WHITE),r.color=Jt.fromColor(s)}l(i.offsetAttribute)&&(r.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Zve,Qve)));let o;return i.perPositionHeight&&!l(i.extrudedHeight)?o=new wk(i):o=new qp(i),new Ft({id:t,geometry:o,attributes:r})};td.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,r=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,Jve),o=this._distanceDisplayConditionProperty.getValue(e),s={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(r),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};l(i.offsetAttribute)&&(s.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,Zve,Qve)));let a;return i.perPositionHeight&&!l(i.extrudedHeight)?a=new nh(i):a=new Ik(i),new Ft({id:t,geometry:a,attributes:s})};td.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!l(n))return;let i=n.positions;if(i.length===0)return;let r=this._scene.ellipsoid,o=Vs.fromPoints(i,r),s=o.projectPointsOntoPlane(i,A_t),a=s.length,c=0,u=a-1,f=new U;for(let p=0;p<a;u=p++){let g=s[p],m=s[u],y=g.x*m.y-m.x*g.y,A=U.add(g,m,b_t);A=U.multiplyByScalar(A,y,A),f=U.add(f,A,f),c+=y}let d=1/(c*3);return f=U.multiplyByScalar(f,d,f),o.projectPointOntoEllipsoid(f,t)};td.prototype._isHidden=function(e,t){return!l(t.hierarchy)||Pi.prototype._isHidden.call(this,e,t)};td.prototype._isOnTerrain=function(e,t){let n=ii.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,r=l(i)&&(i.isConstant?i.getValue(tt.MINIMUM_VALUE):!0);return n&&!r};td.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.textureCoordinates)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.perPositionHeight)||!X.isConstant(t.closeTop)||!X.isConstant(t.closeBottom)||!X.isConstant(t.zIndex)||!X.isConstant(t.arcType)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};td.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=this._options;i.vertexFormat=n?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat;let r=t.hierarchy.getValue(tt.MINIMUM_VALUE),o=X.getValueOrUndefined(t.height,tt.MINIMUM_VALUE),s=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),a=X.getValueOrUndefined(t.extrudedHeight,tt.MINIMUM_VALUE),c=X.getValueOrDefault(t.extrudedHeightReference,tt.MINIMUM_VALUE,We.NONE),u=X.getValueOrDefault(t.perPositionHeight,tt.MINIMUM_VALUE,!1);o=ii.getGeometryHeight(o,s);let f;if(u?(l(o)&&(o=void 0,_t(Kve)),s!==We.NONE&&u&&(o=void 0,_t($ve))):(l(a)&&!l(o)&&(o=0),f=ii.computeGeometryOffsetAttribute(o,s,a,c)),i.polygonHierarchy=r,i.granularity=X.getValueOrUndefined(t.granularity,tt.MINIMUM_VALUE),i.stRotation=X.getValueOrUndefined(t.stRotation,tt.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=X.getValueOrDefault(t.closeTop,tt.MINIMUM_VALUE,!0),i.closeBottom=X.getValueOrDefault(t.closeBottom,tt.MINIMUM_VALUE,!0),i.offsetAttribute=f,i.height=o,i.arcType=X.getValueOrDefault(t.arcType,tt.MINIMUM_VALUE,ln.GEODESIC),i.textureCoordinates=X.getValueOrUndefined(t.textureCoordinates,tt.MINIMUM_VALUE),a=ii.getGeometryExtrudedHeight(a,c),a===ii.CLAMP_TO_GROUND){let d=qp.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,eSe);a=Mi.getMinimumMaximumHeights(d).minimumTerrainHeight}i.extrudedHeight=a};td.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight,i=l(n)&&n!==t;return!e.perPositionHeight&&(!i&&t===0||i&&e.closeTop&&e.closeBottom)};td.DynamicGeometryUpdater=Kw;function Kw(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Kw.prototype=Object.create(Ii.prototype),Kw.prototype.constructor=Kw);Kw.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||Ii.prototype._isHidden.call(this,e,t,n)};Kw.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=X.getValueOrUndefined(t.hierarchy,n);let r=X.getValueOrUndefined(t.height,n),o=X.getValueOrDefault(t.heightReference,n,We.NONE),s=X.getValueOrDefault(t.extrudedHeightReference,n,We.NONE),a=X.getValueOrUndefined(t.extrudedHeight,n),c=X.getValueOrUndefined(t.perPositionHeight,n);r=ii.getGeometryHeight(r,s);let u;if(c?(l(r)&&(r=void 0,_t(Kve)),o!==We.NONE&&c&&(r=void 0,_t($ve))):(l(a)&&!l(r)&&(r=0),u=ii.computeGeometryOffsetAttribute(r,o,a,s)),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=X.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=X.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=X.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=X.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=r,i.arcType=X.getValueOrDefault(t.arcType,n,ln.GEODESIC),a=ii.getGeometryExtrudedHeight(a,s),a===ii.CLAMP_TO_GROUND){let f=qp.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,eSe);a=Mi.getMinimumMaximumHeights(f).minimumTerrainHeight}i.extrudedHeight=a};var Pk=td;function T_t(e,t,n,i){let r=new Tn;i.position&&(r.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e}));let o=t.length,s=e.length/3,a=(s-o*2)/(o*2),c=fi.triangulate(t),u=(a-1)*o*6+c.length*2,f=je.createTypedArray(s,u),d,p,g,m,y,A,b=o*2,x=0;for(d=0;d<a-1;d++){for(p=0;p<o-1;p++)g=p*2+d*o*2,A=g+b,m=g+1,y=m+b,f[x++]=m,f[x++]=g,f[x++]=y,f[x++]=y,f[x++]=g,f[x++]=A;g=o*2-2+d*o*2,m=g+1,y=m+b,A=g+b,f[x++]=m,f[x++]=g,f[x++]=y,f[x++]=y,f[x++]=g,f[x++]=A}if(i.st||i.tangent||i.bitangent){let v=new Float32Array(s*2),S=1/(a-1),I=1/n.height,R=n.height/2,O,L,_=0;for(d=0;d<a;d++){for(O=d*S,L=I*(t[0].y+R),v[_++]=O,v[_++]=L,p=1;p<o;p++)L=I*(t[p].y+R),v[_++]=O,v[_++]=L,v[_++]=O,v[_++]=L;L=I*(t[0].y+R),v[_++]=O,v[_++]=L}for(p=0;p<o;p++)O=0,L=I*(t[p].y+R),v[_++]=O,v[_++]=L;for(p=0;p<o;p++)O=(a-1)*S,L=I*(t[p].y+R),v[_++]=O,v[_++]=L;r.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:new Float32Array(v)})}let T=s-o*2;for(d=0;d<c.length;d+=3){let v=c[d]+T,S=c[d+1]+T,I=c[d+2]+T;f[x++]=v,f[x++]=S,f[x++]=I,f[x++]=I+o,f[x++]=S+o,f[x++]=v+o}let E=new St({attributes:r,indices:f,boundingSphere:ue.fromVertices(e),primitiveType:Oe.TRIANGLES});if(i.normal&&(E=Gn.computeNormal(E)),i.tangent||i.bitangent){try{E=Gn.computeTangentAndBitangent(E)}catch{_t("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(E.attributes.tangent=void 0),i.bitangent||(E.attributes.bitangent=void 0),i.st||(E.attributes.st=void 0)}return E}function Rk(e){e=e??H.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._cornerType=e.cornerType??rr.ROUNDED,this._vertexFormat=Be.clone(e.vertexFormat??Be.DEFAULT),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*U.packedLength,this.packedLength=i+ee.packedLength+Be.packedLength+2}Rk.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._shape;for(o=s.length,t[n++]=o,i=0;i<o;++i,n+=U.packedLength)U.pack(s[i],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var tSe=ee.clone(ee.UNIT_SPHERE),nSe=new Be,Dk={polylinePositions:void 0,shapePositions:void 0,ellipsoid:tSe,vertexFormat:nSe,cornerType:void 0,granularity:void 0};Rk.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s=new Array(r);for(i=0;i<r;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ee.unpack(e,t,tSe);t+=ee.packedLength;let c=Be.unpack(e,t,nSe);t+=Be.packedLength;let u=e[t++],f=e[t];return l(n)?(n._positions=o,n._shape=s,n._ellipsoid=ee.clone(a,n._ellipsoid),n._vertexFormat=Be.clone(c,n._vertexFormat),n._cornerType=u,n._granularity=f,n):(Dk.polylinePositions=o,Dk.shapePositions=s,Dk.cornerType=u,Dk.granularity=f,new Rk(Dk))};var E_t=new et;Rk.createGeometry=function(e){let t=e._positions,n=Fr(t,h.equalsEpsilon),i=e._shape;if(i=Pm.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;fi.computeWindingOrder2D(i)===ea.CLOCKWISE&&i.reverse();let r=et.fromPoints(i,E_t),o=Pm.computePositions(n,i,r,e,!0);return T_t(o,i,r,e._vertexFormat)};var Ok=Rk;function C_t(e,t){let n=new Tn;n.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,r=n.position.values.length/3,s=e.length/3/i,a=je.createTypedArray(r,2*i*(s+1)),c,u,f=0;c=0;let d=c*i;for(u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=s-1,d=c*i,u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=0;c<s-1;c++){let g=i*c,m=g+i;for(u=0;u<i;u++)a[f++]=u+g,a[f++]=u+m}return new St({attributes:n,indices:je.createTypedArray(r,a),boundingSphere:ue.fromVertices(e),primitiveType:Oe.LINES})}function Nk(e){e=e??H.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._cornerType=e.cornerType??rr.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*U.packedLength,this.packedLength=i+ee.packedLength+2}Nk.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._shape;for(o=s.length,t[n++]=o,i=0;i<o;++i,n+=U.packedLength)U.pack(s[i],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var iSe=ee.clone(ee.UNIT_SPHERE),Mk={polylinePositions:void 0,shapePositions:void 0,ellipsoid:iSe,height:void 0,cornerType:void 0,granularity:void 0};Nk.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s=new Array(r);for(i=0;i<r;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ee.unpack(e,t,iSe);t+=ee.packedLength;let c=e[t++],u=e[t];return l(n)?(n._positions=o,n._shape=s,n._ellipsoid=ee.clone(a,n._ellipsoid),n._cornerType=c,n._granularity=u,n):(Mk.polylinePositions=o,Mk.shapePositions=s,Mk.cornerType=c,Mk.granularity=u,new Nk(Mk))};var v_t=new et;Nk.createGeometry=function(e){let t=e._positions,n=Fr(t,h.equalsEpsilon),i=e._shape;if(i=Pm.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;fi.computeWindingOrder2D(i)===ea.CLOCKWISE&&i.reverse();let r=et.fromPoints(i,v_t),o=Pm.computePositions(n,i,r,e,!1);return C_t(o,i)};var Lk=Nk;var rSe=new z;function S_t(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function f0(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new S_t(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(f0.prototype=Object.create(Pi.prototype),f0.prototype.constructor=f0);f0.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,r,o=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,rSe)),l(c)||(c=z.WHITE),r=Jt.fromColor(c),i={show:o,distanceDisplayCondition:a,color:r}}else i={show:o,distanceDisplayCondition:a};return new Ft({id:t,geometry:new Ok(this._options),attributes:i})};f0.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,rSe),r=this._distanceDisplayConditionProperty.getValue(e);return new Ft({id:t,geometry:new Lk(this._options),attributes:{show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r)}})};f0.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||Pi.prototype._isHidden.call(this,e,t)};f0.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!X.isConstant(t.granularity)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.cornerType)};f0.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,r=this._options,o=this._materialProperty instanceof Kt;r.vertexFormat=o?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,r.polylinePositions=t.positions.getValue(tt.MINIMUM_VALUE,r.polylinePositions),r.shapePositions=t.shape.getValue(tt.MINIMUM_VALUE,r.shape),r.granularity=l(n)?n.getValue(tt.MINIMUM_VALUE):void 0,r.cornerType=l(i)?i.getValue(tt.MINIMUM_VALUE):void 0};f0.DynamicGeometryUpdater=$w;function $w(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&($w.prototype=Object.create(Ii.prototype),$w.prototype.constructor=$w);$w.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||Ii.prototype._isHidden.call(this,e,t,n)};$w.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=X.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=X.getValueOrUndefined(t.shape,n),i.granularity=X.getValueOrUndefined(t.granularity,n),i.cornerType=X.getValueOrUndefined(t.cornerType,n)};var Fk=f0;var Qee=new h,aSe=new h,cSe=new h,lSe=new h,uSe=new ie,w_t=new U,I_t=new ue,P_t=new ue;function fSe(e,t){let n=new St({attributes:new Tn,primitiveType:Oe.TRIANGLES});return n.attributes.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function D_t(e,t,n,i){let r=e.length,o=t.normal?new Float32Array(r):void 0,s=t.tangent?new Float32Array(r):void 0,a=t.bitangent?new Float32Array(r):void 0,c=0,u=lSe,f=cSe,d=aSe;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<r;p+=3){let g=h.fromArray(e,p,Qee),m=c+1,y=c+2;d=n.geodeticSurfaceNormal(g,d),(t.tangent||t.bitangent)&&(h.cross(h.UNIT_Z,d,f),$.multiplyByVector(i,f,f),h.normalize(f,f),t.bitangent&&h.normalize(h.cross(d,f,u),u)),t.normal&&(o[c]=d.x,o[m]=d.y,o[y]=d.z),t.tangent&&(s[c]=f.x,s[m]=f.y,s[y]=f.z),t.bitangent&&(a[c]=u.x,a[m]=u.y,a[y]=u.z),c+=3}return fSe(t,{positions:e,normals:o,tangents:s,bitangents:a})}var ete=new h,dSe=new h;function R_t(e,t,n){let i=e.length,r=t.normal?new Float32Array(i):void 0,o=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,u=0,f=!0,d=lSe,p=cSe,g=aSe;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<i;m+=6){let y=h.fromArray(e,m,Qee),A=h.fromArray(e,(m+6)%i,ete);if(f){let b=h.fromArray(e,(m+3)%i,dSe);h.subtract(A,y,A),h.subtract(b,y,b),g=h.normalize(h.cross(b,A,g),g),f=!1}h.equalsEpsilon(A,y,D.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(d=n.geodeticSurfaceNormal(y,d),t.tangent&&(p=h.normalize(h.cross(d,g,p),p))),t.normal&&(r[a++]=g.x,r[a++]=g.y,r[a++]=g.z,r[a++]=g.x,r[a++]=g.y,r[a++]=g.z),t.tangent&&(o[c++]=p.x,o[c++]=p.y,o[c++]=p.z,o[c++]=p.x,o[c++]=p.y,o[c++]=p.z),t.bitangent&&(s[u++]=d.x,s[u++]=d.y,s[u++]=d.z,s[u++]=d.x,s[u++]=d.y,s[u++]=d.z)}return fSe(t,{positions:e,normals:r,tangents:o,bitangents:s})}function hSe(e,t){let n=e._vertexFormat,i=e._ellipsoid,r=t.height,o=t.width,s=t.northCap,a=t.southCap,c=0,u=r,f=r,d=0;s&&(c=1,f-=1,d+=1),a&&(u-=1,f-=1,d+=1),d+=o*f;let p=n.position?new Float64Array(d*3):void 0,g=n.st?new Float32Array(d*2):void 0,m=0,y=0,A=Qee,b=w_t,x=Number.MAX_VALUE,T=Number.MAX_VALUE,E=-Number.MAX_VALUE,v=-Number.MAX_VALUE;for(let C=c;C<u;++C)for(let w=0;w<o;++w)Sa.computePosition(t,i,n.st,C,w,A,b),p[m++]=A.x,p[m++]=A.y,p[m++]=A.z,n.st&&(g[y++]=b.x,g[y++]=b.y,x=Math.min(x,b.x),T=Math.min(T,b.y),E=Math.max(E,b.x),v=Math.max(v,b.y));if(s&&(Sa.computePosition(t,i,n.st,0,0,A,b),p[m++]=A.x,p[m++]=A.y,p[m++]=A.z,n.st&&(g[y++]=b.x,g[y++]=b.y,x=b.x,T=b.y,E=b.x,v=b.y)),a&&(Sa.computePosition(t,i,n.st,r-1,0,A,b),p[m++]=A.x,p[m++]=A.y,p[m]=A.z,n.st&&(g[y++]=b.x,g[y]=b.y,x=Math.min(x,b.x),T=Math.min(T,b.y),E=Math.max(E,b.x),v=Math.max(v,b.y))),n.st&&(x<0||T<0||E>1||v>1))for(let C=0;C<g.length;C+=2)g[C]=(g[C]-x)/(E-x),g[C+1]=(g[C+1]-T)/(v-T);let S=D_t(p,n,i,t.tangentRotationMatrix),I=6*(o-1)*(f-1);s&&(I+=3*(o-1)),a&&(I+=3*(o-1));let R=je.createTypedArray(d,I),O=0,L=0,_;for(_=0;_<f-1;++_){for(let C=0;C<o-1;++C){let w=O,P=w+o,M=P+1,F=w+1;R[L++]=w,R[L++]=P,R[L++]=F,R[L++]=F,R[L++]=P,R[L++]=M,++O}++O}if(s||a){let C=d-1,w=d-1;s&&a&&(C=d-2);let P,M;if(O=0,s)for(_=0;_<o-1;_++)P=O,M=P+1,R[L++]=C,R[L++]=P,R[L++]=M,++O;if(a)for(O=(f-1)*o,_=0;_<o-1;_++)P=O,M=P+1,R[L++]=P,R[L++]=w,R[L++]=M,++O}return S.indices=R,n.st&&(S.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:g})),S}function Jw(e,t,n,i,r){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=r[n],e[t++]=r[n+1],e[t]=r[n+2],e}function Zw(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var tte=new Be;function O_t(e,t){let n=e._shadowVolume,i=e._offsetAttribute,r=e._vertexFormat,o=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,c=t.height,u=t.width,f;if(n){let Pe=Be.clone(r,tte);Pe.normal=!0,e._vertexFormat=Pe}let d=hSe(e,t);n&&(e._vertexFormat=r);let p=fi.scaleToGeodeticHeight(d.attributes.position.values,s,a,!1);p=new Float64Array(p);let g=p.length,m=g*2,y=new Float64Array(m);y.set(p);let A=fi.scaleToGeodeticHeight(d.attributes.position.values,o,a);y.set(A,g),d.attributes.position.values=y;let b=r.normal?new Float32Array(m):void 0,x=r.tangent?new Float32Array(m):void 0,T=r.bitangent?new Float32Array(m):void 0,E=r.st?new Float32Array(m/3*2):void 0,v,S;if(r.normal){for(S=d.attributes.normal.values,b.set(S),f=0;f<g;f++)S[f]=-S[f];b.set(S,g),d.attributes.normal.values=b}if(n){S=d.attributes.normal.values,r.normal||(d.attributes.normal=void 0);let Pe=new Float32Array(m);for(f=0;f<g;f++)S[f]=-S[f];Pe.set(S,g),d.attributes.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:Pe})}let I,R=l(i);if(R){let Pe=g/3*2,qe=new Uint8Array(Pe);i===mn.TOP?qe=qe.fill(1,0,Pe/2):(I=i===mn.NONE?0:1,qe=qe.fill(I)),d.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:qe})}if(r.tangent){let Pe=d.attributes.tangent.values;for(x.set(Pe),f=0;f<g;f++)Pe[f]=-Pe[f];x.set(Pe,g),d.attributes.tangent.values=x}if(r.bitangent){let Pe=d.attributes.bitangent.values;T.set(Pe),T.set(Pe,g),d.attributes.bitangent.values=T}r.st&&(v=d.attributes.st.values,E.set(v),E.set(v,g/3*2),d.attributes.st.values=E);let O=d.indices,L=O.length,_=g/3,C=je.createTypedArray(m/3,L*2);for(C.set(O),f=0;f<L;f+=3)C[f+L]=O[f+2]+_,C[f+1+L]=O[f+1]+_,C[f+2+L]=O[f]+_;d.indices=C;let w=t.northCap,P=t.southCap,M=c,F=2,V=0,B=4,j=4;w&&(F-=1,M-=1,V+=1,B-=2,j-=1),P&&(F-=1,M-=1,V+=1,B-=2,j-=1),V+=F*u+2*M-B;let k=(V+j)*2,G=new Float64Array(k*3),q=n?new Float32Array(k*3):void 0,Q=R?new Uint8Array(k):void 0,W=r.st?new Float32Array(k*2):void 0,J=i===mn.TOP;R&&!J&&(I=i===mn.ALL?1:0,Q=Q.fill(I));let Z=0,ae=0,Ae=0,fe=0,xe=u*M,ge;for(f=0;f<xe;f+=u)ge=f*3,G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,f*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1);if(P){let Pe=w?xe+1:xe;for(ge=Pe*3,f=0;f<2;f++)G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,Pe*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1)}else for(f=xe-u;f<xe;f++)ge=f*3,G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,f*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1);for(f=xe-1;f>0;f-=u)ge=f*3,G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,f*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1);if(w){let Pe=xe;for(ge=Pe*3,f=0;f<2;f++)G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,Pe*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1)}else for(f=u-1;f>=0;f--)ge=f*3,G=Jw(G,Z,ge,p,A),Z+=6,r.st&&(W=Zw(W,ae,f*2,v),ae+=4),n&&(Ae+=3,q[Ae++]=S[ge],q[Ae++]=S[ge+1],q[Ae++]=S[ge+2]),J&&(Q[fe++]=1,fe+=1);let we=R_t(G,r,a);r.st&&(we.attributes.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:W})),n&&(we.attributes.extrudeDirection=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:q})),R&&(we.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Q}));let Se=je.createTypedArray(k,V*6),Re,Qe,He,Xe;g=G.length/3;let $e=0;for(f=0;f<g-1;f+=2){Re=f,Xe=(Re+2)%g;let Pe=h.fromArray(G,Re*3,ete),qe=h.fromArray(G,Xe*3,dSe);h.equalsEpsilon(Pe,qe,D.EPSILON10)||(Qe=(Re+1)%g,He=(Qe+2)%g,Se[$e++]=Re,Se[$e++]=Qe,Se[$e++]=Xe,Se[$e++]=Xe,Se[$e++]=Qe,Se[$e++]=He)}return we.indices=Se,we=Gn.combineInstances([new Ft({geometry:d}),new Ft({geometry:we})]),we[0]}var M_t=[new h,new h,new h,new h],mSe=new he,N_t=new he;function nte(e,t,n,i,r){if(n===0)return ie.clone(e,r);let o=Sa.computeOptions(e,t,n,0,uSe,mSe),s=o.height,a=o.width,c=M_t;return Sa.computePosition(o,i,!1,0,0,c[0]),Sa.computePosition(o,i,!1,0,a-1,c[1]),Sa.computePosition(o,i,!1,s-1,0,c[2]),Sa.computePosition(o,i,!1,s-1,a-1,c[3]),ie.fromCartesianArray(c,i,r)}function d0(e){e=e??H.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=ie.clone(t),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._surfaceHeight=Math.max(n,i),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._vertexFormat=Be.clone(e.vertexFormat??Be.DEFAULT),this._extrudedHeight=Math.min(n,i),this._shadowVolume=e.shadowVolume??!1,this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}d0.packedLength=ie.packedLength+ee.packedLength+Be.packedLength+7;d0.pack=function(e,t,n){return n=n??0,ie.pack(e._rectangle,t,n),n+=ie.packedLength,ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var pSe=new ie,gSe=ee.clone(ee.UNIT_SPHERE),eb={rectangle:pSe,ellipsoid:gSe,vertexFormat:tte,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};d0.unpack=function(e,t,n){t=t??0;let i=ie.unpack(e,t,pSe);t+=ie.packedLength;let r=ee.unpack(e,t,gSe);t+=ee.packedLength;let o=Be.unpack(e,t,tte);t+=Be.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++]===1,p=e[t];return l(n)?(n._rectangle=ie.clone(i,n._rectangle),n._ellipsoid=ee.clone(r,n._ellipsoid),n._vertexFormat=Be.clone(o,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=d,n._offsetAttribute=p===-1?void 0:p,n):(eb.granularity=s,eb.height=a,eb.rotation=c,eb.stRotation=u,eb.extrudedHeight=f,eb.shadowVolume=d,eb.offsetAttribute=p===-1?void 0:p,new d0(eb))};d0.computeRectangle=function(e,t){e=e??H.EMPTY_OBJECT;let n=e.rectangle,i=e.granularity??D.RADIANS_PER_DEGREE,r=e.ellipsoid??ee.default,o=e.rotation??0;return nte(n,i,o,r,t)};var L_t=new $,oSe=new Le,F_t=new he;d0.createGeometry=function(e){if(D.equalsEpsilon(e._rectangle.north,e._rectangle.south,D.EPSILON10)||D.equalsEpsilon(e._rectangle.east,e._rectangle.west,D.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,r=e._stRotation,o=e._vertexFormat,s=Sa.computeOptions(t,e._granularity,i,r,uSe,mSe,N_t),a=L_t;if(r!==0||i!==0){let g=ie.center(t,F_t),m=n.geodeticSurfaceNormalCartographic(g,ete);Le.fromAxisAngle(m,-r,oSe),$.fromQuaternion(oSe,a)}else $.clone($.IDENTITY,a);let c=e._surfaceHeight,u=e._extrudedHeight,f=!D.equalsEpsilon(c,u,0,D.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let d,p;if(t=e._rectangle,f){d=O_t(e,s);let g=ue.fromRectangle3D(t,n,c,P_t),m=ue.fromRectangle3D(t,n,u,I_t);p=ue.union(g,m)}else{if(d=hSe(e,s),d.attributes.position.values=fi.scaleToGeodeticHeight(d.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let g=d.attributes.position.values.length,m=e._offsetAttribute===mn.NONE?0:1,y=new Uint8Array(g/3).fill(m);d.attributes.applyOffset=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}p=ue.fromRectangle3D(t,n,c)}return o.position||delete d.attributes.position,new St({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};d0.createShadowVolume=function(e,t,n){let i=e._granularity,r=e._ellipsoid,o=t(i,r),s=n(i,r);return new d0({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:r,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:o,vertexFormat:Be.POSITION_ONLY,shadowVolume:!0})};var sSe=new ie,B_t=[new U,new U,new U],k_t=new Xi,U_t=new he;function z_t(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=ie.clone(e._rectangle,sSe),n=e._granularity,i=e._ellipsoid,r=e._rotation-e._stRotation,o=nte(t,n,r,i,sSe),s=B_t;s[0].x=o.west,s[0].y=o.south,s[1].x=o.west,s[1].y=o.north,s[2].x=o.east,s[2].y=o.south;let a=e.rectangle,c=Xi.fromRotation(e._stRotation,k_t),u=ie.center(a,U_t);for(let m=0;m<3;++m){let y=s[m];y.x-=u.longitude,y.y-=u.latitude,Xi.multiplyByVector(c,y,y),y.x+=u.longitude,y.y+=u.latitude,y.x=(y.x-a.west)/a.width,y.y=(y.y-a.south)/a.height}let f=s[0],d=s[1],p=s[2],g=new Array(6);return U.pack(f,g),U.pack(d,g,2),U.pack(p,g,4),g}Object.defineProperties(d0.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=nte(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=z_t(this)),this._textureCoordinateRotationPoints}}});var lE=d0;var _Se=new z,ySe=h.ZERO,ASe=new h,bSe=new ie,V_t=new ie,j_t=new he;function H_t(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function km(e,t){ii.call(this,{entity:e,scene:t,geometryOptions:new H_t(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(km.prototype=Object.create(ii.prototype),km.prototype.constructor=km);km.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Kt){let r;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(r=this._materialProperty.color.getValue(e,_Se)),l(r)||(r=z.WHITE),i.color=Jt.fromColor(r)}return l(this._options.offsetAttribute)&&(i.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,ySe,ASe))),new Ft({id:t,geometry:new lE(this._options),attributes:i})};km.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,_Se),r=this._distanceDisplayConditionProperty.getValue(e),o={show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=xr.fromCartesian3(X.getValueOrDefault(this._terrainOffsetProperty,e,ySe,ASe))),new Ft({id:t,geometry:new zT(this._options),attributes:o})};km.prototype._computeCenter=function(e,t){let n=X.getValueOrUndefined(this._entity.rectangle.coordinates,e,V_t);if(!l(n))return;let i=ie.center(n,j_t);return he.toCartesian(i,ee.default,t)};km.prototype._isHidden=function(e,t){return!l(t.coordinates)||Pi.prototype._isHidden.call(this,e,t)};km.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!X.isConstant(t.height)||!X.isConstant(t.extrudedHeight)||!X.isConstant(t.granularity)||!X.isConstant(t.stRotation)||!X.isConstant(t.rotation)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.zIndex)||this._onTerrain&&!X.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Kt)};km.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Kt,i=X.getValueOrUndefined(t.height,tt.MINIMUM_VALUE),r=X.getValueOrDefault(t.heightReference,tt.MINIMUM_VALUE,We.NONE),o=X.getValueOrUndefined(t.extrudedHeight,tt.MINIMUM_VALUE),s=X.getValueOrDefault(t.extrudedHeightReference,tt.MINIMUM_VALUE,We.NONE);l(o)&&!l(i)&&(i=0);let a=this._options;a.vertexFormat=n?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(tt.MINIMUM_VALUE,a.rectangle),a.granularity=X.getValueOrUndefined(t.granularity,tt.MINIMUM_VALUE),a.stRotation=X.getValueOrUndefined(t.stRotation,tt.MINIMUM_VALUE),a.rotation=X.getValueOrUndefined(t.rotation,tt.MINIMUM_VALUE),a.offsetAttribute=ii.computeGeometryOffsetAttribute(i,r,o,s),a.height=ii.getGeometryHeight(i,r),o=ii.getGeometryExtrudedHeight(o,s),o===ii.CLAMP_TO_GROUND&&(o=Mi.getMinimumMaximumHeights(lE.computeRectangle(a,bSe)).minimumTerrainHeight),a.extrudedHeight=o};km.DynamicGeometryUpdater=Qw;function Qw(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(Qw.prototype=Object.create(Ii.prototype),Qw.prototype.constructor=Qw);Qw.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||Ii.prototype._isHidden.call(this,e,t,n)};Qw.prototype._setOptions=function(e,t,n){let i=this._options,r=X.getValueOrUndefined(t.height,n),o=X.getValueOrDefault(t.heightReference,n,We.NONE),s=X.getValueOrUndefined(t.extrudedHeight,n),a=X.getValueOrDefault(t.extrudedHeightReference,n,We.NONE);l(s)&&!l(r)&&(r=0),i.rectangle=X.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=X.getValueOrUndefined(t.granularity,n),i.stRotation=X.getValueOrUndefined(t.stRotation,n),i.rotation=X.getValueOrUndefined(t.rotation,n),i.offsetAttribute=ii.computeGeometryOffsetAttribute(r,o,s,a),i.height=ii.getGeometryHeight(r,o),s=ii.getGeometryExtrudedHeight(s,a),s===ii.CLAMP_TO_GROUND&&(s=Mi.getMinimumMaximumHeights(lE.computeRectangle(i,bSe)).minimumTerrainHeight),i.extrudedHeight=s};var Bk=km;var xSe={};function G_t(e,t){return D.equalsEpsilon(e.latitude,t.latitude,D.EPSILON10)&&D.equalsEpsilon(e.longitude,t.longitude,D.EPSILON10)}var W_t=new he,q_t=new he;function Y_t(e,t,n,i){t=Fr(t,h.equalsEpsilon);let r=t.length;if(r<2)return;let o=l(i),s=l(n),a=new Array(r),c=new Array(r),u=new Array(r),f=t[0];a[0]=f;let d=e.cartesianToCartographic(f,W_t);s&&(d.height=n[0]),c[0]=d.height,o?u[0]=i[0]:u[0]=0;let p=c[0],g=u[0],m=p===g,y=1;for(let A=1;A<r;++A){let b=t[A],x=e.cartesianToCartographic(b,q_t);s&&(x.height=n[A]),m=m&&x.height===0,G_t(d,x)?d.height<x.height&&(c[y-1]=x.height):(a[y]=b,c[y]=x.height,o?u[y]=i[A]:u[y]=0,m=m&&c[y]===u[y],he.clone(x,d),++y)}if(!(m||y<2))return a.length=y,c.length=y,u.length=y,{positions:a,topHeights:c,bottomHeights:u}}var X_t=new Array(2),K_t=new Array(2),$_t={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};xSe.computePositions=function(e,t,n,i,r,o){let s=Y_t(e,t,n,i);if(!l(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,c=a-2,u,f,d=D.chordLength(r,e.maximumRadius),p=$_t;if(p.minDistance=d,p.ellipsoid=e,o){let g=0,m;for(m=0;m<a-1;m++)g+=ir.numberOfPoints(t[m],t[m+1],d)+1;u=new Float64Array(g*3),f=new Float64Array(g*3);let y=X_t,A=K_t;p.positions=y,p.height=A;let b=0;for(m=0;m<a-1;m++){y[0]=t[m],y[1]=t[m+1],A[0]=n[m],A[1]=n[m+1];let x=ir.generateArc(p);u.set(x,b),A[0]=i[m],A[1]=i[m+1],f.set(ir.generateArc(p),b),b+=x.length}}else p.positions=t,p.height=n,u=new Float64Array(ir.generateArc(p)),p.height=i,f=new Float64Array(ir.generateArc(p));return{bottomPositions:f,topPositions:u,numCorners:c}};var uE=xSe;var ite=new h,UG=new h,J_t=new h,TSe=new h,Z_t=new h,Q_t=new h,eyt=new h;function fE(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,r=e.vertexFormat??Be.DEFAULT,o=e.granularity??D.RADIANS_PER_DEGREE,s=e.ellipsoid??ee.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Be.clone(r),this._granularity=o,this._ellipsoid=ee.clone(s),this._workerName="createWallGeometry";let a=1+t.length*h.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+ee.packedLength+Be.packedLength+1}fE.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._minimumHeights;if(o=l(s)?s.length:0,t[n++]=o,l(s))for(i=0;i<o;++i)t[n++]=s[i];let a=e._maximumHeights;if(o=l(a)?a.length:0,t[n++]=o,l(a))for(i=0;i<o;++i)t[n++]=a[i];return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n]=e._granularity,t};var ESe=ee.clone(ee.UNIT_SPHERE),CSe=new Be,kk={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:ESe,vertexFormat:CSe,granularity:void 0};fE.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s;if(r>0)for(s=new Array(r),i=0;i<r;++i)s[i]=e[t++];r=e[t++];let a;if(r>0)for(a=new Array(r),i=0;i<r;++i)a[i]=e[t++];let c=ee.unpack(e,t,ESe);t+=ee.packedLength;let u=Be.unpack(e,t,CSe);t+=Be.packedLength;let f=e[t];return l(n)?(n._positions=o,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ee.clone(c,n._ellipsoid),n._vertexFormat=Be.clone(u,n._vertexFormat),n._granularity=f,n):(kk.positions=o,kk.minimumHeights=s,kk.maximumHeights=a,kk.granularity=f,new fE(kk))};fE.fromConstantHeights=function(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n,i,r=e.minimumHeight,o=e.maximumHeight,s=l(r),a=l(o);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=r),a&&(i[f]=o)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new fE(c)};fE.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,r=e._vertexFormat,o=e._granularity,s=e._ellipsoid,a=uE.computePositions(s,t,i,n,o,!0);if(!l(a))return;let c=a.bottomPositions,u=a.topPositions,f=a.numCorners,d=u.length,p=d*2,g=r.position?new Float64Array(p):void 0,m=r.normal?new Float32Array(p):void 0,y=r.tangent?new Float32Array(p):void 0,A=r.bitangent?new Float32Array(p):void 0,b=r.st?new Float32Array(p/3*2):void 0,x=0,T=0,E=0,v=0,S=0,I=eyt,R=Q_t,O=Z_t,L=!0;d/=3;let _,C=0,w=1/(d-f-1);for(_=0;_<d;++_){let B=_*3,j=h.fromArray(u,B,ite),k=h.fromArray(c,B,UG);if(r.position&&(g[x++]=k.x,g[x++]=k.y,g[x++]=k.z,g[x++]=j.x,g[x++]=j.y,g[x++]=j.z),r.st&&(b[S++]=C,b[S++]=0,b[S++]=C,b[S++]=1),r.normal||r.tangent||r.bitangent){let G=h.clone(h.ZERO,TSe),q=h.subtract(j,s.geodeticSurfaceNormal(j,UG),UG);if(_+1<d&&(G=h.fromArray(u,B+3,TSe)),L){let Q=h.subtract(G,j,J_t),W=h.subtract(q,j,ite);I=h.normalize(h.cross(W,Q,I),I),L=!1}h.equalsEpsilon(j,G,D.EPSILON10)?L=!0:(C+=w,r.tangent&&(R=h.normalize(h.subtract(G,j,R),R)),r.bitangent&&(O=h.normalize(h.cross(I,R,O),O))),r.normal&&(m[T++]=I.x,m[T++]=I.y,m[T++]=I.z,m[T++]=I.x,m[T++]=I.y,m[T++]=I.z),r.tangent&&(y[v++]=R.x,y[v++]=R.y,y[v++]=R.z,y[v++]=R.x,y[v++]=R.y,y[v++]=R.z),r.bitangent&&(A[E++]=O.x,A[E++]=O.y,A[E++]=O.z,A[E++]=O.x,A[E++]=O.y,A[E++]=O.z)}}let P=new Tn;r.position&&(P.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:g})),r.normal&&(P.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),r.tangent&&(P.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:y})),r.bitangent&&(P.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:A})),r.st&&(P.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:b}));let M=p/3;p-=6*(f+1);let F=je.createTypedArray(M,p),V=0;for(_=0;_<M-2;_+=2){let B=_,j=_+2,k=h.fromArray(g,B*3,ite),G=h.fromArray(g,j*3,UG);if(h.equalsEpsilon(k,G,D.EPSILON10))continue;let q=_+1,Q=_+3;F[V++]=q,F[V++]=B,F[V++]=Q,F[V++]=Q,F[V++]=B,F[V++]=j}return new St({attributes:P,indices:F,primitiveType:Oe.TRIANGLES,boundingSphere:ue.fromVertices(g)})};var Uk=fE;var vSe=new h,SSe=new h;function dE(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,r=e.granularity??D.RADIANS_PER_DEGREE,o=e.ellipsoid??ee.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=r,this._ellipsoid=ee.clone(o),this._workerName="createWallOutlineGeometry";let s=1+t.length*h.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+ee.packedLength+1}dE.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._minimumHeights;if(o=l(s)?s.length:0,t[n++]=o,l(s))for(i=0;i<o;++i)t[n++]=s[i];let a=e._maximumHeights;if(o=l(a)?a.length:0,t[n++]=o,l(a))for(i=0;i<o;++i)t[n++]=a[i];return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n]=e._granularity,t};var wSe=ee.clone(ee.UNIT_SPHERE),zk={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:wSe,granularity:void 0};dE.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s;if(r>0)for(s=new Array(r),i=0;i<r;++i)s[i]=e[t++];r=e[t++];let a;if(r>0)for(a=new Array(r),i=0;i<r;++i)a[i]=e[t++];let c=ee.unpack(e,t,wSe);t+=ee.packedLength;let u=e[t];return l(n)?(n._positions=o,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ee.clone(c,n._ellipsoid),n._granularity=u,n):(zk.positions=o,zk.minimumHeights=s,zk.maximumHeights=a,zk.granularity=u,new dE(zk))};dE.fromConstantHeights=function(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n,i,r=e.minimumHeight,o=e.maximumHeight,s=l(r),a=l(o);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=r),a&&(i[f]=o)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new dE(c)};dE.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,r=e._granularity,o=e._ellipsoid,s=uE.computePositions(o,t,i,n,r,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,u=c.length,f=u*2,d=new Float64Array(f),p=0;u/=3;let g;for(g=0;g<u;++g){let x=g*3,T=h.fromArray(c,x,vSe),E=h.fromArray(a,x,SSe);d[p++]=E.x,d[p++]=E.y,d[p++]=E.z,d[p++]=T.x,d[p++]=T.y,d[p++]=T.z}let m=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d})}),y=f/3;f=2*y-4+y;let A=je.createTypedArray(y,f),b=0;for(g=0;g<y-2;g+=2){let x=g,T=g+2,E=h.fromArray(d,x*3,vSe),v=h.fromArray(d,T*3,SSe);if(h.equalsEpsilon(E,v,D.EPSILON10))continue;let S=g+1,I=g+3;A[b++]=S,A[b++]=x,A[b++]=S,A[b++]=I,A[b++]=x,A[b++]=T}return A[b++]=y-2,A[b]=y-1,new St({attributes:m,indices:A,primitiveType:Oe.LINES,boundingSphere:ue.fromVertices(d)})};var Vk=dE;var ISe=new z;function tyt(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function Um(e,t){Pi.call(this,{entity:e,scene:t,geometryOptions:new tyt(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(Um.prototype=Object.create(Pi.prototype),Um.prototype.constructor=Um);Um.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,r,o=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Kt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,ISe)),l(c)||(c=z.WHITE),r=Jt.fromColor(c),i={show:o,distanceDisplayCondition:a,color:r}}else i={show:o,distanceDisplayCondition:a};return new Ft({id:t,geometry:new Uk(this._options),attributes:i})};Um.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=X.getValueOrDefault(this._outlineColorProperty,e,z.BLACK,ISe),r=this._distanceDisplayConditionProperty.getValue(e);return new Ft({id:t,geometry:new Vk(this._options),attributes:{show:new Pn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Jt.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r)}})};Um.prototype._isHidden=function(e,t){return!l(t.positions)||Pi.prototype._isHidden.call(this,e,t)};Um.prototype._getIsClosed=function(e){return!1};Um.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!X.isConstant(t.minimumHeights)||!X.isConstant(t.maximumHeights)||!X.isConstant(t.outlineWidth)||!X.isConstant(t.granularity)};Um.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,r=t.granularity,o=this._materialProperty instanceof Kt,s=this._options;s.vertexFormat=o?yn.VERTEX_FORMAT:Er.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(tt.MINIMUM_VALUE,s.positions),s.minimumHeights=l(n)?n.getValue(tt.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=l(i)?i.getValue(tt.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=l(r)?r.getValue(tt.MINIMUM_VALUE):void 0};Um.DynamicGeometryUpdater=eI;function eI(e,t,n){Ii.call(this,e,t,n)}l(Object.create)&&(eI.prototype=Object.create(Ii.prototype),eI.prototype.constructor=eI);eI.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||Ii.prototype._isHidden.call(this,e,t,n)};eI.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=X.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=X.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=X.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=X.getValueOrUndefined(t.granularity,n)};var jk=Um;var hE=[NM,ak,Q2,bk,Tk,vk,Pk,Fk,Bk,jk];function mE(e,t){this.entity=e,this.scene=t;let n=new Array(hE.length),i=new be,r=new Xo;for(let o=0;o<n.length;o++){let s=new hE[o](e,t);r.add(s.geometryChanged,a=>{i.raiseEvent(a)}),n[o]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=r,this._removeEntitySubscription=e.definitionChanged.addEventListener(mE.prototype._onEntityPropertyChanged,this)}mE.prototype._onEntityPropertyChanged=function(e,t,n,i){let r=this.updaters;for(let o=0;o<r.length;o++)r[o]._onEntityPropertyChanged(e,t,n,i)};mE.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};mE.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),le(this)};mE.registerUpdater=function(e){hE.includes(e)||hE.push(e)};mE.unregisterUpdater=function(e){if(hE.includes(e)){let t=hE.indexOf(e);hE.splice(t,1)}};var pE=mE;var PSe=new z,nyt=new jt,iyt=new jt,ryt=h.ZERO,oyt=new h;function zm(e,t,n,i,r,o,s){this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=r,this.depthFailMaterial=void 0,this.closed=o,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.updaters=new kt,this.updatersWithAttributes=new kt,this.attributes=new kt,this.subscriptions=new kt,this.showsUpdated=new kt,this.itemsToRemove=[],this.invalidated=!1;let a;l(r)&&(a=r.definitionChanged.addEventListener(zm.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}zm.prototype.onMaterialChanged=function(){this.invalidated=!0};zm.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};zm.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty)||!X.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(r,o,s,a){o==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};zm.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};zm.prototype.update=function(e){let t=!0,n=0,i=this.primitive,r=this.primitives,o;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0){l(i)&&(l(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i);let c;if(l(this.depthFailAppearanceType)){l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=_o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial));let f=this.depthFailAppearanceType;c=new f({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})}let u=this.appearanceType;i=new On({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new u({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),r.add(i),t=!1}else{l(i)&&(r.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(r.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Kt)&&(this.depthFailMaterial=_o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(o=0;o<a;o++){let u=s[o],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.fillMaterialProperty.isConstant||c){let A=u.fillMaterialProperty.color,b=X.getValueOrDefault(A,e,z.WHITE,PSe);z.equals(d._lastColor,b)||(d._lastColor=z.clone(b,d._lastColor),d.color=Jt.toValue(b,d.color),(this.translucent&&d.color[3]===255||!this.translucent&&d.color[3]!==255)&&(this.itemsToRemove[n++]=u))}if(l(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof Kt&&(!u.depthFailMaterialProperty.isConstant||c)){let A=u.depthFailMaterialProperty.color,b=X.getValueOrDefault(A,e,z.WHITE,PSe);z.equals(d._lastDepthFailColor,b)||(d._lastDepthFailColor=z.clone(b,d._lastDepthFailColor),d.depthFailColor=Jt.toValue(b,d.depthFailColor))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,iyt,nyt);jt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(A,d.distanceDisplayCondition))}let y=u.terrainOffsetProperty;if(!X.isConstant(y)){let A=X.getValueOrDefault(y,e,ryt,oyt);h.equals(A,d._lastOffset)||(d._lastOffset=h.clone(A,d._lastOffset),d.offset=xr.toValue(A,d.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};zm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=this.geometry.get(r.id),s=this.attributes.get(o.id.id);l(s)||(s=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,s));let a=r.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Pn.toValue(a,s.show),o.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};zm.prototype.contains=function(e){return this.updaters.contains(e.id)};zm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Pt.FAILED:(i.boundingSphere.clone(t),Pt.DONE)};zm.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),l(this.removeMaterialSubscription)&&this.removeMaterialSubscription()};function tI(e,t,n,i,r){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=r}tI.prototype.add=function(e,t){let n,i,r=t.createFillGeometryInstance(e);r.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let o=n.length;for(let a=0;a<o;a++){let c=n[a];if(c.isMaterial(t)){c.add(t,r);return}}let s=new zm(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,r),n.push(s)};function DSe(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let r=e[i];if(r.remove(t))return r.updaters.length===0&&(e.splice(i,1),r.destroy()),!0}return!1}tI.prototype.remove=function(e){DSe(this._solidItems,e)||DSe(this._translucentItems,e)};function RSe(e,t,n){let i=!1,r=t.length;for(let o=0;o<r;++o){let s=t[o],a=s.itemsToRemove,c=a.length;if(c>0)for(o=0;o<c;o++){let u=a[o];s.remove(u),e.add(n,u),i=!0}}return i}function zG(e,t,n,i){let r=t.length,o;for(o=r-1;o>=0;o--){let s=t[o];if(s.invalidated){t.splice(o,1);let a=s.updaters.values,c=a.length;for(let u=0;u<c;u++)e.add(n,a[u]);s.destroy()}}for(r=t.length,o=0;o<r;++o)i=t[o].update(n)&&i;return i}tI.prototype.update=function(e){let t=zG(this,this._solidItems,e,!0);t=zG(this,this._translucentItems,e,t)&&t;let n=RSe(this,this._solidItems,e),i=RSe(this,this._translucentItems,e);return(n||i)&&(t=zG(this,this._solidItems,e,t)&&t,t=zG(this,this._translucentItems,e,t)&&t),t};function OSe(e,t,n){let i=e.length;for(let r=0;r<i;r++){let o=e[r];if(o.contains(t))return o.getBoundingSphere(t,n)}return Pt.FAILED}tI.prototype.getBoundingSphere=function(e,t){let n=OSe(this._solidItems,e,t);return n===Pt.FAILED?OSe(this._translucentItems,e,t):n};function MSe(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}tI.prototype.removeAllPrimitives=function(){MSe(this._solidItems),MSe(this._translucentItems)};var dh=tI;var syt=new jt,ayt=new jt,cyt=h.ZERO,lyt=new h;function Vm(e,t,n,i,r,o,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=r,this.closed=o,this.shadows=s,this.updaters=new kt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new kt,this.attributes=new kt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Vm.prototype.onMaterialChanged,this),this.subscriptions=new kt,this.showsUpdated=new kt}Vm.prototype.onMaterialChanged=function(){this.invalidated=!0};Vm.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,r=e.depthFailMaterialProperty;if(n===t&&r===i)return!0;let o=l(t)&&t.equals(n);return o=(!l(i)&&!l(r)||l(i)&&i.equals(r))&&o,o};Vm.prototype.add=function(e,t){let n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,t.createFillGeometryInstance(e)),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty)||!X.isConstant(t.terrainOffsetProperty))this.updatersWithAttributes.set(n,t);else{let i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(r,o,s,a){o==="isShowing"&&i.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Vm.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};var uyt=new z;Vm.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,r=this.geometry.values,o;if(this.createPrimitive){if(r.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=_o.getValue(e,this.materialProperty,this.material);let a;if(l(this.depthFailMaterialProperty)){this.depthFailMaterial=_o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial);let u=this.depthFailAppearanceType;a=new u({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})}let c=this.appearanceType;n=new On({show:!1,asynchronous:!0,geometryInstances:r.slice(),appearance:new c({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:a,shadows:this.shadows}),i.add(n),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=_o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Kt)&&(this.depthFailMaterial=_o.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(o=0;o<a;o++){let c=s[o],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);if(l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Kt&&!c.depthFailMaterialProperty.isConstant){let A=c.depthFailMaterialProperty.color,b=X.getValueOrDefault(A,e,z.WHITE,uyt);z.equals(d._lastDepthFailColor,b)||(d._lastDepthFailColor=z.clone(b,d._lastDepthFailColor),d.depthFailColor=Jt.toValue(b,d.depthFailColor))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,ayt,syt);jt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(A,d.distanceDisplayCondition))}let y=c.terrainOffsetProperty;if(!X.isConstant(y)){let A=X.getValueOrDefault(y,e,cyt,lyt);h.equals(A,d._lastOffset)||(d._lastOffset=h.clone(A,d._lastOffset),d.offset=xr.toValue(A,d.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Vm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=r.entity,s=this.geometry.get(r.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=o.isShowing,u=a.show[0]===1;c!==u&&(a.show=Pn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Vm.prototype.contains=function(e){return this.updaters.contains(e.id)};Vm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Pt.FAILED:(i.boundingSphere.clone(t),Pt.DONE)};Vm.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function nI(e,t,n,i,r){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=r}nI.prototype.add=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let s=n[o];if(s.isMaterial(t)){s.add(e,t);return}}let r=new Vm(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);r.add(e,t),n.push(r)};nI.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let r=t[i];if(r.remove(e)){r.updaters.length===0&&(t.splice(i,1),r.destroy());break}}};nI.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let o=n[t];if(o.invalidated){n.splice(t,1);let s=o.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);o.destroy()}}let r=!0;for(t=0;t<n.length;t++)r=n[t].update(e)&&r;return r};nI.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let o=n[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return Pt.FAILED};nI.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var hh=nI;function VG(e,t,n=0,i=e.length-1,r=fyt){for(;i>n;){if(i-n>600){let c=i-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),g=Math.max(n,Math.floor(t-u*d/c+p)),m=Math.min(i,Math.floor(t+(c-u)*d/c+p));VG(e,t,g,m,r)}let o=e[t],s=n,a=i;for(Hk(e,n,t),r(e[i],o)>0&&Hk(e,n,i);s<a;){for(Hk(e,s,a),s++,a--;r(e[s],o)<0;)s++;for(;r(e[a],o)>0;)a--}r(e[n],o)===0?Hk(e,n,a):(a++,Hk(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}}function Hk(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function fyt(e,t){return e<t?-1:e>t?1:0}var qk=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let n=this.data,i=[];if(!HG(t,n))return i;let r=this.toBBox,o=[];for(;n;){for(let s=0;s<n.children.length;s++){let a=n.children[s],c=n.leaf?r(a):a;HG(t,c)&&(n.leaf?i.push(a):ote(t,c)?this._all(a,i):o.push(a))}n=o.pop()}return i}collides(t){let n=this.data;if(!HG(t,n))return!1;let i=[];for(;n;){for(let r=0;r<n.children.length;r++){let o=n.children[r],s=n.leaf?this.toBBox(o):o;if(HG(t,s)){if(n.leaf||ote(t,s))return!0;i.push(o)}}n=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let n=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){let i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=rI([]),this}remove(t,n){if(!t)return this;let i=this.data,r=this.toBBox(t),o=[],s=[],a,c,u;for(;i||o.length;){if(i||(i=o.pop(),c=o[o.length-1],a=s.pop(),u=!0),i.leaf){let f=dyt(t,i.children,n);if(f!==-1)return i.children.splice(f,1),o.push(i),this._condense(o),this}!u&&!i.leaf&&ote(i,r)?(o.push(i),s.push(a),a=0,c=i,i=i.children[0]):c?(a++,i=c.children[a],u=!1):i=null}return this}toBBox(t){return t}compareMinX(t,n){return t.minX-n.minX}compareMinY(t,n){return t.minY-n.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,n){let i=[];for(;t;)t.leaf?n.push(...t.children):i.push(...t.children),t=i.pop();return n}_build(t,n,i,r){let o=i-n+1,s=this._maxEntries,a;if(o<=s)return a=rI(t.slice(n,i+1)),iI(a,this.toBBox),a;r||(r=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,r-1))),a=rI([]),a.leaf=!1,a.height=r;let c=Math.ceil(o/s),u=c*Math.ceil(Math.sqrt(s));NSe(t,n,i,u,this.compareMinX);for(let f=n;f<=i;f+=u){let d=Math.min(f+u-1,i);NSe(t,f,d,c,this.compareMinY);for(let p=f;p<=d;p+=c){let g=Math.min(p+c-1,d);a.children.push(this._build(t,p,g,r-1))}}return iI(a,this.toBBox),a}_chooseSubtree(t,n,i,r){for(;r.push(n),!(n.leaf||r.length-1===i);){let o=1/0,s=1/0,a;for(let c=0;c<n.children.length;c++){let u=n.children[c],f=rte(u),d=pyt(t,u)-f;d<s?(s=d,o=f<o?f:o,a=u):d===s&&f<o&&(o=f,a=u)}n=a||n.children[0]}return n}_insert(t,n,i){let r=i?t:this.toBBox(t),o=[],s=this._chooseSubtree(r,this.data,n,o);for(s.children.push(t),Wk(s,r);n>=0&&o[n].children.length>this._maxEntries;)this._split(o,n),n--;this._adjustParentBBoxes(r,o,n)}_split(t,n){let i=t[n],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);let s=this._chooseSplitIndex(i,o,r),a=rI(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,iI(i,this.toBBox),iI(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,n){this.data=rI([t,n]),this.data.height=t.height+1,this.data.leaf=!1,iI(this.data,this.toBBox)}_chooseSplitIndex(t,n,i){let r,o=1/0,s=1/0;for(let a=n;a<=i-n;a++){let c=Gk(t,0,a,this.toBBox),u=Gk(t,a,i,this.toBBox),f=gyt(c,u),d=rte(c)+rte(u);f<o?(o=f,r=a,s=d<s?d:s):f===o&&d<s&&(s=d,r=a)}return r||i-n}_chooseSplitAxis(t,n,i){let r=t.leaf?this.compareMinX:hyt,o=t.leaf?this.compareMinY:myt,s=this._allDistMargin(t,n,i,r),a=this._allDistMargin(t,n,i,o);s<a&&t.children.sort(r)}_allDistMargin(t,n,i,r){t.children.sort(r);let o=this.toBBox,s=Gk(t,0,n,o),a=Gk(t,i-n,i,o),c=jG(s)+jG(a);for(let u=n;u<i-n;u++){let f=t.children[u];Wk(s,t.leaf?o(f):f),c+=jG(s)}for(let u=i-n-1;u>=n;u--){let f=t.children[u];Wk(a,t.leaf?o(f):f),c+=jG(a)}return c}_adjustParentBBoxes(t,n,i){for(let r=i;r>=0;r--)Wk(n[r],t)}_condense(t){for(let n=t.length-1,i;n>=0;n--)t[n].children.length===0?n>0?(i=t[n-1].children,i.splice(i.indexOf(t[n]),1)):this.clear():iI(t[n],this.toBBox)}};function dyt(e,t,n){if(!n)return t.indexOf(e);for(let i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function iI(e,t){Gk(e,0,e.children.length,t,e)}function Gk(e,t,n,i,r){r||(r=rI(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=t;o<n;o++){let s=e.children[o];Wk(r,e.leaf?i(s):s)}return r}function Wk(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function hyt(e,t){return e.minX-t.minX}function myt(e,t){return e.minY-t.minY}function rte(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function jG(e){return e.maxX-e.minX+(e.maxY-e.minY)}function pyt(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function gyt(e,t){let n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function ote(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function HG(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function rI(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function NSe(e,t,n,i,r){let o=[t,n];for(;o.length;){if(n=o.pop(),t=o.pop(),n-t<=i)continue;let s=t+Math.ceil((n-t)/i/2)*i;VG(e,s,t,n,r),o.push(t,s,s,n)}}function GG(){this._tree=new qk}function gE(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}gE.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};GG.prototype.insert=function(e,t){let n=gE.fromRectangleAndId(e,t,new gE);this._tree.insert(n)};function _yt(e,t){return e.id===t.id}var yyt=new gE;GG.prototype.remove=function(e,t){let n=gE.fromRectangleAndId(e,t,yyt);this._tree.remove(n,_yt)};var Ayt=new gE;GG.prototype.collides=function(e){let t=gE.fromRectangleAndId("",e,Ayt);return this._tree.collides(t)};var _E=GG;var byt=new z,xyt=new jt,Tyt=new jt;function B_(e,t,n,i){this.primitives=e,this.zIndex=i,this.classificationType=t,this.color=n,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.updaters=new kt,this.updatersWithAttributes=new kt,this.attributes=new kt,this.subscriptions=new kt,this.showsUpdated=new kt,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new _E}B_.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};B_.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),this.rectangleCollisionCheck.insert(n,t.geometry.rectangle),!e.hasConstantFill||!e.fillMaterialProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(r,o,s,a){o==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};B_.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};B_.prototype.update=function(e){let t=!0,n=0,i=this.primitive,r=this.primitives,o;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new Vl({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),r.add(i,this.zIndex),t=!1;else{l(i)&&(r.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(r.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(o=0;o<a;o++){let u=s[o],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.fillMaterialProperty.isConstant||c){let y=u.fillMaterialProperty.color,A=X.getValueOrDefault(y,e,z.WHITE,byt);z.equals(d._lastColor,A)||(d._lastColor=z.clone(A,d._lastColor),d.color=Jt.toValue(A,d.color))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,Tyt,xyt);jt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(y,d.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};B_.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=this.geometry.get(r.id),s=this.attributes.get(o.id.id);l(s)||(s=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,s));let a=r.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Pn.toValue(a,s.show),o.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};B_.prototype.contains=function(e){return this.updaters.contains(e.id)};B_.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),Pt.DONE):Pt.FAILED};B_.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function oI(e,t){this._batches=[],this._primitives=e,this._classificationType=t}oI.prototype.add=function(e,t){let n=t.createFillGeometryInstance(e),i=this._batches,r=X.getValueOrDefault(t.zIndex,0),o,s=i.length;for(let a=0;a<s;++a){let c=i[a];if(c.zIndex===r&&!c.overlapping(n.geometry.rectangle)){o=c;break}}return l(o)||(o=new B_(this._primitives,this._classificationType,n.attributes.color.value,r),i.push(o)),o.add(t,n),o};oI.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};oI.prototype.update=function(e){let t,n,i=!0,r=this._batches,o=r.length;for(t=0;t<o;++t)i=r[t].update(e)&&i;for(t=0;t<o;++t){let s=r[t],a=s.itemsToRemove,c=a.length;for(let u=0;u<c;u++){n=a[u],s.remove(n);let f=this.add(e,n);s.isDirty=!0,f.isDirty=!0}}for(t=o-1;t>=0;--t){let s=r[t];s.isDirty&&(i=r[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&r.splice(t,1)}return i};oI.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let r=0;r<i;++r){let o=n[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return Pt.FAILED};oI.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var sI=oI;var Eyt=new jt,Cyt=new jt;function h0(e,t,n,i,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new kt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.material=void 0,this.updatersWithAttributes=new kt,this.attributes=new kt,this.subscriptions=new kt,this.showsUpdated=new kt,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new _E}h0.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};h0.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Kt&&t instanceof Kt?!0:l(t)&&t.equals(n)};h0.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),this.rectangleCollisionCheck.insert(i,n.geometry.rectangle),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(o,s,a,c){s==="isShowing"&&r.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};h0.prototype.remove=function(e){let t=e.id,n=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,n.geometry.rectangle),this.updatersWithAttributes.remove(t);let i=this.subscriptions.get(t);return l(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};h0.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,r=this.geometry.values,o;if(this.createPrimitive){if(r.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=_o.getValue(e,this.materialProperty,this.material);let a=this.appearanceType;n=new Vl({show:!1,asynchronous:!0,geometryInstances:r.slice(),appearance:new a({material:this.material}),classificationType:this.classificationType}),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=_o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(o=0;o<a;o++){let c=s[o],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d));let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,Cyt,Eyt);jt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(y,d.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};h0.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=r.entity,s=this.geometry.get(r.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=o.isShowing,u=a.show[0]===1;c!==u&&(a.show=Pn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};h0.prototype.contains=function(e){return this.updaters.contains(e.id)};h0.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Pt.FAILED:(i.boundingSphere.clone(t),Pt.DONE)};h0.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n)};function aI(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}aI.prototype.add=function(e,t){let n=this._items,i=n.length,r=t.createFillGeometryInstance(e),o=Sf.shouldUseSphericalCoordinates(r.geometry.rectangle),s=X.getValueOrDefault(t.zIndex,0);for(let c=0;c<i;++c){let u=n[c];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===o&&u.zIndex===s&&!u.overlapping(r.geometry.rectangle)){u.add(e,t,r);return}}let a=new h0(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,o,s);a.add(e,t,r),n.push(a)};aI.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0&&!t[i].remove(e);i--);};aI.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let o=n[t];o.updaters.length===0&&(n.splice(t,1),o.destroy())}let r=!0;for(t=0;t<n.length;t++)r=n[t].update(e)&&r;return r};aI.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let o=n[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return Pt.FAILED};aI.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var Yk=aI;var vyt=new z,Syt=new jt,wyt=new jt,Iyt=h.ZERO,Pyt=new h;function k_(e,t,n,i){this.translucent=t,this.width=n,this.shadows=i,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.updaters=new kt,this.updatersWithAttributes=new kt,this.attributes=new kt,this.itemsToRemove=[],this.subscriptions=new kt,this.showsUpdated=new kt}k_.prototype.add=function(e,t){let n=e.id;if(this.createPrimitive=!0,this.geometry.set(n,t),this.updaters.set(n,e),!e.hasConstantOutline||!e.outlineColorProperty.isConstant||!X.isConstant(e.distanceDisplayConditionProperty)||!X.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(r,o,s,a){o==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};k_.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};k_.prototype.update=function(e){let t=!0,n=0,i=this.primitive,r=this.primitives,o;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?r.remove(i):this.oldPrimitive=i),i=new On({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new yn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),r.add(i),t=!1;else{l(i)&&(r.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(r.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(r.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(o=0;o<a;o++){let u=s[o],f=this.geometry.get(u.id),d=this.attributes.get(f.id.id);if(l(d)||(d=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!u.outlineColorProperty.isConstant||c){let A=u.outlineColorProperty,b=X.getValueOrDefault(A,e,z.WHITE,vyt);z.equals(d._lastColor,b)||(d._lastColor=z.clone(b,d._lastColor),d.color=Jt.toValue(b,d.color),(this.translucent&&d.color[3]===255||!this.translucent&&d.color[3]!==255)&&(this.itemsToRemove[n++]=u))}let p=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=u.distanceDisplayConditionProperty;if(!X.isConstant(m)){let A=X.getValueOrDefault(m,e,wyt,Syt);jt.equals(A,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(A,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(A,d.distanceDisplayCondition))}let y=u.terrainOffsetProperty;if(!X.isConstant(y)){let A=X.getValueOrDefault(y,e,Iyt,Pyt);h.equals(A,d._lastOffset)||(d._lastOffset=h.clone(A,d._lastOffset),d.offset=xr.toValue(A,d.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};k_.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=this.geometry.get(r.id),s=this.attributes.get(o.id.id);l(s)||(s=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,s));let a=r.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=Pn.toValue(a,s.show),o.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};k_.prototype.contains=function(e){return this.updaters.contains(e.id)};k_.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Pt.FAILED:(i.boundingSphere.clone(t),Pt.DONE)};k_.prototype.removeAllPrimitives=function(){let e=this.primitives,t=this.primitive;l(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());let n=this.oldPrimitive;l(n)&&(e.remove(n),this.oldPrimitive=void 0)};function cI(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new kt,this._translucentBatches=new kt}cI.prototype.add=function(e,t){let n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth),r,o;n.attributes.color.value[3]===255?(r=this._solidBatches,o=r.get(i),l(o)||(o=new k_(this._primitives,!1,i,this._shadows),r.set(i,o)),o.add(t,n)):(r=this._translucentBatches,o=r.get(i),l(o)||(o=new k_(this._primitives,!0,i,this._shadows),r.set(i,o)),o.add(t,n))};cI.prototype.remove=function(e){let t,n=this._solidBatches.values,i=n.length;for(t=0;t<i;t++)if(n[t].remove(e))return;let r=this._translucentBatches.values,o=r.length;for(t=0;t<o;t++)if(r[t].remove(e))return};cI.prototype.update=function(e){let t,n,i,r,o=this._solidBatches.values,s=o.length,a=this._translucentBatches.values,c=a.length,u,f=!0,d;do{for(d=!1,n=0;n<s;n++){r=o[n],f=r.update(e),u=r.itemsToRemove;let p=u.length;if(p>0)for(d=!0,t=0;t<p;t++)i=u[t],r.remove(i),this.add(e,i)}for(n=0;n<c;n++){r=a[n],f=r.update(e),u=r.itemsToRemove;let p=u.length;if(p>0)for(d=!0,t=0;t<p;t++)i=u[t],r.remove(i),this.add(e,i)}}while(d);return f};cI.prototype.getBoundingSphere=function(e,t){let n,i=this._solidBatches.values,r=i.length;for(n=0;n<r;n++){let a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}let o=this._translucentBatches.values,s=o.length;for(n=0;n<s;n++){let a=o[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return Pt.FAILED};cI.prototype.removeAllPrimitives=function(){let e,t=this._solidBatches.values,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._translucentBatches.values,r=i.length;for(e=0;e<r;e++)i[e].removeAllPrimitives()};var lI=cI;var Dyt=[];function ef(e,t,n,i){n=n??e.primitives,i=i??e.groundPrimitives,this._scene=e,this._primitives=n,this._groundPrimitives=i,this._entityCollection=void 0,this._addedObjects=new kt,this._removedObjects=new kt,this._changedObjects=new kt;let r=Dn.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(r*2),this._closedColorBatches=new Array(r*2),this._closedMaterialBatches=new Array(r*2),this._openColorBatches=new Array(r*2),this._openMaterialBatches=new Array(r*2);let o=Jr.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=o;let s;for(s=0;s<r;++s)this._outlineBatches[s]=new lI(n,e,s,!1),this._outlineBatches[r+s]=new lI(n,e,s,!0),this._closedColorBatches[s]=new dh(n,yn,void 0,!0,s,!0),this._closedColorBatches[r+s]=new dh(n,yn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new hh(n,Er,void 0,!0,s,!0),this._closedMaterialBatches[r+s]=new hh(n,Er,void 0,!0,s,!1),this._openColorBatches[s]=new dh(n,yn,void 0,!1,s,!0),this._openColorBatches[r+s]=new dh(n,yn,void 0,!1,s,!1),this._openMaterialBatches[s]=new hh(n,Er,void 0,!1,s,!0),this._openMaterialBatches[r+s]=new hh(n,Er,void 0,!1,s,!1);let a=Qn.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(a),u=[];if(o)for(s=0;s<a;++s)u.push(new Yk(i,s,Er)),c[s]=new sI(i,s);else for(s=0;s<a;++s)c[s]=new sI(i,s);this._groundColorBatches=c,this._groundMaterialBatches=u,this._dynamicBatch=new rE(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new kt,this._updaterSets=new kt,this._entityCollection=t,t.collectionChanged.addEventListener(ef.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,Dyt)}ef.registerUpdater=function(e){pE.registerUpdater(e)};ef.unregisterUpdater=function(e){pE.unregisterUpdater(e)};ef.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,r=i.values,o=this._changedObjects,s=o.values,a,c,u,f,d=this;for(a=s.length-1;a>-1;a--)c=s[a],u=c.id,f=this._updaterSets.get(u),f.entity===c?f.forEach(function(y){d._removeUpdater(y),d._insertUpdaterIntoBatch(e,y)}):(r.push(c),n.push(c));for(a=r.length-1;a>-1;a--)c=r[a],u=c.id,f=this._updaterSets.get(u),f.forEach(this._removeUpdater.bind(this)),f.destroy(),this._updaterSets.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)c=n[a],u=c.id,f=new pE(c,this._scene),this._updaterSets.set(u,f),f.forEach(function(y){d._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(u,f.geometryChanged.addEventListener(ef._onGeometryChanged,this));t.removeAll(),i.removeAll(),o.removeAll();let p=!0,g=this._batches,m=g.length;for(a=0;a<m;a++)p=g[a].update(e)&&p;return p};var Ryt=[],Oyt=new ue;ef.prototype.getBoundingSphere=function(e,t){let n=Ryt,i=Oyt,r=0,o,s=this._batches,a=s.length,c=e.id,u=this._updaterSets.get(c).updaters;for(let f=0;f<u.length;f++){let d=u[f];for(let p=0;p<a;p++){if(o=s[p].getBoundingSphere(d,i),o===Pt.PENDING)return Pt.PENDING;o===Pt.DONE&&(n[r]=ue.clone(i,n[r]),r++)}}return r===0?Pt.FAILED:(n.length=r,ue.fromBoundingSpheres(n,t),Pt.DONE)};ef.prototype.isDestroyed=function(){return!1};ef.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ef.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();this._subscriptions.removeAll();let r=this._updaterSets.values;for(n=r.length,e=0;e<n;e++)r[e].destroy();return this._updaterSets.removeAll(),le(this)};ef.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};ef.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic){this._dynamicBatch.add(e,t);return}let n;(t.outlineEnabled||t.fillEnabled)&&(n=t.shadowsProperty.getValue(e));let i=Dn.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(l(t.terrainOffsetProperty)?this._outlineBatches[i+n].add(e,t):this._outlineBatches[n].add(e,t)),t.fillEnabled)if(t.onTerrain){let r=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Kt?this._groundColorBatches[r].add(e,t):this._groundMaterialBatches[r].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Kt?l(t.terrainOffsetProperty)?this._closedColorBatches[i+n].add(e,t):this._closedColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._closedMaterialBatches[i+n].add(e,t):this._closedMaterialBatches[n].add(e,t):t.fillMaterialProperty instanceof Kt?l(t.terrainOffsetProperty)?this._openColorBatches[i+n].add(e,t):this._openColorBatches[n].add(e,t):l(t.terrainOffsetProperty)?this._openMaterialBatches[i+n].add(e,t):this._openMaterialBatches[n].add(e,t)};ef._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,r=i.id;!l(t.get(r))&&!l(n.get(r))&&n.set(r,i)};ef.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,r=this._removedObjects,o=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(r.set(a,c),o.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,r.remove(a)?o.set(a,c):i.set(a,c)};var Xk=ef;var Myt=1,Nyt="30px sans-serif",Lyt=Ao.FILL,Fyt=z.WHITE,Byt=z.BLACK,kyt=1,Uyt=!1,zyt=new z(.165,.165,.165,.8),Vyt=new U(7,5),jyt=U.ZERO,Hyt=h.ZERO,Gyt=We.NONE,Wyt=zi.CENTER,qyt=Hn.CENTER,Yyt=new h,Xyt=new z,Kyt=new z,$yt=new z,Jyt=new U,Zyt=new h,Qyt=new U,eAt=new qt,tAt=new qt,nAt=new qt,iAt=new jt;function LSe(e){this.entity=e,this.label=void 0,this.index=void 0}function tb(e,t){t.collectionChanged.addEventListener(tb.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new kt,this._onCollectionChanged(t,t.values,[],[])}tb.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,r=t.length;i<r;i++){let o=t[i],s=o.entity,a=s._label,c,u=o.label,f=s.isShowing&&s.isAvailable(e)&&X.getValueOrDefault(a._show,e,!0),d;if(f&&(d=X.getValueOrUndefined(s._position,e,Yyt),c=X.getValueOrUndefined(a._text,e),f=l(d)&&l(c)),!f){ste(o,s,n);continue}X.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,g=X.getValueOrDefault(a._heightReference,e,Gyt);l(u)||(u=n.getLabel(s),u.id=s,o.label=u,p=h.equals(u.position,d)&&u.heightReference===g),u.show=!0,u.position=d,u.text=c,u.scale=X.getValueOrDefault(a._scale,e,Myt),u.font=X.getValueOrDefault(a._font,e,Nyt),u.style=X.getValueOrDefault(a._style,e,Lyt),u.fillColor=X.getValueOrDefault(a._fillColor,e,Fyt,Xyt),u.outlineColor=X.getValueOrDefault(a._outlineColor,e,Byt,Kyt),u.outlineWidth=X.getValueOrDefault(a._outlineWidth,e,kyt),u.showBackground=X.getValueOrDefault(a._showBackground,e,Uyt),u.backgroundColor=X.getValueOrDefault(a._backgroundColor,e,zyt,$yt),u.backgroundPadding=X.getValueOrDefault(a._backgroundPadding,e,Vyt,Jyt),u.pixelOffset=X.getValueOrDefault(a._pixelOffset,e,jyt,Qyt),u.eyeOffset=X.getValueOrDefault(a._eyeOffset,e,Hyt,Zyt),u.heightReference=g,u.horizontalOrigin=X.getValueOrDefault(a._horizontalOrigin,e,Wyt),u.verticalOrigin=X.getValueOrDefault(a._verticalOrigin,e,qyt),u.translucencyByDistance=X.getValueOrUndefined(a._translucencyByDistance,e,eAt),u.pixelOffsetScaleByDistance=X.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,tAt),u.scaleByDistance=X.getValueOrUndefined(a._scaleByDistance,e,nAt),u.distanceDisplayCondition=X.getValueOrUndefined(a._distanceDisplayCondition,e,iAt),u.disableDepthTestDistance=X.getValueOrUndefined(a._disableDepthTestDistance,e),p&&u._updateClamping()}return!0};tb.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.label))return Pt.FAILED;let i=n.label;if(i.heightReference===We.NONE)t.center=h.clone(i.position,t.center);else if(i._clampedToSurface)t.center=h.clone(i._clampedPosition,t.center);else{let r=this._cluster._scene,o=this._items,s=jh(r,n,i.position,[i],()=>o.get(e.id)===n);if(s===void 0)return Pt.PENDING;s===null?t.center=h.clone(i.position,t.center):t.center=ag(i.position,s,i.heightReference,r.ellipsoid??ee.default,t.center)}return t.radius=0,Pt.DONE};tb.prototype.isDestroyed=function(){return!1};tb.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(tb.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return le(this)};tb.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s=this._items,a=this._cluster;for(r=t.length-1;r>-1;r--)o=t[r],l(o._label)&&l(o._position)&&s.set(o.id,new LSe(o));for(r=i.length-1;r>-1;r--)o=i[r],l(o._label)&&l(o._position)?s.contains(o.id)||s.set(o.id,new LSe(o)):(ste(s.get(o.id),o,a),s.remove(o.id));for(r=n.length-1;r>-1;r--)o=n[r],ste(s.get(o.id),o,a),s.remove(o.id)};function ste(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var Kk=tb;var rAt=1,oAt=!0,sAt=0,aAt=!0,cAt=!0,lAt=Dn.ENABLED,uAt=We.NONE,fAt=z.RED,dAt=0,hAt=z.WHITE,mAt=ll.HIGHLIGHT,pAt=.5,gAt=new U(1,1),FSe={maximumPositionEpsilon:Number.POSITIVE_INFINITY},_At=new N,yAt=new N,BSe=new z,kSe=new Array(4),AAt=new h;function nb(e,t){t.collectionChanged.addEventListener(nb.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new kt,this._onCollectionChanged(t,t.values,[],[])}function bAt(e,t){return e instanceof li?e.valueOf():X.getValueOrUndefined(e,t)}function xAt(e,t){return t!==e.uri?!1:t instanceof De?t._url===e.uriUrl&&t._queryParameters===e.uriQueryParameters&&t._templateValues===e.uriTemplateValues:!0}function USe(e,t){e.uri=t,t instanceof De&&(e.uriUrl=t._url,e.uriQueryParameters=t._queryParameters,e.uriTemplateValues=t._templateValues)}function TAt(e,t){if(!l(t))return N.clone(e);for(let n=0;n<16;n++)t[n]=e[n];return t}async function EAt(e,t,n,i,r){let o=e._primitives,s=e._modelHash,a=s[t.id],c=()=>!e.isDestroyed()&&s[t.id]===a;try{let u=await jf.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene,environmentMapOptions:r});if(!c()){u.destroy();return}u.id=t,o.add(u),a.modelPrimitive=u,u.errorEvent.addEventListener(f=>{c()&&(console.log(f),f.name!=="TextureError"&&u.incrementallyLoadTextures&&(a.loadFailed=!0))})}catch(u){if(!c())return;console.log(u),a.loadFailed=!0}}nb.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let r=0,o=t.length;r<o;r++){let s=t[r],a=s._model,c,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&X.getValueOrDefault(a._show,e,!0),d,p;if(f&&(d=s.computeModelMatrix(e,_At),p=bAt(a._uri,e),f=l(d)&&l(p)),!f){l(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}if((!l(u)||!xAt(u,p))&&(c=De.createIfNeeded(p),l(u)&&c.url===u.url&&(USe(u,p),c=void 0)),l(c)){l(u?.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[s.id]),u={modelPrimitive:void 0,url:c.url,uri:void 0,uriUrl:void 0,uriQueryParameters:void 0,uriTemplateValues:void 0,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,environmentMapOptionsScratch:{...FSe}},n[s.id]=u,USe(u,p);let y=X.getValueOrDefault(a._incrementallyLoadTextures,e,aAt),A=X.getValueOrDefault(a._environmentMapOptions,e,FSe,u.environmentMapOptionsScratch);EAt(this,s,c,y,A)}let g=u.modelPrimitive;if(!l(g))continue;g.show=!0,g.scale=X.getValueOrDefault(a._scale,e,rAt),g.enableVerticalExaggeration=X.getValueOrDefault(a._enableVerticalExaggeration,e,oAt),g.minimumPixelSize=X.getValueOrDefault(a._minimumPixelSize,e,sAt),g.maximumScale=X.getValueOrUndefined(a._maximumScale,e),g.modelMatrix=TAt(d,g.modelMatrix),g.shadows=X.getValueOrDefault(a._shadows,e,lAt),g.heightReference=X.getValueOrDefault(a._heightReference,e,uAt),g.distanceDisplayCondition=X.getValueOrUndefined(a._distanceDisplayCondition,e),g.silhouetteColor=X.getValueOrDefault(a._silhouetteColor,e,fAt,BSe),g.silhouetteSize=X.getValueOrDefault(a._silhouetteSize,e,dAt),g.color=X.getValueOrDefault(a._color,e,hAt,BSe),g.colorBlendMode=X.getValueOrDefault(a._colorBlendMode,e,mAt),g.colorBlendAmount=X.getValueOrDefault(a._colorBlendAmount,e,pAt),g.clippingPlanes=X.getValueOrUndefined(a._clippingPlanes,e),g.clampAnimations=X.getValueOrDefault(a._clampAnimations,e,cAt),g.imageBasedLighting.imageBasedLightingFactor=X.getValueOrDefault(a._imageBasedLightingFactor,e,gAt);let m=X.getValueOrUndefined(a._lightColor,e);if(l(m)&&(z.pack(m,kSe,0),m=h.unpack(kSe,0,AAt)),g.lightColor=m,g.customShader=X.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,g.ready){let y=X.getValueOrDefault(a._runAnimations,e,!0);u.animationsRunning!==y&&(y?g.activeAnimations.addAll({loop:Hu.REPEAT}):g.activeAnimations.removeAll(),u.animationsRunning=y);let A=X.getValueOrUndefined(a._nodeTransformations,e,u.nodeTransformationsScratch);if(l(A)){let T=Object.keys(A);for(let E=0,v=T.length;E<v;++E){let S=T[E],I=A[S];if(!l(I))continue;let R=g.getNode(S);if(!l(R))continue;let O=N.fromTranslationRotationScale(I,yAt);R.matrix=N.multiply(R.originalMatrix,O,O)}}let b=!1,x=X.getValueOrUndefined(a._articulations,e,u.articulationsScratch);if(l(x)){let T=Object.keys(x);for(let E=0,v=T.length;E<v;++E){let S=T[E],I=x[S];l(I)&&(b=!0,g.setArticulationStage(S,I))}}b&&g.applyArticulations()}}return!0};nb.prototype.isDestroyed=function(){return!1};nb.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(nb.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)ate(this,e[i],t,n);return le(this)};var $k=new h,CAt=new he;nb.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return Pt.FAILED;if(n.loadFailed)return Pt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return Pt.PENDING;if(!i.ready||!n.modelUpdated)return Pt.PENDING;let r=this._scene,o=r.ellipsoid??ee.default;if(i.heightReference!==We.NONE){let a=i.modelMatrix;$k.x=a[12],$k.y=a[13],$k.z=a[14];let c=o.cartesianToCartographic($k,CAt),u=r.getHeight(c,i.heightReference);if(l(u)||(u=i._lastSurfaceHeight),!l(u)){let f=this._modelHash,d=jh(r,n,$k,[i],()=>f[e.id]===n);if(d===void 0)return Pt.PENDING;d!==null&&(u=d)}return l(u)&&(i.heightReference===We.CLIP_TO_GROUND?c.height<u&&(c.height=u):_s(i.heightReference)?c.height=u:c.height+=u),ue.clone(i.boundingSphere,t),t.center=o.cartographicToCartesian(c),Pt.DONE}return ue.clone(i.boundingSphere,t),Pt.DONE};nb.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s=this._entitiesToVisualize,a=this._modelHash,c=this._primitives;for(r=t.length-1;r>-1;r--)o=t[r],l(o._model)&&l(o._position)&&s.set(o.id,o);for(r=i.length-1;r>-1;r--)o=i[r],l(o._model)&&l(o._position)?(vAt(o,a),s.set(o.id,o)):(ate(this,o,a,c),s.remove(o.id));for(r=n.length-1;r>-1;r--)o=n[r],ate(this,o,a,c),s.remove(o.id)};function ate(e,t,n,i){let r=n[t.id];l(r)&&(i.removeAndDestroy(r.modelPrimitive),delete n[t.id])}function vAt(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var Jk=nb;function ib(e){this._definitionChanged=new be,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(ib.prototype,{isConstant:{get:function(){return X.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:ji.FIXED}}});var SAt=new K;ib.prototype.getValue=function(e,t){return l(e)||(e=K.now(SAt)),this.getValueInReferenceFrame(e,ji.FIXED,t)};ib.prototype.setValue=function(e){this._value!==e&&(this._value=e,l(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),l(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))};ib.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?ee.default.scaleToGeodeticSurface(n,n):void 0};ib.prototype.equals=function(e){return this===e||e instanceof ib&&this._value===e._value};ib.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var m0=ib;var zSe=new $,VSe=new $,jSe=new $,wAt=new h,HSe=new h,IAt=new h,PAt=new h,WG=new Le,qG=new N,YG=new $;function Qk(e,t,n,i,r){if(!(!l(t)||!l(n))){if(h.subtract(t,n,r),l(i.orientation))i.orientation.getValue(e,WG)&&(Le.conjugate(WG,WG),$.fromQuaternion(WG,YG),$.multiplyByVector(YG,r,r));else if(l(ute(e,i.position,qG)))N.inverse(qG,qG),N.getRotation(qG,YG),$.multiplyByVector(YG,r,r);else return;return r}}function ute(e,t,n){let i=t.getValue(e,wAt);if(l(i)){let r=K.addSeconds(e,.01,new K),o=t.getValue(r,HSe);if(l(o)&&!h.equalsEpsilon(i,o,D.EPSILON16)){let s=At.computeFixedToIcrfMatrix(e,zSe),a=At.computeFixedToIcrfMatrix(r,VSe),c;!l(s)||!l(a)?(c=At.computeTemeToPseudoFixedMatrix(e,jSe),s=$.transpose(c,zSe),a=At.computeTemeToPseudoFixedMatrix(r,VSe),$.transpose(a,a)):c=$.transpose(s,jSe);let u=IAt;h.normalize(i,u),h.normalize(o,o),$.multiplyByVector(s,u,u),$.multiplyByVector(a,o,o);let f=h.cross(u,o,PAt);if(!h.equalsEpsilon(f,h.ZERO,D.EPSILON16)){let d=h.cross(f,u,HSe);return $.multiplyByVector(c,d,d),$.multiplyByVector(c,f,f),$.multiplyByVector(c,u,u),h.normalize(d,d),h.normalize(f,f),h.normalize(u,u),l(n)||(n=new N),n[0]=d.x,n[1]=d.y,n[2]=d.z,n[3]=0,n[4]=f.x,n[5]=f.y,n[6]=f.z,n[7]=0,n[8]=u.x,n[9]=u.y,n[10]=u.z,n[11]=0,n[12]=i.x,n[13]=i.y,n[14]=i.z,n[15]=1,n}}}}var GSe=60,$Se=1,JSe=new En,cte=new En,lte=new En;function WSe(e){this.entity=e,this.polyline=void 0,this.segmentPolylines=[],this.index=void 0,this.updater=void 0}var XG=new h;function DAt(e,t,n,i,r,o,s,a,c){let u,f,d=!1;o instanceof Jr&&(u=o,f=u.position,o=ji.FIXED,d=!0);let p=a,g,m;g=e.getValueInReferenceFrame(t,o,c[p]),d?(m=f.getValueInReferenceFrame(t,o,XG),g=Qk(t,g,m,u,g),l(g)&&(c[p++]=g)):l(g)&&(c[p++]=g);let y=!l(r)||K.lessThanOrEquals(r,t)||K.greaterThanOrEquals(r,n),A=0,b=i.length,x=i[A],T=n,E=!1,v,S,I;for(;A<b;){if(!y&&K.greaterThanOrEquals(x,r)&&(g=e.getValueInReferenceFrame(r,o,c[p]),d?(m=f.getValueInReferenceFrame(r,o,XG),l(g)&&l(m)&&(g=Qk(r,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g),y=!0),K.greaterThan(x,t)&&K.lessThan(x,T)&&!x.equals(r)&&(g=e.getValueInReferenceFrame(x,o,c[p]),d?(m=f.getValueInReferenceFrame(x,o,XG),l(g)&&l(m)&&(g=Qk(x,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g)),A<b-1){if(s>0&&!E){let R=i[A+1],O=K.secondsDifference(R,x);E=O>s,E&&(v=Math.ceil(O/s),S=0,I=O/Math.max(v,2),v=Math.max(v-1,1))}if(E&&S<v){x=K.addSeconds(x,I,new K),S++;continue}}E=!1,A++,x=i[A]}return g=e.getValueInReferenceFrame(n,o,c[p]),d?(m=f.getValueInReferenceFrame(n,o,XG),l(g)&&l(m)&&(g=Qk(n,g,m,u,g),l(g)&&(c[p++]=g))):l(g)&&(c[p++]=g),p}function RAt(e,t,n,i,r,o,s,a){let c,u=0,f=s,d=t,p=!l(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(d,n);)!p&&K.greaterThanOrEquals(d,i)&&(p=!0,c=e.getValueInReferenceFrame(i,r,a[f]),l(c)&&(a[f]=c,f++)),c=e.getValueInReferenceFrame(d,r,a[f]),l(c)&&(a[f]=c,f++),u++,d=K.addSeconds(t,o*u,new K);return c=e.getValueInReferenceFrame(n,r,a[f]),l(c)&&(a[f]=c,f++),f}function OAt(e,t,n,i,r,o,s,a){let c,u=0,f=s,d=t,p=Math.max(o,60),g=!l(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(d,n);)!g&&K.greaterThanOrEquals(d,i)&&(g=!0,c=e.getValueInReferenceFrame(i,r,a[f]),l(c)&&(a[f]=c,f++)),c=e.getValueInReferenceFrame(d,r,a[f]),l(c)&&(a[f]=c,f++),u++,d=K.addSeconds(t,p*u,new K);return c=e.getValueInReferenceFrame(n,r,a[f]),l(c)&&(a[f]=c,f++),f}function MAt(e,t,n,i,r,o,s,a){lte.start=t,lte.stop=n;let c=s,u=e.intervals;for(let f=0;f<u.length;f++){let d=u.get(f);if(!En.intersect(d,lte,JSe).isEmpty){let p=d.start;d.isStartIncluded||(d.isStopIncluded?p=d.stop:p=K.addSeconds(d.start,K.secondsDifference(d.stop,d.start)/2,new K));let g=e.getValueInReferenceFrame(p,r,a[c]);l(g)&&(a[c]=g,c++)}}return c}function NAt(e,t,n,i,r,o,s,a){let c=e.getValueInReferenceFrame(t,r,a[s]);return l(c)&&(a[s++]=c),s}function LAt(e,t,n,i,r,o,s,a){cte.start=t,cte.stop=n;let c=s,u=e.intervals;for(let f=0;f<u.length;f++){let d=u.get(f);if(!En.intersect(d,cte,JSe).isEmpty){let p=d.start,g=d.stop,m=t;K.greaterThan(p,m)&&(m=p);let y=n;K.lessThan(g,y)&&(y=g),c=ZSe(d.data,m,y,i,r,o,c,a)}}return c}function ZSe(e,t,n,i,r,o,s,a){for(;e instanceof D_;)e=e.resolvedProperty;if(e instanceof gc){let c=e._property._times;s=DAt(e,t,n,c,i,r,o,s,a)}else e instanceof LM?s=RAt(e,t,n,i,r,o,s,a):e instanceof mc?s=LAt(e,t,n,i,r,o,s,a):e instanceof R_?s=MAt(e,t,n,i,r,o,s,a):e instanceof Gl||e instanceof m0&&X.isConstant(e)?s=NAt(e,t,n,i,r,o,s,a):s=OAt(e,t,n,i,r,o,s,a);return s}function fte(e,t,n,i,r,o,s){l(s)||(s=[]);let a=ZSe(e,t,n,i,r,o,0,s);return s.length=a,s}var qSe=new $,YSe=new Le,XSe=new $,Zk=new En,KG=new En,yE=new En;function FAt(e){let t=[];if(!l(e))return t;for(let n in e){if(n[0]!=="_"||n==="_definitionChanged"||n.endsWith("Subscription"))continue;let i=e[n];l(i)&&typeof i.getValue=="function"&&!X.isConstant(i)&&t.push(i)}return t}function KSe(e,t,n,i,r,o,s,a,c,u,f){e.sort(K.compare),e=Fr(e,K.equalsEpsilon);let d=f;for(let p=0;p<e.length-1;p++){let g=e[p],m=e[p+1];if(!K.lessThan(g,m))continue;let y=K.addSeconds(g,K.secondsDifference(m,g)/2,new K),A=fte(t,g,m,n,c,a,[]);if(A.length<2)continue;let b=o.segmentPolylines[d];l(b)||(b=s.add(),b.id=r,o.segmentPolylines[d]=b),b.show=!0,b.positions=A,b.material=_o.getValue(y,u,b.material),b.width=X.getValueOrDefault(i._width,n,$Se),d++}return d}function e3(e,t){this._unusedIndexes=[],this._polylineCollection=new Em,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}e3.prototype.update=function(e){let t=this._referenceFrame;if(t===ji.INERTIAL){let n=At.computeIcrfToFixedMatrix(e,qSe);l(n)||(n=At.computeTemeToPseudoFixedMatrix(e,qSe)),N.fromRotationTranslation(n,h.ZERO,this._polylineCollection.modelMatrix)}else if(t instanceof Jr){let n=t.position.getValue(e);l(t.orientation)?l(t.orientation.getValue(e,YSe))&&($.fromQuaternion(YSe,XSe),N.fromRotationTranslation(XSe,n,this._polylineCollection.modelMatrix)):ute(e,t.position,this._polylineCollection.modelMatrix)}};e3.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,r=n._position,o,s,a=i._show,c=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!l(a)||a.getValue(e));if(u){let m=X.getValueOrUndefined(i._leadTime,e),y=X.getValueOrUndefined(i._trailTime,e),A=n._availability,b=l(A),x=l(m),T=l(y);if(u=b||x&&T,u){if(T&&(o=K.addSeconds(e,-y,new K)),x&&(s=K.addSeconds(e,m,new K)),b){let E=A.start,v=A.stop;(!T||K.greaterThan(E,o))&&(o=E),(!x||K.lessThan(v,s))&&(s=v)}u=K.lessThan(o,s)}}if(!u){l(c)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,c.show=!1,t.index=void 0);for(let m=0;m<t.segmentPolylines.length;m++)t.segmentPolylines[m].show=!1;return}if(!l(c)){let m=this._unusedIndexes;if(m.length>0){let A=m.pop();c=this._polylineCollection.get(A),t.index=A}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let f=X.getValueOrDefault(i._resolution,e,GSe),d=fte(r,o,s,e,this._referenceFrame,f,c.positions.slice());if(d.length<2){c.show=!1;for(let m=0;m<t.segmentPolylines.length;m++)t.segmentPolylines[m].show=!1;return}c.show=!0,c.positions=d,c.material=_o.getValue(e,i.material,c.material);let p=X.getValueOrUndefined(i.materialMode,e),g=i.material;if(p===a0.PORTIONS&&!g.isConstant){l(c)&&(c.show=!1);let m=f>0?f:GSe,y=g.intervals,A=0;if(l(y)){Zk.start=o,Zk.stop=s,Zk.isStartIncluded=!0,Zk.isStopIncluded=!0;for(let b=0;b<y.length;b++){let x=y.get(b);if(!En.intersect(x,Zk,KG))continue;let T=KG.start,E=KG.stop;if(K.greaterThanOrEquals(T,E))continue;let v=FAt(x.data),S=[K.clone(T),K.clone(E)];for(let I=0;I<v.length;I++){let R=v[I],O=R.intervals;if(l(O))for(let L=0;L<O.length;L++){let _=O.get(L);En.intersect(_,KG,yE)&&(K.greaterThan(yE.start,T)&&K.lessThan(yE.start,E)&&S.push(K.clone(yE.start)),K.greaterThan(yE.stop,T)&&K.lessThan(yE.stop,E)&&S.push(K.clone(yE.stop)))}else if(!X.isConstant(R)){let L=K.clone(T);for(;K.lessThan(L,E);)S.push(K.clone(L)),L=K.addSeconds(L,m,new K)}}A=KSe(S,r,e,i,n,t,this._polylineCollection,m,this._referenceFrame,x.data,A)}}else{let b=[K.clone(o),K.clone(s)],x=K.addSeconds(o,m,new K);for(;K.lessThan(x,s);)b.push(K.clone(x)),x=K.addSeconds(x,m,new K);A=KSe(b,r,e,i,n,t,this._polylineCollection,m,this._referenceFrame,i.material,A)}for(let b=A;b<t.segmentPolylines.length;b++)l(t.segmentPolylines[b])&&(t.segmentPolylines[b].show=!1)}else for(let m=0;m<t.segmentPolylines.length;m++)t.segmentPolylines[m].show=!1;c.width=X.getValueOrDefault(i._width,e,$Se),c.distanceDisplayCondition=X.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};e3.prototype.removeObject=function(e){let t=e.polyline;l(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0);for(let n=0;n<e.segmentPolylines.length;n++)e.segmentPolylines[n].show=!1;e.segmentPolylines.length=0};e3.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),le(this)};function p0(e,t){t.collectionChanged.addEventListener(p0.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new kt,this._onCollectionChanged(t,t.values,[],[])}p0.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,r=n.length;i<r;i++){let o=n[i],s=o.entity,a=s._position,c=s._path,u=o.updater,f=!1,d=ji.FIXED,p=d.toString();if(this._scene.mode===re.SCENE3D){let m=X.getValueOrUndefined(c.relativeTo,e);l(m)?m==="FIXED"?(d=ji.FIXED,p=d.toString()):m==="INERTIAL"?(d=ji.INERTIAL,p=d.toString()):(f=!0,d=this._entityCollection.getById(m),p=m):(d=a.referenceFrame,p=d.toString())}let g=this._updaters[p];if(u===g&&l(g)){g.updateObject(e,o);continue}l(u)&&u.removeObject(o),!(f&&!l(d))&&(l(g)||(g=new e3(this._scene,d),g.update(e),this._updaters[p]=g),o.updater=g,l(g)&&g.updateObject(e,o))}return!0};p0.prototype.isDestroyed=function(){return!1};p0.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(p0.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return le(this)};p0.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s,a=this._items;for(r=t.length-1;r>-1;r--)o=t[r],l(o._path)&&l(o._position)&&a.set(o.id,new WSe(o));for(r=i.length-1;r>-1;r--)o=i[r],l(o._path)&&l(o._position)?a.contains(o.id)||a.set(o.id,new WSe(o)):(s=a.get(o.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(o.id)));for(r=n.length-1;r>-1;r--)o=n[r],s=a.get(o.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(o.id))};p0._subSample=fte;p0._computeVvlhTransform=ute;p0._transformToEntityFrame=Qk;var t3=p0;var QSe=z.WHITE,ewe=z.BLACK,twe=0,nwe=1,iwe=0,rwe=Vo.NONE,owe=new z,BAt=new h,swe=new z,awe=new qt,cwe=new qt,lwe=new jt;function uwe(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function rb(e,t){t.collectionChanged.addEventListener(rb.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new kt,this._onCollectionChanged(t,t.values,[],[])}rb.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,r=t.length;i<r;i++){let o=t[i],s=o.entity,a=s._point,c=o.pointPrimitive,u=o.billboard,f=X.getValueOrDefault(a._heightReference,e,We.NONE),d=s.isShowing&&s.isAvailable(e)&&X.getValueOrDefault(a._show,e,!0),p;if(d&&(p=X.getValueOrUndefined(s._position,e,BAt),d=l(p)),!d){n3(o,s,n);continue}X.isConstant(s._position)||(n._clusterDirty=!0);let g=!1,m=!1;if(f!==We.NONE&&!l(u)?(l(c)&&(n3(o,s,n),c=void 0),u=n.getBillboard(s),u.id=s,u.image=void 0,o.billboard=u,g=!0,m=h.equals(u.position,p)&&u.heightReference===f):f===We.NONE&&!l(c)&&(l(u)&&(n3(o,s,n),u=void 0),c=n.getPoint(s),c.id=s,o.pointPrimitive=c),l(c))c.show=!0,c.position=p,c.scaleByDistance=X.getValueOrUndefined(a._scaleByDistance,e,awe),c.translucencyByDistance=X.getValueOrUndefined(a._translucencyByDistance,e,cwe),c.color=X.getValueOrDefault(a._color,e,QSe,owe),c.outlineColor=X.getValueOrDefault(a._outlineColor,e,ewe,swe),c.outlineWidth=X.getValueOrDefault(a._outlineWidth,e,twe),c.pixelSize=X.getValueOrDefault(a._pixelSize,e,nwe),c.distanceDisplayCondition=X.getValueOrUndefined(a._distanceDisplayCondition,e,lwe),c.disableDepthTestDistance=X.getValueOrDefault(a._disableDepthTestDistance,e,iwe),c.splitDirection=X.getValueOrDefault(a._splitDirection,e,rwe);else if(l(u)){u.show=!0,u.position=p,u.scaleByDistance=X.getValueOrUndefined(a._scaleByDistance,e,awe),u.translucencyByDistance=X.getValueOrUndefined(a._translucencyByDistance,e,cwe),u.distanceDisplayCondition=X.getValueOrUndefined(a._distanceDisplayCondition,e,lwe),u.disableDepthTestDistance=X.getValueOrDefault(a._disableDepthTestDistance,e,iwe),u.splitDirection=X.getValueOrDefault(a._splitDirection,e,rwe),u.heightReference=f;let y=X.getValueOrDefault(a._color,e,QSe,owe),A=X.getValueOrDefault(a._outlineColor,e,ewe,swe),b=Math.round(X.getValueOrDefault(a._outlineWidth,e,twe)),x=Math.max(1,Math.round(X.getValueOrDefault(a._pixelSize,e,nwe)));if(b>0?(u.scale=1,g=g||b!==o.outlineWidth||x!==o.pixelSize||!z.equals(y,o.color)||!z.equals(A,o.outlineColor)):(u.scale=x/50,x=50,g=g||b!==o.outlineWidth||!z.equals(y,o.color)||!z.equals(A,o.outlineColor)),g){o.color=z.clone(y,o.color),o.outlineColor=z.clone(A,o.outlineColor),o.pixelSize=x,o.outlineWidth=b;let T=y.alpha,E=y.toCssColorString(),v=A.toCssColorString(),S=JSON.stringify([E,x,v,b]);u.setImage(S,wT(T,E,v,b,x))}m&&u._updateClamping()}}return!0};rb.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return Pt.FAILED;if(l(n.pointPrimitive))t.center=h.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(i._clampedToSurface)t.center=h.clone(i._clampedPosition,t.center);else{let r=this._cluster._scene,o=this._items,s=jh(r,n,i.position,[i],()=>o.get(e.id)===n);if(s===void 0)return Pt.PENDING;s===null?t.center=h.clone(i.position,t.center):t.center=ag(i.position,s,i.heightReference,r.ellipsoid??ee.default,t.center)}}return t.radius=0,Pt.DONE};rb.prototype.isDestroyed=function(){return!1};rb.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(rb.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return le(this)};rb.prototype._onCollectionChanged=function(e,t,n,i){let r,o,s=this._items,a=this._cluster;for(r=t.length-1;r>-1;r--)o=t[r],l(o._point)&&l(o._position)&&s.set(o.id,new uwe(o));for(r=i.length-1;r>-1;r--)o=i[r],l(o._point)&&l(o._position)?s.contains(o.id)||s.set(o.id,new uwe(o)):(n3(s.get(o.id),o,a),s.remove(o.id));for(r=n.length-1;r>-1;r--)o=n[r],n3(s.get(o.id),o,a),s.remove(o.id)};function n3(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let r=e.billboard;l(r)&&(e.billboard=void 0,n.removeBillboard(t))}}var i3=rb;var pwe=[];function kAt(e,t,n,i,r){let o=pwe;o.length=r;let s,a=n.red,c=n.green,u=n.blue,f=n.alpha,d=i.red,p=i.green,g=i.blue,m=i.alpha;if(z.equals(n,i)){for(s=0;s<r;s++)o[s]=z.clone(n);return o}let y=(d-a)/r,A=(p-c)/r,b=(g-u)/r,x=(m-f)/r;for(s=0;s<r;s++)o[s]=new z(a+s*y,c+s*A,u+s*b,f+s*x);return o}function r3(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.width??1,r=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=r,this._vertexFormat=Be.clone(e.vertexFormat??Be.DEFAULT),this._arcType=e.arcType??ln.GEODESIC,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=ee.clone(e.ellipsoid??ee.default),this._workerName="createPolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*z.packedLength:1,this.packedLength=o+ee.packedLength+Be.packedLength+4}r3.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._colors;for(o=l(s)?s.length:0,t[n++]=o,i=0;i<o;++i,n+=z.packedLength)z.pack(s[i],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var gwe=ee.clone(ee.UNIT_SPHERE),_we=new Be,AE={positions:void 0,colors:void 0,ellipsoid:gwe,vertexFormat:_we,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};r3.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s=r>0?new Array(r):void 0;for(i=0;i<r;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=ee.unpack(e,t,gwe);t+=ee.packedLength;let c=Be.unpack(e,t,_we);t+=Be.packedLength;let u=e[t++],f=e[t++]===1,d=e[t++],p=e[t];return l(n)?(n._positions=o,n._colors=s,n._ellipsoid=ee.clone(a,n._ellipsoid),n._vertexFormat=Be.clone(c,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=d,n._granularity=p,n):(AE.positions=o,AE.colors=s,AE.width=u,AE.colorsPerVertex=f,AE.arcType=d,AE.granularity=p,new r3(AE))};var fwe=new h,dwe=new h,hwe=new h,mwe=new h;r3.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,r=e._colorsPerVertex,o=e._arcType,s=e._granularity,a=e._ellipsoid,c,u,f,d=[],p=Fr(e._positions,h.equalsEpsilon,!1,d);if(l(i)&&d.length>0){let M=0,F=d[0];i=i.filter(function(V,B){let j;return r?j=B===F||B===0&&F===1:j=B+1===F,j?(M++,F=d[M],!1):!0})}let g=p.length;if(g<2||t<=0)return;if(o===ln.GEODESIC||o===ln.RHUMB){let M,F;o===ln.GEODESIC?(M=D.chordLength(s,a.maximumRadius),F=ir.numberOfPoints):(M=s,F=ir.numberOfPointsRhumbLine);let V=ir.extractHeights(p,a);if(l(i)){let B=1;for(c=0;c<g-1;++c)B+=F(p[c],p[c+1],M);let j=new Array(B),k=0;for(c=0;c<g-1;++c){let G=p[c],q=p[c+1],Q=i[c],W=F(G,q,M);if(r&&c<B){let J=i[c+1],Z=kAt(G,q,Q,J,W),ae=Z.length;for(u=0;u<ae;++u)j[k++]=Z[u]}else for(u=0;u<W;++u)j[k++]=z.clone(Q)}j[k]=z.clone(i[i.length-1]),i=j,pwe.length=0}o===ln.GEODESIC?p=ir.generateCartesianArc({positions:p,minDistance:M,ellipsoid:a,height:V}):p=ir.generateCartesianRhumbArc({positions:p,granularity:M,ellipsoid:a,height:V})}g=p.length;let m=g*4-4,y=new Float64Array(m*3),A=new Float64Array(m*3),b=new Float64Array(m*3),x=new Float32Array(m*2),T=n.st?new Float32Array(m*2):void 0,E=l(i)?new Uint8Array(m*4):void 0,v=0,S=0,I=0,R=0,O;for(u=0;u<g;++u){u===0?(O=fwe,h.subtract(p[0],p[1],O),h.add(p[0],O,O)):O=p[u-1],h.clone(O,hwe),h.clone(p[u],dwe),u===g-1?(O=fwe,h.subtract(p[g-1],p[g-2],O),h.add(p[g-1],O,O)):O=p[u+1],h.clone(O,mwe);let M,F;l(E)&&(u!==0&&!r?M=i[u-1]:M=i[u],u!==g-1&&(F=i[u]));let V=u===0?2:0,B=u===g-1?2:4;for(f=V;f<B;++f){h.pack(dwe,y,v),h.pack(hwe,A,v),h.pack(mwe,b,v),v+=3;let j=f-2<0?-1:1;if(x[S++]=2*(f%2)-1,x[S++]=j*t,n.st&&(T[I++]=u/(g-1),T[I++]=Math.max(x[S-2],0)),l(E)){let k=f<2?M:F;E[R++]=z.floatToByte(k.red),E[R++]=z.floatToByte(k.green),E[R++]=z.floatToByte(k.blue),E[R++]=z.floatToByte(k.alpha)}}}let L=new Tn;L.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:y}),L.prevPosition=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:A}),L.nextPosition=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:b}),L.expandAndWidth=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:x}),n.st&&(L.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:T})),l(E)&&(L.color=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,values:E,normalize:!0}));let _=je.createTypedArray(m,g*6-6),C=0,w=0,P=g-1;for(u=0;u<P;++u)_[w++]=C,_[w++]=C+2,_[w++]=C+1,_[w++]=C+1,_[w++]=C+2,_[w++]=C+3,C+=4;return new St({attributes:L,indices:_,primitiveType:Oe.TRIANGLES,boundingSphere:ue.fromPoints(p),geometryType:Sd.POLYLINES})};var U_=r3;var UAt=new li(0),$G={},ywe=new z,zAt=new Kt(z.WHITE),VAt=new li(!0),jAt=new li(Dn.DISABLED),HAt=new li(new jt),GAt=new li(Qn.BOTH);function WAt(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function qAt(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function jm(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(jm.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new be,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new WAt,this._groundGeometryOptions=new qAt,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Jr.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(jm.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!l(this._entity.availability)&&X.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}});jm.prototype.isOutlineVisible=function(e){return!1};jm.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};jm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Pn(n&&t.isShowing&&this._showProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),o=Kn.fromDistanceDisplayCondition(r),s={show:i,distanceDisplayCondition:o},a;return this._materialProperty instanceof Kt&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,ywe)),l(a)||(a=z.WHITE),s.color=Jt.fromColor(a)),this.clampToGround?new Ft({id:t,geometry:new vx(this._groundGeometryOptions),attributes:s}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Kt&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,ywe)),l(a)||(a=z.WHITE),s.depthFailColor=Jt.fromColor(a)),new Ft({id:t,geometry:new U_(this._geometryOptions),attributes:s}))};jm.prototype.createOutlineGeometryInstance=function(e){};jm.prototype.isDestroyed=function(){return!1};jm.prototype.destroy=function(){this._entitySubscription(),le(this)};jm.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let r=this._entity.polyline;if(!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let o=r.positions,s=r.show;if(l(s)&&s.isConstant&&!s.getValue(tt.MINIMUM_VALUE)||!l(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=r.zIndex,c=r.material??zAt,u=c instanceof Kt;this._materialProperty=c,this._depthFailMaterialProperty=r.depthFailMaterial,this._showProperty=s??VAt,this._shadowsProperty=r.shadows??jAt,this._distanceDisplayConditionProperty=r.distanceDisplayCondition??HAt,this._classificationTypeProperty=r.classificationType??GAt,this._fillEnabled=!0,this._zIndex=a??UAt;let f=r.width,d=r.arcType,p=r.clampToGround,g=r.granularity;if(!o.isConstant||!X.isConstant(f)||!X.isConstant(d)||!X.isConstant(g)||!X.isConstant(p)||!X.isConstant(a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let m=this._geometryOptions,y=o.getValue(tt.MINIMUM_VALUE,m.positions);if(!l(y)||y.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let A;u&&(!l(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Kt)?A=js.VERTEX_FORMAT:A=cc.VERTEX_FORMAT,m.vertexFormat=A,m.positions=y,m.width=l(f)?f.getValue(tt.MINIMUM_VALUE):void 0,m.arcType=l(d)?d.getValue(tt.MINIMUM_VALUE):void 0,m.granularity=l(g)?g.getValue(tt.MINIMUM_VALUE):void 0;let b=this._groundGeometryOptions;b.positions=y,b.width=m.width,b.arcType=m.arcType,b.granularity=m.granularity,this._clampToGround=l(p)?p.getValue(tt.MINIMUM_VALUE):!1,!this._clampToGround&&l(a)&&_t("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};jm.prototype.createDynamicUpdater=function(e,t){return new o3(e,t,this)};var uI={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function o3(e,t,n){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=n,this._positions=[]}function Awe(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=$G[n];!l(i)||i.isDestroyed()?(i=new Em,$G[n]=i,t.add(i)):t.contains(i)||t.add(i);let r=i.add();return r.id=e._geometryUpdater._entity,e._line=r,r}o3.prototype.update=function(e){let t=this._geometryUpdater,n=t._entity,i=n.polyline,r=i.positions,o=X.getValueOrUndefined(r,e,this._positions);t._clampToGround=X.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=X.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=X.getValueOrDefault(i._arcType,e,ln.GEODESIC),t._groundGeometryOptions.granularity=X.getValueOrDefault(i._granularity,e,9999);let s=this._groundPrimitives;if(l(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!X.getValueOrDefault(i._show,e,!0)||!l(o)||o.length<2)return;let d=t.fillMaterialProperty,p;if(d instanceof Kt)p=new js;else{let g=_o.getValue(e,d,this._material);p=new cc({material:g,translucent:g.isTranslucent()}),this._material=g}this._groundPolylinePrimitive=s.add(new Kh({geometryInstances:t.createFillGeometryInstance(e),appearance:p,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),X.getValueOrUndefined(t.zIndex,e)),l(this._line)&&(this._line.show=!1);return}let a=Awe(this);if(!n.isShowing||!n.isAvailable(e)||!X.getValueOrDefault(i._show,e,!0)){a.show=!1;return}if(!l(o)||o.length<2){a.show=!1;return}let c=ln.GEODESIC;c=X.getValueOrDefault(i._arcType,e,c);let u=t._scene.globe,f=t._scene.ellipsoid;c!==ln.NONE&&l(u)&&(uI.ellipsoid=f,uI.positions=o,uI.granularity=X.getValueOrUndefined(i._granularity,e),uI.height=ir.extractHeights(o,f),c===ln.GEODESIC?o=ir.generateCartesianArc(uI):o=ir.generateCartesianRhumbArc(uI)),a.show=!0,a.positions=o.slice(),a.material=_o.getValue(e,t.fillMaterialProperty,a.material),a.width=X.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=X.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};o3.prototype.getBoundingSphere=function(e){if(this._geometryUpdater.clampToGround){let t=this._groundPolylinePrimitive;if(l(t)&&t.show&&t.ready){let n=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(l(n)&&l(n.boundingSphere))return ue.clone(n.boundingSphere,e),Pt.DONE}return l(t)&&!t.ready?Pt.PENDING:Pt.DONE}else{let t=Awe(this);if(t.show&&t.positions.length>0)return ue.fromPoints(t.positions,e),Pt.DONE}return Pt.FAILED};o3.prototype.isDestroyed=function(){return!1};o3.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=$G[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete $G[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),le(this)};var s3=jm;var YAt=new z,XAt=new jt,KAt=new jt;function Hm(e,t,n,i,r){let o;n instanceof Kt?o=js:o=cc,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=n,this.updaters=new kt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new kt,this.material=void 0,this.updatersWithAttributes=new kt,this.attributes=new kt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Hm.prototype.onMaterialChanged,this),this.subscriptions=new kt,this.showsUpdated=new kt,this.zIndex=i,this._asynchronous=r}Hm.prototype.onMaterialChanged=function(){this.invalidated=!0};Hm.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Kt&&t instanceof Kt?!0:l(t)&&t.equals(n)};Hm.prototype.add=function(e,t,n){let i=t.id;if(this.updaters.set(i,t),this.geometry.set(i,n),!t.hasConstantFill||!t.fillMaterialProperty.isConstant||!X.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let r=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(o,s,a,c){s==="isShowing"&&r.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Hm.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Hm.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,r=this.geometry.values,o;if(this.createPrimitive){if(r.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n);let a=this.appearanceType;n=new Kh({show:!1,asynchronous:this._asynchronous,geometryInstances:r.slice(),appearance:new a,classificationType:this.classificationType}),this.appearanceType===cc&&(this.material=_o.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),i.add(n,this.zIndex),t=!1}else{l(n)&&(i.remove(n),n=void 0);let a=this.oldPrimitive;l(a)&&(i.remove(a),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(l(n)&&n.ready){n.show=!0,l(this.oldPrimitive)&&(i.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===cc&&(this.material=_o.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(o=0;o<a;o++){let c=s[o],u=c.entity,f=this.geometry.get(c.id),d=this.attributes.get(f.id.id);if(l(d)||(d=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,d)),!c.fillMaterialProperty.isConstant){let y=c.fillMaterialProperty.color,A=X.getValueOrDefault(y,e,z.WHITE,YAt);z.equals(d._lastColor,A)||(d._lastColor=z.clone(A,d._lastColor),d.color=Jt.toValue(A,d.color))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=d.show[0]===1;p!==g&&(d.show=Pn.toValue(p,d.show));let m=c.distanceDisplayConditionProperty;if(!X.isConstant(m)){let y=X.getValueOrDefault(m,e,KAt,XAt);jt.equals(y,d._lastDistanceDisplayCondition)||(d._lastDistanceDisplayCondition=jt.clone(y,d._lastDistanceDisplayCondition),d.distanceDisplayCondition=Kn.toValue(y,d.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Hm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let r=t[i],o=r.entity,s=this.geometry.get(r.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=o.isShowing,u=a.show[0]===1;c!==u&&(a.show=Pn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Hm.prototype.contains=function(e){return this.updaters.contains(e.id)};Hm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return Pt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?Pt.FAILED:(i.boundingSphere.clone(t),Pt.DONE)};Hm.prototype.destroy=function(){let e=this.primitive,t=this.orderedGroundPrimitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function fI(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}fI.prototype.add=function(e,t){let n=this._items,i=n.length,r=t.createFillGeometryInstance(e),o=X.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){let c=n[a];if(c.isMaterial(t)&&c.zIndex===o){c.add(e,t,r);return}}let s=new Hm(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,o,this._asynchronous);s.add(e,t,r),n.push(s)};fI.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let r=t[i];if(r.remove(e)){r.updaters.length===0&&(t.splice(i,1),r.destroy());break}}};fI.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let o=n[t];if(o.invalidated){n.splice(t,1);let s=o.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);o.destroy()}}let r=!0;for(t=0;t<n.length;t++)r=n[t].update(e)&&r;return r};fI.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let o=n[r];if(o.contains(e))return o.getBoundingSphere(e,t)}return Pt.FAILED};fI.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var a3=fI;var $At=[];function bwe(e,t){let n=e._batches,i=n.length;for(let r=0;r<i;r++)n[r].remove(t)}function xwe(e,t,n){if(n.isDynamic){e._dynamicBatch.add(t,n);return}if(n.clampToGround&&n.fillEnabled){let s=n.classificationTypeProperty.getValue(t);e._groundBatches[s].add(t,n);return}let i;n.fillEnabled&&(i=n.shadowsProperty.getValue(t));let r=0;l(n.depthFailMaterialProperty)&&(r=n.depthFailMaterialProperty instanceof Kt?1:2);let o;l(i)&&(o=i+r*Dn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Kt?e._colorBatches[o].add(t,n):e._materialBatches[o].add(t,n))}function g0(e,t,n,i){i=i??e.groundPrimitives,n=n??e.primitives,this._scene=e,this._primitives=n,this._entityCollection=void 0,this._addedObjects=new kt,this._removedObjects=new kt,this._changedObjects=new kt;let r,o=Dn.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(o*3),this._materialBatches=new Array(o*3),r=0;r<o;++r)this._colorBatches[r]=new dh(n,js,void 0,!1,r),this._materialBatches[r]=new hh(n,cc,void 0,!1,r),this._colorBatches[r+o]=new dh(n,js,js,!1,r),this._materialBatches[r+o]=new hh(n,cc,js,!1,r),this._colorBatches[r+o*2]=new dh(n,js,cc,!1,r),this._materialBatches[r+o*2]=new hh(n,cc,cc,!1,r);this._dynamicBatch=new rE(n,i);let s=Qn.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),r=0;r<s;++r)this._groundBatches[r]=new a3(i,r);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new kt,this._updaters=new kt,this._entityCollection=t,t.collectionChanged.addEventListener(g0.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,$At)}g0.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,r=i.values,o=this._changedObjects,s=o.values,a,c,u,f;for(a=s.length-1;a>-1;a--)c=s[a],u=c.id,f=this._updaters.get(u),f.entity===c?(bwe(this,f),xwe(this,e,f)):(r.push(c),n.push(c));for(a=r.length-1;a>-1;a--)c=r[a],u=c.id,f=this._updaters.get(u),bwe(this,f),f.destroy(),this._updaters.remove(u),this._subscriptions.get(u)(),this._subscriptions.remove(u);for(a=n.length-1;a>-1;a--)c=n[a],u=c.id,f=new s3(c,this._scene),this._updaters.set(u,f),xwe(this,e,f),this._subscriptions.set(u,f.geometryChanged.addEventListener(g0._onGeometryChanged,this));t.removeAll(),i.removeAll(),o.removeAll();let d=!0,p=this._batches,g=p.length;for(a=0;a<g;a++)d=p[a].update(e)&&d;return d};var JAt=[],ZAt=new ue;g0.prototype.getBoundingSphere=function(e,t){let n=JAt,i=ZAt,r=0,o,s=this._batches,a=s.length,c=this._updaters.get(e.id);for(let u=0;u<a;u++){if(o=s[u].getBoundingSphere(c,i),o===Pt.PENDING)return Pt.PENDING;o===Pt.DONE&&(n[r]=ue.clone(i,n[r]),r++)}return r===0?Pt.FAILED:(n.length=r,ue.fromBoundingSpheres(n,t),Pt.DONE)};g0.prototype.isDestroyed=function(){return!1};g0.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(g0.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();let e,t=this._batches,n=t.length;for(e=0;e<n;e++)t[e].removeAllPrimitives();let i=this._subscriptions.values;for(n=i.length,e=0;e<n;e++)i[e]();return this._subscriptions.removeAll(),le(this)};g0._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,r=i.id;!l(t.get(r))&&!l(n.get(r))&&n.set(r,i)};g0.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,r=this._removedObjects,o=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(r.set(a,c),o.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,r.remove(a)?o.set(a,c):i.set(a,c)};var c3=g0;function tf(e){Vl.initializeTerrainHeights(),Kh.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Xo,this._eventHelper.add(n.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(n.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(n.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=n,this._scene=t,this._visualizersCallback=e.visualizersCallback??tf.defaultVisualizersCallback;let i=!1,r=new xl,o=new xl;n.length>0&&(t.primitives.add(r),t.groundPrimitives.add(o),i=!0),this._primitives=r,this._groundPrimitives=o;for(let u=0,f=n.length;u<f;u++)this._onDataSourceAdded(n,n.get(u));let s=new rk;this._onDataSourceAdded(void 0,s),this._defaultDataSource=s;let a,c;if(!i){let u=this,f=function(){t.primitives.add(r),t.groundPrimitives.add(o),a(),c(),u._removeDefaultDataSourceListener=void 0,u._removeDataSourceCollectionListener=void 0};a=s.entities.collectionChanged.addEventListener(f),c=n.dataSourceAdded.addEventListener(f)}this._removeDefaultDataSourceListener=a,this._removeDataSourceCollectionListener=c,this._ready=!1}var dI=[];tf.registerVisualizer=function(e){dI.includes(e)||dI.push(e)};tf.unregisterVisualizer=function(e){if(dI.includes(e)){let t=dI.indexOf(e);dI.splice(t,1)}};tf.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new TD(t,i),new Xk(e,i,n._primitives,n._groundPrimitives),new Kk(t,i),new Jk(e,i),new G2(e,i),new i3(t,i),new t3(e,i),new c3(e,i,n._primitives,n._groundPrimitives),...dI.map(r=>new r(e,i))]};Object.defineProperties(tf.prototype,{scene:{get:function(){return this._scene}},dataSources:{get:function(){return this._dataSourceCollection}},defaultDataSource:{get:function(){return this._defaultDataSource}},ready:{get:function(){return this._ready}}});tf.prototype.isDestroyed=function(){return!1};tf.prototype.destroy=function(){this._eventHelper.removeAll();let e=this._dataSourceCollection;for(let t=0,n=e.length;t<n;++t)this._onDataSourceRemoved(this._dataSourceCollection,e.get(t));return this._onDataSourceRemoved(void 0,this._defaultDataSource),l(this._removeDefaultDataSourceListener)?(this._removeDefaultDataSourceListener(),this._removeDataSourceCollectionListener()):(this._scene.primitives.remove(this._primitives),this._scene.groundPrimitives.remove(this._groundPrimitives)),le(this)};tf.prototype.update=function(e){if(!Mi.initialized)return this._ready=!1,!1;let t=!0,n,i,r,o,s=this._dataSourceCollection,a=s.length;for(n=0;n<a;n++){let c=s.get(n);for(l(c.update)&&(t=c.update(e)&&t),r=c._visualizers,o=r.length,i=0;i<o;i++)t=r[i].update(e)&&t}for(r=this._defaultDataSource._visualizers,o=r.length,i=0;i<o;i++)t=r[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=this._ready||t,t};tf.prototype._postRender=function(){let e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){let r=t.get(i),o=r.credit;l(o)&&e.creditDisplay.addCreditToNextFrame(o);let s=r._resourceCredits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)e.creditDisplay.addCreditToNextFrame(s[c])}}};var QAt=[],ebt=new ue;tf.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return Pt.PENDING;let i,r,o=this._defaultDataSource;if(!o.entities.contains(e)){o=void 0;let p=this._dataSourceCollection;for(r=p.length,i=0;i<r;i++){let g=p.get(i);if(g.entities.contains(e)){o=g;break}}}if(!l(o))return Pt.FAILED;let s=QAt,a=ebt,c=0,u,f=o._visualizers,d=f.length;for(i=0;i<d;i++){let p=f[i];if(l(p.getBoundingSphere)){if(u=f[i].getBoundingSphere(e,a),!t&&u===Pt.PENDING)return Pt.PENDING;u===Pt.DONE&&(s[c]=ue.clone(a,s[c]),c++)}}return c===0?Pt.FAILED:(s.length=c,ue.fromBoundingSpheres(s,n),Pt.DONE)};tf.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,r=this._groundPrimitives,o=i.add(new xl),s=r.add(new Ak);t._primitives=o,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),o.add(a),t._visualizers=this._visualizersCallback(n,a,t)};tf.prototype._onDataSourceRemoved=function(e,t){let n=this._primitives,i=this._groundPrimitives,r=t._primitives,o=t._groundPrimitives,s=t.clustering;r.remove(s);let a=t._visualizers,c=a.length;for(let u=0;u<c;u++)a[u].destroy();n.remove(r),i.remove(o),t._visualizers=void 0};tf.prototype._onDataSourceMoved=function(e,t,n){let i=this._primitives,r=this._groundPrimitives,o=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(o),r.raise(s)):t===n-1?(i.lower(o),r.lower(s)):t===0?(i.lowerToBottom(o),r.lowerToBottom(s),i.raise(o),r.raise(s)):(i.raiseToTop(o),r.raiseToTop(s))};var l3=tf;function dte(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}dte.clone=function(e,t){if(l(e))return l(t)||(t=new dte),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var mh=dte;var Twe=new $,Ewe=new $,Cwe=new $,tbt=new N,JG=new h,vwe=new h,hte=new h,mte=new h,Swe=new h,wwe=new h,nbt=new Le,ibt=new h,rbt=new $,hI=new K,obt=1.25;function sbt(e,t,n,i,r,o,s,a,c,u){let f=e.scene.mode,d=r.getValue(c,e._lastCartesian);if(l(d)){let p=!1,g=!1,m,y,A;if(f===re.SCENE3D){K.addSeconds(c,.001,hI);let I=r.getValue(hI,JG);if(l(I)||(K.addSeconds(c,-.001,hI),I=r.getValue(hI,JG),g=!0),l(I)){let R=At.computeFixedToIcrfMatrix(c,Twe),O=At.computeFixedToIcrfMatrix(hI,Ewe),L;!l(R)||!l(O)?(L=At.computeTemeToPseudoFixedMatrix(c,Cwe),R=$.transpose(L,Twe),O=At.computeTemeToPseudoFixedMatrix(hI,Ewe),$.transpose(O,O)):L=$.transpose(R,Cwe);let _=$.multiplyByVector(R,d,Swe),C=$.multiplyByVector(O,I,wwe);h.subtract(_,C,mte);let w=h.magnitude(mte)*1e3,P=D.GRAVITATIONALPARAMETER,M=-P/(w*w-2*P/h.magnitude(_));M<0||M>obt*u.maximumRadius?(m=vwe,h.normalize(d,m),h.negate(m,m),A=h.clone(h.UNIT_Z,hte),y=h.cross(A,m,JG),h.magnitude(y)>D.EPSILON7&&(h.normalize(m,m),h.normalize(y,y),A=h.cross(m,y,hte),h.normalize(A,A),p=!0)):h.equalsEpsilon(d,I,D.EPSILON7)||(A=vwe,h.normalize(_,A),h.normalize(C,C),y=h.cross(A,C,hte),g&&(y=h.multiplyByScalar(y,-1,y)),h.equalsEpsilon(y,h.ZERO,D.EPSILON7)||(m=h.cross(y,A,JG),$.multiplyByVector(L,m,m),$.multiplyByVector(L,y,y),$.multiplyByVector(L,A,A),h.normalize(m,m),h.normalize(y,y),h.normalize(A,A),p=!0))}}l(e.boundingSphere)&&(d=e.boundingSphere.center);let b,x,T;i&&(b=h.clone(t.position,mte),x=h.clone(t.direction,Swe),T=h.clone(t.up,wwe));let E=tbt,v;l(s)&&(v=s.getValue(c,nbt));let S=o.getValue(c,ibt);if(a===gg.INERTIAL&&l(v))N.fromTranslationQuaternionRotationScale(d,v,h.ONE,E);else if(a===gg.VELOCITY&&l(S)){let I=At.rotationMatrixFromPositionVelocity(d,S,u,rbt);N.fromRotationTranslation(I,d,E)}else a===gg.ENU||!p?At.eastNorthUpToFixedFrame(d,u,E):(E[0]=m.x,E[1]=m.y,E[2]=m.z,E[3]=0,E[4]=y.x,E[5]=y.y,E[6]=y.z,E[7]=0,E[8]=A.x,E[9]=A.y,E[10]=A.z,E[11]=0,E[12]=d.x,E[13]=d.y,E[14]=d.z,E[15]=0);t._setTransform(E),i&&(h.clone(b,t.position),h.clone(x,t.direction),h.clone(T,t.up),h.cross(x,T,t.right))}if(n){let p=f===re.SCENE2D||h.equals(e._offset3D,h.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function u3(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=n??ee.default,this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new h,this._defaultOffset3D=void 0,this._velocityProperty=new M_(e.position,!0),this._offset3D=new h}Object.defineProperties(u3,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=h.clone(e,new h)}}});u3.defaultOffset3D=new h(-14e3,3500,3500);var ZG=new mh,abt=new h;u3.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,r=n.mode;if(r===re.MORPHING)return;let o=this.entity,s=o.trackingReferenceFrame,a=o.position;if(!l(a))return;let c=this._velocityProperty,u=o.orientation,f=o!==this._lastEntity,d=r!==this._mode,p=n.camera,g=f||d,m=!0;if(f){let y=o.viewFrom,A=l(y);if(!A&&l(t)){ZG.pitch=-D.PI_OVER_FOUR,ZG.range=0;let b=a.getValue(e,abt);if(l(b)){let x=2-1/Math.max(1,h.magnitude(b)/i.maximumRadius);ZG.pitch*=x}p.viewBoundingSphere(t,ZG),this.boundingSphere=t,g=!1,m=!1}else(!A||!l(y.getValue(e,this._offset3D)))&&h.clone(u3._defaultOffset3D,this._offset3D)}else!d&&this._mode!==re.SCENE2D&&h.clone(p.position,this._offset3D);this._lastEntity=o,this._mode=r,sbt(this,p,g,m,a,c,u,s,e,i)};var f3=u3;_0();yc();EE();P5();I3();var rPe={type:"module"},Ute="error",Xbt="messageerror",oPe,kte,sPe,zte=!0;try{zte=typeof structuredClone==Bo&&structuredClone(new DOMException("","AbortError")).code!==Ue}catch{}nPe(Kbt);function Kbt(e,t){let{baseURI:n,chunkSize:i,workerStartupTimeout:r}=t,{wasmURI:o}=t;if(!e.interface){typeof o==Bo&&(o=o());let s;try{s=M5(e.workerURI,n,e)}catch{return Fte(e),Bte(e,t)}Object.assign(e,{worker:s,workerAlive:!1,terminated:!1,startupError:null,interface:{run:async()=>{try{return await $bt(e,{chunkSize:i,wasmURI:o,baseURI:n,workerStartupTimeout:r})}catch(a){if(a&&a.workerStartupFailed)return Fte(e),aPe(e),O5(e,t);if(a&&a.codecImportFailed){if(e.reader)return aPe(e),O5(e,t);e.onTaskFinished()}throw a}}}})}return e.interface}async function $bt(e,t){if(!e.worker){let{startupError:g}=e;e.startupError=null;let m=g||new Error(wE);throw m.workerStartupFailed=!0,m}let n,i,r=new Promise((g,m)=>{n=g,i=m});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:r});let{readable:o,options:s}=e,{writable:a,closed:c,abortPipe:u}=Jbt(e.writable),f;try{f=Vte({type:$Ie,options:s,config:t,readable:o,writable:a},e)}catch(g){u();try{await c}catch{}throw e.onTaskFinished(),g}f||Object.assign(e,{reader:o.getReader(),writer:a.getWriter()});let{workerStartupTimeout:d}=t;!e.workerAlive&&Number.isFinite(d)&&d>=0&&(e.startupTimeout=setTimeout(()=>Zbt(e),d));try{let g=await r;return await p(),await c,g}catch(g){await p(),u();try{await c}catch{}throw g}async function p(){if(!f&&!a.locked)try{await a.getWriter().close()}catch{}}}function Jbt(e){let t=new AbortController,{writable:n,readable:i}=new null,r=i.pipeTo(e,{preventClose:!0,preventAbort:!0,signal:t.signal});return r.catch(()=>{}),{writable:n,closed:r,abortPipe:()=>t.abort()}}function aPe(e){let{reader:t}=e;t&&t.releaseLock(),e.reader=null,e.writer=null}function jte(e){let{worker:t}=e;if(t)try{t.terminate()}catch{}e.interface=null}function M5(e,t,n,i,r=!0){let{createWorker:o}=n,s,a,c;if(o)s=o();else if(kte===Ue||oPe!==e){let u=typeof e==Bo;u?a=e(r):a=e;let f=a.startsWith("data:"),d=a.startsWith("blob:");if(f||d){i===Ue&&(i=!1),i&&(c=rPe);try{s=new Worker(a,c)}catch(p){if(d)try{URL.revokeObjectURL(a)}catch{}if(u&&d)return M5(e,t,n,i,!1);if(i)throw p;return M5(e,t,n,!0,!1)}}else{i===Ue&&(i=!0),i&&(c=rPe);try{a=new URL(a,t)}catch{}try{s=new Worker(a,c)}catch(p){if(i)return M5(e,t,n,!1,r);throw p}}oPe=e,kte=a,sPe=c}else s=new Worker(kte,sPe);return s.addEventListener(KIe,u=>{n.workerAlive=!0,lPe(n),Qbt(u,n)}),s.addEventListener(Ute,u=>cPe(u,n)),s.addEventListener(Xbt,u=>cPe(u,n)),s}function Zbt(e){if(e.startupTimeout=null,e.workerAlive)return;let{rejectResult:t,writer:n}=e;if(jte(e),e.worker=null,t){let i=new Error(wE);i.workerStartupFailed=!0,t(i),n&&n.releaseLock()}}function lPe(e){let{startupTimeout:t}=e;t&&(clearTimeout(t),e.startupTimeout=null)}function cPe(e,t){e.preventDefault&&e.preventDefault(),lPe(t);let{workerAlive:n,rejectResult:i,writer:r,onTaskFinished:o}=t;jte(t),n||(t.worker=null);let s=e.error||new Error(e.message||Ute);n||(s=Object.assign(new Error(s.message||Ute),{workerStartupFailed:!0}),t.startupError=s),i&&(i(s),r&&r.releaseLock(),n&&o())}function Vte(e,{worker:t,writer:n,transferStreams:i,workerAlive:r}){try{let{value:o,readable:s,writable:a}=e,c=[];if(o&&(e.value=d5(o),c.push(e.value.buffer)),i&&zte&&r?(s&&c.push(s),a&&c.push(a)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{zte=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(o){throw n&&n.releaseLock(),o}}async function Qbt({data:e},t){let{type:n,value:i,messageId:r,result:o,error:s}=e,{reader:a,writer:c,resolveResult:u,rejectResult:f,onTaskFinished:d,generation:p}=t,g=()=>t.generation!=p;try{if(s){let{message:y,stack:A,code:b,name:x,outputSize:T,cause:E,codecImportFailed:v}=s,S=new Error(y);Object.assign(S,{stack:A,code:b,name:x,outputSize:T}),E&&(S.cause=Object.assign(new Error(E.message),{name:E.name})),v&&(S.codecImportFailed=!0),m(S)}else{if(n==JIe){let{value:y,done:A}=await a.read();g()||Vte({type:Ote,value:y,done:A,messageId:r},t)}n==Ote&&(await c.ready,await c.write(new Uint8Array(i)),g()||Vte({type:ZIe,messageId:r},t)),n==QIe&&m(null,o)}}catch(y){g()||(jte(t),m(y))}function m(y,A){g()||(y?f(y):u(A),c&&c.releaseLock(),y&&y.codecImportFailed||d())}}lie();yc();_0();vE();I3();B5();j5();Tte();EE();EI();gne();h3();var xie="File already exists",Tie="Zip file comment exceeds 64KB",lDe="Invalid zip file comment (must be a Uint8Array)",uDe="File entry comment exceeds 64KB",fDe="Invalid file entry comment (must be a string)",dDe="Invalid date (must be a valid Date instance)",hDe="File entry name exceeds 64KB",Eie="Version exceeds 65535",mDe="The strength must equal 1, 2, or 3",pDe="Encryption is not supported in USDZ files",gDe="Encryption is not supported when the 'passThrough' option is set",_De="Invalid extra field (must be a Map)",yDe="Invalid extra field type (must be integer 0..65535)",ADe="Invalid extra field data (must be a Uint8Array)",y9="Extra field data exceeds 64KB",yTt="Compression method not supported",bDe=-2147483648,xDe=2147483647,QPe=BigInt(0),eDe=BigInt("0x7fffffffffffffff"),A9="Zip64 is not supported (set the 'zip64' option to 'true')",TDe="Undefined uncompressed size",EDe="Undefined compression method";var CDe="Undefined reader",vDe="Zip file not empty",SDe="Invalid uid (must be integer 0..2^32-1)",wDe="Invalid gid (must be integer 0..2^32-1)",IDe="Invalid UNIX mode (must be integer 0..65535)",PDe="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",DDe="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",RDe="Invalid msdosAttributesRaw (must be integer 0..255)",ODe="Invalid msdosAttributes (must be an object with boolean flags)",MDe="Invalid level (must be integer 0..9)",NDe="Signature data exceeds 64KB",tDe=new Uint8Array([7,0,2,0,65,69,3,0,0]),ATt=4,bTt=9,xTt=67,TTt=1,gie="infozip",_ie="unix",ETt=9,uie=0,nDe=[],G3=class{constructor(t,n={}){t=new NI(t);let{availableSize:i=bE,maxSize:r=bE}=t,o=i>0&&i!==bE&&r>0&&r!==bE;Object.assign(this,{writer:t,addSplitZipSignature:o,options:n,fileEntries:new Map,filenames:new Set,offset:n[d3]===Ue?t.size||t.writable.size||0:n[d3],initialOffset:n[d3]===Ue?0:n[d3]-(t.size||t.writable.size||0),pendingAddFileCalls:new Set,pendingErrors:[],bufferedWrites:0,lastFileEntry:Ue})}prependZip(t){return fie(this,CTt(this,t))}appendZip(t){return fie(this,this.appendZipEntries(t))}async appendZipEntries(t){let n=this,{pendingAddFileCalls:i,filenames:r,fileEntries:o}=n;for(;i.size;)await Promise.allSettled(Array.from(i));let s,a=new Promise(f=>s=f);i.add(a);let c=[],u;try{t=new G_(t),await kc(t),(t.size===Ue||!t.readUint8Array)&&(t=new rf(await b0(t.readable)),await kc(t));let{ZipReader:f}=await Promise.resolve().then(()=>(lie(),KPe)),d=new f(t),p=await d.getEntries();await d.close(),await kc(n.writer);let{directoryOffset:g}=d;p.forEach(({filename:A})=>{if(r.has(A))throw new Error(xie);r.add(A),c.push(A)}),n.writerLocked=!0;let{lockWriter:m}=n;n.lockWriter=new Promise(A=>u=()=>{n.writerLocked=!1,A()}),await m,n.addSplitZipSignature&&(delete n.addSplitZipSignature,await HTt(t)||(await v0(n.writer,FDe()),n.offset+=4));let y=await GTt(n,t,p,g);p.forEach(A=>{let{version:b,rawLastModDate:x,rawFilename:T,bitFlag:E,encrypted:v,uncompressedSize:S,compressedSize:I,extraFieldZip64:R}=A,{compressionMethod:O,rawExtraField:L}=A,{level:_,languageEncodingFlag:C,dataDescriptor:w}=E;L=LDe(L||gr),A.extraFieldAES&&(O=99);let P=or(L),M=!!R&&R.uncompressedSize!==Ue,F=!!R&&R.compressedSize!==Ue,V=VDe(_,C,w,v,O)&-7|_<<1,{headerArray:B,headerView:j}=zDe({version:b,bitFlag:V,compressionMethod:O,uncompressedSize:S,compressedSize:I,rawLastModDate:x,rawFilename:T,zip64CompressedSize:F,zip64UncompressedSize:M,extraFieldLength:P}),{crc32:k}=A;k!==Ue&&Uc(j,10,k);let{offset:G,diskNumberStart:q}=y.get(A);Object.assign(A,{zip64UncompressedSize:M,zip64CompressedSize:F,offset:G,diskNumberStart:q,zip64DiskNumberStart:!1,rawExtraFieldZip64:gr,rawExtraFieldAES:gr,rawExtraFieldExtendedTimestamp:gr,rawExtraFieldNTFS:gr,rawExtraFieldUnix:gr,rawExtraField:L,rawCentralExtraField:gr,extendedTimestamp:!1,headerArray:B,headerView:j}),o.set(A.filename,A)})}catch(f){throw c.forEach(d=>r.delete(d)),f}finally{s(),i.delete(a),u&&u()}}add(t="",n,i={}){let r=this,{pendingAddFileCalls:o}=r,s=vTt(r,t,n,i);o.add(s);let a=()=>o.delete(s);return Promise.prototype.then.call(s,a,a),fie(r,s)}remove(t){let{filenames:n,fileEntries:i}=this;if(typeof t==xE&&(t=i.get(t)),t&&t.filename!==Ue){let{filename:r}=t;if(n.has(r)&&i.has(r))return n.delete(r),i.delete(r),!0}return!1}async close(t=gr,n={}){let i=this,{pendingAddFileCalls:r,writer:o}=this,{writable:s}=o;if(!(t instanceof Uint8Array))throw new Error(lDe);if(or(t)>65535)throw new Error(Tie);for(;r.size;)await Promise.allSettled(Array.from(r));await Promise.allSettled(i.pendingErrors.map(u=>u.recorded));let a=i.pendingErrors.filter(u=>u.error&&!u.observed);if(a.length){let u=a.map(d=>d.error);a.forEach(d=>d.observed=!0);let[f]=u;try{f.entryErrors=u}catch{}throw f}return await kTt(i,t,n),!V5(o)&&$i(i,n,s5)||await s.getWriter().close(),o.getData?o.getData():s}};var yie=class extends Promise{then(t,n){let{watcher:i}=this;return i&&(i.observed=!0),super.then(t,n)}};function fie(e,t){let n=new yie((r,o)=>Promise.prototype.then.call(t,r,o)),i={};return n.watcher=i,i.recorded=Promise.prototype.then.call(n,Ue,r=>i.error=r),e.pendingErrors.push(i),n}async function CTt(e,t){if(e.filenames.size)throw new Error(vDe);await e.appendZipEntries(t)}async function vTt(e,t,n,i){if(i=Object.assign({},i),$i(e,i,PE)&&!t.endsWith("/")&&(t+="/"),e.filenames.has(t))throw new Error(xie);e.filenames.add(t),uie<V_().maxWorkers?uie++:await new Promise(r=>nDe.push(r));try{return await STt(e,t,n,i)}catch(r){throw e.filenames.delete(t),r}finally{let r=nDe.shift();r?r():uie--}}async function STt(e,t,n,i){let r=wTt(e,t,i);({name:t}=r);let o=ITt(e,t,i),{comment:s}=o,a=i[Y5];e.fileEntries.set(t,Ue);let c=e.lastFileEntry,u={},f;o.resolvedOptions.keepOrder&&(u.lockFileEntry=new Promise(p=>f=p)),e.lastFileEntry=u;let d;try{let{resolvedOptions:p}=o;p.level!=0&&p.compressionMethod===Ue&&!p.passThrough&&!await iPe(V_())&&(p.level=0);let g=await PTt(e,n,o,i);({reader:n}=g);let m=W3(e.writer),y=Y_(e.writer);i=Object.assign({},i,r.resolvedOptions,o.resolvedOptions,g.resolvedOptions,{signature:i[q5],crc32:i.crc32===Ue?i[q5]:i.crc32,offset:e.offset-m,diskNumberStart:y,[pI]:e.options[pI]});let A=MTt(i),b=LTt(i),x=or(A.localHeaderArray,b.dataDescriptorArray);d=await RTt(e,t,n,{headerInfo:A,dataDescriptorInfo:b,metadataSize:x,fileEntry:u,previousFileEntry:c,releaseLockFileEntry:f},i)}catch(p){throw e.fileEntries.delete(t),p}finally{f&&f(c&&c.lockFileEntry)}return Object.assign(d,{name:t,comment:s,extraField:a,[H5]:d.internalFileAttributes,[G5]:d.externalFileAttributes}),new ub(d)}function wTt(e,t,n){let i=$i(e,n,one),r=$i(e,n,cne,i?20:768),o=$i(e,n,une),s=WI(e,n,"uid"),a=WI(e,n,"gid"),c=WI(e,n,dne),u=$i(e,n,tIe),f=$i(e,n,hne),d=$i(e,n,mne),p=$i(e,n,pne);if(_I(s,4294967295,SDe),_I(a,4294967295,wDe),_I(c,65535,IDe),u!==Ue&&u!==gie&&u!==_ie)throw new Error(PDe);if(u===_ie&&(s!==Ue&&s>65535||a!==Ue&&a>65535))throw new Error(DDe);u===Ue&&(s!==Ue||a!==Ue)&&(u=gie);let g=WI(e,n,ine),m=$i(e,n,rne),y=s!==Ue||a!==Ue||c!==Ue||u||o,A=g!==Ue||m!==Ue;if(y?(i=!1,r=r&255|768):A&&(i=!0,r=r&255),_I(g,255,RDe),m&&(typeof m!==Iwe||Array.isArray(m)))throw new Error(ODe);if(r>65535)throw new Error(Eie);let b=UDe(e,n,nne,G5),x=b!==Ue;x||(b=0),!n[PE]&&t.endsWith("/")&&(n[PE]=!0);let T=$i(e,n,PE);if(T?(t.endsWith("/")||(t+="/"),x||(b=16,i||(b|=16877<<16))):!i&&!x&&(o?b=493<<16:b=420<<16),!i){let S=c!==Ue||!!(f||d||p),I=b>>16&65535;c=c===Ue?I:c&65535,f?c|=2048:f=!!(c&2048),d?c|=1024:d=!!(c&1024),p?c|=512:p=!!(c&512),(!x||S)&&(T?c=c&-61441|16384:c&61440||(c|=32768),b=(c&65535)<<16|b&65535)}({msdosAttributesRaw:g,msdosAttributes:m}=NTt(g,m)),A&&(b=b&4294967295|g&255);let E=b>>16&65535,v=c!==Ue&&(c&61440)==40960;return{name:t,resolvedOptions:{versionMadeBy:r,msDosCompatible:!!i,externalFileAttributes:b,unixExternalUpper:E,uid:s,gid:a,unixMode:c,unixExtraFieldType:u,symlink:v,setuid:f,setgid:d,sticky:p,msdosAttributesRaw:g,msdosAttributes:m}}}function ITt(e,t,n){let i=Aie(e,n,eIe)||AI,r=i(t,a5);if(r===Ue&&(r=AI(t)),or(r)>65535)throw new Error(hDe);let o=n[M3]||"";if(typeof o!=xE)throw new Error(fDe);let s=i(o,c5);if(s===Ue&&(s=AI(o)),or(s)>65535)throw new Error(uDe);let a=$i(e,n,ane);if(a!==Ue&&a>65535)throw new Error(Eie);let c=pie(e,n,LI,new Date),u=$i(e,n,FI),f=pie(e,n,L3),d=pie(e,n,F3),p=UDe(e,n,tne,H5,0),g=$i(e,n,t5),m=$i(e,n,QG),y=$i(e,n,e5);f5(m,y);let A=WI(e,n,Gwe,3),b=$i(e,n,lne),x=$i(e,n,Wwe,!0),T=$i(e,n,qwe),E=$i(e,n,Ywe,!0),v=$i(e,n,i5),S=$i(e,n,o5),I=$i(e,n,Kwe),R=Aie(e,n,$we),O=$i(e,n,Jwe,!0),L=u5($i(e,n,n5)),_=$i(e,n,Zwe,!0),C=$i(e,n,fne),w=g||C===Ue?Ue:x5(C);if(!g&&C!==Ue&&C!==0&&C!==8&&!w)throw new Error(yTt);let P=WI(e,n,Xwe);if(_I(P,ETt,MDe),e.options[pI]){if(m!==Ue||y!==Ue)throw new Error(pDe);P===Ue&&C===Ue&&(P=0)}g&&(P=Ue);let M=$i(e,n,r5),F=$i(e,n,gte);I&&F===Ue&&(F=!1),(F===Ue||b&&!g)&&(F=!0),P!==Ue&&P!=6&&(M=!1);let V=$i(e,n,W5);if(!b&&(m!==Ue||y!==Ue)&&!(Number.isInteger(A)&&A>=1&&A<=3))throw new Error(mDe);let B=die(n[Y5]),j=die(n[nIe]),k=die(n[iIe]);return{comment:o,resolvedOptions:{rawFilename:r,rawComment:s,version:a,lastModDate:c,rawLastModDate:u,lastAccessDate:f,creationDate:d,internalFileAttributes:p,passThrough:g,password:m,rawPassword:y,encryptionStrength:A,zipCrypto:b,extendedTimestamp:x,ntfsTimestamp:T,keepOrder:E,useWebWorkers:v,transferStreams:S,bufferedWrite:I,createTempStream:R,dataDescriptorSignature:O,signal:L,useUnicodeFileNames:_,compressionMethod:C,format:w?w.format:Ue,codecURI:w?w.codecURI:Ue,codecVersionNeeded:w?w.versionNeeded:Ue,level:P,useCompressionStream:M,dataDescriptor:F,zip64:V,rawExtraField:B,rawLocalExtraField:j,rawCentralExtraField:k}}}function die(e){if(!e)return gr;if(!(e instanceof Map))throw new Error(_De);let t=0,n=0;e.forEach((o,s)=>{if(Ate(s,65535,yDe),!(o instanceof Uint8Array))throw new Error(ADe);if(or(o)>65535)throw new Error(y9);t+=4+or(o)});let i=new Uint8Array(t),r=di(i);return e.forEach((o,s)=>{C0(r,n,s),C0(r,n+2,or(o)),X3(i,o,n+4),n+=4+or(o)}),i}async function PTt(e,t,{resolvedOptions:n},i){if(n.passThrough&&!t&&!$i(e,i,PE))throw new Error(CDe);let r;return t&&(t=new G_(t),await kc(t),{size:r}=t),Object.assign({reader:t},DTt(e,!!t,r,n,i))}function DTt(e,t,n,i,r){let{passThrough:o,zipCrypto:s,password:a,rawPassword:c,encryptionStrength:u}=i,{dataDescriptor:f,zip64:d,level:p,compressionMethod:g}=i,m=0,y=0;if(o&&t){if(y=r[N3],y===Ue)throw new Error(TDe);if(g===Ue)throw new Error(EDe)}let A=d===!0,b=$i(e,r,sne);if(t&&o&&!b&&or(a,c))throw new Error(gDe);let x=t&&(!!(a&&or(a)||c&&or(c))||o&&b);t||(p=0,g=0);let T=x?s?12:16+u*4:0;t&&(o?(r.uncompressedSize=y,m=n===Ue?cDe(y)+T:n):n===Ue?(f=!0,(d||d===Ue)&&(d=!0,y=m=4294967296)):(r.uncompressedSize=y=n,m=(bie(g,p)?cDe(y):y)+T));let E=!x&&(!t||n===0&&!o)&&!bie(g,p);E&&!s&&$i(e,r,gte)===Ue&&(f=!1);let v=A||y>=4294967295,S=A||m>=4294967295;if(v||S){if(d===!1)throw new Error(A9);d=!0}return d=d||!1,{maximumCompressedSize:m,resolvedOptions:{dataDescriptor:f,emptyEntry:E,zip64:d,zip64UncompressedSize:v,zip64CompressedSize:S,uncompressedSize:y,level:p,compressionMethod:g,encrypted:x}}}async function RTt(e,t,n,i,r){let{fileEntries:o,writer:s}=e,{keepOrder:a,dataDescriptor:c,emptyEntry:u,signal:f}=r,{headerInfo:d,fileEntry:p,previousFileEntry:g,releaseLockFileEntry:m}=i,y=e.options[pI],A=p,b,x,T,E,v,S=0,I,R=a&&g?g.lockFileEntry:Ue;o.set(t,A);try{r.bufferedWrite||!a||e.writerLocked||e.bufferedWrites||!c&&!u?(b=!0,e.bufferedWrites++,r.createTempStream?I=await r.createTempStream():I=new null(Ue,Ue,{highWaterMark:bE}),I.size=0,await kc(s)):(I=s,await R,await O()),await kc(I);let _=W3(s);e.addSplitZipSignature&&!b&&await oDe(e,s),y&&!b&&iDe(i,e.offset-_);let{localHeaderArray:C}=d;b||await L();let w=Y_(s),P=q3(e,s);if(A.diskNumberStart=w,b||(E=!0,v=s.size,await v0(I,C)),A=await OTt(n,I,A,i,V_(),r),b||(E=!1),o.set(t,A),A.filename=t,b){if(await Promise.all([I.writable.getWriter().close(),R]),await O(),e.addSplitZipSignature&&await oDe(e,s),T=!0,v=s.size,await L(),A.diskNumberStart=Y_(s),A.offset=q3(e,s),y){let M=i.metadataSize;iDe(i,e.offset-W3(s)),A.size+=i.metadataSize-M}BTt(A,d.localHeaderView,r),await v0(s,d.localHeaderArray),await BDe(I.readable,s,f,M=>S+=M),s.size+=I.size,T=!1}else A.diskNumberStart=w,A.offset=P;return e.offset+=A.size,A}catch(_){if(T||E){if(e.hasCorruptedEntries=!0,_)try{_.corruptedEntry=!0}catch{}e.offset+=s.size-v,b&&(e.offset+=S)}throw o.delete(t),_}finally{if(b&&e.bufferedWrites--,m&&m(R),x&&x(),b&&I&&I.dispose)try{await I.dispose()}catch{}}async function O(){e.writerLocked=!0;let{lockWriter:_}=e;e.lockWriter=new Promise(C=>x=()=>{e.writerLocked=!1,C()}),await _}async function L(){qI(s,or(d.localHeaderArray))&&await s.closeDisk()}}async function OTt(e,t,{diskNumberStart:n,lockFileEntry:i},r,o,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:u}=r,{headerArray:f,headerView:d,lastModDate:p,rawLastModDate:g,encrypted:m,compressed:y,version:A,compressionMethod:b,rawExtraFieldZip64:x,localExtraFieldZip64Length:T,rawExtraFieldExtendedTimestamp:E,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:S,rawExtraFieldUnix:I,rawExtraFieldAES:R}=a,{dataDescriptorArray:O}=c,{rawFilename:L,lastAccessDate:_,creationDate:C,password:w,rawPassword:P,level:M,zip64:F,zip64UncompressedSize:V,zip64CompressedSize:B,zipCrypto:j,dataDescriptor:k,directory:G,executable:q,versionMadeBy:Q,rawComment:W,rawExtraField:J,rawCentralExtraField:Z,useWebWorkers:ae,transferStreams:Ae,onstart:fe,onprogress:xe,onend:ge,signal:we,encryptionStrength:Se,extendedTimestamp:Re,msDosCompatible:Qe,internalFileAttributes:He,externalFileAttributes:Xe,uid:$e,gid:Pe,unixMode:qe,symlink:st,setuid:vt,setgid:Gt,sticky:lt,unixExternalUpper:mt,msdosAttributesRaw:ft,msdosAttributes:Xt,useCompressionStream:rt,passThrough:ht,format:Bi,codecURI:Xn}=s,bi={lockFileEntry:i,versionMadeBy:Q,zip64:F,directory:!!G,executable:!!q,filenameUTF8:!0,rawFilename:L,commentUTF8:!0,rawComment:W,rawExtraFieldZip64:x,localExtraFieldZip64Length:T,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:S,rawExtraFieldUnix:I,rawExtraFieldAES:R,rawExtraField:J,rawCentralExtraField:Z,extendedTimestamp:Re,msDosCompatible:Qe,internalFileAttributes:He,externalFileAttributes:Xe,diskNumberStart:n,uid:$e,gid:Pe,unixMode:qe,symlink:!!st,setuid:vt,setgid:Gt,sticky:lt,unixExternalUpper:mt,msdosAttributesRaw:ft,msdosAttributes:Xt},{crc32:Wi,uncompressedSize:wi}=s,hi=0;ht||(wi=0);let{writable:xi}=t;if(e){let jn=Wm(qte(e)),nn=e.size,Wn={options:{codecType:II,inputSize:nn,level:M,rawPassword:P,password:w,encryptionStrength:Se,zipCrypto:m&&j,passwordVerification:m&&j&&g>>8&255,computeCrc32:!ht,compressed:y&&!ht,encrypted:m&&!ht,useWebWorkers:ae,useCompressionStream:rt,transferStreams:Ae,format:Bi,codecURI:Xn,compressionMethod:b},config:o,streamOptions:{signal:we,size:nn,onstart:fe,onprogress:xe,onend:ge}};try{let Zi=await F5({readable:jn,writable:xi},Wn);if(hi=Zi.outputSize,t.size+=hi,ht||(wi=Zi.inputSize,(!m||j)&&(Wi=Zi.crc32)),!B&&hi>=4294967295||!V&&wi>=4294967295)throw new Error(A9)}catch(Zi){throw Zi.outputSize!==Ue&&(t.size+=Zi.outputSize),Zi}}return FTt({crc32:Wi,compressedSize:hi,uncompressedSize:wi,headerInfo:a,dataDescriptorInfo:c},s),k&&await v0(t,O),Object.assign(bi,{uncompressedSize:wi,compressedSize:hi,lastModDate:p,rawLastModDate:g,creationDate:C,lastAccessDate:_,encrypted:!!m,zipCrypto:!!j,size:u+hi,compressionMethod:b,version:A,headerArray:f,headerView:d,signature:Wi,crc32:m&&!j&&!ht?Ue:Wi,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:V,zip64CompressedSize:B}),bi}function MTt(e){let{rawFilename:t,lastModDate:n,rawLastModDate:i,lastAccessDate:r,creationDate:o,level:s,zip64:a,zipCrypto:c,useUnicodeFileNames:u,dataDescriptor:f,directory:d,rawExtraField:p,rawLocalExtraField:g,encryptionStrength:m,extendedTimestamp:y,ntfsTimestamp:A,passThrough:b,encrypted:x,zip64UncompressedSize:T,zip64CompressedSize:E,uncompressedSize:v,crc32:S}=e,{version:I,compressionMethod:R}=e,O=!d&&bie(R,s),L,_=b||!O,C=a&&(e.bufferedWrite||!f||!T&&!E||_),w=C||a&&f&&(T||E);if(a&&(T||E)){let ge=id(20);if(ge.writeUint16(1),ge.writeUint16(16),L=ge.array,C&&(ge.writeUint64(v),_)){let we=x?c?12:16+m*4:0;ge.writeUint64(b?0:v+we)}}else L=gr;let P;if(x&&!c){let xe=id(or(tDe)+2);xe.writeUint16(39169),xe.writeBytes(tDe),P=xe.array,P[8]=m}else P=gr;let M,F,V;if(y){let xe=p9(n),ge=kDe(xe);if(ge){let Se=9+(r?4:0)+(o?4:0),Re=id(Se);V=1+(r?2:0)+(o?4:0),Re.writeUint16(21589),Re.writeUint16(Se-4),Re.writeUint8(V),Re.writeUint32(xe),r&&Re.writeUint32(sDe(p9(r))),o&&Re.writeUint32(sDe(p9(o))),F=Re.array}else F=gr;if(A===Ue?!ge||!!(r||o):A)try{let Se=mie(n),Re=id(36);Re.writeUint16(10),Re.writeUint16(32),Re.skip(4),Re.writeUint16(1),Re.writeUint16(24),Re.writeUint64(Se),Re.writeUint64(r?mie(r):Se),Re.writeUint64(o?mie(o):Se),M=Re.array}catch{M=gr}else M=gr}else M=F=gr;let B;try{let{uid:xe,gid:ge,unixExtraFieldType:we}=e;if(we==gie&&(xe!==Ue||ge!==Ue)){let Se=rDe(xe===Ue?0:xe),Re=rDe(ge===Ue?0:ge),Qe=3+Se.length+Re.length,He=id(4+Qe);He.writeUint16(30837),He.writeUint16(Qe),He.writeUint8(1),He.writeUint8(Se.length),He.writeBytes(Se),He.writeUint8(Re.length),He.writeBytes(Re),B=He.array}else if(we==_ie&&(xe!==Ue||ge!==Ue)){let Se=id(8);Se.writeUint16(30805),Se.writeUint16(4),Se.writeUint16((xe===Ue?0:xe)&65535),Se.writeUint16((ge===Ue?0:ge)&65535),B=Se.array}else B=gr}catch{B=gr}R===Ue&&(R=O?8:0),I===Ue&&(I=R==0&&!d&&!x?10:20);let{codecVersionNeeded:j}=e;O&&j!==Ue&&(I=I>j?I:j),a&&(I=I>45?I:45),x&&!c&&(I=I>51?I:51,b&&S!==Ue&&(P[ATt]=TTt),C0(di(P),bTt,R),R=99);let k=w?or(L):0,G=k+or(P,F,M,B,p,g),q=e[pI]?xTt:0;if(G+q>65535)throw new Error(y9);let Q=new Date(Math.ceil(Math.floor(n.getTime()/1e3)/2)*2e3),{headerArray:W,headerView:J,rawLastModDate:Z}=zDe({version:I,bitFlag:VDe(s,u,f,x,R),compressionMethod:R,uncompressedSize:v,lastModDate:Q<mI?mI:Q>pte?pte:Q,rawLastModDate:i,rawFilename:t,zip64CompressedSize:E,zip64UncompressedSize:T,extraFieldLength:G}),ae=id(30+or(t)+G),Ae=ae.array,fe=di(Ae);return ae.writeUint32(67324752),ae.writeBytes(W),ae.writeBytes(t),w&&ae.writeBytes(L),ae.writeBytes(P),ae.writeBytes(F),ae.writeBytes(M),ae.writeBytes(B),ae.writeBytes(p),ae.writeBytes(g),f&&(E||Uc(fe,18,0),T||Uc(fe,22,0)),{localHeaderArray:Ae,localHeaderView:fe,headerArray:W,headerView:J,lastModDate:n,rawLastModDate:Z,encrypted:x,compressed:O,version:I,compressionMethod:R,extraFieldExtendedTimestampFlag:V,rawExtraFieldZip64:gr,localExtraFieldZip64Length:k,rawExtraFieldExtendedTimestamp:F,rawExtraFieldNTFS:M,rawExtraFieldUnix:B,rawExtraFieldAES:P,extraFieldLength:G}}function iDe(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:r}=n,o=64-(t+or(i))%64;o<4&&(o+=64);let s=new Uint8Array(o),a=di(s);C0(a,0,6534),C0(a,2,o-4);let c=i;n.localHeaderArray=i=new Uint8Array(or(c)+o),X3(i,c),X3(i,s,or(c));let u=di(i);C0(u,28,r+o),n.localHeaderView=u,e.metadataSize+=o}function rDe(e){let t=new Uint8Array(4);di(t).setUint32(0,e,!0);let i=4;for(;i>1&&t[i-1]===0;)i--;return t.subarray(0,i)}function NTt(e,t){if(e!==Ue)e=e&255;else if(t!==Ue){let{readOnly:n,hidden:i,system:r,directory:o,archive:s}=t,a=0;n&&(a|=1),i&&(a|=2),r&&(a|=4),o&&(a|=16),s&&(a|=32),e=a&255}return t===Ue&&(t={readOnly:!!(e&1),hidden:!!(e&2),system:!!(e&4),directory:!!(e&16),archive:!!(e&32)}),{msdosAttributesRaw:e,msdosAttributes:t}}function LTt({zip64:e,dataDescriptor:t,dataDescriptorSignature:n}){let i=gr,r,o=0,s=e?20:12;return n&&(s+=4),t&&(i=new Uint8Array(s),r=di(i),n&&(o=4,Uc(r,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:r,dataDescriptorOffset:o}}function FTt({crc32:e,compressedSize:t,uncompressedSize:n,headerInfo:i,dataDescriptorInfo:r},{zip64:o,zipCrypto:s,passThrough:a,dataDescriptor:c}){let{headerView:u,encrypted:f}=i,{dataDescriptorView:d,dataDescriptorOffset:p}=r;(!f||s||a)&&e!==Ue&&(Uc(u,10,e),c&&Uc(d,p,e)),o?c&&(Y3(d,p+4,BigInt(t)),Y3(d,p+12,BigInt(n))):(Uc(u,14,t),Uc(u,18,n),c&&(Uc(d,p+4,t),Uc(d,p+8,n)))}function BTt({rawFilename:e,encrypted:t,zip64:n,localExtraFieldZip64Length:i,crc32:r,compressedSize:o,uncompressedSize:s,zip64UncompressedSize:a,zip64CompressedSize:c},u,{dataDescriptor:f,passThrough:d}){if(f||((!t||d&&r!==Ue)&&Uc(u,14,r),c||Uc(u,18,o),a||Uc(u,22,s)),n&&i){let p=30+or(e)+4;Y3(u,p,BigInt(s)),Y3(u,p+8,BigInt(o))}}async function kTt(e,t,n){let i=UTt(e.fileEntries),{directoryStart:r,directoryEnd:o,directoryArray:s}=await zTt(e,i,n),a=await VTt(e,s,n);await jTt(e,t,n,{directoryStart:r,directoryEnd:o,directoryDataLength:i,signatureLength:a})}function UTt(e){let t=0;for(let[,n]of e){let{rawFilename:i,rawExtraFieldAES:r,rawComment:o,rawExtraFieldNTFS:s,rawExtraFieldUnix:a,rawExtraField:c,rawCentralExtraField:u,extendedTimestamp:f,extraFieldExtendedTimestampFlag:d,lastModDate:p,zip64UncompressedSize:g,zip64CompressedSize:m,uncompressedSize:y,compressedSize:A}=n,b=n.offset>=4294967295,x=n.diskNumberStart>=65535,T;if(b||x||g||m){let I=4+(g?8:0)+(m?8:0)+(b?8:0)+(x?4:0),R=id(I);R.writeUint16(1),R.writeUint16(I-4),g&&R.writeUint64(y),m&&R.writeUint64(A),b&&R.writeUint64(n.offset),x&&R.writeUint32(n.diskNumberStart),T=R.array}else T=gr;n.rawExtraFieldZip64=T,n.zip64Offset=b,n.zip64DiskNumberStart=x;let E,v=p9(p);if(f&&kDe(v)){let I=id(9);I.writeUint16(21589),I.writeUint16(5),I.writeUint8(d),I.writeUint32(v),E=I.array}else E=gr;n.rawExtraFieldExtendedTimestamp=E;let S=or(T,r,s,a,E,c,u);if(S>65535)throw new Error(y9);t+=46+or(i,o)+S}return t}async function zTt(e,t,n){let{fileEntries:i,writer:r}=e,o=new Uint8Array(t);await kc(r);let s=0,a=0,c=Y_(r),u=W3(r),f=0;for(let[d,p]of Array.from(i.values()).entries()){let{offset:g,rawFilename:m,rawExtraFieldZip64:y,rawExtraFieldAES:A,rawExtraFieldExtendedTimestamp:b,rawExtraFieldNTFS:x,rawExtraFieldUnix:T,rawExtraField:E,rawCentralExtraField:v,rawComment:S,versionMadeBy:I,headerArray:R,headerView:O,zip64UncompressedSize:L,zip64CompressedSize:_,zip64DiskNumberStart:C,zip64Offset:w,internalFileAttributes:P,externalFileAttributes:M,diskNumberStart:F,uncompressedSize:V,compressedSize:B}=p,j=or(y,A,b,x,T,E,v),k=46+or(m,S)+j;qI(r,s+k-a)&&(await v0(r,o.slice(a,s)),a=s,f=0,await r.closeDisk()),d==0&&(c=Y_(r),u=W3(r)),L||Uc(O,18,V),_||Uc(O,14,B),(w||C)&&p.version<45&&C0(O,0,45);let G=id(k);if(G.writeUint32(33639248),G.writeUint16(I),G.writeBytes(R.subarray(0,24)),G.writeUint16(j),G.writeUint16(or(S)),G.writeUint16(C?65535:F),G.writeUint16(P),G.writeUint32(M),G.writeUint32(w?4294967295:g),G.writeBytes(m),G.writeBytes(y),G.writeBytes(A),G.writeBytes(b),G.writeBytes(x),G.writeBytes(T),G.writeBytes(E),G.writeBytes(v),G.writeBytes(S),X3(o,G.array,s),s+=k,f++,n.onprogress)try{await n.onprogress(d+1,i.size,new ub(p))}catch{}}return await v0(r,a?o.slice(a):o),{directoryStart:{diskNumber:c,diskOffset:u},directoryEnd:{diskNumber:Y_(r),entriesLength:f},directoryArray:o}}async function VTt(e,t,n){let i=Aie(e,n,cIe);if(i){let r=await i(t),o=or(r);if(o>65535)throw new Error(NDe);let s=id(6+o);s.writeUint32(84233040),s.writeUint16(o),s.writeBytes(r);let{writer:a}=e;return qI(a,or(s.array))&&await a.closeDisk(),await v0(a,s.array),6+o}return 0}async function jTt(e,t,n,i){let{writer:r}=e,{directoryStart:o,directoryEnd:s,signatureLength:a}=i,{directoryDataLength:c}=i,u=e.fileEntries.size,f=o.diskNumber,d=q3(e,o),p=or(t);if(p>65535)throw new Error(Tie);let g=$i(e,n,W5),m=Y_(r);if(qI(r,(g?98:22)+p)&&m++,d>=4294967295||c>=4294967295||u>=65535||m>=65535){if(g===!1)throw new Error(A9);g=!0}let y=id(g?98:22);qI(r,or(y.array)+p)&&await r.closeDisk(),m=Y_(r);let A=m==s.diskNumber?s.entriesLength:0;g&&(y.writeUint32(101075792),y.writeUint64(44),y.writeUint16(45),y.writeUint16(45),y.writeUint32(m),y.writeUint32(f),y.writeUint64(A),y.writeUint64(u),y.writeUint64(c),y.writeUint64(d),y.writeUint32(117853008),y.writeUint32(m),y.writeUint64(BigInt(q3(e,r))+BigInt(c)+BigInt(a)),y.writeUint32(m+1),$i(e,n,Qwe,!0)&&(m=65535,f=65535),A=65535,u=65535,d=4294967295,c=4294967295),y.writeUint32(101010256),y.writeUint16(m),y.writeUint16(f),y.writeUint16(A),y.writeUint16(u),y.writeUint32(c),y.writeUint32(d),y.writeUint16(p),await v0(r,y.array),p&&await v0(r,t)}function id(e){let t=new Uint8Array(e),n=di(t),i=0;return{array:t,writeUint8:r=>{YTt(n,i,r),i+=1},writeUint16:r=>{C0(n,i,r),i+=2},writeUint32:r=>{Uc(n,i,r),i+=4},writeUint64:r=>{Y3(n,i,BigInt(r)),i+=8},writeBytes:r=>{X3(t,r,i),i+=or(r)},skip:r=>i+=r}}function Y_(e){let{diskNumber:t=0}=e;return t}function W3(e){let{diskOffset:t=0}=e;return t}function qI(e,t){let{availableSize:n=bE}=e;return t>n}function q3(e,{diskNumber:t=0,diskOffset:n=0}){return e.offset-n-(t?e.initialOffset:0)}async function HTt(e){let t=await Uo(e,0,4);return qTt(di(t),0)==134695760}function LDe(e){let t=di(e),n=0;for(;n+4<=or(e);){let i=4+_9(t,n+2);if(_9(t,n)==1)return LDe(ph(e.subarray(0,n),e.subarray(Math.min(n+i,or(e)))));n+=i}return e}async function GTt(e,t,n,i){let{writer:r}=e,o=new Map;if(r.closeDisk){let s=Array.from(n).sort((c,u)=>m9(t,c)-m9(t,u)),a=0;for(let c of s){let u=m9(t,c);await hie(e,t,a,u-a),qI(r,await WTt(t,u))&&await r.closeDisk(),o.set(c,{offset:q3(e,r),diskNumberStart:Y_(r)}),a=u}await hie(e,t,a,i-a)}else{let s=e.offset;await hie(e,t,0,i),n.forEach(a=>o.set(a,{offset:s+m9(t,a),diskNumberStart:0}))}return o}async function hie(e,t,n,i){if(i>0){let{writer:r}=e,o=0;try{await BDe(qte(t,{offset:n,size:i}),r,Ue,s=>o+=s)}catch(s){e.hasCorruptedEntries=!0;try{s.corruptedEntry=!0}catch{}throw s}finally{r.size+=o,e.offset+=o}}}async function WTt(e,t){let n=await Uo(e,t,30);if(or(n)<30)return 30;let i=di(n);return 30+_9(i,26)+_9(i,28)}function m9(e,{offset:t,diskNumberStart:n}){return t+(e.getDiskOffset?e.getDiskOffset(n):0)}function FDe(){let e=new Uint8Array(4);return Uc(di(e),0,134695760),e}async function oDe(e,t){delete e.addSplitZipSignature,await v0(t,FDe()),e.offset+=4}async function v0(e,t){let{writable:n}=e,i=n.getWriter();try{await i.ready,e.size+=or(t),await i.write(t)}finally{i.releaseLock()}}async function BDe(e,t,n,i){let r=t.writable.getWriter();try{await e.pipeTo(new WritableStream({async write(o){await r.ready,await r.write(o),i(or(o))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{r.releaseLock()}}function mie(e){if(e){let t=(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4);return t<QPe?QPe:t>eDe?eDe:t}}function p9(e){return Math.floor(e.getTime()/1e3)}function kDe(e){return e>=bDe&&e<=xDe}function sDe(e){return Math.min(xDe,Math.max(bDe,e))}function $i(e,t,n,i){let r=t[n]===Ue?e.options[n]:t[n];return r===Ue?i:r}function pie(e,t,n,i){let r=$i(e,t,n,i);if(r===null)return i;if(r!==Ue&&(typeof r.getTime!=Bo||Number.isNaN(r.getTime())))throw new Error(dDe);return r}function Aie(e,t,n){return gI($i(e,t,n))}function UDe(e,t,n,i,r){let o=aDe(t,n,i),s=o===Ue?aDe(e.options,n,i):o;return s===Ue?r:s}function aDe(e,t,n){return e[t]===Ue?e[n]:e[t]}function WI(e,t,n,i){return TE($i(e,t,n,i))}function cDe(e){return e+5*(Math.floor(e/16383)+1)}function bie(e,t){return e===Ue?t===Ue||t>0:e!==0}function _9(e,t){return e.getUint16(t,!0)}function qTt(e,t){return e.getUint32(t,!0)}function YTt(e,t,n){e.setUint8(t,n)}function C0(e,t,n){e.setUint16(t,n,!0)}function Uc(e,t,n){e.setUint32(t,n,!0)}function Y3(e,t,n){e.setBigUint64(t,n,!0)}function X3(e,t,n){e.set(t,n)}function or(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}function zDe({version:e,bitFlag:t,compressionMethod:n,uncompressedSize:i,compressedSize:r,lastModDate:o,rawLastModDate:s,rawFilename:a,zip64CompressedSize:c,zip64UncompressedSize:u,extraFieldLength:f}){let d=id(26),p=d.array,g=di(p);if(d.writeUint16(e),d.writeUint16(t),d.writeUint16(n),s===Ue){let m=new Uint32Array(1),y=di(m);C0(y,0,(o.getHours()<<6|o.getMinutes())<<5|o.getSeconds()/2),C0(y,2,(o.getFullYear()-1980<<4|o.getMonth()+1)<<5|o.getDate()),s=m[0]}return d.writeUint32(s),d.skip(4),c||r!==Ue?d.writeUint32(c?4294967295:r):d.skip(4),u||i!==Ue?d.writeUint32(u?4294967295:i):d.skip(4),d.writeUint16(or(a)),d.writeUint16(f),{headerArray:p,headerView:g,rawLastModDate:s}}function VDe(e,t,n,i,r){let o=0;return t&&(o=o|2048),n&&(o=o|8),(r==8||r==9)&&(e>=0&&e<=3&&(o=o|6),e>3&&e<=5&&(o=o|4),e==9&&(o=o|2)),i&&(o=o|1),o}j5();h3();_0();vE();yc();_0();vE();Rte();var dLi=1024*1024;EI();var pLi=1024*1024;var _Li=1024*1024;var yLi=512*1024;var KTt={};try{yI({baseURI:KTt.url})}catch{}_0();var $Tt=[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],JTt=[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],ZTt=[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],QTt=[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],eEt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$3=new Uint8Array(288);$3.fill(8,0,144),$3.fill(9,144,256),$3.fill(7,256,280),$3.fill(8,280,288);var tEt=new Uint8Array(30).fill(5);function K3(e){let t=new Uint16Array(16);for(let r of e)t[r]++;t[0]=0;let n=new Uint16Array(17);for(let r=1;r<=15;r++)n[r+1]=n[r]+t[r];let i=new Uint16Array(e.length);for(let r=0;r<e.length;r++)e[r]&&(i[n[e[r]]++]=r);return{l:t,symbols:i}}var rd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function jDe(e){let t;e({wasmURI:()=>(t||(t="data:application/wasm;base64,"+(function(n){let i="",r=n.length,o=0;for(;o+2<r;o+=3){let a=n[o]<<16|n[o+1]<<8|n[o+2];i+=rd[a>>18&63]+rd[a>>12&63]+rd[a>>6&63]+rd[63&a]}let s=r-o;if(s===1){let a=n[o]<<16;i+=rd[a>>18&63]+rd[a>>12&63]+"=="}else if(s===2){let a=n[o]<<16|n[o+1]<<8;i+=rd[a>>18&63]+rd[a>>12&63]+rd[a>>6&63]+"="}return i})((function(n){let i=0,r=0,o=0,s=new Uint8Array(1024),a=0,c=0;for(;!c;){c=f(1);let A=f(2);if(A==0)d();else if(A==1)p(K3($3),K3(tEt));else{if(A!=2)throw new Error("invalid deflate block type");p(...g())}}return s.subarray(0,a);function u(){if(i>=n.length)throw new Error("unexpected end of deflate data");return n[i++]}function f(A){for(;o<A;)r|=u()<<o,o+=8;let b=r&(1<<A)-1;return r>>>=A,o-=A,b}function d(){r=0,o=0;let A=u()|u()<<8;i+=2,y(a+A);for(let b=0;b<A;b++)s[a++]=u()}function p(A,b){let x=m(A);for(;x!=256;){if(x<256)y(a+1),s[a++]=x;else{let T=x-257,E=$Tt[T]+f(JTt[T]),v=m(b),S=ZTt[v]+f(QTt[v]);y(a+E);let I=a-S;for(let R=0;R<E;R++)s[a++]=s[I+R]}x=m(A)}}function g(){let A=f(5)+257,b=f(5)+1,x=f(4)+4,T=new Uint8Array(19);for(let I=0;I<x;I++)T[eEt[I]]=f(3);let E=K3(T),v=new Uint8Array(A+b),S=0;for(;S<v.length;){let I=m(E);if(I<16)v[S++]=I;else if(I==16){let R=v[S-1],O=f(2)+3;for(;O--;)v[S++]=R}else S+=I==17?f(3)+3:f(7)+11}return[K3(v.subarray(0,A)),K3(v.subarray(A))]}function m(A){let{l:b,symbols:x}=A,T=0,E=0,v=0;for(let S=1;S<=15;S++){T|=f(1);let I=b[S];if(T-E<I)return x[v+(T-E)];v+=I,E=E+I<<1,T<<=1}throw new Error("invalid huffman code")}function y(A){if(s.length<A){let b=2*s.length;for(;b<A;)b*=2;let x=new Uint8Array(b);x.set(s.subarray(0,a)),s=x}}})((function(n){let i=(n=String(n).replace(/[^A-Za-z0-9+/=]/g,"")).length,r=[];for(let o=0;o<i;o+=4){let s=rd.indexOf(n[o])<<18|rd.indexOf(n[o+1])<<12|(63&rd.indexOf(n[o+2]))<<6|63&rd.indexOf(n[o+3]);r.push(s>>16&255),n[o+2]!=="="&&r.push(s>>8&255),n[o+3]!=="="&&r.push(255&s)}return new Uint8Array(r)})("zb19kF3XcSd2vu7He/fdmTvAABzigUTfK0gaSxiBkqghRarWc2jODIcgBCXRH/6DVSQEDkXcBwJ8M08Q5ZX5hp+mbUnLcqlcjEsbY72qWOVIFVWFu6GztEXb9Fq70Wa5iVKljVUp1WYrqz82tXJKteVKKUT46z73fQwGIEhq7XAKfOd+ndOnT5/uPn26+6jT249qpZS+t/OgGQ718EGN/5nhUD1oh+GGFNWDSj2o9PDBeMj/6eGDyXBUdEN+RT+hh/YTd8baGe2SRCudqpbGf0qpVGltrLa2FWUqUq7tXNtEURRp5axyShkXWxfpx3S7HcVaP2WeMnGqh9pf+u0oS37DHY4f3Xz0wtYXjOqcPf/wudODzY8/cH7z8yqZG12ePX928MDW6c+rNJ+6p9rF6PqxrQtnNre3VTauZfP8Q2rm4Ojy3OntwQNnLpzf/tyjmw+p2Sw8kMaar6Teopi85Kbn5qZuffZXzj6m9s0290atj2rlxg80V7vbfmhzsu3mitveX0xectvzc1O3uO0Ds829pu2Do1rR9oJ7eGtzU5kDzc1dIMSPnj537sIZpTOu9Ozpc2d/ZVOpGx944Oz5h85ubZ4ZPPDw586fGZy9cP6BwenPnNvU6sYHNh/dPrN19rHB5vkHtgenz/Qe2NrcHlzY2lTR4SsefXZz8MCZz21tbZ4fqLh64IEzj59+4Oz5M1ubj26eHzyw+fiZzce48q3Nh89c+Nz5gbq9NauV11lLHep2bvj4LR9dbv/9PzF3GpV95/06G75H+aJXtY8qs3LlHyn/U33SrfhnDiwaVVlfkPJZ7f/a9lHY6FaxtxcrdbHS3vYdvtB+uO11n1RdGW8HlfbfPFBXivSieelApRdNWkVrXCNZ/wSZz/eXjerojCJSy6ZDiqJlk2akfVqXijRxLcbbrWXjcFlXGpU5r3Gnk2UU+y8xeOnJXJMGFN6QwkeKTG+LNKlB/xGAOKgUg2NIMThqNzj68/3KjgAyAMgEgBTFAQhFcV054vo0xb0qElhIka7xtqLUrVDqH++jtVL7FwFfacyQrNeUentxUCX91dAuJVv4RqNRICgrLTq6bFKyDQxafqyAwrjxLx4gt2yU/9IBbrSTZf55RkS2mmvKHvFmsGheuqEywNbjfYp7pSNTasvjtGiKSq06Ls1XajXXGbAS3qw0Adtuo9LdEj0zpLulIVUCzIzMolkoW2RQ6FRq3a2glFa6GUW9bNJOm1+cr7QbkvHzdYTLotKruSXjizorI7tCUZmQrpSfr8sIIMxXOlekfBGuC1xnlHiFXrYyPyxjUv47wxP8WlZX2j/eL+PQ+2Q1V/5ImXolPVb+p5cvJyfdCsX+faCri5+tVO8iE6nXg57/O3WZZoHg0wZpGqOjSlACfij2N1Lq9cWeV5T6I+vdQWkaRDY4s+RO5Yp0GZGtXK68Kh3pUnUsyIfxbInH1t900bt+zX1b65Ii2y0VGa8HpSH0Fh9EWwJD5A2lIF1FqrdFSR+jZUk1A1yqjHj87MrkCBpyG6Umg4GUMYxQaFDqhqQF3VmluMVoNVfkZDJR3ENXIgxzShEKYZijK4c5zXBXhjniYY5GwxzxMBu7QgZkLcNsdg2zmRhmK8OcjOd1BA4kU0iZFYqYPH1xyq3IVDSkRxMwqgGSGs9WTCpF0WjqRtP8w6vSeFXqDLMIX2JWGa6BJ1mnBTheYDjMhlvxLxwgwwDg3a8d8F/jRwIHPpsEZsQwmqoCJR2vK2eG/ocLi0a5Ff9v8Qs6+/HCXcPbjPI/Wrhr59LOzs6Ow9UPF6jtO7V/rO9/8Af/6x9E22j5JwuMJv9q+N2hrNJ1Zb0i3auSPhjTyTz1rywwBt2Kf4lLKem6alF6kiJqbWzlrcys+FcXlpTyDgyp4fyhX/jwtYVSCWXhcwwGRZQypdUbuWWukQoJeVW4yvjhWm5Jl9b/iNtUXveqiEwfzIZMDyy1ZmLu16XNyAJUG0BVI1AjsnWVUHSSFCUbW7nLyBauUmTWc92J8J3pYTbgLlOQEqDWck2GJwUg0RT7W2qygFuVpuMyQTjmB9lezUKiX5nCyduGbF1aftVmZPxwPTcZ8PwqvvIOvDojHTrKPUY7W+CRJ7fyCL9gBbFfrE/mUeZfWpAOoTs8Vi/zlQI1vbyAiaSyEcLdGOHSJUy1ReOqqF7LzRjV6MZXhfSASTInu2AWXxXiZULz312AvFD+tQW+6b9+wA/x+40DQnoovy70g/EVcSbyOlo2Lx0gDbny8gGwybpSntZzlWECWL/Yq5R/nEzPg9R6eB+zIchnlmY0loqm9ouYa5cO+H8fGu64DJzpJGTMiS3pWcenfZTIUlTj/a8dIOcfJ8etKKnYv3BApiPQaUj1GKeQ8aE5Q26P5iyjpBPLT4M8MicmkCZDHzH+zQoEUxgBsL2Aed0x4M1LCsCu5jYLo2VWmtFyIDTITqbFKtoIgjVlWXIV/CV74C+5Fv7IUeTfTxEqqP3xXgUicL6oN7qV9l3Wlfz3Fn7BqNtMQdq/JsXUf2+BVSu0t5s+Ai2Q9gu1THmfNOyLlHfQx6IN8GhNbg2CThjpE328xepCrzIBalZglIHcvwwVkkyjDikzDPqk9qzeXRxUplGGNBlWhlgDU6wMafQMypDGT8d3SuNTsMsjLDIvB+Fu/PvI7CncVUYO0+wwubsYHcqbgX/phrrUzOpEbYg89MTKMiTPQy2LRC1jJQvgGH8jKmUVQIkKwFJdiRZTNZqA4Znqb7oIWQuRLrPB9evKQsxFLOZQbQHI9LJZ8GlpyFW6VL7TqIEVd7sjAKTShZQn9kJpfCcjF2QdKF7YSBBUCgwVMwUy6B2JKpf5nQP+FnyoGv1FpCKTNdmap1pDwnWVjmrQ/nHSctNSTGlduV6ZNAyOLLTtrwXNdTSXE2GN6GTQ63UmIl8+GKu6QT254gMQiWAB+LNgmcrbvtdrmLzQD1u42ykNL2uEJq3oMkZWAEKV/gmwwouyLjGZEHJQwdNQ90IZGzBou95Uopq3lLxl+P58pRx0fqhEVhTuXJNllUjbFdYUVQXNuNSiEqlcsWYMxY0/AK1EPvQL2kpG8WqupP7DFUgZhPfSDYwo0qBrGSqTa//8AaFudKrpET6leNEUeD/GuwW6xaX5jAyvBAzFy2YhAO1WpGOFUMFCFvoGfZEfzI8eJNSqy4QstZjYXcmkrkY8omFqjpKawPUoCWOR7M0fkrfLH2SidGRiBT5h0ErgE4l/HyV78gmD2Wgm+IRp+ISa4BPMtAZV1PAJHfiEGvGJxN8IVZ75hAlLBZYOMuZVo6Mn4BNYCmCwRfUH8wWfiEbqcDTiEwoD4po+ukCNSkjYiTounMKHVyfwkFEqM5vHPxUKikBBGhRkmIKwEibDFMSTSzEFURIWxsmIfiJKA/2kTBcAhEvzYSVCilLAIP1gRV2DfnjdsNAsF0A//GC+eWBWyPlZUTEdGJWaVNyF+YwYBFYC4XGEdy2FZ2CuNQ8HuUBdbm/qctdFXVaoywKdVrBqJ6iLWwnU5fz7yF1NClmRQnYvKYSZwUaLhq5MYxZgIS0NLgAud1UxJOTVLPfdSAzpRgyZQF7JeFGN2guxM2BeN520gbyMMDc7Nj/IAm2hMU1wn7AAFPJiztcS8jIj8oqYvMBmKbqCvDIhrxFxGWoF4mqNiKu1i7hagMBchbjMWxKX2U1c5kriMiPiMng3GhGXwyLTXWHlUWGJqs1wbOMhu9vKM0FaNqyfZWw7FBbVWqw8kHlRMO84UU8ZxRm1fVEfVaSy/z3T6RDijPvqUyw7lHc9oe7HoTOXEdvkdB/qmjd9lj9g3wpqpxU1eCPXbLsqgxGwkbxBunVgk2i0OBF3bj03kxJTjyRm1AjIKfE4LURdECB6WjiyvUCEo7Mr5NgsxMLRhTFthKMLYz9hFrLMVBwbIr1dzy3wxmQWkQ7ix46UBTY2qtnA8AEY81Ozh4RlAnZjCeuuKmH1O5awmjEbiHhCwmqRsIGImykaBcsMOqv7DGqwXvEIu0bVioKqZadULRU0pzEyrIz3eg6Di5gTXpTf2aCEYd0f1DA7pYZdWRnWZQ1yQYOkeNkwTUVsQ3JX6F1TVDQ9Mi4TWxTIKpowQ02Slb2qGcoEM9TbJyuT7Uk/o17KwnJMMtEukomun2Si6yWZ6CokE12dZK6Amyyl67lqJslsNtKJ1chsPZKUDqKJGZpq2Jkit9toHURVSqoRInosIGZFDVMjQan8+8CyLn620iIo9YQaZkUNs7vUMGeGZsUMpxWxZKyICYd1QqMLYZlIai91zIFVMzmMlm1qpI65kSWW3FheurG8ROWkS+e527YaYaFy0nfBhF8oFVZ2XmVlwtYFkRsBMzwYSbDMfJ0pQsMuMCTVBcPPvpTpZCicOTLBxACzE3NzE7i5EluWDnoE3oIBKoijYLrolHa0ELeiM+5m4WZy8imZa0EG8PumGVUT5iOvV5wbkuK5xhZcx4bpCZNvQq6yYvJljuZyxSxerhukTrNwM8nCtbBwE6agGq1ZI37ELDwANmbhdjQfFeajGc9HNZ6PolZNz0czMR/VxHy0o/loeT5ano9W5iP33DBmMW9FT1oICDKYj/xgvnkwYteht3vxbDXFs3UwCo17r94Oz1ZTPHuPyrBvFbAJMw0Tk/DsMdkEnm138WwzzbMnh2LMs+0Ez56mo4Znu2me7cY8++3TEfPsKwlm1Evh2XaaZ5s9efZb0Uh0vTQSXYVGoqvQyF5wY1EVeLZuBKyMjW54thnxbGw0aubZery6scwgTaPYZ7w9pGR1EzZ0zHhfh3m2RSOBZ+vR/pkRnm0ans0GIguerYRn24Znm4mlM+SIneDYLnBsE9YDLK6YlfobsVPKLNsKy7aAWAk1YJyYZWuwbAuWjR+Nt8C7RyzbCMsOpgsXEBt6KmIJkmC0nyU2NlKywlHNqpoX0NkGBOKP54NN3ic1NGzDSjMZNsJrNsKT+kXli8HJXI+NaMPZzP94Xrqps1iROqoyp96jMq/10Kz411Shq6DHux62Y2xfrpR/Tf0sw24Gs1qzbI5CGC8bIhV5lWVzirCP659gIf5Y0cq+anU89L8CoeG/mqKyD4NunoC1KVQa+BZVlm8smqPhd9Fr/8PbyM5ZVRlU+8XZYPw7jF4um9ub4TL+pTfUsnFglcVh0UJJe3WPaCb+sbUqXjY/uE22pLQv/CzF3RNlIrZUhWdYj170UV1iIw6kNtuHBsMkkGJZoktLieg+dtksijrYkQalklvJgOSOTd4j6WIq1DhPjheJzuv+srklkw8+Ia8effMKW22PsaZx10tvqNuw5LvrSbn3vduwx+1farOi+9ib3+zsOL+zYyju8hoUuPi0/HzKsx61yGACpXMm4PpwRhGPepFm+5hS0B+24bsiz/63u/V7giNGcRTjtNDglGV31Qljo6p4VcSxC5sKh3m1X1n/nTeUGG9e5THBDyal9lGvvImM/6Gqy5vJ+J9GdXmAjP+BqssuGf8TVZeHpIPlQTxXdTmHqbYCjWXRfKKUnb7qMHaQMadmyn2TLiLY+vC/KvrJFX/DPe/+nP7IggB7M0eiOElbH731Y8vtrJPPzBZz1swf0EfV+25YcH/nF1c8M7v7yqxzdFSa59K5Mu8UUqra+HmQ9+fbG90y68zwg04ZdT4ipcquTmC481FstydiT3Cr+W0gL7gbxEtKUTKgtC5hFNd1GcPeWDPdY3vb9Fcp9b/722Z9a1XcJhal4tllswjJlIIy8VfcVDFPLfD2nRoLkMK72pviJhbM/4ghkalx2Ksy6XyUQT2KfVuKsNt3Cxv+Bn7nDdtH6WLtjzy2CmbZ7zMt+X/QZjr2/6rpFqV+tu9TVvz8f8iufOouVhYTtYVeRdTyyUnuRdV2Q2pH4jGzSFFG0al+vp8Sjx0AUv63pyojW6adj0xjcfk6sWhgXpyn1F/WVwP1IwB151W4JZHyP0h3P2Q8WZbIwAvzBsXGUb/jmPca7PJJsfDpHcpRwa/eoSJxfDk8Gg6e4sb/Y5l8Cs4nZSJdOxK69rHr7doEXMvGsUVsSR1gbX8aJn4+BYkbQfLf7wFJg+Rb3wEkPr0oWhujHPLwWnCBVvfG0MvTcMkC3PqdFMOU8kZaAygrYVNwRiC3aThNxE42UZl2ljPFlBEtm7sF9hbbECNoYzytrIzs4hjaRSoo2hvazmKDAbzGRs+iszg9ph+5fnL1CwNQ1hu279PBlpBcmJQLF7e2ZKKzDnULGf/HV6Kp4OlKM6LLdEb2ft69Ey0qWWbzabpsPuFNudBZzkac5OZdDXyHG8joJm828uOiDuZzgHmrbFEMRSoMhmHlfzWfxYZ+D65Nk3216Kul1kRHmTz8n7yhSjfBrOE7xftxvRmrtLGZGIh/cFvVguYd+38/X1ftRcMuabH/2ULNK3SK/U+lGMv+V2xX/AuaH7zAG/NzwPeg9umdWgXUAxS74ndMGZPzO0Zec/xaC685vObCay8aru1FM1lbsrs2cv7SVEXpdEVUUMvvzJ3zL9xYQ+9JCf0C8DI6hW9h81rTnL9kwE9qKnynpgPUKo4c8sEY4WmyiWhXE1zjzxZqKngtJtVGqNa8WS1dUSu1eUEUDEefInPXr+/s7LyubjO/LIrUp8n4vxBmrH28nltst4FXw3yN0S1jikqwS/8axlPMKX8ARgtOWooTBxPS3h9+ION9vRIOQ4lP+hfLFFvlYQLtmuHR9PzhHYVoPMOTzi08w1N/+bLtV2BFw21fXBTu/+etKdmC1z8A8v/TCRl5dzOhpLeqs4Q3/ixMBbNo7g7sjneQNrqVpRmyNIPSan6MOljbFSTM4m6yPXAaS5267ODFXom3Y8AOz6LSMQsJU63zfmEdeWAdH3wbrONI/83l3JOmXjYP8XV0Ebcir+tl8wjfaV+EzHZ1lS2bBynxMzIWMxfLlBWlm066MN0o8jdvbLH66P/BFM467we0f95wnrbox+cydm5pU4aF/37KKPP7T3bF5YEytplRBgchu2zO0RzKg+P6hQ5TsAIF2zLrqIzX51flLp3r4y5tNBRLQ+2Jhij1SR9tTZNhXLZHpCgVHBRt/aDo8skyz4SDrLuXuVc05/fTIerSAcFWcaS6gcnrO9P6w/uAqn8aSIvR5FV5A9PQQ9Usfh6pSwx4RjlcjIa49csDP9wu96P4qXKe4rJFDssbRsU8pbS/782grm5cUrpqU3QCtLiat4GGHtAwOUlaQE2rmSQ6Az+98bg21WiLK5/AVc5IcsBQRG3GELUFQzn27IaNqg4fot6MUdpgn8nU4LewcmwILO+9PlimGokoF03z16anaAuGoSC7j4E4DD6JvAFcEdsAYZIH6DRXe9M7rtlG2Mb9abCOvg2wAoFQ+yI7r/OkS9AWmFvbJ7vrfs/bqTuZqDuRui+rvs+w9wArcEwwkuX1xjUQIkqGYzkg4xZj3DCcZR64RqDmHPNz9B3fO65/6gTdP5ue3e8FybbGBB9mASQSze5J8/8wvbKCeNncL/zvsWXzacgdpnkGE1RPh+jmKyr6qz0q+ouGz9wQmDEcnTsfxKPvjhnyD26r9pPz8cYWzfinzMbW21KCqEMztX/S9MpZFGlfry6P8NYvlsX7ZQGdL5pbq4zyRXOsoros/RDl+3muVnIhE/c9KH66nMfPp8ob8bMC4sYi2eLn9nIGP7eUR1nGzbDLeSAaW6OomWAG4GmRL7ZYm8Ucy+hGsvQenv7wlQrehwkYgWOuSO4iWMWSUhUPbwdlc4dS1AFddDAxnC+gRSfHtSlbZojN7r68zXyQ5zlsDifDnYitlfi8PQEnw5bWGUnDfkgO3e/DsafFgGQ8P7l77dGcQHHUvVR4Rzv0MmPuVoXujbsW91gxiDFRuGsx98AMKWbQg7NxaanNk3NyAkISsAElrSt7MleHBAAbHsN2jO+8qTM2QDtpS9B4XENoNj2rqzZ16EivciecyDrXqxwdPZkrjOf3bkNAwb9tl0mnZNs9ZcDpDBG5nohpcpSd4Hul3MONXuVKuO21TuWwWvKIqfGIweGjZlGle1UKQ+VMmVALbbcoQzDL9X3VEVbboqxXtmD7ngGPARAZuSpF8+rtVeR6ZQssqOXtKTf1JQ/bHUqPyM/gpV7Zog6YMiq1jeLSWs3jiW9b3qzlUUOtcWgOSm+ngnE/De8l5EIbXOI2EqnciUBAi1g0nADQrdU8kjfVHcqilXX28XKhlYTSJeWwdk9gZuxglyL2r6q+W/H/GrtyKaikjDtHIppnwgCRMnHETBxCsx2dsQbj8ClG/8bxu+MpMno3g9IHbb6fHz7k/ygrk043m0QfZkcHWwX7T+Vd6tAs3Go7h4Jd9PXbJhWGWVEY2rsUhjalNCsKQ47JlL1dhYFyMIpZs0I55l7udY/NKTOoJivbXpUZTzua5Y7N+yHUmZqBynkWY1rnfcouMhizordk9cbbgyMC6WJyZmAEs0tKlTnNMnAQcrO8nocGWgM1uxSYHDCLXdT4fyEC5gaMMfX51ncaJW2Ij+URDz8p/0fTFiPob/6fNe8f8bO0v0txHzr1fY2QzShbzVu7hiKiLHQ5uc4uswR9/bamS2FBAarLGpaEXjNmkgYzjZzvZDSD9XiHv8KkaWQmzaD1mWaWUTBcRiGOqNOeNl8cvc41iKJ9NMPORYtmvpZdKrNoiN2AiV2bq9YqBOzalggn2yvZoHq4DOv8edAUtcmK6ZKh8q5ftkBh8uBmGKwNTdgpeHqnYplJ39KEws1013Ls3/zLKaMmzZT7OkcyXvnxBJuHHd9QayBv7W0i+aM3FE9jWBFVvxvsMZ2bM9YggCFwJJ7x1NzrHNnj6V5f3LTHPTaQ/U8C8Wi5LOvnpCN+bXeXbdnhlmXsTLkP3/xLoV8Ytf0/b9a77WXz/dsyYSSizfCIfLrMd1FvjqnUH8/gMSNJr5Oaea62zQrP3WpWQrOYwEU65pDDg7rczxxkVjjILE+c/czFGg4CEV7lYw6SviMO0kytMmGVoZylNgNIeclTLxlzksnpNTviC/8621MvZ/z+jw1+Z6GiMGvAshQmiWVzz5hNTOCYMrcyxSXid8El7pnkEmhxuhNYULWgUBr/vaBGz+RsOJvpzEP/QxWVlQkdib5jKcLkNovmFqg8Jqg8BKVnikHuCxXcitisDRnj2/G/Y6GOXh22lm+nCLFVGauubFjBTni20cVzZg9RuA03SEN42phaWmxWaZWWtZZoWmuB0YPVUngvstJELXA8VJbPjhhhZ3aP+TW3x71ij3uz4yUVM78kmLsyrEaDuWu0+ICdyl7sVbHsYM9SpwdTTRWWKPsp7vmorniNklOEeJ8IK5Sc9YaIxxFLlektN/bh/c4bah3sL4iuNGNDWIvtGQmifcU07P9wvF6ar1rBls7YhRO1o+hEF3YtYcRHqzbGto2tvDyUFqoMP/MYwwgkEFFeE9aqUQ/eonB4zU50YflaNPNli31899glCUZ0GMmCvb8xlFVslBerWLCRZRTlLYD/P0yYUe4ebSugE5BZkFOpLMhrTGbbdANOxvAUPoxwZyX9beMGnWJQ2mweu5v1BrJ3KAktZQICXja6ubr6HsaoJ1HoSdTY9SLuwWquERna7A8o2R9gBv5P9uxOMdGd5FrdObq7O4t/Q91Jr+gOtkv9K5PEFWHQmZmNd5OS61MiBLYGoBSGisNrzGSemtbCbDa17RF2oLyGUMbStCVbdcey3buku/Y2OEAAqwNAvppHU5pPdJ2aT8TwauIZSQgPVf7lKabIQLrSstYfABcR7TK6AfZrAPq6vOs1FsPXbb8IJjkw2FyxepVzWJCrYtR4Av4R3q3n2Kn4F3wdnALsorlddGIbfDrgJbU48OwuSPDtiOHJEa/mhl2Nj4mdgB0ub+EkBfw+2NYxDB2Lixa5U+zp1CHXI1eQkMmt4lB+bNncEtyfICGSmjrU6sHHp1fF1KKYWhuV61ZxQWzcAox4BRFqcY9wm32ldlXHF7dyxgXPvp0AtrXe5RcXzS0VL7AVG+3jmpVGuCmUM+y2UDKrhv8iHcaiWNxTuTfxFdpszNpsQ6VjdRY+GEglYEWjbZERMTjP24uW4uImiVFA8eYMqD0s43kLu84sIsQaYbrYZOvWfkdLGRFq8NvALeijHM/xp7hBCvaxtW69bI5R5P8uRV0O8IwYqC4Hxxxe62L017rlgtDY/xxo7IvlQkaFxAgsZF9t6c5wwkFIzFRqESJng20tM7x2KrS45aycepNRjWL/2Gbk4YKb1RzaiKQfZUYzCDZooQuzUE9z6H6eYx0o8zsGnjuZdzXxbkerTCinrCdx114PTiKimv30WpTXZcewnRyv4rUq9QUqaEFX9Lq/5Q37wbUoQzx4GqIyOtQZxWtgmV9gCgYvys4aR+qjmNdQKE/mZu/6UmkyhKUhZLIJxU1DyN2L4xq/1NSYUraRI5AwlY9Z4d2z/nwU8ZYiJC6VmLcU8VMhcFZIBx9S2nzK7yaUTKYpSLBDwVEheYgKSUK8GfBQpd70wagwSnldzQFCmHazXrkPb3RYQU+Dw2AHG4gJtXc5c6aTgY8JlhAdaqOdNLSzUBZsIOusT1Qy9Zbh+/NV4obUYYfODlSNBFy0ww6dMB3kWNhUbTh05ujmfJVAFYHRLhfdJIFyl04EPrYzKsRfswMWh0QdcPJ76QYeG0rYX7MN7Lan/TXTCX/NDrZO2V+zwLvsr8ml+Yza7HfWpgLsXYCGhRMdKwQZC1noG+tNeDA/erBPBGIYybkxEcxNj6QM956UuC9Q9hXfUEr7CgutNMkoyRguCClGDKYuaw+H/Bf94zQT4n8Sb/tdXjyiLmzSJSe6/GWLZij5WRsaxExhqJVVM1N+fp8QAXV7RoZNmpqMvM2Sqmjc+/ldJ9z1dlF+I4rnlOKQOXaAcz3IMvEb67EXKdz8FwZb2UPaDOHQ6J/A28XhwGYPwxn/dvaT3e1GB86rg3ed3uVdxwk8GI7CkCoM6cg/kWVFcIwMXnkruzwlZ4vWrjv9K+4cKVpZW1ylZ4s7mmJ/XDxS3LHboy8q8uy/fK/OJVbhCVLFcfjhndjK1aHGi7/x6DsskaGOHbbg4Rd8H92aCAjnfydaD7u1/wH7OQ0TL1ZFFVjk5ZNehpAZqwuQTKr4ML8oawFXOpESw2Wz2ES1uLUtDrvwn/cceHqiW7MbLV9b7+7t1vdu5fDsvoYXnvMfWOeN/N+J1iUcwa3mWWef5AgSu9xfsUIm2YBu8Z2B3/kJNns9u4jg5vPa63tF7X1GV9abe3LlX8Vyx/p4I1eQma8icjpe6wavA4q2KutpSxaY57qV9UceI7vlj2wXt/EtCVs+rj+CaxRuKW7L2KOWzT2iLDJojCzgLehXaML5j0voeFAy+fXGX0mz3sAtp7U/wja4vZ/9pr7Gw/QONQqUFO/Cvd9T16jjP9UzbyQeisejtf6moHDeieLCo9WFK+M9YTT2qoXcNVqwYracxj7TtFDoLKulR0sODTxcslIJixfUP5g5oOLZpvKWVM4Qt0LjiVfrHipV2t1iuG13y3NOqO6WL7By6m4xDIvmMCvwTWVRgDQKFdnre4v9AuXF4zq+juqWVPLWb71b5DPYneuAhjNTIBwTC/zrwcX89eEiIpstmmO8a6sWMYWgi+MznlHscTJeLxOn3JEJyKzlz1VvJjKtVsvy5stfKmQWcv7fwTDCKWSYWpjDj3uxQva4nmedvoeAQQDreEtV3Hh5pXBKpnqKSHHpUcFf1LxXWI3cfDowXcyHV46tgu+cCrvQ4/64Gip5r+nSpHF8RNsSI9IrY6+avXoh9U52FUDiBoZ5jm6fAsOSO7kXGHYCDMYo72mMFqqHF81hEQjzvBFrZHLxMPJsZ10qDj1NrmwiqXlFF5oYsc0o1BT0VNg/YXAQTAQCIYrE5AHuHUhmBDboxQYTRuijiAOkTEtO5mo3FHYMxbijf6kaj1mu42hTx3/6vh59B319Jz39d5NDeUyGshP65I34lTSAOoEOlV0dkNHTa07lSSmY7cG3bUPMyYis41EpGpUEGg5eMItmgJh0BHqxtfN3orVcN4rGsGF+IhR1cUuneRZ4oGm8lIz/KkzCdvQQ1Zri1okWYiGRl5bEXKKlt/cjW9on3VDs1bZGMA3rDWR7Xhe/IG+dY4eXRaOKD3vr+Ra0qq70SsHdrrGCnxsN+ZuUcGmpEnxfWiKmtheXJmXuO3gs4xVxaBWSXdjjyOtZwzeIvxl43Vs2gwA27IIOzl9cG/7/9aVrdx3WWa/26HfTZ866lkmFbFh7Syxeq7bV3AoOn98Pw74MIzsbii8ad6mK/dOGd5NGqD4nbqgYYb06fmmjnycU734T/jUnhNPfzna5SUpYaxSud0kJyQgnrXeNkySYlW+HD4ls2zpxMEnqqu01QsOqlPe11tmOii2zUcms8yr6KVOXuTcwLk+H6iC4pa4iOMqkkr0l4o+MlBBzKyW3njspRet5JKV4PY+llKznvP8O9lBXUV21GBzs1v0/egMOO2xPzmS3pgVWEMHjoYUBj+DF0eLgUHhptDgEFL4Z7LwS+biWTeEIrnhABoxEPfSJ80lZiuGOG4b40hK2orzdyPUhuP43c4ZnDLIM6skpNXoc7TnjrniMmnuV8Gu4GSypSy8gtp+y2j+T7pqDHX/ptzRi7a6cnYvmQY7XEcJkmmXn4QGvGZlz8Fxl+gQoGQcyJsxPMM/sdL/sLsBHj+2e/briMUV4zIPyNjhJNs1K1LtiJSrjziIm1XfO+b/eDx//OaWyyvon+t5IMNvvRCztrP/VPm9i8oI2jw9N6n3W6/WR4MBytjcTKa210ewN+fKSTNVXlio72OK8XdbPfJKnfnynfnnpagp0fPXVC2zEf7gUVFxU7PNe6bzxBdneRY4YAOnUI//4V5b8731JH9ciHWJ/iS+wbzPYqgIUbGe1PXL3jNeBjcR2e8C0+9kYJji/Bcii3kWuHVt4vuiJQd3VGUAiUyyGUEyW7Yjtteuii9wHK4AJu8J3V1Hjyc1hZYosB6Q2sjZwVP69v/EaH9kf+A2W/mLZgKsnM+QFUM59uT0kOggowYwk1JU41yNt5eqvNNrKcf2R8i0qWlIfLd+yrfTdvTIGp/3W4GTXfoX3lNgfSvvi4rRFQ+bVAlKB3utCMHJvlAppNWNT1r9h89HfzQ5rPbkfUNw4YTjL/onWdgiLFUxz0cgkh4Uvp7e4hmVOg1Cu/XzlLZ6/A8vfr7Kl6q/UWjdDgK0uTNZiY9y5QmernIsJeTFC3POioV3hzocl+N5wMptA/M5//w3V8w9uMFjZ11omGSZPkA62RARVP418W0ix+DSz/Bee1ixpvMY2rzwVz7BVcDpkZpYgFoS6wUORY304bhFh7lXLX3ru3/xfT2xjD8nrfre0k2E/YNOwub5wZ3B/4L1Gzg9cWn/paS1l7AroJoxojdvI7kr/c7dy1w8MZXfZ5361bPObj5c2xBu1PwX9un2XfpoLzh/pc07pS09rskVVslMx4MA7z5dtBif7fd8eVJyT8IVfepPXvPBnSDM1alrCrbDBCudIB6ctW1SSi23Upewu/UX2LsyALWzuKvkC+31FBfkOGMZfcDLfbdku98c32KXVrJL2SX9Vwmixn2sIw0F2mx0Z0ZMX7uQ1zDYHlyOtRdinjTgVs/GL56sWADcSioT8u6R/wRLF33q2yn9/XM8vlTEeLJD61rPVzNQDhQcFJd96tpqdepDgwZsa07eerYqpBxEeKLLferbKph7Yu3TZxsDclf5nuaE2UM0I5o2q9l32uarzfPNFzXm6t0toZTO0677aLqEUzu6+n2yzs1Cx+360LQ5Uu+9boK6N4WpLEA9Djn6VM9zvcpbxUhaMtxI8fhHpQ1r+l8+R4QQd33q2KL9FM0AEl2aBKy4VQCeXMmD82aIsLSfd5Dq4QYsUsumGG2LEMTpvNcKBFEK09XA7uuonFRIQ4akmNfl0/MBc7YG92gN3tQfR1R7EV3uQ7HrAPUylh2noYfZHEXNsdkArOfdOyF+0xrv/6DoS3f3VZduDYcH/5LI9gc1kh6z5BQ5J2Nn5RM1ihR+R2kJiEU7Yjx2tgPUwvZoKoUQgt/1oSpFDE4/5YgB2jMaQyo1r3JoF+/tLA03Wf/uDWM1pTi9sIfZCZXKBKLJQNOOiHRfduBiNi/G4mIyL6bjYGhfb42I2LnbGxXxcnBkXZ1HkwwQKzmfGKc1z1fSbNyq4gDH69gdlkL79wYYOjRsyHRdjOr5OjI5qjsajyZlumW7rSoWiGRftuOjGxWhcjMfFZFxMx8XWuNgeF7NxsTMu5uPizLjY4EuHXLa+CKiAQRiRKoOtyOss+2ctfRCpL1bYDSCsUhOPLVqx2BJLyY6nmrC7rQc1L1YGvEM6XrekwFsqeOOdAj+LDW+w0ubzdvg4Z2eqXpBmMbwxJSEiUlxL5v9XzTK03T1ve13OYPWaYAeYc0UkXpctxEvwfjq1ZSXLbbaaNnVw72SWFsnDZBwiKcEYDBAiMBJqneiWM15z3XB/S32xztkm9aDMQm+5ApKW0Ag8EdQnc91xqAZRh8i6sIrerm/l4jZMHTRoULN4ce1C9BjHvFfcESADruEmUUsMYSJRl3dqlU3g3s+XcxRV+8v5JhXZjDEKeXBm/U5Ocbec96/O+Fc7KO73T5pyDnvYO4XfmQlPZ/2ruTxV5RwcppA4Qq/5/yX2348p7lYLXtPMoJrd6OeYjmbN/yvnX3d4dCPJ3VkM7yHZMtpHM2yqNX4I65LXFA/KgxZbs4rmKKIDTX8RYHcCgUQ5zW2w5SX3P2IHi/241fN6UMV4Ex7UNI/FeVYmfkgtKnrVDYOyS/vIUMGuzOVhOsgDB8/1bs3uCnUVU36nNhTTDYgCiSmB7o/gG8/00RvIqFSx1xc5Y1zc58icESmNiL5XNRHqPTJ9RLRhZ6s06A4yvCQsEFadUCWOY5joavgR68qhPtxZ1uAWcHKLQ2qojX8nulTQDBXdqsAuyj46yP3aB1DR4WQATw72BkmoqCsOgMoF1iy00Ksyr+7NNSVlPDGWGAOaratZWjjR5zGkWbrxRH8rT2TKZST4SmhGIoFiCQ3aBy8icxE4TEu2IKClMm/mj8pkeiUyTSTIqRJaHc8TFPELUg7cGR5uHM2DNRSqVzJE2IQWX0sGTCJhOKTewUdCiZtiMpv5YfZBhYrsijBAJWZzzYcYjfUSTkmVZR/WGnJAh9wljcb1Magm6q70+WdHX0kAxu9np7QdBu1dzp1RzYEarKGhblL94D6gL1auWVKwTOl3pf2LjV6UfVNrB8ZLvcod5WyCPVbiOcEW818/RIJ/r+7p8qLDh+RbkspNBXTFCDnWcuIBE6hYk3gJywQKqVUcZT5hUI8Jso3qo1D5OYVYFUPKwicVo4Iblm1Ro/ezW7UdypEYcJupbEjP6PUJToUs2OqV4QCZy+xqkv2BZi8TNiwbxvZ/ZWRLHyZnPvaF794sN382P3lz/3pIY2UaHj05Hl7fqb/akkXot5ckzdQ3luT60lJ0tQ+v+iD7bw3DijU9m2sUm29gHorYgKM4npPtVipkXhzZfxQbCdimd5VnqrENcdK8ULltbEM+70leaRsMQ6p4f1PT2BQhNZmJVq541tg7rvb48mW7LebUq8A52jkOSSfFRRPL+YKCI+c8IQ/CfPb7mhOnhb5o35pAjQ7V6nH3X16aaHaP54wesVCp+3L1VjWxG4kMDNrnDNtKcMeUiIhyfPnqUvZfN4BifAOw7IH2LoFtIPAB7PQezuL8lnXi8zHkPu3xmGfZG22dwFqSjA9/wxacmJQ4+Vh70RyDic6GOdXyl3cu/+6Q1/2xZC5xbAGBUy+oHIoPe9Loi7wV02RT8Rq5RY/rl3XOVqxXwu93dW48jewIyC3BNoFgg2ihwtXGdMxZ48RbPIbbXsw+4UDLiwfr4gNc+vqo9FVdoxNfO1h8kK+f38/X32iuvy1v+jdwCJnfhxwABr1CmIs3YtKN4C3++v6mZyJ9pUeC+G8s4YtzdRX5uXqZGcKi+eaSb9c4JQ++YV0ucYyF4m1MnKPCoVyRuDxgSwuOs+5E2I5mv7LifZx5BbxBDop4Zal0UPH4BevNVrAlm6swi90EYa6LwNiQHGg2MAt9JbPwl57R/tKXdXGMCRGOYwEcPmtjBEiA7d0AFKYPrO0Mm+6JQAuhwcFF8ZUlGWrEwrxhwyFy3zgI7YMR0wnw0BTO3gVcEStbk7hi4ZT1JI98wAU5H9UZcq++IkOkx5AkpH8ukCTXhoSb4TtjSGL//14WJDFI+Rg5Px+Q9kJPlQZi6vTkfLamuea+q7PKBfA4P0EzMzkBFMXUFiUk3TUpcajXqJq3ngbp9XXA7An7xESYhHXED8BzKkOtYqnhOJWmhK/g0QBmVbyXt1RU8f4s++ctPTeUcxzSYGzntFeShdC+qWNA+3v9L9Rt5nXOR4Z/9/LBfv4HizyA/ocHwZWHHLstypoTQ7BaNK8vInP0fUF303wG0OuL8JdjQy1n1oGLWdube6qkK0cEpfy06tRQeFQ4uG2EtG8s8UbhN+Cj0Kakixj11UYKfXMJkSL1cW16y+abS6z+sMe8KI5YxjQD8/oiGm8HeDhWNGRLH7VneLkOr747xeljpEpqOGC7oNyy8qruc6HHfIO72+PK1aL50UHOax26zYdp/eggsQGh+JCA8/1FtgQvm+83X2APWuzZ8egQpMm3mqcBZ1ZyCISeOiw5UpGI3G1WjDmoLkSBVZzVnktw1I43oHGj144sFiOJ/LDj9QSwITvSaGzvzVU2CZsJsMkAc0/EjvHKQYQ58b5ORyguGVFcIScPpWVwxCsk726O/Kyw2YkdgiNYR/mdGI5gWHdswBAYBMGNvmv8K04eoJf+FXdft5xjMWukI4bmEBGW8C6IfFth76PaV1dwQ09oJuRcwKIDH0E63leZbjUL/BgxodkS3KSDZWcMU8CuLW5ONBtR9kkOAoh4RcltSRJjEeMzsj1rabY+J5I8nyRsSzntAxQ1RXgu5G04tAxrHl4Kcf4nWVDFZCo2GRoGJ0ftM9BkKOeQfVkpRfzQYNdaecNUklEmy33JBGfuxf96JbJdo/JV7qNu1vNGTItsipII2REagQ/OhSx7/hFniiI52S70OQKd4gy30OOIdDPXGjOmLLJkHwD+H3Hxnoi5sCk+NPFe9o+Nbg1JI+qaT4JjErh82d6pY++8JQejWeJ/Q6OUhrWXMK4h59sNi84s8DHHO1aRpMXhMyCyNT7IRAdW1hCFW4NI4JjIEzCdmCFsVRsSqBVMMDH6Gckk5A1xNpSzQGleihgZQi+ZrMpeOcCXrxyQRDrQDVsnBXvH9avy8NUDIs3Ucf2a3HntQIa0T20fexyK5dYq22267a13ZLsBHYy376e6FRY1l5ZY/2OVLwoqn+00Z7y+uISQEeRH4QNeWNIdVyE/sG4cOwT/o0UlqC5uFn/NytIXCOaz94yF5O51W3SNNd2EkIwnF5Zh1QqjNtwOjLgdiH4YsRuNpH1MGcrn0mkwn0mrdqgrGWzBGCDSXGBNJmBNAjxJs4C8PljbI1iT3sVQP/xtgosEio1Mb/nDPX/ulAuHXl36CmepE2DSRbMzV6XBZ4N5OqsfblJp2g2Gu551+i6VyfUuskdQOnbiEKVSbjawKuKuyNlFSOuDtHgX/Y6p37x+0mx0l9Sl3wqYT4QJyCEPTO5Vm6bsDb6geNS1d2NyaE/2I9TPSbgabMd1hh1fxrbb4HDbZNFc+nuI0PUFyjv7ECMaqBRmIzumC2l/7Ln6tijBXYHoKwEct9hQ9QhgGCBtXWUyYzf4GOU32d5TKZ/lFqG8g+zydkwVEk957Snnrg+xegS3CsszPiu0CNp+WKFl/12m20Nht2DJVdItHbPhpMs7hoH5TjPeIWdaxaHlvDtQRpwCEhHHoiq2G5abUrImdry6MsJ0+ZgoYboJG41tYGQuMDK4RtiG+pxwpg5Fu5AU9yiaQNLuEZ5E0u5nE0jqjJAU9S6G+qPx4EY8mJE4RDUGWtirxytu26y4zRBrbvB+SthBjV0xml6yLbSU82tj4bWuoVKzIoN+rdl0XRRrGh4L+NmoIj5nVobcTa6C+eAfSC6BBM4TwMVx/ccHqjEsU7Po5wCT2QMmE0ILX1miqFluGj/7yRHXNLuXmnFoLN5jqWkaP/a3XGqaMC0MEqIaYgfgUYPhCbsoJJIcLxKZbkWm70bbn/6tou2NBm0zf4Noy3t7oUxyZVrRc3Zj6Z/+rWLpPzZYav8NYqkVxMQ0lhIcXiNJPwN8GauBCaVrlWE1MAUnhhpooAamYMdpUAUva50NZWkPpQ1Le5yh3ij0LRhFNGeEDl7zspPSLAfdvXKCHblP8kHNnDJnq3LN90ljMEnDw3C/09zPT7F/eL7OSwx2Reb1/JKSPBMOy6WMN4Wna3Cjmjd4MceO5py60clqFwejUOhKOA8rLC+amy3ssD2txXvPXNN7j4870433HgyoklfhLxWOHDl40sPZVA/8k5d2TL8rR0JJVJk2xrB27z+wRgrhJ1ucjuTj63lz0K7JftjiUcDZ5FFPDpk/BqdYshvdkpe5nGWCg2nXxeFAjNt8BA8fQRPs7B+ovf1clXBiA9ARbp8TxeH+qgNdzfJ54UgtlfTYDuAQsC0mvVPdypyAcbhNyWofz9a3tvqcjkRJ7O4aG3v6VVy8b2LrxLteoO7xLdsb79SM7xrcHTbbM+P7ujcOAhIX7kyi/6XvHfYe5V6wxQN+BEg3VJDgwMEdo8OxcHxqLaLb4PpeyMU8P5mXyXc/XyC9rO0x+puNB9587ZApPnJo+kYdDivlmLmeHGRqx3tEfMBTJkfvWt4nkEMdXWXkkCeMAdMeH+VkkPWTR5hDTvisnW8vSQd59xc4QsfCS+z1zFP7nFTBWTV4XOHHfYK3kSyq5dTYqKfi0zFqCvj59hL4zcmRTQ7tZaEG/Ly0dEoqQVNZgKQOqFdNFhaG5xw8ugy3Iwz2mFRQIfkSohY3uoxergcw358Jj3tt6YS0v2xeW+KFrZP4Gz0TaaWUDhhE3BacX6x8dv9abkZ9NiE5IF46JVPz/ioSNLl7uAuGD4cX+BAriYEOGOEDVc1bYOSYpKZl3JhJ3Bjpkw30xsH04MQbnPRKcHE7GeAc5CO4siNc2UlcuV7zLbmAqz1wFBBQxb0qaqZyZ3KaAxs2TFvX8AyL+Sx+JRYzOczZeH1rdSs3IxTL+XUhrQLFHFgacngZ9lkRF/pDEgwho3KIo1KzSmPuy0wydUAwZizsRN5E3vKZsz7lfUmy2W+Ktzd7QReLIXVApeWcHxhX7EY3HKQbogwL0g3BdUjXcvim3K8lNwRv0erxpMYmjRx4xpUrvsQzPQohSXHAdfaMZsd0Ps6I+Qj8FE0Q4pjcTkzzCO6j8Q7l4UWzgJgPCQYMoZPYML45JBCauBUCOUMt9ciUm/IFEmBlz7X07DB4CLTDPmcipxw1LQ78s5y1XiECjW9Uxj9nOCpYXPQlHhJBSaG1TwvdCi3W7FaKTH4KKV63+yBFvgjUemufHVYUUqeJwdCwS4VY4DmJe3Nq1zH/HJQtsr0N2bQmW3yMo6PCMcMPlnzShpVUvkrWqUHJQSyPGJNqmRVq0TzWq8brqj3fdJO7/Hu+wVFTRgL8J6OmEomaCgZO8Q9ps9u1nOiA9WcwVyAd0kYXEVV1E1I19Rk3PuAOgsGZZbn4+pIcV3VpCVmavN2Q6b2jm91UtopGCMPCSGDTkLF0j4jsc8Jgbi15Nq+UOY+BpEv6dDnL41UWvKVgud+BscMeGRSkYrBNs32kgLoHKf6oI2M5I8eK8F4Am3LJSjeiEUCRWO+xIJFqU2qt55y1Q0nk2Jh3hWaDPIAdUAUiEmpDCmUZD9AXHnBlNhAFy+smWvWq4zix0fMOHot2nwSD6h6DF2LMpFNjXHKImZIQM0mjFlhaZSTOLLBzjjMDY+A4M6llguWpUciqYX8d00gO482p7mQEaKhdT9SuQ8QmaQn/3F07h3+GFrqzwfgjsZpvVd21gIXzFsIoMnLZH0e6PRTRkWCOi7I5kA0tFrmBpdQwR/LDYzW5k6LU3F7BTpPUsPf3Gob9GCU9HHsRyCjpSXxwEBgJS2QngnBDzssbaR1343/3VbKtIRKTIbESIxYsywapuzAJ0lPd4N7Uk8OUmbeZ8LVhD6vr/TSipC6joGkoDkYKJ7uPWMDt5OqaouIjfIcl+0Deh0iHRcxuNC49t4taco5zPNSV5t238czBcmiJXTMxd6oY3FlzllXYCWC2crIPZGW/juDKuE1peIv7CQ5CdoKHi2NcO0z9djP1Xdg/fGmp2cnDclbymmPX5VlzIh8LedlfwtCLqvXaUqXZjUTcigYypXEQMM4becqI4gkHvqfMKUhxSNRRPjvMIOgSHMenyUjeVg6yNaRPchQebGHYYuk1C57KICqgqUCjAiMnUwKciFAFTI6vLWXZf+P0Pgbsi9hM8eYiyo8L8r+km8VTUHOP9fxzaBkVkj3ZFf77ghZFb1BhXZFudIUf317NgOclyLJazlLC0c4F00mFw2NKSTuOUibcfE64+b6QIkDTDHoZyevUXs9V8wVl65I4U3He+nChOW874hYNe1qaevJkq1FkdVJX/LLjl2N8aTiFPSKoDUJGHIdYO1w4XDj4UhmEhjgOtDa4iHERcyAkQkDckmJbYyLB1qauOGWlW1IpIq4dAkJcCLw2o8Brw+eYSA4GzksdBY+pWLKmOJSQa4XPUhF/KiO+C7IbGyORY4ENSwm8jsQpToOBWGInESvJLW2IU24jJ3ItaLdIc9mhfaRprt/4V2vo6/Byrlq5rPbhvZFudLPfy7BdKEpXa6x0NWrXFUrX6ljr2ugDuau5Yea7l9Jl31LpstdQupwoXbbZCGSFY9k8HljqsnnIG3a9MJDQLuRTZp3j1KSKFnhOo6W54mNB6vvoxMgZjLdjIwTham/LaEIp808SOjbRFtP24zDCWNFzoo1xApNJgcxiI53W9EQTfcgPt+sqvrYYj3+u6l6LN6bembr3OLZ5WVl6vNH/TI+hGcjWGCedH6txX18SkK/Q1yy1TzaY+nTDDTmka5I+3NUZuttDl8smlLnHgzInRMHa2yONaodl5zqTq210BTehK7hGV3BvodgYTF+1aB5p+DHz/8D4/la0urHmNqFW7aG0MVVfRW/LxvrgSDcZaYqjnjtMAi1IvcrbHcNnxf3/CkFMB3+Dyqj9OSij4C+z8GH4RV6d720j19OO31c8hsN0qki5FZVlVqns73d0NA5CHwcalJFEJMR8CjKfLB3sDxMnVqtg8oUR2McE9WK41i0jJA3C6dMwkpheJNF2MMdazjUbhHfRg1WexVy6ViV9Di7Fxs+Jra1c+S/CYUVOwf7uEilkSpb2cMDz4RB1Lha5BZiOwwHtbEq46/LlJ/l0xU+zs95TOz/Rt5n7SHmkhRGPuluIkx8MUD428ky7lbhDi6AHFJCgGemZw10WIhMPVka37xvfxsYjgHstmCTvfvNyZ0cvm68thXpw6V3zPiBIZcS+tsSOQsum00jb24N5YSX83s0x8pKGknNyvDlcO3yoly5uPCSnQqpl8zw04zcfPwO7dHqHOspLY1gdX2TnBG/PeRh/v76E0SVdHAdmPeNCy4HdWg7s1pzMTY7qYJNuysZdJDkwcsK45VFGLxYgAj/uPwDsrVWqy+BxetGVJmsVJ0qVrI8Z5xH3T3D6kNL4F7+CNUDItMOO54fFkd0MKkbkpa9oSZu9MzdAdBC6em8Xkc1KnAs5UMRfekE3Sfcmw1zYcV3Jpf/d39L+cEitGGLQjV3xBQeUIiaAI3lvXgMJs5wfwDrqk8EynCEYXE0RvCF80uMQfGTjuFcOYwyBOc5fYl/3MSSTcfcSkIRiE+gj3nxm7M03Bh8NYie74J4a/4LmtMpa7u5jdEFycxo1cjhL/E69D8eu8gsz4YUXRy8s1HfqGZy3Km1fCqgzAxym+nvP6EnUYc/rRTDOgv3Lf9fA2axxa/U3N19WCqek/t6XOeesjxBpdOnLkxVhgDk3g2wu4WDX6ZbC/dZV7qdX3o/GtPH3GtrYd03a+C0dnGUmOhhOsgi0kUnu9VeWvCQ9VSE058fFsnn5IFn//WLZfBOFV4tlc+kgh1f/DOnLvy3l5/fXy+brUv4q+O+LB8kW75WZFBRRPViWDYomvQvDfndlmnikkDxEloUq5HURx2O6DSIYMD4yvnO/vBRWz89o3zlXaf/T/dD3l80Lmn1UfhIuvySX/3e43JHL/xguv8hnNiFnucuy/zNLlN9Js3/kzp7f/tzDD589c3bz/IAe3Xz0wtYX1Ic/9NEPffhDH1569MLg3OYX1NnzF0+fO/sQnTs72Nw6fe74uc3znx08sk3bm4PRszMXHtqkyQefO987f+Hz5+mRzdMPbW7Rw+dOf3b6i4fObg9Onz+zOX33M2cHoRra2nxs8/RADS5coEdPn/9Cc/vC1uhT2v7Co5+5cG579PX24MLW5kP0mXMXzvQaaNRnPvfww5tbtLm1dWFLbQ+2Nk8/Gi6mgF9aokfPbm+fPf9Z2jz/0NKFh5e4GnX2/JkLW1ubZwZNV848sjl1O8C1+/ZDpwenRzenu0zo08Ont+gzp8/0VFPt1hkA8OjpwZlHRl98/uz5hy58nrbP/srmGEXcu8EXHtu8yshwf65slO82w3LmwqOPbW1ub5+9cJ4e3Rw8cuEhJf8Vak7tU0qlKlEtFau2ilSmnOooq3Jl1IzSalb5VzvZHzqrnIpUrBKVqpZqq0zlalbNqf3qBtVVR9R71AfVR9Wd6pfUf6HOqG31tPqH6s/U/6GMbtqa/psLf/vC3/7wNx/+DoS/Qm2o7/LOmVECA2DN1Zy6UZXqw8qr0+pJ9SdK6yeRpspqp2Od6o4u9IImfYte0Q9Ott+02bSFNg6qg+oGdYNaUAvqRnWjOqQOqa7qqsPqsLpJ3aRW1Ip6p/23Adc7u/6eDH9Phb+nw98z4e/Z8PfCz6H/eke/Otlu017TznPqOfVr6tfU8+p59evq19VvqN9Qv6l+U31JfUl9WX1ZfUV9RdFdSu2kSmmt1M1aqVml1KU1pVRL+nezknvc13Bvv1IqUf7SXHZSNj/H/8yuf3bXP7frXzT1z7+wL9vcXdXuT5vX4/AvCf/S8K8V/rXDvyz864R/Of/zr+7P3tNUnzQTZ26fSpNW3I4y17G5mdGzyv/1/uzRhNt2KuV/iserUGkox6zVp+EdUGOLYSn4flPGKEmZ3iwrjTJKRisnZaONVkVL+R/PZy06oQWr/x8=")))),t)})}yc();_0();I3();B5();var T9="deflate",b9="deflate-raw",HDe="deflate64-raw",x9="gzip",Ms,YI,X_,J3,GDe;function WDe(e){if(Ms=e,{malloc:YI,free:X_,memory:J3}=Ms,typeof YI!="function"||typeof X_!="function"||!J3)throw Ms=YI=X_=J3=null,new Error("Invalid WASM module")}function qDe(e){GDe=e}function YDe(e,t,n={}){if(!Ms){let a=new Error("WASM module not loaded");throw a.cause=GDe,a}let i=typeof n.level=="number"?n.level:-1,r=typeof n.outBuffer=="number"?n.outBuffer:64*1024,o=typeof n.inBufferSize=="number"?n.inBufferSize:64*1024;return new null({start(){try{let a;if(this.out=YI(r),this.in=YI(o),this.inBufferSize=o,!this.out||!this.in)throw new Error("allocation failed");if(this._scratch=new Uint8Array(r),e?(this._process=Ms.deflate_process,this._last_consumed=Ms.deflate_last_consumed,this._end=Ms.deflate_end,this.streamHandle=Ms.deflate_new(),t===x9?a=Ms.deflate_init_gzip(this.streamHandle,i):t===b9?a=Ms.deflate_init_raw(this.streamHandle,i):a=Ms.deflate_init(this.streamHandle,i)):t===HDe?(this._process=Ms.inflate9_process,this._last_consumed=Ms.inflate9_last_consumed,this._end=Ms.inflate9_end,this.streamHandle=Ms.inflate9_new(),a=Ms.inflate9_init_raw(this.streamHandle)):(this._process=Ms.inflate_process,this._last_consumed=Ms.inflate_last_consumed,this._end=Ms.inflate_end,this.streamHandle=Ms.inflate_new(),t===b9?a=Ms.inflate_init_raw(this.streamHandle):t===x9?a=Ms.inflate_init_gzip(this.streamHandle):a=Ms.inflate_init(this.streamHandle)),a!==0)throw new Error("init failed:"+a)}catch(a){throw s(this),a}},transform(a,c){try{let u=a,f=new Uint8Array(J3.buffer),d=this._process,p=this._last_consumed,g=this.out,m=this._scratch,y=0;for(;y<u.length;){let A=Math.min(u.length-y,32768);if((!this.in||this.inBufferSize<A)&&(this.in&&X_&&(X_(this.in),this.in=0),this.in=YI(A),this.inBufferSize=A,!this.in))throw new Error("allocation failed");f.set(u.subarray(y,y+A),this.in);let b=d(this.streamHandle,this.in,A,g,r,0),x=b&16777215;if(x&&(m.set(f.subarray(g,g+x),0),c.enqueue(m.slice(0,x))),!e){let E=b>>24&255,v=E&128?E-256:E;if(v<0)throw new Error("process error:"+v)}let T=p(this.streamHandle);if(T===0)break;y+=T}}catch(u){s(this),c.error(u)}},flush(a){try{let c=new Uint8Array(J3.buffer),u=this._process,f=this.out,d=this._scratch;for(;;){let p=u(this.streamHandle,0,0,f,r,4),g=p&16777215,m=p>>24&255;if(!e){let y=m&128?m-256:m;if(y<0)throw new Error("process error:"+y)}if(g&&(d.set(c.subarray(f,f+g),0),a.enqueue(d.slice(0,g))),m===1||g===0)break}}catch(c){a.error(c)}finally{let c=s(this);c!==0&&a.error(new Error("end error:"+c))}},cancel(){s(this)}});function s(a){let c=0;return a.streamHandle&&a._end&&(c=a._end(a.streamHandle)),a.streamHandle=0,a.in&&X_&&X_(a.in),a.in=0,a.out&&X_&&X_(a.out),a.out=0,c}}var FE=class{constructor(t=T9,n){return YDe(!0,t,n)}},BE=class{constructor(t=T9,n){return YDe(!1,t,n)}};FE.requiresModule=!0;BE.requiresModule=!0;FE.supportedFormats=[T9,b9,x9];BE.supportedFormats=[T9,b9,x9,HDe];var XDe=!1;async function KDe(e,{baseURI:t}){if(!XDe)try{await nEt(e,t),XDe=!0}catch(n){throw qDe(n),n}}async function nEt(e,t){let n,i;try{try{i=new URL(e,t)}catch{}n=await(await fetch(i)).arrayBuffer()}catch(o){if(e.startsWith("data:application/wasm;base64,"))n=iEt(e);else throw o}let r=await WebAssembly.instantiate(n);WDe(r.instance.exports)}function iEt(e){let t=e.split(",")[1],n=atob(t),i=n.length,r=new Uint8Array(i);for(let o=0;o<i;++o)r[o]=n.charCodeAt(o);return r.buffer}var E9;tPe({initModule:e=>{if(!E9){let{wasmURI:t}=e;typeof t==Bo&&(t=t()),E9=KDe(t,e).catch(n=>{throw E9=null,n})}return E9}});yI({CompressionStreamFallback:FE,DecompressionStreamFallback:BE});jDe(yI);var Cie=32,rEt="http://www.opengis.net/kml/2.2",Xm="http://www.google.com/kml/ext/2.2",oEt="http://www.w3.org/2000/xmlns/";function C9(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var sEt=/^data:image\/([^,;]+)/;C9.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof De){if(e=De.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(sEt);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let r=e.fetchBlob().then(function(o){t._files[n]=o});return this._promises.push(r),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(r=>{e.toBlob(function(o){t._files[n]=o,r()})});return this._promises.push(i),n}return""};function aEt(e,t){return function(n){e._files[t]=n}}C9.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new oe("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},r=n(e,t,i);for(let o in i)if(i.hasOwnProperty(o)){let s=Promise.resolve(i[o]);this._promises.push(s),s.then(aEt(this,o))}return r};Object.defineProperties(C9.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function v9(e){this._time=e}v9.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};v9.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return UE(n)};v9.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function vie(){this._ids={},this._styles={},this._count=0}vie.prototype.get=function(e){let t=this._ids,n=e.innerHTML;if(l(t[n]))return t[n];let i=`style-${++this._count}`;return e.setAttribute("id",i),i=`#${i}`,t[n]=i,this._styles[n]=e,i};vie.prototype.save=function(e){let t=this._styles,n=e.childNodes[0];for(let i in t)t.hasOwnProperty(i)&&e.insertBefore(t[i],n)};function ZDe(){this._ids={}}ZDe.prototype.get=function(e){if(!l(e))return this.get($n());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function Sie(e){e=e??H.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=Sie._createState(e),r=t.values.filter(function(u){return!l(u.parent)}),o=i.kmlDoc,s=o.documentElement;s.setAttributeNS(oEt,"xmlns:gx",Xm);let a=o.createElement("Document");s.appendChild(a),e1e(i,a,r),i.styleCache.save(a);let c=i.externalFileHandler;return c.promise.then(function(){let f=new XMLSerializer().serializeToString(i.kmlDoc);return n?cEt(f,c.files):{kml:f,externalFiles:c.files}})}async function cEt(e,t){let n=Zt("ThirdParty/Workers/zip-web-worker.js"),i=Zt("ThirdParty/zip-module.wasm");p3({workerURI:n,wasmURI:i});let r=new MI("application/vnd.google-earth.kmz"),o=new G3(r);await o.add("doc.kml",new R3(e));let s=Object.keys(t);return await QDe(o,s,t,0),await o.close(),{kmz:await r.getData()}}async function QDe(e,t,n,i){if(t.length===i)return;let r=t[i];return await e.add(r,new rf(n[r])),QDe(e,t,n,i+1)}Sie._createState=function(e){let t=e.entities,n=new vie,i=t.computeAvailability(),r=l(e.time)?e.time:i.start,o=e.defaultAvailability??i,s=e.sampleDuration??60;o.start===tt.MINIMUM_VALUE?o.stop===tt.MAXIMUM_VALUE?o=new En:K.addSeconds(o.stop,-10*s,o.start):o.stop===tt.MAXIMUM_VALUE&&K.addSeconds(o.start,10*s,o.stop);let a=new C9(e.modelCallback);return{kmlDoc:document.implementation.createDocument(rEt,"kml"),ellipsoid:e.ellipsoid??ee.default,idManager:new ZDe,styleCache:n,externalFileHandler:a,time:r,valueGetter:new v9(r),sampleDuration:s,defaultAvailability:new Ps([o])}};function e1e(e,t,n){let i=e.kmlDoc,r=e.styleCache,o=e.valueGetter,s=e.idManager,a=n.length,c,u,f;for(let d=0;d<a;++d){let p=n[d];c=[],u=[],f=[],lEt(e,p,u,f),uEt(e,p.polyline,u,f),JDe(e,p.rectangle,u,f,c),JDe(e,p.polygon,u,f,c),mEt(e,p,p.model,u,f);let g,m=p.availability;l(m)&&(g=i.createElement("TimeSpan"),K.equals(m.start,tt.MINIMUM_VALUE)||g.appendChild(vn(i,"begin",K.toIso8601(m.start))),K.equals(m.stop,tt.MAXIMUM_VALUE)||g.appendChild(vn(i,"end",K.toIso8601(m.stop))));for(let b=0;b<c.length;++b){let x=c[b];x.setAttribute("id",s.get(p.id)),x.appendChild(vn(i,"name",p.name)),x.appendChild(vn(i,"visibility",p.show)),x.appendChild(vn(i,"description",p.description)),l(g)&&x.appendChild(g),t.appendChild(x)}let y=u.length;if(y>0){let b=i.createElement("Placemark");b.setAttribute("id",s.get(p.id));let x=p.name,T=p.label;if(l(T)){let v=i.createElement("LabelStyle"),S=o.get(T.text);x=l(S)&&S.length>0?S:x;let I=o.getColor(T.fillColor);l(I)&&(v.appendChild(vn(i,"color",I)),v.appendChild(vn(i,"colorMode","normal")));let R=o.get(T.scale);l(R)&&v.appendChild(vn(i,"scale",R)),f.push(v)}b.appendChild(vn(i,"name",x)),b.appendChild(vn(i,"visibility",p.show)),b.appendChild(vn(i,"description",p.description)),l(g)&&b.appendChild(g),t.appendChild(b);let E=f.length;if(E>0){let v=i.createElement("Style");for(let S=0;S<E;++S)v.appendChild(f[S]);b.appendChild(vn(i,"styleUrl",r.get(v)))}if(u.length===1)b.appendChild(u[0]);else if(u.length>1){let v=i.createElement("MultiGeometry");for(let S=0;S<y;++S)v.appendChild(u[S]);b.appendChild(v)}}let A=p._children;if(A.length>0){let b=i.createElement("Folder");b.setAttribute("id",s.get(p.id)),b.appendChild(vn(i,"name",p.name)),b.appendChild(vn(i,"visibility",p.show)),b.appendChild(vn(i,"description",p.description)),t.appendChild(b),e1e(e,b,A)}}}var sf=new h,gu=new he,Ym=new K;function lEt(e,t,n,i){let r=e.kmlDoc,o=e.ellipsoid,s=e.valueGetter,a=t.billboard??t.point;if(!l(a)&&!l(t.path))return;let c=t.position;if(!c.isConstant){t1e(e,t,a,n,i);return}s.get(c,void 0,sf);let u=vn(r,"coordinates",kE(sf,o)),f=r.createElement("Point"),d=r.createElement("altitudeMode");d.appendChild(zE(e,a.heightReference)),f.appendChild(d),f.appendChild(u),n.push(f);let p=a instanceof qc?i1e(e,a):n1e(e,a);i.push(p)}function t1e(e,t,n,i,r){let o=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,u=t.position,f=!0;u instanceof mc?(c=u.intervals,f=!1):c=t.availability??e.defaultAvailability;let d=n instanceof Tg,p,g,m,y=[];for(p=0;p<c.length;++p){let b=c.get(p),x=f?u:b.data,T=o.createElement("altitudeMode");x instanceof m0?(x=x._value,T.appendChild(zE(e,We.CLAMP_TO_GROUND))):l(n)?T.appendChild(zE(e,n.heightReference)):T.appendChild(zE(e,We.NONE));let E=[],v=[];if(x.isConstant){a.get(x,void 0,sf);let I=vn(o,"coordinates",kE(sf,s));E.push(K.toIso8601(b.start)),v.push(I),E.push(K.toIso8601(b.stop)),v.push(I)}else if(x instanceof gc)for(m=x._property._times,g=0;g<m.length;++g)E.push(K.toIso8601(m[g])),x.getValueInReferenceFrame(m[g],ji.FIXED,sf),v.push(kE(sf,s));else if(x instanceof Jf){m=x._times;let I=x._values;for(g=0;g<m.length;++g)E.push(K.toIso8601(m[g])),h.fromArray(I,g*3,sf),v.push(kE(sf,s))}else{let I=e.sampleDuration;b.start.clone(Ym),b.isStartIncluded||K.addSeconds(Ym,I,Ym);let R=b.stop;for(;K.lessThan(Ym,R);)x.getValue(Ym,sf),E.push(K.toIso8601(Ym)),v.push(kE(sf,s)),K.addSeconds(Ym,I,Ym);b.isStopIncluded&&K.equals(Ym,R)&&(x.getValue(Ym,sf),E.push(K.toIso8601(Ym)),v.push(kE(sf,s)))}let S=o.createElementNS(Xm,"Track");S.appendChild(T);for(let I=0;I<E.length;++I){let R=vn(o,"when",E[I]),O=vn(o,"coord",v[I],Xm);S.appendChild(R),S.appendChild(O)}d&&S.appendChild(r1e(e,n)),y.push(S)}if(y.length===1)i.push(y[0]);else if(y.length>1){let b=o.createElementNS(Xm,"MultiTrack");for(p=0;p<y.length;++p)b.appendChild(y[p]);i.push(b)}if(l(n)&&!d){let b=n instanceof qc?i1e(e,n):n1e(e,n);r.push(b)}let A=t.path;if(l(A)){let b=a.get(A.width),x=A.material;if(l(x)||l(b)){let T=o.createElement("LineStyle");l(b)&&T.appendChild(vn(o,"width",b)),wie(e,x,T),r.push(T)}}}function n1e(e,t){let n=e.kmlDoc,i=e.valueGetter,r=n.createElement("IconStyle"),o=i.getColor(t.color);l(o)&&(r.appendChild(vn(n,"color",o)),r.appendChild(vn(n,"colorMode","normal")));let s=i.get(t.pixelSize);return l(s)&&r.appendChild(vn(n,"scale",s/Cie)),r}function i1e(e,t){let n=e.kmlDoc,i=e.valueGetter,r=e.externalFileHandler,o=n.createElement("IconStyle"),s=i.get(t.image);if(l(s)){s=r.texture(s);let p=n.createElement("Icon");p.appendChild(vn(n,"href",s));let g=i.get(t.imageSubRegion);l(g)&&(p.appendChild(vn(n,"x",g.x,Xm)),p.appendChild(vn(n,"y",g.y,Xm)),p.appendChild(vn(n,"w",g.width,Xm)),p.appendChild(vn(n,"h",g.height,Xm))),o.appendChild(p)}let a=i.getColor(t.color);l(a)&&(o.appendChild(vn(n,"color",a)),o.appendChild(vn(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&o.appendChild(vn(n,"scale",c));let u=i.get(t.pixelOffset);if(l(u)){c=c??1,U.divideByScalar(u,c,u);let p=i.get(t.width,Cie),g=i.get(t.height,Cie),m=i.get(t.horizontalOrigin,zi.CENTER);m===zi.CENTER?u.x-=p*.5:m===zi.RIGHT&&(u.x-=p);let y=i.get(t.verticalOrigin,Hn.CENTER);y===Hn.TOP?u.y+=g:y===Hn.CENTER&&(u.y+=g*.5);let A=n.createElement("hotSpot");A.setAttribute("x",-u.x),A.setAttribute("y",u.y),A.setAttribute("xunits","pixels"),A.setAttribute("yunits","pixels"),o.appendChild(A)}let f=i.get(t.rotation),d=i.get(t.alignedAxis);return l(f)&&h.equals(h.UNIT_Z,d)&&(f=D.toDegrees(-f),f===0&&(f=360),o.appendChild(vn(n,"heading",f))),o}function uEt(e,t,n,i){let r=e.kmlDoc,o=e.ellipsoid,s=e.valueGetter;if(!l(t))return;let a=r.createElement("LineString"),c=r.createElement("altitudeMode"),u=s.get(t.clampToGround,!1),f;u?(a.appendChild(vn(r,"tessellate",!0)),f=r.createTextNode("clampToGround")):f=r.createTextNode("absolute"),c.appendChild(f),a.appendChild(c);let d=t.positions,p=s.get(d),g=vn(r,"coordinates",kE(p,o));a.appendChild(g);let m=s.get(t.zIndex);u&&l(m)&&a.appendChild(vn(r,"drawOrder",m,Xm)),n.push(a);let y=r.createElement("LineStyle"),A=s.get(t.width);l(A)&&y.appendChild(vn(r,"width",A)),wie(e,t.material,y),i.push(y)}function fEt(e,t,n){let i=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0);n>0&&(o=n);let s=t.coordinates,a=r.get(s),c=[],u=[ie.northeast,ie.southeast,ie.southwest,ie.northwest];for(let g=0;g<4;++g)u[g](a,gu),c.push(`${D.toDegrees(gu.longitude)},${D.toDegrees(gu.latitude)},${o}`);let f=vn(i,"coordinates",c.join(" ")),d=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(f),d.appendChild(p),[d]}function $De(e,t,n,i){let r=e.kmlDoc,o=e.ellipsoid,s=[],a=t.length;for(let f=0;f<a;++f)he.fromCartesian(t[f],o,gu),s.push(`${D.toDegrees(gu.longitude)},${D.toDegrees(gu.latitude)},${i?gu.height:n}`);let c=vn(r,"coordinates",s.join(" ")),u=r.createElement("LinearRing");return u.appendChild(c),u}function dEt(e,t,n){let i=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0),s=r.get(t.perPositionHeight,!1);!s&&n>0&&(o=n);let a=[],c=t.hierarchy,u=r.get(c),f=Array.isArray(u)?u:u.positions,d=i.createElement("outerBoundaryIs");d.appendChild($De(e,f,o,s)),a.push(d);let p=u.holes;if(l(p)){let g=p.length;for(let m=0;m<g;++m){let y=i.createElement("innerBoundaryIs");y.appendChild($De(e,p[m].positions,o,s)),a.push(y)}}return a}function JDe(e,t,n,i,r){let o=e.kmlDoc,s=e.valueGetter;if(!l(t))return;let a=t instanceof Qh;if(a&&s.getMaterialType(t.material)==="Image"){hEt(e,t,r);return}let c=o.createElement("Polygon"),u=s.get(t.extrudedHeight,0);u>0&&c.appendChild(vn(o,"extrude",!0));let f=a?fEt(e,t,u):dEt(e,t,u),d=f.length;for(let A=0;A<d;++A)c.appendChild(f[A]);let p=o.createElement("altitudeMode");p.appendChild(zE(e,t.heightReference)),c.appendChild(p),n.push(c);let g=o.createElement("PolyStyle"),m=s.get(t.fill,!1);m&&g.appendChild(vn(o,"fill",m)),wie(e,t.material,g);let y=s.get(t.outline,!1);if(y){g.appendChild(vn(o,"outline",y));let A=o.createElement("LineStyle"),b=s.get(t.outlineWidth,1);A.appendChild(vn(o,"width",b));let x=s.getColor(t.outlineColor,z.BLACK);A.appendChild(vn(o,"color",x)),A.appendChild(vn(o,"colorMode","normal")),i.push(A)}i.push(g)}function hEt(e,t,n){let i=e.kmlDoc,r=e.valueGetter,o=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(zE(e,t.heightReference)),s.appendChild(a);let c=r.get(t.height);l(c)&&s.appendChild(vn(i,"altitude",c));let u=r.get(t.coordinates),f=i.createElement("LatLonBox");f.appendChild(vn(i,"north",D.toDegrees(u.north))),f.appendChild(vn(i,"south",D.toDegrees(u.south))),f.appendChild(vn(i,"east",D.toDegrees(u.east))),f.appendChild(vn(i,"west",D.toDegrees(u.west))),s.appendChild(f);let d=r.get(t.material),p=o.texture(d.image),g=i.createElement("Icon");g.appendChild(vn(i,"href",p)),s.appendChild(g);let m=d.color;l(m)&&s.appendChild(vn(i,"color",UE(d.color))),n.push(s)}function r1e(e,t){let n=e.kmlDoc,i=e.valueGetter,r=e.externalFileHandler,o=n.createElement("Model"),s=i.get(t.scale);if(l(s)){let u=n.createElement("scale");u.appendChild(vn(n,"x",s)),u.appendChild(vn(n,"y",s)),u.appendChild(vn(n,"z",s)),o.appendChild(u)}let a=n.createElement("Link"),c=r.model(t,e.time);return a.appendChild(vn(n,"href",c)),o.appendChild(a),o}function mEt(e,t,n,i,r){let o=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter;if(!l(n))return;let c=t.position;if(!c.isConstant){t1e(e,t,n,i,r);return}let u=r1e(e,n),f=o.createElement("altitudeMode");f.appendChild(zE(e,n.heightReference)),u.appendChild(f),a.get(c,void 0,sf),he.fromCartesian(sf,s,gu);let d=o.createElement("Location");d.appendChild(vn(o,"longitude",D.toDegrees(gu.longitude))),d.appendChild(vn(o,"latitude",D.toDegrees(gu.latitude))),d.appendChild(vn(o,"altitude",gu.height)),u.appendChild(d),i.push(u)}function wie(e,t,n){let i=e.kmlDoc,r=e.valueGetter;if(!l(t))return;let o=r.get(t);if(!l(o))return;let s,a=r.getMaterialType(t),c,u;switch(a){case"Image":s=UE(z.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=UE(o.color);break;case"PolylineOutline":s=UE(o.color),c=UE(o.outlineColor),u=o.outlineWidth,n.appendChild(vn(i,"outerColor",c,Xm)),n.appendChild(vn(i,"outerWidth",u,Xm));break;case"Stripe":s=UE(o.oddColor);break}l(s)&&(n.appendChild(vn(i,"color",s)),n.appendChild(vn(i,"colorMode","normal")))}function zE(e,t){let n=e.kmlDoc,r=e.valueGetter.get(t,We.NONE),o;switch(r){case We.NONE:o=n.createTextNode("absolute");break;case We.CLAMP_TO_GROUND:o=n.createTextNode("clampToGround");break;case We.RELATIVE_TO_GROUND:o=n.createTextNode("relativeToGround");break}return o}function kE(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let r=0;r<n;++r)he.fromCartesian(e[r],t,gu),i.push(`${D.toDegrees(gu.longitude)},${D.toDegrees(gu.latitude)},${gu.height}`);return i.join(" ")}function vn(e,t,n,i){n=n??"",typeof n=="boolean"&&(n=n?"1":"0");let r=l(i)?e.createElementNS(i,t):e.createElement(t),o=n==="string"&&n.indexOf("<")!==-1?e.createCDATASection(n):e.createTextNode(n);return r.appendChild(o),r}function UE(e){let t="",n=e.toBytes();for(let i=3;i>=0;--i)t+=n[i]<16?`0${n[i].toString(16)}`:n[i].toString(16);return t}var Iie=Sie;function Q3(){this._cache={}}Q3.prototype.fromColor=function(e,t){return S9(void 0,void 0,e,t,this._cache)};Q3.prototype.fromUrl=function(e,t,n){return S9(e,void 0,t,n,this._cache)};Q3.prototype.fromMakiIconId=function(e,t,n){return S9(Zt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};Q3.prototype.fromText=function(e,t,n){return S9(void 0,e,t,n,this._cache)};var pEt=new z;function gEt(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,pEt).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function o1e(e,t,n){let i=n/2.5,r=i,o=i;t.width>t.height?o=i*(t.height/t.width):t.width<t.height&&(r=i*(t.width/t.height));let s=Math.round((n-r)/2),a=Math.round(7/24*n-o/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,r,o),e.drawImage(t,s,a-1,r,o),e.drawImage(t,s+1,a,r,o),e.drawImage(t,s,a+1,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=z.BLACK.toCssColorString(),e.fillRect(s-1,a-1,r+2,o+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,r,o),e.globalCompositeOperation="destination-over",e.fillStyle=z.WHITE.toCssColorString(),e.fillRect(s-1,a-2,r+2,o+2)}var Z3=new Array(4);function S9(e,t,n,i,r){Z3[0]=e,Z3[1]=t,Z3[2]=n,Z3[3]=i;let o=JSON.stringify(Z3),s=r[o];if(l(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let c=a.getContext("2d");if(gEt(c,n,i),l(e)){let f=De.createIfNeeded(e).fetchImage().then(function(d){return o1e(c,d,i),r[o]=a,a});return r[o]=f,f}else if(l(t)){let u=PT(t,{font:`bold ${i}px sans-serif`});o1e(c,u,i)}return r[o]=a,a}var K_=Q3;var c1e=Qo(a1e(),1);function I9(e){return h.fromDegrees(e[0],e[1],e[2])}var Pie={"urn:ogc:def:crs:OGC:1.3:CRS84":I9,"EPSG:4326":I9,"urn:ogc:def:crs:EPSG::4326":I9},l1e={},u1e={},Die=48,Rie,Oie=z.ROYALBLUE,Mie=z.YELLOW,Nie=2,Lie=z.fromBytes(255,255,0,100),Fie=!1,_Et={small:24,medium:48,large:64},yEt=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function f1e(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||yEt.indexOf(i)!==-1)continue;let r=e[i];l(r)&&(typeof r=="object"?n+=`<tr><th>${i}</th><td>${f1e(r)}</td></tr>`:n+=`<tr><th>${i}</th><td>${r}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function AEt(e,t,n){let i;return function(r,o){return l(i)||(i=e(t,n)),i}}function bEt(e,t){return new em(AEt(f1e,e,t),!0)}function P9(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=$n();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let r=t.getOrCreateEntity(i),o=e.properties;if(l(o)){r.properties=o;let s,a=o.title;if(l(a))r.name=a,s="title";else{let u=Number.MAX_VALUE;for(let f in o)if(o.hasOwnProperty(f)&&o[f]){let d=f.toLowerCase();if(u>1&&d==="title"){s=f;break}else u>2&&d==="name"?(u=2,s=f):u>3&&/title/i.test(f)?(u=3,s=f):u>4&&/name/i.test(f)&&(u=4,s=f)}l(s)&&(r.name=o[s])}let c=o.description;c!==null&&(r.description=l(c)?new li(c):n(o,s))}return r}function Bie(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var d1e={Feature:m1e,FeatureCollection:xEt,GeometryCollection:p1e,LineString:b1e,MultiLineString:x1e,MultiPoint:y1e,MultiPolygon:C1e,Point:_1e,Polygon:E1e,Topology:v1e},h1e={GeometryCollection:p1e,LineString:b1e,MultiLineString:x1e,MultiPoint:y1e,MultiPolygon:C1e,Point:_1e,Polygon:E1e,Topology:v1e};function m1e(e,t,n,i,r){if(t.geometry===null){P9(t,e._entityCollection,r.describe);return}if(!l(t.geometry))throw new oe("feature.geometry is required.");let o=t.geometry.type,s=h1e[o];if(!l(s))throw new oe(`Unknown geometry type: ${o}`);s(e,t,t.geometry,i,r)}function xEt(e,t,n,i,r){let o=t.features;for(let s=0,a=o.length;s<a;s++)m1e(e,o[s],void 0,i,r)}function p1e(e,t,n,i,r){let o=n.geometries;for(let s=0,a=o.length;s<a;s++){let c=o[s],u=c.type,f=h1e[u];if(!l(f))throw new oe(`Unknown geometry type: ${u}`);f(e,t,c,i,r)}}function g1e(e,t,n,i,r){let o=r.markerSymbol,s=r.markerColor,a=r.markerSize,c=t.properties;if(l(c)){let g=c["marker-color"];l(g)&&(s=z.fromCssColorString(g)),a=_Et[c["marker-size"]]??a;let m=c["marker-symbol"];l(m)&&(o=m)}let u;l(o)?o.length===1?u=e._pinBuilder.fromText(o.toUpperCase(),s,a):u=e._pinBuilder.fromMakiIconId(o,s,a):u=e._pinBuilder.fromColor(s,a);let f=new qc;f.verticalOrigin=new li(Hn.BOTTOM),i.length===2&&r.clampToGround&&(f.heightReference=We.CLAMP_TO_GROUND);let d=P9(t,e._entityCollection,r.describe);d.billboard=f,d.position=new Gl(n(i));let p=Promise.resolve(u).then(function(g){f.image=new li(g)}).catch(function(){f.image=new li(e._pinBuilder.fromColor(s,a))});e._promises.push(p)}function _1e(e,t,n,i,r){g1e(e,t,i,n.coordinates,r)}function y1e(e,t,n,i,r){let o=n.coordinates;for(let s=0;s<o.length;s++)g1e(e,t,i,o[s],r)}function A1e(e,t,n,i,r){let o=r.strokeMaterialProperty,s=r.strokeWidthProperty,a=t.properties;if(l(a)){let f=a["stroke-width"];l(f)&&(s=new li(f));let d,p=a.stroke;l(p)&&(d=z.fromCssColorString(p));let g=a["stroke-opacity"];l(g)&&g!==1&&(l(d)||(d=o.color.getValue().clone()),d.alpha=g),l(d)&&(o=new Kt(d))}let c=P9(t,e._entityCollection,r.describe),u=new el;c.polyline=u,u.clampToGround=r.clampToGround,u.material=o,u.width=s,u.positions=new li(Bie(i,n)),u.arcType=ln.RHUMB}function b1e(e,t,n,i,r){A1e(e,t,i,n.coordinates,r)}function x1e(e,t,n,i,r){let o=n.coordinates;for(let s=0;s<o.length;s++)A1e(e,t,i,o[s],r)}function T1e(e,t,n,i,r){if(i.length===0||i[0].length===0)return;let o=r.strokeMaterialProperty.color,s=r.fillMaterialProperty,a=r.strokeWidthProperty,c=t.properties;if(l(c)){let g=c["stroke-width"];l(g)&&(a=new li(g));let m,y=c.stroke;l(y)&&(m=z.fromCssColorString(y));let A=c["stroke-opacity"];l(A)&&A!==1&&(l(m)||(m=o.getValue().clone()),m.alpha=A),l(m)&&(o=new li(m));let b,x=c.fill,T=s.color.getValue();l(x)&&(b=z.fromCssColorString(x),b.alpha=T.alpha),A=c["fill-opacity"],l(A)&&A!==T.alpha&&(l(b)||(b=T.clone()),b.alpha=A),l(b)&&(s=new Kt(b))}let u=new Zh;u.outline=new li(!0),u.outlineColor=o,u.outlineWidth=a,u.material=s,u.arcType=ln.RHUMB;let f=[];for(let g=1,m=i.length;g<m;g++)f.push(new Rc(Bie(i[g],n)));let d=i[0];u.hierarchy=new li(new Rc(Bie(d,n),f)),d[0].length>2?u.perPositionHeight=new li(!0):r.clampToGround||(u.height=0);let p=P9(t,e._entityCollection,r.describe);p.polygon=u}function E1e(e,t,n,i,r){T1e(e,t,i,n.coordinates,r)}function C1e(e,t,n,i,r){let o=n.coordinates;for(let s=0;s<o.length;s++)T1e(e,t,i,o[s],r)}function v1e(e,t,n,i,r){for(let o in n.objects)if(n.objects.hasOwnProperty(o)){let s=c1e.feature(n,n.objects[o]),a=d1e[s.type];a(e,s,s,i,r)}}function hb(e){this._name=e,this._changed=new be,this._error=new be,this._isLoading=!1,this._loading=new be,this._entityCollection=new Ya(this),this._promises=[],this._pinBuilder=new K_,this._entityCluster=new Kf,this._credit=void 0,this._resourceCredits=[]}hb.load=function(e,t){return new hb().load(e,t)};Object.defineProperties(hb,{markerSize:{get:function(){return Die},set:function(e){Die=e}},markerSymbol:{get:function(){return Rie},set:function(e){Rie=e}},markerColor:{get:function(){return Oie},set:function(e){Oie=e}},stroke:{get:function(){return Mie},set:function(e){Mie=e}},strokeWidth:{get:function(){return Nie},set:function(e){Nie=e}},fill:{get:function(){return Lie},set:function(e){Lie=e}},clampToGround:{get:function(){return Fie},set:function(e){Fie=e}},crsNames:{get:function(){return Pie}},crsLinkHrefs:{get:function(){return l1e}},crsLinkTypes:{get:function(){return u1e}}});Object.defineProperties(hb.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{value:void 0,writable:!1},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}}});hb.prototype.load=function(e,t){return S1e(this,e,t,!0)};hb.prototype.process=function(e,t){return S1e(this,e,t,!1)};function S1e(e,t,n,i){Ds.setLoading(e,!0),n=n??H.EMPTY_OBJECT;let r=n.credit;typeof r=="string"&&(r=new It(r)),e._credit=r;let o=t,s=n.sourceUri;if(typeof t=="string"||t instanceof De){t=De.createIfNeeded(t),o=t.fetchJson(),s=s??t.getUrlComponent();let a=e._resourceCredits,c=t.credits;if(l(c)){let u=c.length;for(let f=0;f<u;f++)a.push(c[f])}}return n={describe:n.describe??bEt,markerSize:n.markerSize??Die,markerSymbol:n.markerSymbol??Rie,markerColor:n.markerColor??Oie,strokeWidthProperty:new li(n.strokeWidth??Nie),strokeMaterialProperty:new Kt(n.stroke??Mie),fillMaterialProperty:new Kt(n.fill??Lie),clampToGround:n.clampToGround??Fie},Promise.resolve(o).then(function(a){return TEt(e,a,n,s,i)}).catch(function(a){throw Ds.setLoading(e,!1),e._error.raiseEvent(e,a),a})}hb.prototype.update=function(e){return!0};function TEt(e,t,n,i,r){let o;l(i)&&(o=w_(i)),l(o)&&e._name!==o&&(e._name=o,e._changed.raiseEvent(e));let s=d1e[t.type];if(!l(s))throw new oe(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,c=a!==null?I9:null;if(l(a)){if(!l(a.properties))throw new oe("crs.properties is undefined.");let u=a.properties;if(a.type==="name"){if(c=Pie[u.name],!l(c))throw new oe(`Unknown crs name: ${u.name}`)}else if(a.type==="link"){let f=l1e[u.href];if(l(f)||(f=u1e[u.type]),!l(f))throw new oe(`Unable to resolve crs link: ${JSON.stringify(u)}`);c=f(u)}else if(a.type==="EPSG"){if(c=Pie[`EPSG:${u.code}`],!l(c))throw new oe(`Unknown crs EPSG code: ${u.code}`)}else throw new oe(`Unknown crs type: ${a.type}`)}return Promise.resolve(c).then(function(u){return r&&e._entityCollection.removeAll(),u!==null&&s(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,Ds.setLoading(e,!1),e})})}var mb=hb;function EEt(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var Ln=EEt;var PRe=Qo(ure(),1);var DRe;typeof DOMParser<"u"&&(DRe=new DOMParser);var FSt=new PRe.default({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),K9=32,xRe=2414016,TRe=1,ERe=16093e3,CRe=.1,BSt=[null,void 0,"http://www.topografix.com/GPX/1/1"],eo={gpx:BSt};function kSt(e){return new Promise((t,n)=>{let i=new FileReader;i.addEventListener("load",function(){t(i.result)}),i.addEventListener("error",function(){n(i.error)}),i.readAsText(e)})}function fre(e,t){let n=iU(e,"id");return n=l(n)?n:$n(),t.getOrCreateEntity(n)}function dre(e){let t=vRe(e,"lon"),n=vRe(e,"lat"),i=tU(e,"ele",eo.gpx);return h.fromDegrees(t,n,i)}function vRe(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function iU(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function _b(e,t,n){if(!l(e))return;let i=e.childNodes,r=i.length;for(let o=0;o<r;o++){let s=i[o];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function hre(e,t,n){if(!l(e))return;let i=[],r=e.getElementsByTagName(t),o=r.length;for(let s=0;s<o;s++){let a=r[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function tU(e,t,n){let i=_b(e,t,n);if(l(i)){let r=parseFloat(i.textContent);return isNaN(r)?void 0:r}}function af(e,t,n){let i=_b(e,t,n);if(l(i))return i.textContent.trim()}function RRe(e){let t=new qc;return t.width=K9,t.height=K9,t.scaleByDistance=new qt(xRe,TRe,ERe,CRe),t.pixelOffsetScaleByDistance=new qt(xRe,TRe,ERe,CRe),t.verticalOrigin=new li(Hn.BOTTOM),t.image=e,t}function USt(){let e=new Jh;return e.translucencyByDistance=new qt(3e6,1,5e6,0),e.pixelOffset=new U(17,0),e.horizontalOrigin=zi.LEFT,e.font="16px sans-serif",e.style=Ao.FILL_AND_OUTLINE,e}function ORe(e){let t=new el;return t.width=4,t.material=new XA,t.material.color=l(e)?e:z.RED,t.material.outlineWidth=2,t.material.outlineColor=z.BLACK,t}var SRe={time:{text:"Time",tag:"time"},comment:{text:"Comment",tag:"cmt"},description:{text:"Description",tag:"desc"},source:{text:"Source",tag:"src"},number:{text:"GPS track/route number",tag:"number"},type:{text:"Type",tag:"type"}},nU;typeof document<"u"&&(nU=document.createElement("div"));function mre(e,t){let n,i="",r=Object.keys(SRe),o=r.length;for(n=0;n<o;n++){let f=r[n],d=SRe[f];d.value=af(e,d.tag,eo.gpx)??"",l(d.value)&&d.value!==""&&(i=`${i}<p>${d.text}: ${d.value}</p>`)}if(!l(i)||i==="")return;i=FSt.link(i),nU.innerHTML=i;let s=nU.querySelectorAll("a");for(n=0;n<s.length;n++)s[n].setAttribute("target","_blank");let a=z.WHITE,c=z.BLACK,u='<div class="cesium-infoBox-description-lighter" style="';return u+="overflow:auto;",u+="word-wrap:break-word;",u+=`background-color:${a.toCssColorString()};`,u+=`color:${c.toCssColorString()};`,u+='">',u+=`${nU.innerHTML}</div>`,nU.innerHTML="",u}function MRe(e,t,n,i){let r=dre(t),o=fre(t,n);o.position=r;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",z.RED,K9);o.billboard=RRe(s);let a=af(t,"name",eo.gpx);o.name=a,o.label=USt(),o.label.text=a,o.description=mre(t,o),i.clampToGround&&(o.billboard.heightReference=We.CLAMP_TO_GROUND,o.label.heightReference=We.CLAMP_TO_GROUND)}function zSt(e,t,n,i){let r=fre(t,n);r.description=mre(t,r);let o=hre(t,"rtept",eo.gpx),s=new Array(o.length);for(let a=0;a<o.length;a++)MRe(e,o[a],n,i),s[a]=dre(o[a]);r.polyline=ORe(i.routeColor),i.clampToGround&&(r.polyline.clampToGround=!0),r.polyline.positions=s}function VSt(e,t,n,i){let r=fre(t,n);r.description=mre(t,r);let o=hre(t,"trkseg",eo.gpx),s=[],a=[],c,u=!0,f=new gc;for(let d=0;d<o.length;d++)c=jSt(o[d]),s=s.concat(c.positions),c.times.length>0?(a=a.concat(c.times),f.addSamples(a,s),u=u&&!0):u=!1;if(u){let d=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",z.RED,K9);r.billboard=RRe(d),r.position=f,i.clampToGround&&(r.billboard.heightReference=We.CLAMP_TO_GROUND),r.availability=new Ps,r.availability.addInterval(new En({start:a[0],stop:a[a.length-1]}))}r.polyline=ORe(i.trackColor),r.polyline.positions=s,i.clampToGround&&(r.polyline.clampToGround=!0)}function jSt(e){let t={positions:[],times:[]},n=hre(e,"trkpt",eo.gpx),i;for(let r=0;r<n.length;r++){let o=dre(n[r]);t.positions.push(o),i=af(n[r],"time",eo.gpx),l(i)&&t.times.push(K.fromIso8601(i))}return t}function HSt(e){let t=_b(e,"metadata",eo.gpx);if(l(t)){let n={name:af(t,"name",eo.gpx),desc:af(t,"desc",eo.gpx),author:GSt(t),copyright:qSt(t),link:NRe(t),time:af(t,"time",eo.gpx),keywords:af(t,"keywords",eo.gpx),bounds:YSt(t)};if(l(n.name)||l(n.desc)||l(n.author)||l(n.copyright)||l(n.link)||l(n.time)||l(n.keywords)||l(n.bounds))return n}}function GSt(e){let t=_b(e,"author",eo.gpx);if(l(t)){let n={name:af(t,"name",eo.gpx),email:WSt(t),link:NRe(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function WSt(e){let t=_b(e,"email",eo.gpx);if(l(t)){let n=af(t,"id",eo.gpx),i=af(t,"domain",eo.gpx);return`${n}@${i}`}}function NRe(e){let t=_b(e,"link",eo.gpx);if(l(t)){let n={href:iU(t,"href"),text:af(t,"text",eo.gpx),mimeType:af(t,"type",eo.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function qSt(e){let t=_b(e,"copyright",eo.gpx);if(l(t)){let n={author:iU(t,"author"),year:af(t,"year",eo.gpx),license:af(t,"license",eo.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function YSt(e){let t=_b(e,"bounds",eo.gpx);if(l(t)){let n={minLat:tU(t,"minlat",eo.gpx),maxLat:tU(t,"maxlat",eo.gpx),minLon:tU(t,"minlon",eo.gpx),maxLon:tU(t,"maxlon",eo.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var wRe={wpt:MRe,rte:zSt,trk:VSt};function XSt(e,t,n,i){let r=Object.keys(wRe),o=r.length;for(let s=0;s<o;s++){let a=r[s],c=wRe[a],u=t.childNodes,f=u.length;for(let d=0;d<f;d++){let p=u[d];p.localName===a&&eo.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function IRe(e,t,n){let i=e._entityCollection;i.removeAll();let r=t.documentElement,o=iU(r,"version"),s=iU(r,"creator"),a,c=HSt(r);l(c)&&(a=c.name),r.localName==="gpx"?XSt(e,r,i,n):console.log(`GPX - Unsupported node: ${r.localName}`);let u,f=i.computeAvailability(),d=f.start,p=f.stop,g=K.equals(d,tt.MINIMUM_VALUE),m=K.equals(p,tt.MAXIMUM_VALUE);if(!g||!m){let A;g&&(A=new Date,A.setHours(0,0,0,0),d=K.fromDate(A)),m&&(A=new Date,A.setHours(24,0,0,0),p=K.fromDate(A)),u=new Lm,u.startTime=d,u.stopTime=p,u.currentTime=K.clone(d),u.clockRange=Rs.LOOP_STOP,u.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,u.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(p,d)/60,1),31556900))}let y=!1;return e._name!==a&&(e._name=a,y=!0),e._creator!==s&&(e._creator=s,y=!0),KSt(e._metadata,c)&&(e._metadata=c,y=!0),e._version!==o&&(e._version=o,y=!0),u!==e._clock&&(y=!0,e._clock=u),y&&e._changed.raiseEvent(e),Ds.setLoading(e,!1),e}function KSt(e,t){return!l(e)&&!l(t)?!1:l(e)&&l(t)?e.name!==t.name||e.dec!==t.desc||e.src!==t.src||e.author!==t.author||e.copyright!==t.copyright||e.link!==t.link||e.time!==t.time||e.bounds!==t.bounds:!0}function $St(e,t,n,i){i=i??H.EMPTY_OBJECT;let r=n;if(typeof n=="string"||n instanceof De){n=De.createIfNeeded(n),r=n.fetchBlob();let o=e._resourceCredits,s=n.credits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)o.push(s[c])}}return Promise.resolve(r).then(function(o){return o instanceof Blob?kSt(o).then(function(s){let a,c;try{a=DRe.parseFromString(s,"application/xml")}catch(u){c=u.toString()}if(l(c)||a.body||a.documentElement.tagName==="parsererror"){let u=l(c)?c:a.documentElement.firstChild.nodeValue;throw u||(u=a.body.innerText),new oe(u)}return IRe(e,a,i)}):IRe(e,o,i)}).catch(function(o){return e._error.raiseEvent(e,o),console.log(o),Promise.reject(o)})}function eP(){this._changed=new be,this._error=new be,this._loading=new be,this._clock=void 0,this._entityCollection=new Ya(this),this._entityCluster=new Kf,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new K_}eP.load=function(e,t){return new eP().load(e,t)};Object.defineProperties(eP.prototype,{name:{get:function(){return this._name}},version:{get:function(){return this._version}},creator:{get:function(){return this._creator}},metadata:{get:function(){return this._metadata}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}}});eP.prototype.update=function(e){return!0};eP.prototype.load=function(e,t){if(!l(e))throw new pe("data is required.");t=t??H.EMPTY_OBJECT,Ds.setLoading(this,!0);let n=this._name,i=this;return $St(this,this._entityCollection,e,t).then(function(){let r,o=i._entityCollection.computeAvailability(),s=o.start,a=o.stop,c=K.equals(s,tt.MINIMUM_VALUE),u=K.equals(a,tt.MAXIMUM_VALUE);if(!c||!u){let d;c&&(d=new Date,d.setHours(0,0,0,0),s=K.fromDate(d)),u&&(d=new Date,d.setHours(24,0,0,0),a=K.fromDate(d)),r=new Lm,r.startTime=s,r.stopTime=a,r.currentTime=K.clone(s),r.clockRange=Rs.LOOP_STOP,r.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,r.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(a,s)/60,1),31556900))}let f=!1;return r!==i._clock&&(i._clock=r,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),Ds.setLoading(i,!1),i}).catch(function(r){return Ds.setLoading(i,!1),i._error.raiseEvent(i,r),console.log(r),Promise.reject(r)})};var rU=eP;function JSt(e,t){this.position=e,this.headingPitchRoll=t}var oU=JSt;var XRe=Qo(ure(),1),fU=Qo(xf(),1);function ZSt(e,t){this.position=e,this.headingPitchRange=t}var sU=ZSt;function $9(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new be,this.tourEnd=new be,this.entryStart=new be,this.entryEnd=new be,this._activeEntries=[]}$9.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};$9.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;FRe.call(this,e,t,function(i){n.playlistIndex=0,i||LRe(n._activeEntries),n.tourEnd.raiseEvent(i)})};$9.prototype.stop=function(){LRe(this._activeEntries)};function LRe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function FRe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let r=QSt.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(r,e.scene.camera,t);else{let o=this;i.play(function(){o.entryEnd.raiseEvent(i);let s=o._activeEntries.indexOf(i);s>=0&&o._activeEntries.splice(s,1)}),r(e,t,n)}}else l(n)&&n(!1)}function QSt(e,t,n,i){let r=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(r,i),i)n(i);else{let o=this._activeEntries.indexOf(r);o>=0&&this._activeEntries.splice(o,1),this.playlistIndex++,FRe.call(this,e,t,n)}}var aU=$9;var sr=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var t=1.70158;return e===1?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return e===0?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-sr.Bounce.Out(1-e)},Out:function(e){return e<.36363636363636365?7.5625*e*e:e<.7272727272727273?7.5625*(e-=.5454545454545454)*e+.75:e<.9090909090909091?7.5625*(e-=.8181818181818182)*e+.9375:7.5625*(e-=.9545454545454546)*e+.984375},InOut:function(e){return e<.5?sr.Bounce.In(e*2)*.5:sr.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(t*2,e)/2:(1-Math.pow(2-t*2,e))/2+.5}}}}),cU=function(){return performance.now()},ewt=(function(){function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,t)}return e.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(n){return t._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];for(var r=0,o=n;r<o.length;r++){var s=o[r];(t=s._group)===null||t===void 0||t.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,n){t===void 0&&(t=cU()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<i.length;r++){var o=this._tweens[i[r]],s=!n;o&&o.update(t,s)===!1&&!n&&this.remove(o)}i=Object.keys(this._tweensAddedDuringUpdate)}},e})(),tP={Linear:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),o=tP.Utils.Linear;return t<0?o(e[0],e[1],i):t>1?o(e[n],e[n-1],n-i):o(e[r],e[r+1>n?n:r+1],i-r)},Bezier:function(e,t){for(var n=0,i=e.length-1,r=Math.pow,o=tP.Utils.Bernstein,s=0;s<=i;s++)n+=r(1-t,i-s)*r(t,s)*e[s]*o(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,r=Math.floor(i),o=tP.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(r=Math.floor(i=n*(1+t))),o(e[(r-1+n)%n],e[r],e[(r+1)%n],e[(r+2)%n],i-r)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(o(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):o(e[r?r-1:0],e[r],e[n<r+1?n:r+1],e[n<r+2?n:r+2],i-r)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=tP.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:(function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var i=t;i>1;i--)n*=i;return e[t]=n,n}})(),CatmullRom:function(e,t,n,i,r){var o=(n-e)*.5,s=(i-t)*.5,a=r*r,c=r*a;return(2*t-2*n+o+s)*c+(-3*t+3*n-2*o-s)*a+o*r+t}}},BRe=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),pre=new ewt,kRe=(function(){function e(t,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=sr.Linear.None,this._interpolationFunction=tP.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=BRe.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=t,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=pre,pre.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(t,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t<0?0:t,this},e.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},e.prototype.start=function(t,n){if(t===void 0&&(t=cU()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var r={};for(var o in this._valuesEnd)r[o]=this._valuesEnd[o];this._valuesEnd=r}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,r,o){for(var s in i){var a=t[s],c=Array.isArray(a),u=c?"array":typeof a,f=!c&&Array.isArray(i[s]);if(!(u==="undefined"||u==="function")){if(f){var d=i[s];if(d.length===0)continue;for(var p=[a],g=0,m=d.length;g<m;g+=1){var y=this._handleRelativeValue(a,d[g]);if(isNaN(y)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(y)}f&&(i[s]=p)}if((u==="object"||c)&&a&&!f){n[s]=c?[]:{};var A=a;for(var b in A)n[s][b]=A[b];r[s]=c?[]:{};var d=i[s];if(!this._isDynamic){var x={};for(var b in d)x[b]=d[b];i[s]=d=x}this._setupProperties(A,n[s],d,r[s],o)}else(typeof n[s]>"u"||o)&&(n[s]=a),c||(n[s]*=1),f?r[s]=i[s].slice().reverse():r[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=cU()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=cU()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;t<n;t++)this._chainedTweens[t].stop();return this},e.prototype.group=function(t){return t?(t.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var t;return(t=this._group)===null||t===void 0||t.remove(this),this},e.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},e.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},e.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},e.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},e.prototype.easing=function(t){return t===void 0&&(t=sr.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=tP.Linear),this._interpolationFunction=t,this},e.prototype.chain=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return this._chainedTweens=t,this},e.prototype.onStart=function(t){return this._onStartCallback=t,this},e.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},e.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},e.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},e.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},e.prototype.onStop=function(t){return this._onStopCallback=t,this},e.prototype.update=function(t,n){var i=this,r;if(t===void 0&&(t=cU()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=t-this._startTime,a=this._duration+((r=this._repeatDelayTime)!==null&&r!==void 0?r:this._delayTime),c=this._duration+this._repeat*a,u=function(){if(i._duration===0||s>c)return 1;var y=Math.trunc(s/a),A=s-y*a,b=Math.min(A/i._duration,1);return b===0&&s===i._duration?1:b},f=u(),d=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||s>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((s-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,m=this._chainedTweens.length;g<m;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,r){for(var o in i)if(n[o]!==void 0){var s=n[o]||0,a=i[o],c=Array.isArray(t[o]),u=Array.isArray(a),f=!c&&u;f?t[o]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(t[o],s,a,r):(a=this._handleRelativeValue(s,a),typeof a=="number"&&(t[o]=s+(a-s)*r))}},e.prototype._handleRelativeValue=function(t,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},e.autoStartOnUpdate=!1,e})();var U2i=BRe.nextId,D0=pre,z2i=D0.getAll.bind(D0),V2i=D0.removeAll.bind(D0),j2i=D0.add.bind(D0),H2i=D0.remove.bind(D0),G2i=D0.update.bind(D0);var twt={LINEAR_NONE:sr.Linear.None,QUADRATIC_IN:sr.Quadratic.In,QUADRATIC_OUT:sr.Quadratic.Out,QUADRATIC_IN_OUT:sr.Quadratic.InOut,CUBIC_IN:sr.Cubic.In,CUBIC_OUT:sr.Cubic.Out,CUBIC_IN_OUT:sr.Cubic.InOut,QUARTIC_IN:sr.Quartic.In,QUARTIC_OUT:sr.Quartic.Out,QUARTIC_IN_OUT:sr.Quartic.InOut,QUINTIC_IN:sr.Quintic.In,QUINTIC_OUT:sr.Quintic.Out,QUINTIC_IN_OUT:sr.Quintic.InOut,SINUSOIDAL_IN:sr.Sinusoidal.In,SINUSOIDAL_OUT:sr.Sinusoidal.Out,SINUSOIDAL_IN_OUT:sr.Sinusoidal.InOut,EXPONENTIAL_IN:sr.Exponential.In,EXPONENTIAL_OUT:sr.Exponential.Out,EXPONENTIAL_IN_OUT:sr.Exponential.InOut,CIRCULAR_IN:sr.Circular.In,CIRCULAR_OUT:sr.Circular.Out,CIRCULAR_IN_OUT:sr.Circular.InOut,ELASTIC_IN:sr.Elastic.In,ELASTIC_OUT:sr.Elastic.Out,ELASTIC_IN_OUT:sr.Elastic.InOut,BACK_IN:sr.Back.In,BACK_OUT:sr.Back.Out,BACK_IN_OUT:sr.Back.InOut,BOUNCE_IN:sr.Bounce.In,BOUNCE_OUT:sr.Bounce.Out,BOUNCE_IN_OUT:sr.Bounce.InOut},Ls=Object.freeze(twt);function J9(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}J9.prototype.play=function(e,t,n){if(this.activeCamera=t,l(e)&&e!==null){let r=this;this.activeCallback=function(o){delete r.activeCallback,delete r.activeCamera,e(l(o)?!1:o)}}let i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){let r=new ue(this.view.position);t.flyToBoundingSphere(r,i)}};J9.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};J9.prototype.getCameraOptions=function(e){let t={duration:this.duration};return l(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=Ls.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),l(e)&&(t=Ot(t,e)),t};var lU=J9;function gre(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}gre.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};gre.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var uU=gre;var KRe={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){let t=e.toLowerCase();return t=ng(t),KRe[t]}},Sre;typeof DOMParser<"u"&&(Sre=new DOMParser);var nwt=new XRe.default({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),yb=32,URe=2414016,zRe=1,VRe=16093e3,jRe=.1,HRe=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],GRe=["http://www.google.com/kml/ext/2.2"],iwt=["http://www.w3.org/2005/Atom"],Ve={kml:HRe,gx:GRe,atom:iwt,kmlgx:HRe.concat(GRe)},wre={Document:oOe,Folder:Twt,Placemark:Ewt,NetworkLink:Owt,GroundOverlay:Pwt,PhotoOverlay:cOe,ScreenOverlay:Iwt,Tour:vwt},xre=class{constructor(t){this._dataSource=t,this._deferred=Iu(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}get dataSource(){return this._dataSource}addNodes(t,n){this._stack.push({nodes:t,index:0,processingData:n}),this._used=!0}addPromise(t){this._promises.push(t)}wait(){let t=this._deferred;return this._used||t.resolve(),Promise.all([t.promise,Promise.all(this._promises)])}process(){let t=this._stack.length===1;return t&&(this._started=Z_._getTimestamp()),this._process(t)}_giveUpTime(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let t=this;setTimeout(function(){t._timeoutSet=!1,t._started=Z_._getTimestamp(),t._process(!0)},0)}_nextNode(){let t=this._stack,n=t[t.length-1],i=n.index,r=n.nodes;if(i!==r.length)return++n.index,r[i]}_pop(){let t=this._stack;return t.pop(),t.length===0?(this._deferred.resolve(),!1):!0}_process(t){let n=this.dataSource,i=this._stack[this._stack.length-1].processingData,r=this._nextNode();for(;l(r);){let o=wre[r.localName];if(l(o)&&(Ve.kml.indexOf(r.namespaceURI)!==-1||Ve.gx.indexOf(r.namespaceURI)!==-1)&&(o(n,r,i,this),this._timeoutSet||Z_._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}r=this._nextNode()}this._pop()&&t&&this._process(!0)}};function rwt(e){let t=e.slice(0,Math.min(4,e.size)),n=Iu(),i=new FileReader;return i.addEventListener("load",function(){n.resolve(new DataView(i.result).getUint32(0,!1)===1347093252)}),i.addEventListener("error",function(){n.reject(i.error)}),i.readAsArrayBuffer(t),n.promise}function owt(e){let t=Iu(),n=new FileReader;return n.addEventListener("load",function(){t.resolve(n.result)}),n.addEventListener("error",function(){t.reject(n.error)}),n.readAsText(e),t.promise}function $Re(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,r,o;for(let s in t)t.hasOwnProperty(s)&&(r=RegExp(`[< ]${s}:`),o=`xmlns:${s}=`,r.test(e)&&e.indexOf(o)===-1&&(l(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${o}"${t[s]}"`));return l(n)&&(e=n+i),e}function JRe(e){let t=e.indexOf("xmlns:"),n=e.indexOf(">",t),i,r,o;for(;t!==-1&&t<n;)i=e.slice(t,e.indexOf('"',t)),r=t,t=e.indexOf(i,t+1),t!==-1?(o=e.indexOf('"',e.indexOf('"',t)+1),e=e.slice(0,t-1)+e.slice(o+1,e.length),t=e.indexOf("xmlns:",r-1)):t=e.indexOf("xmlns:",r+1);return e}async function swt(e,t){let n=await e.getData(new O3);n=$Re(n),n=JRe(n),t.kml=Sre.parseFromString(n,"application/xml")}async function _re(e,t){let n=KRe.detectFromFilename(e.filename)??"application/octet-stream",i=await e.getData(new D3(n));t[e.filename]=i}function sd(e,t,n,i){let r=i.keys,o=new fU.default("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){let c=s[a],u=c.getAttribute(n);if(l(u)){let d=new fU.default(u).absoluteTo(o).toString(),p=r.indexOf(d);if(p!==-1){let g=r[p];c.setAttribute(n,i[g]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",g)}}}}function ad(e,t,n,i){let r=e.querySelectorAll(t);for(let o=0;o<r.length;o++){let s=r[o],a=s.getAttribute(n),c=Ire(a,i);l(c)&&s.setAttribute(n,c.url)}}function ZRe(e,t,n){let i=Da(e,"id");i=l(i)&&i.length!==0?i:$n(),l(n)&&(i=n+i);let r=t.getById(i);return l(r)&&(i=$n(),l(n)&&(i=n+i)),r=t.add(new Jr({id:i})),l(r.kml)||(r.addProperty("kml"),r.kml=new vre),r}function dU(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function t7(e,t){if(!l(e))return h.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return h.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),r=parseFloat(n[1]),o=parseFloat(n[2]);return i=isNaN(i)?0:i,r=isNaN(r)?0:r,o=isNaN(o)?0:o,h.fromDegrees(i,r,o,t)}function Z9(e,t){if(!l(e))return;let n=e.textContent.match(/[^\s\n]+/g);if(!l(n))return;let i=n.length,r=new Array(i),o=0;for(let s=0;s<i;s++)r[o++]=t7(n[s],t);return r}function Ab(e,t){if(!l(e))return;let n=e.getAttribute(t);if(n!==null){let i=parseFloat(n);return isNaN(i)?void 0:i}}function Da(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function ar(e,t,n){if(!l(e))return;let i=e.childNodes,r=i.length;for(let o=0;o<r;o++){let s=i[o];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function WRe(e,t,n){if(!l(e))return;let i=[],r=e.getElementsByTagNameNS("*",t),o=r.length;for(let s=0;s<o;s++){let a=r[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function Zm(e,t,n){if(!l(e))return[];let i=[],r=e.childNodes,o=r.length;for(let s=0;s<o;s++){let a=r[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function Si(e,t,n){let i=ar(e,t,n);if(l(i)){let r=parseFloat(i.textContent);return isNaN(r)?void 0:r}}function Fn(e,t,n){let i=ar(e,t,n);if(l(i))return i.textContent.trim()}function Qm(e,t,n){let i=ar(e,t,n);if(l(i)){let r=i.textContent.trim();return r==="1"||/^true$/i.test(r)}}function Ire(e,t,n){if(!l(e))return;let i;if(l(n)){e=e.replace(/\\/g,"/");let r=n[e];if(l(r))i=new De({url:r});else{let o=new fU.default(t.getUrlComponent()),s=new fU.default(e);r=n[s.absoluteTo(o)],l(r)&&(i=new De({url:r}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var cf={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Tre(e,t){if(!l(e)||/^\s*$/gm.test(e))return;e[0]==="#"&&(e=e.substring(1));let n=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,o=parseInt(e.substring(6,8),16)/255;return t?(o>0?(cf.maximumRed=o,cf.red=void 0):(cf.maximumRed=void 0,cf.red=0),r>0?(cf.maximumGreen=r,cf.green=void 0):(cf.maximumGreen=void 0,cf.green=0),i>0?(cf.maximumBlue=i,cf.blue=void 0):(cf.maximumBlue=void 0,cf.blue=0),cf.alpha=n,z.fromRandom(cf)):new z(o,r,i,n)}function qE(e,t,n){let i=Fn(e,t,n);if(l(i))return Tre(i,Fn(e,"colorMode",n)==="random")}function awt(e){let t=ar(e,"TimeStamp",Ve.kmlgx),n=Fn(t,"when",Ve.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=K.fromIso8601(n),r=new Ps;return r.addInterval(new En({start:i,stop:tt.MAXIMUM_VALUE})),r}function cwt(e){let t=ar(e,"TimeSpan",Ve.kmlgx);if(!l(t))return;let n,i=ar(t,"begin",Ve.kmlgx),r=l(i)?K.fromIso8601(i.textContent):void 0,o=ar(t,"end",Ve.kmlgx),s=l(o)?K.fromIso8601(o.textContent):void 0;if(l(r)&&l(s)){if(K.lessThan(s,r)){let a=r;r=s,s=a}n=new Ps,n.addInterval(new En({start:r,stop:s}))}else l(r)?(n=new Ps,n.addInterval(new En({start:r,stop:tt.MAXIMUM_VALUE}))):l(s)&&(n=new Ps,n.addInterval(new En({start:tt.MINIMUM_VALUE,stop:s})));return n}function QRe(){let e=new qc;return e.width=yb,e.height=yb,e.scaleByDistance=new qt(URe,zRe,VRe,jRe),e.pixelOffsetScaleByDistance=new qt(URe,zRe,VRe,jRe),e}function Pre(){let e=new Zh;return e.outline=!0,e.outlineColor=z.WHITE,e}function eOe(){let e=new Jh;return e.translucencyByDistance=new qt(3e6,1,5e6,0),e.pixelOffset=new U(17,0),e.horizontalOrigin=zi.LEFT,e.font="16px sans-serif",e.style=Ao.FILL_AND_OUTLINE,e}function Dre(e,t,n,i,r){let o=Fn(e,"href",Ve.kml);if(!l(o)||o.length===0)return;if(o.indexOf("root://icons/palette-")===0){let a=o.charAt(21),c=Si(e,"x",Ve.gx)??0,u=Si(e,"y",Ve.gx)??0;c=Math.min(c/32,7),u=7-Math.min(u/32,7);let f=8*u+c;o=`https://maps.google.com/mapfiles/kml/pal${a}/icon${f}.png`}let s=Ire(o,n,i);if(r){let a=Fn(e,"refreshMode",Ve.kml),c=Fn(e,"viewRefreshMode",Ve.kml);a==="onInterval"||a==="onExpire"?_t(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&_t(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let u=Fn(e,"viewBoundScale",Ve.kml)??1,f=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",d=Fn(e,"viewFormat",Ve.kml)??f,p=Fn(e,"httpQuery",Ve.kml);l(d)&&s.setQueryParameters(Tf(e7(d))),l(p)&&s.setQueryParameters(Tf(e7(p)));let g=t._ellipsoid;return Ore(s,t.camera,t.canvas,u,t._lastCameraView.bbox,g),s}return s}function lwt(e,t,n,i,r){let o=Si(t,"scale",Ve.kml),s=Si(t,"heading",Ve.kml),a=qE(t,"color",Ve.kml),c=ar(t,"Icon",Ve.kml),u=Dre(c,e,i,r,!1);l(c)&&!l(u)&&(u=!1);let f=Si(c,"x",Ve.gx),d=Si(c,"y",Ve.gx),p=Si(c,"w",Ve.gx),g=Si(c,"h",Ve.gx),m=ar(t,"hotSpot",Ve.kml),y=Ab(m,"x"),A=Ab(m,"y"),b=Da(m,"xunits"),x=Da(m,"yunits"),T=n.billboard;l(T)||(T=QRe(),n.billboard=T),T.image=u,T.scale=o,T.color=a,(l(f)||l(d)||l(p)||l(g))&&(T.imageSubRegion=new et(f,d,p,g)),l(s)&&s!==0&&(T.rotation=D.toRadians(-s),T.alignedAxis=h.UNIT_Z),o=o??1;let E,v;l(y)&&(b==="pixels"?E=-y*o:b==="insetPixels"?E=(y-yb)*o:b==="fraction"&&(E=-y*yb*o),E+=yb*.5*o),l(A)&&(x==="pixels"?v=A*o:x==="insetPixels"?v=(-A+yb)*o:x==="fraction"&&(v=A*yb*o),v-=yb*.5*o),(l(E)||l(v))&&(T.pixelOffset=new U(E,v))}function Q9(e,t,n,i,r){for(let o=0,s=t.childNodes.length;o<s;o++){let a=t.childNodes.item(o);if(a.localName==="IconStyle")lwt(e,a,n,i,r);else if(a.localName==="LabelStyle"){let c=n.label;l(c)||(c=eOe(),n.label=c),c.scale=Si(a,"scale",Ve.kml)??c.scale,c.fillColor=qE(a,"color",Ve.kml)??c.fillColor,c.text=n.name}else if(a.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new el,n.polyline=c),c.width=Si(a,"width",Ve.kml),c.material=qE(a,"color",Ve.kml),l(qE(a,"outerColor",Ve.gx))&&_t("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(Si(a,"outerWidth",Ve.gx))&&_t("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(Si(a,"physicalWidth",Ve.gx))&&_t("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(Qm(a,"labelVisibility",Ve.gx))&&_t("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(a.localName==="PolyStyle"){let c=n.polygon;l(c)||(c=Pre(),n.polygon=c),c.material=qE(a,"color",Ve.kml)??c.material,c.fill=Qm(a,"fill",Ve.kml)??c.fill,c.outline=Qm(a,"outline",Ve.kml)??c.outline}else if(a.localName==="BalloonStyle"){let c=Tre(Fn(a,"bgColor",Ve.kml))??z.WHITE,u=Tre(Fn(a,"textColor",Ve.kml))??z.BLACK,f=Fn(a,"text",Ve.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:u,text:f}}else if(a.localName==="ListStyle"){let c=Fn(a,"listItemType",Ve.kml);(c==="radioFolder"||c==="checkOffOnly")&&_t(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function uwt(e,t,n,i,r){let o=new Jr,s,a=-1,c=t.childNodes,u=c.length;for(let d=0;d<u;d++){let p=c[d];(p.localName==="Style"||p.localName==="StyleMap")&&(a=d)}if(a!==-1){let d=c[a];if(d.localName==="Style")Q9(e,d,o,i,r);else{let p=Zm(d,"Pair",Ve.kml);for(let g=0;g<p.length;g++){let m=p[g],y=Fn(m,"key",Ve.kml);if(y==="normal"){let A=Fn(m,"styleUrl",Ve.kml);if(l(A))s=n.getById(A),l(s)||(s=n.getById(`#${A}`)),l(s)&&o.merge(s);else{let b=ar(m,"Style",Ve.kml);Q9(e,b,o,i,r)}}else _t(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}let f=Fn(t,"styleUrl",Ve.kml);if(l(f)){let d=f;if(f[0]!=="#"&&f.indexOf("#")!==-1){let p=f.split("#"),g=p[0];d=`${i.getDerivedResource({url:g}).getUrlComponent()}#${p[1]}`}s=n.getById(d),l(s)||(s=n.getById(`#${d}`)),l(s)&&o.merge(s)}return o}function fwt(e,t,n){return t.fetchXML().then(function(i){return tOe(e,i,n,t,!0)})}function tOe(e,t,n,i,r,o){let s,a,c,u,f=WRe(t,"Style",Ve.kml);if(l(f)){let y=f.length;for(s=0;s<y;s++)u=f[s],a=Da(u,"id"),l(a)&&(a=`#${a}`,r&&l(i)&&(a=i.getUrlComponent()+a),l(n.getById(a))||(c=new Jr({id:a}),n.add(c),Q9(e,u,c,i,o)))}let d=WRe(t,"StyleMap",Ve.kml);if(l(d)){let y=d.length;for(s=0;s<y;s++){let A=d[s];if(a=Da(A,"id"),l(a)){let b=Zm(A,"Pair",Ve.kml);for(let x=0;x<b.length;x++){let T=b[x],E=Fn(T,"key",Ve.kml);if(E==="normal"){if(a=`#${a}`,r&&l(i)&&(a=i.getUrlComponent()+a),!l(n.getById(a))){c=n.getOrCreateEntity(a);let v=Fn(T,"styleUrl",Ve.kml);if(l(v)){v[0]!=="#"&&(v=`#${v}`),r&&l(i)&&(v=i.getUrlComponent()+v);let S=n.getById(v);l(S)&&c.merge(S)}else u=ar(T,"Style",Ve.kml),Q9(e,u,c,i,o)}}else _t(`kml-styleMap-${E}`,`KML - Unsupported StyleMap key: ${E}`)}}}}let p=[],g=t.getElementsByTagName("styleUrl"),m=g.length;for(s=0;s<m;s++){let y=g[s].textContent;if(y[0]!=="#"){let A=y.split("#");if(A.length===2){let b=A[0],x=i.getDerivedResource({url:b});p.push(fwt(e,x,n))}}}return p}function Rre(e,t,n){let i=new D_(e,t.id,["position"]),r=new m0(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new el,t.polyline.positions=new P_([i,r])}function nOe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?We.CLAMP_TO_GROUND:e==="relativeToGround"?We.RELATIVE_TO_GROUND:e==="absolute"?We.NONE:t==="clampToSeaFloor"?(_t("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),We.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(_t("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),We.RELATIVE_TO_GROUND):(l(e)?_t("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):_t("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),We.CLAMP_TO_GROUND)}function dwt(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new m0(e))}function hwt(e,t,n,i){if(!l(e))return;if(n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround")return e;(l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`);let r=e.length;for(let o=0;o<r;o++){let s=e[o];i.scaleToGeodeticSurface(s,s)}return e}function n7(e,t,n,i){let r=t.label;l(r)||(r=l(n.label)?n.label.clone():eOe(),t.label=r),r.text=t.name;let o=t.billboard;if(l(o)||(o=l(n.billboard)?n.billboard.clone():QRe(),t.billboard=o),l(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(z.YELLOW,64),l(o.scale)){let s=o.scale.getValue();s!==0?r.pixelOffset=new U(s*16+1,0):(r.pixelOffset=void 0,r.horizontalOrigin=void 0)}l(i)&&e._clampToGround&&(o.heightReference=i,r.heightReference=i)}function iOe(e,t){let n=e.path;l(n)||(n=new Eg,n.leadTime=0,e.path=n);let i=t.polyline;l(i)&&(n.material=i.material,n.width=i.width)}function mwt(e,t,n,i,r){let o=Fn(n,"coordinates",Ve.kml),s=Fn(n,"altitudeMode",Ve.kml),a=Fn(n,"altitudeMode",Ve.gx),c=Qm(n,"extrude",Ve.kml),u=e._ellipsoid,f=t7(o,u);return i.position=f,n7(e,i,r,nOe(s,a)),c&&dU(s,a)&&Rre(t,i,r),!0}function qRe(e,t,n,i,r){let o=ar(n,"coordinates",Ve.kml),s=Fn(n,"altitudeMode",Ve.kml),a=Fn(n,"altitudeMode",Ve.gx),c=Qm(n,"extrude",Ve.kml),u=Qm(n,"tessellate",Ve.kml),f=dU(s,a),d=Si(n,"drawOrder",Ve.gx),p=e._ellipsoid,g=Z9(o,p),m=r.polyline;if(f&&c){let y=new Cg;i.wall=y,y.positions=g;let A=r.polygon;l(A)&&(y.fill=A.fill,y.material=A.material),y.outline=!0,l(m)?(y.outlineColor=l(m.material)?m.material.color:z.WHITE,y.outlineWidth=m.width):l(A)&&(y.outlineColor=l(A.material)?A.material.color:z.WHITE)}else if(e._clampToGround&&!f&&u){let y=new el;y.clampToGround=!0,i.polyline=y,y.positions=g,l(m)?(y.material=l(m.material)?m.material.color.getValue(tt.MINIMUM_VALUE):z.WHITE,y.width=m.width??1):(y.material=z.WHITE,y.width=1),y.zIndex=d}else l(d)&&_t("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&_t("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),m=l(m)?m.clone():new el,i.polyline=m,m.positions=hwt(g,s,a,p),(!u||f)&&(m.arcType=ln.NONE);return!0}function pwt(e,t,n,i,r){let o=ar(n,"outerBoundaryIs",Ve.kml),s=ar(o,"LinearRing",Ve.kml),a=ar(s,"coordinates",Ve.kml),c=e._ellipsoid,u=Z9(a,c),f=Qm(n,"extrude",Ve.kml),d=Fn(n,"altitudeMode",Ve.kml),p=Fn(n,"altitudeMode",Ve.gx),g=dU(d,p),m=l(r.polygon)?r.polygon.clone():Pre(),y=r.polyline;if(l(y)&&(m.outlineColor=l(y.material)?y.material.color:z.WHITE,m.outlineWidth=y.width),i.polygon=m,g?(m.perPositionHeight=!0,m.extrudedHeight=f?0:void 0):e._clampToGround||(m.height=0),l(u)){let A=new Rc(u),b=Zm(n,"innerBoundaryIs",Ve.kml);for(let x=0;x<b.length;x++){s=Zm(b[x],"LinearRing",Ve.kml);for(let T=0;T<s.length;T++)a=ar(s[T],"coordinates",Ve.kml),u=Z9(a,c),l(u)&&A.holes.push(new Rc(u))}m.hierarchy=A}return!0}function gwt(e,t,n,i,r){let o=Fn(n,"altitudeMode",Ve.kml),s=Fn(n,"altitudeMode",Ve.gx),a=Zm(n,"coord",Ve.gx),c=Zm(n,"angles",Ve.gx),u=Zm(n,"when",Ve.kml),f=Qm(n,"extrude",Ve.kml),d=dU(o,s),p=e._ellipsoid;c.length>0&&_t("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let g=Math.min(a.length,u.length),m=[],y=[];for(let b=0;b<g;b++){let x=t7(a[b].textContent,p);m.push(x),y.push(K.fromIso8601(u[b].textContent))}let A=new gc;return A.addSamples(y,m),i.position=A,n7(e,i,r,nOe(o,s)),iOe(i,r),i.availability=new Ps,u.length>0&&i.availability.addInterval(new En({start:y[0],stop:y[y.length-1]})),d&&f&&Rre(t,i,r),!0}function YRe(e,t,n,i,r,o,s,a,c){let u=e[0],f=e[e.length-1],d=new gc;d.addSamples(e,t),n.intervals.addInterval(new En({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:dwt(d,s,a)})),i.addInterval(new En({start:u,stop:f,isStartIncluded:c,isStopIncluded:c})),r.intervals.addInterval(new En({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:o}))}function _wt(e,t,n,i,r){let o=Qm(n,"interpolate",Ve.gx),s=Zm(n,"Track",Ve.gx),a,c,u,f=!1,d=new O_,p=new Ps,g=new mc,m=e._ellipsoid;for(let y=0,A=s.length;y<A;y++){let b=s[y],x=Zm(b,"when",Ve.kml),T=Zm(b,"coord",Ve.gx),E=Fn(b,"altitudeMode",Ve.kml),v=Fn(b,"altitudeMode",Ve.gx),S=dU(E,v),I=Qm(b,"extrude",Ve.kml),R=Math.min(T.length,x.length),O=[];a=[];for(let L=0;L<R;L++){let _=t7(T[L].textContent,m);O.push(_),a.push(K.fromIso8601(x[L].textContent))}o&&(l(c)&&YRe([c,a[0]],[u,O[0]],g,p,d,!1,"absolute",void 0,!1),c=a[R-1],u=O[O.length-1]),YRe(a,O,g,p,d,S&&I,E,v,!0),f=f||S&&I}return i.availability=p,i.position=g,n7(e,i,r),iOe(i,r),f&&(Rre(t,i,r),i.polyline.show=d),!0}var rOe={Point:mwt,LineString:qRe,LinearRing:qRe,Polygon:pwt,Track:gwt,MultiTrack:_wt,MultiGeometry:ywt,Model:Awt};function ywt(e,t,n,i,r,o){let s=n.childNodes,a=!1;for(let c=0,u=s.length;c<u;c++){let f=s.item(c),d=rOe[f.localName];if(l(d)){let p=ZRe(f,t,o);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,d(e,t,f,p,r)&&(a=!0)}}return a}function Awt(e,t,n,i,r){return _t("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function bwt(e,t){let n=ar(e,"ExtendedData",Ve.kml);if(!l(n))return;l(ar(n,"SchemaData",Ve.kml))&&_t("kml-schemaData","KML - SchemaData is unsupported"),l(Da(n,"xmlns:prefix"))&&_t("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},r=Zm(n,"Data",Ve.kml);if(l(r)){let o=r.length;for(let s=0;s<o;s++){let a=r[s],c=Da(a,"name");l(c)&&(i[c]={displayName:Fn(a,"displayName",Ve.kml),value:Fn(a,"value",Ve.kml)})}}t.kml.extendedData=i}var jr;typeof document<"u"&&(jr=document.createElement("div"));function xwt(e,t,n,i,r){let o,s,a,c=t.kml,u=c.extendedData,f=Fn(e,"description",Ve.kml),d=t.balloonStyle??n.balloonStyle,p=z.WHITE,g=z.BLACK,m=f;l(d)&&(p=d.bgColor??z.WHITE,g=d.textColor??z.BLACK,m=d.text??f);let y;if(l(m)){if(m=m.replace("$[name]",t.name??""),m=m.replace("$[description]",f??""),m=m.replace("$[address]",c.address??""),m=m.replace("$[Snippet]",c.snippet??""),m=m.replace("$[id]",t.id),m=m.replace("$[geDirections]",""),l(u)){let x=m.match(/\$\[.+?\]/g);if(x!==null)for(o=0;o<x.length;o++){let T=x[o],E=T.substr(2,T.length-3),v=/\/displayName$/.test(E);E=E.replace(/\/displayName$/,""),y=u[E],l(y)&&(y=v?y.displayName:y.value),l(y)&&(m=m.replace(T,y??""))}}}else if(l(u)&&(a=Object.keys(u),a.length>0)){for(m='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',o=0;o<a.length;o++)s=a[o],y=u[s],m+=`<tr><th>${y.displayName??s}</th><td>${y.value??""}</td></tr>`;m+="</tbody></table>"}if(!l(m))return;m=nwt.link(m),jr.innerHTML=m;let A=jr.querySelectorAll("a");for(o=0;o<A.length;o++)A[o].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(sd(jr,"a","href",i),sd(jr,"link","href",i),sd(jr,"area","href",i),sd(jr,"img","src",i),sd(jr,"iframe","src",i),sd(jr,"video","src",i),sd(jr,"audio","src",i),sd(jr,"source","src",i),sd(jr,"track","src",i),sd(jr,"input","src",i),sd(jr,"embed","src",i),sd(jr,"script","src",i),sd(jr,"video","poster",i)),ad(jr,"a","href",r),ad(jr,"link","href",r),ad(jr,"area","href",r),ad(jr,"img","src",r),ad(jr,"iframe","src",r),ad(jr,"video","src",r),ad(jr,"audio","src",r),ad(jr,"source","src",r),ad(jr,"track","src",r),ad(jr,"input","src",r),ad(jr,"embed","src",r),ad(jr,"script","src",r),ad(jr,"video","poster",r);let b='<div class="cesium-infoBox-description-lighter" style="';b+="overflow:auto;",b+="word-wrap:break-word;",b+=`background-color:${p.toCssColorString()};`,b+=`color:${g.toCssColorString()};`,b+='">',b+=`${jr.innerHTML}</div>`,jr.innerHTML="",t.description=b}function i7(e,t,n){let i=n.entityCollection,r=n.parentEntity,o=n.sourceResource,s=n.uriResolver,a=ZRe(t,i,n.context),c=a.kml,u=uwt(e,t,n.styleCollection,o,s),f=Fn(t,"name",Ve.kml);a.name=f,a.parent=r;let d=cwt(t);l(d)||(d=awt(t)),a.availability=d,Mre(a);function p(T){return T?T.show&&p(T.parent):!0}let g=Qm(t,"visibility",Ve.kml);a.show=p(r)&&(g??!0);let m=ar(t,"author",Ve.atom),y=c.author;y.name=Fn(m,"name",Ve.atom),y.uri=Fn(m,"uri",Ve.atom),y.email=Fn(m,"email",Ve.atom);let A=ar(t,"link",Ve.atom),b=c.link;b.href=Da(A,"href"),b.hreflang=Da(A,"hreflang"),b.rel=Da(A,"rel"),b.type=Da(A,"type"),b.title=Da(A,"title"),b.length=Da(A,"length"),c.address=Fn(t,"address",Ve.kml),c.phoneNumber=Fn(t,"phoneNumber",Ve.kml),c.snippet=Fn(t,"Snippet",Ve.kml),bwt(t,a),xwt(t,a,u,s,o);let x=e._ellipsoid;return aOe(t,a,x),sOe(t,a,x),l(ar(t,"Region",Ve.kml))&&_t("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:u}}function oOe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Twt(e,t,n,i){let r=i7(e,t,n),o=Je(n);o.parentEntity=r.entity,oOe(e,t,o,i)}function Ewt(e,t,n,i){let r=i7(e,t,n),o=r.entity,s=r.styleEntity,a=!1,c=t.childNodes;for(let u=0,f=c.length;u<f&&!a;u++){let d=c.item(u),p=rOe[d.localName];l(p)&&(p(e,n.entityCollection,d,o,s,o.id),a=!0)}a||(o.merge(s),n7(e,o,s))}var Cwt={FlyTo:wwt,Wait:Swt,SoundCue:yre,AnimatedUpdate:yre,TourControl:yre};function vwt(e,t,n,i){let r=Fn(t,"name",Ve.kml),o=Da(t,"id"),s=new aU(r,o),a=ar(t,"Playlist",Ve.gx);if(a){let c=e._ellipsoid,u=a.childNodes;for(let f=0;f<u.length;f++){let d=u[f];if(d.localName){let p=Cwt[d.localName];p?p(s,d,c):console.log(`Unknown KML Tour playlist entry type ${d.localName}`)}}}e._kmlTours.push(s)}function yre(e,t){_t(`KML Tour unsupported node ${t.localName}`)}function Swt(e,t){let n=Si(t,"duration",Ve.gx);e.addPlaylistEntry(new uU(n))}function wwt(e,t,n){let i=Si(t,"duration",Ve.gx),r=Fn(t,"flyToMode",Ve.gx),o={kml:{}};aOe(t,o,n),sOe(t,o,n);let s=o.kml.lookAt||o.kml.camera,a=new lU(i,r,s);e.addPlaylistEntry(a)}function sOe(e,t,n){let i=ar(e,"Camera",Ve.kml);if(l(i)){let r=Si(i,"longitude",Ve.kml)??0,o=Si(i,"latitude",Ve.kml)??0,s=Si(i,"altitude",Ve.kml)??0,a=Si(i,"heading",Ve.kml)??0,c=Si(i,"tilt",Ve.kml)??0,u=Si(i,"roll",Ve.kml)??0,f=h.fromDegrees(r,o,s,n),d=wc.fromDegrees(a,c-90,u);t.kml.camera=new oU(f,d)}}function aOe(e,t,n){let i=ar(e,"LookAt",Ve.kml);if(l(i)){let r=Si(i,"longitude",Ve.kml)??0,o=Si(i,"latitude",Ve.kml)??0,s=Si(i,"altitude",Ve.kml)??0,a=Si(i,"heading",Ve.kml),c=Si(i,"tilt",Ve.kml),u=Si(i,"range",Ve.kml)??0;c=D.toRadians(c??0),a=D.toRadians(a??0);let f=new mh(a,c-D.PI_OVER_TWO,u),d=h.fromDegrees(r,o,s,n);t.kml.lookAt=new sU(d,f)}}function Iwt(e,t,n,i){let r=n.screenOverlayContainer;if(!l(r))return;let o=n.sourceResource,s=n.uriResolver,a=ar(t,"Icon",Ve.kml),c=Dre(a,e,o,s,!1);if(!l(c))return;let u=document.createElement("img");e._screenOverlays.push(u),u.src=c.url,u.onload=function(){let f=["position: absolute"],d=ar(t,"screenXY",Ve.kml),p=ar(t,"overlayXY",Ve.kml),g=ar(t,"size",Ve.kml),m,y,A,b,x,T;l(g)&&(m=Ab(g,"x"),y=Ab(g,"y"),A=Da(g,"xunits"),b=Da(g,"yunits"),l(m)&&m!==-1&&m!==0&&(A==="fraction"?x=`width: ${Math.floor(m*100)}%`:A==="pixels"&&(x=`width: ${m}px`),f.push(x)),l(y)&&y!==-1&&y!==0&&(b==="fraction"?T=`height: ${Math.floor(y*100)}%`:b==="pixels"&&(T=`height: ${y}px`),f.push(T))),u.style=f.join(";");let E=0,v=u.height;l(p)&&(m=Ab(p,"x"),y=Ab(p,"y"),A=Da(p,"xunits"),b=Da(p,"yunits"),l(m)&&(A==="fraction"?E=m*u.width:(A==="pixels"||A==="insetPixels")&&(E=m)),l(y)&&(b==="fraction"?v=y*u.height:(b==="pixels"||b==="insetPixels")&&(v=y))),l(d)&&(m=Ab(d,"x"),y=Ab(d,"y"),A=Da(d,"xunits"),b=Da(d,"yunits"),l(m)&&(A==="fraction"?x=`left: calc(${Math.floor(m*100)}% - ${E}px)`:A==="pixels"?x=`left: ${m-E}px`:A==="insetPixels"&&(x=`right: ${m-E}px`),f.push(x)),l(y)&&(b==="fraction"?T=`bottom: calc(${Math.floor(y*100)}% - ${v}px)`:b==="pixels"?T=`bottom: ${y-v}px`:b==="insetPixels"&&(T=`top: ${y-v}px`),f.push(T))),u.style=f.join(";")},r.appendChild(u)}function Pwt(e,t,n,i){let o=i7(e,t,n).entity,s,a=!1,c=e._ellipsoid,u=Z9(ar(t,"LatLonQuad",Ve.gx),c),f=Si(t,"drawOrder",Ve.kml);if(l(u))s=Pre(),s.hierarchy=new Rc(u),s.zIndex=f,o.polygon=s,a=!0;else{s=new Qh,s.zIndex=f,o.rectangle=s;let m=ar(t,"LatLonBox",Ve.kml);if(l(m)){let y=Si(m,"west",Ve.kml),A=Si(m,"south",Ve.kml),b=Si(m,"east",Ve.kml),x=Si(m,"north",Ve.kml);l(y)&&(y=D.negativePiToPi(D.toRadians(y))),l(A)&&(A=D.clampToLatitudeRange(D.toRadians(A))),l(b)&&(b=D.negativePiToPi(D.toRadians(b))),l(x)&&(x=D.clampToLatitudeRange(D.toRadians(x))),s.coordinates=new ie(y,A,b,x);let T=Si(m,"rotation",Ve.kml);if(l(T)){let E=D.toRadians(T);s.rotation=E,s.stRotation=E}}}let d=ar(t,"Icon",Ve.kml),p=Dre(d,e,n.sourceResource,n.uriResolver,!0);if(l(p)){a&&_t("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let m=Si(d,"x",Ve.gx),y=Si(d,"y",Ve.gx),A=Si(d,"w",Ve.gx),b=Si(d,"h",Ve.gx);(l(m)||l(y)||l(A)||l(b))&&_t("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=p,s.material.color=qE(t,"color",Ve.kml),s.material.transparent=!0}else s.material=qE(t,"color",Ve.kml);let g=Fn(t,"altitudeMode",Ve.kml);l(g)?g==="absolute"?(s.height=Si(t,"altitude",Ve.kml),s.zIndex=void 0):g!=="clampToGround"&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`):(g=Fn(t,"altitudeMode",Ve.gx),g==="relativeToSeaFloor"?(_t("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=Si(t,"altitude",Ve.kml),s.zIndex=void 0):g==="clampToSeaFloor"?_t("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(g)&&_t("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`))}function cOe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),_t(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var bb={INTERVAL:0,EXPIRE:1,STOP:2};function e7(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var Dwt=new ie,nP=new he,Are=new U,Rwt=new h;function Ore(e,t,n,i,r,o){function s(u){return u<-D.PI_OVER_TWO?-D.PI_OVER_TWO:u>D.PI_OVER_TWO?D.PI_OVER_TWO:u}function a(u){return u>D.PI?u-D.TWO_PI:u<-D.PI?u+D.TWO_PI:u}let c=ix(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==re.MORPHING){let u,f;if(r=r??Dwt,l(n)&&(Are.x=n.clientWidth*.5,Are.y=n.clientHeight*.5,u=t.pickEllipsoid(Are,o,Rwt)),l(u)?f=o.cartesianToCartographic(u,nP):(f=ie.center(r,nP),u=o.cartographicToCartesian(f)),l(i)&&!D.equalsEpsilon(i,1,D.EPSILON9)){let b=r.width*i*.5,x=r.height*i*.5;r=new ie(a(f.longitude-b),s(f.latitude-x),a(f.longitude+b),s(f.latitude+x))}c=c.replace("[bboxWest]",D.toDegrees(r.west).toString()),c=c.replace("[bboxSouth]",D.toDegrees(r.south).toString()),c=c.replace("[bboxEast]",D.toDegrees(r.east).toString()),c=c.replace("[bboxNorth]",D.toDegrees(r.north).toString());let d=D.toDegrees(f.longitude).toString(),p=D.toDegrees(f.latitude).toString();c=c.replace("[lookatLon]",d),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",D.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",D.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",h.distance(t.positionWC,u)),c=c.replace("[lookatTerrainLon]",d),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",f.height.toString()),o.cartesianToCartographic(t.positionWC,nP),c=c.replace("[cameraLon]",D.toDegrees(nP.longitude).toString()),c=c.replace("[cameraLat]",D.toDegrees(nP.latitude).toString()),c=c.replace("[cameraAlt]",D.toDegrees(nP.height).toString());let g=t.frustum,m=g.aspectRatio,y="",A="";if(l(m)){let b=D.toDegrees(g.fov);m>1?(y=b,A=b/m):(A=b,y=b*m)}c=c.replace("[horizFov]",y.toString()),c=c.replace("[vertFov]",A.toString())}else c=c.replace("[bboxWest]","-180"),c=c.replace("[bboxSouth]","-90"),c=c.replace("[bboxEast]","180"),c=c.replace("[bboxNorth]","90"),c=c.replace("[lookatLon]",""),c=c.replace("[lookatLat]",""),c=c.replace("[lookatRange]",""),c=c.replace("[lookatTilt]",""),c=c.replace("[lookatHeading]",""),c=c.replace("[lookatTerrainLon]",""),c=c.replace("[lookatTerrainLat]",""),c=c.replace("[lookatTerrainAlt]",""),c=c.replace("[cameraLon]",""),c=c.replace("[cameraLat]",""),c=c.replace("[cameraAlt]",""),c=c.replace("[horizFov]",""),c=c.replace("[vertFov]","");l(n)?(c=c.replace("[horizPixels]",n.clientWidth),c=c.replace("[vertPixels]",n.clientHeight)):(c=c.replace("[horizPixels]",""),c=c.replace("[vertPixels]","")),c=c.replace("[terrainEnabled]","1"),c=c.replace("[clientVersion]","1"),c=c.replace("[kmlVersion]","2.2"),c=c.replace("[clientName]","Cesium"),c=c.replace("[language]","English"),e.setQueryParameters(Tf(c))}function Owt(e,t,n,i){let o=i7(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=ar(t,"Link",Ve.kml);if(l(c)||(c=ar(t,"Url",Ve.kml)),l(c)){let u=Fn(c,"href",Ve.kml),f,d;if(l(u)){let p=u;if(u=Ire(u,s,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=u.clone(),f=Fn(c,"viewRefreshMode",Ve.kml),f==="onRegion"){_t("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}d=Fn(c,"viewBoundScale",Ve.kml)??1;let A=f==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",b=Fn(c,"viewFormat",Ve.kml)??A,x=Fn(c,"httpQuery",Ve.kml);l(b)&&u.setQueryParameters(Tf(e7(b))),l(x)&&u.setQueryParameters(Tf(e7(x)));let T=e._ellipsoid;Ore(u,e.camera,e.canvas,d,e._lastCameraView.bbox,T)}let g={sourceUri:p,uriResolver:a,context:o.id,screenOverlayContainer:n.screenOverlayContainer},m=new Ya,y=Cre(e,m,u,g).then(function(A){let b=e._entityCollection,x=m.values;b.suspendEvents();for(let v=0;v<x.length;v++){let S=x[v];l(S.parent)||(S.parent=o,Mre(S)),b.add(S)}b.resumeEvents();let T=Fn(c,"refreshMode",Ve.kml),E=Si(c,"refreshInterval",Ve.kml)??0;if(T==="onInterval"&&E>0||T==="onExpire"||f==="onStop"){let v=ar(A,"NetworkLinkControl",Ve.kml),S=l(v),I=K.now(),R={id:$n(),href:u,cookie:{},lastUpdated:I,updating:!1,entity:o,viewBoundScale:d,needsUpdate:!1,cameraUpdateTime:I},O=0;if(S&&(R.cookie=Tf(Fn(v,"cookie",Ve.kml)??""),O=Si(v,"minRefreshPeriod",Ve.kml)??0),T==="onInterval")S&&(E=Math.max(O,E)),R.refreshMode=bb.INTERVAL,R.time=E;else if(T==="onExpire"){let L;if(S&&(L=Fn(v,"expires",Ve.kml)),l(L))try{let _=K.fromIso8601(L),C=K.secondsDifference(_,I);C>0&&C<O&&K.addSeconds(I,O,_),R.refreshMode=bb.EXPIRE,R.time=_}catch{_t("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else _t("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else l(e.camera)?(R.refreshMode=bb.STOP,R.time=Si(c,"viewRefreshTime",Ve.kml)??0):_t("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");l(R.refreshMode)&&e._networkLinks.set(R.id,R)}}).catch(function(A){_t(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,A)});i.addPromise(y)}}}function Mwt(e,t,n,i){let r=wre[t.localName];return l(r)?r(e,t,n,i):cOe(e,t,n,i)}function Ere(e,t,n,i,r,o,s){t.removeAll();let a=n.documentElement,c=a.localName==="Document"?a:ar(a,"Document",Ve.kml),u=Fn(c,"name",Ve.kml);l(u)||(u=w_(i.getUrlComponent())),l(e._name)||(e._name=u);let f=new Z_._DeferredLoading(e),d=new Ya(e);return Promise.all(tOe(e,n,d,i,!1,r)).then(function(){let p=n.documentElement;if(p.localName==="kml"){let m=p.childNodes;for(let y=0;y<m.length;y++){let A=m[y];if(l(wre[A.localName])){p=A;break}}}let g={parentEntity:void 0,entityCollection:t,styleCollection:d,sourceResource:i,uriResolver:r,context:s,screenOverlayContainer:o};return t.suspendEvents(),Mwt(e,p,g,f),t.resumeEvents(),f.wait().then(function(){return n.documentElement})})}async function Nwt(e,t,n,i,r){let o=Zt("ThirdParty/Workers/zip-web-worker.js"),s=Zt("ThirdParty/zip-module.wasm");p3({workerURI:o,wasmURI:s});let a=new ME(new rf(n)),c=await a.getEntries(),u=[],f={},d;for(let p=0;p<c.length;p++){let g=c[p];g.directory||(/\.kml$/i.test(g.filename)&&(!l(d)||!/\//i.test(g.filename))?(l(d)&&u.push(_re(d,f)),d=g):u.push(_re(g,f)))}if(l(d)&&u.push(swt(d,f)),await Promise.all(u),a.close(),!l(f.kml))throw new oe("KMZ file does not contain a KML document.");return f.keys=Object.keys(f),Ere(e,t,f.kml,i,f,r)}function Cre(e,t,n,i){i=i??H.EMPTY_OBJECT;let r=i.sourceUri,o=i.uriResolver,s=i.context,a=i.screenOverlayContainer,c=n;if(typeof n=="string"||n instanceof De){n=De.createIfNeeded(n),c=n.fetchBlob(),r=r??n.clone();let u=e._resourceCredits,f=n.credits;if(l(f)){let d=f.length;for(let p=0;p<d;p++)u.push(f[p])}}else r=r??De.DEFAULT.clone();return r=De.createIfNeeded(r),l(a)&&(a=Ln(a)),Promise.resolve(c).then(function(u){return u instanceof Blob?rwt(u).then(function(f){return f?Nwt(e,t,u,r,a):owt(u).then(function(d){d=$Re(d),d=JRe(d);let p,g;try{p=Sre.parseFromString(d,"application/xml")}catch(m){g=m.toString()}if(l(g)||p.body||p.documentElement.tagName==="parsererror"){let m=l(g)?g:p.documentElement.firstChild.nodeValue;throw m||(m=p.body.innerText),new oe(m)}return Ere(e,t,p,r,o,a,s)})}):Ere(e,t,u,r,o,a,s)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}var Z_=class e{constructor(t){t=t??H.EMPTY_OBJECT;let n=t.camera,i=t.canvas;this._changed=new be,this._error=new be,this._loading=new be,this._refresh=new be,this._unsupportedNode=new be,this._clock=void 0,this._entityCollection=new Ya(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new K_,this._networkLinks=new kt,this._entityCluster=new Kf,this.canvas=i,this.camera=n,this._lastCameraView={position:l(n)?h.clone(n.positionWC):void 0,direction:l(n)?h.clone(n.directionWC):void 0,up:l(n)?h.clone(n.upWC):void 0,bbox:l(n)?n.computeViewRectangle():ie.clone(ie.MAX_VALUE)},this._ellipsoid=t.ellipsoid??ee.default;let r=t.credit;typeof r=="string"&&(r=new It(r)),this._credit=r,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}static load(t,n){return n=n??H.EMPTY_OBJECT,new e(n).load(t,n)}get name(){return this._name}set name(t){this._name!==t&&(this._name=t,this._changed.raiseEvent(this))}get clock(){return this._clock}get entities(){return this._entityCollection}get isLoading(){return this._isLoading}get changedEvent(){return this._changed}get errorEvent(){return this._error}get loadingEvent(){return this._loading}get refreshEvent(){return this._refresh}get unsupportedNodeEvent(){return this._unsupportedNode}get show(){return this._entityCollection.show}set show(t){this._entityCollection.show=t}get clustering(){return this._entityCluster}set clustering(t){this._entityCluster=t}get credit(){return this._credit}get kmlTours(){return this._kmlTours}load(t,n){n=n??H.EMPTY_OBJECT,Ds.setLoading(this,!0);let i=this._name;this._name=void 0,this._clampToGround=n.clampToGround??!1;let r=this;return Cre(this,this._entityCollection,t,n).then(function(){let o,s=r._entityCollection.computeAvailability(),a=s.start,c=s.stop,u=K.equals(a,tt.MINIMUM_VALUE),f=K.equals(c,tt.MAXIMUM_VALUE);if(!u||!f){let p;u&&(p=new Date,p.setHours(0,0,0,0),a=K.fromDate(p)),f&&(p=new Date,p.setHours(24,0,0,0),c=K.fromDate(p)),o=new Lm,o.startTime=a,o.stopTime=c,o.currentTime=K.clone(a),o.clockRange=Rs.LOOP_STOP,o.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(c,a)/60,1),31556900))}let d=!1;return o!==r._clock&&(r._clock=o,d=!0),i!==r._name&&(d=!0),d&&r._changed.raiseEvent(r),Ds.setLoading(r,!1),r}).catch(function(o){return Ds.setLoading(r,!1),r._error.raiseEvent(r,o),console.log(o),Promise.reject(o)})}destroy(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()}update(t){let n=this._networkLinks;if(n.length===0)return!0;let i=K.now(),r=this;bre.removeAll();function o(d){let p=d._children,g=p.length;for(let m=0;m<g;++m){let y=p[m];bre.set(y.id,y),o(y)}}let s=!1,a=this._lastCameraView,c=this.camera;l(c)&&!(c.positionWC.equalsEpsilon(a.position,D.EPSILON7)&&c.directionWC.equalsEpsilon(a.direction,D.EPSILON7)&&c.upWC.equalsEpsilon(a.up,D.EPSILON7))&&(a.position=h.clone(c.positionWC),a.direction=h.clone(c.directionWC),a.up=h.clone(c.upWC),a.bbox=c.computeViewRectangle(),s=!0);let u=new kt,f=!1;return n.values.forEach(function(d){let p=d.entity;if(!bre.contains(p.id)){if(!d.updating){let g=!1;if(d.refreshMode===bb.INTERVAL?K.secondsDifference(i,d.lastUpdated)>d.time&&(g=!0):d.refreshMode===bb.EXPIRE?K.greaterThan(i,d.time)&&(g=!0):d.refreshMode===bb.STOP&&(s&&(d.needsUpdate=!0,d.cameraUpdateTime=i),d.needsUpdate&&K.secondsDifference(i,d.cameraUpdateTime)>=d.time&&(g=!0)),g){o(p),d.updating=!0;let m=new Ya,y=d.href.clone();y.setQueryParameters(d.cookie);let A=r._ellipsoid??ee.default;Ore(y,r.camera,r.canvas,d.viewBoundScale,a.bbox,A),Cre(r,m,y,{context:p.id}).then(Lwt(r,d,m,u,y)).catch(function(b){let x=`NetworkLink ${d.href} refresh failed: ${b}`;console.log(x),r._error.raiseEvent(r,x)}),f=!0}}u.set(d.id,d)}}),f&&(this._networkLinks=u,this._changed.raiseEvent(this)),!0}};function Mre(e){let t=e.parent;if(l(t)){let n=t.availability;if(l(n)){let i=e.availability;l(i)?i.intersect(n):e.availability=n}}}function Lwt(e,t,n,i,r){return function(o){if(!i.contains(t.id))return;let s=!1,a=ar(o,"NetworkLinkControl",Ve.kml),c=l(a),u=0;if(c){if(l(ar(a,"Update",Ve.kml))){_t("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=Tf(Fn(a,"cookie",Ve.kml)??""),u=Si(a,"minRefreshPeriod",Ve.kml)??0}let f=K.now(),d=t.refreshMode;if(d===bb.INTERVAL)l(a)&&(t.time=Math.max(u,t.time));else if(d===bb.EXPIRE){let I;if(l(a)&&(I=Fn(a,"expires",Ve.kml)),l(I))try{let R=K.fromIso8601(I),O=K.secondsDifference(R,f);O>0&&O<u&&K.addSeconds(f,u,R),t.time=R}catch{_t("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else _t("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element"),s=!0}let p=t.entity,g=e._entityCollection,m=n.values;function y(I){g.remove(I);let R=I._children,O=R.length;for(let L=0;L<O;++L)y(R[L])}g.suspendEvents();let A=g.values.slice(),b;for(b=0;b<A.length;++b){let I=A[b];I.parent===p&&(I.parent=void 0,y(I))}for(g.resumeEvents(),g.suspendEvents(),b=0;b<m.length;b++){let I=m[b];l(I.parent)||(I.parent=p,Mre(I)),g.add(I)}g.resumeEvents(),s?i.remove(t.id):t.lastUpdated=f;let x=g.computeAvailability(),T=x.start,E=x.stop,v=K.equals(T,tt.MINIMUM_VALUE),S=K.equals(E,tt.MAXIMUM_VALUE);if(!v||!S){let I=e._clock;(I.startTime!==T||I.stopTime!==E)&&(I.startTime=T,I.stopTime=E,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,r.getUrlComponent(!0))}}var bre=new kt,vre=class{constructor(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}};Z_._DeferredLoading=xre;Z_._getTimestamp=xn;var YE=Z_;function hU(){pe.throwInstantiationError()}hU.prototype.update=pe.throwInstantiationError;hU.prototype.getBoundingSphere=pe.throwInstantiationError;hU.prototype.isDestroyed=pe.throwInstantiationError;hU.prototype.destroy=pe.throwInstantiationError;var Nre=hU;var XE=`in vec4 position;
in vec2 textureCoordinates;
out vec2 v_textureCoordinates;
void main()
{
gl_Position = position;
v_textureCoordinates = textureCoordinates;
}
`;function r7(e){this._context=e}var mU,Fwt=new at({primitiveType:Oe.TRIANGLES}),Bwt=new ui({color:new z(0,0,0,0)});function kwt(e,t){return new ys({context:e,colorTextures:[t],destroyAttachments:!1})}function Uwt(e,t){return en.fromCache({context:e,vertexShaderSource:XE,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function zwt(e,t){return(!l(mU)||mU.viewport.width!==e||mU.viewport.height!==t)&&(mU=Ge.fromCache({viewport:new et(0,0,e,t)})),mU}r7.prototype.execute=function(e){l(e.preExecute)&&e.preExecute(e);let t=e.outputTexture,n=t.width,i=t.height,r=this._context,o=l(e.vertexArray)?e.vertexArray:r.getViewportQuadVertexArray(),s=l(e.shaderProgram)?e.shaderProgram:Uwt(r,e.fragmentShaderSource),a=kwt(r,t),c=zwt(n,i),u=e.uniformMap,f=Bwt;f.framebuffer=a,f.renderState=c,f.execute(r);let d=Fwt;d.vertexArray=o,d.renderState=c,d.shaderProgram=s,d.uniformMap=u,d.framebuffer=a,d.execute(r),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&o.destroy()),l(e.postExecute)&&e.postExecute(t)};r7.prototype.isDestroyed=function(){return!1};r7.prototype.destroy=function(){return le(this)};var pU=r7;function Vwt(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var Ac=Vwt;var Lre=class{constructor(t,n,i){this._pickObjects=t,this.key=n,this.color=i}get object(){return this._pickObjects.get(this.key)}set object(t){this._pickObjects.set(this.key,t)}destroy(){this._pickObjects.delete(this.key)}},gU=Lre;function ep(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(ep.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});ep.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function jwt(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}ep.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Ye({sources:[t]})),typeof n=="string"&&(n=new Ye({sources:[n]}));let r=t.getCacheKey(),o=n.getCacheKey(),s=l(i)?jwt(i):"",a=`${r}:${o}:${s}`,c;if(l(this._shaders[a]))c=this._shaders[a],delete this._shadersToRelease[a];else{let u=this._context,f=t.createCombinedVertexShader(u),d=n.createCombinedFragmentShader(u),p=new en({gl:u._gl,logShaderCompilation:u.logShaderCompilation,debugShaders:u.debugShaders,vertexShaderSource:t,vertexShaderText:f,fragmentShaderSource:n,fragmentShaderText:d,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:a,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[a]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};ep.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,r=t+i.keyword,o=this._shaders[r];if(l(o)){Fre(this,o);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};ep.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,r=this._shaders[i];if(l(r))return r.shaderProgram};ep.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,r=t+i.keyword,o=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof o=="string"&&(o=new Ye({sources:[o]})),typeof s=="string"&&(s=new Ye({sources:[s]}));let c=this._context,u=o.createCombinedVertexShader(c),f=s.createCombinedFragmentShader(c),d=new en({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:o,vertexShaderText:u,fragmentShaderSource:s,fragmentShaderText:f,attributeLocations:a}),p={cache:this,shaderProgram:d,keyword:r,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),d._cachedShader=p,this._shaders[r]=p,d};function Fre(e,t){let n=t.derivedKeywords,i=n.length;for(let r=0;r<i;++r){let o=n[r]+t.keyword,s=e._shaders[o];Fre(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}ep.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];Fre(this,n),--this._numberOfShaders}this._shadersToRelease={}};ep.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};ep.prototype.isDestroyed=function(){return!1};ep.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return le(this)};var _U=ep;function KE(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(KE.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});KE.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};KE.prototype.addTexture=function(e,t){let n={texture:t,count:1};t.finalDestroy=t.destroy;let i=this;t.destroy=function(){--n.count===0&&(i._texturesToRelease[e]=n)},this._textures[e]=n,++this._numberOfTextures};KE.prototype.destroyReleasedTextures=function(){let e=this._texturesToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];delete this._textures[t],n.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}};KE.prototype.isDestroyed=function(){return!1};KE.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return le(this)};var yU=KE;var Bre={};function Hwt(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var Gwt=32.184,Wwt=2451545;function wOe(e,t){t=K.addSeconds(e,Gwt,t);let n=K.totalDays(t)-Wwt;return t=K.addSeconds(t,Hwt(n),t),t}var o7=new K(2451545,0,si.TAI),qwt=1e3,bh=D.RADIANS_PER_DEGREE,cd=D.RADIANS_PER_ARCSECOND,zc=14959787e4,lOe=new $;function IOe(e,t,n,i,r,o,s){n<0&&(n=-n,r+=D.PI);let a=e*(1-t),c=i-r,u=r,f=Xwt(o-i,t),d=Ywt(t,0);Qwt(c,n,u,lOe);let p=a*(1+t),g=Math.cos(f),m=Math.sin(f),y=1+t*g,A=p/y;return l(s)?(s.x=A*g,s.y=A*m,s.z=0):s=new h(A*g,A*m,0),$.multiplyByVector(lOe,s,s)}function Ywt(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function Xwt(e,t){let n=Jwt(e,t);return Zwt(n,t)}var Kwt=50,$wt=D.EPSILON8;function Jwt(e,t){let n=Math.floor(e/D.TWO_PI);e-=n*D.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),r=Number.MAX_VALUE,o;for(o=0;o<Kwt&&Math.abs(r-i)>$wt;++o){r=i;let s=r-t*Math.sin(r)-e,a=1-t*Math.cos(r);i=r-s/a}return r=i+n*D.TWO_PI,r}function Zwt(e,t){let n=Math.floor(e/D.TWO_PI);e-=n*D.TWO_PI;let i=Math.cos(e)-t,r=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(r,i);return o=D.zeroToTwoPi(o),e<0&&(o-=D.TWO_PI),o+=n*D.TWO_PI,o}function Qwt(e,t,n,i){let r=Math.cos(e),o=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),u=Math.sin(n);return l(i)?(i[0]=c*r-u*o*s,i[1]=u*r+c*o*s,i[2]=o*a,i[3]=-c*o-u*r*s,i[4]=-u*o+c*r*s,i[5]=r*a,i[6]=u*a,i[7]=-c*a,i[8]=s):i=new $(c*r-u*o*s,-c*o-u*r*s,u*a,u*r+c*o*s,-u*o+c*r*s,-c*a,o*a,r*a,s),i}var eIt=1.0000010178*zc,tIt=100.46645683*bh,nIt=129597742283429e-5*cd,uOe=16002,fOe=21863,dOe=32004,hOe=10931,mOe=14529,pOe=16368,gOe=15318,_Oe=32794,iIt=64*1e-7*zc,rIt=-152*1e-7*zc,oIt=62*1e-7*zc,sIt=-8*1e-7*zc,aIt=32*1e-7*zc,cIt=-41*1e-7*zc,lIt=19*1e-7*zc,uIt=-11*1e-7*zc,fIt=-150*1e-7*zc,dIt=-46*1e-7*zc,hIt=68*1e-7*zc,mIt=54*1e-7*zc,pIt=14*1e-7*zc,gIt=24*1e-7*zc,_It=-28*1e-7*zc,yIt=22*1e-7*zc,yOe=10,AOe=16002,bOe=21863,xOe=10931,TOe=1473,EOe=32004,COe=4387,vOe=73,AIt=-325*1e-7,bIt=-322*1e-7,xIt=-79*1e-7,TIt=232*1e-7,EIt=-52*1e-7,CIt=97*1e-7,vIt=55*1e-7,SIt=-41*1e-7,wIt=-105*1e-7,IIt=-137*1e-7,PIt=258*1e-7,DIt=35*1e-7,RIt=-116*1e-7,OIt=-88*1e-7,MIt=-112*1e-7,NIt=-80*1e-7,iP=new K(0,0,si.TAI);function LIt(e,t){wOe(e,iP);let i=(iP.dayNumber-o7.dayNumber+(iP.secondsOfDay-o7.secondsOfDay)/kn.SECONDS_PER_DAY)/(kn.DAYS_PER_JULIAN_CENTURY*10),r=.3595362*i,o=eIt+iIt*Math.cos(uOe*r)+fIt*Math.sin(uOe*r)+rIt*Math.cos(fOe*r)+dIt*Math.sin(fOe*r)+oIt*Math.cos(dOe*r)+hIt*Math.sin(dOe*r)+sIt*Math.cos(hOe*r)+mIt*Math.sin(hOe*r)+aIt*Math.cos(mOe*r)+pIt*Math.sin(mOe*r)+cIt*Math.cos(pOe*r)+gIt*Math.sin(pOe*r)+lIt*Math.cos(gOe*r)+_It*Math.sin(gOe*r)+uIt*Math.cos(_Oe*r)+yIt*Math.sin(_Oe*r),s=tIt+nIt*i+AIt*Math.cos(yOe*r)+wIt*Math.sin(yOe*r)+bIt*Math.cos(AOe*r)+IIt*Math.sin(AOe*r)+xIt*Math.cos(bOe*r)+PIt*Math.sin(bOe*r)+TIt*Math.cos(xOe*r)+DIt*Math.sin(xOe*r)+EIt*Math.cos(TOe*r)+RIt*Math.sin(TOe*r)+CIt*Math.cos(EOe*r)+OIt*Math.sin(EOe*r)+vIt*Math.cos(COe*r)+MIt*Math.sin(COe*r)+SIt*Math.cos(vOe*r)+NIt*Math.sin(vOe*r),a=.0167086342-.0004203654*i,c=102.93734808*bh+11612.3529*cd*i,u=469.97289*cd*i,f=174.87317577*bh-8679.27034*cd*i;return IOe(o,a,u,c,f,s,t)}function POe(e,t){wOe(e,iP);let i=(iP.dayNumber-o7.dayNumber+(iP.secondsOfDay-o7.secondsOfDay)/kn.SECONDS_PER_DAY)/kn.DAYS_PER_JULIAN_CENTURY,r=i*i,o=r*i,s=o*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,u=5.15668983*bh,f=-8e-5*i+.02966*r-42e-6*o-13e-8*s,d=83.35324312*bh,p=146434202669e-4*i-38.2702*r-.045047*o+21301e-8*s,g=125.04455501*bh,m=-69679193631e-4*i+6.3602*r+.007625*o-3586e-8*s,y=218.31664563*bh,A=17325593434847e-4*i-6.391*r+.006588*o-3169e-8*s,b=297.85019547*bh+cd*(1602961601209e-3*i-6.3706*r+.006593*o-3169e-8*s),x=93.27209062*bh+cd*(17395272628478e-4*i-12.7512*r-.001037*o+417e-8*s),T=134.96340251*bh+cd*(17179159232178e-4*i+31.8792*r+.051635*o-2447e-7*s),E=357.52910918*bh+cd*(1295965810481e-4*i-.5532*r+136e-6*o-1149e-8*s),v=310.17137918*bh-cd*(6967051436e-3*i+6.2068*r+.007618*o-3219e-8*s),S=2*b,I=4*b,R=6*b,O=2*T,L=3*T,_=4*T,C=2*x;a+=3400.4*Math.cos(S)-635.6*Math.cos(S-T)-235.6*Math.cos(T)+218.1*Math.cos(S-E)+181*Math.cos(S+T),c+=.014216*Math.cos(S-T)+.008551*Math.cos(S-O)-.001383*Math.cos(T)+.001356*Math.cos(S+T)-.001147*Math.cos(I-L)-914e-6*Math.cos(I-O)+869e-6*Math.cos(S-E-T)-627e-6*Math.cos(S)-394e-6*Math.cos(I-_)+282e-6*Math.cos(S-E-O)-279e-6*Math.cos(b-T)-236e-6*Math.cos(O)+231e-6*Math.cos(I)+229e-6*Math.cos(R-_)-201e-6*Math.cos(O-C),f+=486.26*Math.cos(S-C)-40.13*Math.cos(S)+37.51*Math.cos(C)+25.73*Math.cos(O-C)+19.97*Math.cos(S-E-C),p+=-55609*Math.sin(S-T)-34711*Math.sin(S-O)-9792*Math.sin(T)+9385*Math.sin(I-L)+7505*Math.sin(I-O)+5318*Math.sin(S+T)+3484*Math.sin(I-_)-3417*Math.sin(S-E-T)-2530*Math.sin(R-_)-2376*Math.sin(S)-2075*Math.sin(S-L)-1883*Math.sin(O)-1736*Math.sin(R-5*T)+1626*Math.sin(E)-1370*Math.sin(R-L),m+=-5392*Math.sin(S-C)-540*Math.sin(E)-441*Math.sin(S)+423*Math.sin(C)-288*Math.sin(O-C),A+=-3332.9*Math.sin(S)+1197.4*Math.sin(S-T)-662.5*Math.sin(E)+396.3*Math.sin(T)-218*Math.sin(S-E);let w=2*v,P=3*v;f+=46.997*Math.cos(v)*i-.614*Math.cos(S-C+v)*i+.614*Math.cos(S-C-v)*i-.0297*Math.cos(w)*r-.0335*Math.cos(v)*r+.0012*Math.cos(S-C+w)*r-16e-5*Math.cos(v)*o+4e-5*Math.cos(P)*o+4e-5*Math.cos(w)*o;let M=2.116*Math.sin(v)*i-.111*Math.sin(S-C-v)*i-.0015*Math.sin(v)*r;p+=M,A+=M,m+=-520.77*Math.sin(v)*i+13.66*Math.sin(S-C+v)*i+1.12*Math.sin(S-v)*i-1.06*Math.sin(C-v)*i+.66*Math.sin(w)*r+.371*Math.sin(v)*r-.035*Math.sin(S-C+w)*r-.015*Math.sin(S-C+v)*r+.0014*Math.sin(v)*o-.0011*Math.sin(P)*o-9e-4*Math.sin(w)*o,a*=qwt;let F=u+f*cd,V=d+p*cd,B=y+A*cd,j=g+m*cd;return IOe(a,c,F,V,j,B,t)}var SOe=.012300034,FIt=SOe/(SOe+1)*-1;function BIt(e,t){return t=POe(e,t),h.multiplyByScalar(t,FIt,t)}var DOe=new $(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),AU=new h;Bre.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=K.now()),l(t)||(t=new h),AU=LIt(e,AU),t=h.negate(AU,t),BIt(e,AU),h.subtract(t,AU,t),$.multiplyByVector(DOe,t,t),t};Bre.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=K.now()),t=POe(e,t),$.multiplyByVector(DOe,t,t),t};var xb=Bre;function kIt(e){e=e??H.EMPTY_OBJECT,this.color=z.clone(e.color??z.WHITE),this.intensity=e.intensity??2}var Q_=kIt;function rP(){this.globeDepthTexture=void 0,this.edgeIdTexture=void 0,this.edgeColorTexture=void 0,this.edgeDepthTexture=void 0,this.planarFillIdTexture=void 0,this.gamma=void 0,this._viewport=new et,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=N.clone(N.IDENTITY),this._viewportTransformation=N.clone(N.IDENTITY),this._model=N.clone(N.IDENTITY),this._view=N.clone(N.IDENTITY),this._inverseView=N.clone(N.IDENTITY),this._projection=N.clone(N.IDENTITY),this._infiniteProjection=N.clone(N.IDENTITY),this._entireFrustum=new U,this._currentFrustum=new U,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=$.clone(N.IDENTITY),this._view3DDirty=!0,this._view3D=new N,this._inverseView3DDirty=!0,this._inverseView3D=new N,this._inverseModelDirty=!0,this._inverseModel=new N,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new $,this._viewRotation=new $,this._inverseViewRotation=new $,this._viewRotation3D=new $,this._inverseViewRotation3D=new $,this._inverseProjectionDirty=!0,this._inverseProjection=new N,this._modelViewDirty=!0,this._modelView=new N,this._modelView3DDirty=!0,this._modelView3D=new N,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new N,this._inverseModelViewDirty=!0,this._inverseModelView=new N,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new N,this._viewProjectionDirty=!0,this._viewProjection=new N,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new N,this._modelViewProjectionDirty=!0,this._modelViewProjection=new N,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new N,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new N,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new N,this._normalDirty=!0,this._normal=new $,this._normal3DDirty=!0,this._normal3D=new $,this._inverseNormalDirty=!0,this._inverseNormal=new $,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new $,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Sn,this._cameraPosition=new h,this._sunPositionWC=new h,this._sunPositionColumbusView=new h,this._sunDirectionWC=new h,this._sunDirectionEC=new h,this._moonDirectionEC=new h,this._lightDirectionWC=new h,this._lightDirectionEC=new h,this._lightColor=new h,this._lightColorHdr=new h,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new h,this._cameraRight=new h,this._cameraUp=new h,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new U,this._eyeCartographic=new h,this._eyeEllipsoidNormalEC=new h,this._eyeEllipsoidCurvature=new U,this._eyeToEnu=new $,this._modelToEnu=new N,this._enuToModel=new N,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new z,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogVisualDensityScalar=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new h,this._atmosphereRayleighScaleHeight=new h,this._atmosphereMieCoefficient=new h,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(rP.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!et.equals(e,this._viewport)){et.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return MOe(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return MOe(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){N.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,N.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,N.getMatrix3(this.inverseModel,e),$.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return Ure(this),this._view3D}},viewRotation:{get:function(){return Ure(this),this._viewRotation}},viewRotation3D:{get:function(){return Ure(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return FOe(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return FOe(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return KIt(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return $It(this),this._modelView}},modelView3D:{get:function(){return JIt(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return iPt(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return ZIt(this),this._inverseModelView}},inverseModelView3D:{get:function(){return QIt(this),this._inverseModelView3D}},viewProjection:{get:function(){return ePt(this),this._viewProjection}},inverseViewProjection:{get:function(){return tPt(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return nPt(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return rPt(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return oPt(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return sPt(this),this._modelViewInfiniteProjection}},normal:{get:function(){return aPt(this),this._normal}},normal3D:{get:function(){return cPt(this),this._normal3D}},inverseNormal:{get:function(){return lPt(this),this._inverseNormal}},inverseNormal3D:{get:function(){return uPt(this),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeCartographic:{get:function(){return this._eyeCartographic}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},eyeToEnu:{get:function(){return this._eyeToEnu}},modelToEnu:{get:function(){return this._modelToEnu}},enuToModel:{get:function(){return this._enuToModel}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return LOe(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return LOe(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},fogVisualDensityScalar:{get:function(){return this._fogVisualDensityScalar}},fogMinimumBrightness:{get:function(){return this._fogMinimumBrightness}},atmosphereHsbShift:{get:function(){return this._atmosphereHsbShift}},atmosphereLightIntensity:{get:function(){return this._atmosphereLightIntensity}},atmosphereRayleighCoefficient:{get:function(){return this._atmosphereRayleighCoefficient}},atmosphereRayleighScaleHeight:{get:function(){return this._atmosphereRayleighScaleHeight}},atmosphereMieCoefficient:{get:function(){return this._atmosphereMieCoefficient}},atmosphereMieScaleHeight:{get:function(){return this._atmosphereMieScaleHeight}},atmosphereMieAnisotropy:{get:function(){return this._atmosphereMieAnisotropy}},atmosphereDynamicLighting:{get:function(){return this._atmosphereDynamicLighting}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},splitPosition:{get:function(){return this._splitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return this._ellipsoid??ee.default}}});function UIt(e,t){N.clone(t,e._view),N.getMatrix3(t,e._viewRotation),e._view3DDirty=!0,e._inverseView3DDirty=!0,e._modelViewDirty=!0,e._modelView3DDirty=!0,e._modelViewRelativeToEyeDirty=!0,e._inverseModelViewDirty=!0,e._inverseModelView3DDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0,e._modelViewInfiniteProjectionDirty=!0,e._normalDirty=!0,e._inverseNormalDirty=!0,e._normal3DDirty=!0,e._inverseNormal3DDirty=!0}function zIt(e,t){N.clone(t,e._inverseView),N.getMatrix3(t,e._inverseViewRotation)}function VIt(e,t){N.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function jIt(e,t){N.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var ROe=new h,HIt=new N,OOe=new $;function GIt(e,t){h.clone(t.positionWC,e._cameraPosition),h.clone(t.directionWC,e._cameraDirection),h.clone(t.rightWC,e._cameraRight),h.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,r=t.positionCartographic;if(l(r)?(e._eyeHeight=r.height,e._eyeCartographic=h.fromElements(r.longitude,r.latitude,r.height,e._eyeCartographic),e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(r,e._eyeEllipsoidNormalEC),i=h.fromRadians(r.longitude,r.latitude,0,n,ROe)):(e._eyeHeight=-n.maximumRadius,h.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=h.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,ROe)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=$.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let o=At.eastNorthUpToFixedFrame(i,n,HIt);e._enuToModel=N.multiplyTransformation(e.inverseModel,o,e._enuToModel),e._modelToEnu=N.inverseTransformation(e._enuToModel,e._modelToEnu);let s=N.getRotation(o,OOe),a=$.multiply(e._viewRotation,s,OOe);e._eyeToEnu=$.transpose(a,e._eyeToEnu),D.equalsEpsilon(n._radii.x,n._radii.y,D.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var kre=new $,WIt=new he;function qIt(e,t){At.computeIcrfToCentralBodyFixedMatrix(t.time,kre);let n=xb.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);$.multiplyByVector(kre,n,n),h.normalize(n,e._sunDirectionWC),n=$.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),h.normalize(n,n),n=xb.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),$.multiplyByVector(kre,n,n),$.multiplyByVector(e.viewRotation3D,n,n),h.normalize(n,n);let i=t.mapProjection,o=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,WIt);i.project(o,e._sunPositionColumbusView)}rP.prototype.updateCamera=function(e){UIt(this,e.viewMatrix),zIt(this,e.inverseViewMatrix),GIt(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==re.SCENE2D&&e.frustum instanceof gn};rP.prototype.updateFrustum=function(e){VIt(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&jIt(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=D.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne;let t=e.offCenterFrustum;l(t)&&(e=t),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right};rP.prototype.updatePass=function(e){this._pass=e};var YIt=[],XIt=new Q_;rP.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;let t=e.camera;this.updateCamera(t),e.mode===re.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=this._frustum2DWidth*.5,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),qIt(this,e);let n=e.light??XIt;n instanceof Q_?(this._lightDirectionWC=h.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=h.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=h.normalize(h.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=$.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,r=h.fromElements(i.red,i.green,i.blue,this._lightColorHdr);r=h.multiplyByScalar(r,n.intensity,r);let o=h.maximumComponent(r);o>1?h.divideByScalar(r,o,this._lightColor):h.clone(r,this._lightColor);let s=e.brdfLutGenerator,a=l(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=e.environmentMap??e.context.defaultCubeMap,this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients??YIt,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._fogDensity=e.fog.density,this._fogVisualDensityScalar=e.fog.visualDensityScalar,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=h.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=h.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=h.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=At.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let u=t.frustum.fov,f=this._viewport,d;l(u)?f.height>f.width?d=Math.tan(.5*u)*2/f.height:d=Math.tan(.5*u)*2/f.width:d=1/Math.max(f.width,f.height),this._geometricToleranceOverMeter=d*e.maximumScreenSpaceError,z.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function MOe(e){if(e._viewportDirty){let t=e._viewport;N.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),N.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function KIt(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==re.SCENE2D&&e._mode!==re.MORPHING&&!e._orthographicIn3D?N.inverse(e._projection,e._inverseProjection):N.clone(N.ZERO,e._inverseProjection))}function $It(e){e._modelViewDirty&&(e._modelViewDirty=!1,N.multiplyTransformation(e._view,e._model,e._modelView))}function JIt(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,N.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function ZIt(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,N.inverse(e.modelView,e._inverseModelView))}function QIt(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,N.inverse(e.modelView3D,e._inverseModelView3D))}function ePt(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,N.multiply(e._projection,e._view,e._viewProjection))}function tPt(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,N.inverse(e.viewProjection,e._inverseViewProjection))}function nPt(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,N.multiply(e._projection,e.modelView,e._modelViewProjection))}function iPt(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;let t=e.modelView,n=e._modelViewRelativeToEye;n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=0,n[13]=0,n[14]=0,n[15]=t[15]}}function rPt(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,N.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function oPt(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,N.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function sPt(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,N.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function aPt(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;N.getMatrix3(e.inverseModelView,t),$.transpose(t,t)}}function cPt(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;N.getMatrix3(e.inverseModelView3D,t),$.transpose(t,t)}}function lPt(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;N.getMatrix3(e.modelView,t),$.transpose(t,t)}}function uPt(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;N.getMatrix3(e.modelView3D,t),$.transpose(t,t)}}var NOe=new h;function LOe(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,N.multiplyByPoint(e.inverseModel,e._cameraPosition,NOe),Sn.fromCartesian(NOe,e._encodedCameraPositionMC))}var fPt=new h,dPt=new h,hPt=new h,mPt=new h,pPt=new he,gPt=new h,_Pt=new N;function yPt(e,t,n,i,r,o,s,a){let c=fPt;c.x=e.y,c.y=e.z,c.z=e.x;let u=dPt;u.x=n.y,u.y=n.z,u.z=n.x;let f=hPt;f.x=i.y,f.y=i.z,f.z=i.x;let d=mPt;d.x=t.y,d.y=t.z,d.z=t.x,o===re.SCENE2D&&(c.z=r*.5);let p=s.unproject(c,pPt);p.longitude=D.clamp(p.longitude,-Math.PI,Math.PI),p.latitude=D.clamp(p.latitude,-D.PI_OVER_TWO,D.PI_OVER_TWO);let g=s.ellipsoid,m=g.cartographicToCartesian(p,gPt),y=At.eastNorthUpToFixedFrame(m,g,_Pt);return N.multiplyByPointAsVector(y,u,u),N.multiplyByPointAsVector(y,f,f),N.multiplyByPointAsVector(y,d,d),l(a)||(a=new N),a[0]=u.x,a[1]=f.x,a[2]=-d.x,a[3]=0,a[4]=u.y,a[5]=f.y,a[6]=-d.y,a[7]=0,a[8]=u.z,a[9]=f.z,a[10]=-d.z,a[11]=0,a[12]=-h.dot(u,m),a[13]=-h.dot(f,m),a[14]=h.dot(d,m),a[15]=1,a}function Ure(e){e._view3DDirty&&(e._mode===re.SCENE3D?N.clone(e._view,e._view3D):yPt(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),N.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function FOe(e){e._inverseView3DDirty&&(N.inverseTransformation(e.view3D,e._inverseView3D),N.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var bU=rP;function lf(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:r={},allowTextureFilterAnisotropic:o=!0,transparentDefaultTexture:s=!1}=t??{};r.alpha=r.alpha??!1,r.stencil=r.stencil??!0,r.powerPreference=r.powerPreference??"high-performance";let a=l(n)?n(e,r):APt(e,r,i),u=typeof WebGL2RenderingContext<"u"&&a instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=a,this._gl=a,this._webgl2=u,this._id=$n(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new _U(this),this._textureCache=new yU,this._transparentDefaultTexture=s;let f=a;this._stencilBits=f.getParameter(f.STENCIL_BITS),Ut._maximumCombinedTextureImageUnits=f.getParameter(f.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Ut._maximumCubeMapSize=f.getParameter(f.MAX_CUBE_MAP_TEXTURE_SIZE),Ut._maximumFragmentUniformVectors=f.getParameter(f.MAX_FRAGMENT_UNIFORM_VECTORS),Ut._maximumTextureImageUnits=f.getParameter(f.MAX_TEXTURE_IMAGE_UNITS),Ut._maximumRenderbufferSize=f.getParameter(f.MAX_RENDERBUFFER_SIZE),Ut._maximumTextureSize=f.getParameter(f.MAX_TEXTURE_SIZE),Ut._maximum3DTextureSize=f.getParameter(f.MAX_3D_TEXTURE_SIZE),Ut._maximumVaryingVectors=f.getParameter(f.MAX_VARYING_VECTORS),Ut._maximumVertexAttributes=f.getParameter(f.MAX_VERTEX_ATTRIBS),Ut._maximumVertexTextureImageUnits=f.getParameter(f.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Ut._maximumVertexUniformVectors=f.getParameter(f.MAX_VERTEX_UNIFORM_VECTORS),Ut._maximumSamples=this._webgl2?f.getParameter(f.MAX_SAMPLES):0;let d=f.getParameter(f.ALIASED_LINE_WIDTH_RANGE);Ut._minimumAliasedLineWidth=d[0],Ut._maximumAliasedLineWidth=d[1];let p=f.getParameter(f.ALIASED_POINT_SIZE_RANGE);Ut._minimumAliasedPointSize=p[0],Ut._maximumAliasedPointSize=p[1];let g=f.getParameter(f.MAX_VIEWPORT_DIMS);Ut._maximumViewportWidth=g[0],Ut._maximumViewportHeight=g[1];let m=f.getShaderPrecisionFormat(f.FRAGMENT_SHADER,f.HIGH_FLOAT);Ut._highpFloatSupported=m.precision!==0;let y=f.getShaderPrecisionFormat(f.FRAGMENT_SHADER,f.HIGH_INT);Ut._highpIntSupported=y.rangeMax!==0,this._antialias=f.getContextAttributes().antialias,this._standardDerivatives=!!us(f,["OES_standard_derivatives"]),this._blendMinmax=!!us(f,["EXT_blend_minmax"]),this._elementIndexUint=!!us(f,["OES_element_index_uint"]),this._depthTexture=!!us(f,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!us(f,["EXT_frag_depth"]),this._debugShaders=us(f,["WEBGL_debug_shaders"]),this._textureFloat=!!us(f,["OES_texture_float"]),this._textureHalfFloat=!!us(f,["OES_texture_half_float"]),this._textureFloatLinear=!!us(f,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!us(f,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!us(f,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!us(f,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!us(f,["EXT_float_blend"]),this._colorBufferHalfFloat=!!us(f,["EXT_color_buffer_half_float"]),this._s3tc=!!us(f,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!us(f,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!us(f,["WEBGL_compressed_texture_astc"]),this._etc=!!us(f,["WEBG_compressed_texture_etc"]),this._etc1=!!us(f,["WEBGL_compressed_texture_etc1"]),this._bc7=!!us(f,["EXT_texture_compression_bptc"]),Ou.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let A=o?us(f,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=A,Ut._maximumTextureFilterAnisotropy=l(A)?f.getParameter(A.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let b,x,T,E,v,S,I,R,O,L;if(u){let P=this;b=function(){return P._gl.createVertexArray()},x=function(M){P._gl.bindVertexArray(M)},T=function(M){P._gl.deleteVertexArray(M)},E=function(M,F,V,B,j){f.drawElementsInstanced(M,F,V,B,j)},v=function(M,F,V,B){f.drawArraysInstanced(M,F,V,B)},S=function(M,F){f.vertexAttribDivisor(M,F)},I=function(M){f.drawBuffers(M)}}else R=us(f,["OES_vertex_array_object"]),l(R)&&(b=function(){return R.createVertexArrayOES()},x=function(P){R.bindVertexArrayOES(P)},T=function(P){R.deleteVertexArrayOES(P)}),O=us(f,["ANGLE_instanced_arrays"]),l(O)&&(E=function(P,M,F,V,B){O.drawElementsInstancedANGLE(P,M,F,V,B)},v=function(P,M,F,V){O.drawArraysInstancedANGLE(P,M,F,V)},S=function(P,M){O.vertexAttribDivisorANGLE(P,M)}),L=us(f,["WEBGL_draw_buffers"]),l(L)&&(I=function(P){L.drawBuffersWEBGL(P)});this.glCreateVertexArray=b,this.glBindVertexArray=x,this.glDeleteVertexArray=T,this.glDrawElementsInstanced=E,this.glDrawArraysInstanced=v,this.glVertexAttribDivisor=S,this.glDrawBuffers=I,this._vertexArrayObject=!!R,this._instancedArrays=!!O,this._drawBuffers=!!L,Ut._maximumDrawBuffers=this.drawBuffers?f.getParameter(te.MAX_DRAW_BUFFERS):1,Ut._maximumColorAttachments=this.drawBuffers?f.getParameter(te.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new z(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let _=new bU,C=new Ac(this),w=Ge.fromCache();this._defaultPassState=C,this._defaultRenderState=w,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=_,this._currentRenderState=w,this._currentPassState=C,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let P=0;P<Ut._maximumVertexAttributes;P++)this._vertexAttribDivisors.push(0);this._pickObjects=new Map,this._nextPickColor=new Uint32Array(1),this.options={getWebGLStub:n,requestWebgl1:i,webgl:r,allowTextureFilterAnisotropic:o,transparentDefaultTexture:s},this.cache={},Ge.apply(f,w,C)}function APt(e,t,n){if(typeof WebGLRenderingContext>"u")throw new oe("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let r=n?"webgl":"webgl2",o=e.getContext(r,t);if(!l(o))throw new oe("The browser supports WebGL, but initialization failed.");return o}function bPt(e,t){let n="WebGL Error: ";switch(t){case e.INVALID_ENUM:n+="INVALID_ENUM";break;case e.INVALID_VALUE:n+="INVALID_VALUE";break;case e.INVALID_OPERATION:n+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:n+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:n+="CONTEXT_LOST_WEBGL lost";break;default:n+=`Unknown (${t})`}return n}function xPt(e,t,n,i){let r=`${bPt(e,i)}: ${t.name}(`;for(let o=0;o<n.length;++o)o!==0&&(r+=", "),r+=n[o];return r+=");",r}function TPt(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new oe(xPt(e,t,n,i))}function EPt(e,t,n){return{get:function(){let i=e[t];return n(e,`get: ${t}`,i),e[t]},set:function(i){e[t]=i,n(e,`set: ${t}`,i)}}}function CPt(e,t){if(!l(t))return e;function n(r){return function(){let o=r.apply(e,arguments);return t(e,r,arguments),o}}let i={};for(let r in e){let o=e[r];o instanceof Function?i[r]=n(o):Object.defineProperty(i,r,EPt(e,r,t))}return i}function us(e,t){let n=t.length;for(let i=0;i<n;++i){let r=e.getExtension(t[i]);if(r)return r}}var vPt={};Object.defineProperties(lf.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},msaa:{get:function(){return this._webgl2}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},supportsTextureLod:{get:function(){return this._webgl2||this._supportsTextureLod}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=CPt(this._originalGLContext,e?TPt:void 0)}},defaultTexture:{get:function(){if(this._defaultTexture===void 0){let e=Dt.defaultColor;this._defaultTexture=new Dt({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([e.red*255,e.green*255,e.blue*255,this._transparentDefaultTexture?0:e.alpha*255])},flipY:!1})}return this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Dt({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Dt({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new ts({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return vPt}}});function BOe(e,t,n,i){let r=e._currentRenderState,o=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Ge.partialApply(e._gl,r,t,o,n,i)}var zre;typeof WebGLRenderingContext<"u"&&(zre=[te.BACK]);function s7(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=zre;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var SPt=new ui;lf.prototype.clear=function(e,t){e=e??SPt,t=t??this._defaultPassState;let n=this._gl,i=0,r=e.color,o=e.depth,s=e.stencil;l(r)&&(z.equals(this._clearColor,r)||(z.clone(r,this._clearColor),n.clearColor(r.red,r.green,r.blue,r.alpha)),i|=n.COLOR_BUFFER_BIT),l(o)&&(o!==this._clearDepth&&(this._clearDepth=o,n.clearDepth(o)),i|=n.DEPTH_BUFFER_BIT),l(s)&&(s!==this._clearStencil&&(this._clearStencil=s,n.clearStencil(s)),i|=n.STENCIL_BUFFER_BIT);let a=e.renderState??this._defaultRenderState;BOe(this,a,t,!0);let c=e.framebuffer??t.framebuffer;s7(this,c),n.clear(i)};function wPt(e,t,n,i,r){s7(e,t),BOe(e,r,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function IPt(e,t,n,i){let r=t._primitiveType,o=t._vertexArray,s=t._offset,a=t._count,c=t.instanceCount;e._us.model=t._modelMatrix??N.IDENTITY,n._setUniforms(i,e._us,e.validateShaderProgram),o._bind();let u=o.indexBuffer;l(u)?(s=s*u.bytesPerIndex,l(a)?a=Math.min(a,u.numberOfIndices):a=u.numberOfIndices,c===0?e._gl.drawElements(r,a,u.indexDatatype,s):e.glDrawElementsInstanced(r,a,u.indexDatatype,s,c)):(l(a)?a=Math.min(a,o.numberOfVertices):a=o.numberOfVertices,c===0?e._gl.drawArrays(r,s,a):e.glDrawArraysInstanced(r,s,a,c)),o._unBind()}lf.prototype.draw=function(e,t,n,i){t=t??this._defaultPassState;let r=e._framebuffer??t.framebuffer,o=e._renderState??this._defaultRenderState;n=n??e._shaderProgram,i=i??e._uniformMap,wPt(this,r,t,n,o),IPt(this,e,n,i)};lf.prototype.beginFrame=function(){};lf.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=zre;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i<n;++i)e.activeTexture(e.TEXTURE0+i),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)};lf.prototype.readPixelsToPBO=function(e){let t=this._gl;e=e??H.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),r=e.width??this.drawingBufferWidth,o=e.height??this.drawingBufferHeight,s=e.framebuffer;if(!this._webgl2)throw new pe("A WebGL 2 context is required to read pixels using a PBO.");let a=ze.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let u=nt.createPixelBuffer({context:this,sizeInBytes:Ke.textureSizeInBytes(c,a,r,o),usage:Me.DYNAMIC_READ});return s7(this,s),u._bind(),t.readPixels(n,i,r,o,c,ze.toWebGLConstant(a,this),0),u._unBind(),u};lf.prototype.readPixels=function(e){let t=this._gl;e=e??H.EMPTY_OBJECT;let n=Math.max(e.x??0,0),i=Math.max(e.y??0,0),r=e.width??this.drawingBufferWidth,o=e.height??this.drawingBufferHeight,s=e.framebuffer,a=ze.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let u=Ke.createTypedArray(c,a,r,o);return s7(this,s),t.readPixels(n,i,r,o,Ke.RGBA,ze.toWebGLConstant(a,this),u),u};var kOe={position:0,textureCoordinates:1};lf.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new St({attributes:{position:new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Oe.TRIANGLES});e=zn.fromGeometry({context:this,geometry:t,attributeLocations:kOe,bufferUsage:Me.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};lf.prototype.createViewportQuadCommand=function(e,t){return t=t??H.EMPTY_OBJECT,new at({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Oe.TRIANGLES,renderState:t.renderState,shaderProgram:en.fromCache({context:this,vertexShaderSource:XE,fragmentShaderSource:e,attributeLocations:kOe}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};lf.prototype.getObjectByPickColor=function(e){return this._pickObjects.get(e)};lf.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new oe("Out of unique Pick IDs.");return this._pickObjects.set(t,e),new gU(this._pickObjects,t,z.fromRgba(t))};lf.prototype.isDestroyed=function(){return!1};lf.prototype.destroy=function(){let e=this.cache;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];l(n.destroy)&&n.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),le(this)};var $E=lf;function PPt(e,t,n){let i={flipY:!0,skipColorSpaceConversion:n,preferImageBitmap:!0},r=[De.createIfNeeded(t.positiveX).fetchImage(i),De.createIfNeeded(t.negativeX).fetchImage(i),De.createIfNeeded(t.positiveY).fetchImage(i),De.createIfNeeded(t.negativeY).fetchImage(i),De.createIfNeeded(t.positiveZ).fetchImage(i),De.createIfNeeded(t.negativeZ).fetchImage(i)];return Promise.all(r).then(function(o){return new ts({context:e,source:{positiveX:o[0],negativeX:o[1],positiveY:o[2],negativeY:o[3],positiveZ:o[4],negativeZ:o[5]}})})}var xU=PPt;function a7(e){this._autoDestroy=e?.autoDestroy??!0,this._canvas=document.createElement("canvas"),this._context=new $E(this._canvas,Je(e?.contextOptions)),this._canvases=[]}a7.prototype.createSceneContext=function(e){let t=e.getContext("2d",{alpha:!0}),n=this;n._canvases.push(e);let i=!1,r=function(){i=!0;let c=n._canvases.indexOf(e);c!==-1&&(n._canvases.splice(c,1),n._autoDestroy&&n._canvases.length===0&&n.destroy())},o=function(){let c=n._context.canvas,u=this.drawingBufferWidth;c.width<u&&(c.width=u);let f=this.drawingBufferHeight;c.height<f&&(c.height=f)},s=function(){let c=this.drawingBufferWidth,u=this.drawingBufferHeight,f=n._context.canvas.height-u;t.drawImage(n._context.canvas,0,f,c,u,0,0,c,u),n._context.endFrame()};return new Proxy(this._context,{get(c,u,f){if(u==="isDestroyed")return function(){return i};switch(u){case"_canvas":return e;case"destroy":return r;case"drawingBufferWidth":return e.width;case"drawingBufferHeight":return e.height;case"beginFrame":return o;case"endFrame":return s;default:return Reflect.get(c,u,f)}}})};a7.prototype.destroy=function(){this._context.destroy(),le(this)};a7.prototype.isDestroyed=function(){return!1};var TU=a7;function JE(e){e=e??H.EMPTY_OBJECT;let t=e.context;if(!t._webgl2)throw new pe("A WebGL 2 context is required to use Sync operations.");let n=t._gl,i=n.fenceSync(te.SYNC_GPU_COMMANDS_COMPLETE,0);this._gl=n,this._sync=i}JE.create=function(e){return new JE(e)};JE.prototype.getStatus=function(){return this._gl.getSyncParameter(this._sync,te.SYNC_STATUS)};JE.prototype.isDestroyed=function(){return!1};JE.prototype.destroy=function(){return this._gl.deleteSync(this._sync),le(this)};JE.prototype.waitForSignal=async function(e,t){let n=this;t=t??10;function i(r,o,s){return()=>{n.getStatus()===te.SIGNALED?r():s<=0?o(new oe("Wait for signal timeout")):e(i(r,o,s-1))}}return new Promise((r,o)=>{e(i(r,o,t))})};var EU=JE;function Tb(e){e=e??H.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:r=ze.UNSIGNED_BYTE,flipY:o=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ht}=e;if(!t.webgl2&&!l(t.options.getWebGLStub))throw new pe("WebGL1 does not support texture3D. Please use a WebGL2 context.");let{width:c,height:u,depth:f}=e;l(n)&&(l(c)||(c=n.width),l(u)||(u=n.height),l(f)||(f=n.depth));let d=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,p=Ke.toInternalFormat(i,r,t),g=Ke.isCompressedFormat(p),m=t._gl,y=Ke.texture3DSizeInBytes(i,r,c,u,f);if(this._id=e.id??$n(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=m.TEXTURE_3D,this._texture=m.createTexture(),this._internalFormat=p,this._pixelFormat=i,this._pixelDatatype=r,this._width=c,this._height=u,this._depth=f,this._dimensions=new h(c,u,f),this._hasMipmap=!1,this._sizeInBytes=y,this._preMultiplyAlpha=d,this._flipY=o,this._initialized=!1,this._sampler=void 0,this._sampler=a,VOe(this,a),m.activeTexture(m.TEXTURE0),m.bindTexture(this._textureTarget,this._texture),l(n)){if(s?m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.NONE):m.pixelStorei(m.UNPACK_COLORSPACE_CONVERSION_WEBGL,m.BROWSER_DEFAULT_WEBGL),!l(n.arrayBufferView))throw new pe("For Texture3D, options.source.arrayBufferView must be defined");UOe(this,n),this._initialized=!0}else zOe(this);m.bindTexture(this._textureTarget,null)}function UOe(e,t){let n=e._context,i=n._gl,r=e._textureTarget,o=e._internalFormat,{width:s,height:a,depth:c,pixelFormat:u,pixelDatatype:f,flipY:d}=e,p=Ke.alignmentInBytes(u,f,s);i.pixelStorei(i.UNPACK_ALIGNMENT,p),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:g}=t;d&&console.warn("texture3D.flipY is not supported.");let m=1;if(t.mipLevels&&t.mipLevels.length&&(m=t.mipLevels.length+1),i.texStorage3D(r,m,o,s,a,c),i.texSubImage3D(r,0,0,0,0,s,a,c,u,ze.toWebGLConstant(f,n),g),m>1){let y=s,A=a,b=c;for(let x=0;x<t.mipLevels.length;++x)y=Vre(y),A=Vre(A),b=Vre(b),i.texSubImage3D(r,x+1,0,0,0,y,A,b,u,ze.toWebGLConstant(f,n),t.mipLevels[x])}}Tb.prototype.copyFrom=function(e){e=e??H.EMPTY_OBJECT;let{source:t,xOffset:n=0,yOffset:i=0,zOffset:r=0}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:u,depth:f}=t,d=!1;this._initialized||(n===0&&i===0&&r===0&&c===this._width&&u===this._height&&f===this._depth?(UOe(this,t),d=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),zOe(this)),this._initialized=!0),d||DPt(this,t.arrayBufferView,n,i,r,c,u,f),s.bindTexture(a,null)};function DPt(e,t,n,i,r,o,s,a){let c=e._context,u=c._gl,{pixelFormat:f,pixelDatatype:d}=e,p=Ke.alignmentInBytes(f,d,o);u.pixelStorei(u.UNPACK_ALIGNMENT,p),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,!1),u.texSubImage3D(e._textureTarget,0,n,i,r,o,s,a,f,ze.toWebGLConstant(d,c),t)}function Vre(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function zOe(e){let t=e._context;t._gl.texImage3D(e._textureTarget,0,e._internalFormat,e._width,e._height,e._depth,0,e._pixelFormat,ze.toWebGLConstant(e._pixelDatatype,t),null)}Tb.create=function(e){return new Tb(e)};Object.defineProperties(Tb.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){VOe(this,e),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},depth:{get:function(){return this._depth}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(this._sizeInBytes*8/7):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}});function VOe(e,t){let{minificationFilter:n,magnificationFilter:i}=t,r=[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(n),o=e._context,s=e._pixelFormat,a=e._pixelDatatype;(a===ze.FLOAT&&!o.textureFloatLinear||a===ze.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(n=r?Wt.NEAREST_MIPMAP_NEAREST:Wt.NEAREST,i=Zn.NEAREST),Ke.isDepthFormat(s)&&(n=Wt.NEAREST,i=Zn.NEAREST);let c=o._gl,u=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(u,e._texture),c.texParameteri(u,c.TEXTURE_MIN_FILTER,n),c.texParameteri(u,c.TEXTURE_MAG_FILTER,i),c.texParameteri(u,c.TEXTURE_WRAP_R,t.wrapR),c.texParameteri(u,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(u,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(u,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(u,null)}Tb.prototype.generateMipmap=function(e){e=e??Pd.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};Tb.prototype.isDestroyed=function(){return!1};Tb.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),le(this)};var CU=Tb;var jOe={NONE:0,LERC:1};Object.freeze(jOe);var xh=jOe;var HOe={NONE:0,BITS12:1};Object.freeze(HOe);var $a=HOe;var vU=new h,RPt=new h,Th=new U,OPt=new N,MPt=new N,NPt=Math.pow(2,12);function Vc(e,t,n,i,r,o,s,a,c,u){let f=$a.NONE,d,p;if(l(t)&&l(n)&&l(i)&&l(r)){let g=t.minimum,m=t.maximum,y=h.subtract(m,g,RPt),A=i-n;Math.max(h.maximumComponent(y),A)<NPt-1?f=$a.BITS12:f=$a.NONE;let x=N.fromScale(y,OPt);x=N.setTranslation(x,g,x);let T=N.fromScale(h.fromElements(1/y.x,1/y.y,1/y.z,vU),MPt);T=N.multiplyByTranslation(T,h.negate(g,vU),T),p=N.clone(r,new N);let E=N.getTranslation(r,vU);E=h.subtract(E,e,vU),p=N.setTranslation(p,E,p),p=N.multiply(p,x,p),d=N.inverseTransformation(r,new N),d=N.multiply(T,d,d),r=N.multiply(r,x,new N)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=d,this.fromScaledENU=r,this.matrix=p,this.hasVertexNormals=o??!1,this.hasWebMercatorT=s??!1,this.hasGeodeticSurfaceNormals=a??!1,this.exaggeration=c??1,this.exaggerationRelativeHeight=u??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Vc.prototype.encode=function(e,t,n,i,r,o,s,a){let c=i.x,u=i.y;if(this.quantization===$a.BITS12){n=N.multiplyByPoint(this.toScaledENU,n,vU),n.x=D.clamp(n.x,0,1),n.y=D.clamp(n.y,0,1),n.z=D.clamp(n.z,0,1);let f=this.maximumHeight-this.minimumHeight,d=D.clamp((r-this.minimumHeight)/f,0,1);U.fromElements(n.x,n.y,Th);let p=cn.compressTextureCoordinates(Th);U.fromElements(n.z,d,Th);let g=cn.compressTextureCoordinates(Th);U.fromElements(c,u,Th);let m=cn.compressTextureCoordinates(Th);if(e[t++]=p,e[t++]=g,e[t++]=m,this.hasWebMercatorT){U.fromElements(s,0,Th);let y=cn.compressTextureCoordinates(Th);e[t++]=y}}else e[t++]=n.x-this.center.x,e[t++]=n.y-this.center.y,e[t++]=n.z-this.center.z,e[t++]=r,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=cn.octPackFloat(o)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var LPt=new h,GOe=new h;Vc.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,r=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let o=this.stride;for(let s=0;s<r;s++){for(let f=0;f<i;f++){let d=s*i+f,p=s*o+f;t[p]=e[d]}let a=this.decodePosition(t,s,LPt),c=n.geodeticSurfaceNormal(a,GOe),u=s*o+this._offsetGeodeticSurfaceNormal;t[u]=c.x,t[u+1]=c.y,t[u+2]=c.z}};Vc.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let r=this.stride;for(let o=0;o<i;o++)for(let s=0;s<r;s++){let a=o*n+s,c=o*r+s;t[c]=e[a]}};Vc.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new h),t*=this.stride,this.quantization===$a.BITS12){let i=cn.decompressTextureCoordinates(e[t],Th);n.x=i.x,n.y=i.y;let r=cn.decompressTextureCoordinates(e[t+1],Th);return n.z=r.x,N.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],h.add(n,this.center,n)};Vc.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,r=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,GOe),a=this.decodeHeight(e,t),c=Ar.getHeight(a,i,r)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Vc.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new U),t*=this.stride,this.quantization===$a.BITS12?cn.decompressTextureCoordinates(e[t+2],n):U.fromElements(e[t+4],e[t+5],n)};Vc.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===$a.BITS12?cn.decompressTextureCoordinates(e[t+1],Th).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Vc.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===$a.BITS12?cn.decompressTextureCoordinates(e[t+3],Th).x:e[t+6]};Vc.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,r=Math.floor(i),o=(i-r)*256;return U.fromElements(r,o,n)};Vc.prototype.decodeNormal=function(e,t,n){let i=t*this.stride+this._offsetVertexNormal;return cn.octDecodeFloat(e[i],n)};Vc.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};Vc.prototype._calculateStrideAndOffsets=function(){let e=0;this.quantization===$a.BITS12?e+=3:e+=6,this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var c7={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},l7={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Vc.prototype.getAttributes=function(e){let t=Y.FLOAT,n=Y.getSizeInBytes(t),i=this.stride*n,r=0,o=[];function s(a,c){o.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:r,strideInBytes:i}),r+=c*n}if(this.quantization===$a.NONE){s(c7.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(c7.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(c7.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(l7.compressed0,a?4:3),c&&s(l7.compressed1,1),this.hasGeodeticSurfaceNormals&&s(l7.geodeticSurfaceNormal,3)}return o};Vc.prototype.getAttributeLocations=function(){return this.quantization===$a.NONE?c7:l7};Vc.clone=function(e,t){if(l(e))return l(t)||(t=new Vc),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=h.clone(e.center),t.toScaledENU=N.clone(e.toScaledENU),t.fromScaledENU=N.clone(e.fromScaledENU),t.matrix=N.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Co=Vc;var R0={};R0.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var jre=new h,FPt=new N,BPt=new h,kPt=new h;R0.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,r=Math.atan,o=Math.exp,s=D.PI_OVER_TWO,a=D.toRadians,c=e.heightmap,u=e.width,f=e.height,d=e.skirtHeight,p=d>0,g=e.isGeographic??!0,m=e.ellipsoid??ee.default,y=1/m.maximumRadius,A=ie.clone(e.nativeRectangle),b=ie.clone(e.rectangle),x,T,E,v;l(b)?(x=b.west,T=b.south,E=b.east,v=b.north):g?(x=a(A.west),T=a(A.south),E=a(A.east),v=a(A.north)):(x=A.west*y,T=s-2*r(o(-A.south*y)),E=A.east*y,v=s-2*r(o(-A.north*y)));let S=e.relativeToCenter,I=l(S);S=I?S:h.ZERO;let R=e.includeWebMercatorT??!1,O=e.exaggeration??1,L=e.exaggerationRelativeHeight??0,C=O!==1,w=e.structure??R0.DEFAULT_STRUCTURE,P=w.heightScale??R0.DEFAULT_STRUCTURE.heightScale,M=w.heightOffset??R0.DEFAULT_STRUCTURE.heightOffset,F=w.elementsPerHeight??R0.DEFAULT_STRUCTURE.elementsPerHeight,V=w.stride??R0.DEFAULT_STRUCTURE.stride,B=w.elementMultiplier??R0.DEFAULT_STRUCTURE.elementMultiplier,j=w.isBigEndian??R0.DEFAULT_STRUCTURE.isBigEndian,k=ie.computeWidth(A),G=ie.computeHeight(A),q=k/(u-1),Q=G/(f-1);g||(k*=y,G*=y);let W=m.radiiSquared,J=W.x,Z=W.y,ae=W.z,Ae=65536,fe=-65536,xe=At.eastNorthUpToFixedFrame(S,m),ge=N.inverseTransformation(xe,FPt),we,Se;R&&(we=yi.geodeticLatitudeToMercatorAngle(T),Se=1/(yi.geodeticLatitudeToMercatorAngle(v)-we));let Re=BPt;Re.x=Number.POSITIVE_INFINITY,Re.y=Number.POSITIVE_INFINITY,Re.z=Number.POSITIVE_INFINITY;let Qe=kPt;Qe.x=Number.NEGATIVE_INFINITY,Qe.y=Number.NEGATIVE_INFINITY,Qe.z=Number.NEGATIVE_INFINITY;let He=Number.POSITIVE_INFINITY,Xe=u*f,$e=d>0?u*2+f*2:0,Pe=Xe+$e,qe=new Array(Pe),st=new Array(Pe),vt=new Array(Pe),Gt=R?new Array(Pe):[],lt=C?new Array(Pe):[],mt=0,ft=f,Xt=0,rt=u;p&&(--mt,++ft,--Xt,++rt);let ht=1e-5;for(let jn=mt;jn<ft;++jn){let nn=jn;nn<0&&(nn=0),nn>=f&&(nn=f-1);let Wn=A.north-Q*nn;g?Wn=a(Wn):Wn=s-2*r(o(-Wn*y));let Zi=(Wn-T)/(v-T);Zi=D.clamp(Zi,0,1);let Mr=jn===mt,fo=jn===ft-1;d>0&&(Mr?Wn+=ht*G:fo&&(Wn-=ht*G));let Bs=t(Wn),Ks=n(Wn),no=ae*Ks,gi;R&&(gi=(yi.geodeticLatitudeToMercatorAngle(Wn)-we)*Se);for(let ho=Xt;ho<rt;++ho){let ur=ho;ur<0&&(ur=0),ur>=u&&(ur=u-1);let Zo=nn*(u*V)+ur*V,Bn;if(F===1)Bn=c[Zo];else{Bn=0;let Kr;if(j)for(Kr=0;Kr<F;++Kr)Bn=Bn*B+c[Zo+Kr];else for(Kr=F-1;Kr>=0;--Kr)Bn=Bn*B+c[Zo+Kr]}Bn=Bn*P+M,fe=Math.max(fe,Bn),Ae=Math.min(Ae,Bn);let qi=A.west+q*ur;g?qi=a(qi):qi=qi*y;let ki=(qi-x)/(E-x);ki=D.clamp(ki,0,1);let Nr=nn*u+ur;if(d>0){let Kr=ho===Xt,Ol=ho===rt-1,Z0=Mr||fo||Kr||Ol;if((Mr||fo)&&(Kr||Ol))continue;Z0&&(Bn-=d,Kr?(Nr=Xe+(f-nn-1),qi-=ht*k):fo?Nr=Xe+f+(u-ur-1):Ol?(Nr=Xe+f+u+nn,qi+=ht*k):Mr&&(Nr=Xe+f+u+f+ur))}let Wc=Bs*t(qi),bd=Bs*n(qi),xp=J*Wc,Nh=Z*bd,Tp=1/i(xp*Wc+Nh*bd+no*Ks),ks=xp*Tp,tc=Nh*Tp,Kb=no*Tp,ri=new h;ri.x=ks+Wc*Bn,ri.y=tc+bd*Bn,ri.z=Kb+Ks*Bn,N.multiplyByPoint(ge,ri,jre),h.minimumByComponent(jre,Re,Re),h.maximumByComponent(jre,Qe,Qe),He=Math.min(He,Bn),qe[Nr]=ri,vt[Nr]=new U(ki,Zi),st[Nr]=Bn,R&&(Gt[Nr]=gi),C&&(lt[Nr]=m.geodeticSurfaceNormal(ri))}}let Bi=ue.fromPoints(qe),Xn;l(b)&&(Xn=Qt.fromRectangle(b,Ae,fe,m));let bi;I&&(bi=new Om(m).computeHorizonCullingPointPossiblyUnderEllipsoid(S,qe,Ae));let Wi=new vf(Re,Qe,S),wi=new Co(S,Wi,He,fe,xe,!1,R,C,O,L),hi=new Float32Array(Pe*wi.stride),xi=0;for(let jn=0;jn<Pe;++jn)xi=wi.encode(hi,xi,qe[jn],vt[jn],st[jn],void 0,Gt[jn],lt[jn]);return{vertices:hi,maximumHeight:fe,minimumHeight:Ae,encoding:wi,boundingSphere3D:Bi,orientedBoundingBox:Xn,occludeePointInScaledSpace:bi}};var oP=R0;function Eb(){pe.throwInstantiationError()}Object.defineProperties(Eb.prototype,{credits:{get:pe.throwInstantiationError},waterMask:{get:pe.throwInstantiationError}});Eb.prototype.interpolateHeight=pe.throwInstantiationError;Eb.prototype.isChildAvailable=pe.throwInstantiationError;Eb.prototype.createMesh=pe.throwInstantiationError;Eb.prototype.upsample=pe.throwInstantiationError;Eb.prototype.wasCreatedByUpsampling=pe.throwInstantiationError;Eb.maximumAsynchronousTasks=5;var uf=Eb;var UPt=3,Gre=class{constructor(t,n,i){this._vertices=t,this._indices=n,this._encoding=i,this._inverseTransform=new N,this._needsRebuild=!0,this._rootNode=new Wre}get needsRebuild(){return this._needsRebuild}set needsRebuild(t){this._needsRebuild=t}rayIntersect(t,n,i,r,o){this._needsRebuild&&jPt(this,n);let s=this._inverseTransform,a=VPt;a.origin=N.multiplyByPoint(s,t.origin,a.origin),a.direction=N.multiplyByPointAsVector(s,t.direction,a.direction);let c=[];return qOe(this._rootNode,a,c),YPt(this,c,t,i,r,o)}},zPt=new Jn("incrementallyBuildTerrainPicker"),Wre=class e{constructor(){this.x=0,this.y=0,this.level=0,this.aabb=WOe(this.x,this.y,this.level),this.intersectingTriangles=new Uint32Array(0),this.children=[],this.buildingChildren=!1}addChild(t){let n=new e;n.x=this.x*2+(t&1),n.y=this.y*2+(t>>1&1),n.level=this.level+1,n.aabb=WOe(n.x,n.y,n.level),this.children[t]=n}},VPt=new pn,u7=[new h,new h,new h];function jPt(e,t){N.inverse(t,e._inverseTransform),e._needsRebuild=!1;let n=e._indices.length/3,i=new Uint32Array(n);for(let r=0;r<n;++r)i[r]=r;e._rootNode.intersectingTriangles=i,e._rootNode.children.length=0}var HPt=new h,GPt=new h;function WOe(e,t,n){let i=1/Math.pow(2,n),r=h.fromElements(e*i-.5,t*i-.5,-.5,HPt),o=h.fromElements((e+1)*i-.5,(t+1)*i-.5,.5,GPt);return vf.fromCorners(r,o)}function WPt(e,t,n,i,r){h.pack(n[0],e,9*r),h.pack(n[1],e,9*r+3),h.pack(n[2],e,9*r+6),t[r]=i}var qPt=new Us;function qOe(e,t,n){let i=_i.rayAxisAlignedBoundingBox(t,e.aabb,qPt);if(!l(i))return;if(!e.children.length||e.buildingChildren){n.push({node:e,interval:new Us(i.start,i.stop)});return}for(let o=0;o<e.children.length;o++)qOe(e.children[o],t,n)}function YPt(e,t,n,i,r,o){let s=t.sort(function(c,u){return c.interval.start-u.interval.start}),a=Number.MAX_VALUE;for(let c=0;c<s.length;c++){let u=s[c],f=XPt(e,n,u.node,i,r,o);if(a=Math.min(f,a),a!==Number.MAX_VALUE)break}if(a!==Number.MAX_VALUE)return pn.getPoint(n,a)}function XPt(e,t,n,i,r,o){let s=Number.MAX_VALUE,a=e._encoding,c=e._indices,u=e._vertices,f=n.intersectingTriangles.length,p=!(n.level>=UPt)&&!n.buildingChildren,g,m;p&&(g=new Float64Array(f*9),m=new Uint32Array(f));for(let y=0;y<f;y++){let A=n.intersectingTriangles[y],b=Hre(a,r,o,t,u,c[3*A],u7[0]),x=Hre(a,r,o,t,u,c[3*A+1],u7[1]),T=Hre(a,r,o,t,u,c[3*A+2],u7[2]),E=_i.rayTriangleParametric(t,b,x,T,i);l(E)&&E<s&&E>=0&&(s=E),p&&WPt(g,m,u7,A,y)}if(p){for(let y=0;y<4;y++)n.addChild(y);$Pt(e._inverseTransform,n,m,g)}return s}var KPt=new he;function Hre(e,t,n,i,r,o,s){let a=e.getExaggeratedPosition(r,o,s);if(t===re.SCENE3D)return a;let u=n.ellipsoid.cartesianToCartographic(a,KPt);a=n.project(u,s),a=h.fromElements(a.z,a.x,a.y,s);let f=D.TWO_PI*n.ellipsoid.maximumRadius,d=Math.round((i.origin.y-a.y)/f);return a.y+=d*f,a}async function $Pt(e,t,n,i){t.buildingChildren=!0;let r=new Float64Array(16);N.pack(e,r,0);let o=new Float64Array(24);for(let f=0;f<4;f++)h.pack(t.children[f].aabb.minimum,o,f*6),h.pack(t.children[f].aabb.maximum,o,f*6+3);let s={aabbs:o,inverseTransform:r,triangleIndices:n,trianglePositions:i},a=[o.buffer,r.buffer,n.buffer,i.buffer],c=zPt.scheduleTask(s,a);if(!l(c)){t.buildingChildren=!1;return}(await c).intersectingTrianglesArrays.forEach((f,d)=>{l(t.children[d])&&(t.children[d].intersectingTriangles=new Uint32Array(f))}),t.intersectingTriangles=new Uint32Array(0),t.buildingChildren=!1}var SU=Gre;function wU(e,t,n,i,r,o,s,a,c,u,f,d,p,g,m,y,A){this.center=e,this.vertices=t,this.stride=f??6,this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=r,this.minimumHeight=o,this.maximumHeight=s,this.rectangle=a,this.boundingSphere3D=c,this.occludeePointInScaledSpace=u,this.orientedBoundingBox=d,this.encoding=p,this.westIndicesSouthToNorth=g,this.southIndicesEastToWest=m,this.eastIndicesNorthToSouth=y,this.northIndicesWestToEast=A,this._transform=new N,this._lastPickSceneMode=void 0,this._terrainPicker=new SU(t,n,p)}wU.prototype.getTransform=function(e,t){return this._lastPickSceneMode===e?this._transform:(this._terrainPicker.needsRebuild=!0,!l(e)||e===re.SCENE3D?JPt(this,this._transform):rDt(this,t,this._transform))};function JPt(e,t){let n=e.encoding.exaggeration,i=e.encoding.exaggerationRelativeHeight,r=Ar.getHeight(e.minimumHeight,n,i),o=Ar.getHeight(e.maximumHeight,n,i),s=Qt.fromRectangle(e.rectangle,r,o,ee.default,e.orientedBoundingBox);return Qt.computeTransformation(s,t),N.getScale(t,qre).z<=D.EPSILON16&&(qre.z=1,N.setScale(t,qre,t)),t}var ZPt=new h,QPt=new h,eDt=new he,tDt=new he,nDt=new h,iDt=new h,qre=new h;function rDt(e,t,n){let i=e.encoding.exaggeration,r=e.encoding.exaggerationRelativeHeight,o=Ar.getHeight(e.minimumHeight,i,r),s=Ar.getHeight(e.maximumHeight,i,r),a=t.project(he.fromRadians(e.rectangle.west,e.rectangle.south,0,eDt),ZPt),c=t.project(he.fromRadians(e.rectangle.east,e.rectangle.north,0,tDt),QPt),u=s-o,f=h.fromElements(c.x-a.x,c.y-a.y,u>0?u:1,nDt),d=h.fromElements(a.x+f.x*.5,a.y+f.y*.5,o+f.z*.5,iDt);return N.fromTranslation(d,n),N.setScale(n,f,n),N.multiply(At.SWIZZLE_3D_TO_2D_MATRIX,n,n),n}wU.prototype.pick=function(e,t,n,i){let r=this._terrainPicker.rayIntersect(e,this.getTransform(n,i),t,n,i);return this._lastPickSceneMode=n,r};wU.prototype.updateExaggeration=function(e,t){this._terrainPicker._vertices=this.vertices,this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};wU.prototype.updateSceneMode=function(e){this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};var bc=wU;function ey(e){e=e??H.EMPTY_OBJECT,this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=e.childTileMask??15,this._encoding=e.encoding??xh.NONE;let t=oP.DEFAULT_STRUCTURE,n=e.structure;l(n)?n!==t&&(n.heightScale=n.heightScale??t.heightScale,n.heightOffset=n.heightOffset??t.heightOffset,n.elementsPerHeight=n.elementsPerHeight??t.elementsPerHeight,n.stride=n.stride??t.stride,n.elementMultiplier=n.elementMultiplier??t.elementMultiplier,n.isBigEndian=n.isBigEndian??t.isBigEndian):n=t,this._structure=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===xh.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(ey.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var YOe="createVerticesFromHeightmap",oDt=new Jn(YOe),sDt=new Jn(YOe,uf.maximumAsynchronousTasks);ey.prototype.createMesh=function(e){e=e??H.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,r=e.level,o=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,r),f=t.tileXYToRectangle(n,i,r),d=c.cartographicToCartesian(ie.center(f)),p=this._structure,m=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<r);this._skirtHeight=Math.min(m*4,1e3);let A=(a?sDt:oDt).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ui,exaggeration:o,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(A))return;let b=this;return Promise.resolve(A).then(function(x){let T;b._skirtHeight>0?T=Xr.getRegularGridAndSkirtIndicesAndEdgeIndices(x.gridWidth,x.gridHeight):T=Xr.getRegularGridIndicesAndEdgeIndices(x.gridWidth,x.gridHeight);let E=x.gridWidth*x.gridHeight;return b._mesh=new bc(d,new Float32Array(x.vertices),T.indices,T.indexCountWithoutSkirts,E,x.minimumHeight,x.maximumHeight,f,ue.clone(x.boundingSphere3D),h.clone(x.occludeePointInScaledSpace),x.numberOfAttributes,Qt.clone(x.orientedBoundingBox),Co.clone(x.encoding),T.westIndicesSouthToNorth,T.southIndicesEastToWest,T.eastIndicesNorthToSouth,T.northIndicesWestToEast),b._buffer=void 0,b._mesh})};ey.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,r=e.level,o=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,r),u=t.tileXYToRectangle(n,i,r),f=a.cartographicToCartesian(ie.center(u)),d=this._structure,g=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<r);this._skirtHeight=Math.min(g*4,1e3);let m=oP.computeVertices({heightmap:this._buffer,structure:d,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:u,relativeToCenter:f,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Ui,exaggeration:o,exaggerationRelativeHeight:s});this._buffer=void 0;let y;this._skirtHeight>0?y=Xr.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):y=Xr.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let A=m.gridWidth*m.gridHeight;return this._mesh=new bc(f,m.vertices,y.indices,y.indexCountWithoutSkirts,A,m.minimumHeight,m.maximumHeight,u,m.boundingSphere3D,m.occludeePointInScaledSpace,m.encoding.stride,m.orientedBoundingBox,m.encoding,y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),this._mesh};ey.prototype.interpolateHeight=function(e,t,n){let i=this._width,r=this._height,o=this._structure,s=o.stride,a=o.elementsPerHeight,c=o.elementMultiplier,u=o.isBigEndian,f=o.heightOffset,d=o.heightScale,p=l(this._mesh),g=this._encoding===xh.LERC;if(!p&&g)return;let y;if(p){let A=this._mesh.vertices,b=this._mesh.encoding;y=XOe(A,b,f,d,e,i,r,t,n)}else y=aDt(this._buffer,a,c,s,u,e,i,r,t,n),y=y*d+f;return y};ey.prototype.upsample=function(e,t,n,i,r,o,s){let a=this._mesh;if(!l(a))return;let c=this._width,u=this._height,f=this._structure,d=f.stride,p=new this._bufferType(c*u*d),g=a.vertices,m=a.encoding,y=e.tileXYToRectangle(t,n,i),A=e.tileXYToRectangle(r,o,s),b=f.heightOffset,x=f.heightScale,T=f.elementsPerHeight,E=f.elementMultiplier,v=f.isBigEndian,S=Math.pow(E,T-1);for(let I=0;I<u;++I){let R=D.lerp(A.north,A.south,I/(u-1));for(let O=0;O<c;++O){let L=D.lerp(A.west,A.east,O/(c-1)),_=XOe(g,m,b,x,y,c,u,L,R);_=_<f.lowestEncodedHeight?f.lowestEncodedHeight:_,_=_>f.highestEncodedHeight?f.highestEncodedHeight:_,cDt(p,T,E,S,d,v,I*c+O,_)}}return Promise.resolve(new ey({buffer:p,width:c,height:u,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};ey.prototype.isChildAvailable=function(e,t,n,i){let r=2;return n!==e*2&&++r,i!==t*2&&(r-=2),(this._childTileMask&1<<r)!==0};ey.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function aDt(e,t,n,i,r,o,s,a,c,u){let f=(c-o.west)*(s-1)/(o.east-o.west),d=(u-o.south)*(a-1)/(o.north-o.south),p=f|0,g=p+1;g>=s&&(g=s-1,p=s-2);let m=d|0,y=m+1;y>=a&&(y=a-1,m=a-2);let A=f-p,b=d-m;m=a-1-m,y=a-1-y;let x=f7(e,t,n,i,r,m*s+p),T=f7(e,t,n,i,r,m*s+g),E=f7(e,t,n,i,r,y*s+p),v=f7(e,t,n,i,r,y*s+g);return KOe(A,b,x,T,E,v)}function XOe(e,t,n,i,r,o,s,a,c){let u=(a-r.west)*(o-1)/(r.east-r.west),f=(c-r.south)*(s-1)/(r.north-r.south),d=u|0,p=d+1;p>=o&&(p=o-1,d=o-2);let g=f|0,m=g+1;m>=s&&(m=s-1,g=s-2);let y=u-d,A=f-g;g=s-1-g,m=s-1-m;let b=(t.decodeHeight(e,g*o+d)-n)/i,x=(t.decodeHeight(e,g*o+p)-n)/i,T=(t.decodeHeight(e,m*o+d)-n)/i,E=(t.decodeHeight(e,m*o+p)-n)/i;return KOe(y,A,b,x,T,E)}function KOe(e,t,n,i,r,o){return t<e?n+e*(i-n)+t*(o-i):n+e*(o-r)+t*(r-n)}function f7(e,t,n,i,r,o){o*=i;let s=0,a;if(r)for(a=0;a<t;++a)s=s*n+e[o+a];else for(a=t-1;a>=0;--a)s=s*n+e[o+a];return s}function cDt(e,t,n,i,r,o,s,a){s*=r;let c;if(o)for(c=0;c<t-1;++c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;else for(c=t-1;c>0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var jc=ey;function cP(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var ZE=new ie;function lDt(e,t,n,i){let r=i.length;for(let o=0;o<r;++o){let s=i[o];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}cP.prototype.addAvailableTileRange=function(e,t,n,i,r){let o=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=r;++p)for(let g=t;g<=i;++g)lDt(e,g,p,s)||s.push(new sP(o,void 0,0,g,p));o.tileXYToRectangle(t,n,e,ZE);let a=ZE.west,c=ZE.north;o.tileXYToRectangle(i,r,e,ZE);let u=ZE.east,f=ZE.south,d=new mDt(e,a,f,u,c);for(let p=0;p<s.length;++p){let g=s[p];Yre(g.extent,d)&&pDt(this._maximumLevel,g,d)}};cP.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(aP(i.extent,e)){t=i;break}}return l(t)?IU(void 0,t,e):-1};var uDt=[],fDt=[],dDt=new ie,hDt=new ie;cP.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=uDt;t.length=0,e.east<e.west?(t.push(ie.fromRadians(-Math.PI,e.south,e.east,e.north,dDt)),t.push(ie.fromRadians(e.west,e.south,Math.PI,e.north,hDt))):t.push(e);let n=fDt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)PU(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var $Oe=new he;cP.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,ZE);return ie.center(i,$Oe),this.computeMaximumLevelAtPosition($Oe)>=e};cP.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let r=0;return r|=this.isTileAvailable(i,2*t,2*n+1)?1:0,r|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,r|=this.isTileAvailable(i,2*t,2*n)?4:0,r|=this.isTileAvailable(i,2*t+1,2*n)?8:0,r};function sP(e,t,n,i,r){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=r,this.extent=e.tileXYToRectangle(i,r,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(sP.prototype,{nw:{get:function(){return this._nw||(this._nw=new sP(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new sP(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new sP(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new sP(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function mDt(e,t,n,i,r){this.level=e,this.west=t,this.south=n,this.east=i,this.north=r}function Yre(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),r=Math.min(e.east,t.east),o=Math.min(e.north,t.north);return i<o&&n<r}function pDt(e,t,n){for(;t.level<e;)if(d7(t.nw.extent,n))t=t.nw;else if(d7(t.ne.extent,n))t=t.ne;else if(d7(t.sw.extent,n))t=t.sw;else if(d7(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=vr(t.rectangles,n.level,gDt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function gDt(e,t){return e.level-t}function d7(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function aP(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function IU(e,t,n){let i=0,r=!1;for(;!r;){let o=t._nw&&aP(t._nw.extent,n),s=t._ne&&aP(t._ne.extent,n),a=t._sw&&aP(t._sw.extent,n),c=t._se&&aP(t._se.extent,n);if(o+s+a+c>1){o&&(i=Math.max(i,IU(t,t._nw,n))),s&&(i=Math.max(i,IU(t,t._ne,n))),a&&(i=Math.max(i,IU(t,t._sw,n))),c&&(i=Math.max(i,IU(t,t._se,n)));break}else o?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:r=!0}for(;t!==e;){let o=t.rectangles;for(let s=o.length-1;s>=0&&o[s].level>i;--s){let a=o[s];aP(a,n)&&(i=a.level)}t=t.parent}return i}function PU(e,t,n){if(!t)return;let i,r=!1;for(i=0;i<n.length;++i)r=r||Yre(t.extent,n[i]);if(!r)return;let o=t.rectangles;for(i=0;i<o.length;++i){let s=o[i];e[s.level]||(e[s.level]=n),e[s.level]=_Dt(e[s.level],s)}PU(e,t._nw,n),PU(e,t._ne,n),PU(e,t._sw,n),PU(e,t._se,n)}function _Dt(e,t){let n=[];for(let i=0;i<e.length;++i){let r=e[i];Yre(r,t)?(r.west<t.west&&n.push(new ie(r.west,r.south,t.west,r.north)),r.east>t.east&&n.push(new ie(t.east,r.south,r.east,r.north)),r.south<t.south&&n.push(new ie(Math.max(t.west,r.west),r.south,Math.min(t.east,r.east),t.south)),r.north>t.north&&n.push(new ie(Math.max(t.west,r.west),t.north,Math.min(t.east,r.east),r.north))):n.push(r)}return n}var tp=cP;var yDt=15;function JOe(e){this.ellipsoid=e.ellipsoid??ee.default,this.credit=void 0,this.tilingScheme=void 0,this.height=void 0,this.width=void 0,this.encoding=void 0,this.lodCount=void 0,this.hasAvailability=!1,this.tilesAvailable=void 0,this.tilesAvailabilityLoaded=void 0,this.levelZeroMaximumGeometricError=void 0,this.terrainDataStructure=void 0}JOe.prototype.build=function(e){e._credit=this.credit,e._tilingScheme=this.tilingScheme,e._height=this.height,e._width=this.width,e._encoding=this.encoding,e._lodCount=this.lodCount,e._hasAvailability=this.hasAvailability,e._tilesAvailable=this.tilesAvailable,e._tilesAvailabilityLoaded=this.tilesAvailabilityLoaded,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._terrainDataStructure=this.terrainDataStructure};function ADt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new It(n));let i=t.spatialReference,r=i.latestWkid??i.wkid,o=t.extent,s={ellipsoid:e.ellipsoid};if(r===4326)s.rectangle=ie.fromDegrees(o.xmin,o.ymin,o.xmax,o.ymax),e.tilingScheme=new er(s);else if(r===3857){let u=Math.PI*e.ellipsoid.maximumRadius;t.extent.xmax>u&&(t.extent.xmax=u),t.extent.ymax>u&&(t.extent.ymax=u),t.extent.xmin<-u&&(t.extent.xmin=-u),t.extent.ymin<-u&&(t.extent.ymin=-u),s.rectangleSouthwestInMeters=new U(o.xmin,o.ymin),s.rectangleNortheastInMeters=new U(o.xmax,o.ymax),e.tilingScheme=new Lo(s)}else throw new oe("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new oe("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?xh.LERC:xh.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new tp(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new tp(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.width,e.tilingScheme.getNumberOfXTilesAtLevel(0)),t.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),l(t.minValues)&&l(t.maxValues)?e.terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:t.minValues[0],highestEncodedHeight:t.maxValues[0]}:e.terrainDataStructure={elementMultiplier:1}}async function bDt(e,t,n){try{let i=await t.fetchJson();ADt(e,i)}catch(i){let r=`An error occurred while accessing ${t}.`;throw Zr.reportError(void 0,n,l(n)?n._errorEvent:void 0,r),i}}function Cb(){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._width=void 0,this._height=void 0,this._encoding=void 0,this._lodCount=void 0,this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailabilityLoaded=void 0,this._availableCache={},this._errorEvent=new be}Object.defineProperties(Cb.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});Cb.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),r=new JOe(t);await bDt(r,i);let o=new Cb(t);return r.build(o),o._resource=n,o};Cb.prototype.requestTileGeometry=function(e,t,n,i){let r=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),o=this._hasAvailability,s=Promise.resolve(!0),a;if(o&&!l(Xre(this,n+1,e*2,t*2))){let d=ZOe(this,n+1,e*2,t*2);s=d.promise,a=d.request}let c=r.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(d){return new jc({buffer:d[0],width:u._width,height:u._height,childTileMask:o?f.computeChildMaskForTile(n,e,t):yDt,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(async function(d){if(l(a)&&a.state===Ti.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=Ti.CANCELLED,Promise.reject(d)}return Promise.reject(d)})};function Xre(e,t,n,i){if(!e._hasAvailability)return;let r=e._tilesAvailabilityLoaded,o=e._tilesAvailable;if(t>e._lodCount)return!1;if(o.isTileAvailable(t,n,i))return!0;if(r.isTileAvailable(t,n,i))return!1}Cb.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Cb.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=Xre(this,n,e,t);if(l(i))return i;ZOe(this,n,e,t)};Cb.prototype.loadTileDataAvailability=function(e,t,n){};function xDt(e,t,n,i){let r=t-1,o=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new U(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,g=d?u.y+1:u.y;if(!f){for(let m=e.y;m<g;++m)if(i[m*t+u.x]!==s){f=!0;break}f?(a.push(new U(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===r?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let y=e.x;y<=p;++y)if(i[m+y]!==s){d=!0;break}d?(a.push(new U(e.x,u.y)),--u.y,c.endY=u.y):u.y===o?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function TDt(e,t,n,i,r){let o=[];if(r.every(function(c){return c===r[0]}))return r[0]===1&&o.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),o;let a=[new U(0,0)];for(;a.length>0;){let c=a.pop(),u=xDt(c,n,i,r);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,o.push(d)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return o}function ZOe(e,t,n,i){if(!e._hasAvailability)return{};let r=Math.floor(n/128)*128,o=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${o}/${r}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new wo({throttle:!1,throttleByServer:!0,type:Zs.TERRAIN}),d=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let g=TDt(r,o,s,s,p.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,r,o,r+s,o+s);let m=e._tilesAvailable;for(let y=0;y<g.length;++y){let A=g[y];m.addAvailableTileRange(t,A.startX,A.startY,A.endX,A.endY)}return Xre(e,t,n,i)}),c[a]={promise:d,request:u},d=d.finally(function(p){return delete c[a],p}),{promise:d,request:u}):{}}var Kre=Cb;var QOe="https://dev.virtualearth.net/REST/v1/Locations";function $re(e){e=e??H.EMPTY_OBJECT;let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:QOe,queryParameters:n}),this._credit=new It('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties($re.prototype,{url:{get:function(){return QOe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});$re.prototype.geocode=async function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(r){let o=r.bbox,s=o[0],a=o[1],c=o[2],u=o[3];return{displayName:r.name,destination:ie.fromDegrees(a,s,u,c)}})})};var Jre=$re;function Zre(){}Object.defineProperties(Zre.prototype,{credit:{get:function(){}}});Zre.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],r=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let o=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(o);o.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(r)){let o={displayName:e,destination:h.fromDegrees(n,i,r)};return Promise.resolve([o])}}return Promise.resolve([])};var Qre=Zre;var EDt=new se,eMe=new h,lP=new h;function CDt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],r=1/(n[1]-i),o=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let u=(a-i)*r;return h.lerp(o,s,u,c)}}return function(i,r){l(r)||(r=new h);let o=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[o])/(n[o+1]-n[o]),a=EDt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,d,p;return o===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,eMe),h.multiplyByScalar(d,.5,d),p=N.multiplyByVector(yA.hermiteCoefficientMatrix,a,a)):o===t.length-2?(c=t[o],u=t[o+1],d=e.lastTangent,f=h.subtract(u,t[o-1],eMe),h.multiplyByScalar(f,.5,f),p=N.multiplyByVector(yA.hermiteCoefficientMatrix,a,a)):(c=t[o-1],u=t[o],f=t[o+1],d=t[o+2],p=N.multiplyByVector(vb.catmullRomCoefficientMatrix,a,a)),r=h.multiplyByScalar(c,p.x,r),h.multiplyByScalar(u,p.y,lP),h.add(r,lP,r),h.multiplyByScalar(f,p.z,lP),h.add(r,lP,r),h.multiplyByScalar(d,p.w,lP),h.add(r,lP,r)}}var vDt=new h,SDt=new h;function vb(e){e=e??H.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.firstTangent,r=e.lastTangent;if(t.length>2&&(l(i)||(i=vDt,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(r))){let o=t.length-1;r=SDt,h.multiplyByScalar(t[o-1],2,r),h.subtract(t[o],r,r),h.add(r,t[o-2],r),h.multiplyByScalar(r,.5,r)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(r),this._evaluateFunction=CDt(this),this._lastTimeIndex=0}Object.defineProperties(vb.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});vb.catmullRomCoefficientMatrix=new N(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);vb.prototype.findTimeInterval=Dr.prototype.findTimeInterval;vb.prototype.wrapTime=Dr.prototype.wrapTime;vb.prototype.clampTime=Dr.prototype.clampTime;vb.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var eoe=vb;var toe={},wDt={positions:void 0,normals:void 0,indices:void 0,edgeIndicesWest:void 0,edgeIndicesSouth:void 0,edgeIndicesEast:void 0,edgeIndicesNorth:void 0},IDt=new he,PDt=new h,DDt=new N,RDt=new N,ODt=new N,MDt=new h,NDt=new h,LDt=new h,FDt=new h,BDt=new he,kDt=new U,DU=new h,UDt=new U,zDt=new h,VDt=new h,h7=function(e,t){return e-t};toe.createMesh=async function(e){e=e??H.EMPTY_OBJECT;let{exaggeration:t=1,exaggerationRelativeHeight:n=0,hasVertexNormals:i,hasWebMercatorT:r,gltf:o,minimumHeight:s,maximumHeight:a,skirtHeight:c}=e,f=t!==1,d=ue.clone(e.boundingSphere,new ue),p=Qt.clone(e.orientedBoundingBox,new Qt),g=h.clone(e.horizonOcclusionPoint,new h),m=ee.clone(e.ellipsoid,new ee),y=ie.clone(e.rectangle,new ie);await(o.extensionsRequired!==void 0&&o.extensionsRequired.indexOf("EXT_meshopt_compression")!==-1?nA.ready:Promise.resolve(void 0));let x=y.west,T=y.south,E=y.north,v=y.width,S=y.height,I=ie.center(y,IDt);I.height=.5*(s+a);let R=he.toCartesian(I,m,PDt),O=At.eastNorthUpToFixedFrame(R,m,DDt),L=N.inverseTransformation(O,RDt),_=N.unpack(o.nodes[0].matrix,0,ODt);_=N.multiply(Hi.Y_UP_TO_Z_UP,_,_);let C=b1t(o,i,wDt),w=Xr.getSkirtVertexCount(C.edgeIndicesWest,C.edgeIndicesSouth,C.edgeIndicesEast,C.edgeIndicesNorth),P=C.positions,M=C.normals,F=C.indices,V=P.length/3,B=V+w,j=F.length,k=Xr.getSkirtIndexCountWithFilledCorners(w),G=B<=65535?Uint16Array:Uint32Array,q=new G(j+k);q.set(F);let Q=new G(C.edgeIndicesWest),W=new G(C.edgeIndicesSouth),J=new G(C.edgeIndicesEast),Z=new G(C.edgeIndicesNorth),ae=new G(Q).sort(),Ae=new G(W).sort(),fe=new G(J).sort(),xe=new G(Z).sort(),ge=yi.geodeticLatitudeToMercatorAngle(T),Se=1/(yi.geodeticLatitudeToMercatorAngle(E)-ge),Re=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,MDt),Qe=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,NDt),He=new Co(d.center,void 0,void 0,void 0,void 0,i,r,f,t,n),Xe=He.stride,$e=new Float32Array(B*Xe),Pe=0;for(let st=0;st<V;st++){let vt=h.unpack(P,st*3,LDt),Gt=N.multiplyByPoint(_,vt,FDt),lt=he.fromCartesian(Gt,m,BDt),{longitude:mt,latitude:ft,height:Xt}=lt,rt=(mt-x)/v,ht=(ft-T)/S;rt=D.clamp(rt,0,1),ht=D.clamp(ht,0,1),vr(ae,st,h7)>=0?rt=0:vr(fe,st,h7)>=0&&(rt=1),vr(Ae,st,h7)>=0?ht=0:vr(xe,st,h7)>=0&&(ht=1);let Bi=U.fromElements(rt,ht,kDt),Xn;if(i){let hi=h.unpack(M,st*3,DU);hi=N.multiplyByPointAsVector(_,hi,DU),hi=h.normalize(hi,DU),Xn=cn.octEncode(hi,UDt)}let bi;r&&(bi=(yi.geodeticLatitudeToMercatorAngle(ft)-ge)*Se);let Wi;f&&(Wi=m.geodeticSurfaceNormal(Gt,zDt)),Pe=He.encode($e,Pe,Gt,Bi,Xt,Xn,bi,Wi);let wi=N.multiplyByPoint(L,Gt,VDt);Re=h.minimumByComponent(wi,Re,Re),Qe=h.maximumByComponent(wi,Qe,Qe)}let qe=new bc(h.clone(He.center,new h),$e,q,j,V,s,a,y,ue.clone(d,new ue),h.clone(g,new h),Xe,Qt.clone(p,new Qt),He,Q,W,J,Z);return aMe(qe,y,m,Re,Qe,O,L,c),Promise.resolve(qe)};var jDt=new U,HDt=new U,GDt=new Array(6),WDt=new U,qDt=new U,YDt=new U,XDt=new h,KDt=new h,$Dt=new h,JDt=new he,ZDt=new h,QDt=new he,e1t=new he,tMe=new h,t1t=new h,n1t=new h,i1t=new h,r1t=new h,o1t=new h,s1t=new h,a1t=new h,c1t=new N,l1t=new N,nMe=new U,u1t=new U,f1t=new h,d1t=new ue,h1t=new Qt,m1t=new vf,iMe=new h,rMe=new U,p1t=new U,oMe=new h,g1t=new h;function _1t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.POSITION],i=e.bufferViews[n.bufferView],r=n.count,o=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(o===void 0){let g=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(g.buffer,g.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),r*3)}let s=e.buffers[o.buffer].extras._pipeline.source,a=new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset??0)+(n.byteOffset??0),o.byteLength),c=o.byteStride,u=c===4?Uint8Array:Uint16Array,f=new u(r*4);nA.decodeVertexBuffer(new Uint8Array(f.buffer),r,c,a);let d=(1<<f.BYTES_PER_ELEMENT*8)-1,p=new Float32Array(r*3);for(let g=0;g<r;g++)p[g*3+0]=f[g*4+0]/d,p[g*3+1]=f[g*4+1]/d,p[g*3+2]=f[g*4+2]/d;return p}function y1t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.NORMAL],i=e.bufferViews[n.bufferView],r=n.count,o=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(o===void 0){let d=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(d.buffer,d.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),r*3)}let s=e.buffers[o.buffer].extras._pipeline.source,a=new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset??0)+(n.byteOffset??0),o.byteLength),c=o.byteStride,u=new Int8Array(r*c);nA.decodeVertexBuffer(new Uint8Array(u.buffer),r,c,a);let f=new Float32Array(r*3);for(let d=0;d<r;d++){let p=Math.max(u[d*4+0]/127,-1),g=Math.max(u[d*4+1]/127,-1),m=1-(Math.abs(p)+Math.abs(g));if(m<0){let A=p,b=g;p=(1-Math.abs(b))*D.signNotZero(A),g=(1-Math.abs(A))*D.signNotZero(b)}let y=DU;y.x=p,y.y=g,y.z=m,y=h.normalize(y,DU),f[d*3+0]=y.x,f[d*3+1]=y.y,f[d*3+2]=y.z}return f}function A1t(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.indices],i=e.bufferViews[n.bufferView],r=n.count,o=n.componentType===Y.UNSIGNED_SHORT?Uint16Array:Uint32Array,s=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(s===void 0){let f=e.buffers[i.buffer].extras._pipeline.source;return new o(f.buffer,f.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),r)}let a=e.buffers[s.buffer].extras._pipeline.source,c=new Uint8Array(a.buffer,a.byteOffset+(s.byteOffset??0)+(n.byteOffset??0),s.byteLength),u=new o(r);return nA.decodeIndexBuffer(new Uint8Array(u.buffer),r,s.byteStride,c),u}function m7(e,t){let n=e.meshes[0].primitives[0],i=e.accessors[n.extensions.CESIUM_tile_edges[t]],r=e.bufferViews[i.bufferView],o=i.count,s=i.componentType===Y.UNSIGNED_SHORT?Uint16Array:Uint32Array,a=r.extensions?r.extensions.EXT_meshopt_compression:void 0;if(a===void 0){let p=e.buffers[r.buffer].extras._pipeline.source;return new s(p.buffer,p.byteOffset+(r.byteOffset??0)+(i.byteOffset??0),o)}let c=e.buffers[a.buffer].extras._pipeline.source,u=new Uint8Array(c.buffer,c.byteOffset+(a.byteOffset??0)+(i.byteOffset??0),a.byteLength),f=new s(o),d=a.byteStride;return nA.decodeIndexSequence(new Uint8Array(f.buffer),o,d,u),f}function b1t(e,t,n){return n.positions=_1t(e),n.normals=t?y1t(e):void 0,n.indices=A1t(e),n.edgeIndicesWest=m7(e,"left"),n.edgeIndicesSouth=m7(e,"bottom"),n.edgeIndicesEast=m7(e,"right"),n.edgeIndicesNorth=m7(e,"top"),n}toe.upsampleMesh=function(e){e=e??H.EMPTY_OBJECT;let{isEastChild:t,isNorthChild:n,parentMinimumHeight:i,parentMaximumHeight:r,skirtHeight:o}=e,s=e.parentIndexCountWithoutSkirts,a=e.parentIndices,c=e.parentVertexCountWithoutSkirts,u=e.parentVertices,f=Co.clone(e.parentEncoding,new Co),d=f.hasVertexNormals,p=f.hasWebMercatorT,g=f.exaggeration,m=f.exaggerationRelativeHeight,A=g!==1,b=ie.clone(e.rectangle,new ie),x=ee.clone(e.ellipsoid),T=[],E=[],v=[],S=[],I=[],R=[],O=[],L=[];M1t(t,n,s,a,c,u,f,S,I,R,O,L,T,v,E);let _=ie.center(b,JDt);_.height=.5*(i+r);let C=he.toCartesian(_,x,ZDt),w=T.length,P=new Co(C,void 0,void 0,void 0,void 0,d,p,A,g,m),M=P.stride,F=Xr.getSkirtVertexCount(I,R,O,L),V=w+F,B=S.length,j=Xr.getSkirtIndexCountWithFilledCorners(F),k=B+j,G=V<=65535?Uint16Array:Uint32Array,q=new G(k);q.set(S);let Q=new G(I),W=new G(R),J=new G(O),Z=new G(L),ae=new Float32Array(V*M),Ae=0,fe=At.eastNorthUpToFixedFrame(C,x,c1t),xe=N.inverseTransformation(fe,l1t),ge=b.west,we=b.east,Se=b.south,Re=b.north,Qe=yi.geodeticLatitudeToMercatorAngle(Se),Xe=1/(yi.geodeticLatitudeToMercatorAngle(Re)-Qe),$e=Number.POSITIVE_INFINITY,Pe=Number.NEGATIVE_INFINITY,qe=h.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,s1t),st=h.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,a1t);for(let Xt=0;Xt<w;Xt++){let rt=T[Xt],ht=a[rt*3+0],Bi=a[rt*3+1],Xn=a[rt*3+2],bi=u1t;bi.x=E[Xt*2+0],bi.y=E[Xt*2+1];let Wi=bi.x,wi=bi.y,hi=v[Xt*2+0],xi=v[Xt*2+1],jn=1-hi-xi,nn=f.decodeHeight(u,ht),Wn=f.decodeHeight(u,Bi),Zi=f.decodeHeight(u,Xn),Mr=nn*hi+Wn*xi+Zi*jn;$e=Math.min(Mr,$e),Pe=Math.max(Mr,Pe);let fo=D.lerp(ge,we,Wi),Bs=D.lerp(Se,Re,wi),Ks=he.fromRadians(fo,Bs,Mr,e1t),no=he.toCartesian(Ks,x,t1t),gi=N.multiplyByPoint(xe,no,i1t);qe=h.minimumByComponent(gi,qe,qe),st=h.maximumByComponent(gi,st,st);let ho;if(d){let Bn=f.decodeNormal(u,ht,XDt),qi=f.decodeNormal(u,Bi,KDt),ki=f.decodeNormal(u,Xn,$Dt),Nr=h.fromElements(Bn.x*hi+qi.x*xi+ki.x*jn,Bn.y*hi+qi.y*xi+ki.y*jn,Bn.z*hi+qi.z*xi+ki.z*jn,iMe);Nr=h.normalize(Nr,iMe),ho=cn.octEncode(Nr,p1t)}let ur;p&&(ur=(yi.geodeticLatitudeToMercatorAngle(Bs)-Qe)*Xe);let Zo;A&&(Zo=x.geodeticSurfaceNormal(no,g1t)),Ae=P.encode(ae,Ae,no,bi,Mr,ho,ur,Zo)}let vt=Qt.fromRectangle(b,$e,Pe,x,h1t),Gt=ue.fromVertices(ae,P.center,M,d1t),mt=new Om(x).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(P.center,ae,M,P.center,$e,f1t),ft=new bc(h.clone(P.center,new h),ae,q,B,w,$e,Pe,b,ue.clone(Gt),h.clone(mt),M,Qt.clone(vt),P,Q,W,J,Z);return aMe(ft,b,x,qe,st,fe,xe,o),ft};function aMe(e,t,n,i,r,o,s,a){let{encoding:c}=e,u=c.stride,f=e.vertices,{hasVertexNormals:d,hasWebMercatorT:p,exaggeration:g,exaggerationRelativeHeight:m}=c,A=g!==1,b=e.vertexCountWithoutSkirts,x=b*u,T=f.length/u,E=T-b,v=e.indices,S=e.indexCountWithoutSkirts,I=e.westIndicesSouthToNorth,R=e.southIndicesEastToWest,O=e.eastIndicesNorthToSouth,L=e.northIndicesWestToEast;Xr.addSkirtIndicesWithFilledCorners(I,R,O,L,b,v,S);let _=0,C=_+I.length,w=C+R.length,P=w+O.length,M=[I,R,O,L],F=[_,C,w,P],V=[-1,0,1,0],B=[0,-1,0,1],j=h.clone(i,r1t),k=h.clone(r,o1t),G=e.maximumHeight,q=e.minimumHeight-a;for(let J=0;J<E;J++){let Z;for(Z=0;Z<3&&!(J<F[Z+1]);Z++);let ae=M[Z][J-F[Z]],Ae=c.decodeTextureCoordinates(f,ae,nMe),fe=1e-4,xe=Ae.x+V[Z]*fe,ge=Ae.y+B[Z]*fe,we=D.lerp(t.west,t.east,xe),Se=D.clamp(D.lerp(t.south,t.north,ge),-D.PI_OVER_TWO,+D.PI_OVER_TWO),Qe=c.decodeHeight(f,ae)-a,He=he.fromRadians(we,Se,Qe,QDt),Xe=he.toCartesian(He,n,tMe),$e;d&&($e=c.getOctEncodedNormal(f,ae,rMe));let Pe;p&&(Pe=c.decodeWebMercatorT(f,ae));let qe;A&&(qe=n.geodeticSurfaceNormal(Xe,oMe)),x=c.encode(f,x,Xe,Ae,Qe,$e,Pe,qe);let st=N.multiplyByPoint(s,Xe,n1t);h.minimumByComponent(st,j,j),h.maximumByComponent(st,k,k)}let Q=vf.fromCorners(j,k,m1t),W=new Co(c.center,Q,q,G,o,c.hasVertexNormals,c.hasWebMercatorT,A,g,m);if(c.quantization!==W.quantization){let J=W,Z=J.stride,ae=new Float32Array(T*Z),Ae=0;for(let fe=0;fe<T;fe++)Ae=J.encode(ae,Ae,c.decodePosition(f,fe,tMe),c.decodeTextureCoordinates(f,fe,nMe),c.decodeHeight(f,fe),c.hasVertexNormals?c.getOctEncodedNormal(f,fe,rMe):void 0,c.hasWebMercatorT?c.decodeWebMercatorT(f,fe):void 0,c.hasGeodeticSurfaceNormals?c.decodeGeodeticSurfaceNormal(f,fe,oMe):void 0);e.vertices=ae,e.stride=Z,e.encoding=J}return e}var noe=0,x1t=1,ioe=2,roe=3,T1t=4,E1t=new h,C1t=[new h,new h,new h,new h,new h,new h],v1t=[new U,new U,new U,new U,new U,new U],S1t=[new h,new h,new h,new h,new h,new h],w1t=[new U,new U,new U,new U,new U,new U];function sMe(e,t,n,i){switch(n){case noe:return D.sign(i.x-e.x);case ioe:return D.sign(t.x-i.x);case roe:return D.sign(i.y-e.y);default:return D.sign(t.y-i.y)}}function I1t(e,t,n,i,r,o){let s,a,c;switch(n){case noe:s=(e.x-i.x)/(r.x-i.x),a=e.x,c=i.y+(r.y-i.y)*s;break;case ioe:s=(t.x-i.x)/(r.x-i.x),a=t.x,c=i.y+(r.y-i.y)*s;break;case roe:s=(e.y-i.y)/(r.y-i.y),a=i.x+(r.x-i.x)*s,c=e.y;break;default:s=(t.y-i.y)/(r.y-i.y),a=i.x+(r.x-i.x)*s,c=t.y;break}return h.fromElements(a,c,s,o)}var P1t={length:0,coordinates:[new U,new U,new U,new U,new U,new U],barycentricCoordinates:[new h,new h,new h,new h,new h,new h]};function D1t(e,t,n,i,r,o,s,a){let c,u=v1t,f=C1t,d=3,p=w1t;U.clone(r,p[0]),U.clone(o,p[1]),U.clone(s,p[2]);let g=S1t;h.fromElements(1,0,0,g[0]),h.fromElements(0,1,0,g[1]),h.fromElements(0,0,1,g[2]);for(let m=0;m<t;m++){let y=(e+m)%T1t,A=u,b=f;u=p,f=g,c=d,p=A,g=b,d=0;let x=c-1,T=u[x],E=f[x],v=sMe(n,i,y,T);for(let S=0;S<c;S++){let I=u[S],R=f[S],O=sMe(n,i,y,I);if(v*O===-1){let L=I1t(n,i,y,T,I,E1t),{x:_,y:C,z:w}=L,P=1-w,M=E.x*P+R.x*w,F=E.y*P+R.y*w,V=E.z*P+R.z*w;U.fromElements(_,C,p[d]),h.fromElements(M,F,V,g[d]),d++}O>=0&&(U.clone(I,p[d]),h.clone(R,g[d]),d++),T=I,E=R,v=O}if(d===0)break}a.length=d;for(let m=0;m<d;m++)U.clone(p[m],a.coordinates[m]),h.clone(g[m],a.barycentricCoordinates[m]);return a}function R1t(e,t,n,i,r,o,s,a){return D1t(e?t?roe:noe:t?ioe:x1t,2,n,i,r,o,s,a)}var O1t=[[],[0],[1],[0,1],[2],[0,2],[1,2],[0,1,2]];function M1t(e,t,n,i,r,o,s,a,c,u,f,d,p,g,m){let y={},A=e?.5:0,b=e?1:.5,x=t?.5:0,T=t?1:.5,E=jDt;E.x=A,E.y=x;let v=HDt;v.x=b,v.y=T;let S=0;for(let I=0;I<n;I+=3){let R=i[I+0],O=i[I+1],L=i[I+2],_=s.decodeTextureCoordinates(o,R,WDt),C=s.decodeTextureCoordinates(o,O,qDt),w=s.decodeTextureCoordinates(o,L,YDt),P=R1t(e,t,E,v,_,C,w,P1t),M=P.length;if(M<3)continue;let F=GDt;for(let k=0;k<M;k++){let G=P.barycentricCoordinates[k],q=G.x,Q=G.y,W=G.z,J=Math.ceil(q)|Math.ceil(Q)<<1|Math.ceil(W)<<2,Z=O1t[J],ae,Ae=!1;if(Z.length===1){let fe=Z[0],ge=i[I+fe];ae=y[ge],ae===void 0&&(Ae=!0,ae=S++,y[ge]=ae)}else if(Z.length===2){let fe=Z[0],xe=Z[1],ge=i[I+fe],we=i[I+xe],Se=P.barycentricCoordinates[(k+M-1)%M],Re=Math.ceil(Se.x)|Math.ceil(Se.y)<<1|Math.ceil(Se.z)<<2,Qe=J===Re,He=Math.min(ge,we),Xe=Math.max(ge,we),$e=r+2*(He*r+Xe),Pe=$e+0,qe=$e+1,st=y[Pe],vt=y[qe],Gt=!Qe==(st===void 0||vt===void 0);if(ae=Gt?st:vt,ae===void 0){Ae=!0,ae=S++;let lt=Gt?Pe:qe;y[lt]=ae}}else Ae=!0,ae=S++;if(F[k]=ae,Ae){let fe=I/3;p.push(fe);let xe=P.coordinates[k],ge=(xe.x-A)/(b-A),we=(xe.y-x)/(T-x);m.push(ge,we),g.push(q,Q),ge===0?c.push(ae):ge===1&&f.push(ae),we===0?u.push(ae):we===1&&d.push(ae)}}let V=F[0],B=F[1],j=F[2];a.push(V,B,j);for(let k=3;k<M;k++)B=j,j=F[k],a.push(V,B,j)}c.sort(function(I,R){return m[I*2+1]-m[R*2+1]}),u.sort(function(I,R){return m[R*2+0]-m[I*2+0]}),f.sort(function(I,R){return m[R*2+1]-m[I*2+1]}),d.sort(function(I,R){return m[I*2+0]-m[R*2+0]})}var uP=toe;var p7={};p7.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,r,o){l(o)?o.length=0:o=[];let s,a,c;t?(s=n<e,a=i<e,c=r<e):(s=n>e,a=i>e,c=r>e);let u=s+a+c,f,d,p,g,m,y;return u===1?s?(f=(e-n)/(i-n),d=(e-n)/(r-n),o.push(1),o.push(2),d!==1&&(o.push(-1),o.push(0),o.push(2),o.push(d)),f!==1&&(o.push(-1),o.push(0),o.push(1),o.push(f))):a?(p=(e-i)/(r-i),g=(e-i)/(n-i),o.push(2),o.push(0),g!==1&&(o.push(-1),o.push(1),o.push(0),o.push(g)),p!==1&&(o.push(-1),o.push(1),o.push(2),o.push(p))):c&&(m=(e-r)/(n-r),y=(e-r)/(i-r),o.push(0),o.push(1),y!==1&&(o.push(-1),o.push(2),o.push(1),o.push(y)),m!==1&&(o.push(-1),o.push(2),o.push(0),o.push(m))):u===2?!s&&n!==e?(g=(e-i)/(n-i),m=(e-r)/(n-r),o.push(0),o.push(-1),o.push(1),o.push(0),o.push(g),o.push(-1),o.push(2),o.push(0),o.push(m)):!a&&i!==e?(y=(e-r)/(i-r),f=(e-n)/(i-n),o.push(1),o.push(-1),o.push(2),o.push(1),o.push(y),o.push(-1),o.push(0),o.push(1),o.push(f)):!c&&r!==e&&(d=(e-n)/(r-n),p=(e-i)/(r-i),o.push(2),o.push(-1),o.push(0),o.push(2),o.push(d),o.push(-1),o.push(1),o.push(2),o.push(p)):u!==3&&(o.push(0),o.push(1),o.push(2)),o};p7.computeBarycentricCoordinates=function(e,t,n,i,r,o,s,a,c){let u=n-s,f=s-r,d=o-a,p=i-a,g=1/(d*u+f*p),m=t-a,y=e-s,A=(d*y+f*m)*g,b=(-p*y+u*m)*g,x=1-A-b;return l(c)?(c.x=A,c.y=b,c.z=x,c):new h(A,b,x)};p7.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,r,o,s,a,c){let u=(s-r)*(t-o)-(a-o)*(e-r),f=(n-e)*(t-o)-(i-t)*(e-r),d=(a-o)*(n-e)-(s-r)*(i-t);if(d===0)return;let p=u/d,g=f/d;if(p>=0&&p<=1&&g>=0&&g<=1)return l(c)||(c=new U),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var np=p7;function ny(e){e=e??H.EMPTY_OBJECT,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._skirtHeight=e.skirtHeight,this._boundingSphere=ue.clone(e.boundingSphere,new ue),this._orientedBoundingBox=Qt.clone(e.orientedBoundingBox,new Qt),this._horizonOcclusionPoint=h.clone(e.horizonOcclusionPoint,new h),this._hasVertexNormals=e.requestVertexNormals??!1,this._hasWaterMask=e.requestWaterMask??!1,this._hasWebMercatorT=!0,this._credits=e.credits,this._childTileMask=e.childTileMask??15,this._gltf=e.gltf,this._mesh=void 0,this._waterMask=e.waterMask}Object.defineProperties(ny.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});ny.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return i===void 0?void 0:lMe(i,e,t,n)};ny.prototype.isChildAvailable=function(e,t,n,i){let r=2;return n!==e*2&&++r,i!==t*2&&(r-=2),(this._childTileMask&1<<r)!==0};var cMe="createVerticesFromCesium3DTilesTerrain",N1t=new Jn(cMe),L1t=new Jn(cMe,uf.maximumAsynchronousTasks);ny.prototype.createMesh=function(e){e=e??H.EMPTY_OBJECT;let n=e.throttle??!0?L1t:N1t,i=e.tilingScheme,r=i.ellipsoid,o=e.x,s=e.y,a=e.level,c=i.tileXYToRectangle(o,s,a,new ie),u=this._gltf,f=n.scheduleTask({ellipsoid:r,rectangle:c,hasVertexNormals:this._hasVertexNormals,hasWaterMask:this._hasWaterMask,hasWebMercatorT:this._hasWebMercatorT,gltf:u,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight});if(!l(f))return;let d=this;return Promise.resolve(f).then(function(p){let g=p,m=Co.clone(g.encoding,new Co),y=new Float32Array(g.verticesBuffer),A=y.length/m.stride,b=g.vertexCountWithoutSkirts,x=A<=65535?Uint16Array:Uint32Array,T=new x(g.indicesBuffer),E=new x(g.westIndicesBuffer),v=new x(g.eastIndicesBuffer),S=new x(g.southIndicesBuffer),I=new x(g.northIndicesBuffer),R=g.indexCountWithoutSkirts,O=d._minimumHeight,L=d._maximumHeight,_=h.clone(m.center,new h),C=ue.clone(d._boundingSphere,new ue),w=h.clone(d._horizonOcclusionPoint,new h),P=Qt.clone(d._orientedBoundingBox,new Qt),M=new bc(_,y,T,R,b,O,L,c,C,w,m.stride,P,m,E,S,v,I);return d._mesh=M,Promise.resolve(M)})};ny.prototype._createMeshSync=function(e){e=e??H.EMPTY_OBJECT;let t=e.tilingScheme,n=t.ellipsoid,i=e.x,r=e.y,o=e.level,s=t.tileXYToRectangle(i,r,o,new ie),a=uP.createMesh({ellipsoid:n,rectangle:s,hasVertexNormals:this._hasVertexNormals,hasWebMercatorT:this._hasWebMercatorT,gltf:this._gltf,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight}),c=this;return Promise.resolve(a).then(function(u){return c._mesh=u,Promise.resolve(u)})};ny.prototype.upsample=function(e,t,n,i,r,o,s){let a=this._mesh;return a===void 0?void 0:g7(!1,a,this._skirtHeight,this._credits,e,t,n,i,r,o,s)};ny.prototype._upsampleSync=function(e,t,n,i,r,o,s){let a=this._mesh;return a===void 0?void 0:g7(!0,a,this._skirtHeight,this._credits,e,t,n,i,r,o,s)};ny.prototype.wasCreatedByUpsampling=function(){return!1};function ty(e){e=e??H.EMPTY_OBJECT,this._mesh=e.terrainMesh,this._skirtHeight=e.skirtHeight,this._credits=e.credits}ty.prototype.createMesh=function(e){return e=e??H.EMPTY_OBJECT,Promise.resolve(this._mesh)};ty.prototype.upsample=function(e,t,n,i,r,o,s){return g7(!1,this._mesh,this._skirtHeight,this._credits,e,t,n,i,r,o,s)};ty.prototype._upsampleSync=function(e,t,n,i,r,o,s){return g7(!0,this._mesh,this._skirtHeight,this._credits,e,t,n,i,r,o,s)};ty.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return lMe(i,e,t,n)};ty.prototype.wasCreatedByUpsampling=function(){return!0};ty.prototype.isChildAvailable=function(e,t,n,i){return!1};Object.defineProperties(ty.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var F1t=new Jn("upsampleVerticesFromCesium3DTilesTerrain",uf.maximumAsynchronousTasks);function g7(e,t,n,i,r,o,s,a,c,u,f){if(f-a>1)throw new pe("Upsampling through more than one level at a time is not currently supported.");let p=n*.5,g=o*2!==c,m=s*2===u,y=r.tileXYToRectangle(c,u,f,new ie),A=r.ellipsoid,b={isEastChild:g,isNorthChild:m,rectangle:y,ellipsoid:A,skirtHeight:p,parentVertices:t.vertices,parentIndices:t.indices,parentVertexCountWithoutSkirts:t.vertexCountWithoutSkirts,parentIndexCountWithoutSkirts:t.indexCountWithoutSkirts,parentMinimumHeight:t.minimumHeight,parentMaximumHeight:t.maximumHeight,parentEncoding:t.encoding};if(e){let T=uP.upsampleMesh(b),E=new ty({terrainMesh:T,skirtHeight:p,credits:i});return Promise.resolve(E)}let x=F1t.scheduleTask(b);if(x!==void 0)return x.then(function(T){let E=Co.clone(T.encoding,new Co),v=E.stride,S=new Float32Array(T.verticesBuffer),I=S.length/v,R=T.vertexCountWithoutSkirts,O=I<=65535?Uint16Array:Uint32Array,L=new O(T.indicesBuffer),_=new O(T.westIndicesBuffer),C=new O(T.eastIndicesBuffer),w=new O(T.southIndicesBuffer),P=new O(T.northIndicesBuffer),M=T.indexCountWithoutSkirts,F=T.minimumHeight,V=T.maximumHeight,B=h.clone(E.center,new h),j=ue.clone(T.boundingSphere,new ue),k=h.clone(T.horizonOcclusionPoint,new h),G=Qt.clone(T.orientedBoundingBox,new Qt),q=new bc(B,S,L,M,R,F,V,y,j,k,v,G,E,_,w,C,P),Q=new ty({terrainMesh:q,skirtHeight:p,credits:i});return Promise.resolve(Q)})}var B1t=new U,k1t=new U,U1t=new U,z1t=new h;function lMe(e,t,n,i){let r=D.clamp((n-t.west)/t.width,0,1),o=D.clamp((i-t.south)/t.height,0,1),{vertices:s,encoding:a,indices:c}=e;for(let u=0;u<e.indexCountWithoutSkirts;u+=3){let f=c[u],d=c[u+1],p=c[u+2],g=a.decodeTextureCoordinates(s,f,B1t),m=a.decodeTextureCoordinates(s,d,k1t),y=a.decodeTextureCoordinates(s,p,U1t),A=Math.min(g.x,m.x,y.x),b=Math.max(g.x,m.x,y.x),x=Math.min(g.y,m.y,y.y),T=Math.max(g.y,m.y,y.y);if(r>=A&&r<=b&&o>=x&&o<=T){let E=np.computeBarycentricCoordinates(r,o,g.x,g.y,m.x,m.y,y.x,y.y,z1t);if(E.x>=0&&E.y>=0&&E.z>=0){let v=a.decodeHeight(s,f),S=a.decodeHeight(s,d),I=a.decodeHeight(s,p);return E.x*v+E.y*S+E.z*I}}}return 0}var RU=ny;function ip(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(ip.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});ip.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,r=new ip({comparator:t,maximumLength:e});r._length=i;for(let o=0;o<i;o++)r._array[o]=n[o];return r};ip.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};ip.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)uMe(this,t)};ip.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let r=this._array[0];if(this._comparator(e,r)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,uMe(this,i),t};ip.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],fMe(this,0)),this._array[e-1]=void 0,t};ip.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=ooe(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&fMe(this,n)}return this._array[e-1]=void 0,t};ip.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};ip.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[ooe(this,1,2)?1:2]};function _7(e,t,n){let i=e._array,r=i[t];i[t]=i[n],i[n]=r}function OU(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function ooe(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function uMe(e,t){if(t===0)return;let n=Math.floor(D.log2(t+1))%2===0,i=Math.floor((t-1)/2),r=OU(e,t,i);for(r!==n&&(_7(e,t,i),t=i);t>=3;){let o=Math.floor((t-3)/4);if(OU(e,t,o)!==r)break;_7(e,t,o),t=o}}function fMe(e,t){let n=e._length,i=Math.floor(D.log2(t+1))%2===0,r;for(;(r=2*t+1)<n;){let o=r,s=r+1;if(s<n){OU(e,s,o)===i&&(o=s);let a=2*r+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;OU(e,f,o)===i&&(o=f)}}if(OU(e,o,t)===i&&(_7(e,o,t),o!==r&&o!==s)){let a=Math.floor((o-1)/2);ooe(e,o,a)===i&&_7(e,o,a)}t=o}}var iy=ip;function O0(e){e=e??H.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._tileCredits=void 0,this._errorEvent=new be,this._ellipsoid=e.ellipsoid??ee.WGS84,this._tilingScheme=new er({ellipsoid:this._ellipsoid}),this._subtreeCache=new QE({provider:this}),this._tileset0=void 0,this._tileset1=void 0,this._resource=void 0,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1}O0.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e),i;try{i=await n.fetchJson()}catch(f){throw new oe("Could not load tileset JSON",f)}let r=new O0(t);r._tileCredits=n.credits,r._resource=n;let o=i.root.children,s=o[0],a=o[1],c=i.schema,u=$l.fromJson(c);return r._tileset0=new r0(n,s,u),r._tileset1=new r0(n,a,u),r};O0.fromIonAssetId=async function(e,t){let n=await Ho.fromAssetId(e);return O0.fromUrl(n,t)};var V1t=new Array(3);O0.prototype.requestTileGeometry=async function(e,t,n,i){let r=hMe(n,e),o=r===0?this._tileset0:this._tileset1,s=mMe(o,n,e,t),a=s.getSubtreeCoordinates(),c=this._subtreeCache,u=c.find(r,a),f=this._requestWaterMask,d=this,p;if(u===void 0){let x=o.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()});p=o.baseResource.getDerivedResource({url:x.url}).fetchArrayBuffer().then(async function(E){if(u=c.find(r,a),u===void 0){let v=new Uint8Array(E);u=await Lg.fromSubtreeJson(d._resource,void 0,v,o,a),c.addSubtree(r,u)}return u})}else p=Promise.resolve(u);let g=o.contentUriTemplates[0].getDerivedResource({templateValues:s.getTemplateValues()}),m=o.baseResource.getDerivedResource({url:g.url}),y=m.fetchArrayBuffer();if(y===void 0)return;let A=y.then(x=>iT(new Uint8Array(x))),b=V1t;b[0]=p,b[1]=A,b[2]=f?A.then(x=>j1t(x,m)):void 0;try{let x=await Promise.all(b),T=x[0],E=x[1],v=x[2],S=T.getTileMetadataView(s),I=S.getPropertyBySemantic(Ud.TILE_MINIMUM_HEIGHT),R=S.getPropertyBySemantic(Ud.TILE_MAXIMUM_HEIGHT),O=S.getPropertyBySemantic(Ud.TILE_BOUNDING_SPHERE),L=ue.unpack(O,0,new ue),_=S.getPropertyBySemantic(Ud.TILE_HORIZON_OCCLUSION_POINT),w=d._tilingScheme.tileXYToRectangle(e,t,n,new ie),P=d._ellipsoid,M=Qt.fromRectangle(w,I,R,P,new Qt),F=d.getLevelMaximumGeometricError(n)*5,V=y7(o,T,s,0,0),B=y7(o,T,s,1,0),j=y7(o,T,s,0,1),k=y7(o,T,s,1,1),G=(V?1:0)|(B?2:0)|(j?4:0)|(k?8:0),q=new RU({gltf:E,minimumHeight:I,maximumHeight:R,boundingSphere:L,orientedBoundingBox:M,horizonOcclusionPoint:_,skirtHeight:F,requestVertexNormals:d._requestVertexNormals,childTileMask:G,credits:d._tileCredits,waterMask:v});return Promise.resolve(q)}catch(x){console.log(`Could not load subtree: ${r} ${a.level} ${a.x} ${a.y}: ${x}`),console.log(`Could not load tile: ${r} ${s.level} ${s.x} ${s.y}: ${x}`);return}};O0.prototype.getTileDataAvailable=function(e,t,n){let i=this._subtreeCache,r=hMe(n,e),o=r===0?this._tileset0:this._tileset1,s=mMe(o,n,e,t),a=s.getSubtreeCoordinates(),c=i.find(r,a);if(c!==void 0)return c.tileIsAvailableAtCoordinates(s);if(a.isImplicitTilesetRoot())return s.isSubtreeRoot()?!0:void 0;let u=a.getParentSubtreeCoordinates(),f=i.find(r,u);if(f!==void 0)return f.childSubtreeIsAvailableAtCoordinates(a)?s.isSubtreeRoot()?!0:void 0:!1};function hMe(e,t){let n=1<<e;return t/n|0}function mMe(e,t,n,i){let r=1<<t,o=t,s=n%r,a=r-i-1,{subdivisionScheme:c,subtreeLevels:u}=e;return new o0({subdivisionScheme:c,subtreeLevels:u,level:o,x:s,y:a})}async function j1t(e,t){let n=e.extensions?.EXT_structural_metadata;if(!l(n)||!l(n.propertyTextures))return;let i=new aA({schema:n.schema});await i.load();let r=i.schema,o,s;if(l(r.classes)){for(let g in r.classes)if(r.classes.hasOwnProperty(g)&&(o=r.classes[g],s=o.propertiesBySemantic.WATERMASK,l(s)))break}if(!l(s))return;let a=n.propertyTextures.find(g=>g.class===o.id);if(!l(a))throw new pe(`Expected a propertyTexture with a class ${o.id}`);let c=a.properties[s.id],u=e.textures[c.index],f=e.images[u.source]?.bufferView,d=Li.getBufferViewLoader({gltf:e,bufferViewId:f,gltfResource:t,baseResource:t});return await d.load(),await Mg({uint8Array:new Uint8Array(d.typedArray),format:"image/png",flipY:!1,skipColorSpaceConversion:!0})}function y7(e,t,n,i,r){let o=n.isBottomOfSubtree(),a=soe(e,1,i,r),c=n.getDescendantCoordinates(a);return o?t.childSubtreeIsAvailableAtCoordinates(c):t.tileIsAvailableAtCoordinates(c)}function soe(e,t,n,i){let{subdivisionScheme:r,subtreeLevels:o}=e;return new o0({subdivisionScheme:r,subtreeLevels:o,level:t,x:n,y:i})}O0.prototype.loadTileDataAvailability=function(e,t,n){};O0.prototype.getLevelMaximumGeometricError=function(e){let t=this._ellipsoid;return Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(t,64,2)/(1<<e)};Object.defineProperties(O0.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._requestWaterMask}},hasVertexNormals:{get:function(){return this._requestVertexNormals}},availability:{get:function(){return this._subtreeCache}}});function H1t(e,t,n){this.rootId=e,this.subtree=t,this.stamp=n}function QE(e){this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new iy({comparator:QE.comparator}),this._provider=e.provider}QE.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};QE.prototype.addSubtree=function(e,t){let n=new H1t(e,t,this._subtreeRequestCounter);this._queue.insert(n),this._subtreeRequestCounter++;let i=t.implicitCoordinates;if(i.level>0){let r=i.getParentSubtreeCoordinates(),o=this.find(e,r)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==n;)this._queue.removeMinimum()};QE.prototype.find=function(e,t){let n=this._queue,i=n.internalArray,{level:r,x:o,y:s}=t;for(let a=0;a<n.length;a++){let c=i[a],u=c.rootId,f=c.subtree.implicitCoordinates;if(u===e&&f.level===r&&f.x===o&&f.y===s)return c.subtree}};QE.prototype._computeMaximumImplicitTileCoordinatesAtPosition=function(e){let{longitude:t,latitude:n}=e,i=this._provider,r=t<0?0:1,o=r===0?i._tileset0:i._tileset1,s=o.subtreeLevels,a=soe(o,0,0,0),c=this.find(r,a);if(c===void 0)return;let u=c.implicitCoordinates,f=u.x,d=u.y,p=u.level,g=-D.PI,m=+D.PI,y=D.lerp(g,m,r/2),A=D.lerp(g,m,(r+1)/2),b=-D.PI*.5,x=+D.PI*.5,T=0,E=0,v=!0;for(;v;){let I=1/(1<<p),R=(A-y)*I,O=y+f*R,L=(x-b)*I,_=b+d*L;T=(t-O)/R,E=(n-_)/L;let C=dMe(o,u,T,E,s);if(c.childSubtreeIsAvailableAtCoordinates(C)){let w=this.find(r,C);if(w!==void 0)c=w,u=c.implicitCoordinates,f=u.x,d=u.y,p=u.level;else return C}else v=!1}let S;for(let I=0;I<s;I++){let R=dMe(o,u,T,E,I);if(c.tileIsAvailableAtCoordinates(R))S=R;else break}return S};function dMe(e,t,n,i,r){let o=1<<r,s=D.clamp(n*o|0,0,o-1),a=D.clamp(i*o|0,0,o-1),c=soe(e,r,s,a);return t.getDescendantCoordinates(c)}QE.prototype.computeMaximumLevelAtPosition=function(e){let t=this._computeMaximumImplicitTileCoordinatesAtPosition(e);return t===void 0?0:t.level};var aoe=O0;function Sb(e){e=e??H.EMPTY_OBJECT,this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function r(s,a){return i[s]-i[a]}function o(s,a){return n[s]-n[a]}this._westIndices=b7(e.westIndices,r,t),this._southIndices=b7(e.southIndices,o,t),this._eastIndices=b7(e.eastIndices,r,t),this._northIndices=b7(e.northIndices,o,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=e.childTileMask??15,this._createdByUpsampling=e.createdByUpsampling??!1,this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(Sb.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var A7=[];function b7(e,t,n){A7.length=e.length;let i=!1;for(let r=0,o=e.length;r<o;++r)A7[r]=e[r],i=i||r>0&&t(e[r-1],e[r])>0;return i?(A7.sort(t),je.createTypedArray(n,A7)):e}var pMe="createVerticesFromQuantizedTerrainMesh",G1t=new Jn(pMe),W1t=new Jn(pMe,uf.maximumAsynchronousTasks);Sb.prototype.createMesh=function(e){e=e??H.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,r=e.level,o=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToRectangle(n,i,r),d=(a?W1t:G1t).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:o,exaggerationRelativeHeight:s});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(g){let m=p._quantizedVertices.length/3,y=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,A=je.createTypedArray(y,g.indices),b=new Float32Array(g.vertices),x=g.center,T=g.minimumHeight,E=g.maximumHeight,v=p._boundingSphere,S=p._orientedBoundingBox,I=h.clone(g.occludeePointInScaledSpace)??p._horizonOcclusionPoint,R=g.vertexStride,O=Co.clone(g.encoding);return p._mesh=new bc(x,b,A,g.indexCountWithoutSkirts,m,T,E,u,v,I,R,S,O,g.westIndicesSouthToNorth,g.southIndicesEastToWest,g.eastIndicesNorthToSouth,g.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var q1t=new Jn("upsampleQuantizedTerrainMesh",uf.maximumAsynchronousTasks);Sb.prototype.upsample=function(e,t,n,i,r,o,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==r,u=n*2===o,f=e.ellipsoid,d=e.tileXYToRectangle(r,o,s),p=q1t.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let g=Math.min(this._westSkirtHeight,this._eastSkirtHeight);g=Math.min(g,this._southSkirtHeight),g=Math.min(g,this._northSkirtHeight);let m=c?g*.5:this._westSkirtHeight,y=u?g*.5:this._southSkirtHeight,A=c?this._eastSkirtHeight:g*.5,b=u?this._northSkirtHeight:g*.5,x=this._credits;return Promise.resolve(p).then(function(T){let E=new Uint16Array(T.vertices),v=je.createTypedArray(E.length/3,T.indices),S;return l(T.encodedNormals)&&(S=new Uint8Array(T.encodedNormals)),new Sb({quantizedVertices:E,indices:v,encodedNormals:S,minimumHeight:T.minimumHeight,maximumHeight:T.maximumHeight,boundingSphere:ue.clone(T.boundingSphere),orientedBoundingBox:Qt.clone(T.orientedBoundingBox),horizonOcclusionPoint:h.clone(T.horizonOcclusionPoint),westIndices:T.westIndices,southIndices:T.southIndices,eastIndices:T.eastIndices,northIndices:T.northIndices,westSkirtHeight:m,southSkirtHeight:y,eastSkirtHeight:A,northSkirtHeight:b,childTileMask:0,credits:x,createdByUpsampling:!0})})};var coe=32767,gMe=new h;Sb.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1);i*=coe;let r=D.clamp((n-e.south)/e.height,0,1);return r*=coe,l(this._mesh)?$1t(this,i,r):J1t(this,i,r)};function _Me(e,t,n,i,r,o,s,a){let c=Math.min(n,r,s),u=Math.max(n,r,s),f=Math.min(i,o,a),d=Math.max(i,o,a);return e>=c&&e<=u&&t>=f&&t<=d}var Y1t=new U,X1t=new U,K1t=new U;function $1t(e,t,n){let i=e._mesh,r=i.vertices,o=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=o.decodeTextureCoordinates(r,u,Y1t),g=o.decodeTextureCoordinates(r,f,X1t),m=o.decodeTextureCoordinates(r,d,K1t);if(_Me(t,n,p.x,p.y,g.x,g.y,m.x,m.y)){let y=np.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,gMe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let A=o.decodeHeight(r,u),b=o.decodeHeight(r,f),x=o.decodeHeight(r,d);return y.x*A+y.y*b+y.z*x}}}}function J1t(e,t,n){let i=e._uValues,r=e._vValues,o=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=i[u],g=i[f],m=i[d],y=r[u],A=r[f],b=r[d];if(_Me(t,n,p,y,g,A,m,b)){let x=np.computeBarycentricCoordinates(t,n,p,y,g,A,m,b,gMe);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let T=x.x*o[u]+x.y*o[f]+x.z*o[d];return D.lerp(e._minimumHeight,e._maximumHeight,T/coe)}}}}Sb.prototype.isChildAvailable=function(e,t,n,i){let r=2;return n!==e*2&&++r,i!==t*2&&(r-=2),(this._childTileMask&1<<r)!==0};Sb.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var eC=Sb;function Z1t(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function AMe(e){this.requestVertexNormals=e.requestVertexNormals??!1,this.requestWaterMask=e.requestWaterMask??!1,this.requestMetadata=e.requestMetadata??!0,this.ellipsoid=e.ellipsoid??ee.default,this.heightmapWidth=65,this.heightmapStructure=void 0,this.hasWaterMask=!1,this.hasMetadata=!1,this.hasVertexNormals=!1,this.scheme=void 0,this.lastResource=void 0,this.layerJsonResource=void 0,this.previousError=void 0,this.availability=void 0,this.tilingScheme=void 0,this.levelZeroMaximumGeometricError=void 0,this.heightmapStructure=void 0,this.layers=[],this.attribution="",this.overallAvailability=[],this.overallMaxZoom=0,this.tileCredits=[]}AMe.prototype.build=function(e){e._heightmapWidth=this.heightmapWidth,e._scheme=this.scheme;let t=l(this.lastResource.credits)?this.lastResource.credits:[];e._tileCredits=t.concat(this.tileCredits),e._availability=this.availability,e._tilingScheme=this.tilingScheme,e._requestWaterMask=this.requestWaterMask,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._heightmapStructure=this.heightmapStructure,e._layers=this.layers,e._hasWaterMask=this.hasWaterMask,e._hasVertexNormals=this.hasVertexNormals,e._hasMetadata=this.hasMetadata};async function bMe(e,t,n){if(!t.format){let y="The tile format is not specified in the layer.json file.";throw e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new oe(y)}if(!t.tiles||t.tiles.length===0){let y="The layer.json file does not specify any tile URL templates.";throw e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new oe(y)}let i=!1,r=!1,o=!1,s=!0,a=!1;if(t.format==="heightmap-1.0")a=!0,l(e.heightmapStructure)||(e.heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),r=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let y=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new oe(y)}let c=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new er({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new Lo({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new oe(y)}if(e.levelZeroMaximumGeometricError=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let y=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new oe(y)}let f;l(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:l(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,s=!1),l(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(r=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(o=!0);let d=t.metadataAvailability,p=t.available,g;if(l(p)&&!l(d)){g=new tp(e.tilingScheme,p.length);for(let y=0;y<p.length;++y){let A=p[y],b=e.tilingScheme.getNumberOfYTilesAtLevel(y);l(e.overallAvailability[y])||(e.overallAvailability[y]=[]);for(let x=0;x<A.length;++x){let T=A[x],E=b-T.endY-1,v=b-T.startY-1;e.overallAvailability[y].push([T.startX,E,T.endX,v]),g.addAvailableTileRange(y,T.startX,E,T.endX,v)}}}else l(d)&&(f=new tp(e.tilingScheme,u),g=new tp(e.tilingScheme,u),e.overallAvailability[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||r,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||o,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new Z1t({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:g,hasVertexNormals:i,hasWaterMask:r,hasMetadata:o,availabilityLevels:d,availabilityTilesLoaded:f,littleEndianExtensionSize:s}));let m=t.parentUrl;return l(m)?l(g)?(e.lastResource=e.lastResource.getDerivedResource({url:m}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await foe(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function Q1t(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=`
${t.message}`),e.previousError=Zr.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return foe(e,n);throw new oe(i)}async function eRt(e,t,n){await bMe(e,t,n);let i=e.overallAvailability.length;if(i>0){let r=e.availability=new tp(e.tilingScheme,e.overallMaxZoom);for(let o=0;o<i;++o){let s=e.overallAvailability[o];for(let a=0;a<s.length;++a){let c=s[a];r.addAvailableTileRange(o,c[0],c[1],c[2],c[3])}}}if(e.attribution.length>0){let r=new It(e.attribution);e.tileCredits.push(r)}return!0}async function foe(e,t){try{let n=await e.layerJsonResource.fetchJson();return eRt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await bMe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):Q1t(e,n,t)}}function rp(e){e=e??H.EMPTY_OBJECT,this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1,this._requestMetadata=e.requestMetadata??!0,this._errorEvent=new be;let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._availability=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._layers=void 0,this._tileCredits=void 0}var loe={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function yMe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function tRt(e,t,n,i,r){let o=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new jc({buffer:o,childTileMask:new Uint8Array(t,o.byteLength,1)[0],waterMask:new Uint8Array(t,o.byteLength+1,t.byteLength-o.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function nRt(e,t,n,i,r,o){let s=o.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,g=Uint16Array.BYTES_PER_ELEMENT*3,m=3,y=Uint16Array.BYTES_PER_ELEMENT,A=y*m,b=new DataView(t),x=new h(b.getFloat64(a,!0),b.getFloat64(a+8,!0),b.getFloat64(a+16,!0));a+=f;let T=b.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let E=b.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let v=new ue(new h(b.getFloat64(a,!0),b.getFloat64(a+8,!0),b.getFloat64(a+16,!0)),b.getFloat64(a+f,!0));a+=d;let S=new h(b.getFloat64(a,!0),b.getFloat64(a+8,!0),b.getFloat64(a+16,!0));a+=f;let I=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let R=new Uint16Array(t,a,I*3);a+=I*g,I>64*1024&&(y=Uint32Array.BYTES_PER_ELEMENT,A=y*m);let O=R.subarray(0,I),L=R.subarray(I,2*I),_=R.subarray(I*2,3*I);cn.zigZagDeltaDecode(O,L,_),a%y!==0&&(a+=y-a%y);let C=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let w=je.createTypedArrayFromArrayBuffer(I,t,a,C*m);a+=C*A;let P=0,M=w.length;for(let fe=0;fe<M;++fe){let xe=w[fe];w[fe]=P-xe,xe===0&&++P}let F=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let V=je.createTypedArrayFromArrayBuffer(I,t,a,F);a+=F*y;let B=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let j=je.createTypedArrayFromArrayBuffer(I,t,a,B);a+=B*y;let k=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let G=je.createTypedArrayFromArrayBuffer(I,t,a,k);a+=k*y;let q=b.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Q=je.createTypedArrayFromArrayBuffer(I,t,a,q);a+=q*y;let W,J;for(;a<b.byteLength;){let fe=b.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let xe=b.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,fe===loe.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,a,I*2);else if(fe===loe.WATER_MASK&&e._requestWaterMask)J=new Uint8Array(t,a,xe);else if(fe===loe.METADATA&&e._requestMetadata){let ge=b.getUint32(a,!0);if(ge>0){let Se=Ro(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(Se))for(let Re=0;Re<Se.length;++Re){let Qe=n+Re+1,He=Se[Re],Xe=e._tilingScheme.getNumberOfYTilesAtLevel(Qe);for(let $e=0;$e<He.length;++$e){let Pe=He[$e],qe=Xe-Pe.endY-1,st=Xe-Pe.startY-1;e.availability.addAvailableTileRange(Qe,Pe.startX,qe,Pe.endX,st),o.availability.addAvailableTileRange(Qe,Pe.startX,qe,Pe.endX,st)}}}o.availabilityTilesLoaded.addAvailableTileRange(n,i,r,i,r)}a+=xe}let Z=e.getLevelMaximumGeometricError(n)*5,ae=e._tilingScheme.tileXYToRectangle(i,r,n),Ae=Qt.fromRectangle(ae,T,E,e._tilingScheme.ellipsoid);return new eC({center:x,minimumHeight:T,maximumHeight:E,boundingSphere:v,orientedBoundingBox:Ae,horizonOcclusionPoint:S,quantizedVertices:R,encodedNormals:W,indices:w,westIndices:V,southIndices:j,eastIndices:G,northIndices:Q,westSkirtHeight:Z,southSkirtHeight:Z,eastSkirtHeight:Z,northSkirtHeight:Z,childTileMask:e.availability.computeChildMaskForTile(n,i,r),waterMask:J,credits:e._tileCredits})}rp.prototype.requestTileGeometry=function(e,t,n,i){let r=this._layers,o,s=r.length,a=!1,c=Promise.resolve();if(s===1)o=r[0];else for(let u=0;u<s;++u){let f=r[u];if(!l(f.availability)||f.availability.isTileAvailable(n,e,t)){o=f;break}let d=doe(this,e,t,n,f,u===0);d.result&&(a=!0,c=c.then(()=>d.promise))}return!l(o)&&a?c.then(()=>new Promise(u=>{setTimeout(()=>{let f=this.requestTileGeometry(e,t,n,i);u(f)},0)})):xMe(this,e,t,n,o,i)};function xMe(e,t,n,i,r,o){if(!l(r))return Promise.reject(new oe("Terrain tile doesn't exist"));let s=r.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&r.hasVertexNormals&&c.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&c.push("watermask"),e._requestMetadata&&r.hasMetadata&&c.push("metadata");let u,f,d=s[(t+a+i)%s.length],p=r.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=yMe(void 0)):u=yMe(c);let g=p.getDerivedResource({url:d,templateValues:{version:r.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:o}).fetchArrayBuffer();if(l(g))return g.then(function(m){return l(m)?l(e._heightmapStructure)?tRt(e,m,i,t,n):nRt(e,m,i,t,n,r):Promise.reject(new oe("Mesh buffer doesn't exist."))})}Object.defineProperties(rp.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});rp.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};rp.fromIonAssetId=async function(e,t){let n=await Ho.fromAssetId(e);return rp.fromUrl(n,t)};rp.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT,e=await Promise.resolve(e);let n=De.createIfNeeded(e);n.appendForwardSlash();let i=new AMe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await foe(i);let r=new rp(t);return i.build(r),r};rp.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,r=i.length;for(let o=0;o<r;++o)if(doe(this,e,t,n,i[o],o===0).result)return;return!1};rp.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,r=i.length;for(let o=0;o<r;++o){let s=doe(this,e,t,n,i[o],o===0);if(l(s.promise))return s.promise}};function uoe(e,t,n,i){if(i===0)return;let r=e.availabilityLevels,o=i%r===0?i-r:(i/r|0)*r,s=1<<i-o,a=t/s|0,c=n/s|0;return{level:o,x:a,y:c}}function doe(e,t,n,i,r,o){if(!l(r.availabilityLevels))return{result:!1};let s,a=function(){delete r.availabilityPromiseCache[s]},c=r.availabilityTilesLoaded,u=r.availability,f=uoe(r,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!o&&(s=`${f.level}-${f.x}-${f.y}`,d=r.availabilityPromiseCache[s],!l(d))){let p=new wo({throttle:!1,throttleByServer:!0,type:Zs.TERRAIN});d=xMe(e,f.x,f.y,f.level,r,p),l(d)&&(r.availabilityPromiseCache[s]=d,d.then(a))}return{result:!0,promise:d}}f=uoe(r,f.x,f.y,f.level)}return{result:!1}}rp._getAvailabilityTile=uoe;var tC=rp;function ry(e){e=e??H.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new mu(n),this._workerName="createCircleGeometry"}ry.packedLength=mu.packedLength;ry.pack=function(e,t,n){return mu.pack(e._ellipseGeometry,t,n)};var TMe=new mu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Hc={center:new h,radius:void 0,ellipsoid:ee.clone(ee.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Be,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};ry.unpack=function(e,t,n){let i=mu.unpack(e,t,TMe);return Hc.center=h.clone(i._center,Hc.center),Hc.ellipsoid=ee.clone(i._ellipsoid,Hc.ellipsoid),Hc.ellipsoid=ee.clone(i._ellipsoid,TMe._ellipsoid),Hc.height=i._height,Hc.extrudedHeight=i._extrudedHeight,Hc.granularity=i._granularity,Hc.vertexFormat=Be.clone(i._vertexFormat,Hc.vertexFormat),Hc.stRotation=i._stRotation,Hc.shadowVolume=i._shadowVolume,l(n)?(Hc.semiMajorAxis=i._semiMajorAxis,Hc.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new mu(Hc),n):(Hc.radius=i._semiMajorAxis,new ry(Hc))};ry.createGeometry=function(e){return mu.createGeometry(e._ellipseGeometry)};ry.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,r=e._ellipseGeometry._ellipsoid,o=t(i,r),s=n(i,r);return new ry({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:r,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:o,height:s,vertexFormat:Be.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(ry.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var hoe=ry;function fP(e){e=e??H.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Qf(n),this._workerName="createCircleOutlineGeometry"}fP.packedLength=Qf.packedLength;fP.pack=function(e,t,n){return Qf.pack(e._ellipseGeometry,t,n)};var iRt=new Qf({center:new h,semiMajorAxis:1,semiMinorAxis:1}),ld={center:new h,radius:void 0,ellipsoid:ee.clone(ee.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};fP.unpack=function(e,t,n){let i=Qf.unpack(e,t,iRt);return ld.center=h.clone(i._center,ld.center),ld.ellipsoid=ee.clone(i._ellipsoid,ld.ellipsoid),ld.height=i._height,ld.extrudedHeight=i._extrudedHeight,ld.granularity=i._granularity,ld.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(ld.semiMajorAxis=i._semiMajorAxis,ld.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Qf(ld),n):(ld.radius=i._semiMajorAxis,new fP(ld))};fP.createGeometry=function(e){return Qf.createGeometry(e._ellipseGeometry)};var moe=fP;function rRt(e,t){let n=document.createElement("canvas");n.width=t,n.height=1;let i=n.getContext("2d"),r=i.createLinearGradient(0,0,n.width,0),o=1/(e.length-1);for(let c=0;c<e.length;c++){let u=e[c],f=c*o,d=u.toCssColorString();r.addColorStop(f,d)}i.fillStyle=r,i.fillRect(0,0,n.width,n.height);let s=i.getImageData(0,0,n.width,n.height);return new Uint8Array(s.data.buffer)}var MU=rRt;function oRt(e){return e=e??H.EMPTY_OBJECT,tC.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var NU=oRt;function sRt(e){return e=e??H.EMPTY_OBJECT,tC.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:ee.WGS84})}var nC=sRt;function dP(e){e=e??H.EMPTY_OBJECT,this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new er({ellipsoid:e.ellipsoid??ee.default})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new be;let n=e.credit;typeof n=="string"&&(n=new It(n)),this._credit=n}Object.defineProperties(dP.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});dP.prototype.requestTileGeometry=function(e,t,n,i){let r=this._callback(e,t,n);if(!l(r))return;let o=this._width,s=this._height;return Promise.resolve(r).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new jc({buffer:c,width:o,height:s})})};dP.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};dP.prototype.getTileDataAvailable=function(e,t,n){};dP.prototype.loadTileDataAvailability=function(e,t,n){};var poe=dP;var aRt=1953029805,cRt=2917034100;function goe(e,t){if(goe.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new oe("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),r=i.getUint32(0,!0);if(r===aRt||r===cRt)return t;let o=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,d=8;for(;s<c;)for(d=(d+8)%24,f=d;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^o.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^o.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(d=(d+8)%24,f=d);s<a;)i.setUint8(s,i.getUint8(s)^o.getUint8(f)),s++,f++}goe.passThroughDataForTesting=!1;var LU=goe;function EMe(e){this.proxy=e}EMe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var _oe=EMe;function hP(e){e=e??H.EMPTY_OBJECT,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new er({ellipsoid:e.ellipsoid??ee.default})),this._levelZeroMaximumGeometricError=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new be}Object.defineProperties(hP.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});hP.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new jc({buffer:new Uint8Array(256),width:16,height:16}))};hP.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};hP.prototype.getTileDataAvailable=function(e,t,n){};hP.prototype.loadTileDataAvailability=function(e,t,n){};var M0=hP;function N0(e){e=e??H.EMPTY_OBJECT,this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this._cullingVolume=new ta,this._perspectiveMatrix=new N,this._infinitePerspective=new N}function yoe(e){let{top:t,bottom:n,right:i,left:r,near:o,far:s}=e;(t!==e._top||n!==e._bottom||r!==e._left||i!==e._right||o!==e._near||s!==e._far)&&(e._left=r,e._right=i,e._top=t,e._bottom=n,e._near=o,e._far=s,e._perspectiveMatrix=N.computePerspectiveOffCenter(r,i,n,t,o,s,e._perspectiveMatrix),e._infinitePerspective=N.computeInfinitePerspectiveOffCenter(r,i,n,t,o,e._infinitePerspective))}Object.defineProperties(N0.prototype,{projectionMatrix:{get:function(){return yoe(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return yoe(this),this._infinitePerspective}}});var lRt=new h,uRt=new h,fRt=new h,dRt=new h;N0.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,r=this.top,o=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,lRt),d=uRt;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=fRt;h.multiplyByScalar(t,u,p),h.add(e,p,p);let g=dRt;h.multiplyByScalar(f,a,g),h.add(d,g,g),h.subtract(g,e,g),h.normalize(g,g),h.cross(g,n,g),h.normalize(g,g);let m=i[0];return l(m)||(m=i[0]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(f,s,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(n,g,g),h.normalize(g,g),m=i[1],l(m)||(m=i[1]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(n,o,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(f,g,g),h.normalize(g,g),m=i[2],l(m)||(m=i[2]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),h.multiplyByScalar(n,r,g),h.add(d,g,g),h.subtract(g,e,g),h.cross(g,f,g),h.normalize(g,g),m=i[3],l(m)||(m=i[3]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,g),m=i[5],l(m)||(m=i[5]=new se),m.x=g.x,m.y=g.y,m.z=g.z,m.w=-h.dot(g,p),this._cullingVolume};N0.prototype.getPixelDimensions=function(e,t,n,i,r){yoe(this);let o=1/this.near,s=this.top*o,a=2*i*n*s/t;s=this.right*o;let c=2*i*n*s/e;return r.x=c,r.y=a,r};N0.prototype.clone=function(e){return l(e)||(e=new N0),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};N0.prototype.equals=function(e){return l(e)&&e instanceof N0&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};N0.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof N0&&D.equalsEpsilon(this.right,e.right,t,n)&&D.equalsEpsilon(this.left,e.left,t,n)&&D.equalsEpsilon(this.top,e.top,t,n)&&D.equalsEpsilon(this.bottom,e.bottom,t,n)&&D.equalsEpsilon(this.near,e.near,t,n)&&D.equalsEpsilon(this.far,e.far,t,n)};var yu=N0;function ff(e){e=e??H.EMPTY_OBJECT,this._offCenterFrustum=new yu,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this.xOffset=e.xOffset??0,this._xOffset=this.xOffset,this.yOffset=e.yOffset??0,this._yOffset=this.yOffset}ff.packedLength=6;ff.pack=function(e,t,n){return n=n??0,t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};ff.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ff),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function op(e){if(!(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset))return;e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset;let n=e._offCenterFrustum;n.top=e.near*Math.tan(.5*e._fovy),n.bottom=-n.top,n.right=e.aspectRatio*n.top,n.left=-n.right,n.near=e.near,n.far=e.far,n.right+=e.xOffset,n.left+=e.xOffset,n.top+=e.yOffset,n.bottom+=e.yOffset}Object.defineProperties(ff.prototype,{projectionMatrix:{get:function(){return op(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return op(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return op(this),this._fovy}},sseDenominator:{get:function(){return op(this),this._sseDenominator}},offCenterFrustum:{get:function(){return op(this),this._offCenterFrustum}}});ff.prototype.computeCullingVolume=function(e,t,n){return op(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};ff.prototype.getPixelDimensions=function(e,t,n,i,r){return op(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,r)};ff.prototype.clone=function(e){return l(e)||(e=new ff),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};ff.prototype.equals=function(e){return!l(e)||!(e instanceof ff)?!1:(op(this),op(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};ff.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof ff)?!1:(op(this),op(e),D.equalsEpsilon(this.fov,e.fov,t,n)&&D.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Ji=ff;var x7=0,hRt=1;function iC(e){let t=e.frustum,n=e.orientation,i=e.origin,r=e.vertexFormat??Be.DEFAULT,o=e._drawNearPlane??!0,s,a;t instanceof Ji?(s=x7,a=Ji.packedLength):t instanceof gn&&(s=hRt,a=gn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Le.clone(n),this._drawNearPlane=o,this._vertexFormat=r,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Le.packedLength+Be.packedLength}iC.pack=function(e,t,n){n=n??0;let i=e._frustumType,r=e._frustum;return t[n++]=i,i===x7?(Ji.pack(r,t,n),n+=Ji.packedLength):(gn.pack(r,t,n),n+=gn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Le.pack(e._orientation,t,n),n+=Le.packedLength,Be.pack(e._vertexFormat,t,n),n+=Be.packedLength,t[n]=e._drawNearPlane?1:0,t};var mRt=new Ji,pRt=new gn,gRt=new Le,_Rt=new h,yRt=new Be;iC.unpack=function(e,t,n){t=t??0;let i=e[t++],r;i===x7?(r=Ji.unpack(e,t,mRt),t+=Ji.packedLength):(r=gn.unpack(e,t,pRt),t+=gn.packedLength);let o=h.unpack(e,t,_Rt);t+=h.packedLength;let s=Le.unpack(e,t,gRt);t+=Le.packedLength;let a=Be.unpack(e,t,yRt);t+=Be.packedLength;let c=e[t]===1;if(!l(n))return new iC({frustum:r,origin:o,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=r.clone(u),n._frustumType=i,n._origin=h.clone(o,n._origin),n._orientation=Le.clone(s,n._orientation),n._vertexFormat=Be.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function mP(e,t,n,i,r,o,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=o.x,t[e+1]=o.y,t[e+2]=o.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;r[c]=0,r[c+1]=0,r[c+2]=1,r[c+3]=0,r[c+4]=1,r[c+5]=1,r[c+6]=0,r[c+7]=1}var ARt=new $,bRt=new N,Aoe=new N,CMe=new h,vMe=new h,SMe=new h,xRt=new h,TRt=new h,ERt=new h,wb=new Array(3),FU=new Array(4);FU[0]=new se(-1,-1,1,1);FU[1]=new se(1,-1,1,1);FU[2]=new se(1,1,1,1);FU[3]=new se(-1,1,1,1);var wMe=new Array(4);for(let e=0;e<4;++e)wMe[e]=new se;iC._computeNearFarPlanes=function(e,t,n,i,r,o,s,a){let c=$.fromQuaternion(t,ARt),u=o??CMe,f=s??vMe,d=a??SMe;u=$.getColumn(c,0,u),f=$.getColumn(c,1,f),d=$.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=N.computeView(e,d,f,u,bRt),g,m,y=i.projectionMatrix;if(n===x7){let A=N.multiply(y,p,Aoe);m=N.inverse(A,Aoe)}else g=N.inverseTransformation(p,Aoe);l(m)?(wb[0]=i.near,wb[1]=i.far):(wb[0]=0,wb[1]=i.near,wb[2]=i.far);for(let A=0;A<2;++A)for(let b=0;b<4;++b){let x=se.clone(FU[b],wMe[b]);if(l(m)){x=N.multiplyByVector(m,x,x);let T=1/x.w;h.multiplyByScalar(x,T,x),h.subtract(x,e,x),h.normalize(x,x);let E=h.dot(d,x);h.multiplyByScalar(x,wb[A]/E,x),h.add(x,e,x)}else{let T=i.offCenterFrustum;l(T)&&(i=T);let E=wb[A],v=wb[A+1];x.x=(x.x*(i.right-i.left)+i.left+i.right)*.5,x.y=(x.y*(i.top-i.bottom)+i.bottom+i.top)*.5,x.z=(x.z*(E-v)-E-v)*.5,x.w=1,N.multiplyByVector(g,x,x)}r[12*A+b*3]=x.x,r[12*A+b*3+1]=x.y,r[12*A+b*3+2]=x.z}};iC.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,r=e._orientation,o=e._drawNearPlane,s=e._vertexFormat,a=o?6:5,c=new Float64Array(72);iC._computeNearFarPlanes(i,r,t,n,c);let u=24;c[u]=c[12],c[u+1]=c[13],c[u+2]=c[14],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[9],c[u+7]=c[10],c[u+8]=c[11],c[u+9]=c[21],c[u+10]=c[22],c[u+11]=c[23],u+=12,c[u]=c[15],c[u+1]=c[16],c[u+2]=c[17],c[u+3]=c[3],c[u+4]=c[4],c[u+5]=c[5],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[12],c[u+10]=c[13],c[u+11]=c[14],u+=12,c[u]=c[3],c[u+1]=c[4],c[u+2]=c[5],c[u+3]=c[15],c[u+4]=c[16],c[u+5]=c[17],c[u+6]=c[18],c[u+7]=c[19],c[u+8]=c[20],c[u+9]=c[6],c[u+10]=c[7],c[u+11]=c[8],u+=12,c[u]=c[6],c[u+1]=c[7],c[u+2]=c[8],c[u+3]=c[18],c[u+4]=c[19],c[u+5]=c[20],c[u+6]=c[21],c[u+7]=c[22],c[u+8]=c[23],c[u+9]=c[9],c[u+10]=c[10],c[u+11]=c[11],o||(c=c.subarray(12));let f=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,g=l(s.tangent)?new Float32Array(12*a):void 0,m=l(s.bitangent)?new Float32Array(12*a):void 0,y=l(s.st)?new Float32Array(8*a):void 0,A=CMe,b=vMe,x=SMe,T=h.negate(A,xRt),E=h.negate(b,TRt),v=h.negate(x,ERt);u=0,o&&(mP(u,p,g,m,y,v,A,b),u+=12),mP(u,p,g,m,y,x,T,b),u+=12,mP(u,p,g,m,y,T,v,b),u+=12,mP(u,p,g,m,y,E,v,T),u+=12,mP(u,p,g,m,y,A,x,b),u+=12,mP(u,p,g,m,y,b,x,T),l(p)&&(f.normal=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:p})),l(g)&&(f.tangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:g})),l(m)&&(f.bitangent=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:m})),l(y)&&(f.st=new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:y}))}let d=new Uint16Array(6*a);for(let p=0;p<a;++p){let g=p*6,m=p*4;d[g]=m,d[g+1]=m+1,d[g+2]=m+2,d[g+3]=m,d[g+4]=m+2,d[g+5]=m+3}return new St({attributes:f,indices:d,primitiveType:Oe.TRIANGLES,boundingSphere:ue.fromVertices(c)})};var rC=iC;var boe=0,CRt=1;function BU(e){let t=e.frustum,n=e.orientation,i=e.origin,r=e._drawNearPlane??!0,o,s;t instanceof Ji?(o=boe,s=Ji.packedLength):t instanceof gn&&(o=CRt,s=gn.packedLength),this._frustumType=o,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Le.clone(n),this._drawNearPlane=r,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Le.packedLength}BU.pack=function(e,t,n){n=n??0;let i=e._frustumType,r=e._frustum;return t[n++]=i,i===boe?(Ji.pack(r,t,n),n+=Ji.packedLength):(gn.pack(r,t,n),n+=gn.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Le.pack(e._orientation,t,n),n+=Le.packedLength,t[n]=e._drawNearPlane?1:0,t};var vRt=new Ji,SRt=new gn,wRt=new Le,IRt=new h;BU.unpack=function(e,t,n){t=t??0;let i=e[t++],r;i===boe?(r=Ji.unpack(e,t,vRt),t+=Ji.packedLength):(r=gn.unpack(e,t,SRt),t+=gn.packedLength);let o=h.unpack(e,t,IRt);t+=h.packedLength;let s=Le.unpack(e,t,wRt);t+=Le.packedLength;let a=e[t]===1;if(!l(n))return new BU({frustum:r,origin:o,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=r.clone(c),n._frustumType=i,n._origin=h.clone(o,n._origin),n._orientation=Le.clone(s,n._orientation),n._drawNearPlane=a,n};BU.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,r=e._orientation,o=e._drawNearPlane,s=new Float64Array(24);rC._computeNearFarPlanes(i,r,t,n,s);let a=new Tn({position:new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=o?2:1,d=new Uint16Array(8*(f+1)),p=o?0:1;for(;p<2;++p)c=o?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new St({attributes:a,indices:d,primitiveType:Oe.LINES,boundingSphere:ue.fromVertices(s)})};var kU=BU;function T7(){pe.throwInstantiationError()}Object.defineProperties(T7.prototype,{credit:{get:pe.throwInstantiationError}});T7.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(It.getIonCredit)};T7.prototype.geocode=pe.throwInstantiationError;var pP=T7;var IMe={SEARCH:0,AUTOCOMPLETE:1};Object.freeze(IMe);var Ib=IMe;function PMe(){pe.throwInstantiationError()}PMe.createGeometry=function(e){pe.throwInstantiationError()};var xoe=PMe;function PRt(e,t,n){let i=new Uint8ClampedArray(e.buffer),r=new ImageData(i,t,n),o=document.createElement("canvas");return o.width=t,o.height=n,o.getContext("2d").putImageData(r,0,0),o}var UU=PRt;var LRt=Qo(Toe(),1);function DRt(e,t){return(e&t)!==0}var Cl=DRt;var RRt=[1,2,4,8],DMe=15,ORt=16,MRt=64,NRt=128;function L0(e,t,n,i,r,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=r,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}L0.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new L0(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};L0.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};L0.prototype.hasSubtree=function(){return Cl(this._bits,ORt)};L0.prototype.hasImagery=function(){return Cl(this._bits,MRt)};L0.prototype.hasTerrain=function(){return Cl(this._bits,NRt)};L0.prototype.hasChildren=function(){return Cl(this._bits,DMe)};L0.prototype.hasChild=function(e){return Cl(this._bits,RRt[e])};L0.prototype.getChildBitmask=function(){return this._bits&DMe};var VU=L0;function FRt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let r=0;r<t;++r)i[r]=e.charCodeAt(r);return n}var BRt=FRt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function ud(e){this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=D.EPSILON12,this.providers={},this.key=void 0,this._resource=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={}}Object.defineProperties(ud.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});ud.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof De)&&(t=e.url);let n=De.createIfNeeded(t);n.appendForwardSlash();let i=new ud;i._resource=n;try{await kRt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(r){let o=`An error occurred while accessing ${OMe(i,"",1).url}: ${r}`;throw new oe(o)}return i};ud.tileXYToQuadKey=function(e,t,n){let i="";for(let r=n;r>=0;--r){let o=1<<r,s=0;Cl(t,o)?Cl(e,o)&&(s|=1):(s|=2,Cl(e,o)||(s|=1)),i+=s}return i};ud.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let r=i;r>=0;--r){let o=1<<r,s=+e[i-r];Cl(s,2)?Cl(s,1)||(t|=o):(n|=o,Cl(s,1)&&(t|=o))}return{x:t,y:n,level:i}};ud.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,r;for(;i.length>1;)if(r=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(r))&&(n=!1);break}else if(t===null){n=!1;break}return n};var RMe=new Jn("decodeGoogleEarthEnterprisePacket");ud.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let r=OMe(this,e,t,n).fetchArrayBuffer();if(!l(r))return;let o=this._tileInfo,s=this.key;return r.then(function(a){return RMe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(u){let f,d=-1;if(e!==""){d=e.length+1;let m=u[e];f=o[e],f._bits|=m._bits,delete u[e]}let p=Object.keys(u);p.sort(function(m,y){return m.length-y.length});let g=p.length;for(let m=0;m<g;++m){let y=p[m];if(u[y]!==null){let b=VU.clone(u[y]),x=y.length;if(x===d)b.setParent(f);else if(x>1){let T=o[y.substring(0,y.length-1)];b.setParent(T)}o[y]=b}else o[y]=null}})})};ud.prototype.populateSubtree=function(e,t,n,i){let r=ud.tileXYToQuadKey(e,t,n);return voe(this,r,i)};function voe(e,t,n){let i=e._tileInfo,r=t,o=i[r];if(l(o)&&(!o.hasSubtree()||o.hasChildren()))return o;for(;o===void 0&&r.length>1;)r=r.substring(0,r.length-1),o=i[r];let s,a=e._subtreePromises,c=a[r];if(l(c))return c.then(function(){return s=new wo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),voe(e,t,s)});if(!l(o)||!o.hasSubtree())return Promise.reject(new oe(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(r,o.cnodeVersion,n),!!l(c))return a[r]=c,c.then(function(){return s=new wo({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),voe(e,t,s)}).finally(function(){delete a[r]})}ud.prototype.getTileInformation=function(e,t,n){let i=ud.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};ud.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function OMe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var Eoe,Coe;function kRt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(Coe)){let n=Zt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;Coe=nx(n).then(function(){Eoe=window.cesiumGoogleEarthDbRootParser(LRt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return Coe.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=Eoe.EncryptedDbRootProto.decode(new Uint8Array(n)),r=i.encryptionData,o=r.byteOffset,s=o+r.byteLength,a=e.key=r.buffer.slice(o,s);r=i.dbrootData,o=r.byteOffset,s=o+r.byteLength;let c=r.buffer.slice(o,s);return RMe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=Eoe.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=i.imageryPresent??e.imageryPresent,e.protoImagery=i.protoImagery,e.terrainPresent=i.terrainPresent??e.terrainPresent,l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=a.negativeAltitudeExponentBias??e.negativeAltitudeExponentBias,e.negativeAltitudeThreshold=a.compressedNegativeAltitudeThreshold??e.negativeAltitudeThreshold}l(i.databaseVersion)&&(e._quadPacketVersion=i.databaseVersion.quadtreeVersion??e._quadPacketVersion);let r=e.providers,o=i.providerInfo??[],s=o.length;for(let a=0;a<s;++a){let c=o[a],u=c.copyrightString;l(u)&&(r[c.providerId]=new It(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=BRt})}var oy=ud;function oC(e){e=e??H.EMPTY_OBJECT,this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=e.childTileMask??15,n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=e.createdByUpsampling??!1,this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(oC.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var LMe="createVerticesFromGoogleEarthEnterpriseBuffer",URt=new Jn(LMe),zRt=new Jn(LMe,uf.maximumAsynchronousTasks),MMe=new ie,E7=new ie;oC.prototype.createMesh=function(e){e=e??H.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,r=e.level,o=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,r,MMe),t.tileXYToRectangle(n,i,r,E7);let u=c.cartographicToCartesian(ie.center(E7)),d=40075.16/(1<<r);this._skirtHeight=Math.min(d*8,1e3);let g=(a?zRt:URt).scheduleTask({buffer:this._buffer,nativeRectangle:MMe,rectangle:E7,relativeToCenter:u,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:o,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(g))return;let m=this;return g.then(function(y){return m._mesh=new bc(u,new Float32Array(y.vertices),new Uint16Array(y.indices),y.indexCountWithoutSkirts,y.vertexCountWithoutSkirts,y.minimumHeight,y.maximumHeight,E7,ue.clone(y.boundingSphere3D),h.clone(y.occludeePointInScaledSpace),y.numberOfAttributes,Qt.clone(y.orientedBoundingBox),Co.clone(y.encoding),y.westIndicesSouthToNorth,y.southIndicesEastToWest,y.eastIndicesNorthToSouth,y.northIndicesWestToEast),m._minimumHeight=y.minimumHeight,m._maximumHeight=y.maximumHeight,m._buffer=void 0,m._mesh})};oC.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1),r=D.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?WRt(this,i,r):XRt(this,i,r,e)};var VRt=new Jn("upsampleQuantizedTerrainMesh",uf.maximumAsynchronousTasks);oC.prototype.upsample=function(e,t,n,i,r,o,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==r,u=n*2===o,f=e.ellipsoid,d=e.tileXYToRectangle(r,o,s),p=VRt.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let g=this;return p.then(function(m){let y=new Uint16Array(m.vertices),A=je.createTypedArray(y.length/3,m.indices),b=g._skirtHeight;return new eC({quantizedVertices:y,indices:A,minimumHeight:m.minimumHeight,maximumHeight:m.maximumHeight,boundingSphere:ue.clone(m.boundingSphere),orientedBoundingBox:Qt.clone(m.orientedBoundingBox),horizonOcclusionPoint:h.clone(m.horizonOcclusionPoint),westIndices:m.westIndices,southIndices:m.southIndices,eastIndices:m.eastIndices,northIndices:m.northIndices,westSkirtHeight:b,southSkirtHeight:b,eastSkirtHeight:b,northSkirtHeight:b,childTileMask:0,createdByUpsampling:!0,credits:g._credits})})};oC.prototype.isChildAvailable=function(e,t,n,i){let r=2;return n!==e*2&&++r,i!==t*2&&(r-=2),(this._childTileMask&1<<r)!==0};oC.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var jRt=new U,HRt=new U,GRt=new U,FMe=new h;function WRt(e,t,n){let i=e._mesh,r=i.vertices,o=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=o.decodeTextureCoordinates(r,u,jRt),g=o.decodeTextureCoordinates(r,f,HRt),m=o.decodeTextureCoordinates(r,d,GRt),y=np.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,FMe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let A=o.decodeHeight(r,u),b=o.decodeHeight(r,f),x=o.decodeHeight(r,d);return y.x*A+y.y*b+y.z*x}}}var qRt=Uint16Array.BYTES_PER_ELEMENT,NMe=Uint32Array.BYTES_PER_ELEMENT,Soe=Int32Array.BYTES_PER_ELEMENT,YRt=Float32Array.BYTES_PER_ELEMENT,woe=Float64Array.BYTES_PER_ELEMENT;function XRt(e,t,n,i){let r=e._buffer,o=0,s=0,a=0;n>.5?(t>.5?(o=2,s=.5):o=3,a=.5):t>.5&&(o=1,s=.5);let c=new DataView(r),u=0;for(let v=0;v<o;++v)u+=c.getUint32(u,!0),u+=NMe;u+=NMe,u+=2*woe;let f=D.toRadians(c.getFloat64(u,!0)*180);u+=woe;let d=D.toRadians(c.getFloat64(u,!0)*180);u+=woe;let p=i.width/f/2,g=i.height/d/2,m=c.getInt32(u,!0);u+=Soe;let y=c.getInt32(u,!0)*3;u+=Soe,u+=Soe;let A=new Array(m),b=new Array(m),x=new Array(m),T;for(T=0;T<m;++T)A[T]=s+c.getUint8(u++)*p,b[T]=a+c.getUint8(u++)*g,x[T]=c.getFloat32(u,!0)*6371010,u+=YRt;let E=new Array(y);for(T=0;T<y;++T)E[T]=c.getUint16(u,!0),u+=qRt;for(T=0;T<y;T+=3){let v=E[T],S=E[T+1],I=E[T+2],R=A[v],O=A[S],L=A[I],_=b[v],C=b[S],w=b[I],P=np.computeBarycentricCoordinates(t,n,R,_,O,C,L,w,FMe);if(P.x>=-1e-15&&P.y>=-1e-15&&P.z>=-1e-15)return P.x*x[v]+P.y*x[S]+P.z*x[I]}}var gP=oC;var Eh={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},C7=new K;function v7(){this._terrainCache={},this._lastTidy=K.now()}v7.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:K.now()}};v7.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};v7.prototype.tidy=function(){if(K.now(C7),K.secondsDifference(C7,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let r=t[i],o=e[r];K.secondsDifference(C7,o.timestamp)>10&&delete e[r]}K.clone(C7,this._lastTidy)}};function Pb(e){e=e??H.EMPTY_OBJECT,this._tilingScheme=new er({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ie(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new v7,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new be}Object.defineProperties(Pb.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Pb.fromMetadata=function(e,t){if(!e.terrainPresent)throw new oe(`The server ${e.url} doesn't have terrain`);let n=new Pb(t);return n._metadata=e,n};var KRt=new Jn("decodeGoogleEarthEnterprisePacket");function BMe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===Eh.PARENT){i=0;for(let r=0;r<4;++r){let o=n.getTileInformationFromQuadKey(e+r.toString());l(o)&&o.hasTerrain()&&(i|=1<<r)}}return i}Pb.prototype.requestTileGeometry=function(e,t,n,i){let r=oy.tileXYToQuadKey(e,t,n),o=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(r);if(!l(a))return Promise.reject(new oe("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=Eh.UNKNOWN);let u=o.get(r);if(l(u)){let b=s.providers[a.terrainProvider];return Promise.resolve(new gP({buffer:u,childTileMask:BMe(r,a,s),credits:l(b)?[b]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(o.tidy(),a.ancestorHasTerrain){if(c===Eh.NONE)return Promise.reject(new oe("Terrain tile doesn't exist"))}else return Promise.resolve(new jc({buffer:new Uint8Array(256),width:16,height:16}));let f,d=r,p=-1;switch(c){case Eh.SELF:p=a.terrainVersion;break;case Eh.PARENT:d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),p=f.terrainVersion;break;case Eh.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),l(f)&&f.hasTerrain()&&(p=f.terrainVersion));break}if(p<0)return Promise.reject(new oe("Terrain tile doesn't exist"));let g=this._terrainPromises,m=this._terrainRequests,y,A;if(l(g[d]))y=g[d],A=m[d];else{A=i;let b=$Rt(this,d,p,A).fetchArrayBuffer();if(!l(b))return;y=b.then(function(x){return l(x)?KRt.scheduleTask({buffer:x,type:"Terrain",key:s.key},[x]).then(function(T){let E=s.getTileInformationFromQuadKey(d);E.terrainState=Eh.SELF,o.add(d,T[0]);let v=E.terrainProvider,S=T.length-1;for(let I=0;I<S;++I){let R=d+I.toString(),O=s.getTileInformationFromQuadKey(R);l(O)&&(o.add(R,T[I+1]),O.terrainState=Eh.PARENT,O.terrainProvider===0&&(O.terrainProvider=v))}}):Promise.reject(new oe("Failed to load terrain."))}),g[d]=y,m[d]=A,y=y.finally(function(){delete g[d],delete m[d]})}return y.then(function(){let b=o.get(r);if(l(b)){let x=s.providers[a.terrainProvider];return new gP({buffer:b,childTileMask:BMe(r,a,s),credits:l(x)?[x]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new oe("Failed to load terrain."))}).catch(function(b){return A.state===Ti.CANCELLED?(i.state=A.state,Promise.reject(b)):(a.terrainState=Eh.NONE,Promise.reject(b))})};Pb.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Pb.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,r=oy.tileXYToQuadKey(e,t,n),o=i.getTileInformation(e,t,n);if(o===null)return!1;if(l(o)){if(!o.ancestorHasTerrain)return!0;let s=o.terrainState;if(s===Eh.NONE)return!1;if((!l(s)||s===Eh.UNKNOWN)&&(o.terrainState=Eh.UNKNOWN,!o.hasTerrain())){r=r.substring(0,r.length-1);let a=i.getTileInformationFromQuadKey(r);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(r)){let s=new wo({throttle:!1,throttleByServer:!0,type:Zs.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};Pb.prototype.loadTileDataAvailability=function(e,t,n){};function $Rt(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var Ioe=Pb;var JRt="https://maps.googleapis.com/maps/api/geocode/json",kMe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function Poe(e){e=e??H.EMPTY_OBJECT;let t=e.key;this._resource=new De({url:JRt,queryParameters:{key:t}}),this._credit=new It(kMe,!0)}Object.defineProperties(Poe.prototype,{credit:{get:function(){return this._credit}}});Poe.prototype.geocode=async function(e){let n=await this._resource.getDerivedResource({queryParameters:{address:e}}).fetchJson();if(n.status==="ZERO_RESULTS")return[];if(n.status!=="OK")throw new oe(`GoogleGeocoderService got a bad response ${n.status}: ${n.error_message}`);return n.results.map(r=>{let o=r.geometry.viewport.southwest,s=r.geometry.viewport.northeast;return{displayName:r.formatted_address,destination:ie.fromDegrees(o.lng,o.lat,s.lng,s.lat),attribution:{html:kMe,collapsible:!1}}})};var Doe=Poe;function ZRt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var jU=ZRt;var ZMe={},QRt=32.184,eOt=2451545,UMe=-.0529921,zMe=-.1059842,VMe=13.0120009,jMe=13.3407154,HMe=.9856003,GMe=26.4057084,WMe=13.064993,qMe=.3287146,YMe=1.7484877,XMe=-.1589763,KMe=.0036096,$Me=.1643573,JMe=12.9590088,Roe=new K;ZMe.ComputeMoon=function(e,t){l(e)||(e=K.now()),Roe=K.addSeconds(e,QRt,Roe);let n=K.totalDays(Roe)-eOt,i=n/kn.DAYS_PER_JULIAN_CENTURY,r=(125.045+UMe*n)*D.RADIANS_PER_DEGREE,o=(250.089+zMe*n)*D.RADIANS_PER_DEGREE,s=(260.008+VMe*n)*D.RADIANS_PER_DEGREE,a=(176.625+jMe*n)*D.RADIANS_PER_DEGREE,c=(357.529+HMe*n)*D.RADIANS_PER_DEGREE,u=(311.589+GMe*n)*D.RADIANS_PER_DEGREE,f=(134.963+WMe*n)*D.RADIANS_PER_DEGREE,d=(276.617+qMe*n)*D.RADIANS_PER_DEGREE,p=(34.226+YMe*n)*D.RADIANS_PER_DEGREE,g=(15.134+XMe*n)*D.RADIANS_PER_DEGREE,m=(119.743+KMe*n)*D.RADIANS_PER_DEGREE,y=(239.961+$Me*n)*D.RADIANS_PER_DEGREE,A=(25.053+JMe*n)*D.RADIANS_PER_DEGREE,b=Math.sin(r),x=Math.sin(o),T=Math.sin(s),E=Math.sin(a),v=Math.sin(c),S=Math.sin(u),I=Math.sin(f),R=Math.sin(d),O=Math.sin(p),L=Math.sin(g),_=Math.sin(m),C=Math.sin(y),w=Math.sin(A),P=Math.cos(r),M=Math.cos(o),F=Math.cos(s),V=Math.cos(a),B=Math.cos(c),j=Math.cos(u),k=Math.cos(f),G=Math.cos(d),q=Math.cos(p),Q=Math.cos(g),W=Math.cos(m),J=Math.cos(y),Z=Math.cos(A),ae=(269.9949+.0031*i-3.8787*b-.1204*x+.07*T-.0172*E+.0072*S-.0052*L+.0043*w)*D.RADIANS_PER_DEGREE,Ae=(66.5392+.013*i+1.5419*P+.0239*M-.0278*F+.0068*V-.0029*j+9e-4*k+8e-4*Q-9e-4*Z)*D.RADIANS_PER_DEGREE,fe=(38.3213+13.17635815*n-14e-13*n*n+3.561*b+.1208*x-.0642*T+.0158*E+.0252*v-.0066*S-.0047*I-.0046*R+.0028*O+.0052*L+.004*_+.0019*C-.0044*w)*D.RADIANS_PER_DEGREE,xe=(13.17635815-14e-13*(2*n)+3.561*P*UMe+.1208*M*zMe-.0642*F*VMe+.0158*V*jMe+.0252*B*HMe-.0066*j*GMe-.0047*k*WMe-.0046*G*qMe+.0028*q*YMe+.0052*Q*XMe+.004*W*KMe+.0019*J*$Me-.0044*Z*JMe)/86400*D.RADIANS_PER_DEGREE;return l(t)||(t=new jU),t.rightAscension=ae,t.declination=Ae,t.rotation=fe,t.rotationRate=xe,t};var HU=ZMe;function QMe(e){(!l(e)||typeof e!="function")&&(e=HU.ComputeMoon),this._computeFunction=e}var tOt=new h,nOt=new h,iOt=new h;function rOt(e,t,n){let i=tOt;i.x=Math.cos(e+D.PI_OVER_TWO),i.y=Math.sin(e+D.PI_OVER_TWO),i.z=0;let r=Math.cos(t),o=iOt;o.x=r*Math.cos(e),o.y=r*Math.sin(e),o.z=Math.sin(t);let s=h.cross(o,i,nOt);return l(n)||(n=new $),n[0]=i.x,n[1]=s.x,n[2]=o.x,n[3]=i.y,n[4]=s.y,n[5]=o.y,n[6]=i.z,n[7]=s.z,n[8]=o.z,n}var oOt=new $,sOt=new Le;QMe.prototype.evaluate=function(e,t){l(e)||(e=K.now());let n=this._computeFunction(e),i=rOt(n.rightAscension,n.declination,t),r=D.zeroToTwoPi(n.rotation),o=Le.fromAxisAngle(h.UNIT_Z,r,sOt),s=$.fromQuaternion(Le.conjugate(o,o),oOt);return $.multiply(s,i,i)};var GU=QMe;var Ooe=class{constructor(){ut(this,"type")}getRequiredDataPoints(t){pe.throwInstantiationError()}interpolateOrderZero(t,n,i,r,o){pe.throwInstantiationError()}interpolate(t,n,i,r,o,s,a){pe.throwInstantiationError()}},Moe=Ooe;var eNe={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"};Object.freeze(eNe);var sy=eNe;function Noe(e){this._url=De.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(Noe.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});Noe.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===Ib.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(r){let o,s=r.bbox;if(l(s))o=ie.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=r.geometry.coordinates[0],c=r.geometry.coordinates[1];o=h.fromDegrees(a,c)}return{displayName:r.properties.label,destination:o,attributions:i.attributions}})})};var WU=Noe;function aOt(e){if(!Object.values(sy).some(t=>t===e))throw new pe(`Invalid geocodeProviderType: "${e}"`)}var tNe=Object.freeze({[sy.GOOGLE]:"google",[sy.BING]:"bing",[sy.DEFAULT]:void 0});function cOt(e){return tNe[e]}function lOt(e){return Object.entries(tNe).find(t=>t[1]===e)[0]}function Loe(e){e=e??H.EMPTY_OBJECT;let t=e.geocodeProviderType??sy.DEFAULT,n=e.accessToken??Fu.defaultAccessToken,i=De.createIfNeeded(e.server??Fu.defaultServer);i.appendForwardSlash();let r=Fu.getDefaultTokenCredit(n);l(r)&&e.scene.frameState.creditDisplay.addStaticCredit(It.clone(r));let o=i.getDerivedResource({url:"v1/geocode"});l(n)&&o.appendQueryParameters({access_token:n}),this._accessToken=n,this._server=i,this._pelias=new WU(o),this.geocodeProviderType=t}Object.defineProperties(Loe.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return lOt(this._pelias.url.queryParameters.geocoder)},set:function(e){aOt(e);let t={...this._pelias.url.queryParameters,geocoder:cOt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});Loe.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var sC=Loe;var nNe={NONE:0,POINT:1,SEGMENT:2,CURVE:3,ARC:4,SURFACE:5};Object.freeze(nNe);var Foe=nNe;var iNe={NONE:0,NOT_IN_RANGE:1,IN_RANGE:2};Object.freeze(iNe);var Boe=iNe;var rNe={NEAREST:1,NEAREST_KEYPOINT:2,CENTER:8};Object.freeze(rNe);var qU=rNe;var oNe={NONE:0,WIRE:1,SHEET:2,SOLID:3,MESH:4,TEXT:5};Object.freeze(oNe);var koe=oNe;function sNe(e){if(!(!l(e)||!l(e.longitude)||!l(e.latitude)))return h.fromDegrees(e.longitude,e.latitude,e.height??0)}function aNe(e){let t=he.fromCartesian(e);return{longitude:D.toDegrees(t.longitude),latitude:D.toDegrees(t.latitude),height:t.height}}function uOt(e){let t=[],n=new se;for(let i=0;i<4;i++)N.getRow(e,i,n),t.push([n.x,n.y,n.z,n.w]);return t}function fOt(e,t,n){return N.fromRowMajorArray([e/2,0,0,e/2,0,-t/2,0,t/2,0,0,.5,.5,0,0,0,1],n)}var dOt=new N,hOt=new N,S7=class e{constructor(t){this._assetId=t.assetId,this._resource=t.resource,this.ecefTransform=t.ecefTransform}get assetId(){return this._assetId}static async fromAssetId(t,n){n=n??H.EMPTY_OBJECT;let i=n.accessToken??Fu.defaultAccessToken,r=De.createIfNeeded(n.server??Fu.defaultServer);r.appendForwardSlash();let o={url:`assets/${t}/`,headers:Ho._addClientHeaders()};l(i)&&(o.queryParameters={access_token:i});let s=r.getDerivedResource(o),a=await s.getDerivedResource({url:"ecef"}).fetchJson();if(!l(a?.ecefTransform))throw new oe(`Cesium ion asset ${t} is not geolocated; snapping requires geolocation`);let c=N.fromRowMajorArray(a.ecefTransform.flat());return new e({assetId:t,resource:s,ecefTransform:c})}_computeWorldToView(t,n,i,r){r=r??new N;let o=fOt(n,i,dOt);return N.multiply(t.viewMatrix,this.ecefTransform,r),N.multiply(t.frustum.projectionMatrix,r,r),N.multiply(o,r,r)}async snap(t){let n=this._computeWorldToView(t.camera,t.canvasWidth,t.canvasHeight,hOt),i={testPoint:aNe(t.testPoint),closePoint:aNe(t.closePoint??t.testPoint),snapAperture:t.snapAperture??e.DEFAULT_SNAP_APERTURE,snapMode:t.snapMode??qU.NEAREST,worldToView:uOt(n)},r;try{r=await this._resource.getDerivedResource({url:`elements/${t.elementId}/snap`}).post(JSON.stringify(i),{headers:{"Content-Type":"application/json"},responseType:"json"})}catch(s){if(s?.statusCode===404||s?.statusCode===400&&typeof s.response?.message=="string"&&s.response.message.includes("No snap possible"))return;throw s}if(!l(r))return;let o={heat:r.heat,geometryType:r.geomType,parentGeometryType:r.parentGeomType,normal:r.normal,curve:r.curve};return o.snapPoint=sNe(r.snapPoint),o.hitPoint=sNe(r.hitPoint),o}};S7.DEFAULT_SNAP_APERTURE=12;var Uoe=S7;var ca={};ca.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});ca.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});ca.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",GaussianSplat3DTiles:"GS_3DT",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});ca.defaultAccessToken=void 0;ca.defaultShareKey=void 0;ca._getAuthorizationHeader=function(){return l(ca.defaultShareKey)?`Basic ${ca.defaultShareKey}`:`Bearer ${ca.defaultAccessToken}`};ca.apiEndpoint=new De({url:"https://api.bentley.com"});ca.getExports=async function(e,t){let n=new De({url:`${ca.apiEndpoint}mesh-export`,headers:{Authorization:ca._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:ca.ExportType["3DTILES"],$top:"5",client:"CesiumJS"}});typeof CESIUM_VERSION<"u"&&n.appendQueryParameters({clientVersion:CESIUM_VERSION}),l(t)&&t!==""&&n.appendQueryParameters({changesetId:t});try{return await n.fetchJson()}catch(i){let r=JSON.parse(i.response);if(i.statusCode===401){let o=r.error.details?.[0].code??"";throw new oe(`Unauthorized, bad token, wrong scopes or headers bad. ${o}`)}else{if(i.statusCode===403)throw console.error(r.error.code,r.error.message),new oe("Not allowed, forbidden");if(i.statusCode===422)throw new oe(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(i.statusCode===429)throw new oe("Too many requests")}throw new oe(`Unknown request failure ${i.statusCode}`)}};ca.getRealityDataMetadata=async function(e,t){let n=new De({url:`${ca.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:ca._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{return(await n.fetchJson()).realityData}catch(i){let r=JSON.parse(i.response);if(i.statusCode===401){let o=r.error.details?.[0].code??"";throw new oe(`Unauthorized, bad token, wrong scopes or headers bad. ${o}`)}else{if(i.statusCode===403)throw console.error(r.error.code,r.error.message),new oe("Not allowed, forbidden");if(i.statusCode===404)throw new oe(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new oe(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(i.statusCode===429)throw new oe("Too many requests")}throw new oe(`Unknown request failure ${i.statusCode}`)}};ca.getRealityDataURL=async function(e,t,n){let i=new De({url:`${ca.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:ca._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{let o=(await i.fetchJson())._links.containerUrl.href,s=new URL(o);return s.pathname=`${s.pathname}/${n}`,s.toString()}catch(r){let o=JSON.parse(r.response);if(r.statusCode===401){let s=o.error.details?.[0].code??"";throw new oe(`Unauthorized, bad token, wrong scopes or headers bad. ${s}`)}else{if(r.statusCode===403)throw console.error(o.error.code,o.error.message),new oe("Not allowed, forbidden");if(r.statusCode===404)throw new oe(`Reality data not found: ${e}, ${t}`);if(r.statusCode===422)throw new oe(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(r.statusCode===429)throw new oe("Too many requests")}throw new oe(`Unknown request failure ${r.statusCode}`)}};var la=ca;var cNe={SHIFT:0,CTRL:1,ALT:2};Object.freeze(cNe);var to=cNe;var zoe=class{constructor(){ut(this,"ellipsoid")}project(t,n){pe.throwInstantiationError()}unproject(t,n){pe.throwInstantiationError()}},Voe=zoe;var joe=[],Hoe=[];function mOt(e,t,n,i,r,o){let s=r-i+1,a=o-r,c=joe,u=Hoe,f,d;for(f=0;f<s;++f)c[f]=e[i+f];for(d=0;d<a;++d)u[d]=e[r+d+1];f=0,d=0;for(let p=i;p<=o;++p){let g=c[f],m=u[d];f<s&&(d>=a||t(g,m,n)<=0)?(e[p]=g,++f):d<a&&(e[p]=m,++d)}}function Goe(e,t,n,i,r){if(i>=r)return;let o=Math.floor((i+r)*.5);Goe(e,t,n,i,o),Goe(e,t,n,o+1,r),mOt(e,t,n,i,o,r)}function pOt(e,t,n){let i=e.length,r=Math.ceil(i*.5);joe.length=r,Hoe.length=r,Goe(e,t,n,0,i-1),joe.length=0,Hoe.length=0}var F0=pOt;function _P(e){e=e??H.EMPTY_OBJECT;let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(_P.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});_P.prototype.findTimeInterval=Dr.prototype.findTimeInterval;_P.prototype.wrapTime=Dr.prototype.wrapTime;_P.prototype.clampTime=Dr.prototype.clampTime;_P.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,r=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-i[r])/(i[r+1]-i[r]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=r*this._count+s;t[s]=n[a]*(1-o)+n[a+this._count]*o}return t};var Woe=_P;var lNe={NONE:-1,PARTIAL:0,FULL:1};Object.freeze(lNe);var $o=lNe;function vl(e,t){this._occluderPosition=h.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var w7=new h;Object.defineProperties(vl.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,w7),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,r,o,s;if(n>i){r=Math.sqrt(n-i),n=1/Math.sqrt(n),o=h.multiplyByScalar(t,n,w7);let a=r*r*n;s=h.add(e,h.multiplyByScalar(o,a,w7),w7)}else r=Number.MAX_VALUE;this._horizonDistance=r,this._horizonPlaneNormal=o,this._horizonPlanePosition=s,this._cameraPosition=e}}});vl.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new vl(e,t)};var fNe=new h;vl.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,fNe),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var gOt=new h;vl.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,gOt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,fNe),r=this._occluderRadius-n;if(r=h.magnitudeSquared(i)-r*r,n<this._occluderRadius)return r>0?(r=Math.sqrt(r)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),r*r+n*n>h.magnitudeSquared(i)):!1;if(r>0){i=h.subtract(t,this._cameraPosition,i);let o=h.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>o*s?!0:(r=Math.sqrt(r)+this._horizonDistance,r*r+a>o)}return!0}return!1};var _Ot=new h;vl.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return $o.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,_Ot),r=this._occluderRadius-n,o=h.magnitudeSquared(i);if(r=o-r*r,r>0){r=Math.sqrt(r)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return r*r+n*n<s?$o.NONE:(r=this._occluderRadius+n,r=o-r*r,r>0?(r=Math.sqrt(r)+this._horizonDistance,s<r*r+n*n?$o.FULL:$o.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?$o.PARTIAL:$o.FULL))}}return $o.NONE};var I7=new h;vl.computeOccludeePoint=function(e,t,n){let i=h.clone(t),r=h.clone(e.center),o=e.radius,s=n.length,a=h.normalize(h.subtract(i,r,I7),I7),c=-h.dot(a,r),u=vl._anyRotationVector(r,a,c),f=vl._horizonToPlaneNormalDotProduct(e,a,c,u,n[0]);if(!f)return;let d;for(let g=1;g<s;++g){if(d=vl._horizonToPlaneNormalDotProduct(e,a,c,u,n[g]),!d)return;d<f&&(f=d)}if(f<.0017453283658983088)return;let p=o/f;return h.add(r,h.multiplyByScalar(a,p,I7),I7)};var yOt=[];vl.computeOccludeePointFromRectangle=function(e,t){t=t??ee.default;let n=ie.subsample(e,t,0,yOt),i=ue.fromPoints(n),r=h.ZERO;if(!h.equals(r,i.center))return vl.computeOccludeePoint(new ue(r,t.minimumRadius),i.center,n)};var AOt=new h;vl._anyRotationVector=function(e,t,n){let i=h.abs(t,AOt),r=i.x>i.y?0:1;(r===0&&i.z>i.x||r===1&&i.z>i.y)&&(r=2);let o=new h,s;r===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):r===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,o),i),e,i),i)};var bOt=new h;vl._rotationVector=function(e,t,n,i,r){let o=h.subtract(i,e,bOt);if(o=h.normalize(o,o),h.dot(t,o)<.9999999847691291){let s=h.cross(t,o,o);if(h.magnitude(s)>D.EPSILON13)return h.normalize(s,new h)}return r};var qoe=new h,xOt=new h,P7=new h,uNe=new h;vl._horizonToPlaneNormalDotProduct=function(e,t,n,i,r){let o=h.clone(r,qoe),s=h.clone(e.center,xOt),a=e.radius,c=h.subtract(s,o,P7),u=h.magnitudeSquared(c),f=a*a;if(u<f)return!1;let d=u-f,p=Math.sqrt(d),m=1/Math.sqrt(u),A=p*m*p;c=h.normalize(c,c);let b=h.add(o,h.multiplyByScalar(c,A,uNe),uNe),x=Math.sqrt(d-A*A),T=this._rotationVector(s,t,n,o,i),E=h.fromElements(T.x*T.x*c.x+(T.x*T.y-T.z)*c.y+(T.x*T.z+T.y)*c.z,(T.x*T.y+T.z)*c.x+T.y*T.y*c.y+(T.y*T.z-T.x)*c.z,(T.x*T.z-T.y)*c.x+(T.y*T.z+T.x)*c.y+T.z*T.z*c.z,qoe);E=h.normalize(E,E);let v=h.multiplyByScalar(E,x,qoe);T=h.normalize(h.subtract(h.add(b,v,P7),s,P7),P7);let S=h.dot(t,T);T=h.normalize(h.subtract(h.subtract(b,v,T),s,T),T);let I=h.dot(t,T);return S<I?S:I};var YU=vl;function Yoe(e,t,n){e=De.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new It('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(Yoe.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});Yoe.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:Ot(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let r,o=i.bounds;if(l(o))r=ie.fromDegrees(o.southwest.lng,o.southwest.lat,o.northeast.lng,o.northeast.lat);else{let{lng:s,lat:a}=i.geometry;r=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:r}})})};var Xoe=Yoe;var TOt={packedLength:void 0,pack:pe.throwInstantiationError,unpack:pe.throwInstantiationError},Koe=TOt;var EOt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:pe.throwInstantiationError,unpackInterpolationResult:pe.throwInstantiationError},$oe=EOt;var COt=new h;function vOt(e,t,n,i){let r=lx(e,t,n,i,COt);return l(r)?r.x>0&&r.y>0&&r.z>0:!1}var Joe=vOt;function dNe(){pe.throwInstantiationError()}dNe.prototype.getURL=pe.throwInstantiationError;var Zoe=dNe;async function SOt(e,t,n,i){return l(i)||(i=!1),POt(e,t,n,i)}function wOt(e,t,n){let i=e[0],r=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!r)return!1;let o;return n?o=r.then(mNe(i)):o=r.then(mNe(i)).catch(DOt(i)),e.shift(),t.push(o),!0}function IOt(e){return new Promise(function(t){setTimeout(t,e)})}function Qoe(e,t,n){return e.length?wOt(e,t,n)?Qoe(e,t,n):IOt(100).then(()=>Qoe(e,t,n)):Promise.resolve()}function POt(e,t,n,i){let r=e.tilingScheme,o,s=[],a={};for(o=0;o<n.length;++o){let u=r.positionToTileXY(n[o],t);if(!l(u))continue;let f=u.toString();if(!a.hasOwnProperty(f)){let d={x:u.x,y:u.y,level:t,tilingScheme:r,terrainProvider:e,positions:[]};a[f]=d,s.push(d)}a[f].positions.push(n[o])}let c=[];return Qoe(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function hNe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function mNe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let r=!1;for(let o=0;o<t.length;++o){let s=t[o];if(!hNe(s,i,n)){r=!0;break}}return r?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let o=0;o<t.length;++o){let s=t[o];hNe(s,i,n)}}):Promise.resolve()}}function DOt(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var XU=SOt;var ese=new U;async function pNe(e,t,n){l(n)||(n=!1);let i=[],r=[],o=e.availability,s=[];for(let c=0;c<t.length;++c){let u=t[c],f=o.computeMaximumLevelAtPosition(u);if(r[c]=f,f===0){e.tilingScheme.positionToTileXY(u,1,ese);let p=e.loadTileDataAvailability(ese.x,ese.y,1);l(p)&&s.push(p)}let d=i[f];l(d)||(i[f]=d=[]),d.push(u)}await Promise.all(s),await Promise.all(i.map(function(c,u){if(l(c))return XU(e,u,c,n)}));let a=[];for(let c=0;c<t.length;++c){let u=t[c];o.computeMaximumLevelAtPosition(u)!==r[c]&&a.push(u)}return a.length>0&&await pNe(e,a,n),t}var aC=pNe;var gNe={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19};Object.freeze(gNe);var un=gNe;function Db(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let r=i.getBoundingClientRect();return n.x=t.clientX-r.left,n.y=t.clientY-r.top,n}function sse(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function cC(e){let t=[];if(e.shiftKey&&t.push(to.SHIFT),e.ctrlKey&&t.push(to.CTRL),e.altKey&&t.push(to.ALT),t.length)return t}var Fs={LEFT:0,MIDDLE:1,RIGHT:2};function fd(e,t,n,i){function r(o){i(e,o)}n.addEventListener(t,r,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,r,!1)})}function ROt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;dn.supportsPointerEvents()?(fd(e,"pointerdown",t,BOt),fd(e,"pointerup",t,SNe),fd(e,"pointermove",t,kOt),fd(e,"pointercancel",t,SNe)):(fd(e,"mousedown",t,wNe),fd(e,"mouseup",n,INe),fd(e,"mousemove",n,PNe),fd(e,"touchstart",t,LOt),fd(e,"touchend",n,xNe),fd(e,"touchmove",n,FOt),fd(e,"touchcancel",n,xNe)),fd(e,"dblclick",t,MOt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",fd(e,i,t,NOt)}function OOt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var _Ne={position:new U};function ase(e){e._lastSeenTouchEvent=xn()}function cse(e){return xn()-e._lastSeenTouchEvent>sp.mouseEmulationIgnoreMilliseconds}function ose(e,t,n){let i=e.x-t.x,r=e.y-t.y;return Math.sqrt(i*i+r*r)<n}function wNe(e,t){if(!cse(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===Fs.LEFT)i=un.LEFT_DOWN;else if(n===Fs.MIDDLE)i=un.MIDDLE_DOWN;else if(n===Fs.RIGHT)i=un.RIGHT_DOWN;else return;let r=Db(e,t,e._primaryPosition);U.clone(r,e._primaryStartPosition),U.clone(r,e._primaryPreviousPosition);let o=cC(t),s=e.getInputAction(i,o);l(s)&&(U.clone(r,_Ne.position),s(_Ne),t.preventDefault())}var yNe={position:new U},ANe={position:new U};function tse(e,t,n,i){let r=cC(i),o=e.getInputAction(t,r),s=e.getInputAction(n,r);if(l(o)||l(s)){let a=Db(e,i,e._primaryPosition);if(l(o)&&(U.clone(a,yNe.position),o(yNe)),l(s)){let c=e._primaryStartPosition;ose(c,a,e._clickPixelTolerance)&&(U.clone(a,ANe.position),s(ANe))}}}function INe(e,t){if(!cse(e))return;let n=t.button;n!==Fs.LEFT&&n!==Fs.MIDDLE&&n!==Fs.RIGHT||(e._buttonDown[Fs.LEFT]&&(tse(e,un.LEFT_UP,un.LEFT_CLICK,t),e._buttonDown[Fs.LEFT]=!1),e._buttonDown[Fs.MIDDLE]&&(tse(e,un.MIDDLE_UP,un.MIDDLE_CLICK,t),e._buttonDown[Fs.MIDDLE]=!1),e._buttonDown[Fs.RIGHT]&&(tse(e,un.RIGHT_UP,un.RIGHT_CLICK,t),e._buttonDown[Fs.RIGHT]=!1))}var nse={startPosition:new U,endPosition:new U};function PNe(e,t){if(!cse(e))return;let n=cC(t),i=Db(e,t,e._primaryPosition),r=e._primaryPreviousPosition,o=e.getInputAction(un.MOUSE_MOVE,n);l(o)&&(U.clone(r,nse.startPosition),U.clone(i,nse.endPosition),o(nse)),U.clone(i,r),(e._buttonDown[Fs.LEFT]||e._buttonDown[Fs.MIDDLE]||e._buttonDown[Fs.RIGHT])&&t.preventDefault()}var bNe={position:new U};function MOt(e,t){let n=t.button,i;if(n===Fs.LEFT)i=un.LEFT_DOUBLE_CLICK;else return;let r=cC(t),o=e.getInputAction(i,r);l(o)&&(Db(e,t,bNe.position),o(bNe))}function NOt(e,t){let n;if(l(t.deltaY)){let o=t.deltaMode;o===t.DOM_DELTA_PIXEL?n=-t.deltaY:o===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=cC(t),r=e.getInputAction(un.WHEEL,i);l(r)&&(r(n),t.preventDefault())}function LOt(e,t){ase(e);let n=t.changedTouches,i,r=n.length,o,s,a=e._positions;for(i=0;i<r;++i)o=n[i],s=o.identifier,a.set(s,Db(e,o,new U));D7(e,t);let c=e._previousPositions;for(i=0;i<r;++i)o=n[i],s=o.identifier,c.set(s,U.clone(a.get(s)))}function xNe(e,t){ase(e);let n=t.changedTouches,i,r=n.length,o,s,a=e._positions;for(i=0;i<r;++i)o=n[i],s=o.identifier,a.remove(s);D7(e,t);let c=e._previousPositions;for(i=0;i<r;++i)o=n[i],s=o.identifier,c.remove(s)}var TNe={position:new U},ise={position1:new U,position2:new U},ENe={position:new U},CNe={position:new U},vNe={position:new U};function D7(e,t){let n=cC(t),i=e._positions,r=i.length,o,s,a=e._isPinching;if(r!==1&&e._buttonDown[Fs.LEFT]){if(e._buttonDown[Fs.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),o=e.getInputAction(un.LEFT_UP,n),l(o)&&(U.clone(e._primaryPosition,ENe.position),o(ENe)),r===0&&!e._isTouchHolding&&(s=e.getInputAction(un.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,u=e._previousPositions.values[0];ose(c,u,e._clickPixelTolerance)&&(U.clone(e._primaryPosition,CNe.position),s(CNe))}e._isTouchHolding=!1}if(r===0&&a&&(e._isPinching=!1,o=e.getInputAction(un.PINCH_END,n),l(o)&&o()),r===1&&!a){let c=i.values[0];U.clone(c,e._primaryPosition),U.clone(c,e._primaryStartPosition),U.clone(c,e._primaryPreviousPosition),e._buttonDown[Fs.LEFT]=!0,o=e.getInputAction(un.LEFT_DOWN,n),l(o)&&(U.clone(c,TNe.position),o(TNe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(un.RIGHT_CLICK,n),l(s))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];ose(u,f,e._holdPixelTolerance)&&(U.clone(e._primaryPosition,vNe.position),s(vNe))}},sp.touchHoldDelayMilliseconds),t.preventDefault()}r===2&&!a&&(e._isPinching=!0,o=e.getInputAction(un.PINCH_START,n),l(o)&&(U.clone(i.values[0],ise.position1),U.clone(i.values[1],ise.position2),o(ise),t.preventDefault()))}function FOt(e,t){ase(e);let n=t.changedTouches,i,r=n.length,o,s,a=e._positions;for(i=0;i<r;++i){o=n[i],s=o.identifier;let u=a.get(s);l(u)&&Db(e,o,u)}DNe(e,t);let c=e._previousPositions;for(i=0;i<r;++i)o=n[i],s=o.identifier,U.clone(a.get(s),c.get(s))}var rse={startPosition:new U,endPosition:new U},KU={distance:{startPosition:new U,endPosition:new U},angleAndHeight:{startPosition:new U,endPosition:new U}};function DNe(e,t){let n=cC(t),i=e._positions,r=e._previousPositions,o=i.length,s;if(o===1&&e._buttonDown[Fs.LEFT]){let a=i.values[0];U.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(un.MOUSE_MOVE,n),l(s)&&(U.clone(c,rse.startPosition),U.clone(a,rse.endPosition),s(rse)),U.clone(a,c),t.preventDefault()}else if(o===2&&e._isPinching&&(s=e.getInputAction(un.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],u=r.values[0],f=r.values[1],d=c.x-a.x,p=c.y-a.y,g=Math.sqrt(d*d+p*p)*.25,m=f.x-u.x,y=f.y-u.y,A=Math.sqrt(m*m+y*y)*.25,b=(c.y+a.y)*.125,x=(f.y+u.y)*.125,T=Math.atan2(p,d),E=Math.atan2(y,m);U.fromElements(0,A,KU.distance.startPosition),U.fromElements(0,g,KU.distance.endPosition),U.fromElements(E,x,KU.angleAndHeight.startPosition),U.fromElements(T,b,KU.angleAndHeight.endPosition),s(KU)}}function BOt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,Db(e,t,new U)),D7(e,t),e._previousPositions.set(i,U.clone(n.get(i)))}else wNe(e,t)}function SNe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),D7(e,t),e._previousPositions.remove(i)}else INe(e,t)}function kOt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,r=n.get(i);if(!l(r))return;Db(e,t,r),DNe(e,t);let o=e._previousPositions;U.clone(n.get(i),o.get(i))}else PNe(e,t)}function sp(e){this._inputEvents={},this._buttonDown={[Fs.LEFT]:!1,[Fs.MIDDLE]:!1,[Fs.RIGHT]:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-sp.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new U,this._primaryPosition=new U,this._primaryPreviousPosition=new U,this._positions=new kt,this._previousPositions=new kt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,ROt(this)}sp.prototype.setInputAction=function(e,t,n){let i=sse(t,n);this._inputEvents[i]=e};sp.prototype.getInputAction=function(e,t){let n=sse(e,t);return this._inputEvents[n]};sp.prototype.removeInputAction=function(e,t){let n=sse(e,t);delete this._inputEvents[n]};sp.prototype.isDestroyed=function(){return!1};sp.prototype.destroy=function(){return OOt(this),le(this)};sp.mouseEmulationIgnoreMilliseconds=800;sp.touchHoldDelayMilliseconds=1500;var ua=sp;function UOt(e,t,n,i,r,o,s){let a=ir.numberOfPoints(e,t,r),c,u=n.red,f=n.green,d=n.blue,p=n.alpha,g=i.red,m=i.green,y=i.blue,A=i.alpha;if(z.equals(n,i)){for(c=0;c<a;c++)o[s++]=z.floatToByte(u),o[s++]=z.floatToByte(f),o[s++]=z.floatToByte(d),o[s++]=z.floatToByte(p);return s}let b=(g-u)/a,x=(m-f)/a,T=(y-d)/a,E=(A-p)/a,v=s;for(c=0;c<a;c++)o[v++]=z.floatToByte(u+c*b),o[v++]=z.floatToByte(f+c*x),o[v++]=z.floatToByte(d+c*T),o[v++]=z.floatToByte(p+c*E);return v}function $U(e){e=e??H.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=e.arcType??ln.GEODESIC,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??ee.default,this._workerName="createSimplePolylineGeometry";let r=1+t.length*h.packedLength;r+=l(n)?1+n.length*z.packedLength:1,this.packedLength=r+ee.packedLength+3}$U.pack=function(e,t,n){n=n??0;let i,r=e._positions,o=r.length;for(t[n++]=o,i=0;i<o;++i,n+=h.packedLength)h.pack(r[i],t,n);let s=e._colors;for(o=l(s)?s.length:0,t[n++]=o,i=0;i<o;++i,n+=z.packedLength)z.pack(s[i],t,n);return ee.pack(e._ellipsoid,t,n),n+=ee.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};$U.unpack=function(e,t,n){t=t??0;let i,r=e[t++],o=new Array(r);for(i=0;i<r;++i,t+=h.packedLength)o[i]=h.unpack(e,t);r=e[t++];let s=r>0?new Array(r):void 0;for(i=0;i<r;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=ee.unpack(e,t);t+=ee.packedLength;let c=e[t++]===1,u=e[t++],f=e[t];return l(n)?(n._positions=o,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=u,n._granularity=f,n):new $U({positions:o,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:u,granularity:f})};var R7=new Array(2),O7=new Array(2),zOt={positions:R7,height:O7,ellipsoid:void 0,minDistance:void 0,granularity:void 0};$U.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,r=e._arcType,o=e._granularity,s=e._ellipsoid,a=D.chordLength(o,s.maximumRadius),c=l(n)&&!i,u,f=t.length,d,p,g,m,y=0;if(r===ln.GEODESIC||r===ln.RHUMB){let E,v,S;r===ln.GEODESIC?(E=D.chordLength(o,s.maximumRadius),v=ir.numberOfPoints,S=ir.generateArc):(E=o,v=ir.numberOfPointsRhumbLine,S=ir.generateRhumbArc);let I=ir.extractHeights(t,s),R=zOt;if(r===ln.GEODESIC?R.minDistance=a:R.granularity=o,R.ellipsoid=s,c){let O=0;for(u=0;u<f-1;u++)O+=v(t[u],t[u+1],E)+1;d=new Float64Array(O*3),g=new Uint8Array(O*4),R.positions=R7,R.height=O7;let L=0;for(u=0;u<f-1;++u){R7[0]=t[u],R7[1]=t[u+1],O7[0]=I[u],O7[1]=I[u+1];let _=S(R);if(l(n)){let C=_.length/3;m=n[u];for(let w=0;w<C;++w)g[L++]=z.floatToByte(m.red),g[L++]=z.floatToByte(m.green),g[L++]=z.floatToByte(m.blue),g[L++]=z.floatToByte(m.alpha)}d.set(_,y),y+=_.length}}else if(R.positions=t,R.height=I,d=new Float64Array(S(R)),l(n)){for(g=new Uint8Array(d.length/3*4),u=0;u<f-1;++u){let L=t[u],_=t[u+1],C=n[u],w=n[u+1];y=UOt(L,_,C,w,a,g,y)}let O=n[f-1];g[y++]=z.floatToByte(O.red),g[y++]=z.floatToByte(O.green),g[y++]=z.floatToByte(O.blue),g[y]=z.floatToByte(O.alpha)}}else{p=c?f*2-2:f,d=new Float64Array(p*3),g=l(n)?new Uint8Array(p*4):void 0;let E=0,v=0;for(u=0;u<f;++u){let S=t[u];if(c&&u>0&&(h.pack(S,d,E),E+=3,m=n[u-1],g[v++]=z.floatToByte(m.red),g[v++]=z.floatToByte(m.green),g[v++]=z.floatToByte(m.blue),g[v++]=z.floatToByte(m.alpha)),c&&u===f-1)break;h.pack(S,d,E),E+=3,l(n)&&(m=n[u],g[v++]=z.floatToByte(m.red),g[v++]=z.floatToByte(m.green),g[v++]=z.floatToByte(m.blue),g[v++]=z.floatToByte(m.alpha))}}let A=new Tn;A.position=new Ne({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:d}),l(n)&&(A.color=new Ne({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0})),p=d.length/3;let b=(p-1)*2,x=je.createTypedArray(p,b),T=0;for(u=0;u<p-1;++u)x[T++]=u,x[T++]=u+1;return new St({attributes:A,indices:x,primitiveType:Oe.LINES,boundingSphere:ue.fromPoints(t)})};var lse=$U;var M7=class{constructor(){pe.throwInstantiationError()}async snap(t){pe.throwInstantiationError()}};M7.DEFAULT_SNAP_APERTURE=void 0;var use=M7;function yP(e){let t=e.radius??1,i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new Xa(i),this._workerName="createSphereGeometry"}yP.packedLength=Xa.packedLength;yP.pack=function(e,t,n){return Xa.pack(e._ellipsoidGeometry,t,n)};var VOt=new Xa,Rb={radius:void 0,radii:new h,vertexFormat:new Be,stackPartitions:void 0,slicePartitions:void 0};yP.unpack=function(e,t,n){let i=Xa.unpack(e,t,VOt);return Rb.vertexFormat=Be.clone(i._vertexFormat,Rb.vertexFormat),Rb.stackPartitions=i._stackPartitions,Rb.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,Rb.radii),n._ellipsoidGeometry=new Xa(Rb),n):(Rb.radius=i._radii.x,new yP(Rb))};yP.createGeometry=function(e){return Xa.createGeometry(e._ellipsoidGeometry)};var JU=yP;function jOt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var lC=jOt;var HOt={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},wn=HOt;var fse=class{constructor(t){ut(this,"ellipsoid");ut(this,"rectangle");ut(this,"projection")}getNumberOfXTilesAtLevel(t){pe.throwInstantiationError()}getNumberOfYTilesAtLevel(t){pe.throwInstantiationError()}rectangleToNativeRectangle(t,n){pe.throwInstantiationError()}tileXYToNativeRectangle(t,n,i,r){pe.throwInstantiationError()}tileXYToRectangle(t,n,i,r){pe.throwInstantiationError()}positionToTileXY(t,n,i){pe.throwInstantiationError()}},dse=fse;function uC(e){e=e??H.EMPTY_OBJECT,this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=e.epoch??tt.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(uC.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(uC.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=GOt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});uC.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,le(this)};uC.prototype.isDestroyed=function(){return!1};uC.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};uC.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let r=e.currentTime,o=this.epoch??tt.MINIMUM_VALUE,s=K.secondsDifference(r,o),a=t.duration,c,u=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let f=i?this.tolerance??1:.001;Math.abs(c-u)>f&&(this._seeking=!0,t.currentTime=c)};function GOt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var hse=uC;function WOt(e,t){this.rectangle=e,this.maxLevel=t}function RNe(e){this.ellipsoid=e.ellipsoid??ee.default,this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}RNe.prototype.build=function(e){e._tilingScheme=this.tilingScheme,e._heightmapWidth=this.heightmapWidth,e._heightmapHeight=this.heightmapHeight,e._levelZeroMaximumGeometricError=this.levelZeroMaximumGeometricError,e._rectangles=this.rectangles};function qOt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new er({ellipsoid:e.ellipsoid});else throw new oe(`SRS ${n} is not supported`);let i=t.getElementsByTagName("TileFormat")[0];e.heightmapWidth=parseInt(i.getAttribute("width"),10),e.heightmapHeight=parseInt(i.getAttribute("height"),10),e.levelZeroMaximumGeometricError=Xr.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let r=t.getElementsByTagName("DataExtent");for(let o=0;o<r.length;++o){let s=r[o],a=D.toRadians(parseFloat(s.getAttribute("minx"))),c=D.toRadians(parseFloat(s.getAttribute("miny"))),u=D.toRadians(parseFloat(s.getAttribute("maxx"))),f=D.toRadians(parseFloat(s.getAttribute("maxy"))),d=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new WOt(new ie(a,c,u,f),d))}}function YOt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Zr.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new oe(i)}async function XOt(e,t,n){try{let i=await t.fetchXML();qOt(e,i)}catch(i){YOt(t,i,n)}}function Ob(e){e=e??H.EMPTY_OBJECT,this._errorEvent=new be,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(Ob.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});Ob.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=new RNe(t),i=De.createIfNeeded(e);await XOt(n,i);let r=new Ob(t);return n.build(r),r._resource=i,r};Ob.prototype.requestTileGeometry=function(e,t,n,i){let r=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${r-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(s))return;let a=this;return Promise.resolve(s).then(function(c){return new jc({buffer:kh(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:KOt(a,e,t,n),structure:a._terrainDataStructure})})};Ob.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var ONe=new ie;function KOt(e,t,n,i){let r=e._tilingScheme,o=e._rectangles,s=r.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<o.length&&a!==15;++c){let u=o[c];if(u.maxLevel<=i)continue;let f=u.rectangle,d=ie.intersection(f,s,ONe);l(d)&&(N7(r,f,t*2,n*2,i+1)&&(a|=4),N7(r,f,t*2+1,n*2,i+1)&&(a|=8),N7(r,f,t*2,n*2+1,i+1)&&(a|=1),N7(r,f,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function N7(e,t,n,i,r){let o=e.tileXYToRectangle(n,i,r);return l(ie.intersection(o,t,ONe))}Ob.prototype.getTileDataAvailable=function(e,t,n){};Ob.prototype.loadTileDataAvailability=function(e,t,n){};var mse=Ob;var MNe={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033};Object.freeze(MNe);var pse=MNe;function $Ot(e){switch(e){case te.FLOAT:return"float";case te.FLOAT_VEC2:return"vec2";case te.FLOAT_VEC3:return"vec3";case te.FLOAT_VEC4:return"vec4";case te.FLOAT_MAT2:return"mat2";case te.FLOAT_MAT3:return"mat3";case te.FLOAT_MAT4:return"mat4";case te.SAMPLER_2D:return"sampler2D";case te.BOOL:return"bool"}}var gse=$Ot;function JOt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var ZU=JOt;function fC(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=new ai,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new U,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(fC.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){let e=this._framebuffers;if(l(e))return e[e.length-1].getColorTexture(0)}}});function NNe(e){let t=e._framebuffers;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}function ZOt(e,t){NNe(e);let n=e._width,i=e._height,r=t.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT,o=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(o);for(let c=0;c<o;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[c]=new ai,s[c].update(t,n,i,1,r);let a=s[o-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,r),e._framebuffers=s}function LNe(e){let t=e._commands;if(!l(t))return;let n=t.length;for(let i=0;i<n;++i)t[i].shaderProgram.destroy();e._commands=void 0}function QOt(e,t){let n;if(t===0)n={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{let i=e._framebuffers[t-1].getColorTexture(0);n={colorTexture:function(){return i},colorTextureDimensions:function(){return i.dimensions}}}return n.minMaxLuminance=function(){return e._minMaxLuminance},n.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},n}function eMt(e,t){let n=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
float sampleTexture(vec2 offset) {
`;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
return czm_luminance(color.rgb);
`:n+=` return texture(colorTexture, v_textureCoordinates + offset).r;
`,n+=`}
`,n+=`uniform vec2 colorTextureDimensions;
uniform vec2 minMaxLuminance;
uniform sampler2D previousLuminance;
void main() {
float color = 0.0;
float xStep = 1.0 / colorTextureDimensions.x;
float yStep = 1.0 / colorTextureDimensions.y;
int count = 0;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
vec2 offset;
offset.x = -xStep + float(i) * xStep;
offset.y = -yStep + float(j) * yStep;
if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
continue;
}
color += sampleTexture(offset);
++count;
}
}
if (count > 0) {
color /= float(count);
}
`,e===t-1&&(n+=` float previous = texture(previousLuminance, vec2(0.5)).r;
color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
color = previous + (color - previous) / (60.0 * 1.5);
color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
`),n+=` out_FragColor = vec4(color);
}
`,n}function tMt(e,t){LNe(e);let n=e._framebuffers,i=n.length,r=new Array(i);for(let o=0;o<i;++o)r[o]=t.createViewportQuadCommand(eMt(o,i),{framebuffer:n[o].framebuffer,uniformMap:QOt(e,o)});e._commands=r}fC.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new ui({color:new z(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let r=0;r<i;++r)t[r].clear(e,n)};fC.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,ZOt(this,e),tMt(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,r=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=r};fC.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let r=0;r<i;++r)n[r].execute(e)};fC.prototype.isDestroyed=function(){return!1};fC.prototype.destroy=function(){return NNe(this),LNe(this),le(this)};var QU=fC;var nMt=new h(1,1,1);function _se(e){e=e??nMt,this._dimensions=h.clone(e)}Object.defineProperties(_se.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){h.clone(e,this._dimensions)}}});var iMt=new h;_se.prototype.emit=function(e){let t=this._dimensions,n=h.multiplyByScalar(t,.5,iMt),i=D.randomBetween(-n.x,n.x),r=D.randomBetween(-n.y,n.y),o=D.randomBetween(-n.z,n.z);e.position=h.fromElements(i,r,o,e.position),e.velocity=h.normalize(e.position,e.velocity)};var yse=_se;var ez=`in vec2 v_textureCoordinates;
const float M_PI = 3.141592653589793;
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float phi = 2.0 * M_PI * xi.x;
float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangentX = normalize(cross(upVector, N));
vec3 tangentY = cross(N, tangentX);
return tangentX * H.x + tangentY * H.y + N * H.z;
}
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
float alphaRoughnessSq = alphaRoughness * alphaRoughness;
float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGX = GGXV + GGXL;
if (GGX > 0.0)
{
return 0.5 / GGX;
}
return 0.0;
}
vec2 integrateBrdf(float roughness, float NdotV)
{
vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
float A = 0.0;
float B = 0.0;
const int NumSamples = 1024;
float alphaRoughness = roughness * roughness;
for (int i = 0; i < NumSamples; i++)
{
vec2 xi = hammersley2D(i, NumSamples);
vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
vec3 L = 2.0 * dot(V, H) * H - V;
float NdotL = clamp(L.z, 0.0, 1.0);
float NdotH = clamp(H.z, 0.0, 1.0);
float VdotH = clamp(dot(V, H), 0.0, 1.0);
if (NdotL > 0.0)
{
float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
float Fc = pow(1.0 - VdotH, 5.0);
A += (1.0 - Fc) * G_Vis;
B += Fc * G_Vis;
}
}
return vec2(A, B) / float(NumSamples);
}
void main()
{
out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
}
`;function tz(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(tz.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function rMt(e,t,n){let i=t.createViewportQuadCommand(ez,{framebuffer:n,renderState:Ge.fromCache({viewport:new et(0,0,256,256)})});e._drawCommand=i}tz.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Dt({context:t,width:256,height:256,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:Ht.NEAREST});this._colorTexture=n;let i=new ys({context:t,colorTextures:[n],destroyAttachments:!1});rMt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};tz.prototype.isDestroyed=function(){return!1};tz.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),le(this)};var nz=tz;var Ase=0,FNe=new h,L7=new h,oMt=new Lo;function sMt(e,t,n){let i=t.tileX,r=t.tileY,o=t.tileZ,s=n?.featureIdProperty,a=oMt.tileXYToRectangle(i,r,o),c=ie.center(a),u=h.fromRadians(c.longitude,c.latitude,0),f=4294967295,d=f,p=f,g=new Map,m=new Map,y=[],A=[],b=[],x=0;function T(){let B=(4-x%4)%4;B>0&&(b.push(new Uint8Array(B)),x+=B)}function E(B,j){T();let k=x;b.push(new Uint8Array(B.buffer,B.byteOffset,B.byteLength)),x+=B.byteLength;let G=y.length;return y.push({buffer:0,byteOffset:k,byteLength:B.byteLength,target:j}),G}function v(B,j){let k=E(B,j.target),G=bt.getComponentCount(j.type),q={bufferView:k,byteOffset:0,componentType:j.componentType,count:B.length/G,type:j.type};l(j.min)&&(q.min=j.min),l(j.max)&&(q.max=j.max);let Q=A.length;return A.push(q),Q}function S(B){let j=Number.POSITIVE_INFINITY,k=Number.POSITIVE_INFINITY,G=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,W=Number.NEGATIVE_INFINITY;for(let J=0;J<B.length;J+=3){let Z=B[J],ae=B[J+1],Ae=B[J+2];Z<j&&(j=Z),ae<k&&(k=ae),Ae<G&&(G=Ae),Z>q&&(q=Z),ae>Q&&(Q=ae),Ae>W&&(W=Ae)}return{min:[j,k,G],max:[q,Q,W]}}function I(B,j,k){if(k.length===0)return;let G=new Uint32Array(k),q=v(G,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ARRAY_BUFFER});B._FEATURE_ID_0=q;let Q={featureCount:g.size,nullFeatureId:d,attribute:0};m.size>0&&(Q.propertyTable=0),j.EXT_mesh_features={featureIds:[Q]}}function R(B,j){j=j??4;let k=(j-x%j)%j;k>0&&(b.push(new Uint8Array(k)),x+=k);let G=x;b.push(B),x+=B.byteLength;let q=y.length;return y.push({buffer:0,byteOffset:G,byteLength:B.byteLength}),q}function O(){if(m.size===0)return;let B=new Map;for(let q of m.values())for(let[Q,W]of Object.entries(q)){if(!l(W))continue;let J=typeof W,Z;J==="string"?Z="STRING":J==="number"?Z="SCALAR":J==="boolean"?Z="BOOLEAN":Z="STRING";let ae=B.get(Q);l(ae)?ae!==Z&&B.set(Q,"STRING"):B.set(Q,Z)}if(B.size===0)return;let j={};for(let[q,Q]of B)Q==="SCALAR"?j[q]={type:"SCALAR",componentType:"FLOAT64"}:Q==="BOOLEAN"?j[q]={type:"BOOLEAN"}:j[q]={type:"STRING"};let k={},G=g.size;for(let[q,Q]of B)if(Q==="SCALAR"){let W=new Float64Array(G);for(let Z=0;Z<G;Z++){let Ae=m.get(Z)?.[q];W[Z]=typeof Ae=="number"&&Number.isFinite(Ae)?Ae:NaN}let J=R(new Uint8Array(W.buffer,W.byteOffset,W.byteLength),8);k[q]={values:J}}else if(Q==="BOOLEAN"){let W=Math.ceil(G/8),J=new Uint8Array(W);for(let ae=0;ae<G;ae++)m.get(ae)?.[q]&&(J[ae>>3]|=1<<(ae&7));let Z=R(J);k[q]={values:Z}}else{let W=new TextEncoder,J=[],Z=new Uint32Array(G+1),ae=0;for(let we=0;we<G;we++){Z[we]=ae;let Re=m.get(we)?.[q],Qe;Re==null?Qe="":typeof Re=="string"?Qe=Re:Qe=String(Re);let He=W.encode(Qe);J.push(He),ae+=He.byteLength}Z[G]=ae;let Ae=new Uint8Array(ae),fe=0;for(let we of J)Ae.set(we,fe),fe+=we.byteLength;let xe=R(Ae),ge=R(new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength));k[q]={values:xe,stringOffsets:ge,stringOffsetType:"UINT32"}}return{schema:{classes:{mvt_feature:{properties:j}}},propertyTables:[{class:"mvt_feature",count:G,properties:k}]}}let L=[],_=[],C=[u.x,u.y,u.z];for(let B of e.layers){let j=B.extent,k=[],G=[],q=[],Q=[],W=[],J=0,Z=[],ae=[],Ae=[],fe=[],xe=[],ge=[],we=[],Se=0;for(let He of B.features){let Xe=l(s)?cMt(He,s,g)??d:aMt(He,g);if(Xe!==d&&!m.has(Xe)){let $e=Object.assign({},He.properties);$e._layer=B.name??"",m.set(Xe,$e)}if(He.type==="Point"){let $e=He.geometry;for(let Pe of $e)bse(Pe,i,r,o,j,Ase,u,k),G.push(Xe);continue}if(He.type==="LineString"){let $e=He.geometry;for(let Pe of $e){let qe=q.length/3;for(let st of Pe)bse(st,i,r,o,j,Ase,u,q),Q.push(Xe);for(let st=0;st<Pe.length;st++)W.push(qe+st);W.push(p),J++}continue}if(He.type==="Polygon"){let $e=He.geometry,Pe=lMt($e);for(let qe of Pe){let st=[qe.outerRing,...qe.holes],vt=[],Gt=[],lt=[],mt=0;for(let ht=0;ht<st.length;ht++){let Bi=st[ht];ht>0&&lt.push(mt);for(let Xn of Bi)vt.push(new U(Xn.x,Xn.y)),bse(Xn,i,r,o,j,Ase,u,Gt),mt++}if(vt.length<3)continue;let ft=fi.triangulate(vt,lt.length>0?lt:void 0);if(!l(ft)||ft.length===0){_t("buildVectorGltfFromMVT-triangulation-failed","Polygon triangulation failed; skipping polygon.");continue}let Xt=Z.length/3,rt=Ae.length;fe.push(Xt),xe.push(rt),ge.push(lt.length);for(let ht=0;ht<lt.length;ht++)we.push(Xt+lt[ht]);for(let ht=0;ht<Gt.length;ht++)Z.push(Gt[ht]);for(let ht=0;ht<Gt.length/3;ht++)ae.push(Xe);for(let ht=0;ht<ft.length;ht++)Ae.push(ft[ht]+Xt);Se++}}}if(k.length===0&&q.length===0&&Z.length===0)continue;W.length>0&&W[W.length-1]===p&&W.pop();let Re=[];if(k.length>0){let He=new Float32Array(k),Xe=S(He),Pe={POSITION:v(He,{type:"VEC3",componentType:Y.FLOAT,target:te.ARRAY_BUFFER,min:Xe.min,max:Xe.max})},qe={CESIUM_mesh_vector:{vector:!0,count:He.length/3}};I(Pe,qe,G),Re.push({mode:Oe.POINTS,attributes:Pe,extensions:qe})}if(q.length>0&&W.length>1){let He=new Float32Array(q),Xe=new Uint32Array(W),$e=S(He),Pe=v(He,{type:"VEC3",componentType:Y.FLOAT,target:te.ARRAY_BUFFER,min:$e.min,max:$e.max}),qe=v(Xe,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ELEMENT_ARRAY_BUFFER}),st={POSITION:Pe},vt={CESIUM_mesh_vector:{vector:!0,count:J}};I(st,vt,Q),Re.push({mode:Oe.LINE_STRIP,indices:qe,attributes:st,extensions:vt})}if(Z.length>0&&Ae.length>=3){let He=new Float32Array(Z),Xe=new Uint32Array(Ae),$e=new Uint32Array(fe),Pe=new Uint32Array(xe),qe=we.length>0,st=qe?new Uint32Array(ge):void 0,vt=qe?new Uint32Array(we):void 0,Gt=S(He),lt=v(He,{type:"VEC3",componentType:Y.FLOAT,target:te.ARRAY_BUFFER,min:Gt.min,max:Gt.max}),mt=v(Xe,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ELEMENT_ARRAY_BUFFER}),ft=v($e,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ARRAY_BUFFER}),Xt=v(Pe,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ARRAY_BUFFER}),rt=l(st)?v(st,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ARRAY_BUFFER}):void 0,ht=l(vt)?v(vt,{type:"SCALAR",componentType:Y.UNSIGNED_INT,target:te.ARRAY_BUFFER}):void 0,Bi={POSITION:lt},Xn={CESIUM_mesh_vector:{vector:!0,count:Se,polygonAttributeOffsets:ft,polygonIndicesOffsets:Xt}};qe&&(Xn.CESIUM_mesh_vector.polygonHoleCounts=rt,Xn.CESIUM_mesh_vector.polygonHoleOffsets=ht),I(Bi,Xn,ae),Re.push({mode:Oe.TRIANGLES,indices:mt,attributes:Bi,extensions:Xn})}if(Re.length===0)continue;let Qe=L.length;L.push({primitives:Re}),_.push({name:B.name,mesh:Qe,translation:C})}if(_.length===0)return;let w=O(),P=hMt(b,x),M=["CESIUM_mesh_vector"];g.size>0&&M.push("EXT_mesh_features"),l(w)&&M.push("EXT_structural_metadata");let F=_.map((B,j)=>j),V={asset:{version:"2.0"},extensionsUsed:M,scene:0,scenes:[{nodes:F}],nodes:_,meshes:L,accessors:A,bufferViews:y,buffers:[{byteLength:P.byteLength}],extensions:void 0};return l(w)&&(V.extensions={EXT_structural_metadata:w}),dMt(V,P)}function aMt(e,t){let n=t.get(e);return l(n)||(n=t.size,t.set(e,n)),n}function cMt(e,t,n){let i=e.properties;if(!l(i))return;let r=i[t];if(!l(r)||typeof r!="string"&&typeof r!="number"&&typeof r!="boolean"||typeof r=="number"&&!Number.isFinite(r))return;let o=`${typeof r}:${r}`,s=n.get(o);return l(s)||(s=n.size,n.set(o,s)),s}function lMt(e){let t=[];for(let n of e){let i=fMt(n);if(i.length<3)continue;uMt(i)<=0?t.push({outerRing:i,holes:[]}):t.length>0&&t[t.length-1].holes.push(i)}return t}function uMt(e){let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++)t+=(e[i].x+e[n].x)*(e[i].y-e[n].y);return t/2}function fMt(e){return e.length>1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y?e.slice(0,e.length-1):e}function bse(e,t,n,i,r,o,s,a){let c=1<<i,u=(t+e.x/r)/c,f=(n+e.y/r)/c,d=u*2*Math.PI-Math.PI,p=Math.atan(Math.sinh(Math.PI*(1-2*f)));h.fromRadians(d,p,o,void 0,FNe),h.subtract(FNe,s,L7),a.push(L7.x,L7.y,L7.z)}function dMt(e,t){let s=new TextEncoder().encode(JSON.stringify(e)),a=Math.ceil(s.length/4)*4,c=new Uint8Array(a);c.fill(32),c.set(s);let u=Math.ceil(t.byteLength/4)*4,f=new Uint8Array(u);f.set(t);let d=20+a+8+u,p=new Uint8Array(d),g=new DataView(p.buffer),m=0;return g.setUint32(m,1179937895,!0),m+=4,g.setUint32(m,2,!0),m+=4,g.setUint32(m,d,!0),m+=4,g.setUint32(m,a,!0),m+=4,g.setUint32(m,1313821514,!0),m+=4,p.set(c,m),m+=a,g.setUint32(m,u,!0),m+=4,g.setUint32(m,5130562,!0),m+=4,p.set(f,m),p}function hMt(e,t){let n=new Uint8Array(t),i=0;for(let r of e)n.set(r,i),i+=r.byteLength;return n}var iz=sMt;var BNe={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"};Object.freeze(BNe);var B0=BNe;function AP(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}AP.prototype.getTexture=function(e){return this._textures[e]};function mMt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}AP.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):mMt(this,e,t)};function pMt(e,t,n){let{id:i,textureUniform:r,image:o}=t,s=n.webgl2?F7(r,o,n):gMt(r,o,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function F7(e,t,n){let{typedArray:i,sampler:r}=e,o=l(i)?UNe(e,n):new Dt({context:n,source:t,sampler:r});return kNe(r)&&o.generateMipmap(),o}function gMt(e,t,n){let{typedArray:i,sampler:r}=e,o=kNe(r),s=r.wrapS===hn.REPEAT||r.wrapS===hn.MIRRORED_REPEAT||r.wrapT===hn.REPEAT||r.wrapT===hn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,u=[a,c].every(D.isPowerOfTwo);if((o||s)&&!u)if(l(i)){if(e.pixelDatatype===ze.UNSIGNED_BYTE){let d=UU(i,a,c),p=sA(d);return F7({sampler:r},p,n)}}else{let d=sA(t);return F7(e,d,n)}else return F7(e,t,n);return o?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),UNe(e,n)}function kNe(e){return[Wt.NEAREST_MIPMAP_NEAREST,Wt.NEAREST_MIPMAP_LINEAR,Wt.LINEAR_MIPMAP_NEAREST,Wt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function UNe(e,t){let{pixelFormat:n,pixelDatatype:i,width:r,height:o,typedArray:s,sampler:a}=e;return new Dt({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:r,height:o},sampler:a,flipY:!1})}AP.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let r=n[i];pMt(this,r,t)}n.length=0};AP.prototype.isDestroyed=function(){return!1};AP.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return le(this)};var rz=AP;function oz(e){e=e??H.EMPTY_OBJECT,this.mode=e.mode??Kg.MODIFY_MATERIAL,this.lightingModel=e.lightingModel,this.uniforms=e.uniforms??H.EMPTY_OBJECT,this.varyings=e.varyings??H.EMPTY_OBJECT,this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=e.translucencyMode??TA.INHERIT,this._textureManager=new rz,this._defaultTexture=void 0,this.uniformMap=_Mt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},bMt(this),xMt(this)}function _Mt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];r.type===B0.SAMPLER_2D?(e._textureManager.loadTexture2D(i,r.value),n[i]=yMt(e,i)):n[i]=AMt(e,i)}return n}function yMt(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function AMt(e,t){return function(){return e.uniforms[t].value}}function dC(e,t,n){let i;for(;(i=t.exec(e))!==null;){let r=i[1];n[r]=!0}}function bMt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.(?:metadata|metadataClass|metadataStatistics)\.(\w+)/g,r,o=e.vertexShaderText;l(o)&&(r=e.usedVariablesVertex.attributeSet,dC(o,t,r),r=e.usedVariablesVertex.featureIdSet,dC(o,n,r),r=e.usedVariablesVertex.metadataSet,dC(o,i,r));let s=e.fragmentShaderText;if(l(s)){r=e.usedVariablesFragment.attributeSet,dC(s,t,r),r=e.usedVariablesFragment.featureIdSet,dC(s,n,r),r=e.usedVariablesFragment.metadataSet,dC(s,i,r);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;dC(s,a,c)}}function zNe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function Sl(e,t,n,i){if(e.hasOwnProperty(t)){let r=`${zNe(t)} is not available in the ${i} shader. Did you mean ${zNe(n)} instead?`;throw new pe(r)}}function xMt(e){let t=e.usedVariablesVertex.attributeSet;Sl(t,"position","positionMC","vertex"),Sl(t,"normal","normalMC","vertex"),Sl(t,"tangent","tangentMC","vertex"),Sl(t,"bitangent","bitangentMC","vertex"),Sl(t,"positionWC","positionMC","vertex"),Sl(t,"positionEC","positionMC","vertex"),Sl(t,"normalEC","normalMC","vertex"),Sl(t,"tangentEC","tangentMC","vertex"),Sl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;Sl(n,"position","positionEC","fragment"),Sl(n,"normal","normalEC","fragment"),Sl(n,"tangent","tangentEC","fragment"),Sl(n,"bitangent","bitangentEC","fragment"),Sl(n,"normalMC","normalEC","fragment"),Sl(n,"tangentMC","tangentEC","fragment"),Sl(n,"bitangentMC","bitangentEC","fragment")}oz.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===B0.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};oz.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};oz.prototype.isDestroyed=function(){return!1};oz.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),le(this)};var k0=oz;function TMt(e){e=e??H.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??Ke.RGBA,this.pixelDatatype=e.pixelDatatype??ze.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=De.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?hn.REPEAT:hn.CLAMP_TO_EDGE;this.sampler=new Ht({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var sz=TMt;function EMt(e){let{names:t,types:n,componentTypes:i,minimumValues:r,maximumValues:o}=e;for(let s=0;s<t.length;s++){if(!CMt(r?.[s],o?.[s]))continue;let a=vMt(t[s],n[s],i[s],r[s],o[s]);if(l(a))return a}}function CMt(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;let n=Math.min(...e),i=Math.max(...t);return n<i}function vMt(e,t,n,i,r){if(t===bt.VEC4&&n===Lt.FLOAT32)return SMt(e,i,r);if(t===bt.SCALAR&&n===Lt.FLOAT32)return wMt(e,i,r)}function SMt(e,t,n){let i=Math.min(...t),r=Math.max(...n);if(!(i<0||r>1))return new k0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
material.diffuse = fsInput.metadata.${e}.rgb;
material.alpha = fsInput.metadata.${e}.a;
}`})}function wMt(e,t,n){let r=MU([new z(.267,.004,.329),new z(.282,.14,.457),new z(.254,.265,.53),new z(.207,.372,.553),new z(.164,.471,.558),new z(.128,.567,.551),new z(.135,.659,.518),new z(.194,.741,.443),new z(.282,.819,.369),new z(.396,.898,.301),new z(.538,.965,.236),new z(.741,.998,.149),new z(.993,1,.144)],128),o=new sz({typedArray:r,width:128,height:1});return new k0({uniforms:{u_colorMap:{type:B0.SAMPLER_2D,value:o},u_minimumValue:{type:B0.FLOAT,value:t[0]},u_maximumValue:{type:B0.FLOAT,value:n[0]}},fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
float value = fsInput.metadata.${e};
vec3 voxelNormal = fsInput.attributes.normalEC;
float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
float lighting = 0.5 + 0.5 * diffuse;
if (value >= u_minimumValue && value <= u_maximumValue) {
float lerp = (value - u_minimumValue) / (u_maximumValue - u_minimumValue);
material.diffuse = texture(u_colorMap, vec2(lerp, 0.5)).rgb * lighting;
material.alpha = 1.0;
}
}`})}var bP=EMt;function IMt(e,t){let{shaderBuilder:n}=e,{names:i,types:r,componentTypes:o,minimumValues:s,maximumValues:a}=t._provider,c=r.length,u=l(s)&&l(a);n.addDefine("METADATA_COUNT",c,de.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,de.FRAGMENT);for(let _=0;_<c;_++){let C=i[_],w=B7(r[_]),P=`PropertyStatistics_${C}`,M=`PropertyStatistics_${C}`;n.addStruct(P,M,de.FRAGMENT),n.addStructField(P,w,"min"),n.addStructField(P,w,"max")}let f="MetadataStatistics",d="MetadataStatistics",p="metadataStatistics";n.addStruct(f,d,de.FRAGMENT);for(let _=0;_<c;_++){let C=i[_],w=`PropertyStatistics_${C}`,P=C;n.addStructField(f,w,P)}let g="Metadata",m="Metadata",y="metadata";n.addStruct(g,m,de.FRAGMENT);for(let _=0;_<c;_++){let C=B7(r[_]);n.addStructField(g,C,i[_])}let A="Attributes",b="Attributes",x="attributes";n.addStruct(A,b,de.FRAGMENT),n.addStructField(A,"vec3","positionEC"),n.addStructField(A,"vec3","normalEC");let T="Voxel",E="Voxel",v="voxel";n.addStruct(T,E,de.FRAGMENT),n.addStructField(T,"vec3","viewDirUv"),n.addStructField(T,"float","travelDistance"),n.addStructField(T,"int","stepCount"),n.addStructField(T,"int","tileIndex"),n.addStructField(T,"int","sampleIndex"),n.addStructField(T,"float","distanceToDepthBuffer");let S="FragmentInput";n.addStruct(S,"FragmentInput",de.FRAGMENT),n.addStructField(S,d,p),n.addStructField(S,m,y),n.addStructField(S,b,x),n.addStructField(S,E,v);let R="Properties",O="Properties",L="properties";n.addStruct(R,O,de.FRAGMENT);for(let _=0;_<c;_++){let C=B7(r[_]);n.addStructField(R,C,i[_])}{let _="clearProperties";n.addFunction(_,`${O} clearProperties()`,de.FRAGMENT),n.addFunctionLines(_,[`${O} ${L};`]);for(let C=0;C<c;C++){let w=B7(r[C],o[C]);n.addFunctionLines(_,[`${L}.${i[C]} = ${w}(0.0);`])}n.addFunctionLines(_,[`return ${L};`])}{let _="sumProperties";n.addFunction(_,`${O} sumProperties(${O} propertiesA, ${O} propertiesB)`,de.FRAGMENT),n.addFunctionLines(_,[`${O} ${L};`]);for(let C=0;C<c;C++){let w=i[C];n.addFunctionLines(_,[`${L}.${w} = propertiesA.${w} + propertiesB.${w};`])}n.addFunctionLines(_,[`return ${L};`])}{let _="scaleProperties";n.addFunction(_,`${O} scaleProperties(${O} ${L}, float scale)`,de.FRAGMENT),n.addFunctionLines(_,[`${O} scaledProperties = ${L};`]);for(let C=0;C<c;C++)n.addFunctionLines(_,[`scaledProperties.${i[C]} *= scale;`]);n.addFunctionLines(_,["return scaledProperties;"])}{let _="mixProperties";n.addFunction(_,`${O} mixProperties(${O} propertiesA, ${O} propertiesB, float mixFactor)`,de.FRAGMENT),n.addFunctionLines(_,[`${O} ${L};`]);for(let C=0;C<c;C++){let w=i[C];n.addFunctionLines(_,[`${L}.${w} = mix(propertiesA.${w}, propertiesB.${w}, mixFactor);`])}n.addFunctionLines(_,[`return ${L};`])}{let _="copyPropertiesToMetadata";n.addFunction(_,`void copyPropertiesToMetadata(in ${O} ${L}, inout ${m} ${y})`,de.FRAGMENT);for(let C=0;C<c;C++){let w=i[C];n.addFunctionLines(_,[`${y}.${w} = ${L}.${w};`])}}if(u){let _="setStatistics";n.addFunction(_,`void setStatistics(inout ${d} ${p})`,de.FRAGMENT);for(let C=0;C<c;C++){let w=i[C],P=r[C],M=bt.getComponentCount(P);for(let F=0;F<M;F++){let V=DMt(P,F),B=s[C][F],j=a[C][F];!l(B)||!l(j)||n.addFunctionLines(_,[`${p}.${w}.min${V} = ${VNe(B)};`,`${p}.${w}.max${V} = ${VNe(j)};`])}}}{let _="getPropertiesFromMegatextureAtUv";n.addFunction(_,`${O} getPropertiesFromMegatextureAtUv(vec3 texcoord)`,de.FRAGMENT),n.addFunctionLines(_,[`${O} ${L};`]);for(let C=0;C<c;C++){let w=r[C],P=o[C],M=PMt(w,P);n.addFunctionLines(_,[`properties.${i[C]} = texture(u_megatextureTextures[${C}], texcoord)${M};`])}n.addFunctionLines(_,[`return ${L};`])}}function B7(e){if(e===bt.SCALAR)return"float";if(e===bt.VEC2)return"vec2";if(e===bt.VEC3)return"vec3";if(e===bt.VEC4)return"vec4"}function PMt(e){if(e===bt.SCALAR)return".r";if(e===bt.VEC2)return".ra";if(e===bt.VEC3)return".rgb";if(e===bt.VEC4)return""}function VNe(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function DMt(e,t){return e===bt.SCALAR?"":`[${t}]`}var az=IMt;function ap(e){let{planes:t,modelMatrix:n=N.IDENTITY,unionClippingRegions:i=!1}=e??H.EMPTY_OBJECT;if(this._planes=[],this.modelMatrix=N.clone(n),this.planeAdded=new be,this.planeRemoved=new be,this._unionClippingRegions=i,this._testIntersection=i?jNe:HNe,this._float32View=void 0,this._clippingPlanesTexture=void 0,l(t))for(let r=0;r<t.length;++r)this.add(t[r])}function jNe(e){return e===$t.OUTSIDE}function HNe(e){return e===$t.INSIDE}Object.defineProperties(ap.prototype,{length:{get:function(){return this._planes.length}},unionClippingRegions:{get:function(){return this._unionClippingRegions},set:function(e){this._unionClippingRegions!==e&&(this._unionClippingRegions=e,this._testIntersection=e?jNe:HNe)}},texture:{get:function(){return this._clippingPlanesTexture}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});ap.prototype.add=function(e){let t=this._planes.length;e.index=t,this._planes.push(e),this.planeAdded.raiseEvent(e,t)};ap.prototype.get=function(e){return this._planes[e]};function GNe(e,t){for(let n=0;n<e.length;++n)if(sn.equals(e[n],t))return n;return-1}ap.prototype.contains=function(e){return GNe(this._planes,e)!==-1};ap.prototype.remove=function(e){let t=this._planes,n=GNe(t,e);if(n===-1)return!1;e instanceof ia&&(e.onChangeCallback=void 0,e.index=-1);let i=t.length-1;for(let r=n;r<i;++r){let o=t[r+1];t[r]=o,o instanceof ia&&(o.index=r)}return t.length=i,this.planeRemoved.raiseEvent(e,n),!0};ap.prototype.removeAll=function(){let e=this._planes;for(let t=0;t<e.length;++t){let n=e[t];n instanceof ia&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,t)}this._planes=[]};var RMt=new sn(h.fromElements(1,0,0),0);function OMt(e,t){let n=e._float32View,i=e._planes,r=0;for(let o=0;o<i.length;++o){let{normal:s,distance:a}=NMt(i[o],t,RMt);n[r]=s.x,n[r+1]=s.y,n[r+2]=s.z,n[r+3]=a,r+=4}}var xse=new se,MMt=new h;function NMt(e,t,n){let{normal:i,distance:r}=e,o=se.fromElements(i.x,i.y,i.z,r,xse),s=N.multiplyByVector(t,o,xse),a=h.fromCartesian4(s,MMt);return s=se.divideByScalar(s,h.magnitude(a),xse),sn.fromCartesian4(s,n)}function WNe(e,t){return t.x=Math.min(e,Ut.maximumTextureSize),t.y=Math.ceil(e/t.x),t}var LMt=new U;ap.prototype.update=function(e,t){let n=this._clippingPlanesTexture,i=this.length;if(l(n)){let s=n.width*n.height;(s<i||i<.25*s)&&(n.destroy(),n=void 0,this._clippingPlanesTexture=void 0)}if(this.length===0)return;if(!l(n)){let s=WNe(i,LMt);s.y*=2,n=new Dt({context:e.context,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT,sampler:Ht.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4),this._clippingPlanesTexture=n}let{width:r,height:o}=n;OMt(this,t),n.copyFrom({source:{width:r,height:o,arrayBufferView:this._float32View}})};ap.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let r=e.length,o=WNe(r,n);return o.y*=2,o};ap.prototype.isDestroyed=function(){return!1};ap.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),le(this)};var ay=ap;var cz=`struct Ray {
vec3 pos;
vec3 dir;
};
float minComponent(in vec3 v) {
return min(min(v.x, v.y), v.z);
}
float maxComponent(in vec3 v) {
return max(max(v.x, v.y), v.z);
}
`;var lz=`#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
#if defined(PICKING_VOXEL)
#define ALPHA_ACCUM_MAX 0.1
#else
#define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
#endif
uniform mat4 u_transformPositionViewToLocal;
uniform mat3 u_transformDirectionViewToLocal;
uniform vec3 u_cameraPositionLocal;
uniform vec3 u_cameraDirectionLocal;
uniform float u_stepSize;
#if defined(PICKING)
uniform vec4 u_pickColor;
#endif
vec3 getSampleSize(in int level) {
vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
vec3 sampleSizeUv = 1.0 / sampleCount;
return scaleShapeUvToShapeSpace(sampleSizeUv);
}
#define MINIMUM_STEP_SCALAR (0.02)
#define SHIFT_FRACTION (0.001)
RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
vec3 voxelCoord = tileUv * vec3(u_dimensions);
vec3 directions = sign(sampleSizeAlongRay);
vec3 positiveDirections = max(directions, 0.0);
vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
vec3 exitCoord = entryCoord + directions;
vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
float lastEntry = maxComponent(distanceFromEntry);
bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
vec4 entry = vec4(entryNormal, lastEntry);
vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
float firstExit = minComponent(distanceToExit);
bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
vec3 exitNormal = vec3(isFirstExit) * directions;
vec4 exit = vec4(exitNormal, firstExit);
return RayShapeIntersection(entry, exit);
}
vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
vec3 gradient = viewRay.dir * jacobianT;
vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
vec3 voxelNormal = jacobianT * voxelIntersection.entry.xyz;
voxelNormal = normalize(czm_normal * voxelNormal);
vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
float shift = fixedStep * SHIFT_FRACTION;
float dt = voxelIntersection.exit.w + shift;
if ((currentT + dt) > shapeIntersection.exit.w) {
dt = shapeIntersection.exit.w - currentT + shift;
}
float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
return vec4(entry.xyz, stepSize);
}
vec2 packIntToVec2(int value) {
float shifted = float(value) / 255.0;
float lowBits = fract(shifted);
float highBits = floor(shifted) / 255.0;
return vec2(highBits, lowBits);
}
vec2 packFloatToVec2(float value) {
float lowBits = fract(value);
float highBits = floor(value) / 255.0;
return vec2(highBits, lowBits);
}
int getSampleIndex(in SampleData sampleData) {
vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5);
vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate);
ivec3 sampleIndex = ivec3(floor(inputCoordinate));
return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z);
}
Ray getViewRayLocal() {
vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
vec3 origin;
vec3 direction;
if (czm_orthographicIn3D == 1.0) {
eyeCoordinates.z = 0.0;
origin = (u_transformPositionViewToLocal * eyeCoordinates).xyz;
direction = u_cameraDirectionLocal;
} else {
origin = u_cameraPositionLocal;
direction = u_transformDirectionViewToLocal * normalize(eyeCoordinates.xyz);
}
return Ray(origin, direction);
}
Ray getViewRayEC() {
vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
vec3 viewPosEC = (czm_orthographicIn3D == 1.0)
? vec3(eyeCoordinates.xy, 0.0)
: vec3(0.0);
vec3 viewDirEC = normalize(eyeCoordinates.xyz);
return Ray(viewPosEC, viewDirEC);
}
void main()
{
Ray viewRayLocal = getViewRayLocal();
Ray viewRayEC = getViewRayEC();
Intersections ix;
vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayLocal, viewRayEC, ix);
if (shapeIntersection.entry.w == NO_HIT) {
discard;
}
float currentT = shapeIntersection.entry.w;
float endT = shapeIntersection.exit.w;
vec3 positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
TileAndUvCoordinate tileAndUv = getTileAndUvCoordinate(positionEC);
vec3 positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
mat3 jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
TraversalData traversalData;
SampleData sampleDatas[SAMPLE_COUNT];
traverseOctreeFromBeginning(tileAndUv, traversalData, sampleDatas);
vec4 step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
FragmentInput fragmentInput;
#if defined(STATISTICS)
setStatistics(fragmentInput.metadataStatistics);
#endif
czm_modelMaterial materialOutput;
vec4 colorAccum = vec4(0.0);
for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
copyPropertiesToMetadata(properties, fragmentInput.metadata);
fragmentInput.attributes.positionEC = positionEC;
fragmentInput.attributes.normalEC = normalize(step.xyz);
fragmentInput.voxel.viewDirUv = viewRayLocal.dir;
fragmentInput.voxel.travelDistance = step.w;
fragmentInput.voxel.stepCount = stepCount;
fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0]);
fragmentInput.voxel.distanceToDepthBuffer = ix.distanceToDepthBuffer - currentT;
fragmentMain(fragmentInput, materialOutput);
vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
color.rgb = max(color.rgb, vec3(0.0));
color.a = clamp(color.a, 0.0, 1.0);
colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
if (colorAccum.a > ALPHA_ACCUM_MAX) {
colorAccum.a = ALPHA_ACCUM_MAX;
break;
}
if (step.w == 0.0) {
step.w = 0.001;
}
currentT += step.w;
if (currentT > endT) {
#if (INTERSECTION_COUNT == 1)
break;
#else
shapeIntersection = nextIntersection(ix);
if (shapeIntersection.entry.w == NO_HIT) {
break;
} else {
currentT = shapeIntersection.entry.w;
endT = shapeIntersection.exit.w;
}
#endif
}
positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
tileAndUv = getTileAndUvCoordinate(positionEC);
positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
traverseOctreeFromExisting(tileAndUv, traversalData, sampleDatas);
step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
}
colorAccum.a /= ALPHA_ACCUM_MAX;
#if defined(PICKING)
if (colorAccum.a == 0.0) {
discard;
}
out_FragColor = u_pickColor;
#elif defined(PICKING_VOXEL)
if (colorAccum.a == 0.0) {
discard;
}
vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0]));
out_FragColor = vec4(megatextureId, sampleIndex);
#else
out_FragColor = colorAccum;
#endif
}
`;var uz=`in vec2 position;
uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
void main() {
vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
vec2 translation = 0.5 * (aabbMax + aabbMin);
vec2 scale = 0.5 * (aabbMax - aabbMin);
gl_Position = vec4(position * scale + translation, 0.0, 1.0);
}
`;var fz=`#define NO_HIT (-czm_infinity)
#define INF_HIT (czm_infinity * 0.5)
struct RayShapeIntersection {
vec4 entry;
vec4 exit;
};
vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
{
if (intersect0.w == NO_HIT) {
return intersect1;
} else if (intersect1.w == NO_HIT) {
return intersect0;
}
return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
}
vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
{
return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
}
RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
{
bool missed = (intersect0.entry.w == NO_HIT) ||
(intersect1.entry.w == NO_HIT) ||
(intersect0.exit.w < intersect1.entry.w) ||
(intersect0.entry.w > intersect1.exit.w);
if (missed) {
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
return RayShapeIntersection(miss, miss);
}
vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
return RayShapeIntersection(entry, exit);
}
struct Intersections {
vec4 intersections[INTERSECTION_COUNT * 2];
float distanceToDepthBuffer;
#if (INTERSECTION_COUNT > 1)
int index;
int surroundCount;
bool surroundIsPositive;
#endif
};
RayShapeIntersection getFirstIntersection(in Intersections ix)
{
return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
}
vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
{
float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
return vec4(intersection.xyz * scale, intersection.w);
}
#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)
#if (INTERSECTION_COUNT > 1)
void initializeIntersections(inout Intersections ix) {
const int sortPasses = INTERSECTION_COUNT * 2 - 1;
for (int n = sortPasses; n > 0; --n) {
for (int i = 0; i < sortPasses; ++i) {
if (i >= n) { break; }
vec4 intersect0 = ix.intersections[i + 0];
vec4 intersect1 = ix.intersections[i + 1];
bool inOrder = intersect0.w <= intersect1.w;
ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
}
}
ix.index = 0;
ix.surroundCount = 0;
ix.surroundIsPositive = false;
}
#endif
#if (INTERSECTION_COUNT > 1)
RayShapeIntersection nextIntersection(inout Intersections ix) {
vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
const int passCount = INTERSECTION_COUNT * 2;
if (ix.index == passCount) {
return shapeIntersection;
}
for (int i = 0; i < passCount; ++i) {
if (i < ix.index) {
continue;
}
ix.index = i + 1;
surfaceIntersection = ix.intersections[i];
int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
bool currShapeIsPositive = intersectionType < 2;
bool enter = intersectionType % 2 == 0;
ix.surroundCount += enter ? +1 : -1;
ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
shapeIntersection.entry = surfaceIntersection;
}
bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
if (exitPositive || enterNegativeFromPositive) {
shapeIntersection.exit = surfaceIntersection;
if (exitPositive) {
ix.index = passCount;
}
break;
}
}
return shapeIntersection;
}
#endif
`;var dz=`void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
float entry;
float exit;
if (logDepthOrDepth != 0.0) {
vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
eyeCoordinateDepth /= eyeCoordinateDepth.w;
entry = dot(eyeCoordinateDepth.xyz - ray.pos, ray.dir);
exit = +INF_HIT;
} else {
entry = NO_HIT;
exit = NO_HIT;
}
ix.distanceToDepthBuffer = entry;
#if defined(DEPTH_TEST)
setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit));
#endif
}
`;var hz=`uniform sampler2D u_clippingPlanesTexture;
uniform mat4 u_clippingPlanesMatrix;
vec4 intersectPlane(in Ray ray, in vec4 plane) {
vec3 n = plane.xyz;
float w = plane.w;
float a = dot(ray.pos, n);
float b = dot(ray.dir, n);
float t = -(w + a) / b;
return vec4(n, t);
}
#ifdef CLIPPING_PLANES
void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
vec4 backSide = vec4(-ray.dir, -INF_HIT);
vec4 farSide = vec4(ray.dir, +INF_HIT);
RayShapeIntersection clippingVolume;
#if (CLIPPING_PLANES_COUNT == 1)
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0);
vec4 intersection = intersectPlane(ray, planeUv);
bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
clippingVolume.entry = reflects ? backSide : intersection;
clippingVolume.exit = reflects ? intersection : farSide;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
#elif defined(CLIPPING_PLANES_UNION)
vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
vec4 intersection = intersectPlane(ray, planeUv);
if (dot(ray.dir, planeUv.xyz) > 0.0) {
firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
} else {
lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
}
}
clippingVolume.entry = backSide;
clippingVolume.exit = lastReflection;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
clippingVolume.entry = firstTransmission;
clippingVolume.exit = farSide;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
#else // intersection
vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
vec4 intersection = intersectPlane(ray, planeUv);
if (dot(ray.dir, planeUv.xyz) > 0.0) {
lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
} else {
firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
}
}
if (lastTransmission.w < firstReflection.w) {
clippingVolume.entry = lastTransmission;
clippingVolume.exit = firstReflection;
} else {
clippingVolume.entry = vec4(-ray.dir, NO_HIT);
clippingVolume.exit = vec4(ray.dir, NO_HIT);
}
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
#endif
}
#endif
`;var xP=`vec4 transformNormalToEC(in vec4 intersection) {
return vec4(normalize(czm_normal * intersection.xyz), intersection.w);
}
RayShapeIntersection transformNormalsToEC(in RayShapeIntersection ix) {
return RayShapeIntersection(transformNormalToEC(ix.entry), transformNormalToEC(ix.exit));
}
vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
float normalSign = positiveNormal ? 1.0 : -1.0;
vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
vec2 position = ray.pos.xy;
vec2 direction = ray.dir.xy;
float approachRate = dot(direction, planeNormal);
float distance = -dot(position, planeNormal);
float t = (approachRate == 0.0)
? NO_HIT
: distance / approachRate;
return vec4(planeNormal, 0.0, t);
}
RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
{
vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
if (!hitFront) {
return RayShapeIntersection(intersection, farSide);
} else {
return RayShapeIntersection(-1.0 * farSide, intersection);
}
}
void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
{
intersections[0] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.x, false));
intersections[1] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.y, true));
}
bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
float normalSign = positiveNormal ? 1.0 : -1.0;
vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
return dot(hit, planeDirection) > 0.0;
}
void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
vec4 intersection = intersectLongitude(ray, angle, true);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
bool hitPositiveSide = hitPositiveHalfPlane(ray, intersection, true);
farSide = transformNormalToEC(farSide);
if (hitPositiveSide) {
intersection = transformNormalToEC(intersection);
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = vec4(-1.0 * intersection.xyz, intersection.w);
intersections[1].entry = intersection;
intersections[1].exit = farSide;
} else {
vec4 miss = vec4(normalize(czm_normal * ray.dir), NO_HIT);
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = farSide;
intersections[1].entry = miss;
intersections[1].exit = miss;
}
}
RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
{
vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
bool inOrder = intersect1.w <= intersect2.w;
vec4 first = inOrder ? intersect1 : intersect2;
vec4 last = inOrder ? intersect2 : intersect1;
bool firstIsAhead = first.w >= 0.0;
bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
bool exitFromInside = firstIsAhead == startedInsideFirst;
bool lastIsAhead = last.w > 0.0;
bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
bool enterFromOutside = lastIsAhead == startedOutsideLast;
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
if (exitFromInside && enterFromOutside) {
return transformNormalsToEC(RayShapeIntersection(first, last));
} else if (!exitFromInside && enterFromOutside) {
return transformNormalsToEC(RayShapeIntersection(-1.0 * farSide, first));
} else if (exitFromInside && !enterFromOutside) {
return transformNormalsToEC(RayShapeIntersection(last, farSide));
} else {
return transformNormalsToEC(RayShapeIntersection(miss, miss));
}
}
`;var mz=`uniform sampler2D u_renderBoundPlanesTexture;
RayShapeIntersection intersectBoundPlanes(in Ray ray) {
vec4 lastEntry = vec4(ray.dir, -INF_HIT);
vec4 firstExit = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < 6; i++) {
vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
vec4 intersection = intersectPlane(ray, boundPlane);
if (dot(ray.dir, boundPlane.xyz) < 0.0) {
lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
} else {
firstExit = intersection.w < firstExit.w ? intersection: firstExit;
}
}
if (lastEntry.w < firstExit.w) {
return RayShapeIntersection(lastEntry, firstExit);
} else {
return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
}
}
void intersectShape(in Ray rayUV, in Ray rayEC, inout Intersections ix)
{
RayShapeIntersection intersection = intersectBoundPlanes(rayEC);
setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
}
`;var pz=`uniform vec2 u_cylinderRenderRadiusMinMax;
#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
uniform vec2 u_cylinderRenderAngleMinMax;
#endif
uniform sampler2D u_renderBoundPlanesTexture;
RayShapeIntersection intersectBoundPlanes(in Ray ray) {
vec4 lastEntry = vec4(ray.dir, -INF_HIT);
vec4 firstExit = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < 2; i++) {
vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
vec4 intersection = intersectPlane(ray, boundPlane);
if (dot(ray.dir, boundPlane.xyz) < 0.0) {
lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
} else {
firstExit = intersection.w < firstExit.w ? intersection: firstExit;
}
}
if (lastEntry.w < firstExit.w) {
return RayShapeIntersection(lastEntry, firstExit);
} else {
return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
}
}
RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
{
vec2 position = ray.pos.xy;
vec2 direction = ray.dir.xy;
float a = dot(direction, direction);
float b = dot(position, direction);
float c = dot(position, position) - radius * radius;
float determinant = b * b - a * c;
if (determinant < 0.0) {
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
return RayShapeIntersection(miss, miss);
}
determinant = sqrt(determinant);
float t1 = (-b - determinant) / a;
float t2 = (-b + determinant) / a;
float signFlip = convex ? 1.0 : -1.0;
vec3 normal1 = vec3((position + t1 * direction) * signFlip, 0.0);
vec3 normal2 = vec3((position + t2 * direction) * signFlip, 0.0);
vec4 intersect1 = vec4(normalize(czm_normal * normal1), t1);
vec4 intersect2 = vec4(normalize(czm_normal * normal2), t2);
return RayShapeIntersection(intersect1, intersect2);
}
RayShapeIntersection intersectBoundedCylinder(in Ray ray, in Ray rayEC, in float radius)
{
RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
RayShapeIntersection heightBoundsIntersection = intersectBoundPlanes(rayEC);
return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
}
void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix)
{
RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, rayEC, u_cylinderRenderRadiusMinMax.y);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
if (outerIntersect.entry.w == NO_HIT) {
return;
}
#if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true);
setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true);
setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false);
setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false);
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
#endif
#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
RayShapeIntersection wedgeIntersects[2];
intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
RayShapeIntersection wedgeIntersects[2];
intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
#endif
}
`;var gz=`#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
uniform vec2 u_ellipsoidRenderLongitudeMinMax;
#endif
uniform float u_eccentricitySquared;
uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
uniform vec2 u_clipMinMaxHeight;
RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
float t = -ray.pos.z / ray.dir.z;
bool startsOutside = sign(ray.pos.z) == sign(z);
bool entry = (t >= 0.0) != startsOutside;
vec4 intersect = vec4(0.0, 0.0, z, t);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
if (entry) {
return RayShapeIntersection(intersect, farSide);
} else {
return RayShapeIntersection(-1.0 * farSide, intersect);
}
}
RayShapeIntersection intersectHeight(in Ray ray, in float height, in bool convex)
{
vec3 radiiCorrection = vec3(1.0) / (u_ellipsoidRadii + height);
vec3 position = ray.pos * radiiCorrection;
vec3 direction = ray.dir * radiiCorrection;
float a = dot(direction, direction);
float b = dot(direction, position);
float c = dot(position, position) - 1.0;
float determinant = b * b - a * c;
if (determinant < 0.0) {
vec4 miss = vec4(normalize(direction), NO_HIT);
return RayShapeIntersection(miss, miss);
}
determinant = sqrt(determinant);
float signB = b < 0.0 ? -1.0 : 1.0;
float t1 = (-b - signB * determinant) / a;
float t2 = c / (a * t1);
float tmin = min(t1, t2);
float tmax = max(t1, t2);
float directionScale = convex ? 1.0 : -1.0;
vec3 d1 = directionScale * (position + tmin * direction);
vec3 d2 = directionScale * (position + tmax * direction);
vec3 normal1 = normalize(czm_normal * d1);
vec3 normal2 = normalize(czm_normal * d2);
return RayShapeIntersection(vec4(normal1, tmin), vec4(normal2, tmax));
}
vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
{
vec3 o = ray.pos;
vec3 d = ray.dir;
float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
float aSin = d.z * d.z * sinSqrHalfAngle;
float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
float a = aSin + aCos;
float bSin = d.z * o.z * sinSqrHalfAngle;
float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
float b = bSin + bCos;
float cSin = o.z * o.z * sinSqrHalfAngle;
float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
float c = cSin + cCos;
float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
if (determinant < 0.0) {
return vec2(NO_HIT);
} else if (a == 0.0) {
return (b == 0.0)
? vec2(NO_HIT)
: vec2(-0.5 * c / b, NO_HIT);
}
determinant = sqrt(determinant);
float signB = b < 0.0 ? -1.0 : 1.0;
float t1 = (-b - signB * determinant) / a;
float t2 = c / (a * t1);
float tmin = min(t1, t2);
float tmax = max(t1, t2);
return vec2(tmin, tmax);
}
vec3 getConeNormal(in vec3 p, in bool convex) {
vec2 radial = -abs(p.z) * normalize(p.xy);
float zSign = (p.z < 0.0) ? -1.0 : 1.0;
float z = length(p.xy) * zSign;
float flip = (convex) ? -1.0 : 1.0;
return normalize(vec3(radial, z) * flip);
}
float getLatitudeConeShift(in float sinLatitude) {
float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);
return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
}
void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
ray.pos.z += getLatitudeConeShift(cosHalfAngle);
float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = farSide;
intersections[1].entry = miss;
intersections[1].exit = miss;
if (intersect.x == NO_HIT) {
return;
}
float tmin = intersect.x;
float tmax = intersect.y;
vec3 p0 = ray.pos + tmin * ray.dir;
vec3 p1 = ray.pos + tmax * ray.dir;
vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
if (p0InShadowCone && p1InShadowCone) {
} else if (p0InShadowCone) {
intersections[0].exit = intersect1;
} else if (p1InShadowCone) {
intersections[0].entry = intersect0;
} else {
intersections[0].exit = intersect0;
intersections[1].entry = intersect1;
intersections[1].exit = farSide;
}
}
RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
ray.pos.z += getLatitudeConeShift(cosHalfAngle);
float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
if (intersect.x == NO_HIT) {
return RayShapeIntersection(miss, miss);
}
float tmin = intersect.x;
float tmax = intersect.y;
vec3 p0 = ray.pos + tmin * ray.dir;
vec3 p1 = ray.pos + tmax * ray.dir;
vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
if (p0InShadowCone && p1InShadowCone) {
return RayShapeIntersection(miss, miss);
} else if (p0InShadowCone) {
return RayShapeIntersection(intersect1, farSide);
} else if (p1InShadowCone) {
return RayShapeIntersection(-1.0 * farSide, intersect0);
} else {
return RayShapeIntersection(intersect0, intersect1);
}
}
void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix) {
RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
if (outerIntersect.entry.w == NO_HIT) {
return;
}
RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
if (innerIntersect.entry.w == NO_HIT) {
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
} else {
innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true);
setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true);
setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false);
setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false);
}
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
RayShapeIntersection bottomConeIntersections[2];
intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
#endif
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
RayShapeIntersection topConeIntersections[2];
intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
#endif
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
RayShapeIntersection wedgeIntersects[2];
intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
RayShapeIntersection wedgeIntersects[2];
intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
#endif
}
`;var hC=`RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, in Ray rayEC, out Intersections ix) {
intersectShape(ray, rayEC, ix);
RayShapeIntersection intersection = getFirstIntersection(ix);
if (intersection.entry.w == NO_HIT) {
return intersection;
}
#if defined(CLIPPING_PLANES)
intersectClippingPlanes(ray, ix);
#endif
intersectDepth(screenCoord, rayEC, ix);
#if (INTERSECTION_COUNT > 1)
initializeIntersections(ix);
for (int i = 0; i < INTERSECTION_COUNT; ++i) {
intersection = nextIntersection(ix);
if (intersection.exit.w > 0.0) {
intersection.entry.w = max(intersection.entry.w, 0.0);
break;
}
}
#else
intersection.entry.w = max(intersection.entry.w, 0.0);
#endif
return intersection;
}
`;var _z=`uniform vec3 u_boxLocalToShapeUvScale;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform mat3 u_boxEcToXyz;
mat3 convertLocalToShapeSpaceDerivative(in vec3 positionLocal) {
return mat3(1.0);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
return shapeUv / u_boxLocalToShapeUvScale;
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 dPosition = u_boxEcToXyz * positionEC;
return u_boxLocalToShapeUvScale * dPosition * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
tileCoordinate = min(max(ivec3(0), tileCoordinate), ivec3((1 << u_cameraTileCoordinates.w) - 1));
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
vec3 tileUv = clamp(tileUvSum - vec3(tileCoordinateChange), 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var yz=`uniform vec3 u_cylinderLocalToShapeUvScale;
uniform float u_cylinderShapeUvAngleRangeOrigin;
uniform mat3 u_cylinderEcToRadialTangentUp;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform vec3 u_cameraShapePosition;
mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
vec3 radial = normalize(vec3(position.xy, 0.0));
vec3 z = vec3(0.0, 0.0, 1.0);
vec3 east = normalize(vec3(-position.y, position.x, 0.0));
return mat3(radial, east / length(position.xy), z);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
float radius = shapeUv.x / u_cylinderLocalToShapeUvScale.x;
float angle = shapeUv.y * czm_twoPi / u_cylinderLocalToShapeUvScale.y;
float height = shapeUv.z / u_cylinderLocalToShapeUvScale.z;
return vec3(radius, angle, height);
}
vec2 computePolarChange(in vec2 dPosition, in float cameraRadialDistance) {
float dAngle = atan(dPosition.y, cameraRadialDistance + dPosition.x);
vec2 outputRadialAxis = vec2(cos(dAngle), sin(dAngle));
float sinHalfAngle = sin(dAngle / 2.0);
float versine = 2.0 * sinHalfAngle * sinHalfAngle;
float dRadial = dot(dPosition, outputRadialAxis) - cameraRadialDistance * versine;
return vec2(dRadial, dAngle);
}
vec3 convertEcToDeltaShape(in vec3 positionEC) {
vec3 rtu = u_cylinderEcToRadialTangentUp * positionEC;
vec2 dPolar = computePolarChange(rtu.xy, u_cameraShapePosition.x);
return vec3(dPolar.xy, rtu.z);
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 deltaShape = convertEcToDeltaShape(positionEC);
float dx = u_cylinderLocalToShapeUvScale.x * deltaShape.x;
float dy = deltaShape.y / czm_twoPi;
#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
float cameraUvAngle = (u_cameraShapePosition.y + czm_pi) / czm_twoPi;
float cameraUvAngleShift = fract(cameraUvAngle - u_cylinderShapeUvAngleRangeOrigin);
float rawOutputUvAngle = cameraUvAngleShift + dy;
float rotation = floor(rawOutputUvAngle);
dy -= rotation;
#endif
dy *= u_cylinderLocalToShapeUvScale.y;
float dz = u_cylinderLocalToShapeUvScale.z * deltaShape.z;
return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
if (tileCoordinate.y < 0) {
tileCoordinate.y += (maxTileCoordinate + 1);
} else if (tileCoordinate.y > maxTileCoordinate) {
tileCoordinate.y -= (maxTileCoordinate + 1);
}
#else
tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
tileUv.y = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.y) : clamp(tileUv.y, 0.0, 1.0);
#else
tileUv.y = clamp(tileUv.y, 0.0, 1.0);
#endif
tileUv.z = clamp(tileUv.z, 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var Az=`uniform vec3 u_cameraPositionCartographic;
uniform vec2 u_ellipsoidCurvatureAtLatitude;
uniform mat3 u_ellipsoidEcToEastNorthUp;
uniform vec3 u_ellipsoidRadii;
uniform vec2 u_evoluteScale;
uniform vec3 u_ellipsoidInverseRadiiSquared;
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
uniform float u_ellipsoidShapeUvLongitudeRangeOrigin;
#endif
uniform vec3 u_ellipsoidLocalToShapeUvScale;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
vec2 p = abs(pos);
vec2 inverseRadii = 1.0 / radii;
vec2 tTrigs = vec2(0.7071067811865476);
vec2 v = radii * tTrigs;
vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
const int iterations = 3;
for (int i = 0; i < iterations; ++i) {
vec2 q = normalize(p - evolute) * length(v - evolute);
tTrigs = (q + evolute) * inverseRadii;
tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
v = radii * tTrigs;
evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
}
return vec3(v * sign(pos), length(v - evolute));
}
mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
vec3 east = normalize(vec3(-position.y, position.x, 0.0));
float distanceFromZAxis = length(position.xy);
vec2 posEllipse = vec2(distanceFromZAxis, position.z);
vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadii.xz);
vec2 surfacePoint = surfacePointAndRadius.xy;
vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquared.xz);
vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
float height = heightSign * length(posEllipse - surfacePoint);
vec3 up = normalize(cross(east, north));
return mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
float longitude = shapeUv.x * czm_twoPi;
#if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
longitude /= u_ellipsoidLocalToShapeUvScale.x;
#endif
float latitude = shapeUv.y * czm_pi;
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
latitude /= u_ellipsoidLocalToShapeUvScale.y;
#endif
float height = shapeUv.z / u_ellipsoidLocalToShapeUvScale.z;
return vec3(longitude, latitude, height);
}
vec3 convertEcToDeltaShape(in vec3 positionEC) {
vec3 enu = u_ellipsoidEcToEastNorthUp * positionEC;
float cosLatitude = cos(u_cameraPositionCartographic.y);
float sinLatitude = sin(u_cameraPositionCartographic.y);
float primeVerticalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.x;
vec2 cameraXY = vec2((primeVerticalRadius + u_cameraPositionCartographic.z) * cosLatitude, 0.0);
vec2 positionXY = cameraXY + vec2(-enu.y * sinLatitude + enu.z * cosLatitude, enu.x);
float dLongitude = atan(positionXY.y, positionXY.x);
float sinHalfLongitude = sin(dLongitude / 2.0);
float dx = length(positionXY) * 2.0 * sinHalfLongitude * sinHalfLongitude;
enu += vec3(-enu.x, -dx * sinLatitude, dx * cosLatitude);
float meridionalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.y;
vec2 cameraZX = vec2(meridionalRadius + u_cameraPositionCartographic.z, 0.0);
vec2 positionZX = cameraZX + vec2(enu.z, enu.y);
float dLatitude = atan(positionZX.y, positionZX.x);
float sinHalfLatitude = sin(dLatitude / 2.0);
float dz = length(positionZX) * 2.0 * sinHalfLatitude * sinHalfLatitude;
float dHeight = enu.z + dz;
return vec3(dLongitude, dLatitude, dHeight);
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 deltaShape = convertEcToDeltaShape(positionEC);
float dx = deltaShape.x / czm_twoPi;
#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
float cameraUvLongitude = (u_cameraPositionCartographic.x + czm_pi) / czm_twoPi;
float cameraUvLongitudeShift = fract(cameraUvLongitude - u_ellipsoidShapeUvLongitudeRangeOrigin);
float rawOutputUvLongitude = cameraUvLongitudeShift + dx;
float rotation = floor(rawOutputUvLongitude);
dx -= rotation;
dx *= u_ellipsoidLocalToShapeUvScale.x;
#endif
float dy = deltaShape.y / czm_pi;
#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE))
dy *= u_ellipsoidLocalToShapeUvScale.y;
#endif
float dz = u_ellipsoidLocalToShapeUvScale.z * deltaShape.z;
return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
if (tileCoordinate.x < 0) {
tileCoordinate.x += (maxTileCoordinate + 1);
} else if (tileCoordinate.x > maxTileCoordinate) {
tileCoordinate.x -= (maxTileCoordinate + 1);
}
#else
tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
tileUv.x = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.x) : clamp(tileUv.x, 0.0, 1.0);
#else
tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#endif
tileUv.y = clamp(tileUv.y, 0.0, 1.0);
tileUv.z = clamp(tileUv.z, 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var bz=`#define OCTREE_FLAG_INTERNAL 0
#define OCTREE_FLAG_LEAF 1
#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
uniform sampler2D u_octreeInternalNodeTexture;
uniform vec2 u_octreeInternalNodeTexelSizeUv;
uniform int u_octreeInternalNodeTilesPerRow;
#if (SAMPLE_COUNT > 1)
uniform sampler2D u_octreeLeafNodeTexture;
uniform vec2 u_octreeLeafNodeTexelSizeUv;
uniform int u_octreeLeafNodeTilesPerRow;
#endif
uniform ivec3 u_dimensions;
uniform ivec3 u_inputDimensions;
#if defined(PADDING)
uniform ivec3 u_paddingBefore;
#endif
struct OctreeNodeData {
int data;
int flag;
};
struct TraversalData {
ivec4 octreeCoords;
int parentOctreeIndex;
};
struct TileAndUvCoordinate {
ivec4 tileCoords;
vec3 tileUv;
};
struct SampleData {
int megatextureIndex;
ivec4 tileCoords;
vec3 tileUv;
vec3 inputCoordinate;
#if (SAMPLE_COUNT > 1)
float weight;
#endif
};
int normU8_toInt(in float value) {
return int(value * 255.0);
}
int normU8x2_toInt(in vec2 value) {
return int(value.x * 255.0) + 256 * int(value.y * 255.0);
}
float normU8x2_toFloat(in vec2 value) {
return float(normU8x2_toInt(value)) / 65535.0;
}
OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
OctreeNodeData data;
data.data = normU8x2_toInt(texData.xy);
data.flag = normU8x2_toInt(texData.zw);
return data;
}
OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
int octreeCoordX = (parentOctreeIndex % u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
return getOctreeNodeData(octreeUv);
}
int getOctreeParentIndex(in int octreeIndex) {
int octreeCoordX = (octreeIndex % u_octreeInternalNodeTilesPerRow) * 9;
int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
int parentOctreeIndex = normU8x2_toInt(parentData.xy);
return parentOctreeIndex;
}
vec3 getTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
int levelDifference = tileAndUv.tileCoords.w - octreeCoords.w;
float scalar = exp2(-1.0 * float(levelDifference));
vec3 originShift = vec3(tileAndUv.tileCoords.xyz - (octreeCoords.xyz << levelDifference)) * scalar;
return tileAndUv.tileUv * scalar + originShift;
}
vec3 getClampedTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
vec3 tileUv = getTileUv(tileAndUv, octreeCoords);
return clamp(tileUv, vec3(0.0), vec3(1.0));
}
void addSampleCoordinates(in TileAndUvCoordinate tileAndUv, inout SampleData sampleData) {
vec3 tileUv = getClampedTileUv(tileAndUv, sampleData.tileCoords);
vec3 inputCoordinate = tileUv * vec3(u_dimensions);
#if defined(PADDING)
inputCoordinate += vec3(u_paddingBefore);
#endif
#if defined(Y_UP_METADATA_ORDER)
#if defined(SHAPE_BOX)
float inputY = inputCoordinate.y;
inputCoordinate.y = inputCoordinate.z;
inputCoordinate.z = float(u_inputDimensions.z) - inputY;
#elif defined(SHAPE_CYLINDER)
float angle = inputCoordinate.y;
float height = inputCoordinate.z;
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
if (sampleData.tileCoords.w == 0) {
float angleCount = float(u_inputDimensions.z);
angle = mod(angle + angleCount / 2.0, angleCount);
}
#endif
inputCoordinate.y = height;
inputCoordinate.z = angle;
#endif
#endif
sampleData.tileUv = tileUv;
sampleData.inputCoordinate = inputCoordinate;
}
void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
sampleData.megatextureIndex = data.data;
sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
}
#if (SAMPLE_COUNT > 1)
void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
int leafIndex = data.data;
int leafNodeTexelCount = 2;
float leafCoordXStart = float((leafIndex % u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
float lerp = normU8x2_toFloat(leafData0.xy);
sampleDatas[0].weight = 1.0 - lerp;
sampleDatas[1].weight = lerp;
sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
}
#endif
OctreeNodeData traverseOctreeDownwards(in ivec4 tileCoordinate, inout TraversalData traversalData) {
OctreeNodeData childData;
for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
int level = traversalData.octreeCoords.w + 1;
int levelDifference = tileCoordinate.w - level;
ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
traversalData.octreeCoords = ivec4(coordinateAtLevel, level);
ivec3 childCoordinate = coordinateAtLevel & 1;
childData = getOctreeChildData(traversalData.parentOctreeIndex, childCoordinate);
if (childData.flag != OCTREE_FLAG_INTERNAL) {
break;
}
traversalData.parentOctreeIndex = childData.data;
}
return childData;
}
void traverseOctreeFromBeginning(in TileAndUvCoordinate tileAndUv, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
traversalData.octreeCoords = ivec4(0);
traversalData.parentOctreeIndex = 0;
OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
if (nodeData.flag != OCTREE_FLAG_LEAF) {
nodeData = traverseOctreeDownwards(tileAndUv.tileCoords, traversalData);
}
#if (SAMPLE_COUNT == 1)
getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
#else
getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[1]);
#endif
}
bool insideTile(in ivec4 tileCoordinate, in ivec4 octreeCoords) {
int levelDifference = tileCoordinate.w - octreeCoords.w;
if (levelDifference < 0) {
return false;
}
ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
return coordinateAtLevel == octreeCoords.xyz;
}
void traverseOctreeFromExisting(in TileAndUvCoordinate tileAndUv, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
ivec4 tileCoords = tileAndUv.tileCoords;
if (insideTile(tileCoords, traversalData.octreeCoords)) {
for (int i = 0; i < SAMPLE_COUNT; i++) {
addSampleCoordinates(tileAndUv, sampleDatas[i]);
}
return;
}
for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
traversalData.octreeCoords.xyz /= 2;
traversalData.octreeCoords.w -= 1;
if (insideTile(tileCoords, traversalData.octreeCoords)) {
break;
}
traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
}
OctreeNodeData nodeData = traverseOctreeDownwards(tileCoords, traversalData);
#if (SAMPLE_COUNT == 1)
getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
#else
getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[1]);
#endif
}
`;var xz=`uniform ivec3 u_megatextureTileCounts;
vec3 index1DTo3DTexCoord(int index)
{
int tilesPerZ = u_megatextureTileCounts.x * u_megatextureTileCounts.y;
int iz = index / tilesPerZ;
int remainder = index - iz * tilesPerZ;
int iy = remainder / u_megatextureTileCounts.x;
int ix = remainder - iy * u_megatextureTileCounts.x;
return vec3(ix, iy, iz) / vec3(u_megatextureTileCounts);
}
Properties getPropertiesFromMegatexture(in SampleData sampleData) {
int tileIndex = sampleData.megatextureIndex;
vec3 voxelCoord = sampleData.inputCoordinate;
vec3 tileUvOffset = index1DTo3DTexCoord(tileIndex);
vec3 tileDimensions = vec3(u_inputDimensions);
vec3 clampedVoxelCoord = clamp(voxelCoord, vec3(0.5), tileDimensions - vec3(0.5));
vec3 voxelUv = clampedVoxelCoord / tileDimensions / vec3(u_megatextureTileCounts);
return getPropertiesFromMegatextureAtUv(tileUvOffset + voxelUv);
}
Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
#if (SAMPLE_COUNT == 1)
return getPropertiesFromMegatexture(sampleDatas[0]);
#else
Properties properties = clearProperties();
for (int i = 0; i < SAMPLE_COUNT; ++i) {
float weight = sampleDatas[i].weight;
if (weight > 0.0) {
Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
tempProperties = scaleProperties(tempProperties, weight);
properties = sumProperties(properties, tempProperties);
}
}
return properties;
#endif
}
`;var qNe={Z_UP:0,Y_UP:1};Object.freeze(qNe);var U0=qNe;function FMt(e){let t=new e_;this.shaderBuilder=t;let n=e._customShader,i=Ot(e._uniformMap,n.uniformMap);e._uniformMap=i;let r=n.uniforms;for(let m in r)if(r.hasOwnProperty(m)){let y=r[m];t.addUniform(y.type,m,de.FRAGMENT)}t.addUniform("sampler3D","u_megatextureTextures[METADATA_COUNT]",de.FRAGMENT),this.uniformMap=i;let o=e._clippingPlanes,s=l(o)&&o.enabled?o.length:0;this.clippingPlanes=o,this.clippingPlanesLength=s;let a=e._shape.renderBoundPlanes,c=a?.length??0;this.renderBoundPlanes=a,this.renderBoundPlanesLength=c,t.addVertexLines([uz]),e.provider.metadataOrder===U0.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,de.FRAGMENT);let u=e._provider.shape;u==="BOX"?t.addDefine("SHAPE_BOX",void 0,de.FRAGMENT):u==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,de.FRAGMENT):u==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,de.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",bz,cz,xz,fz,hz,dz]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,de.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,de.FRAGMENT),o.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,de.FRAGMENT)),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,de.FRAGMENT),u==="BOX"?t.addFragmentLines([_z,mz,hC]):u==="CYLINDER"?t.addFragmentLines([yz,xP,pz,hC]):u==="ELLIPSOID"&&t.addFragmentLines([Az,xP,gz,hC]),t.addFragmentLines([lz]);let f=e._shape,d=f.shaderDefines;for(let m in d)if(d.hasOwnProperty(m)){let y=d[m];l(y)&&(y=y===!0?void 0:y,t.addDefine(m,y,de.FRAGMENT))}let p=f.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",p,de.FRAGMENT),s===1?p+=1:o.unionClippingRegions?p+=2:p+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",p,de.FRAGMENT),p+=1),t.addDefine("INTERSECTION_COUNT",p,de.FRAGMENT),(!h.equals(e.paddingBefore,h.ZERO)||!h.equals(e.paddingAfter,h.ZERO))&&t.addDefine("PADDING",void 0,de.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,de.FRAGMENT);let g=e._traversal;t.addDefine("SAMPLE_COUNT",`${g._sampleCount}`,de.FRAGMENT)}var Tz=FMt;var YNe=new U;function BMt(e,t){let n=new Tz(e);az(n,e);let{shaderBuilder:i,clippingPlanes:r,clippingPlanesLength:o,renderBoundPlanes:s,renderBoundPlanesLength:a}=n;if(o>0){let T="getClippingPlane",E=`vec4 ${T}(highp sampler2D packedPlanes, int planeNumber)`,v=bs.getTextureResolution(r,t,YNe),S=XNe(v);i.addFunction(T,E,de.FRAGMENT),i.addFunctionLines(T,[S])}if(a>0){let T="getBoundPlane",E=`vec4 ${T}(highp sampler2D packedPlanes, int planeNumber)`,v=ay.getTextureResolution(s,t,YNe),S=XNe(v);i.addFunction(T,E,de.FRAGMENT),i.addFunctionLines(T,[S])}let c=i.clone();c.addDefine("PICKING",void 0,de.FRAGMENT);let u=i.clone();u.addDefine("PICKING_VOXEL",void 0,de.FRAGMENT);let f=i.buildShaderProgram(t),d=c.buildShaderProgram(t),p=u.buildShaderProgram(t),g=Ge.fromCache({cull:{enabled:!0,face:Vi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND}),m=t.getViewportQuadVertexArray(),y=e._depthTest,A=new at({vertexArray:m,primitiveType:Oe.TRIANGLES,renderState:g,shaderProgram:f,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Ie.VOXELS,executeInClosestFrustum:!0,owner:this,cull:y,occlude:y}),b=at.shallowClone(A,new at);b.shaderProgram=d,b.pickOnly=!0;let x=at.shallowClone(A,new at);if(x.shaderProgram=p,x.pickOnly=!0,l(e._drawCommand)){let T=e._drawCommand;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}if(l(e._drawCommandPick)){let T=e._drawCommandPick;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let T=e._drawCommandPickVoxel;T.shaderProgram=T.shaderProgram&&T.shaderProgram.destroy()}e._drawCommand=A,e._drawCommandPick=b,e._drawCommandPickVoxel=x}function XNe(e){let t=e.x,n=e.y,i=1/t,r=1/n,o=`${i}`;o.indexOf(".")===-1&&(o+=".0");let s=`${r}`;return s.indexOf(".")===-1&&(s+=".0"),`int pixY = planeNumber / ${t};
int pixX = planeNumber - (pixY * ${t});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${o};
float v = (float(pixY) + 0.5) * ${s};
return texture(packedPlanes, vec2(u, v));`}var Ez=BMt;var ZNe={};function kMt(e,t,n){let i,r,o;if(e instanceof Ji){let s=Math.tan(.5*e.fovy);return i=e.near,r=e.near*s,o=e.aspectRatio*r,Math.max(t*i/o,n*i/r)}else if(e instanceof yu)return i=e.near,r=e.top,o=e.right,Math.max(t*i/o,n*i/r);return Math.max(t,n)}var UMt=new h,KNe=new h;function QNe(e,t,n,i){if(l(i)&&n(.5)>i){let r=n(0),o=n(1),s=n(.5),a=s-r,c=s-o;return function(u){let f=n(u);if(u<=.5){let p=(f-r)/a;return D.lerp(e,-D.PI_OVER_TWO,p)}let d=(f-o)/c;return D.lerp(-D.PI_OVER_TWO,t,1-d)}}return function(r){return D.lerp(e,t,r)}}function Ese(e,t,n,i,r){let o=r,s=Math.max(n,i);if(!l(o)){let a=e.position,c=t,u=e.up,f=e.right,d=e.frustum,p=h.subtract(a,c,UMt),g=h.magnitude(h.multiplyByScalar(u,h.dot(p,u),KNe)),m=h.magnitude(h.multiplyByScalar(f,h.dot(p,f),KNe));o=Math.min(kMt(d,g,m)*.2,1e9)}if(s<o){let u=-Math.pow((o-n)*1e6,.125),f=Math.pow((o-i)*1e6,1/8);return function(d){let p=d*(f-u)+u;return-Math.pow(p,8)/1e6+o}}return function(a){return D.lerp(n,i,a)}}function Cz(e,t){return D.equalsEpsilon(e,D.TWO_PI,D.EPSILON11)&&(e=0),t>e+Math.PI?e+=D.TWO_PI:t<e-Math.PI&&(e-=D.TWO_PI),e}var eLe=new h;function zMt(e,t,n,i,r,o,s,a){let c=e.camera,u=h.clone(c.position,eLe),f=c.pitch,d=Cz(c.heading,i),p=Cz(c.roll,o),g=Ese(c,n,u.z,n.z,s),m=QNe(f,r,g,a);function y(A){let b=A.time/t;c.setView({orientation:{heading:D.lerp(d,i,b),pitch:m(b),roll:D.lerp(p,o,b)}}),U.lerp(u,n,b,c.position),c.position.z=g(b)}return y}function VMt(e,t){e.longitude<t.longitude?e.longitude+=D.TWO_PI:t.longitude+=D.TWO_PI}function jMt(e,t){let n=e.longitude-t.longitude;n<-D.PI?e.longitude+=D.TWO_PI:n>D.PI&&(t.longitude+=D.TWO_PI)}var HMt=new he,GMt=new he;function WMt(e,t,n,i,r,o,s,a,c,u){let f=e.camera,p=e.mapProjection.ellipsoid,g=he.clone(f.positionCartographic,HMt),m=f.pitch,y=Cz(f.heading,i),A=Cz(f.roll,o),b=p.cartesianToCartographic(n,GMt);g.longitude=D.zeroToTwoPi(g.longitude),b.longitude=D.zeroToTwoPi(b.longitude);let x=!1;if(l(a)){let S=D.zeroToTwoPi(a),I=Math.min(g.longitude,b.longitude),R=Math.max(g.longitude,b.longitude),O=S>=I&&S<=R;if(l(c)){let L=Math.abs(g.longitude-b.longitude),_=D.TWO_PI-L;(O?L:_)<(O?_:L)*c&&!O&&(x=!0)}else O||(x=!0)}x?VMt(g,b):jMt(g,b);let T=Ese(f,n,g.height,b.height,s),E=QNe(m,r,T,u);function v(){let S=g.longitude,I=b.longitude,R=g.latitude,O=b.latitude;return function(_){let C=_.time/t,w=h.fromRadians(D.lerp(S,I,C),D.lerp(R,O,C),T(C),p);f.setView({destination:w,orientation:{heading:D.lerp(y,i,C),pitch:E(C),roll:D.lerp(A,o,C)}})}}return v()}function qMt(e,t,n,i,r,o,s){let a=e.camera,c=h.clone(a.position,eLe),u=Cz(a.heading,i),f=a.frustum.right-a.frustum.left,d=Ese(a,n,f,n.z,s);function p(g){let m=g.time/t;a.setView({orientation:{heading:D.lerp(u,i,m)}}),U.lerp(c,n,m,a.position);let y=d(m),A=a.frustum,b=A.top/A.right,x=(y-(A.right-A.left))*.5;A.right+=x,A.left-=x,A.top=b*A.right,A.bottom=-A.top}return p}var $Ne=new he,YMt=new h;function Tse(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function JNe(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}ZNe.createTween=function(e,t){t=t??H.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===re.MORPHING)return Tse();let r=t.convert??!0,o=e.mapProjection,s=o.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,u=t.flyOverLongitudeWeight,f=t.pitchAdjustHeight,d=t.easingFunction;r&&i!==re.SCENE3D&&(s.cartesianToCartographic(n,$Ne),n=o.project($Ne,YMt));let p=e.camera,g=t.endTransform;l(g)&&p._setTransform(g);let m=t.duration;l(m)||(m=Math.ceil(h.distance(p.position,n)/1e6)+2,m=Math.min(m,3));let y=t.heading??0,A=t.pitch??-D.PI_OVER_TWO,b=t.roll??0,x=e.screenSpaceCameraController;x.enableInputs=!1;let T=JNe(x,t.complete),E=JNe(x,t.cancel),v=p.frustum,S=e.mode===re.SCENE2D;if(S=S&&U.equalsEpsilon(p.position,n,D.EPSILON6),S=S&&D.equalsEpsilon(Math.max(v.right-v.left,v.top-v.bottom),n.z,D.EPSILON6),S=S||e.mode!==re.SCENE2D&&h.equalsEpsilon(n,p.position,D.EPSILON10),S=S&&D.equalsEpsilon(D.negativePiToPi(y),D.negativePiToPi(p.heading),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(A),D.negativePiToPi(p.pitch),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(b),D.negativePiToPi(p.roll),D.EPSILON10),S)return Tse(T,E);let I=new Array(4);if(I[re.SCENE2D]=qMt,I[re.SCENE3D]=WMt,I[re.COLUMBUS_VIEW]=zMt,m<=0)return Tse(function(){I[i](e,1,n,y,A,b,a,c,u,f)({time:1}),typeof T=="function"&&T()},E);let R=I[i](e,m,n,y,A,b,a,c,u,f);if(!l(d)){let O=p.positionCartographic.height,L=i===re.SCENE3D?s.cartesianToCartographic(n).height:n.z;O>L&&O>11500?d=Ls.CUBIC_OUT:d=Ls.QUINTIC_IN_OUT}return{duration:m,easingFunction:d,startObject:{time:0},stopObject:{time:m},update:R,complete:T,cancel:E}};var vz=ZNe;var tLe={ROTATE:0,INFINITE_SCROLL:1};Object.freeze(tLe);var Au=tLe;function an(e){this._scene=e,this._transform=N.clone(N.IDENTITY),this._invTransform=N.clone(N.IDENTITY),this._actualTransform=N.clone(N.IDENTITY),this._actualInvTransform=N.clone(N.IDENTITY),this._transformChanged=!1,this.position=new h,this._position=new h,this._positionWC=new h,this._positionCartographic=new he,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new h,this._direction=new h,this._directionWC=new h,this.up=new h,this._up=new h,this._upWC=new h,this.right=new h,this._right=new h,this._rightWC=new h,this.frustum=new Ji,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=D.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new be,this._moveEnd=new be,this._changed=new be,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this._changedRoll=void 0,this.percentageChanged=.5,this._viewMatrix=new N,this._invViewMatrix=new N,dLe(this),this._mode=re.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new he(Math.PI,D.PI_OVER_TWO)),this._max2Dfrustum=void 0,CLe(this,an.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=h.magnitude(this.position);n+=n*an.DEFAULT_VIEW_FACTOR,h.normalize(this.position,this.position),h.multiplyByScalar(this.position,n,this.position)}an.TRANSFORM_2D=new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);an.TRANSFORM_2D_INVERSE=N.inverseTransformation(an.TRANSFORM_2D,new N);an.DEFAULT_VIEW_RECTANGLE=ie.fromDegrees(-95,-20,-70,90);an.DEFAULT_VIEW_FACTOR=.5;an.DEFAULT_OFFSET=new mh(0,-D.PI_OVER_FOUR,0);function dLe(e){N.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),N.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),N.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function XMt(e){if(!l(e._oldPositionWC))e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=h.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=h.magnitude(t),e._oldPositionWC=h.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=xn()):e.timeSinceMoved=Math.max(xn()-e._lastMovedTimestamp,0)/1e3}}an.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==re.SCENE2D};an.prototype._updateCameraChanged=function(){let e=this;if(XMt(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%D.TWO_PI;i=i>D.PI?D.TWO_PI-i:i;let r=i/Math.PI;r>t&&(e._changedHeading=n);let o=e.roll;l(e._changedRoll)||(e._changedRoll=o);let s=Math.abs(e._changedRoll-o)%D.TWO_PI;s=s>D.PI?D.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=o),(a>t||r>t)&&e._changed.raiseEvent(Math.max(a,r)),e._mode===re.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,g=e._changedPosition,m=e.frustum,y=e._changedFrustum,A=p.x+m.left,b=p.x+m.right,x=g.x+y.left,T=g.x+y.right,E=p.y+m.bottom,v=p.y+m.top,S=g.y+y.bottom,I=g.y+y.top,R=Math.max(A,x),O=Math.min(b,T),L=Math.max(E,S),_=Math.min(v,I),C;if(R>=O||L>=v)C=1;else{let w=y;A<x&&b>T&&E<S&&v>I&&(w=m),C=1-(O-R)*(_-L)/((w.right-w.left)*(w.top-w.bottom))}C>t&&(e._changed.raiseEvent(C),e._changedPosition=h.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection);return}let c=D.acosClamped(h.dot(e.directionWC,e._changedDirection)),u;l(e.frustum.fovy)?u=c/(e.frustum.fovy*.5):u=c;let d=h.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(u>t||d>t)&&(e._changed.raiseEvent(Math.max(u,d)),e._changedPosition=h.clone(e.positionWC,e._changedPosition),e._changedDirection=h.clone(e.directionWC,e._changedDirection))};function KMt(e){At.basisTo2D(e._projection,e._transform,e._actualTransform)}var $Mt=new he,JMt=new h,k7=new h,ZMt=new se,QMt=new se,eNt=new se,tNt=new se,nNt=new se;function iNt(e){let t=e._projection,n=t.ellipsoid,i=N.getColumn(e._transform,3,ZMt),r=n.cartesianToCartographic(i,$Mt),o=t.project(r,JMt),s=QMt;s.x=o.z,s.y=o.x,s.z=o.y,s.w=1;let a=se.clone(se.UNIT_X,nNt),c=se.add(N.getColumn(e._transform,0,k7),i,k7);n.cartesianToCartographic(c,r),t.project(r,o);let u=eNt;u.x=o.z,u.y=o.x,u.z=o.y,u.w=0,h.subtract(u,s,u),u.x=0;let f=tNt;if(h.magnitudeSquared(u)>D.EPSILON10)h.cross(a,u,f);else{let d=se.add(N.getColumn(e._transform,1,k7),i,k7);n.cartesianToCartographic(d,r),t.project(r,o),f.x=o.z,f.y=o.x,f.z=o.y,f.w=0,h.subtract(f,s,f),f.x=0,h.magnitudeSquared(f)<D.EPSILON10&&(se.clone(se.UNIT_Y,u),se.clone(se.UNIT_Z,f))}h.cross(f,a,u),h.normalize(u,u),h.cross(a,u,f),h.normalize(f,f),N.setColumn(e._actualTransform,0,u,e._actualTransform),N.setColumn(e._actualTransform,1,f,e._actualTransform),N.setColumn(e._actualTransform,2,a,e._actualTransform),N.setColumn(e._actualTransform,3,s,e._actualTransform)}var Cse=new h;function Il(e){let t=e._mode,n=!1,i=0;t===re.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let r=e._position,o=!h.equals(r,e.position)||n;o&&(r=h.clone(e.position,e._position));let s=e._direction,a=!h.equals(s,e.direction);a&&(h.normalize(e.direction,e.direction),s=h.clone(e.direction,e._direction));let c=e._up,u=!h.equals(c,e.up);u&&(h.normalize(e.up,e.up),c=h.clone(e.up,e._up));let f=e._right,d=!h.equals(f,e.right);d&&(h.normalize(e.right,e.right),f=h.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(N.inverseTransformation(e._transform,e._invTransform),e._mode===re.COLUMBUS_VIEW||e._mode===re.SCENE2D?N.equals(N.IDENTITY,e._transform)?N.clone(an.TRANSFORM_2D,e._actualTransform):e._mode===re.COLUMBUS_VIEW?KMt(e):iNt(e):N.clone(e._transform,e._actualTransform),N.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let g=e._actualTransform;if(o||p)if(e._positionWC=N.multiplyByPoint(g,r,e._positionWC),t===re.SCENE3D||t===re.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let m=Cse;m.x=e._positionWC.y,m.y=e._positionWC.z,m.z=e._positionWC.x,t===re.SCENE2D&&(m.z=i),e._projection.unproject(m,e._positionCartographic)}if(a||u||d){let m=h.dot(s,h.cross(c,f,Cse));if(Math.abs(1-m)>D.EPSILON2){let y=1/h.magnitudeSquared(c),A=h.dot(c,s)*y,b=h.multiplyByScalar(s,A,Cse);c=h.normalize(h.subtract(c,b,e._up),e._up),h.clone(c,e.up),f=h.cross(s,c,e._right),h.clone(f,e.right)}}(a||p)&&(e._directionWC=N.multiplyByPointAsVector(g,s,e._directionWC),h.normalize(e._directionWC,e._directionWC)),(u||p)&&(e._upWC=N.multiplyByPointAsVector(g,c,e._upWC),h.normalize(e._upWC,e._upWC)),(d||p)&&(e._rightWC=N.multiplyByPointAsVector(g,f,e._rightWC),h.normalize(e._rightWC,e._rightWC)),(o||a||u||d||p)&&dLe(e)}function hLe(e,t){let n;return D.equalsEpsilon(Math.abs(e.z),1,D.EPSILON3)?n=Math.atan2(t.y,t.x)-D.PI_OVER_TWO:n=Math.atan2(e.y,e.x)-D.PI_OVER_TWO,D.TWO_PI-D.zeroToTwoPi(n)}function mLe(e){return D.PI_OVER_TWO-D.acosClamped(e.z)}function pLe(e,t,n){let i=0;return D.equalsEpsilon(Math.abs(e.z),1,D.EPSILON3)||(i=Math.atan2(-n.z,t.z),i=D.zeroToTwoPi(i+D.TWO_PI)),i}var V7=new N,j7=new N;Object.defineProperties(an.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return Il(this),this._invTransform}},viewMatrix:{get:function(){return Il(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return Il(this),this._invViewMatrix}},positionCartographic:{get:function(){return Il(this),this._positionCartographic}},positionWC:{get:function(){return Il(this),this._positionWC}},directionWC:{get:function(){return Il(this),this._directionWC}},upWC:{get:function(){return Il(this),this._upWC}},rightWC:{get:function(){return Il(this),this._rightWC}},heading:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,V7),n=At.eastNorthUpToFixedFrame(this.positionWC,e,j7);this._setTransform(n);let i=hLe(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,V7),n=At.eastNorthUpToFixedFrame(this.positionWC,e,j7);this._setTransform(n);let i=mLe(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=N.clone(this._transform,V7),n=At.eastNorthUpToFixedFrame(this.positionWC,e,j7);this._setTransform(n);let i=pLe(this.direction,this.up,this.right);return this._setTransform(t),i}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}});an.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==re.MORPHING,t=this._mode===re.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,r=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=r*n.right,n.bottom=-n.top}this._mode===re.SCENE2D&&ALe(this,this.position)};var rNt=new h,oNt=new h,sNt=new h;an.prototype._setTransform=function(e){let t=h.clone(this.positionWC,rNt),n=h.clone(this.upWC,oNt),i=h.clone(this.directionWC,sNt);N.clone(e,this._transform),this._transformChanged=!0,Il(this);let r=this._actualInvTransform;N.multiplyByPoint(r,t,this.position),N.multiplyByPointAsVector(r,i,this.direction),N.multiplyByPointAsVector(r,n,this.up),h.cross(this.direction,this.up,this.right),Il(this)};var aNt=new U,cNt=new pn,lNt=new h,uNt=new h;function gLe(e){if(!N.equals(N.IDENTITY,e.transform))return h.magnitude(e.position);let t=e._scene,n=t.globe,i=aNt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let r;if(l(n)){let a=e.getPickRay(i,cNt);r=n.pickWorldCoordinates(a,t,!0,lNt)}let o;t.pickPositionSupported&&(o=t.pickPositionWorldCoordinates(i,uNt));let s;if(l(r)||l(o)){let a=l(o)?h.distance(o,e.positionWC):Number.POSITIVE_INFINITY,c=l(r)?h.distance(r,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}an.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof gn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=gLe(this)))};var H7=new h,Pse=new N,fNt=new N,Dse=new Le,Rse=new $,_Le=new he;function dNt(e,t,n){let i=N.clone(e.transform,Pse),r=At.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,fNt);e._setTransform(r),h.clone(h.ZERO,e.position),n.heading=n.heading-D.PI_OVER_TWO;let o=Le.fromHeadingPitchRoll(n,Dse),s=$.fromQuaternion(o,Rse);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function hNt(e,t,n,i){let r=N.clone(e.transform,Pse);if(e._setTransform(N.IDENTITY),!h.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,_Le);t=a.project(c,H7)}h.clone(t,e.position)}n.heading=n.heading-D.PI_OVER_TWO;let o=Le.fromHeadingPitchRoll(n,Dse),s=$.fromQuaternion(o,Rse);$.getColumn(s,0,e.direction),$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right),e._setTransform(r),e._adjustOrthographicFrustum(!0)}function mNt(e,t,n,i){let r=N.clone(e.transform,Pse);if(e._setTransform(N.IDENTITY),!h.equals(t,e.positionWC)){if(i){let c=e._projection,u=c.ellipsoid.cartesianToCartographic(t,_Le);t=c.project(u,H7)}U.clone(t,e.position);let o=-t.z*.5,s=-o,a=e.frustum;if(s>o){let c=a.top/a.right;a.right=s,a.left=o,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===Au.ROTATE){n.heading=n.heading-D.PI_OVER_TWO,n.pitch=-D.PI_OVER_TWO,n.roll=0;let o=Le.fromHeadingPitchRoll(n,Dse),s=$.fromQuaternion(o,Rse);$.getColumn(s,2,e.up),h.cross(e.direction,e.up,e.right)}e._setTransform(r)}var pNt=new h,gNt=new h,_Nt=new h;function yLe(e,t,n,i){let r=h.clone(n.direction,pNt),o=h.clone(n.up,gNt);if(e._scene.mode===re.SCENE3D){let a=e._projection.ellipsoid,c=At.eastNorthUpToFixedFrame(t,a,V7),u=N.inverseTransformation(c,j7);N.multiplyByPointAsVector(u,r,r),N.multiplyByPointAsVector(u,o,o)}let s=h.cross(r,o,_Nt);return i.heading=hLe(r,o),i.pitch=mLe(r),i.roll=pLe(r,o,s),i}var Ise={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},TP=new wc;an.prototype.setView=function(e){e=e??H.EMPTY_OBJECT;let t=e.orientation??H.EMPTY_OBJECT,n=this._mode;if(n===re.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=e.convert??!0,r=e.destination??h.clone(this.positionWC,H7);l(r)&&l(r.west)&&(r=this.getRectangleCameraCoordinates(r,H7),i=!1),l(t.direction)&&(t=yLe(this,r,t,Ise.orientation)),TP.heading=t.heading??0,TP.pitch=t.pitch??-D.PI_OVER_TWO,TP.roll=t.roll??0,n===re.SCENE3D?dNt(this,r,TP):n===re.SCENE2D?mNt(this,r,TP,i):hNt(this,r,TP,i)};var yNt=new h;an.prototype.flyHome=function(e){let t=this._mode;if(t===re.MORPHING&&this._scene.completeMorph(),t===re.SCENE2D)this.flyTo({destination:an.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:N.IDENTITY});else if(t===re.SCENE3D){let n=this.getRectangleCameraCoordinates(an.DEFAULT_VIEW_RECTANGLE),i=h.magnitude(n);i+=i*an.DEFAULT_VIEW_FACTOR,h.normalize(n,n),h.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:N.IDENTITY})}else if(t===re.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new h(0,-1,1);i=h.multiplyByScalar(h.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(h.normalize(i,yNt).z),roll:0},endTransform:N.IDENTITY,convert:!1})}};an.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),Il(this),N.multiplyByVector(this._actualInvTransform,e,t)};an.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new h),Il(this),N.multiplyByPoint(this._actualInvTransform,e,t)};an.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new h),Il(this),N.multiplyByPointAsVector(this._actualInvTransform,e,t)};an.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),Il(this),N.multiplyByVector(this._actualTransform,e,t)};an.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new h),Il(this),N.multiplyByPoint(this._actualTransform,e,t)};an.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new h),Il(this),N.multiplyByPointAsVector(this._actualTransform,e,t)};function ALe(e,t){let n=e._scene.mapMode2D===Au.ROTATE,i=e._maxCoord.x,r=e._maxCoord.y,o,s;n?(s=i,o=-s):(s=t.x-i*2,o=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=o),t.y>r&&(t.y=r),t.y<-r&&(t.y=-r)}var nLe=new h;an.prototype.move=function(e,t){let n=this.position;h.multiplyByScalar(e,t,nLe),h.add(n,nLe,n),this._mode===re.SCENE2D&&ALe(this,n),this._adjustOrthographicFrustum(!0)};an.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?G7(this,e):this.move(this.direction,e)};an.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?G7(this,-e):this.move(this.direction,-e)};an.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};an.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};an.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};an.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};an.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,-e)};an.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,e)};an.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,-e)};an.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,e)};var ANt=new Le,bNt=new $;an.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Le.fromAxisAngle(e,-n,ANt),r=$.fromQuaternion(i,bNt),o=this.direction,s=this.up,a=this.right;$.multiplyByVector(r,o,o),$.multiplyByVector(r,s,s),$.multiplyByVector(r,a,a)};an.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};an.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var xNt=new Le,TNt=new $;an.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Le.fromAxisAngle(e,-n,xNt),r=$.fromQuaternion(i,TNt);$.multiplyByVector(r,this.position,this.position),$.multiplyByVector(r,this.direction,this.direction),$.multiplyByVector(r,this.up,this.up),h.cross(this.direction,this.up,this.right),h.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};an.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,bLe(this,e)};an.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,bLe(this,-e)};var ENt=new h,CNt=new h,vNt=new h,iLe=new h;function bLe(e,t){let n=e.position;if(l(e.constrainedAxis)&&!h.equalsEpsilon(e.position,h.ZERO,D.EPSILON2)){let i=h.normalize(n,ENt),r=h.equalsEpsilon(i,e.constrainedAxis,D.EPSILON2),o=h.equalsEpsilon(i,h.negate(e.constrainedAxis,iLe),D.EPSILON2);if(!r&&!o){let s=h.normalize(e.constrainedAxis,CNt),a=h.dot(i,s),c=D.acosClamped(a);t>0&&t>c&&(t=c-D.EPSILON4),a=h.dot(i,h.negate(s,iLe)),c=D.acosClamped(a),t<0&&-t>c&&(t=-c+D.EPSILON4);let u=h.cross(s,i,vNt);e.rotate(u,t)}else(r&&t<0||o&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}an.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,xLe(this,-e)};an.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,xLe(this,e)};function xLe(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function G7(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let r=n.top-t,o=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===Au.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),r<=o&&(r=1,o=-1),i=n.right/n.top,n.top=r,n.bottom=o,n.right=n.top*i,n.left=-n.right}else{let r=n.right-t,o=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===Au.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),r<=o&&(r=1,o=-1),i=n.top/n.right,n.right=r,n.left=o,n.top=n.right*i,n.bottom=-n.top}}function TLe(e,t){e.move(e.direction,t)}an.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?G7(this,e):TLe(this,e)};an.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?G7(this,-e):TLe(this,-e)};an.prototype.getMagnitude=function(){if(this._mode===re.SCENE3D)return h.magnitude(this.position);if(this._mode===re.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===re.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var SNt=new N;an.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??ee.default,r=At.eastNorthUpToFixedFrame(e,i,SNt);this.lookAtTransform(r,t)};var wNt=new h,INt=new Le,PNt=new Le,DNt=new $;function ELe(e,t,n,i){t=D.clamp(t,-D.PI_OVER_TWO,D.PI_OVER_TWO),e=D.zeroToTwoPi(e)-D.PI_OVER_TWO;let r=Le.fromAxisAngle(h.UNIT_Y,-t,INt),o=Le.fromAxisAngle(h.UNIT_Z,-e,PNt),s=Le.multiply(o,r,o),a=$.fromQuaternion(s,DNt),c=h.clone(h.UNIT_X,i);return $.multiplyByVector(a,c,c),h.negate(c,c),h.multiplyByScalar(c,n,c),c}an.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=ELe(t.heading,t.pitch,t.range,wNt):n=t,this._mode===re.SCENE2D){U.clone(U.ZERO,this.position),h.negate(n,this.up),this.up.z=0,h.magnitudeSquared(this.up)<D.EPSILON10&&h.clone(h.UNIT_Y,this.up),h.normalize(this.up,this.up),this._setTransform(N.IDENTITY),h.negate(h.UNIT_Z,this.direction),h.cross(this.direction,this.up,this.right),h.normalize(this.right,this.right);let i=this.frustum,r=i.top/i.right;i.right=h.magnitude(n)*.5,i.left=-i.right,i.top=r*i.right,i.bottom=-i.top,this._setTransform(e);return}h.clone(n,this.position),h.negate(this.position,this.direction),h.normalize(this.direction,this.direction),h.cross(this.direction,h.UNIT_Z,this.right),h.magnitudeSquared(this.right)<D.EPSILON10&&h.clone(h.UNIT_X,this.right),h.normalize(this.right,this.right),h.cross(this.right,this.direction,this.up),h.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var RNt=new N,rLe=new h,ONt=new h,oLe=new h;an.prototype.lookAtWorldPosition=function(e,t=ee.default){let n=N.clone(this._transform,RNt);this._setTransform(N.IDENTITY);let i=h.subtract(e,this.positionWC,rLe);h.magnitudeSquared(i)<D.EPSILON8&&(i=h.clone(this.directionWC,rLe)),i=h.normalize(i,this.direction);let r=t.geodeticSurfaceNormal(e,ONt),o=h.cross(i,r,oLe);h.magnitudeSquared(o)<D.EPSILON8&&(o=h.clone(this.rightWC,oLe)),h.normalize(o,this.right);let s=h.cross(o,i,this.up);h.normalize(s,this.up),this._setTransform(n)};var Sz=new he,MNt=new he,NNt=new h,LNt=new h,FNt=new h,BNt=new h,kNt=new h,UNt=new h,zNt=new h,vse=new h,VNt={direction:new h,right:new h,up:new h},sLe;function wl(e,t,n,i){return Math.abs(h.dot(t,n))/i-h.dot(e,n)}function CLe(e,t,n,i){let r=e._projection.ellipsoid,o=i?e:VNt,{north:s,south:a,west:c}=t,{east:u}=t;c>u&&(u+=D.TWO_PI);let f=(c+u)*.5,d;if(a<-D.PI_OVER_TWO+D.RADIANS_PER_DEGREE&&s>D.PI_OVER_TWO-D.RADIANS_PER_DEGREE)d=0;else{let O=Sz;O.longitude=f,O.latitude=s,O.height=0;let L=MNt;L.longitude=f,L.latitude=a,L.height=0;let _=sLe;(!l(_)||_.ellipsoid!==r)&&(sLe=_=new _g(void 0,void 0,r)),_.setEndPoints(O,L),d=_.interpolateUsingFraction(.5,Sz).latitude}let p=Sz;p.longitude=f,p.latitude=d,p.height=0;let g=r.cartographicToCartesian(p,zNt),m=Sz;m.longitude=u,m.latitude=s;let y=r.cartographicToCartesian(m,NNt);m.longitude=c;let A=r.cartographicToCartesian(m,FNt);m.longitude=f;let b=r.cartographicToCartesian(m,kNt);m.latitude=a;let x=r.cartographicToCartesian(m,UNt);m.longitude=u;let T=r.cartographicToCartesian(m,BNt);m.longitude=c;let E=r.cartographicToCartesian(m,LNt);h.subtract(A,g,A),h.subtract(T,g,T),h.subtract(y,g,y),h.subtract(E,g,E),h.subtract(b,g,b),h.subtract(x,g,x);let v=r.geodeticSurfaceNormal(g,o.direction);h.negate(v,v);let S=h.cross(v,h.UNIT_Z,o.right);h.normalize(S,S);let I=h.cross(S,v,o.up),R;if(e.frustum instanceof gn){let O=Math.max(h.distance(y,A),h.distance(T,E)),L=Math.max(h.distance(y,T),h.distance(A,E)),_,C,w=e.frustum._offCenterFrustum,P=w.right/w.top,M=L*P;O>M?(_=O,C=_/P):(C=L,_=M),R=Math.max(_,C)}else{let O=Math.tan(e.frustum.fovy*.5),L=e.frustum.aspectRatio*O;if(R=Math.max(wl(v,I,A,O),wl(v,I,T,O),wl(v,I,y,O),wl(v,I,E,O),wl(v,I,b,O),wl(v,I,x,O),wl(v,S,A,L),wl(v,S,T,L),wl(v,S,y,L),wl(v,S,E,L),wl(v,S,b,L),wl(v,S,x,L)),a<0&&s>0){let _=Sz;_.longitude=c,_.latitude=0,_.height=0;let C=r.cartographicToCartesian(_,vse);h.subtract(C,g,C),R=Math.max(R,wl(v,I,C,O),wl(v,S,C,L)),_.longitude=u,C=r.cartographicToCartesian(_,vse),h.subtract(C,g,C),R=Math.max(R,wl(v,I,C,O),wl(v,S,C,L))}}return h.add(g,h.multiplyByScalar(v,-R,vse),n)}var jNt=new he,HNt=new h,GNt=new h;function WNt(e,t,n){let i=e._projection;t.west>t.east&&(t=ie.MAX_VALUE);let r=e._actualTransform,o=e._actualInvTransform,s=jNt;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,HNt);N.multiplyByPoint(r,a,a),N.multiplyByPoint(o,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,GNt);if(N.multiplyByPoint(r,c,c),N.multiplyByPoint(o,c,c),n.x=(a.x-c.x)*.5+c.x,n.y=(a.y-c.y)*.5+c.y,l(e.frustum.fovy)){let u=Math.tan(e.frustum.fovy*.5),f=e.frustum.aspectRatio*u;n.z=Math.max((a.x-c.x)/f,(a.y-c.y)/u)*.5}else{let u=a.x-c.x,f=a.y-c.y;n.z=Math.max(u,f)}return n}var qNt=new he,YNt=new h,XNt=new h;function KNt(e,t,n){let i=e._projection,r=t.east;t.west>t.east&&(e._scene.mapMode2D===Au.INFINITE_SCROLL?r+=D.TWO_PI:(t=ie.MAX_VALUE,r=t.east));let o=qNt;o.longitude=r,o.latitude=t.north;let s=i.project(o,YNt);o.longitude=t.west,o.latitude=t.south;let a=i.project(o,XNt),c=Math.abs(s.x-a.x)*.5,u=Math.abs(s.y-a.y)*.5,f,d,p=e.frustum.right/e.frustum.top,g=u*p;return c>g?(f=c,d=f/p):(d=u,f=g),u=Math.max(2*f,2*d),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,o=i.unproject(n,o),o.height=u,n=i.project(o,n),n}an.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new h),n===re.SCENE3D)return CLe(this,e,t);if(n===re.COLUMBUS_VIEW)return WNt(this,e,t);if(n===re.SCENE2D)return KNt(this,e,t)};var $Nt=new pn;function JNt(e,t,n,i){n=n??ee.default;let r=e.getPickRay(t,$Nt),o=_i.rayEllipsoid(r,n);if(!o)return;let s=o.start>0?o.start:o.stop;return pn.getPoint(r,s,i)}var ZNt=new pn;function QNt(e,t,n,i){let o=e.getPickRay(t,ZNt).origin;o=h.fromElements(o.y,o.z,0,o);let s=n.unproject(o);if(!(s.latitude<-D.PI_OVER_TWO||s.latitude>D.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var eLt=new pn;function tLt(e,t,n,i){let r=e.getPickRay(t,eLt),o=-r.origin.x/r.direction.x;pn.getPoint(r,o,i);let s=n.unproject(new h(i.y,i.z,0));if(!(s.latitude<-D.PI_OVER_TWO||s.latitude>D.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}an.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new h),t=t??ee.default,this._mode===re.SCENE3D)n=JNt(this,e,t,n);else if(this._mode===re.SCENE2D)n=QNt(this,e,this._projection,n);else if(this._mode===re.COLUMBUS_VIEW)n=tLt(this,e,this._projection,n);else return;return n}};var nLt=new h,iLt=new h,rLt=new h;function oLt(e,t,n){let i=e._scene.canvas,r=i.clientWidth,o=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,u=2/r*t.x-1,f=2/o*(o-t.y)-1,d=e.positionWC;h.clone(d,n.origin);let p=h.multiplyByScalar(e.directionWC,c,nLt);h.add(d,p,p);let g=h.multiplyByScalar(e.rightWC,u*c*a,iLt),m=h.multiplyByScalar(e.upWC,f*c*s,rLt),y=h.add(p,g,n.direction);return h.add(y,m,y),h.subtract(y,d,y),h.normalize(y,y),n}var U7=new h;function sLt(e,t,n){let i=e._scene.canvas,r=i.clientWidth,o=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/r*t.x-1;c*=(s.right-s.left)*.5;let u=2/o*(o-t.y)-1;u*=(s.top-s.bottom)*.5;let f=n.origin;if(h.clone(e.positionWC,f),h.multiplyByScalar(e.rightWC,c,U7),h.add(U7,f,f),h.multiplyByScalar(e.upWC,u,U7),h.add(U7,f,f),h.clone(e.directionWC,n.direction),e._mode===re.SCENE2D&&e._scene.mapMode2D===Au.INFINITE_SCROLL){let d=e._maxCoord.x;f.y=D.mod(f.y+d,2*d)-d}return n}an.prototype.getPickRay=function(e,t){l(t)||(t=new pn);let n=this._scene.canvas;if(n.clientWidth<=0||n.clientHeight<=0)return;let i=this.frustum;return l(i.aspectRatio)&&l(i.fov)&&l(i.near)?oLt(this,e,t):sLt(this,e,t)};var aLt=new h,cLt=new h;an.prototype.distanceToBoundingSphere=function(e){let t=h.subtract(this.positionWC,e.center,aLt),n=h.multiplyByScalar(this.directionWC,h.dot(t,this.directionWC),cLt);return Math.max(0,h.magnitude(n)-e.radius)};var lLt=new U;an.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),r=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,lLt);return Math.max(r.x,r.y)};function uLt(e,t,n,i,r,o){let s=h.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>r?s.z-=n.z-r:n.z<-r&&(s.z+=-r-n.z);function a(c){let u=h.lerp(t,s,c.time,new h);e.worldToCameraCoordinatesPoint(u,e.position)}return{easingFunction:Ls.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:a}}var fLt=new h,aLe=new h,dLt=new h,hLt=new h;function mLt(e,t){let n=e.position,i=e.direction,r=e.worldToCameraCoordinatesVector(h.UNIT_X,fLt),o=-h.dot(r,n)/h.dot(r,i),s=h.add(n,h.multiplyByScalar(i,o,aLe),aLe);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,dLt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,u=h.magnitude(h.subtract(n,s,hLt)),f=c*u,d=a*u,p=e._maxCoord.x,g=e._maxCoord.y,m=Math.max(f-p,p),y=Math.max(d-g,g);if(n.z<-m||n.z>m||n.y<-y||n.y>y){let A=s.y<-m||s.y>m,b=s.z<-y||s.z>y;if(A||b)return uLt(e,n,s,m,y,t)}}an.prototype.createCorrectPositionTween=function(e){if(this._mode===re.COLUMBUS_VIEW)return mLt(this,e)};var pLt=new h,Ja={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};an.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};an.prototype.completeFlight=function(){if(l(this._currentFlight)){this._currentFlight.cancelTween();let e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=Ja.destination,e.orientation.heading=Ja.heading,e.orientation.pitch=Ja.pitch,e.orientation.roll=Ja.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};an.prototype.flyTo=function(e){e=e??H.EMPTY_OBJECT;let t=e.destination;if(this._mode===re.MORPHING)return;this.cancelFlight();let i=t instanceof ie;i&&(t=this.getRectangleCameraCoordinates(t,pLt));let r=e.orientation??H.EMPTY_OBJECT;if(l(r.direction)&&(r=yLe(this,t,r,Ise.orientation)),l(e.duration)&&e.duration<=0){let f=Ise;f.destination=e.destination,f.orientation.heading=r.heading,f.orientation.pitch=r.pitch,f.orientation.roll=r.roll,f.convert=e.convert,f.endTransform=e.endTransform,this.setView(f),typeof e.complete=="function"&&e.complete();return}let o=this,s;Ja.destination=t,Ja.heading=r.heading,Ja.pitch=r.pitch,Ja.roll=r.roll,Ja.duration=e.duration,Ja.complete=function(){s===o._currentFlight&&(o._currentFlight=void 0),l(e.complete)&&e.complete()},Ja.cancel=e.cancel,Ja.endTransform=e.endTransform,Ja.convert=i?!1:e.convert,Ja.maximumHeight=e.maximumHeight,Ja.pitchAdjustHeight=e.pitchAdjustHeight,Ja.flyOverLongitude=e.flyOverLongitude,Ja.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Ja.easingFunction=e.easingFunction;let a=this._scene,c=vz.createTween(a,Ja);if(c.duration===0){typeof c.complete=="function"&&c.complete();return}s=a.tweens.add(c),this._currentFlight=s;let u=this._scene.preloadFlightCamera;this._mode!==re.SCENE2D&&(l(u)||(u=an.clone(this)),u.setView({destination:t,orientation:r}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))};function gLt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),r=n.aspectRatio*i;return Math.max(t/r,t/i)}function _Lt(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let r,o,s=n.right/n.top,a=t*s;return t>a?(r=t,o=r/s):(o=t,r=a),Math.max(r,o)*1.5}var yLt=100;function vLe(e,t,n){n=mh.clone(l(n)?n:an.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,r=e._scene.screenSpaceCameraController.maximumZoomDistance,o=n.range;if(!l(o)||o===0){let s=t.radius;s===0?n.range=yLt:e.frustum instanceof gn||e._mode===re.SCENE2D?n.range=_Lt(e,s):n.range=gLt(e,s),n.range=D.clamp(n.range,i,r)}return n}an.prototype.viewBoundingSphere=function(e,t){t=vLe(this,e,t),this.lookAt(e.center,t)};var ALt=new N,cLe=new h,bLt=new h,xLt=new h,TLt=new h,ELt=new se,CLt=new Le,vLt=new $;an.prototype.flyToBoundingSphere=function(e,t){t=t??H.EMPTY_OBJECT;let n=this._mode===re.SCENE2D||this._mode===re.COLUMBUS_VIEW;this._setTransform(N.IDENTITY);let i=vLe(this,e,t.offset),r;n?r=h.multiplyByScalar(h.UNIT_Z,i.range,cLe):r=ELe(i.heading,i.pitch,i.range,cLe);let s=this._scene.ellipsoid??ee.default,a=At.eastNorthUpToFixedFrame(e.center,s,ALt);N.multiplyByPoint(a,r,r);let c,u;if(!n){if(c=h.subtract(e.center,r,bLt),h.normalize(c,c),u=N.multiplyByPointAsVector(a,h.UNIT_Z,xLt),1-Math.abs(h.dot(c,u))<D.EPSILON6){let d=Le.fromAxisAngle(c,i.heading,CLt),p=$.fromQuaternion(d,vLt);h.fromCartesian4(N.getColumn(a,1,ELt),u),$.multiplyByVector(p,u,u)}let f=h.cross(c,u,TLt);h.cross(f,c,u),h.normalize(u,u)}this.flyTo({destination:r,orientation:{direction:c,up:u},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var lLe=new h,uLe=new h,Sse=new h,fLe=new h,wz=[new h,new h,new h,new h];function SLt(e,t){let n=t.radii,i=e.positionWC,r=h.multiplyComponents(t.oneOverRadii,i,lLe),o=h.magnitude(r),s=h.normalize(r,uLe),a,c;h.equalsEpsilon(s,h.UNIT_Z,D.EPSILON10)?(a=new h(0,1,0),c=new h(0,0,1)):(a=h.normalize(h.cross(h.UNIT_Z,s,Sse),Sse),c=h.normalize(h.cross(s,a,fLe),fLe));let u=Math.sqrt(h.magnitudeSquared(r)-1),f=h.multiplyByScalar(s,1/o,lLe),d=u/o,p=h.multiplyByScalar(a,d,uLe),g=h.multiplyByScalar(c,d,Sse),m=h.add(f,g,wz[0]);h.subtract(m,p,m),h.multiplyComponents(n,m,m);let y=h.subtract(f,g,wz[1]);h.subtract(y,p,y),h.multiplyComponents(n,y,y);let A=h.subtract(f,g,wz[2]);h.add(A,p,A),h.multiplyComponents(n,A,A);let b=h.add(f,g,wz[3]);return h.add(b,p,b),h.multiplyComponents(n,b,b),wz}var wse=new U,wLt=new h,Mb=[new he,new he,new he,new he];function z7(e,t,n,i,r,o){wse.x=e,wse.y=t;let s=i.pickEllipsoid(wse,r,wLt);return l(s)?(Mb[n]=r.cartesianToCartographic(s,Mb[n]),1):(Mb[n]=r.cartesianToCartographic(o[n],Mb[n]),0)}an.prototype.computeViewRectangle=function(e,t){e=e??ee.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new ue(h.ZERO,e.maximumRadius);if(n.computeVisibility(i)===$t.OUTSIDE)return;let o=this._scene.canvas,s=o.clientWidth,a=o.clientHeight,c=0,u=SLt(this,e);if(c+=z7(0,0,0,this,e,u),c+=z7(0,a,1,this,e,u),c+=z7(s,a,2,this,e,u),c+=z7(s,0,3,this,e,u),c<2)return ie.MAX_VALUE;t=ie.fromCartographicArray(Mb,t);let f=0,d=Mb[3].longitude;for(let p=0;p<4;++p){let g=Mb[p].longitude,m=Math.abs(g-d);m>D.PI?f+=D.TWO_PI-m:f+=m,d=g}return D.equalsEpsilon(Math.abs(f),D.TWO_PI,D.EPSILON9)&&(t.west=-D.PI,t.east=D.PI,Mb[0].latitude>=0?t.north=D.PI_OVER_TWO:t.south=-D.PI_OVER_TWO),t};an.prototype.switchToPerspectiveFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof Ji)return;let e=this._scene;this.frustum=new Ji,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=D.toRadians(60)};an.prototype.switchToOrthographicFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof gn)return;let e=gLe(this),t=this._scene;this.frustum=new gn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};an.clone=function(e,t){return l(t)||(t=new an(e._scene)),h.clone(e.position,t.position),h.clone(e.direction,t.direction),h.clone(e.up,t.up),h.clone(e.right,t.right),N.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var Or=an;var SLe={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4};Object.freeze(SLe);var cr=SLe;var RLe=[to.SHIFT,to.CTRL,to.ALT,[to.SHIFT,to.CTRL],[to.SHIFT,to.ALT],[to.CTRL,to.ALT],[to.SHIFT,to.CTRL,to.ALT]];function Za(e,t){if(!l(t))return`${e}`;let n=Array.isArray(t)?t.toSorted():[t];return`${e}+${n.join("+")}`}function ILt(e,t){U.clone(e.distance.startPosition,t.distance.startPosition),U.clone(e.distance.endPosition,t.distance.endPosition),U.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),U.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function wLe(e,t,n){let i=Za(cr.PINCH,t),r=e._update,o=e._isDown,s=e._eventStartPosition,a=e._pressTime,c=e._releaseTime;r[i]=!0,o[i]=!1,s[i]=new U;let u=e._movement[i];l(u)||(u=e._movement[i]={}),u.distance={startPosition:new U,endPosition:new U},u.angleAndHeight={startPosition:new U,endPosition:new U},u.prevAngle=0,e._eventHandler.setInputAction(function(f){e._buttonsDown++,o[i]=!0,a[i]=new Date,U.lerp(f.position1,f.position2,.5,s[i])},un.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[i]=!1,c[i]=new Date},un.PINCH_END,t),e._eventHandler.setInputAction(function(f){if(o[i]){r[i]?(ILt(f,u),r[i]=!1,u.prevAngle=u.angleAndHeight.startPosition.x):(U.clone(f.distance.endPosition,u.distance.endPosition),U.clone(f.angleAndHeight.endPosition,u.angleAndHeight.endPosition));let d=u.angleAndHeight.endPosition.x,p=u.prevAngle,g=Math.PI*2;for(;d>=p+Math.PI;)d-=g;for(;d<p-Math.PI;)d+=g;u.angleAndHeight.endPosition.x=-d*n.clientWidth/12,u.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},un.PINCH_MOVE,t)}function ILe(e,t){let n=Za(cr.WHEEL,t),i=e._pressTime,r=e._releaseTime,o=e._update;o[n]=!0;let s=e._movement[n];l(s)||(s=e._movement[n]={});let a=e._lastMovement[n];l(a)||(a=e._lastMovement[n]={startPosition:new U,endPosition:new U,valid:!1}),s.startPosition=new U,U.clone(U.ZERO,s.startPosition),s.endPosition=new U,e._eventHandler.setInputAction(function(c){let u=7.5*D.toRadians(c);i[n]=r[n]=new Date,s.endPosition.x=0,s.endPosition.y=u,U.clone(s.endPosition,a.endPosition),a.valid=!0,o[n]=!1},un.WHEEL,t)}function EP(e,t,n){let i=Za(n,t),r=e._isDown,o=e._eventStartPosition,s=e._pressTime;r[i]=!1,o[i]=new U;let a=e._lastMovement[i];l(a)||(a=e._lastMovement[i]={startPosition:new U,endPosition:new U,valid:!1});let c,u;n===cr.LEFT_DRAG?(c=un.LEFT_DOWN,u=un.LEFT_UP):n===cr.RIGHT_DRAG?(c=un.RIGHT_DOWN,u=un.RIGHT_UP):n===cr.MIDDLE_DRAG&&(c=un.MIDDLE_DOWN,u=un.MIDDLE_UP),e._eventHandler.setInputAction(function(f){e._buttonsDown++,a.valid=!1,r[i]=!0,s[i]=new Date,U.clone(f.position,o[i])},c,t),e._eventHandler.setInputAction(function(){Ose(Za(n,void 0),e);for(let f of RLe){let d=Za(n,f);Ose(d,e)}},u,t)}function Ose(e,t){let n=t._releaseTime,i=t._isDown;i[e]&&(t._buttonsDown=Math.max(t._buttonsDown-1,0)),i[e]=!1,n[e]=new Date}function PLe(e,t){U.clone(e.startPosition,t.startPosition),U.clone(e.endPosition,t.endPosition)}function PLt(e,t,n){let i=n._isDown,r=!1,o=Za(e,t);for(let[c,u]of Object.entries(i))c.startsWith(e)&&u&&c!==o&&(r=!0,Ose(c,n));if(!r)return;let s=n._pressTime,a=n._lastMovement[o];l(a)||(a=n._lastMovement[o]={startPosition:new U,endPosition:new U,valid:!1}),n._buttonsDown++,a.valid=!1,i[o]=!0,s[o]=new Date}function DLe(e,t){let n=e._update,i=e._movement,r=e._lastMovement,o=e._isDown;for(let s in cr)if(cr.hasOwnProperty(s)){let a=cr[s];if(l(a)){let c=Za(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new U,endPosition:new U,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new U,endPosition:new U})}}e._eventHandler.setInputAction(function(s){for(let a in cr)if(cr.hasOwnProperty(a)){let c=cr[a];if(l(c)){let u=Za(c,t);PLt(c,t,e),o[u]&&(n[u]?(PLe(i[u],r[u]),r[u].valid=!0,PLe(s,i[u]),n[u]=!1):U.clone(s.endPosition,i[u].endPosition))}}U.clone(s.endPosition,e._currentMousePosition)},un.MOUSE_MOVE,t)}function Ch(e){this._eventHandler=new ua(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new U,ILe(this,void 0),wLe(this,void 0,e),EP(this,void 0,cr.LEFT_DRAG),EP(this,void 0,cr.RIGHT_DRAG),EP(this,void 0,cr.MIDDLE_DRAG),DLe(this,void 0);for(let t of RLe)ILe(this,t),wLe(this,t,e),EP(this,t,cr.LEFT_DRAG),EP(this,t,cr.RIGHT_DRAG),EP(this,t,cr.MIDDLE_DRAG),DLe(this,t)}Object.defineProperties(Ch.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Za(cr.WHEEL)]||!this._update[Za(cr.WHEEL,to.SHIFT)]||!this._update[Za(cr.WHEEL,to.CTRL)]||!this._update[Za(cr.WHEEL,to.ALT)];return this._buttonsDown>0||e}}});Ch.prototype.isMoving=function(e,t){let n=Za(e,t);return!this._update[n]};Ch.prototype.getMovement=function(e,t){let n=Za(e,t);return this._movement[n]};Ch.prototype.getLastMovement=function(e,t){let n=Za(e,t),i=this._lastMovement[n];if(i.valid)return i};Ch.prototype.isButtonDown=function(e,t){let n=Za(e,t);return this._isDown[n]};Ch.prototype.getStartMousePosition=function(e,t){if(e===cr.WHEEL)return this._currentMousePosition;let n=Za(e,t);return this._eventStartPosition[n]};Ch.prototype.getButtonPressTime=function(e,t){let n=Za(e,t);return this._pressTime[n]};Ch.prototype.getButtonReleaseTime=function(e,t){let n=Za(e,t);return this._releaseTime[n]};Ch.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};Ch.prototype.isDestroyed=function(){return!1};Ch.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),le(this)};var Iz=Ch;var Mse=class{constructor(){ut(this,"featuresLength");ut(this,"pointsLength");ut(this,"trianglesLength");ut(this,"geometryByteLength");ut(this,"texturesByteLength");ut(this,"batchTableByteLength");ut(this,"innerContents");ut(this,"ready");ut(this,"tileset");ut(this,"tile");ut(this,"url");ut(this,"batchTable");ut(this,"metadata");ut(this,"group");this.featurePropertiesDirty=!1}hasProperty(t,n){pe.throwInstantiationError()}getFeature(t){pe.throwInstantiationError()}applyDebugSettings(t,n){pe.throwInstantiationError()}applyStyle(t){pe.throwInstantiationError()}update(t,n){pe.throwInstantiationError()}pick(t,n,i){pe.throwInstantiationError()}isDestroyed(){pe.throwInstantiationError()}destroy(){pe.throwInstantiationError()}},Nse=Mse;function DLt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var vh=DLt;function Pz(e){e=e??H.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new iy({comparator:Pz.comparator})}Pz.prototype.addSubtree=function(e){let t=new RLt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),r=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};Pz.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let r=0;r<i;r++){let o=n[r],a=o.subtree.implicitCoordinates;if(e.isEqual(a))return o.subtree}};Pz.comparator=function(e,t){let n=e.subtree.implicitCoordinates,i=t.subtree.implicitCoordinates;return n.isAncestor(i)?1:i.isAncestor(n)?-1:e.stamp-t.stamp};function RLt(e,t){this.subtree=e,this.stamp=t}var Dz=Pz;function cy(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(cy.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});cy.fromMetadataArray=function(e){return new cy({metadata:e})};cy.fromGltf=async function(e){let t=new Lf({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new cy({loader:t})};cy.prototype.update=function(e,t){let n=this._loader;if(!this._ready){if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){let{structuralMetadata:i,scene:r}=n.components,{attributes:o}=r.nodes[0].primitives[0];this._metadata=OLt(o,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function OLt(e,t,n){let{className:i,names:r,types:o,componentTypes:s}=n.provider,a=t.propertyAttributes.find(f=>f.class.id===i),{properties:c}=a,u=new Array(r.length);for(let f=0;f<e.length;f++){let d=c[r[f]].attribute,p=e.find(A=>A.name===d);if(!l(p))continue;let g=Lt.toComponentDatatype(s[f]),m=bt.getComponentCount(o[f]),y=p.count*m;u[f]=Y.createArrayBufferView(g,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,y)}return u}cy.prototype.isDestroyed=function(){return!1};cy.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),le(this)};var mC=cy;function Pl(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ue,this._boundTransform=new N,this._shapeTransform=new N,this._minBounds=Pl.DefaultMinBounds.clone(),this._maxBounds=Pl.DefaultMaxBounds.clone(),this._renderMinBounds=Pl.DefaultMinBounds.clone(),this._renderMaxBounds=Pl.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=Pl,n=[new ia(h.negate(h.UNIT_X,new h),e.x),new ia(h.negate(h.UNIT_Y,new h),e.y),new ia(h.negate(h.UNIT_Z,new h),e.z),new ia(h.UNIT_X,-t.x),new ia(h.UNIT_Y,-t.y),new ia(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new ay({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={boxEcToXyz:new $,boxLocalToShapeUvScale:new h},this._shaderDefines={BOX_INTERSECTION_INDEX:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(Pl.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var MLt=new h,NLt=new h,LLt=new $,FLt=new h,BLt=new h;Pl.prototype.update=function(e,t,n,i,r){i=i??t.clone(FLt),r=r??n.clone(BLt),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let o=h.clamp(t,i,r,this._renderMinBounds),s=h.clamp(n,i,r,this._renderMaxBounds),a=N.getScale(e,NLt);if(o.x>s.x||o.y>s.y||o.z>s.z||(o.x===s.x)+(o.y===s.y)+(o.z===s.z)>=2||a.x===0||a.y===0||a.z===0)return!1;let c=this._renderBoundPlanes;c.get(0).distance=o.x,c.get(1).distance=o.y,c.get(2).distance=o.z,c.get(3).distance=-s.x,c.get(4).distance=-s.y,c.get(5).distance=-s.z,this._shapeTransform=N.clone(e,this._shapeTransform),this._orientedBoundingBox=Bse(o,s,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=N.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ue.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let u=this._shaderUniforms,f=this._shaderDefines;for(let y in f)f.hasOwnProperty(y)&&(f[y]=void 0);let d=0;f.BOX_INTERSECTION_INDEX=d,d+=1;let p=t,g=n,m=h.fromElements(Lse(p.x,g.x),Lse(p.y,g.y),Lse(p.z,g.z),u.boxLocalToShapeUvScale);return this._localToShapeUvTranslate=h.negate(h.multiplyComponents(m,p,this._localToShapeUvTranslate),this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=d,!0};function Lse(e,t){return D.equalsEpsilon(e,t,D.EPSILON7)?1:1/(t-e)}var kLt=new N;Pl.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=N.inverse(this._shapeTransform,kLt),i=N.getMatrix3(n,t.boxEcToXyz),r=e.context.uniformState.inverseViewRotation;$.multiply(i,r,t.boxEcToXyz)};Pl.prototype.convertLocalToShapeUvSpace=function(e,t){let{boxLocalToShapeUvScale:n}=this._shaderUniforms,i=this._localToShapeUvTranslate;return h.add(h.multiplyComponents(e,n,t),i,t)};var W7=new h,Fse=new h;Pl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,r){let o=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.fromElements(D.lerp(o.x,s.x,a*t),D.lerp(o.y,s.y,a*n),D.lerp(o.z,s.z,a*i),W7),u=h.fromElements(D.lerp(o.x,s.x,a*(t+1)),D.lerp(o.y,s.y,a*(n+1)),D.lerp(o.z,s.z,a*(i+1)),Fse);return Bse(c,u,this._shapeTransform,r)};var OLe=new h;Pl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let r=1/Math.pow(2,e.level),o=h.divideComponents(h.ONE,t,OLe),s=h.multiplyByScalar(o,r,OLe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,W7),r,W7),c=h.add(a,s,Fse),u=this._minBounds,f=this._maxBounds,d=h.fromElements(D.lerp(u.x,f.x,a.x),D.lerp(u.y,f.y,a.y),D.lerp(u.z,f.z,a.z),W7),p=h.fromElements(D.lerp(u.x,f.x,c.x),D.lerp(u.y,f.y,c.y),D.lerp(u.z,f.z,c.z),Fse);return Bse(d,p,this._shapeTransform,i)};Pl.DefaultMinBounds=Object.freeze(new h(-1,-1,-1));Pl.DefaultMaxBounds=Object.freeze(new h(1,1,1));var MLe=new h;function Bse(e,t,n,i){let r=Pl.DefaultMinBounds,o=Pl.DefaultMaxBounds;if(h.equals(e,r)&&h.equals(t,o))i.center=N.getTranslation(n,i.center),i.halfAxes=N.getMatrix3(n,i.halfAxes);else{let a=N.getScale(n,MLe),c=h.midpoint(e,t,MLt);i.center=N.multiplyByPoint(n,c,i.center),a=h.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),MLe);let u=N.getRotation(n,LLt);i.halfAxes=$.setScale(u,a,i.halfAxes)}return i}var pC=Pl;function dd(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ue,this._boundTransform=new N,this._shapeTransform=new N,this._minBounds=dd.DefaultMinBounds.clone(),this._maxBounds=dd.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=dd,n=[new ia(h.negate(h.UNIT_Z,new h),e.z),new ia(h.UNIT_Z,-t.z)];this._renderBoundPlanes=new ay({planes:n}),this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraShapePosition:new h,cylinderEcToRadialTangentUp:new $,cylinderRenderRadiusMinMax:new U,cylinderRenderAngleMinMax:new U,cylinderLocalToShapeUvScale:new h,cylinderShapeUvAngleRangeOrigin:0},this._shaderDefines={CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(dd.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var ULt=new h,zLt=new h,VLt=new h,jLt=new h,HLt=new h,GLt=new N,WLt=new h,NLe=new U;dd.prototype.update=function(e,t,n,i,r){i=i??t.clone(zLt),r=r??n.clone(VLt),t=h.clone(t,this._minBounds),n=h.clone(n,this._maxBounds);let{DefaultMinBounds:o,DefaultMaxBounds:s}=dd,a=s.y-o.y,c=.5*a,u=D.EPSILON10,f=D.EPSILON10;t.x=Math.max(0,t.x),n.x=Math.max(0,n.x),t.y=D.negativePiToPi(t.y),n.y=D.negativePiToPi(n.y),i.y=D.negativePiToPi(i.y),r.y=D.negativePiToPi(r.y);let d=h.maximumByComponent(t,i,jLt),p=h.minimumByComponent(n,r,HLt),g=N.getScale(e,ULt);if(p.x===0||d.x>p.x||d.z>p.z||D.equalsEpsilon(g.x,0,void 0,u)||D.equalsEpsilon(g.y,0,void 0,u)||D.equalsEpsilon(g.z,0,void 0,u))return!1;let m=this._renderBoundPlanes;m.get(0).distance=d.z,m.get(1).distance=-p.z,this._shapeTransform=N.clone(e,this._shapeTransform),this._orientedBoundingBox=zse(d,p,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=N.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ue.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let y=n.y<t.y,A=n.y-t.y+y*a,b=p.y<d.y,x=p.y-d.y+b*a,T=x>=c-f&&x<a-f,E=x>f&&x<c-f,v=x<=f,S=T||E||v,I=this._shaderUniforms,R=this._shaderDefines;for(let q in R)R.hasOwnProperty(q)&&(R[q]=void 0);let O=0;R.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=O,O+=1,A<a-f&&(R.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0),d.x!==o.x&&(R.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,R.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=O,O+=1),I.cylinderRenderRadiusMinMax=U.fromElements(d.x,p.x,I.cylinderRenderRadiusMinMax),d.x===p.x&&(R.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0);let L=n.x-t.x,_=0,C=1;L!==0&&(_=1/L,C=-t.x*_);let w=n.z-t.z,P=0,M=1;w!==0&&(P=1/w,M=-t.z*P),S&&(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,R.CYLINDER_INTERSECTION_INDEX_ANGLE=O,T?(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,O+=1):E?(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,O+=2):v&&(R.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,O+=2),I.cylinderRenderAngleMinMax=U.fromElements(d.y,p.y,I.cylinderRenderAngleMinMax));let F=(t.y-o.y)/a,V=(n.y-o.y)/a,B=1-A/a,j=(V+.5*B)%1;I.cylinderShapeUvAngleRangeOrigin=j;let k=0,G=1;if(A>f){k=a/A;let q=F-j;G=-k*(q-Math.floor(q))}return I.cylinderLocalToShapeUvScale=h.fromElements(_,k,P,I.cylinderLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(C,G,M,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=O,!0};var qLt=new $,YLt=new $,XLt=new N;dd.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=N.inverse(this._shapeTransform,GLt),i=N.multiplyByPoint(n,e.camera.positionWC,WLt);t.cameraShapePosition=h.fromElements(U.magnitude(i),Math.atan2(i.y,i.x),i.z,t.cameraShapePosition);let r=U.normalize(U.fromCartesian3(i,NLe),NLe),o=$.fromRowMajorArray([r.x,r.y,0,-r.y,r.x,0,0,0,1],qLt),s=e.context.uniformState.inverseView,a=N.multiplyTransformation(n,s,XLt),c=N.getMatrix3(a,YLt);t.cylinderEcToRadialTangentUp=$.multiply(o,c,t.cylinderEcToRadialTangentUp)};dd.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.hypot(e.x,e.y),i=Math.atan2(e.y,e.x),r=e.z,{cylinderLocalToShapeUvScale:o,cylinderShapeUvAngleRangeOrigin:s}=this._shaderUniforms,a=this._localToShapeUvTranslate;return n=n*o.x+a.x,i=(i+Math.PI)/(2*Math.PI),i-=s,i=i-Math.floor(i),i=i*o.y+a.y,r=r*o.z+a.z,h.fromElements(n,i,r,t)};var q7=new h,Use=new h;dd.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,r){let o=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=h.fromElements(D.lerp(o.x,s.x,t*a),D.lerp(o.y,s.y,n*a),D.lerp(o.z,s.z,i*a),q7),u=h.fromElements(D.lerp(o.x,s.x,(t+1)*a),D.lerp(o.y,s.y,(n+1)*a),D.lerp(o.z,s.z,(i+1)*a),Use);return zse(c,u,this._shapeTransform,r)};var LLe=new h;dd.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let r=1/Math.pow(2,e.level),o=h.divideComponents(h.ONE,t,LLe),s=h.multiplyByScalar(o,r,LLe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,q7),r,q7),c=h.add(a,s,Use),u=this._minBounds,f=this._maxBounds,d=h.fromElements(D.lerp(u.x,f.x,a.x),D.lerp(u.y,f.y,a.y),D.lerp(u.z,f.z,a.z),q7),p=h.fromElements(D.lerp(u.x,f.x,c.x),D.lerp(u.y,f.y,c.y),D.lerp(u.z,f.z,c.z),Use);return zse(d,p,this._shapeTransform,i)};dd.DefaultMinBounds=Object.freeze(new h(0,-D.PI,-1));dd.DefaultMaxBounds=Object.freeze(new h(1,+D.PI,1));var KLt=5,$Lt=new Array(KLt),JLt=new h,ZLt=new $,QLt=new N,eFt=new N,tFt=new N,kse=new N,nFt=new h,iFt=new h,rFt=new h,BLe=new Array(8);for(let e=0;e<8;e++)BLe[e]=new h;function FLe(e,t,n){return Math.abs(se.dot(e,t))<n}function oFt(e){let t=N.getColumn(e,0,nFt),n=N.getColumn(e,1,iFt),i=N.getColumn(e,2,rFt),r=D.EPSILON4;return FLe(t,n,r)&&FLe(n,i,r)}function sFt(e,t){let n=BLe;h.fromElements(-.5,-.5,-.5,n[0]),h.fromElements(-.5,-.5,.5,n[1]),h.fromElements(-.5,.5,-.5,n[2]),h.fromElements(-.5,.5,.5,n[3]),h.fromElements(.5,-.5,-.5,n[4]),h.fromElements(.5,-.5,.5,n[5]),h.fromElements(.5,.5,-.5,n[6]),h.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)N.multiplyByPoint(e,n[i],n[i]);return Qt.fromPoints(n,t)}var aFt=new h;function zse(e,t,n,i){let r=e.x,o=t.x,s=e.y,a=t.y<s?t.y+D.TWO_PI:t.y,c=e.z,u=t.z,f=a-s,d=s+f*.5,p=$Lt,g=0;p[g++]=s,p[g++]=a,p[g++]=d,f>D.PI&&(p[g++]=d-D.PI_OVER_TWO,p[g++]=d+D.PI_OVER_TWO);let m=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,b=Number.NEGATIVE_INFINITY;for(let F=0;F<g;++F){let V=p[F]-d,B=Math.cos(V),j=Math.sin(V),k=B*r,G=j*r,q=B*o,Q=j*o;m=Math.min(m,k,q),y=Math.min(y,G,Q),A=Math.max(A,k,q),b=Math.max(b,G,Q)}let x=A-m,T=b-y,E=u-c,v=(m+A)*.5,S=(y+b)*.5,I=(c+u)*.5,R=h.fromElements(v,S,I,JLt),O=$.fromRotationZ(d,ZLt),L=h.fromElements(x,T,E,aFt),_=N.fromScale(L,tFt),C=N.fromRotation(O,eFt),w=N.fromTranslation(R,QLt),P=N.multiplyTransformation(C,N.multiplyTransformation(w,_,kse),kse),M=N.multiplyTransformation(n,P,kse);return oFt(M)?Qt.fromTransformation(M,i):sFt(M,i)}var gC=dd;function Sh(){this._orientedBoundingBox=new Qt,this._boundingSphere=new ue,this._boundTransform=new N,this._shapeTransform=new N,this._rectangle=new ie,this._minimumHeight=Sh.DefaultMinBounds.z,this._maximumHeight=Sh.DefaultMaxBounds.z,this._ellipsoid=new ee,this._translation=new h,this._rotation=new $,this._localToShapeUvTranslate=new h,this._shaderUniforms={cameraPositionCartographic:new h,ellipsoidEcToEastNorthUp:new $,ellipsoidRadii:new h,eccentricitySquared:0,evoluteScale:new U,ellipsoidCurvatureAtLatitude:new U,ellipsoidInverseRadiiSquared:new h,ellipsoidRenderLongitudeMinMax:new U,ellipsoidShapeUvLongitudeRangeOrigin:0,ellipsoidShapeUvLongitudeMinMaxMid:new h,ellipsoidLocalToShapeUvScale:new h,ellipsoidRenderLatitudeSinMinMax:new U,clipMinMaxHeight:new U},this._shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LONGITUDE:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX:void 0,ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(Sh.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var cFt=new h,lFt=new h,uFt=new h,fFt=new h,dFt=new h,hFt=new h,mFt=new h,pFt=new h,kLe=new h,ULe=new h,gFt=new ie;Sh.prototype.update=function(e,t,n,i,r){let{DefaultMinBounds:o,DefaultMaxBounds:s}=Sh;i=i??o,r=r??s;let a=D.EPSILON10,c=D.EPSILON10,u=D.EPSILON10,f=D.EPSILON3,d=N.getScale(e,pFt),p=h.clone(o,cFt);p.z=-h.minimumComponent(d);let g=h.clamp(t,p,s,lFt),m=h.clamp(n,p,s,uFt),y=h.clamp(i,p,s,fFt),A=h.clamp(r,p,s,dFt),b=h.maximumByComponent(g,y,hFt),x=h.minimumByComponent(m,A,mFt),T=h.add(d,h.fromElements(m.z,m.z,m.z,kLe),kLe),E=h.add(d,h.fromElements(x.z,x.z,x.z,ULe),ULe);if(b.y>x.y||b.y===s.y||x.y===o.y||b.z>x.z||D.equalsEpsilon(E,h.ZERO,void 0,a))return!1;this._rectangle=ie.fromRadians(g.x,g.y,m.x,m.y),this._translation=N.getTranslation(e,this._translation),this._rotation=N.getRotation(e,this._rotation),this._ellipsoid=ee.fromCartesian3(d,this._ellipsoid),this._minimumHeight=g.z,this._maximumHeight=m.z;let v=ie.fromRadians(b.x,b.y,x.x,x.y,gFt);this._orientedBoundingBox=Vse(v,b.z,x.z,this._ellipsoid,this._translation,this._rotation,this._orientedBoundingBox),this._shapeTransform=N.fromRotationTranslation(this._rotation,this._translation,this._shapeTransform),this._boundTransform=N.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=ue.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let S=s.x-o.x,I=.5*S,R=x.x<b.x,O=x.x-b.x+R*S,L=O<=c,_=O>=I-c&&O<S-c,C=O>c&&O<I-c,w=L||_||C,P=m.x<g.x,M=m.x-g.x+P*S,F=M>I+c&&M<S-c,V=M>=I-c&&M<=I+c,B=M<I-c,j=F||V||B,k=x.y<-f,G=x.y>=-f&&x.y<=+f,q=x.y>+f&&x.y<s.y-u,Q=k||G||q,W=b.y>o.y+u&&b.y<-f,J=b.y>=-f&&b.y<=+f,Z=b.y>+f,ae=W||J||Z,Ae=Q||ae,fe=m.y-g.y,xe=m.y<-f,ge=m.y>=-f&&m.y<=+f,we=m.y>+f&&m.y<s.y-u,Se=xe||ge||we,Re=g.y>o.y+u&&g.y<-f,Qe=g.y>=-f&&g.y<=+f,He=g.y>+f,$e=Se||(Re||Qe||He),Pe=this._shaderUniforms,qe=this._shaderDefines;for(let Xn in qe)qe.hasOwnProperty(Xn)&&(qe[Xn]=void 0);Pe.ellipsoidRadii=h.clone(T,Pe.ellipsoidRadii);let{x:st,z:vt}=Pe.ellipsoidRadii,Gt=vt/st;Pe.eccentricitySquared=1-Gt*Gt,Pe.evoluteScale=U.fromElements((st*st-vt*vt)/st,(vt*vt-st*st)/vt,Pe.evoluteScale),Pe.ellipsoidInverseRadiiSquared=h.divideComponents(h.ONE,h.multiplyComponents(Pe.ellipsoidRadii,Pe.ellipsoidRadii,Pe.ellipsoidInverseRadiiSquared),Pe.ellipsoidInverseRadiiSquared);let lt=0;qe.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=lt,lt+=1,qe.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=lt,lt+=1,Pe.clipMinMaxHeight=U.fromElements(b.z-m.z,x.z-m.z,Pe.clipMinMaxHeight);let mt=m.z-g.z,ft=mt===0?0:1/mt;w&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,qe.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=lt,_?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,lt+=1):C?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,lt+=2):L&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,lt+=2),Pe.ellipsoidRenderLongitudeMinMax=U.fromElements(b.x,x.x,Pe.ellipsoidRenderLongitudeMinMax));let Xt=0,rt=1;if(j){qe.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0;let Xn=(g.x-o.x)/S,bi=(m.x-o.x)/S,Wi=1-M/S,wi=(bi+.5*Wi)%1;if(Pe.ellipsoidShapeUvLongitudeRangeOrigin=wi,M>c){Xt=S/M;let hi=Xn-wi;rt=-Xt*(hi-Math.floor(hi))}}Ae&&(ae&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,qe.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=lt,W?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,lt+=1):J?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,lt+=1):Z&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,lt+=2)),Q&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,qe.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=lt,k?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,lt+=2):G?(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,lt+=1):q&&(qe.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,lt+=1)),Pe.ellipsoidRenderLatitudeSinMinMax=U.fromElements(Math.sin(b.y),Math.sin(x.y),Pe.ellipsoidRenderLatitudeSinMinMax));let ht=0,Bi=1;return $e&&(qe.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,fe>u&&(ht=(s.y-o.y)/fe,Bi=(o.y-g.y)/fe)),Pe.ellipsoidLocalToShapeUvScale=h.fromElements(Xt,ht,ft,Pe.ellipsoidLocalToShapeUvScale),this._localToShapeUvTranslate=h.fromElements(rt,Bi,0,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=lt,!0};var _Ft=new he,yFt=new h,AFt=new N,zLe=new $;Sh.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=this._ellipsoid,i=e.camera.positionWC,r=n.cartesianToCartographic(i,_Ft);h.fromElements(r.longitude,r.latitude,r.height,t.cameraPositionCartographic);let o=h.fromRadians(r.longitude,r.latitude,0,n,yFt);t.ellipsoidCurvatureAtLatitude=n.getLocalCurvature(o,t.ellipsoidCurvatureAtLatitude);let s=At.eastNorthUpToFixedFrame(o,n,AFt),a=N.getRotation(s,zLe),c=e.context.uniformState.viewRotation,u=$.multiply(c,a,zLe);t.ellipsoidEcToEastNorthUp=$.transpose(u,t.ellipsoidEcToEastNorthUp)};var YLe=new ie;Sh.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,r){let o=1/Math.pow(2,e),s=t*o,a=(t+1)*o,c=n*o,u=(n+1)*o,f=i*o,d=(i+1)*o,p=ie.subsection(this._rectangle,s,c,a,u,YLe),g=D.lerp(this._minimumHeight,this._maximumHeight,f),m=D.lerp(this._minimumHeight,this._maximumHeight,d);return Vse(p,g,m,this._ellipsoid,this._translation,this._rotation,r)};var bFt=new U,xFt=new U,Rz=new U,VLe=new U,jLe=new U,Oz=new U;function TFt(e,t,n,i){let r=U.abs(e,bFt),o=U.fromElements(1/t.x,1/t.y,xFt),s=U.fromElements(Math.SQRT1_2,Math.SQRT1_2,Rz),a=U.multiplyComponents(t,s,VLe),c=U.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,jLe);for(let u=0;u<3;++u){let f=U.magnitude(U.subtract(a,c,Oz)),d=U.normalize(U.subtract(r,c,Oz),Oz),p=U.multiplyByScalar(d,f,Oz);s=U.multiplyComponents(U.add(p,c,Rz),o,Rz),s=U.normalize(U.clamp(s,U.ZERO,U.ONE,Rz),Rz),a=U.multiplyComponents(t,s,VLe),c=U.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,jLe)}return h.fromElements(Math.sign(e.x)*a.x,Math.sign(e.y)*a.y,U.magnitude(U.subtract(a,c,Oz)),i)}var EFt=new U,HLe=new U,CFt=new h,GLe=new U;Sh.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.atan2(e.y,e.x),{ellipsoidRadii:i,evoluteScale:r,ellipsoidInverseRadiiSquared:o,ellipsoidShapeUvLongitudeRangeOrigin:s,ellipsoidLocalToShapeUvScale:a}=this._shaderUniforms,c=this._localToShapeUvTranslate,u=Math.hypot(e.x,e.y),f=U.fromElements(u,e.z,HLe),d=TFt(f,U.fromElements(i.x,i.z,EFt),r,CFt),p=U.normalize(U.fromElements(d.x*o.x,d.y*o.z,GLe),GLe),g=Math.atan2(p.y,p.x),m=U.magnitude(f)<U.magnitude(d)?-1:1,y=U.subtract(f,d,HLe),A=m*U.magnitude(y),{ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:b,ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE:x}=this._shaderDefines;return n=(n+Math.PI)/(2*Math.PI),l(b)&&(n-=s,n=n-Math.floor(n),n=n*a.x+c.x),g=(g+Math.PI/2)/Math.PI,l(x)&&(g=g*a.y+c.y),A=1+A*a.z,h.fromElements(n,g,A,t)};var WLe=new h,qLe=new h,vFt=new h;Sh.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let r=1/Math.pow(2,e.level),o=h.divideComponents(h.ONE,t,WLe),s=h.multiplyByScalar(o,r,WLe),a=h.multiplyByScalar(h.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,qLe),r,qLe),c=h.add(a,s,vFt),u=ie.subsection(this._rectangle,a.x,a.y,c.x,c.y,YLe),f=D.lerp(this._minimumHeight,this._maximumHeight,a.z),d=D.lerp(this._minimumHeight,this._maximumHeight,c.z);return Vse(u,f,d,this._ellipsoid,this._translation,this._rotation,i)};function Vse(e,t,n,i,r,o,s){return s=Qt.fromRectangle(e,t,n,i,s),s.center=h.add(s.center,r,s.center),s.halfAxes=$.multiply(s.halfAxes,o,s.halfAxes),s}Sh.DefaultMinBounds=Object.freeze(new h(-D.PI,-D.PI_OVER_TWO,-ee.WGS84.minimumRadius));Sh.DefaultMaxBounds=Object.freeze(new h(D.PI,D.PI_OVER_TWO,10*ee.WGS84.maximumRadius));var _C=Sh;var df={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};df.getMinBounds=function(e){switch(e){case df.BOX:return pC.DefaultMinBounds;case df.ELLIPSOID:return _C.DefaultMinBounds;case df.CYLINDER:return gC.DefaultMinBounds}};df.getMaxBounds=function(e){switch(e){case df.BOX:return pC.DefaultMaxBounds;case df.ELLIPSOID:return _C.DefaultMaxBounds;case df.CYLINDER:return gC.DefaultMaxBounds}};df.getShapeConstructor=function(e){switch(e){case df.BOX:return pC;case df.ELLIPSOID:return _C;case df.CYLINDER:return gC}};Object.freeze(df);var xc=df;function Mz(e){e=e??H.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:r,shape:o,dimensions:s,paddingBefore:a=h.ZERO.clone(),paddingAfter:c=h.ZERO.clone(),globalTransform:u=N.IDENTITY.clone(),shapeTransform:f=N.IDENTITY.clone(),minBounds:d,maxBounds:p,minimumValues:g,maximumValues:m,maximumTileCount:y}=e;this._shapeTransform=f,this._globalTransform=u,this._shape=o,this._minBounds=d,this._maxBounds=p,this._dimensions=s,this._paddingBefore=a,this._paddingAfter=c,this._className=t,this._names=n,this._types=i,this._componentTypes=r,this._metadataOrder=o===xc.ELLIPSOID?U0.Z_UP:U0.Y_UP,this._minimumValues=g,this._maximumValues=m,this._maximumTileCount=y,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new Dz}Object.defineProperties(Mz.prototype,{globalTransform:{get:function(){return this._globalTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shape:{get:function(){return this._shape}},minBounds:{get:function(){return this._minBounds}},maxBounds:{get:function(){return this._maxBounds}},dimensions:{get:function(){return this._dimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},className:{get:function(){return this._className}},names:{get:function(){return this._names}},types:{get:function(){return this._types}},componentTypes:{get:function(){return this._componentTypes}},metadataOrder:{get:function(){return this._metadataOrder}},minimumValues:{get:function(){return this._minimumValues}},maximumValues:{get:function(){return this._maximumValues}},maximumTileCount:{get:function(){return this._maximumTileCount}},availableLevels:{get:function(){return this._availableLevels}}});Mz.fromUrl=async function(e){let t=De.createIfNeeded(e),n=await t.fetchJson();wFt(n);let i=NFt(n,t);await i.load();let{root:r}=n,o=tr(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,s=new YT({metadataJson:o,schema:i.schema}),a=r.content.extensions["3DTILES_content_voxels"],c=a.class,u=LFt(s,c);Object.assign(u,IFt(r)),l(r.transform)?u.globalTransform=N.unpack(r.transform):u.globalTransform=N.clone(N.IDENTITY),u.dimensions=h.unpack(a.dimensions),u.maximumTileCount=SFt(s),l(a.padding)&&(u.paddingBefore=h.unpack(a.padding.before),u.paddingAfter=h.unpack(a.padding.after));let f=new Mz(u),d=new r0(t,r,i.schema);return f._implicitTileset=d,f._availableLevels=d.availableLevels,Li.unload(i),f};function SFt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Ud.TILESET_TILE_COUNT)}function wFt(e){let t=e.root;if(!l(t.content))throw new oe("Root must have content");if(!tr(t.content,"3DTILES_content_voxels"))throw new oe("Root tile content must have 3DTILES_content_voxels extension");if(!tr(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new oe("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!tr(e,"3DTILES_metadata"))throw new oe("Tileset must have a metadata schema")}function IFt(e){let t=e.boundingVolume;if(l(t.box))return OFt(t.box);if(l(t.region))return PFt(t.region);if(tr(t,"3DTILES_bounding_volume_cylinder"))return MFt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new oe("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function PFt(e){let t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],s=e[5],a=N.fromScale(ee.WGS84.radii),c=new h(t,n,o),u=new h(i,r,s);return{shape:xc.ELLIPSOID,minBounds:c,maxBounds:u,shapeTransform:a}}var DFt=new h,RFt=new $;function OFt(e){let t=Qt.unpack(e),n=$.getScale(t.halfAxes,DFt),i=$.getRotation(t.halfAxes,RFt);return{shape:xc.BOX,minBounds:h.negate(n,new h),maxBounds:h.clone(n),shapeTransform:N.fromRotationTranslation(i,t.center)}}function MFt(e){let{minRadius:t,maxRadius:n,height:i,minAngle:r=-D.PI,maxAngle:o=D.PI,translation:s=[0,0,0],rotation:a=[0,0,0,1]}=e,c=-.5*i+s[2],u=.5*i+s[2],f=N.fromTranslationQuaternionRotationScale(h.unpack(s),Le.unpack(a),h.ONE);return{shape:xc.CYLINDER,minBounds:h.fromElements(t,r,c),maxBounds:h.fromElements(n,o,u),shapeTransform:f}}function NFt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Li.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Li.getSchemaLoader({schema:i})}function LFt(e,t){let{schema:n,statistics:i}=e,r=i?.classes[t],o=n.classes[t].properties,s=Object.entries(o).map(([g,m])=>{let{type:y,componentType:A}=m,b=r?.properties[g].min,x=r?.properties[g].max,T=bt.getComponentCount(y),E=XLe(b,T),v=XLe(x,T);return{id:g,type:y,componentType:A,minValue:E,maxValue:v}}),a=s.map(g=>g.id),c=s.map(g=>g.type),u=s.map(g=>g.componentType),f=s.map(g=>g.minValue),d=s.map(g=>g.maxValue),p=f.some(l);return{className:t,names:a,types:c,componentTypes:u,minimumValues:p?f:void 0,maximumValues:p?d:void 0}}function XLe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,r)=>n[r])}async function FFt(e,t){let n=e._implicitTileset,i=e._subtreeCache,r=i.find(t);if(l(r))return r;let o=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:o.url}),a=await s.fetchArrayBuffer();if(r=i.find(t),l(r))return r;let c=m_(a);return r=await Lg.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(r),r}Mz.prototype.requestData=async function(e){e=e??H.EMPTY_OBJECT;let{tileLevel:t=0,tileX:n=0,tileY:i=0,tileZ:r=0,keyframe:o=0}=e;if(o!==0)return Promise.reject("3D Tiles currently doesn't support time-dynamic data.");let s=this._implicitTileset,a=new o0({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:r}),c=a.isSubtreeRoot()&&a.level>0,u=c?a.getParentSubtreeCoordinates():a.getSubtreeCoordinates(),d=await FFt(this,u);if(!(c?d.childSubtreeIsAvailableAtCoordinates:d.tileIsAvailableAtCoordinates).call(d,a))return Promise.reject(`Tile is not available at level ${t}, x ${n}, y ${i}, z ${r}.`);let{contentUriTemplates:m,baseResource:y}=s,A=m[0].getDerivedResource({templateValues:a.getTemplateValues()}),b=y.getDerivedResource({url:A.url});return mC.fromGltf(b)};var jse=Mz;function Hse(e){e=e??1,this._radius=e??1}Object.defineProperties(Hse.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});Hse.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,this._radius),i=n*Math.cos(t),r=n*Math.sin(t),o=0;e.position=h.fromElements(i,r,o,e.position),e.velocity=h.clone(h.UNIT_Z,e.velocity)};var Nz=Hse;var Y7={CUMULUS:0};Y7.validate=function(e){return e===Y7.CUMULUS};Object.freeze(Y7);var CP=Y7;var Lz=`uniform sampler2D u_noiseTexture;
uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
in vec2 v_offset;
in vec3 v_maximumSize;
in vec4 v_color;
in float v_slice;
in float v_brightness;
float wrap(float value, float rangeLength) {
if(value < 0.0) {
float absValue = abs(value);
float modValue = mod(absValue, rangeLength);
return mod(rangeLength - modValue, rangeLength);
}
return mod(value, rangeLength);
}
vec3 wrapVec(vec3 value, float rangeLength) {
return vec3(wrap(value.x, rangeLength),
wrap(value.y, rangeLength),
wrap(value.z, rangeLength));
}
vec2 voxelToUV(vec3 voxelIndex) {
float textureSliceWidth = u_noiseTextureDimensions.x;
float noiseTextureRows = u_noiseTextureDimensions.y;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
inverseNoiseTextureRows / textureSliceWidth);
vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);
float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
}
vec4 lerpSamplesX(vec3 voxelIndex, float x) {
vec2 uv0 = voxelToUV(voxelIndex);
vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
vec4 sample0 = texture(u_noiseTexture, uv0);
vec4 sample1 = texture(u_noiseTexture, uv1);
return mix(sample0, sample1, x);
}
vec4 sampleNoiseTexture(vec3 position) {
float textureSliceWidth = u_noiseTextureDimensions.x;
vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
vec3 lerpValue = fract(recenteredPos);
vec3 voxelIndex = floor(recenteredPos);
vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);
vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
return mix(yLerp0, yLerp1, lerpValue.z);
}
bool intersectSphere(vec3 origin, vec3 dir, float slice,
out vec3 point, out vec3 normal) {
float A = dot(dir, dir);
float B = dot(origin, dir);
float C = dot(origin, origin) - 0.25;
float discriminant = (B * B) - (A * C);
if(discriminant < 0.0) {
return false;
}
float root = sqrt(discriminant);
float t = (-B - root) / A;
if(t < 0.0) {
t = (-B + root) / A;
}
point = origin + t * dir;
if(slice >= 0.0) {
point.z = (slice / 2.0) - 0.5;
if(length(point) > 0.5) {
return false;
}
}
normal = normalize(point);
point -= czm_epsilon2 * normal;
return true;
}
bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
out vec3 point, out vec3 normal) {
if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
return false;
}
vec3 o = (origin - center) / scale;
vec3 d = dir / scale;
vec3 p, n;
bool intersected = intersectSphere(o, d, slice, p, n);
if(intersected) {
point = (p * scale) + center;
normal = n;
}
return intersected;
}
vec2 phaseShift2D(vec2 p, vec2 freq) {
return (czm_pi / 2.0) * sin(freq.yx * p.yx);
}
vec2 phaseShift3D(vec3 p, vec2 freq) {
return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
}
const float T0 = 0.6;
const float k = 0.1;
const float C0 = 0.8;
const float FX0 = 0.6;
const float FY0 = 0.6;
const int octaves = 5;
float T(vec3 point) {
vec2 sum = vec2(0.0);
float Ci = C0;
vec2 FXY = vec2(FX0, FY0);
vec2 PXY = vec2(0.0);
for(int i = 1; i <= octaves; i++) {
PXY = phaseShift3D(point, FXY);
Ci *= 0.707;
FXY *= 2.0;
vec2 sinTerm = sin(FXY * point.xy + PXY);
sum += Ci * sinTerm + vec2(T0);
}
return k * sum.x * sum.y;
}
const float a = 0.5;
const float t = 0.4;
const float s = 0.25;
float I(float Id, float Is, float It) {
return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
}
const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));
vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
float brightness) {
vec3 cloudPoint, cloudNormal;
if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
cloudPoint, cloudNormal)) {
return vec4(0.0);
}
float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0);
float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0);
float It = T(cloudPoint);
float intensity = I(Id, Is, It);
vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));
vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
float W = noise.x;
float W2 = noise.y;
float W3 = noise.z;
float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
float TR = pow(ndDot, 3.0) - W;
TR *= 1.3;
float minusDot = 0.5 - ndDot;
TR -= min(minusDot * W2, 0.0);
TR -= 0.8 * (minusDot + 0.25) * W3;
float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);
shading = clamp(shading + 0.2, 0.3, 1.0);
vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
}
void main() {
#ifdef DEBUG_BILLBOARDS
out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
#endif
vec2 coordinate = v_maximumSize.xy * v_offset;
vec3 ellipsoidScale = 0.82 * v_maximumSize;
vec3 ellipsoidCenter = vec3(0.0);
float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
vec3 eye = vec3(0, 0, -10.0 - zOffset);
vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
vec3 rayOrigin = eye;
#ifdef DEBUG_ELLIPSOIDS
vec3 point, normal;
if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
point, normal)) {
out_FragColor = v_brightness * v_color;
}
#else
#ifndef DEBUG_BILLBOARDS
vec4 cloud = drawCloud(rayOrigin, rayDir,
ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
if(cloud.w < 0.01) {
discard;
}
out_FragColor = cloud;
#endif
#endif
}
`;var Fz=`#ifdef INSTANCED
in vec2 direction;
#endif
in vec4 positionHighAndScaleX;
in vec4 positionLowAndScaleY;
in vec4 packedAttribute0;
in vec4 packedAttribute1;
in vec4 color;
out vec2 v_offset;
out vec3 v_maximumSize;
out vec4 v_color;
out float v_slice;
out float v_brightness;
void main() {
vec3 positionHigh = positionHighAndScaleX.xyz;
vec3 positionLow = positionLowAndScaleY.xyz;
vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);
float show = packedAttribute0.x;
float brightness = packedAttribute0.y;
vec2 coordinates = packedAttribute0.wz;
vec3 maximumSize = packedAttribute1.xyz;
float slice = packedAttribute1.w;
#ifdef INSTANCED
vec2 dir = direction;
#else
vec2 dir = coordinates;
#endif
vec2 offset = dir - vec2(0.5, 0.5);
vec2 scaledOffset = scale * offset;
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
positionEC.xy += scaledOffset;
positionEC.xyz *= show;
gl_Position = czm_projection * positionEC;
v_offset = offset;
v_maximumSize = maximumSize;
v_color = color;
v_slice = slice;
v_brightness = brightness;
}
`;var Bz=`uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
uniform vec3 u_noiseOffset;
in vec2 v_position;
float wrap(float value, float rangeLength) {
if(value < 0.0) {
float absValue = abs(value);
float modValue = mod(absValue, rangeLength);
return mod(rangeLength - modValue, rangeLength);
}
return mod(value, rangeLength);
}
vec3 wrapVec(vec3 value, float rangeLength) {
return vec3(wrap(value.x, rangeLength),
wrap(value.y, rangeLength),
wrap(value.z, rangeLength));
}
vec3 random3(vec3 p) {
float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
}
vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
float textureSliceWidth = u_noiseTextureDimensions.x;
vec3 cell = centerCell + offset;
cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
cell += floor(u_noiseOffset / u_noiseDetail);
vec3 p = offset + random3(cell);
return p;
}
float worleyNoise(vec3 p, float freq) {
vec3 centerCell = floor(p * freq);
vec3 pointInCell = fract(p * freq);
float shortestDistance = 1000.0;
for(float z = -1.0; z <= 1.0; z++) {
for(float y = -1.0; y <= 1.0; y++) {
for(float x = -1.0; x <= 1.0; x++) {
vec3 offset = vec3(x, y, z);
vec3 point = getWorleyCellPoint(centerCell, offset, freq);
float distance = length(pointInCell - point);
if(distance < shortestDistance) {
shortestDistance = distance;
}
}
}
}
return shortestDistance;
}
const float MAX_FBM_ITERATIONS = 10.0;
float worleyFBMNoise(vec3 p, float octaves, float scale) {
float noise = 0.0;
float freq = 1.0;
float persistence = 0.625;
for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
if(i >= octaves) {
break;
}
noise += worleyNoise(p * scale, freq * scale) * persistence;
persistence *= 0.5;
freq *= 2.0;
}
return noise;
}
void main() {
float textureSliceWidth = u_noiseTextureDimensions.x;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
float x = mod(v_position.x, textureSliceWidth);
float y = mod(v_position.y, textureSliceWidth);
float sliceRow = floor(v_position.y / textureSliceWidth);
float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;
vec3 position = vec3(x, y, z);
position /= u_noiseDetail;
float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
out_FragColor = vec4(worley0, worley1, worley2, 1.0);
}
`;var kz=`uniform vec3 u_noiseTextureDimensions;
in vec2 position;
out vec2 v_position;
void main()
{
gl_Position = vec4(position, 0.1, 1.0);
float textureSliceWidth = u_noiseTextureDimensions.x;
float noiseTextureRows = u_noiseTextureDimensions.y;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
vec2 transformedPos = (position * 0.5) + vec2(0.5);
transformedPos *= textureSliceWidth;
transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
transformedPos.y *= noiseTextureRows;
v_position = transformedPos;
}
`;function cp(e,t){if(e=e??H.EMPTY_OBJECT,this._show=e.show??!0,this._position=h.clone(e.position??h.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=h.clone(e.maximumSize),this._scale=new U(this._maximumSize.x,this._maximumSize.y);else{this._scale=U.clone(e.scale??new U(20,12));let n=new h(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=h.clone(e.maximumSize??n)}this._slice=e.slice??-1,this._color=z.clone(e.color??z.WHITE),this._brightness=e.brightness??1,this._cloudCollection=t,this._index=-1}var BFt=cp.SHOW_INDEX=0,kFt=cp.POSITION_INDEX=1,UFt=cp.SCALE_INDEX=2,zFt=cp.MAXIMUM_SIZE_INDEX=3,VFt=cp.SLICE_INDEX=4,jFt=cp.BRIGHTNESS_INDEX=5,HFt=cp.COLOR_INDEX=6;cp.NUMBER_OF_PROPERTIES=7;function yC(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(cp.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,yC(this,BFt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;h.equals(t,e)||(h.clone(e,t),yC(this,kFt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;U.equals(t,e)||(U.clone(e,t),yC(this,UFt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;h.equals(t,e)||(h.clone(e,t),yC(this,zFt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;z.equals(t,e)||(z.clone(e,t),yC(this,HFt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,yC(this,VFt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,yC(this,jFt))}}});cp.prototype._destroy=function(){this._cloudCollection=void 0};var hd=cp;var md,X7=new h,GFt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},WFt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},qFt=hd.SHOW_INDEX,YFt=hd.POSITION_INDEX,XFt=hd.SCALE_INDEX,KFt=hd.MAXIMUM_SIZE_INDEX,$Ft=hd.SLICE_INDEX,JFt=hd.BRIGHTNESS_INDEX,ZFt=hd.NUMBER_OF_PROPERTIES,QFt=hd.COLOR_INDEX;function lp(e){e=e??H.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(ZFt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=h.clone(e.noiseOffset??h.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:KLe(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=e.show??!0,this._colorCommands=[],this.debugBillboards=e.debugBillboards??!1,this._compiledDebugBillboards=!1,this.debugEllipsoids=e.debugEllipsoids??!1,this._compiledDebugEllipsoids=!1}function KLe(e){return function(){return X7.x=e._textureSliceWidth,X7.y=e._noiseTextureRows,X7.z=1/e._noiseTextureRows,X7}}Object.defineProperties(lp.prototype,{length:{get:function(){return Wse(this),this._clouds.length}}});function $Le(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}lp.prototype.add=function(e){e=e??H.EMPTY_OBJECT;let t=e.cloudType??CP.CUMULUS,n;return t===CP.CUMULUS&&(n=new hd(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};lp.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};lp.prototype.removeAll=function(){$Le(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function Wse(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let r=0,o=0;r<i;++r){let s=n[r];l(s)&&(n._index=o++,t.push(s))}e._clouds=t}}lp.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};lp.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};lp.prototype.get=function(e){return Wse(this),this._clouds[e]};var eBt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),tBt=new Uint16Array([0,1,2,0,2,3]);function nBt(e){let t=nt.createVertexBuffer({context:e,typedArray:eBt,usage:Me.STATIC_DRAW}),n=nt.createIndexBuffer({context:e,typedArray:tBt,usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:Y.FLOAT}];return new zn({context:e,attributes:i,indexBuffer:n})}var qse;function iBt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,r=new Uint16Array(i);for(let o=0,s=0;o<i;o+=6,s+=4)r[o]=s,r[o+1]=s+1,r[o+2]=s+2,r[o+3]=s,r[o+4]=s+2,r[o+5]=s+3;return n=nt.createIndexBuffer({context:e,typedArray:r,usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function rBt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=nt.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function oBt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=nt.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Me.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function sBt(e,t,n){let i=[{index:md.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Me.STATIC_DRAW},{index:md.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Me.STATIC_DRAW},{index:md.packedAttribute0,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Me.STATIC_DRAW},{index:md.packedAttribute1,componentsPerAttribute:4,componentDatatype:Y.FLOAT,usage:Me.STATIC_DRAW},{index:md.color,componentsPerAttribute:4,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,usage:Me.STATIC_DRAW}];n&&i.push({index:md.direction,componentsPerAttribute:2,componentDatatype:Y.FLOAT,vertexBuffer:oBt(e)});let r=n?t:4*t;return new n_(e,i,r,n)}var Gse=new Sn;function JLe(e,t,n,i){let r,o=n[md.positionHighAndScaleX],s=n[md.positionLowAndScaleY],a=i.position;Sn.fromCartesian(a,Gse);let c=i.scale,u=Gse.high,f=Gse.low;e._instanced?(r=i._index,o(r,u.x,u.y,u.z,c.x),s(r,f.x,f.y,f.z,c.y)):(r=i._index*4,o(r+0,u.x,u.y,u.z,c.x),o(r+1,u.x,u.y,u.z,c.x),o(r+2,u.x,u.y,u.z,c.x),o(r+3,u.x,u.y,u.z,c.x),s(r+0,f.x,f.y,f.z,c.y),s(r+1,f.x,f.y,f.z,c.y),s(r+2,f.x,f.y,f.z,c.y),s(r+3,f.x,f.y,f.z,c.y))}function ZLe(e,t,n,i){let r,o=n[md.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(r=i._index,o(r,s,a,0,0)):(r=i._index*4,o(r+0,s,a,0,0),o(r+1,s,a,1,0),o(r+2,s,a,1,1),o(r+3,s,a,0,1))}function QLe(e,t,n,i){let r,o=n[md.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(r=i._index,o(r,s.x,s.y,s.z,a)):(r=i._index*4,o(r+0,s.x,s.y,s.z,a),o(r+1,s.x,s.y,s.z,a),o(r+2,s.x,s.y,s.z,a),o(r+3,s.x,s.y,s.z,a))}function eFe(e,t,n,i){let r,o=n[md.color],s=i.color,a=z.floatToByte(s.red),c=z.floatToByte(s.green),u=z.floatToByte(s.blue),f=z.floatToByte(s.alpha);e._instanced?(r=i._index,o(r,a,c,u,f)):(r=i._index*4,o(r+0,a,c,u,f),o(r+1,a,c,u,f),o(r+2,a,c,u,f),o(r+3,a,c,u,f))}function aBt(e,t,n,i){JLe(e,t,n,i),ZLe(e,t,n,i),QLe(e,t,n,i),eFe(e,t,n,i)}function cBt(e,t,n,i){let r=e,o=r._textureSliceWidth,s=r._noiseTextureRows,a=t.context;r._vaNoise=nBt(a),r._spNoise=en.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=r.noiseDetail,u=r.noiseOffset;r._noiseTexture=new Dt({context:a,width:o*o/s,height:o*s,pixelDatatype:ze.UNSIGNED_BYTE,pixelFormat:Ke.RGBA,sampler:new Ht({wrapS:hn.REPEAT,wrapT:hn.REPEAT,minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST})});let f=new Nf({vertexArray:r._vaNoise,shaderProgram:r._spNoise,outputTexture:r._noiseTexture,uniformMap:{u_noiseTextureDimensions:KLe(r),u_noiseDetail:function(){return c},u_noiseOffset:function(){return u}},persists:!1,owner:e,postExecute:function(d){r._ready=!0,r._loading=!1}});t.commandList.push(f),r._loading=!0}function lBt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let r=e._clouds,o=r.length;if(o>0){n._vaf=sBt(i,o,n._instanced);let s=n._vaf.writers,a;for(a=0;a<o;++a){let c=r[a];aBt(e,t,s,c)}n._vaf.commit(qse(i))}}var uBt=[];function fBt(e,t){let n=t.context,i=e,o=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,u=uBt;u.length=0,(c[YFt]||c[XFt])&&u.push(JLe),(c[qFt]||c[JFt])&&u.push(ZLe),(c[KFt]||c[$Ft])&&u.push(QLe),c[QFt]&&u.push(eFe);let f=u.length,d=i._vaf.writers,p,g,m;if(a/o>.1){for(p=0;p<a;++p)for(g=s[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,d,g);i._vaf.commit(qse(n))}else{for(p=0;p<a;++p){for(g=s[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,d,g);i._instanced?i._vaf.subCommit(g._index,1):i._vaf.subCommit(g._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function dBt(e,t,n,i){let r=t.context,o=e,s=new Ye({defines:[],sources:[n]});o._instanced&&s.defines.push("INSTANCED");let a=new Ye({defines:[],sources:[i]});o.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),o.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),o._sp=en.replaceCache({context:r,shaderProgram:o._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:md}),o._rs=Ge.fromCache({depthTest:{enabled:!0,func:te.LESS},depthMask:!1,blending:tn.ALPHA_BLEND}),o._spCreated=!0,o._compiledDebugBillboards=o.debugBillboards,o._compiledDebugEllipsoids=o.debugEllipsoids}function hBt(e,t){let n=e,i=t.passes,r=n._uniforms,o=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,c=a.length;s.length=c;for(let u=0;u<c;u++){let f=s[u];l(f)||(f=s[u]=new at),f.pass=Ie.TRANSLUCENT,f.owner=e,f.uniformMap=r,f.count=a[u].indicesCount,f.vertexArray=a[u].va,f.shaderProgram=n._sp,f.renderState=n._rs,n._instanced&&(f.count=6,f.instanceCount=n._clouds.length),o.push(f)}}}lp.prototype.update=function(e){if(Wse(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&cBt(this,e,kz,Bz),this._instanced=e.context.instancedArrays,md=this._instanced?WFt:GFt,qse=this._instanced?rBt:iBt;let i=this._clouds.length,r=this._cloudsToUpdate,o=this._cloudsToUpdateIndex;this._createVertexArray?lBt(this,e):o>0&&fBt(this,e),o>i*1.5&&(r.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&dBt(this,e,Fz,Lz),hBt(this,e))};lp.prototype.isDestroyed=function(){return!1};lp.prototype.destroy=function(){return this._noiseTexture=this._noiseTexture&&this._noiseTexture.destroy(),this._sp=this._sp&&this._sp.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),$Le(this._clouds),le(this)};var Yse=lp;async function Xse(e,t){let n=t.terrainProvider,i=t.mapProjection,r=i.ellipsoid,o,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===re.SCENE3D?o=r.cartesianToCartographic(s):o=i.unproject(s),!l(n))return o;let a=n.availability;if(!l(a)||t.mode===re.SCENE2D)return o;let c=[ie.center(e),ie.southeast(e),ie.southwest(e),ie.northeast(e),ie.northwest(e)],u=await Xse._sampleTerrainMostDetailed(n,c),f=!1,d=u.reduce(function(g,m){return l(m.height)?(f=!0,Math.max(m.height,g)):g},-Number.MAX_VALUE),p=o;return f&&(p.height+=d),p}Xse._sampleTerrainMostDetailed=aC;var AC=Xse;var mBt=D.toRadians(30);function Kse(e){this._angle=e??mBt}Object.defineProperties(Kse.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});Kse.prototype.emit=function(e){let t=Math.tan(this._angle),n=D.randomBetween(0,D.TWO_PI),i=D.randomBetween(0,t),r=i*Math.cos(n),o=i*Math.sin(n),s=1;e.velocity=h.fromElements(r,o,s,e.velocity),h.normalize(e.velocity,e.velocity),e.position=h.clone(h.ZERO,e.position)};var $se=Kse;var pBt=new z,gBt=new z,_Bt=new z,yBt=new z,tFe=new se,Uz=new Uint8Array(4);function nFe(e,t,n,i){let r=t.height===n.height?0:(e-t.height)/(n.height-t.height);return z.lerp(t.color,n.color,r,i)}function K7(e,t){return{height:e,color:z.clone(t)}}function iFe(e){return e=e.filter(function(t,n,i){let r=n>0,o=n<i.length-1,s=r?t.height===i[n-1].height:!0,a=o?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let r=n>0,o=n<i.length-1,s=r?z.equals(t.color,i[n-1].color):!1,a=o?z.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let r=n>0,o=r?z.equals(t.color,i[n-1].color):!1,s=r?t.height===i[n-1].height:!0;return!o||!s}),e}function ABt(e){let t,n,i=[],r=e.length;for(t=0;t<r;t++){let o=e[t],s=o.entries,a=s.length,c=[];for(n=0;n<a;n++){let g=s[n],m=D.clamp(g.height,hf._minimumHeight,hf._maximumHeight),y=z.clone(g.color,pBt);y.red*=y.alpha,y.green*=y.alpha,y.blue*=y.alpha,c.push(K7(m,y))}let u=!0,f=!0;for(n=0;n<a-1;n++){let g=c[n+0],m=c[n+1];u=u&&g.height<=m.height,f=f&&g.height>=m.height}f?c=c.reverse():u||F0(c,function(g,m){return D.sign(g.height-m.height)});let d=o.extendDownwards??!1,p=o.extendUpwards??!1;c.length===1&&!d&&!p&&(d=!0,p=!0),d&&c.splice(0,0,K7(hf._minimumHeight,c[0].color)),p&&c.splice(c.length,0,K7(hf._maximumHeight,c[c.length-1].color)),c=iFe(c),i.push(c)}return i}function bBt(e){let t=ABt(e),n=[],i,r;function o(u,f){n.push(K7(u,f))}function s(u,f,d){let p=z.multiplyByScalar(d,1-f.alpha,yBt);p=z.add(p,f,p),o(u,p)}let a=t.length;for(r=0;r<a;r++){let u=t[r],f=0,d=0;i=n,n=[];let p=u.length,g=i.length;for(;f<p||d<g;){let m=f<p?u[f]:void 0,y=f>0?u[f-1]:void 0,A=f<p-1?u[f+1]:void 0,b=d<g?i[d]:void 0,x=d>0?i[d-1]:void 0,T=d<g-1?i[d+1]:void 0;if(l(m)&&l(b)&&m.height===b.height){let E=l(T)&&b.height===T.height,v=!l(x),S=!l(T),I=l(A)&&m.height===A.height,R=!l(y),O=!l(A);E?I?(s(m.height,m.color,b.color),s(m.height,A.color,T.color)):R?(o(m.height,b.color),s(m.height,m.color,T.color)):O?(s(m.height,m.color,b.color),o(m.height,T.color)):(s(m.height,m.color,b.color),s(m.height,m.color,T.color)):v?I?(o(m.height,m.color),s(m.height,A.color,b.color)):O?(o(m.height,m.color),o(m.height,b.color)):(R||o(m.height,m.color),s(m.height,m.color,b.color)):S?I?(s(m.height,m.color,b.color),o(m.height,A.color)):R?(o(m.height,b.color),o(m.height,m.color)):O?s(m.height,m.color,b.color):(s(m.height,m.color,b.color),o(m.height,m.color)):I?(s(m.height,m.color,b.color),s(m.height,A.color,b.color)):R?(o(m.height,b.color),s(m.height,m.color,b.color)):O?(s(m.height,m.color,b.color),o(m.height,b.color)):s(m.height,m.color,b.color),f+=I?2:1,d+=E?2:1}else if(l(m)&&l(b)&&l(x)&&m.height<b.height){let E=nFe(m.height,x,b,_Bt);l(y)?l(A)?s(m.height,m.color,E):(s(m.height,m.color,E),o(m.height,E)):(o(m.height,E),s(m.height,m.color,E)),f++}else if(l(b)&&l(m)&&l(y)&&b.height<m.height){let E=nFe(b.height,y,m,gBt);l(x)?l(T)?s(b.height,E,b.color):(s(b.height,E,b.color),o(b.height,E)):(o(b.height,E),s(b.height,E,b.color)),d++}else l(m)&&(!l(b)||m.height<b.height)?(l(b)&&!l(x)&&!l(A)?(o(m.height,m.color),o(m.height,hf._emptyColor),o(b.height,hf._emptyColor)):(!l(b)&&l(x)&&!l(y)&&(o(x.height,hf._emptyColor),o(m.height,hf._emptyColor)),o(m.height,m.color)),f++):l(b)&&(!l(m)||b.height<m.height)&&(o(b.height,b.color),d++)}}return iFe(n)}function hf(e){let{scene:t,layers:n}=e??H.EMPTY_OBJECT,{context:i}=t,r=bBt(n),o=r.length,s,a,c;if(!hf._useFloatTexture(i)){a=ze.UNSIGNED_BYTE,c=Ke.RGBA,s=new Uint8Array(o*4);for(let g=0;g<o;g++)se.packFloat(r[g].height,tFe),se.pack(tFe,s,g*4)}else{a=ze.FLOAT,c=i.webgl2?Ke.RED:Ke.LUMINANCE,s=new Float32Array(o);for(let g=0;g<o;g++)s[g]=r[g].height}let f=Dt.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:o,height:1},sampler:new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST})}),d=new Uint8Array(o*4);for(let g=0;g<o;g++)r[g].color.toBytes(Uz),d[g*4+0]=Uz[0],d[g*4+1]=Uz[1],d[g*4+2]=Uz[2],d[g*4+3]=Uz[3];let p=Dt.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:d,width:o,height:1},sampler:new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:Zn.LINEAR})});return Qi.fromType("ElevationBand",{heights:f,colors:p})}hf._useFloatTexture=function(e){return e.floatingPointTexture};hf._maximumHeight=5906376425472;hf._minimumHeight=-5906376425472;hf._emptyColor=new z(0,0,0,0);var Jse=hf;async function xBt(e,t){t=t??{},t.cacheBytes=t.cacheBytes??1536*1024*1024,t.maximumCacheOverflowBytes=t.maximumCacheOverflowBytes??1024*1024*1024,t.enableCollision=t.enableCollision??!0,e=e??H.EMPTY_OBJECT,e.onlyUsingWithGoogleGeocoder||_t("google-tiles-with-google-geocoder","Only the Google geocoder can be used with Google Photorealistic 3D Tiles. Set the `geocode` property of Viewer constructor options. You can set additionalOptions.onlyUsingWithGoogleGeocoder to hide this warning once you have configured the geocoder.");let n=e.key??Ta.defaultApiKey;if(!l(n))return TBt(t);let i,r=Ta.getDefaultCredit();l(r)&&(i=[r]);let o=new De({url:`${Ta.mapTilesApiEndpoint}v1/3dtiles/root.json`,queryParameters:{key:n},credits:i});return Yo.fromUrl(o,t)}var rFe={};async function TBt(e){let i=rFe[2275207];l(i)||(i=Ho.fromAssetId(2275207),rFe[2275207]=i);let r=await i;return Yo.fromUrl(r,e)}var Zse=xBt;async function EBt(e){let t=await Yo.fromIonAssetId(96188,e);e=e??H.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??z.WHITE).toCssColorString();n=new l_({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var Qse=EBt;function CBt(e){e=e??H.EMPTY_OBJECT;let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,r=N.clone(e.modelMatrix??N.IDENTITY),o=e.length??1e4;if(l(i.normal)&&t.push(new Ft({geometry:Gn.createLineSegmentsForVectors(n,"normal",o),attributes:{color:new Jt(1,0,0,1)},modelMatrix:r})),l(i.tangent)&&t.push(new Ft({geometry:Gn.createLineSegmentsForVectors(n,"tangent",o),attributes:{color:new Jt(0,1,0,1)},modelMatrix:r})),l(i.bitangent)&&t.push(new Ft({geometry:Gn.createLineSegmentsForVectors(n,"bitangent",o),attributes:{color:new Jt(0,0,1,1)},modelMatrix:r})),t.length>0)return new On({asynchronous:!1,geometryInstances:t,appearance:new yn({flat:!0,translucent:!1})})}var eae=CBt;var uFe=Qo(xf(),1),oFe=576,vBt=100,zz="#ffffff",Vz="#48b";function fFe(e,t){this.credit=e,this.count=t??1}function SBt(e,t){let n=e.length;for(let i=0;i<n;i++){let r=e[i];if(It.equals(r,t))return!0}return!1}function wBt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;It.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var dFe="cesium-credit-delimiter";function sFe(e){let t=document.createElement("span");return t.textContent=e,t.className=dFe,t}function aFe(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function cFe(e,t,n,i){let r=e.childNodes,o=-1;t.sort(function(s,a){return a.count-s.count});for(let s=0;s<t.length;++s){let a=t[s].credit;if(l(a)){if(o=s,l(n)&&(o*=2,s>0)){let u=o-1;if(r.length<=u)e.appendChild(sFe(n));else{let f=r[u];f.className!==dFe&&e.replaceChild(sFe(n),f)}}let c=a.element;if(r.length<=o)e.appendChild(aFe(c,i));else{let u=r[o];u._creditId!==a._id&&e.replaceChild(aFe(c,i),u)}}}for(++o;o<r.length;)e.removeChild(r[o])}function IBt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<oFe?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`),e._lastViewportWidth=n),n>=oFe&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function lFe(e){return function(t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),t.stopPropagation(),e())}}function PBt(e){let t=`
.cesium-credit-lightbox-overlay {
display: none;
z-index: 1;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(80, 80, 80, 0.8);
}
.cesium-credit-lightbox {
background-color: #303336;
color: ${zz};
position: relative;
min-height: ${vBt}px;
margin: auto;
}
.cesium-credit-lightbox > ul > li a,
.cesium-credit-lightbox > ul > li a:visited,
.cesium-credit-wrapper a,
.cesium-credit-wrapper a:visited {
color: ${zz};
}
.cesium-credit-lightbox > ul > li a:hover {
color: ${Vz};
}
.cesium-credit-lightbox.cesium-credit-lightbox-expanded {
border: 1px solid #444;
border-radius: 5px;
max-width: 470px;
}
.cesium-credit-lightbox.cesium-credit-lightbox-mobile {
height: 100%;
width: 100%;
}
.cesium-credit-lightbox-title {
padding: 20px 20px 0 20px;
}
.cesium-credit-lightbox-close {
font-size: 18pt;
cursor: pointer;
position: absolute;
top: 0;
right: 6px;
color: ${zz};
}
.cesium-credit-lightbox-close:hover {
color: ${Vz};
}
.cesium-credit-lightbox > ul {
margin: 0;
padding: 12px 20px 12px 40px;
font-size: 13px;
}
.cesium-credit-lightbox > ul > li {
padding-bottom: 6px;
}
.cesium-credit-lightbox > ul > li * {
padding: 0;
margin: 0;
}
.cesium-credit-expand-link {
padding-left: 5px;
cursor: pointer;
text-decoration: underline;
color: ${zz};
}
.cesium-credit-expand-link:hover {
color: ${Vz};
}
.cesium-credit-expand-link:focus-visible,
.cesium-credit-lightbox-close:focus-visible {
outline: 2px solid ${Vz};
outline-offset: 2px;
}
.cesium-credit-text {
color: ${zz};
}
.cesium-credit-delimiter {
padding: 0 5px;
}
.cesium-credit-textContainer *,
.cesium-credit-logoContainer * {
display: inline;
}
.cesium-credit-textContainer a:hover {
color: ${Vz}
}
.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
padding-left: 5px;
}
`;function n(o){if(o.shadowRoot)return o.shadowRoot;if(o.getRootNode){let s=o.getRootNode();if(s instanceof ShadowRoot)return s}}let i=n(e)??document.head,r=document.createElement("style");r.innerHTML=t,i.appendChild(r)}function Jo(e,t,n){let i=this;n=n??document.body;let r=document.createElement("div");r.className="cesium-credit-lightbox-overlay",n.appendChild(r);let o=document.createElement("div");o.className="cesium-credit-lightbox",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label","Data attribution"),r.appendChild(o);function s(y){o.contains(y.target)||i.hideLightbox()}r.addEventListener("click",s,!1);function a(y){y.key==="Escape"&&(y.preventDefault(),i.hideLightbox())}r.addEventListener("keydown",a,!1);let c=document.createElement("div");c.className="cesium-credit-lightbox-title",c.textContent="Data provided by:",o.appendChild(c);let u=document.createElement("a");u.onclick=this.hideLightbox.bind(this),u.onkeydown=lFe(this.hideLightbox.bind(this)),u.innerHTML="&times;",u.className="cesium-credit-lightbox-close",u.setAttribute("role","button"),u.setAttribute("tabindex","0"),u.setAttribute("aria-label","Close data attribution"),o.appendChild(u);let f=document.createElement("ul");o.appendChild(f);let d=document.createElement("div");d.className="cesium-credit-logoContainer",d.style.display="inline",e.appendChild(d);let p=document.createElement("div");p.className="cesium-credit-textContainer",p.style.display="inline",e.appendChild(p);let g=document.createElement("a");g.className="cesium-credit-expand-link",g.onclick=this.showLightbox.bind(this),g.onkeydown=lFe(this.showLightbox.bind(this)),g.textContent="Data attribution",g.setAttribute("role","button"),g.setAttribute("tabindex","0"),g.setAttribute("aria-haspopup","dialog"),g.setAttribute("aria-expanded","false"),e.appendChild(g),PBt(e);let m=It.clone(Jo.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=p,this._cesiumCreditContainer=d,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=o,this._creditList=f,this._lightbox=r,this._hideLightbox=s,this._hideLightboxOnEscape=a,this._expandLink=g,this._closeButton=u,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=m,this._previousCesiumCredit=void 0,this._currentCesiumCredit=m,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new kt,lightboxCredits:new kt},this._defaultCredit=void 0,this.viewport=n,this.container=e}function hFe(e,t,n,i){i=i??1;let r=t.get(n.id);if(l(r))r.count<Number.MAX_VALUE&&(r.count+=i);else{let o=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<o.length?(r=o[s],r.credit=n,r.count=i):(r=new fFe(n,i),o.push(r)),++e._creditDisplayElementPoolIndex,t.set(n.id,r)}}Jo.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=It.clone(mFe())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,hFe(this,t,e)};Jo.prototype.addStaticCredit=function(e){let t=this._staticCredits;SBt(t,e)||t.push(e)};Jo.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};Jo.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0,this._expandLink.setAttribute("aria-expanded","true"),this._closeButton.focus()};Jo.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1,this._expandLink.setAttribute("aria-expanded","false"),this._expandLink.focus()};Jo.prototype.update=function(){this._expanded&&IBt(this)};Jo.prototype.beginFrame=function(){let e=this._currentFrameCredits;this._creditDisplayElementPoolIndex=0;let t=e.screenCredits,n=e.lightboxCredits;t.removeAll(),n.removeAll();let i=this._staticCredits;for(let r=0;r<i.length;++r){let o=i[r],s=o.showOnScreen?t:n;o.isIon()&&It.equals(Jo.cesiumCredit,this._cesiumCredit)||hFe(this,s,o,Number.MAX_VALUE)}It.equals(Jo.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=It.clone(Jo.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};Jo.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;cFe(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",cFe(this._creditList,t,void 0,"li"),wBt(this)};Jo.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this._lightbox.removeEventListener("keydown",this._hideLightboxOnEscape,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),le(this)};Jo.prototype.isDestroyed=function(){return!1};Jo._cesiumCredit=void 0;Jo._cesiumCreditInitialized=!1;var $7;function mFe(){if(!l($7)){let e=Zt("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new uFe.default(e).path()),$7=new It(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return Jo._cesiumCreditInitialized||(Jo._cesiumCredit=$7,Jo._cesiumCreditInitialized=!0),$7}Object.defineProperties(Jo,{cesiumCredit:{get:function(){return mFe(),Jo._cesiumCredit},set:function(e){Jo._cesiumCredit=e,Jo._cesiumCreditInitialized=!0}}});Jo.CreditDisplayElement=fFe;var jz=Jo;var Hz=`uniform samplerCube u_cubeMap;
in vec3 v_texCoord;
void main()
{
vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
}
`;var Gz=`in vec3 position;
out vec3 v_texCoord;
void main()
{
vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
gl_Position = czm_projection * vec4(p, 1.0);
v_texCoord = position.xyz;
}
`;var Wz=`uniform mat3 u_cubeMapPanoramaTransform;
in vec3 position;
out vec3 v_texCoord;
void main()
{
vec3 p = czm_viewRotation * (u_cubeMapPanoramaTransform * (czm_entireFrustum.y * position));
gl_Position = czm_projection * vec4(p, 1.0);
v_texCoord = position.xyz;
}
`;function qz(e){this.sources=e.sources,this._sources=void 0,this._transform=e.transform,this.show=e.show??!0,this._returnCommand=e.returnCommand??!1,this._addToPanoramaCommandList=!this._returnCommand,this._command=new at({modelMatrix:N.clone(N.IDENTITY),owner:this,pass:Ie.ENVIRONMENT}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this._hasError=!1,this._error=void 0;let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t}Object.defineProperties(qz.prototype,{transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}}});qz.prototype.update=function(e,t){let n=this,{mode:i,passes:r,context:o,panoramaCommandList:s}=e;if(!this.show||i!==re.SCENE3D&&i!==re.MORPHING||!r.render)return;if(this._hasError){let c=this._error;throw this._hasError=!1,this._error=void 0,c}if(this._sources!==this.sources){this._sources=this.sources;let c=this.sources;typeof c.positiveX=="string"?xU(o,this._sources).then(function(u){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=u}).catch(u=>{this._hasError=!0,this._error=u}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new ts({context:o,source:c})),this._addToPanoramaCommandList=!0}let a=this._command;if(!l(a.vertexArray)){a.uniformMap={u_cubeMap:function(){return n._cubeMap},u_cubeMapPanoramaTransform:function(){return n._transform}};let c=Ic.createGeometry(Ic.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Be.POSITION_ONLY})),u=this._attributeLocations=Gn.createAttributeLocations(c);a.vertexArray=zn.fromGeometry({context:o,geometry:c,attributeLocations:u,bufferUsage:Me.STATIC_DRAW}),a.renderState=Ge.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:tn.ALPHA_BLEND}),this._addToPanoramaCommandList=!0}if(!l(a.shaderProgram)||this._useHdr!==t){let c=new Ye({defines:[t?"HDR":""],sources:[Hz]});a.shaderProgram=en.fromCache({context:o,vertexShaderSource:l(this._transform)?Wz:Gz,fragmentShaderSource:c,attributeLocations:this._attributeLocations}),this._useHdr=t,this._addToPanoramaCommandList=!0}if(l(this._cubeMap)){if(this.show&&l(this._credit)&&!this._returnCommand&&e.creditDisplay.addCreditToNextFrame(this._credit),this._returnCommand)return a;this._addToPanoramaCommandList&&(s.push(a),this._addToPanoramaCommandList=!1)}};qz.prototype.isDestroyed=function(){return!1};qz.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),le(this)};var bC=qz;function Yz(e){e=e??H.EMPTY_OBJECT;let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=e.glslDatatype??"vec3",r=`v_${t}`,o;if(t==="normal"||t==="tangent"||t==="bitangent")o=`vec4 getColor() { return vec4((${r} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(t==="st"&&(i="vec2"),i){case"float":o=`vec4 getColor() { return vec4(vec3(${r}), 1.0); }
`;break;case"vec2":o=`vec4 getColor() { return vec4(${r}, 0.0, 1.0); }
`;break;case"vec3":o=`vec4 getColor() { return vec4(${r}, 1.0); }
`;break;case"vec4":o=`vec4 getColor() { return ${r}; }
`;break}let s=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;
${n?"":`in ${i} ${t};
`}out ${i} ${r};
void main()
{
vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
${n?`${r} = czm_batchTable_${t}(batchId);
`:`${r} = ${t};
`}gl_Position = czm_modelViewProjectionRelativeToEye * p;
}`,a=`in ${i} ${r};
${o}
void main()
{
out_FragColor = getColor();
}`;this.material=void 0,this.translucent=e.translucent??!1,this._vertexShaderSource=e.vertexShaderSource??s,this._fragmentShaderSource=e.fragmentShaderSource??a,this._renderState=wr.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(Yz.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},attributeName:{get:function(){return this._attributeName}},glslDatatype:{get:function(){return this._glslDatatype}}});Yz.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;Yz.prototype.isTranslucent=wr.prototype.isTranslucent;Yz.prototype.getRenderState=wr.prototype.getRenderState;var tae=Yz;function J7(e){e=e??H.EMPTY_OBJECT,this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=e.color??z.CYAN,this._updateOnChange=e.updateOnChange??!0,this.show=e.show??!0,this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var DBt=new h,RBt=new $,OBt=new Le,MBt=new Ji,NBt=new yu,LBt=new gn,FBt=new As,BBt=new z,kBt=[1,1e5];J7.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,r;if(this._updateOnChange){for(r=t.length,i=0;i<r;++i)n[i]=n[i]&&n[i].destroy(),t[i]=t[i]&&t[i].destroy();t.length=0,n.length=0}if(t.length===0){let o=this._camera,s=o.frustum,a;s instanceof Ji?a=MBt:s instanceof yu?a=NBt:s instanceof gn?a=LBt:a=FBt,a=s.clone(a);let c,u=this._frustumSplits;!l(u)||u.length<=1?(u=kBt,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,c=1):c=u.length-1;let f=o.positionWC,d=o.directionWC,p=o.upWC,g=o.rightWC;g=h.negate(g,DBt);let m=RBt;$.setColumn(m,0,g,m),$.setColumn(m,1,p,m),$.setColumn(m,2,d,m);let y=Le.fromRotationMatrix(m,OBt);for(t.length=n.length=c,i=0;i<c;++i)a.near=u[i],a.far=u[i+1],t[i]=new On({geometryInstances:new Ft({geometry:new rC({origin:f,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Jt.fromColor(z.fromAlpha(this._color,.1,BBt))},id:this.id,pickPrimitive:this}),appearance:new yn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new On({geometryInstances:new Ft({geometry:new kU({origin:f,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Jt.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})}for(r=t.length,i=0;i<r;++i)n[i].update(e),t[i].update(e)};J7.prototype.isDestroyed=function(){return!1};J7.prototype.destroy=function(){let e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return le(this)};var z0=J7;function pFe(){this._cachedShowFrustumsShaders={}}function UBt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function zBt(e,t){let n=e.context,i=t,r=i.fragmentShaderSource.clone(),o=[];r.sources=r.sources.map(function(f){f=Ye.replaceMain(f,"czm_Debug_main");let d=/out_FragData_(\d+)/g,p;for(;(p=d.exec(f))!==null;)o.indexOf(p[1])===-1&&o.push(p[1]);return f});let s=o.length,a="";a+=`uniform vec3 debugShowCommandsColor;
`,a+=`uniform vec3 debugShowFrustumsColor;
`,a+=`void main()
{
czm_Debug_main();
`;let c;if(s>0)for(c=0;c<s;++c)a+=` out_FragData_${o[c]}.rgb *= debugShowCommandsColor;
`,a+=` out_FragData_${o[c]}.rgb *= debugShowFrustumsColor;
`;else a+=` out_FragColor.rgb *= debugShowCommandsColor;
`,a+=` out_FragColor.rgb *= debugShowFrustumsColor;
`;a+="}",r.sources.push(a);let u=UBt(i);return en.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:r,attributeLocations:u})}var Xz=new z;function VBt(e,t){let n;return l(t.uniformMap)?n=t.uniformMap:n={},l(n.debugShowCommandsColor)||l(n.debugShowFrustumsColor)||(n.debugShowCommandsColor=function(){return e.debugShowCommands?(l(t._debugColor)||(t._debugColor=z.fromRandom()),t._debugColor):z.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(Xz.red=t.debugOverlappingFrustums&1?1:0,Xz.green=t.debugOverlappingFrustums&2?1:0,Xz.blue=t.debugOverlappingFrustums&4?1:0,Xz.alpha=1,Xz):z.WHITE}),n}var jBt=new at;pFe.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,r=this._cachedShowFrustumsShaders[i];l(r)||(r=zBt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=r);let o=at.shallowClone(t,jBt);o.shaderProgram=r,o.uniformMap=VBt(e,t),o.execute(e.context,n)};var Kz=pFe;function Z7(e){e=e??H.EMPTY_OBJECT,this.length=e.length??1e7,this._length=void 0,this.width=e.width??2,this._width=void 0,this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=new N,this.id=e.id,this._id=void 0,this._primitive=void 0}Z7.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!N.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=N.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,l(this._primitive)&&this._primitive.destroy(),this.modelMatrix[12]===0&&this.modelMatrix[13]===0&&this.modelMatrix[14]===0&&(this.modelMatrix[14]=.01);let t=new Ft({geometry:new U_({positions:[h.ZERO,h.UNIT_X],width:this.width,vertexFormat:js.VERTEX_FORMAT,colors:[z.RED,z.RED],arcType:ln.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this}),n=new Ft({geometry:new U_({positions:[h.ZERO,h.UNIT_Y],width:this.width,vertexFormat:js.VERTEX_FORMAT,colors:[z.GREEN,z.GREEN],arcType:ln.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this}),i=new Ft({geometry:new U_({positions:[h.ZERO,h.UNIT_Z],width:this.width,vertexFormat:js.VERTEX_FORMAT,colors:[z.BLUE,z.BLUE],arcType:ln.NONE}),modelMatrix:N.multiplyByUniformScale(this.modelMatrix,this.length,new N),id:this.id,pickPrimitive:this});this._primitive=new On({geometryInstances:[t,n,i],appearance:new js,asynchronous:!1})}this._primitive.update(e)}};Z7.prototype.isDestroyed=function(){return!1};Z7.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),le(this)};var $z=Z7;var HBt=new TextDecoder,Q7={UNKNOWN:0,POINT:1,LINESTRING:2,POLYGON:3},GBt={LAYERS:3},Jz={NAME:1,FEATURES:2,KEYS:3,VALUES:4,EXTENT:5},nae={TAGS:2,TYPE:3,GEOMETRY:4},xC={STRING:1,FLOAT:2,DOUBLE:3,INT64:4,UINT64:5,SINT64:6,BOOL:7},WBt=["Unknown","Point","LineString","Polygon"];function qBt(e){let t=new Uint8Array(e),n=[],i=0;for(;i<t.length;){let r=eW(t,i,t.length),o=r.fieldNumber,s=r.wireType;if(i=r.newPos,o===GBt.LAYERS&&s===2){let a=ly(t,i,t.length);i=a.newPos;let c=mf(i,a.value,t.length,"layer");n.push(YBt(t,i,c)),i=c}else i=tW(t,i,s,t.length)}return{layers:n}}function YBt(e,t,n){let i=t,r="",o=4096,s=[],a=[],c=[];for(;i<n;){let f=eW(e,i,n),d=f.fieldNumber,p=f.wireType;if(i=f.newPos,d===Jz.NAME&&p===2){let g=ly(e,i,n);i=g.newPos;let m=mf(i,g.value,n,"layer name");r=rae(e,i,g.value),i=m}else if(d===Jz.FEATURES&&p===2){let g=ly(e,i,n);i=g.newPos;let m=mf(i,g.value,n,"feature");c.push({start:i,end:m}),i=m}else if(d===Jz.KEYS&&p===2){let g=ly(e,i,n);i=g.newPos;let m=mf(i,g.value,n,"key");s.push(rae(e,i,g.value)),i=m}else if(d===Jz.VALUES&&p===2){let g=ly(e,i,n);i=g.newPos;let m=mf(i,g.value,n,"value"),y=$Bt(e,i,m);a.push(y),i=m}else if(d===Jz.EXTENT&&p===0){let g=vP(e,i,n);o=g.value,i=g.newPos}else i=tW(e,i,p,n)}let u=c.map(({start:f,end:d})=>XBt(e,f,d,s,a));return{name:r,extent:o,features:u}}function XBt(e,t,n,i,r){let o=t,s=Q7.UNKNOWN,a=[],c=[];for(;o<n;){let d=eW(e,o,n),p=d.fieldNumber,g=d.wireType;if(o=d.newPos,p===nae.TYPE&&g===0){let m=vP(e,o,n);s=m.value,o=m.newPos}else if(p===nae.TAGS&&g===2){let m=ly(e,o,n);o=m.newPos;let y=mf(o,m.value,n,"feature tags");for(;o<y;){let A=vP(e,o,y);a.push(A.value),o=A.newPos}}else if(p===nae.GEOMETRY&&g===2){let m=ly(e,o,n);o=m.newPos;let y=mf(o,m.value,n,"feature geometry");for(;o<y;){let A=vP(e,o,y);c.push(A.value),o=A.newPos}}else o=tW(e,o,g,n)}let u={};for(let d=0;d<a.length-1;d+=2){let p=i[a[d]],g=r[a[d+1]];typeof p!="string"||g===void 0||(u[p]=g)}let f=KBt(s,c);return{type:WBt[s]??"Unknown",geometry:f,properties:u}}function KBt(e,t){let n=0,i=0,r=0;if(e===Q7.POINT){let o=[];for(;n<t.length;){let s=t[n++],a=s&7,c=s>>3;if(a===1)for(let u=0;u<c;u++)i+=V0(t[n++]),r+=V0(t[n++]),o.push({x:i,y:r})}return o}if(e===Q7.LINESTRING){let o=[],s=null;for(;n<t.length;){let a=t[n++],c=a&7,u=a>>3;if(c===1)s!==null&&o.push(s),s=[],i+=V0(t[n++]),r+=V0(t[n++]),s.push({x:i,y:r});else if(c===2)for(let f=0;f<u;f++)i+=V0(t[n++]),r+=V0(t[n++]),s.push({x:i,y:r})}return s!==null&&o.push(s),o}if(e===Q7.POLYGON){let o=[],s=null;for(;n<t.length;){let a=t[n++],c=a&7,u=a>>3;if(c===1)s!==null&&o.push(s),s=[],i+=V0(t[n++]),r+=V0(t[n++]),s.push({x:i,y:r});else if(c===2)for(let f=0;f<u;f++)i+=V0(t[n++]),r+=V0(t[n++]),s.push({x:i,y:r});else c===7&&s!==null&&s.length>0&&(s.push({x:s[0].x,y:s[0].y}),o.push(s),s=null)}return s!==null&&o.push(s),o}return[]}function $Bt(e,t,n){let i=t;for(;i<n;){let r=eW(e,i,n),o=r.fieldNumber,s=r.wireType;if(i=r.newPos,o===xC.STRING&&s===2){let a=ly(e,i,n);i=a.newPos;let c=mf(i,a.value,n,"string value");return rae(e,i,c-i)}else{if(o===xC.FLOAT&&s===5)return mf(i,4,n,"float value"),new DataView(e.buffer,e.byteOffset+i,4).getFloat32(0,!0);if(o===xC.DOUBLE&&s===1)return mf(i,8,n,"double value"),new DataView(e.buffer,e.byteOffset+i,8).getFloat64(0,!0);if(o===xC.INT64&&s===0){let a=SP(e,i,n);return iae(a.value)}else if(o===xC.UINT64&&s===0){let a=SP(e,i,n);return iae(a.value)}else if(o===xC.SINT64&&s===0){let a=SP(e,i,n);return iae(JBt(a.value))}else if(o===xC.BOOL&&s===0)return vP(e,i,n).value!==0}i=tW(e,i,s,n)}}function eW(e,t,n){let i=vP(e,t,n);return{fieldNumber:i.value>>>3,wireType:i.value&7,newPos:i.newPos}}function vP(e,t,n){let i=SP(e,t,n,5);if(i.value>0xffffffffn)throw new oe("Invalid MVT uint32 varint.");return{value:Number(i.value),newPos:i.newPos}}function ly(e,t,n){let i=SP(e,t,n);if(i.value>BigInt(Number.MAX_SAFE_INTEGER))throw new oe("Invalid MVT length varint.");return{value:Number(i.value),newPos:i.newPos}}function SP(e,t,n,i){let r=0n,o=0n,s=0,a=i??10;for(;;){if(t>=n||t>=e.length)throw new oe("Invalid MVT: truncated varint.");let c=e[t++];if(r|=BigInt(c&127)<<o,s++,(c&128)===0)break;if(s>=a)throw new oe("Invalid MVT: varint is too long.");o+=7n}return{value:r,newPos:t}}function rae(e,t,n){let i=mf(t,n,e.length,"string");return HBt.decode(e.subarray(t,i))}function mf(e,t,n,i){if(!Number.isFinite(t)||t<0)throw new oe(`Invalid MVT ${i}: invalid length.`);let r=e+t;if(!Number.isFinite(r)||r<e||r>n)throw new oe(`Invalid MVT ${i}: length exceeds available bytes.`);return r}function tW(e,t,n,i){if(n===0)return SP(e,t,i).newPos;if(n===1)return mf(t,8,i,"fixed64 field");if(n===2){let r=ly(e,t,i);return mf(r.newPos,r.value,i,"length-delimited field")}else if(n===5)return mf(t,4,i,"fixed32 field");throw new oe(`Unsupported protobuf wire type: ${n}`)}function V0(e){return e>>>1^-(e&1)}function JBt(e){return e>>1n^-(e&1n)}function iae(e){return e<=BigInt(Number.MAX_SAFE_INTEGER)&&e>=BigInt(Number.MIN_SAFE_INTEGER)?Number(e):e}var Zz=qBt;var Qz=`in vec4 positionEC;
void main()
{
vec3 position;
vec3 direction;
if (czm_orthographicIn3D == 1.0)
{
vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y);
vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x);
position = vec3(mix(minPlane, maxPlane, uv), 0.0);
direction = vec3(0.0, 0.0, -1.0);
}
else
{
position = vec3(0.0);
direction = normalize(positionEC.xyz);
}
czm_ray ray = czm_ray(position, direction);
vec3 ellipsoid_center = czm_view[3].xyz;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
if (!czm_isEmpty(intersection))
{
out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
}
else
{
discard;
}
czm_writeLogDepth();
}
`;var eV=`in vec4 position;
out vec4 positionEC;
void main()
{
positionEC = czm_modelView * position;
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
}
`;function nV(e){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1,this._ellipsoidOffset=e??0}var tV=dn.supportsTypedArrays()?new Float32Array(12):[],gFe=new h,_Fe=new h,oae=new h,yFe=new h,nW=new h;function ZBt(e,t){let n=e.radii,i=t.camera,r,o,s;if(i.frustum instanceof gn)r=h.ZERO,o=i.rightWC,s=i.upWC;else{let d=i.positionWC,p=h.multiplyComponents(e.oneOverRadii,d,gFe),g=h.normalize(p,_Fe),m=h.normalize(h.cross(h.UNIT_Z,p,oae),oae),y=h.normalize(h.cross(g,m,yFe),yFe),A=h.magnitude(p),b=Math.sqrt(A*A-1);r=h.multiplyByScalar(g,1/A,gFe);let x=b/A;o=h.multiplyByScalar(m,x,_Fe),s=h.multiplyByScalar(y,x,oae)}let a=h.add(r,s,nW);h.subtract(a,o,a),h.multiplyComponents(n,a,a),h.pack(a,tV,0);let c=h.subtract(r,s,nW);h.subtract(c,o,c),h.multiplyComponents(n,c,c),h.pack(c,tV,3);let u=h.add(r,s,nW);h.add(u,o,u),h.multiplyComponents(n,u,u),h.pack(u,tV,6);let f=h.subtract(r,s,nW);return h.add(f,o,f),h.multiplyComponents(n,f,f),h.pack(f,tV,9),tV}nV.prototype.update=function(e){if(this._mode=e.mode,e.mode!==re.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new ee(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),r=e.useLogDepth;if(l(this._command)||(this._rs=Ge.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new at({renderState:this._rs,boundingVolume:new ue(h.ZERO,i.maximumRadius),pass:Ie.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==r){this._useLogDepth=r;let s=new Ye({sources:[eV]}),a=new Ye({sources:[Qz]});r&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=en.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let o=ZBt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(o);else{let s=new St({attributes:{position:new Ne({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:o})},indices:[0,1,2,2,1,3],primitiveType:Oe.TRIANGLES});this._va=zn.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Me.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};nV.prototype.execute=function(e,t){this._mode===re.SCENE3D&&this._command.execute(e,t)};nV.prototype.isDestroyed=function(){return!1};nV.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var iV=nV;function TC(){}var QBt=/\bgl_FragDepth\b/,e2t=/\bdiscard\b/;function t2t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(l(n))return n;let i=t.fragmentShaderSource,r=!1,o=i.sources;for(let a=0;a<o.length;++a)if(QBt.test(o[a])||e2t.test(o[a])){r=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!r&&!s){let a=`void main()
{
out_FragColor = vec4(1.0);
}
`;i=new Ye({sources:[a]})}else if(!r&&s){let a=`void main()
{
out_FragColor = vec4(1.0);
czm_writeLogDepth();
}
`;i=new Ye({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function n2t(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(l(i))return i;let r=Ge.getState(t);r.depthMask=!0,r.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let o=Ge.fromCache(r);return n[t.id]=o,o}TC.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let r=i.depthOnlyCommand?.shaderProgram,o=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=at.shallowClone(t,i.depthOnlyCommand),!l(r)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=t2t(n,t.shaderProgram),i.depthOnlyCommand.renderState=n2t(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=r,i.depthOnlyCommand.renderState=o),i};var i2t=/\s+czm_writeLogDepth\(/,r2t=/\s+czm_vertexLogDepth\(/;function o2t(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(l(i))return i;let r=t._attributeLocations,o=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a=!1,c=o.sources;for(let f=0;f<c.length;++f)if(r2t.test(c[f])){a=!0;break}if(!a){for(let d=0;d<c.length;++d)c[d]=Ye.replaceMain(c[d],"czm_log_depth_main");c.push(`
void main()
{
czm_log_depth_main();
czm_vertexLogDepth();
}
`)}c=s.sources,a=!1;for(let f=0;f<c.length;++f)i2t.test(c[f])&&(a=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(a=!0);let u="";if(!a){for(let f=0;f<c.length;f++)c[f]=Ye.replaceMain(c[f],"czm_log_depth_main");u=`
void main()
{
czm_log_depth_main();
czm_writeLogDepth();
}
`}return c.push(u),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:r})}TC.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=at.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=o2t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function s2t(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(l(i))return i;let r=t._attributeLocations,{sources:o,defines:s}=t.fragmentShaderSource,c=o.some(g=>g.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`void main ()
{
czm_non_pick_main();
if (${c}.a == 0.0) {
discard;
}
${c} = ${n};
} `,f=o.length,d=new Array(f+1);for(let g=0;g<f;++g)d[g]=Ye.replaceMain(o[g],"czm_non_pick_main");d[f]=u;let p=new Ye({sources:d,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:r})}function sae(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(l(i))return i;let r=Ge.getState(t);r.blending.enabled=!1,r.depthMask=!0;let o=Ge.fromCache(r);return n[t.id]=o,o}TC.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let r=i.pickCommand?.shaderProgram,o=i.pickCommand?.renderState;return i.pickCommand=at.shallowClone(t,i.pickCommand),!l(r)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=s2t(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=sae(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=r,i.pickCommand.renderState=o),i};var a2t=`uint rgba8UnormToUint32(vec4 c)
{
uvec4 b = uvec4(c * 255.0 + 0.5);
return (b.r) | (b.g << 8u) | (b.b << 16u) | (b.a << 24u);
}
`;function c2t(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"snap");if(l(i))return i;let r=t._attributeLocations,{sources:o,defines:s}=t.fragmentShaderSource,c=o.some(g=>g.includes("out_FragData"))?"out_FragData_0":"out_FragColor",u=`${a2t}
void main ()
{
czm_non_snap_main();
if (${c}.a == 0.0) {
discard;
}
${c} = ${n};
} `,f=o.length,d=new Array(f+1);for(let g=0;g<f;++g)d[g]=Ye.replaceMain(o[g],"czm_non_snap_main");d[f]=u;let p=new Ye({sources:d,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"snap",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:r})}TC.createSnapDerivedCommand=function(e,t,n,i){l(i)||(i={});let r=i.snapCommand?.shaderProgram,o=i.snapCommand?.renderState;return i.snapCommand=at.shallowClone(t,i.snapCommand),!l(r)||i.shaderProgramId!==t.shaderProgram.id?(i.snapCommand.shaderProgram=c2t(n,t.shaderProgram,t.snapId),i.snapCommand.renderState=sae(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.snapCommand.shaderProgram=r,i.snapCommand.renderState=o),i};function wP(e,t,n){let i=e.length;for(let r=0;r<i;r++)e[r].trimStart().split(/\s+/)[0]===t&&(e[r]=`${t} ${n}`)}function l2t(e){return e.isArray?e.arrayLength:bt.getComponentCount(e.type)}function AFe(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function bFe(e,t){let n=Lt.getMaximum(t);return`(${e}) / float(${n})`}function u2t(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,r=t.scale;n=AFe(n,i,r)}return e.normalized||(n=bFe(n,e.componentType)),n}function f2t(e,t,n){let r=`float(${`value.${n}`})`;if(t.hasValueTransform){let o=t.offset[n],s=t.scale[n];r=AFe(r,o,s)}return e.normalized||(r=bFe(r,e.componentType)),r}function d2t(e,t,n){let i=n.schemaId,r=n.className,o=n.propertyName,s=`pickMetadata-${i}-${r}-${o}`,a=e.shaderCache.getDerivedShaderProgram(t,s);if(l(a))return a;let c=n.metadataProperty,u=n.classProperty,f=u.getGlslType(),d=["0.0","0.0","0.0","0.0"],p=l2t(u);if(p===1)d[0]=u2t(u,c);else{let A=["x","y","z","w"];for(let b=0;b<p;b++)d[b]=f2t(u,c,A[b])}let g=t.fragmentShaderSource.defines.slice();g.push(Vf.METADATA_PICKING_ENABLED),wP(g,Vf.METADATA_PICKING_VALUE_TYPE,f),wP(g,Vf.METADATA_PICKING_VALUE_STRING,`metadata.${o}`),wP(g,Vf.METADATA_PICKING_VALUE_COMPONENT_X,d[0]),wP(g,Vf.METADATA_PICKING_VALUE_COMPONENT_Y,d[1]),wP(g,Vf.METADATA_PICKING_VALUE_COMPONENT_Z,d[2]),wP(g,Vf.METADATA_PICKING_VALUE_COMPONENT_W,d[3]);let m=new Ye({sources:t.fragmentShaderSource.sources,defines:g});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:m,attributeLocations:t._attributeLocations})}TC.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=at.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=d2t(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=sae(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function h2t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(l(n))return n;let i=t._attributeLocations,r=t.vertexShaderSource.clone(),o=t.fragmentShaderSource.clone();return r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:i})}TC.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=at.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=h2t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var up=TC;function iW(e){this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;let t=this;function n(i){let r=i.alpha;if(!l(r)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=D.toRadians(r),t._beta=D.toRadians(i.beta),t._gamma=D.toRadians(i.gamma)}window.addEventListener("deviceorientation",n,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",n,!1)}}var m2t=new Le,xFe=new Le,p2t=new $;function g2t(e,t,n,i){let r=e.direction,o=e.right,s=e.up,a=Le.fromAxisAngle(r,n,xFe),c=Le.fromAxisAngle(o,i,m2t),u=Le.multiply(c,a,c),f=Le.fromAxisAngle(s,t,xFe);Le.multiply(f,u,u);let d=$.fromQuaternion(u,p2t);$.multiplyByVector(d,o,o),$.multiplyByVector(d,s,s),$.multiplyByVector(d,r,r)}iW.prototype.update=function(){if(!l(this._alpha))return;l(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);let e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,n=this._lastGamma-this._gamma;g2t(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};iW.prototype.isDestroyed=function(){return!1};iW.prototype.destroy=function(){return this._removeListener(),le(this)};var rV=iW;function _2t(e){this.direction=h.clone(e.direction),this.color=z.clone(e.color??z.WHITE),this.intensity=e.intensity??1}var aae=_2t;function Nb(){this._framebufferManager=new ai({colorAttachmentsLength:3,createColorAttachments:!0,depthStencil:!0,supportsDepthTexture:!0,color:!0}),this._framebuffer=void 0,this._colorTexture=void 0,this._idTexture=void 0,this._depthTexture=void 0,this._depthStencilTexture=void 0,this._clearCommand=new ui({color:new z(0,0,0,0),depth:1,stencil:0,owner:this})}Object.defineProperties(Nb.prototype,{framebuffer:{get:function(){return this._framebuffer}},colorTexture:{get:function(){return this._colorTexture}},idTexture:{get:function(){return this._idTexture}},depthTexture:{get:function(){return this._depthTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}});Nb.prototype.update=function(e,t,n,i,r){let o=t.width,s=t.height,a=n?e.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE,c=this._framebufferManager.update(e,o,s,1,a,Ke.RGBA);return this._framebufferManager.framebuffer&&(this._framebuffer=this._framebufferManager.framebuffer,this._colorTexture=l(i)?i:this._framebufferManager.getColorTexture(0),this._idTexture=this._framebufferManager.getColorTexture(1),this._depthTexture=this._framebufferManager.getColorTexture(2),this._depthStencilTexture=l(r)?r:this._framebufferManager.getDepthStencilTexture()),c};Nb.prototype.clear=function(e,t,n){this.getClearCommand(n).execute(e,t)};Nb.prototype.getClearCommand=function(e){return this._clearCommand.framebuffer=this._framebuffer,l(e)&&z.clone(e,this._clearCommand.color),this._clearCommand};Nb.prototype.getFramebuffer=function(e,t,n,i){return this.update(e,t,!1,n,i),this._framebuffer};Nb.prototype.isDestroyed=function(){return!1};Nb.prototype.destroy=function(){return this._framebufferManager=this._framebufferManager&&this._framebufferManager.destroy(),this._clearCommand=void 0,le(this)};var oV=Nb;var IP=`uniform vec3 u_radii;
uniform vec3 u_oneOverEllipsoidRadiiSquared;
in vec3 v_positionEC;
vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
{
vec3 positionEC = czm_pointAlongRay(ray, intersection);
vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
vec3 sphericalNormal = normalize(positionMC / u_radii);
vec3 normalMC = geodeticNormal * side;
vec3 normalEC = normalize(czm_normal * normalMC);
vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
vec3 positionToEyeEC = -positionEC;
czm_materialInput materialInput;
materialInput.s = st.s;
materialInput.st = st;
materialInput.str = (positionMC + u_radii) / u_radii;
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef ONLY_SUN_LIGHTING
return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
#else
return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
void main()
{
float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
vec3 direction = normalize(v_positionEC);
vec3 ellipsoidCenter = czm_modelView[3].xyz;
float t1 = -1.0;
float t2 = -1.0;
float b = -2.0 * dot(direction, ellipsoidCenter);
float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;
float discriminant = b * b - 4.0 * c;
if (discriminant >= 0.0) {
t1 = (-b - sqrt(discriminant)) * 0.5;
t2 = (-b + sqrt(discriminant)) * 0.5;
}
if (t1 < 0.0 && t2 < 0.0) {
discard;
}
float t = min(t1, t2);
if (t < 0.0) {
t = 0.0;
}
czm_ray ray = czm_ray(t * direction, direction);
vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
if (czm_isEmpty(intersection))
{
discard;
}
vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);
vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
vec3 positionEC = czm_pointAlongRay(ray, t);
vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
#ifdef LOG_DEPTH
czm_writeLogDepth(1.0 + positionCC.w);
#else
float z = positionCC.z / positionCC.w;
float n = czm_depthRange.near;
float f = czm_depthRange.far;
gl_FragDepth = (z * (f - n) + f + n) * 0.5;
#endif
#endif
}
`;var PP=`in vec3 position;
uniform vec3 u_radii;
out vec3 v_positionEC;
void main()
{
vec4 p = vec4(u_radii * position, 1.0);
vec4 pEC = czm_modelView * p;
v_positionEC = pEC.xyz;
gl_Position = czm_projection * pEC;
gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);
czm_vertexLogDepth();
}
`;var cae={position:0};function rW(e){e=e??H.EMPTY_OBJECT,this.center=h.clone(e.center??h.ZERO),this._center=new h,this.radii=h.clone(e.radii),this._radii=new h,this._oneOverEllipsoidRadiiSquared=new h,this._boundingSphere=new ue,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._modelMatrix=new N,this._computedModelMatrix=new N,this.show=e.show??!0,this.material=e.material??Qi.fromType(Qi.ColorType),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.onlySunLighting=e.onlySunLighting??!1,this._onlySunLighting=!1,this._depthTestEnabled=e.depthTestEnabled??!0,this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new at({owner:e._owner??this}),this._pickCommand=new at({owner:e._owner??this,pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function y2t(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=Ic.createGeometry(Ic.fromDimensions({dimensions:new h(2,2,2),vertexFormat:Be.POSITION_ONLY}));return t=zn.fromGeometry({context:e,geometry:n,attributeLocations:cae,bufferUsage:Me.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}rW.prototype.update=function(e){if(!this.show||e.mode!==re.SCENE3D||!l(this.center)||!l(this.radii))return;let t=e.context,n=this.material.isTranslucent(),i=this._translucent!==n;(!l(this._rs)||i)&&(this._translucent=n,this._rs=Ge.fromCache({cull:{enabled:!0,face:Vi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?tn.ALPHA_BLEND:void 0})),l(this._va)||(this._va=y2t(t));let r=!1,o=this.radii;if(!h.equals(this._radii,o)){h.clone(o,this._radii);let y=this._oneOverEllipsoidRadiiSquared;y.x=1/(o.x*o.x),y.y=1/(o.y*o.y),y.z=1/(o.z*o.z),r=!0}(!N.equals(this.modelMatrix,this._modelMatrix)||!h.equals(this.center,this._center))&&(N.clone(this.modelMatrix,this._modelMatrix),h.clone(this.center,this._center),N.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),r=!0),r&&(h.clone(h.ZERO,this._boundingSphere.center),this._boundingSphere.radius=h.maximumComponent(o),ue.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,u=this._useLogDepth!==c;this._useLogDepth=c;let f=this._colorCommand,d,p;(s||a||i||u)&&(d=new Ye({sources:[PP]}),p=new Ye({sources:[this.material.shaderSource,IP]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(d.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=en.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:cae}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=Ot(this._uniforms,this.material._uniforms),f.executeInClosestFrustum=n);let g=e.commandList,m=e.passes;if(m.render&&(f.boundingVolume=this._boundingSphere,f.debugShowBoundingVolume=this.debugShowBoundingVolume,f.modelMatrix=this._computedModelMatrix,f.pass=n?Ie.TRANSLUCENT:Ie.OPAQUE,g.push(f)),m.pick){let y=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!l(this._pickSP)||u)&&(d=new Ye({sources:[PP]}),p=new Ye({sources:[this.material.shaderSource,IP],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(d.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=en.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:d,fragmentShaderSource:p,attributeLocations:cae}),y.vertexArray=this._va,y.renderState=this._rs,y.shaderProgram=this._pickSP,y.uniformMap=Ot(Ot(this._uniforms,this._pickUniforms),this.material._uniforms),y.executeInClosestFrustum=n),y.boundingVolume=this._boundingSphere,y.modelMatrix=this._computedModelMatrix,y.pass=n?Ie.TRANSLUCENT:Ie.OPAQUE,g.push(y)}};rW.prototype.isDestroyed=function(){return!1};rW.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),le(this)};var sV=rW;var aV=`in vec3 v_positionMC;
in vec3 v_positionEC;
in vec2 v_st;
void main()
{
czm_materialInput materialInput;
vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
materialInput.s = v_st.s;
materialInput.st = v_st;
materialInput.str = vec3(v_st, 0.0);
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
vec3 positionToEyeEC = -v_positionEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var cV=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec2 st;
in float batchId;
out vec3 v_positionMC;
out vec3 v_positionEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionMC = position3DHigh + position3DLow;
v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function EC(e){e=e??H.EMPTY_OBJECT;let t=e.translucent??!0,n=e.aboveGround??!1;this.material=l(e.material)?e.material:Qi.fromType(Qi.ColorType),this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource??cV,this._fragmentShaderSource=e.fragmentShaderSource??aV,this._renderState=wr.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(EC.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return EC.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});EC.VERTEX_FORMAT=Be.POSITION_AND_ST;EC.prototype.getFragmentShaderSource=wr.prototype.getFragmentShaderSource;EC.prototype.isTranslucent=wr.prototype.isTranslucent;EC.prototype.getRenderState=wr.prototype.getRenderState;var lae=EC;var A2t=1e5;function lV(e){e=e??H.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._radius=l(e.radius)?e.radius:A2t,this._image=e.image,this._transform=l(e.transform)?e.transform:N.IDENTITY,this._repeatHorizontal=l(e.repeatHorizontal)?e.repeatHorizontal:1,this._repeatVertical=l(e.repeatVertical)?e.repeatVertical:1;let n=new JU({radius:this._radius,vertexFormat:Be.ALL}),i=new Ft({geometry:n,modelMatrix:this._transform}),r=new Qi({fabric:{type:"Image",uniforms:{image:this._image,repeat:new U(-this._repeatHorizontal,this._repeatVertical)}}});return this._primitive=new On({geometryInstances:i,appearance:new Er({material:r,closed:!0,faceForward:!1,flat:!0,translucent:!1,renderState:{cull:{enabled:!1}}}),credit:this._credit}),this}Object.defineProperties(lV.prototype,{radius:{get:function(){return this._radius}},image:{get:function(){return this._image}},transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}},show:{get:function(){return l(this._primitive)?this._primitive.show:void 0},set:function(e){l(this._primitive)&&(this._primitive.show=e)}}});lV.prototype.update=function(e){return l(this._credit)&&e.creditDisplay.addCreditToNextFrame(this._credit),this._primitive.update(e)};lV.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),le(this)};lV.prototype.isDestroyed=function(){return this._primitive.isDestroyed()};var uae=lV;function fae(){this.enabled=!0,this.renderable=!0,this.density=6e-4,this.heightScalar=.001,this._heightFalloff=.59,this.maxHeight=8e5,this.visualDensityScalar=.15,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}Object.defineProperties(fae.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var b2t=new h;fae.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>this.maxHeight||e.mode!==re.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let r=i.height,o=this.density*this.heightScalar*Math.pow(Math.max(r/this.maxHeight,D.EPSILON4),-Math.max(this._heightFalloff,0)),s=h.normalize(n.positionWC,b2t),a=Math.abs(h.dot(n.directionWC,s));o*=1-a,e.fog.density=o,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var uV=fae;function pf(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??pf.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??pf.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??pf.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??pf.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??pf.defaultSettings.minimumFrameRateAfterWarmup,this._lowFrameRate=new be,this._nominalFrameRate=new be,this._frameTimes=[],this._needsQuietPeriod=!0,this._quietPeriodEndTime=0,this._warmupPeriodEndTime=0,this._frameRateIsLow=!1,this._lastFramesPerSecond=void 0,this._pauseCount=0;let t=this;this._preUpdateRemoveListener=this._scene.preUpdate.addEventListener(function(r,o){x2t(t,o)}),this._hiddenPropertyName=document.hidden!==void 0?"hidden":document.mozHidden!==void 0?"mozHidden":document.msHidden!==void 0?"msHidden":document.webkitHidden!==void 0?"webkitHidden":void 0;let n=document.hidden!==void 0?"visibilitychange":document.mozHidden!==void 0?"mozvisibilitychange":document.msHidden!==void 0?"msvisibilitychange":document.webkitHidden!==void 0?"webkitvisibilitychange":void 0;function i(){T2t(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}pf.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};pf.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new pf({scene:e})),e._frameRateMonitor};Object.defineProperties(pf.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}});pf.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};pf.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};pf.prototype.isDestroyed=function(){return!1};pf.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),le(this)};function x2t(e,t){if(e._pauseCount>0)return;let n=xn();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/kn.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/kn.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/kn.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=i){for(;e._frameTimes.length>=2&&e._frameTimes[1]<i;)e._frameTimes.shift();let r=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/r;let o=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);r>o?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}function T2t(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var fV=pf;function E2t(e,t){this.near=e??0,this.far=t??0;let n=Ie.NUMBER_OF_PASSES,i=new Array(n),r=new Array(n);for(let o=0;o<n;++o)i[o]=[],r[o]=0;this.commands=i,this.indices=r}var dV=E2t;var hae=class e{constructor(t){t=t??H.EMPTY_OBJECT;let n=C2t(t.geoJson),i=t.allowPicking??!0,r=t.ellipsoid??ee.default,o=new Float64Array(0);function s(g){return o.length<g&&(o=new Float64Array(g)),o}this.show=t.show??!0,this._url=t.url,this._ids=n.ids,this._properties=n.properties,this._featureCount=n.ids.length,this._pickObjectFactory=t.pickObjectFactory,this._points=void 0,this._polylines=void 0,this._polygons=void 0,this._heightReference=t.heightReference??We.NONE,this._scene=t.scene;let a=this._heightReference,c=this._scene;n.pointCount>0&&(this._points=new Ku({primitiveCountMax:n.pointCount,allowPicking:i})),n.polylineCount>0&&(this._polylines=new ml({primitiveCountMax:n.polylineCount,vertexCountMax:n.polylineVertexCount,allowPicking:i,heightReference:a})),n.polygonCount>0&&(this._polygons=new Ua({primitiveCountMax:n.polygonCount,vertexCountMax:n.polygonVertexCount,holeCountMax:n.polygonHoleCount,triangleCountMax:n.polygonTriangleCount,allowPicking:i,heightReference:a}));let u=new h,f=0,d=0,p=0;for(let g=0;g<n.features.length;g++){let m=n.features[g],y=m.featureId,A=this._properties[y];for(let b=0;b<m.points.length;b++){let x=f++;this._points.add({featureId:y,position:wFe(m.points[b],r,u),pickObject:i?dae(this,x,this._points,Bc,A):void 0})}for(let b=0;b<m.polylines.length;b++){let x=d++;this._polylines.add({featureId:y,positions:TFe(m.polylines[b],r,s),pickObject:i?dae(this,x,this._polylines,ya,A):void 0})}for(let b=0;b<m.polygons.length;b++){let x=m.polygons[b],T=p++;this._polygons.add({featureId:y,positions:TFe(x.positions,r,s),holes:x.holes,triangles:x.triangles,pickObject:i?dae(this,T,this._polygons,Mo,A):void 0})}}}get url(){let t=this._url;if(l(t))return t instanceof De?t.getUrlComponent(!0):t}get featureCount(){return this._featureCount}get ids(){return this._ids}get properties(){return this._properties}get points(){return this._points}get polylines(){return this._polylines}get polygons(){return this._polygons}static async fromUrl(t,n){let i=De.createIfNeeded(t),r=await i.fetchJson();if(!l(r))throw new oe(`Failed to load GeoJSON from ${i.getUrlComponent(!0)}.`);return e.fromGeoJson(r,{...n,url:i})}static fromGeoJson(t,n){return new e({...n,geoJson:t})}getId(t){return this._ids[t]}getProperties(t){return this._properties[t]}update(t){if(!this.show)return;let n=this._points,i=this._polylines,r=this._polygons,o=t.frameNumber,s=this._heightReference,a=_s(s)?this._scene.vectorProvider:null;l(n)&&n.update(t),l(i)&&(l(a)?a.markForFrame(i,o,s):i.update(t)),l(r)&&(l(a)?a.markForFrame(r,o,s):r.update(t))}destroy(){let t=_s(this._heightReference)?this._scene.vectorProvider:null;return this._points&&(this._points.destroy(),this._points=void 0),this._polylines&&(l(t)&&t.remove(this._polylines),this._polylines.destroy(),this._polylines=void 0),this._polygons&&(l(t)&&t.remove(this._polygons),this._polygons.destroy(),this._polygons=void 0),le(this)}isDestroyed(){return!1}};function dae(e,t,n,i,r){return l(e._pickObjectFactory)?e._pickObjectFactory(t,n,r):{index:t,collection:n,get primitive(){return n.get(t,new i)},parentPrimitive:e,properties:r}}function C2t(e){let t=v2t(e),n=[],i=[],r=[],o=0,s=0,a=0,c=0,u=0,f=0,d=0;for(let p=0;p<t.length;p++){let g=t[p],m={points:[],polylines:[],polygons:[]};if(EFe(g.geometry,m),m.points.length===0&&m.polylines.length===0&&m.polygons.length===0)continue;let y=i.length;i.push(g.id),r.push(F2t(g.properties)?g.properties:H.EMPTY_OBJECT);for(let A=0;A<m.polygons.length;A++){let b=m.polygons[A];f+=b.holes.length,d+=b.triangles.length/3,u+=b.positions.length}for(let A=0;A<m.polylines.length;A++)a+=m.polylines[A].length;o+=m.points.length,s+=m.polylines.length,c+=m.polygons.length,n.push({featureId:y,points:m.points,polylines:m.polylines,polygons:m.polygons})}return{features:n,ids:i,properties:r,pointCount:o,polylineCount:s,polylineVertexCount:a,polygonCount:c,polygonVertexCount:u,polygonHoleCount:f,polygonTriangleCount:d}}function v2t(e){if(!l(e)||!l(e.type))throw new oe("GeoJSON object must define 'type'.");switch(e.type){case"FeatureCollection":return e.features;case"Feature":return[e];default:if(N2t(e.type))return[{type:"Feature",geometry:e,properties:H.EMPTY_OBJECT,id:void 0}];throw new oe(`Unsupported GeoJSON type: ${e.type}`)}}function EFe(e,t){if(!(!l(e)||!l(e.type)))switch(e.type){case"Point":CFe(e.coordinates,t.points);return;case"MultiPoint":w2t(e.coordinates,t.points);return;case"LineString":vFe(e.coordinates,t.polylines);return;case"MultiLineString":I2t(e.coordinates,t.polylines);return;case"Polygon":SFe(e.coordinates,t.polygons);return;case"MultiPolygon":P2t(e.coordinates,t.polygons);return;case"GeometryCollection":S2t(e.geometries,t);return;default:return}}function S2t(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)EFe(e[n],t)}function CFe(e,t){let n=mae(e);l(n)&&t.push(n)}function w2t(e,t){for(let n=0;n<e.length;n++)CFe(e[n],t)}function vFe(e,t){let n=D2t(e);l(n)&&n.length>=2&&t.push(n)}function I2t(e,t){for(let n=0;n<e.length;n++)vFe(e[n],t)}function SFe(e,t){let n=R2t(e);l(n)&&t.push(n)}function P2t(e,t){for(let n=0;n<e.length;n++)SFe(e[n],t)}function D2t(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=mae(e[n]);l(i)&&t.push(i)}return t.length>=2?t:void 0}function R2t(e){if(!Array.isArray(e)||e.length===0)return;let t=[];for(let a=0;a<e.length;a++){let c=O2t(e[a]);l(c)&&t.push(c)}if(t.length===0||t[0].length<3)return;let i=[],r=[],o=[];for(let a=0;a<t.length;a++){let c=t[a];if(!(c.length<3)){a>0&&o.push(r.length);for(let u=0;u<c.length;u++){let f=c[u];r.push(f),i.push(new U(f[0],f[1]))}}}if(r.length<3)return;let s=fi.triangulate(i,o);if(!(!l(s)||s.length<3))return{positions:r,holes:new Uint32Array(o),triangles:new Uint32Array(s)}}function O2t(e){if(!Array.isArray(e))return;let t=[];for(let n=0;n<e.length;n++){let i=mae(e[n]);l(i)&&t.push(i)}if(!(t.length<3))return t.length>1&&M2t(t[0],t[t.length-1])&&t.pop(),t.length>=3?t:void 0}function mae(e){if(!Array.isArray(e)||e.length<2)return;let t=e[0],n=e[1],i=e[2]??0;if(!(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(i)))return[t,n,i]}function M2t(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function N2t(e){return e==="Point"||e==="MultiPoint"||e==="LineString"||e==="MultiLineString"||e==="Polygon"||e==="MultiPolygon"||e==="GeometryCollection"}function wFe(e,t,n){return h.fromDegrees(e[0],e[1],e[2]??0,t,n)}var L2t=new h;function TFe(e,t,n){let i=e.length*3,r=n(i);for(let o=0;o<e.length;o++){let s=wFe(e[o],t,L2t);r[o*3]=s.x,r[o*3+1]=s.y,r[o*3+2]=s.z}return r.subarray(0,i)}function F2t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var pae=hae;function B2t(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = ${n}.rgb;
float clippingPlanesEdgeWidth = ${n}.a;
if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
{
out_FragColor = clippingPlanesEdgeColor;
}
`}var hV=B2t;var k2t=new U;function U2t(e,t){let n=e.unionClippingRegions,i=e.length,r=bs.useFloatTexture(t),o=bs.getTextureResolution(e,t,k2t),s=o.x,a=o.y,c=r?j2t(s,a):H2t(s,a);return c+=`
`,c+=n?z2t(i):V2t(i),c}function z2t(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float clipAmount;
float pixelWidth = czm_metersPerPixel(position);
bool breakAndDiscard = false;
for (int i = 0; i < ${e}; ++i)
{
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
if (amount <= 0.0)
{
breakAndDiscard = true;
// HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6
break;
}
}
if (breakAndDiscard) {
discard;
}
return clipAmount;
}
`}function V2t(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
bool clipped = true;
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float clipAmount = 0.0;
float pixelWidth = czm_metersPerPixel(position);
for (int i = 0; i < ${e}; ++i)
{
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
clipAmount = max(amount, clipAmount);
clipped = clipped && (amount <= 0.0);
}
if (clipped)
{
discard;
}
return clipAmount;
}
`}function j2t(e,t){let n=1/e,i=1/t,r=`${n}`;r.indexOf(".")===-1&&(r+=".0");let o=`${i}`;return o.indexOf(".")===-1&&(o+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
int pixY = clippingPlaneNumber / ${e};
int pixX = clippingPlaneNumber - (pixY * ${e});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${r};
float v = (float(pixY) + 0.5) * ${o};
vec4 plane = texture(packedClippingPlanes, vec2(u, v));
return czm_transformPlane(plane, transform);
}
`}function H2t(e,t){let n=1/e,i=1/t,r=`${n}`;r.indexOf(".")===-1&&(r+=".0");let o=`${i}`;return o.indexOf(".")===-1&&(o+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
int clippingPlaneStartIndex = clippingPlaneNumber * 2;
int pixY = clippingPlaneStartIndex / ${e};
int pixX = clippingPlaneStartIndex - (pixY * ${e});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${r};
float v = (float(pixY) + 0.5) * ${o};
vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
vec4 plane;
plane.xyz = czm_octDecode(oct, 65535.0);
plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${r}, v)));
return czm_transformPlane(plane, transform);
}
`}var CC=U2t;function G2t(e,t,n,i){if(!l(e)||l(t)&&e.id!==t)return;let o=(e.classes||{})[n];if(!l(o))return;let a=(o.properties||{})[i];if(l(a))return a}var mV=G2t;function W2t(e,t,n){if(!l(e))return;let i=e.propertyTextures;for(let r of i)if(r.class.id===t){let a=r.properties[n];if(l(a))return a}}var pV=W2t;var gV=`uniform vec4 u_initialColor;
#if TEXTURE_UNITS > 0
uniform sampler2D u_dayTextures[TEXTURE_UNITS];
uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];
#ifdef APPLY_ALPHA
uniform float u_dayTextureAlpha[TEXTURE_UNITS];
#endif
#ifdef APPLY_DAY_NIGHT_ALPHA
uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
#endif
#ifdef APPLY_SPLIT
uniform float u_dayTextureSplit[TEXTURE_UNITS];
#endif
#ifdef APPLY_BRIGHTNESS
uniform float u_dayTextureBrightness[TEXTURE_UNITS];
#endif
#ifdef APPLY_CONTRAST
uniform float u_dayTextureContrast[TEXTURE_UNITS];
#endif
#ifdef APPLY_HUE
uniform float u_dayTextureHue[TEXTURE_UNITS];
#endif
#ifdef APPLY_SATURATION
uniform float u_dayTextureSaturation[TEXTURE_UNITS];
#endif
#ifdef APPLY_GAMMA
uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
#endif
#ifdef APPLY_IMAGERY_CUTOUT
uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
#endif
#ifdef APPLY_COLOR_TO_ALPHA
uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
#endif
uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
#endif
#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
uniform sampler2D u_waterMask;
uniform vec4 u_waterMaskTranslationAndScale;
uniform float u_zoomedOutOceanSpecularIntensity;
#endif
#ifdef SHOW_OCEAN_WAVES
uniform sampler2D u_oceanNormalMap;
#endif
#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
uniform vec2 u_lightingFadeDistance;
#endif
#ifdef TILE_LIMIT_RECTANGLE
uniform vec4 u_cartographicLimitRectangle;
#endif
#ifdef GROUND_ATMOSPHERE
uniform vec2 u_nightFadeDistance;
#endif
#ifdef ENABLE_CLIPPING_PLANES
uniform highp sampler2D u_clippingPlanes;
uniform mat4 u_clippingPlanesMatrix;
uniform vec4 u_clippingPlanesEdgeStyle;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
uniform float u_minimumBrightness;
#endif
#ifdef COLOR_CORRECT
uniform vec3 u_hsbShift;
#endif
#ifdef HIGHLIGHT_FILL_TILE
uniform vec4 u_fillHighlightColor;
#endif
#ifdef TRANSLUCENT
uniform vec4 u_frontFaceAlphaByDistance;
uniform vec4 u_backFaceAlphaByDistance;
uniform vec4 u_translucencyRectangle;
#endif
#ifdef UNDERGROUND_COLOR
uniform vec4 u_undergroundColor;
uniform vec4 u_undergroundColorAlphaByDistance;
#endif
#ifdef ENABLE_VERTEX_LIGHTING
uniform float u_lambertDiffuseMultiplier;
uniform float u_vertexShadowDarkness;
#endif
in vec3 v_positionMC;
in vec3 v_positionEC;
in vec3 v_textureCoordinates;
in vec3 v_normalMC;
in vec3 v_normalEC;
#ifdef APPLY_MATERIAL
in float v_height;
in float v_slope;
in float v_aspect;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
in float v_distance;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG)
in vec3 v_atmosphereRayleighColor;
in vec3 v_atmosphereMieColor;
in float v_atmosphereOpacity;
#endif
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
float interpolateByDistance(vec4 nearFarScalar, float distance)
{
float startDistance = nearFarScalar.x;
float startValue = nearFarScalar.y;
float endDistance = nearFarScalar.z;
float endValue = nearFarScalar.w;
float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
return mix(startValue, endValue, t);
}
#endif
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
{
return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
}
#endif
#ifdef TRANSLUCENT
bool inTranslucencyRectangle()
{
return
v_textureCoordinates.x > u_translucencyRectangle.x &&
v_textureCoordinates.x < u_translucencyRectangle.z &&
v_textureCoordinates.y > u_translucencyRectangle.y &&
v_textureCoordinates.y < u_translucencyRectangle.w;
}
#endif
vec4 sampleAndBlend(
vec4 previousColor,
sampler2D textureToSample,
vec2 tileTextureCoordinates,
vec4 textureCoordinateRectangle,
vec4 textureCoordinateTranslationAndScale,
float textureAlpha,
float textureNightAlpha,
float textureDayAlpha,
float textureBrightness,
float textureContrast,
float textureHue,
float textureSaturation,
float textureOneOverGamma,
float split,
vec4 colorToAlpha,
float nightBlend)
{
vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
#endif
vec2 translation = textureCoordinateTranslationAndScale.xy;
vec2 scale = textureCoordinateTranslationAndScale.zw;
vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
vec4 value = texture(textureToSample, textureCoordinates);
vec3 color = value.rgb;
float alpha = value.a;
#ifdef APPLY_COLOR_TO_ALPHA
vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
colorDiff.r = czm_maximumComponent(colorDiff);
alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
#endif
#if !defined(APPLY_GAMMA)
vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
color = tempColor.rgb;
alpha = tempColor.a;
#else
color = pow(color, vec3(textureOneOverGamma));
#endif
#ifdef APPLY_SPLIT
float splitPosition = czm_splitPosition;
if (split < 0.0 && gl_FragCoord.x > splitPosition) {
alpha = 0.0;
}
else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
alpha = 0.0;
}
#endif
#ifdef APPLY_BRIGHTNESS
color = mix(vec3(0.0), color, textureBrightness);
#endif
#ifdef APPLY_CONTRAST
color = mix(vec3(0.5), color, textureContrast);
#endif
#ifdef APPLY_HUE
color = czm_hue(color, textureHue);
#endif
#ifdef APPLY_SATURATION
color = czm_saturation(color, textureSaturation);
#endif
float sourceAlpha = alpha * textureAlpha;
float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
outAlpha += sign(outAlpha) - 1.0;
vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;
return vec4(outColor, max(outAlpha, 0.0));
}
vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);
const float fExposure = 2.0;
vec3 computeEllipsoidPosition()
{
float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
xy *= czm_viewport.zw * mpp * 0.5;
vec3 direction;
if (czm_orthographicIn3D == 1.0)
{
direction = vec3(0.0, 0.0, -1.0);
}
else
{
direction = normalize(vec3(xy, -czm_currentFrustum.x));
}
czm_ray ray = czm_ray(vec3(0.0), direction);
vec3 ellipsoid_center = czm_view[3].xyz;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
}
void main()
{
#ifdef TILE_LIMIT_RECTANGLE
if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
{
discard;
}
#endif
#ifdef ENABLE_CLIPPING_PLANES
float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
#endif
#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0));
vec3 normalEC = czm_normal3D * normalMC;
#endif
#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
#else
float nightBlend = 0.0;
#endif
vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);
#ifdef SHOW_TILE_BOUNDARIES
if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
{
color = vec4(1.0, 0.0, 0.0, 1.0);
}
#endif
#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
float cameraDist;
if (czm_sceneMode == czm_sceneMode2D)
{
cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
}
else if (czm_sceneMode == czm_sceneModeColumbusView)
{
cameraDist = -czm_view[3].z;
}
else
{
cameraDist = length(czm_view[3]);
}
float fadeOutDist = u_lightingFadeDistance.x;
float fadeInDist = u_lightingFadeDistance.y;
if (czm_sceneMode != czm_sceneMode3D) {
vec3 radii = czm_ellipsoidRadii;
float maxRadii = max(radii.x, max(radii.y, radii.z));
fadeOutDist -= maxRadii;
fadeInDist -= maxRadii;
}
float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
#else
float fade = 0.0;
#endif
#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
#ifdef SHOW_REFLECTIVE_OCEAN
if (mask > 0.0)
{
mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);
vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);
vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));
color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
}
#endif
#endif
#ifdef APPLY_MATERIAL
czm_materialInput materialInput;
materialInput.st = v_textureCoordinates.st;
materialInput.normalEC = normalize(v_normalEC);
materialInput.positionToEyeEC = -v_positionEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
materialInput.slope = v_slope;
materialInput.height = v_height;
materialInput.aspect = v_aspect;
#ifdef HAS_WATER_MASK
materialInput.waterMask = mask;
#endif
czm_material material = czm_getMaterial(materialInput);
vec4 materialColor = vec4(material.diffuse, material.alpha);
color = alphaBlend(materialColor, color);
#endif
#ifdef ENABLE_VERTEX_LIGHTING
float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#elif defined(ENABLE_DAYNIGHT_SHADING)
float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
diffuseIntensity = mix(1.0, diffuseIntensity, fade);
vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#else
vec4 finalColor = color;
#endif
#ifdef ENABLE_CLIPPING_PLANES
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;
if (clipDistance < clippingPlanesEdgeWidth)
{
finalColor = clippingPlanesEdgeColor;
}
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
bool insideAny = vectorClip(v_textureCoordinates.xy);
#ifdef CLIPPING_INVERSE
if (!insideAny) {
discard;
}
#else
if (insideAny) {
discard;
}
#endif
#endif
#ifdef HIGHLIGHT_FILL_TILE
finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
#endif
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG)
if (!czm_backFacing())
{
bool dynamicLighting = false;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
dynamicLighting = true;
#endif
vec3 rayleighColor;
vec3 mieColor;
float opacity;
vec3 positionWC;
vec3 lightDirection;
#ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
positionWC = computeEllipsoidPosition();
lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
computeAtmosphereScattering(
positionWC,
lightDirection,
rayleighColor,
mieColor,
opacity
);
#else
positionWC = v_positionMC;
lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
rayleighColor = v_atmosphereRayleighColor;
mieColor = v_atmosphereMieColor;
opacity = v_atmosphereOpacity;
#endif
#ifdef COLOR_CORRECT
const bool ignoreBlackPixels = true;
rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
#endif
vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
#ifdef FOG
vec3 fogColor = groundAtmosphereColor.rgb;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
fogColor *= darken;
#endif
#ifndef HDR
fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
fogColor.rgb = czm_inverseGamma(fogColor.rgb);
#endif
finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);
#else
const float transmittanceModifier = 0.5;
float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);
vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
float fadeInDist = u_nightFadeDistance.x;
float fadeOutDist = u_nightFadeDistance.y;
float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);
finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
#endif
#ifndef HDR
finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
#else
finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
#endif
finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
#endif
}
#endif
#ifdef UNDERGROUND_COLOR
if (czm_backFacing())
{
float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
float distance = max(v_distance - distanceFromEllipsoid, 0.0);
float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
finalColor = alphaBlend(undergroundColor, finalColor);
}
#endif
#ifdef HAS_VECTOR_LAYER
finalColor = vectorPolygonRender(v_textureCoordinates.xy, finalColor);
finalColor = vectorPolylineRender(v_textureCoordinates.xy, finalColor);
#endif
#ifdef TRANSLUCENT
if (inTranslucencyRectangle())
{
vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
}
#endif
out_FragColor = finalColor;
}
#ifdef SHOW_REFLECTIVE_OCEAN
float waveFade(float edge0, float edge1, float x)
{
float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
return pow(1.0 - y, 5.0);
}
float linearFade(float edge0, float edge1, float x)
{
return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
}
const float oceanFrequencyLowAltitude = 825000.0;
const float oceanAnimationSpeedLowAltitude = 0.004;
const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
const float oceanSpecularIntensity = 0.5;
const float oceanFrequencyHighAltitude = 125000.0;
const float oceanAnimationSpeedHighAltitude = 0.008;
const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;
vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
{
vec3 positionToEyeEC = -positionEyeCoordinates;
float positionToEyeECLength = length(positionToEyeEC);
vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));
float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);
#ifdef SHOW_OCEAN_WAVES
float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);
time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);
float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
vec3 normalTangentSpace =
(highAltitudeFade * normalTangentSpaceHighAltitude) +
(lowAltitudeFade * normalTangentSpaceLowAltitude);
normalTangentSpace = normalize(normalTangentSpace);
normalTangentSpace.xy *= waveIntensity;
normalTangentSpace = normalize(normalTangentSpace);
#else
vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
#endif
vec3 normalEC = enuToEye * normalTangentSpace;
const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);
float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);
#ifdef SHOW_OCEAN_WAVES
float tsPerturbationRatio = normalTangentSpace.z;
vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
#else
vec3 nonDiffuseHighlight = vec3(0.0);
#endif
float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
float specular = specularIntensity * surfaceReflectance;
#ifdef HDR
specular *= 1.4;
float e = 0.2;
float d = 3.3;
float c = 1.7;
vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
#else
vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
#endif
return vec4(color, imageryColor.a);
}
#endif // #ifdef SHOW_REFLECTIVE_OCEAN
`;var _V=`#ifdef QUANTIZATION_BITS12
in vec4 compressed0;
in float compressed1;
#else
in vec4 position3DAndHeight;
in vec4 textureCoordAndEncodedNormals;
#endif
#ifdef GEODETIC_SURFACE_NORMALS
in vec3 geodeticSurfaceNormal;
#endif
#ifdef EXAGGERATION
uniform vec2 u_verticalExaggerationAndRelativeHeight;
#endif
uniform vec3 u_center3D;
uniform mat4 u_modifiedModelView;
uniform mat4 u_modifiedModelViewProjection;
uniform vec4 u_tileRectangle;
uniform vec2 u_southAndNorthLatitude;
uniform vec2 u_southMercatorYAndOneOverHeight;
out vec3 v_positionMC;
out vec3 v_positionEC;
out vec3 v_textureCoordinates;
out vec3 v_normalMC;
out vec3 v_normalEC;
#ifdef APPLY_MATERIAL
out float v_slope;
out float v_aspect;
out float v_height;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
out float v_distance;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE)
out vec3 v_atmosphereRayleighColor;
out vec3 v_atmosphereMieColor;
out float v_atmosphereOpacity;
#endif
vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
float get2DYPositionFraction(vec2 textureCoordinates);
vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
{
return u_modifiedModelViewProjection * vec4(position, 1.0);
}
float get2DMercatorYPositionFraction(vec2 textureCoordinates)
{
const float maxTileWidth = 0.003068;
float positionFraction = textureCoordinates.y;
float southLatitude = u_southAndNorthLatitude.x;
float northLatitude = u_southAndNorthLatitude.y;
if (northLatitude - southLatitude > maxTileWidth)
{
float southMercatorY = u_southMercatorYAndOneOverHeight.x;
float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;
float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
}
return positionFraction;
}
float get2DGeographicYPositionFraction(vec2 textureCoordinates)
{
return textureCoordinates.y;
}
vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
{
float yPositionFraction = get2DYPositionFraction(textureCoordinates);
vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
return u_modifiedModelViewProjection * rtcPosition2D;
}
vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
{
return getPositionPlanarEarth(position, 0.0, textureCoordinates);
}
vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
{
return getPositionPlanarEarth(position, height, textureCoordinates);
}
vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
{
vec3 position3DWC = position + u_center3D;
float yPositionFraction = get2DYPositionFraction(textureCoordinates);
vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
vec4 morphPositionEC = czm_modelView * morphPosition;
return czm_projection * morphPositionEC;
}
#ifdef QUANTIZATION_BITS12
uniform vec2 u_minMaxHeight;
uniform mat4 u_scaleAndBias;
#endif
void main()
{
#ifdef QUANTIZATION_BITS12
vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
vec3 position = vec3(xy, zh.x);
float height = zh.y;
vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);
height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
position = (u_scaleAndBias * vec4(position, 1.0)).xyz;
#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
float encodedNormal = compressed1;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
float encodedNormal = 0.0;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
float webMercatorT = textureCoordinates.y;
float encodedNormal = compressed0.w;
#else
float webMercatorT = textureCoordinates.y;
float encodedNormal = 0.0;
#endif
#else
vec3 position = position3DAndHeight.xyz;
float height = position3DAndHeight.w;
vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;
#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = textureCoordAndEncodedNormals.z;
float encodedNormal = textureCoordAndEncodedNormals.w;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
float webMercatorT = textureCoordinates.y;
float encodedNormal = textureCoordAndEncodedNormals.z;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = textureCoordAndEncodedNormals.z;
float encodedNormal = 0.0;
#else
float webMercatorT = textureCoordinates.y;
float encodedNormal = 0.0;
#endif
#endif
vec3 position3DWC = position + u_center3D;
#ifdef GEODETIC_SURFACE_NORMALS
vec3 ellipsoidNormal = geodeticSurfaceNormal;
#else
vec3 ellipsoidNormal = normalize(position3DWC);
#endif
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
newHeight = max(newHeight, -minRadius);
vec3 offset = ellipsoidNormal * (newHeight - height);
position += offset;
position3DWC += offset;
height = newHeight;
#endif
gl_Position = getPosition(position, height, textureCoordinates);
v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
v_positionMC = position3DWC;
v_textureCoordinates = vec3(textureCoordinates, webMercatorT);
#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
vec3 normalMC = czm_octDecode(encodedNormal);
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
vec3 rejection = normalMC - projection;
normalMC = normalize(projection + rejection * exaggeration);
#endif
v_normalMC = normalMC;
v_normalEC = czm_normal3D * v_normalMC;
#endif
#if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))
bool dynamicLighting = false;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
dynamicLighting = true;
#endif
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif
vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));
computeAtmosphereScattering(
position3DWC,
lightDirection,
v_atmosphereRayleighColor,
v_atmosphereMieColor,
v_atmosphereOpacity
);
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
#endif
#ifdef APPLY_MATERIAL
float northPoleZ = czm_ellipsoidRadii.z;
vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
v_slope = acos(dotProd);
vec3 normalRejected = ellipsoidNormal * dotProd;
vec3 normalProjected = v_normalMC - normalRejected;
vec3 aspectVector = normalize(normalProjected);
v_aspect = acos(dot(aspectVector, vectorEastMC));
float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
v_height = height;
#endif
}
`;var DP=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
float atmosphereInnerRadius = length(positionWC);
computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
}
`;var gae=class{constructor(t,n,i,r,o,s){this.numberOfDayTextures=t,this.flags=n,this.material=i,this.shaderProgram=r,this.clippingShaderState=o,this.clippingPolygonShaderState=s}},_ae=class{constructor(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}getShaderProgram(t){let n=t.frameState,i=t.surfaceTile,r=t.numberOfDayTextures,o=t.applyBrightness,s=t.applyContrast,a=t.applyHue,c=t.applySaturation,u=t.applyGamma,f=t.applyAlpha,d=t.applyDayNightAlpha,p=t.applySplit,g=t.hasWaterMask,m=t.showReflectiveOcean,y=t.showOceanWaves,A=t.enableLighting,b=t.dynamicAtmosphereLighting,x=t.dynamicAtmosphereLightingFromSun,T=t.showGroundAtmosphere,E=t.perFragmentGroundAtmosphere,v=t.hasVertexNormals,S=t.useWebMercatorProjection,I=t.enableFog,R=t.enableClippingPlanes,O=t.clippingPlanes,L=t.enableClippingPolygons,_=t.clippingPolygons,C=t.clippedByBoundaries,w=t.hasImageryLayerCutout,P=t.colorCorrect,M=t.highlightFillTile,F=t.colorToAlpha,V=t.hasGeodeticSurfaceNormals,B=t.hasExaggeration,j=t.showUndergroundColor,k=t.translucent,G=i.vectorData,q=G?.show,Q=q&&G.hasPolylines,W=q&&G.hasPolygons,J=q&&t.vectorAntialias,Z=Q&&G.hasMeterWidths,ae=Z&&G.hasPixelWidths,Ae=0,fe="",ge=i.renderedMesh.encoding;ge.quantization===$a.BITS12&&(Ae=1,fe="QUANTIZATION_BITS12");let Se=0,Re="";C&&(Se=1,Re="TILE_LIMIT_RECTANGLE");let Qe=0,He="";w&&(Qe=1,He="APPLY_IMAGERY_CUTOUT");let Xe=n.mode,$e=((Xe|+o<<2|+s<<3|+a<<4|+c<<5|+u<<6|+f<<7|+g<<8|+m<<9|+y<<10|+A<<11|+b<<12|+x<<13|+T<<14|+E<<15|+v<<16|+S<<17|+I<<18|Ae<<19|+p<<20|+R<<21|+L<<22|Se<<23|Qe<<24|+P<<25|+M<<26|+F<<27|+V<<28|+B<<29|+j<<30|+k<<31)>>>0)+(d?4294967296:0)+(q?8589934592:0)+(Q?17179869184:0)+(W?34359738368:0)+(J?68719476736:0)+(Z?137438953472:0)+(ae?274877906944:0),Pe=0;l(O)&&O.length>0&&(Pe=R?O.clippingPlanesState:0);let qe=0;l(_)&&_.length>0&&(qe=L?_.clippingPolygonsState:0);let st=i.surfaceShader;if(l(st)&&st.numberOfDayTextures===r&&st.flags===$e&&st.material===this.material&&st.clippingShaderState===Pe&&st.clippingPolygonShaderState===qe)return st.shaderProgram;let vt=this._shadersByTexturesFlags[r];if(l(vt)||(vt=this._shadersByTexturesFlags[r]=[]),st=vt[$e],!l(st)||st.material!==this.material||st.clippingShaderState!==Pe||st.clippingPolygonShaderState!==qe){let Gt=this.baseVertexShaderSource.clone(),lt=this.baseFragmentShaderSource.clone();Pe!==0&&lt.sources.unshift(CC(O,n.context)),Gt.defines.push(fe),lt.defines.push(`TEXTURE_UNITS ${r}`,Re,He),o&&lt.defines.push("APPLY_BRIGHTNESS"),s&&lt.defines.push("APPLY_CONTRAST"),a&&lt.defines.push("APPLY_HUE"),c&&lt.defines.push("APPLY_SATURATION"),u&&lt.defines.push("APPLY_GAMMA"),f&&lt.defines.push("APPLY_ALPHA"),d&&lt.defines.push("APPLY_DAY_NIGHT_ALPHA"),g&&lt.defines.push("HAS_WATER_MASK"),m&&(lt.defines.push("SHOW_REFLECTIVE_OCEAN"),Gt.defines.push("SHOW_REFLECTIVE_OCEAN")),y&&lt.defines.push("SHOW_OCEAN_WAVES"),F&&lt.defines.push("APPLY_COLOR_TO_ALPHA"),j&&(Gt.defines.push("UNDERGROUND_COLOR"),lt.defines.push("UNDERGROUND_COLOR")),k&&(Gt.defines.push("TRANSLUCENT"),lt.defines.push("TRANSLUCENT")),A&&(v?(Gt.defines.push("ENABLE_VERTEX_LIGHTING"),lt.defines.push("ENABLE_VERTEX_LIGHTING")):(Gt.defines.push("ENABLE_DAYNIGHT_SHADING"),lt.defines.push("ENABLE_DAYNIGHT_SHADING"))),b&&(Gt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),lt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),x&&(Gt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),lt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),T&&(Gt.defines.push("GROUND_ATMOSPHERE"),lt.defines.push("GROUND_ATMOSPHERE"),E&&(Gt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),lt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),Gt.defines.push("INCLUDE_WEB_MERCATOR_Y"),lt.defines.push("INCLUDE_WEB_MERCATOR_Y"),I&&(Gt.defines.push("FOG"),lt.defines.push("FOG")),p&&lt.defines.push("APPLY_SPLIT"),R&&lt.defines.push("ENABLE_CLIPPING_PLANES"),L&&(lt.defines.push("ENABLE_CLIPPING_POLYGONS"),_.inverse&&lt.defines.push("CLIPPING_INVERSE")),P&&lt.defines.push("COLOR_CORRECT"),M&&lt.defines.push("HIGHLIGHT_FILL_TILE"),V&&Gt.defines.push("GEODETIC_SURFACE_NORMALS"),B&&Gt.defines.push("EXAGGERATION"),q&&(lt.defines.push("HAS_VECTOR_LAYER"),Q&&lt.defines.push("HAS_VECTOR_POLYLINES"),W&&lt.defines.push("HAS_VECTOR_POLYGONS"),J&&lt.defines.push("VECTOR_ANTIALIAS"),Z&&lt.defines.push("VECTOR_WIDTH_IN_METERS"),ae&&lt.defines.push("VECTOR_WIDTH_MIXED_UNITS")),(q||L)&&lt.sources.unshift(Xg);let mt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
{
vec4 color = initialColor;
`;w&&(mt+=` vec4 cutoutAndColorResult;
bool texelUnclipped;
`);for(let Xt=0;Xt<r;++Xt)w?mt+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Xt}];
texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
cutoutAndColorResult = sampleAndBlend(
`:mt+=` color = sampleAndBlend(
`,mt+=` color,
u_dayTextures[${Xt}],
u_dayTextureUseWebMercatorT[${Xt}] ? textureCoordinates.xz : textureCoordinates.xy,
u_dayTextureTexCoordsRectangle[${Xt}],
u_dayTextureTranslationAndScale[${Xt}],
${f?`u_dayTextureAlpha[${Xt}]`:"1.0"},
${d?`u_dayTextureNightAlpha[${Xt}]`:"1.0"},
${d?`u_dayTextureDayAlpha[${Xt}]`:"1.0"},
${o?`u_dayTextureBrightness[${Xt}]`:"0.0"},
${s?`u_dayTextureContrast[${Xt}]`:"0.0"},
${a?`u_dayTextureHue[${Xt}]`:"0.0"},
${c?`u_dayTextureSaturation[${Xt}]`:"0.0"},
${u?`u_dayTextureOneOverGamma[${Xt}]`:"0.0"},
${p?`u_dayTextureSplit[${Xt}]`:"0.0"},
${F?`u_colorsToAlpha[${Xt}]`:"vec4(0.0)"},
nightBlend);
`,w&&(mt+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
`);mt+=` return color;
}`,lt.sources.push(mt),Gt.sources.push(q2t(Xe)),Gt.sources.push(Y2t(S));let ft=en.fromCache({context:n.context,vertexShaderSource:Gt,fragmentShaderSource:lt,attributeLocations:ge.getAttributeLocations()});st=vt[$e]=new gae(r,$e,this.material,ft,Pe,qe)}return i.surfaceShader=st,st.shaderProgram}destroy(){let t,n,i=this._shadersByTexturesFlags;for(let r in i)if(i.hasOwnProperty(r)){let o=i[r];if(!l(o))continue;for(t in o)o.hasOwnProperty(t)&&(n=o[t],l(n)&&n.shaderProgram.destroy())}return le(this)}};function q2t(e){let t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }",n="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }",i="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }",r;switch(e){case re.SCENE3D:r=t;break;case re.SCENE2D:case re.COLUMBUS_VIEW:r=n;break;case re.MORPHING:r=i;break}return r}function Y2t(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}var yV=_ae;var IFe={START:0,LOADING:1,DONE:2,FAILED:3};Object.freeze(IFe);var Qa=IFe;var PFe={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6};Object.freeze(PFe);var kr=PFe;var j0=class e{constructor(){ut(this,"request");this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vectorData=void 0,this.clippingPolygonData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new h,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=kr.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new ue,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}get eligibleForUnloading(){let t=this.terrainState,i=!(t===kr.RECEIVING||t===kr.TRANSFORMING),r=this.imagery;for(let o=0,s=r.length;i&&o<s;++o){let a=r[o];i=!l(a.loadingImagery)||a.loadingImagery.state!==Vn.TRANSITIONING}return i}get renderedMesh(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}pick(t,n,i,r,o){if(!l(this.renderedMesh))return;let s=this.renderedMesh.pick(t,r,n,i);return h.clone(s,o)}freeResources(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),l(this.vectorData)&&(Es.freeResources(this.vectorData),this.vectorData=void 0),l(this.clippingPolygonData)&&(Mc.releaseRectangleData(this.clippingPolygonData),this.clippingPolygonData=void 0),this.terrainData=void 0,this.terrainState=kr.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let t=this.imagery;for(let n=0,i=t.length;n<i;++n)t[n].freeResources();this.imagery.length=0,this.freeVertexArray()}freeVertexArray(){e._freeVertexArray(this.vertexArray),this.vertexArray=void 0,e._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0}static initialize(t,n,i,r){l(t.data)||(t.data=new e),t.state===Qa.START&&(X2t(t,n,i,r),t.state=Qa.LOADING)}static processStateMachine(t,n,i,r,o,s,a,c){e.initialize(t,i,r,o);let u=t.data;if(t.state===Qa.LOADING&&K2t(t,n,i,r,o,s,a),c)return;let f=t.renderable;t.renderable=l(u.vertexArray);let d=u.terrainState===kr.READY;t.upsampledFromParent=l(u.terrainData)&&u.terrainData.wasCreatedByUpsampling();let p=u.processImagery(t,i,n);if(d&&p){let g=t._loadedCallbacks,m={};for(let y in g)g.hasOwnProperty(y)&&(g[y](t)||(m[y]=g[y]));t._loadedCallbacks=m,t.state=Qa.DONE}f&&(t.renderable=!0)}processImagery(t,n,i,r){let o=t.data,s=t.upsampledFromParent,a=!1,c=!0,u=o.imagery,f,d;for(f=0,d=u.length;f<d;++f){let p=u[f];if(!l(p.loadingImagery)){s=!1;continue}if(p.loadingImagery.state===Vn.PLACEHOLDER){let m=p.loadingImagery.imageryLayer;if(m.ready){p.freeResources(),u.splice(f,1),m._createTileImagerySkeletons(t,n,f),--f,d=u.length;continue}else s=!1}let g=p.processStateMachine(t,i,r);c=c&&g,a=a||g||l(p.readyImagery),s=s&&l(p.loadingImagery)&&(p.loadingImagery.state===Vn.FAILED||p.loadingImagery.state===Vn.INVALID)}return t.upsampledFromParent=s,t.renderable=t.renderable&&(a||c),c}addGeodeticSurfaceNormals(t,n){DFe(this,!0,t,n)}removeGeodeticSurfaceNormals(t){DFe(this,!1,void 0,t)}updateExaggeration(t,n,i){let r=this,o=r.renderedMesh;if(o===void 0)return;let s=n.verticalExaggeration,a=n.verticalExaggerationRelativeHeight,c=s!==1,u=o.encoding,f=u.exaggeration!==s,d=u.exaggerationRelativeHeight!==a;if(f||d){if(f)if(c&&!u.hasGeodeticSurfaceNormals){let g=t.tilingScheme.ellipsoid;r.addGeodeticSurfaceNormals(g,n)}else!c&&u.hasGeodeticSurfaceNormals&&r.removeGeodeticSurfaceNormals(n);if(u.exaggeration=s,u.exaggerationRelativeHeight=a,i!==void 0){i._tileToUpdateHeights.push(t);let g=t.customData;for(let m of g)m.level=-1}o.updateExaggeration(s,a)}}updateSceneMode(t){let i=this.renderedMesh;i!==void 0&&i.updateSceneMode(t)}static _createVertexArrayForMesh(t,n){let i=n.vertices,r=nt.createVertexBuffer({context:t,typedArray:i,usage:Me.STATIC_DRAW}),o=n.encoding.getAttributes(r),s=n.indices.indexBuffers||{},a=s[t.id];if(!l(a)||a.isDestroyed()){let c=n.indices;a=nt.createIndexBuffer({context:t,typedArray:c,usage:Me.STATIC_DRAW,indexDatatype:je.fromSizeInBytes(c.BYTES_PER_ELEMENT)}),a.vertexArrayDestroyable=!1,a.referenceCount=1,s[t.id]=a,n.indices.indexBuffers=s}else++a.referenceCount;return new zn({context:t,attributes:o,indexBuffer:a})}static _freeVertexArray(t){if(l(t)){let n=t.indexBuffer;t.isDestroyed()||t.destroy(),l(n)&&!n.isDestroyed()&&l(n.referenceCount)&&(--n.referenceCount,n.referenceCount===0&&n.destroy())}}_findAncestorTileWithTerrainData(t){let n=t.parent;for(;l(n)&&(!l(n.data)||!l(n.data.terrainData)||n.data.terrainData.wasCreatedByUpsampling());)n=n.parent;return n}_computeWaterMaskTranslationAndScale(t,n,i){let r=n.rectangle,o=t.rectangle,s=o.width,a=o.height,c=s/r.width,u=a/r.height;return i.x=c*(o.west-r.west)/s,i.y=u*(o.south-r.south)/a,i.z=c,i.w=u,i}};function DFe(e,t,n,i){let r=e.renderedMesh,o=r.vertices,s=r.encoding,a=o.length/s.stride,c=Co.clone(s);c.hasGeodeticSurfaceNormals=t,c=Co.clone(c);let u=c.stride,f=new Float32Array(a*u);t?s.addGeodeticSurfaceNormals(o,f,n):s.removeGeodeticSurfaceNormals(o,f),r.vertices=f,r.stride=u,r!==e.mesh?(j0._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=j0._createVertexArrayForMesh(i.context,r)):(j0._freeVertexArray(e.vertexArray),e.vertexArray=j0._createVertexArrayForMesh(i.context,r)),j0._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}function X2t(e,t,n,i){let r=t.getTileDataAvailable(e.x,e.y,e.level);if(!l(r)&&l(e.parent)){let s=e.parent,a=s.data;l(a)&&l(a.terrainData)&&(r=a.terrainData.isChildAvailable(s.x,s.y,e.x,e.y))}let o=e.data;r===!1&&(o.terrainState=kr.FAILED);for(let s=0,a=i.length;s<a;++s){let c=i.get(s);c.show&&c._createTileImagerySkeletons(e,t)}}function K2t(e,t,n,i,r,o,s){let a=e.data,c=e.parent;if(a.terrainState===kr.FAILED&&c!==void 0){let u=c.data;u!==void 0&&u.terrainData!==void 0&&u.terrainData.canUpsample!==!1||j0.processStateMachine(c,t,n,i,r,o,s,!0)}if(a.terrainState===kr.FAILED&&$2t(a,e,t,n,e.x,e.y,e.level),a.terrainState===kr.UNLOADED&&J2t(a,n,e.x,e.y,e.level),a.terrainState===kr.RECEIVED&&Q2t(a,t,n,e.x,e.y,e.level),a.terrainState===kr.TRANSFORMED&&(ekt(a,t.context,n,e.x,e.y,e.level,s),a.updateExaggeration(e,t,o)),a.terrainState>=kr.RECEIVED&&a.waterMaskTexture===void 0&&n.hasWaterMask)if(a.terrainData.waterMask!==void 0)nkt(t.context,a);else{let f=a._findAncestorTileWithTerrainData(e),d=f?.data;l(f)&&l(d.waterMaskTexture)&&(a.waterMaskTexture=d.waterMaskTexture,++a.waterMaskTexture.referenceCount,a._computeWaterMaskTranslationAndScale(e,f,a.waterMaskTranslationAndScale))}}function $2t(e,t,n,i,r,o,s){let a=t.parent;if(!a){t.state=Qa.FAILED;return}let u=a.data.terrainData,f=a.x,d=a.y,p=a.level;if(!l(u))return;let g=u.upsample(i.tilingScheme,f,d,p,r,o,s);l(g)&&(e.terrainState=kr.RECEIVING,Promise.resolve(g).then(function(m){l(m)&&(e.terrainData=m,e.terrainState=kr.RECEIVED)}).catch(function(){e.terrainState=kr.FAILED}))}function J2t(e,t,n,i,r){function o(c){if(!l(c)){e.terrainState=kr.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=kr.RECEIVED,e.request=void 0}function s(c){if(e.request.state===Ti.CANCELLED){e.terrainData=void 0,e.terrainState=kr.UNLOADED,e.request=void 0;return}e.terrainState=kr.FAILED,e.request=void 0;let u=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${r}. Error message: "${c}"`;t._requestError=Zr.reportError(t._requestError,t,t.errorEvent,u,n,i,r),t._requestError.retry&&a()}function a(){let c=new wo({throttle:!1,throttleByServer:!0,type:Zs.TERRAIN});e.request=c;let u=t.requestTileGeometry(n,i,r,c);l(u)?(e.terrainState=kr.RECEIVING,Promise.resolve(u).then(function(f){o(f)}).catch(function(f){s(f)})):(e.terrainState=kr.UNLOADED,e.request=void 0)}a()}var Z2t={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Q2t(e,t,n,i,r,o){let s=n.tilingScheme,a=Z2t;a.tilingScheme=s,a.x=i,a.y=r,a.level=o,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let u=e.terrainData.createMesh(a);l(u)&&(e.terrainState=kr.TRANSFORMING,Promise.resolve(u).then(function(f){e.mesh=f,e.terrainState=kr.TRANSFORMED}).catch(function(){e.terrainState=kr.FAILED}))}function ekt(e,t,n,i,r,o,s){e.vertexArray=j0._createVertexArrayForMesh(t,e.mesh),e.terrainState=kr.READY,e.fill=e.fill&&e.fill.destroy(s)}function tkt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Dt.create({context:e,pixelFormat:Ke.LUMINANCE,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:Zn.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function nkt(e,t){let n=t.terrainData.waterMask,i=tkt(e),r,o=n.length;if(n instanceof ImageBitmap)r=Dt.create({context:e,source:n,sampler:i.sampler,flipY:!1,skipColorSpaceConversion:!0});else if(o===1)if(n[0]!==0)r=i.allWaterTexture;else return;else{let s=Math.sqrt(o);r=Dt.create({context:e,pixelFormat:Ke.LUMINANCE,pixelDatatype:ze.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),r.referenceCount=0}++r.referenceCount,t.waterMaskTexture=r,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}var wh=j0;var RFe={NONE:0,CULLED:1,RENDERED:2,REFINED:3,RENDERED_AND_KICKED:6,REFINED_AND_KICKED:7,CULLED_BUT_NEEDED:9,wasKicked:function(e){return e>=RFe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},pi=RFe;function OP(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}OP.prototype.update=function(e,t,n){this.changedThisFrame&&(kFe(e,t,this.tile,n),this.changedThisFrame=!1)};OP.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};OP.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):wh._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var ikt=new dA;OP.updateFillTiles=function(e,t,n,i){let r=e._quadtree,o=r._levelZeroTiles,s=r._lastSelectionFrameNumber,a=ikt;a.clear();for(let u=0;u<t.length;++u){let f=t[u];l(f.data.vertexArray)&&a.enqueue(t[u])}let c=a.dequeue();for(;c!==void 0;){let u=c.findTileToWest(o),f=c.findTileToSouth(o),d=c.findTileToEast(o),p=c.findTileToNorth(o);Ra(e,n,c,u,s,wn.EAST,!1,a,i),Ra(e,n,c,f,s,wn.NORTH,!1,a,i),Ra(e,n,c,d,s,wn.WEST,!1,a,i),Ra(e,n,c,p,s,wn.SOUTH,!1,a,i);let g=u.findTileToNorth(o),m=u.findTileToSouth(o),y=d.findTileToNorth(o),A=d.findTileToSouth(o);Ra(e,n,c,g,s,wn.SOUTHEAST,!1,a,i),Ra(e,n,c,y,s,wn.SOUTHWEST,!1,a,i),Ra(e,n,c,m,s,wn.NORTHEAST,!1,a,i),Ra(e,n,c,A,s,wn.NORTHWEST,!1,a,i),c=a.dequeue()}};function Ra(e,t,n,i,r,o,s,a,c){if(i===void 0)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==r||pi.wasKicked(u._lastSelectionResult)||pi.originalResult(u._lastSelectionResult)===pi.CULLED);){if(s)return;let f=u.parent;if(o>=wn.NORTHWEST&&f!==void 0)switch(o){case wn.NORTHWEST:u=u===f.northwestChild?f:void 0;break;case wn.NORTHEAST:u=u===f.northeastChild?f:void 0;break;case wn.SOUTHWEST:u=u===f.southwestChild?f:void 0;break;case wn.SOUTHEAST:u=u===f.southeastChild?f:void 0;break}else u=f}if(u!==void 0){if(u._lastSelectionResult===pi.RENDERED){if(l(u.data.vertexArray))return;rkt(e,t,n,u,o,r,a,c);return}if(pi.originalResult(i._lastSelectionResult)!==pi.CULLED)switch(o){case wn.WEST:Ra(e,t,n,i.northwestChild,r,o,!0,a,c),Ra(e,t,n,i.southwestChild,r,o,!0,a,c);break;case wn.EAST:Ra(e,t,n,i.southeastChild,r,o,!0,a,c),Ra(e,t,n,i.northeastChild,r,o,!0,a,c);break;case wn.SOUTH:Ra(e,t,n,i.southwestChild,r,o,!0,a,c),Ra(e,t,n,i.southeastChild,r,o,!0,a,c);break;case wn.NORTH:Ra(e,t,n,i.northeastChild,r,o,!0,a,c),Ra(e,t,n,i.northwestChild,r,o,!0,a,c);break;case wn.NORTHWEST:Ra(e,t,n,i.northwestChild,r,o,!0,a,c);break;case wn.NORTHEAST:Ra(e,t,n,i.northeastChild,r,o,!0,a,c);break;case wn.SOUTHWEST:Ra(e,t,n,i.southwestChild,r,o,!0,a,c);break;case wn.SOUTHEAST:Ra(e,t,n,i.southeastChild,r,o,!0,a,c);break;default:throw new pe("Invalid edge")}}}function rkt(e,t,n,i,r,o,s,a){let c=i.data;if(c.fill===void 0)c.fill=new OP(i);else if(c.fill.visitedFrame===o)return;c.fill.enqueuedFrame!==o&&(c.fill.enqueuedFrame=o,c.fill.changedThisFrame=!1,s.enqueue(i)),okt(e,t,n,i,r,a)}function okt(e,t,n,i,r,o){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(kFe(e,t,n,o),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let u,f;switch(r){case wn.WEST:u=s.westMeshes,f=s.westTiles;break;case wn.SOUTH:u=s.southMeshes,f=s.southTiles;break;case wn.EAST:u=s.eastMeshes,f=s.eastTiles;break;case wn.NORTH:u=s.northMeshes,f=s.northTiles;break;case wn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case wn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case wn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case wn.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||u[0]!==a||u.length!==1,u[0]=a,f[0]=n,u.length=1,f.length=1;return}let d,p,g,m,y=n.rectangle,A,b=i.rectangle;switch(r){case wn.WEST:for(A=(b.north-b.south)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.greaterThan(y.north,m.south,A));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(y.south,m.north,A));++p);break;case wn.SOUTH:for(A=(b.east-b.west)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.lessThan(y.west,m.east,A));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(y.east,m.west,A));++p);break;case wn.EAST:for(A=(b.north-b.south)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.lessThan(y.south,m.north,A));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(y.north,m.south,A));++p);break;case wn.NORTH:for(A=(b.east-b.west)*D.EPSILON5,d=0;d<f.length&&(g=f[d],m=g.rectangle,!D.greaterThan(y.east,m.west,A));++d);for(p=d;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(y.west,m.east,A));++p);break}p-d===1?(s.changedThisFrame=s.changedThisFrame||u[d]!==a,u[d]=a,f[d]=n):(s.changedThisFrame=!0,u.splice(d,p-d,a),f.splice(d,p-d,n))}var vC=new he,skt=new he,RP=new h,xae=new h,yae=new U,Aae=new U,pd=new U;function fW(){this.height=0,this.encodedNormal=new U}function oW(e,t,n,i,r,o,s,a,c){if(l(r))return r;let u;if(l(o)&&l(s))u=(o.height+s.height)*.5;else if(l(o))u=o.height;else if(l(s))u=s.height;else if(l(a))u=a.height;else{let d=e.tile.data.tileBoundingRegion,p=0,g=0;l(d)&&(p=d.minimumHeight,g=d.maximumHeight),u=(p+g)*.5}return UFe(e,t,n,i,u,c),c}var akt={minimumHeight:0,maximumHeight:0},ckt=new h,OFe=new fW,MFe=new fW,NFe=new fW,LFe=new fW,lkt=typeof Uint8Array<"u"?new Uint8Array(81):void 0,ukt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function kFe(e,t,n,i){wh.initialize(n,e.terrainProvider,e.vectorProvider,e._imageryLayers);let r=n.data,o=r.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,u=a!==1,f=n.tilingScheme.ellipsoid,d=aW(o,f,0,1,o.northwestTile,o.northwestMesh,o.northTiles,o.northMeshes,o.westTiles,o.westMeshes,NFe),p=aW(o,f,0,0,o.southwestTile,o.southwestMesh,o.westTiles,o.westMeshes,o.southTiles,o.southMeshes,OFe),g=aW(o,f,1,0,o.southeastTile,o.southeastMesh,o.southTiles,o.southMeshes,o.eastTiles,o.eastMeshes,MFe),m=aW(o,f,1,1,o.northeastTile,o.northeastMesh,o.eastTiles,o.eastMeshes,o.northTiles,o.northMeshes,LFe);d=oW(o,f,0,1,d,p,m,g,NFe),p=oW(o,f,0,0,p,d,g,m,OFe),g=oW(o,f,1,1,g,p,m,d,MFe),m=oW(o,f,1,1,m,g,d,p,LFe);let y=p.height,A=g.height,b=d.height,x=m.height,T=Math.min(y,A,b,x),E=Math.max(y,A,b,x),v=(T+E)*.5,S,I,R=e.getLevelMaximumGeometricError(n.level),O=f.maximumRadius-R,L=Math.acos(O/f.maximumRadius)*4;if(L*=1.5,s.width>L&&E-T<=R){let w=new jc({width:9,height:9,buffer:lkt,structure:{heightOffset:E}}),P=ukt;P.tilingScheme=n.tilingScheme,P.x=n.x,P.y=n.y,P.level=n.level,P.exaggeration=a,P.exaggerationRelativeHeight=c,o.mesh=w._createMeshSync(P)}else{let w=u,P=ie.center(s,skt);P.height=v;let M=f.cartographicToCartesian(P,ckt),F=new Co(M,void 0,void 0,void 0,void 0,!0,!0,w,a,c),V=5,B;for(B=o.westMeshes,S=0,I=B.length;S<I;++S)V+=B[S].eastIndicesNorthToSouth.length;for(B=o.southMeshes,S=0,I=B.length;S<I;++S)V+=B[S].northIndicesWestToEast.length;for(B=o.eastMeshes,S=0,I=B.length;S<I;++S)V+=B[S].westIndicesSouthToNorth.length;for(B=o.northMeshes,S=0,I=B.length;S<I;++S)V+=B[S].southIndicesEastToWest.length;let j=akt;j.minimumHeight=T,j.maximumHeight=E;let k=F.stride,G=new Float32Array(V*k),q=0,Q=q;q=sW(f,s,F,G,q,0,1,d.height,d.encodedNormal,1,j),q=lW(o,f,F,G,q,o.westTiles,o.westMeshes,wn.EAST,j);let W=q;q=sW(f,s,F,G,q,0,0,p.height,p.encodedNormal,0,j),q=lW(o,f,F,G,q,o.southTiles,o.southMeshes,wn.NORTH,j);let J=q;q=sW(f,s,F,G,q,1,0,g.height,g.encodedNormal,0,j),q=lW(o,f,F,G,q,o.eastTiles,o.eastMeshes,wn.WEST,j);let Z=q;q=sW(f,s,F,G,q,1,1,m.height,m.encodedNormal,1,j),q=lW(o,f,F,G,q,o.northTiles,o.northMeshes,wn.SOUTH,j),T=j.minimumHeight,E=j.maximumHeight;let ae=Qt.fromRectangle(s,T,E,n.tilingScheme.ellipsoid),Ae=yi.geodeticLatitudeToMercatorAngle(s.south),fe=1/(yi.geodeticLatitudeToMercatorAngle(s.north)-Ae),xe=(yi.geodeticLatitudeToMercatorAngle(P.latitude)-Ae)*fe,ge=f.geodeticSurfaceNormalCartographic(vC,xae),we=cn.octEncode(ge,yae),Se=q;F.encode(G,q*k,ae.center,U.fromElements(.5,.5,pd),v,we,xe,ge),++q;let Re=q,Qe=Re<256?1:2,He=(Re-1)*3,Xe=He*Qe,$e=(G.length-Re*k)*Float32Array.BYTES_PER_ELEMENT,Pe;if($e>=Xe){let mt=Re*k*Float32Array.BYTES_PER_ELEMENT;Pe=Re<256?new Uint8Array(G.buffer,mt,He):new Uint16Array(G.buffer,mt,He)}else Pe=Re<256?new Uint8Array(He):new Uint16Array(He);G=new Float32Array(G.buffer,0,Re*k);let qe=0;for(S=0;S<Re-2;++S)Pe[qe++]=Se,Pe[qe++]=S,Pe[qe++]=S+1;Pe[qe++]=Se,Pe[qe++]=S,Pe[qe]=0;let st=[];for(S=W;S>=Q;--S)st.push(S);let vt=[];for(S=J;S>=W;--S)vt.push(S);let Gt=[];for(S=Z;S>=J;--S)Gt.push(S);let lt=[];for(lt.push(0),S=Se-1;S>=Z;--S)lt.push(S);o.mesh=new bc(F.center,G,Pe,He,Re,T,E,s,ue.fromOrientedBoundingBox(ae),_kt(e,ae.center,s,T,E),F.stride,ae,F,st,vt,Gt,lt)}let _=t.context;o._destroyVertexArray(i),o.vertexArray=wh._createVertexArrayForMesh(_,o.mesh),r.processImagery(n,e.terrainProvider,t,!0);let C=o.waterMaskTexture;if(o.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let w=r._findAncestorTileWithTerrainData(n);l(w)&&l(w.data.waterMaskTexture)&&(o.waterMaskTexture=w.data.waterMaskTexture,++o.waterMaskTexture.referenceCount,r._computeWaterMaskTranslationAndScale(n,w,o.waterMaskTranslationAndScale))}l(C)&&(--C.referenceCount,C.referenceCount===0&&C.destroy())}function sW(e,t,n,i,r,o,s,a,c,u,f){let d=vC;d.longitude=D.lerp(t.west,t.east,o),d.latitude=D.lerp(t.south,t.north,s),d.height=a;let p=e.cartographicToCartesian(d,RP),g;n.hasGeodeticSurfaceNormals&&(g=e.geodeticSurfaceNormal(p,xae));let m=Aae;return m.x=o,m.y=s,n.encode(i,r*n.stride,p,m,a,c,u,g),f.minimumHeight=Math.min(f.minimumHeight,a),f.maximumHeight=Math.max(f.maximumHeight,a),r+1}var uW=new ie;function AV(e,t,n,i){let r=e.rectangle,o=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(r=ie.clone(e.rectangle,uW),r.west-=D.TWO_PI,r.east-=D.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(r=ie.clone(e.rectangle,uW),r.west+=D.TWO_PI,r.east+=D.TWO_PI);let s=r.east-r.west,a=(o.west-r.west)/s,c=(o.east-r.west)/s,u=r.north-r.south,f=(o.south-r.south)/u,d=(o.north-r.south)/u,p=(n.x-a)/(c-a),g=(n.y-f)/(d-f);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(g)<Math.EPSILON5?g=0:Math.abs(g-1)<Math.EPSILON5&&(g=1),i.x=p,i.y=g,i}var fkt=new U;function bae(e,t,n,i,r){let o=e.encoding,s=e.vertices;if(r.height=o.decodeHeight(s,t),o.hasVertexNormals)o.getOctEncodedNormal(s,t,r.encodedNormal);else{let a=r.encodedNormal;a.x=0,a.y=0}}var dkt=new U,hkt=new h;function mkt(e,t,n,i,r,o,s,a,c,u){let f=i.encoding,d=i.vertices,p=AV(t,n,f.decodeTextureCoordinates(d,r,pd),pd),g=AV(t,n,f.decodeTextureCoordinates(d,o,Aae),Aae),m;c?m=(s-p.x)/(g.x-p.x):m=(a-p.y)/(g.y-p.y);let y=f.decodeHeight(d,r),A=f.decodeHeight(d,o),b=n.rectangle;vC.longitude=D.lerp(b.west,b.east,s),vC.latitude=D.lerp(b.south,b.north,a),u.height=vC.height=D.lerp(y,A,m);let x;if(f.hasVertexNormals){let T=f.getOctEncodedNormal(d,r,fkt),E=f.getOctEncodedNormal(d,o,dkt),v=cn.octDecode(T.x,T.y,RP),S=cn.octDecode(E.x,E.y,hkt);x=h.lerp(v,S,m,RP),h.normalize(x,x),cn.octEncode(x,u.encodedNormal)}else x=e.geodeticSurfaceNormalCartographic(vC,RP),cn.octEncode(x,u.encodedNormal)}function UFe(e,t,n,i,r,o){o.height=r;let s=t.geodeticSurfaceNormalCartographic(vC,RP);cn.octEncode(s,o.encodedNormal)}function aW(e,t,n,i,r,o,s,a,c,u,f){if(BFe(e,t,a,s,!1,n,i,f)||BFe(e,t,u,c,!0,n,i,f))return f;let p;if(Tae(r,o))return n===0?i===0?p=o.eastIndicesNorthToSouth[0]:p=o.southIndicesEastToWest[0]:i===0?p=o.northIndicesWestToEast[0]:p=o.westIndicesSouthToNorth[0],bae(o,p,n,i,f),f;let g;if(n===0?i===0?g=cW(e.westMeshes,e.westTiles,wn.EAST,e.southMeshes,e.southTiles,wn.NORTH,n,i):g=cW(e.northMeshes,e.northTiles,wn.SOUTH,e.westMeshes,e.westTiles,wn.EAST,n,i):i===0?g=cW(e.southMeshes,e.southTiles,wn.NORTH,e.eastMeshes,e.eastTiles,wn.WEST,n,i):g=cW(e.eastMeshes,e.eastTiles,wn.WEST,e.northMeshes,e.northTiles,wn.SOUTH,n,i),l(g))return UFe(e,t,n,i,g,f),f}function cW(e,t,n,i,r,o,s,a){let c=FFe(e,t,!1,n,s,a),u=FFe(i,r,!0,o,s,a);return l(c)&&l(u)?(c+u)*.5:l(c)?c:u}function lW(e,t,n,i,r,o,s,a,c){for(let u=0;u<o.length;++u)r=pkt(e,t,n,i,r,o[u],s[u],a,c);return r}function pkt(e,t,n,i,r,o,s,a,c){let u;a===wn.EAST&&e.tile.x===0?(u=ie.clone(o.rectangle,uW),u.west-=D.TWO_PI,u.east-=D.TWO_PI):a===wn.WEST&&o.x===0&&(u=ie.clone(o.rectangle,uW),u.west+=D.TWO_PI,u.east+=D.TWO_PI);let f=e.tile.rectangle,d,p;r>0&&(n.decodeTextureCoordinates(i,r-1,pd),d=pd.x,p=pd.y);let g,m;switch(a){case wn.WEST:g=s.westIndicesSouthToNorth,m=!1;break;case wn.NORTH:g=s.northIndicesWestToEast,m=!0;break;case wn.EAST:g=s.eastIndicesNorthToSouth,m=!1;break;case wn.SOUTH:g=s.southIndicesEastToWest,m=!0;break}let y=o,A=e.tile,b=s.encoding,x=s.vertices,T=n.stride,E,v;b.hasWebMercatorT&&(E=yi.geodeticLatitudeToMercatorAngle(f.south),v=1/(yi.geodeticLatitudeToMercatorAngle(f.north)-E));for(let S=0;S<g.length;++S){let I=g[S],R=b.decodeTextureCoordinates(x,I,pd);AV(y,A,R,R);let O=R.x,L=R.y,_=m?O:L;if(_<0||_>1||Math.abs(O-d)<D.EPSILON5&&Math.abs(L-p)<D.EPSILON5)continue;let C=Math.abs(O)<D.EPSILON5||Math.abs(O-1)<D.EPSILON5,w=Math.abs(L)<D.EPSILON5||Math.abs(L-1)<D.EPSILON5;if(C&&w)continue;let P=b.decodePosition(x,I,RP),M=b.decodeHeight(x,I),F;b.hasVertexNormals?F=b.getOctEncodedNormal(x,I,yae):(F=yae,F.x=0,F.y=0);let V=L;if(b.hasWebMercatorT){let j=D.lerp(f.south,f.north,L);V=(yi.geodeticLatitudeToMercatorAngle(j)-E)*v}let B;n.hasGeodeticSurfaceNormals&&(B=t.geodeticSurfaceNormal(P,xae)),n.encode(i,r*T,P,R,M,F,V,B),c.minimumHeight=Math.min(c.minimumHeight,M),c.maximumHeight=Math.max(c.maximumHeight,M),++r}return r}function FFe(e,t,n,i,r,o){let s,a,c;n?(s=0,a=e.length,c=1):(s=e.length-1,a=-1,c=-1);for(let u=s;u!==a;u+=c){let f=e[u],d=t[u];if(!Tae(d,f))continue;let p;switch(i){case wn.WEST:p=f.westIndicesSouthToNorth;break;case wn.SOUTH:p=f.southIndicesEastToWest;break;case wn.EAST:p=f.eastIndicesNorthToSouth;break;case wn.NORTH:p=f.northIndicesWestToEast;break}let g=p[n?0:p.length-1];if(l(g))return f.encoding.decodeHeight(f.vertices,g)}}function Tae(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function BFe(e,t,n,i,r,o,s,a){let c,u,f,d,p,g=i[r?0:n.length-1],m=n[r?0:n.length-1];if(Tae(g,m)&&(o===0?s===0?(c=r?m.northIndicesWestToEast:m.eastIndicesNorthToSouth,u=r,f=r):(c=r?m.eastIndicesNorthToSouth:m.southIndicesEastToWest,u=!r,f=!1):s===0?(c=r?m.westIndicesSouthToNorth:m.northIndicesWestToEast,u=!r,f=!0):(c=r?m.southIndicesEastToWest:m.westIndicesSouthToNorth,u=r,f=!r),c.length>0)){d=r?0:c.length-1,p=c[d],m.encoding.decodeTextureCoordinates(m.vertices,p,pd);let y=AV(g,e.tile,pd,pd);if(y.x===o&&y.y===s)return bae(m,p,o,s,a),!0;if(d=vr(c,u?o:s,function(A,b){m.encoding.decodeTextureCoordinates(m.vertices,A,pd);let x=AV(g,e.tile,pd,pd);return f?u?x.x-o:x.y-s:u?o-x.x:s-x.y}),d<0){if(d=~d,d>0&&d<c.length)return mkt(t,g,e.tile,m,c[d-1],c[d],o,s,u,a),!0}else return bae(m,c[d],o,s,a),!0}return!1}var gkt=[new h,new h,new h,new h];function _kt(e,t,n,i,r,o){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=gkt;return h.fromRadians(n.west,n.south,r,a,c[0]),h.fromRadians(n.east,n.south,r,a,c[1]),h.fromRadians(n.west,n.north,r,a,c[2]),h.fromRadians(n.east,n.north,r,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,o)}var MP=OP;var Eae=class e{constructor(t){this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.showWaterEffect=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=Dn.RECEIVE_ONLY,this.vertexShadowDarkness=.3,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=t.terrainProvider,this._vectorProvider=t.vectorProvider,this._imageryLayers=t.imageryLayers,this._surfaceShaderSet=t.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new be,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(e.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(e.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(e.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(e.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new be,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0,tilesRendered:0,texturesRendered:0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new z(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this._clippingPolygonsDirty=!1,this._removeClippingPolygonAdded=void 0,this._removeClippingPolygonRemoved=void 0,this.cartographicLimitRectangle=ie.clone(ie.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0,this._oldSceneMode=re.SCENE3D}get baseColor(){return this._baseColor}set baseColor(t){this._baseColor=t,this._firstPassInitialColor=se.fromColor(t,this._firstPassInitialColor)}get quadtree(){return this._quadtree}set quadtree(t){this._quadtree=t}get tilingScheme(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}get errorEvent(){return this._errorEvent}get imageryLayersUpdatedEvent(){return this._imageryLayersUpdatedEvent}get terrainProvider(){return this._terrainProvider}set terrainProvider(t){this._terrainProvider!==t&&(this._terrainProvider=t,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}get vectorProvider(){return this._vectorProvider}get clippingPlanes(){return this._clippingPlanes}set clippingPlanes(t){bs.setOwner(t,this,"_clippingPlanes")}get clippingPolygons(){return this._clippingPolygons}set clippingPolygons(t){if(t===this._clippingPolygons||(Mc.setOwner(t,this,"_clippingPolygons"),this._removeClippingPolygonAdded=this._removeClippingPolygonAdded&&this._removeClippingPolygonAdded(),this._removeClippingPolygonRemoved=this._removeClippingPolygonRemoved&&this._removeClippingPolygonRemoved(),this._clippingPolygonsDirty=!0,!l(t)))return;let n=()=>{this._clippingPolygonsDirty=!0};this._removeClippingPolygonAdded=t.polygonAdded.addEventListener(n),this._removeClippingPolygonRemoved=t.polygonRemoved.addEventListener(n)}update(t){this._imageryLayers._update()}initialize(t){this._imageryLayers.queueReprojectionCommands(t),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(o){o.data.imagery.sort(bkt)}));let n=this._vectorProvider;n.minimumTileScreenPixels=Akt(this),n.update(t.frameNumber),this._quadtree.forEachRenderedTile(o=>{let s=o.data;l(s.vectorData)?s.vectorData=n.updateTileData(o.x,o.y,o.level,t.context,s.vectorData,We.CLAMP_TO_TERRAIN):s.vectorData=n.requestTileData(o.x,o.y,o.level,t.context,We.CLAMP_TO_TERRAIN)}),n.makeClean(),Ckt(this,t);let i=this._vertexArraysToDestroy,r=i.length;for(let o=0;o<r;++o)wh._freeVertexArray(i[o]);i.length=0}beginUpdate(t){let n=this._tilesToRenderByTextureCount;for(let o=0,s=n.length;o<s;++o){let a=n[o];l(a)&&(a.length=0)}let i=this._clippingPlanes;l(i)&&i.enabled&&i.update(t);let r=this._clippingPolygons;l(r)&&r.enabled&&r.update(t),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1}endUpdate(t){if(!l(this._renderState)){this._renderState=Ge.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:ac.LESS}}),this._blendRenderState=Ge.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:ac.LESS_OR_EQUAL},blending:tn.ALPHA_BLEND});let c=Je(this._renderState,!0);c.cull.enabled=!1,this._disableCullingRenderState=Ge.fromCache(c),c=Je(this._blendRenderState,!0),c.cull.enabled=!1,this._disableCullingBlendRenderState=Ge.fromCache(c)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&MP.updateFillTiles(this,this._quadtree._tilesToRender,t,this._vertexArraysToDestroy);let n=this.quadtree,i=t.verticalExaggeration,r=t.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==i||this._oldVerticalExaggerationRelativeHeight!==r;this._oldVerticalExaggeration=i,this._oldVerticalExaggerationRelativeHeight=r,o&&n.forEachLoadedTile(function(c){c.data.updateExaggeration(c,t,n)});let s=this._oldSceneMode!==t.mode;this._oldSceneMode=t.mode,s&&n.forEachLoadedTile(function(c){c.data.updateSceneMode(t.mode)}),this._clippingPolygonsDirty&&xkt(this);let a=this._tilesToRenderByTextureCount;for(let c=0,u=a.length;c<u;++c){let f=a[c];if(l(f))for(let d=0,p=f.length;d<p;++d){let g=f[d],m=g.data;Tkt(this,g,m,t);let y=m.tileBoundingRegion;Xkt(this,g,t),t.minimumTerrainHeight=Math.min(t.minimumTerrainHeight,y.minimumHeight)}}}updateForPick(t){let n=this._drawCommands;for(let i=0,r=this._usedDrawCommands;i<r;++i){let o=n[i];o.dirty=!0,o.derivedCommands.picking=void 0;let s=o.derivedCommands.logDepth?.command;l(s)&&(s.derivedCommands.picking=void 0),GFe(o,t)}}cancelReprojections(){this._imageryLayers.cancelReprojections()}getLevelMaximumGeometricError(t){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(t):0}loadTile(t,n){let i=n.data,r=!0,o;l(i)&&(r=i.boundingVolumeSourceTile!==n||n._lastSelectionResult===pi.CULLED_BUT_NEEDED,o=i.terrainState),wh.processStateMachine(n,t,this.terrainProvider,this.vectorProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,r),i=n.data,r&&o!==i.terrainState&&this.computeTileVisibility(n,t,this.quadtree.occluders)!==$o.NONE&&i.boundingVolumeSourceTile===n&&(r=!1,wh.processStateMachine(n,t,this.terrainProvider,this.vectorProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,r))}computeTileVisibility(t,n,i){let r=this.computeDistanceToTile(t,n);t._distance=r;let o=qFe(this,n);if(n.fog.enabled&&!o&&D.fog(r,n.fog.density)>=1)return $o.NONE;let s=t.data,a=s.tileBoundingRegion;if(s.boundingVolumeSourceTile===void 0)return $o.PARTIAL;let c=n.cullingVolume,u=a.boundingVolume;l(u)||(u=a.boundingSphere),s.clippedByBoundaries=!1;let f=hW(t.rectangle,this.cartographicLimitRectangle),d=ie.simpleIntersection(f,t.rectangle,WFe);if(!l(d))return $o.NONE;if(ie.equals(d,t.rectangle)||(s.clippedByBoundaries=!0),n.mode!==re.SCENE3D&&(u=vkt,ue.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,a.minimumHeight,a.maximumHeight,u),h.fromElements(u.center.z,u.center.x,u.center.y,u.center),n.mode===re.MORPHING&&l(s.renderedMesh)&&(u=ue.union(a.boundingSphere,u,u))),!l(u))return $o.PARTIAL;let p=this._clippingPlanes;if(l(p)&&p.enabled){let b=p.computeIntersectionWithBoundingVolume(u);if(t.isClipped=b!==$t.INSIDE,b===$t.OUTSIDE)return $o.NONE}let g=this._clippingPolygons;if(l(g)&&g.enabled){let b=g.computeIntersectionWithBoundingVolume(a);t.isClipped=b!==$t.OUTSIDE}let m,y=c.computeVisibility(u);if(y===$t.OUTSIDE?m=$o.NONE:y===$t.INTERSECTING?m=$o.PARTIAL:y===$t.INSIDE&&(m=$o.FULL),m===$o.NONE)return m;let A=n.mode===re.SCENE3D&&n.camera.frustum instanceof gn;if(n.mode===re.SCENE3D&&!A&&l(i)&&!o){let b=s.occludeePointInScaledSpace;return!l(b)||i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(b,a.minimumHeight)?m:$o.NONE}return m}canRefine(t){let n=t.data;return l(n.terrainData)?!0:this.terrainProvider.getTileDataAvailable(t.x*2,t.y*2,t.level+1)!==void 0}canRenderWithoutLosingDetail(t){let n=t.data,i=Ikt;i.length=this._imageryLayers.length;let r=!1,o=!1,s;l(n)&&(r=n.terrainState===kr.READY,o=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=o;if(l(s))for(a=0,c=s.length;a<c;++a){let d=s[a],p=d.loadingImagery,g=!l(p)||p.state===Vn.FAILED||p.state===Vn.INVALID,m=(d.loadingImagery||d.readyImagery).imageryLayer._layerIndex;i[m]=g&&i[m]}let u=this.quadtree._lastSelectionFrameNumber,f=Pkt;for(f.length=0,f.push(t.southwestChild,t.southeastChild,t.northwestChild,t.northeastChild);f.length>0;){let d=f.pop(),p=d._lastSelectionResultFrame===u?d._lastSelectionResult:pi.NONE;if(p===pi.RENDERED){let g=d.data;if(!l(g))continue;if(!r&&d.data.terrainState===kr.READY)return!1;let m=d.data.imagery;for(a=0,c=m.length;a<c;++a){let y=m[a],A=y.loadingImagery,b=!l(A)||A.state===Vn.FAILED||A.state===Vn.INVALID,x=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(b&&!i[x])return!1}}else p===pi.REFINED&&f.push(d.southwestChild,d.southeastChild,d.northwestChild,d.northeastChild)}return!0}computeTileLoadPriority(t,n){let i=t.data;if(i===void 0)return 0;let r=i.tileBoundingRegion.boundingVolume;if(r===void 0)return 0;let o=n.camera.positionWC,s=n.camera.directionWC,a=h.subtract(r.center,o,Dkt),c=h.magnitude(a);return c<D.EPSILON5?0:(h.divideByScalar(a,c,a),(1-h.dot(a,s))*t._distance)}showTileThisFrame(t,n){let i=0,r=t.data,o=r.imagery;for(let c=0,u=o.length;c<u;++c){let f=o[c];l(f.readyImagery)&&f.readyImagery.imageryLayer.alpha!==0&&++i}let s=this._tilesToRenderByTextureCount[i];l(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(t),l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let a=this._debug;++a.tilesRendered,a.texturesRendered+=i}computeDistanceToTile(t,n){kkt(t,this,n);let i=t.data;if(i.boundingVolumeSourceTile===void 0)return 9999999999;let o=i.tileBoundingRegion,s=o.minimumHeight,a=o.maximumHeight;if(i.boundingVolumeSourceTile!==t){let u=n.camera.positionCartographic.height,f=Math.abs(u-s),d=Math.abs(u-a);f>d?(o.minimumHeight=s,o.maximumHeight=s):(o.minimumHeight=a,o.maximumHeight=a)}let c=o.distanceToCamera(n);return o.minimumHeight=s,o.maximumHeight=a,c}isDestroyed(){return!1}destroy(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=void 0,this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),this._removeClippingPolygonAdded=this._removeClippingPolygonAdded&&this._removeClippingPolygonAdded(),this._removeClippingPolygonRemoved=this._removeClippingPolygonRemoved&&this._removeClippingPolygonRemoved(),le(this)}_onLayerAdded(t,n){if(!this.isDestroyed()&&t.show){let i=this._terrainProvider,r=this,o=this._imageryLayersUpdatedEvent,s=function(){t._imageryCache={},r._quadtree.forEachLoadedTile(function(a){if(l(a._loadedCallbacks[t._layerIndex]))return;let c,u=a.data.imagery,f=u.length,d=-1,p=0;for(c=0;c<f;++c){let m=u[c];if((m.readyImagery??m.loadingImagery).imageryLayer===t)d===-1&&(d=c),++p;else if(d!==-1)break}if(d===-1)return;let g=d+p;t._createTileImagerySkeletons(a,i,g)&&(a._loadedCallbacks[t._layerIndex]=Ukt(p,t,i),a.state=Qa.LOADING)})};if(t.ready){let a=t.imageryProvider;a._reload=s}this._quadtree.forEachLoadedTile(function(a){t._createTileImagerySkeletons(a,i)&&(a.state=Qa.LOADING,a.level!==0&&(a._lastSelectionResultFrame!==r.quadtree._lastSelectionFrameNumber||a._lastSelectionResult!==pi.RENDERED)&&(a.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}}_onLayerRemoved(t,n){this._quadtree.forEachLoadedTile(function(i){let r=i.data.imagery,o=-1,s=0;for(let a=0,c=r.length;a<c;++a){let u=r[a],f=u.loadingImagery;if(l(f)||(f=u.readyImagery),f.imageryLayer===t)o===-1&&(o=a),u.freeResources(),++s;else if(o!==-1)break}o!==-1&&r.splice(o,s)}),l(t.imageryProvider)&&(t.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()}_onLayerMoved(t,n,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()}_onLayerShownOrHidden(t,n,i){i?this._onLayerAdded(t,n):this._onLayerRemoved(t,n)}},ykt=new ie;function Akt(e){let t=e.getLevelMaximumGeometricError(0);if(t<=0)return e._vectorProvider.minimumTileScreenPixels;let n=e.tilingScheme;return n.tileXYToRectangle(0,0,0,ykt).width*n.ellipsoid.maximumRadius/t*e._quadtree.maximumScreenSpaceError/2}function bkt(e,t){let n=e.loadingImagery;l(n)||(n=e.readyImagery);let i=t.loadingImagery;return l(i)||(i=t.readyImagery),n.imageryLayer._layerIndex-i.imageryLayer._layerIndex}function xkt(e){e._quadtree.forEachLoadedTile(function(t){let n=t.data;l(n?.clippingPolygonData)&&(Mc.releaseRectangleData(n.clippingPolygonData),n.clippingPolygonData=void 0)}),e._clippingPolygonsDirty=!1}function Tkt(e,t,n,i){let r=e._clippingPolygons;!l(r)||!r.enabled||!t.isClipped||l(n.clippingPolygonData)||(n.clippingPolygonData=r.requestRectangleData(t.rectangle,i.context))}function Ekt(e,t){let n=e._clippingPolygons;return l(n)&&n.enabled&&n.length>0&&n.inverse&&(t.clippingPolygonData?.polygonRings.length??0)===0}function Ckt(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let r=e._imageryLayers;for(let o=0,s=r.length;o<s;++o){let a=r.get(o);a.ready&&a.show&&l(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}function GFe(e,t){let n=t.globeTranslucencyState;if(n.translucent){let i=e.renderState.blending.enabled;n.pushDerivedCommands(e,i,t)}else t.commandList.push(e)}var vkt=new ue,WFe=new ie,Skt=new ie,wkt=new he;function hW(e,t){if(t.west<t.east)return t;let n=ie.clone(t,Skt);return ie.center(e,wkt).longitude>0?n.east=D.PI:n.west=-D.PI,n}function qFe(e,t){if(t.cameraUnderground||t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;let n=e._clippingPlanes;if(l(n)&&n.enabled)return!0;let i=e._clippingPolygons;return!!(l(i)&&i.enabled||!ie.equals(e.cartographicLimitRectangle,ie.MAX_VALUE))}var Ikt=[],Pkt=[],Dkt=new h,zFe=new N,dW=new N,Rkt=new se,Okt=new se,Mkt=new se,Nkt=new h,VFe=new h,Lkt=new h,Fkt=new h,Bkt=[new h,new h,new h,new h];function jFe(e,t,n,i,r,o){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=Bkt;return h.fromRadians(n.west,n.south,r,a,c[0]),h.fromRadians(n.east,n.south,r,a,c[1]),h.fromRadians(n.west,n.north,r,a,c[2]),h.fromRadians(n.east,n.north,r,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,o)}function kkt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new wh);let r=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new qf({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:r,minimumHeight:0,maximumHeight:0}));let o=i.tileBoundingRegion,s=o.minimumHeight,a=o.maximumHeight,c=!1,u=e,f=i.mesh,d=i.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0)o.minimumHeight=f.minimumHeight,o.maximumHeight=f.maximumHeight,c=!0;else if(d!==void 0&&d._minimumHeight!==void 0&&d._maximumHeight!==void 0)o.minimumHeight=d._minimumHeight,o.maximumHeight=d._maximumHeight;else{o.minimumHeight=Number.NaN,o.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let g=p.data;if(g!==void 0){let m=g.mesh,y=g.terrainData;if(m!==void 0&&m.minimumHeight!==void 0&&m.maximumHeight!==void 0){o.minimumHeight=m.minimumHeight,o.maximumHeight=m.maximumHeight;break}else if(y!==void 0&&y._minimumHeight!==void 0&&y._maximumHeight!==void 0){o.minimumHeight=y._minimumHeight,o.maximumHeight=y._maximumHeight;break}}p=p.parent}u=p}if(u!==void 0){let p=n.verticalExaggeration,g=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,o.minimumHeight=Ar.getHeight(o.minimumHeight,p,g),o.maximumHeight=Ar.getHeight(o.maximumHeight,p,g)),c)i.boundingVolumeIsFromMesh||(o._orientedBoundingBox=Qt.clone(f.orientedBoundingBox,o._orientedBoundingBox),o._boundingSphere=ue.clone(f.boundingSphere3D,o._boundingSphere),i.occludeePointInScaledSpace=h.clone(f.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=jFe(t,o._orientedBoundingBox.center,e.rectangle,o.minimumHeight,o.maximumHeight,i.occludeePointInScaledSpace)));else{let y=o._orientedBoundingBox===void 0||o._boundingSphere===void 0;(o.minimumHeight!==s||o.maximumHeight!==a||y)&&(o.computeBoundingVolumes(r),i.occludeePointInScaledSpace=jFe(t,o._orientedBoundingBox.center,e.rectangle,o.minimumHeight,o.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}function Ukt(e,t,n){return function(i){let r,o,s=-1,a=i.data.imagery,c=a.length,u;for(u=0;u<c;++u)if(r=a[u],o=r.readyImagery??r.loadingImagery,o.imageryLayer===t){s=u;break}if(s!==-1){let f=s+e;if(r=a[f],o=l(r)?r.readyImagery??r.loadingImagery:void 0,!l(o)||o.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,f);for(u=s;u<f;++u)a[u].freeResources();a.splice(s,e)}return!0}}var zkt=new N,Vkt=new N;function HFe(e,t){let n={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_atmosphereLightIntensity:function(){return this.properties.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return this.properties.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return this.properties.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return this.properties.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return this.properties.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return this.properties.atmosphereMieAnisotropy},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_verticalExaggerationAndRelativeHeight:function(){return this.properties.verticalExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){let i=e.context.uniformState.view,r=N.multiplyByPoint(i,this.properties.rtc,VFe);return N.setTranslation(i,r,zFe),zFe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,r=e.context.uniformState.projection,o=N.multiplyByPoint(i,this.properties.rtc,VFe);return N.setTranslation(i,o,dW),N.multiply(r,dW,dW),dW},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){let i=t._clippingPlanes;return l(i)&&l(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){let i=t._clippingPlanes,r=l(i)?N.multiply(e.context.uniformState.view,i.modelMatrix,zkt):N.IDENTITY;return N.inverseTranspose(r,Vkt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},u_vectorSegmentTexture:function(){return this.properties.vectorSegmentTexture??e.context.defaultTexture},u_vectorWidthTexture:function(){return this.properties.vectorWidthTexture??e.context.defaultTexture},u_vectorColorTexture:function(){return this.properties.vectorColorTexture??e.context.defaultTexture},u_vectorPickColorTexture:function(){return this.properties.vectorPickColorTexture??e.context.defaultTexture},u_vectorSegmentPrimitiveIndicesTexture:function(){return this.properties.vectorSegmentPrimitiveIndicesTexture??e.context.defaultTexture},u_vectorGridCellIndicesTexture:function(){return this.properties.vectorGridCellIndicesTexture??e.context.defaultTexture},u_vectorPolygonEdgeTexture:function(){return this.properties.vectorPolygonEdgeTexture??e.context.defaultTexture},u_vectorPolygonEdgePrimitiveIndicesTexture:function(){return this.properties.vectorPolygonEdgePrimitiveIndicesTexture??e.context.defaultTexture},u_vectorPolygonGridCellIndicesTexture:function(){return this.properties.vectorPolygonGridCellIndicesTexture??e.context.defaultTexture},u_vectorMetersPerUv:function(){return this.properties.vectorMetersPerUv},u_clippingEdgeTexture:function(){return this.properties.clippingEdgeTexture??e.context.defaultTexture},u_clippingEdgePrimitiveIndicesTexture:function(){return this.properties.clippingEdgePrimitiveIndicesTexture??e.context.defaultTexture},u_clippingGridCellIndicesTexture:function(){return this.properties.clippingGridCellIndicesTexture??e.context.defaultTexture},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new z(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new U(65e5,9e6),nightFadeDistance:new U(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new h(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new h(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new h,center3D:void 0,rtc:new h,modifiedModelView:new N,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new U(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new U,southMercatorYAndOneOverHeight:new U,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new U,scaleAndBias:new N,clippingPlanesEdgeColor:z.clone(z.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:z.clone(z.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0,vectorSegmentTexture:void 0,vectorWidthTexture:void 0,vectorColorTexture:void 0,vectorPickColorTexture:void 0,vectorSegmentPrimitiveIndicesTexture:void 0,vectorGridCellIndicesTexture:void 0,vectorPolygonEdgeTexture:void 0,vectorPolygonEdgePrimitiveIndicesTexture:void 0,vectorPolygonGridCellIndicesTexture:void 0,vectorMetersPerUv:new U,clippingEdgeTexture:void 0,clippingEdgePrimitiveIndicesTexture:void 0,clippingGridCellIndicesTexture:void 0}};return l(t.materialUniformMap)?Ot(n,t.materialUniformMap):n}function jkt(e,t){let n=t.data,i,r;if(l(n.vertexArray)?(i=n.mesh,r=n.vertexArray):l(n.fill)&&l(n.fill.vertexArray)&&(i=n.fill.mesh,r=n.fill.vertexArray),!(!l(i)||!l(r))){if(l(n.wireframeVertexArray)){if(n.wireframeVertexArray.mesh===i)return;n.wireframeVertexArray.destroy(),n.wireframeVertexArray=void 0}n.wireframeVertexArray=Hkt(e,r,i),n.wireframeVertexArray.mesh=i}}function Hkt(e,t,n){let r={indices:n.indices,primitiveType:Oe.TRIANGLES};Gn.toWireframe(r);let o=r.indices,s=nt.createIndexBuffer({context:e,typedArray:o,usage:Me.STATIC_DRAW,indexDatatype:je.fromSizeInBytes(o.BYTES_PER_ELEMENT)});return new zn({context:e,attributes:t._attributes,indexBuffer:s})}var YFe,XFe,mW;(function(){let e=new Ft({geometry:Hh.fromDimensions({dimensions:new h(2,2,2)})}),t=new Ft({geometry:new __({radius:1})}),n=new N,i,r;function o(s){return new On({geometryInstances:s,appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1})}YFe=function(s,a){return s===i||(mW(),i=s,n=N.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Jt.fromColor(a),r=o(e)),r},XFe=function(s,a){return s===i||(mW(),i=s,n=N.fromTranslation(s.center,n),n=N.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Jt.fromColor(a),r=o(t)),r},mW=function(){l(r)&&(r.destroy(),r=void 0,i=void 0)}})();var Gkt=new se(0,0,0,0),Wkt={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,enableClippingPolygons:void 0,clippingPolygons:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0,vectorAntialias:void 0},qkt=z.TRANSPARENT,Ykt=new qt;function Xkt(e,t,n){let i=t.data;if(Ekt(e,i))return;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new MP(t)),i.fill.update(e,n));let r=n.creditDisplay,o=i.terrainData;if(l(o)&&l(o.credits)){let mt=o.credits;for(let ft=0,Xt=mt.length;ft<Xt;++ft)r.addCreditToNextFrame(mt[ft])}let s=Ut.maximumTextureImageUnits,a=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(a)&&l(i.fill)&&(a=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let u=n.cameraUnderground,f=n.globeTranslucencyState,d=f.translucent,p=f.frontFaceAlphaByDistance,g=f.backFaceAlphaByDistance,m=f.rectangle,y=e.undergroundColor??qkt,A=e.undergroundColorAlphaByDistance??Ykt,b=qFe(e,n)&&n.mode===re.SCENE3D&&y.alpha>0&&(A.nearValue>0||A.farValue>0),x=e.lambertDiffuseMultiplier,T=e.vertexShadowDarkness,E=e.hasWaterMask&&l(a),v=E&&e.showWaterEffect,S=e.oceanNormalMap,I=v&&l(S),R=e.terrainProvider,O=l(R)&&e.terrainProvider.hasVertexNormals,L=n.fog.enabled&&n.fog.renderable&&!u,_=e.showGroundAtmosphere&&n.mode===re.SCENE3D,C=Dn.castShadows(e.shadows)&&!d,w=Dn.receiveShadows(e.shadows)&&!d,P=e.hueShift,M=e.saturationShift,F=e.brightnessShift,V=!(D.equalsEpsilon(P,0,D.EPSILON7)&&D.equalsEpsilon(M,0,D.EPSILON7)&&D.equalsEpsilon(F,0,D.EPSILON7)),B=!1;if(_){let mt=h.magnitude(n.camera.positionWC),ft=e.nightFadeOutDistance;B=mt>ft}E&&--s,I&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(s-=3),s-=f.numberOfTextureUniforms;let j=i.renderedMesh,k=j.center,G=j.encoding,q=i.tileBoundingRegion,Q=n.verticalExaggeration,W=n.verticalExaggerationRelativeHeight,J=Q!==1,Z=G.hasGeodeticSurfaceNormals,ae=Rkt,Ae=0,fe=0,xe=0,ge=0,we=!1;if(n.mode!==re.SCENE3D){let mt=n.mapProjection,ft=mt.project(ie.southwest(t.rectangle),Lkt),Xt=mt.project(ie.northeast(t.rectangle),Fkt);if(ae.x=ft.x,ae.y=ft.y,ae.z=Xt.x,ae.w=Xt.y,n.mode!==re.MORPHING&&(k=Nkt,k.x=0,k.y=(ae.z+ae.x)*.5,k.z=(ae.w+ae.y)*.5,ae.x-=k.y,ae.y-=k.z,ae.z-=k.y,ae.w-=k.z),n.mode===re.SCENE2D&&G.quantization===$a.BITS12){let rt=1/(Math.pow(2,12)-1)*.5,ht=(ae.z-ae.x)*rt,Bi=(ae.w-ae.y)*rt;ae.x-=ht,ae.y-=Bi,ae.z+=ht,ae.w+=Bi}mt instanceof yi&&(Ae=t.rectangle.south,fe=t.rectangle.north,xe=yi.geodeticLatitudeToMercatorAngle(Ae),ge=1/(yi.geodeticLatitudeToMercatorAngle(fe)-xe),we=!0)}let Se=Wkt;Se.frameState=n,Se.surfaceTile=i,Se.hasWaterMask=E,Se.showReflectiveOcean=v,Se.showOceanWaves=I,Se.enableLighting=e.enableLighting,Se.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Se.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Se.showGroundAtmosphere=_,Se.atmosphereLightIntensity=e.atmosphereLightIntensity,Se.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Se.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Se.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Se.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Se.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Se.perFragmentGroundAtmosphere=B,Se.hasVertexNormals=O,Se.useWebMercatorProjection=we,Se.clippedByBoundaries=i.clippedByBoundaries,Se.hasGeodeticSurfaceNormals=Z,Se.hasExaggeration=J,Se.vectorAntialias=e.vectorProvider.antialias;let Re=i.imagery,Qe=0,He=Re.length,Xe=e.showSkirts&&!u&&!d,$e=e.backFaceCulling&&!u&&!d,Pe=$e?e._renderState:e._disableCullingRenderState,qe=$e?e._blendRenderState:e._disableCullingBlendRenderState,st=Pe,vt=e._firstPassInitialColor,Gt=n.context;if(l(e._debug.boundingSphereTile)||mW(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let mt=e._drawCommands.length;for(let ft=0;ft<mt;++ft)e._uniformMaps[ft]=HFe(n,e)}do{let mt=0,ft,Xt;if(e._drawCommands.length<=e._usedDrawCommands?(ft=new at,ft.owner=t,ft.cull=!1,ft.boundingVolume=new ue,ft.orientedBoundingBox=void 0,Xt=HFe(n,e),e._drawCommands.push(ft),e._uniformMaps.push(Xt)):(ft=e._drawCommands[e._usedDrawCommands],Xt=e._uniformMaps[e._usedDrawCommands]),ft.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let ks=q.boundingVolume,tc=q.boundingSphere;l(ks)?YFe(ks,z.RED).update(n):l(tc)&&XFe(tc,z.RED).update(n)}let rt=Xt.properties;se.clone(vt,rt.initialColor),rt.oceanNormalMap=S,rt.lightingFadeDistance.x=e.lightingFadeOutDistance,rt.lightingFadeDistance.y=e.lightingFadeInDistance,rt.nightFadeDistance.x=e.nightFadeOutDistance,rt.nightFadeDistance.y=e.nightFadeInDistance,rt.atmosphereLightIntensity=e.atmosphereLightIntensity,rt.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,rt.atmosphereMieCoefficient=e.atmosphereMieCoefficient,rt.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,rt.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,rt.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,rt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let ht=u?g:p,Bi=u?p:g;l(ht)&&(se.fromElements(ht.near,ht.nearValue,ht.far,ht.farValue,rt.frontFaceAlphaByDistance),se.fromElements(Bi.near,Bi.nearValue,Bi.far,Bi.farValue,rt.backFaceAlphaByDistance)),se.fromElements(A.near,A.nearValue,A.far,A.farValue,rt.undergroundColorAlphaByDistance),z.clone(y,rt.undergroundColor),rt.lambertDiffuseMultiplier=x,rt.vertexShadowDarkness=T;let Xn=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Xn&&z.clone(e.fillHighlightColor,rt.fillHighlightColor),rt.verticalExaggerationAndRelativeHeight.x=Q,rt.verticalExaggerationAndRelativeHeight.y=W,rt.center3D=j.center,h.clone(k,rt.rtc),se.clone(ae,rt.tileRectangle),rt.southAndNorthLatitude.x=Ae,rt.southAndNorthLatitude.y=fe,rt.southMercatorYAndOneOverHeight.x=xe,rt.southMercatorYAndOneOverHeight.y=ge;let bi=Okt,Wi=hW(t.rectangle,e.cartographicLimitRectangle),wi=Mkt,hi=hW(t.rectangle,m);h.fromElements(P,M,F,rt.hsbShift);let xi=t.rectangle,jn=1/xi.width,nn=1/xi.height;bi.x=(Wi.west-xi.west)*jn,bi.y=(Wi.south-xi.south)*nn,bi.z=(Wi.east-xi.west)*jn,bi.w=(Wi.north-xi.south)*nn,se.clone(bi,rt.localizedCartographicLimitRectangle),wi.x=(hi.west-xi.west)*jn,wi.y=(hi.south-xi.south)*nn,wi.z=(hi.east-xi.west)*jn,wi.w=(hi.north-xi.south)*nn,se.clone(wi,rt.localizedTranslucencyRectangle);let Wn=L&&D.fog(t._distance,n.fog.density)>D.EPSILON3;V=V&&(Wn||_);let Zi=!1,Mr=!1,fo=!1,Bs=!1,Ks=!1,no=!1,gi=!1,ho=!1,ur=!1,Zo=!1;for(;mt<s&&Qe<He;){let ks=Re[Qe],tc=ks.readyImagery;if(++Qe,!l(tc)||tc.imageryLayer.alpha===0)continue;let Kb=ks.useWebMercatorT?tc.textureWebMercator:tc.texture,ri=tc.imageryLayer;l(ks.textureTranslationAndScale)||(ks.textureTranslationAndScale=ri._calculateTextureTranslationAndScale(t,ks)),rt.dayTextures[mt]=Kb,rt.dayTextureTranslationAndScale[mt]=ks.textureTranslationAndScale,rt.dayTextureTexCoordsRectangle[mt]=ks.textureCoordinateRectangle,rt.dayTextureUseWebMercatorT[mt]=ks.useWebMercatorT,rt.dayTextureAlpha[mt]=ri.alpha,no=no||rt.dayTextureAlpha[mt]!==1,rt.dayTextureNightAlpha[mt]=ri.nightAlpha,gi=gi||rt.dayTextureNightAlpha[mt]!==1,rt.dayTextureDayAlpha[mt]=ri.dayAlpha,gi=gi||rt.dayTextureDayAlpha[mt]!==1,rt.dayTextureBrightness[mt]=ri.brightness,Zi=Zi||rt.dayTextureBrightness[mt]!==Ss.DEFAULT_BRIGHTNESS,rt.dayTextureContrast[mt]=ri.contrast,Mr=Mr||rt.dayTextureContrast[mt]!==Ss.DEFAULT_CONTRAST,rt.dayTextureHue[mt]=ri.hue,fo=fo||rt.dayTextureHue[mt]!==Ss.DEFAULT_HUE,rt.dayTextureSaturation[mt]=ri.saturation,Bs=Bs||rt.dayTextureSaturation[mt]!==Ss.DEFAULT_SATURATION,rt.dayTextureOneOverGamma[mt]=1/ri.gamma,Ks=Ks||rt.dayTextureOneOverGamma[mt]!==1/Ss.DEFAULT_GAMMA,rt.dayTextureSplit[mt]=ri.splitDirection,ho=ho||rt.dayTextureSplit[mt]!==0;let Kr=rt.dayTextureCutoutRectangles[mt];if(l(Kr)||(Kr=rt.dayTextureCutoutRectangles[mt]=new se),se.clone(se.ZERO,Kr),l(ri.cutoutRectangle)){let Ma=hW(xi,ri.cutoutRectangle),Ep=ie.simpleIntersection(Ma,xi,WFe);ur=l(Ep)||ur,Kr.x=(Ma.west-xi.west)*jn,Kr.y=(Ma.south-xi.south)*nn,Kr.z=(Ma.east-xi.west)*jn,Kr.w=(Ma.north-xi.south)*nn}let Ol=rt.colorsToAlpha[mt];l(Ol)||(Ol=rt.colorsToAlpha[mt]=new se);let Z0=l(ri.colorToAlpha)&&ri.colorToAlphaThreshold>0;if(Zo=Zo||Z0,Z0){let Ma=ri.colorToAlpha;Ol.x=Ma.red,Ol.y=Ma.green,Ol.z=Ma.blue,Ol.w=ri.colorToAlphaThreshold}else Ol.w=-1;if(l(tc.credits)){let Ma=tc.credits;for(let Ep=0,Cy=Ma.length;Ep<Cy;++Ep)r.addCreditToNextFrame(Ma[Ep])}++mt}rt.dayTextures.length=mt,rt.waterMask=a,se.clone(c,rt.waterMaskTranslationAndScale),rt.minMaxHeight.x=G.minimumHeight,rt.minMaxHeight.y=G.maximumHeight,N.clone(G.matrix,rt.scaleAndBias);let Bn=e._clippingPlanes,qi=l(Bn)&&Bn.enabled&&t.isClipped;qi&&(rt.clippingPlanesEdgeColor=z.clone(Bn.edgeColor,rt.clippingPlanesEdgeColor),rt.clippingPlanesEdgeWidth=Bn.edgeWidth);let ki=i.vectorData;l(ki)&&(rt.vectorSegmentTexture=ki.polylineSegmentTexture,rt.vectorWidthTexture=ki.widthTexture,rt.vectorColorTexture=ki.colorTexture,rt.vectorPickColorTexture=ki.pickColorTexture,rt.vectorSegmentPrimitiveIndicesTexture=ki.polylineSegmentPrimitiveIndicesTexture,rt.vectorGridCellIndicesTexture=ki.polylineGridCellIndicesTexture,rt.vectorPolygonEdgeTexture=ki.polygonEdgeTexture,rt.vectorPolygonEdgePrimitiveIndicesTexture=ki.polygonEdgePrimitiveIndicesTexture,rt.vectorPolygonGridCellIndicesTexture=ki.polygonGridCellIndicesTexture,U.clone(ki.metersPerUv,rt.vectorMetersPerUv));let Nr=i.clippingPolygonData;l(Nr)&&(rt.clippingEdgeTexture=Nr.polygonEdgeTexture,rt.clippingEdgePrimitiveIndicesTexture=Nr.polygonEdgePrimitiveIndicesTexture,rt.clippingGridCellIndicesTexture=Nr.polygonGridCellIndicesTexture);let Wc=e._clippingPolygons,bd=(Nr?.polygonRings.length??0)>0,xp=l(Wc)&&Wc.enabled&&Wc.length>0&&t.isClipped&&bd;Se.numberOfDayTextures=mt,Se.applyBrightness=Zi,Se.applyContrast=Mr,Se.applyHue=fo,Se.applySaturation=Bs,Se.applyGamma=Ks,Se.applyAlpha=no,Se.applyDayNightAlpha=gi,Se.applySplit=ho,Se.enableFog=Wn,Se.enableClippingPlanes=qi,Se.clippingPlanes=Bn,Se.enableClippingPolygons=xp,Se.clippingPolygons=Wc,Se.hasImageryLayerCutout=ur,Se.colorCorrect=V,Se.highlightFillTile=Xn,Se.colorToAlpha=Zo,Se.showUndergroundColor=b,Se.translucent=d;let Nh=i.renderedMesh.indices.length;Xe||(Nh=i.renderedMesh.indexCountWithoutSkirts),ft.shaderProgram=e._surfaceShaderSet.getShaderProgram(Se),ft.pickId=i.vectorData?.show?"vectorPickColorOver(vec4(0.0))":void 0,ft.castShadows=C,ft.receiveShadows=w,ft.renderState=st,ft.primitiveType=Oe.TRIANGLES,ft.vertexArray=i.vertexArray||i.fill.vertexArray,ft.count=Nh,ft.uniformMap=Xt,ft.pass=Ie.GLOBE,e._debug.wireframe&&(jkt(Gt,t),l(i.wireframeVertexArray)&&(ft.vertexArray=i.wireframeVertexArray,ft.primitiveType=Oe.LINES,ft.count=Nh*2));let da=ft.boundingVolume,Tp=ft.orientedBoundingBox;n.mode!==re.SCENE3D?(ue.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,q.minimumHeight,q.maximumHeight,da),h.fromElements(da.center.z,da.center.x,da.center.y,da.center),n.mode===re.MORPHING&&ue.union(q.boundingSphere,da,da)):(ft.boundingVolume=ue.clone(q.boundingSphere,da),ft.orientedBoundingBox=Qt.clone(q.boundingVolume,Tp)),ft.dirty=!0,d&&f.updateDerivedCommands(ft,n),GFe(ft,n),st=qe,vt=Gkt}while(Qe<He)}var bV=Eae;function KFe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ie.clone(ie.MAX_VALUE)}Object.defineProperties(KFe.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){this._frontFaceAlphaByDistance=qt.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){this._backFaceAlphaByDistance=qt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ie.clone(ie.MAX_VALUE)),ie.clone(e,this._rectangle)}}});var xV=KFe;var Cae=class{constructor(t){this._ellipsoid=new Om(t.ellipsoid,h.ZERO)}get ellipsoid(){return this._ellipsoid}},TV=Cae;var vae=class{constructor(t){this.maxSize=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;let n=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,n),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;this.cache.delete(i)}this.cache.set(t,n)}get size(){return this.cache.size}clear(){this.cache.clear()}},Kkt=1e3,Sae=class e{constructor(t){this._tilingScheme=t.tilingScheme,this._x=t.x,this._y=t.y,this._level=t.level,this._parent=t.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=new Set,this._customDataIterator=void 0,this._addedCustomData=[],this._removedCustomData=[],this._lastSelectionResult=pi.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new vae(Kkt),this.state=Qa.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}static createLevelZeroTiles(t){let n=t.getNumberOfXTilesAtLevel(0),i=t.getNumberOfYTilesAtLevel(0),r=new Array(n*i),o=0;for(let s=0;s<i;++s)for(let a=0;a<n;++a)r[o++]=new e({tilingScheme:t,x:a,y:s,level:0});return r}_getCacheKey(t,n){return Jkt(t.longitude,t.latitude,this._rectangle,n)}getPositionCacheEntry(t,n){return this._positionCache.get(this._getCacheKey(t,n))}setPositionCacheEntry(t,n,i){this._positionCache.set(this._getCacheKey(t,n),i)}clearPositionCache(){this._positionCache.size>0&&this._positionCache.clear()}updateCustomData(){let t=this._addedCustomData,n=this._removedCustomData;if(t.length===0&&n.length===0)return;let i=this.customData;for(let r=0;r<t.length;++r){let o=t[r];if(!l(o))continue;i.add(o);let s=$Fe(this,o.positionCartographic);o._pendingAddTile=s,o._pendingAddIndex=s._addedCustomData.length,s._addedCustomData.push(o)}this._addedCustomData.length=0;for(let r=0;r<n.length;++r){let o=n[r];if(!l(o))continue;i.has(o)&&i.delete(o);let s=$Fe(this,o.positionCartographic);if(o._pendingAddTile===s&&s._addedCustomData[o._pendingAddIndex]===o){s._addedCustomData[o._pendingAddIndex]=void 0,o._pendingAddTile=void 0;continue}s._removedCustomData.push(o)}this._removedCustomData.length=0}get tilingScheme(){return this._tilingScheme}get x(){return this._x}get y(){return this._y}get level(){return this._level}get parent(){return this._parent}get rectangle(){return this._rectangle}get children(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}get southwestChild(){return l(this._southwestChild)||(this._southwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}get southeastChild(){return l(this._southeastChild)||(this._southeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}get northwestChild(){return l(this._northwestChild)||(this._northwestChild=new e({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}get northeastChild(){return l(this._northeastChild)||(this._northeastChild=new e({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}get customData(){return this._customData}get needsLoading(){return this.state<Qa.DONE}get eligibleForUnloading(){let t=!0;return l(this.data)&&(t=this.data.eligibleForUnloading,l(t)||(t=!0)),t}findLevelZeroTile(t,n,i){let r=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(n<0?n+=r:n>=r&&(n-=r),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return t.filter(function(o){return o.x===n&&o.y===i})[0]}findTileToWest(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x-1,this.y);if(n.southeastChild===this)return n.southwestChild;if(n.northeastChild===this)return n.northwestChild;let i=n.findTileToWest(t);if(i!==void 0)return n.southwestChild===this?i.southeastChild:i.northeastChild}findTileToEast(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x+1,this.y);if(n.southwestChild===this)return n.southeastChild;if(n.northwestChild===this)return n.northeastChild;let i=n.findTileToEast(t);if(i!==void 0)return n.southeastChild===this?i.southwestChild:i.northwestChild}findTileToSouth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y+1);if(n.northwestChild===this)return n.southwestChild;if(n.northeastChild===this)return n.southeastChild;let i=n.findTileToSouth(t);if(i!==void 0)return n.southwestChild===this?i.northwestChild:i.northeastChild}findTileToNorth(t){let n=this.parent;if(n===void 0)return this.findLevelZeroTile(t,this.x,this.y-1);if(n.southwestChild===this)return n.northwestChild;if(n.southeastChild===this)return n.northeastChild;let i=n.findTileToNorth(t);if(i!==void 0)return n.northwestChild===this?i.southwestChild:i.southeastChild}freeResources(){this.clearPositionCache(),this.state=Qa.START,this.renderable=!1,this.upsampledFromParent=!1;let t=this.data;l(t)&&l(t.freeResources)&&t.freeResources(),pW(this._southwestChild),this._southwestChild=void 0,pW(this._southeastChild),this._southeastChild=void 0,pW(this._northwestChild),this._northwestChild=void 0,pW(this._northeastChild),this._northeastChild=void 0}},$kt=256;function Jkt(e,t,n,i){let r=n.width/$kt*i,o=Math.floor(e/r)*r,s=Math.floor(t/r)*r;return`${o.toFixed(10)},${s.toFixed(10)}`}var Zkt=new he;function $Fe(e,t){let n=e.northwestChild.rectangle,i=ie.southeast(n,Zkt),r=t.longitude>=i.longitude?1:0;switch((t.latitude<i.latitude?1:0)*2+r){case 0:return e.northwestChild;case 1:return e.northeastChild;case 2:return e.southwestChild;default:return e.southeastChild}}function pW(e){l(e)&&e.freeResources()}var EV=Sae;function gW(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}gW.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};gW.prototype.trimTiles=function(e){let t=this.tail,n=!0;for(;n&&l(this._lastBeforeStartOfFrame)&&this.count>e&&l(t);){n=t!==this._lastBeforeStartOfFrame;let i=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),JFe(this,t)),t=i}};function JFe(e,t){let n=t.replacementPrevious,i=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=i),t===e.head?e.head=i:n.replacementNext=i,t===e.tail?e.tail=n:i.replacementPrevious=n,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}gW.prototype.markTileRendered=function(e){let t=this.head;if(t===e){e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext);return}if(++this.count,!l(t)){e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,this.tail=e;return}(l(e.replacementPrevious)||l(e.replacementNext))&&JFe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var CV=gW;function Ih(e){this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};let n=this._tileProvider.tilingScheme.ellipsoid;this._tilesRenderedThisFrame=new Set,this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new CV,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=e.maximumScreenSpaceError??2,this.tileCacheSize=e.tileCacheSize??100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new TV({ellipsoid:n}),this._tileLoadProgressEvent=new be,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(Ih.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});Ih.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Qkt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,QFe(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let o=n[i].customData;for(let s of o)s.level=0,e._addHeightCallbacks.push(s);n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}Ih.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==Qa.START&&e(t),t=t.replacementNext};Ih.prototype.forEachRenderedTile=function(e){let t=this._tilesRenderedThisFrame;for(let n of t)e(n)};Ih.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let r=n._addHeightCallbacks,o=r.length,s=!1;for(let a=0;a<o;++a)if(r[a]===i){r.splice(a,1),s=!0;break}s||n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};Ih.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function QFe(e){let t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}Ih.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Qkt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),QFe(this),!this._debug.suspendLodUpdate&&(this._tileReplacementQueue.markStartOfRenderFrame(),this._tilesRenderedThisFrame.clear()))};Ih.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),i3t(this,e),h3t(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function e3t(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let r=be.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(r(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(r,o){return Math.max(r,o.level)},-1),i.tilesRendered=e._tilesToRender.length,(i.tilesVisited!==i.lastTilesVisited||i.tilesRendered!==i.lastTilesRendered||i.tilesCulled!==i.lastTilesCulled||i.maxDepth!==i.lastMaxDepth||i.tilesWaitingForChildren!==i.lastTilesWaitingForChildren||i.maxDepthVisited!==i.lastMaxDepthVisited)&&(console.log(`Visited ${i.tilesVisited}, Rendered: ${i.tilesRendered}, Culled: ${i.tilesCulled}, Max Depth Rendered: ${i.maxDepth}, Max Depth Visited: ${i.maxDepthVisited}, Waiting for children: ${i.tilesWaitingForChildren}`),i.lastTilesVisited=i.tilesVisited,i.lastTilesRendered=i.tilesRendered,i.lastTilesCulled=i.tilesCulled,i.lastMaxDepth=i.maxDepth,i.lastTilesWaitingForChildren=i.tilesWaitingForChildren,i.lastMaxDepthVisited=i.maxDepthVisited))}Ih.prototype.endFrame=function(e){!e.passes.render||e.mode===re.MORPHING||(l3t(this,e),d3t(this,e),e3t(this,e))};Ih.prototype.isDestroyed=function(){return!1};Ih.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var SV,ZFe=new he;function t3t(e,t){let n=ie.center(e.rectangle,ZFe),i=n.longitude-SV.longitude,r=n.latitude-SV.latitude;n=ie.center(t.rectangle,ZFe);let o=n.longitude-SV.longitude,s=n.latitude-SV.latitude;return i*i+r*r-(o*o+s*s)}var n3t=new h,vV=[];function i3t(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let r=e._tileProvider;if(!l(e._levelZeroTiles)){let d=r.tilingScheme;if(l(d)){let p=r.tilingScheme;e._levelZeroTiles=EV.createLevelZeroTiles(p);let g=e._levelZeroTiles.length;if(vV.length<g){vV=new Array(g);for(let m=0;m<g;++m)vV[m]===void 0&&(vV[m]=new wV)}}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let o=e._levelZeroTiles,s=o.length>1?e._occluders:void 0;SV=t.camera.positionCartographic,o.sort(t3t);let a=e._addHeightCallbacks,c=e._removeHeightCallbacks;a.forEach(d=>{let p=o.find(g=>ie.contains(g.rectangle,d.positionCartographic));p&&p._addedCustomData.push(d)}),c.forEach(d=>{let p=o.find(g=>ie.contains(g.rectangle,d.positionCartographic));p&&p._removedCustomData.push(d)}),o.forEach(d=>d.updateCustomData()),a.length=0,c.length=0;let u=t.camera;e._cameraPositionCartographic=u.positionCartographic;let f=N.getTranslation(u.transform,n3t);e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(f,e._cameraReferenceFrameOriginCartographic);for(let d=0;d<o.length;++d){let p=o[d];e._tileReplacementQueue.markTileRendered(p),p.renderable?Gc(e,p,r,t,s,!1,vV[d]):(uy(e,e._tileLoadQueueHigh,p,t),++n.tilesWaitingForChildren)}e._lastSelectionFrameNumber=t.frameNumber}function uy(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function wV(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function eBe(){this.southwest=new wV,this.southeast=new wV,this.northwest=new wV,this.northeast=new wV}eBe.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,r=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&r.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||r.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+r.notYetRenderableCount};var Iae=new Array(31);for(let e=0;e<Iae.length;++e)Iae[e]=new eBe;function r3t(e,t,n,i,r){let o=e._debug;++o.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n.updateCustomData(),n.level>o.maxDepthVisited&&(o.maxDepthVisited=n.level);let s=a3t(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,u=n.northwestChild,f=n.northeastChild,d=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===d?n._lastSelectionResult:pi.NONE,g=e.tileProvider;if(s||i){let m=pi.originalResult(p)===pi.RENDERED,y=pi.originalResult(p)===pi.CULLED||p===pi.NONE,A=n.state===Qa.DONE,b=m||y||A;if(b||l(g.canRenderWithoutLosingDetail)&&(b=g.canRenderWithoutLosingDetail(n)),b){s&&uy(e,e._tileLoadQueueMedium,n,t),_W(e,n),r.allAreRenderable=n.renderable,r.anyWereRenderedLastFrame=p===pi.RENDERED,r.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=pi.RENDERED,r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&uy(e,e._tileLoadQueueHigh,n,t)}if(g.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&u.upsampledFromParent&&f.upsampledFromParent){_W(e,n),uy(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(f),r.allAreRenderable=n.renderable,r.anyWereRenderedLastFrame=p===pi.RENDERED,r.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=pi.RENDERED,r.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=pi.REFINED;let y=e._tilesToRender.length,A=e._tileLoadQueueLow.length,b=e._tileLoadQueueMedium.length,x=e._tileLoadQueueHigh.length,T=e._tileToUpdateHeights.length;if(o3t(e,a,c,u,f,t,i,r),y!==e._tilesToRender.length){let E=r.allAreRenderable,v=r.anyWereRenderedLastFrame,S=r.notYetRenderableCount,I=!1;if(!E&&!v){let R=e._tilesToRender;for(let L=y;L<R.length;++L){let _=R[L];for(;_!==void 0&&_._lastSelectionResult!==pi.KICKED&&_!==n;)_._lastSelectionResult=pi.kick(_._lastSelectionResult),_=_.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=T,_W(e,n),n._lastSelectionResult=pi.RENDERED;let O=p===pi.RENDERED;!O&&S>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=A,e._tileLoadQueueMedium.length=b,e._tileLoadQueueHigh.length=x,uy(e,e._tileLoadQueueMedium,n,t),r.notYetRenderableCount=n.renderable?0:1,I=!0),r.allAreRenderable=n.renderable,r.anyWereRenderedLastFrame=O,O||e._tileToUpdateHeights.push(n),++o.tilesWaitingForChildren}e.preloadAncestors&&!I&&uy(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=pi.RENDERED,_W(e,n),uy(e,e._tileLoadQueueHigh,n,t),r.allAreRenderable=n.renderable,r.anyWereRenderedLastFrame=p===pi.RENDERED,r.notYetRenderableCount=n.renderable?0:1}function o3t(e,t,n,i,r,o,s,a){let c=o.camera.positionCartographic,u=e._tileProvider,f=e._occluders,d=Iae[t.level],p=d.southwest,g=d.southeast,m=d.northwest,y=d.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(Gc(e,t,u,o,f,s,p),Gc(e,n,u,o,f,s,g),Gc(e,i,u,o,f,s,m),Gc(e,r,u,o,f,s,y)):(Gc(e,i,u,o,f,s,m),Gc(e,t,u,o,f,s,p),Gc(e,r,u,o,f,s,y),Gc(e,n,u,o,f,s,g)):c.latitude<t.rectangle.north?(Gc(e,n,u,o,f,s,g),Gc(e,t,u,o,f,s,p),Gc(e,r,u,o,f,s,y),Gc(e,i,u,o,f,s,m)):(Gc(e,r,u,o,f,s,y),Gc(e,i,u,o,f,s,m),Gc(e,n,u,o,f,s,g),Gc(e,t,u,o,f,s,p)),d.combine(a)}function s3t(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ie.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ie.contains(n,e._cameraReferenceFrameOriginCartographic)}function Gc(e,t,n,i,r,o,s){if(n.computeTileVisibility(t,i,r)!==$o.NONE)return r3t(e,i,t,o,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,s3t(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&uy(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:pi.NONE;c!==pi.CULLED_BUT_NEEDED&&c!==pi.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=pi.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(uy(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=pi.CULLED):t._lastSelectionResult=pi.CULLED;t._lastSelectionResultFrame=i.frameNumber}function a3t(e,t,n){if(t.mode===re.SCENE2D||t.camera.frustum instanceof gn||t.camera.frustum instanceof As)return c3t(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),r=n._distance,o=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*o/(r*s);return t.fog.enabled&&(a-=D.fog(r,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function c3t(e,t,n){let r=t.camera.frustum,o=r.offCenterFrustum;l(o)&&(r=o);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,u=e._tileProvider.getLevelMaximumGeometricError(n.level),f=Math.max(r.top-r.bottom,r.right-r.left)/Math.max(a,c),d=u/f;return t.fog.enabled&&t.mode!==re.SCENE2D&&(d-=D.fog(n._distance,t.fog.density)*t.fog.sse),d/=t.pixelRatio,d}function _W(e,t){e._tilesToRender.push(t),e._tilesRenderedThisFrame.add(t)}function l3t(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,r=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&r.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let o=xn()+e._loadQueueTimeSlice,s=e._tileProvider,a=wae(e,t,s,o,n,!1);a=wae(e,t,s,o,i,a),wae(e,t,s,o,r,a)}function u3t(e,t){return e._loadPriority-t._loadPriority}function wae(e,t,n,i,r,o){n.computeTileLoadPriority!==void 0&&r.sort(u3t);for(let s=0,a=r.length;s<a&&(xn()<i||!o);++s){let c=r[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),o=!0}return o}var NP=new pn,yW=new he,Lb=new h,f3t=[];function d3t(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=f3t;n.length=0;let i=e._tileToUpdateHeights,r=xn(),o=e._updateHeightsTimeSlice,s=r+o,a=t.mode,c=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid,f;for(;i.length>0;){let d=i[0];if(!l(d.data)||!l(d.data.mesh)){let A=d._lastSelectionResultFrame===e._lastSelectionFrameNumber?d._lastSelectionResult:pi.NONE;(A===pi.RENDERED||A===pi.CULLED_BUT_NEEDED)&&n.push(d),d.clearPositionCache(),i.shift();continue}let p=d.customData;l(d._customDataIterator)||(d._customDataIterator=p.values());let g=d._customDataIterator,m=!1,y;for(;!(y=g.next()).done;){let A=y.value,b=d.data.terrainData,x=l(b)&&b.wasCreatedByUpsampling();if(d.level>A.level&&!x){let T,E=d.getPositionCacheEntry(A.positionCartographic,e.maximumScreenSpaceError);if(l(E))T=E;else{if(l(A.positionOnEllipsoidSurface)||(A.positionOnEllipsoidSurface=h.fromRadians(A.positionCartographic.longitude,A.positionCartographic.latitude,0,u)),a===re.SCENE3D){let v=u.geodeticSurfaceNormal(A.positionOnEllipsoidSurface,NP.direction),S=u.getSurfaceNormalIntersectionWithZAxis(A.positionOnEllipsoidSurface,11500,NP.origin);if(!l(S)){let I=0;l(d.data.tileBoundingRegion)&&(I=d.data.tileBoundingRegion.minimumHeight);let R=Math.min(I,-11500),O=h.multiplyByScalar(v,Math.abs(R)+1,Lb);h.subtract(A.positionOnEllipsoidSurface,O,NP.origin)}}else he.clone(A.positionCartographic,yW),yW.height=-11500,c.project(yW,Lb),h.fromElements(Lb.z,Lb.x,Lb.y,Lb),h.clone(Lb,NP.origin),h.clone(h.UNIT_X,NP.direction);T=d.data.pick(NP,a,c,!1,Lb),l(T)&&d.setPositionCacheEntry(A.positionCartographic,e.maximumScreenSpaceError,h.clone(T))}if(l(T)){if(l(A.callback)){let v=u.cartesianToCartographic(T,yW);A.callback(v)}A.level=d.level}}if(xn()>=s){m=!0;break}}if(m){d._customDataIterator=g;break}else d._customDataIterator=void 0,i.shift()}for(f=0;f<n.length;f++)i.push(n[f])}function h3t(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let r=0,o=i.length;r<o;++r){let s=i[r];n.showTileThisFrame(s,t)}}var IV=Ih;function fp(e){e=e??ee.default;let t=new M0({ellipsoid:e}),n=new XT,i=new u_({tilingScheme:t.tilingScheme});this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new yV,this._material=void 0,this._surface=new IV({tileProvider:new bV({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet,vectorProvider:i})}),this._terrainProvider=t,this._terrainProviderChanged=new be,this._vectorProvider=i,this._undergroundColor=z.clone(z.BLACK),this._undergroundColorAlphaByDistance=new qt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new xV,Dae(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new De({url:Zt("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=ee.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=D.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=D.PI*e.minimumRadius,this.nightFadeOutDistance=D.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*D.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=Dn.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0,this.vertexShadowDarkness=.3}Object.defineProperties(fp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return l(this._surface)?this._surface._tileLoadQueueHigh.length===0&&this._surface._tileLoadQueueMedium.length===0&&this._surface._tileLoadQueueLow.length===0:!0}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},clippingPolygons:{get:function(){return this._surface.tileProvider.clippingPolygons},set:function(e){this._surface.tileProvider.clippingPolygons=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){l(e)||(e=ie.clone(ie.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,l(e)&&(this._vectorProvider.tilingScheme=e.tilingScheme),this._terrainProviderChanged.raiseEvent(e),l(this._material)&&Dae(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},vectorProvider:{get:function(){return this._vectorProvider}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,Dae(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=z.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=qt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function Dae(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[lm,DP];l(e._material)&&(!n||e._terrainProvider.hasVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(gV),e._surfaceShaderSet.baseVertexShaderSource=new Ye({sources:[lm,DP,_V],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Ye({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function m3t(e){return function(t,n){let i=ue.distanceSquaredTo(t.pickBoundingSphere,e),r=ue.distanceSquaredTo(n.pickBoundingSphere,e);return i-r}}var p3t=[],g3t={start:0,stop:0};fp.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let r=t.mode,o=t.mapProjection,s=p3t;s.length=0;for(let u of this._surface._tilesRenderedThisFrame){let f=u.data;if(!l(f))continue;let d=f.pickBoundingSphere;if(r!==re.SCENE3D)f.pickBoundingSphere=d=ue.fromRectangleWithHeights2D(u.rectangle,o,f.tileBoundingRegion.minimumHeight,f.tileBoundingRegion.maximumHeight,d),h.fromElements(d.center.z,d.center.x,d.center.y,d.center);else if(l(f.renderedMesh))ue.clone(f.tileBoundingRegion.boundingSphere,d);else continue;let p=_i.raySphere(e,d,g3t);l(p)&&s.push(f)}s.sort(m3t(e.origin));let a,c=s.length;for(let u=0;u<c&&(a=s[u].pick(e,t.mode,t.mapProjection,n,i),!l(a));++u);return a};var _3t=new he;fp.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==re.SCENE3D){n=h.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,_3t);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var y3t=new h,tBe=new h,A3t=new he,b3t=new pn;function Pae(e,t){return l(e)&&ie.contains(e.rectangle,t)?e:void 0}fp.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,r=t.length;for(i=0;i<r&&(n=t[i],!ie.contains(n.rectangle,e));++i);if(i>=r)return;let o=n;for(;l(n);)n=Pae(n._southwestChild,e)||Pae(n._southeastChild,e)||Pae(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(o=n);if(n=o,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=h.fromRadians(e.longitude,e.latitude,0,a,y3t),u=b3t,f=a.geodeticSurfaceNormal(c,u.direction),d=a.getSurfaceNormalIntersectionWithZAxis(c,11500,u.origin);if(!l(d)){let g;l(n.data.tileBoundingRegion)&&(g=n.data.tileBoundingRegion.minimumHeight);let m=Math.min(g??0,-11500),y=h.multiplyByScalar(f,Math.abs(m)+1,tBe);h.subtract(c,y,u.origin)}let p=n.data.pick(u,re.SCENE3D,s,!1,tBe);if(l(p))return a.cartesianToCartographic(p,A3t).height};fp.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};fp.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,r=l(i)&&i.hasWaterMask&&i.hasWaterMask;if(r&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;let a=this._oceanNormalMapResource,c=a.url;if(l(c)){let u=this;a.fetchImage().then(function(f){c===u._oceanNormalMapResource.url&&(u._oceanNormalMap=u._oceanNormalMap&&u._oceanNormalMap.destroy(),u._oceanNormalMap=new Dt({context:e.context,source:f}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let o=e.passes,s=e.mode;o.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,n.terrainProvider=this.terrainProvider,n.lightingFadeOutDistance=this.lightingFadeOutDistance,n.lightingFadeInDistance=this.lightingFadeInDistance,n.nightFadeOutDistance=this.nightFadeOutDistance,n.nightFadeInDistance=this.nightFadeInDistance,n.zoomedOutOceanSpecularIntensity=s===re.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=r,n.showWaterEffect=this.showWaterEffect,n.oceanNormalMap=this._oceanNormalMap,n.enableLighting=this.enableLighting,n.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,n.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,n.showGroundAtmosphere=this.showGroundAtmosphere,n.atmosphereLightIntensity=this.atmosphereLightIntensity,n.atmosphereRayleighCoefficient=this.atmosphereRayleighCoefficient,n.atmosphereMieCoefficient=this.atmosphereMieCoefficient,n.atmosphereRayleighScaleHeight=this.atmosphereRayleighScaleHeight,n.atmosphereMieScaleHeight=this.atmosphereMieScaleHeight,n.atmosphereMieAnisotropy=this.atmosphereMieAnisotropy,n.shadows=this.shadows,n.hueShift=this.atmosphereHueShift,n.saturationShift=this.atmosphereSaturationShift,n.brightnessShift=this.atmosphereBrightnessShift,n.fillHighlightColor=this.fillHighlightColor,n.showSkirts=this.showSkirts,n.backFaceCulling=this.backFaceCulling,n.vertexShadowDarkness=this.vertexShadowDarkness,n.undergroundColor=this._undergroundColor,n.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,n.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))};fp.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};fp.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};fp.prototype.isDestroyed=function(){return!1};fp.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),le(this)};var PV=fp;var gf=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(colorTexture, v_textureCoordinates);
}
`;var Fb=`uniform highp sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
}
`;function H0(){this._picking=!1,this._snapping=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0}),this._snapColorFramebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0,pixelDatatype:ze.FLOAT,pixelFormat:Ke.RGBA}),this._outputFramebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new ai,this._tempCopyDepthFramebuffer=new ai,this._updateDepthFramebuffer=new ai({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new et,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(H0.prototype,{colorFramebufferManager:{get:function(){return this._snapping?this._snapColorFramebuffer:this._picking?this._pickColorFramebuffer:this._outputFramebuffer}},framebuffer:{get:function(){return this.colorFramebufferManager.framebuffer}},depthStencilTexture:{get:function(){return this.colorFramebufferManager.getDepthStencilTexture()}},picking:{get:function(){return this._picking},set:function(e){this._picking=e}},snapping:{get:function(){return this._snapping},set:function(e){this._snapping=e}}});function nBe(e,t,n,i,r){let o=e._viewport;o.width=n,o.height=i;let s=!et.equals(o,r.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,et.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=et.clone(r.viewport,e._scissorRectangle),a=!0),(!l(e._rs)||!et.equals(o,e._rs.viewport)||a)&&(e._rs=Ge.fromCache({viewport:o,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Ge.fromCache({viewport:o,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:tn.ALPHA_BLEND}),e._rsUpdate=Ge.fromCache({viewport:o,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:ei.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:ei.NEVER,reference:Yt.CESIUM_3D_TILE_MASK,mask:Yt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(Fb,{uniformMap:{u_depthTexture:function(){return e.colorFramebufferManager.getDepthStencilTexture()}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer.framebuffer,e._copyDepthCommand.renderState=e._rs,l(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(gf,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(Fb,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer.framebuffer,e._tempCopyDepthCommand.renderState=e._rs,l(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(gf,{uniformMap:{colorTexture:function(){return e._tempCopyDepthFramebuffer.getColorTexture()}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer.framebuffer,e._updateDepthCommand.renderState=e._rsUpdate,l(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new ui({color:new z(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}H0.prototype.update=function(e,t,n,i,r,o){let{width:s,height:a}=n,c=r?e.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._numSamples=i,this.snapping?this._snapColorFramebuffer.update(e,s,a):this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,c),this._copyDepthFramebuffer.update(e,s,a),nBe(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=o};H0.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};H0.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};H0.prototype.executeUpdateDepth=function(e,t,n){let i=l(n)?n:t.framebuffer.depthStencilTexture;if(!this._clearGlobeDepth&&i===this.colorFramebufferManager.getDepthStencilTexture()){l(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t);return}if(!l(this._updateDepthCommand))return;let r=this._updateDepthFramebuffer;if(!l(r.framebuffer)||r.getDepthStencilTexture()!==i||r.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let o=this._copyDepthFramebuffer.getColorTexture(),{width:s,height:a}=o;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,s,a),r.setColorTexture(o,0),r.setDepthStencilTexture(i),r.update(e,s,a),nBe(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};H0.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};H0.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(z.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};H0.prototype.isDestroyed=function(){return!1};H0.prototype.destroy=function(){return this._pickColorFramebuffer.destroy(),this._snapColorFramebuffer.destroy(),this._outputFramebuffer.destroy(),this._copyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.destroy(),this._updateDepthFramebuffer.destroy(),l(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),l(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),l(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),le(this)};var DV=H0;function SC(){this._framebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new ai,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new et,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(SC.prototype,{classificationTexture:{get:function(){return this._framebuffer.getColorTexture()}},classificationFramebuffer:{get:function(){return this._framebuffer.framebuffer}},packedDepthFramebuffer:{get:function(){return this._packedDepthFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._framebuffer.getDepthStencilTexture()}},depthStencilRenderbuffer:{get:function(){return this._framebuffer.getDepthStencilRenderbuffer()}},packedDepthTexture:{get:function(){return this._packedDepthFramebuffer.getColorTexture()}}});function x3t(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function T3t(e,t,n,i,r){let o=r?t.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,o),e._packedDepthFramebuffer.update(t,n,i)}function E3t(e,t,n,i,r){e._viewport.width=n,e._viewport.height=i;let o=!et.equals(e._viewport,r.viewport),s=o!==e._useScissorTest;e._useScissorTest=o,et.equals(e._scissorRectangle,r.viewport)||(e._scissorRectangle=et.clone(r.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!et.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=Ge.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(Fb,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new ui({color:new z(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer.framebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e.classificationFramebuffer,e._clearCommand.renderState=e._renderState}SC.prototype.updateAndClear=function(e,t,n,i){let r=t.width,o=t.height;T3t(this,n,r,o,e),E3t(this,n,r,o,i),this._useHdr=e};SC.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};SC.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};SC.prototype.isDestroyed=function(){return!1};SC.prototype.destroy=function(){return x3t(this),le(this)};var RV=SC;var Tc={OPAQUE_FRONT_FACE:0,OPAQUE_BACK_FACE:1,DEPTH_ONLY_FRONT_FACE:2,DEPTH_ONLY_BACK_FACE:3,DEPTH_ONLY_FRONT_AND_BACK_FACE:4,TRANSLUCENT_FRONT_FACE:5,TRANSLUCENT_BACK_FACE:6,TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:7,TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:8,PICK_FRONT_FACE:9,PICK_BACK_FACE:10,DERIVED_COMMANDS_MAXIMUM_LENGTH:11},wC=Tc.DERIVED_COMMANDS_MAXIMUM_LENGTH,dBe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function IC(){this._frontFaceAlphaByDistance=new qt(0,1,0,1),this._backFaceAlphaByDistance=new qt(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=ie.clone(ie.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(wC),this._derivedBlendCommandTypes=new Array(wC),this._derivedPickCommandTypes=new Array(wC),this._derivedCommandTypesToUpdate=new Array(wC),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(IC.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}});IC.prototype.update=function(e){let t=e.globe;if(!l(t)||!t.show){this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,this._useDepthPlane=!1;return}this._frontFaceAlphaByDistance=iBe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=iBe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=rBe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=rBe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=w3t(this,e,t),this._sunVisibleThroughGlobe=C3t(this,e),this._environmentVisible=v3t(this,e),this._useDepthPlane=S3t(this,e),this._numberOfTextureUniforms=I3t(this),this._rectangle=ie.clone(t.translucency.rectangle,this._rectangle),P3t(this,e)};function iBe(e,t,n,i){return e?l(n)?(qt.clone(n,i),i.nearValue*=t,i.farValue*=t,i):(i.nearValue=t,i.farValue=t,i):(i.nearValue=1,i.farValue=1,i)}function rBe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function C3t(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function v3t(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function S3t(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function w3t(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==re.SCENE2D&&t.context.depthTexture}function I3t(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function P3t(e,t){e._derivedCommandsLength=Rae(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=Rae(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=Rae(e,t,!1,!0,e._derivedPickCommandTypes);let n,i=0;for(n=0;n<e._derivedCommandsLength;++n)i|=1<<e._derivedCommandTypes[n];for(n=0;n<e._derivedBlendCommandsLength;++n)i|=1<<e._derivedBlendCommandTypes[n];for(n=0;n<e._derivedPickCommandsLength;++n)i|=1<<e._derivedPickCommandTypes[n];let r=0;for(n=0;n<wC;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[r++]=n);e._derivedCommandsToUpdateLength=r;let o=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=o,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=G3t())}function Rae(e,t,n,i,r){let o=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return o;let c=t.cameraUnderground,u=e._requiresManualDepthTest,f=i?Tc.PICK_FRONT_FACE:u?Tc.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:Tc.TRANSLUCENT_FRONT_FACE,d=i?Tc.PICK_BACK_FACE:u?Tc.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:Tc.TRANSLUCENT_BACK_FACE;return t.mode===re.SCENE2D?(r[o++]=Tc.DEPTH_ONLY_FRONT_FACE,r[o++]=f,o):(a?(n||(r[o++]=Tc.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(r[o++]=f,r[o++]=d):(r[o++]=d,r[o++]=f)):c?(n||(r[o++]=Tc.DEPTH_ONLY_BACK_FACE),r[o++]=Tc.OPAQUE_FRONT_FACE,r[o++]=d):(n||(r[o++]=Tc.DEPTH_ONLY_FRONT_FACE),r[o++]=Tc.OPAQUE_BACK_FACE,r[o++]=f),o)}function Ph(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function oBe(e,t){return e.indexOf(t)>-1}function D3t(e,t){Ph(e.defines,"TRANSLUCENT"),Ph(t.defines,"TRANSLUCENT")}function R3t(e,t){Ph(e.defines,"GROUND_ATMOSPHERE"),Ph(t.defines,"GROUND_ATMOSPHERE"),Ph(e.defines,"FOG"),Ph(t.defines,"FOG"),Ph(e.defines,"TRANSLUCENT"),Ph(t.defines,"TRANSLUCENT")}function Oae(e,t){if(oBe(t.defines,"TILE_LIMIT_RECTANGLE")||oBe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main()
{
out_FragColor = vec4(1.0);
}
`;t.sources=[n]}function Mae(e,t){let n=t.sources,i=n.length;for(let o=0;o<i;++o)n[o]=Ye.replaceMain(n[o],"czm_globe_translucency_main");n.push(`
uniform sampler2D u_classificationTexture;
void main()
{
vec2 st = gl_FragCoord.xy / czm_viewport.zw;
#ifdef MANUAL_DEPTH_TEST
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
if (logDepthOrDepth != 0.0)
{
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
float depthEC = eyeCoordinate.z / eyeCoordinate.w;
if (v_positionEC.z < depthEC)
{
discard;
}
}
#endif
czm_globe_translucency_main();
vec4 classificationColor = texture(u_classificationTexture, st);
if (classificationColor.a > 0.0)
{
// Reverse premultiplication process to get the correct composited result of the classification primitives
classificationColor.rgb /= classificationColor.a;
}
out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a);
}
`)}function hBe(e,t){Mae(e,t),Ph(e.defines,"GROUND_ATMOSPHERE"),Ph(t.defines,"GROUND_ATMOSPHERE"),Ph(e.defines,"FOG"),Ph(t.defines,"FOG")}function O3t(e,t){Mae(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function M3t(e,t){hBe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function sBe(e,t){let n=`uniform sampler2D u_classificationTexture;
void main()
{
vec2 st = gl_FragCoord.xy / czm_viewport.zw;
vec4 pickColor = texture(u_classificationTexture, st);
if (pickColor == vec4(0.0))
{
discard;
}
out_FragColor = pickColor;
}
`;t.sources=[n]}function N3t(e,t,n,i,r,o){if(!l(r))return t;if(!i&&l(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,o);if(!l(s)){let a=t._attributeLocations,c=t.vertexShaderSource.clone(),u=t.fragmentShaderSource.clone();c.defines=l(c.defines)?c.defines.slice(0):[],u.defines=l(u.defines)?u.defines.slice(0):[],r(c,u),s=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:a})}return s}function L3t(e){e.cull.face=Vi.BACK,e.cull.enabled=!0}function F3t(e){e.cull.face=Vi.FRONT,e.cull.enabled=!0}function B3t(e){e.cull.face=Vi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function k3t(e){e.cull.face=Vi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function U3t(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function aBe(e){e.cull.face=Vi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=tn.ALPHA_BLEND}function cBe(e){e.cull.face=Vi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=tn.ALPHA_BLEND}function z3t(e){e.cull.face=Vi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function V3t(e){e.cull.face=Vi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function j3t(e,t,n,i,r){if(!l(i))return e;if(!n&&l(t))return t;let o=r[e.id];if(!l(o)){let s=Ge.getState(e);i(s),o=Ge.fromCache(s),r[e.id]=o}return o}function LP(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function H3t(e,t,n,i,r){return l(r)?!i&&l(n)?n:Ot(t,r(e),!1):t}function dp(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function G3t(){return[new dp({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:D3t,getRenderStateFunction:L3t,getUniformMapFunction:void 0}),new dp({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:R3t,getRenderStateFunction:F3t,getUniformMapFunction:void 0}),new dp({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Oae,getRenderStateFunction:B3t,getUniformMapFunction:void 0}),new dp({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Oae,getRenderStateFunction:k3t,getUniformMapFunction:void 0}),new dp({pass:Ie.GLOBE,pickOnly:!1,getShaderProgramFunction:Oae,getRenderStateFunction:U3t,getUniformMapFunction:void 0}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:Mae,getRenderStateFunction:aBe,getUniformMapFunction:LP}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:hBe,getRenderStateFunction:cBe,getUniformMapFunction:LP}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:O3t,getRenderStateFunction:aBe,getUniformMapFunction:LP}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:M3t,getRenderStateFunction:cBe,getUniformMapFunction:LP}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:sBe,getRenderStateFunction:z3t,getUniformMapFunction:LP}),new dp({pass:Ie.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:sBe,getRenderStateFunction:V3t,getUniformMapFunction:LP})]}var lBe=new Array(wC),uBe=new Array(wC);IC.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let r=0;r<i;++r)uBe[r]=this._derivedCommandPacks[n[r]],lBe[r]=dBe[n[r]];W3t(this,e,i,n,lBe,uBe,t)}};function W3t(e,t,n,i,r,o,s){let a=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(a)||c){t.dirty=!1,l(a)||(a={},t.derivedCommands.globeTranslucency=a);let u=s.frameNumber,f=a.uniformMapDirtyFrame??0,d=a.shaderProgramDirtyFrame??0,p=a.renderStateDirtyFrame??0,g=a.uniformMap!==t.uniformMap,m=a.shaderProgramId!==t.shaderProgram.id,y=a.renderStateId!==t.renderState.id;g&&(a.uniformMapDirtyFrame=u),m&&(a.shaderProgramDirtyFrame=u),y&&(a.renderStateDirtyFrame=u),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let A=0;A<n;++A){let b=o[A],x=i[A],T=r[A],E=a[T],v,S,I;l(E)?(v=E.uniformMap,S=E.shaderProgram,I=E.renderState):(v=void 0,S=void 0,I=void 0),E=at.shallowClone(t,E),a[T]=E;let R=E.derivedCommands.uniformMapDirtyFrame??0,O=E.derivedCommands.shaderProgramDirtyFrame??0,L=E.derivedCommands.renderStateDirtyFrame??0,_=g||R<f,C=m||O<d,w=y||L<p;_&&(E.derivedCommands.uniformMapDirtyFrame=u),C&&(E.derivedCommands.shaderProgramDirtyFrame=u),w&&(E.derivedCommands.renderStateDirtyFrame=u),E.derivedCommands.type=x,E.pass=b.pass,E.pickOnly=b.pickOnly,E.uniformMap=H3t(e,t.uniformMap,v,_,b.getUniformMapFunction),E.shaderProgram=N3t(s.context,t.shaderProgram,S,C,b.getShaderProgramFunction,T),E.renderState=j3t(t.renderState,I,w,b.getRenderStateFunction,b.renderStateCache)}}}IC.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let r=this._derivedCommandTypes,o=this._derivedCommandsLength;if(i?(r=this._derivedPickCommandTypes,o=this._derivedPickCommandsLength):t&&(r=this._derivedBlendCommandTypes,o=this._derivedBlendCommandsLength),o===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<o;++a){let c=dBe[r[a]];n.commandList.push(s[c])}};function mBe(e,t,n,i,r,o){for(let s=0;s<t;++s){let a=e[s],c=a.derivedCommands.type;(!l(o)||o.indexOf(c)>-1)&&n(a,i,r)}}function fBe(e,t,n,i,r){for(let o=0;o<t;++o)n(e[o],i,r)}var q3t=[Tc.OPAQUE_FRONT_FACE,Tc.OPAQUE_BACK_FACE],Y3t=[Tc.DEPTH_ONLY_FRONT_FACE,Tc.DEPTH_ONLY_BACK_FACE,Tc.DEPTH_ONLY_FRONT_AND_BACK_FACE];IC.prototype.executeGlobeCommands=function(e,t,n,i,r){let o=i.context,s=e.commands[Ie.GLOBE],a=e.indices[Ie.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(o,r),mBe(s,a,t,i,r,q3t))};IC.prototype.executeGlobeClassificationCommands=function(e,t,n,i,r){let{context:o}=i,{uniformState:s}=o,a=e.commands[Ie.GLOBE],c=e.indices[Ie.GLOBE],u=e.commands[Ie.TERRAIN_CLASSIFICATION],f=e.indices[Ie.TERRAIN_CLASSIFICATION];if(c===0||f===0)return;let d=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!d||!p)&&fBe(u,f,t,i,r),!d&&!p)return;this._globeTranslucencyFramebuffer=n;let g=s.globeDepthTexture,m=r.framebuffer;if(r.framebuffer=n.classificationFramebuffer,mBe(a,c,t,i,r,Y3t),o.depthTexture){let y=n.packDepth(o,r);s.globeDepthTexture=y}fBe(u,f,t,i,r),s.globeDepthTexture=g,r.framebuffer=m};var OV=IC;var pBe=Qo(Toe(),1);function Nae(){this._image=new Image}Nae.prototype.isReady=function(){return!0};Nae.prototype.shouldDiscardImage=function(e){return e===this._image};function PC(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new er({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ie(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new It(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new Nae),this._errorEvent=new be}Object.defineProperties(PC.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});PC.fromMetadata=function(e,t){if(!e.imageryPresent)throw new oe(`The server ${e.url} doesn't have imagery`);let n=new PC(t);return n._metadata=e,n};PC.prototype.getTileCredits=function(e,t,n){let i=this._metadata,r=i.getTileInformation(e,t,n);if(l(r)){let o=i.providers[r.imageryProvider];if(l(o))return[o]}};PC.prototype.requestImage=function(e,t,n,i){let r=this._tileDiscardPolicy._image,o=this._metadata,s=oy.tileXYToQuadKey(e,t,n),a=o.getTileInformation(e,t,n);if(!l(a)){if(o.isValid(s)){let u=new wo({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});o.populateSubtree(e,t,n,u);return}return Promise.resolve(r)}if(!a.hasImagery())return Promise.resolve(r);let c=X3t(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(u){LU(o.key,u);let f=new Uint8Array(u),d,p=o.protoImagery;if((!l(p)||!p)&&(d=K3t(f)),!l(d)&&(!l(p)||p)){let g=$3t(f);d=g.imageType,f=g.imageData}return!l(d)||!l(f)?r:Mg({uint8Array:f,format:d,flipY:!0})})};PC.prototype.pickFeatures=function(e,t,n,i,r){};function X3t(e,t,n,i,r,o){let s=oy.tileXYToQuadKey(n,i,r),a=t.imageryVersion;return a=l(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:o})}function K3t(e){let t="JFIF";if(e[6]===t.charCodeAt(0)&&e[7]===t.charCodeAt(1)&&e[8]===t.charCodeAt(2)&&e[9]===t.charCodeAt(3))return"image/jpeg";let n="PNG";if(e[1]===n.charCodeAt(0)&&e[2]===n.charCodeAt(1)&&e[3]===n.charCodeAt(2))return"image/png"}function $3t(e){let t=pBe.Reader.create(e),n=t.len,i={};for(;t.pos<n;){let s=t.uint32(),a;switch(s>>>3){case 1:i.imageType=t.uint32();break;case 2:i.imageData=t.bytes();break;case 3:i.alphaType=t.uint32();break;case 4:i.imageAlpha=t.bytes();break;case 5:if(a=i.copyrightIds,l(a)||(a=i.copyrightIds=[]),(s&7)===2){let c=t.uint32()+t.pos;for(;t.pos<c;)a.push(t.uint32())}else a.push(t.uint32());break;default:t.skipType(s&7);break}}let r=i.imageType;if(l(r))switch(r){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new oe("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let o=i.alphaType;return l(o)&&o!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var Lae=PC;var J3t=600;function G0(e){e=e??H.EMPTY_OBJECT,this._key=l(e.key)?e.key:Ta.defaultApiKey,this._baseResource=De.createIfNeeded(e.url??Ta.streetViewStaticApiEndpoint),this._metadataResource=this._baseResource.getDerivedResource({url:"streetview/metadata"}),this._tileSize=e.tileSize??J3t}Object.defineProperties(G0.prototype,{});G0.prototype.loadPanorama=async function(e){let t=e.cartographic,n=e.tileSize??this._tileSize,i=`${n}x${n}`,r=e.signature,{panoId:o}=e;l(o)||(o=(await this.getNearestPanoId(t)).panoId);let s=Ta.getDefaultCredit(),a=h.fromDegrees(D.toDegrees(t.longitude),D.toDegrees(t.latitude),0),c=[this._loadFaceImage({heading:0,pitch:0,tileSizeString:i,panoId:o,signature:r}),this._loadFaceImage({heading:180,pitch:0,tileSizeString:i,panoId:o,signature:r}),this._loadFaceImage({heading:-90,pitch:-90,tileSizeString:i,panoId:o,signature:r}),this._loadFaceImage({heading:-90,pitch:90,tileSizeString:i,panoId:o,signature:r}),this._loadFaceImage({heading:270,pitch:0,tileSizeString:i,panoId:o,signature:r}),this._loadFaceImage({heading:90,pitch:0,tileSizeString:i,panoId:o,signature:r})],[u,f,d,p,g,m]=await Promise.all(c),y=At.localFrameToFixedFrameGenerator("north","down"),A=N.getMatrix3(y(a,ee.default),new $);return new bC({sources:{positiveX:u,negativeX:f,positiveY:d,negativeY:p,positiveZ:g,negativeZ:m},transform:A,credit:s})};G0.prototype.getNearestPanoId=async function(e,t){let i=[D.toDegrees(e.latitude),D.toDegrees(e.longitude)].join(","),o=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,location:i,radius:t??50}}).fetchJson();if(o.status!=="OK")throw new pe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${o.status}`);return{panoId:o.pano_id,latitude:o.location.lat,longitude:o.location.lng}};G0.prototype.getPanoIdMetadata=async function(e){let n=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,pano:e}}).fetchJson();if(n.status!=="OK")throw new pe(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${n.status}`);return n};G0.prototype._loadFaceImage=async function(e){let t=this._buildFaceUrl(e);try{return await De.fetchImage({url:t,preferImageBitmap:!0,flipY:!0})}catch{throw new pe(`Failed to load Street View face image: ${t}`)}};G0.prototype._buildFaceUrl=function(e){let{heading:t,pitch:n,tileSizeString:i,panoId:r,signature:o}=e;return this._baseResource.getDerivedResource({queryParameters:{size:i,pano:r,heading:t,pitch:n,key:this._key,...l(o)&&{signature:o}}}).url};G0.fromUrl=async function(e){if(e=e??{},e.key=e.key??Ta.defaultStreetViewStaticApiKey??Ta.defaultApiKey,!l(e.key)&&!l(Ta.defaultStreetViewStaticApiKey)&&!l(Ta.defaultApiKey))throw new pe("options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.");return new G0({...e})};G0._parseMetadata=function(e){return{cartographic:he.fromDegrees(e.location.lng,e.location.lat,0)}};var Fae=G0;var Z3t=new z(1,1,1,.4),Q3t=new z(0,1,0,.05),eUt=new z(0,.5,0,.2);function DC(e){e=e??H.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new er({ellipsoid:e.ellipsoid}),this._cells=e.cells??8,this._color=e.color??Z3t,this._glowColor=e.glowColor??Q3t,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??eUt,this._errorEvent=new be,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._canvasSize=e.canvasSize??256,this._canvas=this._createGridCanvas()}Object.defineProperties(DC.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});DC.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let o=1+i/this._cells*(n-1);e.moveTo(o,0),e.lineTo(o,n),e.moveTo(0,o),e.lineTo(n,o)}e.stroke()};DC.prototype._createGridCanvas=function(){let e=document.createElement("canvas");e.width=this._canvasSize,e.height=this._canvasSize;let t=0,n=this._canvasSize,i=e.getContext("2d"),r=this._backgroundColor.toCssColorString();i.fillStyle=r,i.fillRect(t,t,n,n);let o=this._glowColor.toCssColorString();i.strokeStyle=o,i.lineWidth=this._glowWidth,i.strokeRect(t,t,n,n),this._drawGrid(i),i.lineWidth=this._glowWidth*.5,i.strokeRect(t,t,n,n),this._drawGrid(i);let s=this._color.toCssColorString();return i.strokeStyle=s,i.lineWidth=2,i.strokeRect(t,t,n,n),i.lineWidth=1,this._drawGrid(i),e};DC.prototype.getTileCredits=function(e,t,n){};DC.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};DC.prototype.pickFeatures=function(e,t,n,i,r){};var Bae=DC;function hp(){}hp._maxDecodingConcurrency=Math.max(dn.hardwareConcurrency-1,1);hp._decodeTaskProcessor=new Jn("decodeI3S",hp._maxDecodingConcurrency);hp._promise=void 0;async function tUt(){if(await hp._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return hp._decodeTaskProcessor;throw new oe("I3S decoder could not be initialized.")}hp.decode=async function(e,t,n,i,r){return l(hp._promise)||(hp._promise=tUt()),hp._promise.then(function(o){let s=n._parent._data,a=n._parent._inverseRotationMatrix,c=0,u=0,f=0;l(s.obb)?(c=s.obb.center[0],u=s.obb.center[1],f=s.obb.center[2]):l(s.mbs)&&(c=s.mbs[0],u=s.mbs[1],f=s.mbs[2]);let d=$.fromRotationX(-D.PI_OVER_TWO),p=new $;$.multiply(d,a,p);let g=he.fromDegrees(c,u,f),m=ee.WGS84.cartographicToCartesian(g),y={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:ee.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:g,cartesianCenter:m,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:r,calculateNormals:n._dataProvider.calculateNormals};return o.scheduleTask(y)})};var MV=hp;function kae(e,t){this._parent=e,this._dataProvider=e._dataProvider,this._layer=e._layer,l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${t}`}):this._resource=this._parent.resource.getDerivedResource({url:t})}Object.defineProperties(kae.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});kae.prototype.load=async function(){return this._data=await mp.loadJson(this._resource),this._data};var NV=kae;function fy(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(fy.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function AW(e){return e==="UInt8"||e==="Int8"?1:e==="UInt16"||e==="Int16"?2:e==="UInt32"||e==="Int32"||e==="Oid32"||e==="Float32"?4:e==="UInt64"||e==="Int64"||e==="Float64"?8:0}function nUt(e){return e==="String"?1:AW(e)}async function iUt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),r=e._getBodyOffset(i);e._validateBody(n,r),e._parseBody(n,r)}fy.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=iUt(this).catch(function(e){console.error(e)}),this._loadPromise)};fy.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let r=e.getUint32(n,!0),o=e.getUint32(n+4,!0);i=r+Math.pow(2,32)*o,n+=8}else if(t==="Int64"){let r=e.getUint32(n,!0),o=e.getUint32(n+4,!0);o<Math.pow(2,31)?i=r+Math.pow(2,32)*o:i=r+Math.pow(2,32)*(o-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};fy.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],r=this._parseValue(e,i.valueType,t);this._header[i.property]=r.value,t=r.offset}return t};fy.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],r=i==="ObjectIds"?"objectIds":i,o=this._storageInfo[r];if(l(o)){this._values[r]=[];for(let s=0;s<this._header.count;++s)if(o.valueType!=="String"){let a=this._parseValue(e,o.valueType,t);this._values[r].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],c="";for(let u=0;u<a;++u){let f=this._parseValue(e,o.valueType,t);f.value.charCodeAt(0)!==0&&(c+=f.value),t=f.offset}this._values[r].push(c)}}}};fy.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=AW(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=AW(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};fy.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=nUt(i.valueType)}if(e.byteLength<t)throw new oe(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};fy.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new oe(`Invalid attribute buffer (field: ${this.name}, count is missing)`);let n;for(let i=0;i<this._storageInfo.ordering.length&&t<e.byteLength;i++){let r=this._storageInfo.ordering[i],o=r==="ObjectIds"?"objectIds":r,s=this._storageInfo[o];if(l(s))if(s.valueType!=="String"){o==="attributeByteCounts"&&(n=t);let a=AW(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new oe(`Invalid attribute buffer (field: ${this.name}, attributeByteCounts is missing)`);for(let a=0;a<this._header.count&&t<e.byteLength;++a){let c=this._parseValue(e,this._storageInfo.attributeByteCounts.valueType,n);t+=c.value,n=c.offset}}else throw new oe(`Invalid attribute buffer (field: ${this.name}, ${o} is missing)`)}if(e.byteLength<t)throw new oe(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var LV=fy;function FV(e,t){let n=e._dataProvider,i=e._layer,r;l(e._nodeIndex)?r=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):r=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=r,this._customAttributes=void 0}Object.defineProperties(FV.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});FV.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var rUt=new h,oUt=new h,sUt=new h,aUt=new h,cUt=new h;function Uae(e,t,n,i){let r=h.subtract(i,n,rUt),o=h.cross(r,h.subtract(e,n,oUt),aUt),s=h.cross(r,h.subtract(t,n,sUt),cUt);return h.dot(o,s)>=0}var lUt=new h,uUt=new h,fUt=new h,dUt=new h,hUt=new h,mUt=new h,pUt=new h,gUt=new h,_Ut=new h,yUt=new h;FV.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new h(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,$.multiplyByVector(this._customAttributes.parentRotation,i,i);let r=Number.MAX_VALUE,o,s,a,c,u=this._customAttributes.positions,f=this._customAttributes.indices,d;l(f)?d=f.length:d=u.length/3;for(let p=0;p<d;p++){let g,m,y;l(f)?(g=f[p],m=f[p+1],y=f[p+2]):(g=p*3,m=p*3+1,y=p*3+2);let A=h.fromElements(u[g*3],u[g*3+1],u[g*3+2],lUt),b=h.fromElements(u[m*3],u[m*3+1],u[m*3+2],uUt),x=new h(u[y*3],u[y*3+1],u[y*3+2],fUt);if(!Uae(i,A,b,x)||!Uae(i,b,A,x)||!Uae(i,x,A,b))continue;let T=h.subtract(b,A,dUt),E=h.subtract(x,A,hUt),v=h.cross(T,E,mUt);if(h.magnitude(v)===0)continue;let S=h.normalize(v,pUt),I=h.subtract(i,A,gUt),R=Math.abs(h.dot(I,S));if(R<r){r=R,o=p;let O=h.magnitudeSquared(h.subtract(i,A,I)),L=h.magnitudeSquared(h.subtract(i,b,_Ut)),_=h.magnitudeSquared(h.subtract(i,x,yUt));O<L&&O<_?(a=g,c=A,s=O):L<_?(a=m,c=b,s=L):(a=y,c=x,s=_)}}if(l(o))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:h.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function gBe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(lC(e[i])):t.push(e[i]);return t}FV.prototype._generateGltf=function(e,t,n,i,r,o,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},u=!1,f,d="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let T=this._parent._data.mesh.material.definition;if(T>=0&&T<this._layer._data.materialDefinitions.length){if(f=this._layer._data.materialDefinitions[T],c=f,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){u=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let E="0";if(l(this._layer._data.textureSetDefinitions))for(let v=0;v<this._layer._data.textureSetDefinitions.length;v++){let S=this._layer._data.textureSetDefinitions[v];for(let I=0;I<S.formats.length;I++){let R=S.formats[I];if(R.format==="jpg"){E=R.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(d=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${E}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=gBe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=gBe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(u=!0,d=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],g=[],m=[];u&&(p=[{sampler:0,source:0}],g=[{uri:d}],m=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let y=[],A=n.length;for(let x=0;x<A;x++){let T=n[x].primitives,E=T.length;for(let v=0;v<E;v++){let S=T[v];if(l(S.material)){for(;S.material>=y.length;){let R=Je(c,!0);y.push(R)}let I=y[S.material];l(S.extra)&&S.extra.isTransparent?l(I.alphaMode)||(I.alphaMode="BLEND"):I.alphaMode==="BLEND"&&(I.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:r,accessors:o,materials:y,textures:p,images:g,samplers:m,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var FP=FV;function Dl(e,t,n){let i,r,o,s;n?(i=0,r=e):(i=e._level+1,r=e._layer),typeof t=="number"?o=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=r,this._nodeIndex=o,this._resource=s,this._isLoading=!1,this._tile=void 0,this._data=void 0,this._geometryData=[],this._featureData=[],this._fields={},this._children=[],this._childrenReadyPromise=void 0,this._globalTransform=void 0,this._inverseGlobalTransform=void 0,this._inverseRotationMatrix=void 0,this._symbologyData=void 0}Object.defineProperties(Dl.prototype,{resource:{get:function(){return this._resource}},layer:{get:function(){return this._layer}},parent:{get:function(){return this._parent}},children:{get:function(){return this._children}},geometryData:{get:function(){return this._geometryData}},featureData:{get:function(){return this._featureData}},fields:{get:function(){return this._fields}},tile:{get:function(){return this._tile}},data:{get:function(){return this._data}}});Dl.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let r=e._create3DTileDefinition();e._tile=new ih(e._layer._tileset,e._dataProvider.resource,r,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let r=await mp.loadJson(this._resource);e._data=r,t();return}let n=await this._layer._getNodeInNodePages(this._nodeIndex);e._data=n;let i;e._isRoot?i="nodes/root/":l(n.mesh)&&(i=`../${n.mesh.geometry.resource}/`),l(i)&&l(e._parent.resource)&&(e._resource=e._parent.resource.getDerivedResource({url:i})),t()};function _Be(e,t){let n=new LV(e,t);return e._fields[t.name]=n,n.load()}Dl.prototype.loadFields=function(){let e=this._layer._data.attributeStorageInfo,t=[];if(l(e))for(let n=0;n<e.length;n++){let i=e[n],r=this._fields[i.name];l(r)?t.push(r.load()):t.push(_Be(this,i))}return Promise.all(t)};Dl.prototype.loadField=function(e){let t=this._fields[e];if(l(t))return t.load();let n=this._layer._data.attributeStorageInfo;if(l(n))for(let i=0;i<n.length;i++){let r=n[i];if(r.name===e)return _Be(this,r)}return Promise.resolve()};Dl.prototype.getFieldsForPickedPosition=function(e){let t=this.geometryData[0];if(!l(t.customAttributes.featureIndex))return{};let n=t.getClosestPointIndexOnTriangle(e.x,e.y,e.z);if(n.index===-1||n.index>t.customAttributes.featureIndex.length)return{};let i=t.customAttributes.featureIndex[n.index];return this.getFieldsForFeature(i)};Dl.prototype.getFieldsForFeature=function(e){let t={};for(let n in this.fields)if(this.fields.hasOwnProperty(n)){let i=this.fields[n];e>=0&&e<i.values.length&&(t[i.name]=i.values[e])}return t};Dl.prototype._loadChildren=function(){let e=this;if(l(this._childrenReadyPromise))return this._childrenReadyPromise;let t=[];if(l(e._data.children))for(let n=0;n<e._data.children.length;n++){let i=e._data.children[n],r=new Dl(e,i.href??i,!1);e._children.push(r),t.push(r.load())}return this._childrenReadyPromise=Promise.all(t).then(function(){for(let n=0;n<e._children.length;n++)e._tile.children.push(e._children[n]._tile)}),this._childrenReadyPromise};Dl.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new FP(this,this._data.geometryData[t].href);this._geometryData.push(n),e.push(n.load())}else if(l(this._data.mesh)){let t=this._layer._findBestGeometryBuffers(this._data.mesh.geometry.definition,["position","uv0"]),n=`./geometries/${t.bufferIndex}/`,i=new FP(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};Dl.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new NV(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};Dl.prototype._clearGeometryData=function(){this._geometryData=[]};Dl.prototype._create3DTileDefinition=function(){let e=this._data.obb,t=this._data.mbs;if(!l(e)&&!l(t)){console.error("Failed to load I3S node. Bounding volume is required.");return}let n;if(l(e)?n=he.fromDegrees(e.center[0],e.center[1],e.center[2]):n=he.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let b=0;b<this._dataProvider._geoidDataList.length;b++){let x=this._dataProvider._geoidDataList[b],T=x.projection.project(n);if(T.x>x.nativeExtent.west&&T.x<x.nativeExtent.east&&T.y>x.nativeExtent.south&&T.y<x.nativeExtent.north){n.height+=TUt(T.x,T.y,x);break}}let i,r,o;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},o=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),r=ee.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},r=ee.WGS84.cartographicToCartesian(n),o=this._data.mbs[3]),o*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let b=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=o/b}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let b=this._data.lodThreshold;s=o/b}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let b=0;b<this._data.lodSelection.length;b++)this._data.lodSelection[b].metricType==="maxScreenThreshold"&&(s=o/this._data.lodSelection[b].maxError);s===1/0&&(s=1e5);let a=s*16,c=new wc(0,0,0),u=At.headingPitchRollQuaternion(r,c);l(this._data.obb)&&(u=new Le(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let f=$.fromQuaternion(u),d=$.inverse(f,new $),p=new N(f[0],f[1],f[2],0,f[3],f[4],f[5],0,f[6],f[7],f[8],0,r.x,r.y,r.z,1),g=N.inverse(p,new N),m=N.clone(p);l(this._parent._globalTransform)&&N.multiply(p,this._parent._inverseGlobalTransform,m),this._globalTransform=p,this._inverseGlobalTransform=g,this._inverseRotationMatrix=d;let y=[];for(let b=0;b<this._children.length;b++)y.push(this._children[b]._create3DTileDefinition());return{children:y,refine:"REPLACE",boundingVolume:i,transform:[m[0],m[4],m[8],m[12],m[1],m[5],m[9],m[13],m[2],m[6],m[10],m[14],m[3],m[7],m[11],m[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:a}};Dl.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};Dl.prototype._createContentURL=async function(){let e={scene:0,scenes:[{nodes:[0]}],nodes:[{name:"singleNode"}],meshes:[],buffers:[],bufferViews:[],accessors:[],materials:[],textures:[],images:[],samplers:[],asset:{version:"2.0"}},t=[this._loadGeometryData()];if(this._dataProvider.legacyVersion16&&t.push(this._loadFeatureData()),await Promise.all(t),l(this._geometryData)&&this._geometryData.length>0){this._dataProvider._applySymbology&&await this._loadSymbology();let r=this._geometryData[0].resource.url,o=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await MV.decode(r,o,s,this._featureData[0],this._symbologyData);if(!l(a))return;e=s._generateGltf(a.meshData.nodesInScene,a.meshData.nodes,a.meshData.meshes,a.meshData.buffers,a.meshData.bufferViews,a.meshData.accessors,a.meshData.rootExtensions,a.meshData.extensionsUsed),this._geometryData[0]._customAttributes=a.meshData._customAttributes}let n=this._dataProvider._binarizeGltf(e),i=new Blob([n],{type:"application/binary"});return URL.createObjectURL(i)};async function AUt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let r=e.loadField(t[i].name);n.push(r)}return await Promise.all(n),t}function bUt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],r;e<i.length&&(r=i[e]);let o=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===r){o=!0;break}return o}async function yBe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await AUt(e);if(i.length>0)for(let r=0;r<n.featuresLength;r++)for(let o=0;o<i.length;o++){let s=i[o];if(!bUt(r,e._fields[s.name],s)){n.setShow(r,!1);break}}}t.show=!0}Dl.prototype._filterFeatures=function(){let e=[];for(let n=0;n<this._children.length;n++){let i=this._children[n]._filterFeatures();e.push(i)}let t=this._tile?.content?._model;if(l(this._geometryData)&&this._geometryData.length>0&&l(t)&&t.ready){t.show=!1;let n=yBe(this,t);e.push(n)}return Promise.all(e)};ih.prototype._hookedRequestContent=ih.prototype.requestContent;ih.prototype.requestContent=function(){if(!this.tileset._isI3STileSet)return this._hookedRequestContent();if(!this._isLoading){this._isLoading=!0;let e=this;return this._i3sNode._createContentURL().then(t=>{if(!l(t)){e._isLoading=!1;return}return e._contentResource=new De({url:t}),e._hookedRequestContent()}).then(t=>{let n=t?._model;return l(e._i3sNode._geometryData)&&e._i3sNode._geometryData.length>0&&l(n)&&(n.show=!1,n.readyEvent.addEventListener(()=>{yBe(e._i3sNode,n)})),e._isLoading=!1,t})}};function xUt(e,t,n,i,r,o){let s=n*(1-e)+i*e,a=r*(1-e)+o*e;return s*(1-t)+a*t}function bW(e,t,n,i){let r=e+t*n;return i[r]}function TUt(e,t,n){let i=n.nativeExtent,r=(e-i.west)/(i.east-i.west)*(n.width-1),o=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(r),a=Math.floor(o);r-=s,o-=a;let c=s<n.width?s+1:s,u=a<n.height?a+1:a;a=n.height-1-a,u=n.height-1-u;let f=bW(s,a,n.width,n.buffer),d=bW(c,a,n.width,n.buffer),p=bW(s,u,n.width,n.buffer),g=bW(c,u,n.width,n.buffer),m=xUt(r,o,f,d,p,g);return m=m*n.scale+n.offset,m}Object.defineProperties(ih.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var BP=Dl;function xW(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(xW.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function zae(e,t){let n=[];for(let i=0;i<e.length;i++){let r=z.byteToFloat(e[i]);i<3?n.push(lC(r)):n.push(r)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function kP(e,t){let n={edges:void 0,material:void 0};if(l(e)&&l(e.symbolLayers))for(let i=0;i<e.symbolLayers.length;i++){let r=e.symbolLayers[i];if(r.type==="Fill"){let o=r.edges,s=r.outline;if(l(o)?(n.edges={},l(o.color)&&(n.edges.color=zae(o.color,o.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=zae(s.color,s.transparency))),!t){let a=r.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=zae(a.color,a.transparency)))}break}}return n}function EUt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let r=e.uniqueValueGroups[i].classes;if(l(r))for(let o=0;o<r.length;o++){let s=kP(r[o].symbol,t),a=r[o].values;for(let c=0;c<a.length;c++){let u=a[c],f=n;for(let d=0;d<u.length;d++){let p=u[d];d===u.length-1?f[p]=s:(l(f[p])||(f[p]={}),f=f[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let r=e.uniqueValueInfos[i];n[r.value]=kP(r.symbol,t)}return n}}function CUt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(r,o){let s=r.classMaxValue??r.classMinValue,a=o.classMaxValue??o.classMinValue;return s-a});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let r=0;r<n.length;r++){let o=n[r];l(o.classMinValue)&&(i.ranges.length===0||o.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(o.classMinValue),i.symbols.push(void 0)),l(o.classMaxValue)&&(i.ranges.length===0||o.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(o.classMaxValue),i.symbols.push(kP(o.symbol,t)))}return i.symbols.push(void 0),i}}xW.prototype._parseLayerSymbology=function(){let e=this._layer.data.drawingInfo;if(l(e)&&l(e.renderer)){let t=this._layer.data.cachedDrawingInfo,n=l(t)&&t.color===!0,i=e.renderer;i.type==="simple"?this._defaultSymbology=kP(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=kP(i.defaultSymbol,n),this._valueFields.push(i.field1),l(i.field2)&&this._valueFields.push(i.field2),l(i.field3)&&this._valueFields.push(i.field3),this._uniqueValueHash=EUt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=kP(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=CUt(i,n))}};function ABe(e,t,n,i){let r=t[n];if(i<r.length){let o=r[i],s=e[o];return l(s)&&++n<t.length?ABe(s,t,n,i):s}}function vUt(e,t){let n=0,i=e.length;if(n<i)do{let r=n+i>>>1;e[r]<t?n=r+1:i=r}while(n<i);return n}function SUt(e,t,n){let i=t[n],r=vUt(e.ranges,i);return e.symbols[r]}xW.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let o=0;o<this._valueFields.length;o++)n.push(e.loadField(this._valueFields[o]));await Promise.all(n);let i=[];for(let o=0;o<this._valueFields.length;o++)i.push(e.fields[this._valueFields[o]].values);let r;if(l(this._uniqueValueHash)?r=o=>ABe(this._uniqueValueHash,i,0,o):l(this._classBreaksHash)&&(r=o=>SUt(this._classBreaksHash,i[0],o)),l(r)){let o=i[0];for(let s=0;s<o.length;s++){let a=r(s);l(a)&&(t[s]=a)}}}return t};var BV=xW;function _f(e,t,n){this._dataProvider=e,this._parent=n,!l(t.href)&&l(t.id)&&(t.href=`layers/${t.id}`);let i=this._parent.resource.getUrlComponent(),r;i.match(/layers\/\d/)?r=`${i}`.replace(/\/+$/,""):r=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let o=this._version.split(".");this._majorVersion=parseInt(o[0]),this._minorVersion=o.length>1?parseInt(o[1]):0,this._resource=new De({url:r}),this._resource.setQueryParameters(this._dataProvider.resource.queryParameters),this._resource.appendForwardSlash(),this._data=t,this._rootNode=void 0,this._nodePages={},this._nodePageFetches={},this._extent=void 0,this._tileset=void 0,this._geometryDefinitions=void 0,this._filters=[],this._symbology=void 0,this._computeGeometryDefinitions(!0),this._computeExtent()}Object.defineProperties(_f.prototype,{resource:{get:function(){return this._resource}},rootNode:{get:function(){return this._rootNode}},tileset:{get:function(){return this._tileset}},data:{get:function(){return this._data}},version:{get:function(){return this._version}},majorVersion:{get:function(){return this._majorVersion}},minorVersion:{get:function(){return this._minorVersion}},legacyVersion16:{get:function(){if(l(this.version))return this.majorVersion<1||this.majorVersion===1&&this.minorVersion<=6}}});_f.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new oe(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new BV(this)),await this._dataProvider.loadGeoidData(),await this._loadRootNode(e),await this._create3DTileset(e),this._rootNode._tile=this._tileset._root,this._tileset._root._i3sNode=this._rootNode,this.legacyVersion16)return this._rootNode._loadChildren()};_f.prototype._computeGeometryDefinitions=function(e){if(this._geometryDefinitions=[],l(this._data.geometryDefinitions))for(let t=0;t<this._data.geometryDefinitions.length;t++){let n=[],i=this._data.geometryDefinitions[t].geometryBuffers;for(let r=0;r<i.length;r++){let o=i[r],s=[],a=!1;if(l(o.compressedAttributes)&&e){a=!0;let c=o.compressedAttributes.attributes;for(let u=0;u<c.length;u++)s.push(c[u])}else for(let c in o)c!=="offset"&&s.push(c);n.push({compressed:a,attributes:s,index:i.indexOf(o)})}n.sort(function(r,o){return r.compressed&&!o.compressed?-1:!r.compressed&&o.compressed?1:r.attributes.length-o.attributes.length}),this._geometryDefinitions.push(n)}};_f.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n)){for(let i=0;i<n.length;++i){let r=n[i],o=!1,s=r.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){o=!0;break}if(!o)return{bufferIndex:r.index,definition:n,geometryBufferInfo:r}}if(l(n[0]))return{bufferIndex:0,definition:n,geometryBufferInfo:n[0]}}};_f.prototype._loadRootNode=function(e){if(l(this._data.nodePages)){let t=0;l(this._data.nodePages.rootIndex)&&(t=this._data.nodePages.rootIndex),this._rootNode=new BP(this,t,!0)}else this._rootNode=new BP(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};_f.prototype._getNodeInNodePages=function(e){let t=Math.floor(e/this._data.nodePages.nodesPerPage),n=e%this._data.nodePages.nodesPerPage;return this._loadNodePage(t).then(function(i){return i.nodes[n]})};_f._fetchJson=function(e){return e.fetchJson()};_f.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=_f._fetchJson(n).then(function(r){return l(r.error)&&r.error.code!==200?Promise.reject(r.error):(t._nodePages[e]=r.nodes,r)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};_f.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ie.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ie.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};_f.prototype._create3DTileset=async function(e){let t={asset:{version:"1.0"},geometricError:Number.MAX_VALUE,root:this._rootNode._create3DTileDefinition()},n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n),r=this._symbology?.defaultSymbology?.edges?.color;l(r)&&!l(e?.outlineColor)&&(e=l(e)?Je(e):{},e.outlineColor=z.fromCartesian4(se.fromArray(r))),this._tileset=await Yo.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(o){o._i3sNode._clearGeometryData(),URL.revokeObjectURL(o._contentResource._url),o._contentResource=o._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(o){l(o._i3sNode)&&o._i3sNode._loadChildren()})};_f.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};_f.prototype.filterByAttributes=function(e){this._filters=l(e)?Je(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var RC=_f;function TW(e,t){this._dataProvider=e,this._resource=new De({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(TW.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},names:{get:function(){let e=[],t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n)e.push(t[n].fieldName);return e}}});TW.prototype.load=async function(){return this._data=await mp.loadJson(this._resource),this._data};TW.prototype._getValues=function(e){let t=this._data.summary;if(l(t))for(let n=0;n<t.length;++n){let i=t[n];if(i.fieldName===e)return l(i.mostFrequentValues)?[...i.mostFrequentValues]:[]}};var kV=TW;function UV(e,t,n){this._dataProvider=e,this._parent=t,this._data=n,this._name=n.name,this._modelName=n.modelName,this._visibility=n.visibility??!0,this._resource=void 0,this._sublayers=[],this._i3sLayers=[]}Object.defineProperties(UV.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},name:{get:function(){return this._name}},modelName:{get:function(){return this._modelName}},sublayers:{get:function(){return this._sublayers}},visibility:{get:function(){return this._visibility},set:function(e){if(this._visibility!==e){this._visibility=e;for(let t=0;t<this._i3sLayers.length;t++)this._i3sLayers[t]._updateVisibility()}}},show:{get:function(){return this._visibility&&this._parent.show}}});UV._fromData=async function(e,t,n,i){let r=new UV(e,i,n);if(r._data.layerType==="group"){let o=r._data.sublayers;if(l(o)){let s=[];for(let c=0;c<o.length;c++){let u=UV._fromData(e,t,o[c],r);s.push(u)}let a=await Promise.all(s);for(let c=0;c<a.length;c++){let u=a[c];r._sublayers.push(u),r._i3sLayers.push(...u._i3sLayers)}}}else if(r._data.layerType==="3DObject"){let o=t.concat(`/sublayers/${r._data.id}`),s=new De({url:o});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),r._resource=s;let a=await mp.loadJson(r._resource),c=new RC(e,a,r);r._i3sLayers.push(c)}else console.log(`${r._data.layerType} layer ${r._data.name} is skipped as not supported.`);return r};var zV=UV;var TBe=Qo(bBe(),1);function fa(e){e=e??H.EMPTY_OBJECT,this._name=e.name,this._show=e.show??!0,this._geoidTiledTerrainProvider=e.geoidTiledTerrainProvider,this._showFeatures=e.showFeatures??!1,this._adjustMaterialAlphaMode=e.adjustMaterialAlphaMode??!1,this._applySymbology=e.applySymbology??!1,this._calculateNormals=e.calculateNormals??!1,this._cesium3dTilesetOptions=e.cesium3dTilesetOptions??H.EMPTY_OBJECT,this._layers=[],this._sublayers=[],this._data=void 0,this._extent=void 0,this._geoidDataPromise=void 0,this._geoidDataList=void 0,this._decoderTaskProcessor=void 0,this._taskProcessorReadyPromise=void 0,this._attributeStatistics=[],this._layersExtent=[]}Object.defineProperties(fa.prototype,{name:{get:function(){return this._name}},show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(let t=0;t<this._layers.length;t++)this._layers[t]._updateVisibility()}}},geoidTiledTerrainProvider:{get:function(){return this._geoidTiledTerrainProvider}},layers:{get:function(){return this._layers}},sublayers:{get:function(){return this._sublayers}},data:{get:function(){return this._data}},extent:{get:function(){return this._extent}},resource:{get:function(){return this._resource}},showFeatures:{get:function(){return this._showFeatures}},adjustMaterialAlphaMode:{get:function(){return this._adjustMaterialAlphaMode}},applySymbology:{get:function(){return this._applySymbology}},calculateNormals:{get:function(){return this._calculateNormals}}});fa.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return le(this)};fa.prototype.isDestroyed=function(){return!1};fa.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};fa.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};fa.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};fa.prototype.updateForPass=function(e,t){for(let n=0;n<this._layers.length;n++)l(this._layers[n]._tileset)&&this._layers[n]._tileset.updateForPass(e,t)};function wUt(e,t){let n=e.resource.getUrlComponent(),i;return n.match(/layers\/\d/)?i=`${n}`.replace(/\/+$/,""):i=`${n}`.replace(/\/?$/,"/").concat(`layers/${t}`),i}async function xBe(e,t,n){if(t.layerType==="Building"){l(n.showFeatures)||(e._showFeatures=!0),l(n.adjustMaterialAlphaMode)||(e._adjustMaterialAlphaMode=!0),l(n.applySymbology)||(e._applySymbology=!0),l(n.calculateNormals)||(e._calculateNormals=!0);let i=wUt(e,t.id);if(l(t.sublayers)){let r=[];for(let s=0;s<t.sublayers.length;s++){let a=zV._fromData(e,i,t.sublayers[s],e);r.push(a)}let o=await Promise.all(r);for(let s=0;s<o.length;s++){let a=o[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(l(t.statisticsHRef)){let r=i.concat(`/${t.statisticsHRef}`),o=new kV(e,r);await o.load(),e._attributeStatistics.push(o)}if(l(t.fullExtent)){let r=ie.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(r)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new RC(e,t,e);e._layers.push(i),l(i._extent)&&e._layersExtent.push(i._extent)}else console.log(`${t.layerType} layer ${t.name} is skipped as not supported.`)}fa.fromUrl=async function(e,t){t=t??H.EMPTY_OBJECT;let n=De.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await fa.loadJson(n),r=new fa(t);if(r._resource=n,r._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=xBe(r,i.layers[a],t);s.push(c)}await Promise.all(s)}else await xBe(r,i,t);r._computeExtent();let o=[];for(let s=0;s<r._layers.length;s++)o.push(r._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(o),r};fa._fetchJson=function(e){return e.fetchJson()};fa.loadJson=async function(e){let t=await fa._fetchJson(e);if(l(t.error)){if(console.error("Failed to fetch I3S ",e.url),l(t.error.message)&&console.error(t.error.message),l(t.error.details))for(let n=0;n<t.error.details.length;n++)console.log(t.error.details[n]);throw new oe(t.error)}return t};fa.prototype._loadBinary=async function(e){let t=await e.fetchArrayBuffer();if(t.byteLength>0&&new Uint8Array(t)[0]===123&&new TextDecoder().decode(t).includes("404"))throw new oe(`Failed to load binary: ${e.url}`);return t};fa.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),r={magic:new Uint8Array(i.buffer,0,4),version:new Uint32Array(i.buffer,4,1),length:new Uint32Array(i.buffer,8,1),chunkLength:new Uint32Array(i.buffer,12,1),chunkType:new Uint32Array(i.buffer,16,1),chunkData:new Uint8Array(i.buffer,20,n.byteLength)};return r.magic[0]=103,r.magic[1]=108,r.magic[2]=84,r.magic[3]=70,r.version[0]=2,r.length[0]=i.byteLength,r.chunkLength[0]=n.byteLength,r.chunkType[0]=1313821514,r.chunkData.set(n),i};var IUt=new U;function PUt(e,t){let n=e.tilingScheme,i=[],r={},o=e._lodCount,s=he.fromRadians(t.west,t.north),a=he.fromRadians(t.east,t.south),c=n.positionToTileXY(s,o),u=n.positionToTileXY(a,o);for(let d=c.x;d<=u.x;d++)for(let p=c.y;p<=u.y;p++){let g=U.fromElements(d,p,IUt),m=g.toString();if(!r.hasOwnProperty(m)){let y={x:g.x,y:g.y,level:o,tilingScheme:n,terrainProvider:e,positions:[]};r[m]=y,i.push(y)}}let f=[];for(let d=0;d<i.length;++d){let p=i[d],g=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);f.push(g)}return Promise.all(f).then(function(d){let p=[];for(let g=0;g<d.length;g++){let m={tilingScheme:n,x:i[g].x,y:i[g].y,level:i[g].level},y=d[g],A="Geographic";n._projection instanceof yi&&(A="WebMercator");let b={projectionType:A,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(m.x,m.y,m.level),height:y._height,width:y._width,scale:y._structure.heightScale,offset:y._structure.heightOffset};if(y._encoding===xh.LERC){let x=TBe.default.decode(y._buffer);b.buffer=x.pixels[0]}else b.buffer=y._buffer;p.push(b)}return p})}async function DUt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await PUt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}fa.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=DUt(this),this._geoidDataPromise)};fa.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?ie.union(e,n,e):e=ie.clone(n)}this._extent=e};fa.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};fa.prototype.getAttributeValues=function(e){for(let t=0;t<this._attributeStatistics.length;++t){let n=this._attributeStatistics[t]._getValues(e);if(l(n))return n}return[]};fa.prototype.filterByAttributes=function(e){let t=[];for(let n=0;n<this._layers.length;n++){let i=this._layers[n].filterByAttributes(e);t.push(i)}return Promise.all(t)};var mp=fa;function W0(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new ai({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new ai({depthStencil:!0,createDepthAttachments:!1}),this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new ui({color:new z(0,0,0,0),owner:this}),this._clearCommand=new ui({color:new z(0,0,0,0),depth:1,stencil:0});let e=this;this._uniformMap={colorTexture:function(){return e._fbo.getColorTexture()},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._fboClassified.getColorTexture()}}}Object.defineProperties(W0.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});W0.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var RUt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:ei.EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:ei.NEVER,reference:0,mask:Yt.CLASSIFICATION_MASK},blending:tn.ALPHA_BLEND},OUt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:ei.NOT_EQUAL,frontOperation:{fail:Rt.KEEP,zFail:Rt.KEEP,zPass:Rt.KEEP},backFunction:ei.NEVER,reference:0,mask:Yt.CLASSIFICATION_MASK},blending:tn.ALPHA_BLEND},MUt={depthMask:!0,depthTest:{enabled:!0},stencilTest:Yt.setCesium3DTileBit(),stencilMask:Yt.CESIUM_3D_TILE_MASK,blending:tn.ALPHA_BLEND},NUt=`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
uniform sampler2D classifiedTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
if (color.a == 0.0)
{
discard;
}
bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
#ifdef UNCLASSIFIED
vec4 highlightColor = czm_invertClassificationColor;
if (isClassified)
{
discard;
}
#else
vec4 highlightColor = vec4(1.0);
if (!isClassified)
{
discard;
}
#endif
out_FragColor = color * highlightColor;
gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
}
`,LUt=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
if (color.a == 0.0)
{
discard;
}
#ifdef UNCLASSIFIED
out_FragColor = color * czm_invertClassificationColor;
#else
out_FragColor = color;
#endif
}
`;W0.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),r=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let o=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,c=!l(i)||i.width!==s||i.height!==a;if((c||r||o)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new Dt({context:e,width:s,height:a,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new Ff({context:e,width:s,height:a,format:nu.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||r||o){this._fbo.destroy(),this._fboClassified.destroy();let u,f;l(this._previousFramebuffer)?(u=n.getDepthStencilTexture(),f=n.getDepthStencilRenderbuffer()):(u=this._depthStencilTexture,f=this._depthStencilRenderbuffer),this._fbo.setDepthStencilTexture(u),l(f)&&this._fbo.setDepthStencilRenderbuffer(f),this._fbo.update(e,s,a,t),l(this._previousFramebuffer)||(this._fboClassified.setDepthStencilTexture(u),this._fboClassified.update(e,s,a))}if(l(this._rsUnclassified)||(this._rsUnclassified=Ge.fromCache(RUt),this._rsClassified=Ge.fromCache(OUt),this._rsDefault=Ge.fromCache(MUt)),!l(this._unclassifiedCommand)||r||o){l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());let u=l(this._previousFramebuffer)?LUt:NUt,f=new Ye({defines:["UNCLASSIFIED"],sources:[u]}),d=new Ye({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(f,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(d,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(gf,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};W0.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};W0.prototype.clear=function(e,t){l(this._previousFramebuffer)?this._fbo.clear(e,this._clearColorCommand,t):(this._fbo.clear(e,this._clearCommand,t),this._fboClassified.clear(e,this._clearCommand,t))};W0.prototype.executeClassified=function(e,t){if(!l(this._previousFramebuffer)){let n=t.framebuffer;this.prepareTextures(e,!0),t.framebuffer=this._fboClassified.framebuffer,this._translucentCommand.execute(e,t),t.framebuffer=n}this._classifiedCommand.execute(e,t)};W0.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};W0.prototype.isDestroyed=function(){return!1};W0.prototype.destroy=function(){return this._fbo.destroy(),this._fboClassified.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),le(this)};var UP=W0;var VV={};VV.createTilesetFromIModelId=async function({iModelId:e,changesetId:t,tilesetOptions:n}){let{exports:i}=await la.getExports(e,t);if(i.length>0&&i.every(c=>c.status===la.ExportStatus.Invalid))throw new oe(`All exports for this iModel are Invalid: ${e}`);let r=i.find(c=>c.status===la.ExportStatus.Complete);if(!l(r))return;let o=new URL(r._links.mesh.href);o.pathname=`${o.pathname}/tileset.json`;let s=o.toString(),a=new De({url:s});return Yo.fromUrl(a,n)};VV.createTilesetForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i,tilesetOptions:r}){if(!l(n)||!l(i)){let c=await la.getRealityDataMetadata(e,t);i=c.rootDocument,n=c.type}if(![la.RealityDataType.Cesium3DTiles,la.RealityDataType.PNTS,la.RealityDataType.RealityMesh3DTiles,la.RealityDataType.Terrain3DTiles,la.RealityDataType.GaussianSplat3DTiles].includes(n))throw new oe(`Reality data type is not a mesh type: ${n}`);let s=await la.getRealityDataURL(e,t,i),a={maximumScreenSpaceError:4,...r};return Yo.fromUrl(s,a)};VV.createDataSourceForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i}){if(!l(n)||!l(i)){let s=await la.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![la.RealityDataType.KML,la.RealityDataType.GeoJSON].includes(n))throw new oe(`Reality data type is not a data source type: ${n}`);let o=await la.getRealityDataURL(e,t,i);return n===la.RealityDataType.GeoJSON?mb.load(o):YE.load(o)};VV.loadGeospatialFeatures=async function({iTwinId:e,collectionId:t,limit:n}){let i=n??1e4,r=`${la.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,o=new De({url:r,headers:{Authorization:la._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return mb.load(o)};var Vae=VV;function CW(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(CW.prototype,{total:{get:function(){return this._total}}});function Bb(e){let t=new Array(Oc.NUMBER_OF_JOB_TYPES);t[Oc.TEXTURE]=new CW(l(e)?e[Oc.TEXTURE]:10),t[Oc.PROGRAM]=new CW(l(e)?e[Oc.PROGRAM]:10),t[Oc.BUFFER]=new CW(l(e)?e[Oc.BUFFER]:30);let n=t.length,i,r=0;for(i=0;i<n;++i)r+=t[i].total;let o=new Array(n);for(i=0;i<n;++i)o[i]=!1;this._totalBudget=r,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=o}Bb.getTimestamp=xn;Object.defineProperties(Bb.prototype,{totalBudget:{get:function(){return this._totalBudget}}});Bb.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};Bb.prototype.resetBudgets=function(){let e=this._budgets,t=e.length;for(let n=0;n<t;++n){let i=e[n];i.starvedLastFrame=i.starvedThisFrame,i.starvedThisFrame=!1,i.usedThisFrame=0,i.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0};Bb.prototype.execute=function(e,t){let n=this._budgets,i=n[t],r=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&r)return i.starvedThisFrame=!0,!1;let o;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,u;for(u=0;u<c&&(o=n[u],!(o.usedThisFrame+o.stolenFromMeThisFrame<o.total&&!o.starvedLastFrame));++u);if(u===c&&r)return!1;r&&(i.starvedThisFrame=!0)}let s=Bb.getTimestamp();e.execute();let a=Bb.getTimestamp()-s;return this._totalUsedThisFrame+=a,o?o.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var jV=Bb;var jae=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function HV(e,t){this.spatialNode=e,this.keyframe=t,this.state=jae.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}HV.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=jae.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};HV.priorityComparator=function(e,t){return e.priority-t.priority};HV.searchComparator=function(e,t){return e.keyframe-t.keyframe};HV.LoadState=jae;var Hr=HV;function EBe(){}Object.defineProperties(EBe.prototype,{color:{get:pe.throwInstantiationError},intensity:{get:pe.throwInstantiationError}});var Hae=EBe;var FUt=/\/$/,CBe=new It('&copy; <a href="https://www.mapbox.com/about/maps/">Mapbox</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function zP(e){e=e??H.EMPTY_OBJECT;let t=e.styleId,n=e.accessToken;this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0;let i=De.createIfNeeded(e.url??"https://api.mapbox.com/styles/v1/");this._styleId=t,this._accessToken=n;let r=e.tilesize??512;this._tilesize=r;let o=e.username??"mapbox";this._username=o;let s=l(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();FUt.test(a)||(a+="/"),a+=`${this._username}/${t}/tiles/${this._tilesize}/{z}/{x}/{y}${s}`,i.url=a,i.setQueryParameters({access_token:n});let c;l(e.credit)?(c=e.credit,typeof c=="string"&&(c=new It(c))):c=CBe,this._resource=i,this._imageryProvider=new vs({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(zP.prototype,{url:{get:function(){return this._imageryProvider.url}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}});zP.prototype.getTileCredits=function(e,t,n){};zP.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};zP.prototype.pickFeatures=function(e,t,n,i,r){return this._imageryProvider.pickFeatures(e,t,n,i,r)};zP._defaultCredit=CBe;var Gae=zP;function q0(e,t,n,i,r=134217728,o){let s=BUt(i),a=kUt(n),c=n*Lt.getSizeInBytes(i),u=q0.get3DTextureDimension(t,c,r,o),f=h.divideComponents(u,t,new h);this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*u.x*u.y*u.z,this.tileCounts=h.clone(f,new h),this.voxelCountPerTile=h.clone(t,new h),this.maximumTileCount=f.x*f.y*f.z,this.texture=new CU({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:u.x,height:u.y,depth:u.z,sampler:new Ht({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:Zn.LINEAR})}),this.nodes=new Array(this.maximumTileCount);for(let d=0;d<this.maximumTileCount;d++)this.nodes[d]=new UUt(d);for(let d=0;d<this.maximumTileCount;d++){let p=this.nodes[d];p.previousNode=d>0?this.nodes[d-1]:void 0,p.nextNode=d<this.maximumTileCount-1?this.nodes[d+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0,this._nearestSampling=!1}Object.defineProperties(q0.prototype,{nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(e?this.texture.sampler=Ht.NEAREST:this.texture.sampler=new Ht({wrapR:hn.CLAMP_TO_EDGE,wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:Wt.LINEAR,magnificationFilter:Zn.LINEAR}),this._nearestSampling=e)}}});function BUt(e){if(e===Lt.FLOAT32||e===Lt.FLOAT64)return ze.FLOAT;if(e===Lt.UINT8)return ze.UNSIGNED_BYTE}function kUt(e){switch(e){case 1:return Ke.RED;case 2:return Ke.RG;case 3:return Ke.RGB;case 4:return Ke.RGBA}}function UUt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}q0.prototype.add=function(e){if(this.isFull())throw new pe("Trying to add when there are no empty spots");let t=this.emptyList;this.emptyList=this.emptyList.nextNode,l(this.emptyList)&&(this.emptyList.previousNode=void 0),t.nextNode=this.occupiedList,l(t.nextNode)&&(t.nextNode.previousNode=t),this.occupiedList=t;let n=t.index;return this.writeDataToTexture(n,e),this.occupiedCount++,n};q0.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new pe("Megatexture index out of bounds");let t=this.nodes[e];l(t.previousNode)&&(t.previousNode.nextNode=t.nextNode),l(t.nextNode)&&(t.nextNode.previousNode=t.previousNode),t.nextNode=this.emptyList,l(t.nextNode)&&(t.nextNode.previousNode=t),t.previousNode=void 0,this.emptyList=t,this.occupiedCount--};q0.prototype.isFull=function(){return this.emptyList===void 0};q0.get3DTextureDimension=function(e,t,n,i){let{maximum3DTextureSize:r}=Ut;if(h.maximumComponent(e)>r)throw new oe("The GL context does not support a 3D texture large enough to contain a tile with the given dimensions.");let o=t*e.x*e.y*e.z,s=Math.floor(n/o);if(s<1)throw new oe("Not enough texture memory available to create a megatexture with the given tile dimensions.");l(i)?i=Math.min(i,s):i=s;let a=Object.entries(e).sort((f,d)=>d[1]-f[1]),c=a.map(([f,d])=>Math.floor(r/d));for(let f=0;f<3;f++){let d=vBe(c);if(d<i)break;let p=c.slice();p.splice(f,1);let g=p[0]*p[1],m=d-i,y=Math.floor(m/g);c[f]-=y}vBe(c)>s&&(c[2]=Math.floor(s/(c[0]*c[1])));let u=new h;for(let f=0;f<3;f++){let[d,p]=a[f];u[d]=c[f]*p}return u};function vBe(e){return e.reduce((t,n)=>t*n)}q0.prototype.writeDataToTexture=function(e,t){let{tileCounts:n,voxelCountPerTile:i}=this,r={arrayBufferView:t,width:i.x,height:i.y,depth:i.z},o=n.x*n.y,s=Math.floor(e/o),a=e-s*o,c=Math.floor(a/n.x),u=a-c*n.x,f={source:r,xOffset:u*i.x,yOffset:c*i.y,zOffset:s*i.z};this.texture.copyFrom(f)};q0.prototype.isDestroyed=function(){return!1};q0.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),le(this)};var GV=q0;var Ec={};Ec.decodeRawMetadataValue=function(e,t,n){switch(e){case Lt.INT8:return t.getInt8(n);case Lt.UINT8:return t.getUint8(n);case Lt.INT16:return t.getInt16(n,!0);case Lt.UINT16:return t.getUint16(n,!0);case Lt.INT32:return t.getInt32(n,!0);case Lt.UINT32:return t.getUint32(n,!0);case Lt.INT64:return t.getBigInt64(n,!0);case Lt.UINT64:return t.getBigUint64(n,!0);case Lt.FLOAT32:return t.getFloat32(n,!0);case Lt.FLOAT64:return t.getFloat64(n,!0)}throw new oe(`Invalid component type: ${e}`)};Ec.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,r=Ec.decodeRawMetadataValue(i,t,n);return e.normalized?Lt.normalize(r,i):r};Ec.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,r=Lt.getSizeInBytes(i),o=e.type,s=bt.getComponentCount(o),a=r*s;if(s>1){let f=Array(s);for(let d=0;d<s;d++){let p=n*a+d*r,g=Ec.decodeRawMetadataValueComponent(e,t,p);f[d]=g}return f}let c=n*a;return Ec.decodeRawMetadataValueComponent(e,t,c)};Ec.decodeRawMetadataValues=function(e,t){let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.isArray){let r=e.arrayLength,o=Array(r);for(let s=0;s<r;s++){let a=Ec.decodeRawMetadataValueElement(e,n,s);o[s]=a}return o}return Ec.decodeRawMetadataValueElement(e,n,0)};Ec.convertToObjectType=function(e,t){if(!l(t)||e===bt.SCALAR||e===bt.STRING||e===bt.BOOLEAN||e===bt.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case bt.VEC2:return U.unpack(n,0,new U);case bt.VEC3:return h.unpack(n,0,new h);case bt.VEC4:return se.unpack(n,0,new se);case bt.MAT2:return Xi.unpack(n,0,new Xi);case bt.MAT3:return $.unpack(n,0,new $);case bt.MAT4:return N.unpack(n,0,new N)}throw new oe(`Invalid metadata object type: ${e}`)};Ec.convertFromObjectType=function(e,t){if(!l(t)||e===bt.SCALAR||e===bt.STRING||e===bt.BOOLEAN||e===bt.ENUM)return t;switch(e){case bt.VEC2:return U.pack(t,Array(2));case bt.VEC3:return h.pack(t,Array(3));case bt.VEC4:return se.pack(t,Array(4));case bt.MAT2:return Xi.pack(t,Array(4));case bt.MAT3:return $.pack(t,Array(9));case bt.MAT4:return N.pack(t,Array(16))}throw new oe(`Invalid metadata object type: ${e}`)};Ec.decodeMetadataValues=function(e,t,n){let i=Ec.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let o=Ec.convertFromObjectType(e.type,t.offset),s=Ec.convertFromObjectType(e.type,t.scale);i=Vp.valueTransformInPlace(i,o,s,Lt.applyValueTransform)}if(e.isArray){let o=e.arrayLength,s=Array(o);for(let a=0;a<o;a++){let c=i[a],u=Ec.convertToObjectType(e.type,c);s[a]=u}return s}return Ec.convertToObjectType(e.type,i)};var WV=Object.freeze(Ec);function qV(e){e=e??H.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=Zt("Assets/Textures/moonSmall.jpg")),this.show=e.show??!0,this.textureUrl=t,this._ellipsoid=e.ellipsoid??ee.MOON,this.onlySunLighting=e.onlySunLighting??!0,this._ellipsoidPrimitive=new sV({radii:this.ellipsoid.radii,material:Qi.fromType(Qi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new GU}Object.defineProperties(qV.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var vW=new $,zUt=new $,VUt=new h,SW=[];qV.prototype.update=function(e){if(!this.show)return;let t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;let n=e.time;l(At.computeIcrfToFixedMatrix(n,vW))||At.computeTemeToPseudoFixedMatrix(n,vW);let i=this._axes.evaluate(n,zUt);$.transpose(i,i),$.multiply(vW,i,i);let r=xb.computeMoonPositionInEarthInertialFrame(n,VUt);$.multiplyByVector(vW,r,r),N.fromRotationTranslation(i,r,t.modelMatrix);let o=e.commandList;return e.commandList=SW,SW.length=0,t.update(e),e.commandList=o,SW.length===1?SW[0]:void 0};qV.prototype.isDestroyed=function(){return!1};qV.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),le(this)};var YV=qV;var jUt=0,HUt=14,GUt=-1e3,WUt=1e4,qUt=2*Math.PI*ee.WGS84.maximumRadius,YUt=256,XUt=new ie,KUt=new ie,Wae=class{constructor(t,n){n=n??{},this._resource=De.createIfNeeded(t),this._urlTemplate=this._resource.url,this._extent=ie.clone(n.extent),this._minZoom=n.minZoom??jUt,this._maxZoom=n.maxZoom??HUt,this._featureIdProperty=n.featureIdProperty,this._heightReference=n.heightReference,this._scene=n.scene,this._show=!0,this._tileset=void 0,this._tilesetJsonUrl=void 0}static async fromUrl(t,n){let i=new this(t,n);return await i._initializeTileset(),i}get urlTemplate(){return this._urlTemplate}get resource(){return this._resource}get extent(){return this._extent}get tileset(){return this._tileset}get show(){return this._show}set show(t){this._show=t,l(this._tileset)&&(this._tileset.show=t)}_createRuntimeTilesetOptions(){return{minZoom:this._minZoom,maxZoom:this._maxZoom,extent:this._extent}}_createTilesetLoadOptions(){return{heightReference:this._heightReference,scene:this._scene}}_configureTileset(t){}_createCodec(){}async _initializeTileset(){let t=$Ut(this._resource,this._createRuntimeTilesetOptions()),n=new Blob([JSON.stringify(t)],{type:"application/json"}),i=URL.createObjectURL(n);this._tilesetJsonUrl=i;try{this._tileset=await Yo.fromUrl(i,this._createTilesetLoadOptions())}catch(r){throw URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,r}URL.revokeObjectURL(i),this._tilesetJsonUrl=void 0,this._configureTileset(this._tileset),this._tileset._runtimeContentCodec=this._createCodec(),this._tileset.show=this._show}update(t){l(this._tileset)&&this._tileset.update(t)}prePassesUpdate(t){l(this._tileset)&&this._tileset.prePassesUpdate(t)}postPassesUpdate(t){l(this._tileset)&&this._tileset.postPassesUpdate(t)}updateForPass(t,n){l(this._tileset)&&this._tileset.updateForPass(t,n)}isDestroyed(){return!1}destroy(){return l(this._tileset)&&(this._tileset.destroy(),this._tileset=void 0),l(this._tilesetJsonUrl)&&(URL.revokeObjectURL(this._tilesetJsonUrl),this._tilesetJsonUrl=void 0),this._resource=void 0,this._extent=void 0,this._featureIdProperty=void 0,le(this)}};function $Ut(e,t){let n=new Lo,i=l(t.extent)?ie.clone(t.extent):ie.clone(n.rectangle),r=ZUt(n,i,t.minZoom),o={boundingVolume:{region:IBe(i)},geometricError:wBe(0),refine:"REPLACE",children:[]};for(let s=r.minY;s<=r.maxY;s++)for(let a=r.minX;a<=r.maxX;a++){let c=SBe(n,e,i,t.minZoom,t.maxZoom,a,s);l(c)&&o.children.push(c)}return o.children.length===0&&(o.geometricError=0),{asset:{version:"1.1"},geometricError:o.geometricError,root:o}}function SBe(e,t,n,i,r,o,s){if(!QUt(e,i,o,s,n,XUt,KUt))return;let a=e.tileXYToRectangle(o,s,i,new ie),c={boundingVolume:{region:IBe(a)},geometricError:i<r?wBe(i):0,refine:"REPLACE",content:{uri:JUt(t,i,o,s)}};if(i>=r)return c;let u=i+1,f=[];for(let d=s*2;d<=s*2+1;d++)for(let p=o*2;p<=o*2+1;p++){let g=SBe(e,t,n,u,r,p,d);l(g)&&f.push(g)}return f.length>0?c.children=f:c.geometricError=0,c}function JUt(e,t,n,i){let o=e.url.replace(/\{z\}/gi,`${t}`).replace(/\{x\}/gi,`${n}`).replace(/\{y\}/gi,`${i}`);return Td(o)}function wBe(e){return qUt/((1<<e)*YUt)}function IBe(e){return[e.west,e.south,e.east,e.north,GUt,WUt]}function ZUt(e,t,n){let i=(1<<n)-1,r=he.fromRadians(t.west,t.north),o=he.fromRadians(t.east,t.south),s=e.positionToTileXY(r,n),a=e.positionToTileXY(o,n);return!l(s)||!l(a)||t.west>t.east?{minX:0,maxX:i,minY:0,maxY:i}:{minX:D.clamp(Math.min(s.x,a.x),0,i),maxX:D.clamp(Math.max(s.x,a.x),0,i),minY:D.clamp(Math.min(s.y,a.y),0,i),maxY:D.clamp(Math.max(s.y,a.y),0,i)}}function QUt(e,t,n,i,r,o,s){let a=e.tileXYToRectangle(n,i,t,o);return l(ie.intersection(a,r,s))}var XV=Wae;var wW=class extends XV{static async fromUrl(t,n){return super.fromUrl(t,n)}_createTilesetLoadOptions(){return{...super._createTilesetLoadOptions(),skipLevelOfDetail:!1,enablePick:!0,featureIdLabel:"featureId_0",instanceFeatureIdLabel:"instanceFeatureId_0"}}_configureTileset(t){t._modelUpAxis=Hi.Z,t._modelForwardAxis=Hi.X}_createCodec(){let t=this._featureIdProperty;return{contentType:"mvt",missingTilePolicy:{statusCodes:[404,204]},createContent:async(n,i,r,o)=>{let s=Zz(o),a=PBe(r.getUrlComponent(!0)),c=iz(s,a,{featureIdProperty:t});if(!l(c)){if(!ezt(s))return new n0(n,i);throw new oe("Decoded MVT tile did not produce vector glTF content.")}return MA.fromGltf(n,i,r,c)}}}};function PBe(e){let t=e.match(/\/(\d+)\/(\d+)\/(\d+)(?:\.[^/?#]+)?(?:[?#]|$)/i);return t?{tileZ:parseInt(t[1],10),tileX:parseInt(t[2],10),tileY:parseInt(t[3],10)}:(_t("MVTDataProvider.parseTileCoordinates",`MVT tile URL did not match /{z}/{x}/{y} pattern. Falling back to z/x/y = 0/0/0. URL: ${e}`),{tileZ:0,tileX:0,tileY:0})}function ezt(e){let t=e.layers;for(let n=0;n<t.length;n++)if(t[n].features.length>0)return!0;return!1}wW._parseTileCoordinates=PBe;var qae=wW;function Yae(e){}Yae.prototype.isReady=function(){return!0};Yae.prototype.shouldDiscardImage=function(e){return!1};var Xae=Yae;var VP=`#ifdef MRT
layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;
#else
layout (location = 0) out vec4 out_FragColor;
#endif
uniform vec4 u_bgColor;
uniform sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
{
#ifdef MRT
out_FragData_0 = u_bgColor;
out_FragData_1 = vec4(u_bgColor.a);
#else
out_FragColor = u_bgColor;
#endif
return;
}
discard;
}
`;var KV=`uniform sampler2D u_opaque;
uniform sampler2D u_accumulation;
uniform sampler2D u_revealage;
in vec2 v_textureCoordinates;
void main()
{
vec4 opaque = texture(u_opaque, v_textureCoordinates);
vec4 accum = texture(u_accumulation, v_textureCoordinates);
float r = texture(u_revealage, v_textureCoordinates).r;
#ifdef MRT
vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
#else
vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
#endif
out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;
if (opaque != czm_backgroundColor)
{
out_FragColor.a = 1.0;
}
}
`;function dy(e){this._numSamples=1,this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;let t=e.colorBufferFloat&&e.depthTexture&&e.floatBlend;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=new ai({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new ai({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new ai({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new ai({createColorAttachments:!1}),this._opaqueClearCommand=new ui({color:new z(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new ui({color:new z(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new ui({color:new z(0,0,0,0),owner:this}),this._alphaClearCommand=new ui({color:new z(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new et,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function DBe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function Kae(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function RBe(e){DBe(e),Kae(e)}function tzt(e,t,n,i){DBe(e),e._accumulationTexture=new Dt({context:t,width:n,height:i,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT}),e._revealageTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.FLOAT,width:n,height:i,flipY:!1})}function nzt(e,t){Kae(e);let n=te.FRAMEBUFFER_COMPLETE,i=!0,{width:r,height:o}=e._accumulationTexture;if(e._translucentMRTSupport&&(e._translucentFBO.setColorTexture(e._accumulationTexture,0),e._translucentFBO.setColorTexture(e._revealageTexture,1),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,r,o),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,r,o),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(Kae(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,r,o),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,r,o),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,r,o),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,r,o);let s=e._translucentFBO.status===n,a=e._alphaFBO.status===n,c=e._adjustTranslucentFBO.status===n,u=e._adjustAlphaFBO.status===n;(!s||!a||!c||!u)&&(RBe(e),e._translucentMultipassSupport=!1,i=!1)}return i}dy.prototype.update=function(e,t,n,i,r){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:o,height:s}=this._opaqueTexture,a=this._accumulationTexture,c=!l(a)||a.width!==o||a.height!==s||i!==this._useHDR,u=this._numSamples!==r;if((c||u)&&(this._numSamples=r,tzt(this,e,o,s)),(!l(this._translucentFBO.framebuffer)||c||u)&&!nzt(this,e))return;this._useHDR=i;let f=this,d,p;l(this._compositeCommand)||(d=new Ye({sources:[KV]}),this._translucentMRTSupport&&d.defines.push("MRT"),p={u_opaque:function(){return f._opaqueTexture},u_accumulation:function(){return f._accumulationTexture},u_revealage:function(){return f._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(d=new Ye({defines:["MRT"],sources:[VP]}),p={u_bgColor:function(){return f._translucentMRTClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(d=new Ye({sources:[VP]}),p={u_bgColor:function(){return f._translucentMultipassClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this}),p={u_bgColor:function(){return f._alphaClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(d,{uniformMap:p,owner:this}))),this._viewport.width=o,this._viewport.height=s;let g=!et.equals(this._viewport,t.viewport),m=g!==this._useScissorTest;this._useScissorTest=g,et.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=et.clone(t.viewport,this._scissorRectangle),m=!0),(!l(this._rs)||!et.equals(this._viewport,this._rs.viewport)||m)&&(this._rs=Ge.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),l(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)};var izt={enabled:!0,color:new z(0,0,0,0),equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.ONE,functionDestinationRgb:$r.ONE,functionSourceAlpha:$r.ZERO,functionDestinationAlpha:$r.ONE_MINUS_SOURCE_ALPHA},rzt={enabled:!0,color:new z(0,0,0,0),equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.ONE,functionDestinationRgb:$r.ONE,functionSourceAlpha:$r.ONE,functionDestinationAlpha:$r.ONE},ozt={enabled:!0,color:new z(0,0,0,0),equationRgb:Pc.ADD,equationAlpha:Pc.ADD,functionSourceRgb:$r.ZERO,functionDestinationRgb:$r.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:$r.ZERO,functionDestinationAlpha:$r.ONE_MINUS_SOURCE_ALPHA};function $ae(e,t,n,i){let r=n[i.id];if(!l(r)){let o=Ge.getState(i);o.depthMask=!1,o.blending=t,r=Ge.fromCache(o),n[i.id]=r}return r}function szt(e,t,n){return $ae(t,izt,e._translucentRenderStateCache,n)}function azt(e,t,n){return $ae(t,rzt,e._translucentRenderStateCache,n)}function czt(e,t,n){return $ae(t,ozt,e._alphaRenderStateCache,n)}var lzt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
float ai = czm_out_FragColor.a;
float wzi = czm_alphaWeight(ai);
out_FragData_0 = vec4(Ci * wzi, ai);
out_FragData_1 = vec4(ai * wzi);
`,uzt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
float ai = czm_out_FragColor.a;
float wzi = czm_alphaWeight(ai);
out_FragColor = vec4(Ci, ai) * wzi;
`,fzt=` float ai = czm_out_FragColor.a;
out_FragColor = vec4(ai);
`;function Jae(e,t,n,i){let{shaderCache:r}=e,o=r.getDerivedShaderProgram(t,n);if(l(o))return o;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(f){return Ye.replaceMain(f,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`#define CESIUM_REDIRECTED_COLOR_OUTPUT
vec4 czm_out_FragColor;
bool czm_discard = false;
`);let c=[...i.matchAll(/out_FragData_(\d+)/g)],u="";for(let f=0;f<c.length;f++){let d=c[f];u=`layout (location = ${d[1]}) out vec4 ${d[0]};
${u}`}return a.sources.push(u),a.sources.push(`void main()
{
czm_translucent_main();
if (czm_discard)
{
discard;
}
${i}}
`),r.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function dzt(e,t){return Jae(e,t,"translucentMRT",lzt)}function hzt(e,t){return Jae(e,t,"translucentMultipass",uzt)}function mzt(e,t){return Jae(e,t,"alphaMultipass",fzt)}dy.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let a,c;return l(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=at.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=dzt(t,e.shaderProgram),n.translucentCommand.renderState=szt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,r,o,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,r=n.translucentCommand.renderState,o=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=at.shallowClone(e,n.translucentCommand),n.alphaCommand=at.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=hzt(t,e.shaderProgram),n.translucentCommand.renderState=azt(this,t,e.renderState),n.alphaCommand.shaderProgram=mzt(t,e.shaderProgram),n.alphaCommand.renderState=czt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=r,n.alphaCommand.shaderProgram=o,n.alphaCommand.renderState=s),n};function pzt(e,t,n,i,r,o){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:u}=a,f=t._hdr,d=i.framebuffer,p=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(s,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let m=0;m<r.length;++m){let y=r[m];y=c?y.derivedCommands.logDepth.command:y,y=f?y.derivedCommands.hdr.command:y;let A=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(A,t,i,g)}if(l(o)){let m=o.unclassifiedCommand,y=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(y,t,i,g)}i.framebuffer=e._alphaFBO.framebuffer;for(let m=0;m<r.length;++m){let y=r[m];y=c?y.derivedCommands.logDepth.command:y,y=f?y.derivedCommands.hdr.command:y;let A=p&&y.receiveShadows?y.derivedCommands.oit.shadows.alphaCommand:y.derivedCommands.oit.alphaCommand;n(A,t,i,g)}if(l(o)){let m=o.unclassifiedCommand,y=p&&m.receiveShadows?m.derivedCommands.oit.shadows.alphaCommand:m.derivedCommands.oit.alphaCommand;n(y,t,i,g)}i.framebuffer=d}function gzt(e,t,n,i,r,o){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:u}=a,f=t._hdr,d=i.framebuffer,p=u.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let g=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let m=0;m<r.length;++m){let y=r[m];y=c?y.derivedCommands.logDepth.command:y,y=f?y.derivedCommands.hdr.command:y;let A=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(A,t,i,g)}if(l(o)){let m=o.unclassifiedCommand,y=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(y,t,i,g)}i.framebuffer=d}dy.prototype.executeCommands=function(e,t,n,i,r){if(this._translucentMRTSupport){gzt(this,e,t,n,i,r);return}pzt(this,e,t,n,i,r)};dy.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};dy.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,z.clone(n,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO.framebuffer,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO.framebuffer,this._alphaClearCommand.execute(e,t)),t.framebuffer=i};dy.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};dy.prototype.isDestroyed=function(){return!1};dy.prototype.destroy=function(){return RBe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),l(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),le(this)};var $V=dy;var _zt=new It("MapQuest, Open Street Map and contributors, CC-BY-SA");function IW(e){e=e??H.EMPTY_OBJECT;let t=De.createIfNeeded(e.url??"https://tile.openstreetmap.org/");t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${e.fileExtension??"png"}`;let n=new Lo({ellipsoid:e.ellipsoid}),i=256,r=256,o=e.minimumLevel??0,s=e.maximumLevel,a=e.rectangle??n.rectangle,c=n.positionToTileXY(ie.southwest(a),o),u=n.positionToTileXY(ie.northeast(a),o),f=(Math.abs(u.x-c.x)+1)*(Math.abs(u.y-c.y)+1),d=e.credit??_zt;typeof d=="string"&&(d=new It(d)),vs.call(this,{url:t,credit:d,tilingScheme:n,tileWidth:i,tileHeight:r,minimumLevel:o,maximumLevel:s,rectangle:a})}l(Object.create)&&(IW.prototype=Object.create(vs.prototype),IW.prototype.constructor=IW);var hy=IW;function OBe(){pe.throwInstantiationError()}Object.defineProperties(OBe.prototype,{show:{get:pe.throwInstantiationError,set:pe.throwInstantiationError},transform:{get:pe.throwInstantiationError},credit:{get:pe.throwInstantiationError}});var Zae=OBe;function PW(){pe.throwInstantiationError()}Object.defineProperties(PW.prototype,{});PW.fromUrl=function(e){pe.throwInstantiationError()};PW.prototype.loadPanorama=function(e){pe.throwInstantiationError()};var Qae=PW;var yzt=new U(1,1);function ece(e){e=e??H.EMPTY_OBJECT,this.mass=e.mass??1,this.position=h.clone(e.position??h.ZERO),this.velocity=h.clone(e.velocity??h.ZERO),this.life=e.life??Number.MAX_VALUE,this.image=e.image,this.startColor=z.clone(e.startColor??z.WHITE),this.endColor=z.clone(e.endColor??z.WHITE),this.startScale=e.startScale??1,this.endScale=e.endScale??1,this.imageSize=U.clone(e.imageSize??yzt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(ece.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var MBe=new h;ece.prototype.update=function(e,t){return h.multiplyByScalar(this.velocity,e,MBe),h.add(this.position,MBe,this.position),l(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var jP=ece;function NBe(e){e=e??H.EMPTY_OBJECT,this.time=e.time??0,this.minimum=e.minimum??0,this.maximum=e.maximum??50,this._complete=!1}Object.defineProperties(NBe.prototype,{complete:{get:function(){return this._complete}}});var tce=NBe;function LBe(e){}LBe.prototype.emit=function(e){pe.throwInstantiationError()};var nce=LBe;var FBe=new U(1,1);function JV(e){e=e??H.EMPTY_OBJECT,this.show=e.show??!0,this.updateCallback=e.updateCallback,this.loop=e.loop??!0,this.image=e.image??void 0;let t=e.emitter;l(t)||(t=new Nz(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this._emitterModelMatrix=N.clone(e.emitterModelMatrix??N.IDENTITY),this._matrixDirty=!0,this._combinedMatrix=new N,this._startColor=z.clone(e.color??e.startColor??z.WHITE),this._endColor=z.clone(e.color??e.endColor??z.WHITE),this._startScale=e.scale??e.startScale??1,this._endScale=e.scale??e.endScale??1,this._emissionRate=e.emissionRate??5,this._minimumSpeed=e.speed??e.minimumSpeed??1,this._maximumSpeed=e.speed??e.maximumSpeed??1,this._minimumParticleLife=e.particleLife??e.minimumParticleLife??5,this._maximumParticleLife=e.particleLife??e.maximumParticleLife??5,this._minimumMass=e.mass??e.minimumMass??1,this._maximumMass=e.mass??e.maximumMass??1,this._minimumImageSize=U.clone(e.imageSize??e.minimumImageSize??FBe),this._maximumImageSize=U.clone(e.imageSize??e.maximumImageSize??FBe),this._sizeInMeters=e.sizeInMeters??!1,this._lifetime=e.lifetime??Number.MAX_VALUE,this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new be,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(JV.prototype,{emitter:{get:function(){return this._emitter},set:function(e){this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!N.equals(this._modelMatrix,e),N.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!N.equals(this._emitterModelMatrix,e),N.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){z.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){z.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});function Azt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,r=e._bursts;if(l(r)){let d=r.length;for(let p=0;p<d;++p)i+=r[p].maximum}let o=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),c=e._particles,u=e._particlePool,f=Math.max(a-c.length-u.length,0);for(let d=0;d<f;++d){let p=new jP;p._billboard=o.add({image:s,show:!1}),u.push(p)}e._particleEstimate=a}function bzt(e){let t=e._particlePool.pop();return l(t)||(t=new jP),t}function xzt(e,t){e._particlePool.push(t)}function Tzt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,r=t.length,o=n.length,s=e._particleEstimate,a=o-Math.max(s-r-o,0);for(let c=a;c<o;++c){let u=n[c];i.remove(u._billboard)}n.length=a}function Ezt(e){l(e._billboard)&&(e._billboard.show=!1)}function BBe(e,t){let n=t._billboard;l(n)||(n=t._billboard=e._billboardCollection.add({image:t.image})),n.width=t.imageSize.x,n.height=t.imageSize.y,n.position=t.position,n.sizeInMeters=e.sizeInMeters,n.show=!0;let i=D.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),r=D.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),o=D.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=D.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new z(i,r,o,s),n.scale=D.lerp(t.startScale,t.endScale,t.normalizedAge)}function Czt(e,t){t.startColor=z.clone(e._startColor,t.startColor),t.endColor=z.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=D.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=D.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=D.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=D.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=D.randomBetween(e._minimumSpeed,e._maximumSpeed);h.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function vzt(e,t){if(e._isComplete)return 0;t=D.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let r=e.bursts.length;for(let o=0;o<r;o++){let s=e.bursts[o],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=D.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var DW=new h;JV.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new Gf),this._updateParticlePool&&(Azt(this),this._updateParticlePool=!1);let t=0;this._previousTime&&(t=K.secondsDifference(e.time,this._previousTime)),t<0&&(t=0);let n=this._particles,i=this._emitter,r=this.updateCallback,o,s,a=n.length;for(o=0;o<a;++o)s=n[o],s.update(t,r)?BBe(this,s):(Ezt(s),xzt(this,s),n[o]=n[a-1],--o,--a);n.length=a;let c=vzt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=N.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let u=this._combinedMatrix;for(o=0;o<c;o++)s=bzt(this),this._emitter.emit(s),h.add(s.position,s.velocity,DW),N.multiplyByPoint(u,DW,DW),s.position=N.multiplyByPoint(u,s.position,s.position),h.subtract(DW,s.position,s.velocity),h.normalize(s.velocity,s.velocity),Czt(this,s),BBe(this,s)}if(this._billboardCollection.update(e),this._previousTime=K.clone(e.time,this._previousTime),this._currentTime+=t,this._lifetime!==Number.MAX_VALUE&&this._currentTime>this._lifetime)if(this.loop){if(this._currentTime=D.mod(this._currentTime,this._lifetime),this.bursts){let u=this.bursts.length;for(o=0;o<u;o++)this.bursts[o]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&Tzt(this)};JV.prototype.isDestroyed=function(){return!1};JV.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),le(this)};var ice=JV;function RW(e){e=e??H.EMPTY_OBJECT;let t=Ln(e.container);this._container=t;let n=document.createElement("div");n.className="cesium-performanceDisplay";let i=document.createElement("div");i.className="cesium-performanceDisplay-fps",this._fpsText=document.createTextNode(""),i.appendChild(this._fpsText);let r=document.createElement("div");r.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),r.appendChild(this._msText),n.appendChild(r),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=xn(),this._lastMsSampleTime=xn(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let o=document.createElement("div");o.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),o.appendChild(this._throttledText),n.appendChild(o)}Object.defineProperties(RW.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});RW.prototype.update=function(e){let t=xn(),n=e??!0;this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let o="N/A";n&&(o=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${o} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let r=t-this._lastMsSampleTime;if(r>200){let o="N/A";n&&(o=(r/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${o} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};RW.prototype.destroy=function(){return le(this)};var my=RW;function OC(){this._framebuffer=new ai,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(OC.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Szt(e,t,n){let{width:i,height:r}=n;e._framebuffer.update(t,i,r)}function wzt(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
float globeDepth = czm_unpackDepth(globeDepthPacked);
float depth = texture(colorTexture, v_textureCoordinates).r;
out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
czm_packDepth(depth), globeDepthPacked);
}
`,{renderState:Ge.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}OC.prototype.update=function(e,t){Szt(this,e,t),wzt(this,e,t)};var Izt=new se,Pzt=new se(1,1/255,1/65025,1/16581375);OC.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),r=se.unpack(i,0,Izt);return se.divideByScalar(r,255,r),se.dot(r,Pzt)};OC.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};OC.prototype.isDestroyed=function(){return!1};OC.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),le(this)};var ZV=OC;function QV(){this._framebuffer=new ai({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(QV.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function Dzt(e){e._framebuffer.destroy()}function Rzt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let r=new Ac(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new et},r.viewport=new et,e._passState=r}QV.prototype.update=function(e,t,n){let i=n.width,r=n.height;this._framebuffer.isDirty(i,r)&&Rzt(this,e);let o=this.framebuffer,s=this._passState;return s.framebuffer=o,s.viewport.width=i,s.viewport.height=r,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=r-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};QV.prototype.isDestroyed=function(){return!1};QV.prototype.destroy=function(){return Dzt(this),le(this)};var e4=QV;function Ozt(e,t,n,i,r){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=r}var t4=Ozt;function MC(e){let t=new Ac(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new et},t.viewport=new et,this._context=e,this._fb=new ai({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}function kBe(e,t,n,i,r=1){let o=Math.max(n,i),s=o*o,a=Math.floor(n*.5),c=Math.floor(i*.5),u=0,f=0,d=0,p=-1,g=new Set;for(let m=0;m<s;++m){if(-a<=u&&u<=a&&-c<=f&&f<=c){let y=4*((c-f)*n+u+a),A=z.bytesToRgba(t[y],t[y+1],t[y+2],t[y+3]),b=e.getObjectByPickColor(A);if(l(b)&&(g.add(b),g.size>=r))break}if(u===f||u<0&&-u===f||u>0&&u===1-f){let y=d;d=-p,p=y}u+=d,f+=p}return[...g]}MC.prototype.begin=function(e,t){let n=this._context,{width:i,height:r}=t;return et.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=r,this._fb.update(n,i,r),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=r,this._passState};MC.prototype.endAsync=async function(e,t,n=1){let i=e.width??1,r=e.height??1,o=this._context,s=this._fb.framebuffer,a=ze.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let u=o.readPixelsToPBO({x:e.x,y:e.y,width:i,height:r,framebuffer:s}),f=EU.create({context:o});try{await f.waitForSignal(g=>t.afterRender.push(g));let d=Ke.createTypedArray(c,a,i,r);return u.getBufferData(d),kBe(o,d,i,r,n)}catch{throw new oe("Async Picking Request Timeout")}finally{f.destroy(),u.destroy()}};MC.prototype.end=function(e,t=1){let n=e.width??1,i=e.height??1,r=this._context,o=r.readPixels({x:e.x,y:e.y,width:n,height:i,framebuffer:this._fb.framebuffer});return kBe(r,o,n,i,t)};MC.prototype.readCenterPixel=function(e){let t=e.width??1,n=e.height??1,r=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),o=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+o);return r.slice(a,a+4)};MC.prototype.isDestroyed=function(){return!1};MC.prototype.destroy=function(){return this._fb.destroy(),le(this)};var n4=MC;function NC(){this._framebufferManager=new ai({colorAttachmentsLength:1,createColorAttachments:!0,depthStencil:!0,supportsDepthTexture:!0,color:!0}),this._framebuffer=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0,this._clearCommand=new ui({color:new z(0,0,0,0),depth:1,stencil:0,owner:this})}Object.defineProperties(NC.prototype,{framebuffer:{get:function(){return this._framebuffer}},idTexture:{get:function(){return this._idTexture}},depthStencilTexture:{get:function(){return this._depthStencilTexture}}});NC.prototype.update=function(e,t,n){let i=t.width,r=t.height,o=e.colorBufferFloat?ze.FLOAT:ze.UNSIGNED_BYTE,s=this._framebufferManager.update(e,i,r,1,o,Ke.RED);return this._framebufferManager.framebuffer&&(this._framebuffer=this._framebufferManager.framebuffer,this._idTexture=this._framebufferManager.getColorTexture(0),this._depthStencilTexture=this._framebufferManager.getDepthStencilTexture()),s};NC.prototype.getClearCommand=function(e){return this._clearCommand.framebuffer=this._framebuffer,l(e)&&z.clone(e,this._clearCommand.color),this._clearCommand};NC.prototype.releaseResources=function(){l(this._framebuffer)&&(this._framebufferManager.destroy(),this._framebuffer=void 0,this._idTexture=void 0,this._depthStencilTexture=void 0)};NC.prototype.isDestroyed=function(){return!1};NC.prototype.destroy=function(){return this._framebufferManager=this._framebufferManager&&this._framebufferManager.destroy(),this._clearCommand=void 0,le(this)};var i4=NC;function py(){this._numSamples=1,this._colorFramebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new ai({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new z(0,0,0,0),this._clearCommand=new ui({color:new z(0,0,0,0),depth:1,owner:this})}function Mzt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(py.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});py.prototype.update=function(e,t,n,i){let r=t.width,o=t.height,s=n?e.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,r,o,i,s),this._idFramebuffer.update(e,r,o)};py.prototype.clear=function(e,t,n){z.clone(n,this._clearCommand.color),z.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};py.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};py.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};py.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};py.prototype.isDestroyed=function(){return!1};py.prototype.destroy=function(){return Mzt(this),le(this)};var LC=py;function kb(){}var Nzt={HAS_CLIPPING_PLANES:!0,ENABLE_CLIPPING_POLYGONS:!0};kb.hasClippingForShadowCast=function(e){let t=e.defines;return l(t)&&t.some(function(n){return Nzt[n]===!0})};kb.getShadowCastShaderKeyword=function(e,t,n,i,r){return`castShadow ${e} ${t} ${n} ${i} ${r}`};kb.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),r=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let o=Ye.findPositionVarying(e),s=l(o);if(t&&!s){let a=r.length;for(let u=0;u<a;++u)r[u]=Ye.replaceMain(r[u],"czm_shadow_cast_main");r.push(`out vec3 v_positionEC;
void main()
{
czm_shadow_cast_main();
v_positionEC = (czm_inverseProjection * gl_Position).xyz;
}`)}return new Ye({defines:i,sources:r})};kb.createShadowCastFragmentShader=function(e,t,n,i,r){let o=e.defines.slice(0),s=e.sources.slice(0);o.push("SHADOW_MAP");let a=Ye.findPositionVarying(e),c=l(a);c||(a="v_positionEC");let u=s.length;for(let d=0;d<u;++d)s[d]=Ye.replaceMain(s[d],"czm_shadow_cast_main");let f="";return t&&(c||(f+=`in vec3 v_positionEC;
`),f+=`uniform vec4 shadowMap_lightPositionEC;
`),i&&r?f+=`void main()
{
czm_shadow_cast_main();
`:i?f+=`void main()
{
`:f+=`void main()
{
czm_shadow_cast_main();
if (out_FragColor.a == 0.0)
{
discard;
}
`,t?f+=` float distance = length(${a});
if (distance >= shadowMap_lightPositionEC.w)
{
discard;
}
distance /= shadowMap_lightPositionEC.w; // radius
out_FragColor = czm_packDepth(distance);
`:n?f+=` out_FragColor = vec4(1.0);
`:f+=` out_FragColor = czm_packDepth(gl_FragCoord.z);
`,f+=`}
`,s.push(f),new Ye({defines:o,sources:s})};kb.getShadowReceiveShaderKeyword=function(e,t,n,i){let r=e._usesDepthTexture,o=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,c=e._numberOfCascades>1,u=e.debugCascadeColors,f=e.softShadows;return`receiveShadow ${r}${o}${s}${a}${c}${u}${f}${t}${n}${i}`};kb.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),r=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new Ye({defines:i,sources:r})};kb.createShadowReceiveFragmentShader=function(e,t,n,i,r){let o=Ye.findNormalVarying(e),s=!i&&l(o)||i&&r,a=Ye.findPositionVarying(e),c=l(a),u=t._usesDepthTexture,f=t._polygonOffsetSupported,d=t._isPointLight,p=t._isSpotLight,g=t._numberOfCascades>1,m=t.debugCascadeColors,y=t.softShadows,A=d?t._pointBias:i?t._terrainBias:t._primitiveBias,b=e.defines.slice(0),x=e.sources.slice(0),T=x.length;for(let S=0;S<T;++S)x[S]=Ye.replaceMain(x[S],"czm_shadow_receive_main");d?b.push("USE_CUBE_MAP_SHADOW"):u&&b.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!d&&b.push("USE_SOFT_SHADOWS"),g&&n&&i&&(s?b.push("ENABLE_VERTEX_LIGHTING"):b.push("ENABLE_DAYNIGHT_SHADING")),n&&A.normalShading&&s&&(b.push("USE_NORMAL_SHADING"),A.normalShadingSmooth>0&&b.push("USE_NORMAL_SHADING_SMOOTH"));let E="";d?E+=`uniform samplerCube shadowMap_textureCube;
`:E+=`uniform sampler2D shadowMap_texture;
`;let v;return c?v=` return vec4(${a}, 1.0);
`:v=`#ifndef LOG_DEPTH
return czm_windowToEyeCoordinates(gl_FragCoord);
#else
return vec4(v_logPositionEC, 1.0);
#endif
`,E+=`uniform mat4 shadowMap_matrix;
uniform vec3 shadowMap_lightDirectionEC;
uniform vec4 shadowMap_lightPositionEC;
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
#ifdef LOG_DEPTH
in vec3 v_logPositionEC;
#endif
vec4 getPositionEC()
{
${v}}
vec3 getNormalEC()
{
${s?` return normalize(${o});
`:` return vec3(1.0);
`}}
void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)
{
${A.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;
float normalOffsetScale = 1.0 - nDotL;
vec3 offset = normalOffset * normalOffsetScale * normalEC;
positionEC.xyz += offset;
`:""}}
`,E+=`void main()
{
czm_shadow_receive_main();
vec4 positionEC = getPositionEC();
vec3 normalEC = getNormalEC();
float depth = -positionEC.z;
`,E+=` czm_shadowParameters shadowParameters;
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
`,i?E+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0);
`:f||(E+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);
`),d?E+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;
float distance = length(directionEC);
directionEC = normalize(directionEC);
float radius = shadowMap_lightPositionEC.w;
// Stop early if the fragment is beyond the point light radius
if (distance > radius)
{
return;
}
vec3 directionWC = czm_inverseViewRotation * directionEC;
shadowParameters.depth = distance / radius;
shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
shadowParameters.texCoords = directionWC;
float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);
`:p?E+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
vec4 shadowPosition = shadowMap_matrix * positionEC;
// Spot light uses a perspective projection, so perform the perspective divide
shadowPosition /= shadowPosition.w;
// Stop early if the fragment is not in the shadow bounds
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
{
return;
}
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
`:g?E+=` float maxDepth = shadowMap_cascadeSplits[1].w;
// Stop early if the eye depth exceeds the last cascade
if (depth > maxDepth)
{
return;
}
// Get the cascade based on the eye-space depth
vec4 weights = czm_cascadeWeights(depth);
// Apply normal offset
float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
// Transform position into the cascade
vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;
// Get visibility
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
// Fade out shadows that are far away
float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;
float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);
visibility = mix(visibility, 1.0, fade);
${m?` // Draw cascade colors for debugging
out_FragColor *= czm_cascadeColor(weights);
`:""}`:E+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
vec4 shadowPosition = shadowMap_matrix * positionEC;
// Stop early if the fragment is not in the shadow bounds
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
{
return;
}
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
`,E+=` out_FragColor.rgb *= visibility;
}
`,x.push(E),new Ye({defines:b,sources:x})};var pp=kb;function Y0(e){e=e??H.EMPTY_OBJECT;let t=e.context;this._enabled=e.enabled??!0,this._softShadows=e.softShadows??!1,this._normalOffset=e.normalOffset??!0,this.dirty=!0,this.fromLightSource=e.fromLightSource??!0,this.darkness=e.darkness??.3,this._darkness=this.darkness,this.fadingEnabled=e.fadingEnabled??!0,this.maximumDistance=e.maximumDistance??5e3,this._outOfView=!1,this._outOfViewPrevious=!1,this._needsUpdate=!0;let n=!0;(dn.isEdge()||(dn.isChrome()||dn.isFirefox())&&dn.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new N,this._shadowMapTexture=void 0,this._lightDirectionEC=new h,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new OW,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new ue,this._isPointLight=e.isPointLight??!1,this._pointLightRadius=e.pointLightRadius??100,this._cascadesEnabled=this._isPointLight?!1:e.cascadesEnabled??!0,this._numberOfCascades=this._cascadesEnabled?e.numberOfCascades??4:0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new U,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new As:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new N,new N,new N,new N],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let r=0;r<i;++r)this._passes[r]=new Lzt(t);this.debugShow=!1,this.debugFreezeFrame=!1,this._debugFreezeFrame=!1,this._debugCascadeColors=!1,this._debugLightFrustum=void 0,this._debugCameraFrustum=void 0,this._debugCascadeFrustums=new Array(this._numberOfCascades),this._debugShadowViewCommand=void 0,this._usesDepthTexture=t.depthTexture,this._isPointLight&&(this._usesDepthTexture=!1),this._primitiveRenderState=void 0,this._terrainRenderState=void 0,this._pointRenderState=void 0,oce(this),this._clearCommand=new ui({depth:1,color:new z}),this._clearPassState=new Ac(t),this._size=e.size??2048,this.size=this._size}Y0.MAXIMUM_DISTANCE=2e4;function Lzt(e){this.camera=new OW,this.passState=new Ac(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function rce(e,t){return Ge.fromCache({cull:{enabled:!0,face:Vi.BACK},depthTest:{enabled:!0},colorMask:{red:e,green:e,blue:e,alpha:e},depthMask:!0,polygonOffset:{enabled:t.polygonOffset,factor:t.polygonOffsetFactor,units:t.polygonOffsetUnits}})}function oce(e){let t=!e._usesDepthTexture;e._primitiveRenderState=rce(t,e._primitiveBias),e._terrainRenderState=rce(t,e._terrainBias),e._pointRenderState=rce(t,e._pointBias)}Y0.prototype.debugCreateRenderStates=function(){oce(this)};Object.defineProperties(Y0.prototype,{enabled:{get:function(){return this._enabled},set:function(e){this.dirty=this._enabled!==e,this._enabled=e}},normalOffset:{get:function(){return this._normalOffset},set:function(e){this.dirty=this._normalOffset!==e,this._normalOffset=e,this._terrainBias.normalOffset=e,this._primitiveBias.normalOffset=e,this._pointBias.normalOffset=e}},softShadows:{get:function(){return this._softShadows},set:function(e){this.dirty=this._softShadows!==e,this._softShadows=e}},size:{get:function(){return this._size},set:function(e){Vzt(this,e)}},outOfView:{get:function(){return this._outOfView}},shadowMapCullingVolume:{get:function(){return this._shadowMapCullingVolume}},passes:{get:function(){return this._passes}},isPointLight:{get:function(){return this._isPointLight}},debugCascadeColors:{get:function(){return this._debugCascadeColors},set:function(e){this.dirty=this._debugCascadeColors!==e,this._debugCascadeColors=e}}});function sce(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],r=i.framebuffer;l(r)&&!r.isDestroyed()&&r.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function Fzt(e,t){let n=new Ff({context:t,width:e._textureSize.x,height:e._textureSize.y,format:nu.DEPTH_COMPONENT16}),i=new Dt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:Ht.NEAREST}),r=new ys({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),o=e._passes.length;for(let s=0;s<o;++s){let a=e._passes[s];a.framebuffer=r,a.passState.framebuffer=r}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Bzt(e,t){let n=new Dt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:Ht.NEAREST}),i=new ys({context:t,depthStencilTexture:n,destroyAttachments:!1}),r=e._passes.length;for(let o=0;o<r;++o){let s=e._passes[o];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function kzt(e,t){let n=new Ff({context:t,width:e._textureSize.x,height:e._textureSize.y,format:nu.DEPTH_COMPONENT16}),i=new ts({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,sampler:Ht.NEAREST}),r=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let o=0;o<6;++o){let s=new ys({context:t,depthRenderbuffer:n,colorTextures:[r[o]],destroyAttachments:!1}),a=e._passes[o];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function VBe(e,t){e._isPointLight?kzt(e,t):e._usesDepthTexture?Bzt(e,t):Fzt(e,t)}function Uzt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==te.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,oce(e),sce(e),VBe(e,t))}function zzt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(sce(e),VBe(e,t),Uzt(e,t),jBe(e,t))}function jBe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function Vzt(e,t){e._size=t;let n=e._passes,i=n.length,r=e._textureSize;if(e._isPointLight){t=Ut.maximumCubeMapSize>=t?t:Ut.maximumCubeMapSize,r.x=t,r.y=t;let o=new et(0,0,t,t);n[0].passState.viewport=o,n[1].passState.viewport=o,n[2].passState.viewport=o,n[3].passState.viewport=o,n[4].passState.viewport=o,n[5].passState.viewport=o}else i===1?(t=Ut.maximumTextureSize>=t?t:Ut.maximumTextureSize,r.x=t,r.y=t,n[0].passState.viewport=new et(0,0,t,t)):i===4&&(t=Ut.maximumTextureSize>=t*2?t:Ut.maximumTextureSize/2,r.x=t*2,r.y=t*2,n[0].passState.viewport=new et(0,0,t,t),n[1].passState.viewport=new et(t,0,t,t),n[2].passState.viewport=new et(0,t,t,t),n[3].passState.viewport=new et(t,t,t,t));e._clearPassState.viewport=new et(0,0,r.x,r.y);for(let o=0;o<i;++o){let s=n[o],a=s.passState.viewport,c=a.x/r.x,u=a.y/r.y,f=a.width/r.x,d=a.height/r.y;s.textureOffsets=new N(f,0,0,c,0,d,0,u,0,0,1,0,0,0,0,1)}}var jzt=new et;function Hzt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
in vec2 v_textureCoordinates;
void main()
{
vec2 uv = v_textureCoordinates;
vec3 dir;
if (uv.y < 0.5)
{
if (uv.x < 0.333)
{
dir.x = -1.0;
dir.y = uv.x * 6.0 - 1.0;
dir.z = uv.y * 4.0 - 1.0;
}
else if (uv.x < 0.666)
{
dir.y = -1.0;
dir.x = uv.x * 6.0 - 3.0;
dir.z = uv.y * 4.0 - 1.0;
}
else
{
dir.z = -1.0;
dir.x = uv.x * 6.0 - 5.0;
dir.y = uv.y * 4.0 - 1.0;
}
}
else
{
if (uv.x < 0.333)
{
dir.x = 1.0;
dir.y = uv.x * 6.0 - 1.0;
dir.z = uv.y * 4.0 - 3.0;
}
else if (uv.x < 0.666)
{
dir.y = 1.0;
dir.x = uv.x * 6.0 - 3.0;
dir.z = uv.y * 4.0 - 3.0;
}
else
{
dir.z = 1.0;
dir.x = uv.x * 6.0 - 5.0;
dir.y = uv.y * 4.0 - 3.0;
}
}
float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir));
out_FragColor = vec4(vec3(shadow), 1.0);
}
`:n=`uniform sampler2D shadowMap_texture;
in vec2 v_textureCoordinates;
void main()
{
${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCoordinates).r;
`:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates));
`} out_FragColor = vec4(vec3(shadow), 1.0);
}
`;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Ie.OVERLAY,i}function Gzt(e,t){let n=t.context,i=t.context.drawingBufferWidth,r=t.context.drawingBufferHeight,o=Math.min(i,r)*.3,s=jzt;s.x=i-o,s.y=0,s.width=o,s.height=o;let a=e._debugShadowViewCommand;l(a)||(a=Hzt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!et.equals(a.renderState.viewport,s))&&(a.renderState=Ge.fromCache({viewport:et.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var X0=new Array(8);X0[0]=new se(-1,-1,-1,1);X0[1]=new se(1,-1,-1,1);X0[2]=new se(1,1,-1,1);X0[3]=new se(-1,1,-1,1);X0[4]=new se(-1,-1,1,1);X0[5]=new se(1,-1,1,1);X0[6]=new se(1,1,1,1);X0[7]=new se(-1,1,1,1);var Ub=new N,ace=new Array(8);for(let e=0;e<8;++e)ace[e]=new se;function Wzt(e,t){let n=new Ft({geometry:new Hh({minimum:new h(-.5,-.5,-.5),maximum:new h(.5,.5,.5)}),attributes:{color:Jt.fromColor(t)}}),i=new Ft({geometry:new __({radius:.5}),attributes:{color:Jt.fromColor(t)}});return new On({geometryInstances:[n,i],appearance:new yn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var qzt=[z.RED,z.GREEN,z.BLUE,z.MAGENTA],Yzt=new h;function Xzt(e,t){Gzt(e,t);let n=e.debugFreezeFrame&&!e._debugFreezeFrame;if(e._debugFreezeFrame=e.debugFreezeFrame,e.debugFreezeFrame&&(n&&(e._debugCameraFrustum=e._debugCameraFrustum&&e._debugCameraFrustum.destroy(),e._debugCameraFrustum=new z0({camera:e._sceneCamera,color:z.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new z0({camera:e._shadowMapCamera,color:z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t);for(let i=0;i<e._numberOfCascades;++i)n&&(e._debugCascadeFrustums[i]=e._debugCascadeFrustums[i]&&e._debugCascadeFrustums[i].destroy(),e._debugCascadeFrustums[i]=new z0({camera:e._passes[i].camera,color:qzt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,r=Le.IDENTITY,o=e._pointLightRadius*2,s=h.fromElements(o,o,o,Yzt),a=N.fromTranslationQuaternionRotationScale(i,r,s,Ub);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=Wzt(a,z.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new z0({camera:e._shadowMapCamera,color:z.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function OW(){this.viewMatrix=new N,this.inverseViewMatrix=new N,this.frustum=void 0,this.positionCartographic=new he,this.positionWC=new h,this.directionWC=h.clone(h.UNIT_Z),this.upWC=h.clone(h.UNIT_Y),this.rightWC=h.clone(h.UNIT_X),this.viewProjectionMatrix=new N}OW.prototype.clone=function(e){N.clone(e.viewMatrix,this.viewMatrix),N.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),he.clone(e.positionCartographic,this.positionCartographic),h.clone(e.positionWC,this.positionWC),h.clone(e.directionWC,this.directionWC),h.clone(e.upWC,this.upWC),h.clone(e.rightWC,this.rightWC)};var Kzt=new N(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);OW.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return N.multiply(t,e,this.viewProjectionMatrix),N.multiply(Kzt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var $zt=new Array(5),Jzt=new Ji,Zzt=new Array(4),HBe=new h,GBe=new h;function Qzt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,r=i.frustum.near,o=i.frustum.far,s=e._numberOfCascades,a,c=o-r,u=o/r,f=.9,d=!1;t.shadowState.closestObjectSize<200&&(d=!0,f=.9);let p=Zzt,g=$zt;for(g[0]=r,g[s]=o,a=0;a<s;++a){let L=(a+1)/s,_=r*Math.pow(u,L),C=r+c*L,w=D.lerp(C,_,f);g[a+1]=w,p[a]=w-g[a]}if(d){for(a=0;a<s;++a)p[a]=Math.min(p[a],e._maximumCascadeDistances[a]);let L=g[0];for(a=0;a<s-1;++a)L+=p[a],g[a+1]=L}se.unpack(g,0,e._cascadeSplits[0]),se.unpack(g,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let m=n.frustum,y=m.left,A=m.right,b=m.bottom,x=m.top,T=m.near,E=m.far,v=n.positionWC,S=n.directionWC,I=n.upWC,R=i.frustum.clone(Jzt),O=n.getViewProjection();for(a=0;a<s;++a){R.near=g[a],R.far=g[a+1];let L=N.multiply(R.projectionMatrix,i.viewMatrix,Ub),_=N.inverse(L,Ub),C=N.multiply(O,_,Ub),w=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,HBe),P=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,GBe);for(let j=0;j<8;++j){let k=se.clone(X0[j],ace[j]);N.multiplyByVector(C,k,k),h.divideByScalar(k,k.w,k),h.minimumByComponent(k,w,w),h.maximumByComponent(k,P,P)}w.x=Math.max(w.x,0),w.y=Math.max(w.y,0),w.z=0,P.x=Math.min(P.x,1),P.y=Math.min(P.y,1),P.z=Math.min(P.z,1);let M=e._passes[a],F=M.camera;F.clone(n);let V=F.frustum;V.left=y+w.x*(A-y),V.right=y+P.x*(A-y),V.bottom=b+w.y*(x-b),V.top=b+P.y*(x-b),V.near=T+w.z*(E-T),V.far=T+P.z*(E-T),M.cullingVolume=F.frustum.computeCullingVolume(v,S,I);let B=e._cascadeMatrices[a];N.multiply(F.getViewProjection(),i.inverseViewMatrix,B),N.multiply(M.textureOffsets,B,B)}}var eVt=new N,tVt=new h,nVt=new h,UBe=new h;function iVt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,r=N.multiply(i.frustum.projectionMatrix,i.viewMatrix,Ub),o=N.inverse(r,Ub),s=n.directionWC,a=i.directionWC;h.equalsEpsilon(s,a,D.EPSILON10)&&(a=i.upWC);let c=h.cross(s,a,tVt);a=h.cross(c,s,nVt),h.normalize(a,a),h.normalize(c,c);let u=h.fromElements(0,0,0,UBe),f=N.computeView(u,s,a,c,eVt),d=N.multiply(f,o,Ub),p=h.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,HBe),g=h.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,GBe);for(let E=0;E<8;++E){let v=se.clone(X0[E],ace[E]);N.multiplyByVector(d,v,v),h.divideByScalar(v,v.w,v),h.minimumByComponent(v,p,p),h.maximumByComponent(v,g,g)}g.z+=1e3,p.z-=10;let m=UBe;m.x=-(.5*(p.x+g.x)),m.y=-(.5*(p.y+g.y)),m.z=-g.z;let y=N.fromTranslation(m,Ub);f=N.multiply(y,f,f);let A=.5*(g.x-p.x),b=.5*(g.y-p.y),x=g.z-p.z,T=n.frustum;T.left=-A,T.right=A,T.bottom=-b,T.top=b,T.near=.01,T.far=x,N.clone(f,n.viewMatrix),N.inverse(f,n.inverseViewMatrix),N.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),h.clone(s,n.directionWC),h.clone(a,n.upWC),h.clone(c,n.rightWC)}var rVt=[new h(-1,0,0),new h(0,-1,0),new h(0,0,-1),new h(1,0,0),new h(0,1,0),new h(0,0,1)],oVt=[new h(0,-1,0),new h(0,0,-1),new h(0,-1,0),new h(0,-1,0),new h(0,0,1),new h(0,-1,0)],sVt=[new h(0,0,1),new h(1,0,0),new h(-1,0,0),new h(0,0,-1),new h(1,0,0),new h(1,0,0)];function aVt(e,t){let n=new Ji;n.fov=D.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let r=e._passes[i].camera;r.positionWC=e._shadowMapCamera.positionWC,r.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(r.positionWC,r.positionCartographic),r.directionWC=rVt[i],r.upWC=oVt[i],r.rightWC=sVt[i],N.computeView(r.positionWC,r.directionWC,r.upWC,r.rightWC,r.viewMatrix),N.inverse(r.viewMatrix,r.inverseViewMatrix),r.frustum=n}}var cVt=new h,lVt=new h,WBe=new ue,zBe=WBe.center;function uVt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,r=WBe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,cVt),s=h.negate(i.directionWC,lVt),a=h.dot(o,s);if(e.fadingEnabled){let c=D.clamp(a/.1,0,1);e._darkness=D.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=i.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===$t.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),ue.clone(r,e._boundingSphere);else{let o=i.frustum.far/2,s=h.add(i.positionWC,h.multiplyByScalar(i.directionWC,o,zBe),zBe);r.center=s,r.radius=o,e._outOfView=t.cullingVolume.computeVisibility(r)===$t.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),ue.clone(r,e._boundingSphere)}}function fVt(e,t){let n=t.camera,i=e._lightCamera,r=e._sceneCamera,o=e._shadowMapCamera;e._cascadesEnabled?h.clone(i.directionWC,o.directionWC):e._isPointLight?h.clone(i.positionWC,o.positionWC):o.clone(i);let s=e._lightDirectionEC;N.multiplyByPointAsVector(n.viewMatrix,o.directionWC,s),h.normalize(s,s),h.negate(s,s),N.multiplyByPoint(n.viewMatrix,o.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,c;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,a+1)):(a=n.frustum.near,c=e.maximumDistance),e._sceneCamera=Or.clone(n,r),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,uVt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}Y0.prototype.update=function(e){if(fVt(this,e),this._needsUpdate)if(zzt(this,e.context),this._isPointLight&&aVt(this,e),this._cascadesEnabled&&(iVt(this,e),this._numberOfCascades>1&&Qzt(this,e)),this._isPointLight)this._shadowMapCullingVolume=ta.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,r=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,r),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;N.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&Xzt(this,e)};Y0.prototype.updatePass=function(e,t){jBe(this,e,t)};var dVt=new U;function qBe(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,r={shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture},shadowMap_matrix:function(){return e._shadowMapMatrix},shadowMap_cascadeSplits:function(){return e._cascadeSplits},shadowMap_cascadeMatrices:function(){return e._cascadeMatrices},shadowMap_lightDirectionEC:function(){return e._lightDirectionEC},shadowMap_lightPositionEC:function(){return e._lightPositionEC},shadowMap_cascadeDistances:function(){return e._cascadeDistances},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){let o=dVt;return o.x=1/e._textureSize.x,o.y=1/e._textureSize.y,se.fromElements(o.x,o.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return Ot(t,r,!1)}function hVt(e,t,n,i,r,o){let s,a,c;if(l(o)&&(s=o.shaderProgram,a=o.renderState,c=o.uniformMap),o=at.shallowClone(n,o),o.castShadows=!0,o.receiveShadows=!1,!l(s)||r!==n.shaderProgram.id||t){let u=n.shaderProgram,f=n.pass===Ie.GLOBE,d=n.pass!==Ie.TRANSLUCENT,p=e._isPointLight,g=e._usesDepthTexture,m=u.vertexShaderSource,y=u.fragmentShaderSource,A=d&&pp.hasClippingForShadowCast(y),b=pp.getShadowCastShaderKeyword(p,f,g,d,A);if(s=i.shaderCache.getDerivedShaderProgram(u,b),!l(s)){let T=pp.createShadowCastVertexShader(m,p,f),E=pp.createShadowCastFragmentShader(y,p,g,d,A);s=i.shaderCache.createDerivedShaderProgram(u,b,{vertexShaderSource:T,fragmentShaderSource:E,attributeLocations:u._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:f&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=Je(a,!1),a.cull=Je(a.cull,!1),a.cull.enabled=!1,a=Ge.fromCache(a)),c=qBe(e,n.uniformMap,f)}return o.shaderProgram=s,o.renderState=a,o.uniformMap=c,o}Y0.createReceiveDerivedCommand=function(e,t,n,i,r){l(r)||(r={});let o=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,u=t.pass===Ie.GLOBE,f=!1;if(u&&(f=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&o){let d,p;l(r.receiveCommand)&&(d=r.receiveCommand.shaderProgram,p=r.receiveCommand.uniformMap),r.receiveCommand=at.shallowClone(t,r.receiveCommand),r.castShadows=!1,r.receiveShadows=!0;let g=r.receiveShaderCastShadows!==t.castShadows,m=r.receiveShaderProgramId!==t.shaderProgram.id;if(!l(d)||m||n||g){let y=pp.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,f);if(d=i.shaderCache.getDerivedShaderProgram(s,y),!l(d)){let A=pp.createShadowReceiveVertexShader(a,u,f),b=pp.createShadowReceiveFragmentShader(c,e[0],t.castShadows,u,f);d=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:A,fragmentShaderSource:b,attributeLocations:s._attributeLocations})}p=qBe(e[0],t.uniformMap,u)}r.receiveCommand.shaderProgram=d,r.receiveCommand.uniformMap=p,r.receiveShaderProgramId=t.shaderProgram.id,r.receiveShaderCastShadows=t.castShadows}return r};Y0.createCastDerivedCommand=function(e,t,n,i,r){if(l(r)||(r={}),t.castShadows){let o=r.castCommands;l(o)||(o=r.castCommands=[]);let s=r.castShaderProgramId,a=e.length;o.length=a;for(let c=0;c<a;++c)o[c]=hVt(e[c],n,t,i,s,o[c]);r.castShaderProgramId=t.shaderProgram.id}return r};Y0.prototype.isDestroyed=function(){return!1};Y0.prototype.destroy=function(){sce(this),this._debugLightFrustum=this._debugLightFrustum&&this._debugLightFrustum.destroy(),this._debugCameraFrustum=this._debugCameraFrustum&&this._debugCameraFrustum.destroy(),this._debugShadowViewCommand=this._debugShadowViewCommand&&this._debugShadowViewCommand.shaderProgram&&this._debugShadowViewCommand.shaderProgram.destroy();for(let e=0;e<this._numberOfCascades;++e)this._debugCascadeFrustums[e]=this._debugCascadeFrustums[e]&&this._debugCascadeFrustums[e].destroy();return le(this)};var gy=Y0;var r4=`uniform sampler2D u_opaqueDepthTexture;
uniform sampler2D u_translucentDepthTexture;
in vec2 v_textureCoordinates;
void main()
{
float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
out_FragColor = czm_packDepth(translucentDepth);
}
`;var FC=`uniform sampler2D colorTexture;
#ifdef DEBUG_SHOW_DEPTH
uniform sampler2D u_packedTranslucentDepth;
#endif
in vec2 v_textureCoordinates;
void main()
{
#ifdef DEBUG_SHOW_DEPTH
if (v_textureCoordinates.x < 0.5)
{
out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
out_FragColor.a = 1.0;
}
#else
vec4 color = texture(colorTexture, v_textureCoordinates);
#ifdef PICK
if (color == vec4(0.0))
{
discard;
}
#else
color.rgb /= color.a;
#endif
out_FragColor = color;
#endif
}
`;var mVt=!1;function zb(e){this._drawClassificationFBO=new ai({createDepthAttachments:!1}),this._accumulationFBO=new ai({createDepthAttachments:!1}),this._packFBO=new ai,this._opaqueDepthStencilTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new ui({color:new z(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new ui({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new et,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(zb.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function YBe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function XBe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function pVt(e,t,n,i){YBe(e),e._translucentDepthStencilTexture=new Dt({context:t,width:n,height:i,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:ze.UNSIGNED_INT_24_8,sampler:Ht.NEAREST})}function gVt(e,t,n,i){XBe(e),e._drawClassificationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._drawClassificationFBO.update(t,n,i),e._accumulationFBO.setDepthStencilTexture(e._translucentDepthStencilTexture),e._accumulationFBO.update(t,n,i),e._packFBO.update(t,n,i)}function _Vt(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let r=e._opaqueDepthStencilTexture.width,o=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(r,o)&&(pVt(e,t,r,o),gVt(e,t,r,o));let s,a;if(l(e._packDepthCommand)||(s=new Ye({sources:[r4]}),a={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),!l(e._compositeCommand)){s=new Ye({sources:[FC]}),a={colorTexture:function(){return e._textureToComposite}},mVt&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let f=e._compositeCommand,d=f.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(d,"pick",{vertexShaderSource:d.vertexShaderSource,fragmentShaderSource:new Ye({sources:s.sources,defines:["PICK"]}),attributeLocations:d._attributeLocations}),g=at.shallowClone(f);g.shaderProgram=p,f.derivedCommands.pick=g}l(e._copyCommand)||(s=new Ye({sources:[FC]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new Ye({sources:[FC]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=r,e._viewport.height=o;let c=!et.equals(e._viewport,n.viewport),u=c!==e._useScissorTest;e._useScissorTest=c,et.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=et.clone(n.viewport,e._scissorRectangle),u=!0),(!l(e._rsDepth)||!et.equals(e._viewport,e._rsDepth.viewport)||u)&&(e._rsDepth=Ge.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!et.equals(e._viewport,e._rsAccumulate.viewport)||u)&&(e._rsAccumulate=Ge.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:ei.EQUAL,reference:Yt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!et.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Ge.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:tn.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}zb.prototype.executeTranslucentCommands=function(e,t,n,i,r){let o=e.frameState.useLogDepth,s=e.context,a=n.framebuffer;for(let c=0;c<i.length;++c){let u=i[c];if(u=o?u.derivedCommands.logDepth.command:u,u.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}}if(this._hasTranslucentDepth){_Vt(this,s,n,r),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(s,n);for(let c=0;c<i.length;++c){let u=i[c];if(u=o?u.derivedCommands.logDepth.command:u,!u.depthForTranslucentClassification)continue;let f=u.derivedCommands.depth.depthOnlyCommand;t(f,e,n)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(n.framebuffer=this._packFBO.framebuffer,this._packDepthCommand.execute(s,n)),n.framebuffer=a}};zb.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let r=e.context,o=r.uniformState,s=n.framebuffer;n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(r,n),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(r,n),o.updatePass(Ie.CESIUM_3D_TILE_CLASSIFICATION);let a=o.globeDepthTexture;o.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Ie.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[Ie.CESIUM_3D_TILE_CLASSIFICATION];for(let f=0;f<u;++f)t(c[f],e,n);o.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(r,n),n.framebuffer=s)};zb.prototype.execute=function(e,t){if(!this._hasTranslucentDepth)return;this._frustumsDrawn===1?this._textureToComposite=this._drawClassificationFBO.getColorTexture():this._textureToComposite=this._accumulationFBO.getColorTexture(),(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),yVt(this,e,t)};function yVt(e,t,n){if(!e._hasTranslucentDepth)return;let i=n.framebuffer;n.framebuffer=e._drawClassificationFBO.framebuffer,e._clearColorCommand.execute(t._context,n),n.framebuffer=i,e._frustumsDrawn>1&&(n.framebuffer=e._accumulationFBO.framebuffer,e._clearColorCommand.execute(t._context,n)),e._hasTranslucentDepth=!1,e._frustumsDrawn=0}zb.prototype.isSupported=function(){return this._supported};zb.prototype.isDestroyed=function(){return!1};zb.prototype.destroy=function(){return YBe(this),XBe(this),l(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),l(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),le(this)};var o4=zb;function AVt(){this.command=void 0,this.near=void 0,this.far=void 0}function MW(e,t,n){let i=e.context,r;i.depthTexture&&(r=new DV);let o;e._useOIT&&i.depthTexture&&(o=new $V(i));let s=new Ac(i);s.viewport=et.clone(n),this.camera=t,this._cameraClone=Or.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new n4(i),this.snapFramebuffer=void 0,this.pickDepthFramebuffer=new e4,this.sceneFramebuffer=new LC,this.edgeFramebuffer=new oV,this.planarFillIdFramebuffer=new i4,this.globeDepth=r,this.globeTranslucencyFramebuffer=new RV,this.oit=o,this.translucentTileClassification=new o4(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var cce=new h,lce=new h;function bVt(e,t,n){let i=Math.max(h.maximumComponent(h.abs(e.position,cce)),h.maximumComponent(h.abs(t.position,lce))),r=1/Math.max(1,i);return h.multiplyByScalar(e.position,r,cce),h.multiplyByScalar(t.position,r,lce),h.equalsEpsilon(cce,lce,n)&&h.equalsEpsilon(e.direction,t.direction,n)&&h.equalsEpsilon(e.up,t.up,n)&&h.equalsEpsilon(e.right,t.right,n)&&N.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}MW.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return bVt(t,n,D.EPSILON15)?(this._cameraStartFired&&xn()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=xn(),Or.clone(t,n),!0)};function xVt(e,t,n,i){let{frameState:r}=t,{camera:o,useLogDepth:s}=r,a=s?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,c=t.mode===re.SCENE2D,u=t.nearToFarDistance2D;i*=1+D.EPSILON2,n=Math.min(Math.max(n,o.frustum.near),o.frustum.far),i=Math.max(Math.min(i,o.frustum.far),n);let f;c?(i=Math.min(i,o.position.z+t.nearToFarDistance2D),n=Math.min(n,i),f=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):f=Math.ceil(Math.log(i/n)/Math.log(a));let{frustumCommandsList:d}=e;d.length=f;for(let p=0;p<f;++p){let g,m;c?(g=Math.min(i-u,n+p*u),m=Math.min(i,g+u)):(g=Math.max(n,Math.pow(a,p)*n),m=Math.min(i,a*g)),l(d[p])?(d[p].near=g,d[p].far=m):d[p]=new dV(g,m)}}function TVt(e,t,n){let{command:i,near:r,far:o}=n;t.debugShowFrustums&&(i.debugOverlappingFrustums=0);let{frustumCommandsList:s}=e;for(let a=0;a<s.length;++a){let c=s[a];if(r>c.far)continue;if(o<c.near)break;let u=i.pass,f=c.indices[u]++;if(c.commands[u][f]=i,t.debugShowFrustums&&(i.debugOverlappingFrustums|=1<<a),i.executeInClosestFrustum)break}if(t.debugShowFrustums){let{debugFrustumStatistics:a}=e,{debugOverlappingFrustums:c}=i,u=a.commandsInFrustums;u[c]=l(u[c])?u[c]+1:1,++a.totalCommands}t.updateDerivedCommands(i)}var KBe=new ta,EVt=new Us;MW.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:r}=t,{positionWC:o,directionWC:s,frustum:a}=n,c=e._computeCommandList,u=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let f=this.frustumCommandsList;for(let O=0;O<f.length;++O)for(let L=0;L<Ie.NUMBER_OF_PASSES;++L)f[O].indices[L]=0;c.length=0,u.length=0;let d=this._commandExtents,p=d.length,g=0,m=+Number.MAX_VALUE,y=-Number.MAX_VALUE,{shadowsEnabled:A}=r,b=+Number.MAX_VALUE,x=-Number.MAX_VALUE,T=Number.MAX_VALUE,E=t.mode===re.SCENE3D?t.occluder:void 0,{cullingVolume:v}=t,S=KBe.planes;for(let O=0;O<5;++O)S[O]=v.planes[O];v=KBe;for(let O=0;O<i.length;++O){let L=i[O],{pass:_,boundingVolume:C}=L;if(_===Ie.COMPUTE)c.push(L);else if(_===Ie.OVERLAY)u.push(L);else{let w,P;if(l(C)){if(!e.isVisible(v,L,E))continue;let F=C.computePlaneDistances(o,s,EVt);if(w=F.start,P=F.stop,m=Math.min(m,w),y=Math.max(y,P),A&&L.receiveShadows&&w<gy.MAXIMUM_DISTANCE&&!(_===Ie.GLOBE&&w<-100&&P>100)){let V=P-w;_!==Ie.GLOBE&&w<100&&(T=Math.min(T,V)),b=Math.min(b,w),x=Math.max(x,P)}}else L instanceof ui?(w=a.near,P=a.far):(w=a.near,P=a.far,m=Math.min(m,w),y=Math.max(y,P));let M=d[g];l(M)||(M=d[g]=new AVt),M.command=L,M.near=w,M.far=P,g++}}A&&(b=Math.min(Math.max(b,a.near),a.far),x=Math.max(Math.min(x,a.far),b),r.nearPlane=b,r.farPlane=x,r.closestObjectSize=T),xVt(this,e,m,y);for(let O=0;O<g;O++)TVt(this,e,d[O]);if(g<p)for(let O=g;O<p;O++){let L=d[O];if(!l(L.command))break;L.command=void 0}for(let O=0;O<f.length;++O){let{commands:L,indices:_}=f[O];for(let C=0;C<L.length;++C){let w=L[C];for(let P=_[C];P<w.length&&l(w[P]);++P)w[P]=void 0}}let I=f.length,{frustumSplits:R}=t;R.length=I+1;for(let O=0;O<I;++O)R[O]=f[O].near,O===I-1&&(R[O+1]=f[O].far)};MW.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.snapFramebuffer=this.snapFramebuffer&&this.snapFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.destroy(),this.edgeFramebuffer=this.edgeFramebuffer&&this.edgeFramebuffer.destroy(),this.planarFillIdFramebuffer=this.planarFillIdFramebuffer&&this.planarFillIdFramebuffer.destroy(),this.globeDepth=this.globeDepth&&this.globeDepth.destroy(),this.oit=this.oit&&this.oit.destroy(),this.translucentTileClassification=this.translucentTileClassification&&this.translucentTileClassification.destroy(),this.globeTranslucencyFramebuffer=this.globeTranslucencyFramebuffer&&this.globeTranslucencyFramebuffer.destroy();let e=this.pickDepths;for(let t=0;t<e.length;++t)e[t].destroy()};var BC=MW;var JBe=.1,CVt=new vh({pass:ao.MOST_DETAILED_PRELOAD}),vVt=new vh({pass:ao.MOST_DETAILED_PICK}),s4=new vh({pass:ao.PICK});function Oa(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new et(0,0,1,1),n=new Or(e);n.frustum=new gn({width:JBe,aspectRatio:1,near:.1}),this._pickOffscreenView=new BC(e,n,t)}Oa.prototype.update=function(){this._pickPositionCacheDirty=!0};Oa.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new ZV,n[t]=i),i};var SVt=new As,wVt=new h,NW=new h,IVt=new U,PVt=new N;function DVt(e,t,n,i,r){let o=e.camera,s=o.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2*(t.x-r.x)/r.width-1;c*=(s.right-s.left)*.5;let u=2*(r.height-t.y-r.y)/r.height-1;u*=(s.top-s.bottom)*.5;let f=N.clone(o.transform,PVt);o._setTransform(N.IDENTITY);let d=h.clone(o.position,wVt);h.multiplyByScalar(o.right,c,NW),h.add(NW,d,d),h.multiplyByScalar(o.up,u,NW),h.add(NW,d,d),o._setTransform(f),e.mode===re.SCENE2D&&h.fromElements(d.z,d.x,d.y,d);let p=s.getPixelDimensions(r.width,r.height,1,1,IVt),g=SVt;return g.right=p.x*.5,g.left=-g.right,g.top=p.y*.5,g.bottom=-g.top,g.near=s.near,g.far=s.far,g.computeCullingVolume(d,o.directionWC,o.upWC)}var RVt=new yu,OVt=new U;function MVt(e,t,n,i,r){let o=e.camera,s=o.frustum,a=s.near,c=Math.tan(s.fovy*.5),u=s.aspectRatio*c,f=2*(t.x-r.x)/r.width-1,d=2*(r.height-t.y-r.y)/r.height-1,p=f*a*u,g=d*a*c,m=s.getPixelDimensions(r.width,r.height,1,1,OVt),y=m.x*n*.5,A=m.y*i*.5,b=RVt;return b.top=g+A,b.bottom=g-A,b.right=p+y,b.left=p-y,b.near=a,b.far=s.far,b.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function LW(e,t,n,i,r){let o=e.camera.frustum;return o instanceof gn||o instanceof As?DVt(e,t,n,i,r):MVt(e,t,n,i,r)}var a4=new et(0,0,3,3),FW=new U,c4=new z(0,0,0,0);function uce(e,t,n,i,r){return r.width=n??3,r.height=i??r.width,r.x=t.x-(r.width-1)*.5,r.y=e-t.y-(r.height-1)*.5,r}function l4(e,t,n,i,r,o){let{context:s,frameState:a,defaultView:c}=e,{viewport:u,pickFramebuffer:f}=c,d=o?.framebuffer??f;e.view=c,u.x=0,u.y=0,u.width=s.drawingBufferWidth,u.height=s.drawingBufferHeight;let p=c.passState;p.viewport=et.clone(u,p.viewport);let g=dr.transformWindowToDrawingBuffer(e,t,FW);uce(s.drawingBufferHeight,g,i,r,n),e.jobScheduler.disableThisFrame(),e.updateFrameState(),a.cullingVolume=LW(e,g,n.width,n.height,u),a.invertClassification=!1,a.passes.pick=!0,a.passes.snap=o?.snap??!1,a.tilesetPassState=s4,s.uniformState.update(a),e.updateEnvironment(),p=d.begin(n,u),e.updateAndExecuteCommands(p,c4),e.resolveFramebuffers(p)}function u4(e){let{context:t}=e;t.endFrame()}Oa.prototype.pickAsync=async function(e,t,n,i,r=1){let{context:o,frameState:s,defaultView:a}=e,{pickFramebuffer:c}=a,u=a4;l4(e,t,u,n,i);let f;return o.webgl2?f=c.endAsync(u,s,r):(f=c.end(u,r),f=Promise.resolve(f),_t("picking-async-fallback","Fallback to synchronous picking because async operation requires WebGL2 context.")),u4(e),f};Oa.prototype.pick=function(e,t,n,i,r=1){let{defaultView:o}=e,{pickFramebuffer:s}=o,a=a4;l4(e,t,a,n,i);let c=s.end(a,r);return u4(e),c};Oa.prototype.pickVoxelCoordinate=function(e,t,n,i){let{context:r,frameState:o,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=r.drawingBufferWidth,a.height=r.drawingBufferHeight;let u=s.passState;u.viewport=et.clone(a,u.viewport);let f=dr.transformWindowToDrawingBuffer(e,t,FW),d=uce(r.drawingBufferHeight,f,n,i,a4);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=LW(e,f,d.width,d.height,a),o.invertClassification=!1,o.passes.pickVoxel=!0,o.tilesetPassState=s4,r.uniformState.update(o),e.updateEnvironment(),u=c.begin(d,a),e.updateAndExecuteCommands(u,c4),e.resolveFramebuffers(u);let p=c.readCenterPixel(d);return r.endFrame(),p};Oa.prototype.pickMetadata=function(e,t,n){let{context:i,frameState:r,defaultView:o}=e,{viewport:s,pickFramebuffer:a}=o;e.view=o,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=o.passState;c.viewport=et.clone(s,c.viewport);let u=dr.transformWindowToDrawingBuffer(e,t,FW),f=uce(i.drawingBufferHeight,u,1,1,a4);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=LW(e,u,f.width,f.height,s),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=s4,r.pickingMetadata=!0,r.pickedMetadataInfo=n,i.uniformState.update(r),e.updateEnvironment(),c=a.begin(f,s),e.updateAndExecuteCommands(c,c4);let d=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=d;let p=a.readCenterPixel(f);return i.endFrame(),r.pickingMetadata=!1,WV.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function NVt(e,t){let{defaultView:n,context:i,frameState:r,environmentState:o}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=n.passState;c.viewport=et.clone(s,c.viewport),e.clearPasses(r.passes),r.passes.pick=!0,r.passes.depth=!0,r.cullingVolume=LW(e,t,1,1,s),r.tilesetPassState=s4,e.updateEnvironment(),o.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,c4),e.resolveFramebuffers(c),i.endFrame()}var LVt=new Ji,FVt=new yu,BVt=new gn,kVt=new As;Oa.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return h.clone(this._pickPositionCache[i],n);let{context:r,frameState:o,camera:s,defaultView:a}=e,{uniformState:c}=r;e.view=a;let u=dr.transformWindowToDrawingBuffer(e,t,FW);e.pickTranslucentDepth?NVt(e,u):(e.updateFrameState(),c.update(o),e.updateEnvironment()),u.y=e.drawingBufferHeight-u.y;let f;l(s.frustum.fov)?f=s.frustum.clone(LVt):l(s.frustum.infiniteProjectionMatrix)?f=s.frustum.clone(FVt):l(s.frustum.width)?f=s.frustum.clone(BVt):f=s.frustum.clone(kVt);let{frustumCommandsList:d}=a,p=d.length;for(let g=0;g<p;++g){let y=this.getPickDepth(e,g).getDepth(r,u.x,u.y);if(l(y)&&y>0&&y<1){let A=d[g],b;return e.mode===re.SCENE2D?(b=s.position.z,s.position.z=b-A.near+1,f.far=Math.max(1,A.far-A.near),f.near=1,c.update(o),c.updateFrustum(f)):(f.near=A.near*(g!==0?e.opaqueFrustumNearOffset:1),f.far=A.far,c.updateFrustum(f)),n=dr.drawingBufferToWorldCoordinates(e,u,y,n),e.mode===re.SCENE2D&&(s.position.z=b,c.update(o)),this._pickPositionCache[i]=h.clone(n),n}}this._pickPositionCache[i]=void 0};var UVt=new he;Oa.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==re.SCENE3D){h.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,r=i.ellipsoid,o=i.unproject(n,UVt);r.cartographicToCartesian(o,n)}return n};function zVt(e,t,n,i,r,o){for(let s of e){let a=s.object,c=s.position,u=s.exclude;if(l(c)&&!l(a))return n.push(s),!0;if(!l(a)||!l(a.primitive)||!u&&(n.push(s),n.length>=t))return!0;let f=a.primitive,d=!1;if(typeof f.getGeometryInstanceAttributes=="function"&&l(a.id)){let p=f.getGeometryInstanceAttributes(a.id);l(p)&&l(p.show)&&(d=!0,p.show=Pn.toValue(!1,p.show),r.push(p))}a instanceof na&&(d=!0,a.show=!1,o.push(a)),d||(f.show=!1,i.push(f))}}function ZBe(e,t){let n=[],i=[],r=[],o=[];l(t)||(t=Number.MAX_VALUE);let s=e(t);for(;l(s)&&s.length>0&&!zVt(s,t,n,i,r,o);)s=e(t-n.length);for(let a=0;a<i.length;++a)i[a].show=!0;for(let a=0;a<r.length;++a){let c=r[a];c.show=Pn.toValue(!0,c.show)}for(let a=0;a<o.length;++a)o[a].show=!0;return n}Oa.prototype.drillPick=function(e,t,n,i,r){return ZBe(a=>this.pick(e,t,i,r,a).map(u=>({object:u,position:void 0,exclude:!1})),n).map(a=>a.object)};var $Be=new h,VVt=new h;function jVt(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(r=>{i._completePick=()=>{r()}})}function QBe(e,t,n,i){let r=t.direction,o=h.mostOrthogonalAxis(r,$Be),s=h.cross(r,o,$Be),a=h.cross(r,s,VVt);return i.position=t.origin,i.direction=r,i.up=a,i.right=s,i.frustum.width=n??JBe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function HVt(e,t,n){let i=t.frameState,{ray:r,width:o,tilesets:s}=n,a=e._pickOffscreenView.camera,c=QBe(e,r,o,a),u=CVt;u.camera=a,u.cullingVolume=c;let f=!0,d=s.length;for(let p=0;p<d;++p){let g=s[p];g.show&&t.primitives.contains(g)&&(g.updateForPass(i,u),f=f&&u.ready)}return f&&n._completePick(),f}Oa.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)HVt(this,e,t[n])&&t.splice(n--,1)};function e2e(e,t,n){for(let i=0;i<e.length;++i){let r=e.get(i);r.show&&(l(r.isCesium3DTileset)?(!l(t)||t.indexOf(r)===-1)&&n.push(r):r instanceof xl&&e2e(r,t,n))}}function BW(e,t,n,i,r,o){let s=[];if(e2e(t.primitives,i,s),s.length===0)return Promise.resolve(o());let a=new jVt(n,r,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return o()})}function GVt(e,t){return!l(e)||!l(t)||t.length===0?!1:t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1}function WVt(e,t,n,i,r,o,s){let{context:a,frameState:c}=t,u=a.uniformState,f=e._pickOffscreenView;t.view=f,QBe(e,n,r,f.camera);let d=et.clone(f.viewport,a4),p=f.pickFramebuffer.begin(d,f.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=vVt:c.tilesetPassState=s4,u.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,c4),t.resolveFramebuffers(p);let g,m=f.pickFramebuffer.end(d,1)[0];if(t.context.depthTexture){let{frustumCommandsList:y}=f,A=y.length;for(let b=0;b<A;++b){let T=e.getPickDepth(t,b).getDepth(a,0,0);if(l(T)&&T>0&&T<1){let E=y[b],v=E.near*(b!==0?t.opaqueFrustumNearOffset:1),S=E.far,I=v+T*(S-v);g=pn.getPoint(n,I);break}}}if(t.view=t.defaultView,a.endFrame(),l(m)||l(g))return{object:m,position:g,exclude:!l(g)&&o||GVt(m,i)}}function fce(e,t,n,i,r,o,s,a){return ZBe(function(){let u=WVt(e,t,n,r,o,s,a);return u?[u]:void 0},i)}function HP(e,t,n,i,r,o,s){let a=fce(e,t,n,1,i,r,o,s);if(a.length>0)return a[0]}function kW(e,t){return new Promise((n,i)=>{t.then(function(r){let o=e.postRender.addEventListener(function(){o(),n(r)});e.requestRender()}).catch(function(r){i(r)})})}Oa.prototype.pickFromRay=function(e,t,n,i){return HP(this,e,t,n,i,!1,!1)};Oa.prototype.drillPickFromRay=function(e,t,n,i,r){return fce(this,e,t,n,i,r,!1,!1)};Oa.prototype.pickFromRayMostDetailed=function(e,t,n,i){let r=this;return t=pn.clone(t),n=l(n)?n.slice():n,kW(e,BW(r,e,t,n,i,function(){return HP(r,e,t,n,i,!1,!0)}))};Oa.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,r){let o=this;return t=pn.clone(t),i=l(i)?i.slice():i,kW(e,BW(o,e,t,i,r,function(){return fce(o,e,t,n,i,r,!1,!0)}))};var qVt=new h,YVt=new h,XVt=new pn,t2e=new he;function dce(e,t){let n=e.ellipsoid,i=Mi._defaultMaxTerrainHeight,r=n.geodeticSurfaceNormalCartographic(t,YVt),o=he.toCartesian(t,n,qVt),s=XVt;s.origin=o,s.direction=r;let a=new pn;return pn.getPoint(s,i,a.origin),h.negate(r,a.direction),a}function n2e(e,t){let n=e.ellipsoid,i=he.fromCartesian(t,n,t2e);return dce(e,i)}function i2e(e,t){let n=e.ellipsoid;return he.fromCartesian(t,n,t2e).height}function KVt(e,t,n,i,r){let o=dce(t,n);return BW(e,t,o,i,r,function(){let s=HP(e,t,o,i,r,!0,!0);if(l(s))return i2e(t,s.position)})}function $Vt(e,t,n,i,r,o){let s=n2e(t,n);return BW(e,t,s,i,r,function(){let a=HP(e,t,s,i,r,!0,!0);if(l(a))return h.clone(a.position,o)})}Oa.prototype.sampleHeight=function(e,t,n,i){let r=dce(e,t),o=HP(this,e,r,n,i,!0,!1);if(l(o))return i2e(e,o.position)};Oa.prototype.clampToHeight=function(e,t,n,i,r){let o=n2e(e,t),s=HP(this,e,o,n,i,!0,!1);if(l(s))return h.clone(s.position,r)};Oa.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let r=t.length,o=new Array(r);for(let s=0;s<r;++s)o[s]=KVt(this,e,t[s],n,i);return kW(e,Promise.all(o).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c].height=s[c];return t}))};Oa.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let r=t.length,o=new Array(r);for(let s=0;s<r;++s)o[s]=$Vt(this,e,t[s],n,i,t[s]);return kW(e,Promise.all(o).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};Oa.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var f4=Oa;var s2e=Qo(gj(),1);var JVt={modifyFragmentShader:function(t){return t=Ye.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection;
void main()
{
#ifndef SHADOW_MAP
if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
#endif
czm_splitter_main();
}
`,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},GP=JVt;var kC={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function d4(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=z.clone(z.DARKGRAY),this._highlightColor=z.clone(z.WHITE),this._pointSize=1,this._rtcCenter=void 0,this._quantizedVolumeScale=void 0,this._quantizedVolumeOffset=void 0,this._styleableShaderAttributes=void 0,this._isQuantized=!1,this._isOctEncoded16P=!1,this._isRGB565=!1,this._hasColors=!1,this._hasNormals=!1,this._hasBatchIds=!1,this._decodingState=kC.READY,this._dequantizeInShader=!0,this._isQuantizedDraco=!1,this._isOctEncodedDraco=!1,this._quantizedRange=0,this._octEncodedRange=0,this.backFaceCulling=!1,this._backFaceCulling=!1,this.normalShading=!0,this._normalShading=!0,this._opaqueRenderState=void 0,this._translucentRenderState=void 0,this._mode=void 0,this._ready=!1,this._pointsLength=0,this._geometryByteLength=0,this._vertexShaderLoaded=e.vertexShaderLoaded,this._fragmentShaderLoaded=e.fragmentShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._batchTableLoaded=e.batchTableLoaded,this._pickIdLoaded=e.pickIdLoaded,this._opaquePass=e.opaquePass??Ie.OPAQUE,this._cull=e.cull??!0,this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=N.clone(N.IDENTITY),this._modelMatrix=N.clone(N.IDENTITY),this.time=0,this.shadows=Dn.ENABLED,this._boundingSphere=void 0,this.clippingPlanes=void 0,this.isClipped=!1,this.clippingPlanesDirty=!1,this.clippingPlanesOriginMatrix=void 0,this.attenuation=!1,this._attenuation=!1,this.geometricError=0,this.geometricErrorScale=1,this.maximumAttenuation=this._pointSize,this.splitDirection=e.splitDirection??Vo.NONE,this._splittingEnabled=!1,this._error=void 0,ZVt(this,e)}Object.defineProperties(d4.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return z.clone(this._highlightColor)},set:function(e){this._highlightColor=z.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=ue.clone(e,this._boundingSphere)}}});function ZVt(e,t){let n=TT.parse(t.arrayBuffer,t.byteOffset);if(e._parsedContent=n,e._rtcCenter=n.rtcCenter,e._hasNormals=n.hasNormals,e._hasColors=n.hasColors,e._hasBatchIds=n.hasBatchIds,e._isTranslucent=n.isTranslucent,!n.hasBatchIds&&l(n.batchTableBinary)&&(n.styleableProperties=rm.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=kC.NEEDS_DECODE,a.dequantizeInShader=e._dequantizeInShader}let i=n.positions;l(i)&&(e._isQuantized=i.isQuantized,e._quantizedVolumeScale=i.quantizedVolumeScale,e._quantizedVolumeOffset=i.quantizedVolumeOffset,e._quantizedRange=i.quantizedRange);let r=n.normals;l(r)&&(e._isOctEncoded16P=r.octEncoded);let o=n.colors;l(o)&&(l(o.constantColor)&&(e._constantColor=z.clone(o.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=o.isRGB565);let s=n.batchIds;l(n.batchIds)&&(s.name="BATCH_ID",s.semantic="BATCH_ID",s.setIndex=void 0),n.hasBatchIds&&e._batchTableLoaded(n.batchLength,n.batchTableJson,n.batchTableBinary),e._pointsLength=n.pointsLength}var QVt=new h,e4t=new h,t4t=new h,r2e,UW;function n4t(e){if(!l(UW)){r2e=new s2e.default(0),UW=new Array(e);for(let t=0;t<e;++t)UW[t]=r2e.random()}return UW}function i4t(e){let n=e.length/3,i=Math.min(n,20),r=n4t(20),o=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=h.fromElements(o,o,o,QVt),c=h.fromElements(s,s,s,e4t);for(let f=0;f<i;++f){let d=Math.floor(r[f]*n),p=h.unpack(e,d*3,t4t);h.minimumByComponent(a,p,a),h.maximumByComponent(c,p,c)}let u=ue.fromCornerPoints(a,c);return u.radius+=D.EPSILON2,u}function o2e(e,t){let n=Y.fromTypedArray(e);return n===Y.INT||n===Y.UNSIGNED_INT||n===Y.DOUBLE?(_t("Cast pnts property to floats",`Point cloud property "${t}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),new Float32Array(e)):e}var r4t=new se,o4t=new se,s4t=new z,a2e=0,zW=1,_ce=2,c2e=3,a4t=4,hce=new N,c4t=new N;function l4t(e,t){let n=t.context,i=e._parsedContent,r=e._pointsLength,o=i.positions,s=i.colors,a=i.normals,c=i.batchIds,u=i.styleableProperties,f=l(u),d=e._isQuantized,p=e._isQuantizedDraco,g=e._isOctEncoded16P,m=e._isOctEncodedDraco,y=e._quantizedRange,A=e._octEncodedRange,b=e._isRGB565,x=e._isTranslucent,T=e._hasColors,E=e._hasNormals,v=e._hasBatchIds,S,I,R=[],O={};if(e._styleableShaderAttributes=O,f){let B=a4t;for(let j in u)if(u.hasOwnProperty(j)){let k=u[j],G=o2e(k.typedArray,j);S=k.componentCount,I=Y.fromTypedArray(G);let q=nt.createVertexBuffer({context:n,typedArray:G,usage:Me.STATIC_DRAW});e._geometryByteLength+=q.sizeInBytes;let Q={index:B,vertexBuffer:q,componentsPerAttribute:S,componentDatatype:I,normalize:!1,offsetInBytes:0,strideInBytes:0};R.push(Q),O[j]={location:B,componentCount:S},++B}}let L=nt.createVertexBuffer({context:n,typedArray:o.typedArray,usage:Me.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;let _;T&&(_=nt.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Me.STATIC_DRAW}),e._geometryByteLength+=_.sizeInBytes);let C;E&&(C=nt.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Me.STATIC_DRAW}),e._geometryByteLength+=C.sizeInBytes);let w;v&&(c.typedArray=o2e(c.typedArray,"batchIds"),w=nt.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Me.STATIC_DRAW}),e._geometryByteLength+=w.sizeInBytes);let P=[];if(d?I=Y.UNSIGNED_SHORT:p?I=y<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT:I=Y.FLOAT,P.push({index:a2e,vertexBuffer:L,componentsPerAttribute:3,componentDatatype:I,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(d||p?e._boundingSphere=ue.fromCornerPoints(h.ZERO,e._quantizedVolumeScale):e._boundingSphere=i4t(o.typedArray)),T)if(b)P.push({index:zW,vertexBuffer:_,componentsPerAttribute:1,componentDatatype:Y.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let B=x?4:3;P.push({index:zW,vertexBuffer:_,componentsPerAttribute:B,componentDatatype:Y.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}E&&(g?(S=2,I=Y.UNSIGNED_BYTE):m?(S=2,I=A<=255?Y.UNSIGNED_BYTE:Y.UNSIGNED_SHORT):(S=3,I=Y.FLOAT),P.push({index:_ce,vertexBuffer:C,componentsPerAttribute:S,componentDatatype:I,normalize:!1,offsetInBytes:0,strideInBytes:0})),v&&P.push({index:c2e,vertexBuffer:w,componentsPerAttribute:1,componentDatatype:Y.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),f&&(P=P.concat(R));let M=new zn({context:n,attributes:P}),F={depthTest:{enabled:!0}},V={depthTest:{enabled:!0},depthMask:!1,blending:tn.ALPHA_BLEND};e._opaquePass===Ie.CESIUM_3D_TILE&&(F.stencilTest=Yt.setCesium3DTileBit(),F.stencilMask=Yt.CESIUM_3D_TILE_MASK,V.stencilTest=Yt.setCesium3DTileBit(),V.stencilMask=Yt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Ge.fromCache(F),e._translucentRenderState=Ge.fromCache(V),e._drawCommand=new at({boundingVolume:new ue,cull:e._cull,modelMatrix:new N,primitiveType:Oe.POINTS,vertexArray:M,count:r,shaderProgram:void 0,uniformMap:void 0,renderState:x?e._translucentRenderState:e._opaqueRenderState,pass:x?Ie.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function u4t(e,t){let n=t.context,i=e._isQuantized,r=e._isQuantizedDraco,o=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=r4t;if(a.x=e._attenuation?e.maximumAttenuation:e._pointSize,a.x*=t.pixelRatio,a.y=e.time,e._attenuation){let c=t.camera.frustum,u;t.mode===re.SCENE2D||c instanceof gn?u=Number.POSITIVE_INFINITY:u=n.drawingBufferHeight/t.camera.frustum.sseDenominator,a.z=e.geometricError*e.geometricErrorScale,a.w=u}return a},u_highlightColor:function(){return e._highlightColor},u_constantColor:function(){return e._constantColor},u_clippingPlanes:function(){let a=e.clippingPlanes;return e.isClipped?a.texture:n.defaultTexture},u_clippingPlanesEdgeStyle:function(){let a=e.clippingPlanes;if(!l(a))return z.TRANSPARENT;let c=z.clone(a.edgeColor,s4t);return c.alpha=a.edgeWidth,c},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!l(a))return N.IDENTITY;let c=e.clippingPlanesOriginMatrix??e._modelMatrix;N.multiply(n.uniformState.view3D,c,hce);let u=N.multiply(hce,a.modelMatrix,hce);return N.inverseTranspose(u,c4t)}};GP.addUniforms(e,s),(i||r||o)&&(s=Ot(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=o4t;if(l(e._quantizedVolumeScale)){let c=h.clone(e._quantizedVolumeScale,a);h.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function mce(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let r=parseInt(i[1]);t.indexOf(r)===-1&&t.push(r),i=n.exec(e)}}function pce(e,t){e=e.slice(e.indexOf(`
`));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let r=i[1];t.indexOf(r)===-1&&t.push(r),i=n.exec(e)}}function gce(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let r=e.getAttribute(i);if(r.index===t)return r}}var f4t={POSITION:"czm_3dtiles_builtin_property_POSITION",POSITION_ABSOLUTE:"czm_3dtiles_builtin_property_POSITION_ABSOLUTE",COLOR:"czm_3dtiles_builtin_property_COLOR",NORMAL:"czm_3dtiles_builtin_property_NORMAL"};function d4t(e,t,n){let i,r,o,s=t.context,a=l(n),c=e._isQuantized,u=e._isQuantizedDraco,f=e._isOctEncoded16P,d=e._isOctEncodedDraco,p=e._isRGB565,g=e._isTranslucent,m=e._hasColors,y=e._hasNormals,A=e._hasBatchIds,b=e._backFaceCulling,x=e._normalShading,T=e._drawCommand.vertexArray,E=e.clippingPlanes,v=e._attenuation,S,I,R,O=g,L=Je(f4t),_={},C=e._styleableShaderAttributes;for(r in C)C.hasOwnProperty(r)&&(o=C[r],L[r]=`czm_3dtiles_property_${o.location}`,_[o.location]=o);if(a){let fe={translucent:!1},xe="(vec3 czm_3dtiles_builtin_property_POSITION, vec3 czm_3dtiles_builtin_property_POSITION_ABSOLUTE, vec4 czm_3dtiles_builtin_property_COLOR, vec3 czm_3dtiles_builtin_property_NORMAL)";S=n.getColorShaderFunction(`getColorFromStyle${xe}`,L,fe),I=n.getShowShaderFunction(`getShowFromStyle${xe}`,L,fe),R=n.getPointSizeShaderFunction(`getPointSizeFromStyle${xe}`,L,fe),l(S)&&fe.translucent&&(O=!0)}e._styleTranslucent=O;let w=l(S),P=l(I),M=l(R),F=e.isClipped,V=[],B=[];w&&(mce(S,V),pce(S,B)),P&&(mce(I,V),pce(I,B)),M&&(mce(R,V),pce(R,B));let j=B.indexOf("COLOR")>=0,k=B.indexOf("NORMAL")>=0;if(k&&!y)throw new oe("Style references the NORMAL semantic but the point cloud does not have normals");for(r in C)if(C.hasOwnProperty(r)){o=C[r];let fe=V.indexOf(o.location)>=0,xe=gce(T,o.location);xe.enabled=fe}let G=m&&(!w||j);if(m){let fe=gce(T,zW);fe.enabled=G}let q=y&&(x||b||k);if(y){let fe=gce(T,_ce);fe.enabled=q}let Q={a_position:a2e};G&&(Q.a_color=zW),q&&(Q.a_normal=_ce),A&&(Q.a_batchId=c2e);let W="",J=V.length;for(i=0;i<J;++i){let fe=V[i];o=_[fe];let xe=o.componentCount,ge=`czm_3dtiles_property_${fe}`,we;xe===1?we="float":we=`vec${xe}`,W+=`in ${we} ${ge};
`,Q[ge]=o.location}u4t(e,t);let Z=`in vec3 a_position;
out vec4 v_color;
uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
uniform vec4 u_constantColor;
uniform vec4 u_highlightColor;
`;Z+=`float u_pointSize;
float tiles3d_tileset_time;
`,v&&(Z+=`float u_geometricError;
float u_depthMultiplier;
`),Z+=W,G&&(g?Z+=`in vec4 a_color;
`:p?Z+=`in float a_color;
const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
const float SHIFT_RIGHT_5 = 1.0 / 32.0;
const float SHIFT_LEFT_11 = 2048.0;
const float SHIFT_LEFT_5 = 32.0;
const float NORMALIZE_6 = 1.0 / 64.0;
const float NORMALIZE_5 = 1.0 / 32.0;
`:Z+=`in vec3 a_color;
`),q&&(f||d?Z+=`in vec2 a_normal;
`:Z+=`in vec3 a_normal;
`),A&&(Z+=`in float a_batchId;
`),(c||u||d)&&(Z+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
`),w&&(Z+=S),P&&(Z+=I),M&&(Z+=R),Z+=`void main()
{
u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
`,v&&(Z+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
`),G?g?Z+=` vec4 color = a_color;
`:p?Z+=` float compressed = a_color;
float r = floor(compressed * SHIFT_RIGHT_11);
compressed -= r * SHIFT_LEFT_11;
float g = floor(compressed * SHIFT_RIGHT_5);
compressed -= g * SHIFT_LEFT_5;
float b = compressed;
vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
vec4 color = vec4(rgb, 1.0);
`:Z+=` vec4 color = vec4(a_color, 1.0);
`:Z+=` vec4 color = u_constantColor;
`,c||u?Z+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
`:Z+=` vec3 position = a_position;
`,Z+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
`,q?(f?Z+=` vec3 normal = czm_octDecode(a_normal);
`:d?Z+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
`:Z+=` vec3 normal = a_normal;
`,Z+=` vec3 normalEC = czm_normal * normal;
`):Z+=` vec3 normal = vec3(1.0);
`,w&&(Z+=` color = getColorFromStyle(position, position_absolute, color, normal);
`),P&&(Z+=` float show = float(getShowFromStyle(position, position_absolute, color, normal));
`),M?Z+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
`:v?Z+=` vec4 positionEC = czm_modelView * vec4(position, 1.0);
float depth = -positionEC.z;
gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
`:Z+=` gl_PointSize = u_pointSize;
`,Z+=` color = color * u_highlightColor;
`,q&&x&&(Z+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
diffuseStrength = max(diffuseStrength, 0.4);
color.xyz *= diffuseStrength * czm_lightColor;
`),Z+=` v_color = color;
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
`,q&&b&&(Z+=` float visible = step(-normalEC.z, 0.0);
gl_Position *= visible;
gl_PointSize *= visible;
`),P&&(Z+=` gl_Position.w *= float(show);
gl_PointSize *= float(show);
`),Z+=`}
`;let ae=`in vec4 v_color;
`;F&&(ae+=`uniform highp sampler2D u_clippingPlanes;
uniform mat4 u_clippingPlanesMatrix;
uniform vec4 u_clippingPlanesEdgeStyle;
`,ae+=`
`,ae+=CC(E,s),ae+=`
`),ae+=`void main()
{
out_FragColor = czm_gammaCorrect(v_color);
`,F&&(ae+=hV("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),ae+=`}
`,e.splitDirection!==Vo.NONE&&(ae=GP.modifyFragmentShader(ae)),l(e._vertexShaderLoaded)&&(Z=e._vertexShaderLoaded(Z)),l(e._fragmentShaderLoaded)&&(ae=e._fragmentShaderLoaded(ae));let Ae=e._drawCommand;l(Ae.shaderProgram)&&Ae.shaderProgram.destroy(),Ae.shaderProgram=en.fromCache({context:s,vertexShaderSource:Z,fragmentShaderSource:ae,attributeLocations:Q});try{Ae.shaderProgram._bind()}catch{throw new oe("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function h4t(e,t){if(e._decodingState===kC.READY)return!1;if(e._decodingState===kC.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,r=Og.decodePointCloud(i,t);l(r)&&(e._decodingState=kC.DECODING,r.then(function(o){e._decodingState=kC.READY;let s=l(o.POSITION)?o.POSITION.array:void 0,a=l(o.RGB)?o.RGB.array:void 0,c=l(o.RGBA)?o.RGBA.array:void 0,u=l(o.NORMAL)?o.NORMAL.array:void 0,f=l(o.BATCH_ID)?o.BATCH_ID.array:void 0,d=l(s)&&l(o.POSITION.data.quantization),p=l(u)&&l(o.NORMAL.data.quantization);if(d){let A=o.POSITION.data.quantization,b=A.range;e._quantizedVolumeScale=h.fromElements(b,b,b),e._quantizedVolumeOffset=h.unpack(A.minValues),e._quantizedRange=(1<<A.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let g=n.styleableProperties,m=i.batchTableProperties;for(let A in m)if(m.hasOwnProperty(A)){let b=o[A];l(g)||(g={}),g[A]={typedArray:b.array,componentCount:b.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let y=c??a;l(y)&&(n.colors={typedArray:y}),l(u)&&(n.normals={typedArray:u}),l(f)&&(n.batchIds={typedArray:f}),n.styleableProperties=g}).catch(function(o){e._decodingState=kC.FAILED,e._error=o}))}return!0}var m4t=new se,p4t=new h;d4.prototype.update=function(e){let t=e.context;if(l(this._error)){let u=this._error;throw this._error=void 0,u}if(h4t(this,t))return;let i=!1,r=!N.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,r=!0),l(this._drawCommand)||(l4t(this,e),r=!0,i=!0,this._ready=!0,this._parsedContent=void 0),r){N.clone(this.modelMatrix,this._modelMatrix);let u=this._drawCommand.modelMatrix;if(N.clone(this._modelMatrix,u),l(this._rtcCenter)&&N.multiplyByTranslation(u,this._rtcCenter,u),l(this._quantizedVolumeOffset)&&N.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==re.SCENE3D){let d=e.mapProjection,p=N.getColumn(u,3,m4t);se.equals(p,se.UNIT_W)||At.basisTo2D(d,u,u)}let f=this._drawCommand.boundingVolume;if(ue.clone(this._boundingSphere,f),this._cull){let d=f.center;N.multiplyByPoint(u,d,d);let p=N.getScale(u,p4t);f.radius*=h.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let o=this.splitDirection!==Vo.NONE;this._splittingEnabled!==o&&(this._splittingEnabled=o,i=!0),i&&d4t(this,e,this._style),this._drawCommand.castShadows=Dn.castShadows(this.shadows),this._drawCommand.receiveShadows=Dn.receiveShadows(this.shadows);let s=this._highlightColor.alpha<1||this._constantColor.alpha<1||this._styleTranslucent;this._drawCommand.renderState=s?this._translucentRenderState:this._opaqueRenderState,this._drawCommand.pass=s?Ie.TRANSLUCENT:this._opaquePass;let a=e.commandList,c=e.passes;(c.render||c.pick)&&a.push(this._drawCommand)};d4.prototype.isDestroyed=function(){return!1};d4.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),le(this)};var h4=d4;var g4t={NEAREST:0,LINEAR:1},gd=g4t;function _y(e){e=e??H.EMPTY_OBJECT;let{name:t=$n(),fragmentShader:n,uniforms:i,textureScale:r=1,forcePowerOfTwo:o=!1,sampleMode:s=gd.NEAREST,pixelFormat:a=Ke.RGBA,pixelDatatype:c=ze.UNSIGNED_BYTE,clearColor:u=z.BLACK,scissorRectangle:f}=e;this._fragmentShader=n,this._uniforms=i,this._textureScale=r,this._forcePowerOfTwo=o,this._sampleMode=s,this._pixelFormat=a,this._pixelDatatype=c,this._clearColor=u,this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;let d=new Ac;d.scissorTest={enabled:!0,rectangle:l(f)?et.clone(f):new et},this._passState=d,this._ready=!1,this._name=t,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(_y.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(l(this._textureCache)){let e=this._textureCache.getFramebuffer(this._name);if(l(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var _4t=/uniform\s+sampler2D\s+depthTexture/g;_y.prototype._isSupported=function(e){return!_4t.test(this._fragmentShader)||e.depthTexture};function y4t(e,t,n){let i=t[n];return(typeof i=="string"||i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof HTMLVideoElement||i instanceof ImageData)&&e._dirtyUniforms.push(n),{get:function(){return t[n]},set:function(r){let o=t[n];t[n]=r;let s=e._actualUniforms,a=s[n];l(a)&&a!==o&&a instanceof Dt&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),o instanceof Dt&&e._texturesToRelease.push(o),typeof r=="string"||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData?e._dirtyUniforms.push(n):s[n]=r}}}function A4t(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function b4t(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function x4t(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,r=e._actualUniforms;for(let o in i){if(!i.hasOwnProperty(o))continue;typeof i[o]!="function"?(t[o]=A4t(e,o),n[o]=y4t(e,i,o)):(t[o]=i[o],n[o]=i[o]),r[o]=i[o];let s=t[o]();(typeof s=="string"||s instanceof Dt||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${o}Dimensions`]=b4t(t,o))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=Ot(t,{colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions},depthTexture:function(){return e._depthTexture},depthTextureDimensions:function(){return e._depthTexture.dimensions},czm_idTexture:function(){return e._idTexture},czm_selectedIdTexture:function(){return e._selectedIdTexture},czm_selectedIdTextureStep:function(){return 1/e._selectedIdTexture.width}})}function T4t(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
uniform sampler2D czm_idTexture;
uniform sampler2D czm_selectedIdTexture;
uniform float czm_selectedIdTextureStep;
in vec2 v_textureCoordinates;
bool czm_selected(vec2 offset)
{
bool selected = false;
vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
for (int i = 0; i < ${t}; ++i)
{
vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
if (all(equal(id, selectedId)))
{
return true;
}
}
return false;
}
bool czm_selected()
{
return czm_selected(vec2(0.0));
}
${e}`}function E4t(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let r=e._selectedIdTexture.width;n=T4t(n,r)}let i=new Ye({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function C4t(e){let t=e._sampleMode,n,i;t===gd.LINEAR?(n=Wt.LINEAR,i=Zn.LINEAR):(n=Wt.NEAREST,i=Zn.NEAREST);let r=e._sampler;(!l(r)||r.minificationFilter!==n||r.magnificationFilter!==i)&&(e._sampler=new Ht({wrapS:hn.CLAMP_TO_EDGE,wrapT:hn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function v4t(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function S4t(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function w4t(e,t){let n=e._texturesToRelease;for(let a=0;a<n.length;++a){let c=n[a];l(c)&&c.destroy()}n.length=0;let i=e._texturesToCreate;for(let a=0;a<i.length;++a){let{name:c,source:u}=i[a];e._actualUniforms[c]=new Dt({context:t,source:u})}i.length=0;let r=e._dirtyUniforms;if(r.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(r.length===0||l(e._texturePromise))return;let o=e._uniforms,s=[];for(let a=0;a<r.length;++a){let c=r[a],u=o[c],f=e._textureCache.getStageByName(u);if(l(f))e._actualUniforms[c]=S4t(e,u);else if(typeof u=="string"){let d=new De({url:u});s.push(d.fetchImage().then(v4t(e,c)))}else e._texturesToCreate.push({name:c,source:u})}r.length=0,s.length>0?(e._ready=!1,e._texturePromise=Promise.all(s).then(function(){e._ready=!0,e._texturePromise=void 0})):e._ready=!0}function l2e(e){l(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();let t=e._textureCache;if(!l(t))return;let n=e._uniforms,i=e._actualUniforms;for(let r in i){if(!i.hasOwnProperty(r))continue;let o=i[r];o instanceof Dt&&(l(t.getStageByName(n[r]))||o.destroy(),e._dirtyUniforms.push(r))}}function I4t(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength;if(l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;for(let r=0;r<e._combinedSelected.length;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return i}function P4t(e,t){if(!e._selectedDirty)return;e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy(),e._selectedIdTexture=void 0;let n=e._combinedSelected;if(!l(n))return;let i=0;for(let c=0;c<n.length;++c){let u=n[c];l(u.pickIds)?i+=u.pickIds.length:l(u.pickId)&&++i}let r=Ut.maximumTextureSize;if(i>r&&(_y._oneTimeWarning("postProcessStageSelectedTextureSize",`The number of selected feature ids (${i}) exceeds the maximum texture size (${r}). Features beyond the limit will not have the post-process effect applied.`),i=r),n.length===0||i===0){let c=new Uint8Array([255,255,255,255]);e._selectedIdTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:c,width:1,height:1},sampler:Ht.NEAREST});return}let o=0,s=i*4,a=new Uint8Array(s);for(let c=0;c<n.length&&o<s;++c){let u=n[c];if(l(u.pickIds)){let f=u.pickIds,d=f.length;for(let p=0;p<d&&o<s;++p){let g=f[p].color;a[o]=z.floatToByte(g.red),a[o+1]=z.floatToByte(g.green),a[o+2]=z.floatToByte(g.blue),a[o+3]=z.floatToByte(g.alpha),o+=4}}else if(l(u.pickId)){let f=u.pickId.color;a[o]=z.floatToByte(f.red),a[o+1]=z.floatToByte(f.green),a[o+2]=z.floatToByte(f.blue),a[o+3]=z.floatToByte(f.alpha),o+=4}}e._selectedIdTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:a,width:i,height:1},sampler:Ht.NEAREST})}_y.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&l2e(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=I4t(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0,P4t(this,e),x4t(this),w4t(this,e),E4t(this,e),C4t(this),this._selectedDirty=!1,!this._ready))return;let n=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=n,!l(n))return;let i=n.getColorTexture(0),r;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(r=this._renderState,(!l(r)||i.width!==r.viewport.width||i.height!==r.viewport.height)&&(this._renderState=Ge.fromCache({viewport:new et(0,0,i.width,i.height)}))),this._command.renderState=r};_y.prototype.execute=function(e,t,n,i){if(!l(this._command)||!l(this._command.framebuffer)||!this._ready||!this._enabled)return;this._colorTexture=t,this._depthTexture=n,this._idTexture=i,Ht.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let r=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(r)&&(r.context=e),this._command.execute(e,r)};_y.prototype.isDestroyed=function(){return!1};_y.prototype.destroy=function(){return l2e(this),le(this)};_y._oneTimeWarning=_t;var Ur=_y;var m4=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
color /= texture(autoExposure, vec2(0.5)).r;
#else
color *= vec3(exposure);
#endif
color = czm_acesTonemapping(color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var p4=`precision highp float;
uniform sampler2D randomTexture;
uniform sampler2D depthTexture;
uniform float intensity;
uniform float bias;
uniform float lengthCap;
uniform int stepCount;
uniform int directionCount;
vec4 pixelToEye(vec2 screenCoordinate)
{
vec2 uv = screenCoordinate / czm_viewport.zw;
float depth = czm_readDepth(depthTexture, uv);
vec2 xy = 2.0 * uv - vec2(1.0);
vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
posEC = posEC / posEC.w;
if (depth >= 1.0) {
posEC.z = czm_currentFrustum.y;
}
return posEC;
}
vec3 getNormalXEdge(vec3 positionEC)
{
vec2 centerCoord = gl_FragCoord.xy;
vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0)).xyz;
vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0)).xyz;
vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0)).xyz;
vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0)).xyz;
vec3 dx0 = positionEC - positionLeft;
vec3 dx1 = positionRight - positionEC;
vec3 dy0 = positionEC - positionDown;
vec3 dy1 = positionUp - positionEC;
vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;
return normalize(cross(dx, dy));
}
const float sqrtTwoPi = sqrt(czm_twoPi);
float gaussian(float x, float standardDeviation) {
float argument = x / standardDeviation;
return exp(-0.5 * argument * argument) / (sqrtTwoPi * standardDeviation);
}
void main(void)
{
vec4 positionEC = pixelToEye(gl_FragCoord.xy);
float maxValidDepth = czm_currentFrustum.y - lengthCap;
if (-positionEC.z > maxValidDepth)
{
out_FragColor = vec4(1.0);
return;
}
vec3 normalEC = getNormalXEdge(positionEC.xyz);
float gaussianVariance = lengthCap * sqrt(-positionEC.z);
float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0);
float metersPerPixel = czm_metersPerPixel(positionEC, 1.0);
float pixelsPerStep = max(stepLength / metersPerPixel, 1.0);
stepLength = pixelsPerStep * metersPerPixel;
float angleStepScale = 1.0 / float(directionCount);
float angleStep = angleStepScale * czm_twoPi;
float cosStep = cos(angleStep);
float sinStep = sin(angleStep);
mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);
const float randomTextureSize = 255.0;
vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
float randomVal = texture(randomTexture, randomTexCoord).x;
vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));
float ao = 0.0;
#if __VERSION__ == 300
for (int i = 0; i < directionCount; i++)
{
#else
for (int i = 0; i < 16; i++)
{
if (i >= directionCount) {
break;
}
#endif
sampleDirection = rotateStep * sampleDirection;
float localAO = 0.0;
vec2 radialStep = pixelsPerStep * sampleDirection;
#if __VERSION__ == 300
for (int j = 0; j < stepCount; j++)
{
#else
for (int j = 0; j < 64; j++)
{
if (j >= stepCount) {
break;
}
#endif
vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);
if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) {
break;
}
vec4 samplePositionEC = pixelToEye(samplePixel);
vec3 stepVector = samplePositionEC.xyz - positionEC.xyz;
float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
dotVal = czm_branchFreeTernary(dotVal > bias, dotVal, 0.0);
dotVal = czm_branchFreeTernary(-samplePositionEC.z <= maxValidDepth, dotVal, 0.0);
float sampleDistance = length(stepVector);
float weight = gaussian(sampleDistance, gaussianVariance);
localAO += weight * dotVal;
}
ao += localAO;
}
ao *= angleStepScale * stepLength;
ao = 1.0 - clamp(ao, 0.0, 1.0);
ao = pow(ao, intensity);
out_FragColor = vec4(vec3(ao), 1.0);
}
`;var g4=`uniform sampler2D colorTexture;
uniform sampler2D ambientOcclusionTexture;
uniform bool ambientOcclusionOnly;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 color = texture(colorTexture, v_textureCoordinates);
vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
out_FragColor = ambientOcclusionOnly ? ao : ao * color;
}
`;var _4=`uniform sampler2D colorTexture;
uniform float gradations;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
#ifdef CZM_SELECTED_FEATURE
if (czm_selected()) {
out_FragColor = vec4(rgb, 1.0);
return;
}
#endif
float luminance = czm_luminance(rgb);
float darkness = luminance * gradations;
darkness = (darkness - fract(darkness)) / gradations;
out_FragColor = vec4(vec3(darkness), 1.0);
}
`;var y4=`uniform sampler2D colorTexture;
uniform sampler2D bloomTexture;
uniform bool glowOnly;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 color = texture(colorTexture, v_textureCoordinates);
#ifdef CZM_SELECTED_FEATURE
if (czm_selected()) {
out_FragColor = color;
return;
}
#endif
vec4 bloom = texture(bloomTexture, v_textureCoordinates);
out_FragColor = glowOnly ? bloom : bloom + color;
}
`;var A4=`uniform sampler2D colorTexture;
uniform float brightness;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
vec3 target = vec3(0.0);
out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
}
`;var b4=`uniform sampler2D colorTexture;
uniform float contrast;
uniform float brightness;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
sceneColor = czm_RGBToHSB(sceneColor);
sceneColor.z += brightness;
sceneColor = czm_HSBToRGB(sceneColor);
float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
out_FragColor = vec4(sceneColor, 1.0);
}
`;var x4=`uniform sampler2D colorTexture;
uniform sampler2D blurTexture;
uniform sampler2D depthTexture;
uniform float focalDistance;
in vec2 v_textureCoordinates;
vec4 toEye(vec2 uv, float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera = posInCamera / posInCamera.w;
return posInCamera;
}
float computeDepthBlur(float depth)
{
float f;
if (depth < focalDistance)
{
f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
}
else
{
f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
f = pow(f, 0.1);
}
f *= f;
f = clamp(f, 0.0, 1.0);
return pow(f, 0.5);
}
void main(void)
{
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
vec4 posInCamera = toEye(v_textureCoordinates, depth);
float d = computeDepthBlur(-posInCamera.z);
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
}
`;var T4=`uniform sampler2D depthTexture;
in vec2 v_textureCoordinates;
void main(void)
{
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
out_FragColor = vec4(vec3(depth), 1.0);
}
`;var E4=`uniform sampler2D depthTexture;
uniform float length;
uniform vec4 color;
in vec2 v_textureCoordinates;
void main(void)
{
float directions[3];
directions[0] = -1.0;
directions[1] = 0.0;
directions[2] = 1.0;
float scalars[3];
scalars[0] = 3.0;
scalars[1] = 10.0;
scalars[2] = 3.0;
float padx = czm_pixelRatio / czm_viewport.z;
float pady = czm_pixelRatio / czm_viewport.w;
#ifdef CZM_SELECTED_FEATURE
bool selected = false;
for (int i = 0; i < 3; ++i)
{
float dir = directions[i];
selected = selected || czm_selected(vec2(-padx, dir * pady));
selected = selected || czm_selected(vec2(padx, dir * pady));
selected = selected || czm_selected(vec2(dir * padx, -pady));
selected = selected || czm_selected(vec2(dir * padx, pady));
if (selected)
{
break;
}
}
if (!selected)
{
out_FragColor = vec4(color.rgb, 0.0);
return;
}
#endif
float horizEdge = 0.0;
float vertEdge = 0.0;
for (int i = 0; i < 3; ++i)
{
float dir = directions[i];
float scale = scalars[i];
horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;
vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
}
float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
}
`;var C4=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
const float A = 0.22;
const float B = 0.30;
const float C = 0.10;
const float D = 0.20;
const float E = 0.01;
const float F = 0.30;
const float white = 11.2;
vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;
c = czm_inverseGamma(c / w);
out_FragColor = vec4(c, fragmentColor.a);
}
`;var v4=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
color /= texture(autoExposure, vec2(0.5)).r;
#else
color *= vec3(exposure);
#endif
color = czm_pbrNeutralTonemapping(color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var S4=`in vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float fxaaQualitySubpix = 0.5;
const float fxaaQualityEdgeThreshold = 0.125;
const float fxaaQualityEdgeThresholdMin = 0.0833;
void main()
{
vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
vec4 color = FxaaPixelShader(
v_textureCoordinates,
colorTexture,
fxaaQualityRcpFrame,
fxaaQualitySubpix,
fxaaQualityEdgeThreshold,
fxaaQualityEdgeThresholdMin);
float alpha = texture(colorTexture, v_textureCoordinates).a;
out_FragColor = vec4(color.rgb, alpha);
}
`;var Vb=`#define SAMPLES 8
uniform float delta;
uniform float sigma;
uniform float direction;
uniform sampler2D colorTexture;
#ifdef USE_STEP_SIZE
uniform float stepSize;
#else
uniform vec2 step;
#endif
in vec2 v_textureCoordinates;
void main()
{
vec2 st = v_textureCoordinates;
vec2 dir = vec2(1.0 - direction, direction);
#ifdef USE_STEP_SIZE
vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
#else
vec2 step = step;
#endif
vec3 g;
g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
g.z = g.y * g.y;
vec4 result = texture(colorTexture, st) * g.x;
for (int i = 1; i < SAMPLES; ++i)
{
g.xy *= g.yz;
vec2 offset = float(i) * dir * step;
result += texture(colorTexture, st - offset) * g.x;
result += texture(colorTexture, st + offset) * g.x;
}
out_FragColor = result;
}
`;var w4=`uniform sampler2D colorTexture;
uniform sampler2D dirtTexture;
uniform sampler2D starTexture;
uniform vec2 dirtTextureDimensions;
uniform float distortion;
uniform float ghostDispersal;
uniform float haloWidth;
uniform float dirtAmount;
uniform float earthRadius;
uniform float intensity;
in vec2 v_textureCoordinates;
#define DISTANCE_TO_SPACE 6500000.0
vec4 getNDCFromWC(vec3 WC, float earthRadius)
{
vec4 positionEC = czm_view * vec4(WC, 1.0);
positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
}
float isInEarth(vec2 texcoord, vec2 sceneSize)
{
vec2 NDC = texcoord * 2.0 - 1.0;
vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
NDC.xy -= earthPosSC.xy;
float X = abs(NDC.x) * sceneSize.x;
float Y = abs(NDC.y) * sceneSize.y;
return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
}
vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
{
vec2 sceneSize = czm_viewport.zw;
vec3 color;
if(isSpace)
{
color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
}
else
{
color.r = texture(tex, texcoord + direction * distortion.r).r;
color.g = texture(tex, texcoord + direction * distortion.g).g;
color.b = texture(tex, texcoord + direction * distortion.b).b;
}
return vec4(clamp(color, 0.0, 1.0), 0.0);
}
void main(void)
{
vec4 originalColor = texture(colorTexture, v_textureCoordinates);
vec3 rgb = originalColor.rgb;
bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;
vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
vec4 sunPositionEC = czm_view * sunPos;
vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);
if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
{
out_FragColor = originalColor;
return;
}
vec2 texcoord = vec2(1.0) - v_textureCoordinates;
vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
vec2 invPixelSize = 1.0 / pixelSize;
vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);
vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
vec3 direction = normalize(vec3(ghostVec, 0.0));
vec4 result = vec4(0.0);
vec4 ghost = vec4(0.0);
for (int i = 0; i < 4; ++i)
{
vec2 offset = fract(texcoord + ghostVec * float(i));
ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
}
result += ghost;
vec2 haloVec = normalize(ghostVec) * haloWidth;
float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
weightForHalo = pow(1.0 - weightForHalo, 5.0);
result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;
vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
if (dirtTexCoords.x > 1.0)
{
dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);
}
if (dirtTexCoords.y > 1.0)
{
dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);
}
result += dirtAmount * texture(dirtTexture, dirtTexCoords);
float camrot = czm_view[0].z + czm_view[1].y;
float cosValue = cos(camrot);
float sinValue = sin(camrot);
mat3 rotation = mat3(
cosValue, -sinValue, 0.0,
sinValue, cosValue, 0.0,
0.0, 0.0, 1.0
);
vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
vec3 st2 = vec3((rotation * st1).xy, 1.0);
vec3 st3 = st2 * 0.5 + vec3(0.5);
vec2 lensStarTexcoord = st3.xy;
float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);
if (!isSpace)
{
result *= oneMinusWeightForLensFlare * intensity * 0.2;
}
else
{
result *= oneMinusWeightForLensFlare * intensity;
result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
}
result += texture(colorTexture, v_textureCoordinates);
out_FragColor = result;
}
`;var I4=`uniform sampler2D colorTexture;
uniform vec3 white;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
color = (color * (1.0 + color / white)) / (1.0 + color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var P4=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
float rand(vec2 co)
{
return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
}
void main(void)
{
float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
vec3 green = vec3(0.0, 1.0, 0.0);
out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
}
`;var D4=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
color = color / (1.0 + color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var R4=`uniform sampler2D colorTexture;
uniform sampler2D silhouetteTexture;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
vec4 color = texture(colorTexture, v_textureCoordinates);
out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
}
`;/**
* @license
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/var O4=`#if (FXAA_QUALITY_PRESET == 10)
#define FXAA_QUALITY_PS 3
#define FXAA_QUALITY_P0 1.5
#define FXAA_QUALITY_P1 3.0
#define FXAA_QUALITY_P2 12.0
#endif
#if (FXAA_QUALITY_PRESET == 11)
#define FXAA_QUALITY_PS 4
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 3.0
#define FXAA_QUALITY_P3 12.0
#endif
#if (FXAA_QUALITY_PRESET == 12)
#define FXAA_QUALITY_PS 5
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 4.0
#define FXAA_QUALITY_P4 12.0
#endif
#if (FXAA_QUALITY_PRESET == 13)
#define FXAA_QUALITY_PS 6
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 4.0
#define FXAA_QUALITY_P5 12.0
#endif
#if (FXAA_QUALITY_PRESET == 14)
#define FXAA_QUALITY_PS 7
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 4.0
#define FXAA_QUALITY_P6 12.0
#endif
#if (FXAA_QUALITY_PRESET == 15)
#define FXAA_QUALITY_PS 8
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 4.0
#define FXAA_QUALITY_P7 12.0
#endif
#if (FXAA_QUALITY_PRESET == 20)
#define FXAA_QUALITY_PS 3
#define FXAA_QUALITY_P0 1.5
#define FXAA_QUALITY_P1 2.0
#define FXAA_QUALITY_P2 8.0
#endif
#if (FXAA_QUALITY_PRESET == 21)
#define FXAA_QUALITY_PS 4
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 8.0
#endif
#if (FXAA_QUALITY_PRESET == 22)
#define FXAA_QUALITY_PS 5
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 8.0
#endif
#if (FXAA_QUALITY_PRESET == 23)
#define FXAA_QUALITY_PS 6
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 8.0
#endif
#if (FXAA_QUALITY_PRESET == 24)
#define FXAA_QUALITY_PS 7
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 3.0
#define FXAA_QUALITY_P6 8.0
#endif
#if (FXAA_QUALITY_PRESET == 25)
#define FXAA_QUALITY_PS 8
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 4.0
#define FXAA_QUALITY_P7 8.0
#endif
#if (FXAA_QUALITY_PRESET == 26)
#define FXAA_QUALITY_PS 9
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 4.0
#define FXAA_QUALITY_P8 8.0
#endif
#if (FXAA_QUALITY_PRESET == 27)
#define FXAA_QUALITY_PS 10
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 4.0
#define FXAA_QUALITY_P9 8.0
#endif
#if (FXAA_QUALITY_PRESET == 28)
#define FXAA_QUALITY_PS 11
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 4.0
#define FXAA_QUALITY_P10 8.0
#endif
#if (FXAA_QUALITY_PRESET == 29)
#define FXAA_QUALITY_PS 12
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 2.0
#define FXAA_QUALITY_P10 4.0
#define FXAA_QUALITY_P11 8.0
#endif
#if (FXAA_QUALITY_PRESET == 39)
#define FXAA_QUALITY_PS 12
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.0
#define FXAA_QUALITY_P2 1.0
#define FXAA_QUALITY_P3 1.0
#define FXAA_QUALITY_P4 1.0
#define FXAA_QUALITY_P5 1.5
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 2.0
#define FXAA_QUALITY_P10 4.0
#define FXAA_QUALITY_P11 8.0
#endif
#define FxaaBool bool
#define FxaaFloat float
#define FxaaFloat2 vec2
#define FxaaFloat3 vec3
#define FxaaFloat4 vec4
#define FxaaHalf float
#define FxaaHalf2 vec2
#define FxaaHalf3 vec3
#define FxaaHalf4 vec4
#define FxaaInt2 vec2
#define FxaaTex sampler2D
#define FxaaSat(x) clamp(x, 0.0, 1.0)
#define FxaaTexTop(t, p) texture(t, p)
#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
FxaaFloat4 FxaaPixelShader(
FxaaFloat2 pos,
FxaaTex tex,
FxaaFloat2 fxaaQualityRcpFrame,
FxaaFloat fxaaQualitySubpix,
FxaaFloat fxaaQualityEdgeThreshold,
FxaaFloat fxaaQualityEdgeThresholdMin
) {
FxaaFloat2 posM;
posM.x = pos.x;
posM.y = pos.y;
FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
#define lumaM rgbyM.y
FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
FxaaFloat maxSM = max(lumaS, lumaM);
FxaaFloat minSM = min(lumaS, lumaM);
FxaaFloat maxESM = max(lumaE, maxSM);
FxaaFloat minESM = min(lumaE, minSM);
FxaaFloat maxWN = max(lumaN, lumaW);
FxaaFloat minWN = min(lumaN, lumaW);
FxaaFloat rangeMax = max(maxWN, maxESM);
FxaaFloat rangeMin = min(minWN, minESM);
FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
FxaaFloat range = rangeMax - rangeMin;
FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
FxaaBool earlyExit = range < rangeMaxClamped;
if(earlyExit)
return rgbyM;
FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaNS = lumaN + lumaS;
FxaaFloat lumaWE = lumaW + lumaE;
FxaaFloat subpixRcpRange = 1.0/range;
FxaaFloat subpixNSWE = lumaNS + lumaWE;
FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
FxaaFloat lumaNESE = lumaNE + lumaSE;
FxaaFloat lumaNWNE = lumaNW + lumaNE;
FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
FxaaFloat lumaNWSW = lumaNW + lumaSW;
FxaaFloat lumaSWSE = lumaSW + lumaSE;
FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
FxaaBool horzSpan = edgeHorz >= edgeVert;
FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
if(!horzSpan) lumaN = lumaW;
if(!horzSpan) lumaS = lumaE;
if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
FxaaFloat gradientN = lumaN - lumaM;
FxaaFloat gradientS = lumaS - lumaM;
FxaaFloat lumaNN = lumaN + lumaM;
FxaaFloat lumaSS = lumaS + lumaM;
FxaaBool pairN = abs(gradientN) >= abs(gradientS);
FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
if(pairN) lengthSign = -lengthSign;
FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
FxaaFloat2 posB;
posB.x = posM.x;
posB.y = posM.y;
FxaaFloat2 offNP;
offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
if(!horzSpan) posB.x += lengthSign * 0.5;
if( horzSpan) posB.y += lengthSign * 0.5;
FxaaFloat2 posN;
posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
FxaaFloat2 posP;
posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
FxaaFloat subpixE = subpixC * subpixC;
FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
if(!pairN) lumaNN = lumaSS;
FxaaFloat gradientScaled = gradient * 1.0/4.0;
FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
FxaaFloat subpixF = subpixD * subpixE;
FxaaBool lumaMLTZero = lumaMM < 0.0;
lumaEndN -= lumaNN * 0.5;
lumaEndP -= lumaNN * 0.5;
FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
FxaaBool doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
#if (FXAA_QUALITY_PS > 3)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
#if (FXAA_QUALITY_PS > 4)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
#if (FXAA_QUALITY_PS > 5)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
#if (FXAA_QUALITY_PS > 6)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
#if (FXAA_QUALITY_PS > 7)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
#if (FXAA_QUALITY_PS > 8)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
#if (FXAA_QUALITY_PS > 9)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
#if (FXAA_QUALITY_PS > 10)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
#if (FXAA_QUALITY_PS > 11)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
#if (FXAA_QUALITY_PS > 12)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
#endif
}
FxaaFloat dstN = posM.x - posN.x;
FxaaFloat dstP = posP.x - posM.x;
if(!horzSpan) dstN = posM.y - posN.y;
if(!horzSpan) dstP = posP.y - posM.y;
FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
FxaaFloat spanLength = (dstP + dstN);
FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
FxaaFloat spanLengthRcp = 1.0/spanLength;
FxaaBool directionN = dstN < dstP;
FxaaFloat dst = min(dstN, dstP);
FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
FxaaFloat subpixG = subpixF * subpixF;
FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
}
`;function UC(e){e=e??H.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=$n()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(UC.prototype,{ready:{get:function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)if(!e[n].ready)return!1;return!0}},name:{get:function(){return this._name}},enabled:{get:function(){return this._stages[0].enabled},set:function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)t[i].enabled=e}},uniforms:{get:function(){return this._uniforms}},inputPreviousStageTexture:{get:function(){return this._inputPreviousStageTexture}},length:{get:function(){return this._stages.length}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});UC.prototype._isSupported=function(e){let t=this._stages,n=t.length;for(let i=0;i<n;++i)if(!t[i]._isSupported(e))return!1;return!0};UC.prototype.get=function(e){return this._stages[e]};function D4t(e){let t=l(e._selected)?e._selected.length:0,n=l(e._parentSelected)?e._parentSelected:0,i=e._selected!==e._selectedShadow||t!==e._selectedLength;if(i=i||e._parentSelected!==e._parentSelectedShadow||n!==e._parentSelectedLength,l(e._selected)&&l(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):l(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!i&&l(e._combinedSelected)){if(!l(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(let r=0;r<t;++r)if(e._combinedSelected[r]!==e._combinedSelectedShadow[r])return!0}return i}UC.prototype.update=function(e,t){this._selectedDirty=D4t(this),this._selectedShadow=this._selected,this._parentSelectedShadow=this._parentSelected,this._combinedSelectedShadow=this._combinedSelected,this._selectedLength=l(this._selected)?this._selected.length:0,this._parentSelectedLength=l(this._parentSelected)?this._parentSelected.length:0;let n=this._stages,i=n.length;for(let r=0;r<i;++r){let o=n[r];this._selectedDirty&&(o.parentSelected=this._combinedSelected),o.update(e,t)}};UC.prototype.isDestroyed=function(){return!1};UC.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return le(this)};var yf=UC;var fs={};function yce(e){let r=`#define USE_STEP_SIZE
${Vb}`,o=new Ur({name:`${e}_x_direction`,fragmentShader:r,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:gd.LINEAR}),s=new Ur({name:`${e}_y_direction`,fragmentShader:r,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:gd.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return o.uniforms.delta},set:function(c){let u=o.uniforms,f=s.uniforms;u.delta=f.delta=c}},sigma:{get:function(){return o.uniforms.sigma},set:function(c){let u=o.uniforms,f=s.uniforms;u.sigma=f.sigma=c}},stepSize:{get:function(){return o.uniforms.stepSize},set:function(c){let u=o.uniforms,f=s.uniforms;u.stepSize=f.stepSize=c}}}),new yf({name:e,stages:[o,s],uniforms:a})}fs.createBlurStage=function(){return yce("czm_blur")};fs.createDepthOfFieldStage=function(){let e=yce("czm_depth_of_field_blur"),t=new Ur({name:"czm_depth_of_field_composite",fragmentShader:x4,uniforms:{focalDistance:5,blurTexture:e.name}}),n={};return Object.defineProperties(n,{focalDistance:{get:function(){return t.uniforms.focalDistance},set:function(i){t.uniforms.focalDistance=i}},delta:{get:function(){return e.uniforms.delta},set:function(i){e.uniforms.delta=i}},sigma:{get:function(){return e.uniforms.sigma},set:function(i){e.uniforms.sigma=i}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(i){e.uniforms.stepSize=i}}}),new yf({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};fs.isDepthOfFieldSupported=function(e){return e.context.depthTexture};fs.createEdgeDetectionStage=function(){let e=$n();return new Ur({name:`czm_edge_detection_${e}`,fragmentShader:E4,uniforms:{length:.25,color:z.clone(z.BLACK)}})};fs.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function R4t(e){if(!l(e))return fs.createEdgeDetectionStage();let t=new yf({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",r="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a};
`,r+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates);
if (edge${a}.a > 0.0)
{
color = edge${a};
break;
}
`,n[`edgeTexture${a}`]=e[a].name;let o=`${i}in vec2 v_textureCoordinates;
void main() {
vec4 color = vec4(0.0);
for (int i = 0; i < ${e.length}; i++)
{
${r} }
out_FragColor = color;
}
`,s=new Ur({name:"czm_edge_detection_combine",fragmentShader:o,uniforms:n});return new yf({name:"czm_edge_detection_composite",stages:[t,s]})}fs.createSilhouetteStage=function(e){let t=R4t(e),n=new Ur({name:"czm_silhouette_color_edges",fragmentShader:R4,uniforms:{silhouetteTexture:t.name}});return new yf({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};fs.isSilhouetteSupported=function(e){return e.context.depthTexture};fs.createBloomStage=function(){let e=new Ur({name:"czm_bloom_contrast_bias",fragmentShader:b4,uniforms:{contrast:128,brightness:-.3}}),t=yce("czm_bloom_blur"),n=new yf({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Ur({name:"czm_bloom_generate_composite",fragmentShader:y4,uniforms:{glowOnly:!1,bloomTexture:n.name}}),r={};return Object.defineProperties(r,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(o){i.uniforms.glowOnly=o}},contrast:{get:function(){return e.uniforms.contrast},set:function(o){e.uniforms.contrast=o}},brightness:{get:function(){return e.uniforms.brightness},set:function(o){e.uniforms.brightness=o}},delta:{get:function(){return t.uniforms.delta},set:function(o){t.uniforms.delta=o}},sigma:{get:function(){return t.uniforms.sigma},set:function(o){t.uniforms.sigma=o}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(o){t.uniforms.stepSize=o}}}),new yf({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:r})};fs.createAmbientOcclusionStage=function(){let e=new Ur({name:"czm_ambient_occlusion_generate",fragmentShader:p4,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new Ur({name:"czm_ambient_occlusion_composite",fragmentShader:g4,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:e.name}}),n={};return Object.defineProperties(n,{intensity:{get:function(){return e.uniforms.intensity},set:function(i){e.uniforms.intensity=i}},bias:{get:function(){return e.uniforms.bias},set:function(i){e.uniforms.bias=i}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(i){e.uniforms.lengthCap=i}},directionCount:{get:function(){return e.uniforms.directionCount},set:function(i){e.uniforms.directionCount=i}},stepCount:{get:function(){return e.uniforms.stepCount},set:function(i){e.uniforms.stepCount=i}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(i){e.uniforms.randomTexture=i}},ambientOcclusionOnly:{get:function(){return t.uniforms.ambientOcclusionOnly},set:function(i){t.uniforms.ambientOcclusionOnly=i}}}),new yf({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};fs.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var O4t=`#define FXAA_QUALITY_PRESET 39
${O4}
${S4}`;fs.createFXAAStage=function(){return new Ur({name:"czm_FXAA",fragmentShader:O4t,sampleMode:gd.LINEAR})};fs.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=m4,new Ur({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};fs.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=C4,new Ur({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};fs.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=v4,new Ur({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};fs.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=D4,new Ur({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};fs.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=I4,new Ur({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:z.WHITE,autoExposure:void 0,exposure:1}})};fs.createAutoExposureStage=function(){return new QU};fs.createBlackAndWhiteStage=function(){return new Ur({name:"czm_black_and_white",fragmentShader:_4,uniforms:{gradations:5}})};fs.createBrightnessStage=function(){return new Ur({name:"czm_brightness",fragmentShader:A4,uniforms:{brightness:.5}})};fs.createNightVisionStage=function(){return new Ur({name:"czm_night_vision",fragmentShader:P4})};fs.createDepthViewStage=function(){return new Ur({name:"czm_depth_view",fragmentShader:T4})};fs.createLensFlareStage=function(){return new Ur({name:"czm_lens_flare",fragmentShader:w4,uniforms:{dirtTexture:Zt("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Zt("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ee.WGS84.maximumRadius}})};var _d=fs;function yy(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function N4(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function Ace(e,t,n,i,r){if(!i.enabled||!i._isSupported(t))return r;let o=n[i.name]={};if(l(r)){let a=e.getStageByName(r);o[N4(a)]=!0}let s=i.uniforms;if(l(s)){let a=Object.getOwnPropertyNames(s),c=a.length;for(let u=0;u<c;++u){let f=s[a[u]];if(typeof f=="string"){let d=e.getStageByName(f);l(d)&&(o[N4(d)]=!0)}}}return i.name}function M4(e,t,n,i,r){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return r;let o=r,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=r,c=i.length;for(let d=0;d<c;++d){let p=i.get(d);l(p.length)?a=M4(e,t,n,p,r):a=Ace(e,t,n,p,r),s&&(r=a)}let u,f;if(s)for(u=1;u<c;++u)f=N4(i.get(u)),l(n[f])||(n[f]={}),n[f][o]=!0;else for(u=1;u<c;++u){f=N4(i.get(u));let d=n[f];for(let p=0;p<u;++p)d[N4(i.get(p))]=!0}return a}function M4t(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,r=e.bloom,o=e._tonemapping,s=e.fxaa,a=M4(e,t,n,i,void 0);a=M4(e,t,n,r,a),a=Ace(e,t,n,o,a),a=M4(e,t,n,e,a),Ace(e,t,n,s,a)}else M4(e,t,n,e,void 0);return n}function N4t(e,t,n){let r=e._collection.getStageByName(t),o=r._textureScale,s=r._forcePowerOfTwo,a=r._pixelFormat,c=r._pixelDatatype,u=r._clearColor,f,d,p=e._framebuffers,g=p.length;for(f=0;f<g;++f){if(d=p[f],o!==d.textureScale||s!==d.forcePowerOfTwo||a!==d.pixelFormat||c!==d.pixelDatatype||!z.equals(u,d.clearColor))continue;let m=d.stages,y=m.length,A=!1;for(let b=0;b<y;++b)if(n[m[b]]){A=!0;break}if(!A)break}return l(d)&&f<g?(d.stages.push(t),d):(d={textureScale:o,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:u,stages:[t],buffer:new ai({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(d),d)}function L4t(e,t){let n=M4t(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=N4t(e,i,n[i]))}function bce(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function F4t(e,t){let n=e._width,i=e._height,r=e._framebuffers,o=r.length;for(let s=0;s<o;++s){let a=r[s],c=a.textureScale,u=Math.ceil(n*c),f=Math.ceil(i*c),d=Math.min(u,f);a.forcePowerOfTwo&&(D.isPowerOfTwo(d)||(d=D.nextPowerOfTwo(d)),u=d,f=d),a.buffer.update(t,u,f),a.clear=new ui({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}yy.prototype.updateDependencies=function(){this._updateDependencies=!0};yy.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),r=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),o=l(t._tonemapping)&&t._tonemapping.enabled&&t._tonemapping._isSupported(e),s=l(t.fxaa)&&t.fxaa.enabled&&t.fxaa._isSupported(e),a=!l(t._activeStages)||t._activeStages.length>0||i||r||o||s;if((n||!a&&this._framebuffers.length>0)&&(bce(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&L4t(this,e);let c=e.drawingBufferWidth,u=e.drawingBufferHeight,f=this._width!==c||this._height!==u;!n&&!f||(this._width=c,this._height=u,this._updateDependencies=!1,bce(this),F4t(this,e))};yy.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};yy.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};yy.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};yy.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};yy.prototype.isDestroyed=function(){return!1};yy.prototype.destroy=function(){return bce(this),le(this)};var zC=yy;var u2e={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};Object.freeze(u2e);var Ay=u2e;var xce=[];function bu(){let e=_d.createFXAAStage(),t=_d.createAmbientOcclusionStage(),n=_d.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=_d.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Ay.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let r=new zC(this),o={},s=xce;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();o[c.name]=c,c._textureCache=r;let u=c.length;if(l(u))for(let f=0;f<u;++f)s.push(c.get(f))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=o,this._textureCache=r}Object.defineProperties(bu.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let c=t[a];e=e||c.ready&&c.enabled}let i=this._fxaa,r=this._ao,o=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||r.ready&&r.enabled,e=e||o.ready&&o.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return Tce(this),this._stages.length}},outputTexture:{get:function(){let e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);let t=this._stages,n=t.length;for(let s=n-1;s>=0;--s){let a=t[s];if(l(a)&&a.ready&&a.enabled)return this.getOutputTexture(a.name)}let i=this._tonemapping;if(i.enabled&&i.ready)return this.getOutputTexture(i.name);let r=this._bloom;if(r.enabled&&r.ready)return this.getOutputTexture(r.name);let o=this._ao;if(o.enabled&&o.ready)return this.getOutputTexture(o.name)}},hasSelected:{get:function(){let e=this._stages.slice();for(;e.length>0;){let t=e.pop();if(!l(t))continue;if(l(t.selected))return!0;let n=t.length;if(l(n))for(let i=0;i<n;++i)e.push(t.get(i))}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper===e)return;l(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());let t=this._autoExposureEnabled,n;switch(e){case Ay.REINHARD:n=_d.createReinhardTonemappingStage(t);break;case Ay.MODIFIED_REINHARD:n=_d.createModifiedReinhardTonemappingStage(t);break;case Ay.FILMIC:n=_d.createFilmicTonemappingStage(t);break;case Ay.PBR_NEUTRAL:n=_d.createPbrNeutralTonemappingStage(t);break;default:n=_d.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}else n.uniforms.exposure=this._exposure;this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}},exposure:{get:function(){return this._exposure},set:function(e){this._tonemapping.uniforms.exposure=e,this._exposure=e}}});function Tce(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,r=0;i<n.length;++i){let o=n[i];o&&(o._index=r++,t.push(o))}e._stages=t}bu.prototype.add=function(e){let t=this._stageNames,n=xce;for(n.push(e);n.length>0;){let r=n.pop();t[r.name]=r,r._textureCache=this._textureCache;let o=r.length;if(l(o))for(let s=0;s<o;++s)n.push(r.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};bu.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=xce;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let r=i.length;if(l(r))for(let o=0;o<r;++o)n.push(i.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};bu.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};bu.prototype.get=function(e){return Tce(this),this._stages[e]};bu.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};bu.prototype.getStageByName=function(e){return this._stageNames[e]};bu.prototype.update=function(e,t,n){Tce(this);let i=this._activeStages,r=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let o=this._stages;r.length=o.length;let s=0;for(let b=0;b<o.length;++b){let x=o[b];x.ready&&x.enabled&&x._isSupported(e)&&(r[s++]=x)}r.length=s;let a=s!==i.length;if(!a){for(let b=0;b<s;++b)if(r[b]!==i[b]){a=!0;break}}let c=this._ao,u=this._bloom,f=this._autoExposure,d=this._tonemapping,p=this._fxaa;d.enabled=n;let g=c.enabled&&c._isSupported(e),m=u.enabled&&u._isSupported(e),y=d.enabled&&d._isSupported(e),A=p.enabled&&p._isSupported(e);if((a||this._textureCacheDirty||g!==this._aoEnabled||m!==this._bloomEnabled||y!==this._tonemappingEnabled||A!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=g,this._bloomEnabled=m,this._tonemappingEnabled=y,this._fxaaEnabled=A,this._textureCacheDirty=!1),l(this._randomTexture)&&!g&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&g){let x=new Uint8Array(196608);for(let T=0;T<196608;T+=3)x[T]=Math.floor(Math.random()*255);this._randomTexture=new Dt({context:e,pixelFormat:Ke.RGB,pixelDatatype:ze.UNSIGNED_BYTE,source:{arrayBufferView:x,width:256,height:256},sampler:new Ht({wrapS:hn.REPEAT,wrapT:hn.REPEAT,minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),u.update(e,t),d.update(e,t),this._autoExposureEnabled&&f.update(e,t);for(let b=0;b<o.length;++b)o[b].update(e,t);s=0;for(let b=0;b<o.length;++b){let x=o[b];x.ready&&x.enabled&&x._isSupported(e)&&s++}a=s!==r.length,a&&this.update(e,t,n)};bu.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function VC(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}bu.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return VC(t)};function K0(e,t,n,i,r){if(l(e.execute)){e.execute(t,n,i,r);return}if(e.inputPreviousStageTexture){K0(e.get(0),t,n,i,r);for(let o=1;o<e.length;++o)K0(e.get(o),t,VC(e.get(o-1)),i,r)}else for(let o=0;o<e.length;++o)K0(e.get(o),t,n,i,r)}bu.prototype.execute=function(e,t,n,i){let r=this._activeStages,o=r.length,s=this._fxaa,a=this._ao,c=this._bloom,u=this._autoExposure,f=this._tonemapping,d=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),g=this._autoExposureEnabled,m=f.enabled&&f._isSupported(e),y=s.enabled&&s._isSupported(e);if(!y&&!d&&!p&&!m&&o===0)return;let A=t;d&&a.ready&&(K0(a,e,A,n,i),A=VC(a)),p&&c.ready&&(K0(c,e,A,n,i),A=VC(c)),g&&u.ready&&K0(u,e,A,n,i),m&&f.ready&&(K0(f,e,A,n,i),A=VC(f));let b=A;if(o>0){K0(r[0],e,A,n,i);for(let x=1;x<o;++x)K0(r[x],e,VC(r[x-1]),n,i);b=VC(r[o-1])}y&&s.ready&&K0(s,e,b,n,i)};bu.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(gf,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};bu.prototype.isDestroyed=function(){return!1};bu.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),le(this)};var L4=bu;var Ece=class{constructor(){ut(this,"quadtree");ut(this,"tilingScheme");ut(this,"errorEvent");pe.throwInstantiationError()}static computeDefaultLevelZeroMaximumGeometricError(t){return t.ellipsoid.maximumRadius*2*Math.PI*.25/(65*t.getNumberOfXTilesAtLevel(0))}update(t,n){pe.throwInstantiationError()}beginUpdate(t,n,i){pe.throwInstantiationError()}endUpdate(t,n,i){pe.throwInstantiationError()}getLevelMaximumGeometricError(t){pe.throwInstantiationError()}loadTile(t,n,i){pe.throwInstantiationError()}computeTileVisibility(t,n,i){pe.throwInstantiationError()}showTileThisFrame(t,n,i,r){pe.throwInstantiationError()}computeDistanceToTile(t,n){pe.throwInstantiationError()}isDestroyed(){pe.throwInstantiationError()}destroy(){pe.throwInstantiationError()}},Cce=Ece;var vce=class{constructor(){this._controllers=[],this._needsUpdate=new Set}get controllerCount(){return this._controllers.length}registerController(t,n,i){let r=i??this.controllerCount;this._controllers.splice(r,0,t),this._needsUpdate.add(t),t.connectedCallback(n)}unregisterController(t,n){let i=this._controllers,r=i.indexOf(t);r!==-1&&(i.splice(r,1),t.disconnectedCallback(n))}update(t,n){for(let i of this._controllers)i.enabled&&(this._needsUpdate.has(i)&&(i.firstUpdate(t,n),this._needsUpdate.delete(i)),i.update(t,n))}},F4=vce;function jC(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}jC.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};jC.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof gn,!(this._previousMode===re.SCENE2D||this._previousMode===re.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,re.SCENE2D,!0),n._mode=re.MORPHING,n.camera._setTransform(N.IDENTITY),this._previousMode===re.COLUMBUS_VIEW?p8t(this,e):T8t(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var B4t=new h,k4t=new h,U4t=new h,z4t=new h,V4t=new h,j4t=new h,H4t=new h,G4t=new he,W4t=new N,q4t=new Ji,Y4t=new gn,X4t={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};jC.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===re.COLUMBUS_VIEW||this._previousMode===re.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,re.COLUMBUS_VIEW,!0),n.camera._setTransform(N.IDENTITY);let i=B4t,r=k4t,o=U4t;if(e>0)i.x=0,i.y=-1,i.z=1,i=h.multiplyByScalar(h.normalize(i,i),5*t.maximumRadius,i),h.negate(h.normalize(i,r),r),h.cross(h.UNIT_X,r,o);else{let u=n.camera;if(this._previousMode===re.SCENE2D)h.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,h.negate(h.UNIT_Z,r),h.clone(h.UNIT_Y,o);else{h.clone(u.positionWC,i),h.clone(u.directionWC,r),h.clone(u.upWC,o);let f=t.scaleToGeodeticSurface(i,H4t),d=At.eastNorthUpToFixedFrame(f,t,W4t);N.inverseTransformation(d,d),n.mapProjection.project(t.cartesianToCartographic(i,G4t),i),N.multiplyByPointAsVector(d,r,r),N.multiplyByPointAsVector(d,o,o)}}let s;this._morphToOrthographic?(s=Y4t,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=q4t,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=D.toRadians(60));let a=X4t;a.position=i,a.direction=r,a.up=o,a.frustum=s;let c=C8t(a);B4(this,c),this._previousMode===re.SCENE2D?E8t(this,e,a,c):(a.position2D=N.multiplyByPoint(Or.TRANSFORM_2D,i,z4t),a.direction2D=N.multiplyByPointAsVector(Or.TRANSFORM_2D,r,V4t),a.up2D=N.multiplyByPointAsVector(Or.TRANSFORM_2D,o,j4t),n._mode=re.MORPHING,x2e(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var Ice={position:new h,direction:new h,up:new h,frustum:void 0},d2e=new Ji;jC.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===re.SCENE3D||this._previousMode===re.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,re.SCENE3D,!0),n._mode=re.MORPHING,n.camera._setTransform(N.IDENTITY),this._previousMode===re.SCENE2D)o8t(this,e,t);else{let i;e>0?(i=Ice,h.fromDegrees(0,0,5*t.maximumRadius,t,i.position),h.negate(i.position,i.direction),h.normalize(i.direction,i.direction),h.clone(h.UNIT_Z,i.up)):i=h2e(this,t);let r,o=n.camera;o.frustum instanceof gn?r=o.frustum.clone():(r=d2e,r.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,r.fov=D.toRadians(60)),i.frustum=r;let s=E2e(i);B4(this,s),wce(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};jC.prototype.isDestroyed=function(){return!1};jC.prototype.destroy=function(){return VW(this),le(this)};function B4(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new ua(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,un.LEFT_DOWN),e._morphHandler.setInputAction(n,un.MIDDLE_DOWN),e._morphHandler.setInputAction(n,un.RIGHT_DOWN),e._morphHandler.setInputAction(n,un.WHEEL)}}function VW(e){let t=e._currentTweens;for(let n=0;n<t.length;++n)t[n].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}var K4t=new he,$4t=new h,J4t=new N;function h2e(e,t){let n=e._scene,i=n.camera,r=Ice,o=r.position,s=r.direction,a=r.up,c=n.mapProjection.unproject(i.position,K4t);t.cartographicToCartesian(c,o);let u=t.scaleToGeodeticSurface(o,$4t),f=At.eastNorthUpToFixedFrame(u,t,J4t);return N.multiplyByPointAsVector(f,i.direction,s),N.multiplyByPointAsVector(f,i.up,a),r}var Z4t=new h,Q4t=new h,e8t=new h,t8t=new h,n8t=new h,i8t=new h;function wce(e,t,n,i){t*=.5;let r=e._scene,o=r.camera,s=h.clone(o.position,Z4t),a=h.clone(o.direction,Q4t),c=h.clone(o.up,e8t),u=N.multiplyByPoint(Or.TRANSFORM_2D_INVERSE,n.position,t8t),f=N.multiplyByPointAsVector(Or.TRANSFORM_2D_INVERSE,n.direction,n8t),d=N.multiplyByPointAsVector(Or.TRANSFORM_2D_INVERSE,n.up,i8t);function p(m){Dh(s,u,m.time,o.position),Dh(a,f,m.time,o.direction),Dh(c,d,m.time,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.right,o.right)}let g=r.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){T2e(e,r,0,1,t,i)}});e._currentTweens.push(g)}var r8t=new gn,m2e=new h,p2e=new h,g2e=new h,Pce=new h,_2e=new h,y2e=new h;function o8t(e,t,n){t/=3;let i=e._scene,r=i.camera,o;t>0?(o=Ice,h.fromDegrees(0,0,5*n.maximumRadius,n,o.position),h.negate(o.position,o.direction),h.normalize(o.direction,o.direction),h.clone(h.UNIT_Z,o.up)):(r.position.z=r.frustum.right-r.frustum.left,o=h2e(e,n));let s;e._morphToOrthographic?(s=r8t,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=r.frustum.right-r.frustum.left):(s=d2e,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=D.toRadians(60)),o.frustum=s;let a=E2e(o);B4(e,a);let c;e._morphToOrthographic?c=function(){wce(e,t,o,a)}:c=function(){b2e(e,t,o,function(){wce(e,t,o,a)})},t>0?(i._mode=re.SCENE2D,r.flyTo({duration:t,destination:h.fromDegrees(0,0,5*n.maximumRadius,n,Pce),complete:function(){i._mode=re.MORPHING,c()}})):c()}function Dh(e,t,n,i){return h.lerp(e,t,n,i)}function A2e(e,t,n,i,r){let o=e._scene,s=o.camera;if(s.frustum instanceof gn)return;let a=s.frustum.fov,c=D.RADIANS_PER_DEGREE*.5,u=n.position.z*Math.tan(a*.5);s.frustum.far=u/Math.tan(c*.5)+1e7;function f(p){s.frustum.fov=D.lerp(a,c,p.time);let g=u/Math.tan(s.frustum.fov*.5);i(s,g)}let d=o.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){s.frustum=n.frustum.clone(),r(e)}});e._currentTweens.push(d)}var s8t=new h,a8t=new h,c8t=new h,Sce=new h,l8t=new h,u8t=new h,f8t=new As,d8t=new pn,h8t=new h,m8t={position:void 0,direction:void 0,up:void 0,frustum:void 0};function p8t(e,t){t*=.5;let n=e._scene,i=n.camera,r=h.clone(i.position,s8t),o=h.clone(i.direction,a8t),s=h.clone(i.up,c8t),a=h.negate(h.UNIT_Z,l8t),c=h.clone(h.UNIT_Y,u8t),u=Sce;if(t>0)h.clone(h.ZERO,Sce),u.z=5*n.ellipsoid.maximumRadius;else{h.clone(r,Sce);let A=d8t;N.multiplyByPoint(Or.TRANSFORM_2D,r,A.origin),N.multiplyByPointAsVector(Or.TRANSFORM_2D,o,A.direction);let b=n.globe;if(l(b)){let x=b.pickWorldCoordinates(A,n,!0,h8t);l(x)&&(N.multiplyByPoint(Or.TRANSFORM_2D_INVERSE,x,u),u.z+=h.distance(r,u))}}let f=f8t;f.right=u.z*.5,f.left=-f.right,f.top=f.right*(n.drawingBufferHeight/n.drawingBufferWidth),f.bottom=-f.top;let d=m8t;d.position=u,d.direction=a,d.up=c,d.frustum=f;let p=C2e(d);B4(e,p);function g(A){Dh(r,u,A.time,i.position),Dh(o,a,A.time,i.direction),Dh(s,c,A.time,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function m(A,b){A.position.z=b}let y=n.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){A2e(e,t,d,m,p)}});e._currentTweens.push(y)}var f2e=new he,g8t={position:new h,direction:new h,up:new h,position2D:new h,direction2D:new h,up2D:new h,frustum:new As},_8t={position:new h,direction:new h,up:new h,frustum:void 0},y8t=new h,A8t=new pn,b8t=new N,x8t=new h;function T8t(e,t,n){t*=.5;let i=e._scene,r=i.camera,o=g8t;if(t>0)h.clone(h.ZERO,o.position),o.position.z=5*n.maximumRadius,h.negate(h.UNIT_Z,o.direction),h.clone(h.UNIT_Y,o.up);else{n.cartesianToCartographic(r.positionWC,f2e),i.mapProjection.project(f2e,o.position),h.negate(h.UNIT_Z,o.direction),h.clone(h.UNIT_Y,o.up);let d=A8t;h.clone(o.position2D,d.origin);let p=h.clone(r.directionWC,d.direction),g=n.scaleToGeodeticSurface(r.positionWC,x8t),m=At.eastNorthUpToFixedFrame(g,n,b8t);N.inverseTransformation(m,m),N.multiplyByPointAsVector(m,p,p),N.multiplyByPointAsVector(Or.TRANSFORM_2D,p,p);let y=i.globe;if(l(y)){let A=y.pickWorldCoordinates(d,i,!0,y8t);if(l(A)){let b=h.distance(o.position2D,A);A.x+=b,h.clone(A,o.position2D)}}}function s(d,p){d.position.x=p}N.multiplyByPoint(Or.TRANSFORM_2D,o.position,o.position2D),N.multiplyByPointAsVector(Or.TRANSFORM_2D,o.direction,o.direction2D),N.multiplyByPointAsVector(Or.TRANSFORM_2D,o.up,o.up2D);let a=o.frustum;a.right=o.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let c=_8t;N.multiplyByPoint(Or.TRANSFORM_2D_INVERSE,o.position2D,c.position),h.clone(o.direction,c.direction),h.clone(o.up,c.up),c.frustum=a;let u=C2e(c);B4(e,u);function f(){A2e(e,t,o,s,u)}x2e(e,t,o,f)}function b2e(e,t,n,i){let r=e._scene,o=r.camera,s=o.frustum.right-o.frustum.left;o.frustum=n.frustum.clone();let a=o.frustum.fov,c=D.RADIANS_PER_DEGREE*.5,u=s*Math.tan(a*.5);o.frustum.far=u/Math.tan(c*.5)+1e7,o.frustum.fov=c;function f(p){o.frustum.fov=D.lerp(c,a,p.time),o.position.z=u/Math.tan(o.frustum.fov*.5)}let d=r.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){i(e)}});e._currentTweens.push(d)}function E8t(e,t,n,i){t*=.5;let r=e._scene,o=r.camera,s=h.clone(n.position,Pce),a=h.clone(n.direction,_2e),c=h.clone(n.up,y2e);r._mode=re.MORPHING;function u(){o.frustum=n.frustum.clone();let f=h.clone(o.position,m2e),d=h.clone(o.direction,p2e),p=h.clone(o.up,g2e);f.z=s.z;function g(y){Dh(f,s,y.time,o.position),Dh(d,a,y.time,o.direction),Dh(p,c,y.time,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.right,o.right)}let m=r.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){i(e)}});e._currentTweens.push(m)}e._morphToOrthographic?u():b2e(e,0,n,u)}function x2e(e,t,n,i){let r=e._scene,o=r.camera,s=h.clone(o.position,m2e),a=h.clone(o.direction,p2e),c=h.clone(o.up,g2e),u=h.clone(n.position2D,Pce),f=h.clone(n.direction2D,_2e),d=h.clone(n.up2D,y2e);function p(m){Dh(s,u,m.time,o.position),Dh(a,f,m.time,o.direction),Dh(c,d,m.time,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)}let g=r.tweens.add({duration:t,easingFunction:Ls.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){T2e(e,r,1,0,t,i)}});e._currentTweens.push(g)}function T2e(e,t,n,i,r,o){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:r,easingFunction:Ls.QUARTIC_OUT};l(o)&&(s.complete=function(){o(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function E2e(e){return function(t){let n=t._scene;n._mode=re.SCENE3D,n.morphTime=re.getMorphTime(re.SCENE3D),VW(t);let i=n.camera;(t._previousMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone());let r=i.frustum;n.frameState.useLogDepth&&(r.near=.1,r.far=1e10);let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE3D,o)}}function C2e(e){return function(t){let n=t._scene;n._mode=re.SCENE2D,n.morphTime=re.getMorphTime(re.SCENE2D),VW(t);let i=n.camera;h.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right),i.frustum=e.frustum.clone();let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE2D,r)}}function C8t(e){return function(t){let n=t._scene;n._mode=re.COLUMBUS_VIEW,n.morphTime=re.getMorphTime(re.COLUMBUS_VIEW),VW(t);let i=n.camera;(t._previousModeMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,h.clone(e.position,i.position),h.clone(e.direction,i.direction),h.clone(e.up,i.up),h.cross(i.direction,i.up,i.right),h.normalize(i.right,i.right));let r=i.frustum;n.frameState.useLogDepth&&(r.near=.1,r.far=1e10);let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.COLUMBUS_VIEW,o)}}var k4=jC;function jW(e,t,n,i,r,o,s,a,c,u){this._tweens=e,this._tweenjs=t,this._startObject=Je(n),this._stopObject=Je(i),this._duration=r,this._delay=o,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=u,this.needsStart=!0}Object.defineProperties(jW.prototype,{startObject:{get:function(){return this._startObject}},stopObject:{get:function(){return this._stopObject}},duration:{get:function(){return this._duration}},delay:{get:function(){return this._delay}},easingFunction:{get:function(){return this._easingFunction}},update:{get:function(){return this._update}},complete:{get:function(){return this._complete}},tweenjs:{get:function(){return this._tweenjs}}});jW.prototype.cancelTween=function(){this._tweens.remove(this)};function gp(){this._tweens=[]}Object.defineProperties(gp.prototype,{length:{get:function(){return this._tweens.length}}});gp.prototype.add=function(e){if(e=e??H.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new jW(this);let t=e.duration/kn.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/kn.SECONDS_PER_MILLISECOND,r=e.easingFunction??Ls.LINEAR_NONE,o=e.startObject,s=new kRe(o);s.to(Je(e.stopObject),t),s.delay(i),s.easing(r),l(e.update)&&s.onUpdate(function(){e.update(o)}),s.onComplete(e.complete??null),s.repeat(e._repeat??0);let a=new jW(this,s,e.startObject,e.stopObject,e.duration,n,r,e.update,e.complete,e.cancel);return this._tweens.push(a),a};gp.prototype.addProperty=function(e){e=e??H.EMPTY_OBJECT;let t=e.object,n=e.property,i=e.startValue,r=e.stopValue;function o(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:r},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:o,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};gp.prototype.addAlpha=function(e){e=e??H.EMPTY_OBJECT;let t=e.material,n=[];for(let r in t.uniforms)t.uniforms.hasOwnProperty(r)&&l(t.uniforms[r])&&l(t.uniforms[r].alpha)&&n.push(r);function i(r){let o=n.length;for(let s=0;s<o;++s)t.uniforms[n[s]].alpha=r.alpha}return this.add({startObject:{alpha:e.startValue??0},stopObject:{alpha:e.stopValue??1},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:i,complete:e.complete,cancel:e.cancel})};gp.prototype.addOffsetIncrement=function(e){e=e??H.EMPTY_OBJECT;let n=e.material.uniforms;return this.addProperty({object:n,property:"offset",startValue:n.offset,stopValue:n.offset+1,duration:e.duration,delay:e.delay,easingFunction:e.easingFunction,update:e.update,cancel:e.cancel,_repeat:1/0})};gp.prototype.remove=function(e){if(!l(e))return!1;let t=this._tweens.indexOf(e);return t!==-1?(e.tweenjs.stop(),l(e.cancel)&&e.cancel(),this._tweens.splice(t,1),!0):!1};gp.prototype.removeAll=function(){let e=this._tweens;for(let t=0;t<e.length;++t){let n=e[t];n.tweenjs.stop(),l(n.cancel)&&n.cancel()}e.length=0};gp.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};gp.prototype.get=function(e){return this._tweens[e]};gp.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/kn.SECONDS_PER_MILLISECOND:xn();n<t.length;){let i=t[n],r=i.tweenjs;if(i.needsStart)i.needsStart=!1,r.start(e);else if(r.update(e))n++;else{if(t[n]?.needsStart)continue;r.stop(),t.splice(n,1)}}};var HC=gp;function z4(e){this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.zoomFactor=5,this.translateEventTypes=cr.LEFT_DRAG,this.zoomEventTypes=[cr.RIGHT_DRAG,cr.WHEEL,cr.PINCH],this.rotateEventTypes=cr.LEFT_DRAG,this.tiltEventTypes=[cr.MIDDLE_DRAG,cr.PINCH,{eventType:cr.LEFT_DRAG,modifier:to.CTRL},{eventType:cr.RIGHT_DRAG,modifier:to.CTRL}],this.lookEventTypes={eventType:cr.LEFT_DRAG,modifier:to.SHIFT};let t=e.ellipsoid??ee.default;this.minimumPickingTerrainHeight=ee.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=ee.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=ee.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=ee.WGS84.equals(t)?75e5:t.minimumRadius*1.175,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this.maximumTiltAngle=void 0,this._scene=e,this._globe=void 0,this._ellipsoid=t,this._lastGlobeHeight=0,this._aggregator=new Iz(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new HC,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new U(-1,-1),this._tiltCenter=new h,this._rotateMousePosition=new U(-1,-1),this._rotateStartPosition=new h,this._strafeStartPosition=new h,this._strafeMousePosition=new U,this._strafeEndMousePosition=new U,this._zoomMouseStart=new U(-1,-1),this._zoomWorldPosition=new h,this._useZoomWorldPosition=!1,this._panLastMousePosition=new U,this._panLastWorldPosition=new h,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new he(Math.PI,D.PI_OVER_TWO)),this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=1/5e3,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function v8t(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function S8t(e){return U.equalsEpsilon(e.startPosition,e.endPosition,D.EPSILON14)}var w8t=.4;function I8t(e,t,n,i,r,o,s){let a=o[s];l(a)||(a=o[s]={startPosition:new U,endPosition:new U,motion:new U,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),u=e.getButtonReleaseTime(t,n),f=c&&u&&(u.getTime()-c.getTime())/1e3,p=u&&(new Date().getTime()-u.getTime())/1e3;if(c&&u&&f<w8t){let g=v8t(p,i),m=e.getLastMovement(t,n);if(!l(m)||S8t(m)||!a.inertiaEnabled||(a.motion.x=(m.endPosition.x-m.startPosition.x)*.5,a.motion.y=(m.endPosition.y-m.startPosition.y)*.5,a.startPosition=U.clone(m.startPosition,a.startPosition),a.endPosition=U.multiplyByScalar(a.motion,g,a.endPosition),a.endPosition=U.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||U.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let y=e.getStartMousePosition(t,n);r(o,y,a)}}}function P8t(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let r=i.length;for(let o=0;o<r;++o)n=e[i[o]],l(n)&&(n.inertiaEnabled=!1)}}}var v2e=[];function xu(e,t,n,i,r,o){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(v2e[0]=n,n=v2e);let a=n.length;for(let c=0;c<a;++c){let u=n[c],f=l(u.eventType)?u.eventType:u,d=u.modifier,p=s.isMoving(f,d)&&s.getMovement(f,d),g=s.getStartMousePosition(f,d);e.enableInputs&&t&&(p?(i(e,g,p),P8t(e,o)):r<1&&I8t(s,f,d,r,i,e,o))}}var HW=new pn,D8t=new h,R8t=new U,O8t=new h,M8t=new U,N8t=new h,L8t=new h,F8t=new h,B8t=new h,B2e=new h,k8t=new h,U8t=new h,z8t=new h,V8t=new h,j8t=new h,H8t=new h,G8t=new h,W8t=new h,q8t=new h,Y8t=new h,GC=new h,S2e=new h,w2e=new h,Dce={orientation:new wc};function kce(e,t,n,i,r,o){let s=1;l(o)&&(s=D.clamp(Math.abs(o),.25,1));let a=n.endPosition.y-n.startPosition.y,u=a>0?e.minimumZoomDistance*s:0,f=e.maximumZoomDistance,d=r-u,p=i*d;p=D.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let g=a/e._scene.canvas.clientHeight;g=Math.min(g,e.maximumMovementRatio);let m=p*g;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(m>0&&Math.abs(r-u)<1||m<0&&Math.abs(r-f)<1)return;r-m<u?m=r-u-1:r-m>f&&(m=r-f)}let y=e._scene,A=y.camera,b=y.mode,x=Dce.orientation;x.heading=A.heading,x.pitch=A.pitch,x.roll=A.roll;let T=n.inertiaEnabled??U.equals(t,e._zoomMouseStart),E=e._zoomingOnVector,v=e._rotatingZoom,S;if(T||(e._zoomMouseStart=U.clone(t,e._zoomMouseStart),l(e._globe)&&b===re.SCENE2D?(S=A.getPickRay(t,HW).origin,S=h.fromElements(S.y,S.z,S.x)):l(e._globe)&&(S=by(e,t,D8t)),l(S)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=h.clone(S,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,E=e._zoomingOnVector=!1,v=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){A.zoomIn(m);return}let I=b===re.COLUMBUS_VIEW;if(A.positionCartographic.height<2e6&&(v=!0),!T||v){if(b===re.SCENE2D){let R=e._zoomWorldPosition,O=A.position;if(!h.equals(R,O)&&A.positionCartographic.height<e._maxCoord.x*2){let L=A.position.x,_=h.subtract(R,O,O8t);h.normalize(_,_);let C=h.distance(R,O)*m/(A.getMagnitude()*.5);A.move(_,C*.5),(A.position.x<0&&L>0||A.position.x>0&&L<0)&&(S=A.getPickRay(t,HW).origin,S=h.fromElements(S.y,S.z,S.x),e._zoomWorldPosition=h.clone(S,e._zoomWorldPosition))}}else if(b===re.SCENE3D){let R=h.normalize(A.position,B2e);if(e._cameraUnderground||e._zoomingUnderground||A.positionCartographic.height<3e3&&Math.abs(h.dot(A.direction,R))<.6)I=!0;else{let O=y.canvas,L=M8t;L.x=O.clientWidth/2,L.y=O.clientHeight/2;let _=by(e,L,N8t);if(!l(_))I=!0;else if(A.positionCartographic.height<1e6)if(h.dot(A.direction,R)>=-.5)I=!0;else{let C=U8t;h.clone(A.position,C);let w=e._zoomWorldPosition,P=k8t;if(P=h.normalize(w,P),h.dot(P,R)<0)return;let M=Y8t,F=j8t;h.clone(A.direction,F),h.add(C,h.multiplyByScalar(F,1e3,GC),M);let V=H8t,B=G8t;h.subtract(w,C,V),h.normalize(V,B);let j=h.dot(R,B);if(j>=0){e._zoomMouseStart.x=-1;return}let k=Math.acos(-j),G=h.magnitude(C),q=h.magnitude(w),Q=G-m,W=h.magnitude(V),J=Math.asin(D.clamp(W/q*Math.sin(k),-1,1)),Z=Math.asin(D.clamp(Q/q*Math.sin(k),-1,1)),ae=J-Z+k,Ae=z8t;h.normalize(C,Ae);let fe=V8t;fe=h.cross(B,Ae,fe),fe=h.normalize(fe,fe),h.normalize(h.cross(Ae,fe,GC),F),h.multiplyByScalar(h.normalize(M,GC),h.magnitude(M)-m,M),h.normalize(C,C),h.multiplyByScalar(C,Q,C);let xe=W8t;h.multiplyByScalar(h.add(h.multiplyByScalar(Ae,Math.cos(ae)-1,S2e),h.multiplyByScalar(F,Math.sin(ae),w2e),GC),Q,xe),h.add(C,xe,C),h.normalize(M,Ae),h.normalize(h.cross(Ae,fe,GC),F);let ge=q8t;h.multiplyByScalar(h.add(h.multiplyByScalar(Ae,Math.cos(ae)-1,S2e),h.multiplyByScalar(F,Math.sin(ae),w2e),GC),h.magnitude(M),ge),h.add(M,ge,M),h.clone(C,A.position),h.normalize(h.subtract(M,C,GC),A.direction),h.clone(A.direction,A.direction),h.cross(A.direction,A.up,A.right),h.cross(A.right,A.direction,A.up),A.setView(Dce);return}else{let C=h.normalize(_,L8t),w=h.normalize(e._zoomWorldPosition,F8t),P=h.dot(w,C);if(P>0&&P<1){let M=D.acosClamped(P),F=h.cross(w,C,B8t),V=Math.abs(M)>D.toRadians(20)?A.positionCartographic.height*.75:A.positionCartographic.height-m,B=m/V;A.rotate(F,M*B)}}}}e._rotatingZoom=!I}if(!T&&I||E){let R,O=dr.worldToWindowCoordinates(y,e._zoomWorldPosition,R8t);b!==re.COLUMBUS_VIEW&&U.equals(t,e._zoomMouseStart)&&l(O)?R=A.getPickRay(O,HW):R=A.getPickRay(t,HW);let L=R.direction;(b===re.COLUMBUS_VIEW||b===re.SCENE2D)&&h.fromElements(L.y,L.z,L.x,L),A.move(L,m),e._zoomingOnVector=!0}else A.zoomIn(m);e._cameraUnderground||A.setView(Dce)}var X8t=new pn,K8t=new pn,$8t=new h;function J8t(e,t,n){let r=e._scene.camera,o=r.getPickRay(n.startPosition,X8t).origin,s=r.getPickRay(n.endPosition,K8t).origin;o=h.fromElements(o.y,o.z,o.x,o),s=h.fromElements(s.y,s.z,s.x,s);let a=h.subtract(o,s,$8t),c=h.magnitude(a);c>0&&(h.normalize(a,a),r.move(a,c))}function I2e(e,t,n){l(n.distance)&&(n=n.distance);let r=e._scene.camera;kce(e,t,n,e.zoomFactor,r.getMagnitude())}var Z8t=new U,Q8t=new U;function P2e(e,t,n){if(l(n.angleAndHeight)){ejt(e,t,n.angleAndHeight);return}let i=e._scene,r=i.camera,o=i.canvas,s=o.clientWidth,a=o.clientHeight,c=Z8t;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=U.normalize(c,c);let u=Q8t;u.x=2/s*n.endPosition.x-1,u.y=2/a*(a-n.endPosition.y)-1,u=U.normalize(u,u);let f=D.acosClamped(c.x);c.y<0&&(f=D.TWO_PI-f);let d=D.acosClamped(u.x);u.y<0&&(d=D.TWO_PI-d);let p=d-f;r.twistRight(p)}function ejt(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let r=e._scene,o=r.camera,s=r.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let c=i*a*Math.PI*4;o.twistRight(c)}function tjt(e){let t=e._scene.mapMode2D===Au.ROTATE;N.equals(N.IDENTITY,e._scene.camera.transform)?(xu(e,e.enableTranslate,e.translateEventTypes,J8t,e.inertiaTranslate,"_lastInertiaTranslateMovement"),xu(e,e.enableZoom,e.zoomEventTypes,I2e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&xu(e,e.enableRotate,e.tiltEventTypes,P2e,e.inertiaSpin,"_lastInertiaTiltMovement")):(xu(e,e.enableZoom,e.zoomEventTypes,I2e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&xu(e,e.enableRotate,e.translateEventTypes,P2e,e.inertiaSpin,"_lastInertiaSpinMovement"))}var k2e=new pn,njt=new h,ijt=new h;function by(e,t,n){let i=e._scene,r=e._globe,o=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,njt)),!l(r))return h.clone(s,n);let a=!e._cameraUnderground,c=o.getPickRay(t,k2e),u=r.pickWorldCoordinates(c,i,a,ijt),f=l(s)?h.distance(s,o.positionWC):Number.POSITIVE_INFINITY,d=l(u)?h.distance(u,o.positionWC):Number.POSITIVE_INFINITY;return f<d?h.clone(s,n):h.clone(u,n)}var rjt=new he;function $W(e){let t=e._ellipsoid,n=e._scene,i=n.camera,r=n.mode,o=0;if(r===re.SCENE3D){let c=t.cartesianToCartographic(i.position,rjt);l(c)&&(o=c.height)}else o=i.position.z;let s=e._scene.globeHeight??0;return Math.abs(s-o)}var ojt=new h;function U2e(e,t){let n=t.origin,i=t.direction,r=$W(e),o=h.normalize(n,ojt),s=Math.abs(h.dot(o,i));return s=Math.max(s,.5)*2,r*s}function z2e(e,t,n,i){let r=h.distance(t.origin,n),o=$W(e),s=D.clamp(o*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return r>s&&(r=Math.min(r,o/5),r=Math.max(r,100)),pn.getPoint(t,r,i)}function V2e(e,t,n,i){let r;return l(n)?(r=h.distance(t.origin,n),r>e._maximumUndergroundPickDistance&&(r=$W(e))):r=$W(e),pn.getPoint(t,r,i)}var sjt=new U;function j2e(e,t){let n=t.endPosition,i=U.subtract(t.endPosition,t.startPosition,sjt),r=e._strafeEndMousePosition;U.add(r,i,r),t.endPosition=r,Uce(e,t,e._strafeStartPosition),t.endPosition=n}var D2e=new pn,ajt=new pn,Rce=new h,cjt=new h,ljt=new h,ujt=new h,fjt=new sn(h.UNIT_X,0),djt=new U,hjt=new U;function mjt(e,t,n){if(h.equals(t,e._translateMousePosition)||(e._looking=!1),h.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Ad(e,t,n);return}if(e._strafing){j2e(e,n);return}let r=e._scene.camera,o=e._cameraUnderground,s=U.clone(n.startPosition,djt),a=U.clone(n.endPosition,hjt),c=r.getPickRay(s,D2e),u=h.clone(h.ZERO,ujt),f=h.UNIT_X,d;if(r.position.z<e._minimumPickingTerrainHeight&&(d=by(e,s,Rce),l(d)&&(u.x=d.x)),o||u.x>r.position.z&&l(d)){let T=d;o&&(T=V2e(e,c,d,Rce)),U.clone(t,e._strafeMousePosition),U.clone(t,e._strafeEndMousePosition),h.clone(T,e._strafeStartPosition),e._strafing=!0,Uce(e,n,e._strafeStartPosition);return}let p=sn.fromPointNormal(u,f,fjt);c=r.getPickRay(s,D2e);let g=_i.rayPlane(c,p,Rce),m=r.getPickRay(a,ajt),y=_i.rayPlane(m,p,cjt);if(!l(g)||!l(y)){e._looking=!0,Ad(e,t,n),U.clone(t,e._translateMousePosition);return}let A=h.subtract(g,y,ljt),b=A.x;A.x=A.y,A.y=A.z,A.z=b;let x=h.magnitude(A);x>D.EPSILON6&&(h.normalize(A,A),r.move(A,x))}var H2e=new U,qW=new pn,YW=new h,pjt=new h,G2e=new N,gjt=new N,_jt=new h,yjt=new sn(h.UNIT_X,0),Oce=new h,Lce=new he,W2e=new N,Ajt=new Le,bjt=new $,XW=new h;function xjt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),U.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Ad(e,t,n);return}let r=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(r.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,Tjt(e,t,n)):Ejt(e,t,n)}function Tjt(e,t,n){let i=e._scene,r=i.camera,o=i.canvas,s=H2e;s.x=o.clientWidth/2,s.y=o.clientHeight/2;let a=r.getPickRay(s,qW),c=h.UNIT_X,u=a.origin,f=a.direction,d,p=h.dot(c,f);if(Math.abs(p)>D.EPSILON6&&(d=-h.dot(c,u)/p),!l(d)||d<=0){e._looking=!0,Ad(e,t,n),U.clone(t,e._tiltCenterMousePosition);return}let g=h.multiplyByScalar(f,d,YW);h.add(u,g,g);let m=i.mapProjection,y=m.ellipsoid;h.fromElements(g.y,g.z,g.x,g);let A=m.unproject(g,Lce);y.cartographicToCartesian(A,g);let b=At.eastNorthUpToFixedFrame(g,y,G2e),x=e._globe,T=e._ellipsoid;e._globe=void 0,e._ellipsoid=ee.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=N.clone(r.transform,W2e);r._setTransform(b),yd(e,t,n,h.UNIT_Z),r._setTransform(E),e._globe=x,e._ellipsoid=T;let v=T.maximumRadius;e._rotateFactor=1/v,e._rotateRateRangeAdjustment=v}function Ejt(e,t,n){let i=e._scene,r=i.camera,o=e._cameraUnderground,s,a,c=h.UNIT_X;if(U.equals(t,e._tiltCenterMousePosition))s=h.clone(e._tiltCenter,YW);else{if(r.position.z<e._minimumPickingTerrainHeight&&(s=by(e,t,YW)),!l(s)){a=r.getPickRay(t,qW);let _=a.origin,C=a.direction,w,P=h.dot(c,C);if(Math.abs(P)>D.EPSILON6&&(w=-h.dot(c,_)/P),!l(w)||w<=0){e._looking=!0,Ad(e,t,n),U.clone(t,e._tiltCenterMousePosition);return}s=h.multiplyByScalar(C,w,YW),h.add(_,s,s)}o&&(l(a)||(a=r.getPickRay(t,qW)),z2e(e,a,s,s)),U.clone(t,e._tiltCenterMousePosition),h.clone(s,e._tiltCenter)}let u=i.canvas,f=H2e;f.x=u.clientWidth/2,f.y=e._tiltCenterMousePosition.y,a=r.getPickRay(f,qW);let d=h.clone(h.ZERO,_jt);d.x=s.x;let p=sn.fromPointNormal(d,c,yjt),g=_i.rayPlane(a,p,pjt),m=r._projection,y=m.ellipsoid;h.fromElements(s.y,s.z,s.x,s);let A=m.unproject(s,Lce);y.cartographicToCartesian(A,s);let b=At.eastNorthUpToFixedFrame(s,y,G2e),x;l(g)?(h.fromElements(g.y,g.z,g.x,g),A=m.unproject(g,Lce),y.cartographicToCartesian(A,g),x=At.eastNorthUpToFixedFrame(g,y,gjt)):x=b;let T=e._globe,E=e._ellipsoid;e._globe=void 0,e._ellipsoid=ee.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let v=h.UNIT_Z,S=N.clone(r.transform,W2e);r._setTransform(b);let I=h.cross(h.UNIT_Z,h.normalize(r.position,Oce),Oce),R=h.dot(r.right,I);if(yd(e,t,n,v,!1,!0),r._setTransform(x),R<0){let _=n.startPosition.y-n.endPosition.y;(o&&_<0||!o&&_>0)&&(v=void 0);let C=r.constrainedAxis;r.constrainedAxis=void 0,yd(e,t,n,v,!0,!1),r.constrainedAxis=C}else yd(e,t,n,v,!0,!1);if(l(r.constrainedAxis)){let _=h.cross(r.direction,r.constrainedAxis,XW);h.equalsEpsilon(_,h.ZERO,D.EPSILON6)||(h.dot(_,r.right)<0&&h.negate(_,_),h.cross(_,r.direction,r.up),h.cross(r.direction,r.up,r.right),h.normalize(r.up,r.up),h.normalize(r.right,r.right))}r._setTransform(S),e._globe=T,e._ellipsoid=E;let O=E.maximumRadius;e._rotateFactor=1/O,e._rotateRateRangeAdjustment=O;let L=h.clone(r.positionWC,Oce);if(e.enableCollisionDetection&&jce(e,!0),!h.equals(r.positionWC,L)){r._setTransform(x),r.worldToCameraCoordinatesPoint(L,L);let _=h.magnitudeSquared(L);h.magnitudeSquared(r.position)>_&&(h.normalize(r.position,r.position),h.multiplyByScalar(r.position,Math.sqrt(_),r.position));let C=h.angleBetween(L,r.position),w=h.cross(L,r.position,L);h.normalize(w,w);let P=Le.fromAxisAngle(w,C,Ajt),M=$.fromQuaternion(P,bjt);$.multiplyByVector(M,r.direction,r.direction),$.multiplyByVector(M,r.up,r.up),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up),r._setTransform(S)}}var q2e=new U,Y2e=new pn,X2e=new h;function Cjt(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,r=i.camera,o=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=q2e,a.x=o.clientWidth/2,a.y=o.clientHeight/2);let c=r.getPickRay(a,Y2e),u=c.origin,f=c.direction,d=r.position.z,p;d<e._minimumPickingTerrainHeight&&(p=by(e,a,X2e));let g;if(l(p)&&(g=h.distance(u,p)),s){let m=U2e(e,c,d);l(g)?g=Math.min(g,m):g=m}if(!l(g)){let m=h.UNIT_X;g=-h.dot(m,u)/h.dot(m,f)}kce(e,t,n,e.zoomFactor,g)}function vjt(e){let n=e._scene.camera;if(!N.equals(N.IDENTITY,n.transform))xu(e,e.enableRotate,e.rotateEventTypes,yd,e.inertiaSpin,"_lastInertiaSpinMovement"),xu(e,e.enableZoom,e.zoomEventTypes,$2e,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),xu(e,e.enableTilt,e.tiltEventTypes,xjt,e.inertiaSpin,"_lastInertiaTiltMovement"),xu(e,e.enableTranslate,e.translateEventTypes,mjt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),xu(e,e.enableZoom,e.zoomEventTypes,Cjt,e.inertiaZoom,"_lastInertiaZoomMovement"),xu(e,e.enableLook,e.lookEventTypes,Ad),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let r=n.createCorrectPositionTween(e.bounceAnimationTime);l(r)&&(e._tween=i.add(r))}i.update()}}var Sjt=new pn,wjt=new sn(h.UNIT_X,0),Ijt=new h,Pjt=new h;function Uce(e,t,n){let i=e._scene,r=i.camera,o=r.getPickRay(t.endPosition,Sjt),s=h.clone(r.direction,Pjt);i.mode===re.COLUMBUS_VIEW&&h.fromElements(s.z,s.x,s.y,s);let a=sn.fromPointNormal(n,s,wjt),c=_i.rayPlane(o,a,Ijt);l(c)&&(s=h.subtract(n,c,s),i.mode===re.COLUMBUS_VIEW&&h.fromElements(s.y,s.z,s.x,s),h.add(r.position,s,r.position))}var R2e=new h,K2e=new he,Fce=new h,Bce=new ee,Djt=new h,Rjt=new h,Ojt=new h;function Mjt(e,t,n){let r=e._scene.camera,o=e._cameraUnderground,s=e._ellipsoid;if(!N.equals(r.transform,N.IDENTITY)){yd(e,t,n);return}let a,c,u=s.geodeticSurfaceNormal(r.position,Djt);if(U.equals(t,e._rotateMousePosition)){if(e._looking)Ad(e,t,n,u);else if(e._rotating)yd(e,t,n);else if(e._strafing)j2e(e,n);else{if(h.magnitude(r.position)<h.magnitude(e._rotateStartPosition))return;a=h.magnitude(e._rotateStartPosition),c=Fce,c.x=c.y=c.z=a,s=ee.fromCartesian3(c,Bce),Nce(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let f=s.cartesianToCartographic(r.positionWC,K2e).height,d=e._globe;if(l(d)&&f<e._minimumPickingTerrainHeight){let p=by(e,n.startPosition,Ojt);if(l(p)){let g,m=r.getPickRay(n.startPosition,k2e);if(o)g=!0,V2e(e,m,p,p);else{let y=s.geodeticSurfaceNormal(p,Rjt);Math.abs(h.dot(m.direction,y))<.05?g=!0:g=h.magnitude(r.position)<h.magnitude(p)}g?(U.clone(t,e._strafeEndMousePosition),h.clone(p,e._strafeStartPosition),e._strafing=!0,Uce(e,n,e._strafeStartPosition)):(a=h.magnitude(p),c=Fce,c.x=c.y=c.z=a,s=ee.fromCartesian3(c,Bce),Nce(e,t,n,s),h.clone(p,e._rotateStartPosition))}else e._looking=!0,Ad(e,t,n,u)}else l(r.pickEllipsoid(n.startPosition,e._ellipsoid,R2e))?(Nce(e,t,n,e._ellipsoid),h.clone(R2e,e._rotateStartPosition)):f>e._minimumTrackBallHeight?(e._rotating=!0,yd(e,t,n)):(e._looking=!0,Ad(e,t,n,u));U.clone(t,e._rotateMousePosition)}function yd(e,t,n,i,r,o){r=r??!1,o=o??!1;let s=e._scene,a=s.camera,c=s.canvas,u=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let f=h.magnitude(a.position),d=e._rotateFactor*(f-e._rotateRateRangeAdjustment);d>e._maximumRotateRate&&(d=e._maximumRotateRate),d<e._minimumRotateRate&&(d=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,g=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),g=Math.min(g,e.maximumMovementRatio);let m=d*p*Math.PI*2,y=d*g*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let A=e.maximumTiltAngle,b=h.dot(a.direction,i),x=Math.PI-Math.acos(b)+y;x>A&&(y-=x-A)}r||a.rotateRight(m),o||a.rotateUp(y),a.constrainedAxis=u}var Mce=se.clone(se.UNIT_W),O2e=se.clone(se.UNIT_W),GW=new h,WP=new h,WW=new h,M2e=new h,Njt=new U,Ljt=new U,Fjt=new U,Bjt=new U,kjt=new pn;function Nce(e,t,n,i){let r=e._scene,o=r.camera,s=U.clone(n.startPosition,Njt),a=U.clone(n.endPosition,Ljt),c=i.cartesianToCartographic(o.positionWC,K2e).height,u,f;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(u=h.clone(e._panLastWorldPosition,Mce),!l(e._globe)&&!U.equalsEpsilon(s,e._panLastMousePosition)&&(u=by(e,s,Mce)),!l(e._globe)&&l(u))){let d=h.subtract(u,o.positionWC,WP),p=h.multiplyByScalar(o.directionWC,h.dot(o.directionWC,d),WP),g=h.magnitude(p),m=o.frustum.getPixelDimensions(r.drawingBufferWidth,r.drawingBufferHeight,g,r.pixelRatio,Bjt),y=U.subtract(a,s,Fjt),A=h.multiplyByScalar(o.rightWC,y.x*m.x,WP),b=h.normalize(o.positionWC,B2e),x=o.getPickRay(a,kjt).direction,T=h.subtract(x,h.projectVector(x,o.rightWC,WW),WW),E=h.angleBetween(T,o.directionWC),v=1;l(o.frustum.fov)&&(v=Math.max(Math.tan(E),.1));let S=Math.abs(h.dot(o.directionWC,b)),I=-y.y*m.y*2/Math.sqrt(v)*(1-S),R=h.multiplyByScalar(x,I,WW);S=Math.abs(h.dot(o.upWC,b));let O=h.multiplyByScalar(o.upWC,-y.y*(1-S)*m.y,M2e);f=h.add(u,A,O2e),f=h.add(f,R,f),f=h.add(f,O,f),h.clone(f,e._panLastWorldPosition),U.clone(a,e._panLastMousePosition)}if((!l(u)||!l(f))&&(u=o.pickEllipsoid(s,i,Mce),f=o.pickEllipsoid(a,i,O2e)),!l(u)||!l(f)){e._rotating=!0,yd(e,t,n);return}if(u=o.worldToCameraCoordinates(u,u),f=o.worldToCameraCoordinates(f,f),l(o.constrainedAxis)){let d=o.constrainedAxis,p=h.mostOrthogonalAxis(d,GW);h.cross(p,d,p),h.normalize(p,p);let g=h.cross(d,p,WP),m=h.magnitude(u),y=h.dot(d,u),A=Math.acos(y/m),b=h.multiplyByScalar(d,y,WW);h.subtract(u,b,b),h.normalize(b,b);let x=h.magnitude(f),T=h.dot(d,f),E=Math.acos(T/x),v=h.multiplyByScalar(d,T,M2e);h.subtract(f,v,v),h.normalize(v,v);let S=Math.acos(h.dot(b,p));h.dot(b,g)<0&&(S=D.TWO_PI-S);let I=Math.acos(h.dot(v,p));h.dot(v,g)<0&&(I=D.TWO_PI-I);let R=S-I,O;h.equalsEpsilon(d,o.position,D.EPSILON2)?O=o.right:O=h.cross(d,o.position,GW);let L=h.cross(d,O,GW),_=h.dot(L,h.subtract(u,d,WP)),C=h.dot(L,h.subtract(f,d,WP)),w;_>0&&C>0?w=E-A:_>0&&C<=0?h.dot(o.position,d)>0?w=-A-E:w=A+E:w=A-E,o.rotateRight(R),o.rotateUp(w)}else{h.normalize(u,u),h.normalize(f,f);let d=h.dot(u,f),p=h.cross(u,f,GW);if(d<1&&!h.equalsEpsilon(p,h.ZERO,D.EPSILON14)){let g=Math.acos(d);o.rotate(p,g)}}}var Ujt=new h,zjt=new he,N2e=0;function $2e(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,r=e._ellipsoid,o=e._scene,s=o.camera,a=o.canvas,c=e._cameraUnderground,u;c?u=t:(u=q2e,u.x=a.clientWidth/2,u.y=a.clientHeight/2);let f=s.getPickRay(u,Y2e),d,p=r.cartesianToCartographic(s.position,zjt).height,g=Math.abs(N2e)<e.minimumPickingTerrainDistanceWithInertia;(i?g:p<e._minimumPickingTerrainHeight)&&(d=by(e,u,X2e));let y;if(l(d)&&(y=h.distance(f.origin,d)),!l(e._globe)&&l(y)&&s.getMagnitude()<y&&(y=void 0),l(y)&&(N2e=y),c){let b=U2e(e,f,p);l(y)?y=Math.min(y,b):y=b}l(y)||(y=p);let A=h.normalize(s.position,Ujt);kce(e,t,n,e.zoomFactor,y,h.dot(A,s.direction))}var J2e=new U,KW=new pn,U4=new h,Vjt=new h,Z2e=new N,jjt=new N,Q2e=new N,Hjt=new Le,Gjt=new $,zce=new he,Vce=new h;function Wjt(e,t,n){let r=e._scene.camera;if(!N.equals(r.transform,N.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),U.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(r.position,Vce);Ad(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(r.position,zce);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,Yjt(e,t,n)):Xjt(e,t,n)}var qjt=new he;function Yjt(e,t,n){let i=e._ellipsoid,r=e._scene,o=r.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(o.positionWC,qjt).height;if(a-s-1<D.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=r.canvas,u=J2e;u.x=c.clientWidth/2,u.y=c.clientHeight/2;let f=o.getPickRay(u,KW),d,p=_i.rayEllipsoid(f,i);if(l(p))d=pn.getPoint(f,p.start,U4);else if(a>e._minimumTrackBallHeight){let x=_i.grazingAltitudeLocation(f,i);if(!l(x))return;let T=i.cartesianToCartographic(x,zce);T.height=0,d=i.cartographicToCartesian(T,U4)}else{e._looking=!0;let x=e._ellipsoid.geodeticSurfaceNormal(o.position,Vce);Ad(e,t,n,x),U.clone(t,e._tiltCenterMousePosition);return}let g=At.eastNorthUpToFixedFrame(d,i,Z2e),m=e._globe,y=e._ellipsoid;e._globe=void 0,e._ellipsoid=ee.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let A=N.clone(o.transform,Q2e);o._setTransform(g),yd(e,t,n,h.UNIT_Z),o._setTransform(A),e._globe=m,e._ellipsoid=y;let b=y.maximumRadius;e._rotateFactor=1/b,e._rotateRateRangeAdjustment=b}function Xjt(e,t,n){let i=e._ellipsoid,r=e._scene,o=r.camera,s=e._cameraUnderground,a,c,u;if(U.equals(t,e._tiltCenterMousePosition))a=h.clone(e._tiltCenter,U4);else{if(a=by(e,t,U4),!l(a)){if(c=o.getPickRay(t,KW),u=_i.rayEllipsoid(c,i),!l(u)){if(i.cartesianToCartographic(o.position,zce).height<=e._minimumTrackBallHeight){e._looking=!0;let C=e._ellipsoid.geodeticSurfaceNormal(o.position,Vce);Ad(e,t,n,C),U.clone(t,e._tiltCenterMousePosition)}return}a=pn.getPoint(c,u.start,U4)}s&&(l(c)||(c=o.getPickRay(t,KW)),z2e(e,c,a,a)),U.clone(t,e._tiltCenterMousePosition),h.clone(a,e._tiltCenter)}let f=r.canvas,d=J2e;d.x=f.clientWidth/2,d.y=e._tiltCenterMousePosition.y,c=o.getPickRay(d,KW);let p=h.magnitude(a),g=h.fromElements(p,p,p,Fce),m=ee.fromCartesian3(g,Bce);if(u=_i.rayEllipsoid(c,m),!l(u))return;let y=h.magnitude(c.origin)>p?u.start:u.stop,A=pn.getPoint(c,y,Vjt),b=At.eastNorthUpToFixedFrame(a,i,Z2e),x=At.eastNorthUpToFixedFrame(A,m,jjt),T=e._globe,E=e._ellipsoid;e._globe=void 0,e._ellipsoid=ee.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let v=h.UNIT_Z,S=N.clone(o.transform,Q2e);o._setTransform(x);let I=h.cross(A,o.positionWC,XW);if(h.dot(o.rightWC,I)<0){let _=n.startPosition.y-n.endPosition.y;(s&&_<0||!s&&_>0)&&(v=void 0);let C=o.constrainedAxis;o.constrainedAxis=void 0,yd(e,t,n,v,!0,!1),o.constrainedAxis=C}else yd(e,t,n,v,!0,!1);if(o._setTransform(b),yd(e,t,n,v,!1,!0),l(o.constrainedAxis)){let _=h.cross(o.direction,o.constrainedAxis,XW);h.equalsEpsilon(_,h.ZERO,D.EPSILON6)||(h.dot(_,o.right)<0&&h.negate(_,_),h.cross(_,o.direction,o.up),h.cross(o.direction,o.up,o.right),h.normalize(o.up,o.up),h.normalize(o.right,o.right))}o._setTransform(S),e._globe=T,e._ellipsoid=E;let O=E.maximumRadius;e._rotateFactor=1/O,e._rotateRateRangeAdjustment=O;let L=h.clone(o.positionWC,XW);if(e.enableCollisionDetection&&jce(e,!0),!h.equals(o.positionWC,L)){o._setTransform(x),o.worldToCameraCoordinatesPoint(L,L);let _=h.magnitudeSquared(L);h.magnitudeSquared(o.position)>_&&(h.normalize(o.position,o.position),h.multiplyByScalar(o.position,Math.sqrt(_),o.position));let C=h.angleBetween(L,o.position),w=h.cross(L,o.position,L);h.normalize(w,w);let P=Le.fromAxisAngle(w,C,Hjt),M=$.fromQuaternion(P,Gjt);$.multiplyByVector(M,o.direction,o.direction),$.multiplyByVector(M,o.up,o.up),h.cross(o.direction,o.up,o.right),h.cross(o.right,o.direction,o.up),o._setTransform(S)}}var Kjt=new U,$jt=new U,L2e=new pn,F2e=new pn,Jjt=new h,Zjt=new h;function Ad(e,t,n,i){let o=e._scene.camera,s=Kjt;s.x=n.startPosition.x,s.y=0;let a=$jt;a.x=n.endPosition.x,a.y=0;let c=o.getPickRay(s,L2e),u=o.getPickRay(a,F2e),f=0,d,p;o.frustum instanceof gn?(d=c.origin,p=u.origin,h.add(o.direction,d,d),h.add(o.direction,p,p),h.subtract(d,o.position,d),h.subtract(p,o.position,p),h.normalize(d,d),h.normalize(p,p)):(d=c.direction,p=u.direction);let g=h.dot(d,p);g<1&&(f=Math.acos(g)),f=n.startPosition.x>n.endPosition.x?-f:f;let m=e._horizontalRotationAxis;if(l(i)?o.look(i,-f):l(m)?o.look(m,-f):o.lookLeft(f),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=o.getPickRay(s,L2e),u=o.getPickRay(a,F2e),f=0,o.frustum instanceof gn?(d=c.origin,p=u.origin,h.add(o.direction,d,d),h.add(o.direction,p,p),h.subtract(d,o.position,d),h.subtract(p,o.position,p),h.normalize(d,d),h.normalize(p,p)):(d=c.direction,p=u.direction),g=h.dot(d,p),g<1&&(f=Math.acos(g)),f=n.startPosition.y>n.endPosition.y?-f:f,i=i??m,l(i)){let y=o.direction,A=h.negate(i,Jjt),b=h.equalsEpsilon(y,i,D.EPSILON2),x=h.equalsEpsilon(y,A,D.EPSILON2);if(!b&&!x){g=h.dot(y,i);let T=D.acosClamped(g);f>0&&f>T&&(f=T-D.EPSILON4),g=h.dot(y,A),T=D.acosClamped(g),f<0&&-f>T&&(f=-T+D.EPSILON4);let E=h.cross(i,y,Zjt);o.look(E,f)}else(b&&f<0||x&&f>0)&&o.look(o.right,-f)}else o.lookUp(f)}function Qjt(e){xu(e,e.enableRotate,e.rotateEventTypes,Mjt,e.inertiaSpin,"_lastInertiaSpinMovement"),xu(e,e.enableZoom,e.zoomEventTypes,$2e,e.inertiaZoom,"_lastInertiaZoomMovement"),xu(e,e.enableTilt,e.tiltEventTypes,Wjt,e.inertiaSpin,"_lastInertiaTiltMovement"),xu(e,e.enableLook,e.lookEventTypes,Ad)}var e6t=new N,t6t=new he;function jce(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===re.SCENE2D||i===re.MORPHING)return;let r=n.camera,o=n.ellipsoid??ee.WGS84,s=n.mapProjection,a,c;N.equals(r.transform,N.IDENTITY)||(a=N.clone(r.transform,e6t),c=h.magnitude(r.position),r._setTransform(N.IDENTITY));let u=t6t;i===re.SCENE3D?o.cartesianToCartographic(r.position,u):s.unproject(r.position,u);let f=!1;if(u.height<e._minimumCollisionTerrainHeight){let d=e._scene.globeHeight;if(l(d)){let p=d+e.minimumZoomDistance,g=d-e._lastGlobeHeight,m=g/e._lastGlobeHeight;u.height<p&&(t||Math.abs(m)<=.1)&&(u.height=p,i===re.SCENE3D?o.cartographicToCartesian(u,r.position):s.project(u,r.position),f=!0),t||Math.abs(m)<=.1?e._lastGlobeHeight=d:e._lastGlobeHeight+=g*.1}}l(a)&&(r._setTransform(a),f&&(h.normalize(r.position,r.position),h.negate(r.position,r.direction),h.multiplyByScalar(r.position,Math.max(c,e.minimumZoomDistance),r.position),h.normalize(r.direction,r.direction),h.cross(r.direction,r.up,r.right),h.cross(r.right,r.direction,r.up)))}z4.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===re.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var n6t=new h,i6t=new h;z4.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;N.equals(t.transform,N.IDENTITY)?(this._globe=n,this._ellipsoid=e.ellipsoid??ee.default):(this._globe=void 0,this._ellipsoid=ee.UNIT_SPHERE);let{verticalExaggeration:r,verticalExaggerationRelativeHeight:o}=e;this._minimumCollisionTerrainHeight=Ar.getHeight(this.minimumCollisionTerrainHeight,r,o),this._minimumPickingTerrainHeight=Ar.getHeight(this.minimumPickingTerrainHeight,r,o),this._minimumTrackBallHeight=Ar.getHeight(this.minimumTrackBallHeight,r,o),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=h.clone(t.positionWC,n6t),c=h.clone(t.directionWC,i6t);if(i===re.SCENE2D?tjt(this):i===re.COLUMBUS_VIEW?(this._horizontalRotationAxis=h.UNIT_Z,vjt(this)):i===re.SCENE3D&&(this._horizontalRotationAxis=void 0,Qjt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let u=!h.equals(a,t.positionWC)||!h.equals(c,t.directionWC);jce(this,u)}this._aggregator.reset()};z4.prototype.isDestroyed=function(){return!1};z4.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),le(this)};var V4=z4;function j4(e){let t=new Ac(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new et},t.viewport=new et,this._context=e,this._fb=new ai({depthStencil:!0,pixelDatatype:ze.FLOAT,pixelFormat:Ke.RGBA}),this._passState=t}function r6t(e,t,n,i){let r=Math.max(n,i),o=r*r,s=Math.floor(n*.5),a=Math.floor(i*.5),c=0,u=0,f=0,d=-1,p=[];for(let g=0;g<o;++g){if(-s<=c&&c<=s&&-a<=u&&u<=a){let m=4*((a-u)*n+c+s),y=t[m],A=e.getObjectByPickColor(y);l(A)&&p.push({object:A,isEdge:t[m+1]>0,depth:t[m+2],x:c,y:u})}if(c===u||c<0&&-c===u||c>0&&c===1-u){let m=f;f=-d,d=m}c+=f,u+=d}return p}j4.prototype.begin=function(e,t){let n=this._context,{width:i,height:r}=t;return et.clone(e,this._passState.scissorTest.rectangle),this._fb.update(n,i,r),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=r,this._passState};j4.prototype.end=function(e){let t=e.width??1,n=e.height??1,i=this._context,r=i.readPixels({x:e.x,y:e.y,width:t,height:n,pixelDatatype:ze.FLOAT,framebuffer:this._fb.framebuffer});return r6t(i,r,t,n)};j4.prototype.isDestroyed=function(){return!1};j4.prototype.destroy=function(){return this._fb.destroy(),le(this)};var H4=j4;var G4={},o6t=new et(0,0,3,3),s6t=new U,a6t=new U,c6t=new pn,l6t=new h,u6t=3,f6t=.1,eke=9;function Hce(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function tke(e){let t=Number.POSITIVE_INFINITY;for(let s of e)!s.isEdge&&Hce(s)<=u6t&&(t=Math.min(t,s.depth));let n=t*(1+f6t),i=e.filter(s=>!s.isEdge||s.depth<=n),r=i.some(s=>s.isEdge);return i.filter(s=>s.isEdge===r).reduce((s,a)=>Hce(a)<Hce(s)?a:s)}function nke(e,t){let n,i=Number.POSITIVE_INFINITY;for(let r of e){if(r.isEdge||r.object!==t)continue;let o=r.x*r.x+r.y*r.y;o<i&&(n=r,i=o)}return n}function Gce(e,t,n){let i=s6t;i.x=t.x+n.x,i.y=t.y+n.y;let r=e.camera.getPickRay(i,c6t);if(!l(r))return;let o=h.dot(r.direction,e.camera.directionWC);if(o<=0)return;let s=n.depth/o,a=h.multiplyByScalar(r.direction,s,l6t);return h.add(r.origin,a,new h)}G4.snap=function(e,t,n){let i=n?.width??25,r=n?.height??i,{context:o,defaultView:s}=e;if(!o.colorBufferFloat){_t("snap-color-buffer-float","Scene.snap requires the EXT_color_buffer_float extension, which is not supported on this platform.");return}l(s.snapFramebuffer)||(s.snapFramebuffer=new H4(o));let a=s.snapFramebuffer,c=o6t;l4(e,t,c,i,r,{framebuffer:a,snap:!0});let u=a.end(c);if(u4(e),u.length===0)return;let f=tke(u);if(!l(f))return;let d=Gce(e,t,f);if(!l(d))return;let p=d;if(f.isEdge){let g=a6t;g.x=t.x+f.x,g.y=t.y+f.y,l4(e,g,c,eke,eke,{framebuffer:a,snap:!0});let m=a.end(c);u4(e);let y=nke(m,f.object);p=l(y)?Gce(e,g,y):void 0}return{object:f.object,isEdge:f.isEdge,position:d,surfacePosition:p,screenPosition:new U(t.x+f.x,t.y+f.y)}};G4._selectBestHit=tke;G4._nearestSurfaceHit=nke;G4._snapHitToWorld=Gce;var W4=G4;var q4=`uniform sampler2D colorTexture;
uniform sampler2D colorTexture2;
uniform vec2 center;
uniform float radius;
in vec2 v_textureCoordinates;
void main()
{
vec4 color0 = texture(colorTexture, v_textureCoordinates);
vec4 color1 = texture(colorTexture2, v_textureCoordinates);
float x = length(gl_FragCoord.xy - center) / radius;
float t = smoothstep(0.5, 0.8, x);
out_FragColor = mix(color0 + color1, color1, t);
}
`;var Y4=`uniform sampler2D colorTexture;
uniform float avgLuminance;
uniform float threshold;
uniform float offset;
in vec2 v_textureCoordinates;
float key(float avg)
{
float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
return max(0.0, guess) + 0.1;
}
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
vec3 xyz = czm_RGBToXYZ(color.rgb);
float luminance = xyz.r;
float scaledLum = key(avgLuminance) * luminance / avgLuminance;
float brightLum = max(scaledLum - threshold, 0.0);
float brightness = brightLum / (offset + brightLum);
xyz.r = brightness;
out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
}
`;function xy(){this._sceneFramebuffer=new LC;let e=.125,t=new Array(6);t[0]=new Ur({fragmentShader:gf,textureScale:e,forcePowerOfTwo:!0,sampleMode:gd.LINEAR});let n=t[1]=new Ur({fragmentShader:Y4,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new U,t[2]=new Ur({fragmentShader:Vb,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:e,forcePowerOfTwo:!0}),t[3]=new Ur({fragmentShader:Vb,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/n.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:e,forcePowerOfTwo:!0}),t[4]=new Ur({fragmentShader:gf,sampleMode:gd.LINEAR}),this._uCenter=new U,this._uRadius=void 0,t[5]=new Ur({fragmentShader:q4,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new yf({stages:t});let r=new zC(this),o=t.length;for(let s=0;s<o;++s)t[s]._textureCache=r;this._textureCache=r,this.length=t.length}xy.prototype.get=function(e){return this._stages.get(e)};xy.prototype.getStageByName=function(e){let t=this._stages.length;for(let n=0;n<t;++n){let i=this._stages.get(n);if(i.name===e)return i}};var d6t=new se,ike=new U,h6t=new U,rke=new N;function m6t(e,t,n){let i=t.uniformState,r=i.sunPositionWC,o=i.view,s=i.viewProjection,a=i.projection,c=N.computeViewportTransformation(n,0,1,rke),u=N.multiplyByPoint(o,r,d6t),f=At.pointToGLWindowCoordinates(s,c,r,ike);u.x+=D.SOLAR_RADIUS;let d=At.pointToGLWindowCoordinates(a,c,u,u),p=U.magnitude(U.subtract(d,f,d))*30*2,g=h6t;g.x=p,g.y=p,e._uCenter=U.clone(f,e._uCenter),e._uRadius=Math.max(g.x,g.y)*.15;let m=t.drawingBufferWidth,y=t.drawingBufferHeight,A=e._stages,b=A.get(0),x=b.outputTexture.width,T=b.outputTexture.height,E=new et;E.width=x,E.height=T,c=N.computeViewportTransformation(E,0,1,rke),f=At.pointToGLWindowCoordinates(s,c,r,ike),g.x*=x/m,g.y*=T/y;let v=b.scissorRectangle;v.x=Math.max(f.x-g.x*.5,0),v.y=Math.max(f.y-g.y*.5,0),v.width=Math.min(g.x,m),v.height=Math.min(g.y,y);for(let S=1;S<4;++S)et.clone(v,A.get(S).scissorRectangle)}xy.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};xy.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let r=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),m6t(this,t,n),r};xy.prototype.execute=function(e){let t=this._sceneFramebuffer.framebuffer.getColorTexture(0),n=this._stages,i=n.length;n.get(0).execute(e,t);for(let r=1;r<i;++r)n.get(r).execute(e,n.get(r-1).outputTexture)};xy.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(gf,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};xy.prototype.isDestroyed=function(){return!1};xy.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),le(this)};var X4=xy;function WC(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Qt}WC.fromKeyframeNode=function(e,t,n,i){let r=new WC(e,t,n),{spatialNode:o,content:s}=i;return r._metadata=p6t(e,s,n),r._orientedBoundingBox=_6t(e,o,n,r._orientedBoundingBox),r};function p6t(e,t,n){if(!l(t)||!l(t.metadata))return;let{names:i,types:r}=e.provider,{metadata:o}=t,s={};for(let a=0;a<i.length;a++){let c=i[a],u=bt.getComponentCount(r[a]),f=o[a].slice(n*u,(n+1)*u);s[c]=f}return s}var oke=new h,g6t=new h;function _6t(e,t,n,i){let r=t.dimensions,o=r.x*r.y,s=Math.floor(n/o),a=n-s*o,c=Math.floor(a/r.x),u=a-c*r.x,f=h.fromElements(u,c,s,oke),d=h.divideComponents(h.subtract(f,e._paddingBefore,oke),e.dimensions,g6t);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,d,i)}Object.defineProperties(WC.prototype,{metadata:{get:function(){return this._metadata}},primitive:{get:function(){return this._primitive}},sampleIndex:{get:function(){return this._sampleIndex}},tileIndex:{get:function(){return this._tileIndex}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox.clone()}}});WC.prototype.hasProperty=function(e){return l(this._metadata[e])};WC.prototype.getNames=function(){return Object.keys(this._metadata)};WC.prototype.getProperty=function(e){return this._metadata[e]};var K4=WC;function Rh(e,t,n,i,r,o,s){this.children=void 0,this.parent=r,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=h.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Qt,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(o)}var y6t=new h;Rh.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=$.getScale(this.orientedBoundingBox.halfAxes,y6t),n=2*h.maximumComponent(t);this.approximateVoxelSize=n/h.minimumComponent(this.dimensions)};Rh.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:r}=this,o=n*2,s=i*2,a=r*2,c=s+1,u=o+1,f=a+1,d=t+1,p=[[d,o,s,a],[d,u,s,a],[d,o,c,a],[d,u,c,a],[d,o,s,f],[d,u,s,f],[d,o,c,f],[d,u,c,f]];this.children=p.map(([g,m,y,A])=>new Rh(g,m,y,A,this,e,this.dimensions))};Rh.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};Rh.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,D.EPSILON7);let r=this.approximateVoxelSize,o=t*(r/i);this.screenSpaceError=o};var ske={keyframe:0};function $4(e,t){return ske.keyframe=e,vr(t,ske,Hr.searchComparator)}Rh.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),r=Math.ceil(e),o,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:d}=t;if(d.length>=1){let p=A6t(i,d),g=d[p],m=r===i||i<g.keyframe?p:Math.min(p+1,d.length-1),y=d[m],A=i-g.keyframe,b=ake(n-t.level,A);b<a&&(a=b,o=g);let x=y.keyframe-r,T=ake(n-t.level,x);if(T<c&&(c=T,s=y),A===0&&x===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=o,this.renderableKeyframeNodeNext=s,!l(o)||!l(s))return;let u=o.keyframe,f=s.keyframe;this.renderableKeyframeNodeLerp=u===f?0:D.clamp((e-u)/(f-u),0,1)};function A6t(e,t){let n=$4(e,t);return n<0?D.clamp(~n-1,0,t.length-1):n}function ake(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}Rh.prototype.isVisited=function(e){return this.visitedFrameNumber===e};Rh.prototype.createKeyframeNode=function(e){let t=$4(e,this.keyframeNodes);if(t<0){t=~t;let n=new Hr(this,e);this.keyframeNodes.splice(t,0,n)}};Rh.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=$4(n,this.keyframeNodes);if(i<0)throw new pe("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let o=0;o<t.length;o++)t[o].remove(e.megatextureIndex);let r=$4(n,this.renderableKeyframeNodes);if(r<0)throw new pe("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(r,1)}e.unload()};Rh.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new pe("Keyframe node cannot be added to megatexture");let{metadata:n}=e.content;for(let o=0;o<t.length;o++){let s=t[o];e.megatextureIndex=s.add(n[o])}let i=this.renderableKeyframeNodes,r=$4(e.keyframe,i);if(r>=0)throw new pe("Keyframe already renderable");r=~r,i.splice(r,0,e)};Rh.prototype.isRenderable=function(e){let t=this.renderableKeyframeNodePrevious,n=this.renderableKeyframeNodeNext,i=this.level;return l(t)&&l(n)&&(t.spatialNode.level===i||n.spatialNode.level===i)&&this.visitedFrameNumber===e};var J4=Rh;function jb(e,t,n,i){let{provider:r,dimensions:o,inputDimensions:s}=e,{types:a,componentTypes:c}=r;l(i)?i=Math.min(Math.max(0,i),512*1024*1024):i=128*1024*1024,this._primitive=e,this.textureMemoryByteLength=0,this.megatextures=new Array(a.length);let u=l(r.maximumTileCount)?r.maximumTileCount:l(r.availableLevels)?(8**r.availableLevels-1)/7:void 0;for(let b=0;b<a.length;b++){let x=a[b],T=bt.getComponentCount(x),E=c[b];this.megatextures[b]=new GV(t,s,T,E,i,u),this.textureMemoryByteLength+=this.megatextures[b].textureMemoryByteLength}let f=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._calculateStatistics=this._primitive._calculateStatistics??!1,this._frameNumber=0;let d=e._shape;this.rootNode=new J4(0,0,0,0,void 0,d,o),this._priorityQueue=new iy({maximumLength:f,comparator:Hr.priorityComparator}),this._highPriorityKeyframeNodes=new Array(f),this._highPriorityKeyframeNodeCount=0,this._keyframeNodesInMegatexture=new Array(f),this._keyframeCount=n,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(n),this._initialTilesLoaded=!1;let p=this._binaryTreeKeyframeWeighting;p[0]=0,p[n-1]=0,Wce(p,1,n-2,0);let g=9,m=2048,y=Math.floor(m/g),A=Math.ceil(f/y);this.internalNodeTexture=new Dt({context:t,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,flipY:!1,width:m,height:A,sampler:new Ht({minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST})}),this.internalNodeTilesPerRow=y,this.internalNodeTexelSizeUv=new U(1/m,1/A),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new U}jb.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function Wce(e,t,n,i){if(t>n)return;let r=Math.floor((t+n)/2);e[r]=i,Wce(e,t,r-1,i+1),Wce(e,r+1,n,i+1)}jb.simultaneousRequestCountMaximum=50;jb.prototype.update=function(e,t,n,i){let r=this._primitive,o=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,c=r._levelBlendFactor,u=c>0,f=a>1,d=(u?2:1)*(f?2:1);this._sampleCount=d;let p=d>=2;if(p&&!l(this.leafNodeTexture)){let T=Math.floor(512),E=Math.ceil(s/T);this.leafNodeTexture=new Dt({context:o,pixelFormat:Ke.RGBA,pixelDatatype:ze.UNSIGNED_BYTE,flipY:!1,width:1024,height:E,sampler:new Ht({minificationFilter:Wt.NEAREST,magnificationFilter:Zn.NEAREST})}),this.leafNodeTexelSizeUv=U.fromElements(1/1024,1/E,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=T}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=D.clamp(t,0,a-1),n&&cke(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let g=xn();T6t(this,e),E6t(this,e);let m=xn();I6t(this,d,c);let y=xn(),A=r.loadProgress.numberOfListeners>0||r.allTilesLoaded.numberOfListeners>0||r.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||A){let b=m-g,x=y-m,T=y-g;w6t(this,e,b,x,T)}};jb.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};jb.prototype.isDestroyed=function(){return!1};jb.prototype.destroy=function(){let e=this.megatextures,t=e.length;for(let n=0;n<t;n++)e[n]=e[n]&&e[n].destroy();return this.textureMemoryByteLength=0,this.internalNodeTexture=this.internalNodeTexture&&this.internalNodeTexture.destroy(),this.leafNodeTexture=this.leafNodeTexture&&this.leafNodeTexture.destroy(),le(this)};function cke(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];cke(e,i)}}function b6t(e,t){if(e._simultaneousRequestCount>=jb.simultaneousRequestCountMaximum)return;let i=e._primitive.provider,{keyframe:r,spatialNode:o}=t;if(l(i.availableLevels)&&o.level>=i.availableLevels)return;function s(f){e._simultaneousRequestCount--,t.content=f,t.state=l(f)?Hr.LoadState.PROCESSING:Hr.LoadState.UNAVAILABLE}function a(f){e._simultaneousRequestCount--,t.state=Hr.LoadState.FAILED,e._primitive.tileFailed.raiseEvent()}let c={tileLevel:o.level,tileX:o.x,tileY:o.y,tileZ:o.z,keyframe:r},u=i.requestData(c);l(u)&&(e._simultaneousRequestCount++,t.state=Hr.LoadState.RECEIVING,u.then(s).catch(a))}function x6t(e){return e/(1+e)}function T6t(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),lke(e.rootNode,ta.MASK_INDETERMINATE,e,t);let r=e._highPriorityKeyframeNodes,o=0,s;for(;i.length>0;)s=i.removeMaximum(),s.highPriorityFrameNumber=n,r[o]=s,o++;e._highPriorityKeyframeNodeCount=o}function E6t(e,t){let n=e.megatextures[0],i=n.occupiedCount,r=e._keyframeNodesInMegatexture;r.length=i,r.sort(C6t);let o=e._highPriorityKeyframeNodes,s=e._highPriorityKeyframeNodeCount,a=0,c=0;for(let u=0;u<s;u++){let f=o[u];if(!(f.state===Hr.LoadState.LOADED||f.spatialNode===void 0)&&(f.state===Hr.LoadState.UNLOADED&&b6t(e,f),f.state===Hr.LoadState.PROCESSING)){let{content:d}=f;if(d.update(e._primitive,t),!d.ready)continue;if(!v6t(d.metadata,e)){f.content=void 0,f.state=Hr.LoadState.FAILED,e._primitive.tileFailed.raiseEvent();continue}let p;if(n.isFull()){p=i-1-a,a++;let g=r[p];e._primitive.tileUnload.raiseEvent(),g.spatialNode.destroyKeyframeNode(g,e.megatextures)}else p=i+c,c++;f.spatialNode.addKeyframeNodeToMegatextures(f,e.megatextures),f.state=Hr.LoadState.LOADED,r[p]=f,e._primitive.tileLoad.raiseEvent()}}}function C6t(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function v6t(e,t){let n=t._primitive.provider.types.length;if(!Array.isArray(e)||e.length!==n)return!1;let{megatextures:i}=t;for(let r=0;r<n;r++){let{voxelCountPerTile:o,channelCount:s}=i[r],{x:a,y:c,z:u}=o,f=a*c*u,d=e[r],p=f*s;if(d.length!==p)return!1}return!0}function lke(e,t,n,i){let{camera:r,context:o,pixelRatio:s,frameNumber:a}=i,{positionWC:c,frustum:u}=r,d=o.drawingBufferHeight/s/u.sseDenominator;if(e.computeScreenSpaceError(c,d),t=e.visibility(i,t),t===ta.MASK_OUTSIDE)return;e.visitedFrameNumber=a;let p=n._primitive,g=p._shape,m=p.screenSpaceError,y=n._priorityQueue,A=n._keyframeCount,b=D.clamp(Math.floor(n._keyframeLocation),0,A-2),x=b+1;if(A===1)e.createKeyframeNode(0);else if(e.keyframeNodes.length!==A)for(let I=0;I<A;I++)e.createKeyframeNode(I);let{screenSpaceError:T,keyframeNodes:E}=e,v=x6t(T),S=!1;for(let I=0;I<E.length;I++){let R=E[I];R.priority=10*v+S6t(b,R.keyframe,x,n),R.state!==Hr.LoadState.UNAVAILABLE&&R.state!==Hr.LoadState.FAILED&&R.priority!==-Number.MAX_VALUE&&y.insert(R),R.state===Hr.LoadState.LOADED&&(S=!0)}if(T<m||!S){e.children=void 0;return}l(e.children)||e.constructChildNodes(g);for(let I=0;I<8;I++){let R=e.children[I];lke(R,t,n,i)}}function S6t(e,t,n,i){let r=Math.min(Math.abs(t-e),Math.abs(t-n)),o=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-r/o,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return D.lerp(a,s,.15+.85*s)}function w6t(e,t,n,i,r){let o=e._keyframeCount,s=e.rootNode,a=Object.keys(Hr.LoadState).length,c=new Array(a),u=new Array(a),f=0;for(let S=0;S<a;S++){let I=new Array(o).fill(0);c[S]=I,u[S]=0}function d(S){let I=S.keyframeNodes;for(let R=0;R<I.length;R++){let O=I[R],L=O.keyframe,_=O.state;c[_][L]+=1,u[_]+=1,f++}if(l(S.children))for(let R=0;R<8;R++){let O=S.children[R];d(O)}}d(s),e._primitive.statistics.numberOfTilesWithContentReady=u[Hr.LoadState.LOADED],e._primitive.statistics.visited=f;let p=u[Hr.LoadState.RECEIVING],g=u[Hr.LoadState.PROCESSING],m=p!==e._primitive.statistics.numberOfPendingRequests||g!==e._primitive.statistics.numberOfTilesProcessing;if(m&&t.afterRender.push(function(){return e._primitive.loadProgress.raiseEvent(p,g),!0}),e._primitive.statistics.numberOfPendingRequests=p,e._primitive.statistics.numberOfTilesProcessing=g,m&&(p===0&&g===0)&&(t.afterRender.push(function(){return e._primitive.allTilesLoaded.raiseEvent(),!0}),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push(function(){return e._primitive.initialTilesLoaded.raiseEvent(),!0}))),!e._debugPrint)return;let A=`KEYFRAMES: ${c[Hr.LoadState.LOADED]}`,b=`UNLOADED: ${u[Hr.LoadState.UNLOADED]} | RECEIVING: ${u[Hr.LoadState.RECEIVING]} | PROCESSING: ${u[Hr.LoadState.PROCESSING]} | LOADED: ${u[Hr.LoadState.LOADED]} | FAILED: ${u[Hr.LoadState.FAILED]} | UNAVAILABLE: ${u[Hr.LoadState.UNAVAILABLE]} | TOTAL: ${f}`,x=Math.round(n*100)/100,T=Math.round(i*100)/100,E=Math.round(r*100)/100,v=`LOAD: ${x} | OCT: ${T} | ALL: ${E}`;console.log(`${A} || ${b} || ${v}`)}var JW={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function I6t(e,t,n){let i=e._primitive._screenSpaceError,r=e._keyframeLocation,o=e._frameNumber,s=t>=2,a=0,c=0,u=[],f=[];function d(g,m,y,A,b){let x=!1;if(l(g.children))for(let T=0;T<8;T++){let E=g.children[T];E.computeSurroundingRenderableKeyframeNodes(r),E.isRenderable(o)&&(x=!0)}if(x){u[b]=JW.INTERNAL<<16|m,u[y]=A,a++,A=m,b=A*9+1;for(let T=0;T<8;T++){let E=g.children[T];m=a,y=m*9+0,d(E,m,y,A,b+T)}}else{if(e._primitive.tileVisible.raiseEvent(),s){let T=c*5,E=g.renderableKeyframeNodePrevious,v=g.level-E.spatialNode.level,S=E.spatialNode.parent,I=l(S)?S.renderableKeyframeNodePrevious:E,R=P6t(g,i,n),O=v,L=1,_=E.megatextureIndex,C=I.megatextureIndex;f[T+0]=R,f[T+1]=O,f[T+2]=L,f[T+3]=_,f[T+4]=C,u[b]=JW.LEAF<<16|c}else{let T=g.renderableKeyframeNodePrevious,v=g.level-T.spatialNode.level===0?JW.LEAF:JW.PACKED_LEAF_FROM_PARENT;u[b]=v<<16|T.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(r),p.isRenderable(o)&&d(p,0,0,0,0),D6t(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&R6t(f,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function P6t(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,r=e.parent.screenSpaceError,s=((t-i)/(r-i)+n-1)/n;return D.clamp(s,0,1)}function D6t(e,t,n,i){let r=Ke.componentsLength(i.pixelFormat),o=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(o,n)),a=Math.max(1,Math.ceil(o/n)),c=new Uint8Array(s*a*r);for(let d=0;d<e.length;d++){let p=e[d],g=d*r;for(let m=0;m<r;m++)c[g+m]=p>>>m*8&255}let f={source:{arrayBufferView:c,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(f)}function R6t(e,t,n,i){let r=Ke.componentsLength(i.pixelFormat),o=5,s=Math.ceil(e.length/o),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),u=new Uint8Array(a*c*r);for(let p=0;p<s;p++){let g=e[p*o+0],m=e[p*o+1],y=e[p*o+2],A=e[p*o+3],b=e[p*o+4],x=D.clamp(Math.floor(65536*g),0,65535);u[p*8+0]=x>>>0&255,u[p*8+1]=x>>>8&255,u[p*8+2]=m&255,u[p*8+3]=y&255,u[p*8+4]=A>>>0&255,u[p*8+5]=A>>>8&255,u[p*8+6]=b>>>0&255,u[p*8+7]=b>>>8&255}let d={source:{arrayBufferView:u,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(d)}var Z4=jb;function $0(e){e=e??H.EMPTY_OBJECT;let{provider:t=$0.DefaultProvider,modelMatrix:n=N.IDENTITY,customShader:i=bP(t),clock:r,calculateStatistics:o=!1}=e;this._ready=!1,this._provider=t,this._traversal=void 0,this._statistics=new Im,this._calculateStatistics=o;let{shape:s,minBounds:a=xc.getMinBounds(s),maxBounds:c=xc.getMaxBounds(s),dimensions:u,paddingBefore:f=h.ZERO,paddingAfter:d=h.ZERO,metadataOrder:p,availableLevels:g=1}=t;this._dimensions=h.clone(u),this._paddingBefore=h.clone(f),this._paddingAfter=h.clone(d),this._inputDimensions=O6t(u,f,d,p),this._availableLevels=g,this._minBounds=a.clone(),this._minBoundsOld=new h,this._maxBounds=c.clone(),this._maxBoundsOld=new h,this._minClippingBounds=a.clone(),this._minClippingBoundsOld=new h,this._maxClippingBounds=c.clone(),this._maxClippingBoundsOld=new h,this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=N.clone(n),this._modelMatrixOld=N.clone(this._modelMatrix),this._customShader=i??$0.DefaultCustomShader,this._customShaderCompilationEvent=new be,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=r,this._transformPositionLocalToWorld=new N,this._transformPositionWorldToLocal=new N,this._transformPlaneLocalToView=new N,this._transformDirectionWorldToLocal=new $,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new Em,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1;let m=xc.getShapeConstructor(s);this._shape=new m,fke(this),this._shapeVisible=dke(this),this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new U,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new U,megatextureTextures:[],megatextureTileCounts:new h,dimensions:this._dimensions,inputDimensions:this._inputDimensions,paddingBefore:this._paddingBefore,paddingAfter:this._paddingAfter,transformPositionViewToLocal:new N,transformDirectionViewToLocal:new $,cameraPositionLocal:new h,cameraDirectionLocal:new h,cameraTileCoordinates:new se,cameraTileUv:new h,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new N,renderBoundPlanesTexture:void 0,stepSize:this._stepSizeMultiplier,pickColor:new z},this._shapeDefinesOld={},this._uniformMap={};let y=this._uniforms,A=this._uniformMap;for(let b in y)if(y.hasOwnProperty(b)){let x=`u_${b}`;A[x]=function(){return y[b]}}M6t(this,this._shape),this.tileLoad=new be,this.tileVisible=new be,this.tileFailed=new be,this.tileUnload=new be,this.loadProgress=new be,this.allTilesLoaded=new be,this.initialTilesLoaded=new be}function O6t(e,t,n,i){let r=h.add(e,t,new h);if(h.add(r,n,r),i===U0.Y_UP){let o=r.y;r.y=r.z,r.z=o}return r}function M6t(e,t){let n=e._uniformMap,{shaderUniforms:i,shaderDefines:r}=t;for(let o in i)if(i.hasOwnProperty(o)){let s=`u_${o}`;n[s]=function(){return i[o]}}e._shapeDefinesOld=Je(r,!0)}Object.defineProperties($0.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=N.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._dimensions}},inputDimensions:{get:function(){return this._inputDimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling=e}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=D.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=h.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=h.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=h.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=h.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){bs.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(e===this._customShader)return;let t=this._uniformMap,i=this._customShader.uniformMap;for(let r in i)i.hasOwnProperty(r)&&delete t[r];if(l(e))this._customShader=e;else{let r=bP(this._provider);this._customShader=r??$0.DefaultCustomShader}this._shaderDirty=!0}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var N6t=new se,L6t=new se,F6t=new N,B6t=new N,k6t=new h,U6t=new se;$0.prototype.update=function(e){let t=this._provider,n=this._uniforms;this._customShader.update(e);let i=e.context;if(!this._ready){q6t(this,t,i),e.afterRender.push(()=>(this._ready=!0,!0));return}let r=fke(this),o=W6t(this,e);if((r||o)&&(this._shapeVisible=dke(this),nHt(this)&&(this._shaderDirty=!0)),!this._shapeVisible)return;this._shape.updateViewTransforms(e);let s=iHt(t.timeIntervalCollection,this._clock),a=this._traversal,c=a._sampleCount;if(a.update(e,s,r,this._disableUpdate),c!==a._sampleCount&&(this._shaderDirty=!0),!a.isRenderable(a.rootNode)||(this._debugDraw&&fHt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),rHt(this,e)&&(this._shaderDirty=!0);let f=a.leafNodeTexture;l(f)&&(n.octreeLeafNodeTexture=a.leafNodeTexture,n.octreeLeafNodeTexelSizeUv=U.clone(a.leafNodeTexelSizeUv,n.octreeLeafNodeTexelSizeUv),n.octreeLeafNodeTilesPerRow=a.leafNodeTilesPerRow),this._shaderDirty&&(Ez(this,i),this._shaderDirty=!1);let d=i.uniformState.viewProjection,{orientedBoundingBox:p}=this._shape,g=aHt(p,d,L6t);if(g.x===1||g.y===1||g.z===-1||g.w===-1)return;n.ndcSpaceAxisAlignedBoundingBox=se.clone(g,n.ndcSpaceAxisAlignedBoundingBox);let y=i.uniformState.inverseView,A=N.multiplyTransformation(this._transformPositionWorldToLocal,y,n.transformPositionViewToLocal);this._transformPlaneLocalToView=N.transpose(A,this._transformPlaneLocalToView);let b=i.uniformState.inverseViewRotation;n.transformDirectionViewToLocal=$.multiply(this._transformDirectionWorldToLocal,b,n.transformDirectionViewToLocal),n.cameraPositionLocal=N.multiplyByPoint(this._transformPositionWorldToLocal,e.camera.positionWC,n.cameraPositionLocal),n.cameraDirectionLocal=$.multiplyByVector(this._transformDirectionWorldToLocal,e.camera.directionWC,n.cameraDirectionLocal);let x=j6t(this,n.cameraPositionLocal,U6t);n.cameraTileCoordinates=se.fromElements(Math.floor(x.x),Math.floor(x.y),Math.floor(x.z),x.w,n.cameraTileCoordinates),n.cameraTileUv=h.fromElements(x.x-Math.floor(x.x),x.y-Math.floor(x.y),x.z-Math.floor(x.z),n.cameraTileUv),n.stepSize=this._stepSizeMultiplier,z6t(this),V6t(this,e);let T=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;T.boundingVolume=this._shape.boundingSphere,e.commandList.push(T)};function z6t(e){let{megatextures:t}=e._traversal;for(let n=0;n<t.length;++n)t[n].nearestSampling=e._nearestSampling}function V6t(e,t){let n=e._uniforms,{renderBoundPlanes:i}=e._shape;l(i)&&(i.update(t,e._transformPlaneLocalToView),n.renderBoundPlanesTexture=i.texture)}function j6t(e,t,n){let i=e._shape.convertLocalToShapeUvSpace(t,k6t),r=e._availableLevels,o=2**(r-1);return se.fromElements(i.x*o,i.y*o,i.z*o,r-1,n)}var H6t=new h,qce=new h,G6t=new he;function W6t(e,t){let{verticalExaggeration:n,verticalExaggerationRelativeHeight:i}=t;return e._verticalExaggeration===n&&e._verticalExaggerationRelativeHeight===i?!1:(e._verticalExaggeration=n,e._verticalExaggerationRelativeHeight=i,!0)}function q6t(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=z.clone(e._pickId.color,i.pickColor);let r=t.keyframeCount??1;e._traversal=new Z4(e,n,r),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,tHt(e._traversal,i)}function fke(e){return Q4(e,"_modelMatrix","_modelMatrixOld")+Q4(e,"_minBounds","_minBoundsOld")+Q4(e,"_maxBounds","_maxBoundsOld")+Q4(e,"_minClippingBounds","_minClippingBoundsOld")+Q4(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function Q4(e,t,n){let i=e[t],r=e[n],o=!i.equals(r);return o&&i.clone(r),o?1:0}var Y6t=new h,X6t=new h,K6t=new h,$6t=new h,J6t=new N,Z6t=new N;function dke(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,i=h.clone(e._minBounds,Y6t),r=h.clone(e._maxBounds,X6t),o=h.clone(e._minClippingBounds,K6t),s=h.clone(e._maxClippingBounds,$6t),a=N.clone(e._modelMatrix,J6t);if(e.shape===xc.ELLIPSOID)i.z=Ar.getHeight(e._minBounds.z,t,n),r.z=Ar.getHeight(e._maxBounds.z,t,n),o.z=Ar.getHeight(e._minClippingBounds.z,t,n),s.z=Ar.getHeight(e._maxClippingBounds.z,t,n);else{let m=h.fromElements(1,1,t,H6t);N.multiplyByScale(a,m,a),N.multiplyByTranslation(a,eHt(e),a)}let c=e._provider,u=c.shapeTransform??N.IDENTITY,f=c.globalTransform??N.IDENTITY,d=N.multiplyTransformation(f,a,Z6t);N.multiplyTransformation(d,u,d);let p=e._shape;return p.update(d,i,r,o,s)?(e._transformPositionLocalToWorld=N.clone(p.shapeTransform,e._transformPositionLocalToWorld),e._transformPositionWorldToLocal=N.inverse(e._transformPositionLocalToWorld,e._transformPositionWorldToLocal),e._transformDirectionWorldToLocal=N.getMatrix3(e._transformPositionWorldToLocal,e._transformDirectionWorldToLocal),!0):!1}var Q6t=new h;function eHt(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,{shapeTransform:i=N.IDENTITY,globalTransform:r=N.IDENTITY}=e._provider,o=N.getTranslation(i,qce),s=N.multiplyByPoint(e._modelMatrix,o,qce),a=N.multiplyByPoint(r,s,qce),u=ee.WGS84.cartesianToCartographic(a,G6t),f=0;l(u)&&(f=u.height);let d=Ar.getHeight(f,t,n);return h.fromElements(0,0,(d-f)/t,Q6t)}function tHt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=U.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let{megatextures:n}=e,i=n[0];t.megatextureTextures=new Array(n.length);for(let r=0;r<n.length;r++)t.megatextureTextures[r]=n[r].texture;t.megatextureTileCounts=h.clone(i.tileCounts,t.megatextureTileCounts)}function nHt(e){let{shaderDefines:t}=e._shape,n=Object.keys(t).some(i=>t[i]!==e._shapeDefinesOld[i]);return n&&(e._shapeDefinesOld=Je(t,!0)),n}function iHt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,r=e.indexOf(n);r>=0?i=e.get(r):(r=~r,r===e.length?(r=e.length-1,i=e.get(r),n=i.stop):(i=e.get(r),n=i.start));let o=K.secondsDifference(i.stop,i.start),a=K.secondsDifference(n,i.start)/o;return r+a}function rHt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:r}=n;if(r){let o=e._uniforms;o.clippingPlanesTexture=n.texture,o.clippingPlanesMatrix=N.transpose(N.multiplyTransformation(N.inverse(n.modelMatrix,o.clippingPlanesMatrix),e._transformPositionLocalToWorld,o.clippingPlanesMatrix),o.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===r?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=r,!0)}$0.prototype.isDestroyed=function(){return!1};$0.prototype.destroy=function(){let e=this._drawCommand;l(e)&&(e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy());let t=this._drawCommandPick;return l(t)&&(t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()),this._pickId=this._pickId&&this._pickId.destroy(),this._traversal=this._traversal&&this._traversal.destroy(),this.statistics.texturesByteLength=0,this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),le(this)};var uke=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),oHt=new Array(1,2,4,0,3,5,0,3,6,1,2,7,0,5,6,1,4,7,2,4,7,3,5,6),sHt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function aHt(e,t,n){let i=N.fromRotationTranslation(e.halfAxes,e.center,F6t),r=N.multiply(t,i,B6t),o=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,u,f=sHt,d=uke.length;for(u=0;u<d;u++)N.multiplyByVector(r,uke[u],f[u]);for(u=0;u<d;u++){let p=f[u];if(p.z>=-p.w){let g=p.x/p.w,m=p.y/p.w;o=Math.min(o,g),s=Math.max(s,g),a=Math.min(a,m),c=Math.max(c,m)}else for(let g=0;g<3;g++){let m=oHt[u*3+g],y=f[m];if(y.z>=-y.w){let A=p.z+p.w,b=y.z+y.w,x=A/(A-b),T=se.lerp(p,y,x,N6t),E=T.x/T.w,v=T.y/T.w;o=Math.min(o,E),s=Math.max(s,E),a=Math.min(a,v),c=Math.max(c,v)}}}return o=D.clamp(o,-1,1),a=D.clamp(a,-1,1),s=D.clamp(s,-1,1),c=D.clamp(c,-1,1),n=se.fromElements(o,a,s,c,n),n}var Yce=3e7,cHt=new h(Yce,0,0),lHt=new h(0,Yce,0),uHt=new h(0,0,Yce);function fHt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function r(c,u,f,d){i.add({positions:[c,u],width:d,material:Qi.fromType("Color",{color:f})})}function o(c,u,f){let d=c.computeCorners();r(d[0],d[1],u,f),r(d[2],d[3],u,f),r(d[4],d[5],u,f),r(d[6],d[7],u,f),r(d[0],d[2],u,f),r(d[4],d[6],u,f),r(d[1],d[3],u,f),r(d[5],d[7],u,f),r(d[0],d[4],u,f),r(d[2],d[6],u,f),r(d[1],d[5],u,f),r(d[3],d[7],u,f)}function s(c){if(!n.isRenderable(c))return;let u=c.level,d=Math.max(1,5/Math.pow(2,u)),g=[z.RED,z.LIME,z.BLUE][u%3];if(o(c.orientedBoundingBox,g,d),l(c.children))for(let m=0;m<8;m++)s(c.children[m])}o(e._shape.orientedBoundingBox,z.WHITE,5),s(n.rootNode);let a=10;r(h.ZERO,cHt,z.RED,a),r(h.ZERO,lHt,z.LIME,a),r(h.ZERO,uHt,z.BLUE,a),i.update(t)}$0.DefaultCustomShader=new k0({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
vec3 voxelNormal = fsInput.attributes.normalEC;
float diffuse = max(0.0, dot(voxelNormal, czm_lightDirectionEC));
float lighting = 0.5 + 0.5 * diffuse;
material.diffuse = vec3(lighting);
material.alpha = 1.0;
}`});function hke(){this.shape=xc.BOX,this.dimensions=new h(1,1,1),this.names=["data"],this.types=[bt.SCALAR],this.componentTypes=[Lt.FLOAT32],this.maximumTileCount=1}hke.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new mC({metadata:[new Float32Array(1)]});return Promise.resolve(n)};$0.DefaultProvider=new hke;var Hb=$0;var QW=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Ai(e){e=e??H.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,r=e.contextOptions instanceof TU;if(r)this._context=e.contextOptions.createSceneContext(t);else{let u=Je(e.contextOptions);this._context=new $E(t,u)}let o=this._context,s=l(n);s||(n=document.createElement("div"),n.style.position="absolute",n.style.bottom="0",n.style["text-shadow"]="0 0 2px #000000",n.style.color="#ffffff",n.style["font-size"]="10px",n.style["padding-right"]="5px",t.parentNode.appendChild(n)),l(i)||(i=t.parentNode),this._id=$n(),this._jobScheduler=new jV,this._heightQueryCache=new Map,this._heightQueryFrame=-1,this._frameState=new kA(o,new jz(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!s,this._creditContainer=n,this._canvas=t,this._computeEngine=new pU(o),this._ellipsoid=e.ellipsoid??ee.default,this._globe=void 0,this._globeTranslucencyState=new OV,this._primitives=new xl({countReferences:r}),this._groundPrimitives=new xl({countReferences:r}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Ai.defaultLogDepthBuffer&&o.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new HC,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new iV(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new ui({color:new z,stencil:0,owner:this}),this._depthClearCommand=new ui({depth:1,owner:this}),this._stencilClearCommand=new ui({stencil:0}),this._classificationStencilClearCommand=new ui({stencil:0,renderState:Ge.fromCache({stencilMask:Yt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new k4(this),this._preUpdate=new be,this._postUpdate=new be,this._renderError=new be,this._preRender=new be,this._postRender=new be,this._controllerHost=new F4,this._minimumDisableDepthTestDistance=0,this._debugInspector=new Kz,this._msaaSamples=e.msaaSamples??4,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new be,this.morphComplete=new be,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=z.clone(z.BLACK),this._mode=re.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new Ui(this._ellipsoid),this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.verticalExaggeration=1,this.verticalExaggerationRelativeHeight=0,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.atmosphere=new cT,this.fog=new uV,this.fog.enabled=ee.WGS84.equals(this._ellipsoid),ee.WGS84.equals(this._ellipsoid)||(Or.DEFAULT_VIEW_RECTANGLE=ie.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new Or(this),this.shadowMap=new gy({context:o,lightCamera:this._shadowMapCamera,enabled:e.shadows??!1}),this.invertClassification=!1,this.invertClassificationColor=z.clone(z.WHITE),this._actualInvertClassificationColor=z.clone(this._invertClassificationColor),this._invertClassification=new UP,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new L4,this._brdfLutGenerator=new nz,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new V4(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??Au.INFINITE_SCROLL,this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e.requestRenderMode??!1,this._renderRequested=!0,this.maximumRenderTimeChange=e.maximumRenderTimeChange??0,this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Kc.requestCompletedEvent.addEventListener(QW(this)),this._removeTaskProcessorListenerCallback=Jn.taskCompletedEvent.addEventListener(QW(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new et(0,0,o.drawingBufferWidth,o.drawingBufferHeight),c=new Or(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new Or(this),this.preloadFlightCullingVolume=void 0,this._picking=new f4(this),this._defaultView=new BC(this,c,a),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentCubeMap=void 0,this.light=new Q_,this._enableEdgeVisibility=!1,this._enablePlanarFillId=!1,Ake(this,0,K.now()),this.updateFrameState(),this.initializeFrame()}Ai.defaultLogDepthBuffer=!0;function dHt(e,t){for(let i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;let n=[];l(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(QW(e))),n.push(t.terrainProviderChanged.addEventListener(QW(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Ai.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return Ut.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Ut.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return nm.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,dHt(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},controllerHost:{get:function(){return this._controllerHost}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(l(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(l(this.globe))return this.globe.terrainProvider},set:function(e){this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),l(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(l(this.globe))return this.globe.terrainProviderChanged}},vectorProvider:{get:function(){return this.globe?.vectorProvider}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){e===re.SCENE2D?this.morphTo2D(0):e===re.SCENE3D?this.morphTo3D(0):e===re.COLUMBUS_VIEW&&this.morphToColumbusView(0),this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new Or(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new rV(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},splitPosition:{get:function(){return this._frameState.splitPosition},set:function(e){this._frameState.splitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){let t=this._context,n=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=n!==this._hdr,this._hdr=n}},highDynamicRangeSupported:{get:function(){let e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},msaaSamples:{get:function(){return this._msaaSamples},set:function(e){e=Math.min(e,Ut.maximumSamples),this._msaaSamples=e}},msaaSupported:{get:function(){return this._context.msaa}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return .9999}},globeHeight:{get:function(){return this._globeHeight}}});Ai.prototype.getCompressedTextureFormatSupported=function(e){let t=this.context;return(e==="WEBGL_compressed_texture_s3tc"||e==="s3tc")&&t.s3tc||(e==="WEBGL_compressed_texture_pvrtc"||e==="pvrtc")&&t.pvrtc||(e==="WEBGL_compressed_texture_etc"||e==="etc")&&t.etc||(e==="WEBGL_compressed_texture_etc1"||e==="etc1")&&t.etc1||(e==="WEBGL_compressed_texture_astc"||e==="astc")&&t.astc||(e==="EXT_texture_compression_bptc"||e==="bc7")&&t.bc7};function hHt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function mke(e,t,n){let i=e._frameState,r=e._context,o=e._view.oit,{lightShadowMaps:s,lightShadowsEnabled:a}=i.shadowState,c=t.derivedCommands;l(t.pickId)&&(c.picking=up.createPickDerivedCommand(e,t,r,c.picking)),l(t.snapId)&&i.passes.snap&&(c.snapping=up.createSnapDerivedCommand(e,t,r,c.snapping)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=up.createPickMetadataDerivedCommand(e,t,r,c.pickingMetadata))),t.pickOnly||(c.depth=up.createDepthOnlyDerivedCommand(e,t,r,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=up.createHdrCommand(t,r,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=gy.createReceiveDerivedCommand(s,t,n,r,c.shadows)),t.pass===Ie.TRANSLUCENT&&l(o)&&o.isSupported()&&(a&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=o.createDerivedCommands(c.shadows.receiveCommand,r,c.oit.shadows)):c.oit=o.createDerivedCommands(t,r,c.oit))}Ai.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!l(t))return;let n=this._frameState,{shadowState:i,useLogDepth:r}=this._frameState,o=this._context,s=!1,a=i.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,s=!0);let c=this._hdr,u=l(t.logDepth),f=l(t.hdr),d=l(t.originalCommand),p=r&&!u,g=c&&!f,m=(!r||!c)&&!d,y=n.pickingMetadata&&hHt(e,n),A=n.passes.snap&&l(e.snapId)&&!l(t.snapping);if(e.dirty=e.dirty||p||g||m||y||A,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:b,shadowMaps:x}=i;b&&e.castShadows&&(t.shadows=gy.createCastDerivedCommand(x,e,s,o,t.shadows)),(u||p)&&(t.logDepth=up.createLogDepthCommand(e,o,t.logDepth),mke(this,t.logDepth.command,s)),(d||m)&&mke(this,e,s)};var mHt=new vh({pass:ao.RENDER}),Xce=new vh({pass:ao.PRELOAD}),Kce=new vh({pass:ao.PRELOAD_FLIGHT}),pHt=new vh({pass:ao.REQUEST_RENDER_MODE_DEFER_CHECK}),pke=new ue,$ce;function gHt(e){if(!(e._mode!==re.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return pke.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,$ce=YU.fromBoundingSphere(pke,e.camera.positionWC,$ce),$ce}Ai.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.snap=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function Ake(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=K.clone(n,i.time)}Ai.prototype.updateFrameState=function(){let e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=gHt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof gn||this.camera.frustum instanceof As),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState;let{globe:n}=this;l(n)&&n._terrainExaggerationChanged&&(this.verticalExaggeration=n._terrainExaggeration,this.verticalExaggerationRelativeHeight=n._terrainExaggerationRelativeHeight,n._terrainExaggerationChanged=!1),t.verticalExaggeration=this.verticalExaggeration,t.verticalExaggerationRelativeHeight=this.verticalExaggerationRelativeHeight,l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready?(t.specularEnvironmentMaps=this._specularEnvironmentCubeMap.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentCubeMap.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=z.clone(this.invertClassificationColor,this._actualInvertClassificationColor),UP.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,l(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0};Ai.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===$t.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var ZW=new N(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);ZW=N.inverseTransformation(ZW,ZW);function _Ht(e,t,n,i){let r=t._frameState,o=r.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a=h.clone(s.center);if(r.mode!==re.SCENE3D){a=N.multiplyByPoint(ZW,a,a);let m=r.mapProjection,y=m.unproject(a);a=m.ellipsoid.cartographicToCartesian(y)}let c,u,{radius:f}=s;l(f)?(c=Xa.createGeometry(new Xa({radii:new h(f,f,f),vertexFormat:yn.FLAT_VERTEX_FORMAT})),u=N.fromTranslation(a)):(c=Ic.createGeometry(Ic.fromDimensions({dimensions:new h(2,2,2),vertexFormat:yn.FLAT_VERTEX_FORMAT})),u=N.fromRotationTranslation(s.halfAxes,a,new N)),t._debugVolume=new On({geometryInstances:new Ft({geometry:Gn.toWireframe(c),modelMatrix:u,attributes:{color:new Jt(1,0,0,1)}}),appearance:new yn({flat:!0,translucent:!1}),asynchronous:!1});let d=r.commandList,p=r.commandList=[];t._debugVolume.update(r),e=p[0],r.useLogDepth&&(e=up.createLogDepthCommand(e,o).command);let g;l(i)&&(g=n.framebuffer,n.framebuffer=i),e.execute(o,n),l(g)&&(n.framebuffer=g),r.commandList=d}function Tu(e,t,n,i){let r=t._frameState,o=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof ui){e.execute(o,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&_Ht(e,t,n,i),r.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=r.passes;if(!s.pick&&!s.pickVoxel&&!s.depth&&t._hdr&&l(e.derivedCommands)&&l(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),s.pick||s.depth){if(s.pick&&!s.depth){if(r.passes.snap){l(e.derivedCommands.snapping)?(e=e.derivedCommands.snapping.snapCommand,e.execute(o,n)):l(e.derivedCommands.depth)&&(e=e.derivedCommands.depth.depthOnlyCommand,e.execute(o,n));return}if(r.pickingMetadata&&l(e.derivedCommands.pickingMetadata)){e=e.derivedCommands.pickingMetadata.pickMetadataCommand,e.execute(o,n);return}if(!r.pickingMetadata&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(o,n);return}}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(o,n);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,n);return}r.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(o,n):e.execute(o,n)}function gke(e,t,n){let{derivedCommands:i}=e;if(!l(i))return;let r=t._frameState,o=t._context;r.useLogDepth&&l(i.logDepth)&&(e=i.logDepth.command);let{picking:s,pickingMetadata:a,depth:c}=e.derivedCommands;l(a)&&(e=i.pickingMetadata.pickMetadataCommand,e.execute(o,n)),l(s)?(e=s.pickCommand,e.execute(o,n)):l(c)&&(e=c.depthOnlyCommand,e.execute(o,n))}function bke(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var yHt=new h;function _ke(e,t){let n=h.subtract(e,t,yHt),i=Math.max(0,h.magnitude(n));return i*i}function AHt(e,t,n){let i=e.boundingVolume,r=t.boundingVolume;return _ke(r.center,n)-_ke(i.center,n)}function bHt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+D.EPSILON12}function xHt(e,t,n,i,r){F0(i,bke,e.camera.positionWC),l(r)&&t(r.unclassifiedCommand,e,n);for(let o=0;o<i.length;++o)t(i[o],e,n)}function THt(e,t,n,i,r){F0(i,bHt,e.camera.positionWC),l(r)&&t(r.unclassifiedCommand,e,n);for(let o=0;o<i.length;++o)t(i[o],e,n)}function EHt(e,t,n){e.context.uniformState.updatePass(Ie.VOXELS);let i=n.commands[Ie.VOXELS];i.length=n.indices[Ie.VOXELS],F0(i,bke,e.camera.positionWC);for(let r=0;r<i.length;++r)Tu(i[r],e,t)}function CHt(e,t,n){e.context.uniformState.updatePass(Ie.GAUSSIAN_SPLATS);let i=n.commands[Ie.GAUSSIAN_SPLATS];i.length=n.indices[Ie.GAUSSIAN_SPLATS],F0(i,AHt,e.camera.positionWC);for(let r=0;r<i.length;++r)Tu(i[r],e,t)}var vHt=new Ji,SHt=new yu,wHt=new gn,IHt=new As;function PHt(e){let{frustum:t}=e;return l(t.fov)?t.clone(vHt):l(t.infiniteProjectionMatrix)?t.clone(SHt):l(t.width)?t.clone(wHt):t.clone(IHt)}function DHt(e){if(e._environmentState.useOIT){if(!l(e._executeOITFunction)){let{view:t,context:n}=e;e._executeOITFunction=function(i,r,o,s,a){t.globeDepth.prepareColorTextures(n),t.oit.executeCommands(i,r,o,s,a)}}return e._executeOITFunction}return e.frameState.passes.render?xHt:THt}function RHt(e,t,n){let{frameState:i,context:r}=e,{pick:o,pickVoxel:s}=i.passes,a=o||s,c;!a&&e._environmentState.useInvertClassification&&i.invertClassificationColor.alpha<1&&(c=e._invertClassification);let u=DHt(e);r.uniformState.updatePass(Ie.TRANSLUCENT);let f=n.commands[Ie.TRANSLUCENT];f.length=n.indices[Ie.TRANSLUCENT],u(e,Tu,t,f,c)}function OHt(e,t,n){let{translucentTileClassification:i,globeDepth:r}=e._view;if(!(n.indices[Ie.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let s=n.commands[Ie.TRANSLUCENT];i.executeTranslucentCommands(e,Tu,t,s,r.depthStencilTexture),i.executeClassificationCommands(e,Tu,t,n)}function MHt(e,t,n){e.context.uniformState.updatePass(Ie.CESIUM_3D_TILE_EDGES);let i=t.framebuffer;e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture,e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&(t.framebuffer=e._view.edgeFramebuffer.framebuffer);let r=n.commands[Ie.CESIUM_3D_TILE_EDGES],o=n.indices[Ie.CESIUM_3D_TILE_EDGES];e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&e._view.edgeFramebuffer.getClearCommand(new z(0,0,0,0)).execute(e.context,t);for(let s=0;s<o;++s)Tu(r[s],e,t);t.framebuffer=i}function NHt(e,t,n){let{context:i}=e,{uniformState:r}=i;r.updatePass(Ie.CESIUM_3D_TILE_PLANAR_FILL_ID),r.planarFillIdTexture=i.defaultTexture;let o=e._view,s=o&&o.planarFillIdFramebuffer,a=n.commands[Ie.CESIUM_3D_TILE_PLANAR_FILL_ID],c=n.indices[Ie.CESIUM_3D_TILE_PLANAR_FILL_ID];if(c!==0&&e._enablePlanarFillId&&l(s)&&l(s.framebuffer)){let u=t.framebuffer;t.framebuffer=s.framebuffer,s.getClearCommand(new z(0,0,0,0)).execute(i,t);for(let d=0;d<c;++d)Tu(a[d],e,t);t.framebuffer=u}}function LHt(e,t,n){e.context.uniformState.updatePass(Ie.CESIUM_3D_TILE_EDGES_DIRECT);let i=n.commands[Ie.CESIUM_3D_TILE_EDGES_DIRECT],r=n.indices[Ie.CESIUM_3D_TILE_EDGES_DIRECT];for(let o=0;o<r;++o)Tu(i[o],e,t)}function Zce(e,t){let{camera:n,context:i,frameState:r}=e,{uniformState:o}=i;o.updateCamera(n),o.planarFillIdTexture=i.defaultTexture;let s=PHt(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=r.passes,c=a.pick||a.pickVoxel;c||FHt(e,t);let{clearGlobeDepth:u,renderTranslucentDepthForPick:f,useDepthPlane:d,useGlobeDepthFramebuffer:p,useInvertClassification:g,usePostProcessSelected:m}=e._environmentState,{globeDepth:y,globeTranslucencyFramebuffer:A,sceneFramebuffer:b,frustumCommandsList:x}=e._view,T=x.length,E=e._globeTranslucencyState,v=e._depthClearCommand,S=e._stencilClearCommand,I=e._classificationStencilClearCommand,R=e._depthPlane,O=n.position.z;function L(C,w){o.updatePass(w);let P=C.commands[w],M=C.indices[w];for(let F=0;F<M;++F)Tu(P[F],e,t);return M}function _(C,w){o.updatePass(w);let P=C.commands[w],M=C.indices[w];for(let F=0;F<M;++F)gke(P[F],e,t)}for(let C=0;C<T;++C){let w=T-C-1,P=x[w];e.mode===re.SCENE2D?(n.position.z=O-P.near+1,s.far=Math.max(1,P.far-P.near),s.near=1,o.update(r),o.updateFrustum(s)):(s.near=w!==0?P.near*e.opaqueFrustumNearOffset:P.near,s.far=P.far,o.updateFrustum(s)),v.execute(i,t),i.stencilBuffer&&S.execute(i,t),E.translucent?(o.updatePass(Ie.GLOBE),E.executeGlobeCommands(P,Tu,A,e,t)):L(P,Ie.GLOBE),p&&y.executeCopyDepth(i,t),f||(E.translucent?(o.updatePass(Ie.TERRAIN_CLASSIFICATION),E.executeGlobeClassificationCommands(P,Tu,A,e,t)):L(P,Ie.TERRAIN_CLASSIFICATION)),u&&(v.execute(i,t),d&&R.execute(i,t));let M;if(MHt(e,t,P),e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)){let V=e._view.edgeFramebuffer.colorTexture;l(V)?e.context.uniformState.edgeColorTexture=V:e.context.uniformState.edgeColorTexture=e.context.defaultTexture;let B=e._view.edgeFramebuffer.idTexture;l(B)?e.context.uniformState.edgeIdTexture=B:e.context.uniformState.edgeIdTexture=e.context.defaultTexture;let j=e._view.edgeFramebuffer.depthTexture;l(j)?e.context.uniformState.edgeDepthTexture=j:e.context.uniformState.edgeDepthTexture=e.context.defaultTexture}else e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture;if(NHt(e,t,P),e._enablePlanarFillId&&l(e._view)&&l(e._view.planarFillIdFramebuffer)){let V=e._view.planarFillIdFramebuffer.idTexture;o.planarFillIdTexture=l(V)?V:i.defaultTexture}else o.planarFillIdTexture=i.defaultTexture;if(!g||c||f)M=L(P,Ie.CESIUM_3D_TILE),M>0&&(p&&(y.prepareColorTextures(i,u),y.executeUpdateDepth(i,t,y.depthStencilTexture)),f||(M=L(P,Ie.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let V=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,L(P,Ie.CESIUM_3D_TILE),p&&(e._invertClassification.prepareTextures(i),y.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),M=L(P,Ie.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=V,e._invertClassification.executeClassified(i,t),r.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),M>0&&i.stencilBuffer&&I.execute(i,t),M=L(P,Ie.CESIUM_3D_TILE_CLASSIFICATION)}if(M>0&&i.stencilBuffer&&S.execute(i,t),EHt(e,t,P),L(P,Ie.OPAQUE),LHt(e,t,P),CHt(e,t,P),w!==0&&e.mode!==re.SCENE2D&&(s.near=P.near,o.updateFrustum(s)),RHt(e,t,P),OHt(e,t,P),i.depthTexture&&e.useDepthPicking&&(p||f)){let V=e._picking.getPickDepth(e,w);V.update(i,y.depthStencilTexture),V.executeCopyDepth(i,t)}if(c||!m)continue;let F=t.framebuffer;t.framebuffer=b.getIdFramebuffer(),s.near=w!==0?P.near*e.opaqueFrustumNearOffset:P.near,s.far=P.far,o.updateFrustum(s),E.translucent?(o.updatePass(Ie.GLOBE),E.executeGlobeCommands(P,gke,A,e,t)):_(P,Ie.GLOBE),u&&(v.framebuffer=t.framebuffer,v.execute(i,t),v.framebuffer=void 0),u&&d&&R.execute(i,t),_(P,Ie.CESIUM_3D_TILE),_(P,Ie.OPAQUE),_(P,Ie.TRANSLUCENT),t.framebuffer=F}}function FHt(e,t){let{context:n,environmentState:i,view:r}=e;if(n.uniformState.updatePass(Ie.ENVIRONMENT),l(i.skyBoxCommand)&&Tu(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&Tu(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let s;i.useGlobeDepthFramebuffer?s=r.globeDepth.framebuffer:i.usePostProcess?s=r.sceneFramebuffer.framebuffer:s=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,s),t.framebuffer=s}i.isMoonVisible&&i.moonCommand.execute(n,t);let o=e.frameState.panoramaCommandList;for(let s=o.length-1;s>=0;s--){let a=o[s];l(a.shaderProgram)?Tu(o[s],e,t):o.splice(s,1)}}function xke(e){e.context.uniformState.updatePass(Ie.COMPUTE);let t=e._environmentState.sunComputeCommand;l(t)&&t.execute(e._computeEngine);let n=e._computeCommandList;for(let i=0;i<n.length;++i)n[i].execute(e._computeEngine)}function BHt(e,t){e.context.uniformState.updatePass(Ie.OVERLAY);let n=e.context,i=e._overlayCommandList;for(let r=0;r<i.length;++r)i[r].execute(n,t)}function kHt(e,t,n){let{shadowMapCullingVolume:i,isPointLight:r,passes:o}=n,s=o.length,a=[Ie.GLOBE,Ie.CESIUM_3D_TILE,Ie.OPAQUE,Ie.TRANSLUCENT];for(let c=0;c<t.length;++c){let u=t[c];if(e.updateDerivedCommands(u),!(!u.castShadows||a.indexOf(u.pass)<0||!e.isVisible(i,u)))if(r)for(let f=0;f<s;++f)o[f].commandList.push(u);else if(s===1)o[0].commandList.push(u);else{let f=!1;for(let d=s-1;d>=0;--d){let p=o[d].cullingVolume;if(e.isVisible(p,u))o[d].commandList.push(u),f=!0;else if(f)break}}}}function Tke(e){let{shadowState:t,commandList:n}=e.frameState,{shadowsEnabled:i,shadowMaps:r}=t;if(!i)return;let{context:o}=e,{uniformState:s}=o;for(let a=0;a<r.length;++a){let c=r[a];if(c.outOfView)continue;let{passes:u}=c;for(let f=0;f<u.length;++f)u[f].commandList.length=0;kHt(e,n,c);for(let f=0;f<u.length;++f){let d=c.passes[f],{camera:p,commandList:g}=d;s.updateCamera(p),c.updatePass(o,f);for(let m=0;m<g.length;++m){let y=g[m];s.updatePass(y.pass);let A=y.derivedCommands.shadows.castCommands[a];Tu(A,e,d.passState)}}}}var UHt=new h;Ai.prototype.updateAndExecuteCommands=function(e,t){QHt(this,e,t),this._environmentState.useWebVR?zHt(this,e,t):this._frameState.mode!==re.SCENE2D||this._mapMode2D===Au.ROTATE?Gb(!0,this,e):KHt(this,e)};function zHt(e,t){let n=e._view,i=n.camera,o=e._environmentState.renderTranslucentDepthForPick;Cke(e),n.createPotentiallyVisibleSet(e),xke(e),o||Tke(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=Or.clone(i,e._cameraVR);a.frustum=i.frustum;let c=i.frustum.near,u=c*(e.focalLength??5),f=e.eyeSeparation??u/30,d=h.multiplyByScalar(a.right,f*.5,UHt);i.frustum.aspectRatio=s.width/s.height;let p=.5*f*c/u;h.add(a.position,d,i.position),i.frustum.xOffset=p,Zce(e,t),s.x=s.width,h.subtract(a.position,d,i.position),i.frustum.xOffset=-p,Zce(e,t),Or.clone(a,i)}var VHt=new he(Math.PI,D.PI_OVER_TWO),jHt=new h,HHt=new h,GHt=new N,WHt=new N,qHt=new h,YHt=new h,XHt=new et;function KHt(e,t){let{frameState:n,camera:i}=e,{uniformState:r}=e.context,o=t.viewport,s=et.clone(o,XHt);t.viewport=s;let a=VHt,c=jHt;e.mapProjection.project(a,c);let f=h.clone(i.position,HHt),d=N.clone(i.transform,WHt),p=i.frustum.clone();i._setTransform(N.IDENTITY);let g=N.computeViewportTransformation(s,0,1,GHt),m=i.frustum.projectionMatrix,y=i.positionWC.y,A=h.fromElements(D.sign(y)*c.x-y,0,-i.positionWC.x,qHt),b=At.pointToGLWindowCoordinates(m,g,A,YHt);b.x=Math.floor(b.x);let x=s.x,T=s.width;if(y===0||b.x<=x||b.x>=x+T)Gb(!0,e,t);else if(Math.abs(x+T*.5-b.x)<1)s.width=b.x-s.x,i.position.x*=D.sign(i.position.x),i.frustum.right=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!0,e,t),s.x=b.x,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!1,e,t);else if(b.x>x+T*.5){s.width=b.x-x;let E=i.frustum.right;i.frustum.right=c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!0,e,t),s.x=b.x,s.width=x+T-b.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=E-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!1,e,t)}else{s.x=b.x,s.width=x+T-b.x;let E=i.frustum.left;i.frustum.left=-c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!0,e,t),s.x=x,s.width=b.x-x,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=E-i.frustum.left*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),r.update(n),Gb(!1,e,t)}i._setTransform(d),h.clone(f,i.position),i.frustum=p.clone(),t.viewport=o}function Gb(e,t,n){let i=t._view,{renderTranslucentDepthForPick:r}=t._environmentState;e||(t.frameState.commandList.length=0),Cke(t),i.createPotentiallyVisibleSet(t),e&&(xke(t),r||Tke(t)),Zce(t,n)}var yke=new ta;function Eke(e,t,n){if(!e.show)return;let i=e.length;for(let r=0;r<i;++r){let o=e.get(r);if(o instanceof xl){Eke(o,t,n);continue}o.show&&u_.isSupported(o)&&_s(o.heightReference)&&t.markForFrame(o,n,o.heightReference)}}function $Ht(e,t){let n=e.vectorProvider;if(!l(n))return;let i=t.frameNumber;Eke(e._primitives,n,i)}Ai.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,r=e.passes.offscreen,o=this.atmosphere,s=this.skyAtmosphere,a=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==re.SCENE2D&&t.camera.frustum instanceof gn||!c.environmentVisible)n.skyAtmosphereCommand=void 0,n.skyBoxCommand=void 0,n.sunDrawCommand=void 0,n.sunComputeCommand=void 0,n.moonCommand=void 0;else{if(l(s)){if(l(a))s.setDynamicLighting(Bg.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let b=o.dynamicLighting;s.setDynamicLighting(b),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let A=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(A)?A.drawCommand:void 0,n.sunComputeCommand=l(A)?A.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let u=n.clearGlobeDepth=l(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===re.SCENE2D);(n.useDepthPlane=u&&this.mode===re.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==re.SCENE2D&&!r;let d=e.mode===re.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,g=yke.planes;for(let A=0;A<5;++A)g[A]=p.planes[A];p=yke,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,d),n.isMoonVisible=this.isVisible(p,n.moonCommand,d);let m=this.specularEnvironmentMaps,y=this._specularEnvironmentCubeMap;l(m)&&y?.url!==m?(l(y)&&y.destroy(),this._specularEnvironmentCubeMap=new nm(m)):!l(m)&&l(y)&&(y.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e),$Ht(this,e)};function JHt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new z0({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),l(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}function ZHt(e){let t=e._frameState,{passes:n,shadowState:i,shadowMaps:r}=t,o=r.length,s=o>0&&!n.pick&&!n.pickVoxel&&e.mode===re.SCENE3D;if(s!==i.shadowsEnabled&&(++i.lastDirtyTime,i.shadowsEnabled=s),i.lightShadowsEnabled=!1,!!s){for(let a=0;a<o;++a)if(r[a]!==i.shadowMaps[a]){++i.lastDirtyTime;break}i.shadowMaps.length=0,i.lightShadowMaps.length=0;for(let a=0;a<o;++a){let c=r[a];c.update(t),i.shadowMaps.push(c),c.fromLightSource&&(i.lightShadowMaps.push(c),i.lightShadowsEnabled=!0),c.dirty&&(++i.lastDirtyTime,c.dirty=!1)}}}function Cke(e){let t=e._frameState;t.edgeVisibilityRequested=!1,t.planarFillRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&e._enableEdgeVisibility===!1&&(e._enableEdgeVisibility=!0),e._enablePlanarFillId=t.planarFillRequested,JHt(e),ZHt(e),e._globe&&e._globe.render(t)}function QHt(e,t,n){let i=e._context,r=e._frameState,o=e._environmentState,s=e._view,a=r.passes,c=a.pick||a.pickVoxel;l(s.globeDepth)&&(s.globeDepth.picking=c,s.globeDepth.snapping=a.snap);let u=o.useWebVR;o.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new X4:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let f=e._clearColorCommand;z.clone(n,f.color),f.execute(i,t);let d=o.useGlobeDepthFramebuffer=l(s.globeDepth);d&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,o.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,g=o.useOIT=!c&&l(p)&&p.isSupported();g&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),o.useOIT=p.isSupported());let m=e.postProcessStages,y=o.usePostProcess=!c&&(e._hdr||m.length>0||m.ambientOcclusion.enabled||m.fxaa.enabled||m.bloom.enabled);o.usePostProcessSelected=!1,y&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),m.update(i,r.useLogDepth,e._hdr),m.clear(i),y=o.usePostProcess=m.ready,o.usePostProcessSelected=y&&m.hasSelected),o.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):d?t.framebuffer=s.globeDepth.framebuffer:y&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&f.execute(i,t);let A=o.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification;if(!c&&e._enableEdgeVisibility&&s.edgeFramebuffer.update(i,s.viewport,e._hdr),!c&&e._enablePlanarFillId?s.planarFillIdFramebuffer.update(i,s.viewport,e._hdr):c||s.planarFillIdFramebuffer.releaseResources(),A){let T;if(r.invertClassificationColor.alpha===1&&d&&(T=s.globeDepth.framebuffer),l(T)||i.depthTexture){if(e._invertClassification.previousFramebuffer=T,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),r.invertClassificationColor.alpha<1&&g){let E=e._invertClassification.unclassifiedCommand,v=E.derivedCommands;v.oit=p.createDerivedCommands(E,i,v.oit)}}else o.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}Ai.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:r,translucentTileClassification:o}=i;l(r)&&r.prepareColorTextures(t);let{useOIT:s,useGlobeDepthFramebuffer:a,usePostProcess:c,originalFramebuffer:u}=n,f=a?r.colorFramebufferManager:void 0,d=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=c?d.framebuffer:u,i.oit.execute(t,e)),o.hasTranslucentDepth&&o.isSupported()&&o.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let g=d;a&&!s&&(g=f);let m=this.postProcessStages,y=g.getColorTexture(0),A=p.getColorTexture(0),b=(f??d).getDepthStencilTexture();m.execute(t,y,b,A),m.copy(t,u)}!s&&!c&&a&&(e.framebuffer=u,r.executeCopyColor(t,e))};function eGt(e){let t=e._frameState.afterRender,n=t.slice();t.length=0;for(let i=0;i<n.length;++i)n[i]()&&e.requestRender()}function tGt(e){if(e.mode===re.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function vke(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof xl){let r=e.length;for(let o=0;o<r;++o){let s=e.get(o),a=vke(s,t,n);l(a)&&a>i&&(i=a)}}else if(e.isCesium3DTileset&&e.show&&e.enableCollision){let r=e.getHeight(t,n);if(l(r)&&r>i)return r}return i}Ai.prototype.getHeight=function(e,t){if(!l(e))return;let n=this._frameState.frameNumber;this._heightQueryFrame!==n&&(this._heightQueryFrame=n,this._heightQueryCache.clear());let i=`${t}:${e.longitude.toFixed(8)}:${e.latitude.toFixed(8)}`,r=this._heightQueryCache.get(i);if(r!==void 0)return r===null?void 0:r;let o=nGt(this,e,t);return this._heightQueryCache.set(i,o===void 0?null:o),o};function nGt(e,t,n){let i=n===We.CLAMP_TO_TERRAIN||n===We.RELATIVE_TO_TERRAIN,r=n===We.CLAMP_TO_3D_TILE||n===We.RELATIVE_TO_3D_TILE;if(!l(t))return;let o=Number.NEGATIVE_INFINITY;if(!i){let a=vke(e.primitives,t,e);l(a)&&a>o&&(o=a)}let s=e._globe;if(!r&&l(s)&&s.show){let a=s.getHeight(t);a>o&&(o=a)}if(o>Number.NEGATIVE_INFINITY)return o}var Jce=new he;Ai.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,r=g=>{he.clone(e,Jce);let m;l(g)&&(m=g.height),l(m)||(m=this.getHeight(e,n)),l(m)&&(Jce.height=m,t(Jce))},o=n===We.CLAMP_TO_TERRAIN||n===We.RELATIVE_TO_TERRAIN,s=n===We.CLAMP_TO_3D_TILE||n===We.RELATIVE_TO_3D_TILE,a;!s&&l(this.globe)&&(a=this.globe._surface.updateHeight(e,r));let c={},u=g=>{if(o||g.isDestroyed()||!g.isCesium3DTileset)return;let m=g.updateHeight(e,r,i);c[g.id]=m};if(!o){let g=this.primitives.length;for(let m=0;m<g;++m){let y=this.primitives.get(m);u(y)}}let f=this.primitives.primitiveAdded.addEventListener(u),d=this.primitives.primitiveRemoved.addEventListener(g=>{g.isDestroyed()||!g.isCesium3DTileset||(l(c[g.id])&&c[g.id](),delete c[g.id])});return()=>{a=a&&a(),Object.values(c).forEach(g=>g()),c={},f(),d()}};function iGt(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,r=t.positionCartographic;if(!l(r))return!1;if(!i.onMap()&&r.height<0)return!0;if(n===re.SCENE2D||n===re.MORPHING)return!1;let o=e._globeHeight;return l(o)&&r.height<o}Ai.prototype.initializeFrame=function(){if(this._shaderFrameCount++===120&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeightDirty){l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),this._globeHeight=tGt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=iGt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function rGt(e,t){if(e.debugShowFramesPerSecond){if(!l(e._performanceDisplay)){let n=document.createElement("div");n.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(n);let r=new my({container:n});e._performanceDisplay=r,e._performanceContainer=n}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else l(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}function oGt(e){e._jobScheduler.resetBudgets();let t=e._frameState;e.primitives.prePassesUpdate(t),l(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function sGt(e){e.primitives.postPassesUpdate(e._frameState),Kc.update()}var aGt=new z;function cGt(e){let t=e._frameState,n=e.context,{uniformState:i}=n,r=e._defaultView;e._view=r,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=mHt;let o=e.backgroundColor??z.BLACK;e._hdr&&(o=z.clone(o,aGt),o.red=Math.pow(o.red,e.gamma),o.green=Math.pow(o.green,e.gamma),o.blue=Math.pow(o.blue,e.gamma)),t.backgroundColor=o,t.atmosphere=e.atmosphere,e.fog.update(t),i.update(t);let s=e.shadowMap;l(s)&&s.enabled&&(!l(e.light)||e.light instanceof Q_?h.negate(i.sunDirectionWC,e._shadowMapCamera.direction):h.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=r.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=r.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=et.clone(a,c.viewport),n.beginFrame(),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,o),e.resolveFramebuffers(c),c.framebuffer=void 0,BHt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function qC(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function lGt(e){return e._picking.updateMostDetailedRayPicks(e)}Ai.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=K.now()),this._controllerHost.update(this,e);let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===re.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let r=Math.abs(K.secondsDifference(this._lastRenderTime,e));i=i||r>this.maximumRenderTimeChange}if(i){this._lastRenderTime=K.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let r=D.incrementWrap(t.frameNumber,kA.maximumFrameNumber,1);Ake(this,r,e),t.newFrame=!0}qC(this,oGt),this.primitives.show&&(qC(this,lGt),qC(this,uGt),qC(this,fGt),i||qC(this,dGt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),qC(this,cGt)),rGt(this,i),qC(this,sGt),eGt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Ai.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Ai.prototype.requestRender=function(){this._renderRequested=!0};Ai.prototype.clampLineWidth=function(e){return Math.max(Ut.minimumAliasedLineWidth,Math.min(e,Ut.maximumAliasedLineWidth))};Ai.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n,1)[0]};Ai.prototype.snap=function(e,t){return W4.snap(this,e,t)};Ai.prototype.pickAsync=async function(e,t,n){return(await this._picking.pickAsync(this,e,t,n,1))[0]};Ai.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let r=i.primitive;if(!(r instanceof Hb))return;let o=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*o[0]+o[1],a=r._traversal.findKeyframeNode(s);if(!l(a))return;let c=255*o[2]+o[3];return K4.fromKeyframeNode(r,s,c,a)};Ai.prototype.pickMetadata=function(e,t,n,i){let r=this.pick(e);if(!l(r))return;let o=r.detail?.model?.structuralMetadata;if(!l(o))return;let s=o.schema,a=mV(s,t,n,i);if(!l(a))return;let c=pV(o,n,i);if(!l(c))return;let u=new t4(t,n,i,a,c);return this._picking.pickMetadata(this,e,u)};Ai.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};Ai.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Ai.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Ai.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function uGt(e){let t=e._frameState;Xce.camera=t.camera,Xce.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Xce)}function fGt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;Kce.camera=e.preloadFlightCamera,Kce.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Kce)}function dGt(e){e.primitives.updateForPass(e._frameState,pHt)}Ai.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Ai.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Ai.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Ai.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Ai.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Ai.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Ai.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Ai.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Ai.prototype.cartesianToCanvasCoordinates=function(e,t){return dr.worldToWindowCoordinates(this,e,t)};Ai.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ai.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};Ai.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};Ai.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function hGt(e,t){if(e._removeTerrainProviderReadyListener=e._removeTerrainProviderReadyListener&&e._removeTerrainProviderReadyListener(),t.ready){l(e.globe)&&(e.globe.terrainProvider=t.provider);return}e.globe.terrainProvider=void 0,e._removeTerrainProviderReadyListener=t.readyEvent.addEventListener(n=>{l(e)&&l(e.globe)&&(e.globe.terrainProvider=n),e._removeTerrainProviderReadyListener()})}Ai.prototype.setTerrain=function(e){return hGt(this,e),e};Ai.prototype.isDestroyed=function(){return!1};Ai.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this._removeTerrainProviderReadyListener=this._removeTerrainProviderReadyListener&&this._removeTerrainProviderReadyListener(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),l(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(let e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),le(this)};var e8=Ai;var qP=`float interpolateByDistance(vec4 nearFarScalar, float distance)
{
float startDistance = nearFarScalar.x;
float startValue = nearFarScalar.y;
float endDistance = nearFarScalar.z;
float endValue = nearFarScalar.w;
float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
return mix(startValue, endValue, t);
}
void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
{
float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;
float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
float distanceAdjustMax = czm_ellipsoidRadii.x;
float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);
float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
underTranslucentGlobe = 0.0;
#if defined(GLOBE_TRANSLUCENT)
czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {
vec3 direction = normalize(positionWC);
czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);
float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));
opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
vec3 horizonColor = vec3(0.1, 0.2, 0.3);
vec3 nearColor = vec3(0.0);
rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);
underTranslucentGlobe = 1.0;
return;
}
#endif
computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);
float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
opacity *= pow(nightAlpha, 0.5);
}
`;var t8=`in vec3 v_outerPositionWC;
uniform vec3 u_hsbShift;
#ifndef PER_FRAGMENT_ATMOSPHERE
in vec3 v_mieColor;
in vec3 v_rayleighColor;
in float v_opacity;
in float v_translucent;
#endif
void main (void)
{
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);
vec3 mieColor;
vec3 rayleighColor;
float opacity;
float translucent;
#ifdef PER_FRAGMENT_ATMOSPHERE
computeAtmosphereScattering(
v_outerPositionWC,
lightDirection,
rayleighColor,
mieColor,
opacity,
translucent
);
#else
mieColor = v_mieColor;
rayleighColor = v_rayleighColor;
opacity = v_opacity;
translucent = v_translucent;
#endif
vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);
#ifndef HDR
color.rgb = czm_pbrNeutralTonemapping(color.rgb);
color.rgb = czm_inverseGamma(color.rgb);
#endif
#ifdef COLOR_CORRECT
const bool ignoreBlackPixels = true;
color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
#endif
if (translucent == 0.0) {
color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
}
out_FragColor = color;
}
`;var n8=`in vec4 position;
out vec3 v_outerPositionWC;
#ifndef PER_FRAGMENT_ATMOSPHERE
out vec3 v_mieColor;
out vec3 v_rayleighColor;
out float v_opacity;
out float v_translucent;
#endif
void main(void)
{
vec4 positionWC = czm_model * position;
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);
#ifndef PER_FRAGMENT_ATMOSPHERE
computeAtmosphereScattering(
positionWC.xyz,
lightDirection,
v_rayleighColor,
v_mieColor,
v_opacity,
v_translucent
);
#endif
v_outerPositionWC = positionWC.xyz;
vec4 positionEC = czm_modelView * position;
gl_Position = czm_projection * positionEC;
}
`;function YP(e){e=e??ee.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=h.multiplyByScalar(e.radii,t,new h);this._scaleMatrix=N.fromScale(n),this._modelMatrix=new N,this._command=new at({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new h(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new h(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new h;let i=new h;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let r=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return r._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return r._hueSaturationBrightness.x=r.hueShift,r._hueSaturationBrightness.y=r.saturationShift,r._hueSaturationBrightness.z=r.brightnessShift,r._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return r.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return r.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return r.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return r.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return r.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return r.atmosphereMieAnisotropy}}}Object.defineProperties(YP.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});YP.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var Qce=new N;YP.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==re.SCENE3D&&n!==re.MORPHING||!e.passes.render)return;let i=N.fromRotationTranslation(e.context.uniformState.inverseViewRotation,h.ZERO,Qce),r=N.multiplyTransformation(i,Hi.Y_UP_TO_Z_UP,Qce),o=N.multiply(this._scaleMatrix,r,Qce);N.clone(o,this._modelMatrix);let s=e.context,a=mGt(this),c=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||c||!l(t)||!t.show,f=this._command;if(!l(f.vertexArray)){let p=Xa.createGeometry(new Xa({radii:new h(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Be.POSITION_ONLY}));f.vertexArray=zn.fromGeometry({context:s,geometry:p,attributeLocations:Gn.createAttributeLocations(p),bufferUsage:Me.STATIC_DRAW}),f.renderState=Ge.fromCache({cull:{enabled:!0,face:Vi.FRONT},blending:tn.ALPHA_BLEND,depthMask:!1})}let d=a|u<<2|c<<3;if(d!==this._flags){this._flags=d;let p=[];a&&p.push("COLOR_CORRECT"),u&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let g=new Ye({defines:p,sources:[lm,qP,n8]}),m=new Ye({defines:p,sources:[lm,qP,t8]});this._spSkyAtmosphere=en.fromCache({context:s,vertexShaderSource:g,fragmentShaderSource:m}),f.shaderProgram=this._spSkyAtmosphere}return f};function mGt(e){return!(D.equalsEpsilon(e.hueShift,0,D.EPSILON7)&&D.equalsEpsilon(e.saturationShift,0,D.EPSILON7)&&D.equalsEpsilon(e.brightnessShift,0,D.EPSILON7))}YP.prototype.isDestroyed=function(){return!1};YP.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),le(this)};var i8=YP;function YC(e){this._sources=e.sources,this._show=e.show??!0,this._panorama=new bC({sources:this._sources,show:this._show,returnCommand:!0})}Object.defineProperties(YC.prototype,{sources:{get:function(){return this._panorama.sources},set:function(e){this._panorama.sources=e}},show:{get:function(){return this._panorama.show},set:function(e){this._panorama.show=e}}});YC.prototype.update=function(e,t){let{mode:n,passes:i}=e;if(!(n!==re.SCENE3D&&n!==re.MORPHING)&&i.render)return this._panorama.update(e,t)};YC.prototype.isDestroyed=function(){return!1};YC.prototype.destroy=function(){return this._panorama=this._panorama&&this._panorama.destroy(),le(this)};function XP(e){return Zt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}YC.createEarthSkyBox=function(){return new YC({sources:{positiveX:XP("px"),negativeX:XP("mx"),positiveY:XP("py"),negativeY:XP("my"),positiveZ:XP("pz"),negativeZ:XP("mz")}})};var r8=YC;function ele(e){e=e??1,this._radius=e??1}Object.defineProperties(ele.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});ele.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,D.PI),i=D.randomBetween(0,this._radius),r=i*Math.cos(t)*Math.sin(n),o=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=h.fromElements(r,o,s,e.position),e.velocity=h.normalize(e.position,e.velocity)};var tle=ele;function o8(){}o8.prototype.evaluate=function(e,t){pe.throwInstantiationError()};o8.prototype.evaluateColor=function(e,t){pe.throwInstantiationError()};o8.prototype.getShaderFunction=function(e,t,n,i){pe.throwInstantiationError()};o8.prototype.getVariables=function(){pe.throwInstantiationError()};var nle=o8;var s8=`uniform sampler2D u_texture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(u_texture, v_textureCoordinates);
out_FragColor = czm_gammaCorrect(color);
}
`;var a8=`uniform float u_radiusTS;
in vec2 v_textureCoordinates;
vec2 rotate(vec2 p, vec2 direction)
{
return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
}
vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
{
vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
float radius = length(rotatedPosition) * lengthScalar;
float burst = 1.0 - smoothstep(0.0, 0.55, radius);
return vec4(burst);
}
void main()
{
float lengthScalar = 2.0 / sqrt(2.0);
vec2 position = v_textureCoordinates - vec2(0.5);
float radius = length(position) * lengthScalar;
float surface = step(radius, u_radiusTS);
vec4 color = vec4(vec2(1.0), surface + 0.2, surface);
float glow = 1.0 - smoothstep(0.0, 0.55, radius);
color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;
vec4 burst = vec4(0.0);
burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar);
burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar);
burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);
burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar);
burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar);
burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);
color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
}
`;var c8=`in vec2 direction;
uniform float u_size;
out vec2 v_textureCoordinates;
void main()
{
vec4 position;
if (czm_morphTime == 1.0)
{
position = vec4(czm_sunPositionWC, 1.0);
}
else
{
position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
}
vec4 positionEC = czm_view * position;
vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
vec2 halfSize = vec2(u_size * 0.5);
halfSize *= ((direction * 2.0) - 1.0);
gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
v_textureCoordinates = direction;
}
`;function u8(){this.show=!0,this._drawCommand=new at({primitiveType:Oe.TRIANGLES,boundingVolume:new ue,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new ue,this._boundingVolume2D=new ue,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(u8.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var pGt=new U,gGt=new U,_Gt=new se,l8=new se;u8.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===re.SCENE2D||i===re.MORPHING||!e.passes.render)return;let r=e.context,o=t.viewport.width,s=t.viewport.height;if(!l(this._texture)||o!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=o,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let E=Math.max(o,s);E=Math.pow(2,Math.ceil(Math.log(E)/Math.log(2))-2),E=Math.max(1,E);let v=n?r.halfFloatingPointTexture?ze.HALF_FLOAT:ze.FLOAT:ze.UNSIGNED_BYTE;this._texture=new Dt({context:r,width:E,height:E,pixelFormat:Ke.RGBA,pixelDatatype:v}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let S=this,I={u_radiusTS:function(){return S._radiusTS}};this._commands.computeCommand=new Nf({fragmentShaderSource:a8,outputTexture:this._texture,uniformMap:I,persists:!1,owner:this,postExecute:function(){S._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!l(a.vertexArray)){let E={direction:0},v=new Uint8Array(8);v[0]=0,v[1]=0,v[2]=255,v[3]=0,v[4]=255,v[5]=255,v[6]=0,v[7]=255;let S=nt.createVertexBuffer({context:r,typedArray:v,usage:Me.STATIC_DRAW}),I=[{index:E.direction,vertexBuffer:S,componentsPerAttribute:2,normalize:!0,componentDatatype:Y.UNSIGNED_BYTE}],R=nt.createIndexBuffer({context:r,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Me.STATIC_DRAW,indexDatatype:je.UNSIGNED_SHORT});a.vertexArray=new zn({context:r,attributes:I,indexBuffer:R}),a.shaderProgram=en.fromCache({context:r,vertexShaderSource:c8,fragmentShaderSource:s8,attributeLocations:E}),a.renderState=Ge.fromCache({blending:tn.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=r.uniformState.sunPositionWC,u=r.uniformState.sunPositionColumbusView,f=this._boundingVolume,d=this._boundingVolume2D;h.clone(c,f.center),d.center.x=u.z,d.center.y=u.x,d.center.z=u.y,f.radius=D.SOLAR_RADIUS+D.SOLAR_RADIUS*this._glowLengthTS,d.radius=f.radius,i===re.SCENE3D?ue.clone(f,a.boundingVolume):i===re.COLUMBUS_VIEW&&ue.clone(d,a.boundingVolume);let p=dr.computeActualEllipsoidPosition(e,c,l8),g=h.magnitude(h.subtract(p,e.camera.position,l8)),m=r.uniformState.projection,y=_Gt;y.x=0,y.y=0,y.z=-g,y.w=1;let A=N.multiplyByVector(m,y,l8),b=dr.clipToGLWindowCoordinates(t.viewport,A,pGt);y.x=D.SOLAR_RADIUS;let x=N.multiplyByVector(m,y,l8),T=dr.clipToGLWindowCoordinates(t.viewport,x,gGt);return this._size=U.magnitude(U.subtract(T,b,l8)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};u8.prototype.isDestroyed=function(){return!1};u8.prototype.destroy=function(){let e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),le(this)};var f8=u8;function KP(e){this._ready=!1,this._provider=void 0,this._errorEvent=new be,this._readyEvent=new be,AGt(this,e)}Object.defineProperties(KP.prototype,{errorEvent:{get:function(){return this._errorEvent}},readyEvent:{get:function(){return this._readyEvent}},ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}}});KP.fromWorldTerrain=function(e){return new KP(nC(e))};KP.fromWorldBathymetry=function(e){return new KP(NU(e))};function yGt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function AGt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){yGt(e._errorEvent,i)}}var d8=KP;function $P(){}$P.prototype.boundingVolume=void 0;$P.prototype.boundingSphere=void 0;$P.prototype.distanceToCamera=function(e){pe.throwInstantiationError()};$P.prototype.intersectPlane=function(e){pe.throwInstantiationError()};$P.prototype.createDebugVolume=function(e){pe.throwInstantiationError()};var ile=$P;function h8(e){e=e??H.EMPTY_OBJECT,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new er({ellipsoid:e.ellipsoid}),this._color=e.color??z.YELLOW,this._errorEvent=new be,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0}Object.defineProperties(h8.prototype,{proxy:{get:function(){}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){}},minimumLevel:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},hasAlphaChannel:{get:function(){return!0}}});h8.prototype.getTileCredits=function(e,t,n){};h8.prototype.requestImage=function(e,t,n,i){let r=document.createElement("canvas");r.width=256,r.height=256;let o=r.getContext("2d"),s=this._color.toCssColorString();return o.strokeStyle=s,o.lineWidth=2,o.strokeRect(1,1,255,255),o.font="bold 25px Arial",o.textAlign="center",o.fillStyle=s,o.fillText(`L: ${n}`,124,86),o.fillText(`X: ${e}`,124,136),o.fillText(`Y: ${t}`,124,186),Promise.resolve(r)};h8.prototype.pickFeatures=function(e,t,n,i,r){};var m8=h8;function rle(e){pe.throwInstantiationError()}rle.prototype.isReady=pe.throwInstantiationError;rle.prototype.shouldDiscardImage=pe.throwInstantiationError;var ole=rle;var Ske={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3};Object.freeze(Ske);var sle=Ske;function KC(e){e=e??H.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=N.clone(e.modelMatrix??N.IDENTITY),this.shadows=e.shadows??Dn.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new Yp(e.shading),this.style=e.style,this.frameFailed=new be,this.frameChanged=new be,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new Vg,this._loadTimestamp=void 0,this._clippingPlanesState=0,this._styleDirty=!1,this._pickId=void 0,this._totalMemoryUsageInBytes=0,this._frames=[],this._previousInterval=void 0,this._nextInterval=void 0,this._lastRenderedFrame=void 0,this._clockMultiplier=0,this._runningSum=0,this._runningLength=0,this._runningIndex=0,this._runningSamples=new Array(5).fill(0),this._runningAverage=0}Object.defineProperties(KC.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){bs.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function bGt(e){return`uniform vec4 czm_pickColor;
${e}`}function xGt(e){return function(t){return Ot(t,{czm_pickColor:function(){return e._pickId.color}})}}function TGt(){return"czm_pickColor"}KC.prototype.makeStyleDirty=function(){this._styleDirty=!0};KC.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var EGt=new K;function cle(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function XC(e,t){return e._intervals.indexOf(t.start)}function CGt(e,t){let n=e._intervals,i=e._clock,r=cle(e);if(r===0)return;let o=e._getAverageLoadTime(),s=K.addSeconds(i.currentTime,o*r,EGt),a=n.indexOf(s),c=XC(e,t);return a===c&&(r>=0?++a:--a),n.get(a)}function vGt(e){let t=e._intervals,i=e._clock.currentTime,r=t.indexOf(i);return t.get(r)}function SGt(e,t,n){let i=cle(e),r=XC(e,t),o=XC(e,n);return i>=0?r>=o:r<=o}function Ike(e,t){return function(n){let i=l(n.message)?n.message:n.toString();e.frameFailed.numberOfListeners>0?e.frameFailed.raiseEvent({uri:t,message:i}):(console.log(`A frame failed to load: ${t}`),console.log(`Error: ${i}`))}}function wGt(e,t,n){let i=XC(e,t),r=e._frames,o=r[i];if(!l(o)){let s=t.data.transform,a=l(s)?N.fromArray(s):void 0,c=t.data.uri;o={pointCloud:void 0,transform:a,timestamp:xn(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},r[i]=o,De.fetchArrayBuffer({url:c}).then(function(u){o.pointCloud=new h4({arrayBuffer:u,cull:!0,fragmentShaderLoaded:bGt,uniformMapLoaded:xGt(e),pickIdLoaded:TGt})}).catch(Ike(e,c))}return o}function IGt(e,t){e._runningSum+=t,e._runningSum-=e._runningSamples[e._runningIndex],e._runningSamples[e._runningIndex]=t,e._runningLength=Math.min(e._runningLength+1,e._runningSamples.length),e._runningIndex=(e._runningIndex+1)%e._runningSamples.length,e._runningAverage=e._runningSum/e._runningLength}function PGt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let r=t.pointCloud;if(l(r)&&!t.ready){let o=i.commandList,s=o.length;if(Pke(e,t,n,i),r.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=r.geometryByteLength,o.length=s,t.sequential)){let a=(xn()-t.timestamp)/1e3;IGt(e,a)}}t.touchedFrameNumber=i.frameNumber}var DGt=new N;function RGt(e,t){let n=e.shading;return l(n)&&l(n.baseResolution)?n.baseResolution:l(t.boundingSphere)?D.cbrt(t.boundingSphere.volume()/t.pointsLength):0}function OGt(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var MGt=new Yp;function Pke(e,t,n,i){let r=e.shading??MGt,o=t.pointCloud,s=t.transform??N.IDENTITY;o.modelMatrix=N.multiplyTransformation(e.modelMatrix,s,DGt),o.style=e.style,o.time=n.timeSinceLoad,o.shadows=e.shadows,o.clippingPlanes=e._clippingPlanes,o.isClipped=n.isClipped,o.attenuation=r.attenuation,o.backFaceCulling=r.backFaceCulling,o.normalShading=r.normalShading,o.geometricError=RGt(e,o),o.geometricErrorScale=r.geometricErrorScale,o.maximumAttenuation=OGt(e);try{o.update(i)}catch(a){Ike(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function ale(e,t,n,i){let r=wGt(e,t,i);PGt(e,r,n,i)}function NGt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function Dke(e,t){let n=e._frames,i=n.length;for(let r=0;r<i;++r){let o=n[r];if(l(o)&&(!l(t)||t(o))){let s=o.pointCloud;o.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),l(s)&&s.destroy(),o===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[r]=void 0}}}function LGt(e,t){let n=XC(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function wke(e,t,n,i,r){return l(n)?n.ready?!0:(ale(e,t,i,r),n.ready):!1}function FGt(e,t,n,i,r){let o,s,a,c=e._intervals,u=e._frames,f=XC(e,n),d=XC(e,t);if(f>=d){for(o=f;o>=d;--o)if(s=c.get(o),a=u[o],wke(e,s,a,i,r))return s}else for(o=f;o<=d;++o)if(s=c.get(o),a=u[o],wke(e,s,a,i,r))return s;return t}function BGt(e,t,n){let i=e._frames,r=i.length;for(let o=0;o<r;++o){let s=i[o];l(s)&&l(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var JP={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};KC.prototype.update=function(e){if(e.mode===re.MORPHING||!this.show)return;l(this._pickId)||(this._pickId=e.context.createPickId({primitive:this})),l(this._loadTimestamp)||(this._loadTimestamp=K.clone(e.time));let t=Math.max(K.secondsDifference(e.time,this._loadTimestamp)*1e3,0),n=this._clippingPlanes,i=0,r=!1,o=l(n)&&n.enabled;o&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,r=!0);let s=this._styleDirty;this._styleDirty=!1,(r||s)&&BGt(this,r,s),JP.timeSinceLoad=t,JP.isClipped=o;let a=this.shading,c=this._pointCloudEyeDomeLighting,u=e.commandList,f=u.length,d=this._previousInterval,p=this._nextInterval,g=vGt(this);if(!l(g))return;let m=!1,y=cle(this),A=y===0;y!==this._clockMultiplier&&(m=!0,this._clockMultiplier=y),(!l(d)||A)&&(d=g),(!l(p)||m||SGt(this,g,p))&&(p=CGt(this,g)),d=FGt(this,d,g,JP,e);let b=LGt(this,d);l(b)||(ale(this,d,JP,e),b=this._lastRenderedFrame),l(b)&&Pke(this,b,JP,e),l(p)&&ale(this,p,JP,e);let x=this;l(b)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(b)&&b!==this._lastRenderedFrame&&x.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return x.frameChanged.raiseEvent(x),!0}),this._previousInterval=d,this._nextInterval=p,this._lastRenderedFrame=b;let T=this._totalMemoryUsageInBytes,E=this.maximumMemoryUsage*1024*1024;T>E&&Dke(this,NGt(e));let S=u.length-f;l(a)&&a.attenuation&&a.eyeDomeLighting&&S>0&&c.update(e,f,a,this.boundingSphere)};KC.prototype.isDestroyed=function(){return!1};KC.prototype.destroy=function(){return Dke(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),le(this)};var ZP=KC;var p8=`in vec2 v_textureCoordinates;
void main()
{
czm_materialInput materialInput;
materialInput.s = v_textureCoordinates.s;
materialInput.st = v_textureCoordinates;
materialInput.str = vec3(v_textureCoordinates, 0.0);
materialInput.normalEC = vec3(0.0, 0.0, -1.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
}
`;function eq(e,t){this.show=!0,l(e)||(e=new et),this.rectangle=et.clone(e),l(t)||(t=Qi.fromType(Qi.ColorType,{color:new z(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}eq.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!et.equals(t.viewport,this.rectangle))&&(this._rs=Ge.fromCache({blending:tn.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){let i=e.context;if(this._material!==this.material||!l(this._overlayCommand)){this._material=this.material,l(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();let r=new Ye({sources:[this._material.shaderSource,p8]});this._overlayCommand=i.createViewportQuadCommand(r,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Ie.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};eq.prototype.isDestroyed=function(){return!1};eq.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),le(this)};var lle=eq;var ule=class{constructor(){ut(this,"globalTransform");ut(this,"shapeTransform");ut(this,"shape");ut(this,"minBounds");ut(this,"maxBounds");ut(this,"dimensions");ut(this,"paddingBefore");ut(this,"paddingAfter");ut(this,"names");ut(this,"types");ut(this,"componentTypes");ut(this,"minimumValues");ut(this,"maximumValues");ut(this,"maximumTileCount");ut(this,"availableLevels");ut(this,"keyframeCount");ut(this,"timeIntervalCollection");pe.throwInstantiationError()}requestData(t){pe.throwInstantiationError()}},fle=ule;function Ty(){pe.throwInstantiationError()}Object.defineProperties(Ty.prototype,{orientedBoundingBox:{get:pe.throwInstantiationError},boundingSphere:{get:pe.throwInstantiationError},boundTransform:{get:pe.throwInstantiationError},shapeTransform:{get:pe.throwInstantiationError},shaderUniforms:{get:pe.throwInstantiationError},shaderDefines:{get:pe.throwInstantiationError},shaderMaximumIntersectionsLength:{get:pe.throwInstantiationError}});Ty.prototype.update=pe.throwInstantiationError;Ty.prototype.updateViewTransforms=pe.throwInstantiationError;Ty.prototype.convertLocalToShapeUvSpace=pe.throwInstantiationError;Ty.prototype.computeOrientedBoundingBoxForTile=pe.throwInstantiationError;Ty.prototype.computeOrientedBoundingBoxForSample=pe.throwInstantiationError;Ty.DefaultMinBounds=pe.throwInstantiationError;Ty.DefaultMaxBounds=pe.throwInstantiationError;var dle=Ty;function Mke(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function kGt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let r=e._targetFrameRate;if(!l(r))e.resize(),e.render(),requestAnimationFrame(n);else{let o=1e3/r,s=i-t;s>o&&(e.resize(),e.render(),t=i-s%o),requestAnimationFrame(n)}}catch(r){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,r)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function Nke(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function Lke(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,r=Nke(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=r,i*=r,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function Fke(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let r=e._scene.camera.frustum;l(r.aspectRatio)?r.aspectRatio=n/i:(r.top=r.right*(i/n),r.bottom=-r.top)}}function Gr(e,t){e=Ln(e),t=t??H.EMPTY_OBJECT;let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),r=dn.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=r,r&&(i.style.imageRendering=dn.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function o(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}(t.blurActiveElementOnCanvasFocus??!0)&&(i.addEventListener("mousedown",o),i.addEventListener("pointerdown",o)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?Ln(t.creditContainer):n;c.appendChild(a);let u=l(t.creditViewport)?Ln(t.creditViewport):n,f=t.showRenderLoopErrors??!0,d=t.useBrowserRecommendedResolution??!0;this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=f,this._resolutionScale=1,this._useBrowserRecommendedResolution=d,this._forceResize=!1,this._entityView=void 0,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._trackedEntityChanged=new be,this._allowDataSourcesToSuspendAnimation=!0,this._clock=l(t.clock)?t.clock:new Nm,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),Lke(this);try{let p=t.ellipsoid??ee.default,g=new e8({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:t.scene3DOnly??!1,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=g,g.camera.constrainedAxis=h.UNIT_Z,Nke(this),Fke(this);let m=t.globe;l(m)||(m=new PV(p)),m!==!1&&(g.globe=m,g.globe.shadows=t.terrainShadows??Dn.RECEIVE_ONLY);let y=t.skyBox;!l(y)&&ee.WGS84.equals(p)&&(y=r8.createEarthSkyBox()),y!==!1&&(g.skyBox=y,g.sun=new f8,ee.WGS84.equals(p)&&(g.moon=new YV));let A=t.skyAtmosphere;!l(A)&&ee.WGS84.equals(p)&&(A=new i8(p),A.show=t.globe!==!1&&m.show),A!==!1&&(g.skyAtmosphere=A);let b=t.baseLayer;t.globe!==!1&&b!==!1&&(l(b)||(b=Ss.fromWorldImagery()),g.imageryLayers.add(b)),l(t.terrainProvider)&&t.globe!==!1&&(g.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&g.setTerrain(t.terrain),this._screenSpaceEventHandler=new ua(i),l(t.sceneMode)&&(t.sceneMode===re.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===re.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=t.useDefaultRenderLoop??!0,this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let x=this;this._onRenderError=function(R,O){x._useDefaultRenderLoop=!1,x._renderLoopRunning=!1,x._showRenderLoopErrors&&x.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,O)},g.renderError.addEventListener(this._onRenderError);let T=t.dataSources,E=!1;l(T)||(T=new yk,E=!0);let v=new l3({scene:g,dataSourceCollection:T}),S=new Xo;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=T,this._destroyDataSourceCollection=E,this._dataSourceDisplay=v,this._eventHelper=S,this._canAnimateUpdateCallback=this._updateCanAnimate,S.add(this._clock.onTick,Gr.prototype._onTick,this),S.add(g.morphStart,Gr.prototype._clearTrackedObject,this),S.add(T.dataSourceAdded,Gr.prototype._onDataSourceAdded,this),S.add(T.dataSourceRemoved,Gr.prototype._onDataSourceRemoved,this),S.add(g.postRender,Gr.prototype._postRender,this);let I=T.length;for(let R=0;R<I;R++)this._dataSourceAdded(T,T.get(R));this._dataSourceAdded(void 0,v.defaultDataSource),S.add(T.dataSourceAdded,Gr.prototype._dataSourceAdded,this),S.add(T.dataSourceRemoved,Gr.prototype._dataSourceRemoved,this)}catch(p){throw f&&this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',p),p}}Object.defineProperties(Gr.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},creditDisplay:{get:function(){return this._scene.frameState.creditDisplay}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},camera:{get:function(){return this._scene.camera}},ellipsoid:{get:function(){return this._scene.ellipsoid}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&kGt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,hle(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===re.COLUMBUS_VIEW||n===re.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===re.COLUMBUS_VIEW||n===re.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(N.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,Mke(this.clock,e))}}});Gr.prototype.showErrorPanel=function(e,t,n){let i=this._element,r=document.createElement("div");r.className="cesium-widget-errorPanel";let o=document.createElement("div");o.className="cesium-widget-errorPanel-content",r.appendChild(o);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),o.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",o.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let u=l(t),f=l(n);if(u||f){let g=document.createElement("div");if(g.className="cesium-widget-errorPanel-message",a.appendChild(g),f){let m=Kp(n);u||(typeof n=="string"&&(n=new Error(n)),t=Kp({name:n.name,message:n.message}),m=n.stack),typeof console<"u"&&console.error(`${e}
${t}
${m}`);let y=document.createElement("div");y.className="cesium-widget-errorPanel-message-details collapsed";let A=document.createElement("span");A.className="cesium-widget-errorPanel-more-details",A.appendChild(document.createTextNode("See more...")),y.appendChild(A),y.onclick=function(b){y.removeChild(A),y.appendChild(document.createTextNode(m)),y.className="cesium-widget-errorPanel-message-details",o.className="cesium-widget-errorPanel-content expanded",y.onclick=void 0},a.appendChild(y)}g.innerHTML=`<p>${t}</p>`}let d=document.createElement("div");d.className="cesium-widget-errorPanel-buttonPanel",o.appendChild(d);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(r)},d.appendChild(p),i.appendChild(r)};Gr.prototype.isDestroyed=function(){return!1};Gr.prototype.destroy=function(){let e=this.dataSources,t=e.length;for(let n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),this._eventHelper.removeAll(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),le(this)};Gr.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,Lke(this),Fke(this),this._scene.requestRender())};Gr.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};Gr.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Gr.prototype._onEntityCollectionChanged,this)};Gr.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Gr.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};Gr.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var UGt=new ue;Gr.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&this._canAnimateUpdateCallback(n);let i=this._entityView;if(l(i)){let r=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(r,!1,i.boundingSphere??UGt)===Pt.DONE&&i.update(t)}};Gr.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let r=0;r<i;r++){let o=n[r];this.trackedEntity===o&&(this.trackedEntity=void 0)}};Gr.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Gr.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Mke(this.clock,e)};Gr.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Gr.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Gr.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let r=e.length;this._automaticallyTrackDataSourceClocks&&r>0?this.clockTrackedDataSource=e.get(r-1):this.clockTrackedDataSource=void 0}};Gr.prototype.addController=function(e){return this.scene.controllerHost.registerController(e,this.container)};Gr.prototype.removeController=function(e){return this.scene.controllerHost.unregisterController(e,this.container)};Gr.prototype.zoomTo=function(e,t){return Bke(this,e,{offset:t},!1)};Gr.prototype.flyTo=function(e,t){return Bke(this,e,t,!0)};function Bke(e,t,n,i){hle(e);let r=new Promise(o=>{e._completeZoom=function(s){o(s)}});return e._zoomPromise=r,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(o){if(e._zoomPromise===r){if(o instanceof Ss){let s;l(o.imageryProvider)?s=Promise.resolve(o.getImageryRectangle()):s=new Promise(a=>{let c=o.readyEvent.addEventListener(()=>{c(),a(o.getImageryRectangle())})}),s.then(function(a){return AC(a,e.scene)}).then(function(a){e._zoomPromise===r&&(e._zoomTarget=a)});return}if(o instanceof Yo||o instanceof ZP||o instanceof Hb||o instanceof ra){e._zoomTarget=o;return}if(o.isLoading&&l(o.loadingEvent)){let s=o.loadingEvent.addEventListener(function(){s(),e._zoomPromise===r&&(e._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){e._zoomTarget=o.slice(0);return}o=o.values??o,l(o.entities)&&(o=o.entities.values),Array.isArray(o)?e._zoomTarget=o.slice(0):e._zoomTarget=[o]}}),e.scene.requestRender(),r}function g8(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function hle(e){let t=e._zoomPromise;l(t)&&(g8(e),e._completeZoom(!1))}Gr.prototype._postRender=function(){zGt(this),VGt(this)};var Rke=new ue;function zGt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===re.MORPHING)return;let n=e.scene,i=n.camera,r=e._zoomOptions??{},o;function s(f){l(r.offset)||(r.offset=new mh(0,-.5,f.radius)),o={offset:r.offset,duration:r.duration,maximumHeight:r.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(f,o):(i.viewBoundingSphere(f,r.offset),i.lookAtTransform(N.IDENTITY),e._completeZoom(!0)),g8(e)}if(t instanceof ZP){if(l(t.boundingSphere)){s(t.boundingSphere);return}let f=t.frameChanged.addEventListener(function(d){s(d.boundingSphere),f()});return}if(t instanceof Yo||t instanceof Hb){s(t.boundingSphere);return}if(t instanceof ra){s(t.boundingVolume);return}if(t instanceof he){o={destination:n.ellipsoid.cartographicToCartesian(t),duration:r.duration,maximumHeight:r.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(o):(i.setView(o),e._completeZoom(!0)),g8(e);return}let a=t,c=[];for(let f=0,d=a.length;f<d;f++){let p=e._dataSourceDisplay.getBoundingSphere(a[f],!1,Rke);if(p===Pt.PENDING)return;p!==Pt.FAILED&&c.push(ue.clone(Rke))}if(c.length===0){hle(e);return}e.trackedEntity=void 0;let u=ue.fromBoundingSpheres(c);e._zoomIsFlight?(g8(e),i.flyToBoundingSphere(u,{duration:r.duration,maximumHeight:r.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:r.offset})):(i.viewBoundingSphere(u,r.offset),i.lookAtTransform(N.IDENTITY),g8(e),e._completeZoom(!0))}var Oke=new ue;function VGt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=X.getValueOrUndefined(t.position,n);if(!l(i))return;let r=e.scene,o=e._dataSourceDisplay.getBoundingSphere(t,!1,Oke);if(o===Pt.PENDING)return;let s=r.mode;(s===re.COLUMBUS_VIEW||s===re.SCENE2D)&&(r.screenSpaceCameraController.enableTranslate=!1),(s===re.COLUMBUS_VIEW||s===re.SCENE3D)&&(r.screenSpaceCameraController.enableTilt=!1);let a=o!==Pt.FAILED?Oke:void 0;e._entityView=new f3(t,r,r.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var _8=Gr;var mle=class{get enabled(){return pe.throwInstantiationError()}set enabled(t){pe.throwInstantiationError()}connectedCallback(t){pe.throwInstantiationError()}disconnectedCallback(t){pe.throwInstantiationError()}update(t,n){pe.throwInstantiationError()}firstUpdate(t,n){pe.throwInstantiationError()}},ple=mle;var kke=new h,jGt=new sn(h.UNIT_X,0),HGt=new pn,GGt=new U(1,1,1);function _p(e,t,n,i=GGt){let{camera:r,ellipsoid:o}=e,s=o.scaleToGeodeticSurface(r.positionWC,kke);if(!l(s))return;let a=h.magnitude(r.positionWC),c=h.magnitude(s),u=a<=c,f=o.geodeticSurfaceNormal(r.positionWC,kke),d=h.dot(f,r.directionWC),p=d>0;if(u||p){let g=sn.fromPointNormal(r.positionWC,f,jGt),{clientHeight:m}=e.canvas,y=i.y*m/(2*Math.tan(r.frustum.fovy*.5));g.distance-=d*y;let A=r.getPickRay(t,HGt);return _i.rayPlane(A,g,n)}return r.pickEllipsoid(t,o,n)}var Uke={LEFT:0,MIDDLE:1,RIGHT:2};Object.freeze(Uke);var ec=Uke;function WGt(e){if(e===ec.LEFT)return un.LEFT_DOWN;if(e===ec.MIDDLE)return un.MIDDLE_DOWN;if(e===ec.RIGHT)return un.RIGHT_DOWN}function qGt(e){if(e===ec.LEFT)return un.LEFT_UP;if(e===ec.MIDDLE)return un.MIDDLE_UP;if(e===ec.RIGHT)return un.RIGHT_UP}var gle=class{static registerDragInputBindings(t,n,i){let r=new Set,o={isDragging:!1};for(let s of n){o.isDragging=!1;let a=WGt(s.button),c=qGt(s.button);l(a)&&t.setInputAction((...u)=>{o.isDragging=!0,l(i.start)&&i.start(...u)},a,s.modifier),l(c)&&(t.setInputAction((...u)=>{o.isDragging&&(o.isDragging=!1,l(i.end)&&i.end(...u))},c,s.modifier),t.setInputAction((...u)=>{o.isDragging&&(o.isDragging=!1,l(i.end)&&i.end(...u))},c)),r.add(s.modifier)}for(let s of r)t.setInputAction((...a)=>{o.isDragging&&l(i.change)&&i.change(...a)},un.MOUSE_MOVE,s);return o}},yp=gle;var _le=class e{static _getDefaultDragInputs(){return[Object.freeze({button:ec.LEFT})]}constructor(t=H.EMPTY_OBJECT){this._enabled=!0,this._handler=void 0,this._lastUpdateTime=void 0,this.dragInputs=t.dragInputs??e._getDefaultDragInputs(),this._dragInputState=void 0,this._panDelta=new U,this._panPosition=new U,this.pickWorldPosition=_p,this._ellipsoidNormal=new h,this._ellipsoidSurfacePosition=new h,this._panDirectionX=new h,this._panDirectionY=new h,this._pixelSize=new U,this._panVelocity=new U,this.panSpeed=1,this.inertiaEnabled=!0,this.inertialDecay=6,this.maximumMovementRatio=.1}get enabled(){return this._enabled}set enabled(t){this._enabled=t,t?(this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0):l(this._dragInputState)&&(this._dragInputState.isDragging=!1)}get isDragging(){return l(this._dragInputState)&&this._dragInputState.isDragging}connectedCallback(t){let n=new ua(t);this._handler=n,this._dragInputState=yp.registerDragInputBindings(n,this.dragInputs,{start:this._handleStartPan.bind(this),change:this._handlePan.bind(this)})}disconnectedCallback(t){let n=this._handler;l(n)&&!n.isDestroyed()&&n.destroy()}firstUpdate(){this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0}update(t){let n=(xn()-this._lastUpdateTime)*kn.SECONDS_PER_MILLISECOND,{camera:i,ellipsoid:r,canvas:o}=t,s=-this._panDelta.x,a=this._panDelta.y;if(this.inertiaEnabled&&!this.isDragging){let E=Math.exp(-this.inertialDecay*n);this._panVelocity.x*=E,this._panVelocity.y*=E,s=this._panVelocity.x*n,a=this._panVelocity.y*n}let{clientWidth:c,clientHeight:u}=o;if(n===0||c===0||u===0||Math.abs(s)<=D.EPSILON3&&Math.abs(a)<=D.EPSILON3){this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0;return}let f=this._panPosition,d=this.pickWorldPosition(t,f,this._ellipsoidSurfacePosition);l(d)||(d=r.scaleToGeodeticSurface(i.positionWC,this._ellipsoidSurfacePosition));let p=h.clone(i.rightWC,this._panDirectionX);p=h.normalize(p,this._panDirectionX);let g=h.normalize(d,this._panDirectionY),m=h.distance(i.positionWC,d),{drawingBufferWidth:y,drawingBufferHeight:A,pixelRatio:b}=t,x=i.frustum.getPixelDimensions(y,A,m,b,this._pixelSize),T=this.maximumMovementRatio*Math.max(c,u);s=D.clamp(s,-T,T),this._panVelocity.x=s/n,s*=this.panSpeed*x.x,a=D.clamp(a,-T,T),this._panVelocity.y=a/n,a*=this.panSpeed*x.y,i.move(p,s),i.move(g,a),this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0}_handleStartPan(){this.enabled&&(this._panDelta.x=0,this._panDelta.y=0)}_handlePan(t){this._panDelta.x+=t.endPosition.x-t.startPosition.x,this._panDelta.y+=t.endPosition.y-t.startPosition.y,this._panPosition.x=t.endPosition.x,this._panPosition.y=t.endPosition.y}},y8=_le;var yle=class e{static _getDefaultDragInputs(){return[Object.freeze({button:ec.LEFT})]}constructor(t=H.EMPTY_OBJECT){this._enabled=!0,this._handler=void 0,this._lastUpdateTime=void 0,this.dragInputs=t.dragInputs??e._getDefaultDragInputs(),this._dragInputState=void 0,this._panDelta=new U,this._panPosition=new U,this.pickWorldPosition=_p,this._ellipsoidNormal=new h,this._ellipsoidSurfacePosition=new h,this._panDirectionX=new h,this._panDirectionY=new h,this._pixelSize=new U,this._panVelocity=new U,this.panSpeed=1,this.inertiaEnabled=!0,this.inertialDecay=6,this.maximumMovementRatio=.1}get enabled(){return this._enabled}set enabled(t){this._enabled=t,t?(this._panDelta.x=0,this._panDelta.y=0):l(this._dragInputState)&&(this._dragInputState.isDragging=!1)}get isDragging(){return l(this._dragInputState)&&this._dragInputState.isDragging}connectedCallback(t){let n=new ua(t);this._handler=n,this._dragInputState=yp.registerDragInputBindings(n,this.dragInputs,{start:this._handleStartPan.bind(this),change:this._handlePan.bind(this)})}disconnectedCallback(t){let n=this._handler;l(n)&&!n.isDestroyed()&&n.destroy()}firstUpdate(){this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0}update(t){let n=(xn()-this._lastUpdateTime)*kn.SECONDS_PER_MILLISECOND,i=-this._panDelta.x,r=this._panDelta.y;if(this.inertiaEnabled&&!this.isDragging){let S=Math.exp(-this.inertialDecay*n);this._panVelocity.x*=S,this._panVelocity.y*=S,i=this._panVelocity.x*n,r=this._panVelocity.y*n}let{camera:o,ellipsoid:s,canvas:a}=t,{clientWidth:c,clientHeight:u}=a;if(n===0||c===0||u===0||Math.abs(i)<=D.EPSILON3&&Math.abs(r)<=D.EPSILON3){this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0;return}let f=this._panPosition,d=this.pickWorldPosition(t,f,this._ellipsoidSurfacePosition);l(d)||(d=s.scaleToGeodeticSurface(o.positionWC,this._ellipsoidSurfacePosition));let p=s.geodeticSurfaceNormal(d,this._ellipsoidNormal),g=h.clone(o.rightWC,this._panDirectionX);g=h.normalize(g,this._panDirectionX);let m=h.clone(o.upWC,this._panDirectionY),y=Math.abs(h.dot(p,o.directionWC));D.lessThan(y,1,D.EPSILON6)&&(m=h.cross(p,g,this._panDirectionY)),m=h.normalize(m,this._panDirectionY);let A=h.distance(o.positionWC,d),{drawingBufferWidth:b,drawingBufferHeight:x,pixelRatio:T}=t,E=o.frustum.getPixelDimensions(b,x,A,T,this._pixelSize),v=this.maximumMovementRatio*Math.max(c,u);i=D.clamp(i,-v,v),this._panVelocity.x=i/n,i*=this.panSpeed*E.x,r=D.clamp(r,-v,v),this._panVelocity.y=r/n,r*=this.panSpeed*E.y,o.move(g,i),o.move(m,r),this._lastUpdateTime=xn(),this._panDelta.x=0,this._panDelta.y=0}_handleStartPan(t){this.enabled&&(this._panDelta.x=0,this._panDelta.y=0)}_handlePan(t){this._panDelta.x+=t.endPosition.x-t.startPosition.x,this._panDelta.y+=t.endPosition.y-t.startPosition.y,this._panPosition.x=t.endPosition.x,this._panPosition.y=t.endPosition.y}},A8=yle;var Ale=class{constructor(){this._elevatorController=new y8,this._mapController=new A8,this._enabled=!0,this._ellipsoidNormal=new h,this.angleThreshold=D.toRadians(125)}get enabled(){return this._enabled}set enabled(t){this._enabled=t}get elevatorController(){return this._elevatorController}get mapController(){return this._mapController}connectedCallback(t){this._elevatorController.connectedCallback(t),this._mapController.connectedCallback(t)}disconnectedCallback(t){this._elevatorController.disconnectedCallback(t),this._mapController.disconnectedCallback(t)}firstUpdate(){this._elevatorController.firstUpdate(),this._mapController.firstUpdate()}update(t){let n=t.camera,i=t.ellipsoid.geodeticSurfaceNormal(n.positionWC,this._ellipsoidNormal),r=Math.abs(h.angleBetween(i,n.directionWC));(r<this.angleThreshold&&r>Math.PI-this.angleThreshold?this._elevatorController:this._mapController).update(t)}},ble=Ale;var xle=class e{static _getDefaultDragInputs(){return[Object.freeze({button:ec.LEFT,modifier:to.CTRL}),Object.freeze({button:ec.RIGHT})]}constructor(t=H.EMPTY_OBJECT){this._enabled=!0,this._handler=void 0,this._lastUpdateTime=void 0,this.tiltEnabled=!0,this.orbitEnabled=!0,this.useDragPosition=!1,this.dragInputs=t.dragInputs??e._getDefaultDragInputs(),this._dragInputState=void 0,this._dragDelta=new U,this._screenSpaceDragPosition=new U,this._screenSpaceOrigin=new U,this.pickWorldPosition=_p,this._hasTarget=!1,this._target=new h,this._axis=new h,this.tiltMagnitude=2,this.dampingEnabled=!0,this.tiltAnimationDuration=.0045,this.maximumTiltVelocity=D.PI,this.minimumTiltVelocity=D.EPSILON20,this.orbitMagnitude=2,this.orbitAnimationDuration=.0045,this.maximumOrbitVelocity=D.TWO_PI,this.minimumOrbitVelocity=D.EPSILON20,this._tiltAxis=new h,this._tiltQuaternion=new Le,this._tiltOffset=new h,this._tiltOrigin=new h,this._tiltDampenedResults={velocity:0,value:0},this._orbitTargetEnu=new N,this._orbitTargetEast=new h,this._orbitQuaternion=new Le,this._orbitOffset=new h,this._orbitLookOffset=new h,this._orbitOrigin=new h,this._orbitDampenedResults={velocity:0,value:0},this.maximumMovementRatio=.1}get enabled(){return this._enabled}set enabled(t){this._enabled=t,t?(this._lastUpdateTime=xn(),this._dragDelta.x=0,this._dragDelta.y=0):l(this._dragInputState)&&(this._dragInputState.isDragging=!1)}get isDragging(){return l(this._dragInputState)&&this._dragInputState.isDragging}connectedCallback(t){let n=new ua(t);this._handler=n,this._dragInputState=yp.registerDragInputBindings(n,this.dragInputs,{start:this._handleStartDrag.bind(this),change:this._handleDrag.bind(this)})}disconnectedCallback(t){let n=this._handler;l(n)&&!n.isDestroyed()&&n.destroy()}firstUpdate(){this._lastUpdateTime=xn(),this._dragDelta.x=0,this._dragDelta.y=0}_handleStartDrag(t){this.enabled&&(this._hasTarget=!1,this._screenSpaceDragPosition.x=t.position.x,this._screenSpaceDragPosition.y=t.position.y,this._dragDelta.x=0,this._dragDelta.y=0)}_handleDrag(t){this._dragDelta.x+=t.endPosition.x-t.startPosition.x,this._dragDelta.y+=t.endPosition.y-t.startPosition.y}get tiltAngle(){return this._tiltDampenedResults.value}get tiltVelocity(){return this._tiltDampenedResults.velocity}set tiltVelocity(t){this._tiltDampenedResults.velocity=t}get orbitAngle(){return this._orbitDampenedResults.value}get orbitVelocity(){return this._orbitDampenedResults.velocity}set orbitVelocity(t){this._orbitDampenedResults.velocity=t}orbit(t,n,i,r,o,s=ee.default){let a=At.eastNorthUpToFixedFrame(n,s,this._orbitTargetEnu),c=N.multiplyByPointAsVector(a,h.UNIT_X,this._orbitTargetEast),u=h.angleBetween(t.directionWC,c);if(Math.abs(this.orbitVelocity)<this.minimumOrbitVelocity&&(this.orbitVelocity=0),!this.isDragging&&this.dampingEnabled&&(r+=this.orbitVelocity*o),r===0)return;let f=u+r,d=this.dampingEnabled?this.maximumOrbitVelocity*this.orbitMagnitude:void 0,p=this.dampingEnabled?this.orbitAnimationDuration:void 0;this._orbitDampenedResults=D.smoothDamp(u,f,this.orbitVelocity,o,d,p,this._orbitDampenedResults);let g=this.orbitAngle-u,m=$.fromQuaternion(Le.fromAxisAngle(i,-g,this._orbitQuaternion)),y=h.subtract(t.positionWC,n,this._orbitOffset),A=h.dot(y,t.directionWC),b=h.multiplyByScalar(t.directionWC,A,this._orbitLookOffset),x=h.subtract(y,b,this._orbitLookOffset),T=$.multiplyByVector(m,y,this._orbitOffset),E=$.multiplyByVector(m,x,this._orbitLookOffset);h.add(n,T,t.position);let v=h.add(n,E,this._orbitOrigin);t.lookAtWorldPosition(v,s)}tilt(t,n,i,r,o,s=ee.default){if(Math.abs(this.tiltVelocity)<this.minimumTiltVelocity&&(this.tiltVelocity=0),!this.isDragging&&this.dampingEnabled&&(r+=this.tiltVelocity*o),r===0)return;let a=h.angleBetween(t.direction,i);(a<D.PI_OVER_TWO&&r>0||a>D.PI_OVER_TWO&&r<0)&&(r*=Math.abs(Math.sin(a)));let c=a+r,u=this.dampingEnabled?this.maximumTiltVelocity*this.tiltMagnitude:void 0,f=this.dampingEnabled?this.tiltAnimationDuration:void 0;D.smoothDamp(a,c,this.tiltVelocity,o,u,f,this._tiltDampenedResults);let d=this.tiltAngle-a,p=$.fromQuaternion(Le.fromAxisAngle(t.rightWC,-d,this._tiltQuaternion)),g=h.subtract(t.position,n,this._tiltOffset),m=h.dot(g,t.directionWC),y=h.multiplyByScalar(t.directionWC,m,this._tiltOffset),A=h.subtract(t.position,y,this._tiltOrigin),b=$.multiplyByVector(p,y,this._tiltOffset);h.add(A,b,t.position),t.lookAtWorldPosition(A,s)}update(t){let n=(xn()-this._lastUpdateTime)*kn.SECONDS_PER_MILLISECOND,{canvas:i}=t,{clientWidth:r,clientHeight:o}=i;if(n===0||r===0||o===0){this._lastUpdateTime=xn(),this._dragDelta.x=0,this._dragDelta.y=0;return}let s=this._target;if(this.isDragging&&!this._hasTarget){let a=this._screenSpaceDragPosition;this.useDragPosition||(a=this._screenSpaceOrigin,a.x=r/2,a.y=o/2);let c=this.pickWorldPosition(t,a,this._target),u=l(c);this._hasTarget=u,s=c}if(this._hasTarget){let{camera:a,ellipsoid:c}=t,u=c.geodeticSurfaceNormal(s,this._axis),f=h.negate(u,this._axis);if(this.orbitEnabled){let d=this._dragDelta.x/r;d=D.clamp(d,-this.maximumMovementRatio,this.maximumMovementRatio),d*=this.orbitMagnitude*D.TWO_PI,this.orbit(a,s,f,d,n,c)}if(this.tiltEnabled){let d=this._dragDelta.y/o;d=D.clamp(d,-this.maximumMovementRatio,this.maximumMovementRatio),d*=this.tiltMagnitude*D.PI,this.tilt(a,s,f,d,n,c)}}this._lastUpdateTime=xn(),this._dragDelta.x=0,this._dragDelta.y=0}},Tle=xle;var Ele=class e{static _getDefaultDragInputs(){return[Object.freeze({button:ec.MIDDLE})]}static _getDefaultScrollInputs(){return[un.WHEEL]}constructor(t=H.EMPTY_OBJECT){this._enabled=!0,this._handler=void 0,this._lastUpdateTime=void 0,this.usePointerPosition=!1,this.dragInputs=t.dragInputs??e._getDefaultDragInputs(),this.scrollInputs=t.scrollInputs??e._getDefaultScrollInputs(),this._dragInputState=void 0,this._dragDelta=new U,this._scrollDelta=0,this._zoomInputVelocity=0,this._screenSpaceScrollPosition=new U,this._screenSpaceDragPosition=new U,this._screenSpaceOrigin=new U,this.zoomSensitivity=.2,this.pickWorldPosition=_p,this.zoomDistanceRatio=.4,this.inertiaEnabled=!1,this.inertialDecay=6,this.minimumZoomDistance=0,this.maximumZoomDistance=1e5,this.minimumZoomVelocity=D.EPSILON20,this.maximumZoomVelocity=1,this.dampingEnabled=!0,this.zoomAnimationDuration=.45,this._target=new h,this._zoomDirection=new h,this._zoomDampenedResults={velocity:0,value:0}}get enabled(){return this._enabled}set enabled(t){this._enabled=t,t?(this._lastUpdateTime=xn(),this._scrollDelta=0,this._dragDelta.x=0,this._dragDelta.y=0):l(this._dragInputState)&&(this._dragInputState.isDragging=!1)}get isDragging(){return l(this._dragInputState)&&this._dragInputState.isDragging}connectedCallback(t){let n=new ua(t);this._handler=n;for(let i of this.scrollInputs)n.setInputAction(this._handleZoom.bind(this),i);n.setInputAction(this._handleZoomPosition.bind(this),un.MOUSE_MOVE),this._dragInputState=yp.registerDragInputBindings(n,this.dragInputs,{start:this._handleStartDrag.bind(this),change:this._handleDrag.bind(this)})}disconnectedCallback(t){let n=this._handler;l(n)&&!n.isDestroyed()&&n.destroy()}firstUpdate(){this._lastUpdateTime=xn(),this._scrollDelta=0,this._dragDelta.x=0,this._dragDelta.y=0}get zoomDistance(){return this._zoomDampenedResults.value}get zoomVelocity(){return this._zoomDampenedResults.velocity}set zoomVelocity(t){this._zoomDampenedResults.velocity=t}update(t){let i=(xn()-this._lastUpdateTime)*kn.SECONDS_PER_MILLISECOND,{canvas:r}=t,{clientWidth:o,clientHeight:s}=r;if(i===0||o===0||s===0){this._lastUpdateTime=xn(),this._scrollDelta=0,this._dragDelta.x=0,this._dragDelta.y=0;return}let a=this._scrollDelta+this._dragDelta.y;if(a===0&&this.inertiaEnabled){let A=Math.exp(-this.inertialDecay*i);this._zoomInputVelocity*=A,a=this._zoomInputVelocity*i}if(Math.abs(this.zoomVelocity)<this.minimumZoomVelocity&&a<=D.EPSILON3&&a>=-D.EPSILON3&&this.zoomVelocity<=D.EPSILON3){this._lastUpdateTime=xn(),this._scrollDelta=0,this._dragDelta.x=0,this._dragDelta.y=0,this.zoomVelocity=0;return}this._zoomInputVelocity=D.clamp(a/i,-this.maximumZoomVelocity,this.maximumZoomVelocity);let{camera:c,ellipsoid:u}=t,f=c.direction,d=h.magnitude(c.positionWC)-u.maximumRadius,p=this.isDragging?this._screenSpaceDragPosition:this._screenSpaceScrollPosition;this.useDragPosition||(p=this._screenSpaceOrigin,p.x=o/2,p.y=s/2);let g=this.pickWorldPosition(t,p,this._target);l(g)&&(f=h.subtract(g,c.positionWC,this._zoomDirection),f=h.normalize(f,this._zoomDirection),d=h.distance(g,c.positionWC)),d=D.clamp(d,d>0?this.minimumZoomDistance:-this.maximumZoomDistance,d>0?this.maximumZoomDistance:-this.minimumZoomDistance);let m=a*d*this.zoomDistanceRatio,y=this.dampingEnabled?this.zoomAnimationDuration:void 0;this._zoomDampenedResults=D.smoothDamp(0,m,this.zoomVelocity,i,void 0,y,this._zoomDampenedResults),c.move(f,this.zoomDistance),this._lastUpdateTime=xn(),this._scrollDelta=0,this._dragDelta.x=0,this._dragDelta.y=0}_handleZoom(t){this._scrollDelta+=t*this.zoomSensitivity}_handleZoomPosition(t){this._screenSpaceScrollPosition.x=t.endPosition.x,this._screenSpaceScrollPosition.y=t.endPosition.y}_handleStartDrag(t){this.enabled&&(this._screenSpaceDragPosition.x=t.position.x,this._screenSpaceDragPosition.y=t.position.y,this._dragDelta.x=0,this._dragDelta.y=0)}_handleDrag(t){this._dragDelta.x+=t.endPosition.x-t.startPosition.x,this._dragDelta.y+=t.endPosition.y-t.startPosition.y}},Cle=Ele;var zke={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"};Object.freeze(zke);var vle=zke;var Sle=`uniform sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
}
`;var Vke={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"};Object.freeze(Vke);var wle=Vke;function YGt(e){async function t({data:i}){let r=[],o={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,r);o.result=s}catch(s){s instanceof Error?o.error={name:s.name,message:s.message,stack:s.stack}:o.error=s}i.canTransferArrayBuffer||(r.length=0);try{postMessage(o,r)}catch(s){o.result=void 0,o.error=`postMessage failed with error: ${Kp(s)}
with responseMessage: ${JSON.stringify(o)}`,postMessage(o)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var Ile=YGt;globalThis.CESIUM_VERSION="1.145.0";var b8;typeof ko<"u"&&(b8=ko);(function(){/*!
* Knockout JavaScript library v3.5.1
* (c) The Knockout.js team - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,r=t.jQuery,o=t.JSON;r||typeof jQuery>"u"||(r=jQuery),(function(s){s(t.ko={})})(function(s,a){function c(_,C){return _===null||typeof _ in y?_===C:!1}function u(_,C){var w;return function(){w||(w=m.a.setTimeout(function(){w=e,_()},C))}}function f(_,C){var w;return function(){clearTimeout(w),w=m.a.setTimeout(_,C)}}function d(_,C){C&&C!=="change"?C==="beforeChange"?this.pc(_):this.gb(_,C):this.qc(_)}function p(_,C){C!==null&&C.s&&C.s()}function g(_,C){var w=this.qd,P=w[E];P.ra||(this.Qb&&this.mb[C]?(w.uc(C,_,this.mb[C]),this.mb[C]=null,--this.Qb):P.I[C]||w.uc(C,_,P.J?{da:_}:w.$c(_)),_.Ja&&_.gd())}var m=typeof s<"u"?s:{};m.b=function(_,C){for(var w=_.split("."),P=m,M=0;M<w.length-1;M++)P=P[w[M]];P[w[w.length-1]]=C},m.L=function(_,C,w){_[C]=w},m.version="3.5.1",m.b("version",m.version),m.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},m.a=(function(){function _(W,J){for(var Z in W)M.call(W,Z)&&J(Z,W[Z])}function C(W,J){if(J)for(var Z in J)M.call(J,Z)&&(W[Z]=J[Z]);return W}function w(W,J){return W.__proto__=J,W}function P(W,J,Z,ae){var Ae=W[J].match(q)||[];m.a.D(Z.match(q),function(fe){m.a.Na(Ae,fe,ae)}),W[J]=Ae.join(" ")}var M=Object.prototype.hasOwnProperty,F={__proto__:[]}instanceof Array,V=typeof Symbol=="function",B={},j={};B[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],B.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),_(B,function(W,J){if(J.length)for(var Z=0,ae=J.length;Z<ae;Z++)j[J[Z]]=W});var k={propertychange:!0},G=n&&(function(){for(var W=3,J=n.createElement("div"),Z=J.getElementsByTagName("i");J.innerHTML="<!--[if gt IE "+ ++W+"]><i></i><![endif]-->",Z[0];);return 4<W?W:e})(),q=/\S+/g,Q;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(W,J,Z){for(var ae=0,Ae=W.length;ae<Ae;ae++)J.call(Z,W[ae],ae,W)},A:typeof Array.prototype.indexOf=="function"?function(W,J){return Array.prototype.indexOf.call(W,J)}:function(W,J){for(var Z=0,ae=W.length;Z<ae;Z++)if(W[Z]===J)return Z;return-1},Lb:function(W,J,Z){for(var ae=0,Ae=W.length;ae<Ae;ae++)if(J.call(Z,W[ae],ae,W))return W[ae];return e},Pa:function(W,J){var Z=m.a.A(W,J);0<Z?W.splice(Z,1):Z===0&&W.shift()},wc:function(W){var J=[];return W&&m.a.D(W,function(Z){0>m.a.A(J,Z)&&J.push(Z)}),J},Mb:function(W,J,Z){var ae=[];if(W)for(var Ae=0,fe=W.length;Ae<fe;Ae++)ae.push(J.call(Z,W[Ae],Ae));return ae},jb:function(W,J,Z){var ae=[];if(W)for(var Ae=0,fe=W.length;Ae<fe;Ae++)J.call(Z,W[Ae],Ae)&&ae.push(W[Ae]);return ae},Nb:function(W,J){if(J instanceof Array)W.push.apply(W,J);else for(var Z=0,ae=J.length;Z<ae;Z++)W.push(J[Z]);return W},Na:function(W,J,Z){var ae=m.a.A(m.a.bc(W),J);0>ae?Z&&W.push(J):Z||W.splice(ae,1)},Ba:F,extend:C,setPrototypeOf:w,Ab:F?w:C,P:_,Ga:function(W,J,Z){if(!W)return W;var ae={},Ae;for(Ae in W)M.call(W,Ae)&&(ae[Ae]=J.call(Z,W[Ae],Ae,W));return ae},Tb:function(W){for(;W.firstChild;)m.removeNode(W.firstChild)},Yb:function(W){W=m.a.la(W);for(var J=(W[0]&&W[0].ownerDocument||n).createElement("div"),Z=0,ae=W.length;Z<ae;Z++)J.appendChild(m.oa(W[Z]));return J},Ca:function(W,J){for(var Z=0,ae=W.length,Ae=[];Z<ae;Z++){var fe=W[Z].cloneNode(!0);Ae.push(J?m.oa(fe):fe)}return Ae},va:function(W,J){if(m.a.Tb(W),J)for(var Z=0,ae=J.length;Z<ae;Z++)W.appendChild(J[Z])},Xc:function(W,J){var Z=W.nodeType?[W]:W;if(0<Z.length){for(var ae=Z[0],Ae=ae.parentNode,fe=0,xe=J.length;fe<xe;fe++)Ae.insertBefore(J[fe],ae);for(fe=0,xe=Z.length;fe<xe;fe++)m.removeNode(Z[fe])}},Ua:function(W,J){if(W.length){for(J=J.nodeType===8&&J.parentNode||J;W.length&&W[0].parentNode!==J;)W.splice(0,1);for(;1<W.length&&W[W.length-1].parentNode!==J;)W.length--;if(1<W.length){var Z=W[0],ae=W[W.length-1];for(W.length=0;Z!==ae;)W.push(Z),Z=Z.nextSibling;W.push(ae)}}return W},Zc:function(W,J){7>G?W.setAttribute("selected",J):W.selected=J},Db:function(W){return W===null||W===e?"":W.trim?W.trim():W.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(W,J){return W=W||"",J.length>W.length?!1:W.substring(0,J.length)===J},vd:function(W,J){if(W===J)return!0;if(W.nodeType===11)return!1;if(J.contains)return J.contains(W.nodeType!==1?W.parentNode:W);if(J.compareDocumentPosition)return(J.compareDocumentPosition(W)&16)==16;for(;W&&W!=J;)W=W.parentNode;return!!W},Sb:function(W){return m.a.vd(W,W.ownerDocument.documentElement)},kd:function(W){return!!m.a.Lb(W,m.a.Sb)},R:function(W){return W&&W.tagName&&W.tagName.toLowerCase()},Ac:function(W){return m.onError?function(){try{return W.apply(this,arguments)}catch(J){throw m.onError&&m.onError(J),J}}:W},setTimeout:function(W,J){return setTimeout(m.a.Ac(W),J)},Gc:function(W){setTimeout(function(){throw m.onError&&m.onError(W),W},0)},B:function(W,J,Z){var ae=m.a.Ac(Z);if(Z=k[J],m.options.useOnlyNativeEvents||Z||!r)if(Z||typeof W.addEventListener!="function")if(typeof W.attachEvent<"u"){var Ae=function(xe){ae.call(W,xe)},fe="on"+J;W.attachEvent(fe,Ae),m.a.K.za(W,function(){W.detachEvent(fe,Ae)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else W.addEventListener(J,ae,!1);else Q||(Q=typeof r(W).on=="function"?"on":"bind"),r(W)[Q](J,ae)},Fb:function(W,J){if(!W||!W.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var Z;if(m.a.R(W)==="input"&&W.type&&J.toLowerCase()=="click"?(Z=W.type,Z=Z=="checkbox"||Z=="radio"):Z=!1,m.options.useOnlyNativeEvents||!r||Z)if(typeof n.createEvent=="function")if(typeof W.dispatchEvent=="function")Z=n.createEvent(j[J]||"HTMLEvents"),Z.initEvent(J,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,W),W.dispatchEvent(Z);else throw Error("The supplied element doesn't support dispatchEvent");else if(Z&&W.click)W.click();else if(typeof W.fireEvent<"u")W.fireEvent("on"+J);else throw Error("Browser doesn't support triggering events");else r(W).trigger(J)},f:function(W){return m.O(W)?W():W},bc:function(W){return m.O(W)?W.v():W},Eb:function(W,J,Z){var ae;J&&(typeof W.classList=="object"?(ae=W.classList[Z?"add":"remove"],m.a.D(J.match(q),function(Ae){ae.call(W.classList,Ae)})):typeof W.className.baseVal=="string"?P(W.className,"baseVal",J,Z):P(W,"className",J,Z))},Bb:function(W,J){var Z=m.a.f(J);(Z===null||Z===e)&&(Z="");var ae=m.h.firstChild(W);!ae||ae.nodeType!=3||m.h.nextSibling(ae)?m.h.va(W,[W.ownerDocument.createTextNode(Z)]):ae.data=Z,m.a.Ad(W)},Yc:function(W,J){if(W.name=J,7>=G)try{var Z=W.name.replace(/[&<>'"]/g,function(ae){return"&#"+ae.charCodeAt(0)+";"});W.mergeAttributes(n.createElement("<input name='"+Z+"'/>"),!1)}catch{}},Ad:function(W){9<=G&&(W=W.nodeType==1?W:W.parentNode,W.style&&(W.style.zoom=W.style.zoom))},wd:function(W){if(G){var J=W.style.width;W.style.width=0,W.style.width=J}},Pd:function(W,J){W=m.a.f(W),J=m.a.f(J);for(var Z=[],ae=W;ae<=J;ae++)Z.push(ae);return Z},la:function(W){for(var J=[],Z=0,ae=W.length;Z<ae;Z++)J.push(W[Z]);return J},Da:function(W){return V?Symbol(W):W},Zd:G===6,$d:G===7,W:G,Lc:function(W,J){for(var Z=m.a.la(W.getElementsByTagName("input")).concat(m.a.la(W.getElementsByTagName("textarea"))),ae=typeof J=="string"?function(xe){return xe.name===J}:function(xe){return J.test(xe.name)},Ae=[],fe=Z.length-1;0<=fe;fe--)ae(Z[fe])&&Ae.push(Z[fe]);return Ae},Nd:function(W){return typeof W=="string"&&(W=m.a.Db(W))?o&&o.parse?o.parse(W):new Function("return "+W)():null},hc:function(W,J,Z){if(!o||!o.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return o.stringify(m.a.f(W),J,Z)},Od:function(W,J,Z){Z=Z||{};var ae=Z.params||{},Ae=Z.includeFields||this.Jc,fe=W;if(typeof W=="object"&&m.a.R(W)==="form")for(var fe=W.action,xe=Ae.length-1;0<=xe;xe--)for(var ge=m.a.Lc(W,Ae[xe]),we=ge.length-1;0<=we;we--)ae[ge[we].name]=ge[we].value;J=m.a.f(J);var Se=n.createElement("form");Se.style.display="none",Se.action=fe,Se.method="post";for(var Re in J)W=n.createElement("input"),W.type="hidden",W.name=Re,W.value=m.a.hc(m.a.f(J[Re])),Se.appendChild(W);_(ae,function(Qe,He){var Xe=n.createElement("input");Xe.type="hidden",Xe.name=Qe,Xe.value=He,Se.appendChild(Xe)}),n.body.appendChild(Se),Z.submitter?Z.submitter(Se):Se.submit(),setTimeout(function(){Se.parentNode.removeChild(Se)},0)}}})(),m.b("utils",m.a),m.b("utils.arrayForEach",m.a.D),m.b("utils.arrayFirst",m.a.Lb),m.b("utils.arrayFilter",m.a.jb),m.b("utils.arrayGetDistinctValues",m.a.wc),m.b("utils.arrayIndexOf",m.a.A),m.b("utils.arrayMap",m.a.Mb),m.b("utils.arrayPushAll",m.a.Nb),m.b("utils.arrayRemoveItem",m.a.Pa),m.b("utils.cloneNodes",m.a.Ca),m.b("utils.createSymbolOrString",m.a.Da),m.b("utils.extend",m.a.extend),m.b("utils.fieldsIncludedWithJsonPost",m.a.Jc),m.b("utils.getFormFields",m.a.Lc),m.b("utils.objectMap",m.a.Ga),m.b("utils.peekObservable",m.a.bc),m.b("utils.postJson",m.a.Od),m.b("utils.parseJson",m.a.Nd),m.b("utils.registerEventHandler",m.a.B),m.b("utils.stringifyJson",m.a.hc),m.b("utils.range",m.a.Pd),m.b("utils.toggleDomNodeCssClass",m.a.Eb),m.b("utils.triggerEvent",m.a.Fb),m.b("utils.unwrapObservable",m.a.f),m.b("utils.objectForEach",m.a.P),m.b("utils.addOrRemoveItem",m.a.Na),m.b("utils.setTextContent",m.a.Bb),m.b("unwrap",m.a.f),Function.prototype.bind||(Function.prototype.bind=function(_){var C=this;if(arguments.length===1)return function(){return C.apply(_,arguments)};var w=Array.prototype.slice.call(arguments,1);return function(){var P=w.slice(0);return P.push.apply(P,arguments),C.apply(_,P)}}),m.a.g=new function(){var _=0,C="__ko__"+new Date().getTime(),w={},P,M;return m.a.W?(P=function(F,V){var B=F[C];if(!B||B==="null"||!w[B]){if(!V)return e;B=F[C]="ko"+_++,w[B]={}}return w[B]},M=function(F){var V=F[C];return V?(delete w[V],F[C]=null,!0):!1}):(P=function(F,V){var B=F[C];return!B&&V&&(B=F[C]={}),B},M=function(F){return F[C]?(delete F[C],!0):!1}),{get:function(F,V){var B=P(F,!1);return B&&B[V]},set:function(F,V,B){(F=P(F,B!==e))&&(F[V]=B)},Ub:function(F,V,B){return F=P(F,!0),F[V]||(F[V]=B)},clear:M,Z:function(){return _+++C}}},m.b("utils.domData",m.a.g),m.b("utils.domData.clear",m.a.g.clear),m.a.K=new function(){function _(V,B){var j=m.a.g.get(V,P);return j===e&&B&&(j=[],m.a.g.set(V,P,j)),j}function C(V){var B=_(V,!1);if(B)for(var B=B.slice(0),j=0;j<B.length;j++)B[j](V);m.a.g.clear(V),m.a.K.cleanExternalData(V),F[V.nodeType]&&w(V.childNodes,!0)}function w(V,B){for(var j=[],k,G=0;G<V.length;G++)if((!B||V[G].nodeType===8)&&(C(j[j.length]=k=V[G]),V[G]!==k))for(;G--&&m.a.A(j,V[G])==-1;);}var P=m.a.g.Z(),M={1:!0,8:!0,9:!0},F={1:!0,9:!0};return{za:function(V,B){if(typeof B!="function")throw Error("Callback must be a function");_(V,!0).push(B)},yb:function(V,B){var j=_(V,!1);j&&(m.a.Pa(j,B),j.length==0&&m.a.g.set(V,P,e))},oa:function(V){return m.u.G(function(){M[V.nodeType]&&(C(V),F[V.nodeType]&&w(V.getElementsByTagName("*")))}),V},removeNode:function(V){m.oa(V),V.parentNode&&V.parentNode.removeChild(V)},cleanExternalData:function(V){r&&typeof r.cleanData=="function"&&r.cleanData([V])}}},m.oa=m.a.K.oa,m.removeNode=m.a.K.removeNode,m.b("cleanNode",m.oa),m.b("removeNode",m.removeNode),m.b("utils.domNodeDisposal",m.a.K),m.b("utils.domNodeDisposal.addDisposeCallback",m.a.K.za),m.b("utils.domNodeDisposal.removeDisposeCallback",m.a.K.yb),(function(){var _=[0,"",""],C=[1,"<table>","</table>"],w=[3,"<table><tbody><tr>","</tr></tbody></table>"],P=[1,"<select multiple='multiple'>","</select>"],M={thead:C,tbody:C,tfoot:C,tr:[2,"<table><tbody>","</tbody></table>"],td:w,th:w,option:P,optgroup:P},F=8>=m.a.W;m.a.ua=function(V,B){var j;if(r){if(r.parseHTML)j=r.parseHTML(V,B)||[];else if((j=r.clean([V],B))&&j[0]){for(var k=j[0];k.parentNode&&k.parentNode.nodeType!==11;)k=k.parentNode;k.parentNode&&k.parentNode.removeChild(k)}}else{(j=B)||(j=n);var k=j.parentWindow||j.defaultView||t,G=m.a.Db(V).toLowerCase(),q=j.createElement("div"),Q;for(Q=(G=G.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&M[G[1]]||_,G=Q[0],Q="ignored<div>"+Q[1]+V+Q[2]+"</div>",typeof k.innerShiv=="function"?q.appendChild(k.innerShiv(Q)):(F&&j.body.appendChild(q),q.innerHTML=Q,F&&q.parentNode.removeChild(q));G--;)q=q.lastChild;j=m.a.la(q.lastChild.childNodes)}return j},m.a.Md=function(V,B){var j=m.a.ua(V,B);return j.length&&j[0].parentElement||m.a.Yb(j)},m.a.fc=function(V,B){if(m.a.Tb(V),B=m.a.f(B),B!==null&&B!==e)if(typeof B!="string"&&(B=B.toString()),r)r(V).html(B);else for(var j=m.a.ua(B,V.ownerDocument),k=0;k<j.length;k++)V.appendChild(j[k])}})(),m.b("utils.parseHtmlFragment",m.a.ua),m.b("utils.setHtml",m.a.fc),m.aa=(function(){function _(w,P){if(w){if(w.nodeType==8){var M=m.aa.Uc(w.nodeValue);M!=null&&P.push({ud:w,Kd:M})}else if(w.nodeType==1)for(var M=0,F=w.childNodes,V=F.length;M<V;M++)_(F[M],P)}}var C={};return{Xb:function(w){if(typeof w!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var P=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return C[P]=w,"<!--[ko_memo:"+P+"]-->"},bd:function(w,P){var M=C[w];if(M===e)throw Error("Couldn't find any memo with ID "+w+". Perhaps it's already been unmemoized.");try{return M.apply(null,P||[]),!0}finally{delete C[w]}},cd:function(w,P){var M=[];_(w,M);for(var F=0,V=M.length;F<V;F++){var B=M[F].ud,j=[B];P&&m.a.Nb(j,P),m.aa.bd(M[F].Kd,j),B.nodeValue="",B.parentNode&&B.parentNode.removeChild(B)}},Uc:function(w){return(w=w.match(/^\[ko_memo\:(.*?)\]$/))?w[1]:null}}})(),m.b("memoization",m.aa),m.b("memoization.memoize",m.aa.Xb),m.b("memoization.unmemoize",m.aa.bd),m.b("memoization.parseMemoText",m.aa.Uc),m.b("memoization.unmemoizeDomNodeAndDescendants",m.aa.cd),m.na=(function(){function _(){if(M){for(var B=M,j=0,k;V<M;)if(k=P[V++]){if(V>B){if(5e3<=++j){V=M,m.a.Gc(Error("'Too much recursion' after processing "+j+" task groups."));break}B=M}try{k()}catch(G){m.a.Gc(G)}}}}function C(){_(),V=M=P.length=0}var w,P=[],M=0,F=1,V=0;return t.MutationObserver?w=(function(B){var j=n.createElement("div");return new MutationObserver(B).observe(j,{attributes:!0}),function(){j.classList.toggle("foo")}})(C):w=n&&"onreadystatechange"in n.createElement("script")?function(B){var j=n.createElement("script");j.onreadystatechange=function(){j.onreadystatechange=null,n.documentElement.removeChild(j),j=null,B()},n.documentElement.appendChild(j)}:function(B){setTimeout(B,0)},{scheduler:w,zb:function(B){return M||m.na.scheduler(C),P[M++]=B,F++},cancel:function(B){B=B-(F-M),B>=V&&B<M&&(P[B]=null)},resetForTesting:function(){var B=M-V;return V=M=P.length=0,B},Sd:_}})(),m.b("tasks",m.na),m.b("tasks.schedule",m.na.zb),m.b("tasks.runEarly",m.na.Sd),m.Ta={throttle:function(_,C){_.throttleEvaluation=C;var w=null;return m.$({read:_,write:function(P){clearTimeout(w),w=m.a.setTimeout(function(){_(P)},C)}})},rateLimit:function(_,C){var w,P,M;typeof C=="number"?w=C:(w=C.timeout,P=C.method),_.Hb=!1,M=typeof P=="function"?P:P=="notifyWhenChangesStop"?f:u,_.ub(function(F){return M(F,w,C)})},deferred:function(_,C){if(C!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");_.Hb||(_.Hb=!0,_.ub(function(w){var P,M=!1;return function(){if(!M){m.na.cancel(P),P=m.na.zb(w);try{M=!0,_.notifySubscribers(e,"dirty")}finally{M=!1}}}}))},notify:function(_,C){_.equalityComparer=C=="always"?null:c}};var y={undefined:1,boolean:1,number:1,string:1};m.b("extenders",m.Ta),m.ic=function(_,C,w){this.da=_,this.lc=C,this.mc=w,this.Ib=!1,this.fb=this.Jb=null,m.L(this,"dispose",this.s),m.L(this,"disposeWhenNodeIsRemoved",this.l)},m.ic.prototype.s=function(){this.Ib||(this.fb&&m.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},m.ic.prototype.l=function(_){this.Jb=_,m.a.K.za(_,this.fb=this.s.bind(this))},m.T=function(){m.a.Ab(this,A),A.qb(this)};var A={qb:function(_){_.U={change:[]},_.sc=1},subscribe:function(_,C,w){var P=this;w=w||"change";var M=new m.ic(P,C?_.bind(C):_,function(){m.a.Pa(P.U[w],M),P.hb&&P.hb(w)});return P.Qa&&P.Qa(w),P.U[w]||(P.U[w]=[]),P.U[w].push(M),M},notifySubscribers:function(_,C){if(C=C||"change",C==="change"&&this.Gb(),this.Wa(C)){var w=C==="change"&&this.ed||this.U[C].slice(0);try{m.u.xc();for(var P=0,M;M=w[P];++P)M.Ib||M.lc(_)}finally{m.u.end()}}},ob:function(){return this.sc},Dd:function(_){return this.ob()!==_},Gb:function(){++this.sc},ub:function(_){var C=this,w=m.O(C),P,M,F,V,B;C.gb||(C.gb=C.notifySubscribers,C.notifySubscribers=d);var j=_(function(){C.Ja=!1,w&&V===C&&(V=C.nc?C.nc():C());var k=M||B&&C.sb(F,V);B=M=P=!1,k&&C.gb(F=V)});C.qc=function(k,G){G&&C.Ja||(B=!G),C.ed=C.U.change.slice(0),C.Ja=P=!0,V=k,j()},C.pc=function(k){P||(F=k,C.gb(k,"beforeChange"))},C.rc=function(){B=!0},C.gd=function(){C.sb(F,C.v(!0))&&(M=!0)}},Wa:function(_){return this.U[_]&&this.U[_].length},Bd:function(_){if(_)return this.U[_]&&this.U[_].length||0;var C=0;return m.a.P(this.U,function(w,P){w!=="dirty"&&(C+=P.length)}),C},sb:function(_,C){return!this.equalityComparer||!this.equalityComparer(_,C)},toString:function(){return"[object Object]"},extend:function(_){var C=this;return _&&m.a.P(_,function(w,P){var M=m.Ta[w];typeof M=="function"&&(C=M(C,P)||C)}),C}};m.L(A,"init",A.qb),m.L(A,"subscribe",A.subscribe),m.L(A,"extend",A.extend),m.L(A,"getSubscriptionsCount",A.Bd),m.a.Ba&&m.a.setPrototypeOf(A,Function.prototype),m.T.fn=A,m.Qc=function(_){return _!=null&&typeof _.subscribe=="function"&&typeof _.notifySubscribers=="function"},m.b("subscribable",m.T),m.b("isSubscribable",m.Qc),m.S=m.u=(function(){function _(F){w.push(P),P=F}function C(){P=w.pop()}var w=[],P,M=0;return{xc:_,end:C,cc:function(F){if(P){if(!m.Qc(F))throw Error("Only subscribable things can act as dependencies");P.od.call(P.pd,F,F.fd||(F.fd=++M))}},G:function(F,V,B){try{return _(),F.apply(V,B||[])}finally{C()}},qa:function(){if(P)return P.o.qa()},Va:function(){if(P)return P.o.Va()},Ya:function(){if(P)return P.Ya},o:function(){if(P)return P.o}}})(),m.b("computedContext",m.S),m.b("computedContext.getDependenciesCount",m.S.qa),m.b("computedContext.getDependencies",m.S.Va),m.b("computedContext.isInitial",m.S.Ya),m.b("computedContext.registerDependency",m.S.cc),m.b("ignoreDependencies",m.Yd=m.u.G);var b=m.a.Da("_latestValue");m.ta=function(_){function C(){return 0<arguments.length?(C.sb(C[b],arguments[0])&&(C.ya(),C[b]=arguments[0],C.xa()),this):(m.u.cc(C),C[b])}return C[b]=_,m.a.Ba||m.a.extend(C,m.T.fn),m.T.fn.qb(C),m.a.Ab(C,x),m.options.deferUpdates&&m.Ta.deferred(C,!0),C};var x={equalityComparer:c,v:function(){return this[b]},xa:function(){this.notifySubscribers(this[b],"spectate"),this.notifySubscribers(this[b])},ya:function(){this.notifySubscribers(this[b],"beforeChange")}};m.a.Ba&&m.a.setPrototypeOf(x,m.T.fn);var T=m.ta.Ma="__ko_proto__";x[T]=m.ta,m.O=function(_){if((_=typeof _=="function"&&_[T])&&_!==x[T]&&_!==m.o.fn[T])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!_},m.Za=function(_){return typeof _=="function"&&(_[T]===x[T]||_[T]===m.o.fn[T]&&_.Nc)},m.b("observable",m.ta),m.b("isObservable",m.O),m.b("isWriteableObservable",m.Za),m.b("isWritableObservable",m.Za),m.b("observable.fn",x),m.L(x,"peek",x.v),m.L(x,"valueHasMutated",x.xa),m.L(x,"valueWillMutate",x.ya),m.Ha=function(_){if(_=_||[],typeof _!="object"||!("length"in _))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return _=m.ta(_),m.a.Ab(_,m.Ha.fn),_.extend({trackArrayChanges:!0})},m.Ha.fn={remove:function(_){for(var C=this.v(),w=[],P=typeof _!="function"||m.O(_)?function(V){return V===_}:_,M=0;M<C.length;M++){var F=C[M];if(P(F)){if(w.length===0&&this.ya(),C[M]!==F)throw Error("Array modified during remove; cannot remove item");w.push(F),C.splice(M,1),M--}}return w.length&&this.xa(),w},removeAll:function(_){if(_===e){var C=this.v(),w=C.slice(0);return this.ya(),C.splice(0,C.length),this.xa(),w}return _?this.remove(function(P){return 0<=m.a.A(_,P)}):[]},destroy:function(_){var C=this.v(),w=typeof _!="function"||m.O(_)?function(F){return F===_}:_;this.ya();for(var P=C.length-1;0<=P;P--){var M=C[P];w(M)&&(M._destroy=!0)}this.xa()},destroyAll:function(_){return _===e?this.destroy(function(){return!0}):_?this.destroy(function(C){return 0<=m.a.A(_,C)}):[]},indexOf:function(_){var C=this();return m.a.A(C,_)},replace:function(_,C){var w=this.indexOf(_);0<=w&&(this.ya(),this.v()[w]=C,this.xa())},sorted:function(_){var C=this().slice(0);return _?C.sort(_):C.sort()},reversed:function(){return this().slice(0).reverse()}},m.a.Ba&&m.a.setPrototypeOf(m.Ha.fn,m.ta.fn),m.a.D("pop push reverse shift sort splice unshift".split(" "),function(_){m.Ha.fn[_]=function(){var C=this.v();this.ya(),this.zc(C,_,arguments);var w=C[_].apply(C,arguments);return this.xa(),w===C?this:w}}),m.a.D(["slice"],function(_){m.Ha.fn[_]=function(){var C=this();return C[_].apply(C,arguments)}}),m.Pc=function(_){return m.O(_)&&typeof _.remove=="function"&&typeof _.push=="function"},m.b("observableArray",m.Ha),m.b("isObservableArray",m.Pc),m.Ta.trackArrayChanges=function(_,C){function w(){function q(){if(B){var Q=[].concat(_.v()||[]),W;_.Wa("arrayChange")&&((!M||1<B)&&(M=m.a.Pb(j,Q,_.Ob)),W=M),j=Q,M=null,B=0,W&&W.length&&_.notifySubscribers(W,"arrayChange")}}P?q():(P=!0,V=_.subscribe(function(){++B},null,"spectate"),j=[].concat(_.v()||[]),M=null,F=_.subscribe(q))}if(_.Ob={},C&&typeof C=="object"&&m.a.extend(_.Ob,C),_.Ob.sparse=!0,!_.zc){var P=!1,M=null,F,V,B=0,j,k=_.Qa,G=_.hb;_.Qa=function(q){k&&k.call(_,q),q==="arrayChange"&&w()},_.hb=function(q){G&&G.call(_,q),q!=="arrayChange"||_.Wa("arrayChange")||(F&&F.s(),V&&V.s(),V=F=null,P=!1,j=e)},_.zc=function(q,Q,W){function J(Se,Re,Qe){return Z[Z.length]={status:Se,value:Re,index:Qe}}if(P&&!B){var Z=[],ae=q.length,Ae=W.length,fe=0;switch(Q){case"push":fe=ae;case"unshift":for(Q=0;Q<Ae;Q++)J("added",W[Q],fe+Q);break;case"pop":fe=ae-1;case"shift":ae&&J("deleted",q[fe],fe);break;case"splice":Q=Math.min(Math.max(0,0>W[0]?ae+W[0]:W[0]),ae);for(var ae=Ae===1?ae:Math.min(Q+(W[1]||0),ae),Ae=Q+Ae-2,fe=Math.max(ae,Ae),xe=[],ge=[],we=2;Q<fe;++Q,++we)Q<ae&&ge.push(J("deleted",q[Q],Q)),Q<Ae&&xe.push(J("added",W[we],Q));m.a.Kc(ge,xe);break;default:return}M=Z}}}};var E=m.a.Da("_state");m.o=m.$=function(_,C,w){function P(){if(0<arguments.length){if(typeof M=="function")M.apply(F.nb,arguments);else throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return this}return F.ra||m.u.cc(P),(F.ka||F.J&&P.Xa())&&P.ha(),F.X}if(typeof _=="object"?w=_:(w=w||{},_&&(w.read=_)),typeof w.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var M=w.write,F={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:w.read,nb:C||w.owner,l:w.disposeWhenNodeIsRemoved||w.l||null,Sa:w.disposeWhen||w.Sa,Rb:null,I:{},V:0,Ic:null};return P[E]=F,P.Nc=typeof M=="function",m.a.Ba||m.a.extend(P,m.T.fn),m.T.fn.qb(P),m.a.Ab(P,v),w.pure?(F.wb=!0,F.J=!0,m.a.extend(P,S)):w.deferEvaluation&&m.a.extend(P,I),m.options.deferUpdates&&m.Ta.deferred(P,!0),F.l&&(F.jc=!0,F.l.nodeType||(F.l=null)),F.J||w.deferEvaluation||P.ha(),F.l&&P.ja()&&m.a.K.za(F.l,F.Rb=function(){P.s()}),P};var v={equalityComparer:c,qa:function(){return this[E].V},Va:function(){var _=[];return m.a.P(this[E].I,function(C,w){_[w.Ka]=w.da}),_},Vb:function(_){if(!this[E].V)return!1;var C=this.Va();return m.a.A(C,_)!==-1?!0:!!m.a.Lb(C,function(w){return w.Vb&&w.Vb(_)})},uc:function(_,C,w){if(this[E].wb&&C===this)throw Error("A 'pure' computed must not be called recursively");this[E].I[_]=w,w.Ka=this[E].V++,w.La=C.ob()},Xa:function(){var _,C,w=this[E].I;for(_ in w)if(Object.prototype.hasOwnProperty.call(w,_)&&(C=w[_],this.Ia&&C.da.Ja||C.da.Dd(C.La)))return!0},Jd:function(){this.Ia&&!this[E].rb&&this.Ia(!1)},ja:function(){var _=this[E];return _.ka||0<_.V},Rd:function(){this.Ja?this[E].ka&&(this[E].sa=!0):this.Hc()},$c:function(_){if(_.Hb){var C=_.subscribe(this.Jd,this,"dirty"),w=_.subscribe(this.Rd,this);return{da:_,s:function(){C.s(),w.s()}}}return _.subscribe(this.Hc,this)},Hc:function(){var _=this,C=_.throttleEvaluation;C&&0<=C?(clearTimeout(this[E].Ic),this[E].Ic=m.a.setTimeout(function(){_.ha(!0)},C)):_.Ia?_.Ia(!0):_.ha(!0)},ha:function(_){var C=this[E],w=C.Sa,P=!1;if(!C.rb&&!C.ra){if(C.l&&!m.a.Sb(C.l)||w&&w()){if(!C.jc){this.s();return}}else C.jc=!1;C.rb=!0;try{P=this.zd(_)}finally{C.rb=!1}return P}},zd:function(_){var C=this[E],P=!1,w=C.wb?e:!C.V,P={qd:this,mb:C.I,Qb:C.V};m.u.xc({pd:P,od:g,o:this,Ya:w}),C.I={},C.V=0;var M=this.yd(C,P);return C.V?P=this.sb(C.X,M):(this.s(),P=!0),P&&(C.J?this.Gb():this.notifySubscribers(C.X,"beforeChange"),C.X=M,this.notifySubscribers(C.X,"spectate"),!C.J&&_&&this.notifySubscribers(C.X),this.rc&&this.rc()),w&&this.notifySubscribers(C.X,"awake"),P},yd:function(_,C){try{var w=_.Wc;return _.nb?w.call(_.nb):w()}finally{m.u.end(),C.Qb&&!_.J&&m.a.P(C.mb,p),_.sa=_.ka=!1}},v:function(_){var C=this[E];return(C.ka&&(_||!C.V)||C.J&&this.Xa())&&this.ha(),C.X},ub:function(_){m.T.fn.ub.call(this,_),this.nc=function(){return this[E].J||(this[E].sa?this.ha():this[E].ka=!1),this[E].X},this.Ia=function(C){this.pc(this[E].X),this[E].ka=!0,C&&(this[E].sa=!0),this.qc(this,!C)}},s:function(){var _=this[E];!_.J&&_.I&&m.a.P(_.I,function(C,w){w.s&&w.s()}),_.l&&_.Rb&&m.a.K.yb(_.l,_.Rb),_.I=e,_.V=0,_.ra=!0,_.sa=!1,_.ka=!1,_.J=!1,_.l=e,_.Sa=e,_.Wc=e,this.Nc||(_.nb=e)}},S={Qa:function(_){var C=this,w=C[E];if(!w.ra&&w.J&&_=="change"){if(w.J=!1,w.sa||C.Xa())w.I=null,w.V=0,C.ha()&&C.Gb();else{var P=[];m.a.P(w.I,function(M,F){P[F.Ka]=M}),m.a.D(P,function(M,F){var V=w.I[M],B=C.$c(V.da);B.Ka=F,B.La=V.La,w.I[M]=B}),C.Xa()&&C.ha()&&C.Gb()}w.ra||C.notifySubscribers(w.X,"awake")}},hb:function(_){var C=this[E];C.ra||_!="change"||this.Wa("change")||(m.a.P(C.I,function(w,P){P.s&&(C.I[w]={da:P.da,Ka:P.Ka,La:P.La},P.s())}),C.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var _=this[E];return _.J&&(_.sa||this.Xa())&&this.ha(),m.T.fn.ob.call(this)}},I={Qa:function(_){_!="change"&&_!="beforeChange"||this.v()}};m.a.Ba&&m.a.setPrototypeOf(v,m.T.fn);var R=m.ta.Ma;v[R]=m.o,m.Oc=function(_){return typeof _=="function"&&_[R]===v[R]},m.Fd=function(_){return m.Oc(_)&&_[E]&&_[E].wb},m.b("computed",m.o),m.b("dependentObservable",m.o),m.b("isComputed",m.Oc),m.b("isPureComputed",m.Fd),m.b("computed.fn",v),m.L(v,"peek",v.v),m.L(v,"dispose",v.s),m.L(v,"isActive",v.ja),m.L(v,"getDependenciesCount",v.qa),m.L(v,"getDependencies",v.Va),m.xb=function(_,C){return typeof _=="function"?m.o(_,C,{pure:!0}):(_=m.a.extend({},_),_.pure=!0,m.o(_,C))},m.b("pureComputed",m.xb),(function(){function _(P,M,F){if(F=F||new w,P=M(P),typeof P!="object"||P===null||P===e||P instanceof RegExp||P instanceof Date||P instanceof String||P instanceof Number||P instanceof Boolean)return P;var V=P instanceof Array?[]:{};return F.save(P,V),C(P,function(B){var j=M(P[B]);switch(typeof j){case"boolean":case"number":case"string":case"function":V[B]=j;break;case"object":case"undefined":var k=F.get(j);V[B]=k!==e?k:_(j,M,F)}}),V}function C(P,M){if(P instanceof Array){for(var F=0;F<P.length;F++)M(F);typeof P.toJSON=="function"&&M("toJSON")}else for(F in P)M(F)}function w(){this.keys=[],this.values=[]}m.ad=function(P){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return _(P,function(M){for(var F=0;m.O(M)&&10>F;F++)M=M();return M})},m.toJSON=function(P,M,F){return P=m.ad(P),m.a.hc(P,M,F)},w.prototype={constructor:w,save:function(P,M){var F=m.a.A(this.keys,P);0<=F?this.values[F]=M:(this.keys.push(P),this.values.push(M))},get:function(P){return P=m.a.A(this.keys,P),0<=P?this.values[P]:e}}})(),m.b("toJS",m.ad),m.b("toJSON",m.toJSON),m.Wd=function(_,C,w){function P(M){var F=m.xb(_,w).extend({ma:"always"}),V=F.subscribe(function(B){B&&(V.s(),M(B))});return F.notifySubscribers(F.v()),V}return typeof Promise!="function"||C?P(C.bind(w)):new Promise(P)},m.b("when",m.Wd),(function(){m.w={M:function(_){switch(m.a.R(_)){case"option":return _.__ko__hasDomDataOptionValue__===!0?m.a.g.get(_,m.c.options.$b):7>=m.a.W?_.getAttributeNode("value")&&_.getAttributeNode("value").specified?_.value:_.text:_.value;case"select":return 0<=_.selectedIndex?m.w.M(_.options[_.selectedIndex]):e;default:return _.value}},cb:function(_,C,w){switch(m.a.R(_)){case"option":typeof C=="string"?(m.a.g.set(_,m.c.options.$b,e),"__ko__hasDomDataOptionValue__"in _&&delete _.__ko__hasDomDataOptionValue__,_.value=C):(m.a.g.set(_,m.c.options.$b,C),_.__ko__hasDomDataOptionValue__=!0,_.value=typeof C=="number"?C:"");break;case"select":(C===""||C===null)&&(C=e);for(var P=-1,M=0,F=_.options.length,V;M<F;++M)if(V=m.w.M(_.options[M]),V==C||V===""&&C===e){P=M;break}(w||0<=P||C===e&&1<_.size)&&(_.selectedIndex=P,m.a.W===6&&m.a.setTimeout(function(){_.selectedIndex=P},0));break;default:(C===null||C===e)&&(C=""),_.value=C}}}})(),m.b("selectExtensions",m.w),m.b("selectExtensions.readValue",m.w.M),m.b("selectExtensions.writeValue",m.w.cb),m.m=(function(){function _(B){B=m.a.Db(B),B.charCodeAt(0)===123&&(B=B.slice(1,-1)),B+=`
,`;var j=[],k=B.match(P),G,q=[],Q=0;if(1<k.length){for(var W=0,J;J=k[W];++W){var Z=J.charCodeAt(0);if(Z===44){if(0>=Q){j.push(G&&q.length?{key:G,value:q.join("")}:{unknown:G||q.join("")}),G=Q=0,q=[];continue}}else if(Z===58){if(!Q&&!G&&q.length===1){G=q.pop();continue}}else{if(Z===47&&1<J.length&&(J.charCodeAt(1)===47||J.charCodeAt(1)===42))continue;Z===47&&W&&1<J.length?(Z=k[W-1].match(M))&&!F[Z[0]]&&(B=B.substr(B.indexOf(J)+1),k=B.match(P),W=-1,J="/"):Z===40||Z===123||Z===91?++Q:Z===41||Z===125||Z===93?--Q:G||q.length||Z!==34&&Z!==39||(J=J.slice(1,-1))}q.push(J)}if(0<Q)throw Error("Unbalanced parentheses, braces, or brackets")}return j}var C=["true","false","null","undefined"],w=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,P=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*
|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),M=/[\])"'A-Za-z0-9_$]+$/,F={in:1,return:1,typeof:1},V={};return{Ra:[],wa:V,ac:_,vb:function(B,j){function k(Z,ae){var Ae;if(!W){var fe=m.getBindingHandler(Z);if(fe&&fe.preprocess&&!(ae=fe.preprocess(ae,Z,k)))return;(fe=V[Z])&&(Ae=ae,0<=m.a.A(C,Ae)?Ae=!1:(fe=Ae.match(w),Ae=fe===null?!1:fe[1]?"Object("+fe[1]+")"+fe[2]:Ae),fe=Ae),fe&&q.push("'"+(typeof V[Z]=="string"?V[Z]:Z)+"':function(_z){"+Ae+"=_z}")}Q&&(ae="function(){return "+ae+" }"),G.push("'"+Z+"':"+ae)}j=j||{};var G=[],q=[],Q=j.valueAccessors,W=j.bindingParams,J=typeof B=="string"?_(B):B;return m.a.D(J,function(Z){k(Z.key||Z.unknown,Z.value)}),q.length&&k("_ko_property_writers","{"+q.join(",")+" }"),G.join(",")},Id:function(B,j){for(var k=0;k<B.length;k++)if(B[k].key==j)return!0;return!1},eb:function(B,j,k,G,q){B&&m.O(B)?!m.Za(B)||q&&B.v()===G||B(G):(B=j.get("_ko_property_writers"))&&B[k]&&B[k](G)}}})(),m.b("expressionRewriting",m.m),m.b("expressionRewriting.bindingRewriteValidators",m.m.Ra),m.b("expressionRewriting.parseObjectLiteral",m.m.ac),m.b("expressionRewriting.preProcessBindings",m.m.vb),m.b("expressionRewriting._twoWayBindings",m.m.wa),m.b("jsonExpressionRewriting",m.m),m.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",m.m.vb),(function(){function _(k){return k.nodeType==8&&F.test(M?k.text:k.nodeValue)}function C(k){return k.nodeType==8&&V.test(M?k.text:k.nodeValue)}function w(k,G){for(var q=k,Q=1,W=[];q=q.nextSibling;){if(C(q)&&(m.a.g.set(q,j,!0),Q--,Q===0))return W;W.push(q),_(q)&&Q++}if(!G)throw Error("Cannot find closing comment tag to match: "+k.nodeValue);return null}function P(k,G){var q=w(k,G);return q?0<q.length?q[q.length-1].nextSibling:k.nextSibling:null}var M=n&&n.createComment("test").text==="<!--test-->",F=M?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,V=M?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,B={ul:!0,ol:!0},j="__ko_matchedEndComment__";m.h={ea:{},childNodes:function(k){return _(k)?w(k):k.childNodes},Ea:function(k){if(_(k)){k=m.h.childNodes(k);for(var G=0,q=k.length;G<q;G++)m.removeNode(k[G])}else m.a.Tb(k)},va:function(k,G){if(_(k)){m.h.Ea(k);for(var q=k.nextSibling,Q=0,W=G.length;Q<W;Q++)q.parentNode.insertBefore(G[Q],q)}else m.a.va(k,G)},Vc:function(k,G){var q;_(k)?(q=k.nextSibling,k=k.parentNode):q=k.firstChild,q?G!==q&&k.insertBefore(G,q):k.appendChild(G)},Wb:function(k,G,q){q?(q=q.nextSibling,_(k)&&(k=k.parentNode),q?G!==q&&k.insertBefore(G,q):k.appendChild(G)):m.h.Vc(k,G)},firstChild:function(k){if(_(k))return!k.nextSibling||C(k.nextSibling)?null:k.nextSibling;if(k.firstChild&&C(k.firstChild))throw Error("Found invalid end comment, as the first child of "+k);return k.firstChild},nextSibling:function(k){if(_(k)&&(k=P(k)),k.nextSibling&&C(k.nextSibling)){var G=k.nextSibling;if(C(G)&&!m.a.g.get(G,j))throw Error("Found end comment without a matching opening comment, as child of "+k);return null}return k.nextSibling},Cd:_,Vd:function(k){return(k=(M?k.text:k.nodeValue).match(F))?k[1]:null},Sc:function(k){if(B[m.a.R(k)]){var G=k.firstChild;if(G)do if(G.nodeType===1){var q;q=G.firstChild;var Q=null;if(q)do if(Q)Q.push(q);else if(_(q)){var W=P(q,!0);W?q=W:Q=[q]}else C(q)&&(Q=[q]);while(q=q.nextSibling);if(q=Q)for(Q=G.nextSibling,W=0;W<q.length;W++)Q?k.insertBefore(q[W],Q):k.appendChild(q[W])}while(G=G.nextSibling)}}}})(),m.b("virtualElements",m.h),m.b("virtualElements.allowedBindings",m.h.ea),m.b("virtualElements.emptyNode",m.h.Ea),m.b("virtualElements.insertAfter",m.h.Wb),m.b("virtualElements.prepend",m.h.Vc),m.b("virtualElements.setDomNodeChildren",m.h.va),(function(){m.ga=function(){this.nd={}},m.a.extend(m.ga.prototype,{nodeHasBindings:function(_){switch(_.nodeType){case 1:return _.getAttribute("data-bind")!=null||m.j.getComponentNameForNode(_);case 8:return m.h.Cd(_);default:return!1}},getBindings:function(_,C){var w=this.getBindingsString(_,C),w=w?this.parseBindingsString(w,C,_):null;return m.j.tc(w,_,C,!1)},getBindingAccessors:function(_,C){var w=this.getBindingsString(_,C),w=w?this.parseBindingsString(w,C,_,{valueAccessors:!0}):null;return m.j.tc(w,_,C,!0)},getBindingsString:function(_){switch(_.nodeType){case 1:return _.getAttribute("data-bind");case 8:return m.h.Vd(_);default:return null}},parseBindingsString:function(_,C,w,P){try{var M=this.nd,F=_+(P&&P.valueAccessors||""),V;if(!(V=M[F])){var B,j="with($context){with($data||{}){return{"+m.m.vb(_,P)+"}}}";B=new Function("$context","$element",j),V=M[F]=B}return V(C,w)}catch(k){throw k.message=`Unable to parse bindings.
Bindings value: `+_+`
Message: `+k.message,k}}}),m.ga.instance=new m.ga})(),m.b("bindingProvider",m.ga),(function(){function _(fe){var xe=(fe=m.a.g.get(fe,Ae))&&fe.N;xe&&(fe.N=null,xe.Tc())}function C(fe,xe,ge){this.node=fe,this.yc=xe,this.kb=[],this.H=!1,xe.N||m.a.K.za(fe,_),ge&&ge.N&&(ge.N.kb.push(fe),this.Kb=ge)}function w(fe){return function(){return fe}}function P(fe){return fe()}function M(fe){return m.a.Ga(m.u.G(fe),function(xe,ge){return function(){return fe()[ge]}})}function F(fe,xe,ge){return typeof fe=="function"?M(fe.bind(null,xe,ge)):m.a.Ga(fe,w)}function V(fe,xe){return M(this.getBindings.bind(this,fe,xe))}function B(fe,xe){var ge=m.h.firstChild(xe);if(ge){var we,Se=m.ga.instance,Re=Se.preprocessNode;if(Re){for(;we=ge;)ge=m.h.nextSibling(we),Re.call(Se,we);ge=m.h.firstChild(xe)}for(;we=ge;)ge=m.h.nextSibling(we),j(fe,we)}m.i.ma(xe,m.i.H)}function j(fe,xe){var ge=fe,we=xe.nodeType===1;we&&m.h.Sc(xe),(we||m.ga.instance.nodeHasBindings(xe))&&(ge=G(xe,null,fe).bindingContextForDescendants),ge&&!Z[m.a.R(xe)]&&B(ge,xe)}function k(fe){var xe=[],ge={},we=[];return m.a.P(fe,function Se(Re){if(!ge[Re]){var Qe=m.getBindingHandler(Re);Qe&&(Qe.after&&(we.push(Re),m.a.D(Qe.after,function(He){if(fe[He]){if(m.a.A(we,He)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+we.join(", "));Se(He)}}),we.length--),xe.push({key:Re,Mc:Qe})),ge[Re]=!0}}),xe}function G(fe,xe,ge){var we=m.a.g.Ub(fe,Ae,{}),Se=we.hd;if(!xe){if(Se)throw Error("You cannot apply bindings multiple times to the same element.");we.hd=!0}Se||(we.context=ge),we.Zb||(we.Zb={});var Re;if(xe&&typeof xe!="function")Re=xe;else{var Qe=m.ga.instance,He=Qe.getBindingAccessors||V,Xe=m.$(function(){return(Re=xe?xe(ge,fe):He.call(Qe,fe,ge))&&(ge[Q]&&ge[Q](),ge[J]&&ge[J]()),Re},null,{l:fe});Re&&Xe.ja()||(Xe=null)}var $e=ge,Pe;if(Re){var qe=function(){return m.a.Ga(Xe?Xe():Re,P)},st=Xe?function(vt){return function(){return P(Xe()[vt])}}:function(vt){return Re[vt]};qe.get=function(vt){return Re[vt]&&P(st(vt))},qe.has=function(vt){return vt in Re},m.i.H in Re&&m.i.subscribe(fe,m.i.H,function(){var vt=(0,Re[m.i.H])();if(vt){var Gt=m.h.childNodes(fe);Gt.length&&vt(Gt,m.Ec(Gt[0]))}}),m.i.pa in Re&&($e=m.i.Cb(fe,ge),m.i.subscribe(fe,m.i.pa,function(){var vt=(0,Re[m.i.pa])();vt&&m.h.firstChild(fe)&&vt(fe)})),we=k(Re),m.a.D(we,function(vt){var Gt=vt.Mc.init,lt=vt.Mc.update,mt=vt.key;if(fe.nodeType===8&&!m.h.ea[mt])throw Error("The binding '"+mt+"' cannot be used with virtual elements");try{typeof Gt=="function"&&m.u.G(function(){var ft=Gt(fe,st(mt),qe,$e.$data,$e);if(ft&&ft.controlsDescendantBindings){if(Pe!==e)throw Error("Multiple bindings ("+Pe+" and "+mt+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Pe=mt}}),typeof lt=="function"&&m.$(function(){lt(fe,st(mt),qe,$e.$data,$e)},null,{l:fe})}catch(ft){throw ft.message='Unable to process binding "'+mt+": "+Re[mt]+`"
Message: `+ft.message,ft}})}return we=Pe===e,{shouldBindDescendants:we,bindingContextForDescendants:we&&$e}}function q(fe,xe){return fe&&fe instanceof m.fa?fe:new m.fa(fe,e,e,xe)}var Q=m.a.Da("_subscribable"),W=m.a.Da("_ancestorBindingInfo"),J=m.a.Da("_dataDependency");m.c={};var Z={script:!0,textarea:!0,template:!0};m.getBindingHandler=function(fe){return m.c[fe]};var ae={};m.fa=function(fe,xe,ge,we,Se){function Re(){var st=$e?Xe():Xe,vt=m.a.f(st);return xe?(m.a.extend(Qe,xe),W in xe&&(Qe[W]=xe[W])):(Qe.$parents=[],Qe.$root=vt,Qe.ko=m),Qe[Q]=Pe,He?vt=Qe.$data:(Qe.$rawData=st,Qe.$data=vt),ge&&(Qe[ge]=vt),we&&we(Qe,xe,vt),xe&&xe[Q]&&!m.S.o().Vb(xe[Q])&&xe[Q](),qe&&(Qe[J]=qe),Qe.$data}var Qe=this,He=fe===ae,Xe=He?e:fe,$e=typeof Xe=="function"&&!m.O(Xe),Pe,qe=Se&&Se.dataDependency;Se&&Se.exportDependencies?Re():(Pe=m.xb(Re),Pe.v(),Pe.ja()?Pe.equalityComparer=null:Qe[Q]=e)},m.fa.prototype.createChildContext=function(fe,xe,ge,we){if(!we&&xe&&typeof xe=="object"&&(we=xe,xe=we.as,ge=we.extend),xe&&we&&we.noChildContext){var Se=typeof fe=="function"&&!m.O(fe);return new m.fa(ae,this,null,function(Re){ge&&ge(Re),Re[xe]=Se?fe():fe},we)}return new m.fa(fe,this,xe,function(Re,Qe){Re.$parentContext=Qe,Re.$parent=Qe.$data,Re.$parents=(Qe.$parents||[]).slice(0),Re.$parents.unshift(Re.$parent),ge&&ge(Re)},we)},m.fa.prototype.extend=function(fe,xe){return new m.fa(ae,this,null,function(ge){m.a.extend(ge,typeof fe=="function"?fe(ge):fe)},xe)};var Ae=m.a.g.Z();C.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},C.prototype.sd=function(fe){m.a.Pa(this.kb,fe),!this.kb.length&&this.H&&this.Cc()},C.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,m.a.K.yb(this.node,_),m.i.ma(this.node,m.i.pa),this.Tc())},m.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(fe,xe,ge,we,Se){var Re=m.a.g.Ub(fe,Ae,{});return Re.Fa||(Re.Fa=new m.T),Se&&Se.notifyImmediately&&Re.Zb[xe]&&m.u.G(ge,we,[fe]),Re.Fa.subscribe(ge,we,xe)},ma:function(fe,xe){var ge=m.a.g.get(fe,Ae);if(ge&&(ge.Zb[xe]=!0,ge.Fa&&ge.Fa.notifySubscribers(fe,xe),xe==m.i.H)){if(ge.N)ge.N.Cc();else if(ge.N===e&&ge.Fa&&ge.Fa.Wa(m.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(fe,xe){var ge=m.a.g.Ub(fe,Ae,{});return ge.N||(ge.N=new C(fe,ge,xe[W])),xe[W]==ge?xe:xe.extend(function(we){we[W]=ge})}},m.Td=function(fe){return(fe=m.a.g.get(fe,Ae))&&fe.context},m.ib=function(fe,xe,ge){return fe.nodeType===1&&m.h.Sc(fe),G(fe,xe,q(ge))},m.ld=function(fe,xe,ge){return ge=q(ge),m.ib(fe,F(xe,ge,fe),ge)},m.Oa=function(fe,xe){xe.nodeType!==1&&xe.nodeType!==8||B(q(fe),xe)},m.vc=function(fe,xe,ge){if(!r&&t.jQuery&&(r=t.jQuery),2>arguments.length){if(xe=n.body,!xe)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!xe||xe.nodeType!==1&&xe.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");j(q(fe,ge),xe)},m.Dc=function(fe){return!fe||fe.nodeType!==1&&fe.nodeType!==8?e:m.Td(fe)},m.Ec=function(fe){return(fe=m.Dc(fe))?fe.$data:e},m.b("bindingHandlers",m.c),m.b("bindingEvent",m.i),m.b("bindingEvent.subscribe",m.i.subscribe),m.b("bindingEvent.startPossiblyAsyncContentBinding",m.i.Cb),m.b("applyBindings",m.vc),m.b("applyBindingsToDescendants",m.Oa),m.b("applyBindingAccessorsToNode",m.ib),m.b("applyBindingsToNode",m.ld),m.b("contextFor",m.Dc),m.b("dataFor",m.Ec)})(),(function(_){function C(V,B){var j=Object.prototype.hasOwnProperty.call(M,V)?M[V]:_,k;j?j.subscribe(B):(j=M[V]=new m.T,j.subscribe(B),w(V,function(G,q){var Q=!(!q||!q.synchronous);F[V]={definition:G,Gd:Q},delete M[V],k||Q?j.notifySubscribers(G):m.na.zb(function(){j.notifySubscribers(G)})}),k=!0)}function w(V,B){P("getConfig",[V],function(j){j?P("loadComponent",[V,j],function(k){B(k,j)}):B(null,null)})}function P(V,B,j,k){k||(k=m.j.loaders.slice(0));var G=k.shift();if(G){var q=G[V];if(q){var Q=!1;if(q.apply(G,B.concat(function(W){Q?j(null):W!==null?j(W):P(V,B,j,k)}))!==_&&(Q=!0,!G.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else P(V,B,j,k)}else j(null)}var M={},F={};m.j={get:function(V,B){var j=Object.prototype.hasOwnProperty.call(F,V)?F[V]:_;j?j.Gd?m.u.G(function(){B(j.definition)}):m.na.zb(function(){B(j.definition)}):C(V,B)},Bc:function(V){delete F[V]},oc:P},m.j.loaders=[],m.b("components",m.j),m.b("components.get",m.j.get),m.b("components.clearCachedDefinition",m.j.Bc)})(),(function(){function _(j,k,G,q){function Q(){--J===0&&q(W)}var W={},J=2,Z=G.template;G=G.viewModel,Z?M(k,Z,function(ae){m.j.oc("loadTemplate",[j,ae],function(Ae){W.template=Ae,Q()})}):Q(),G?M(k,G,function(ae){m.j.oc("loadViewModel",[j,ae],function(Ae){W[B]=Ae,Q()})}):Q()}function C(j,k,G){if(typeof k=="function")G(function(Q){return new k(Q)});else if(typeof k[B]=="function")G(k[B]);else if("instance"in k){var q=k.instance;G(function(){return q})}else"viewModel"in k?C(j,k.viewModel,G):j("Unknown viewModel value: "+k)}function w(j){switch(m.a.R(j)){case"script":return m.a.ua(j.text);case"textarea":return m.a.ua(j.value);case"template":if(P(j.content))return m.a.Ca(j.content.childNodes)}return m.a.Ca(j.childNodes)}function P(j){return t.DocumentFragment?j instanceof DocumentFragment:j&&j.nodeType===11}function M(j,k,G){typeof k.require=="string"?a||t.require?(a||t.require)([k.require],function(q){q&&typeof q=="object"&&q.Xd&&q.default&&(q=q.default),G(q)}):j("Uses require, but no AMD loader is present"):G(k)}function F(j){return function(k){throw Error("Component '"+j+"': "+k)}}var V={};m.j.register=function(j,k){if(!k)throw Error("Invalid configuration for "+j);if(m.j.tb(j))throw Error("Component "+j+" is already registered");V[j]=k},m.j.tb=function(j){return Object.prototype.hasOwnProperty.call(V,j)},m.j.unregister=function(j){delete V[j],m.j.Bc(j)},m.j.Fc={getConfig:function(j,k){k(m.j.tb(j)?V[j]:null)},loadComponent:function(j,k,G){var q=F(j);M(q,k,function(Q){_(j,q,Q,G)})},loadTemplate:function(j,k,G){if(j=F(j),typeof k=="string")G(m.a.ua(k));else if(k instanceof Array)G(k);else if(P(k))G(m.a.la(k.childNodes));else if(k.element)if(k=k.element,t.HTMLElement?k instanceof HTMLElement:k&&k.tagName&&k.nodeType===1)G(w(k));else if(typeof k=="string"){var q=n.getElementById(k);q?G(w(q)):j("Cannot find element with ID "+k)}else j("Unknown element type: "+k);else j("Unknown template value: "+k)},loadViewModel:function(j,k,G){C(F(j),k,G)}};var B="createViewModel";m.b("components.register",m.j.register),m.b("components.isRegistered",m.j.tb),m.b("components.unregister",m.j.unregister),m.b("components.defaultLoader",m.j.Fc),m.j.loaders.push(m.j.Fc),m.j.dd=V})(),(function(){function _(w,P){var M=w.getAttribute("params");if(M){var M=C.parseBindingsString(M,P,w,{valueAccessors:!0,bindingParams:!0}),M=m.a.Ga(M,function(B){return m.o(B,null,{l:w})}),F=m.a.Ga(M,function(B){var j=B.v();return B.ja()?m.o({read:function(){return m.a.f(B())},write:m.Za(j)&&function(k){B()(k)},l:w}):j});return Object.prototype.hasOwnProperty.call(F,"$raw")||(F.$raw=M),F}return{$raw:{}}}m.j.getComponentNameForNode=function(w){var P=m.a.R(w);if(m.j.tb(P)&&(P.indexOf("-")!=-1||""+w=="[object HTMLUnknownElement]"||8>=m.a.W&&w.tagName===P))return P},m.j.tc=function(w,P,M,F){if(P.nodeType===1){var V=m.j.getComponentNameForNode(P);if(V){if(w=w||{},w.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var B={name:V,params:_(P,M)};w.component=F?function(){return B}:B}}return w};var C=new m.ga;9>m.a.W&&(m.j.register=(function(w){return function(P){return w.apply(this,arguments)}})(m.j.register),n.createDocumentFragment=(function(w){return function(){var P=w(),M=m.j.dd,F;for(F in M);return P}})(n.createDocumentFragment))})(),(function(){function _(P,M,F){if(M=M.template,!M)throw Error("Component '"+P+"' has no template");P=m.a.Ca(M),m.h.va(F,P)}function C(P,M,F){var V=P.createViewModel;return V?V.call(P,M,F):M}var w=0;m.c.component={init:function(P,M,F,V,B){function j(){var W=k&&k.dispose;typeof W=="function"&&W.call(k),q&&q.s(),G=k=q=null}var k,G,q,Q=m.a.la(m.h.childNodes(P));return m.h.Ea(P),m.a.K.za(P,j),m.o(function(){var W=m.a.f(M()),J,Z;if(typeof W=="string"?J=W:(J=m.a.f(W.name),Z=m.a.f(W.params)),!J)throw Error("No component name specified");var ae=m.i.Cb(P,B),Ae=G=++w;m.j.get(J,function(fe){if(G===Ae){if(j(),!fe)throw Error("Unknown component '"+J+"'");_(J,fe,P);var xe=C(fe,Z,{element:P,templateNodes:Q});fe=ae.createChildContext(xe,{extend:function(ge){ge.$component=xe,ge.$componentTemplateNodes=Q}}),xe&&xe.koDescendantsComplete&&(q=m.i.subscribe(P,m.i.pa,xe.koDescendantsComplete,xe)),k=xe,m.Oa(fe,P)}})},null,{l:P}),{controlsDescendantBindings:!0}}},m.h.ea.component=!0})();var O={class:"className",for:"htmlFor"};m.c.attr={update:function(_,C){var w=m.a.f(C())||{};m.a.P(w,function(P,M){M=m.a.f(M);var F=P.indexOf(":"),F="lookupNamespaceURI"in _&&0<F&&_.lookupNamespaceURI(P.substr(0,F)),V=M===!1||M===null||M===e;V?F?_.removeAttributeNS(F,P):_.removeAttribute(P):M=M.toString(),8>=m.a.W&&P in O?(P=O[P],V?_.removeAttribute(P):_[P]=M):V||(F?_.setAttributeNS(F,P,M):_.setAttribute(P,M)),P==="name"&&m.a.Yc(_,V?"":M)})}},(function(){m.c.checked={after:["value","attr"],init:function(_,C,w){function P(){var W=_.checked,J=F();if(!m.S.Ya()&&(W||!B&&!m.S.qa())){var Z=m.u.G(C);if(k){var ae=G?Z.v():Z,Ae=Q;Q=J,Ae!==J?W&&(m.a.Na(ae,J,!0),m.a.Na(ae,Ae,!1)):m.a.Na(ae,J,W),G&&m.Za(Z)&&Z(ae)}else V&&(J===e?J=W:W||(J=e)),m.m.eb(Z,w,"checked",J,!0)}}function M(){var W=m.a.f(C()),J=F();k?(_.checked=0<=m.a.A(W,J),Q=J):_.checked=V&&J===e?!!W:F()===W}var F=m.xb(function(){if(w.has("checkedValue"))return m.a.f(w.get("checkedValue"));if(q)return w.has("value")?m.a.f(w.get("value")):_.value}),V=_.type=="checkbox",B=_.type=="radio";if(V||B){var j=C(),k=V&&m.a.f(j)instanceof Array,G=!(k&&j.push&&j.splice),q=B||k,Q=k?F():e;B&&!_.name&&m.c.uniqueName.init(_,function(){return!0}),m.o(P,null,{l:_}),m.a.B(_,"click",P),m.o(M,null,{l:_}),j=e}}},m.m.wa.checked=!0,m.c.checkedValue={update:function(_,C){_.value=m.a.f(C())}}})(),m.c.class={update:function(_,C){var w=m.a.Db(m.a.f(C()));m.a.Eb(_,_.__ko__cssValue,!1),_.__ko__cssValue=w,m.a.Eb(_,w,!0)}},m.c.css={update:function(_,C){var w=m.a.f(C());w!==null&&typeof w=="object"?m.a.P(w,function(P,M){M=m.a.f(M),m.a.Eb(_,P,M)}):m.c.class.update(_,C)}},m.c.enable={update:function(_,C){var w=m.a.f(C());w&&_.disabled?_.removeAttribute("disabled"):w||_.disabled||(_.disabled=!0)}},m.c.disable={update:function(_,C){m.c.enable.update(_,function(){return!m.a.f(C())})}},m.c.event={init:function(_,C,w,P,M){var F=C()||{};m.a.P(F,function(V){typeof V=="string"&&m.a.B(_,V,function(B){var j,k=C()[V];if(k){try{var G=m.a.la(arguments);P=M.$data,G.unshift(P),j=k.apply(P,G)}finally{j!==!0&&(B.preventDefault?B.preventDefault():B.returnValue=!1)}w.get(V+"Bubble")===!1&&(B.cancelBubble=!0,B.stopPropagation&&B.stopPropagation())}})})}},m.c.foreach={Rc:function(_){return function(){var C=_(),w=m.a.bc(C);return!w||typeof w.length=="number"?{foreach:C,templateEngine:m.ba.Ma}:(m.a.f(C),{foreach:w.data,as:w.as,noChildContext:w.noChildContext,includeDestroyed:w.includeDestroyed,afterAdd:w.afterAdd,beforeRemove:w.beforeRemove,afterRender:w.afterRender,beforeMove:w.beforeMove,afterMove:w.afterMove,templateEngine:m.ba.Ma})}},init:function(_,C){return m.c.template.init(_,m.c.foreach.Rc(C))},update:function(_,C,w,P,M){return m.c.template.update(_,m.c.foreach.Rc(C),w,P,M)}},m.m.Ra.foreach=!1,m.h.ea.foreach=!0,m.c.hasfocus={init:function(_,C,w){function P(V){_.__ko_hasfocusUpdating=!0;var B=_.ownerDocument;if("activeElement"in B){var j;try{j=B.activeElement}catch{j=B.body}V=j===_}B=C(),m.m.eb(B,w,"hasfocus",V,!0),_.__ko_hasfocusLastValue=V,_.__ko_hasfocusUpdating=!1}var M=P.bind(null,!0),F=P.bind(null,!1);m.a.B(_,"focus",M),m.a.B(_,"focusin",M),m.a.B(_,"blur",F),m.a.B(_,"focusout",F),_.__ko_hasfocusLastValue=!1},update:function(_,C){var w=!!m.a.f(C());_.__ko_hasfocusUpdating||_.__ko_hasfocusLastValue===w||(w?_.focus():_.blur(),!w&&_.__ko_hasfocusLastValue&&_.ownerDocument.body.focus(),m.u.G(m.a.Fb,null,[_,w?"focusin":"focusout"]))}},m.m.wa.hasfocus=!0,m.c.hasFocus=m.c.hasfocus,m.m.wa.hasFocus="hasfocus",m.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(_,C){m.a.fc(_,C())}},(function(){function _(C,w,P){m.c[C]={init:function(M,F,V,B,j){var k,G,q={},Q,W,J;if(w){B=V.get("as");var Z=V.get("noChildContext");J=!(B&&Z),q={as:B,noChildContext:Z,exportDependencies:J}}return W=(Q=V.get("completeOn")=="render")||V.has(m.i.pa),m.o(function(){var ae=m.a.f(F()),Ae=!P!=!ae,fe=!G,xe;(J||Ae!==k)&&(W&&(j=m.i.Cb(M,j)),Ae&&((!w||J)&&(q.dataDependency=m.S.o()),xe=w?j.createChildContext(typeof ae=="function"?ae:F,q):m.S.qa()?j.extend(null,q):j),fe&&m.S.qa()&&(G=m.a.Ca(m.h.childNodes(M),!0)),Ae?(fe||m.h.va(M,m.a.Ca(G)),m.Oa(xe,M)):(m.h.Ea(M),Q||m.i.ma(M,m.i.H)),k=Ae)},null,{l:M}),{controlsDescendantBindings:!0}}},m.m.Ra[C]=!1,m.h.ea[C]=!0}_("if"),_("ifnot",!1,!0),_("with",!0)})(),m.c.let={init:function(_,C,w,P,M){return C=M.extend(C),m.Oa(C,_),{controlsDescendantBindings:!0}}},m.h.ea.let=!0;var L={};m.c.options={init:function(_){if(m.a.R(_)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<_.length;)_.remove(0);return{controlsDescendantBindings:!0}},update:function(_,C,w){function P(){return m.a.jb(_.options,function(Z){return Z.selected})}function M(Z,ae,Ae){var fe=typeof ae;return fe=="function"?ae(Z):fe=="string"?Z[ae]:Ae}function F(Z,ae){if(W&&k)m.i.ma(_,m.i.H);else if(Q.length){var Ae=0<=m.a.A(Q,m.w.M(ae[0]));m.a.Zc(ae[0],Ae),W&&!Ae&&m.u.G(m.a.Fb,null,[_,"change"])}}var V=_.multiple,B=_.length!=0&&V?_.scrollTop:null,j=m.a.f(C()),k=w.get("valueAllowUnset")&&w.has("value"),G=w.get("optionsIncludeDestroyed");C={};var q,Q=[];k||(V?Q=m.a.Mb(P(),m.w.M):0<=_.selectedIndex&&Q.push(m.w.M(_.options[_.selectedIndex]))),j&&(typeof j.length>"u"&&(j=[j]),q=m.a.jb(j,function(Z){return G||Z===e||Z===null||!m.a.f(Z._destroy)}),w.has("optionsCaption")&&(j=m.a.f(w.get("optionsCaption")),j!==null&&j!==e&&q.unshift(L)));var W=!1;if(C.beforeRemove=function(Z){_.removeChild(Z)},j=F,w.has("optionsAfterRender")&&typeof w.get("optionsAfterRender")=="function"&&(j=function(Z,ae){F(0,ae),m.u.G(w.get("optionsAfterRender"),null,[ae[0],Z!==L?Z:e])}),m.a.ec(_,q,function(Z,ae,Ae){return Ae.length&&(Q=!k&&Ae[0].selected?[m.w.M(Ae[0])]:[],W=!0),ae=_.ownerDocument.createElement("option"),Z===L?(m.a.Bb(ae,w.get("optionsCaption")),m.w.cb(ae,e)):(Ae=M(Z,w.get("optionsValue"),Z),m.w.cb(ae,m.a.f(Ae)),Z=M(Z,w.get("optionsText"),Ae),m.a.Bb(ae,Z)),[ae]},C,j),!k){var J;V?J=Q.length&&P().length<Q.length:J=Q.length&&0<=_.selectedIndex?m.w.M(_.options[_.selectedIndex])!==Q[0]:Q.length||0<=_.selectedIndex,J&&m.u.G(m.a.Fb,null,[_,"change"])}(k||m.S.Ya())&&m.i.ma(_,m.i.H),m.a.wd(_),B&&20<Math.abs(B-_.scrollTop)&&(_.scrollTop=B)}},m.c.options.$b=m.a.g.Z(),m.c.selectedOptions={init:function(_,C,w){function P(){var V=C(),B=[];m.a.D(_.getElementsByTagName("option"),function(j){j.selected&&B.push(m.w.M(j))}),m.m.eb(V,w,"selectedOptions",B)}function M(){var V=m.a.f(C()),B=_.scrollTop;V&&typeof V.length=="number"&&m.a.D(_.getElementsByTagName("option"),function(j){var k=0<=m.a.A(V,m.w.M(j));j.selected!=k&&m.a.Zc(j,k)}),_.scrollTop=B}if(m.a.R(_)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var F;m.i.subscribe(_,m.i.H,function(){F?P():(m.a.B(_,"change",P),F=m.o(M,null,{l:_}))},null,{notifyImmediately:!0})},update:function(){}},m.m.wa.selectedOptions=!0,m.c.style={update:function(_,C){var w=m.a.f(C()||{});m.a.P(w,function(P,M){if(M=m.a.f(M),(M===null||M===e||M===!1)&&(M=""),r)r(_).css(P,M);else if(/^--/.test(P))_.style.setProperty(P,M);else{P=P.replace(/-(\w)/g,function(V,B){return B.toUpperCase()});var F=_.style[P];_.style[P]=M,M===F||_.style[P]!=F||isNaN(M)||(_.style[P]=M+"px")}})}},m.c.submit={init:function(_,C,w,P,M){if(typeof C()!="function")throw Error("The value for a submit binding must be a function");m.a.B(_,"submit",function(F){var V,B=C();try{V=B.call(M.$data,_)}finally{V!==!0&&(F.preventDefault?F.preventDefault():F.returnValue=!1)}})}},m.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(_,C){m.a.Bb(_,C())}},m.h.ea.text=!0,(function(){if(t&&t.navigator){var _=function(q){if(q)return parseFloat(q[1])},C=t.navigator.userAgent,w,P,M,F,V;(w=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(V=_(C.match(/Edge\/([^ ]+)$/)))||_(C.match(/Chrome\/([^ ]+)/))||(P=_(C.match(/Version\/([^ ]+) Safari/)))||(M=_(C.match(/Firefox\/([^ ]+)/)))||(F=m.a.W||_(C.match(/MSIE ([^ ]+)/)))||(F=_(C.match(/rv:([^ )]+)/)))}if(8<=F&&10>F)var B=m.a.g.Z(),j=m.a.g.Z(),k=function(q){var Q=this.activeElement;(Q=Q&&m.a.g.get(Q,j))&&Q(q)},G=function(q,Q){var W=q.ownerDocument;m.a.g.get(W,B)||(m.a.g.set(W,B,!0),m.a.B(W,"selectionchange",k)),m.a.g.set(q,j,Q)};m.c.textInput={init:function(q,Q,W){function J(Re,Qe){m.a.B(q,Re,Qe)}function Z(){var Re=m.a.f(Q());(Re===null||Re===e)&&(Re=""),ge!==e&&Re===ge?m.a.setTimeout(Z,4):q.value!==Re&&(Se=!0,q.value=Re,Se=!1,fe=q.value)}function ae(){xe||(ge=q.value,xe=m.a.setTimeout(Ae,4))}function Ae(){clearTimeout(xe),ge=xe=e;var Re=q.value;fe!==Re&&(fe=Re,m.m.eb(Q(),W,"textInput",Re))}var fe=q.value,xe,ge,we=m.a.W==9?ae:Ae,Se=!1;F&&J("keypress",Ae),11>F&&J("propertychange",function(Re){Se||Re.propertyName!=="value"||we(Re)}),F==8&&(J("keyup",Ae),J("keydown",Ae)),G&&(G(q,we),J("dragend",ae)),(!F||9<=F)&&J("input",we),5>P&&m.a.R(q)==="textarea"?(J("keydown",ae),J("paste",ae),J("cut",ae)):11>w?J("keydown",ae):4>M?(J("DOMAutoComplete",Ae),J("dragdrop",Ae),J("drop",Ae)):V&&q.type==="number"&&J("keydown",ae),J("change",Ae),J("blur",Ae),m.o(Z,null,{l:q})}},m.m.wa.textInput=!0,m.c.textinput={preprocess:function(q,Q,W){W("textInput",q)}}})(),m.c.uniqueName={init:function(_,C){if(C()){var w="ko_unique_"+ ++m.c.uniqueName.rd;m.a.Yc(_,w)}}},m.c.uniqueName.rd=0,m.c.using={init:function(_,C,w,P,M){var F;return w.has("as")&&(F={as:w.get("as"),noChildContext:w.get("noChildContext")}),C=M.createChildContext(C,F),m.Oa(C,_),{controlsDescendantBindings:!0}}},m.h.ea.using=!0,m.c.value={init:function(_,C,w){var P=m.a.R(_),M=P=="input";if(!M||_.type!="checkbox"&&_.type!="radio"){var F=[],V=w.get("valueUpdate"),B=!1,j=null;V&&(typeof V=="string"?F=[V]:F=m.a.wc(V),m.a.Pa(F,"change"));var k=function(){j=null,B=!1;var Q=C(),W=m.w.M(_);m.m.eb(Q,w,"value",W)};!m.a.W||!M||_.type!="text"||_.autocomplete=="off"||_.form&&_.form.autocomplete=="off"||m.a.A(F,"propertychange")!=-1||(m.a.B(_,"propertychange",function(){B=!0}),m.a.B(_,"focus",function(){B=!1}),m.a.B(_,"blur",function(){B&&k()})),m.a.D(F,function(Q){var W=k;m.a.Ud(Q,"after")&&(W=function(){j=m.w.M(_),m.a.setTimeout(k,0)},Q=Q.substring(5)),m.a.B(_,Q,W)});var G;if(G=M&&_.type=="file"?function(){var Q=m.a.f(C());Q===null||Q===e||Q===""?_.value="":m.u.G(k)}:function(){var Q=m.a.f(C()),W=m.w.M(_);j!==null&&Q===j?m.a.setTimeout(G,0):(Q!==W||W===e)&&(P==="select"?(W=w.get("valueAllowUnset"),m.w.cb(_,Q,W),W||Q===m.w.M(_)||m.u.G(k)):m.w.cb(_,Q))},P==="select"){var q;m.i.subscribe(_,m.i.H,function(){q?w.get("valueAllowUnset")?G():k():(m.a.B(_,"change",k),q=m.o(G,null,{l:_}))},null,{notifyImmediately:!0})}else m.a.B(_,"change",k),m.o(G,null,{l:_})}else m.ib(_,{checkedValue:C})},update:function(){}},m.m.wa.value=!0,m.c.visible={update:function(_,C){var w=m.a.f(C()),P=_.style.display!="none";w&&!P?_.style.display="":!w&&P&&(_.style.display="none")}},m.c.hidden={update:function(_,C){m.c.visible.update(_,function(){return!m.a.f(C())})}},(function(_){m.c[_]={init:function(C,w,P,M,F){return m.c.event.init.call(this,C,function(){var V={};return V[_]=w(),V},P,M,F)}}})("click"),m.ca=function(){},m.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},m.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},m.ca.prototype.makeTemplateSource=function(_,C){if(typeof _=="string"){C=C||n;var w=C.getElementById(_);if(!w)throw Error("Cannot find template with ID "+_);return new m.C.F(w)}if(_.nodeType==1||_.nodeType==8)return new m.C.ia(_);throw Error("Unknown template type: "+_)},m.ca.prototype.renderTemplate=function(_,C,w,P){return _=this.makeTemplateSource(_,P),this.renderTemplateSource(_,C,w,P)},m.ca.prototype.isTemplateRewritten=function(_,C){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(_,C).data("isRewritten")},m.ca.prototype.rewriteTemplate=function(_,C,w){_=this.makeTemplateSource(_,w),C=C(_.text()),_.text(C),_.data("isRewritten",!0)},m.b("templateEngine",m.ca),m.kc=(function(){function _(P,M,F,V){P=m.m.ac(P);for(var B=m.m.Ra,j=0;j<P.length;j++){var k=P[j].key;if(Object.prototype.hasOwnProperty.call(B,k)){var G=B[k];if(typeof G=="function"){if(k=G(P[j].value))throw Error(k)}else if(!G)throw Error("This template engine does not support the '"+k+"' binding within its templates")}}return F="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+m.m.vb(P,{valueAccessors:!0})+" } })()},'"+F.toLowerCase()+"')",V.createJavaScriptEvaluatorBlock(F)+M}var C=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,w=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(P,M,F){M.isTemplateRewritten(P,F)||M.rewriteTemplate(P,function(V){return m.kc.Ld(V,M)},F)},Ld:function(P,M){return P.replace(C,function(F,V,B,j,k){return _(k,V,B,M)}).replace(w,function(F,V){return _(V,"<!-- ko -->","#comment",M)})},md:function(P,M){return m.aa.Xb(function(F,V){var B=F.nextSibling;B&&B.nodeName.toLowerCase()===M&&m.ib(B,P,V)})}}})(),m.b("__tr_ambtns",m.kc.md),(function(){m.C={},m.C.F=function(w){if(this.F=w){var P=m.a.R(w);this.ab=P==="script"?1:P==="textarea"?2:P=="template"&&w.content&&w.content.nodeType===11?3:4}},m.C.F.prototype.text=function(){var w=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[w];var P=arguments[0];w==="innerHTML"?m.a.fc(this.F,P):this.F[w]=P};var _=m.a.g.Z()+"_";m.C.F.prototype.data=function(w){if(arguments.length===1)return m.a.g.get(this.F,_+w);m.a.g.set(this.F,_+w,arguments[1])};var C=m.a.g.Z();m.C.F.prototype.nodes=function(){var w=this.F;if(arguments.length==0){var P=m.a.g.get(w,C)||{},M=P.lb||(this.ab===3?w.content:this.ab===4?w:e);if(!M||P.jd){var F=this.text();F&&F!==P.bb&&(M=m.a.Md(F,w.ownerDocument),m.a.g.set(w,C,{lb:M,bb:F,jd:!0}))}return M}P=arguments[0],this.ab!==e&&this.text(""),m.a.g.set(w,C,{lb:P})},m.C.ia=function(w){this.F=w},m.C.ia.prototype=new m.C.F,m.C.ia.prototype.constructor=m.C.ia,m.C.ia.prototype.text=function(){if(arguments.length==0){var w=m.a.g.get(this.F,C)||{};return w.bb===e&&w.lb&&(w.bb=w.lb.innerHTML),w.bb}m.a.g.set(this.F,C,{bb:arguments[0]})},m.b("templateSources",m.C),m.b("templateSources.domElement",m.C.F),m.b("templateSources.anonymousTemplate",m.C.ia)})(),(function(){function _(j,k,G){var q;for(k=m.h.nextSibling(k);j&&(q=j)!==k;)j=m.h.nextSibling(q),G(q,j)}function C(j,k){if(j.length){var G=j[0],q=j[j.length-1],Q=G.parentNode,W=m.ga.instance,J=W.preprocessNode;if(J){if(_(G,q,function(Z,ae){var Ae=Z.previousSibling,fe=J.call(W,Z);fe&&(Z===G&&(G=fe[0]||ae),Z===q&&(q=fe[fe.length-1]||Ae))}),j.length=0,!G)return;G===q?j.push(G):(j.push(G,q),m.a.Ua(j,Q))}_(G,q,function(Z){Z.nodeType!==1&&Z.nodeType!==8||m.vc(k,Z)}),_(G,q,function(Z){Z.nodeType!==1&&Z.nodeType!==8||m.aa.cd(Z,[k])}),m.a.Ua(j,Q)}}function w(j){return j.nodeType?j:0<j.length?j[0]:null}function P(j,k,G,q,Q){Q=Q||{};var W=(j&&w(j)||G||{}).ownerDocument,J=Q.templateEngine||F;if(m.kc.xd(G,J,W),G=J.renderTemplate(G,q,Q,W),typeof G.length!="number"||0<G.length&&typeof G[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(W=!1,k){case"replaceChildren":m.h.va(j,G),W=!0;break;case"replaceNode":m.a.Xc(j,G),W=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+k)}return W&&(C(G,q),Q.afterRender&&m.u.G(Q.afterRender,null,[G,q[Q.as||"$data"]]),k=="replaceChildren"&&m.i.ma(j,m.i.H)),G}function M(j,k,G){return m.O(j)?j():typeof j=="function"?j(k,G):j}var F;m.gc=function(j){if(j!=e&&!(j instanceof m.ca))throw Error("templateEngine must inherit from ko.templateEngine");F=j},m.dc=function(j,k,G,q,Q){if(G=G||{},(G.templateEngine||F)==e)throw Error("Set a template engine before calling renderTemplate");if(Q=Q||"replaceChildren",q){var W=w(q);return m.$(function(){var Z=k&&k instanceof m.fa?k:new m.fa(k,null,null,null,{exportDependencies:!0}),J=M(j,Z.$data,Z),Z=P(q,Q,J,Z,G);Q=="replaceNode"&&(q=Z,W=w(q))},null,{Sa:function(){return!W||!m.a.Sb(W)},l:W&&Q=="replaceNode"?W.parentNode:W})}return m.aa.Xb(function(J){m.dc(j,k,G,J,"replaceNode")})},m.Qd=function(j,k,G,q,Q){function W(ge,we){m.u.G(m.a.ec,null,[q,ge,Z,G,J,we]),m.i.ma(q,m.i.H)}function J(ge,we){C(we,ae),G.afterRender&&G.afterRender(we,ge),ae=null}function Z(ge,we){ae=Q.createChildContext(ge,{as:Ae,noChildContext:G.noChildContext,extend:function(Re){Re.$index=we,Ae&&(Re[Ae+"Index"]=we)}});var Se=M(j,ge,ae);return P(q,"ignoreTargetNode",Se,ae,G)}var ae,Ae=G.as,fe=G.includeDestroyed===!1||m.options.foreachHidesDestroyed&&!G.includeDestroyed;if(fe||G.beforeRemove||!m.Pc(k))return m.$(function(){var ge=m.a.f(k)||[];typeof ge.length>"u"&&(ge=[ge]),fe&&(ge=m.a.jb(ge,function(we){return we===e||we===null||!m.a.f(we._destroy)})),W(ge)},null,{l:q});W(k.v());var xe=k.subscribe(function(ge){W(k(),ge)},null,"arrayChange");return xe.l(q),xe};var V=m.a.g.Z(),B=m.a.g.Z();m.c.template={init:function(j,k){var G=m.a.f(k());if(typeof G=="string"||"name"in G)m.h.Ea(j);else if("nodes"in G){if(G=G.nodes||[],m.O(G))throw Error('The "nodes" option must be a plain, non-observable array.');var q=G[0]&&G[0].parentNode;q&&m.a.g.get(q,B)||(q=m.a.Yb(G),m.a.g.set(q,B,!0)),new m.C.ia(j).nodes(q)}else if(G=m.h.childNodes(j),0<G.length)q=m.a.Yb(G),new m.C.ia(j).nodes(q);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(j,k,G,q,Q){var W=k();k=m.a.f(W),G=!0,q=null,typeof k=="string"?k={}:(W="name"in k?k.name:j,"if"in k&&(G=m.a.f(k.if)),G&&"ifnot"in k&&(G=!m.a.f(k.ifnot)),G&&!W&&(G=!1)),"foreach"in k?q=m.Qd(W,G&&k.foreach||[],k,j,Q):G?(G=Q,"data"in k&&(G=Q.createChildContext(k.data,{as:k.as,noChildContext:k.noChildContext,exportDependencies:!0})),q=m.dc(W,G,k,j)):m.h.Ea(j),Q=q,(k=m.a.g.get(j,V))&&typeof k.s=="function"&&k.s(),m.a.g.set(j,V,!Q||Q.ja&&!Q.ja()?e:Q)}},m.m.Ra.template=function(j){return j=m.m.ac(j),j.length==1&&j[0].unknown||m.m.Id(j,"name")?null:"This template engine does not support anonymous templates nested within its templates"},m.h.ea.template=!0})(),m.b("setTemplateEngine",m.gc),m.b("renderTemplate",m.dc),m.a.Kc=function(_,C,w){if(_.length&&C.length){var P,M,F,V,B;for(P=M=0;(!w||P<w)&&(V=_[M]);++M){for(F=0;B=C[F];++F)if(V.value===B.value){V.moved=B.index,B.moved=V.index,C.splice(F,1),P=F=0;break}P+=F}}},m.a.Pb=(function(){function _(C,w,P,M,F){var V=Math.min,B=Math.max,j=[],k,G=C.length,q,Q=w.length,W=Q-G||1,J=G+Q+1,Z,ae,Ae;for(k=0;k<=G;k++)for(ae=Z,j.push(Z=[]),Ae=V(Q,k+W),q=B(0,k-1);q<=Ae;q++)Z[q]=q?k?C[k-1]===w[q-1]?ae[q-1]:V(ae[q]||J,Z[q-1]||J)+1:q+1:k+1;for(V=[],B=[],W=[],k=G,q=Q;k||q;)Q=j[k][q]-1,q&&Q===j[k][q-1]?B.push(V[V.length]={status:P,value:w[--q],index:q}):k&&Q===j[k-1][q]?W.push(V[V.length]={status:M,value:C[--k],index:k}):(--q,--k,F.sparse||V.push({status:"retained",value:w[q]}));return m.a.Kc(W,B,!F.dontLimitMoves&&10*G),V.reverse()}return function(C,w,P){return P=typeof P=="boolean"?{dontLimitMoves:P}:P||{},C=C||[],w=w||[],C.length<w.length?_(C,w,"added","deleted",P):_(w,C,"deleted","added",P)}})(),m.b("utils.compareArrays",m.a.Pb),(function(){function _(P,M,F,V,B){var j=[],k=m.$(function(){var G=M(F,B,m.a.Ua(j,P))||[];0<j.length&&(m.a.Xc(j,G),V&&m.u.G(V,null,[F,G,B])),j.length=0,m.a.Nb(j,G)},null,{l:P,Sa:function(){return!m.a.kd(j)}});return{Y:j,$:k.ja()?k:e}}var C=m.a.g.Z(),w=m.a.g.Z();m.a.ec=function(P,M,F,V,B,j){function k(vt){Se={Aa:vt,pb:m.ta(ae++)},J.push(Se),W||we.push(Se)}function G(vt){Se=Q[vt],ae!==Se.pb.v()&&ge.push(Se),Se.pb(ae++),m.a.Ua(Se.Y,P),J.push(Se)}function q(vt,Gt){if(vt)for(var lt=0,mt=Gt.length;lt<mt;lt++)m.a.D(Gt[lt].Y,function(ft){vt(ft,lt,Gt[lt].Aa)})}M=M||[],typeof M.length>"u"&&(M=[M]),V=V||{};var Q=m.a.g.get(P,C),W=!Q,J=[],Z=0,ae=0,Ae=[],fe=[],xe=[],ge=[],we=[],Se,Re=0;if(W)m.a.D(M,k);else{if(!j||Q&&Q._countWaitingForRemove){var Qe=m.a.Mb(Q,function(vt){return vt.Aa});j=m.a.Pb(Qe,M,{dontLimitMoves:V.dontLimitMoves,sparse:!0})}for(var Qe=0,He,Xe,$e;He=j[Qe];Qe++)switch(Xe=He.moved,$e=He.index,He.status){case"deleted":for(;Z<$e;)G(Z++);Xe===e&&(Se=Q[Z],Se.$&&(Se.$.s(),Se.$=e),m.a.Ua(Se.Y,P).length&&(V.beforeRemove&&(J.push(Se),Re++,Se.Aa===w?Se=null:xe.push(Se)),Se&&Ae.push.apply(Ae,Se.Y))),Z++;break;case"added":for(;ae<$e;)G(Z++);Xe!==e?(fe.push(J.length),G(Xe)):k(He.value)}for(;ae<M.length;)G(Z++);J._countWaitingForRemove=Re}m.a.g.set(P,C,J),q(V.beforeMove,ge),m.a.D(Ae,V.beforeRemove?m.oa:m.removeNode);var Pe,qe,st;try{st=P.ownerDocument.activeElement}catch{}if(fe.length)for(;(Qe=fe.shift())!=e;){for(Se=J[Qe],Pe=e;Qe;)if((qe=J[--Qe].Y)&&qe.length){Pe=qe[qe.length-1];break}for(M=0;Z=Se.Y[M];Pe=Z,M++)m.h.Wb(P,Z,Pe)}for(Qe=0;Se=J[Qe];Qe++){for(Se.Y||m.a.extend(Se,_(P,F,Se.Aa,B,Se.pb)),M=0;Z=Se.Y[M];Pe=Z,M++)m.h.Wb(P,Z,Pe);!Se.Ed&&B&&(B(Se.Aa,Se.Y,Se.pb),Se.Ed=!0,Pe=Se.Y[Se.Y.length-1])}for(st&&P.ownerDocument.activeElement!=st&&st.focus(),q(V.beforeRemove,xe),Qe=0;Qe<xe.length;++Qe)xe[Qe].Aa=w;q(V.afterMove,ge),q(V.afterAdd,we)}})(),m.b("utils.setDomNodeChildrenFromArrayMapping",m.a.ec),m.ba=function(){this.allowTemplateRewriting=!1},m.ba.prototype=new m.ca,m.ba.prototype.constructor=m.ba,m.ba.prototype.renderTemplateSource=function(_,C,w,P){return(C=!(9>m.a.W)&&_.nodes?_.nodes():null)?m.a.la(C.cloneNode(!0).childNodes):(_=_.text(),m.a.ua(_,P))},m.ba.Ma=new m.ba,m.gc(m.ba.Ma),m.b("nativeTemplateEngine",m.ba),(function(){m.$a=function(){var C=this.Hd=(function(){if(!r||!r.tmpl)return 0;try{if(0<=r.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1})();this.renderTemplateSource=function(w,P,M,F){if(F=F||n,M=M||{},2>C)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var V=w.data("precompiled");return V||(V=w.text()||"",V=r.template(null,"{{ko_with $item.koBindingContext}}"+V+"{{/ko_with}}"),w.data("precompiled",V)),w=[P.$data],P=r.extend({koBindingContext:P},M.templateOptions),P=r.tmpl(V,w,P),P.appendTo(F.createElement("div")),r.fragments={},P},this.createJavaScriptEvaluatorBlock=function(w){return"{{ko_code ((function() { return "+w+" })()) }}"},this.addTemplate=function(w,P){n.write("<script type='text/html' id='"+w+"'>"+P+"</script>")},0<C&&(r.tmpl.tag.ko_code={open:"__.push($1 || '');"},r.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},m.$a.prototype=new m.ca,m.$a.prototype.constructor=m.$a;var _=new m.$a;0<_.Hd&&m.gc(_),m.b("jqueryTmplTemplateEngine",m.$a)})()})})()})()})();var XGt=ko;typeof window<"u"?(ko=window.ko,typeof b8<"u"?window.ko=b8:delete window.ko):(ko=global.ko,typeof b8<"u"?global.ko=b8:delete global.ko);var $C=XGt;/**
* @license
* Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
* Copyright (c) Steve Sanderson
* MIT license
*/var Ple="__knockoutObservables",Dle="__knockoutSubscribable";function jke(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=Hke(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(r){if(!(r===Ple||r===Dle)&&!(r in i)){var o=e[r],s=o instanceof Array,a=n.isObservable(o)?o:s?n.observableArray(o):n.observable(o);Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[r]=a,s&&$Gt(n,a)}}),e}function Hke(e,t){var n=e[Ple];return!n&&t&&(n={},Object.defineProperty(e,Ple,{value:n})),n}function KGt(e,t,n){var i=this,r={owner:e,deferEvaluation:!0};if(typeof n=="function")r.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');r.read=n.get,r.write=n.set}return e[t]=i.computed(r),jke.call(i,e,[t]),e}function $Gt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=JGt(e,t,i))})}function JGt(e,t,n){var i=ZGt(e,n);return i.subscribe(t)}function ZGt(e,t){var n=t[Dle];if(!n){n=new e.subscribable,Object.defineProperty(t,Dle,{value:n});var i={};QGt(t,n,i),e5t(e,t,n,i)}return n}function QGt(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var r=e[i];e[i]=function(){var o=r.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),o}})}function e5t(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;i.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),o}})})}function Gke(e,t){if(!e)return null;var n=Hke(e,!1);return n&&n[t]||null}function t5t(e,t){var n=Gke(e,t);n&&n.valueHasMutated()}function n5t(e){e.track=jke,e.getObservable=Gke,e.valueHasMutated=t5t,e.defineProperty=KGt}var x8={attachToKo:n5t};var Wke="http://www.w3.org/2000/svg",qke="cesium-svgPath-svg",i5t={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(Wke,"svg:svg");i.setAttribute("class",qke);let r=document.createElementNS(Wke,"path");return i.appendChild(r),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let o=e.unwrap(n());r.setAttribute("d",e.unwrap(o.path));let s=e.unwrap(o.width),a=e.unwrap(o.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),o.css&&i.setAttribute("class",`${qke} ${e.unwrap(o.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},T8=i5t;x8.attachToKo($C);T8.register($C);var ve=$C;function E8(e){l(e)||(e=new Nm),this._clock=e,this._eventHelper=new Xo,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=ve.observable(K.now()),this.systemTime.equalityComparer=K.equals,this.startTime=ve.observable(e.startTime),this.startTime.equalityComparer=K.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=ve.observable(e.stopTime),this.stopTime.equalityComparer=K.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=ve.observable(e.currentTime),this.currentTime.equalityComparer=K.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=ve.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=ve.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=ve.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=ve.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=ve.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),ve.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(E8.prototype,{clock:{get:function(){return this._clock}}});E8.prototype.synchronize=function(){let e=this._clock;this.systemTime=K.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};E8.prototype.isDestroyed=function(){return!1};E8.prototype.destroy=function(){this._eventHelper.removeAll(),le(this)};var C8=E8;function r5t(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,pe.throwInstantiationError()}var Rle=r5t;function o5t(e,t){t=t??!0;let n=new be,i=new be;function r(){let o={args:arguments,cancel:!1},s;return n.raiseEvent(o),o.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return r.canExecute=t,ve.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:n},afterExecute:{value:i}}),r}var Rn=o5t;var QP={};QP.createCheckbox=function(e,t,n){let i=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),o.setAttribute("data-bind",s),r.appendChild(o),r.appendChild(document.createTextNode(e)),i.appendChild(r),i};QP.createSection=function(e,t,n,i){let r=document.createElement("div");r.className="cesium-cesiumInspector-section",r.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(r);let o=document.createElement("h3");o.className="cesium-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind",`click: ${i}`),r.appendChild(o);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",r.appendChild(s),s};QP.createRangeInput=function(e,t,n,i,r,o){o=o??t;let s=document.createElement("input");s.setAttribute("data-bind",`value: ${o}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=n,a.max=i,a.step=r??"any",a.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);let c=document.createElement("div");c.appendChild(a);let u=document.createElement("div");return u.className="cesium-cesiumInspector-slider",u.appendChild(document.createTextNode(e)),u.appendChild(s),u.appendChild(c),u};QP.createRangeInputWithDynamicMinMax=function(e,t,n,i){i=i??t;let r=document.createElement("input");r.setAttribute("data-bind",`value: ${i}`),r.type="number";let o=document.createElement("input");o.type="range",o.step=n??"any",o.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);let s=document.createElement("div");s.appendChild(o);let a=document.createElement("div");return a.className="cesium-cesiumInspector-slider",a.appendChild(document.createTextNode(e)),a.appendChild(r),a.appendChild(s),a};QP.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let r=`click: ${t}`;return l(n)&&(r+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",r),i};var Af=QP;function s5t(e,t,n,i,r){return n.call(i,e[t]),ve.getObservable(e,t).subscribe(n,i,r)}var Cc=s5t;function Yke(e,t){this._command=e,t=t??H.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",ve.track(this,["toggled","tooltip"])}Object.defineProperties(Yke.prototype,{command:{get:function(){return this._command}}});var Wb=Yke;function Xke(e){e=e??H.EMPTY_OBJECT;let t=e.globe,n=e.imageryProviderViewModels??H.EMPTY_ARRAY,i=e.terrainProviderViewModels??H.EMPTY_ARRAY;this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,ve.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let r=ve.getObservable(this,"imageryProviderViewModels"),o=ve.pureComputed(function(){let d=r(),p={},g;for(g=0;g<d.length;g++){let A=d[g],b=A.category;l(p[b])?p[b].push(A):p[b]=[A]}let m=Object.keys(p),y=[];for(g=0;g<m.length;g++){let A=m[g];y.push({name:A,providers:p[A]})}return y});this._imageryProviders=o;let s=ve.getObservable(this,"terrainProviderViewModels"),a=ve.pureComputed(function(){let d=s(),p={},g;for(g=0;g<d.length;g++){let A=d[g],b=A.category;l(p[b])?p[b].push(A):p[b]=[A]}let m=Object.keys(p),y=[];for(g=0;g<m.length;g++){let A=m[g];y.push({name:A,providers:p[A]})}return y});this._terrainProviders=a,this.buttonTooltip=void 0,ve.defineProperty(this,"buttonTooltip",function(){let d=this.selectedImagery,p=this.selectedTerrain,g=l(d)?d.name:void 0,m=l(p)?p.name:void 0;return l(g)&&l(m)?`${g}
${m}`:l(g)?g:m}),this.buttonImageUrl=void 0,ve.defineProperty(this,"buttonImageUrl",function(){let d=this.selectedImagery;if(l(d))return d.iconUrl}),this.selectedImagery=void 0;let c=ve.observable();this._currentImageryLayers=[],ve.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(d){if(c()===d){this.dropDownVisible=!1;return}let p,g=this._currentImageryLayers,m=g.length,y=this._globe.imageryLayers,A=!1;for(p=0;p<m;p++){let b=y.length;for(let x=0;x<b;x++){let T=y.get(x);if(T===g[p]){y.remove(T),A=!0;break}}}if(l(d)){let b=d.creationCommand();if(Array.isArray(b)){let x=b.length;for(this._currentImageryLayers=[],p=x-1;p>=0;p--){let T=Ss.fromProviderAsync(b[p]);y.add(T,0),this._currentImageryLayers.push(T)}}else{this._currentImageryLayers=[];let x=Ss.fromProviderAsync(b);if(x.name=d.name,A)y.add(x,0);else{let T=y.get(0);l(T)&&y.remove(T),y.add(x,0)}this._currentImageryLayers.push(x)}}c(d),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let u=ve.observable();ve.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(d){if(u()===d){this.dropDownVisible=!1;return}let p;if(l(d)&&(p=d.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof M0),this._globe.terrainProvider=p;else if(l(p)){let g=!1,m=this._globe.terrainProviderChanged.addEventListener(()=>{g=!0,m()}),A=new d8(p).readyEvent.addEventListener(b=>{g||(this._globe.depthTestAgainstTerrain=!(b instanceof M0),this._globe.terrainProvider=b,A())})}u(d),this.dropDownVisible=!1}});let f=this;this._toggleDropDown=Rn(function(){f.dropDownVisible=!f.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(Xke.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var v8=Xke;function tq(e,t){e=Ln(e);let n=new v8(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let r=document.createElement("img");r.setAttribute("draggable","false"),r.className="cesium-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(r);let o=document.createElement("div");o.className="cesium-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",o.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(a);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",a.appendChild(c);let u=document.createElement("div");u.className="cesium-baseLayerPicker-categoryTitle",u.setAttribute("data-bind","text: name"),c.appendChild(u);let f=document.createElement("div");f.className="cesium-baseLayerPicker-choices",f.setAttribute("data-bind","foreach: providers"),c.appendChild(f);let d=document.createElement("div");d.className="cesium-baseLayerPicker-item",d.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),f.appendChild(d);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),d.appendChild(p);let g=document.createElement("div");g.className="cesium-baseLayerPicker-itemLabel",g.setAttribute("data-bind","text: name"),d.appendChild(g);let m=document.createElement("div");m.className="cesium-baseLayerPicker-sectionTitle",m.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),m.innerHTML="Terrain",o.appendChild(m);let y=document.createElement("div");y.className="cesium-baseLayerPicker-section",y.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(y);let A=document.createElement("div");A.className="cesium-baseLayerPicker-category",y.appendChild(A);let b=document.createElement("div");b.className="cesium-baseLayerPicker-categoryTitle",b.setAttribute("data-bind","text: name"),A.appendChild(b);let x=document.createElement("div");x.className="cesium-baseLayerPicker-choices",x.setAttribute("data-bind","foreach: providers"),A.appendChild(x);let T=document.createElement("div");T.className="cesium-baseLayerPicker-item",T.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),x.appendChild(T);let E=document.createElement("img");E.className="cesium-baseLayerPicker-itemIcon",E.setAttribute("data-bind","attr: { src: iconUrl }"),E.setAttribute("draggable","false"),T.appendChild(E);let v=document.createElement("div");v.className="cesium-baseLayerPicker-itemLabel",v.setAttribute("data-bind","text: name"),T.appendChild(v),ve.applyBindings(n,i),ve.applyBindings(n,o),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=o,this._closeDropDown=function(S){i.contains(S.target)||o.contains(S.target)||(n.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(tq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});tq.prototype.isDestroyed=function(){return!1};tq.prototype.destroy=function(){return dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._element),ve.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),le(this)};var S8=tq;function Kke(e){let t=e.creationFunction;l(t.canExecute)||(t=Rn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",ve.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(Kke.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var uo=Kke;function a5t(){let e=[],t=devicePixelRatio>=2;return e.push(new uo({name:"Bing Maps Aerial",iconUrl:Zt("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Qg({style:Zg.AERIAL})}})),e.push(new uo({name:"Bing Maps Aerial with Labels",iconUrl:Zt("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Qg({style:Zg.AERIAL_WITH_LABELS})}})),e.push(new uo({name:"Bing Maps Roads",iconUrl:Zt("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Qg({style:Zg.ROAD})}})),e.push(new uo({name:"ArcGIS World Imagery",iconUrl:Zt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return $g.fromBasemapType(gm.SATELLITE,{enablePickFeatures:!1})}})),e.push(new uo({name:"ArcGIS World Hillshade",iconUrl:Zt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return $g.fromBasemapType(gm.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new uo({name:"Esri World Ocean",iconUrl:Zt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data. The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return $g.fromBasemapType(gm.OCEANS,{enablePickFeatures:!1})}})),e.push(new uo({name:"Open\xADStreet\xADMap",iconUrl:Zt("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.
http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new hy({url:"https://tile.openstreetmap.org/"})}})),e.push(new uo({name:"Stadia x Stamen Watercolor",iconUrl:Zt("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.
https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new hy({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new uo({name:"Stadia x Stamen Toner",iconUrl:Zt("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays.
https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new hy({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new uo({name:"Stadia Alidade Smooth",iconUrl:Zt("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new hy({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new uo({name:"Stadia Alidade Smooth Dark",iconUrl:Zt("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new hy({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new uo({name:"Sentinel-2",iconUrl:Zt("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3954)}})),e.push(new uo({name:"Blue Marble",iconUrl:Zt("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3845)}})),e.push(new uo({name:"Earth at night",iconUrl:Zt("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3812)}})),e.push(new uo({name:"Natural Earth\xA0II",iconUrl:Zt("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast.
http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return CA.fromUrl(Zt("Assets/Textures/NaturalEarthII"))}})),e.push(new uo({name:"Google Maps Satellite",iconUrl:Zt("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3830182)}})),e.push(new uo({name:"Google Maps Satellite with Labels",iconUrl:Zt("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3830183)}})),e.push(new uo({name:"Google Maps Roadmap",iconUrl:Zt("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3830184)}})),e.push(new uo({name:"Google Maps Contour",iconUrl:Zt("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3830186)}})),e.push(new uo({name:"Azure Maps Aerial",iconUrl:Zt("Widgets/Images/ImageryProviders/azureAerial.png"),tooltip:"Imagery from Azure Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3891168)}})),e.push(new uo({name:"Azure Maps Roads",iconUrl:Zt("Widgets/Images/ImageryProviders/azureRoads.png"),tooltip:"Labeled roads and other features on a base landscape from Azure Maps",category:"Cesium ion",creationFunction:function(){return iu.fromAssetId(3891169)}})),e}var w8=a5t;function c5t(){let e=[];return e.push(new uo({name:"WGS84 Ellipsoid",iconUrl:Zt("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new M0({ellipsoid:ee.WGS84})}})),e.push(new uo({name:"Cesium World Terrain",iconUrl:Zt("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return nC({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var I8=c5t;var Rl="http://www.w3.org/2000/svg",Qke="http://www.w3.org/1999/xlink",nq,P8=z.fromCssColorString("rgba(247,250,255,0.384)"),iq=z.fromCssColorString("rgba(143,191,255,0.216)"),Ole=z.fromCssColorString("rgba(153,197,255,0.098)"),rq=z.fromCssColorString("rgba(255,255,255,0.086)"),l5t=z.fromCssColorString("rgba(255,255,255,0.267)"),u5t=z.fromCssColorString("rgba(255,255,255,0)"),$ke=z.fromCssColorString("rgba(66,67,68,0.3)"),Jke=z.fromCssColorString("rgba(0,0,0,0.5)");function qb(e){return z.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var D8={animation_pathReset:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z"},animation_pathPause:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M13,5.5,7.5,5.5,7.5,25.5,13,25.5zM24.5,5.5,19,5.5,19,25.5,24.5,25.5z"},animation_pathPlay:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathPlayReverse:{tagName:"path",transform:"translate(16,16) scale(-0.85,0.85) translate(-16,-16)",d:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z"},animation_pathLoop:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-16)",d:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z"},animation_pathClock:{tagName:"path",transform:"translate(16,16) scale(0.85) translate(-16,-15.5)",d:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z"},animation_pathWingButton:{tagName:"path",d:"m 4.5,0.5 c -2.216,0 -4,1.784 -4,4 l 0,24 c 0,2.216 1.784,4 4,4 l 13.71875,0 C 22.478584,27.272785 27.273681,22.511272 32.5,18.25 l 0,-13.75 c 0,-2.216 -1.784,-4 -4,-4 l -24,0 z"},animation_pathPointer:{tagName:"path",d:"M-15,-65,-15,-55,15,-55,15,-65,0,-95z"},animation_pathSwooshFX:{tagName:"path",d:"m 85,0 c 0,16.617 -4.813944,35.356 -13.131081,48.4508 h 6.099803 c 8.317138,-13.0948 13.13322,-28.5955 13.13322,-45.2124 0,-46.94483 -38.402714,-85.00262 -85.7743869,-85.00262 -1.0218522,0 -2.0373001,0.0241 -3.0506131,0.0589 45.958443,1.59437 82.723058,35.77285 82.723058,81.70532 z"}};function Ap(e){let t=document.createElementNS(Rl,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let r=0;r<i;++r)t.appendChild(Ap(e.children[r]))}else n.indexOf("xlink:")===0?t.setAttributeNS(Qke,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function Nle(e,t,n){let i=document.createElementNS(Rl,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let r=document.createElementNS(Rl,"tspan");return r.textContent=n,i.appendChild(r),i}function f5t(e,t){let n=Nle(e,t,"");n.removeChild(n.firstChild);let i={},r=[],o=["month","day","year"];for(let a=0;a<o.length;++a){if(a>0){let f=document.createElementNS(Rl,"tspan");f.textContent=" ",r.push(f),n.appendChild(f)}let c=o[a],u=document.createElementNS(Rl,"tspan");u.setAttribute("class",`cesium-animation-dateField cesium-animation-dateField-${c}`),u.setAttribute("aria-label",`Adjust ${c} with mouse wheel`),i[c]=u,n.appendChild(u)}let s=document.createElementNS(Rl,"tspan");return n.appendChild(s),{element:n,fallback:s,parts:i,separators:r}}function d5t(e,t){let n=/^(\S+)\s+(\d{1,2})\s+(\d{1,4})$/.exec(t),i=e.parts,r=e.separators;if(n===null){i.month.textContent="",i.day.textContent="",i.year.textContent="",r[0].textContent="",r[1].textContent="",e.fallback.textContent=t;return}i.month.textContent=n[1],i.day.textContent=n[2],i.year.textContent=n[3],r[0].textContent=" ",r[1].textContent=" ",e.fallback.textContent=""}function h5t(e,t){let n=Nle(e,t,"");n.removeChild(n.firstChild);let i={},r=[],o=["hour","minute","second"];for(let f=0;f<o.length;++f){if(f>0){let g=document.createElementNS(Rl,"tspan");g.textContent=":",r.push(g),n.appendChild(g)}let d=o[f],p=document.createElementNS(Rl,"tspan");p.setAttribute("class",`cesium-animation-timeField cesium-animation-timeField-${d}`),p.setAttribute("aria-label",`Adjust ${d} with mouse wheel`),i[d]=p,n.appendChild(p)}let s=document.createElementNS(Rl,"tspan");n.appendChild(s);let a=document.createElementNS(Rl,"tspan");a.setAttribute("class","cesium-animation-timeField cesium-animation-timeField-millisecond"),a.setAttribute("aria-label","Adjust millisecond with mouse wheel"),i.millisecond=a,n.appendChild(a);let c=document.createElementNS(Rl,"tspan");n.appendChild(c);let u=document.createElementNS(Rl,"tspan");return n.appendChild(u),{decimalPoint:s,element:n,fallback:u,parts:i,separators:r,suffix:c}}function m5t(e,t){let n=/^(\d{2}):(\d{2}):(\d{2})(?:\.(\d{3})| UTC)$/.exec(t),i=e.parts,r=e.separators;if(n===null){i.hour.textContent="",i.minute.textContent="",i.second.textContent="",i.millisecond.textContent="",r[0].textContent="",r[1].textContent="",e.decimalPoint.textContent="",e.suffix.textContent="",e.fallback.textContent=t;return}i.hour.textContent=n[1],i.minute.textContent=n[2],i.second.textContent=n[3],r[0].textContent=":",r[1].textContent=":",e.decimalPoint.textContent=l(n[4])?".":"",i.millisecond.textContent=n[4]??"",e.suffix.textContent=l(n[4])?"":" UTC",e.fallback.textContent=""}function Zke(e,t,n){let i=Object.keys(t);for(let r=0;r<i.length;++r){let o=i[r],s=t[o],a=function(c){c.deltaY!==0&&(n(o,c.deltaY<0?1:-1),c.preventDefault(),c.stopPropagation())};s.addEventListener("wheel",a,!1),e._fieldWheelListeners.push({element:s,listener:a})}}function p5t(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var oq=new z;function Xs(e,t){let n=t.alpha,i=1-n;return oq.red=e.red*i+t.red*n,oq.green=e.green*i+t.green*n,oq.blue=e.blue*i+t.blue*n,oq.toCssColorString()}function Mle(e,t,n){let i=D8[n],r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{tagName:"rect",class:"cesium-animation-buttonGlow",width:32,height:32,rx:2,ry:2},{tagName:"rect",class:"cesium-animation-buttonMain",width:32,height:32,rx:4,ry:4},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Ap(r)}function g5t(e,t,n){let i=D8[n],r=D8.animation_pathWingButton,o={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return Ap(o)}function _5t(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&nq!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let r=e._centerX,o=e._centerY,a=e._svgNode.getBoundingClientRect(),c,u;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,u=t.touches[0].clientY):(c=t.clientX,u=t.clientY),!i&&(c>a.right||c<a.left||u<a.top||u>a.bottom))return;let f=e._shuttleRingPointer.getBoundingClientRect(),d=c-r-a.left,p=u-o-a.top,g=Math.atan2(p,d)*180/Math.PI+90;g>180&&(g-=360);let m=n.shuttleRingAngle;i||c<f.right&&c>f.left&&u>f.top&&u<f.bottom?(nq=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=g):g<m?n.slower():g>m&&n.faster(),t.preventDefault()}else e===nq&&(nq=void 0),n.shuttleRingDragging=!1}function Ey(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;let n=this;this._clickFunction=function(){let i=n._viewModel.command;i.canExecute&&i()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[Cc(t,"toggled",this.setToggled,this),Cc(t,"tooltip",this.setTooltip,this),Cc(t.command,"canExecute",this.setEnabled,this)]}Ey.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);let e=this._subscriptions;for(let t=0,n=e.length;t<n;t++)e[t].dispose();le(this)};Ey.prototype.isDestroyed=function(){return!1};Ey.prototype.setEnabled=function(e){if(this._enabled!==e){if(this._enabled=e,!e){this.svgElement.setAttribute("class","cesium-animation-buttonDisabled");return}if(this._toggled){this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled");return}this.svgElement.setAttribute("class","cesium-animation-rectButton")}};Ey.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))};Ey.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function eD(e,t){e=Ln(e),this._viewModel=t,this._container=e,this._centerX=0,this._centerY=0,this._defsElement=void 0,this._svgNode=void 0,this._topG=void 0,this._lastHeight=void 0,this._lastWidth=void 0;let n=e.ownerDocument,i=document.createElement("style");i.textContent=".cesium-animation-rectButton .cesium-animation-buttonGlow { filter: url(#animation_blurred); }.cesium-animation-rectButton .cesium-animation-buttonMain { fill: url(#animation_buttonNormal); }.cesium-animation-buttonToggled .cesium-animation-buttonMain { fill: url(#animation_buttonToggled); }.cesium-animation-rectButton:hover .cesium-animation-buttonMain { fill: url(#animation_buttonHovered); }.cesium-animation-buttonDisabled .cesium-animation-buttonMain { fill: url(#animation_buttonDisabled); }.cesium-animation-shuttleRingG .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshGradient); }.cesium-animation-shuttleRingG:hover .cesium-animation-shuttleRingSwoosh { fill: url(#animation_shuttleRingSwooshHovered); }.cesium-animation-shuttleRingPointer { fill: url(#animation_shuttleRingPointerGradient); }.cesium-animation-shuttleRingPausePointer { fill: url(#animation_shuttleRingPointerPaused); }.cesium-animation-knobOuter { fill: url(#animation_knobOuter); }.cesium-animation-knobInner { fill: url(#animation_knobInner); }",n.head.insertBefore(i,n.head.childNodes[0]);let r=document.createElement("div");r.className="cesium-animation-theme",r.innerHTML='<div class="cesium-animation-themeNormal"></div><div class="cesium-animation-themeHover"></div><div class="cesium-animation-themeSelect"></div><div class="cesium-animation-themeDisabled"></div><div class="cesium-animation-themeKnob"></div><div class="cesium-animation-themePointer"></div><div class="cesium-animation-themeSwoosh"></div><div class="cesium-animation-themeSwooshHover"></div>',this._theme=r,this._themeNormal=r.childNodes[0],this._themeHover=r.childNodes[1],this._themeSelect=r.childNodes[2],this._themeDisabled=r.childNodes[3],this._themeKnob=r.childNodes[4],this._themePointer=r.childNodes[5],this._themeSwoosh=r.childNodes[6],this._themeSwooshHover=r.childNodes[7];let o=document.createElementNS(Rl,"svg:svg");this._svgNode=o,o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",Qke);let s=document.createElementNS(Rl,"g");this._topG=s,this._realtimeSVG=new Ey(g5t(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new Ey(Mle(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new Ey(Mle(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new Ey(Mle(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(Rl,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=Ap({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let u=D8.animation_pathSwooshFX,f=D8.animation_pathPointer,d=Ap({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:u.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:u.d},{tagName:u.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:u.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=d,this._shuttleRingPointer=Ap({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:f.tagName,d:f.d});let p=Ap({tagName:"g",transform:"translate(100,100)"});this._knobOuter=Ap({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let g=61,m=Ap({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:g}),y=f5t(0,-24);this._knobDate=y.element;let A=h5t(0,-7);this._knobTime=A.element,this._knobStatus=Nle(0,-41,"");let b=Ap({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:g}),x=document.createElementNS(Rl,"g");x.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(r),s.appendChild(x),s.appendChild(p),s.appendChild(a),x.appendChild(c),x.appendChild(d),x.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(m),p.appendChild(this._knobStatus),p.appendChild(b),p.appendChild(this._knobDate),p.appendChild(this._knobTime),o.appendChild(s),e.appendChild(o);let T=this;function E(I){_5t(T,I)}this._mouseCallback=E,c.addEventListener("mousedown",E,!0),c.addEventListener("touchstart",E,!0),d.addEventListener("mousedown",E,!0),d.addEventListener("touchstart",E,!0),n.addEventListener("mousemove",E,!0),n.addEventListener("touchmove",E,!0),n.addEventListener("mouseup",E,!0),n.addEventListener("touchend",E,!0),n.addEventListener("touchcancel",E,!0),this._shuttleRingPointer.addEventListener("mousedown",E,!0),this._shuttleRingPointer.addEventListener("touchstart",E,!0),this._knobOuter.addEventListener("mousedown",E,!0),this._knobOuter.addEventListener("touchstart",E,!0);let v=this._knobStatus.childNodes[0];this._fieldWheelListeners=[],Zke(this,y.parts,function(I,R){t.adjustDate(I,R)}),Zke(this,A.parts,function(I,R){t.adjustTime(I,R)});let S;this._subscriptions=[Cc(t.pauseViewModel,"toggled",function(I){S!==I&&(S=I,S?T._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):T._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),Cc(t,"shuttleRingAngle",function(I){p5t(T._shuttleRingPointer,T._knobOuter,I)}),Cc(t,"dateLabel",function(I){T._knobDate.textContent!==I&&d5t(y,I)}),Cc(t,"timeLabel",function(I){T._knobTime.textContent!==I&&m5t(A,I)}),Cc(t,"multiplierLabel",function(I){v.textContent!==I&&(v.textContent=I)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(eD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});eD.prototype.isDestroyed=function(){return!1};eD.prototype.destroy=function(){l(this._observer)&&(this._observer.disconnect(),this._observer=void 0);let e=this._container.ownerDocument,t=this._mouseCallback;this._shuttleRingBackPanel.removeEventListener("mousedown",t,!0),this._shuttleRingBackPanel.removeEventListener("touchstart",t,!0),this._shuttleRingSwooshG.removeEventListener("mousedown",t,!0),this._shuttleRingSwooshG.removeEventListener("touchstart",t,!0),e.removeEventListener("mousemove",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("mouseup",t,!0),e.removeEventListener("touchend",t,!0),e.removeEventListener("touchcancel",t,!0),this._shuttleRingPointer.removeEventListener("mousedown",t,!0),this._shuttleRingPointer.removeEventListener("touchstart",t,!0),this._knobOuter.removeEventListener("mousedown",t,!0),this._knobOuter.removeEventListener("touchstart",t,!0);let n=this._fieldWheelListeners;for(let r=0;r<n.length;++r){let o=n[r];o.element.removeEventListener("wheel",o.listener,!1)}this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let i=this._subscriptions;for(let r=0,o=i.length;r<o;r++)i[r].dispose();return le(this)};eD.prototype.resize=function(){let e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;let n=this._svgNode,i=200,r=132,o=e,s=t;e===0&&t===0?(o=i,s=r):e===0?(s=t,o=i*(t/r)):t===0&&(o=e,s=r*(e/i));let a=o/i,c=s/r;n.style.cssText=`width: ${o}px; height: ${s}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",o),n.setAttribute("height",s),n.setAttribute("viewBox",`0 0 ${o} ${s}`),this._topG.setAttribute("transform",`scale(${a},${c})`),this._centerX=Math.max(1,100*a),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t};eD.prototype.applyThemeChanges=function(){let e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(l(this._observer))return;let f=this;f._observer=new MutationObserver(function(){e.body.contains(f._container)&&(f._observer.disconnect(),f._observer=void 0,f.applyThemeChanges())}),f._observer.observe(e,{childList:!0,subtree:!0});return}let t=qb(this._themeNormal),n=qb(this._themeHover),i=qb(this._themeSelect),r=qb(this._themeDisabled),o=qb(this._themeKnob),s=qb(this._themePointer),a=qb(this._themeSwoosh),c=qb(this._themeSwooshHover),u=Ap({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Xs(t,P8)},{tagName:"stop",offset:"12%","stop-color":Xs(t,iq)},{tagName:"stop",offset:"46%","stop-color":Xs(t,Ole)},{tagName:"stop",offset:"81%","stop-color":Xs(t,rq)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Xs(n,P8)},{tagName:"stop",offset:"12%","stop-color":Xs(n,iq)},{tagName:"stop",offset:"46%","stop-color":Xs(n,Ole)},{tagName:"stop",offset:"81%","stop-color":Xs(n,rq)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Xs(i,P8)},{tagName:"stop",offset:"12%","stop-color":Xs(i,iq)},{tagName:"stop",offset:"46%","stop-color":Xs(i,Ole)},{tagName:"stop",offset:"81%","stop-color":Xs(i,rq)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Xs(r,l5t)},{tagName:"stop",offset:"75%","stop-color":Xs(r,u5t)}]},{id:"animation_blurred",tagName:"filter",width:"200%",height:"200%",x:"-50%",y:"-50%",children:[{tagName:"feGaussianBlur",stdDeviation:4,in:"SourceGraphic"}]},{id:"animation_shuttleRingSwooshGradient",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":a.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":a.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":s.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":Xs(s,Jke)},{tagName:"stop",offset:"100%","stop-color":Xs(s,Jke)}]},{id:"animation_shuttleRingPointerPaused",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":"#CCC"},{tagName:"stop",offset:"40%","stop-color":"#CCC"},{tagName:"stop",offset:"60%","stop-color":"#555"},{tagName:"stop",offset:"100%","stop-color":"#555"}]},{id:"animation_knobOuter",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Xs(o,P8)},{tagName:"stop",offset:"60%","stop-color":Xs(o,$ke)},{tagName:"stop",offset:"85%","stop-color":Xs(o,iq)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Xs(o,$ke)},{tagName:"stop",offset:"60%","stop-color":Xs(o,P8)},{tagName:"stop",offset:"85%","stop-color":Xs(o,rq)}]}]});l(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var R8=eD;var y5t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Yb=15,tD=105,A5t=[31,28,31,30,31,30,31,31,30,31,30,31];function b5t(e,t){return t===2&&Bl(e)?29:A5t[t-1]}function e3e(e,t,n){return K.fromGregorianDate(new Bh(t,n,Math.min(e.day,b5t(t,n)),e.hour,e.minute,e.second,e.millisecond,e.isLeapSecond))}function t3e(e,t){return e-t}function Lle(e,t){let n=vr(t,e,t3e);return n<0?~n:n}function x5t(e,t){if(Math.abs(e)<=Yb)return e/Yb;let n=Yb,i=tD,r,o=0,s;return e>0?(r=Math.log(t[t.length-1]),s=(r-o)/(i-n),Math.exp(o+s*(e-n))):(r=Math.log(-t[0]),s=(r-o)/(i-n),-Math.exp(o+s*(Math.abs(e)-n)))}function T5t(e,t,n){if(n.clockStep===Vr.SYSTEM_CLOCK)return Yb;if(Math.abs(e)<=1)return e*Yb;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let r=Yb,o=tD,s,a=0,c;return e>0?(s=Math.log(i),c=(s-a)/(o-r),(Math.log(e)-a)/c+r):(s=Math.log(-t[0]),c=(s-a)/(o-r),-((Math.log(Math.abs(e))-a)/c+r))}function bf(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=bf.defaultDateFormatter,this._timeFormatter=bf.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,ve.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(bf.defaultTicks),this.timeLabel=void 0,ve.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,ve.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,ve.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===Vr.SYSTEM_CLOCK)return"Today";let a=s.multiplier;return a%1===0?`${a.toFixed(0)}x`:`${a.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,ve.defineProperty(this,"shuttleRingAngle",{get:function(){return T5t(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,tD),-tD);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=Vr.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===tD){c.multiplier=s>0?a[a.length-1]:a[0];return}let u=x5t(s,a);if(t.snapToTicks)u=a[Lle(u,a)];else if(u!==0){let f=Math.abs(u);if(f>100){let d=f.toFixed(0).length-2,p=Math.pow(10,d);u=Math.round(u/p)*p|0}else f>Yb?u=Math.round(u):f>1?u=+u.toFixed(1):f>0&&(u=+u.toFixed(2))}c.multiplier=u}}),this._canAnimate=void 0,ve.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===Rs.UNBOUNDED)return!0;let c=s.multiplier,u=s.currentTime,f=s.startTime,d;if(a===Rs.LOOP_STOP)d=K.greaterThan(u,f)||u.equals(f)&&c>0;else{let p=s.stopTime;d=K.greaterThan(u,f)&&K.lessThan(u,p)||u.equals(f)&&c>0||u.equals(p)&&c<0}return d||(s.shouldAnimate=!1),d}),this._isSystemTimeAvailable=void 0,ve.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===Rs.UNBOUNDED)return!0;let c=s.systemTime;return K.greaterThanOrEquals(c,s.startTime)&&K.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,ve.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Rn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new Wb(n,{toggled:ve.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Rn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new Wb(i,{toggled:ve.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let r=Rn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new Wb(r,{toggled:ve.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==Vr.SYSTEM_CLOCK}),tooltip:"Play Forward"});let o=Rn(function(){t._clockViewModel.clockStep=Vr.SYSTEM_CLOCK},ve.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new Wb(o,{toggled:ve.computed(function(){return e.clockStep===Vr.SYSTEM_CLOCK}),tooltip:ve.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Rn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,u=Lle(c,a)-1;u>=0&&(s.multiplier=a[u])}),this._faster=Rn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,u=Lle(c,a)+1;u<a.length&&(s.multiplier=a[u])})}bf.defaultDateFormatter=function(e,t){let n=K.toGregorianDate(e);return`${y5t[n.month-1]} ${n.day} ${n.year}`};bf.defaultTicks=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800];bf.defaultTimeFormatter=function(e,t){let n=K.toGregorianDate(e),i=Math.round(n.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`:`${n.hour.toString().padStart(2,"0")}:${n.minute.toString().padStart(2,"0")}:${n.second.toString().padStart(2,"0")} UTC`};bf.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};bf.prototype.setShuttleRingTicks=function(e){let t,n,i,r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,n=e.length;t<n;++t)i=e[t],r.hasOwnProperty(i)||(r[i]=!0,o.push(i));o.sort(t3e);let s=[];for(n=o.length,t=n-1;t>=0;--t)i=o[t],i!==0&&s.push(-i);ti(s,o),this._allShuttleRingTicks=s};bf.prototype.adjustDate=function(e,t){if(t===0)return;let n=this._clockViewModel,i=n.currentTime,r=K.toGregorianDate(i),o;if(e==="day"){o=K.addDays(i,t,new K);let s=K.toGregorianDate(o);if(s.year<1||s.year>9999)return}else if(e==="month"){let a=Math.min(Math.max((r.year-1)*12+r.month-1+t,0),119987),c=Math.floor(a/12)+1,u=a%12+1;o=e3e(r,c,u)}else{let s=Math.min(Math.max(r.year+t,1),9999);o=e3e(r,s,r.month)}K.equals(i,o)||(n.shouldAnimate=!1,n.currentTime=o)};bf.prototype.adjustTime=function(e,t){if(t===0)return;let n=this._clockViewModel,i=n.currentTime,r;if(e==="hour")r=K.addHours(i,t,new K);else if(e==="minute")r=K.addMinutes(i,t,new K);else{let s=e==="second"?t:t/1e3;r=K.addSeconds(i,s,new K)}let o=K.toGregorianDate(r);o.year<1||o.year>9999||(n.shouldAnimate=!1,n.currentTime=r)};Object.defineProperties(bf.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){this._timeFormatter=e}}});bf._maxShuttleRingAngle=tD;bf._realtimeShuttleRingAngle=Yb;var O8=bf;function E5t(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof Yo&&(e.tileset=n.primitive),e.pickActive=!1}}function i3e(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof Yo&&(e.tileset=i.primitive)},un.MOUSE_MOVE):(e._eventHandler.removeInputAction(un.MOUSE_MOVE),e.picking=e.picking)}var C5t={maximumFractionDigits:3};function M8(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,C5t):Math.round(t).toLocaleString()}function N8(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[ao.PICK]:e._statisticsPerPass[ao.RENDER],i='<ul class="cesium-cesiumInspector-statistics">';return i+=`<li><strong>Visited: </strong>${n.visited.toLocaleString()}</li><li><strong>Selected: </strong>${n.selected.toLocaleString()}</li><li><strong>Commands: </strong>${n.numberOfCommands.toLocaleString()}</li>`,i+="</ul>",t||(i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Requests: </strong>${n.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${n.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${n.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${n.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${n.numberOfTilesTotal.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Features Selected: </strong>${n.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${n.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${n.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${n.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${n.numberOfTrianglesSelected.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Tiles styled: </strong>${n.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${n.numberOfFeaturesStyled.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Children Union Culled: </strong>${n.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,i+="</ul>",i+='<ul class="cesium-cesiumInspector-statistics">',i+=`<li><strong>Geometry Memory (MB): </strong>${M8(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${M8(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${M8(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function r3e(){let e=Li.statistics;return`
<ul class="cesium-cesiumInspector-statistics">
<li><strong>Geometry Memory (MB): </strong>${M8(e.geometryByteLength)}</li>
<li><strong>Texture Memory (MB): </strong>${M8(e.texturesByteLength)}</li>
</ul>
`}var v5t=[{text:"Highlight",value:Uu.HIGHLIGHT},{text:"Replace",value:Uu.REPLACE},{text:"Mix",value:Uu.MIX}],n3e=new z(1,1,0,.4),S5t=new z,sq=new z;function vc(e,t){let n=this,i=e.canvas;this._eventHandler=new ua(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new my({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,ve.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=ve.observable({}),this.properties=[],ve.defineProperty(this,"properties",function(){let k=[],G=n._properties();for(let q in G)G.hasOwnProperty(q)&&k.push(q);return k});let r=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(k){r(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=k)}}),this.dynamicScreenSpaceError=!1;let o=ve.observable();ve.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(k){o(k),l(n._tileset)&&(n._tileset.colorBlendMode=k,n._scene.requestRender())}}),this.colorBlendMode=Uu.HIGHLIGHT;let s=ve.observable(),a=ve.observable();ve.defineProperty(this,"picking",{get:function(){return a()},set:function(k){a(k),k?n._eventHandler.setInputAction(function(G){let q=e.pick(G.endPosition);if(q instanceof na?(n.feature=q,n.tile=q.content.tile):l(q)&&l(q.content)?(n.feature=void 0,n.tile=q.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(q)&&l(q.content)){let Q;e.pickPositionSupported&&(Q=e.pickPosition(G.endPosition),l(Q)&&(n._tileset.debugPickPosition=Q)),n._tileset.debugPickedTile=q.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},un.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(un.MOUSE_MOVE))}}),this.picking=!0;let c=ve.observable();ve.defineProperty(this,"colorize",{get:function(){return c()},set:function(k){c(k),l(n._tileset)&&(n._tileset.debugColorizeTiles=k,n._scene.requestRender())}}),this.colorize=!1;let u=ve.observable();ve.defineProperty(this,"wireframe",{get:function(){return u()},set:function(k){u(k),l(n._tileset)&&(n._tileset.debugWireframe=k,n._scene.requestRender())}}),this.wireframe=!1;let f=ve.observable();ve.defineProperty(this,"showBoundingVolumes",{get:function(){return f()},set:function(k){f(k),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=k,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let d=ve.observable();ve.defineProperty(this,"showContentBoundingVolumes",{get:function(){return d()},set:function(k){d(k),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=k,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=ve.observable();ve.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(k){p(k),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=k,n._scene.requestRender())}}),this.showRequestVolumes=!1;let g=ve.observable();ve.defineProperty(this,"freezeFrame",{get:function(){return g()},set:function(k){g(k),l(n._tileset)&&(n._tileset.debugFreezeFrame=k,n._scene.debugShowFrustumPlanes=k,n._scene.requestRender())}}),this.freezeFrame=!1,ve.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(k){s(k),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=k,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let m=ve.observable();ve.defineProperty(this,"showGeometricError",{get:function(){return m()},set:function(k){m(k),l(n._tileset)&&(n._tileset.debugShowGeometricError=k,n._scene.requestRender())}}),this.showGeometricError=!1;let y=ve.observable();ve.defineProperty(this,"showRenderingStatistics",{get:function(){return y()},set:function(k){y(k),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=k,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let A=ve.observable();ve.defineProperty(this,"showMemoryUsage",{get:function(){return A()},set:function(k){A(k),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=k,n._scene.requestRender())}}),this.showMemoryUsage=!1;let b=ve.observable();ve.defineProperty(this,"showUrl",{get:function(){return b()},set:function(k){b(k),l(n._tileset)&&(n._tileset.debugShowUrl=k,n._scene.requestRender())}}),this.showUrl=!1;let x=ve.observable();ve.defineProperty(this,"maximumScreenSpaceError",{get:function(){return x()},set:function(k){k=Number(k),isNaN(k)||(x(k),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=k))}}),this.maximumScreenSpaceError=16;let T=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return T()},set:function(k){k=Number(k),isNaN(k)||(T(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=k))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,ve.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(T(),1/6)},set:function(k){let G=Math.pow(k,6);T(G),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=G)}});let E=ve.observable();ve.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return E()},set:function(k){k=Number(k),isNaN(k)||(E(k),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=k))}}),this.dynamicScreenSpaceErrorFactor=24;let v=E5t(this),S=ve.observable();ve.defineProperty(this,"pickActive",{get:function(){return S()},set:function(k){S(k),k?n._eventHandler.setInputAction(v,un.LEFT_CLICK):n._eventHandler.removeInputAction(un.LEFT_CLICK)}});let I=ve.observable();ve.defineProperty(this,"pointCloudShading",{get:function(){return I()},set:function(k){I(k),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=k)}}),this.pointCloudShading=!1;let R=ve.observable();ve.defineProperty(this,"geometricErrorScale",{get:function(){return R()},set:function(k){k=Number(k),isNaN(k)||(R(k),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=k))}}),this.geometricErrorScale=1;let O=ve.observable();ve.defineProperty(this,"maximumAttenuation",{get:function(){return O()},set:function(k){k=Number(k),isNaN(k)||(O(k),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=k===0?void 0:k))}}),this.maximumAttenuation=0;let L=ve.observable();ve.defineProperty(this,"baseResolution",{get:function(){return L()},set:function(k){k=Number(k),isNaN(k)||(L(k),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=k===0?void 0:k))}}),this.baseResolution=0;let _=ve.observable();ve.defineProperty(this,"eyeDomeLighting",{get:function(){return _()},set:function(k){_(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=k)}}),this.eyeDomeLighting=!1;let C=ve.observable();ve.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return C()},set:function(k){k=Number(k),isNaN(k)||(C(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=k))}}),this.eyeDomeLightingStrength=1;let w=ve.observable();ve.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return w()},set:function(k){k=Number(k),isNaN(k)||(w(k),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=k))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let P=ve.observable();ve.defineProperty(this,"skipLevelOfDetail",{get:function(){return P()},set:function(k){P(k),l(n._tileset)&&(n._tileset.skipLevelOfDetail=k)}}),this.skipLevelOfDetail=!0;let M=ve.observable();ve.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return M()},set:function(k){k=Number(k),isNaN(k)||(M(k),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=k))}}),this.skipScreenSpaceErrorFactor=16;let F=ve.observable();ve.defineProperty(this,"baseScreenSpaceError",{get:function(){return F()},set:function(k){k=Number(k),isNaN(k)||(F(k),l(n._tileset)&&(n._tileset.baseScreenSpaceError=k))}}),this.baseScreenSpaceError=1024;let V=ve.observable();ve.defineProperty(this,"skipLevels",{get:function(){return V()},set:function(k){k=Number(k),isNaN(k)||(V(k),l(n._tileset)&&(n._tileset.skipLevels=k))}}),this.skipLevels=1;let B=ve.observable();ve.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return B()},set:function(k){B(k),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=k)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let j=ve.observable();ve.defineProperty(this,"loadSiblings",{get:function(){return j()},set:function(k){j(k),l(n._tileset)&&(n._tileset.loadSiblings=k)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||i3e(this,!0)}Object.defineProperties(vc.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return v5t}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,l(e)){this._properties(e.properties);let t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],n=t.length;for(let r=0;r<n;++r){let o=t[r];this[o]=this[o]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;let i=e.pointCloudShading;this.pointCloudShading=i.attenuation,this.geometricErrorScale=i.geometricErrorScale,this.maximumAttenuation=i.maximumAttenuation?i.maximumAttenuation:0,this.baseResolution=i.baseResolution?i.baseResolution:0,this.eyeDomeLighting=i.eyeDomeLighting,this.eyeDomeLightingStrength=i.eyeDomeLightingStrength,this.eyeDomeLightingRadius=i.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=N8(e,!1),this._pickStatisticsText=N8(e,!0),this._resourceCacheStatisticsText=r3e(),i3e(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;let t=this._feature;l(t)&&!t.content.isDestroyed()&&(!this.colorize&&l(this._style)?t.color=l(this._style.color)?this._style.color.evaluateColor(t,S5t):z.WHITE:t.color=sq,this._scene.requestRender()),l(e)&&(z.clone(e.color,sq),e.color=n3e,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;let t=this._tile;l(t)&&!t.isDestroyed()&&!Fle(t.content)&&(t.color=sq,this._scene.requestRender()),l(e)&&!Fle(e.content)&&(z.clone(e.color,sq),e.color=n3e,this._scene.requestRender()),this._tile=e}}});function Fle(e){if(!l(e))return!1;if(e.featuresLength>0)return!0;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)if(!Fle(t[i]))return!1;return!0}return!1}vc.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};vc.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};vc.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};vc.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};vc.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};vc.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};vc.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};vc.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};vc.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};vc.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};vc.prototype.compileStyle=function(){let e=this._tileset;if(!(!l(e)||this.styleString===JSON.stringify(e.style))){this._editorError="";try{this.styleString.length===0&&(this.styleString="{}"),this._style=new l_(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};vc.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,r=n.selectionEnd,o=r,a=n.value.slice(i,r).split(`
`),c=a.length,u;if(t.shiftKey)for(u=0;u<c;++u)a[u][0]===" "&&(a[u][1]===" "?(a[u]=a[u].substr(2),o-=2):(a[u]=a[u].substr(1),o-=1));else for(u=0;u<c;++u)a[u]=` ${a[u]}`,o+=2;let f=a.join(`
`);n.value=n.value.slice(0,i)+f+n.value.slice(r),n.selectionStart=i!==r?i:o,n.selectionEnd=o}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};vc.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=N8(e,!1),this._pickStatisticsText=N8(e,!0),this._resourceCacheStatisticsText=r3e())};vc.prototype.isDestroyed=function(){return!1};vc.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){ve.getObservable(e,t).dispose()}),le(this)};vc.getStatistics=N8;var L8=vc;function aq(e,t){e=Ln(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let r=new L8(t,i);this._viewModel=r,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=Af.createSection,c=Af.createCheckbox,u=Af.createRangeInput,f=Af.createButton,d=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),g=a(s,"Update","updateVisible","toggleUpdate"),m=a(s,"Logging","loggingVisible","toggleLogging"),y=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),A=a(s,"Style","styleVisible","toggleStyle"),b=a(s,"Optimization","optimizationVisible","toggleOptimization"),x=document.createElement("div");x.className="field-group";let T=document.createElement("label");T.className="field-label",T.appendChild(document.createTextNode("Properties: "));let E=document.createElement("div");E.setAttribute("data-bind","text: properties"),x.appendChild(T),x.appendChild(E),d.appendChild(x),d.appendChild(f("Pick Tileset","togglePickTileset","pickActive")),d.appendChild(f("Trim Tiles Cache","trimTilesCache")),d.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let v=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),S=document.createElement("p");S.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),S.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),S.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",v.appendChild(S),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let I=document.createElement("div");I.setAttribute("data-bind","visible: pointCloudShading"),I.appendChild(u("Geometric Error Scale","geometricErrorScale",0,2,.01)),I.appendChild(u("Maximum Attenuation","maximumAttenuation",0,32,1)),I.appendChild(u("Base Resolution","baseResolution",0,1,.01)),I.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(I);let R=document.createElement("div");R.setAttribute("data-bind","visible: eyeDomeLighting"),R.appendChild(u("EDL Strength","eyeDomeLightingStrength",0,2,.1)),R.appendChild(u("EDL Radius","eyeDomeLightingRadius",0,4,.1)),I.appendChild(R),g.appendChild(c("Freeze Frame","freezeFrame")),g.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let O=document.createElement("div");O.appendChild(u("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),g.appendChild(O);let L=document.createElement("div");L.setAttribute("data-bind","visible: dynamicScreenSpaceError"),L.appendChild(u("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),L.appendChild(u("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),g.appendChild(L),m.appendChild(c("Performance","performance")),m.appendChild(i),m.appendChild(c("Statistics","showStatistics"));let _=document.createElement("div");_.className="cesium-3dTilesInspector-statistics",_.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),m.appendChild(_),m.appendChild(c("Pick Statistics","showPickStatistics"));let C=document.createElement("div");C.className="cesium-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),m.appendChild(C),m.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let w=document.createElement("div");w.className="cesium-3dTilesInspector-statistics",w.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),m.appendChild(w);let P=document.createElement("div");A.appendChild(P),P.appendChild(document.createTextNode("Color Blend Mode: "));let M=document.createElement("select");M.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),P.appendChild(M);let F=document.createElement("textarea");F.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),P.className="cesium-cesiumInspector-styleEditor",P.appendChild(F);let V=f("Compile (Ctrl+Enter)","compileStyle");P.appendChild(V);let B=document.createElement("div");B.className="cesium-cesiumInspector-error",B.setAttribute("data-bind","text: editorError"),P.appendChild(B),y.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),y.appendChild(c("Geometric Error","showGeometricError")),y.appendChild(c("Rendering Statistics","showRenderingStatistics")),y.appendChild(c("Memory Usage (MB)","showMemoryUsage")),y.appendChild(c("Url","showUrl")),b.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let j=document.createElement("div");j.appendChild(u("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),b.appendChild(j);let k=document.createElement("div");k.appendChild(u("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),b.appendChild(k);let G=document.createElement("div");G.appendChild(u("Min. levels to skip","skipLevels",0,10,1)),b.appendChild(G),b.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),b.appendChild(c("Load siblings of visible tiles","loadSiblings")),ve.applyBindings(r,n)}Object.defineProperties(aq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});aq.prototype.isDestroyed=function(){return!1};aq.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),le(this)};var F8=aq;function cq(e,t){l(t)||(t=document.body),t=Ln(t);let n=this,i=ve.observable(es.fullscreen),r=ve.observable(es.enabled),o=t.ownerDocument;this.isFullscreen=void 0,ve.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,ve.defineProperty(this,"isFullscreenEnabled",{get:function(){return r()},set:function(s){r(s&&es.enabled)}}),this.tooltip=void 0,ve.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Rn(function(){es.fullscreen?es.exitFullscreen():es.requestFullscreen(n._fullscreenElement)},ve.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Ln(e)??o.body,this._callback=function(){i(es.fullscreen)},o.addEventListener(es.changeEventName,this._callback)}Object.defineProperties(cq.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});cq.prototype.isDestroyed=function(){return!1};cq.prototype.destroy=function(){document.removeEventListener(es.changeEventName,this._callback),le(this)};var B8=cq;var w5t="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",I5t="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function lq(e,t){e=Ln(e);let n=new B8(t,e);n._exitFullScreenPath=I5t,n._enterFullScreenPath=w5t;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),ve.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(lq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});lq.prototype.isDestroyed=function(){return!1};lq.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),le(this)};var k8=lq;function P5t(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let r=parseInt(i,10),o;if(r===7)o="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);r>=c&&(s.push(a+1),r-=c)}o=s.reverse().join(" and ")}t+=`<br>&nbsp;&nbsp;&nbsp;&nbsp;${n[i]} in frustum ${o}`}t+=`<br>Total: ${e.totalCommands}`}return t}function Ble(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var D5t=new pn,R5t=new h;function U8(e,t){let n=this,i=e.canvas,r=new ua(i);this._eventHandler=r,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let o=this._scene.globe;o.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",ve.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Rn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Rn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Rn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Rn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=ve.getObservable(this,"frustums").subscribe(function(u){n._scene.debugShowFrustums=u,n._scene.requestRender()}),this._frustumPlanesSubscription=ve.getObservable(this,"frustumPlanes").subscribe(function(u){n._scene.debugShowFrustumPlanes=u,n._scene.requestRender()}),this._performanceSubscription=ve.getObservable(this,"performance").subscribe(function(u){u?n._performanceDisplay=new my({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Rn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=ve.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Rn(function(){if(n.primitiveReferenceFrame){let u=n._primitive.modelMatrix;n._modelMatrixPrimitive=new $z({modelMatrix:u}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=ve.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Rn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(u){return l(n._modelMatrixPrimitive)&&u.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?u.owner===n._primitive||u.owner===n._primitive._billboardCollection||u.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=ve.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=ve.getObservable(this,"wireframe").subscribe(function(u){o._surface.tileProvider._debug.wireframe=u,n._scene.requestRender()}),this._depthFrustumSubscription=ve.getObservable(this,"depthFrustum").subscribe(function(u){n._scene.debugShowDepthFrustum=u,n._scene.requestRender()}),this._incrementDepthFrustum=Rn(function(){let u=n.depthFrustum+1;return n.depthFrustum=Ble(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Rn(function(){let u=n.depthFrustum-1;return n.depthFrustum=Ble(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=ve.getObservable(this,"suspendUpdates").subscribe(function(u){o._surface._debug.suspendLodUpdate=u,u||(n.filterTile=!1)});let s;this._showTileCoordinates=Rn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new m8({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=ve.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=ve.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Rn(function(){return n.tileBoundingSphere?o._surface.tileProvider._debug.boundingSphereTile=n._tile:o._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Rn(function(){return n.filterTile?(n.suspendUpdates=!0,o._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&o._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=ve.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(u){let f=n._scene.pick({x:u.position.x,y:u.position.y});l(f)&&(n.primitive=l(f.collection)?f.collection:f.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=Rn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=ve.getObservable(this,"pickPrimitiveActive").subscribe(function(u){u?r.setInputAction(a,un.LEFT_CLICK):r.removeInputAction(un.LEFT_CLICK)});function c(u){let f,d=o.ellipsoid,p=n._scene.camera.getPickRay(u.position,D5t),g=o.pick(p,n._scene,R5t);if(l(g)){let m=d.cartesianToCartographic(g),y=o._surface.tileProvider._tilesToRenderByTextureCount;for(let A=0;!f&&A<y.length;++A){let b=y[A];if(l(b))for(let x=0;!f&&x<b.length;++x){let T=b[x];ie.contains(T.rectangle,m)&&(f=T)}}}n.tile=f,n.pickTileActive=!1}this._pickTile=Rn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=ve.getObservable(this,"pickTileActive").subscribe(function(u){u?r.setInputAction(c,un.LEFT_CLICK):r.removeInputAction(un.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(U8.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return Rn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Rn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Rn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Rn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Rn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});U8.prototype._update=function(){this.frustums&&(this.frustumStatisticText=P5t(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=Ble(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};U8.prototype.isDestroyed=function(){return!1};U8.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),le(this)};var z8=U8;function uq(e,t){e=Ln(e);let n=document.createElement("div"),i=new z8(t,n);this._viewModel=i,this._container=e;let r=document.createElement("div");this._element=r;let o=document.createElement("div");o.textContent="Cesium Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="cesium-cesiumInspector",r.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");s.className="cesium-cesiumInspector-dropDown",r.appendChild(s);let a=Af.createSection,c=Af.createCheckbox,u=a(s,"General","generalVisible","toggleGeneral"),f=c("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(d),u.appendChild(f),u.appendChild(c("Show Frustum Planes","frustumPlanes")),u.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",u.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(p);let g=document.createElement("div");u.appendChild(g);let m=document.createElement("span");m.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),g.appendChild(m);let y=document.createElement("span");y.setAttribute("data-bind","text: depthFrustumText"),g.appendChild(y);let A=document.createElement("input");A.type="button",A.value="-",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: decrementDepthFrustum"),g.appendChild(A);let b=document.createElement("input");b.type="button",b.value="+",b.className="cesium-cesiumInspector-pickButton",b.setAttribute("data-bind","click: incrementDepthFrustum"),g.appendChild(b);let x=a(s,"Primitives","primitivesVisible","togglePrimitives"),T=document.createElement("div");T.className="cesium-cesiumInspector-pickSection",x.appendChild(T);let E=document.createElement("input");E.type="button",E.value="Pick a primitive",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let v=document.createElement("div");v.className="cesium-cesiumInspector-center",v.appendChild(E),T.appendChild(v),T.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),T.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),T.appendChild(this._primitiveOnly);let S=a(s,"Terrain","terrainVisible","toggleTerrain"),I=document.createElement("div");I.className="cesium-cesiumInspector-pickSection",S.appendChild(I);let R=document.createElement("input");R.type="button",R.value="Pick a tile",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),v=document.createElement("div"),v.appendChild(R),v.className="cesium-cesiumInspector-center",I.appendChild(v);let O=document.createElement("div");I.appendChild(O);let L=document.createElement("input");L.type="button",L.value="Parent",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectParent");let _=document.createElement("input");_.type="button",_.value="NW",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: selectNW");let C=document.createElement("input");C.type="button",C.value="NE",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: selectNE");let w=document.createElement("input");w.type="button",w.value="SW",w.className="cesium-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectSW");let P=document.createElement("input");P.type="button",P.value="SE",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectSE");let M=document.createElement("div");M.className="cesium-cesiumInspector-tileText",O.className="cesium-cesiumInspector-frustumStatistics",O.appendChild(M),O.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");let F=document.createElement("div");F.className="cesium-cesiumInspector-relativeText",F.textContent="Select relative:",O.appendChild(F);let V=document.createElement("table"),B=document.createElement("tr"),j=document.createElement("tr"),k=document.createElement("td");k.appendChild(L);let G=document.createElement("td");G.appendChild(_);let q=document.createElement("td");q.appendChild(C),B.appendChild(k),B.appendChild(G),B.appendChild(q);let Q=document.createElement("td"),W=document.createElement("td");W.appendChild(w);let J=document.createElement("td");J.appendChild(P),j.appendChild(Q),j.appendChild(W),j.appendChild(J),V.appendChild(B),V.appendChild(j),O.appendChild(V),I.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),I.appendChild(c("Show only selected","filterTile","hasPickedTile")),S.appendChild(c("Wireframe","wireframe")),S.appendChild(c("Suspend LOD update","suspendUpdates")),S.appendChild(c("Show tile coordinates","tileCoordinates")),ve.applyBindings(i,this._element)}Object.defineProperties(uq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});uq.prototype.isDestroyed=function(){return!1};uq.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),le(this)};var V8=uq;var o3e=1e3;function bp(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new sC({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._wasGeocodeCancelled=!1,this._previousCredits=[],this._complete=new be,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=a3e,this._handleArrowUp=s3e;let t=this;this._suggestionsVisible=ve.pureComputed(function(){let r=ve.getObservable(t,"_suggestions")().length>0,o=ve.getObservable(t,"_showSuggestions")();return r&&o}),this._searchCommand=Rn(function(i){if(i=i??Ib.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)B5t(t);else return L5t(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,r){let o=r.key==="ArrowDown"||r.key==="Down"||r.keyCode===40,s=r.key==="ArrowUp"||r.key==="Up"||r.keyCode===38;return(o||s)&&r.preventDefault(),!0},this.handleKeyUp=function(i,r){let o=r.key==="ArrowDown"||r.key==="Down"||r.keyCode===40,s=r.key==="ArrowUp"||r.key==="Up"||r.keyCode===38,a=r.key==="Enter"||r.keyCode===13;return s?s3e(t):o?a3e(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let r=i.destination;u3e(t),t.destinationFound(t,r)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,r){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??bp.flyToDestination,this._focusTextbox=!1,ve.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=ve.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){bp._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,ve.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,ve.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,ve.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(bp.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});function s3e(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],bp._adjustSuggestionsScroll(e,n)}function a3e(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],bp._adjustSuggestionsScroll(e,i)}function O5t(e,t){let n=l(t)?t.availability:void 0;return l(n)?aC(t,[e]).then(function(i){return e=i[0],e.height+=o3e,e}):(e.height+=o3e,Promise.resolve(e))}function M5t(e,t){let n=e._scene,i=n.ellipsoid,r=n.camera,o=n.terrainProvider,s=t,a;return t instanceof ie?D.equalsEpsilon(t.south,t.north,D.EPSILON7)&&D.equalsEpsilon(t.east,t.west,D.EPSILON7)?t=ie.center(t):a=AC(t,n):t=i.cartesianToCartographic(t),l(a)||(a=O5t(t,o)),a.then(function(c){s=i.cartographicToCartesian(c)}).finally(function(){r.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:N.IDENTITY})})}async function N5t(e,t,n){try{return{state:"fulfilled",value:await e.geocode(t,n),credits:e.credit}}catch(i){return{state:"rejected",reason:i}}}async function L5t(e,t,n){let i=e._searchText;if(l3e(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let r,o;for(r=0;r<t.length;r++){if(e._wasGeocodeCancelled)return;if(o=await N5t(t[r],i,n),l(o)&&o.state==="fulfilled"&&o.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,Ule(e);let s=o.value;if(o.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);let a=c3e(e,pP.getCreditsFromResult(s[0]));l(a)||kle(e,t[r].credit);return}e._searchText=`${i} (not found)`}function kle(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function c3e(e,t){return l(t)&&t.forEach(n=>kle(e,n)),t}function Ule(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function F5t(e,t){let n=Ln(e._viewContainer),i=n.getElementsByClassName("search-results")[0],o=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=o.offsetTop;s+o.clientHeight>i.clientHeight?i.scrollTop=s+o.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function B5t(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function l3e(e){return/^\s*$/.test(e)}function u3e(e){ve.getObservable(e,"_suggestions").removeAll()}async function k5t(e){if(!e.autoComplete)return;let t=e._searchText;if(u3e(e),Ule(e),!l3e(t))for(let n of e._geocoderServices){let i=await n.geocode(t,Ib.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let r=!0;i.forEach(o=>{let s=pP.getCreditsFromResult(o);r=r&&!l(s),c3e(e,s)}),r&&kle(e,n.credit)}if(e._suggestions.length>=5)return}}bp.flyToDestination=M5t;bp._updateSearchSuggestions=k5t;bp._adjustSuggestionsScroll=F5t;bp.prototype.isDestroyed=function(){return!1};bp.prototype.destroy=function(){return this._suggestionSubscription.dispose(),Ule(this),le(this)};var j8=bp;var U5t="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",z5t="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function fq(e){let t=Ln(e.container),n=new j8(e);n._startSearchPath=U5t,n._stopSearchPath=z5t;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let r=document.createElement("input");r.type="search",r.className="cesium-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){r.select()},0)},r.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(r),this._textBox=r;let o=document.createElement("span");o.className="cesium-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(o),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),ve.applyBindings(n,i),ve.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let f=u.target;typeof u.composedPath=="function"&&(f=u.composedPath()[0]),t.contains(f)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},dn.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(fq.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});fq.prototype.isDestroyed=function(){return!1};fq.prototype.destroy=function(){let e=this._container;return dn.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),ve.cleanNode(this._form),ve.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),le(this)};var H8=fq;function f3e(e,t){this._scene=e,this._duration=t;let n=this;this._command=Rn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",ve.track(this,["tooltip"])}Object.defineProperties(f3e.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var G8=f3e;function dq(e,t,n){e=Ln(e);let i=new G8(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),ve.applyBindings(i,r),this._container=e,this._viewModel=i,this._element=r}Object.defineProperties(dq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});dq.prototype.isDestroyed=function(){return!1};dq.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),le(this)};var W8=dq;function V5t(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function h3e(e,t){ve.track(e);for(let n=0;n<e.sublayers.length;n++)h3e(e.sublayers[n],t)}function hq(e){return e.modelName==="FullModel"}function m3e(e){return e.modelName==="Overview"}function p3e(e){return m3e(e)||hq(e)}function d3e(e,t){if(p3e(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:ve.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function j5t(e,t){if(p3e(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");hq(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function H5t(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let r=e.getAttributeValues(n[i]);for(let o=0;o<r.length;o++)t.push(r[o])}t.sort((i,r)=>i-r),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function G5t(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:ve.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:ve.observable(!0),index:-1}],currentLayer:ve.observable(),expandClickHandler:V5t,setOptionDisable:function(i,r){ve.applyBindingsToNode(i,{disable:r.disable},r)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){j5t(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){h3e(n[i],this.viewModel);let r=d3e(n[i],this.viewModel);l(r)&&(m3e(r)||!l(this.viewModel.defaultLayer)&&hq(r))&&(this.viewModel.defaultLayer=r)}if(this.viewModel.topLayers.length===1&&n.length>0){e.show=!1;let i={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=d3e(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(r){e.show=hq(r)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return H5t(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var q8=G5t;function W5t(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=`
<h3>Building explorer</h3>
<select
data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
></select>
<div id="bsl-wrapper">
<h3>Select Level</h3>
<select data-bind="options: levels, value: currentLevel"></select>
<h3>Disciplines & Categories</h3>
<ul class="layersList" data-bind="foreach: sublayers">
<ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
<li>
<div class="li-wrapper">
<span
class="expandItem"
data-bind="click: $root.expandClickHandler"
>+</span
>
<input
type="checkbox"
data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
/>
<label data-bind="attr: { for: name}">
<span data-bind="text: name"></span>
</label>
</div>
<ul class="nested" data-bind="attr: { id: name + '-expander'}">
<li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
<div class="li-wrapper">
<input
type="checkbox"
data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
/>
<label data-bind="attr: { for: name}">
<span data-bind="text: name"></span>
</label>
</div>
</li>
</ul>
</li>
</ul>
</ul>
</div>`,n.appendChild(i);let r=new q8(t);ve.track(r),ve.applyBindings(r,n),l(r.defaultLayer)&&(r.currentLayer=r.defaultLayer)}var zle=W5t;var q5t="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",Y5t="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function Vle(){this._cameraClicked=new be,this._closeClicked=new be,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",ve.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,ve.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?Y5t:q5t}}),ve.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}Vle.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(Vle.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Y8=Vle;function mq(e){e=Ln(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=t.ownerDocument,r,o,s,a,c;function u(b){!l(r)||l(b)&&b.pointerId!==r||(r=void 0,t.classList.remove("cesium-infoBox-dragging"))}function f(b){if(!(b.button!==0||b.isPrimary===!1)){r=b.pointerId,o=b.clientX,s=b.clientY,a=t.offsetLeft,c=t.offsetTop,t.style.left=`${a}px`,t.style.top=`${c}px`,t.style.right="auto",t.classList.add("cesium-infoBox-dragging");try{n.setPointerCapture(b.pointerId)}catch{}b.preventDefault()}}function d(b){!l(r)||b.pointerId!==r||(t.style.left=`${a+b.clientX-o}px`,t.style.top=`${c+b.clientY-s}px`,b.preventDefault())}n.addEventListener("pointerdown",f),i.addEventListener("pointermove",d),i.addEventListener("pointerup",u),i.addEventListener("pointercancel",u);let p=document.createElement("button");p.type="button",p.className="cesium-button cesium-infoBox-camera",p.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(p);let g=document.createElement("button");g.type="button",g.className="cesium-infoBox-close",g.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),g.innerHTML="&times;",t.appendChild(g);let m=document.createElement("iframe");m.className="cesium-infoBox-iframe",m.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),m.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),m.setAttribute("allowfullscreen",!0),t.appendChild(m);let y=new Y8;ve.applyBindings(y,t),this._container=e,this._element=t,this._frame=m,this._viewModel=y,this._descriptionSubscription=void 0,this._titleElement=n,this._ownerDocument=i,this._handlePointerDown=f,this._handlePointerMove=d,this._stopDragging=u;let A=this;m.addEventListener("load",function(){let b=m.contentDocument,x=b.createElement("link");x.href=Zt("Widgets/InfoBox/InfoBoxDescription.css"),x.rel="stylesheet",x.type="text/css";let T=b.createElement("div");T.className="cesium-infoBox-description",b.head.appendChild(x),b.body.appendChild(T),A._descriptionSubscription=Cc(y,"description",function(E){m.style.height="5px",T.innerHTML=E;let v=null,S=T.firstElementChild;if(S!==null&&T.childNodes.length===1){let R=window.getComputedStyle(S);if(R!==null){let O=R["background-color"],L=z.fromCssColorString(O);l(L)&&L.alpha!==0&&(v=R["background-color"])}}t.style["background-color"]=v;let I=T.getBoundingClientRect().height;m.style.height=`${I}px`})}),m.setAttribute("src","about:blank")}Object.defineProperties(mq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});mq.prototype.isDestroyed=function(){return!1};mq.prototype.destroy=function(){let e=this._container,t=this._ownerDocument;return this._titleElement.removeEventListener("pointerdown",this._handlePointerDown),t.removeEventListener("pointermove",this._handlePointerMove),t.removeEventListener("pointerup",this._stopDragging),t.removeEventListener("pointercancel",this._stopDragging),ve.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),le(this)};var X8=mq;function g3e(){this.showInstructions=!1;let e=this;this._command=Rn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Rn(function(){e._touch=!1}),this._showTouch=Rn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",ve.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(g3e.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var K8=g3e;function pq(e){let t=Ln(e.container),n=new K8,i=e.instructionsInitiallyVisible??!1;n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let r=document.createElement("span");r.className="cesium-navigationHelpButton-wrapper",t.appendChild(r);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),r.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=Zt("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let f=document.createElement("img");f.src=Zt("Widgets/Images/NavigationHelp/Touch.svg"),f.className="cesium-navigation-button-icon",f.style.width="25px",f.style.height="25px",u.appendChild(f),u.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(u);let d=document.createElement("div");d.className="cesium-click-navigation-help cesium-navigation-help-instructions",d.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),d.innerHTML=` <table> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(d);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${Zt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),ve.applyBindings(n,r),this._container=t,this._viewModel=n,this._wrapper=r,this._closeInstructions=function(g){r.contains(g.target)||(n.showInstructions=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(pq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});pq.prototype.isDestroyed=function(){return!1};pq.prototype.destroy=function(){return dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),le(this)};var $8=pq;function jle(e){this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,ve.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Rn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=fV.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(jle.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});jle.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),le(this)};var J8=jle;function gq(e){let t=Ln(e.container),n=new J8(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let r=document.createElement("button");r.setAttribute("type","button"),r.className="cesium-performance-watchdog-message-dismiss",r.innerHTML="&times;",r.setAttribute("data-bind","click: dismissMessage"),i.appendChild(r);let o=document.createElement("div");o.className="cesium-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(o),t.appendChild(i),ve.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(gq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});gq.prototype.isDestroyed=function(){return!1};gq.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),le(this)};var Z8=gq;function _q(e){this._scene=e,this._orthographic=e.camera.frustum instanceof gn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,ve.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;ve.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Rn(function(){t.sceneMode===re.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Xo,this._eventHelper.add(e.morphComplete,function(n,i,r,o){t.sceneMode=r,t._orthographic=r===re.SCENE2D||t._scene.camera.frustum instanceof gn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Rn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Rn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=re}Object.defineProperties(_q.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});_q.prototype.isDestroyed=function(){return!1};_q.prototype.destroy=function(){this._eventHelper.removeAll(),le(this)};var Q8=_q;var X5t="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",K5t="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function yq(e,t){e=Ln(e);let n=new Q8(t);n._perspectivePath=X5t,n._orthographicPath=K5t;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(r);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(o);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),ve.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(yq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});yq.prototype.isDestroyed=function(){return!1};yq.prototype.destroy=function(){return this._viewModel.destroy(),dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),le(this)};var ej=yq;function Aq(e,t){this._scene=e;let n=this,i=function(r,o,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Xo,this._eventHelper.add(e.morphStart,i),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",ve.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,ve.defineProperty(this,"selectedTooltip",function(){let r=n.sceneMode;return r===re.SCENE2D?n.tooltip2D:r===re.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Rn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Rn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Rn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Rn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=re}Object.defineProperties(Aq.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Aq.prototype.isDestroyed=function(){return!1};Aq.prototype.destroy=function(){this._eventHelper.removeAll(),le(this)};var tj=Aq;var $5t="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",J5t="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",Z5t="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function bq(e,t,n){e=Ln(e);let i=new tj(t,n);i._globePath=$5t,i._flatMapPath=J5t,i._columbusViewPath=Z5t;let r=document.createElement("span");r.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(r);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',r.appendChild(o);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),r.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(c),ve.applyBindings(i,r),this._viewModel=i,this._container=e,this._wrapper=r,this._closeDropDown=function(u){r.contains(u.target)||(i.dropDownVisible=!1)},dn.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(bq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});bq.prototype.isDestroyed=function(){return!1};bq.prototype.destroy=function(){return this._viewModel.destroy(),dn.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),ve.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),le(this)};var nj=bq;var Q5t=new U,xq="-1000px";function ij(e,t,n){this._scene=e,this._screenPositionX=xq,this._screenPositionY=xq,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,ve.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,ve.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),ve.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,r){return dr.worldToWindowCoordinates(e,i,r)}}ij.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,Q5t);if(!l(e))this._screenPositionX=xq,this._screenPositionY=xq;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=r*.5;e.x=Math.min(Math.max(e.x,-r),n+r)-o,e.y=Math.min(Math.max(e.y,-r),i+r)-o,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};ij.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ls.EXPONENTIAL_OUT})};ij.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ls.EXPONENTIAL_OUT})};Object.defineProperties(ij.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var rj=ij;function Tq(e,t){e=Ln(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",r="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",o=document.createElementNS(i,"svg:svg");o.setAttribute("width",160),o.setAttribute("height",160),o.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),o.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",r),s.appendChild(a),n.appendChild(o);let c=new rj(t,this._element,this._container);this._viewModel=c,ve.applyBindings(this._viewModel,this._element)}Object.defineProperties(Tq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Tq.prototype.isDestroyed=function(){return!1};Tq.prototype.destroy=function(){let e=this._container;return ve.cleanNode(this._element),e.removeChild(this._element),le(this)};var oj=Tq;function JC(e,t,n){this._color=e,this._height=t,this._base=n??0}JC.prototype.getHeight=function(){return this._height};JC.prototype.getBase=function(){return this._base};JC.prototype.getStartTime=function(){return this._start};JC.prototype.getStopTime=function(){return this._stop};JC.prototype.setRange=function(e,t){this._start=e,this._stop=t};JC.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=K.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),r=K.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*e.getAlpha(r))-i;i<0&&(o+=i,i=0),i+o>e.timeBarWidth&&(o=e.timeBarWidth-i),o>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${o.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var sj=JC;function _3e(e,t,n,i){this.interval=e,this.height=t,this.color=n||new z(.5,.5,.5,1),this.backgroundColor=i||new z(0,0,0,0)}_3e.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,r=t.startJulian,o=K.addSeconds(t.startJulian,t.duration,new K);if(K.lessThan(n,r)&&K.greaterThan(i,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(K.lessThanOrEquals(n,o)&&K.greaterThanOrEquals(i,r)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let u=K.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new K);!l(a)&&K.greaterThanOrEquals(u,n)?a=s:!l(c)&&K.greaterThanOrEquals(u,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var aj=_3e;var Hle=1e12,Oh={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},Eu={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},Xb=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],e9t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cu(e,t){e=Ln(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=Oh.none,this._touchMode=Eu.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=t9t(this),this._onMouseUp=n9t(this),this._onMouseMove=i9t(this),this._onMouseWheel=r9t(this),this._onTouchStart=o9t(this),this._onTouchMove=a9t(this),this._onTouchEnd=s9t(this);let r=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Cu.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};Cu.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};Cu.prototype.isDestroyed=function(){return!1};Cu.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),le(this)};Cu.prototype.addHighlightRange=function(e,t,n){let i=new sj(e,t,n);return this._highlightRanges.push(i),this.resize(),i};Cu.prototype.addTrack=function(e,t,n,i){let r=new aj(e,t,n,i);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r};Cu.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=K.secondsDifference(t,e),this._clock&&this._clock.clockRange!==Rs.UNBOUNDED){let i=this._clock.startTime,r=this._clock.stopTime,o=K.secondsDifference(r,i),s=K.secondsDifference(i,this._startJulian),a=K.secondsDifference(r,this._endJulian);this._timeBarSecondsSpan>=o?(this._timeBarSecondsSpan=o,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=K.addSeconds(this._endJulian,s,new K),this._startJulian=i,this._timeBarSecondsSpan=K.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=K.addSeconds(this._startJulian,a,new K),this._endJulian=r,this._timeBarSecondsSpan=K.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};Cu.prototype.zoomFrom=function(e){let t=K.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(K.addSeconds(this._startJulian,t-t*e,new K),K.addSeconds(this._endJulian,n*e-n,new K))};function Gle(e){return e<10?`0${e.toString()}`:e.toString()}Cu.prototype.makeLabel=function(e){let t=K.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${e9t[t.month-1]} ${t.day} ${t.year} ${Gle(t.hour)}:${Gle(t.minute)}:${Gle(t.second)}${i}`};Cu.prototype.smallestTicInPixels=7;Cu.prototype._makeTics=function(){let e=this._timeBarEle,t=K.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,r,o=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,u=1e-10,f=0,d=this._timeBarSecondsSpan;d<a?(d=a,this._timeBarSecondsSpan=a,this._endJulian=K.addSeconds(this._startJulian,a,new K)):d>c&&(d=c,this._timeBarSecondsSpan=c,this._endJulian=K.addSeconds(this._startJulian,c,new K));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let g=this._startJulian,m=Math.min(d/p*1e-5,.4),y,A=K.toGregorianDate(g);d>31536e4?y=K.fromDate(new Date(Date.UTC(Math.floor(A.year/100)*100,0))):d>31536e3?y=K.fromDate(new Date(Date.UTC(Math.floor(A.year/10)*10,0))):d>86400?y=K.fromDate(new Date(Date.UTC(A.year,0))):y=K.fromDate(new Date(Date.UTC(A.year,A.month,A.day)));let b=K.secondsDifference(this._startJulian,K.addSeconds(y,m,new K)),x=b+d;this._epochJulian=y;function T(k){return Math.floor(b/k)*k}function E(k,G){return Math.ceil(k/G+.5)*G}function v(k){return(k-b)/d}function S(k,G){return k-G*Math.round(k/G)}this._rulerEle.innerHTML=this.makeLabel(K.addSeconds(this._endJulian,-a,new K));let I=this._rulerEle.offsetWidth+20;I<30&&(I=180);let R=f;f-=u;let O={startTime:b,startJulian:g,epochJulian:y,duration:d,timeBarWidth:p,getAlpha:v};this._highlightRanges.forEach(function(k){s+=k.render(O)});let L=0,_=0,C=0,w=I/p;w>1&&(w=1),w*=this._timeBarSecondsSpan;let P=-1,M=-1,F=Xb.length,V;for(V=0;V<F;++V){let k=Xb[V];if(++P,L=k,k>w&&k>f)break;M<0&&p*(k/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(M=P)}if(P>0){for(;P>0;)if(--P,Math.abs(S(L,Xb[P]))<1e-5){Xb[P]>=f&&(_=Xb[P]);break}if(M>=0)for(;M<P;){if(Math.abs(S(_,Xb[M]))<1e-5&&Xb[M]>=f){C=Xb[M];break}++M}}f=R,f>u&&C<1e-5&&Math.abs(f-L)>u&&(C=f,f<=L+u&&(_=0));let B=-999999,j;if(p*(C/this._timeBarSecondsSpan)>=3)for(r=T(C);r<=x;r=E(r,C))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*v(r)).toString()}px;"></span>`;if(p*(_/this._timeBarSecondsSpan)>=3)for(r=T(_);r<=x;r=E(r,_))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*v(r)).toString()}px;"></span>`;if(p*(L/this._timeBarSecondsSpan)>=2){this._mainTicSpan=L,x+=L,r=T(L);let k=K.computeTaiMinusUtc(y);for(;r<=x;){let G=K.addSeconds(g,r-b,new K);if(L>2.1){let J=K.computeTaiMinusUtc(G);Math.abs(J-k)>.1&&(r+=J-k,G=K.addSeconds(g,r-b,new K))}let q=Math.round(p*v(r)),Q=this.makeLabel(G);this._rulerEle.innerHTML=Q,j=this._rulerEle.offsetWidth,j<10&&(j=I);let W=q-(j/2-1);W>B?(B=W+j+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${q.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${W.toString()}px;">${Q}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${q.toString()}px;"></span>`,r=E(r,L)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),O.y=0,this._trackList.forEach(function(k){k.render(o._context,O),O.y+=k.height})};Cu.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=K.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(K.addSeconds(this._startJulian,this._timelineDrag,new K),K.addSeconds(this._endJulian,this._timelineDrag,new K)))};Cu.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=K.addSeconds(this._startJulian,t,new K),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function t9t(e){return function(t){e._mouseMode!==Oh.touchOnly&&(t.button===0?(e._mouseMode=Oh.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=Oh.zoom:e._mouseMode=Oh.slide)),t.preventDefault()}}function n9t(e){return function(t){e._mouseMode=Oh.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function i9t(e){return function(t){let n;if(e._mouseMode===Oh.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===Oh.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(K.addSeconds(e._startJulian,i,new K),K.addSeconds(e._endJulian,i,new K))}}else e._mouseMode===Oh.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function r9t(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;Hle=Math.max(Math.min(Math.abs(n),Hle),1),n/=Hle,e.zoomFrom(Math.pow(1.05,-n))}}function o9t(e){return function(t){let n=t.touches.length,i,r,o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=Oh.touchOnly,n===1?(i=K.secondsDifference(e._scrubJulian,e._startJulian),r=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-r)<50?(e._touchMode=Eu.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=Eu.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):n===2?(e._touchMode=Eu.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=Eu.ignore}}function s9t(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===Eu.singleTap?(e._touchMode=Eu.scrub,e._onTouchMove(t)):e._touchMode===Eu.scrub&&e._onTouchMove(t),e._mouseMode=Oh.touchOnly,n!==1?e._touchMode=n>0?Eu.ignore:Eu.none:e._touchMode===Eu.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function a9t(e){return function(t){let n,i,r,o,s,a,c=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===Eu.singleTap&&(e._touchMode=Eu.slideZoom),e._mouseMode=Oh.touchOnly,e._touchMode===Eu.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===Eu.slideZoom&&(r=t.touches.length,r===2?(o=(t.touches[0].clientX+t.touches[1].clientX)*.5-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):r===1&&(o=t.touches[0].clientX-u,s=0),l(o)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=K.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new K)):(n=e._touchState.centerX-o,a=K.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new K)),e.zoomTo(a,K.addSeconds(a,e._timeBarSecondsSpan*c,new K)),e._touchState.centerX=o,e._touchState.spanX=s))}}Cu.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var cj=Cu;var A3e=Qo(y3e(),1);function c9t(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function b3e(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function l9t(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(b3e(),e._locked=!1),e._noSleep.disable(),es.exitFullscreen(),n(!1)):(es.fullscreen||es.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=c9t("landscape")),t.useWebVR=!0,n(!0)))}function Eq(e,t){let n=this,i=ve.observable(es.enabled),r=ve.observable(!1);this.isVRMode=void 0,ve.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,ve.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&es.enabled)}}),this.tooltip=void 0,ve.defineProperty(this,"tooltip",function(){return i()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let o=ve.observable(!1);this._isOrthographic=void 0,ve.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new Xo,this._eventHelper.add(e.preRender,function(){o(e.camera.frustum instanceof gn)}),this._locked=!1,this._noSleep=new A3e.default,this._command=Rn(function(){l9t(n,e,r,o)},ve.getObservable(this,"isVREnabled")),this._vrElement=Ln(t)??document.body,this._callback=function(){!es.fullscreen&&r()&&(e.useWebVR=!1,n._locked&&(b3e(),n._locked=!1),n._noSleep.disable(),r(!1))},document.addEventListener(es.changeEventName,this._callback)}Object.defineProperties(Eq.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});Eq.prototype.isDestroyed=function(){return!1};Eq.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(es.changeEventName,this._callback),le(this)};var uj=Eq;var u9t="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",f9t="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function Cq(e,t,n){e=Ln(e);let i=new uj(t,n);i._exitVRPath=f9t,i._enterVRPath=u9t;let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-vrButton",r.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(r),ve.applyBindings(i,r),this._container=e,this._viewModel=i,this._element=r}Object.defineProperties(Cq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Cq.prototype.isDestroyed=function(){return!1};Cq.prototype.destroy=function(){return this._viewModel.destroy(),ve.cleanNode(this._element),this._container.removeChild(this._element),le(this)};var fj=Cq;function x3e(e){let t=e.split(`
`),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",r=/^\s*/,s=t[n].match(r)[0].length;for(let a=n;a<t.length;a++){let c=t[a];c.match(r)[0].length>=s&&(c=c.slice(s)),i+=`${c}
`}return i}function Mh(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(r){let{name:o,initialValue:s}=r;t._definedProperties.push(o);let a=r.setPrimitiveFunction;a===!0&&(a=function(f){t._voxelPrimitive[o]=f});let c=r.getPrimitiveFunction;c===!0&&(c=function(){t[o]=t._voxelPrimitive[o]}),l(c)&&t._getPrimitiveFunctions.push(c);let u=ve.observable();return ve.defineProperty(t,o,{get:function(){return u()},set:function(f){typeof s=="number"&&typeof f=="string"&&(f=Number(f),isNaN(f)&&(f=s)),typeof s=="boolean"&&typeof f=="number"&&(f=f===1),u(f),l(a)&&l(t._voxelPrimitive)&&(a(f),e.requestRender())}}),t[o]=s,u}function i(r,o){return function(s){let a=t._voxelPrimitive[r].clone();a[o]=s,t._voxelPrimitive[r]=a}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let r=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=x3e(r)}}),n({name:"shaderCompilationMessage",initialValue:""}),n({name:"shaderCompilationSuccess",initialValue:!0}),n({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),n({name:"shapeIsBox",getPrimitiveFunction:function(){let r=t._voxelPrimitive.shape;t.shapeIsBox=r===xc.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let r=t._voxelPrimitive.shape;t.shapeIsEllipsoid=r===xc.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let r=t._voxelPrimitive.shape;t.shapeIsCylinder=r===xc.CYLINDER}}),n({name:"clippingBoxMaxXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMaxXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingBoxMinXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinXMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingBoxMinXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinXMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingBoxMaxYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMaxYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingBoxMinYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinYMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingBoxMinYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinYMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingBoxMaxZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMaxZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingBoxMinZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinZMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingBoxMinZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinZMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingEllipsoidMaxLongitudeMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMaxLongitudeMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingEllipsoidMinLongitudeMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingEllipsoidMaxLatitudeMin",initialValue:-D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMaxLatitudeMax",initialValue:D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMin",initialValue:-D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingEllipsoidMinLatitudeMax",initialValue:D.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingEllipsoidMaxHeightMin",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMaxHeightMax",initialValue:1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingEllipsoidMinHeightMin",initialValue:-1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingEllipsoidMinHeightMax",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"clippingCylinderMaxRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMaxRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),n({name:"clippingCylinderMinRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMin=t._voxelPrimitive.minBounds.x}}),n({name:"clippingCylinderMinRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMax=t._voxelPrimitive.maxBounds.x}}),n({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:i("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),n({name:"clippingCylinderMaxAngleMin",initialValue:-D.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMin=t._voxelPrimitive.minBounds.y}}),n({name:"clippingCylinderMaxAngleMax",initialValue:D.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMax=t._voxelPrimitive.maxBounds.y}}),n({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.y}}),n({name:"clippingCylinderMinAngleMin",initialValue:-D.PI}),n({name:"clippingCylinderMinAngleMax",initialValue:D.PI}),n({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:i("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.y}}),n({name:"clippingCylinderMaxHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMaxHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:i("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),n({name:"clippingCylinderMinHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMin=t._voxelPrimitive.minBounds.z}}),n({name:"clippingCylinderMinHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMax=t._voxelPrimitive.maxBounds.z}}),n({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:i("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.z}}),n({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.translationX=N.getTranslation(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.translationY=N.getTranslation(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.translationZ=N.getTranslation(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.scaleX=N.getScale(t._voxelPrimitive.modelMatrix,new h).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.scaleY=N.getScale(t._voxelPrimitive.modelMatrix,new h).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)},getPrimitiveFunction:function(){t.scaleZ=N.getScale(t._voxelPrimitive.modelMatrix,new h).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&J0(t)}})}var d9t=new h,h9t=new h,m9t=new wc,p9t=new $;function J0(e){let t=h.fromElements(e.translationX,e.translationY,e.translationZ,d9t),n=h.fromElements(e.scaleX,e.scaleY,e.scaleZ,h9t),i=m9t;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let r=$.fromHeadingPitchRoll(i,p9t),o=$.multiplyByScale(r,n,r);e._voxelPrimitive.modelMatrix=N.fromRotationTranslation(o,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(Mh.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(l(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),!l(e))return;this._voxelPrimitive=e;let t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(n){let i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=x3e(i),l(n)?(t.shaderCompilationMessage=n.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let n=0;n<t._getPrimitiveFunctions.length;n++)t._getPrimitiveFunctions[n]();t._modelMatrixReady=!0,J0(t)}}});Mh.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};Mh.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};Mh.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};Mh.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};Mh.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};Mh.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};Mh.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new k0({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};Mh.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,r=n.selectionEnd,o=r,a=n.value.slice(i,r).split(`
`),c=a.length,u;if(t.shiftKey)for(u=0;u<c;++u)a[u][0]===" "&&(a[u][1]===" "?(a[u]=a[u].substr(2),o-=2):(a[u]=a[u].substr(1),o-=1));else for(u=0;u<c;++u)a[u]=` ${a[u]}`,o+=2;let f=a.join(`
`);n.value=n.value.slice(0,i)+f+n.value.slice(r),n.selectionStart=i!==r?i:o,n.selectionEnd=o}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};Mh.prototype.isDestroyed=function(){return!1};Mh.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){ve.getObservable(e,t).dispose()}),le(this)};var dj=Mh;function vq(e,t){e=Ln(e);let n=document.createElement("div"),i=new dj(t);this._viewModel=i,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="Voxel Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let o=document.createElement("div");o.className="cesium-cesiumInspector-dropDown",n.appendChild(o);let{createSection:s,createCheckbox:a,createRangeInput:c,createButton:u}=Af,f=s(o,"Display","displayVisible","toggleDisplay"),d=s(o,"Transform","transformVisible","toggleTransform"),p=s(o,"Clipping","clippingVisible","toggleClipping"),g=s(o,"Shader","shaderVisible","toggleShader");f.appendChild(a("Depth Test","depthTest")),f.appendChild(a("Show","show")),f.appendChild(a("Disable Update","disableUpdate")),f.appendChild(a("Debug Draw","debugDraw")),f.appendChild(a("Jitter","jitter")),f.appendChild(a("Nearest Sampling","nearestSampling")),f.appendChild(c("Screen Space Error","screenSpaceError",0,128)),f.appendChild(c("Step Size","stepSize",0,2));let m=10,y=10,A=D.PI;d.appendChild(c("Translation X","translationX",-m,+m)),d.appendChild(c("Translation Y","translationY",-m,+m)),d.appendChild(c("Translation Z","translationZ",-m,+m)),d.appendChild(c("Scale X","scaleX",0,+y)),d.appendChild(c("Scale Y","scaleY",0,+y)),d.appendChild(c("Scale Z","scaleZ",0,+y)),d.appendChild(c("Heading","angleX",-A,+A)),d.appendChild(c("Pitch","angleY",-A,+A)),d.appendChild(c("Roll","angleZ",-A,+A)),qle("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),qle("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),qle("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let b=document.createElement("div");g.appendChild(b);let x=document.createElement("textarea");x.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),b.className="cesium-cesiumInspector-styleEditor",b.appendChild(x);let T=u("Compile (Ctrl+Enter)","compileShader");b.appendChild(T);let E=document.createElement("label");E.style.display="block",E.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),b.appendChild(E),ve.applyBindings(i,n)}Object.defineProperties(vq.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});vq.prototype.isDestroyed=function(){return!1};vq.prototype.destroy=function(){return ve.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),le(this)};function qle(e,t,n,i,r,o,s,a,c,u,f,d,p,g){let m=Af.createRangeInputWithDynamicMinMax,y=g.appendChild(document.createElement("div"));y.setAttribute("data-bind",`if: ${p}`),y.appendChild(m(e,s)),y.appendChild(m(t,a)),y.appendChild(m(n,c)),y.appendChild(m(i,u)),y.appendChild(m(r,f)),y.appendChild(m(o,d))}var hj=vq;var T3e=new ue;function v3e(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function g9t(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let r=e.getProperty(i);l(r)&&(n+=`<tr><th>${i}</th><td>${r}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function _9t(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let o=i[t];/^name$/i.test(o)?n[0]=e.getProperty(o):/name/i.test(o)?n[1]=e.getProperty(o):/^title$/i.test(o)?n[2]=e.getProperty(o):/^(id|identifier)$/i.test(o)?n[3]=e.getProperty(o):/element/i.test(o)?n[4]=e.getProperty(o):/(id|identifier)$/i.test(o)&&(n[5]=e.getProperty(o))}let r=n.length;for(t=0;t<r;t++){let o=n[t];if(l(o)&&o!=="")return o}return"Unnamed Feature"}function E3e(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof Jr)return i;if(n instanceof na||n instanceof NT)return new Jr({name:_9t(n),description:g9t(n),feature:n})}return x9t(e,t.position)}var y9t=new K;function Yle(e,t){if(l(t)){let n=t.clock;if(l(n)&&l(e)){let i=n.startTime,r=n.stopTime;K.equals(i,r)&&(r=K.addSeconds(i,D.EPSILON2,y9t)),e.updateFromClock(),e.zoomTo(i,r)}}}var A9t=new h;function b9t(e){let t=e.length;for(let n=0;n<t;++n){let i=e.get(n);if(i instanceof Yo)return i}}function x9t(e,t){let n=e.scene,i=n.camera.getPickRay(t);if(!l(i))return;let r=n.imageryLayers;if(!l(r)){let a=b9t(n.primitives);if(!l(a))return;r=a.imageryLayers}let o=r.pickImageryLayerFeatures(i,n);if(!l(o))return;let s=new Jr({id:"Loading...",description:"Loading feature information..."});return o.then(function(a){if(e.selectedEntity!==s)return;if(!l(a)||a.length===0){e.selectedEntity=C3e();return}let c=a[0],u=new Jr({id:c.name,description:c.description});if(l(c.position)){let f=e.scene.ellipsoid.cartographicToCartesian(c.position,A9t);u.position=new Gl(f)}e.selectedEntity=u},function(){e.selectedEntity===s&&(e.selectedEntity=C3e())}),s}function C3e(){return new Jr({id:"None",description:"No features found."})}function T9t(e,t){let n=e._geocoder,i=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,u=e._fullscreenButton,f=e._infoBox,d=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=p),l(f)&&(f.container.style.visibility=p),l(d)&&(d.container.style.visibility=p),e._container){let g=t||!l(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${g}px`,e.forceResize()}}function lr(e,t){e=Ln(e),t=t??H.EMPTY_OBJECT;let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,r=document.createElement("div");r.className="cesium-viewer",e.appendChild(r);let o=document.createElement("div");o.className="cesium-viewer-cesiumWidgetContainer",r.appendChild(o);let s=document.createElement("div");s.className="cesium-viewer-bottom",r.appendChild(s);let a=t.scene3DOnly??!1,c,u,f=!1;l(t.clockViewModel)?(u=t.clockViewModel,c=u.clock):(c=new Nm,u=new C8(c),f=!0);let d=new _8(o,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=d.scene,g=new Xo;g.add(c.onTick,lr.prototype._onTick,this);let m;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let G=document.createElement("div");G.className="cesium-viewer-selectionIndicatorContainer",r.appendChild(G),m=new oj(G,p)}let y;if(!l(t.infoBox)||t.infoBox!==!1){let G=document.createElement("div");G.className="cesium-viewer-infoBoxContainer",r.appendChild(G),y=new X8(G);let q=y.viewModel;g.add(q.cameraClicked,lr.prototype._onInfoBoxCameraClicked,this),g.add(q.closeClicked,lr.prototype._onInfoBoxClockClicked,this)}let A=document.createElement("div");A.className="cesium-viewer-toolbar",r.appendChild(A);let b;if(!l(t.geocoder)||t.geocoder!==!1){let G=document.createElement("div");G.className="cesium-viewer-geocoderContainer",A.appendChild(G);let q;typeof t.geocoder=="string"?q=[new sC({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(q=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),b=new H8({container:G,geocoderServices:q,scene:p}),g.add(b.viewModel.search.beforeExecute,lr.prototype._clearObjects,this)}let x;(!l(t.homeButton)||t.homeButton!==!1)&&(x=new W8(A,p),l(b)&&g.add(x.viewModel.command.afterExecute,function(){let G=b.viewModel;G.searchText="",G.isSearchInProgress&&G.search()}),g.add(x.viewModel.command.beforeExecute,lr.prototype._clearTrackedObject,this));let T;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(T=new nj(A,p));let E;t.projectionPicker&&(E=new ej(A,p));let v,S;if(n){let G=t.imageryProviderViewModels??w8(),q=t.terrainProviderViewModels??I8();v=new S8(A,{globe:p.globe,imageryProviderViewModels:G,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:q,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),S=A.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(v.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(v.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let I;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let G=!0;try{if(l(window.localStorage)){let q=window.localStorage.getItem("cesium-hasSeenNavHelp");l(q)&&q?G=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}I=new $8({container:A,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??G})}let R;if(!l(t.animation)||t.animation!==!1){let G=document.createElement("div");G.className="cesium-viewer-animationContainer",r.appendChild(G),R=new R8(G,new O8(u))}let O;if(!l(t.timeline)||t.timeline!==!1){let G=document.createElement("div");G.className="cesium-viewer-timelineContainer",r.appendChild(G),O=new cj(G,c),O.addEventListener("settime",v3e,!1),O.zoomTo(c.startTime,c.stopTime)}let L,_,C;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(C=document.createElement("div"),C.className="cesium-viewer-fullscreenContainer",r.appendChild(C),L=new k8(C,t.fullscreenElement),_=Cc(L.viewModel,"isFullscreenEnabled",function(G){C.style.display=G?"block":"none",l(O)&&(O.container.style.right=`${C.clientWidth}px`,O.resize())}));let w,P,M;if(t.vrButton){let G=document.createElement("div");G.className="cesium-viewer-vrContainer",r.appendChild(G),w=new fj(G,p,t.fullScreenElement),P=Cc(w.viewModel,"isVREnabled",function(q){G.style.display=q?"block":"none",l(L)&&(G.style.right=`${C.clientWidth}px`),l(O)&&(O.container.style.right=`${G.clientWidth}px`,O.resize())}),M=Cc(w.viewModel,"isVRMode",function(q){T9t(i,q)})}this._baseLayerPickerDropDown=S,this._fullscreenSubscription=_,this._vrSubscription=P,this._vrModeSubscription=M,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=s,this._element=r,this._cesiumWidget=d,this._selectionIndicator=m,this._infoBox=y,this._clockViewModel=u,this._destroyClockViewModel=f,this._toolbar=A,this._homeButton=x,this._sceneModePicker=T,this._projectionPicker=E,this._baseLayerPicker=v,this._navigationHelpButton=I,this._animation=R,this._timeline=O,this._fullscreenButton=L,this._vrButton=w,this._geocoder=b,this._eventHelper=g,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(y)||l(m),this._selectedEntity=void 0,this._selectedEntityChanged=new be;let F=this._cesiumWidget.dataSources,V=this._cesiumWidget.dataSourceDisplay;g.add(F.dataSourceAdded,lr.prototype._onDataSourceAdded,this),g.add(F.dataSourceRemoved,lr.prototype._onDataSourceRemoved,this),g.add(p.postUpdate,lr.prototype.resize,this);let B=F.length;for(let G=0;G<B;G++)this._dataSourceAdded(F,F.get(G));this._dataSourceAdded(void 0,V.defaultDataSource),g.add(F.dataSourceAdded,lr.prototype._dataSourceAdded,this),g.add(F.dataSourceRemoved,lr.prototype._dataSourceRemoved,this);function j(G){let q=E3e(i,G);l(q)?X.getValueOrUndefined(q.position,i.clock.currentTime)?i.trackedEntity=q:i.zoomTo(q):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function k(G){i.selectedEntity=E3e(i,G)}d.screenSpaceEventHandler.setInputAction(k,un.LEFT_CLICK),d.screenSpaceEventHandler.setInputAction(j,un.LEFT_DOUBLE_CLICK),d._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(lr.prototype,{container:{get:function(){return this._container}},creditDisplay:{get:function(){return this._cesiumWidget.creditDisplay}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},ellipsoid:{get:function(){return this.scene.ellipsoid}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,Yle(this._timeline,e))}}});lr.prototype.extend=function(e,t){e(this,t)};lr.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,r=l(this._animation),o=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let m=this._geocoder.searchSuggestionsContainer;m.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,u,f=0,d=5,p=3,g=0;if(r&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let m=this._lastWidth;u=this._animation.container,n>900?(f=169,m<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(f=136,(m<600||m>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(f=106,(m>600||m===0)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),d=f+5}if(o&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let m=this._fullscreenButton,y=this._vrButton,A=c.container,b=A.style;p=A.clientHeight+3,b.left=`${f}px`;let x=0;l(m)&&(x+=m.container.clientWidth),l(y)&&(x+=y.container.clientWidth),b.right=`${x}px`,c.resize()}!o&&l(this._fullscreenButton)&&(g=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${d}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${g}px`,this._lastWidth=n,this._lastHeight=i};lr.prototype.forceResize=function(){this._lastWidth=0,this.resize()};lr.prototype.render=function(){this._cesiumWidget.render()};lr.prototype.isDestroyed=function(){return!1};lr.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(un.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(un.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",v3e,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),le(this)};lr.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(lr.prototype._onEntityCollectionChanged,this)};lr.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(lr.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};lr.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};lr.prototype._onTick=function(e){let t=e.currentTime,n,i=!1,r=this.selectedEntity,o=l(r)&&this._enableInfoOrSelection;o&&r.isShowing&&r.isAvailable(t)&&(this._cesiumWidget.dataSourceDisplay.getBoundingSphere(r,!0,T3e)!==Pt.FAILED?n=T3e.center:l(r.position)&&(n=r.position.getValue(t,n)),i=l(n));let s=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(s)&&(s.position=h.clone(n,s.position),s.showSelection=o&&i,s.update());let a=l(this._infoBox)?this._infoBox.viewModel:void 0;l(a)&&(a.showInfo=o,a.enableCamera=i,a.isCameraTracking=this.trackedEntity===this.selectedEntity,o?(a.titleText=r.name??r.id,a.description=X.getValueOrDefault(r.description,t,"")):(a.titleText="",a.description=""))};lr.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let r=0;r<i;r++){let o=n[r];this.selectedEntity===o&&(this.selectedEntity=void 0)}};lr.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};lr.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};lr.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};lr.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};lr.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Yle(this.timeline,e)};lr.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Yle(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,lr.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};lr.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};lr.prototype.addController=function(e){return this._cesiumWidget.addController(e)};lr.prototype.removeController=function(e){return this._cesiumWidget.removeController(e)};lr.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};lr.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var Xle=lr;function E9t(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new F8(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var Kle=E9t;function C9t(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new V8(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var $le=C9t;function v9t(e,t){t=t??H.EMPTY_OBJECT;let n=!0,i=t.flyToOnDrop??!0,r=new be,o=t.clearOnDrop??!0,s=t.dropTarget??e.container,a=t.clampToGround??!0,c=t.proxy;s=Ln(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(f){S3e(s,u),s=f,Jle(s,u)}},dropEnabled:{get:function(){return n},set:function(f){f!==n&&(f?Jle(s,u):S3e(s,u),n=f)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(f){o=f}},flyToOnDrop:{get:function(){return i},set:function(f){i=f}},proxy:{get:function(){return c},set:function(f){c=f}},clampToGround:{get:function(){return a},set:function(f){a=f}}});function u(f){ZC(f),o&&(e.entities.removeAll(),e.dataSources.removeAll());let d=f.dataTransfer.files,p=d.length;for(let g=0;g<p;g++){let m=d[g],y=new FileReader;y.onload=S9t(e,m,c,a),y.onerror=w9t(e,m),y.readAsText(m)}}Jle(s,u),e.destroy=ZU(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=u}function ZC(e){e.stopPropagation(),e.preventDefault()}function S3e(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",ZC,!1),n.removeEventListener("dragover",ZC,!1),n.removeEventListener("dragexit",ZC,!1))}function Jle(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",ZC,!1),e.addEventListener("dragover",ZC,!1),e.addEventListener("dragexit",ZC,!1)}function S9t(e,t,n,i){let r=e.scene;return function(o){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=_k.load(JSON.parse(o.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=mb.load(JSON.parse(o.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=YE.load(t,{sourceUri:s,proxy:n,camera:r.camera,canvas:r.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=rU.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function w9t(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var Zle=v9t;function I9t(e,t){t=t??H.EMPTY_OBJECT;let n=new Z8({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var Qle=I9t;function P9t(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new hj(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var eue=P9t;globalThis.CESIUM_VERSION="1.145.0";var D9t="1.145.0";0&&(module.exports={AlphaMode,AlphaPipelineStage,AnchorPointDirect,AnchorPointIndirect,Animation,AnimationViewModel,Appearance,ApproximateTerrainHeights,ArcGISTiledElevationTerrainProvider,ArcGisBaseMapType,ArcGisMapServerImageryProvider,ArcGisMapService,ArcType,ArticulationStageType,AssociativeArray,Atmosphere,AtmospherePipelineStage,AttributeCompression,AttributeType,AutoExposure,AutomaticUniforms,Axis,AxisAlignedBoundingBox,Azure2DImageryProvider,B3dmLoader,B3dmParser,BaseLayerPicker,BaseLayerPickerViewModel,BatchTable,BatchTableHierarchy,BatchTexture,BatchTexturePipelineStage,Billboard,BillboardCollection,BillboardGraphics,BillboardLoadState,BillboardTexture,BillboardVisualizer,BingMapsGeocoderService,BingMapsImageryProvider,BingMapsStyle,BlendEquation,BlendFunction,BlendOption,BlendingState,BoundingRectangle,BoundingSphere,BoundingSphereState,BoundingVolumeSemantics,BoxEmitter,BoxGeometry,BoxGeometryUpdater,BoxGraphics,BoxOutlineGeometry,BrdfLutGenerator,Buffer,BufferLoader,BufferPoint,BufferPointCollection,BufferPointMaterial,BufferPolygon,BufferPolygonCollection,BufferPolygonMaterial,BufferPolyline,BufferPolylineCollection,BufferPolylineMaterial,BufferPrimitive,BufferPrimitiveCollection,BufferPrimitiveMaterial,BufferUsage,CPUStylingPipelineStage,CallbackPositionProperty,CallbackProperty,Camera,CameraEventAggregator,CameraEventType,CameraFlightPath,Cartesian2,Cartesian3,Cartesian4,CartesianRectangle,Cartographic,CartographicGeocoderService,CatmullRomSpline,Cesium3DContentGroup,Cesium3DTile,Cesium3DTileBatchTable,Cesium3DTileColorBlendMode,Cesium3DTileContent,Cesium3DTileContentFactory,Cesium3DTileContentState,Cesium3DTileContentType,Cesium3DTileFeature,Cesium3DTileFeatureTable,Cesium3DTileOptimizationHint,Cesium3DTileOptimizations,Cesium3DTilePass,Cesium3DTilePassState,Cesium3DTilePointFeature,Cesium3DTileRefine,Cesium3DTileStyle,Cesium3DTileStyleEngine,Cesium3DTileVectorFeature,Cesium3DTilesInspector,Cesium3DTilesInspectorViewModel,Cesium3DTilesTerrainData,Cesium3DTilesTerrainGeometryProcessor,Cesium3DTilesTerrainProvider,Cesium3DTilesVoxelProvider,Cesium3DTileset,Cesium3DTilesetBaseTraversal,Cesium3DTilesetCache,Cesium3DTilesetGraphics,Cesium3DTilesetHeatmap,Cesium3DTilesetMetadata,Cesium3DTilesetMostDetailedTraversal,Cesium3DTilesetSkipTraversal,Cesium3DTilesetStatistics,Cesium3DTilesetTraversal,Cesium3DTilesetVisualizer,CesiumInspector,CesiumInspectorViewModel,CesiumTerrainProvider,CesiumWidget,Check,CheckerboardMaterialProperty,CircleEmitter,CircleGeometry,CircleOutlineGeometry,ClassificationModelDrawCommand,ClassificationPipelineStage,ClassificationPrimitive,ClassificationType,ClearCommand,ClippingPlane,ClippingPlaneCollection,ClippingPolygon,ClippingPolygonCollection,Clock,ClockRange,ClockStep,ClockViewModel,CloudCollection,CloudType,Color,ColorBlendMode,ColorGeometryInstanceAttribute,ColorMaterialProperty,Command,ComponentDatatype,Composite3DTileContent,CompositeEntityCollection,CompositeMaterialProperty,CompositePositionProperty,CompositeProperty,CompressedTextureBuffer,ComputeCommand,ComputeEngine,ConditionsExpression,ConeEmitter,ConstantPositionProperty,ConstantProperty,ConstantSpline,ContentMetadata,Context,ContextLimits,Controller,ControllerHost,CoplanarPolygonGeometry,CoplanarPolygonGeometryLibrary,CoplanarPolygonOutlineGeometry,CornerType,CorrelationGroup,CorridorGeometry,CorridorGeometryLibrary,CorridorGeometryUpdater,CorridorGraphics,CorridorOutlineGeometry,Credit,CreditDisplay,CubeMap,CubeMapFace,CubeMapPanorama,CubicRealPolynomial,CullFace,CullingVolume,CumulusCloud,CustomDataSource,CustomHeightmapTerrainProvider,CustomShader,CustomShaderMode,CustomShaderPipelineStage,CustomShaderTranslucencyMode,CylinderGeometry,CylinderGeometryLibrary,CylinderGeometryUpdater,CylinderGraphics,CylinderOutlineGeometry,CzmlDataSource,DataSource,DataSourceClock,DataSourceCollection,DataSourceDisplay,DebugAppearance,DebugCameraPrimitive,DebugInspector,DebugModelMatrixPrimitive,DefaultProxy,DepthFunction,DepthPlane,DequantizationPipelineStage,DerivedCommand,DeveloperError,DeviceOrientationCameraController,DirectionalLight,DiscardEmptyTileImagePolicy,DiscardMissingTileImagePolicy,DistanceDisplayCondition,DistanceDisplayConditionGeometryInstanceAttribute,DoubleEndedPriorityQueue,DoublyLinkedList,DracoLoader,DrawCommand,DynamicAtmosphereLightingType,DynamicEnvironmentMapManager,DynamicGeometryBatch,DynamicGeometryUpdater,EarthOrientationParameters,EarthOrientationParametersSample,EasingFunction,EdgeDetectionPipelineStage,EdgeDisplayMode,EdgeFramebuffer,EdgeVisibilityPipelineStage,EllipseGeometry,EllipseGeometryLibrary,EllipseGeometryUpdater,EllipseGraphics,EllipseOutlineGeometry,Ellipsoid,EllipsoidGeodesic,EllipsoidGeometry,EllipsoidGeometryUpdater,EllipsoidGraphics,EllipsoidOutlineGeometry,EllipsoidPrimitive,EllipsoidRhumbLine,EllipsoidSurfaceAppearance,EllipsoidTangentPlane,EllipsoidTerrainProvider,EllipsoidalOccluder,Empty3DTileContent,EncodedCartesian3,Entity,EntityCluster,EntityCollection,EntityView,EquirectangularPanorama,Event,EventHelper,Expression,ExpressionNodeType,ExtrapolationType,FeatureDetection,FeatureIdPipelineStage,Fog,ForEach,FrameRateMonitor,FrameState,Framebuffer,FramebufferManager,Frozen,FrustumCommands,FrustumGeometry,FrustumOutlineGeometry,Fullscreen,FullscreenButton,FullscreenButtonViewModel,GaussianSplat3DTileContent,GaussianSplatPrimitive,GaussianSplatRenderResources,GaussianSplatSorter,GaussianSplatTextureGenerator,GeoJsonDataSource,GeoJsonLoader,GeoJsonPrimitive,GeocodeType,Geocoder,GeocoderService,GeocoderViewModel,GeographicProjection,GeographicTilingScheme,Geometry,Geometry3DTileContent,GeometryAttribute,GeometryAttributes,GeometryFactory,GeometryInstance,GeometryInstanceAttribute,GeometryOffsetAttribute,GeometryPipeline,GeometryPipelineStage,GeometryType,GeometryUpdater,GeometryUpdaterSet,GeometryVisualizer,GetFeatureInfoFormat,Globe,GlobeDepth,GlobeSurfaceShaderSet,GlobeSurfaceTile,GlobeSurfaceTileProvider,GlobeTranslucency,GlobeTranslucencyFramebuffer,GlobeTranslucencyState,GltfBufferViewLoader,GltfDracoLoader,GltfGpmLoader,GltfGpmLocal,GltfImageLoader,GltfIndexBufferLoader,GltfJsonLoader,GltfLoader,GltfLoaderUtil,GltfMeshPrimitiveGpmLoader,GltfSpzLoader,GltfStructuralMetadataLoader,GltfTextureLoader,GltfVertexBufferLoader,Google2DImageryProvider,GoogleEarthEnterpriseImageryProvider,GoogleEarthEnterpriseMapsProvider,GoogleEarthEnterpriseMetadata,GoogleEarthEnterpriseTerrainData,GoogleEarthEnterpriseTerrainProvider,GoogleEarthEnterpriseTileInformation,GoogleGeocoderService,GoogleMaps,GoogleStreetViewCubeMapPanoramaProvider,GpxDataSource,GregorianDate,GridImageryProvider,GridMaterialProperty,GroundGeometryUpdater,GroundPolylineGeometry,GroundPolylinePrimitive,GroundPrimitive,GroupMetadata,HeadingPitchRange,HeadingPitchRoll,Heap,HeightReference,HeightmapEncoding,HeightmapTerrainData,HeightmapTessellator,HermitePolynomialApproximation,HermiteSpline,HilbertOrder,HomeButton,HomeButtonViewModel,HorizontalOrigin,HybridScreenSpacePanCameraController,I3SBuildingSceneLayerExplorer,I3SBuildingSceneLayerExplorerViewModel,I3SDataProvider,I3SDecoder,I3SFeature,I3SField,I3SGeometry,I3SLayer,I3SNode,I3SStatistics,I3SSublayer,I3SSymbology,I3dmLoader,I3dmParser,ITwinData,ITwinPlatform,Iau2000Orientation,Iau2006XysData,Iau2006XysSample,IauOrientationAxes,IauOrientationParameters,ImageBasedLighting,ImageBasedLightingPipelineStage,ImageMaterialProperty,Imagery,ImageryConfiguration,ImageryCoverage,ImageryFlags,ImageryInput,ImageryLayer,ImageryLayerCollection,ImageryLayerFeatureInfo,ImageryPipelineStage,ImageryProvider,ImageryState,Implicit3DTileContent,ImplicitAvailabilityBitstream,ImplicitMetadataView,ImplicitSubdivisionScheme,ImplicitSubtree,ImplicitSubtreeCache,ImplicitSubtreeMetadata,ImplicitTileCoordinates,ImplicitTileset,IndexDatatype,InfoBox,InfoBoxViewModel,InspectorShared,InstanceAttributeSemantic,InstancingPipelineStage,InterpolationAlgorithm,InterpolationType,Intersect,IntersectionTests,Intersections2D,Interval,InvertClassification,Ion,IonGeocodeProviderType,IonGeocoderService,IonImageryProvider,IonImageryProviderFactory,IonResource,IonSnapGeometryType,IonSnapHeat,IonSnapMode,IonSnapParentGeometryType,IonSnapService,IonWorldImageryStyle,Iso8601,JobScheduler,JobType,JsonMetadataTable,JulianDate,KTX2Transcoder,KeyboardEventModifier,KeyframeNode,KmlCamera,KmlDataSource,KmlLookAt,KmlTour,KmlTourFlyTo,KmlTourWait,Label,LabelCollection,LabelGraphics,LabelStyle,LabelVisualizer,LagrangePolynomialApproximation,LeapSecond,Light,LightingModel,LightingPipelineStage,LinearApproximation,LinearSpline,MVTDataProvider,ManagedArray,MapMode2D,MapProjection,MapboxImageryProvider,MapboxStyleImageryProvider,MappedPositions,Material,MaterialAppearance,MaterialPipelineStage,MaterialProperty,Math,Matrix2,Matrix3,Matrix4,Megatexture,MeshPrimitiveGpmLocal,MetadataClass,MetadataClassProperty,MetadataComponentType,MetadataEntity,MetadataEnum,MetadataEnumValue,MetadataPicking,MetadataPickingPipelineStage,MetadataPipelineStage,MetadataSchema,MetadataSchemaLoader,MetadataSemantic,MetadataTable,MetadataTableProperty,MetadataType,MipmapHint,Model,Model3DTileContent,ModelAlphaOptions,ModelAnimation,ModelAnimationChannel,ModelAnimationCollection,ModelAnimationLoop,ModelAnimationState,ModelArticulation,ModelArticulationStage,ModelClippingPlanesPipelineStage,ModelClippingPolygonsPipelineStage,ModelColorPipelineStage,ModelComponents,ModelDrawCommand,ModelDrawCommands,ModelFeature,ModelFeatureTable,ModelGraphics,ModelImagery,ModelImageryMapping,ModelLightingOptions,ModelMatrixUpdateStage,ModelNode,ModelPrimitiveImagery,ModelReader,ModelRenderResources,ModelRuntimeNode,ModelRuntimePrimitive,ModelSceneGraph,ModelSilhouettePipelineStage,ModelSkin,ModelSplitterPipelineStage,ModelStatistics,ModelType,ModelUtility,ModelVectorLookupPipelineStage,ModelVisualizer,Moon,MorphTargetsPipelineStage,MorphWeightSpline,MortonOrder,MouseButton,Multiple3DTileContent,MultisampleFramebuffer,NavigationHelpButton,NavigationHelpButtonViewModel,NearFarScalar,NeverTileDiscardPolicy,NodeRenderResources,NodeStatisticsPipelineStage,NodeTransformationProperty,OIT,Occluder,OffsetGeometryInstanceAttribute,OpenCageGeocoderService,OpenStreetMapImageryProvider,OrderedGroundPrimitiveCollection,OrientedBoundingBox,OrthographicFrustum,OrthographicOffCenterFrustum,Packable,PackableForInterpolation,Panorama,PanoramaProvider,Particle,ParticleBurst,ParticleEmitter,ParticleSystem,Pass,PassState,PathGraphics,PathMode,PathVisualizer,PeliasGeocoderService,PerInstanceColorAppearance,PerformanceDisplay,PerformanceWatchdog,PerformanceWatchdogViewModel,PerspectiveFrustum,PerspectiveOffCenterFrustum,PickDepth,PickDepthFramebuffer,PickFramebuffer,PickId,PickedMetadataInfo,Picking,PickingPipelineStage,PinBuilder,PixelDatatype,PixelFormat,PlanarFillIdFramebuffer,Plane,PlaneGeometry,PlaneGeometryUpdater,PlaneGraphics,PlaneOutlineGeometry,PntsLoader,PntsParser,PointCloud,PointCloudEyeDomeLighting,PointCloudShading,PointCloudStylingPipelineStage,PointGraphics,PointPrimitive,PointPrimitiveCollection,PointVisualizer,PolygonGeometry,PolygonGeometryLibrary,PolygonGeometryUpdater,PolygonGraphics,PolygonHierarchy,PolygonOutlineGeometry,PolygonPipeline,Polyline,PolylineArrowMaterialProperty,PolylineCollection,PolylineColorAppearance,PolylineDashMaterialProperty,PolylineGeometry,PolylineGeometryUpdater,PolylineGlowMaterialProperty,PolylineGraphics,PolylineMaterialAppearance,PolylineOutlineMaterialProperty,PolylinePipeline,PolylineVisualizer,PolylineVolumeGeometry,PolylineVolumeGeometryLibrary,PolylineVolumeGeometryUpdater,PolylineVolumeGraphics,PolylineVolumeOutlineGeometry,PositionProperty,PositionPropertyArray,PostProcessStage,PostProcessStageCollection,PostProcessStageComposite,PostProcessStageLibrary,PostProcessStageSampleMode,PostProcessStageTextureCache,PpeMetadata,PpeSource,PpeTexture,Primitive,PrimitiveCollection,PrimitiveLoadPlan,PrimitiveOutlineGenerator,PrimitiveOutlinePipelineStage,PrimitivePipeline,PrimitiveRenderResources,PrimitiveState,PrimitiveStatisticsPipelineStage,PrimitiveType,ProjectionPicker,ProjectionPickerViewModel,Property,PropertyArray,PropertyAttribute,PropertyAttributeProperty,PropertyBag,PropertyTable,PropertyTexture,PropertyTextureProperty,ProviderViewModel,Proxy,QuadraticRealPolynomial,QuadtreeOccluders,QuadtreePrimitive,QuadtreeTile,QuadtreeTileLoadState,QuadtreeTileProvider,QuantizedMeshTerrainData,QuarticRealPolynomial,Quaternion,QuaternionSpline,Queue,Ray,Rectangle,RectangleCollisionChecker,RectangleGeometry,RectangleGeometryLibrary,RectangleGeometryUpdater,RectangleGraphics,RectangleOutlineGeometry,ReferenceFrame,ReferenceProperty,RenderState,Renderbuffer,RenderbufferFormat,Request,RequestErrorEvent,RequestScheduler,RequestState,RequestType,Resource,ResourceCache,ResourceCacheKey,ResourceCacheStatistics,ResourceLoader,ResourceLoaderState,Rotation,RuntimeError,S2Cell,SDFSettings,SampledPositionProperty,SampledProperty,Sampler,ScaledPositionProperty,Scene,SceneFramebuffer,SceneMode,SceneMode2DPipelineStage,SceneModePicker,SceneModePickerViewModel,SceneTransforms,SceneTransitioner,ScreenSpaceCameraController,ScreenSpaceElevatorCameraController,ScreenSpaceEventHandler,ScreenSpaceEventType,ScreenSpaceInputBindings,ScreenSpaceMapCameraController,ScreenSpaceTiltOrbitCameraController,ScreenSpaceZoomCameraController,SelectedFeatureIdPipelineStage,SelectionIndicator,SelectionIndicatorViewModel,SensorVolumePortionToDisplay,ShaderBuilder,ShaderCache,ShaderDestination,ShaderFunction,ShaderProgram,ShaderSource,ShaderStruct,ShadowMap,ShadowMapShader,ShadowMode,ShadowVolumeAppearance,SharedContext,ShowGeometryInstanceAttribute,Simon1994PlanetaryPositions,SimplePolylineGeometry,SingleTileImageryProvider,SkinningPipelineStage,SkyAtmosphere,SkyBox,SnapFramebuffer,SnapService,Snapping,SpatialNode,Spdcf,SpecularEnvironmentCubeMap,SphereEmitter,SphereGeometry,SphereOutlineGeometry,Spherical,Spline,SplitDirection,Splitter,StaticGeometryColorBatch,StaticGeometryPerMaterialBatch,StaticGroundGeometryColorBatch,StaticGroundGeometryPerMaterialBatch,StaticGroundPolylinePerMaterialBatch,StaticOutlineGeometryBatch,StencilConstants,StencilFunction,StencilOperation,SteppedSpline,Stereographic,StorageType,StripeMaterialProperty,StripeOrientation,StructuralMetadata,StyleCommandsNeeded,StyleExpression,Sun,SunLight,SunPostProcess,SupportedImageFormats,SvgPathBindingHandler,Sync,TaskProcessor,Terrain,TerrainData,TerrainEncoding,TerrainFillMesh,TerrainMesh,TerrainOffsetProperty,TerrainPicker,TerrainProvider,TerrainQuantization,TerrainState,Texture,Texture3D,TextureAtlas,TextureCache,TextureMagnificationFilter,TextureManager,TextureMinificationFilter,TexturePacker,TextureUniform,TextureWrap,TileAvailability,TileBoundingRegion,TileBoundingS2Cell,TileBoundingSphere,TileBoundingVolume,TileCoordinatesImageryProvider,TileDiscardPolicy,TileEdge,TileImagery,TileMapServiceImageryProvider,TileMetadata,TileOrientedBoundingBox,TileProviderError,TileReplacementQueue,TileSelectionResult,TileState,Tileset3DTileContent,TilesetMetadata,TilesetPipelineStage,TilingScheme,TimeConstants,TimeDynamicImagery,TimeDynamicPointCloud,TimeInterval,TimeIntervalCollection,TimeIntervalCollectionPositionProperty,TimeIntervalCollectionProperty,TimeStandard,Timeline,TimelineHighlightRange,TimelineTrack,Tipsify,ToggleButtonViewModel,Tonemapper,TrackingReferenceFrame,Transforms,TranslationRotationScale,TranslucentTileClassification,TridiagonalSystemSolver,TrustedServers,TweenCollection,UniformState,UniformType,UrlTemplate3DTilesDataProvider,UrlTemplateImageryProvider,VERSION,VRButton,VRButtonViewModel,VRTheWorldTerrainProvider,VaryingType,Vector3DTileBatch,Vector3DTileClampedPolylines,Vector3DTileContent,Vector3DTileGeometry,Vector3DTilePoints,Vector3DTilePolygons,Vector3DTilePolylines,Vector3DTilePrimitive,VectorGltf3DTileContent,VectorPipeline,VectorProvider,VelocityOrientationProperty,VelocityVectorProperty,VertexArray,VertexArrayFacade,VertexAttributeSemantic,VertexFormat,VerticalExaggeration,VerticalExaggerationPipelineStage,VerticalOrigin,VideoSynchronizer,View,Viewer,ViewportQuad,Visibility,Visualizer,VoxelBoundsCollection,VoxelBoxShape,VoxelCell,VoxelContent,VoxelCylinderShape,VoxelEllipsoidShape,VoxelInspector,VoxelInspectorViewModel,VoxelMetadataOrder,VoxelPrimitive,VoxelProvider,VoxelRenderResources,VoxelShape,VoxelShapeType,VoxelTraversal,VulkanConstants,WallGeometry,WallGeometryLibrary,WallGeometryUpdater,WallGraphics,WallOutlineGeometry,WebGLConstants,WebMapServiceImageryProvider,WebMapTileServiceImageryProvider,WebMercatorProjection,WebMercatorTilingScheme,WindingOrder,WireframeIndexGenerator,WireframePipelineStage,_shadersAcesTonemappingStage,_shadersAdditiveBlend,_shadersAdjustTranslucentFS,_shadersAllMaterialAppearanceFS,_shadersAllMaterialAppearanceVS,_shadersAmbientOcclusionGenerate,_shadersAmbientOcclusionModulate,_shadersAspectRampMaterial,_shadersAtmosphereCommon,_shadersAtmosphereStageFS,_shadersAtmosphereStageVS,_shadersBasicMaterialAppearanceFS,_shadersBasicMaterialAppearanceVS,_shadersBillboardCollectionFS,_shadersBillboardCollectionVS,_shadersBlackAndWhite,_shadersBloomComposite,_shadersBrdfLutGeneratorFS,_shadersBrightPass,_shadersBrightness,_shadersBufferPointMaterialFS,_shadersBufferPointMaterialVS,_shadersBufferPolygonMaterialFS,_shadersBufferPolygonMaterialVS,_shadersBufferPolylineMaterialFS,_shadersBufferPolylineMaterialVS,_shadersBumpMapMaterial,_shadersCPUStylingStageFS,_shadersCPUStylingStageVS,_shadersCheckerboardMaterial,_shadersCloudCollectionFS,_shadersCloudCollectionVS,_shadersCloudNoiseFS,_shadersCloudNoiseVS,_shadersCompareAndPackTranslucentDepth,_shadersCompositeOITFS,_shadersCompositeTranslucentClassification,_shadersComputeIrradianceFS,_shadersComputeRadianceMapFS,_shadersConstantLodStageFS,_shadersConstantLodStageVS,_shadersContrastBias,_shadersConvolveSpecularMapFS,_shadersConvolveSpecularMapVS,_shadersCubeMapPanoramaVS,_shadersCustomShaderStageFS,_shadersCustomShaderStageVS,_shadersCzmBuiltins,_shadersDepthOfField,_shadersDepthPlaneFS,_shadersDepthPlaneVS,_shadersDepthView,_shadersDepthViewPacked,_shadersDotMaterial,_shadersEdgeDetection,_shadersEdgeDetectionStageFS,_shadersEdgeVisibilityStageFS,_shadersEdgeVisibilityStageVS,_shadersElevationBandMaterial,_shadersElevationContourMaterial,_shadersElevationRampMaterial,_shadersEllipsoidFS,_shadersEllipsoidSurfaceAppearanceFS,_shadersEllipsoidSurfaceAppearanceVS,_shadersEllipsoidVS,_shadersFXAA,_shadersFXAA3_11,_shadersFadeMaterial,_shadersFeatureIdStageFS,_shadersFeatureIdStageVS,_shadersFilmicTonemapping,_shadersGaussianBlur1D,_shadersGeometryStageFS,_shadersGeometryStageVS,_shadersGlobeFS,_shadersGlobeVS,_shadersGridMaterial,_shadersGroundAtmosphere,_shadersHSBToRGB,_shadersHSLToRGB,_shadersImageBasedLightingStageFS,_shadersInstancingStageCommon,_shadersInstancingStageVS,_shadersIntersectBox,_shadersIntersectCylinder,_shadersIntersectDepth,_shadersIntersectEllipsoid,_shadersIntersectLongitude,_shadersIntersectPlane,_shadersIntersection,_shadersIntersectionUtils,_shadersLegacyInstancingStageVS,_shadersLensFlare,_shadersLightingStageFS,_shadersMaterialStageFS,_shadersMegatexture,_shadersMetadataStageFS,_shadersMetadataStageVS,_shadersModelClippingPlanesStageFS,_shadersModelClippingPolygonsStageFS,_shadersModelClippingPolygonsStageVS,_shadersModelColorStageFS,_shadersModelFS,_shadersModelSilhouetteStageFS,_shadersModelSilhouetteStageVS,_shadersModelSplitterStageFS,_shadersModelVS,_shadersModelVectorLookupStageFS,_shadersModelVectorLookupStageVS,_shadersModifiedReinhardTonemapping,_shadersMorphTargetsStageVS,_shadersNightVision,_shadersNormalMapMaterial,_shadersOctree,_shadersPassThrough,_shadersPassThroughDepth,_shadersPbrNeutralTonemapping,_shadersPerInstanceColorAppearanceFS,_shadersPerInstanceColorAppearanceVS,_shadersPerInstanceFlatColorAppearanceFS,_shadersPerInstanceFlatColorAppearanceVS,_shadersPointCloudEyeDomeLighting,_shadersPointCloudStylingStageVS,_shadersPointPrimitiveCollectionFS,_shadersPointPrimitiveCollectionVS,_shadersPolylineArrowMaterial,_shadersPolylineColorAppearanceVS,_shadersPolylineCommon,_shadersPolylineDashMaterial,_shadersPolylineFS,_shadersPolylineGlowMaterial,_shadersPolylineMaterialAppearanceVS,_shadersPolylineOutlineMaterial,_shadersPolylineShadowVolumeFS,_shadersPolylineShadowVolumeMorphFS,_shadersPolylineShadowVolumeMorphVS,_shadersPolylineShadowVolumeVS,_shadersPolylineVS,_shadersPrimitiveGaussianSplatFS,_shadersPrimitiveGaussianSplatVS,_shadersPrimitiveOutlineStageFS,_shadersPrimitiveOutlineStageVS,_shadersRGBToHSB,_shadersRGBToHSL,_shadersRGBToXYZ,_shadersReinhardTonemapping,_shadersReprojectWebMercatorFS,_shadersReprojectWebMercatorVS,_shadersRimLightingMaterial,_shadersSelectedFeatureIdStageCommon,_shadersShadowVolumeAppearanceFS,_shadersShadowVolumeAppearanceVS,_shadersShadowVolumeFS,_shadersSilhouette,_shadersSkinningStageVS,_shadersSkyAtmosphereCommon,_shadersSkyAtmosphereFS,_shadersSkyAtmosphereVS,_shadersSkyBoxFS,_shadersSkyBoxVS,_shadersSlopeRampMaterial,_shadersStripeMaterial,_shadersSunFS,_shadersSunTextureFS,_shadersSunVS,_shadersTexturedMaterialAppearanceFS,_shadersTexturedMaterialAppearanceVS,_shadersVector3DTileClampedPolylinesFS,_shadersVector3DTileClampedPolylinesVS,_shadersVector3DTilePolylinesVS,_shadersVectorCommon,_shadersVectorTileVS,_shadersVerticalExaggerationStageVS,_shadersViewportQuadFS,_shadersViewportQuadVS,_shadersVoxelFS,_shadersVoxelUtils,_shadersVoxelVS,_shadersWater,_shadersWaterMaskMaterial,_shadersXYZToRGB,_shadersacesTonemapping,_shadersalphaWeight,_shadersantialias,_shadersapplyHSBShift,_shadersapproximateSphericalCoordinates,_shadersapproximateTanh,_shadersbackFacing,_shadersbranchFreeTernary,_shaderscascadeColor,_shaderscascadeDistance,_shaderscascadeMatrix,_shaderscascadeWeights,_shaderscolumbusViewMorph,_shaderscomputeAtmosphereColor,_shaderscomputeGroundAtmosphereScattering,_shaderscomputePosition,_shaderscomputeScattering,_shaderscomputeTextureTransform,_shadersconvertLocalToBoxUv,_shadersconvertLocalToCylinderUv,_shadersconvertLocalToEllipsoidUv,_shaderscosineAndSine,_shadersdecodeRGB8,_shadersdecompressTextureCoordinates,_shadersdegreesPerRadian,_shadersdepthClamp,_shadersdepthRange,_shadersdepthRangeStruct,_shaderseastNorthUpToEyeCoordinates,_shadersellipsoidContainsPoint,_shadersellipsoidTextureCoordinates,_shadersepsilon1,_shadersepsilon2,_shadersepsilon3,_shadersepsilon4,_shadersepsilon5,_shadersepsilon6,_shadersepsilon7,_shadersequalsEpsilon,_shaderseyeOffset,_shaderseyeToCartographicDelta,_shaderseyeToWindowCoordinates,_shadersfastApproximateAtan,_shadersfog,_shadersgammaCorrect,_shadersgeodeticSurfaceNormal,_shadersgetDefaultMaterial,_shadersgetDynamicAtmosphereLightDirection,_shadersgetLambertDiffuse,_shadersgetSpecular,_shadersgetWaterNoise,_shadershue,_shadersinfinity,_shadersinverseGamma,_shadersisEmpty,_shadersisFull,_shaderslatitudeToWebMercatorFraction,_shaderslineDistance,_shaderslinearToSrgb,_shadersluminance,_shadersmaterial,_shadersmaterialInput,_shadersmaximumComponent,_shadersmetersPerPixel,_shadersmodelMaterial,_shadersmodelToWindowCoordinates,_shadersmodelVertexOutput,_shadersmultiplyWithColorBalance,_shadersnearFarScalar,_shadersoctDecode,_shadersoneOverPi,_shadersoneOverTwoPi,_shaderspackDepth,_shaderspassCesium3DTile,_shaderspassCesium3DTileClassification,_shaderspassCesium3DTileClassificationIgnoreShow,_shaderspassCesium3DTileEdges,_shaderspassCesium3DTileEdgesDirect,_shaderspassCesium3DTilePlanarFillId,_shaderspassClassification,_shaderspassCompute,_shaderspassEnvironment,_shaderspassGaussianSplats,_shaderspassGlobe,_shaderspassOpaque,_shaderspassOverlay,_shaderspassTerrainClassification,_shaderspassTranslucent,_shaderspassVoxels,_shaderspbrLighting,_shaderspbrNeutralTonemapping,_shadersphong,_shaderspi,_shaderspiOverFour,_shaderspiOverSix,_shaderspiOverThree,_shaderspiOverTwo,_shadersplaneDistance,_shaderspointAlongRay,_shadersradiansPerDegree,_shadersray,_shadersrayEllipsoidIntersectionInterval,_shadersraySegment,_shadersraySphereIntersectionInterval,_shadersreadDepth,_shadersreadNonPerspective,_shadersreverseLogDepth,_shadersround,_shaderssaturation,_shaderssceneMode2D,_shaderssceneMode3D,_shaderssceneModeColumbusView,_shaderssceneModeMorphing,_shadersshadowDepthCompare,_shadersshadowParameters,_shadersshadowVisibility,_shaderssignNotZero,_shaderssolarRadius,_shaderssphericalHarmonics,_shaderssrgbToLinear,_shaderstangentToEyeSpaceMatrix,_shaderstextureCube,_shadersthreePiOver2,_shaderstransformPlane,_shaderstranslateRelativeToEye,_shaderstranslucentPhong,_shaderstranspose,_shaderstwoPi,_shadersunpackDepth,_shadersunpackFloat,_shadersunpackTexture,_shadersunpackUint,_shadersvalueTransform,_shadersvertexLogDepth,_shaderswebMercatorMaxLatitude,_shaderswindowToEyeCoordinates,_shaderswriteDepthClamp,_shaderswriteLogDepth,_shaderswriteNonPerspective,addAllToArray,addBuffer,addDefaults,addExtensionsRequired,addExtensionsUsed,addPipelineExtras,addToArray,appendForwardSlash,arrayRemoveDuplicates,assert,barycentricCoordinates,binarySearch,buildModuleUrl,buildVectorGltfFromMVT,buildVoxelCustomShader,buildVoxelDrawCommands,clone,combine,computeFlyToLocationForRectangle,createBillboardPointCallback,createColorRamp,createCommand,createDefaultImageryProviderViewModels,createDefaultTerrainProviderViewModels,createElevationBandMaterial,createGooglePhotorealistic3DTileset,createGuid,createMaterialPropertyDescriptor,createOsmBuildingsAsync,createPropertyDescriptor,createRawPropertyDescriptor,createTangentSpaceDebugPrimitive,createTaskProcessorWorker,createUniform,createUniformArray,createVectorTileBuffersFromModelComponents,createWorldBathymetryAsync,createWorldImageryAsync,createWorldTerrainAsync,decodeGoogleEarthEnterpriseData,decodeMVT,decodeVectorPolylinePositions,defaultPickWorldPosition,defer,defined,demodernizeShader,deprecationWarning,destroyObject,exportKml,findAccessorMinMax,findContentMetadata,findGroupMetadata,findMeshoptExtension,findTileMetadata,forEachTextureInMaterial,formatError,freezeRenderState,getAbsoluteUri,getAccessorByteStride,getBaseUri,getBinaryAccessor,getClipAndStyleCode,getClippingFunction,getComponentReader,getElement,getExtensionFromUri,getFilenameFromUri,getImageFromTypedArray,getImagePixels,getJsonFromTypedArray,getMagic,getMeshPrimitives,getMetadataClassProperty,getMetadataProperty,getStringFromTypedArray,getTimestamp,hasExtension,heightReferenceOnEntityPropertyChanged,isBitSet,isBlobUri,isCrossOriginUrl,isDataUri,isLeapYear,knockout,knockout_3_5_1,knockout_es5,loadAndExecuteScript,loadCubeMap,loadImageFromTypedArray,loadKTX2,mergeSort,mostDetailedSurfaceHeight,moveTechniqueRenderStates,moveTechniquesToExtension,numberOfComponentsForType,objectToQuery,oneTimeWarning,parseBatchTable,parseFeatureMetadataLegacy,parseGlb,parseResponseHeaders,parseStructuralMetadata,pickModel,pointInsideTriangle,positionForSurfaceHeight,preprocess3DTileContent,processVoxelProperties,queryToObject,readAccessorPacked,removeExtension,removeExtensionsRequired,removeExtensionsUsed,removePipelineExtras,removeUnusedElements,renderBufferPointCollection,renderBufferPolygonCollection,renderBufferPolylineCollection,resizeImageToNextPowerOfTwo,sampleTerrain,sampleTerrainMostDetailed,scaleToGeodeticSurface,srgbToLinear,subdivideArray,subscribeAndEvaluate,updateAccessorComponentTypes,updateVersion,usesExtension,viewerCesium3DTilesInspectorMixin,viewerCesiumInspectorMixin,viewerDragDropMixin,viewerPerformanceWatchdogMixin,viewerVoxelInspectorMixin,webGLConstantToGlslType,wrapFunction,writeTextToCanvas});
//# sourceMappingURL=index.cjs.map