/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.131 * * 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. */ var owe=Object.create;var BU=Object.defineProperty;var rwe=Object.getOwnPropertyDescriptor;var swe=Object.getOwnPropertyNames;var awe=Object.getPrototypeOf,cwe=Object.prototype.hasOwnProperty;var lwe=(e,t)=>()=>(e&&(t=e(e=0)),t);var ci=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qee=(e,t)=>{for(var n in t)BU(e,n,{get:t[n],enumerable:!0})},Kee=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of swe(t))!cwe.call(e,o)&&o!==n&&BU(e,o,{get:()=>t[o],enumerable:!(i=rwe(t,o))||i.enumerable});return e};var br=(e,t,n)=>(n=e!=null?owe(awe(e)):{},Kee(t||!e||!e.__esModule?BU(n,"default",{value:e,enumerable:!0}):n,e)),ih=e=>Kee(BU({},"__esModule",{value:!0}),e);var DU=ci((WPt,Xee)=>{var Kp=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)};Kp.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};Kp.prototype.init_by_array=function(e,t){var n,i,o;for(this.init_seed(19650218),n=1,i=0,o=this.N>t?this.N:t;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1664525<<16)+(r&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(o=this.N-1;o;o--){var r=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((r&4294901760)>>>16)*1566083941<<16)+(r&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};Kp.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>>1^t[e&1];for(;n>>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};Kp.prototype.random_int31=function(){return this.random_int()>>>1};Kp.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};Kp.prototype.random=function(){return this.random_int()*(1/4294967296)};Kp.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};Kp.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};Xee.exports=Kp});var Ete=ci((Ox,Fx)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof Ox=="object"&&Ox&&!Ox.nodeType&&Ox,n=typeof Fx=="object"&&Fx&&!Fx.nodeType&&Fx,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,c=26,u=38,f=700,h=72,p=128,g="-",m=/^xn--/,_=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=s-a,I=Math.floor,b=String.fromCharCode,S;function B(F){throw new RangeError(C[F])}function v(F,z){for(var Q=F.length,H=[];Q--;)H[Q]=z(F[Q]);return H}function P(F,z){var Q=F.split("@"),H="";Q.length>1&&(H=Q[0]+"@",F=Q[1]),F=F.replace(y,".");var j=F.split("."),Z=v(j,z).join(".");return H+Z}function N(F){for(var z=[],Q=0,H=F.length,j,Z;Q=55296&&j<=56319&&Q65535&&(z-=65536,Q+=b(z>>>10&1023|55296),z=56320|z&1023),Q+=b(z),Q}).join("")}function A(F){return F-48<10?F-22:F-65<26?F-65:F-97<26?F-97:s}function x(F,z){return F+22+75*(F<26)-((z!=0)<<5)}function T(F,z,Q){var H=0;for(F=Q?I(F/f):F>>1,F+=I(F/z);F>E*c>>1;H+=s)F=I(F/E);return I(H+(E+1)*F/(F+u))}function w(F){var z=[],Q=F.length,H,j=0,Z=p,Y=h,$,J,pe,Ce,fe,ye,Ie,ve,be;for($=F.lastIndexOf(g),$<0&&($=0),J=0;J<$;++J)F.charCodeAt(J)>=128&&B("not-basic"),z.push(F.charCodeAt(J));for(pe=$>0?$+1:0;pe=Q&&B("invalid-input"),Ie=A(F.charCodeAt(pe++)),(Ie>=s||Ie>I((r-j)/fe))&&B("overflow"),j+=Ie*fe,ve=ye<=Y?a:ye>=Y+c?c:ye-Y,!(IeI(r/be)&&B("overflow"),fe*=be;H=z.length+1,Y=T(j-Ce,H,Ce==0),I(j/H)>r-Z&&B("overflow"),Z+=I(j/H),j%=H,z.splice(j++,0,Z)}return L(z)}function R(F){var z,Q,H,j,Z,Y,$,J,pe,Ce,fe,ye=[],Ie,ve,be,ze;for(F=N(F),Ie=F.length,z=p,Q=0,Z=h,Y=0;Y=z&&fe<$&&($=fe);for(ve=H+1,$-z>I((r-Q)/ve)&&B("overflow"),Q+=($-z)*ve,z=$,Y=0;Yr&&B("overflow"),fe==z){for(J=Q,pe=s;Ce=pe<=Z?a:pe>=Z+c?c:pe-Z,!(J{/*! * 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 KU=="object"&&KU.exports?KU.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(Ite,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.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;u1);p++)f.splice(0,1);s[h]=f.join("")}var g=-1,m=0,_=0,y=-1,C=!1;for(h=0;hm&&(g=y,m=_)):s[h]==="0"&&(C=!0,y=h,_=1);_>m&&(g=y,m=_),m>1&&s.splice(g,m,""),a=s.length;var E="";for(s[0]===""&&(E=":"),h=0;h{/*! * 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 XU=="object"&&XU.exports?XU.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(bte,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 o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(r+1,o)+" ")>=0:!1},is:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return!1;var r=i.lastIndexOf(".",o-1);if(r>=0)return!1;var s=n.list[i.slice(o+1)];return s?s.indexOf(" "+i.slice(0,o)+" ")>=0:!1},get:function(i){var o=i.lastIndexOf(".");if(o<=0||o>=i.length-1)return null;var r=i.lastIndexOf(".",o-1);if(r<=0||r>=o-1)return null;var s=n.list[i.slice(o+1)];return!s||s.indexOf(" "+i.slice(r+1,o)+" ")<0?null:i.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var Ou=ci((Ste,JU)=>{/*! * 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 JU=="object"&&JU.exports?JU.exports=t(Ete(),xte(),Tte()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(Ste,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(x,T){var w=arguments.length>=1,R=arguments.length>=2;if(!(this instanceof r))return w?R?new r(x,T):new r(x):new r;if(x===void 0){if(w)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?x=location.href+"":x=""}if(x===null&&w)throw new TypeError("null is not a valid argument for URI");return this.href(x),T!==void 0?this.absoluteTo(T):this}function s(x){return/^[0-9]+$/.test(x)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function u(x){return x.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function f(x){return x===void 0?"Undefined":String(Object.prototype.toString.call(x)).slice(8,-1)}function h(x){return f(x)==="Array"}function p(x,T){var w={},R,O;if(f(T)==="RegExp")w=null;else if(h(T))for(R=0,O=T.length;R]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.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"},r.getDomAttribute=function(x){if(!(!x||!x.nodeName)){var T=x.nodeName.toLowerCase();if(!(T==="input"&&x.type!=="image"))return r.domAttributes[T]}};function y(x){return escape(x)}function C(x){return encodeURIComponent(x).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}r.encode=C,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=C,r.decode=decodeURIComponent},r.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"}}}},r.encodeQuery=function(x,T){var w=r.encode(x+"");return T===void 0&&(T=r.escapeQuerySpace),T?w.replace(/%20/g,"+"):w},r.decodeQuery=function(x,T){x+="",T===void 0&&(T=r.escapeQuerySpace);try{return r.decode(T?x.replace(/\+/g,"%20"):x)}catch{return x}};var E={encode:"encode",decode:"decode"},I,b=function(x,T){return function(w){try{return r[T](w+"").replace(r.characters[x][T].expression,function(R){return r.characters[x][T].map[R]})}catch{return w}}};for(I in E)r[I+"PathSegment"]=b("pathname",E[I]),r[I+"UrnPathSegment"]=b("urnpath",E[I]);var S=function(x,T,w){return function(R){var O;w?O=function(Q){return r[T](r[w](Q))}:O=r[T];for(var k=(R+"").split(x),F=0,z=k.length;F-1&&(T.fragment=x.substring(w+1)||null,x=x.substring(0,w)),w=x.indexOf("?"),w>-1&&(T.query=x.substring(w+1)||null,x=x.substring(0,w)),x=x.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),x=x.replace(/^[/\\]{2,}/i,"//"),x.substring(0,2)==="//"?(T.protocol=null,x=x.substring(2),x=r.parseAuthority(x,T)):(w=x.indexOf(":"),w>-1&&(T.protocol=x.substring(0,w)||null,T.protocol&&!T.protocol.match(r.protocol_expression)?T.protocol=void 0:x.substring(w+1,w+3).replace(/\\/g,"/")==="//"?(x=x.substring(w+3),x=r.parseAuthority(x,T)):(x=x.substring(w+1),T.urn=!0))),T.path=x,T},r.parseHost=function(x,T){x||(x=""),x=x.replace(/\\/g,"/");var w=x.indexOf("/"),R,O;if(w===-1&&(w=x.length),x.charAt(0)==="[")R=x.indexOf("]"),T.hostname=x.substring(1,R)||null,T.port=x.substring(R+2,w)||null,T.port==="/"&&(T.port=null);else{var k=x.indexOf(":"),F=x.indexOf("/"),z=x.indexOf(":",k+1);z!==-1&&(F===-1||z-1?O:x.length-1),F;return k>-1&&(O===-1||k-1?Y=Y.slice(0,$)+Y.slice($).replace(k,""):Y=Y.replace(k,""),!(Y.length<=Q[0].length)&&!(w.ignore&&w.ignore.test(Y))){Z=H+Y.length;var Ce=T(Y,H,Z,x);if(Ce===void 0){R.lastIndex=Z;continue}Ce=String(Ce),x=x.slice(0,H)+Ce+x.slice(Z),R.lastIndex=H+Ce.length}}return R.lastIndex=0,x},r.ensureValidHostname=function(x,T){var w=!!x,R=!!T,O=!1;if(R&&(O=g(r.hostProtocols,T)),O&&!w)throw new TypeError("Hostname cannot be empty, if protocol is "+T);if(x&&x.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+x+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(x).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+x+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(x){if(x){var T=Number(x);if(!(s(T)&&T>0&&T<65536))throw new TypeError('Port "'+x+'" is not a valid port')}},r.noConflict=function(x){if(x){var T={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(T.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(T.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(T.SecondLevelDomains=i.SecondLevelDomains.noConflict()),T}else i.URI===this&&(i.URI=o);return this},a.build=function(x){return x===!0?this._deferred_build=!0:(x===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function B(x){return function(T,w){return T===void 0?this._parts[x]||"":(this._parts[x]=T||null,this.build(!w),this)}}function v(x,T){return function(w,R){return w===void 0?this._parts[x]||"":(w!==null&&(w=w+"",w.charAt(0)===T&&(w=w.substring(1))),this._parts[x]=w,this.build(!R),this)}}a.protocol=B("protocol"),a.username=B("username"),a.password=B("password"),a.hostname=B("hostname"),a.port=B("port"),a.query=v("query","?"),a.fragment=v("fragment","#"),a.search=function(x,T){var w=this.query(x,T);return typeof w=="string"&&w.length?"?"+w:w},a.hash=function(x,T){var w=this.fragment(x,T);return typeof w=="string"&&w.length?"#"+w:w},a.pathname=function(x,T){if(x===void 0||x===!0){var w=this._parts.path||(this._parts.hostname?"/":"");return x?(this._parts.urn?r.decodeUrnPath:r.decodePath)(w):w}else return this._parts.urn?this._parts.path=x?r.recodeUrnPath(x):"":this._parts.path=x?r.recodePath(x):"/",this.build(!T),this},a.path=a.pathname,a.href=function(x,T){var w;if(x===void 0)return this.toString();this._string="",this._parts=r._parts();var R=x instanceof r,O=typeof x=="object"&&(x.hostname||x.path||x.pathname);if(x.nodeName){var k=r.getDomAttribute(x);x=x[k]||"",O=!1}if(!R&&O&&x.pathname!==void 0&&(x=x.toString()),typeof x=="string"||x instanceof String)this._parts=r.parse(String(x),this._parts);else if(R||O){var F=R?x._parts:x;for(w in F)w!=="query"&&c.call(this._parts,w)&&(this._parts[w]=F[w]);F.query&&this.query(F.query,!1)}else throw new TypeError("invalid input");return this.build(!T),this},a.is=function(x){var T=!1,w=!1,R=!1,O=!1,k=!1,F=!1,z=!1,Q=!this._parts.urn;switch(this._parts.hostname&&(Q=!1,w=r.ip4_expression.test(this._parts.hostname),R=r.ip6_expression.test(this._parts.hostname),T=w||R,O=!T,k=O&&n&&n.has(this._parts.hostname),F=O&&r.idn_expression.test(this._parts.hostname),z=O&&r.punycode_expression.test(this._parts.hostname)),x.toLowerCase()){case"relative":return Q;case"absolute":return!Q;case"domain":case"name":return O;case"sld":return k;case"ip":return T;case"ip4":case"ipv4":case"inet4":return w;case"ip6":case"ipv6":case"inet6":return R;case"idn":return F;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return z}return null};var P=a.protocol,N=a.port,L=a.hostname;a.protocol=function(x,T){if(x&&(x=x.replace(/:(\/\/)?$/,""),!x.match(r.protocol_expression)))throw new TypeError('Protocol "'+x+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return P.call(this,x,T)},a.scheme=a.protocol,a.port=function(x,T){return this._parts.urn?x===void 0?"":this:(x!==void 0&&(x===0&&(x=null),x&&(x+="",x.charAt(0)===":"&&(x=x.substring(1)),r.ensureValidPort(x))),N.call(this,x,T))},a.hostname=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x!==void 0){var w={preventInvalidHostname:this._parts.preventInvalidHostname},R=r.parseHost(x,w);if(R!=="/")throw new TypeError('Hostname "'+x+'" contains characters other than [A-Z0-9.-]');x=w.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(x,this._parts.protocol)}return L.call(this,x,T)},a.origin=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0){var w=this.protocol(),R=this.authority();return R?(w?w+"://":"")+this.authority():""}else{var O=r(x);return this.protocol(O.protocol()).authority(O.authority()).build(!T),this}},a.host=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var w=r.parseHost(x,this._parts);if(w!=="/")throw new TypeError('Hostname "'+x+'" contains characters other than [A-Z0-9.-]');return this.build(!T),this},a.authority=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var w=r.parseAuthority(x,this._parts);if(w!=="/")throw new TypeError('Hostname "'+x+'" contains characters other than [A-Z0-9.-]');return this.build(!T),this},a.userinfo=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0){var w=r.buildUserinfo(this._parts);return w&&w.substring(0,w.length-1)}else return x[x.length-1]!=="@"&&(x+="@"),r.parseUserinfo(x,this._parts),this.build(!T),this},a.resource=function(x,T){var w;return x===void 0?this.path()+this.search()+this.hash():(w=r.parse(x),this._parts.path=w.path,this._parts.query=w.query,this._parts.fragment=w.fragment,this.build(!T),this)},a.subdomain=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0){if(!this._parts.hostname||this.is("IP"))return"";var w=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,w)||""}else{var R=this._parts.hostname.length-this.domain().length,O=this._parts.hostname.substring(0,R),k=new RegExp("^"+u(O));if(x&&x.charAt(x.length-1)!=="."&&(x+="."),x.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return x&&r.ensureValidHostname(x,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(k,x),this.build(!T),this}},a.domain=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(typeof x=="boolean"&&(T=x,x=void 0),x===void 0){if(!this._parts.hostname||this.is("IP"))return"";var w=this._parts.hostname.match(/\./g);if(w&&w.length<2)return this._parts.hostname;var R=this._parts.hostname.length-this.tld(T).length-1;return R=this._parts.hostname.lastIndexOf(".",R-1)+1,this._parts.hostname.substring(R)||""}else{if(!x)throw new TypeError("cannot set domain empty");if(x.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(x,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=x;else{var O=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(O,x)}return this.build(!T),this}},a.tld=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(typeof x=="boolean"&&(T=x,x=void 0),x===void 0){if(!this._parts.hostname||this.is("IP"))return"";var w=this._parts.hostname.lastIndexOf("."),R=this._parts.hostname.substring(w+1);return T!==!0&&n&&n.list[R.toLowerCase()]&&n.get(this._parts.hostname)||R}else{var O;if(x)if(x.match(/[^a-zA-Z0-9-]/))if(n&&n.is(x))O=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(O,x);else throw new TypeError('TLD "'+x+'" 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");O=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(O,x)}else throw new TypeError("cannot set TLD empty");return this.build(!T),this}},a.directory=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0||x===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var w=this._parts.path.length-this.filename().length-1,R=this._parts.path.substring(0,w)||(this._parts.hostname?"/":"");return x?r.decodePath(R):R}else{var O=this._parts.path.length-this.filename().length,k=this._parts.path.substring(0,O),F=new RegExp("^"+u(k));return this.is("relative")||(x||(x="/"),x.charAt(0)!=="/"&&(x="/"+x)),x&&x.charAt(x.length-1)!=="/"&&(x+="/"),x=r.recodePath(x),this._parts.path=this._parts.path.replace(F,x),this.build(!T),this}},a.filename=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(typeof x!="string"){if(!this._parts.path||this._parts.path==="/")return"";var w=this._parts.path.lastIndexOf("/"),R=this._parts.path.substring(w+1);return x?r.decodePathSegment(R):R}else{var O=!1;x.charAt(0)==="/"&&(x=x.substring(1)),x.match(/\.?\//)&&(O=!0);var k=new RegExp(u(this.filename())+"$");return x=r.recodePath(x),this._parts.path=this._parts.path.replace(k,x),O?this.normalizePath(T):this.build(!T),this}},a.suffix=function(x,T){if(this._parts.urn)return x===void 0?"":this;if(x===void 0||x===!0){if(!this._parts.path||this._parts.path==="/")return"";var w=this.filename(),R=w.lastIndexOf("."),O,k;return R===-1?"":(O=w.substring(R+1),k=/^[a-z0-9%]+$/i.test(O)?O:"",x?r.decodePathSegment(k):k)}else{x.charAt(0)==="."&&(x=x.substring(1));var F=this.suffix(),z;if(F)x?z=new RegExp(u(F)+"$"):z=new RegExp(u("."+F)+"$");else{if(!x)return this;this._parts.path+="."+r.recodePath(x)}return z&&(x=r.recodePath(x),this._parts.path=this._parts.path.replace(z,x)),this.build(!T),this}},a.segment=function(x,T,w){var R=this._parts.urn?":":"/",O=this.path(),k=O.substring(0,1)==="/",F=O.split(R);if(x!==void 0&&typeof x!="number"&&(w=T,T=x,x=void 0),x!==void 0&&typeof x!="number")throw new Error('Bad segment "'+x+'", must be 0-based integer');if(k&&F.shift(),x<0&&(x=Math.max(F.length+x,0)),T===void 0)return x===void 0?F:F[x];if(x===null||F[x]===void 0)if(h(T)){F=[];for(var z=0,Q=T.length;z{var oz=function(){"use strict";var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9Giuuueui8AYdilveoveovrrwrrDDoDrbqqbelve9Weiiviebeoweuec;G:Qdkr:nlAo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9mW4W2be8A9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWVbd8F9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949c919M9MWV9c9V919U9KbiE9TW79O9V9Wt9FW9U9J9V9KW9wWVtW949wWV79P9V9UblY9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWVbv8E9TW79O9V9Wt9FW9U9J9V9KW69U9KW949c919M9MWV9c9V919U9Kbo8A9TW79O9V9Wt9FW9U9J9V9KW69U9KW949wWV79P9V9UbrE9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JWbwa9TW79O9V9Wt9FW9U9J9V9KW69U9KW949tWG91W9U9JW9c9V919U9KbDL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9p9JtbqK9TW79O9V9Wt9FW9U9J9V9KWS9P2tWV9r919HtbkL9TW79O9V9Wt9FW9U9J9V9KWS9P2tWVT949WbxE9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OWbsa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94J9H9J9OW9ttV9P9Wbza9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9WbHK9TW79O9V9Wt9F79W9Ht9P9H29t9VVt9sW9T9H9WbOl79IV9RbCDwebcekdKLqN9OYdbk:Bhdhud9:8Jjjjjbc;qw9Rgr8KjjjjbcbhwdnaeTmbabcbyd;C:kjjbaoaocb9iEgDc:GeV86bbarc;adfcbcjdz:wjjjb8AdnaiTmbarc;adfadalz:vjjjb8Akarc;abfalfcbcbcjdal9RalcFe0Ez:wjjjb8Aarc;abfarc;adfalz:vjjjb8AarcUf9cb83ibarc8Wf9cb83ibarcyf9cb83ibarcaf9cb83ibarcKf9cb83ibarczf9cb83ibar9cb83iwar9cb83ibcj;abal9Uc;WFbGcjdalca0Ehqdnaicd6mbavcd9imbaDTmbadcefhkaqci2gxal2hmarc;alfclfhParc;qlfceVhsarc;qofclVhzarc;qofcKfhHarc;qofczfhOcbhAincdhCcbhodnavci6mbaH9cb83ibaO9cb83ibar9cb83i;yoar9cb83i;qoadaAfgoybbhXcbhQincbhwcbhLdninaoalfhKaoybbgYaX7aLVhLawcP0meaKhoaYhXawcefgwaQfai6mbkkcbhXarc;qofhwincwh8AcwhEdnaLaX93gocFeGg3cs0mbclhEa3ci0mba3cb9hcethEkdnaocw4cFeGg3cs0mbclh8Aa3ci0mba3cb9hceth8Aka8AaEfh3awydbh5cwh8AcwhEdnaocz4cFeGg8Ecs0mbclhEa8Eci0mba8Ecb9hcethEka3a5fh3dnaocFFFFb0mbclh8AaocFFF8F0mbaocFFFr0ceth8Akawa3aEfa8AfBdbawclfhwaXcefgXcw9hmbkaKhoaYhXaQczfgQai6mbkcbhocehwazhLinawaoaLydbarc;qofaocdtfydb6EhoaLclfhLawcefgwcw9hmbkcihCkcbh3arc;qlfcbcjdz:wjjjb8Aarc;alfcwfcbBdbar9cb83i;alaoclth8Fadhaaqhhakh5inarc;qlfadcba3cufgoaoa30Eal2falz:vjjjb8Aaiahaiah6Ehgdnaqaia39Ra3aqfai6EgYcsfc9WGgoaY9nmbarc;qofaYfcbaoaY9Rz:wjjjb8Akada3al2fh8Jcbh8Kina8Ka8FVcl4hQarc;alfa8Kcdtfh8LaAh8Mcbh8Nina8NaAfhwdndndndndndna8KPldebidkasa8Mc98GgLfhoa5aLfh8Aarc;qlfawc98GgLfRbbhXcwhwinaoRbbawtaXVhXaocefhoawcwfgwca9hmbkaYTmla8Ncith8Ea8JaLfhEcbhKinaERbbhLcwhoa8AhwinawRbbaotaLVhLawcefhwaocwfgoca9hmbkarc;qofaKfaLaX7aQ93a8E486bba8Aalfh8AaEalfhEaLhXaKcefgKaY9hmbxlkkaYTmia8Mc9:Ghoa8NcitcwGhEarc;qlfawceVfRbbcwtarc;qlfawc9:GfRbbVhLarc;qofhwaghXinawa5aofRbbcwtaaaofRbbVg8AaL9RgLcetaLcztcz91cs47cFFiGaE486bbaoalfhoawcefhwa8AhLa3aXcufgX9hmbxikkaYTmda8Jawfhoarc;qlfawfRbbhLarc;qofhwaghXinawaoRbbg8AaL9RgLcetaLcKtcK91cr4786bbawcefhwaoalfhoa8AhLa3aXcufgX9hmbxdkkaYTmeka8LydbhEcbhKarc;qofhoincdhLcbhwinaLaoawfRbbcb9hfhLawcefgwcz9hmbkclhXcbhwinaXaoawfRbbcd0fhXawcefgwcz9hmbkcwh8Acbhwina8AaoawfRbbcP0fh8Aawcefgwcz9hmbkaLaXaLaX6Egwa8Aawa8A6Egwczawcz6EaEfhEaoczfhoaKczfgKaY6mbka8LaEBdbka8Mcefh8Ma8Ncefg8Ncl9hmbka8Kcefg8KaC9hmbkaaamfhaahaxfhha5amfh5a3axfg3ai6mbkcbhocehwaPhLinawaoaLydbarc;alfaocdtfydb6EhoaLclfhLawcefgXhwaCaX9hmbkaraAcd4fa8FcdVaoaocdSE86bbaAclfgAal6mbkkabaefh8Kabcefhoalcd4gecbaDEhkadcefhOarc;abfceVhHcbhmdndninaiam9nmearc;qofcbcjdz:wjjjb8Aa8Kao9Rak6mdadamal2gwfhxcbh8JaOawfhzaocbakz:wjjjbghakfh5aqaiam9Ramaqfai6Egscsfgocl4cifcd4hCaoc9WGg8LThPindndndndndndndndndndnaDTmbara8Jcd4fRbbgLciGPlbedlbkasTmdaxa8Jfhoarc;abfa8JfRbbhLarc;qofhwashXinawaoRbbg8AaL9RgLcetaLcKtcK91cr4786bbawcefhwaoalfhoa8AhLaXcufgXmbxikkasTmia8JcitcwGhEarc;abfa8JceVfRbbcwtarc;abfa8Jc9:GgofRbbVhLaxaofhoarc;qofhwashXinawao8Vbbg8AaL9RgLcetaLcztcz91cs47cFFiGaE486bbawcefhwaoalfhoa8AhLaXcufgXmbxdkkaHa8Jc98GgEfhoazaEfh8Aarc;abfaEfRbbhXcwhwinaoRbbawtaXVhXaocefhoawcwfgwca9hmbkasTmbaLcl4hYa8JcitcKGh3axaEfhEcbhKinaERbbhLcwhoa8AhwinawRbbaotaLVhLawcefhwaocwfgoca9hmbkarc;qofaKfaLaX7aY93a3486bba8Aalfh8AaEalfhEaLhXaKcefgKas9hmbkkaDmbcbhoxlka8LTmbcbhodninarc;qofaofgwcwf8Pibaw8Pib:e9qTmeaoczfgoa8L9pmdxbkkdnavmbcehoxikcbhEaChKaChYinarc;qofaEfgocwf8Pibhyao8Pibh8PcdhLcbhwinaLaoawfRbbcb9hfhLawcefgwcz9hmbkclhXcbhwinaXaoawfRbbcd0fhXawcefgwcz9hmbkcwh8Acbhwina8AaoawfRbbcP0fh8Aawcefgwcz9hmbkaLaXaLaX6Egoa8Aaoa8A6Egoczaocz6EaYfhYaocucbaya8P:e9cb9sEgwaoaw6EaKfhKaEczfgEa8L9pmdxbkkaha8Jcd4fgoaoRbbcda8JcetcoGtV86bbxikdnaKas6mbaYas6mbaha8Jcd4fgoaoRbbcia8JcetcoGtV86bba8Ka59Ras6mra5arc;qofasz:vjjjbasfh5xikaKaY9phokaha8Jcd4fgwawRbbaoa8JcetcoGtV86bbka8Ka59RaC6mla5cbaCz:wjjjbgAaCfhYdndna8LmbaPhoxekdna8KaY9RcK9pmbaPhoxekaocdtc:q1jjbfcj1jjbaDEg5ydxggcetc;:FFFeGh8Fcuh3cuagtcu7cFeGhacbh8Marc;qofhLinarc;qofa8MfhQczhEdndndnagPDbeeeeeeedekcucbaQcwf8PibaQ8Pib:e9cb9sEhExekcbhoa8FhEinaEaaaLaofRbb9nfhEaocefgocz9hmbkkcih8Ecbh8Ainczhwdndndna5a8AcdtfydbgKPDbeeeeeeedekcucbaQcwf8PibaQ8Pib:e9cb9sEhwxekaKcetc;:FFFeGhwcuaKtcu7cFeGhXcbhoinawaXaLaofRbb9nfhwaocefgocz9hmbkkdndnawaE6mbaKa39hmeawaE9hmea5a8EcdtfydbcwSmeka8Ah8EawhEka8Acefg8Aci9hmbkaAa8Mco4fgoaoRbba8Ea8Mci4coGtV86bbdndndna5a8Ecdtfydbg3PDdbbbbbbbebkdncwa39Tg8ETmbcua3tcu7hwdndna3ceSmbcbh8NaLhQinaQhoa8Eh8AcbhXinaoRbbgEawcFeGgKaEaK6EaXa3tVhXaocefhoa8Acufg8AmbkaYaX86bbaQa8EfhQaYcefhYa8Na8Efg8Ncz6mbxdkkcbh8NaLhQinaQhoa8Eh8AcbhXinaoRbbgEawcFeGgKaEaK6EaXcetVhXaocefhoa8Acufg8AmbkaYaX:T9cFe:d9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:9ca188bbaQa8EfhQaYcefhYa8Na8Efg8Ncz6mbkkcbhoinaYaLaofRbbgX86bbaYaXawcFeG9pfhYaocefgocz9hmbxikkdna3ceSmbinaYcb86bbaYcefhYxbkkinaYcb86bbaYcefhYxbkkaYaQ8Pbb83bbaYcwfaQcwf8Pbb83bbaYczfhYka8Mczfg8Ma8L9pgomeaLczfhLa8KaY9RcK9pmbkkaoTmlaYh5aYTmlka8Jcefg8Jal9hmbkarc;abfaxascufal2falz:vjjjb8Aasamfhma5hoa5mbkcbhwxdkdna8Kao9RakalfgwcKcaaDEgLawaL0EgX9pmbcbhwxdkdnawaL9pmbaocbaXaw9Rgwz:wjjjbawfhokaoarc;adfalz:vjjjbalfhodnaDTmbaoaraez:vjjjbaefhokaoab9Rhwxekcbhwkarc;qwf8Kjjjjbawk5babaeadaialcdcbyd;C:kjjbz:bjjjbk9reduaecd4gdaefgicaaica0Eabcj;abae9Uc;WFbGcjdaeca0Egifcufai9Uae2aiadfaicl4cifcd4f2fcefkmbcbabBd;C:kjjbk:Ese5u8Jjjjjbc;ae9Rgl8Kjjjjbcbhvdnaici9UgocHfae0mbabcbyd;m:kjjbgrc;GeV86bbalc;abfcFecjez:wjjjb8AalcUfgw9cu83ibalc8WfgD9cu83ibalcyfgq9cu83ibalcafgk9cu83ibalcKfgx9cu83ibalczfgm9cu83ibal9cu83iwal9cu83ibabaefc9WfhPabcefgsaofhednaiTmbcmcsarcb9kgzEhHcbhOcbhAcbhCcbhXcbhQindnaeaP9nmbcbhvxikaQcufhvadaCcdtfgLydbhKaLcwfydbhYaLclfydbh8AcbhEdndndninalc;abfavcsGcitfgoydlh3dndndnaoydbgoaK9hmba3a8ASmekdnaoa8A9hmba3aY9hmbaEcefhExekaoaY9hmea3aK9hmeaEcdfhEkaEc870mdaXcufhvaLaEciGcx2goc;i1jjbfydbcdtfydbh3aLaoc;e1jjbfydbcdtfydbh8AaLaoc;a1jjbfydbcdtfydbhKcbhodnindnalavcsGcdtfydba39hmbaohYxdkcuhYavcufhvaocefgocz9hmbkkaOa3aOSgvaYce9iaYaH9oVgoGfhOdndndncbcsavEaYaoEgvcs9hmbarce9imba3a3aAa3cefaASgvEgAcefSmecmcsavEhvkasavaEcdtc;WeGV86bbavcs9hmea3aA9Rgvcetavc8F917hvinaeavcFb0crtavcFbGV86bbaecefheavcje6hoavcr4hvaoTmbka3hAxvkcPhvasaEcdtcPV86bba3hAkavTmiavaH9omicdhocehEaQhYxlkavcufhvaEclfgEc;ab9hmbkkdnaLceaYaOSceta8AaOSEcx2gvc;a1jjbfydbcdtfydbgKTaLavc;e1jjbfydbcdtfydbg8AceSGaLavc;i1jjbfydbcdtfydbg3cdSGaOcb9hGazGg5ce9hmbaw9cu83ibaD9cu83ibaq9cu83ibak9cu83ibax9cu83ibam9cu83ibal9cu83iwal9cu83ibcbhOkcbhEaXcufgvhodnindnalaocsGcdtfydba8A9hmbaEhYxdkcuhYaocufhoaEcefgEcz9hmbkkcbhodnindnalavcsGcdtfydba39hmbaohExdkcuhEavcufhvaocefgocz9hmbkkaOaKaOSg8EfhLdndnaYcm0mbaYcefhYxekcbcsa8AaLSgvEhYaLavfhLkdndnaEcm0mbaEcefhExekcbcsa3aLSgvEhEaLavfhLkc9:cua8EEh8FcbhvaEaYcltVgacFeGhodndndninavc:W1jjbfRbbaoSmeavcefgvcz9hmbxdkka5aKaO9havcm0VVmbasavc;WeV86bbxekasa8F86bbaeaa86bbaecefhekdna8EmbaKaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombkaKhAkdnaYcs9hmba8AaA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka8AhAkdnaEcs9hmba3aA9Rgvcetavc8F917hvinaeavcFb0gocrtavcFbGV86bbavcr4hvaecefheaombka3hAkalaXcdtfaKBdbaXcefcsGhvdndnaYPzbeeeeeeeeeeeeeebekalavcdtfa8ABdbaXcdfcsGhvkdndnaEPzbeeeeeeeeeeeeeebekalavcdtfa3BdbavcefcsGhvkcihoalc;abfaQcitfgEaKBdlaEa8ABdbaQcefcsGhYcdhEavhXaLhOxekcdhoalaXcdtfa3BdbcehEaXcefcsGhXaQhYkalc;abfaYcitfgva8ABdlava3Bdbalc;abfaQaEfcsGcitfgva3BdlavaKBdbascefhsaQaofcsGhQaCcifgCai6mbkkdnaeaP9nmbcbhvxekcbhvinaeavfavc:W1jjbfRbb86bbavcefgvcz9hmbkaeab9Ravfhvkalc;aef8KjjjjbavkZeeucbhddninadcefgdc8F0meceadtae6mbkkadcrfcFeGcr9Uci2cdfabci9U2cHfkmbcbabBd;m:kjjbk:Adewu8Jjjjjbcz9Rhlcbhvdnaicvfae0mbcbhvabcbRb;m:kjjbc;qeV86bbal9cb83iwabcefhoabaefc98fhrdnaiTmbcbhwcbhDindnaoar6mbcbskadaDcdtfydbgqalcwfawaqav9Rgvavc8F91gv7av9Rc507gwcdtfgkydb9Rgvc8E91c9:Gavcdt7awVhvinaoavcFb0gecrtavcFbGV86bbavcr4hvaocefhoaembkakaqBdbaqhvaDcefgDai9hmbkkdnaoar9nmbcbskaocbBbbaoab9RclfhvkavkBeeucbhddninadcefgdc8F0meceadtae6mbkkadcwfcFeGcr9Uab2cvfk:bvli99dui99ludnaeTmbcuadcetcuftcu7:Zhvdndncuaicuftcu7:ZgoJbbbZMgr:lJbbb9p9DTmbar:Ohwxekcjjjj94hwkcbhicbhDinalclfIdbgrJbbbbJbbjZalIdbgq:lar:lMalcwfIdbgk:lMgr:varJbbbb9BEgrNhxaqarNhrdndnakJbbbb9GTmbaxhqxekJbbjZar:l:tgqaq:maxJbbbb9GEhqJbbjZax:l:tgxax:marJbbbb9GEhrkdndnalcxfIdbgxJbbj:;axJbbj:;9GEgkJbbjZakJbbjZ9FEavNJbbbZJbbb:;axJbbbb9GEMgx:lJbbb9p9DTmbax:Ohmxekcjjjj94hmkdndnaqJbbj:;aqJbbj:;9GEgxJbbjZaxJbbjZ9FEaoNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:OhPxekcjjjj94hPkdndnarJbbj:;arJbbj:;9GEgqJbbjZaqJbbjZ9FEaoNJbbbZJbbb:;arJbbbb9GEMgr:lJbbb9p9DTmbar:Ohsxekcjjjj94hskdndnadcl9hmbabaifgzas86bbazcifam86bbazcdfaw86bbazcefaP86bbxekabaDfgzas87ebazcofam87ebazclfaw87ebazcdfaP87ebkalczfhlaiclfhiaDcwfhDaecufgembkkk;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;3viDue99eu8Jjjjjbcjd9Rgo8Kjjjjbadcd4hrdndndndnavcd9hmbadcl6meaohwarhDinawc:CuBdbawclfhwaDcufgDmbkaeTmiadcl6mdarcdthqalhkcbhxinaohwakhDarhminawawydbgPcbaDIdbgs:8cL4cFeGc:cufasJbbbb9BEgzaPaz9kEBdbaDclfhDawclfhwamcufgmmbkakaqfhkaxcefgxaeSmixbkkaeTmdxekaeTmekarcdthkavce9hhqadcl6hdcbhxindndndnaqmbadmdc:CuhDalhwarhminaDcbawIdbgs:8cL4cFeGc:cufasJbbbb9BEgPaDaP9kEhDawclfhwamcufgmmbxdkkc:CuhDdndnavPleddbdkadmdaohwalhmarhPinawcbamIdbgs:8cL4cFeGgzc;:bazc;:b0Ec:cufasJbbbb9BEBdbamclfhmawclfhwaPcufgPmbxdkkadmecbhwarhminaoawfcbalawfIdbgs:8cL4cFeGgPc8AaPc8A0Ec:cufasJbbbb9BEBdbawclfhwamcufgmmbkkadmbcbhwarhPinaDhmdnavceSmbaoawfydbhmkdndnalawfIdbgscjjj;8iamai9RcefgmcLt9R::NJbbbZJbbb:;asJbbbb9GEMgs:lJbbb9p9DTmbas:Ohzxekcjjjj94hzkabawfazcFFFrGamcKtVBdbawclfhwaPcufgPmbkkabakfhbalakfhlaxcefgxae9hmbkkaocjdf8Kjjjjbk;YqdXui998Jjjjjbc:qd9Rgv8Kjjjjbavc:Sefcbc;Kbz:wjjjb8AcbhodnadTmbcbhoaiTmbdndnabaeSmbaehrxekavcuadcdtgwadcFFFFi0Ecbyd;u:kjjbHjjjjbbgrBd:SeavceBd:mdaraeawz:vjjjb8Akavc:GefcwfcbBdbav9cb83i:Geavc:Gefaradaiavc:Sefz:ojjjbavyd:GehDadci9Ugqcbyd;u:kjjbHjjjjbbheavc:Sefavyd:mdgkcdtfaeBdbavakcefgwBd:mdaecbaqz:wjjjbhxavc:SefawcdtfcuaicdtaicFFFFi0Ecbyd;u:kjjbHjjjjbbgmBdbavakcdfgPBd:mdalc;ebfhsaDheamhwinawalIdbasaeydbgzcwazcw6EcdtfIdbMUdbaeclfheawclfhwaicufgimbkavc:SefaPcdtfcuaqcdtadcFFFF970Ecbyd;u:kjjbHjjjjbbgPBdbdnadci6mbarheaPhwaqhiinawamaeydbcdtfIdbamaeclfydbcdtfIdbMamaecwfydbcdtfIdbMUdbaecxfheawclfhwaicufgimbkkakcifhoalc;ebfhHavc;qbfhOavheavyd:KehAavyd:OehCcbhzcbhwcbhXcehQinaehLcihkarawci2gKcdtfgeydbhsaeclfydbhdabaXcx2fgicwfaecwfydbgYBdbaiclfadBdbaiasBdbaxawfce86bbaOaYBdwaOadBdlaOasBdbaPawcdtfcbBdbdnazTmbcihkaLhiinaOakcdtfaiydbgeBdbakaeaY9haeas9haead9hGGfhkaiclfhiazcufgzmbkkaXcefhXcbhzinaCaAarazaKfcdtfydbcdtgifydbcdtfgYheaDaifgdydbgshidnasTmbdninaeydbawSmeaeclfheaicufgiTmdxbkkaeaYascdtfc98fydbBdbadadydbcufBdbkazcefgzci9hmbkdndnakTmbcuhwJbbbbh8Acbhdavyd:KehYavyd:OehKindndnaDaOadcdtfydbcdtgzfydbgembadcefhdxekadcs0hiamazfgsIdbhEasalcbadcefgdaiEcdtfIdbaHaecwaecw6EcdtfIdbMg3Udba3aE:th3aecdthiaKaYazfydbcdtfheinaPaeydbgzcdtfgsa3asIdbMgEUdbaEa8Aa8AaE9DgsEh8AazawasEhwaeclfheaic98fgimbkkadak9hmbkawcu9hmekaQaq9pmdindnaxaQfRbbmbaQhwxdkaqaQcefgQ9hmbxikkakczakcz6EhzaOheaLhOawcu9hmbkkaocdtavc:Seffc98fhedninaoTmeaeydbcbyd;q:kjjbH:bjjjbbaec98fheaocufhoxbkkavc:qdf8Kjjjjbk;IlevucuaicdtgvaicFFFFi0Egocbyd;u:kjjbHjjjjbbhralalyd9GgwcdtfarBdbalawcefBd9GabarBdbaocbyd;u:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdlcuadcdtadcFFFFi0Ecbyd;u:kjjbHjjjjbbhralalyd9GgocdtfarBdbalaocefBd9GabarBdwabydbcbavz:wjjjb8Aadci9UhDdnadTmbabydbhoaehladhrinaoalydbcdtfgvavydbcefBdbalclfhlarcufgrmbkkdnaiTmbabydbhlabydlhrcbhvaihoinaravBdbarclfhralydbavfhvalclfhlaocufgombkkdnadci6mbabydlhrabydwhvcbhlinaecwfydbhoaeclfydbhdaraeydbcdtfgwawydbgwcefBdbavawcdtfalBdbaradcdtfgdadydbgdcefBdbavadcdtfalBdbaraocdtfgoaoydbgocefBdbavaocdtfalBdbaecxfheaDalcefgl9hmbkkdnaiTmbabydlheabydbhlinaeaeydbalydb9RBdbalclfhlaeclfheaicufgimbkkkQbabaeadaic;K1jjbz:njjjbkQbabaeadaic;m:jjjbz:njjjbk9DeeuabcFeaicdtz:wjjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk:Vvioud9:du8Jjjjjbc;Wa9Rgl8Kjjjjbcbhvalcxfcbc;Kbz:wjjjb8AalcuadcitgoadcFFFFe0Ecbyd;u:kjjbHjjjjbbgrBdxalceBd2araeadaicez:tjjjbalcuaoadcjjjjoGEcbyd;u:kjjbHjjjjbbgwBdzadcdthednadTmbabhiinaiavBdbaiclfhiadavcefgv9hmbkkawaefhDalabBdwalawBdl9cbhqindnadTmbaq9cq9:hkarhvaDhiadheinaiav8Pibak1:NcFrG87ebavcwfhvaicdfhiaecufgembkkalclfaq:NceGcdtfydbhxalclfaq9ce98gq:NceGcdtfydbhmalc;Wbfcbcjaz:wjjjb8AaDhvadhidnadTmbinalc;Wbfav8VebcdtfgeaeydbcefBdbavcdfhvaicufgimbkkcbhvcbhiinalc;WbfavfgeydbhoaeaiBdbaoaifhiavclfgvcja9hmbkadhvdndnadTmbinalc;WbfaDamydbgicetf8VebcdtfgeaeydbgecefBdbaxaecdtfaiBdbamclfhmavcufgvmbkaq9cv9smdcbhvinabawydbcdtfavBdbawclfhwadavcefgv9hmbxdkkaq9cv9smekkclhvdninavc98Smealcxfavfydbcbyd;q:kjjbH:bjjjbbavc98fhvxbkkalc;Waf8Kjjjjbk:Jwliuo99iud9:cbhv8Jjjjjbca9Rgoczfcwfcbyd:8:kjjbBdbaocb8Pd:0:kjjb83izaocwfcbyd;i:kjjbBdbaocb8Pd;a:kjjb83ibaicd4hrdndnadmbJFFuFhwJFFuuhDJFFuuhqJFFuFhkJFFuuhxJFFuFhmxekarcdthPaehsincbhiinaoczfaifgzasaifIdbgwazIdbgDaDaw9EEUdbaoaifgzawazIdbgDaDaw9DEUdbaiclfgicx9hmbkasaPfhsavcefgvad9hmbkaoIdKhDaoIdwhwaoIdChqaoIdlhkaoIdzhxaoIdbhmkdnadTmbJbbbbJbFu9hJbbbbamax: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:kjjbgeabcifc98GfgbBd;y:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;y:kjjbgeabcrfc94GfgbBd;y:kjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd;y:kjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd;y:kjjbfgdBd;y:kjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk;Qddbcjwk;mdbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbbbbbbbbbbbbb4:h9w9N94:P:gW:j9O:ye9Pbbbbbbebbbdbbbebbbdbbbbbbbdbbbbbbbebbbbbbb: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;mqkzebbbebbbdbbb9G:vbb",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(o(e),{}).then(function(g){n=g.instance,n.exports.__wasm_call_ctors(),n.exports.meshopt_encodeVertexVersion(0),n.exports.meshopt_encodeIndexVersion(1)});function o(g){for(var m=new Uint8Array(g.length),_=0;_96?y-97:y>64?y-39:y+4}for(var C=0,_=0;_=3),c(n.exports.meshopt_spatialSortRemap,g,g.length/m,m*4)},encodeVertexBuffer:function(g,m,_){r(_>0&&_<=256),r(_%4==0);var y=n.exports.meshopt_encodeVertexBufferBound(m,_);return u(n.exports.meshopt_encodeVertexBuffer,y,g,m,_)},encodeIndexBuffer:function(g,m,_){r(_==2||_==4),r(m%3==0);var y=h(g,_),C=n.exports.meshopt_encodeIndexBufferBound(m,f(y)+1);return u(n.exports.meshopt_encodeIndexBuffer,C,y,m,4)},encodeIndexSequence:function(g,m,_){r(_==2||_==4);var y=h(g,_),C=n.exports.meshopt_encodeIndexSequenceBound(m,f(y)+1);return u(n.exports.meshopt_encodeIndexSequence,C,y,m,4)},encodeGltfBuffer:function(g,m,_,y){var C={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(C[y]),C[y](g,m,_)},encodeFilterOct:function(g,m,_,y){return r(_==4||_==8),r(y>=1&&y<=16),p(n.exports.meshopt_encodeFilterOct,g,m,_,y,16)},encodeFilterQuat:function(g,m,_,y){return r(_==8),r(y>=4&&y<=16),p(n.exports.meshopt_encodeFilterQuat,g,m,_,y,16)},encodeFilterExp:function(g,m,_,y,C){r(_>0&&_%4==0),r(y>=1&&y<=24);var E={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return p(n.exports.meshopt_encodeFilterExp,g,m,_,y,_,C?E[C]:1)}}}();typeof XR=="object"&&typeof vW=="object"?vW.exports=oz:typeof define=="function"&&define.amd?define([],function(){return oz}):typeof XR=="object"?XR.MeshoptEncoder=oz:(typeof self<"u"?self:XR).MeshoptEncoder=oz});var Sae=ci((JR,PW)=>{var rz=function(){"use strict";var e="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:W:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:S86qdbk;jYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz1jjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbhodnawTmbaxa8Acd4fRbbhokaocFeGh5cbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz1jjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:jjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q1jjbfcj1jjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bbarcwf9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfag9c8F1:NghcKtc8F91aicdfa8J9c8N1:Nfg8KRbbG86bbarcVfcba8KahcjeGcr4fghRbbag9cjjjjjl: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:dg8J9qE86bbarc95fag9c8F1:NgicKtc8F91aha8J9c8N1:NfghRbbG86bbarc96fcbahaicjeGcr4fgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbb83bbarcwfaicwf8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbcbaocl49Rh8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E93aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z1jjjb8AazazcjdfaAcufad2fadz1jjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:XseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9: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;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbyd:K1jjbgeabcifc98GfgbBd:K1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk81dbcjwk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:Kwkl8WNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;G9Mqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:183lYud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxavaialfgmar9Rgoad;8qbbcj;abad9Uc;WFbGcjdadca0EhPdndndnadTmbaoadfhscbhzinaeaz9nmdamax9RaD6miabazad2fhHaxaDfhOaPaeaz9RazaPfae6EgAcsfgocl4cifcd4hCavcj;cbfaoc9WGgXcetfhQavcj;cbfaXci2fhLavcj;cbfaXfhKcbhYaoc;ab6h8AincbhodnawTmbaxaYcd4fRbbhokaocFeGhEcbh3avcj;cbfh5indndndndnaEa3cet4ciGgoc9:fPdebdkamaO9RaX6mwavcj;cbfa3aX2faOaX;8qbbaOaAfhOxdkavcj;cbfa3aX2fcbaX;8kbxekamaO9RaC6moaoclVcbawEhraOaCfhocbhidna8Ambamao9Rc;Gb6mbcbhlina5alfhidndndndndndnaOalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiczfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaicafaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaoclffaqc:q:yjjbfRbbfhoxikaic8Wfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaocwffaqc:q:yjjbfRbbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitc:q1jjbfpbibaic:q:yjjbfRbbgipsaoRbegqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqc:q:yjjbfRbbfhokalc;abfhialcjefaX0meaihlamao9Rc;Fb0mbkkdnaiaX9pmbaici4hlinamao9RcK6mwa5aifhqdndndndndndnaOaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaoclffahc:q:yjjbfRbbfhoxikaqaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaocwffahc:q:yjjbfRbbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpkbbaaaocdffahc:q:yjjbfRbbfhokalcdfhlaiczfgiaX6mbkkaohOaoTmoka5aXfh5a3cefg3cl9hmbkdndndndnawTmbasaYcd4fRbbglciGPlbedwbkaXTmdavcjdfaYfhlavaYfpbdbhgcbhoinalavcj;cbfaofpblbg8JaKaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaQaofpblbg8MaLaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Ecep9Ta8Epxeeeeeeeeeeeeeeeeg8Fp9op9Hp9rg8Eagp9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8LaypmwDKYqk8AExm35Ps8E8Fg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Uggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp9Uggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp9Uggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9Abbbaladfglaga8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Ecep9Ta8Ea8Fp9op9Hp9rg8Ep9Ug8Fp9Abbbaladfgla8Fa8Ea8Epmlvorlvorlvorlvorp9Ug8Fp9Abbbaladfgla8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9Ug8Fp9Abbbaladfgla8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9Uggp9AbbbaladfhlaoczfgoaX6mbxikkaXTmeavcjdfaYfhlavaYfpbdbhgcbhoinalavcj;cbfaofpblbg8JaKaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaQaofpblbg8MaLaofpblbg8NpmbzeHdOiAlCvXoQrLgypmbezHdiOAlvCXorQLg8Ecep:nea8Epxebebebebebebebebg8Fp9op:bep9rg8Eagp:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8LaypmwDKYqk8AExm35Ps8E8Fg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeggp9Abbbaladfglaga8Ea8Epmlvorlvorlvorlvorp:oeggp9Abbbaladfglaga8Ea8EpmwDqkwDqkwDqkwDqkp:oeggp9Abbbaladfglaga8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9Abbbaladfglaga8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Ecep:nea8Ea8Fp9op:bep9rg8Ep:oeg8Fp9Abbbaladfgla8Fa8Ea8Epmlvorlvorlvorlvorp:oeg8Fp9Abbbaladfgla8Fa8Ea8EpmwDqkwDqkwDqkwDqkp:oeg8Fp9Abbbaladfgla8Fa8Ea8EpmxmPsxmPsxmPsxmPsp:oeggp9AbbbaladfhlaoczfgoaX6mbxdkkaXTmbcbhocbalcl4gl9Rc8FGhiavcjdfaYfhravaYfpbdbh8Finaravcj;cbfaofpblbggaKaofpblbg8JpmbzeHdOiAlCvXoQrLg8KaQaofpblbg8LaLaofpblbg8MpmbzeHdOiAlCvXoQrLg8NpmbezHdiOAlvCXorQLg8Eaip:Rea8Ealp:Sep9qg8Ea8Fp9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Fa8Ka8NpmwDKYqk8AExm35Ps8E8Fg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Faga8JpmwKDYq8AkEx3m5P8Es8Fgga8La8MpmwKDYq8AkEx3m5P8Es8Fg8JpmbezHdiOAlvCXorQLg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9Abbbaradfgra8Faga8JpmwDKYqk8AExm35Ps8E8Fg8Eaip:Rea8Ealp:Sep9qg8Ep9rg8Fp9Abbbaradfgra8Fa8Ea8Epmlvorlvorlvorlvorp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmwDqkwDqkwDqkwDqkp9rg8Fp9Abbbaradfgra8Fa8Ea8EpmxmPsxmPsxmPsxmPsp9rg8Fp9AbbbaradfhraoczfgoaX6mbkkaYclfgYad6mbkaHavcjdfaAad2;8qbbavavcjdfaAcufad2fad;8qbbaAazfhzc9:hoaOhxaOmbxlkkaeTmbaDalfhrcbhocuhlinaralaD9RglfaD6mdaPaeao9RaoaPfae6Eaofgoae6mbkaial9Rhxkcbc99amax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaokwbz:bjjjbk:TseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:SPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;7eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiczfpxbbbbbbbbbbbbbbbbgopklbaiaopklbaiabalcitfgdaeciGglcitgv;8qbbdnalTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;7eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkadaiav;8qbbkk:oDllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiczfpxbbbbbbbbbbbbbbbbgkpklbaiakpklbaiabalcitfgoaeciGgvcitgw;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkaoaiaw;8qbbkk;uddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaic8WfpxbbbbbbbbbbbbbbbbgopklbaicafaopklbaiczfaopklbaiaopklbaiabavcdtfgdalciGgecdtgv;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkadaiav;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",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 o=WebAssembly.validate(n)?a(t):a(e),r,s=WebAssembly.instantiate(o,{}).then(function(C){r=C.instance,r.exports.__wasm_call_ctors()});function a(C){for(var E=new Uint8Array(C.length),I=0;I96?b-97:b>64?b-39:b+4}for(var S=0,I=0;I0?_(C,E,I,f[b],u[S]):s.then(function(){var B=new Uint8Array(C*E);return c(r,r.exports[f[b]],B,C,E,I,r.exports[u[S]]),B})}}}();typeof JR=="object"&&typeof PW=="object"?PW.exports=rz:typeof define=="function"&&define.amd?define([],function(){return rz}):typeof JR=="object"?JR.MeshoptDecoder=rz:(typeof self<"u"?self:JR).MeshoptDecoder=rz});var wae=ci((ZR,RW)=>{var sz=function(){"use strict";var e="b9H79Tebbbetm9Geueu9Geub9Gbb9Gsuuuuuuuuuuuu99uueu9Gvuuuuub9Gruuuuuuub9Gvuuuuue999Gvuuuuueu9Gquuuuuuu99uueu9Gwuuuuuu99ueu9Giuuue999Gluuuueu9GiuuueuiOHdilvorlwiDqkbxxbelve9Weiiviebeoweuec:G:Pdkr:Tewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bbz9TW79O9V9Wt9F79P9T9W29P9M95br8E9TW79O9V9Wt9F79P9T9W29P9M959x9Pt9OcttV9P9I91tW7bwQ9TW79O9V9Wt9F79P9T9W29P9M959q9V9P9Ut7bDX9TW79O9V9Wt9F79P9T9W29P9M959t9J9H2Wbqa9TW79O9V9Wt9F9V9Wt9P9T9P96W9wWVtW94SWt9J9O9sW9T9H9Wbkl79IV9RbxDwebcekdzsq;B:xeHdbkM9Hi8Au8A99Au8Jjjjjbc;W;qb9Rgs8Kjjjjbcbhzascxfcbc;Kbz:ojjjb8AdnabaeSmbabaeadcdtz:njjjb8AkdndnamcdGmbascxfhHcbhOxekasalcrfci4gecbyd:m:jjjbHjjjjbbgABdxasceBd2aAcbaez:ojjjbhCcbhlcbhednadTmbcbhlabheadhAinaCaeydbgXci4fgQaQRbbgQceaXcrGgXtV86bbaQcu7aX4ceGalfhlaeclfheaAcufgAmbkcualcdtalcFFFFi0EhekascCfhHasaecbyd:m:jjjbHjjjjbbgOBdzascdBd2alcd4alfhXcehAinaAgecethAaeaX6mbkcdhzcbhLascuaecdtgAaecFFFFi0Ecbyd:m:jjjbHjjjjbbgXBdCasciBd2aXcFeaAz:ojjjbhKdnadTmbaecufhYcbh8AindndnaKabaLcdtfgEydbgQc:v;t;h;Ev2aYGgXcdtfgCydbgAcuSmbceheinaOaAcdtfydbaQSmdaXaefhAaecefheaKaAaYGgXcdtfgCydbgAcu9hmbkkaOa8AcdtfaQBdbaCa8ABdba8AhAa8Acefh8AkaEaABdbaLcefgLad9hmbkkaKcbyd1:jjjbH:bjjjbbascdBd2kcbh3aHcualcefgecdtaecFFFFi0Ecbyd:m:jjjbHjjjjbbg5Bdbasa5BdlasazceVgeBd2ascxfaecdtfcuadcitadcFFFFe0Ecbyd:m:jjjbHjjjjbbg8EBdbasa8EBdwasazcdfgeBd2asclfabadalcbz:cjjjbascxfaecdtfcualcdtgealcFFFFi0Eg8Fcbyd:m:jjjbHjjjjbbgABdbasazcifgXBd2ascxfaXcdtfa8Fcbyd:m:jjjbHjjjjbbgaBdbasazclVBd2aAaaaialavaOascxfz:djjjbalcbyd:m:jjjbHjjjjbbhCascxfasyd2ghcdtfaCBdbasahcefgXBd2ascxfaXcdtfa8Fcbyd:m:jjjbHjjjjbbgXBdbasahcdfgQBd2ascxfaQcdtfa8Fcbyd:m:jjjbHjjjjbbgQBdbasahcifggBd2aXcFeaez:ojjjbh8JaQcFeaez:ojjjbh8KdnalTmba8Ecwfh8Lindna5a3gQcefg3cdtfydbgKa5aQcdtgefydbgXSmbaKaX9Rhza8EaXcitfhHa8Kaefh8Ma8JaefhEcbhYindndnaHaYcitfydbg8AaQ9hmbaEaQBdba8MaQBdbxekdna5a8Acdtg8NfgeclfydbgXaeydbgeSmba8EaecitgKfydbaQSmeaXae9Rhyaecu7aXfhLa8LaKfhXcbheinaLaeSmeaecefheaXydbhKaXcwfhXaKaQ9hmbkaeay6meka8Ka8NfgeaQa8AaeydbcuSEBdbaEa8AaQaEydbcuSEBdbkaYcefgYaz9hmbkka3al9hmbkaAhXaahQa8KhKa8JhYcbheindndnaeaXydbg8A9hmbdnaeaQydbg8A9hmbaYydbh8AdnaKydbgLcu9hmba8Acu9hmbaCaefcb86bbxikaCaefhEdnaeaLSmbaea8ASmbaEce86bbxikaEcl86bbxdkdnaeaaa8AcdtgLfydb9hmbdnaKydbgEcuSmbaeaESmbaYydbgzcuSmbaeazSmba8KaLfydbgHcuSmbaHa8ASmba8JaLfydbgLcuSmbaLa8ASmbdnaAaEcdtfydbg8AaAaLcdtfydb9hmba8AaAazcdtfydbgLSmbaLaAaHcdtfydb9hmbaCaefcd86bbxlkaCaefcl86bbxikaCaefcl86bbxdkaCaefcl86bbxekaCaefaCa8AfRbb86bbkaXclfhXaQclfhQaKclfhKaYclfhYalaecefge9hmbkdnaqTmbdndnaOTmbaOheaAhXalhQindnaqaeydbfRbbTmbaCaXydbfcl86bbkaeclfheaXclfhXaQcufgQmbxdkkaAhealhXindnaqRbbTmbaCaeydbfcl86bbkaqcefhqaeclfheaXcufgXmbkkaAhealhQaChXindnaCaeydbfRbbcl9hmbaXcl86bbkaeclfheaXcefhXaQcufgQmbkkamceGTmbaChealhXindnaeRbbce9hmbaecl86bbkaecefheaXcufgXmbkkascxfagcdtfcualcx2alc;v:Q;v:Qe0Ecbyd:m:jjjbHjjjjbbg3BdbasahclfgHBd2a3aialavaOz:ejjjbh8PdndnaDmbcbhgcbh8Lxekcbh8LawhecbhXindnaeIdbJbbbb9ETmbasc;Wbfa8LcdtfaXBdba8Lcefh8LkaeclfheaDaXcefgX9hmbkascxfaHcdtfcua8Lal2gecdtaecFFFFi0Ecbyd:m:jjjbHjjjjbbggBdbasahcvfgHBd2alTmba8LTmbarcd4hEdnaOTmba8Lcdthzcbh8AaghLinaoaOa8AcdtfydbaE2cdtfhYasc;WbfheaLhXa8LhQinaXaYaeydbcdtgKfIdbawaKfIdbNUdbaeclfheaXclfhXaQcufgQmbkaLazfhLa8Acefg8Aal9hmbxdkka8Lcdthzcbh8AaghLinaoa8AaE2cdtfhYasc;WbfheaLhXa8LhQinaXaYaeydbcdtgKfIdbawaKfIdbNUdbaeclfheaXclfhXaQcufgQmbkaLazfhLa8Acefg8Aal9hmbkkascxfaHcdtfcualc8S2gealc;D;O;f8U0EgQcbyd:m:jjjbHjjjjbbgXBdbasaHcefgKBd2aXcbaez:ojjjbhqdndndna8LTmbascxfaKcdtfaQcbyd:m:jjjbHjjjjbbgvBdbasaHcdfgXBd2avcbaez:ojjjb8AascxfaXcdtfcua8Lal2gecltgXaecFFFFb0Ecbyd:m:jjjbHjjjjbbgiBdbasaHcifBd2aicbaXz:ojjjb8AadmexdkcbhvcbhiadTmekcbhYabhXindna3aXclfydbg8Acx2fgeIdba3aXydbgLcx2fgQIdbgI:tg8Ra3aXcwfydbgEcx2fgKIdlaQIdlg8S:tgRNaKIdbaI:tg8UaeIdla8S:tg8VN:tg8Wa8WNa8VaKIdwaQIdwg8X:tg8YNaRaeIdwa8X:tg8VN:tgRaRNa8Va8UNa8Ya8RN:tg8Ra8RNMM:rg8UJbbbb9ETmba8Wa8U:vh8Wa8Ra8U:vh8RaRa8U:vhRkaqaAaLcdtfydbc8S2fgeaRa8U:rg8UaRNNg8VaeIdbMUdbaea8Ra8Ua8RNg8ZNg8YaeIdlMUdlaea8Wa8Ua8WNg80Ng81aeIdwMUdwaea8ZaRNg8ZaeIdxMUdxaea80aRNgBaeIdzMUdzaea80a8RNg80aeIdCMUdCaeaRa8Ua8Wa8XNaRaINa8Sa8RNMM:mg8SNgINgRaeIdKMUdKaea8RaINg8RaeId3MUd3aea8WaINg8WaeIdaMUdaaeaIa8SNgIaeId8KMUd8Kaea8UaeIdyMUdyaqaAa8Acdtfydbc8S2fgea8VaeIdbMUdbaea8YaeIdlMUdlaea81aeIdwMUdwaea8ZaeIdxMUdxaeaBaeIdzMUdzaea80aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdyaqaAaEcdtfydbc8S2fgea8VaeIdbMUdbaea8YaeIdlMUdlaea81aeIdwMUdwaea8ZaeIdxMUdxaeaBaeIdzMUdzaea80aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdyaXcxfhXaYcifgYad6mbkcbhzabhLinabazcdtfh8AcbhXinaCa8AaXc;a1jjbfydbcdtfydbgQfRbbhedndnaCaLaXfydbgKfRbbgYc99fcFeGcpe0mbaec99fcFeGc;:e6mekdnaYcufcFeGce0mba8JaKcdtfydbaQ9hmekdnaecufcFeGce0mba8KaQcdtfydbaK9hmekdnaYcv2aefc:G1jjbfRbbTmbaAaQcdtfydbaAaKcdtfydb0mekJbbacJbbacJbbjZaecFeGceSEaYceSEh80dna3a8AaXc;e1jjbfydbcdtfydbcx2fgeIdwa3aKcx2fgYIdwg8S:tg8Wa3aQcx2fgEIdwa8S:tgRaRNaEIdbaYIdbg8X:tg8Ra8RNaEIdlaYIdlg8V:tg8Ua8UNMMgINa8WaRNaeIdba8X:tg81a8RNa8UaeIdla8V:tg8ZNMMg8YaRN:tg8Wa8WNa81aINa8Ya8RN:tgRaRNa8ZaINa8Ya8UN:tg8Ra8RNMM:rg8UJbbbb9ETmba8Wa8U:vh8Wa8Ra8U:vh8RaRa8U:vhRkaqaAaKcdtfydbc8S2fgeaRa80aI:rNg8UaRNNg8YaeIdbMUdbaea8Ra8Ua8RNg80Ng81aeIdlMUdlaea8Wa8Ua8WNgINg8ZaeIdwMUdwaea80aRNg80aeIdxMUdxaeaIaRNgBaeIdzMUdzaeaIa8RNg83aeIdCMUdCaeaRa8Ua8Wa8SNaRa8XNa8Va8RNMM:mg8SNgINgRaeIdKMUdKaea8RaINg8RaeId3MUd3aea8WaINg8WaeIdaMUdaaeaIa8SNgIaeId8KMUd8Kaea8UaeIdyMUdyaqaAaQcdtfydbc8S2fgea8YaeIdbMUdbaea81aeIdlMUdlaea8ZaeIdwMUdwaea80aeIdxMUdxaeaBaeIdzMUdzaea83aeIdCMUdCaeaRaeIdKMUdKaea8RaeId3MUd3aea8WaeIdaMUdaaeaIaeId8KMUd8Kaea8UaeIdyMUdykaXclfgXcx9hmbkaLcxfhLazcifgzad6mbka8LTmbcbhLinJbbbbh8Xa3abaLcdtfgeclfydbgEcx2fgXIdwa3aeydbgzcx2fgQIdwg8Z:tg8Ra8RNaXIdbaQIdbgB:tg8Wa8WNaXIdlaQIdlg83:tg8Ua8UNMMg80a3aecwfydbgHcx2fgeIdwa8Z:tgINa8Ra8RaINa8WaeIdbaB:tg8SNa8UaeIdla83:tg8VNMMgRN:tJbbbbJbbjZa80aIaINa8Sa8SNa8Va8VNMMg81NaRaRN:tg8Y:va8YJbbbb9BEg8YNhUa81a8RNaIaRN:ta8YNh85a80a8VNa8UaRN:ta8YNh86a81a8UNa8VaRN:ta8YNh87a80a8SNa8WaRN:ta8YNh88a81a8WNa8SaRN:ta8YNh89a8Wa8VNa8Sa8UN:tgRaRNa8UaINa8Va8RN:tgRaRNa8Ra8SNaIa8WN:tgRaRNMM:rJbbbZNhRagaza8L2gwcdtfhXagaHa8L2g8NcdtfhQagaEa8L2g5cdtfhKa8Z:mh8:a83:mhZaB:mhncbhYa8Lh8AJbbbbh8VJbbbbh8YJbbbbh80Jbbbbh81Jbbbbh8ZJbbbbhBJbbbbh83JbbbbhcJbbbbh9cinasc;WbfaYfgecwfaRa85aKIdbaXIdbgI:tg8UNaUaQIdbaI:tg8SNMg8RNUdbaeclfaRa87a8UNa86a8SNMg8WNUdbaeaRa89a8UNa88a8SNMg8UNUdbaecxfaRa8:a8RNaZa8WNaIana8UNMMMgINUdbaRa8Ra8WNNa81Mh81aRa8Ra8UNNa8ZMh8ZaRa8Wa8UNNaBMhBaRaIaINNa8XMh8XaRa8RaINNa8VMh8VaRa8WaINNa8YMh8YaRa8UaINNa80Mh80aRa8Ra8RNNa83Mh83aRa8Wa8WNNacMhcaRa8Ua8UNNa9cMh9caXclfhXaKclfhKaQclfhQaYczfhYa8Acufg8Ambkavazc8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyavaEc8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyavaHc8S2fgea9caeIdbMUdbaeacaeIdlMUdlaea83aeIdwMUdwaeaBaeIdxMUdxaea8ZaeIdzMUdzaea81aeIdCMUdCaea80aeIdKMUdKaea8YaeId3MUd3aea8VaeIdaMUdaaea8XaeId8KMUd8KaeaRaeIdyMUdyaiawcltfh8AcbhXa8LhKina8AaXfgeasc;WbfaXfgQIdbaeIdbMUdbaeclfgYaQclfIdbaYIdbMUdbaecwfgYaQcwfIdbaYIdbMUdbaecxfgeaQcxfIdbaeIdbMUdbaXczfhXaKcufgKmbkaia5cltfh8AcbhXa8LhKina8AaXfgeasc;WbfaXfgQIdbaeIdbMUdbaeclfgYaQclfIdbaYIdbMUdbaecwfgYaQcwfIdbaYIdbMUdbaecxfgeaQcxfIdbaeIdbMUdbaXczfhXaKcufgKmbkaia8Ncltfh8AcbhXa8LhKina8AaXfgeasc;WbfaXfgQIdbaeIdbMUdbaeclfgYaQclfIdbaYIdbMUdbaecwfgYaQcwfIdbaYIdbMUdbaecxfgeaQcxfIdbaeIdbMUdbaXczfhXaKcufgKmbkaLcifgLad6mbkkcbhQdndnamcwGgJmbJbbbbh8Vcbh9ecbhocbhhxekcbh9ea8Fcbyd:m:jjjbHjjjjbbhhascxfasyd2gecdtfahBdbasaecefgXBd2ascxfaXcdtfcuahalabadaAz:fjjjbgKcltaKcjjjjiGEcbyd:m:jjjbHjjjjbbgoBdbasaecdfBd2aoaKaha3alz:gjjjbJFFuuh8VaKTmbaoheaKhXinaeIdbgRa8Va8VaR9EEh8VaeclfheaXcufgXmbkaKh9ekasydlhTdnalTmbaTclfheaTydbhKaChXalhYcbhQincbaeydbg8AaK9RaXRbbcpeGEaQfhQaXcefhXaeclfhea8AhKaYcufgYmbkaQce4hQkcuadaQ9RcifgScx2aSc;v:Q;v:Qe0Ecbyd:m:jjjbHjjjjbbhDascxfasyd2g9hcdtfaDBdbasa9hcefgeBd2ascxfaecdtfcuaScdtaScFFFFi0Ecbyd:m:jjjbHjjjjbbgrBdbasa9hcdfgeBd2ascxfaecdtfa8Fcbyd:m:jjjbHjjjjbbgyBdbasa9hcifgeBd2ascxfaecdtfalcbyd:m:jjjbHjjjjbbg9iBdbasa9hclfg6Bd2axaxNa8PJbbjZamclGEgUaUN:vh9cJbbbbhcdnadak9nmbdnaSci6mba8Lclth9kaDcwfh0Jbbbbh83JbbbbhcinasclfabadalaAz:cjjjbabhzcbh8Ecbh8Finaba8FcdtfhHcbheindnaAazaefydbgQcdtgEfydbgYaAaHaec;q1jjbfydbcdtfydbgXcdtgwfydbg8ASmbaCaXfRbbgLcv2aCaQfRbbgKfc;G1jjbfRbbg5aKcv2aLfg8Nc;G1jjbfRbbg8MVcFeGTmbdna8AaY9nmba8Nc:G1jjbfRbbcFeGmekaKcufhYdnaKaL9hmbaYcFeGce0mba8JaEfydbaX9hmekdndnaKclSmbaLcl9hmekdnaYcFeGce0mba8JaEfydbaX9hmdkaLcufcFeGce0mba8KawfydbaQ9hmekaDa8Ecx2fgKaXaQa8McFeGgYEBdlaKaQaXaYEBdbaKaYa5Gcb9hBdwa8Ecefh8Ekaeclfgecx9hmbkdna8Fcifg8Fad9pmbazcxfhza8EcifaS9nmekka8ETmdcbhLinaqaAaDaLcx2fgKydbgYcdtgzfydbc8S2fgeIdwa3aKydlg8Acx2fgXIdwg8WNaeIdzaXIdbg8UNaeIdaMgRaRMMa8WNaeIdlaXIdlgINaeIdCa8WNaeId3MgRaRMMaINaeIdba8UNaeIdxaINaeIdKMgRaRMMa8UNaeId8KMMM:lhRJbbbbJbbjZaeIdyg8R:va8RJbbbb9BEh8RdndnaKydwgEmbJFFuuh8YxekJbbbbJbbjZaqaAa8Acdtfydbc8S2fgeIdyg8S:va8SJbbbb9BEaeIdwa3aYcx2fgXIdwg8SNaeIdzaXIdbg8XNaeIdaMg8Ya8YMMa8SNaeIdlaXIdlg8YNaeIdCa8SNaeId3Mg8Sa8SMMa8YNaeIdba8XNaeIdxa8YNaeIdKMg8Sa8SMMa8XNaeId8KMMM:lNh8Yka8RaRNh80dna8LTmbavaYc8S2fgQIdwa8WNaQIdza8UNaQIdaMgRaRMMa8WNaQIdlaINaQIdCa8WNaQId3MgRaRMMaINaQIdba8UNaQIdxaINaQIdKMgRaRMMa8UNaQId8KMMMhRaga8Aa8L2gHcdtfhXaiaYa8L2gwcltfheaQIdyh8Sa8LhQinaXIdbg8Ra8Ra8SNaecxfIdba8WaecwfIdbNa8UaeIdbNaIaeclfIdbNMMMg8Ra8RM:tNaRMhRaXclfhXaeczfheaQcufgQmbkdndnaEmbJbbbbh8Rxekava8Ac8S2fgQIdwa3aYcx2fgeIdwg8UNaQIdzaeIdbgINaQIdaMg8Ra8RMMa8UNaQIdlaeIdlg8SNaQIdCa8UNaQId3Mg8Ra8RMMa8SNaQIdbaINaQIdxa8SNaQIdKMg8Ra8RMMaINaQId8KMMMh8RagawcdtfhXaiaHcltfheaQIdyh8Xa8LhQinaXIdbg8Wa8Wa8XNaecxfIdba8UaecwfIdbNaIaeIdbNa8SaeclfIdbNMMMg8Wa8WM:tNa8RMh8RaXclfhXaeczfheaQcufgQmbka8R:lh8Rka80aR:lMh80a8Ya8RMh8YaCaYfRbbcd9hmbdna8Ka8Ja8Jazfydba8ASEaaazfydbgHcdtfydbgzcu9hmbaaa8AcdtfydbhzkavaHc8S2fgQIdwa3azcx2fgeIdwg8WNaQIdzaeIdbg8UNaQIdaMgRaRMMa8WNaQIdlaeIdlgINaQIdCa8WNaQId3MgRaRMMaINaQIdba8UNaQIdxaINaQIdKMgRaRMMa8UNaQId8KMMMhRagaza8L2gwcdtfhXaiaHa8L2g8NcltfheaQIdyh8Sa8LhQinaXIdbg8Ra8Ra8SNaecxfIdba8WaecwfIdbNa8UaeIdbNaIaeclfIdbNMMMg8Ra8RM:tNaRMhRaXclfhXaeczfheaQcufgQmbkdndnaEmbJbbbbh8Rxekavazc8S2fgQIdwa3aHcx2fgeIdwg8UNaQIdzaeIdbgINaQIdaMg8Ra8RMMa8UNaQIdlaeIdlg8SNaQIdCa8UNaQId3Mg8Ra8RMMa8SNaQIdbaINaQIdxa8SNaQIdKMg8Ra8RMMaINaQId8KMMMh8Raga8NcdtfhXaiawcltfheaQIdyh8Xa8LhQinaXIdbg8Wa8Wa8XNaecxfIdba8UaecwfIdbNaIaeIdbNa8SaeclfIdbNMMMg8Wa8WM:tNa8RMh8RaXclfhXaeczfheaQcufgQmbka8R:lh8Rka80aR:lMh80a8Ya8RMh8YkaKa80a8Ya80a8Y9FgeEUdwaKa8AaYaeaETVgeEBdlaKaYa8AaeEBdbaLcefgLa8E9hmbkasc;Wbfcbcj;qbz:ojjjb8Aa0hea8EhXinasc;WbfaeydbcA4cF8FGgQcFAaQcFA6EcdtfgQaQydbcefBdbaecxfheaXcufgXmbkcbhecbhXinasc;WbfaefgQydbhKaQaXBdbaKaXfhXaeclfgecj;qb9hmbkcbhea0hXinasc;WbfaXydbcA4cF8FGgQcFAaQcFA6EcdtfgQaQydbgQcefBdbaraQcdtfaeBdbaXcxfhXa8Eaecefge9hmbkadak9RgQci9Uh9mdnalTmbcbheayhXinaXaeBdbaXclfhXalaecefge9hmbkkcbh9na9icbalz:ojjjbh8FaQcO9Uh9oa9mce4h9pasydwh9qcbh8Mcbh5dninaDara5cdtfydbcx2fg8NIdwgRa9c9Emea8Ma9m9pmeJFFuuh8Rdna9pa8E9pmbaDara9pcdtfydbcx2fIdwJbb;aZNh8RkdnaRa8R9ETmbaRac9ETmba8Ma9o0mdkdna8FaAa8NydlgHcdtg9rfydbgKfg9sRbba8FaAa8Nydbgzcdtg9tfydbgefg9uRbbVmbaCazfRbbh9vdnaTaecdtfgXclfydbgQaXydbgXSmbaQaX9RhYa3aKcx2fhLa3aecx2fhEa9qaXcitfhecbhXcehwdnindnayaeydbcdtfydbgQaKSmbayaeclfydbcdtfydbg8AaKSmbaQa8ASmba3a8Acx2fg8AIdba3aQcx2fgQIdbg8W:tgRaEIdlaQIdlg8U:tg8XNaEIdba8W:tg8Ya8AIdla8U:tg8RN:tgIaRaLIdla8U:tg80NaLIdba8W:tg81a8RN:tg8UNa8RaEIdwaQIdwg8S:tg8ZNa8Xa8AIdwa8S:tg8WN:tg8Xa8RaLIdwa8S:tgBNa80a8WN:tg8RNa8Wa8YNa8ZaRN:tg8Sa8Wa81NaBaRN:tgRNMMaIaINa8Xa8XNa8Sa8SNMMa8Ua8UNa8Ra8RNaRaRNMMN:rJbbj8:N9FmdkaecwfheaXcefgXaY6hwaYaX9hmbkkawceGTmba9pcefh9pxekdndndndna9vc9:fPdebdkazheinayaecdtgefaHBdbaaaefydbgeaz9hmbxikkdna8Ka8Ja8Ja9tfydbaHSEaaa9tfydbgzcdtfydbgecu9hmbaaa9rfydbhekaya9tfaHBdbaehHkayazcdtfaHBdbka9uce86bba9sce86bba8NIdwgRacacaR9DEhca9ncefh9ncecda9vceSEa8Mfh8Mka5cefg5a8E9hmbkka9nTmddnalTmbcbh8AcbhEindnayaEcdtgefydbgQaESmbaAaQcdtfydbhzdnaEaAaefydb9hgHmbaqazc8S2fgeaqaEc8S2fgXIdbaeIdbMUdbaeaXIdlaeIdlMUdlaeaXIdwaeIdwMUdwaeaXIdxaeIdxMUdxaeaXIdzaeIdzMUdzaeaXIdCaeIdCMUdCaeaXIdKaeIdKMUdKaeaXId3aeId3MUd3aeaXIdaaeIdaMUdaaeaXId8KaeId8KMUd8KaeaXIdyaeIdyMUdyka8LTmbavaQc8S2fgeavaEc8S2gwfgXIdbaeIdbMUdbaeaXIdlaeIdlMUdlaeaXIdwaeIdwMUdwaeaXIdxaeIdxMUdxaeaXIdzaeIdzMUdzaeaXIdCaeIdCMUdCaeaXIdKaeIdKMUdKaeaXId3aeId3MUd3aeaXIdaaeIdaMUdaaeaXId8KaeId8KMUd8KaeaXIdyaeIdyMUdya9kaQ2hLaihXa8LhKinaXaLfgeaXa8AfgQIdbaeIdbMUdbaeclfgYaQclfIdbaYIdbMUdbaecwfgYaQcwfIdbaYIdbMUdbaecxfgeaQcxfIdbaeIdbMUdbaXczfhXaKcufgKmbkaHmbJbbbbJbbjZaqawfgeIdygR:vaRJbbbb9BEaeIdwa3azcx2fgXIdwgRNaeIdzaXIdbg8RNaeIdaMg8Wa8WMMaRNaeIdlaXIdlg8WNaeIdCaRNaeId3MgRaRMMa8WNaeIdba8RNaeIdxa8WNaeIdKMgRaRMMa8RNaeId8KMMM:lNgRa83a83aR9DEh83ka8Aa9kfh8AaEcefgEal9hmbkcbhXa8JheindnaeydbgQcuSmbdnaXayaQcdtgKfydbgQ9hmbcuhQa8JaKfydbgKcuSmbayaKcdtfydbhQkaeaQBdbkaeclfhealaXcefgX9hmbkcbhXa8KheindnaeydbgQcuSmbdnaXayaQcdtgKfydbgQ9hmbcuhQa8KaKfydbgKcuSmbayaKcdtfydbhQkaeaQBdbkaeclfhealaXcefgX9hmbkka83aca8LEh83cbhKabhecbhYindnayaeydbcdtfydbgXayaeclfydbcdtfydbgQSmbaXayaecwfydbcdtfydbg8ASmbaQa8ASmbabaKcdtfgLaXBdbaLcwfa8ABdbaLclfaQBdbaKcifhKkaecxfheaYcifgYad6mbkdndnaJTmbaKak9nmba8Va839FTmbcbhdabhecbhXindnaoahaeydbgQcdtfydbcdtfIdba839ETmbabadcdtfgYaQBdbaYclfaeclfydbBdbaYcwfaecwfydbBdbadcifhdkaecxfheaXcifgXaK6mbkJFFuuh8Va9eTmeaohea9ehXJFFuuhRinaeIdbg8RaRaRa8R9EEg8WaRa8Ra839EgQEhRa8Wa8VaQEh8VaeclfheaXcufgXmbxdkkaKhdkadak0mbxdkkasclfabadalaAz:cjjjbkdndnadak0mbadhXxekdnaJmbadhXxekdna8Va9c9FmbadhXxekina8VJbb;aZNgRa9caRa9c9DEh8WJbbbbhRdna9eTmbaohea9ehAinaeIdbg8RaRa8Ra8W9FEaRa8RaR9EEhRaeclfheaAcufgAmbkkcbhXabhecbhAindnaoahaeydbgQcdtfydbcdtfIdba8W9ETmbabaXcdtfgKaQBdbaKclfaeclfydbBdbaKcwfaecwfydbBdbaXcifhXkaecxfheaAcifgAad6mbkJFFuuh8Vdna9eTmbaohea9ehAJFFuuh8RinaeIdbg8Ua8Ra8Ra8U9EEgIa8Ra8Ua8W9EgQEh8RaIa8VaQEh8VaeclfheaAcufgAmbkkdnaXad9hmbadhXxdkaRacacaR9DEhcaXak9nmeaXhda8Va9c9FmbkkdnamcjjjjlGTmbaOmbaXTmbcbh8AabheinaCaeydbgKfRbbc3thLaecwfgEydbhAdndna8JaKcdtgHfydbaeclfgzydbgQSmbcbhYa8KaQcdtfydbaK9hmekcjjjj94hYkaeaLaYVaKVBdbaCaQfRbbc3thLdndna8JaQcdtfydbaASmbcbhYa8KaAcdtfydbaQ9hmekcjjjj94hYkazaLaYVaQVBdbaCaAfRbbc3thYdndna8JaAcdtfydbaKSmbcbhQa8KaHfydbaA9hmekcjjjj94hQkaEaYaQVaAVBdbaecxfhea8Acifg8AaX6mbkkdnaOTmbaXTmbaXheinabaOabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaUac:rNUdbka9hcdtascxffcxfhednina6Tmeaeydbcbyd1:jjjbH:bjjjbbaec98fhea6cufh6xbkkasc;W;qbf8KjjjjbaXk;Yieouabydlhvabydbclfcbaicdtz:ojjjbhoadci9UhrdnadTmbdnalTmbaehwadhDinaoalawydbcdtfydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbxdkkaehwadhDinaoawydbcdtfgqaqydbcefBdbawclfhwaDcufgDmbkkdnaiTmbcbhDaohwinawydbhqawaDBdbawclfhwaqaDfhDaicufgimbkkdnadci6mbinaecwfydbhwaeclfydbhDaeydbhidnalTmbalawcdtfydbhwalaDcdtfydbhDalaicdtfydbhikavaoaicdtfgqydbcitfaDBdbavaqydbcitfawBdlaqaqydbcefBdbavaoaDcdtfgqydbcitfawBdbavaqydbcitfaiBdlaqaqydbcefBdbavaoawcdtfgwydbcitfaiBdbavawydbcitfaDBdlawawydbcefBdbaecxfhearcufgrmbkkabydbcbBdbk:todDue99aicd4aifhrcehwinawgDcethwaDar6mbkcuaDcdtgraDcFFFFi0Ecbyd:m:jjjbHjjjjbbhwaoaoyd9GgqcefBd9GaoaqcdtfawBdbawcFearz:ojjjbhkdnaiTmbalcd4hlaDcufhxcbhminamhDdnavTmbavamcdtfydbhDkcbadaDal2cdtfgDydlgwawcjjjj94SEgwcH4aw7c:F:b:DD2cbaDydbgwawcjjjj94SEgwcH4aw7c;D;O:B8J27cbaDydwgDaDcjjjj94SEgDcH4aD7c:3F;N8N27axGhwamcdthPdndndnavTmbakawcdtfgrydbgDcuSmeadavaPfydbal2cdtfgsIdbhzcehqinaqhrdnadavaDcdtfydbal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmlkarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbxdkkakawcdtfgrydbgDcuSmbadamal2cdtfgsIdbhzcehqinaqhrdnadaDal2cdtfgqIdbaz9CmbaqIdlasIdl9CmbaqIdwasIdw9BmikarcefhqakawarfaxGgwcdtfgrydbgDcu9hmbkkaramBdbamhDkabaPfaDBdbamcefgmai9hmbkkakcbyd1:jjjbH:bjjjbbaoaoyd9GcufBd9GdnaeTmbaiTmbcbhDaehwinawaDBdbawclfhwaiaDcefgD9hmbkcbhDaehwindnaDabydbgrSmbawaearcdtfgrydbBdbaraDBdbkawclfhwabclfhbaiaDcefgD9hmbkkk;Qodvuv998Jjjjjbca9Rgvczfcwfcbyd11jjbBdbavcb8Pdj1jjb83izavcwfcbydN1jjbBdbavcb8Pd:m1jjb83ibdnadTmbaicd4hodnabmbdnalTmbcbhrinaealarcdtfydbao2cdtfhwcbhiinavczfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxikkaocdthrcbhwincbhiinavczfaifgDaeaifIdbgqaDIdbgkakaq9EEUdbavaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkaearfheawcefgwad9hmbxdkkdnalTmbcbhrinabarcx2fgiaealarcdtfydbao2cdtfgwIdbUdbaiawIdlUdlaiawIdwUdwcbhiinavczfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkarcefgrad9hmbxdkkaocdthlcbhraehwinabarcx2fgiaearao2cdtfgDIdbUdbaiaDIdlUdlaiaDIdwUdwcbhiinavczfaifgDawaifIdbgqaDIdbgkakaq9EEUdbavaifgDaqaDIdbgkakaq9DEUdbaiclfgicx9hmbkawalfhwarcefgrad9hmbkkJbbbbavIdbavIdzgk:tgqaqJbbbb9DEgqavIdlavIdCgx:tgmamaq9DEgqavIdwavIdKgm:tgPaPaq9DEhPdnabTmbadTmbJbbbbJbbjZaP:vaPJbbbb9BEhqinabaqabIdbak:tNUdbabclfgvaqavIdbax:tNUdbabcwfgvaqavIdbam:tNUdbabcxfhbadcufgdmbkkaPk:ZlewudnaeTmbcbhvabhoinaoavBdbaoclfhoaeavcefgv9hmbkkdnaiTmbcbhrinadarcdtfhwcbhDinalawaDcdtgvc;a1jjbfydbcdtfydbcdtfydbhodnabalawavfydbcdtfydbgqcdtfgkydbgvaqSmbinakabavgqcdtfgxydbgvBdbaxhkaqav9hmbkkdnabaocdtfgkydbgvaoSmbinakabavgocdtfgxydbgvBdbaxhkaoav9hmbkkdnaqaoSmbabaqaoaqao0Ecdtfaqaoaqao6EBdbkaDcefgDci9hmbkarcifgrai6mbkkdnaembcbskcbhxindnalaxcdtgvfydbax9hmbaxhodnabavfgDydbgvaxSmbaDhqinaqabavgocdtfgkydbgvBdbakhqaoav9hmbkkaDaoBdbkaxcefgxae9hmbkcbhvabhocbhkindndnavalydbgq9hmbdnavaoydbgq9hmbaoakBdbakcefhkxdkaoabaqcdtfydbBdbxekaoabaqcdtfydbBdbkaoclfhoalclfhlaeavcefgv9hmbkakk;Jiilud99duabcbaecltz:ojjjbhvdnalTmbadhoaihralhwinarcwfIdbhDarclfIdbhqavaoydbcltfgkarIdbakIdbMUdbakclfgxaqaxIdbMUdbakcwfgxaDaxIdbMUdbakcxfgkakIdbJbbjZMUdbaoclfhoarcxfhrawcufgwmbkkdnaeTmbavhraehkinarcxfgoIdbhDaocbBdbararIdbJbbbbJbbjZaD:vaDJbbbb9BEgDNUdbarclfgoaDaoIdbNUdbarcwfgoaDaoIdbNUdbarczfhrakcufgkmbkkdnalTmbinavadydbcltfgrcxfgkaicwfIdbarcwfIdb:tgDaDNaiIdbarIdb:tgDaDNaiclfIdbarclfIdb:tgDaDNMMgDakIdbgqaqaD9DEUdbadclfhdaicxfhialcufglmbkkdnaeTmbavcxfhrinabarIdbUdbarczfhrabclfhbaecufgembkkk8MbabaeadaialavcbcbcbcbcbaoarawaDz:bjjjbk8MbabaeadaialavaoarawaDaqakaxamaPz:bjjjbk:DCoDud99rue99iul998Jjjjjbc;Wb9Rgw8KjjjjbdndnarmbcbhDxekawcxfcbc;Kbz:ojjjb8Aawcuadcx2adc;v:Q;v:Qe0Ecbyd:m:jjjbHjjjjbbgqBdxawceBd2aqaeadaicbz:ejjjb8AawcuadcdtadcFFFFi0Egkcbyd:m:jjjbHjjjjbbgxBdzawcdBd2adcd4adfhmceheinaegicetheaiam6mbkcbhPawcuaicdtgsaicFFFFi0Ecbyd:m:jjjbHjjjjbbgzBdCawciBd2dndnar:ZgH:rJbbbZMgO:lJbbb9p9DTmbaO:Ohexekcjjjj94hekaicufhAc:bwhmcbhCadhXcbhQinaChLaeamgKcufaeaK9iEaPgDcefaeaD9kEhYdndnadTmbaYcuf:YhOaqhiaxheadhmindndnaiIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhCxekcjjjj94hCkaCcCthCdndnaiclfIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhExekcjjjj94hEkaEcqtaCVhCdndnaicwfIdbaONJbbbZMg8A:lJbbb9p9DTmba8A:OhExekcjjjj94hEkaeaCaEVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:ojjjbh3cbh5cbhPindna3axaPcdtfydbgCcm4aC7c:v;t;h;Ev2gics4ai7aAGgmcdtfgEydbgecuSmbaeaCSmbcehiina3amaifaAGgmcdtfgEydbgecuSmeaicefhiaeaC9hmbkkaEaCBdba5aecuSfh5aPcefgPad9hmbxdkkazcFeasz:ojjjb8Acbh5kaDaYa5ar0giEhPaLa5aiEhCdna5arSmbaYaKaiEgmaP9Rcd9imbdndnaQcl0mbdnaX:ZgOaL:Zg8A:taY:Yg8EaD:Y:tg8Fa8EaK:Y:tgaa5:ZghaH:tNNNaOaH:taaNa8Aah:tNa8AaH:ta8FNahaO:tNM:va8EMJbbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPamfcd9Theka5aXaiEhXaQcefgQcs9hmekkdndnaCmbcihicbhDxekcbhiawakcbyd:m:jjjbHjjjjbbg5BdKawclBd2aPcuf:Yh8AdndnadTmbaqhiaxheadhmindndnaiIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhCxekcjjjj94hCkaCcCthCdndnaiclfIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhExekcjjjj94hEkaEcqtaCVhCdndnaicwfIdba8ANJbbbZMgO:lJbbb9p9DTmbaO:OhExekcjjjj94hEkaeaCaEVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:ojjjbh3cbhDcbhYindndndna3axaYcdtgKfydbgCcm4aC7c:v;t;h;Ev2gics4ai7aAGgmcdtfgEydbgecuSmbcehiinaxaecdtgefydbaCSmdamaifheaicefhia3aeaAGgmcdtfgEydbgecu9hmbkkaEaYBdbaDhiaDcefhDxeka5aefydbhika5aKfaiBdbaYcefgYad9hmbkcuaDc32giaDc;j:KM;jb0EhexekazcFeasz:ojjjb8AcbhDcbhekawaecbyd:m:jjjbHjjjjbbgeBd3awcvBd2aecbaiz:ojjjbhEavcd4hKdnadTmbdnalTmbaKcdth3a5hCaqhealhmadhAinaEaCydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiamIdbaiIdxMUdxaiamclfIdbaiIdzMUdzaiamcwfIdbaiIdCMUdCaiaiIdKJbbjZMUdKaCclfhCaecxfheama3fhmaAcufgAmbxdkka5hmaqheadhCinaEamydbc32fgiaeIdbaiIdbMUdbaiaeclfIdbaiIdlMUdlaiaecwfIdbaiIdwMUdwaiaiIdxJbbbbMUdxaiaiIdzJbbbbMUdzaiaiIdCJbbbbMUdCaiaiIdKJbbjZMUdKamclfhmaecxfheaCcufgCmbkkdnaDTmbaEhiaDheinaiaiIdbJbbbbJbbjZaicKfIdbgO:vaOJbbbb9BEgONUdbaiclfgmaOamIdbNUdbaicwfgmaOamIdbNUdbaicxfgmaOamIdbNUdbaiczfgmaOamIdbNUdbaicCfgmaOamIdbNUdbaic3fhiaecufgembkkcbhCawcuaDcdtgYaDcFFFFi0Egicbyd:m:jjjbHjjjjbbgeBdaawcoBd2awaicbyd:m:jjjbHjjjjbbg3Bd8KaecFeaYz:ojjjbhxdnadTmbJbbjZJbbjZa8A:vaPceSEaoNgOaONh8AaKcdthPalheina8Aaec;81jjbalEgmIdwaEa5ydbgAc32fgiIdC:tgOaONamIdbaiIdx:tgOaONamIdlaiIdz:tgOaONMMNaqcwfIdbaiIdw:tgOaONaqIdbaiIdb:tgOaONaqclfIdbaiIdl:tgOaONMMMhOdndnaxaAcdtgifgmydbcuSmba3aifIdbaO9ETmekamaCBdba3aifaOUdbka5clfh5aqcxfhqaeaPfheadaCcefgC9hmbkkabaxaYz:njjjb8AcrhikaicdthiinaiTmeaic98fgiawcxffydbcbyd1:jjjbH:bjjjbbxbkkawc;Wbf8KjjjjbaDk:Ydidui99ducbhi8Jjjjjbca9Rglczfcwfcbyd11jjbBdbalcb8Pdj1jjb83izalcwfcbydN1jjbBdbalcb8Pd:m1jjb83ibdndnaembJbbjFhvJbbjFhoJbbjFhrxekadcd4cdthwincbhdinalczfadfgDabadfIdbgvaDIdbgoaoav9EEUdbaladfgDavaDIdbgoaoav9DEUdbadclfgdcx9hmbkabawfhbaicefgiae9hmbkalIdwalIdK:thralIdlalIdC:thoalIdbalIdz:thvkJbbbbavavJbbbb9DEgvaoaoav9DEgvararav9DEk9DeeuabcFeaicdtz:ojjjbhlcbhbdnadTmbindnalaeydbcdtfgiydbcu9hmbaiabBdbabcefhbkaeclfheadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcifc98GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd:q:jjjbgeabcrfc94GfgbBd:q:jjjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd:q:jjjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd:q:jjjbfgdBd:q:jjjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akkk:Iedbcjwk1eFFuuFFuuFFuuFFuFFFuFFFuFbbbbbbbbeeebeebebbeeebebbbbbebebbbbbbbbbebbbdbbbbbbbebbbebbbdbbbbbbbbbbbeeeeebebbebbebebbbeebbbbbbbbbbbbbbbbbbbbbc1Dkxebbbdbbb:GNbb",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(o(e),{}).then(function(m){n=m.instance,n.exports.__wasm_call_ctors()});function o(m){for(var _=new Uint8Array(m.length),y=0;y96?C-97:C>64?C-39:C+4}for(var E=0,y=0;y=3),r(C>=0&&C<=m.length),r(C%3==0),r(E>=0);for(var b=0,S=0;S<(I?I.length:0);++S)r(I[S]in g),b|=g[I[S]];var B=m.BYTES_PER_ELEMENT==4?m:new Uint32Array(m),v=u(n.exports.meshopt_simplify,B,m.length,_,_.length/y,y*4,C,E,b);return v[0]=m instanceof Uint32Array?v[0]:new m.constructor(v[0]),v},simplifyWithAttributes:function(m,_,y,C,E,I,b,S,B,v){r(m instanceof Uint32Array||m instanceof Int32Array||m instanceof Uint16Array||m instanceof Int16Array),r(m.length%3==0),r(_ instanceof Float32Array),r(_.length%y==0),r(y>=3),r(C instanceof Float32Array),r(C.length%E==0),r(E>=0),r(b==null||b instanceof Uint8Array),r(b==null||b.length==_.length/y),r(S>=0&&S<=m.length),r(S%3==0),r(B>=0),r(Array.isArray(I)),r(E>=I.length),r(I.length<=32);for(var P=0;P=0);for(var N=0,P=0;P<(v?v.length:0);++P)r(v[P]in g),N|=g[v[P]];var L=m.BYTES_PER_ELEMENT==4?m:new Uint32Array(m),A=f(n.exports.meshopt_simplifyWithAttributes,L,m.length,_,_.length/y,y*4,C,E*4,new Float32Array(I),b?new Uint8Array(b):null,S,B,N);return A[0]=m instanceof Uint32Array?A[0]:new m.constructor(A[0]),A},getScale:function(m,_){return r(m instanceof Float32Array),r(m.length%_==0),r(_>=3),h(n.exports.meshopt_simplifyScale,m,m.length/_,_*4)},simplifyPoints:function(m,_,y,C,E,I){return r(m instanceof Float32Array),r(m.length%_==0),r(_>=3),r(y>=0&&y<=m.length/_),C?(r(C instanceof Float32Array),r(C.length%E==0),r(E>=3),r(m.length/_==C.length/E),p(n.exports.meshopt_simplifyPoints,m,m.length/_,_*4,C,E*4,I,y)):p(n.exports.meshopt_simplifyPoints,m,m.length/_,_*4,void 0,0,0,y)}}}();typeof ZR=="object"&&typeof RW=="object"?RW.exports=sz:typeof define=="function"&&define.amd?define([],function(){return sz}):typeof ZR=="object"?ZR.MeshoptSimplifier=sz:(typeof self<"u"?self:ZR).MeshoptSimplifier=sz});var Bae=ci(($R,MW)=>{var az=function(){var e="b9H79TebbbeVx9Geueu9Geub9Gbb9Giuuueu9Gmuuuuuuuuuuu9999eu9Gvuuuuueu9Gwuuuuuuuub9Gxuuuuuuuuuuuueu9Gkuuuuuuuuuu99eu9Gouuuuuub9Gruuuuuuub9GluuuubiOHdilvorwDqqkbiibeilve9Weiiviebeoweuec;G:Odkr:Yewo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9I919P29K9nW79O2Wt79c9V919U9KbeX9TW79O9V9Wt9F9I919P29K9nW79O2Wt7bo39TW79O9V9Wt9F9J9V9T9W91tWJ2917tWV9c9V919U9K7br39TW79O9V9Wt9F9J9V9T9W91tW9nW79O2Wt9c9V919U9K7bDL9TW79O9V9Wt9F9V9Wt9P9T9P96W9nW79O2Wtbql79IV9RbkDwebcekdsPq;Q9BHdbkIbabaec9:fgefcufae9Ugeabci9Uadfcufad9Ugbaeab0Ek:w8KDPue99eux99dui99euo99iu8Jjjjjbc:WD9Rgm8KjjjjbdndnalmbcbhPxekamc:Cwfcbc;Kbz:njjjb8Adndnalcb9imbaoal9nmbamcuaocdtaocFFFFi0Egscbyd;y1jjbHjjjjbbgzBd:CwamceBd;8wamascbyd;y1jjbHjjjjbbgHBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;y1jjbHjjjjbbgOBd:KwamciBd;8waihsalhAinazasydbcdtfcbBdbasclfhsaAcufgAmbkaihsalhAinazasydbcdtfgCaCydbcefBdbasclfhsaAcufgAmbkaihsalhCcbhXindnazasydbcdtgQfgAydbcb9imbaHaQfaXBdbaAaAydbgQcjjjj94VBdbaQaXfhXkasclfhsaCcufgCmbkalci9UhLdnalci6mbcbhsaihAinaAcwfydbhCaAclfydbhXaHaAydbcdtfgQaQydbgQcefBdbaOaQcdtfasBdbaHaXcdtfgXaXydbgXcefBdbaOaXcdtfasBdbaHaCcdtfgCaCydbgCcefBdbaOaCcdtfasBdbaAcxfhAaLascefgs9hmbkkaihsalhAindnazasydbcdtgCfgXydbgQcu9kmbaXaQcFFFFrGgQBdbaHaCfgCaCydbaQ9RBdbkasclfhsaAcufgAmbxdkkamcuaocdtgsaocFFFFi0EgAcbyd;y1jjbHjjjjbbgzBd:CwamceBd;8wamaAcbyd;y1jjbHjjjjbbgHBd:GwamcdBd;8wamcualcdtalcFFFFi0Ecbyd;y1jjbHjjjjbbgOBd:KwamciBd;8wazcbasz:njjjbhXalci9UhLaihsalhAinaXasydbcdtfgCaCydbcefBdbasclfhsaAcufgAmbkdnaoTmbcbhsaHhAaXhCaohQinaAasBdbaAclfhAaCydbasfhsaCclfhCaQcufgQmbkkdnalci6mbcbhsaihAinaAcwfydbhCaAclfydbhQaHaAydbcdtfgKaKydbgKcefBdbaOaKcdtfasBdbaHaQcdtfgQaQydbgQcefBdbaOaQcdtfasBdbaHaCcdtfgCaCydbgCcefBdbaOaCcdtfasBdbaAcxfhAaLascefgs9hmbkkaoTmbcbhsaohAinaHasfgCaCydbaXasfydb9RBdbasclfhsaAcufgAmbkkamaLcbyd;y1jjbHjjjjbbgsBd:OwamclBd;8wascbaLz:njjjbhYamcuaLcK2alcjjjjd0Ecbyd;y1jjbHjjjjbbg8ABd:SwamcvBd;8wJbbbbhEdnalci6g3mbarcd4hKaihAa8AhsaLhrJbbbbh5inavaAclfydbaK2cdtfgCIdlh8EavaAydbaK2cdtfgXIdlhEavaAcwfydbaK2cdtfgQIdlh8FaCIdwhaaXIdwhhaQIdwhgasaCIdbg8JaXIdbg8KMaQIdbg8LMJbbnn:vUdbasclfaXIdlaCIdlMaQIdlMJbbnn:vUdbaQIdwh8MaCIdwh8NaXIdwhyascxfa8EaE:tg8Eagah:tggNa8FaE:tg8Faaah:tgaN:tgEJbbbbJbbjZa8Ja8K:tg8Ja8FNa8La8K:tg8Ka8EN:tghahNaEaENaaa8KNaga8JN:tgEaENMM:rg8K:va8KJbbbb9BEg8ENUdbasczfaEa8ENUdbascCfaha8ENUdbascwfa8Maya8NMMJbbnn:vUdba5a8KMh5aAcxfhAascKfhsarcufgrmbka5aL:Z:vJbbbZNhEkamcuaLcdtalcFFFF970Ecbyd;y1jjbHjjjjbbgCBd:WwamcoBd;8waEaq:ZNhEdna3mbcbhsaChAinaAasBdbaAclfhAaLascefgs9hmbkkaE:rhhcuh8PamcuaLcltalcFFFFd0Ecbyd;y1jjbHjjjjbbgIBd:0wamcrBd;8wcbaIa8AaCaLz:djjjb8AJFFuuhyJFFuuh8RJFFuuh8Sdnalci6gXmbJFFuuh8Sa8AhsaLhAJFFuuh8RJFFuuhyinascwfIdbgEayayaE9EEhyasclfIdbgEa8Ra8RaE9EEh8RasIdbgEa8Sa8SaE9EEh8SascKfhsaAcufgAmbkkahJbbbZNhgamaocetgscuaocu9kEcbyd;y1jjbHjjjjbbgABd:4waAcFeasz:njjjbhCdnaXmbcbhAJFFuuhEa8Ahscuh8PinascwfIdbay:tghahNasIdba8S:tghahNasclfIdba8R:tghahNMM:rghaEa8PcuSahaE9DVgXEhEaAa8PaXEh8PascKfhsaLaAcefgA9hmbkkamczfcbcjwz:njjjb8Aamcwf9cb83ibam9cb83ibagaxNhRJbbjZak:th8Ncbh8UJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YJbbbbh8ZJbbbbh80cbh81cbhPinJbbbbhEdna8UTmbJbbjZa8U:Z:vhEkJbbbbhhdna80a80Na8Ya8YNa8Za8ZNMMg8KJbbbb9BmbJbbjZa8K:r:vhhka8XaENh5a8WaENh8Fa8VaENhaa8PhQdndndndndna8UaPVTmbamydwgBTmea80ahNh8Ja8ZahNh8La8YahNh8Maeamydbcdtfh83cbh3JFFuuhEcvhXcuhQindnaza83a3cdtfydbcdtgsfydbgvTmbaOaHasfydbcdtfhAindndnaCaiaAydbgKcx2fgsclfydbgrcetf8Vebcs4aCasydbgLcetf8Vebcs4faCascwfydbglcetf8Vebcs4fgombcbhsxekcehsazaLcdtfydbgLceSmbcehsazarcdtfydbgrceSmbcehsazalcdtfydbglceSmbdnarcdSaLcdSfalcdSfcd6mbaocefhsxekaocdfhskdnasaX9kmba8AaKcK2fgLIdwa5:thhaLIdla8F:th8KaLIdbaa:th8EdndnakJbbbb9DTmba8E:lg8Ea8K:lg8Ka8Ea8K9EEg8Kah:lgha8Kah9EEag:vJbbjZMhhxekahahNa8Ea8ENa8Ka8KNMM:rag:va8NNJbbjZMJ9VO:d86JbbjZaLIdCa8JNaLIdxa8MNa8LaLIdzNMMakN:tghahJ9VO:d869DENhhkaKaQasaX6ahaE9DVgLEhQasaXaLEhXahaEaLEhEkaAclfhAavcufgvmbkka3cefg3aB9hmbkkaQcu9hmekama5Ud:ODama8FUd:KDamaaUd:GDamcuBd:qDamcFFF;7rBdjDaIcba8AaYamc:GDfakJbbbb9Damc:qDfamcjDfz:ejjjbamyd:qDhQdndnaxJbbbb9ETmba8UaD6mbaQcuSmeceh3amIdjDaR9EmixdkaQcu9hmekdna8UTmbdnamydlgza8Uci2fgsciGTmbadasfcba8Uazcu7fciGcefz:njjjb8AkabaPcltfgzam8Pib83dbazcwfamcwf8Pib83dbaPcefhPkc3hzinazc98Smvamc:Cwfazfydbcbyd;u1jjbH:bjjjbbazc98fhzxbkkcbh3a8Uaq9pmbamydwaCaiaQcx2fgsydbcetf8Vebcs4aCascwfydbcetf8Vebcs4faCasclfydbcetf8Vebcs4ffaw9nmekcbhscbhAdna81TmbcbhAamczfhXinamczfaAcdtfaXydbgLBdbaXclfhXaAaYaLfRbbTfhAa81cufg81mbkkamydwhlamydbhXam9cu83i:GDam9cu83i:ODam9cu83i:qDam9cu83i:yDaAc;8eaAclfc:bd6Eh81inamcjDfasfcFFF;7rBdbasclfgscz9hmbka81cdthBdnalTmbaeaXcdtfhocbhrindnazaoarcdtfydbcdtgsfydbgvTmbaOaHasfydbcdtfhAcuhLcuhsinazaiaAydbgKcx2fgXclfydbcdtfydbazaXydbcdtfydbfazaXcwfydbcdtfydbfgXasaXas6gXEhsaKaLaXEhLaAclfhAavcufgvmbkaLcuSmba8AaLcK2fgAIdway:tgEaENaAIdba8S:tgEaENaAIdla8R:tgEaENMM:rhEcbhAindndnasamc:qDfaAfgvydbgX6mbasaX9hmeaEamcjDfaAfIdb9FTmekavasBdbamc:GDfaAfaLBdbamcjDfaAfaEUdbxdkaAclfgAcz9hmbkkarcefgral9hmbkkamczfaBfhLcbhscbhAindnamc:GDfasfydbgXcuSmbaLaAcdtfaXBdbaAcefhAkasclfgscz9hmbkaAa81fg81TmbJFFuuhhcuhKamczfhsa81hvcuhLina8AasydbgXcK2fgAIdway:tgEaENaAIdba8S:tgEaENaAIdla8R:tgEaENMM:rhEdndnazaiaXcx2fgAclfydbcdtfydbazaAydbcdtfydbfazaAcwfydbcdtfydbfgAaL6mbaAaL9hmeaEah9DTmekaEhhaAhLaXhKkasclfhsavcufgvmbkaKcuSmbaKhQkdnamaiaQcx2fgrydbarclfydbarcwfydbaCabaeadaPawaqa3z:fjjjbTmbaPcefhPJbbbbh8VJbbbbh8WJbbbbh8XJbbbbh8YJbbbbh8ZJbbbbh80kcbhXinaOaHaraXcdtfydbcdtgAfydbcdtfgKhsazaAfgvydbgLhAdnaLTmbdninasydbaQSmeasclfhsaAcufgATmdxbkkasaKaLcdtfc98fydbBdbavavydbcufBdbkaXcefgXci9hmbka8AaQcK2fgsIdbhEasIdlhhasIdwh8KasIdxh8EasIdzh5asIdCh8FaYaQfce86bba80a8FMh80a8Za5Mh8Za8Ya8EMh8Ya8Xa8KMh8Xa8WahMh8Wa8VaEMh8Vamydxh8Uxbkkamc:WDf8KjjjjbaPk;Vvivuv99lu8Jjjjjbca9Rgv8Kjjjjbdndnalcw0mbaiydbhoaeabcitfgralcdtcufBdlaraoBdbdnalcd6mbaiclfhoalcufhwarcxfhrinaoydbhDarcuBdbarc98faDBdbarcwfhraoclfhoawcufgwmbkkalabfhrxekcbhDavczfcwfcbBdbav9cb83izavcwfcbBdbav9cb83ibJbbjZhqJbbjZhkinadaiaDcdtfydbcK2fhwcbhrinavczfarfgoawarfIdbgxaoIdbgm:tgPakNamMgmUdbavarfgoaPaxam:tNaoIdbMUdbarclfgrcx9hmbkJbbjZaqJbbjZMgq:vhkaDcefgDal9hmbkcbhoadcbcecdavIdlgxavIdwgm9GEgravIdbgPam9GEaraPax9GEgscdtgrfhzavczfarfIdbhxaihralhwinaiaocdtfgDydbhHaDarydbgOBdbaraHBdbarclfhraoazaOcK2fIdbax9Dfhoawcufgwmbkaeabcitfhrdndnaocv6mbaoalc98f6mekaraiydbBdbaralcdtcufBdlaiclfhoalcufhwarcxfhrinaoydbhDarcuBdbarc98faDBdbarcwfhraoclfhoawcufgwmbkalabfhrxekaraxUdbararydlc98GasVBdlabcefaeadaiaoz:djjjbhwararydlciGawabcu7fcdtVBdlawaeadaiaocdtfalao9Rz:djjjbhrkavcaf8Kjjjjbark:;idiud99dndnabaecitfgwydlgDciGgqciSmbinabcbaDcd4gDalaqcdtfIdbawIdb:tgkJbbbb9FEgwaecefgefadaialavaoarz:ejjjbak:larIdb9FTmdabawaD7aefgecitfgwydlgDciGgqci9hmbkkabaecitfgeclfhbdnavmbcuhwindnaiaeydbgDfRbbmbadaDcK2fgqIdwalIdw:tgkakNaqIdbalIdb:tgkakNaqIdlalIdl:tgkakNMM:rgkarIdb9DTmbarakUdbaoaDBdbkaecwfheawcefgwabydbcd46mbxdkkcuhwindnaiaeydbgDfRbbmbadaDcK2fgqIdbalIdb:t:lgkaqIdlalIdl:t:lgxakax9EEgkaqIdwalIdw:t:lgxakax9EEgkarIdb9DTmbarakUdbaoaDBdbkaecwfheawcefgwabydbcd46mbkkk;llevudnabydwgxaladcetfgm8Vebcs4alaecetfgP8Vebgscs4falaicetfgz8Vebcs4ffaD0abydxaq9pVakVgDce9hmbavawcltfgxab8Pdb83dbaxcwfabcwfgx8Pdb83dbdnaxydbgqTmbaoabydbcdtfhxaqhsinalaxydbcetfcFFi87ebaxclfhxascufgsmbkkdnabydxglci2gsabydlgxfgkciGTmbarakfcbalaxcu7fciGcefz:njjjb8Aabydxci2hsabydlhxabydwhqkab9cb83dwababydbaqfBdbabascifc98GaxfBdlaP8Vebhscbhxkdnascztcz91cu9kmbabaxcefBdwaPax87ebaoabydbcdtfaxcdtfaeBdbkdnam8Uebcu9kmbababydwgxcefBdwamax87ebaoabydbcdtfaxcdtfadBdbkdnaz8Uebcu9kmbababydwgxcefBdwazax87ebaoabydbcdtfaxcdtfaiBdbkarabydlfabydxci2faPRbb86bbarabydlfabydxci2fcefamRbb86bbarabydlfabydxci2fcdfazRbb86bbababydxcefBdxaDk8LbabaeadaialavaoarawaDaDaqJbbbbz:cjjjbk;Nkovud99euv99eul998Jjjjjbc:W;ae9Rgo8KjjjjbdndnadTmbavcd4hrcbhwcbhDindnaiaeclfydbar2cdtfgvIdbaiaeydbar2cdtfgqIdbgk:tgxaiaecwfydbar2cdtfgmIdlaqIdlgP:tgsNamIdbak:tgzavIdlaP:tgPN:tgkakNaPamIdwaqIdwgH:tgONasavIdwaH:tgHN:tgPaPNaHazNaOaxN:tgxaxNMM:rgsJbbbb9Bmbaoc:W:qefawcx2fgAakas:vUdwaAaxas:vUdlaAaPas:vUdbaoc8Wfawc8K2fgAaq8Pdb83dbaAav8Pdb83dxaAam8Pdb83dKaAcwfaqcwfydbBdbaAcCfavcwfydbBdbaAcafamcwfydbBdbawcefhwkaecxfheaDcifgDad6mbkab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbawTmeaocbBd8Sao9cb83iKao9cb83izaoczfaoc8Wfawci2cxaoc8Sfcbcrz1jjjbaoIdKhCaoIdChXaoIdzhQao9cb83iwao9cb83ibaoaoc:W:qefawcxaoc8Sfcbciz1jjjbJbbjZhkaoIdwgPJbbbbJbbjZaPaPNaoIdbgPaPNaoIdlgsasNMM:rgx:vaxJbbbb9BEgzNhxasazNhsaPazNhzaoc:W:qefheawhvinaecwfIdbaxNaeIdbazNasaeclfIdbNMMgPakaPak9DEhkaecxfheavcufgvmbkabaCUdwabaXUdlabaQUdbabaoId3UdxdndnakJ;n;m;m899FmbJbbbbhPaoc:W:qefheaoc8WfhvinaCavcwfIdb:taecwfIdbgHNaQavIdb:taeIdbgONaXavclfIdb:taeclfIdbgLNMMaxaHNazaONasaLNMM:vgHaPaHaP9EEhPavc8KfhvaecxfheawcufgwmbkabaxUd8KabasUdaabazUd3abaCaxaPN:tUdKabaXasaPN:tUdCabaQazaPN:tUdzabJbbjZakakN:t:rgkUdydndnaxJbbj:;axJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;axJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohexekcjjjj94hekabae86b8UdndnasJbbj:;asJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;asJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkabav86bRdndnazJbbj:;azJbbj:;9GEgPJbbjZaPJbbjZ9FEJbb;:9cNJbbbZJbbb:;azJbbbb9GEMgP:lJbbb9p9DTmbaP:Ohqxekcjjjj94hqkabaq86b8SdndnaecKtcK91:YJbb;:9c:vax:t:lavcKtcK91:YJbb;:9c:vas:t:laqcKtcK91:YJbb;:9c:vaz:t:lakMMMJbb;:9cNJbbjZMgk:lJbbb9p9DTmbak:Ohexekcjjjj94hekaecFbaecFb9iEhexekabcjjj;8iBdycFbhekabae86b8Vxekab9cb83dbabcyf9cb83dbabcaf9cb83dbabcKf9cb83dbabczf9cb83dbabcwf9cb83dbkaoc:W;aef8Kjjjjbk;Iwwvul99iud99eue99eul998Jjjjjbcje9Rgr8Kjjjjbavcd4hwaicd4hDdndnaoTmbarc;abfcbaocdtgvz:njjjb8Aarc;Gbfcbavz:njjjb8AarhvarcafhiaohqinavcFFF97BdbaicFFF;7rBdbaiclfhiavclfhvaqcufgqmbkdnadTmbcbhkinaeakaD2cdtfgvIdwhxavIdlhmavIdbhPalakaw2cdtfIdbhsarc;abfhzarhiarc;GbfhHarcafhqcj1jjbhvaohOinasavcwfIdbaxNavIdbaPNavclfIdbamNMMgAMhCakhXdnaAas:tgAaqIdbgQ9DgLmbaHydbhXkaHaXBdbakhXdnaCaiIdbgK9EmbazydbhXaKhCkazaXBdbaiaCUdbaqaAaQaLEUdbavcxfhvaqclfhqaHclfhHaiclfhiazclfhzaOcufgOmbkakcefgkad9hmbkkadThkJbbbbhCcbhXarc;abfhvarc;Gbfhicbhqinalavydbgzaw2cdtfIdbalaiydbgHaw2cdtfIdbaeazaD2cdtfgzIdwaeaHaD2cdtfgHIdw:tgsasNazIdbaHIdb:tgsasNazIdlaHIdl:tgsasNMM:rMMgsaCasaC9EgzEhCaqaXazEhXaiclfhiavclfhvaoaqcefgq9hmbkaCJbbbZNhKxekadThkcbhXJbbbbhKkJbbbbhCdnaearc;abfaXcdtgifydbgqaD2cdtfgvIdwaearc;GbfaifydbgzaD2cdtfgiIdwgm:tgsasNavIdbaiIdbgY:tgAaANavIdlaiIdlgP:tgQaQNMM:rgxJbbbb9ETmbaxalaqaw2cdtfIdbMalazaw2cdtfIdb:taxaxM:vhCkasaCNamMhmaQaCNaPMhPaAaCNaYMhYdnakmbaDcdthvawcdthiindnalIdbg8AaecwfIdbam:tgCaCNaeIdbaY:tgsasNaeclfIdbaP:tgAaANMM:rgQMgEaK9ETmbJbbbbhxdnaQJbbbb9ETmbaEaK:taQaQM:vhxkaxaCNamMhmaxaANaPMhPaxasNaYMhYa8AaKaQMMJbbbZNhKkaeavfhealaifhladcufgdmbkkabaKUdxabamUdwabaPUdlabaYUdbarcjef8Kjjjjbkjeeiu8Jjjjjbcj8W9Rgr8Kjjjjbaici2hwdnaiTmbawceawce0EhDarhiinaiaeadRbbcdtfydbBdbadcefhdaiclfhiaDcufgDmbkkabarawaladaoz:hjjjbarcj8Wf8Kjjjjbk:3lequ8JjjjjbcjP9Rgl8Kjjjjbcbhvalcjxfcbaiz:njjjb8AdndnadTmbcjehoaehrincuhwarhDcuhqavhkdninawakaoalcjxfaDcefRbbfRbb9RcFeGci6aoalcjxfaDRbbfRbb9RcFeGci6faoalcjxfaDcdfRbbfRbb9RcFeGci6fgxaq9mgmEhwdnammbaxce0mdkaxaqaxaq9kEhqaDcifhDadakcefgk9hmbkkaeawci2fgDcdfRbbhqaDcefRbbhxaDRbbhkaeavci2fgDcifaDawav9Rci2z:qjjjb8Aakalcjxffaocefgo86bbaxalcjxffao86bbaDcdfaq86bbaDcefax86bbaDak86bbaqalcjxffao86bbarcifhravcefgvad9hmbkalcFeaicetz:njjjbhoadci2gDceaDce0EhqcbhxindnaoaeRbbgkcetfgw8UebgDcu9kmbawax87ebaocjlfaxcdtfabakcdtfydbBdbaxhDaxcefhxkaeaD86bbaecefheaqcufgqmbkaxcdthDxekcbhDkabalcjlfaDz:mjjjb8AalcjPf8Kjjjjbk9teiucbcbyd;C1jjbgeabcifc98GfgbBd;C1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabk9teiucbcbyd;C1jjbgeabcrfc94GfgbBd;C1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik9:eiuZbhedndncbyd;C1jjbgdaecztgi9nmbcuheadai9RcFFifcz4nbcuSmekadhekcbabae9Rcifc98Gcbyd;C1jjbfgdBd;C1jjbdnadZbcztge9nmbadae9RcFFifcz4nb8Akk:;Deludndndnadch9pmbabaeSmdaeabadfgi9Rcbadcet9R0mekabaead;8qbbxekaeab7ciGhldndndnabae9pmbdnalTmbadhvabhixikdnabciGmbadhvabhixdkadTmiabaeRbb86bbadcufhvdnabcefgiciGmbaecefhexdkavTmiabaeRbe86beadc9:fhvdnabcdfgiciGmbaecdfhexdkavTmiabaeRbd86bdadc99fhvdnabcifgiciGmbaecifhexdkavTmiabaeRbi86biabclfhiaeclfheadc98fhvxekdnalmbdnaiciGTmbadTmlabadcufgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc9:fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc99fgifglaeaifRbb86bbdnalciGmbaihdxekaiTmlabadc98fgdfaeadfRbb86bbkadcl6mbdnadc98fgocd4cefciGgiTmbaec98fhlabc98fhvinavadfaladfydbBdbadc98fhdaicufgimbkkaocx6mbaec9Wfhvabc9WfhoinaoadfgicxfavadfglcxfydbBdbaicwfalcwfydbBdbaiclfalclfydbBdbaialydbBdbadc9Wfgdci0mbkkadTmdadhidnadciGglTmbaecufhvabcufhoadhiinaoaifavaifRbb86bbaicufhialcufglmbkkadcl6mdaec98fhlabc98fhvinavaifgecifalaifgdcifRbb86bbaecdfadcdfRbb86bbaecefadcefRbb86bbaeadRbb86bbaic98fgimbxikkavcl6mbdnavc98fglcd4cefcrGgdTmbavadcdt9RhvinaiaeydbBdbaeclfheaiclfhiadcufgdmbkkalc36mbinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaiaeydzBdzaiaeydCBdCaiaeydKBdKaiaeyd3Bd3aecafheaicafhiavc9Gfgvci0mbkkavTmbdndnavcrGgdmbavhlxekavc94GhlinaiaeRbb86bbaicefhiaecefheadcufgdmbkkavcw6mbinaiaeRbb86bbaiaeRbe86beaiaeRbd86bdaiaeRbi86biaiaeRbl86blaiaeRbv86bvaiaeRbo86boaiaeRbr86braicwfhiaecwfhealc94fglmbkkabkk9Tdbcjwk9ubbjZbbbbbbbbbbbbbbjZbbbbbbbbbbbbbbjZ86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;86;nAZ86;nAZ86;nAZ86;nA:;bc;uwkxebbbdbbb9GNbb",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(o(e),{}).then(function(m){n=m.instance,n.exports.__wasm_call_ctors()});function o(m){for(var _=new Uint8Array(m.length),y=0;y96?C-97:C>64?C-39:C+4}for(var E=0,y=0;y=3),r(C<=256||C>0),r(E<=512),r(E%4==0),I=I||0;var b=m.BYTES_PER_ELEMENT==4?m:new Uint32Array(m);return f(b,_,_.length/y,y*4,C,E,I)},computeClusterBounds:function(m,_,y){r(m.length%3==0),r(m.length/3<=512),r(_ instanceof Float32Array),r(_.length%y==0),r(y>=3);var C=m.BYTES_PER_ELEMENT==4?m:new Uint32Array(m);return g(C,_,_.length/y,y*4)},computeMeshletBounds:function(m,_,y){return r(m.meshletCount!=0),r(_ instanceof Float32Array),r(_.length%y==0),r(y>=3),p(m,_,_.length/y,y*4)},extractMeshlet:function(m,_){return r(_>=0&&_{var X3e=Tae(),J3e=Sae(),Z3e=wae(),$3e=Bae();Dae.exports={MeshoptEncoder:X3e,MeshoptDecoder:J3e,MeshoptSimplifier:Z3e,MeshoptClusterizer:$3e}});var yde=ci((GLn,_de)=>{"use strict";_de.exports=Z7e;var AL=1e20;function Z7e(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,c,u,f,h,p,g,m,_;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");r=t.width,s=t.height,c=e,t.stride?f=t.stride:f=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,h=p.getContext("2d"),r=p.width,s=p.height,g=h.getImageData(0,0,r,s),c=g.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,h=e,r=p.width,s=p.height,g=h.getImageData(0,0,r,s),c=g.data,f=4):window.ImageData&&e instanceof window.ImageData&&(g=e,r=e.width,s=e.height,c=g.data,f=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(u=c,c=Array(r*s),m=0,_=Math.floor(u.length/f);m<_;m++)c[m]=u[m*f+o]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var y=Array(r*s),C=Array(r*s),E=Array(a),I=Array(a),b=Array(a+1),S=Array(a);for(m=0,_=r*s;m<_;m++){var B=c[m];y[m]=B===1?0:B===0?AL:Math.pow(Math.max(0,.5-B),2),C[m]=B===1?AL:B===0?0:Math.pow(Math.max(0,B-.5),2)}Ade(y,r,s,E,I,S,b),Ade(C,r,s,E,I,S,b);var v=window.Float32Array?new Float32Array(r*s):new Array(r*s);for(m=0,_=r*s;m<_;m++)v[m]=Math.min(Math.max(1-((y[m]-C[m])/i+n),0),1);return v}function Ade(e,t,n,i,o,r,s){for(var a=0;a{function lKe(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,u=9,f=10,h=11,p=12,g=13,m=14,_=15,y=16,C=17,E=0,I=1,b=2,S=3,B=4;function v(A,x){return 55296<=A.charCodeAt(x)&&A.charCodeAt(x)<=56319&&56320<=A.charCodeAt(x+1)&&A.charCodeAt(x+1)<=57343}function P(A,x){x===void 0&&(x=0);var T=A.charCodeAt(x);if(55296<=T&&T<=56319&&x=1){var w=A.charCodeAt(x-1),R=T;return 55296<=w&&w<=56319?(w-55296)*1024+(R-56320)+65536:R}return T}function N(A,x,T){var w=[A].concat(x).concat([T]),R=w[w.length-2],O=T,k=w.lastIndexOf(m);if(k>1&&w.slice(1,k).every(function(Q){return Q==i})&&[i,g,C].indexOf(A)==-1)return b;var F=w.lastIndexOf(o);if(F>0&&w.slice(1,F).every(function(Q){return Q==o})&&[p,o].indexOf(R)==-1)return w.filter(function(Q){return Q==o}).length%2==1?S:B;if(R==e&&O==t)return E;if(R==n||R==e||R==t)return O==m&&x.every(function(Q){return Q==i})?b:I;if(O==n||O==e||O==t)return I;if(R==s&&(O==s||O==a||O==u||O==f))return E;if((R==u||R==a)&&(O==a||O==c))return E;if((R==f||R==c)&&O==c)return E;if(O==i||O==_)return E;if(O==r)return E;if(R==p)return E;var z=w.indexOf(i)!=-1?w.lastIndexOf(i)-1:w.length-2;return[g,C].indexOf(w[z])!=-1&&w.slice(z+1,-1).every(function(Q){return Q==i})&&O==m||R==_&&[y,C].indexOf(O)!=-1?E:x.indexOf(o)!=-1?b:R==o&&O==o?E:I}this.nextBreak=function(A,x){if(x===void 0&&(x=0),x<0)return 0;if(x>=A.length-1)return A.length;for(var T=L(P(A,x)),w=[],R=x+1;R{(function(e,t){typeof n4=="object"&&typeof t_e<"u"?t(n4):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(n4,function(e){"use strict";function t(I){return I}function n(I){if(I==null)return t;var b,S,B=I.scale[0],v=I.scale[1],P=I.translate[0],N=I.translate[1];return function(L,A){A||(b=S=0);var x=2,T=L.length,w=new Array(T);for(w[0]=(b+=L[0])*B+P,w[1]=(S+=L[1])*v+N;xP&&(P=x[0]),x[1]N&&(N=x[1])}function A(x){switch(x.type){case"GeometryCollection":x.geometries.forEach(A);break;case"Point":L(x.coordinates);break;case"MultiPoint":x.coordinates.forEach(L);break}}I.arcs.forEach(function(x){for(var T=-1,w=x.length,R;++TP&&(P=R[0]),R[1]N&&(N=R[1])});for(S in I.objects)A(I.objects[S]);return[B,v,P,N]}function o(I,b){for(var S,B=I.length,v=B-b;v<--B;)S=I[v],I[v++]=I[B],I[B]=S}function r(I,b){return typeof b=="string"&&(b=I.objects[b]),b.type==="GeometryCollection"?{type:"FeatureCollection",features:b.geometries.map(function(S){return s(I,S)})}:s(I,b)}function s(I,b){var S=b.id,B=b.bbox,v=b.properties==null?{}:b.properties,P=a(I,b);return S==null&&B==null?{type:"Feature",properties:v,geometry:P}:B==null?{type:"Feature",id:S,properties:v,geometry:P}:{type:"Feature",id:S,bbox:B,properties:v,geometry:P}}function a(I,b){var S=n(I.transform),B=I.arcs;function v(T,w){w.length&&w.pop();for(var R=B[T<0?~T:T],O=0,k=R.length;O1)B=h(I,b,S);else for(v=0,B=new Array(P=I.arcs.length);v1)for(var w=1,R=L(x[0]),O,k;wR&&(k=x[0],x[0]=x[w],x[w]=k,R=O);return x}).filter(function(A){return A.length>0})}}function _(I,b){for(var S=0,B=I.length;S>>1;I[v]=2))throw new Error("n must be \u22652");A=I.bbox||i(I);var S=A[0],B=A[1],v=A[2],P=A[3],N;b={scale:[v-S?(v-S)/(N-1):1,P-B?(P-B)/(N-1):1],translate:[S,B]}}else A=I.bbox;var L=C(b),A,x,T=I.objects,w={};function R(F){return L(F)}function O(F){var z;switch(F.type){case"GeometryCollection":z={type:"GeometryCollection",geometries:F.geometries.map(O)};break;case"Point":z={type:"Point",coordinates:R(F.coordinates)};break;case"MultiPoint":z={type:"MultiPoint",coordinates:F.coordinates.map(R)};break;default:return F}return F.id!=null&&(z.id=F.id),F.bbox!=null&&(z.bbox=F.bbox),F.properties!=null&&(z.properties=F.properties),z}function k(F){var z=0,Q=1,H=F.length,j,Z=new Array(H);for(Z[0]=L(F[0],0);++zj_e,__assign:()=>r4,__asyncDelegator:()=>Q_e,__asyncGenerator:()=>F_e,__asyncValues:()=>k_e,__await:()=>LS,__awaiter:()=>P_e,__classPrivateFieldGet:()=>V_e,__classPrivateFieldIn:()=>W_e,__classPrivateFieldSet:()=>H_e,__createBinding:()=>a4,__decorate:()=>b_e,__disposeResources:()=>Y_e,__esDecorate:()=>S_e,__exportStar:()=>M_e,__extends:()=>I_e,__generator:()=>R_e,__importDefault:()=>z_e,__importStar:()=>G_e,__makeTemplateObject:()=>U_e,__metadata:()=>v_e,__param:()=>T_e,__propKey:()=>B_e,__read:()=>x7,__rest:()=>x_e,__rewriteRelativeImportExtension:()=>q_e,__runInitializers:()=>w_e,__setFunctionName:()=>D_e,__spread:()=>N_e,__spreadArray:()=>O_e,__spreadArrays:()=>L_e,__values:()=>s4,default:()=>kst});function I_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");E7(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function x_e(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 o=0,i=Object.getOwnPropertySymbols(e);o=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,n,r):s(t,n))||r);return o>3&&r&&Object.defineProperty(t,n,r),r}function T_e(e,t){return function(n,i){t(n,i,e)}}function S_e(e,t,n,i,o,r){function s(C){if(C!==void 0&&typeof C!="function")throw new TypeError("Function expected");return C}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):{}),h,p=!1,g=n.length-1;g>=0;g--){var m={};for(var _ in i)m[_]=_==="access"?{}:i[_];for(var _ in i.access)m.access[_]=i.access[_];m.addInitializer=function(C){if(p)throw new TypeError("Cannot add initializers after decoration has completed");r.push(s(C||null))};var y=(0,n[g])(a==="accessor"?{get:f.get,set:f.set}:f[c],m);if(a==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(h=s(y.get))&&(f.get=h),(h=s(y.set))&&(f.set=h),(h=s(y.init))&&o.unshift(h)}else(h=s(y))&&(a==="field"?o.unshift(h):f[c]=h)}u&&Object.defineProperty(u,i.name,f),p=!0}function w_e(e,t,n){for(var i=arguments.length>2,o=0;o0&&r[r.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]=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 x7(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),o,r=[],s;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)r.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return r}function N_e(){for(var e=[],t=0;t1||c(g,_)})},m&&(o[g]=m(o[g])))}function c(g,m){try{u(i[g](m))}catch(_){p(r[0][3],_)}}function u(g){g.value instanceof LS?Promise.resolve(g.value.v).then(f,h):p(r[0][2],g)}function f(g){c("next",g)}function h(g){c("throw",g)}function p(g,m){g(m),r.shift(),r.length&&c(r[0][0],r[0][1])}}function Q_e(e){var t,n;return t={},i("next"),i("throw",function(o){throw o}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(o,r){t[o]=e[o]?function(s){return(n=!n)?{value:LS(e[o](s)),done:!1}:r?r(s):s}:r}}function k_e(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 s4=="function"?s4(e):e[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(r){n[r]=e[r]&&function(s){return new Promise(function(a,c){s=e[r](s),o(a,c,s.done,s.value)})}}function o(r,s,a,c){Promise.resolve(c).then(function(u){r({value:u,done:a})},s)}}function U_e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function G_e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=I7(e),i=0;i{E7=function(e,t){return E7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},E7(e,t)};r4=function(){return r4=Object.assign||function(t){for(var n,i=1,o=arguments.length;i{"use strict";Object.defineProperty(c4,"__esModule",{value:!0});c4.version=void 0;c4.version="4.1.5"});var Yy=ci(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy.hasOwnProperty=void 0;jy.isBoolean=Ust;jy.ellipsis=Gst;jy.removeWithPredicate=zst;jy.assertNever=Vst;jy.hasOwnProperty=Object.prototype.hasOwnProperty;function Ust(e){return typeof e=="boolean"}function Gst(e,t,n){var i;return e.length>t&&(n==null?(n="…",i=3):i=n.length,e=e.substring(0,t-i)+n),e}function zst(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Vst(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}});var l4=ci(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.HtmlTag=_p.whitespaceRe=void 0;var Hst=Yy();_p.whitespaceRe=/\s+/;var Wst=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(_p.whitespaceRe):[],o=t.split(_p.whitespaceRe),r;r=o.shift();)i.indexOf(r)===-1&&i.push(r);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n=this.getClass(),i=n?n.split(_p.whitespaceRe):[],o=t.split(_p.whitespaceRe),r;i.length&&(r=o.shift());){var s=i.indexOf(r);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(),""].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var i in t)Hst.hasOwnProperty.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e}();_p.HtmlTag=Wst});var J_e=ci(T7=>{"use strict";Object.defineProperty(T7,"__esModule",{value:!0});T7.truncateSmart=jst;function jst(e,t,n){var i,o;if(n==null?(n="…",o=3,i=8):(o=n.length,i=n.length),e.length<=t)return e;var r=t-o,s=Yst(e);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),e=X_e(s))}if(e.length<=t||(s.host&&(s.host=s.host.replace(/^www\./,""),e=X_e(s)),e.length<=t))return e;var c="";if(s.host&&(c+=s.host),c.length>=r)return s.host.length===t?(s.host.substr(0,t-o)+n).substr(0,r+i):b7(c,r,n).substr(0,r+i);var u="";if(s.path&&(u+="/"+s.path),s.query&&(u+="?"+s.query),u)if((c+u).length>=r){if((c+u).length==t)return(c+u).substr(0,t);var f=r-c.length;return(c+b7(u,f,n)).substr(0,r+i)}else c+=u;if(s.fragment){var h="#"+s.fragment;if((c+h).length>=r){if((c+h).length==t)return(c+h).substr(0,t);var p=r-c.length;return(c+b7(h,p,n)).substr(0,r+i)}else c+=h}if(s.scheme&&s.host){var g=s.scheme+"://";if((c+g).length0&&(m=c.substr(-1*Math.floor(r/2))),(c.substr(0,Math.ceil(r/2))+n+m).substr(0,r+i)}function Yst(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 X_e(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 b7(e,t,n){var i=t/2,o=Math.ceil(i),r=-1*Math.floor(i),s="";return r<0&&(s=e.substr(r)),e.substr(0,o)+n+s}});var Z_e=ci(S7=>{"use strict";Object.defineProperty(S7,"__esModule",{value:!0});S7.truncateMiddle=qst;function qst(e,t,n){if(e.length<=t)return e;var i,o;n==null?(n="…",i=8,o=3):(i=n.length,o=n.length);var r=t-o,s="";return r>0&&(s=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+s).substr(0,r+i)}});var $_e=ci(w7=>{"use strict";Object.defineProperty(w7,"__esModule",{value:!0});w7.truncateEnd=Xst;var Kst=Yy();function Xst(e,t,n){return(0,Kst.ellipsis)(e,t,n)}});var B7=ci(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});u4.AnchorTagBuilder=void 0;var Jst=l4(),Zst=J_e(),$st=Z_e(),eat=$_e(),tat=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 Jst.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{"use strict";Object.defineProperty(f4,"__esModule",{value:!0});f4.AbstractMatch=void 0;var nat=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}();f4.AbstractMatch=nat});var dI=ci(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.isControlChar=iat;yf.isAsciiLetterChar=oat;yf.isDigitChar=rat;yf.isQuoteChar=sat;yf.isWhitespaceChar=aat;yf.isAlphaNumericOrMarkChar=cat;yf.isValidEmailLocalPartSpecialChar=lat;yf.isUrlSuffixAllowedSpecialChar=uat;yf.isUrlSuffixNotAllowedAsFinalChar=fat;yf.isOpenBraceChar=dat;yf.isCloseBraceChar=hat;function iat(e){return e>=0&&e<=31||e==127}function oat(e){return e>=65&&e<=90||e>=97&&e<=122}function rat(e){return e>=48&&e<=57}function sat(e){return e==34||e==39}function aat(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 cat(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 lat(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 uat(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 fat(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function dat(e){return e<91?e==40:e==91||e==123}function hat(e){return e<93?e==41:e==93||e==125}});var eye=ci(d4=>{"use strict";Object.defineProperty(d4,"__esModule",{value:!0});d4.tldRegex=void 0;d4.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 h4=ci(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.isDomainLabelStartChar=Go.isSchemeStartChar=Go.tldUrlHostRe=Go.schemeUrlRe=Go.invalidSchemeRe=Go.httpSchemePrefixRe=Go.httpSchemeRe=void 0;Go.isSchemeChar=pat;Go.isDomainLabelChar=Aat;Go.isPathChar=gat;Go.isUrlSuffixStartChar=_at;Go.isKnownTld=tye;Go.isValidSchemeUrl=yat;Go.isValidTldMatch=Cat;Go.isValidIpV4Address=xat;var hI=dI(),mat=eye();Go.httpSchemeRe=/https?:\/\//i;Go.httpSchemePrefixRe=new RegExp("^"+Go.httpSchemeRe.source,"i");Go.invalidSchemeRe=/^(javascript|vbscript):/i;Go.schemeUrlRe=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/;Go.tldUrlHostRe=/^(?:\/\/)?([^/#?:]+)/;Go.isSchemeStartChar=hI.isAsciiLetterChar;function pat(e){return(0,hI.isAsciiLetterChar)(e)||(0,hI.isDigitChar)(e)||e===43||e===45||e===46}Go.isDomainLabelStartChar=hI.isAlphaNumericOrMarkChar;function Aat(e){return e===95||(0,Go.isDomainLabelStartChar)(e)}function gat(e){return(0,hI.isAlphaNumericOrMarkChar)(e)||(0,hI.isUrlSuffixAllowedSpecialChar)(e)||(0,hI.isUrlSuffixNotAllowedAsFinalChar)(e)}function _at(e){return e===47||e===63||e===35}function tye(e){return mat.tldRegex.test(e.toLowerCase())}function yat(e){if(Go.invalidSchemeRe.test(e))return!1;var t=e.match(Go.schemeUrlRe);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function Cat(e){var t=e.match(Go.tldUrlHostRe);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!tye(o)}var Eat=/^(?:(?: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]?)$/,Iat=/[:/?#]/;function xat(e){var t=e.split(Iat,1)[0];return Eat.test(t)}});var D7=ci(m4=>{"use strict";Object.defineProperty(m4,"__esModule",{value:!0});m4.UrlMatch=void 0;var bat=(lm(),ih(cm)),Tat=fI(),Sat=h4(),wat=/^(https?:\/\/)?(?:www\.)?/i,Bat=/^\/\//,Dat=function(e){bat.__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(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=Rat(n)),this.stripPrefix.scheme&&(n=vat(n)),this.stripPrefix.www&&(n=Pat(n)),this.stripTrailingSlash&&(n=Mat(n)),this.decodePercentEncoding&&(n=Nat(n)),n},t}(Tat.AbstractMatch);m4.UrlMatch=Dat;function vat(e){return e.replace(Sat.httpSchemePrefixRe,"")}function Pat(e){return e.includes("www.")?e.replace(wat,"$1"):e}function Rat(e){return e.replace(Bat,"")}function Mat(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function Nat(e){var t=e.replace(/%(?:22|26|27|3C|3E)/gi,function(n){return n==="%22"?""":n==="%26"?"&":n==="%27"?"'":n==="%3C"||n==="%3c"?"<":">"});if(t.includes("%"))try{return decodeURIComponent(t)}catch{}return t}});var iye=ci(kg=>{"use strict";Object.defineProperty(kg,"__esModule",{value:!0});kg.isEmailLocalPartStartChar=kg.mailtoSchemePrefixRe=void 0;kg.isEmailLocalPartChar=Oat;kg.isValidEmail=Fat;var nye=dI(),Lat=h4();kg.mailtoSchemePrefixRe=/^mailto:/i;kg.isEmailLocalPartStartChar=nye.isAlphaNumericOrMarkChar;function Oat(e){return(0,kg.isEmailLocalPartStartChar)(e)||(0,nye.isValidEmailLocalPartSpecialChar)(e)}function Fat(e){var t=e.split(".").pop();return(0,Lat.isKnownTld)(t)}});var v7=ci(p4=>{"use strict";Object.defineProperty(p4,"__esModule",{value:!0});p4.EmailMatch=void 0;var Qat=(lm(),ih(cm)),kat=fI(),Uat=function(e){Qat.__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}(kat.AbstractMatch);p4.EmailMatch=Uat});var P7=ci(OS=>{"use strict";Object.defineProperty(OS,"__esModule",{value:!0});OS.hashtagServices=void 0;OS.isHashtagTextChar=zat;OS.isValidHashtag=Vat;var Gat=dI();function zat(e){return e===95||(0,Gat.isAlphaNumericOrMarkChar)(e)}function Vat(e){return e.length<=140}OS.hashtagServices=["twitter","facebook","instagram","tiktok","youtube"]});var R7=ci(A4=>{"use strict";Object.defineProperty(A4,"__esModule",{value:!0});A4.HashtagMatch=void 0;var Hat=(lm(),ih(cm)),Wat=Yy(),jat=fI(),Yat=function(e){Hat.__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,Wat.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}(jat.AbstractMatch);A4.HashtagMatch=Yat});var M7=ci(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.mentionServices=void 0;FS.isMentionTextChar=Kat;FS.isValidMention=Xat;var oye=dI(),qat={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function Kat(e){return e===45||e===46||e===95||(0,oye.isAsciiLetterChar)(e)||(0,oye.isDigitChar)(e)}function Xat(e,t){var n=qat[t];return n.test(e)}FS.mentionServices=["twitter","instagram","soundcloud","tiktok","youtube"]});var N7=ci(g4=>{"use strict";Object.defineProperty(g4,"__esModule",{value:!0});g4.MentionMatch=void 0;var Jat=(lm(),ih(cm)),Zat=Yy(),$at=fI(),ect=function(e){Jat.__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,Zat.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}($at.AbstractMatch);g4.MentionMatch=ect});var rye=ci(NF=>{"use strict";Object.defineProperty(NF,"__esModule",{value:!0});NF.isPhoneNumberSeparatorChar=rct;NF.isPhoneNumberControlChar=sct;NF.isValidPhoneNumber=act;var tct=/[-. ()]/,nct=/(?:(?:(?:(\+)?\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]+#?)*/,ict=/(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})/,oct=new RegExp("^".concat(nct.source,"|").concat(ict.source,"$"));function rct(e){return e===45||e===46||e===32}function sct(e){return e===44||e===59}function act(e){var t=e.charAt(0)==="+"||tct.test(e);return t&&oct.test(e)}});var L7=ci(_4=>{"use strict";Object.defineProperty(_4,"__esModule",{value:!0});_4.PhoneMatch=void 0;var cct=(lm(),ih(cm)),lct=fI(),uct=function(e){cct.__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}(lct.AbstractMatch);_4.PhoneMatch=uct});var U7=ci(I4=>{"use strict";Object.defineProperty(I4,"__esModule",{value:!0});I4.parseMatches=gct;I4.excludeUnbalancedTrailingBracesAndPunctuation=cye;var fct=D7(),y4=Yy(),gr=h4(),QS=iye(),dct=v7(),Q7=P7(),hct=R7(),k7=M7(),mct=N7(),kS=rye(),pct=L7(),Ls=dI(),Act=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),aye(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),aye(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function gct(e,t){for(var n=new Act(e,t);n.charIdx=0;r--){var s=n.stateMachines[r];switch(s.state){case 11:xct(n,s,o);break;case 12:bct(n,s,o);break;case 0:_ct(n,s,o);break;case 1:yct(n,s,o);break;case 2:Cct(n,s,o);break;case 3:Ect(n,s,o);break;case 4:Ict(n,s,i,o);break;case 5:Tct(n,s,o);break;case 6:Sct(n,s,i,o);break;case 7:wct(n,s,i,o);break;case 13:Bct(n,s,o);break;case 14:Dct(n,s,o);break;case 8:vct(n,s,o);break;case 9:Pct(n,s,o);break;case 10:Rct(n,s,o);break;case 15:Mct(n,s,i,o);break;case 16:Nct(n,s,i,o);break;case 17:Lct(n,s,i,o);break;case 18:Oct(n,s,i,o);break;case 19:Fct(n,s,i,o);break;case 20:Qct(n,s,o);break;case 21:kct(n,s,o);break;case 22:mI(n,s,o);break;case 23:Uct(n,s,o);break;case 24:Gct(n,s,o);break;case 25:zct(n,s,o);break;case 26:Vct(n,s,o);break;case 27:Hct(n,s,o);break;case 28:Wct(n,s,o);break;case 29:jct(n,s,o);break;case 30:Yct(n,s,o);break;case 31:qct(n,s,o);break;case 32:Xct(n,s,i,o);break;case 33:Jct(n,s,o);break;case 34:Zct(n,s,o);break;case 35:$ct(n,s,o);break;case 36:elt(n,s,i,o);break;case 37:Kct(n,s,i,o);break;case 38:tlt(n,s,i,o);break;case 39:nlt(n,s,i,o);break;case 40:ilt(n,s,o);break;case 41:olt(n,s,o);break;default:(0,y4.assertNever)(s.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&(0,gr.isSchemeStartChar)(o)){var a=n.text.charCodeAt(n.charIdx-1);(0,gr.isSchemeStartChar)(a)||n.addMachine(E4(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(u){return ls(n,u)});return n.matches}function C4(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(clt(i,28));else if(n===64)e.addMachine(llt(i,30));else if(n===47)e.addMachine(F7(i,11));else if(n===43)e.addMachine(O7(i,37));else if(n===40)e.addMachine(O7(i,32));else{if((0,Ls.isDigitChar)(n)&&(e.addMachine(O7(i,38)),e.addMachine(slt(i,13))),(0,QS.isEmailLocalPartStartChar)(n)){var o=t.toLowerCase()==="m"?15:22;e.addMachine(alt(i,o))}(0,gr.isSchemeStartChar)(n)&&e.addMachine(E4(i,0)),(0,Ls.isAlphaNumericOrMarkChar)(n)&&e.addMachine(F7(i,5))}}function _ct(e,t,n){n===58?t.state=2:n===45?t.state=1:(0,gr.isSchemeChar)(n)||e.removeMachine(t)}function yct(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(F7(i,11))):(0,gr.isSchemeChar)(n)?t.state=0:e.removeMachine(t))}function Cct(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):(0,gr.isDomainLabelStartChar)(n)?(t.state=5,(0,gr.isSchemeStartChar)(n)&&e.addMachine(E4(i,0))):e.removeMachine(t)}function Ect(e,t,n){n===47?t.state=4:(0,gr.isPathChar)(n)?(t.state=10,t.acceptStateReached=!0):ls(e,t)}function Ict(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):(0,gr.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function xct(e,t,n){n===47?t.state=12:e.removeMachine(t)}function bct(e,t,n){(0,gr.isDomainLabelStartChar)(n)?t.state=5:e.removeMachine(t)}function Tct(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:(0,gr.isUrlSuffixStartChar)(n)?t.state=10:(0,gr.isDomainLabelChar)(n)||ls(e,t)}function Sct(e,t,n,i){i===45||(i===46?ls(e,t):(0,gr.isDomainLabelStartChar)(i)?t.state=5:ls(e,t))}function wct(e,t,n,i){i===46?ls(e,t):(0,gr.isDomainLabelStartChar)(i)?(t.state=5,t.acceptStateReached=!0):ls(e,t)}function Bct(e,t,n){n===46?t.state=14:n===58?t.state=8:(0,Ls.isDigitChar)(n)||((0,gr.isUrlSuffixStartChar)(n)?t.state=10:(0,Ls.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):ls(e,t))}function Dct(e,t,n){(0,Ls.isDigitChar)(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):ls(e,t)}function vct(e,t,n){(0,Ls.isDigitChar)(n)?t.state=9:ls(e,t)}function Pct(e,t,n){(0,Ls.isDigitChar)(n)||((0,gr.isUrlSuffixStartChar)(n)?t.state=10:ls(e,t))}function Rct(e,t,n){(0,gr.isPathChar)(n)||ls(e,t)}function Mct(e,t,n,i){n.toLowerCase()==="a"?t.state=16:mI(e,t,i)}function Nct(e,t,n,i){n.toLowerCase()==="i"?t.state=17:mI(e,t,i)}function Lct(e,t,n,i){n.toLowerCase()==="l"?t.state=18:mI(e,t,i)}function Oct(e,t,n,i){n.toLowerCase()==="t"?t.state=19:mI(e,t,i)}function Fct(e,t,n,i){n.toLowerCase()==="o"?t.state=20:mI(e,t,i)}function Qct(e,t,n){n===58?t.state=21:mI(e,t,n)}function kct(e,t,n){(0,QS.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function mI(e,t,n){n===46?t.state=23:n===64?t.state=24:(0,QS.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function Uct(e,t,n){n===46||n===64?e.removeMachine(t):(0,QS.isEmailLocalPartChar)(n)?t.state=22:e.removeMachine(t)}function Gct(e,t,n){(0,gr.isDomainLabelStartChar)(n)?t.state=25:e.removeMachine(t)}function zct(e,t,n){n===46?t.state=27:n===45?t.state=26:(0,gr.isDomainLabelChar)(n)||ls(e,t)}function Vct(e,t,n){n===45||n===46?ls(e,t):(0,gr.isDomainLabelChar)(n)?t.state=25:ls(e,t)}function Hct(e,t,n){n===46||n===45?ls(e,t):(0,gr.isDomainLabelStartChar)(n)?(t.state=25,t.acceptStateReached=!0):ls(e,t)}function Wct(e,t,n){(0,Q7.isHashtagTextChar)(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function jct(e,t,n){(0,Q7.isHashtagTextChar)(n)||ls(e,t)}function Yct(e,t,n){(0,k7.isMentionTextChar)(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function qct(e,t,n){(0,k7.isMentionTextChar)(n)||((0,Ls.isAlphaNumericOrMarkChar)(n)?e.removeMachine(t):ls(e,t))}function Kct(e,t,n,i){(0,Ls.isDigitChar)(i)?t.state=38:(e.removeMachine(t),C4(e,n,i))}function Xct(e,t,n,i){(0,Ls.isDigitChar)(i)?t.state=33:e.removeMachine(t),C4(e,n,i)}function Jct(e,t,n){(0,Ls.isDigitChar)(n)?t.state=34:e.removeMachine(t)}function Zct(e,t,n){(0,Ls.isDigitChar)(n)?t.state=35:e.removeMachine(t)}function $ct(e,t,n){n===41?t.state=36:e.removeMachine(t)}function elt(e,t,n,i){(0,Ls.isDigitChar)(i)?t.state=38:(0,kS.isPhoneNumberSeparatorChar)(i)?t.state=39:e.removeMachine(t)}function tlt(e,t,n,i){var o=e.charIdx;t.acceptStateReached=!0,(0,kS.isPhoneNumberControlChar)(i)?t.state=40:i===35?t.state=41:(0,Ls.isDigitChar)(i)||(i===40?t.state=32:(0,kS.isPhoneNumberSeparatorChar)(i)?t.state=39:(ls(e,t),(0,gr.isSchemeStartChar)(i)&&e.addMachine(E4(o,0))))}function nlt(e,t,n,i){(0,Ls.isDigitChar)(i)?t.state=38:i===40?t.state=32:(ls(e,t),C4(e,n,i))}function ilt(e,t,n){(0,kS.isPhoneNumberControlChar)(n)||(n===35?t.state=41:(0,Ls.isDigitChar)(n)?t.state=38:ls(e,t))}function olt(e,t,n){(0,kS.isPhoneNumberControlChar)(n)?t.state=40:(0,Ls.isDigitChar)(n)?e.removeMachine(t):ls(e,t)}function ls(e,t){var n=e.matches,i=e.text,o=e.charIdx,r=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,c=e.decodePercentEncoding,u=e.hashtagServiceName,f=e.mentionServiceName;if(e.removeMachine(t),!!t.acceptStateReached){var h=t.startIdx,p=i.slice(t.startIdx,o);switch(p=cye(p),t.type){case 0:{var g=i.charCodeAt(t.startIdx-1);if(g===64)return;switch(t.matchType){case 0:{var m=gr.httpSchemeRe.exec(p);if(m&&(h=h+m.index,p=p.slice(m.index)),!(0,gr.isValidSchemeUrl)(p))return;break}case 1:{if(!(0,gr.isValidTldMatch)(p))return;break}case 2:{if(!(0,gr.isValidIpV4Address)(p))return;break}default:(0,y4.assertNever)(t)}n.push(new fct.UrlMatch({tagBuilder:r,matchedText:p,offset:h,urlMatchType:rlt(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:c}));break}case 1:{(0,QS.isValidEmail)(p)&&n.push(new dct.EmailMatch({tagBuilder:r,matchedText:p,offset:h,email:p.replace(QS.mailtoSchemePrefixRe,"")}));break}case 2:{(0,Q7.isValidHashtag)(p)&&n.push(new hct.HashtagMatch({tagBuilder:r,matchedText:p,offset:h,serviceName:u,hashtag:p.slice(1)}));break}case 3:{(0,k7.isValidMention)(p,f)&&n.push(new mct.MentionMatch({tagBuilder:r,matchedText:p,offset:h,serviceName:f,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),(0,kS.isValidPhoneNumber)(p)){var _=p.replace(/[^0-9,;#]/g,"");n.push(new pct.PhoneMatch({tagBuilder:r,matchedText:p,offset:h,number:_,plusSign:p.charAt(0)==="+"}))}break}default:(0,y4.assertNever)(t)}}}function rlt(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:(0,y4.assertNever)(e)}}var sye={")":"(","}":"{","]":"["};function cye(e){for(var t={"(":0,"{":0,"[":0},n=0;n=0;){var i=e.charAt(r),o=e.charCodeAt(r);if((0,Ls.isCloseBraceChar)(o)){var s=sye[i];if(t[s]<0)t[s]++,r--;else break}else if((0,Ls.isUrlSuffixNotAllowedAsFinalChar)(o))r--;else break}return e.slice(0,r+1)}function E4(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function F7(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function slt(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function alt(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function clt(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function llt(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function O7(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function aye(e){return e.type===0&&e.matchType===0}});var lye=ci(V7=>{"use strict";Object.defineProperty(V7,"__esModule",{value:!0});V7.parseHtml=dlt;var Kc=(lm(),ih(cm)),Ql=dI(),ult=Yy(),yp=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}(),z7=new yp,flt=function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=z7,this.html=t,this.callbacks=n}return e}();function dlt(e,t){for(var n=new flt(e,t),i=e.length;n.charIdx"?(e.currentTag=new yp(Kc.__assign(Kc.__assign({},e.currentTag),{name:G7(e)})),Ep(e)):!(0,Ql.isAsciiLetterChar)(n)&&!(0,Ql.isDigitChar)(n)&&t!==":"&&Od(e)}function Alt(e,t,n){t===">"?Od(e):(0,Ql.isAsciiLetterChar)(n)?e.state=3:Od(e)}function glt(e,t,n){(0,Ql.isWhitespaceChar)(n)||(t==="/"?e.state=12:t===">"?Ep(e):t==="<"?Cp(e):t==="="||(0,Ql.isQuoteChar)(n)||(0,Ql.isControlChar)(n)?Od(e):e.state=5)}function _lt(e,t,n){(0,Ql.isWhitespaceChar)(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Ep(e):t==="<"?Cp(e):(0,Ql.isQuoteChar)(n)&&Od(e)}function ylt(e,t,n){(0,Ql.isWhitespaceChar)(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Ep(e):t==="<"?Cp(e):(0,Ql.isQuoteChar)(n)?Od(e):e.state=5)}function Clt(e,t,n){(0,Ql.isWhitespaceChar)(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?Od(e):t==="<"?Cp(e):e.state=10)}function Elt(e,t){t==='"'&&(e.state=11)}function Ilt(e,t){t==="'"&&(e.state=11)}function xlt(e,t,n){(0,Ql.isWhitespaceChar)(n)?e.state=4:t===">"?Ep(e):t==="<"&&Cp(e)}function blt(e,t,n){(0,Ql.isWhitespaceChar)(n)?e.state=4:t==="/"?e.state=12:t===">"?Ep(e):t==="<"?Cp(e):(e.state=4,Llt(e))}function Tlt(e,t){t===">"?(e.currentTag=new yp(Kc.__assign(Kc.__assign({},e.currentTag),{isClosing:!0})),Ep(e)):Od(e)}function Slt(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new yp(Kc.__assign(Kc.__assign({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new yp(Kc.__assign(Kc.__assign({},e.currentTag),{type:"doctype"})),e.state=20):Od(e)}function wlt(e,t){t==="-"?e.state=15:t===">"?Od(e):e.state=16}function Blt(e,t){t==="-"?e.state=18:t===">"?Od(e):e.state=16}function Dlt(e,t){t==="-"&&(e.state=17)}function vlt(e,t){t==="-"?e.state=18:e.state=16}function Plt(e,t){t===">"?Ep(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function Rlt(e,t){t==="-"?e.state=17:t===">"?Ep(e):e.state=16}function Mlt(e,t){t===">"?Ep(e):t==="<"&&Cp(e)}function Od(e){e.state=0,e.currentTag=z7}function Cp(e){e.state=1,e.currentTag=new yp({idx:e.charIdx})}function Ep(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)),Od(e),e.currentDataIdx=e.charIdx+1}function Nlt(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function G7(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function Llt(e){e.charIdx--}});var x4=ci(W7=>{"use strict";Object.defineProperty(W7,"__esModule",{value:!0});var H7=(lm(),ih(cm)),Olt=K_e(),Ea=Yy(),Flt=B7(),Qlt=l4(),klt=U7(),Ult=lye(),Glt=M7(),zlt=P7(),Vlt=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=Hlt(t.urls),this.email=(0,Ea.isBoolean)(t.email)?t.email:this.email,this.phone=(0,Ea.isBoolean)(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=(0,Ea.isBoolean)(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=Wlt(t.stripPrefix),this.stripTrailingSlash=(0,Ea.isBoolean)(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=(0,Ea.isBoolean)(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&Glt.mentionServices.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&zlt.hashtagServices.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=jlt(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"],o=0,r=[];return(0,Ult.parseHtml)(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var c=/( | |<|<|>|>|"|"|')/gi,u=s.split(c),f=a;u.forEach(function(h,p){if(p%2===0){var g=n.parseText(h,f);r.push.apply(r,H7.__spreadArray([],H7.__read(g),!1))}f+=h.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(){},onDoctype:function(){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(Ylt);for(var n=0;nr?n:n+1;t.splice(s,1);continue}n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="hashtag"}),this.email||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="email"}),this.phone||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="phone"}),this.mention||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||(0,Ea.removeWithPredicate)(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||(0,Ea.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,klt.parseMatches)(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),o=0,r=i.length;o/g,">"));for(var n=this.parse(t),i=new Array(n.length*2+1),o=0,r=0,s=n.length;r{"use strict";Object.defineProperty(uye,"__esModule",{value:!0})});var dye=ci(Ug=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});var pI=(lm(),ih(cm));pI.__exportStar(fye(),Ug);pI.__exportStar(v7(),Ug);pI.__exportStar(R7(),Ug);pI.__exportStar(fI(),Ug);pI.__exportStar(N7(),Ug);pI.__exportStar(L7(),Ug);pI.__exportStar(D7(),Ug)});var hye=ci(j7=>{"use strict";Object.defineProperty(j7,"__esModule",{value:!0});var qlt=(lm(),ih(cm));qlt.__exportStar(U7(),j7)});var Y7=ci((um,pye)=>{"use strict";um=pye.exports=x4().default;Object.defineProperty(um,"__esModule",{value:!0});um.Autolinker=void 0;var US=(lm(),ih(cm)),mye=US.__importDefault(x4());um.Autolinker=mye.default;um.default=mye.default;US.__exportStar(x4(),um);US.__exportStar(B7(),um);US.__exportStar(l4(),um);US.__exportStar(dye(),um);US.__exportStar(hye(),um)});var VZ=ci((exports,module)=>{/*! * protobuf.js v7.5.3 (c) 2016, daniel wirtz * compiled wed, 28 may 2025 22:23:47 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details */(function(undefined){"use strict";(function(t,n,i){function o(s){var a=n[s];return a||t[s][0].call(a=n[s]={exports:{}},o,a,a.exports),a.exports}var r=o(i[0]);r.util.global.protobuf=r,typeof define=="function"&&define.amd&&define(["long"],function(s){return s&&s.isLong&&(r.util.Long=s,r.configure()),r}),typeof module=="object"&&module&&module.exports&&(module.exports=r)})({1:[function(e,t,n){"use strict";t.exports=i;function i(o,r){for(var s=new Array(arguments.length-1),a=0,c=2,u=!0;c1&&u.charAt(f)==="=";)++h;return Math.ceil(u.length*3)/4-h};for(var o=new Array(64),r=new Array(123),s=0;s<64;)r[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(u,f,h){for(var p=null,g=[],m=0,_=0,y;f>2],y=(C&3)<<4,_=1;break;case 1:g[m++]=o[y|C>>4],y=(C&15)<<2,_=2;break;case 2:g[m++]=o[y|C>>6],g[m++]=o[C&63],_=0;break}m>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,g)),m=0)}return _&&(g[m++]=o[y],g[m++]=61,_===1&&(g[m++]=61)),p?(m&&p.push(String.fromCharCode.apply(String,g.slice(0,m))),p.join("")):String.fromCharCode.apply(String,g.slice(0,m))};var a="invalid encoding";i.decode=function(u,f,h){for(var p=h,g=0,m,_=0;_1)break;if((y=r[y])===undefined)throw Error(a);switch(g){case 0:m=y,g=1;break;case 1:f[h++]=m<<2|(y&48)>>4,m=y,g=2;break;case 2:f[h++]=(m&15)<<4|(y&60)>>2,m=y,g=3;break;case 3:f[h++]=(m&3)<<6|y,g=0;break}}if(g===1)throw Error(a);return h-p},i.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}},{}],3:[function(e,t,n){"use strict";t.exports=i;function i(){this._listeners={}}i.prototype.on=function(r,s,a){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:a||this}),this},i.prototype.off=function(r,s){if(r===undefined)this._listeners={};else if(s===undefined)this._listeners[r]=[];else for(var a=this._listeners[r],c=0;c0?0:2147483648,g,m);else if(isNaN(p))h(2143289344,g,m);else if(p>34028234663852886e22)h((_<<31|2139095040)>>>0,g,m);else if(p<11754943508222875e-54)h((_<<31|Math.round(p/1401298464324817e-60))>>>0,g,m);else{var y=Math.floor(Math.log(p)/Math.LN2),C=Math.round(p*Math.pow(2,-y)*8388608)&8388607;h((_<<31|y+127<<23|C)>>>0,g,m)}}c.writeFloatLE=u.bind(null,o),c.writeFloatBE=u.bind(null,r);function f(h,p,g){var m=h(p,g),_=(m>>31)*2+1,y=m>>>23&255,C=m&8388607;return y===255?C?NaN:_*(1/0):y===0?_*1401298464324817e-60*C:_*Math.pow(2,y-150)*(C+8388608)}c.readFloatLE=f.bind(null,s),c.readFloatBE=f.bind(null,a)}(),typeof Float64Array<"u"?function(){var u=new Float64Array([-0]),f=new Uint8Array(u.buffer),h=f[7]===128;function p(y,C,E){u[0]=y,C[E]=f[0],C[E+1]=f[1],C[E+2]=f[2],C[E+3]=f[3],C[E+4]=f[4],C[E+5]=f[5],C[E+6]=f[6],C[E+7]=f[7]}function g(y,C,E){u[0]=y,C[E]=f[7],C[E+1]=f[6],C[E+2]=f[5],C[E+3]=f[4],C[E+4]=f[3],C[E+5]=f[2],C[E+6]=f[1],C[E+7]=f[0]}c.writeDoubleLE=h?p:g,c.writeDoubleBE=h?g:p;function m(y,C){return f[0]=y[C],f[1]=y[C+1],f[2]=y[C+2],f[3]=y[C+3],f[4]=y[C+4],f[5]=y[C+5],f[6]=y[C+6],f[7]=y[C+7],u[0]}function _(y,C){return f[7]=y[C],f[6]=y[C+1],f[5]=y[C+2],f[4]=y[C+3],f[3]=y[C+4],f[2]=y[C+5],f[1]=y[C+6],f[0]=y[C+7],u[0]}c.readDoubleLE=h?m:_,c.readDoubleBE=h?_:m}():function(){function u(h,p,g,m,_,y){var C=m<0?1:0;if(C&&(m=-m),m===0)h(0,_,y+p),h(1/m>0?0:2147483648,_,y+g);else if(isNaN(m))h(0,_,y+p),h(2146959360,_,y+g);else if(m>17976931348623157e292)h(0,_,y+p),h((C<<31|2146435072)>>>0,_,y+g);else{var E;if(m<22250738585072014e-324)E=m/5e-324,h(E>>>0,_,y+p),h((C<<31|E/4294967296)>>>0,_,y+g);else{var I=Math.floor(Math.log(m)/Math.LN2);I===1024&&(I=1023),E=m*Math.pow(2,-I),h(E*4503599627370496>>>0,_,y+p),h((C<<31|I+1023<<20|E*1048576&1048575)>>>0,_,y+g)}}}c.writeDoubleLE=u.bind(null,o,0,4),c.writeDoubleBE=u.bind(null,r,4,0);function f(h,p,g,m,_){var y=h(m,_+p),C=h(m,_+g),E=(C>>31)*2+1,I=C>>>20&2047,b=4294967296*(C&1048575)+y;return I===2047?b?NaN:E*(1/0):I===0?E*5e-324*b:E*Math.pow(2,I-1075)*(b+4503599627370496)}c.readDoubleLE=f.bind(null,s,0,4),c.readDoubleBE=f.bind(null,a,4,0)}(),c}function o(c,u,f){u[f]=c&255,u[f+1]=c>>>8&255,u[f+2]=c>>>16&255,u[f+3]=c>>>24}function r(c,u,f){u[f]=c>>>24,u[f+1]=c>>>16&255,u[f+2]=c>>>8&255,u[f+3]=c&255}function s(c,u){return(c[u]|c[u+1]<<8|c[u+2]<<16|c[u+3]<<24)>>>0}function a(c,u){return(c[u]<<24|c[u+1]<<16|c[u+2]<<8|c[u+3])>>>0}},{}],5:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],6:[function(e,t,n){"use strict";t.exports=i;function i(o,r,s){var a=s||8192,c=a>>>1,u=null,f=a;return function(p){if(p<1||p>c)return o(p);f+p>a&&(u=o(a),f=0);var g=r.call(u,f,f+=p);return f&7&&(f=(f|7)+1),g}}},{}],7:[function(e,t,n){"use strict";var i=n;i.length=function(r){for(var s=0,a=0,c=0;c191&&p<224?f[h++]=(p&31)<<6|r[s++]&63:p>239&&p<365?(p=((p&7)<<18|(r[s++]&63)<<12|(r[s++]&63)<<6|r[s++]&63)-65536,f[h++]=55296+(p>>10),f[h++]=56320+(p&1023)):f[h++]=(p&15)<<12|(r[s++]&63)<<6|r[s++]&63,h>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,f)),h=0);return u?(h&&u.push(String.fromCharCode.apply(String,f.slice(0,h))),u.join("")):String.fromCharCode.apply(String,f.slice(0,h))},i.write=function(r,s,a){for(var c=a,u,f,h=0;h>6|192,s[a++]=u&63|128):(u&64512)===55296&&((f=r.charCodeAt(h+1))&64512)===56320?(u=65536+((u&1023)<<10)+(f&1023),++h,s[a++]=u>>18|240,s[a++]=u>>12&63|128,s[a++]=u>>6&63|128,s[a++]=u&63|128):(s[a++]=u>>12|224,s[a++]=u>>6&63|128,s[a++]=u&63|128);return a-c}},{}],8:[function(e,t,n){"use strict";var i=n;i.build="minimal",i.Writer=e(16),i.BufferWriter=e(17),i.Reader=e(9),i.BufferReader=e(10),i.util=e(15),i.rpc=e(12),i.roots=e(11),i.configure=o;function o(){i.util._configure(),i.Writer._configure(i.BufferWriter),i.Reader._configure(i.BufferReader)}o()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(e,t,n){"use strict";t.exports=c;var i=e(15),o,r=i.LongBits,s=i.utf8;function a(m,_){return RangeError("index out of range: "+m.pos+" + "+(_||1)+" > "+m.len)}function c(m){this.buf=m,this.pos=0,this.len=m.length}var u=typeof Uint8Array<"u"?function(_){if(_ instanceof Uint8Array||Array.isArray(_))return new c(_);throw Error("illegal buffer")}:function(_){if(Array.isArray(_))return new c(_);throw Error("illegal buffer")},f=function(){return i.Buffer?function(y){return(c.create=function(E){return i.Buffer.isBuffer(E)?new o(E):u(E)})(y)}:u};c.create=f(),c.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,c.prototype.uint32=function(){var _=4294967295;return function(){if(_=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(_=(_|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return _;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return _}}(),c.prototype.int32=function(){return this.uint32()|0},c.prototype.sint32=function(){var _=this.uint32();return _>>>1^-(_&1)|0};function h(){var m=new r(0,0),_=0;if(this.len-this.pos>4){for(;_<4;++_)if(m.lo=(m.lo|(this.buf[this.pos]&127)<<_*7)>>>0,this.buf[this.pos++]<128)return m;if(m.lo=(m.lo|(this.buf[this.pos]&127)<<28)>>>0,m.hi=(m.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return m;_=0}else{for(;_<3;++_){if(this.pos>=this.len)throw a(this);if(m.lo=(m.lo|(this.buf[this.pos]&127)<<_*7)>>>0,this.buf[this.pos++]<128)return m}return m.lo=(m.lo|(this.buf[this.pos++]&127)<<_*7)>>>0,m}if(this.len-this.pos>4){for(;_<5;++_)if(m.hi=(m.hi|(this.buf[this.pos]&127)<<_*7+3)>>>0,this.buf[this.pos++]<128)return m}else for(;_<5;++_){if(this.pos>=this.len)throw a(this);if(m.hi=(m.hi|(this.buf[this.pos]&127)<<_*7+3)>>>0,this.buf[this.pos++]<128)return m}throw Error("invalid varint encoding")}c.prototype.bool=function(){return this.uint32()!==0};function p(m,_){return(m[_-4]|m[_-3]<<8|m[_-2]<<16|m[_-1]<<24)>>>0}c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)|0};function g(){if(this.pos+8>this.len)throw a(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var _=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,_},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var _=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,_},c.prototype.bytes=function(){var _=this.uint32(),y=this.pos,C=this.pos+_;if(C>this.len)throw a(this,_);if(this.pos+=_,Array.isArray(this.buf))return this.buf.slice(y,C);if(y===C){var E=i.Buffer;return E?E.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,y,C)},c.prototype.string=function(){var _=this.bytes();return s.read(_,0,_.length)},c.prototype.skip=function(_){if(typeof _=="number"){if(this.pos+_>this.len)throw a(this,_);this.pos+=_}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},c.prototype.skipType=function(m){switch(m){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(m=this.uint32()&7)!==4;)this.skipType(m);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+m+" at offset "+this.pos)}return this},c._configure=function(m){o=m,c.create=f(),o._configure();var _=i.Long?"toLong":"toNumber";i.merge(c.prototype,{int64:function(){return h.call(this)[_](!1)},uint64:function(){return h.call(this)[_](!0)},sint64:function(){return h.call(this).zzDecode()[_](!1)},fixed64:function(){return g.call(this)[_](!0)},sfixed64:function(){return g.call(this)[_](!1)}})}},{15:15}],10:[function(e,t,n){"use strict";t.exports=r;var i=e(9);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(s){i.call(this,s)}r._configure=function(){o.Buffer&&(r.prototype._slice=o.Buffer.prototype.slice)},r.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},r._configure()},{15:15,9:9}],11:[function(e,t,n){"use strict";t.exports={}},{}],12:[function(e,t,n){"use strict";var i=n;i.Service=e(13)},{13:13}],13:[function(e,t,n){"use strict";t.exports=o;var i=e(15);(o.prototype=Object.create(i.EventEmitter.prototype)).constructor=o;function o(r,s,a){if(typeof r!="function")throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=r,this.requestDelimited=!!s,this.responseDelimited=!!a}o.prototype.rpcCall=function r(s,a,c,u,f){if(!u)throw TypeError("request must be specified");var h=this;if(!f)return i.asPromise(r,h,s,a,c,u);if(!h.rpcImpl)return setTimeout(function(){f(Error("already ended"))},0),undefined;try{return h.rpcImpl(s,a[h.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(g,m){if(g)return h.emit("error",g,s),f(g);if(m===null)return h.end(!0),undefined;if(!(m instanceof c))try{m=c[h.responseDelimited?"decodeDelimited":"decode"](m)}catch(_){return h.emit("error",_,s),f(_)}return h.emit("data",m,s),f(null,m)})}catch(p){return h.emit("error",p,s),setTimeout(function(){f(p)},0),undefined}},o.prototype.end=function(s){return this.rpcImpl&&(s||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(e,t,n){"use strict";t.exports=o;var i=e(15);function o(c,u){this.lo=c>>>0,this.hi=u>>>0}var r=o.zero=new o(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(u){if(u===0)return r;var f=u<0;f&&(u=-u);var h=u>>>0,p=(u-h)/4294967296>>>0;return f&&(p=~p>>>0,h=~h>>>0,++h>4294967295&&(h=0,++p>4294967295&&(p=0))),new o(h,p)},o.from=function(u){if(typeof u=="number")return o.fromNumber(u);if(i.isString(u))if(i.Long)u=i.Long.fromString(u);else return o.fromNumber(parseInt(u,10));return u.low||u.high?new o(u.low>>>0,u.high>>>0):r},o.prototype.toNumber=function(u){if(!u&&this.hi>>>31){var f=~this.lo+1>>>0,h=~this.hi>>>0;return f||(h=h+1>>>0),-(f+h*4294967296)}return this.lo+this.hi*4294967296},o.prototype.toLong=function(u){return i.Long?new i.Long(this.lo|0,this.hi|0,!!u):{low:this.lo|0,high:this.hi|0,unsigned:!!u}};var a=String.prototype.charCodeAt;o.fromHash=function(u){return u===s?r:new o((a.call(u,0)|a.call(u,1)<<8|a.call(u,2)<<16|a.call(u,3)<<24)>>>0,(a.call(u,4)|a.call(u,5)<<8|a.call(u,6)<<16|a.call(u,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 u=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^u)>>>0,this.lo=(this.lo<<1^u)>>>0,this},o.prototype.zzDecode=function(){var u=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^u)>>>0,this.hi=(this.hi>>>1^u)>>>0,this},o.prototype.length=function(){var u=this.lo,f=(this.lo>>>28|this.hi<<4)>>>0,h=this.hi>>>24;return h===0?f===0?u<16384?u<128?1:2:u<2097152?3:4:f<16384?f<128?5:6:f<2097152?7:8:h<128?9:10}},{15:15}],15:[function(e,t,n){"use strict";var i=n;i.asPromise=e(1),i.base64=e(2),i.EventEmitter=e(3),i.float=e(4),i.inquire=e(5),i.utf8=e(7),i.pool=e(6),i.LongBits=e(14),i.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node),i.global=i.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},i.isString=function(a){return typeof a=="string"||a instanceof String},i.isObject=function(a){return a&&typeof a=="object"},i.isset=i.isSet=function(a,c){var u=a[c];return u!=null&&a.hasOwnProperty(c)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},i.Buffer=function(){try{var s=i.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),i._Buffer_from=null,i._Buffer_allocUnsafe=null,i.newBuffer=function(a){return typeof a=="number"?i.Buffer?i._Buffer_allocUnsafe(a):new i.Array(a):i.Buffer?i._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},i.Array=typeof Uint8Array<"u"?Uint8Array:Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||i.inquire("long"),i.key2Re=/^true|false|0|1$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(a){return a?i.LongBits.from(a).toHash():i.LongBits.zeroHash},i.longFromHash=function(a,c){var u=i.LongBits.fromHash(a);return i.Long?i.Long.fromBits(u.lo,u.hi,c):u.toNumber(!!c)};function o(s,a,c){for(var u=Object.keys(a),f=0;f-1;--h)if(c[f[h]]===1&&this[f[h]]!==undefined&&this[f[h]]!==null)return f[h]}},i.oneOfSetter=function(a){return function(c){for(var u=0;u127;)b[S++]=I&127|128,I>>>=7;b[S]=I}function _(I,b){this.len=I,this.next=undefined,this.val=b}_.prototype=Object.create(c.prototype),_.prototype.fn=m,h.prototype.uint32=function(b){return this.len+=(this.tail=this.tail.next=new _((b=b>>>0)<128?1:b<16384?2:b<2097152?3:b<268435456?4:5,b)).len,this},h.prototype.int32=function(b){return b<0?this._push(y,10,r.fromNumber(b)):this.uint32(b)},h.prototype.sint32=function(b){return this.uint32((b<<1^b>>31)>>>0)};function y(I,b,S){for(;I.hi;)b[S++]=I.lo&127|128,I.lo=(I.lo>>>7|I.hi<<25)>>>0,I.hi>>>=7;for(;I.lo>127;)b[S++]=I.lo&127|128,I.lo=I.lo>>>7;b[S++]=I.lo}h.prototype.uint64=function(b){var S=r.from(b);return this._push(y,S.length(),S)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(b){var S=r.from(b).zzEncode();return this._push(y,S.length(),S)},h.prototype.bool=function(b){return this._push(g,1,b?1:0)};function C(I,b,S){b[S]=I&255,b[S+1]=I>>>8&255,b[S+2]=I>>>16&255,b[S+3]=I>>>24}h.prototype.fixed32=function(b){return this._push(C,4,b>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(b){var S=r.from(b);return this._push(C,4,S.lo)._push(C,4,S.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(b){return this._push(i.float.writeFloatLE,4,b)},h.prototype.double=function(b){return this._push(i.float.writeDoubleLE,8,b)};var E=i.Array.prototype.set?function(b,S,B){S.set(b,B)}:function(b,S,B){for(var v=0;v>>0;if(!S)return this._push(g,1,0);if(i.isString(b)){var B=h.alloc(S=s.length(b));s.decode(b,B,0),b=B}return this.uint32(S)._push(E,S,b)},h.prototype.string=function(b){var S=a.length(b);return S?this.uint32(S)._push(a.write,S,b):this._push(g,1,0)},h.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new c(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var b=this.head,S=this.tail,B=this.len;return this.reset().uint32(B),B&&(this.tail.next=b.next,this.tail=S,this.len+=B),this},h.prototype.finish=function(){for(var b=this.head.next,S=this.constructor.alloc(this.len),B=0;b;)b.fn(b.val,S,B),B+=b.len,b=b.next;return S},h._configure=function(I){o=I,h.create=p(),o._configure()}},{15:15}],17:[function(e,t,n){"use strict";t.exports=r;var i=e(16);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(15);function r(){i.call(this)}r._configure=function(){r.alloc=o._Buffer_allocUnsafe,r.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&o.Buffer.prototype.set.name==="set"?function(c,u,f){u.set(c,f)}:function(c,u,f){if(c.copy)c.copy(u,f,0,c.length);else for(var h=0;h>>0;return this.uint32(u),u&&this._push(r.writeBytesBuffer,u,c),this};function s(a,c,u){a.length<40?o.utf8.write(a,c,u):c.utf8Write?c.utf8Write(a,u):c.write(a,u)}r.prototype.string=function(c){var u=o.Buffer.byteLength(c);return this.uint32(u),u&&this._push(s,u,c),this},r._configure()},{15:15,16:16}]},{},[8])})()});var NTe=ci((C3i,XH)=>{/* 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 o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(f,h){h=h||{};var p=h.encodedMaskData||h.encodedMaskData===null,g=c(f,h.inputOffset||0,p),m=h.noDataValue!==null?h.noDataValue:o.defaultNoDataValue,_=r(g,h.pixelType||Float32Array,h.encodedMaskData,m,h.returnMask),y={width:g.width,height:g.height,pixelData:_.resultPixels,minValue:_.minValue,maxValue:g.pixels.maxValue,noDataValue:m};return _.resultMask&&(y.maskData=_.resultMask),h.returnEncodedMask&&g.mask&&(y.encodedMaskData=g.mask.bitset?g.mask.bitset:null),h.returnFileInfo&&(y.fileInfo=s(g),h.computeUsedBitDepths&&(y.fileInfo.bitDepths=a(g))),y};var r=function(f,h,p,g,m){var _=0,y=f.pixels.numBlocksX,C=f.pixels.numBlocksY,E=Math.floor(f.width/y),I=Math.floor(f.height/C),b=2*f.maxZError,S=Number.MAX_VALUE,B;p=p||(f.mask?f.mask.bitset:null);var v,P;v=new h(f.width*f.height),m&&p&&(P=new Uint8Array(f.width*f.height));for(var N=new Float32Array(E*I),L,A,x=0;x<=C;x++){var T=x!==C?I:f.height%C;if(T!==0)for(var w=0;w<=y;w++){var R=w!==y?E:f.width%y;if(R!==0){var O=x*f.width*I+w*E,k=f.width-R,F=f.pixels.blocks[_],z,Q,H;F.encoding<2?(F.encoding===0?z=F.rawData:(u(F.stuffedData,F.bitsPerPixel,F.numValidPixels,F.offset,b,N,f.pixels.maxValue),z=N),Q=0):F.encoding===2?H=0:H=F.offset;var j;if(p)for(A=0;A>3],j<<=O&7),L=0;L>3]),j&128?(P&&(P[O]=1),B=F.encoding<2?z[Q++]:H,S=S>B?B:S,v[O++]=B):(P&&(P[O]=0),v[O++]=g),j<<=1;O+=k}else if(F.encoding<2)for(A=0;AB?B:S,v[O++]=B;O+=k}else for(S=S>H?H:S,A=0;A0){var y=new Uint8Array(Math.ceil(g.width*g.height/8));_=new DataView(f,h,g.mask.numBytes);var C=_.getInt16(0,!0),E=2,I=0;do{if(C>0)for(;C--;)y[I++]=_.getUint8(E++);else{var b=_.getUint8(E++);for(C=-C;C--;)y[I++]=b}C=_.getInt16(E,!0),E+=2}while(E0?1:0),P=B+(g.height%B>0?1:0);g.pixels.blocks=new Array(v*P);for(var N=0,L=0;L3)throw"Invalid block encoding ("+w.encoding+")";if(w.encoding===2){h++;continue}if(R!==0&&R!==2){if(R>>=6,w.offsetType=R,R===2)w.offset=_.getInt8(1),x++;else if(R===1)w.offset=_.getInt16(1,!0),x+=2;else if(R===0)w.offset=_.getFloat32(1,!0),x+=4;else throw"Invalid block offset type";if(w.encoding===1)if(R=_.getUint8(x),x++,w.bitsPerPixel=R&63,R>>=6,w.numValidPixelsType=R,R===2)w.numValidPixels=_.getUint8(x),x++;else if(R===1)w.numValidPixels=_.getUint16(x,!0),x+=2;else if(R===0)w.numValidPixels=_.getUint32(x,!0),x+=4;else throw"Invalid valid pixel count type"}if(h+=x,w.encoding!==3){var O,k;if(w.encoding===0){var F=(g.pixels.numBytes-1)/4;if(F!==Math.floor(F))throw"uncompressed block has invalid length";O=new ArrayBuffer(F*4),k=new Uint8Array(O),k.set(new Uint8Array(f,h,F*4));var z=new Float32Array(O);w.rawData=z,h+=F*4}else if(w.encoding===1){var Q=Math.ceil(w.numValidPixels*w.bitsPerPixel/8),H=Math.ceil(Q/4);O=new ArrayBuffer(H*4),k=new Uint8Array(O),k.set(new Uint8Array(f,h,Q)),w.stuffedData=new Uint32Array(O),h+=Q}}}return g.eofOffset=h,g},u=function(f,h,p,g,m,_,y){var C=(1<=h)S=B>>>b-h&C,b-=h;else{var N=h-b;S=(B&C)<>>b}_[I]=S=f?(b=S>>>I-f&y,I-=f):(B=f-I,b=(S&y)<>>I),u[E]=p[b];else for(v=Math.ceil((_-g)/m),E=0;E=f?(b=S>>>I-f&y,I-=f):(B=f-I,b=(S&y)<>>I),u[E]=b=u?(I=b>>>E-u&m,E-=u):(C=u-E,I=(b&m)<>>E),S[y]=I=f?(S=B>>>b&y,I-=f,b+=f):(v=f-I,S=B>>>b&y,B=c[C++],I=32-v,S|=(B&(1<=f?(S=B>>>b&y,I-=f,b+=f):(v=f-I,S=B>>>b&y,B=c[C++],I=32-v,S|=(B&(1<=u?(I=S>>>b&m,E-=u,b+=u):(C=u-E,I=S>>>b&m,S=c[_++],E=32-C,I|=(S&(1<=f?(y=C>>>_-f&p,_-=f):(E=f-_,y=(C&p)<>>_),u[m]=y;return u},originalUnstuff2:function(c,u,f,h){var p=(1<=f?(C=E>>>y&p,_-=f,y+=f):(I=f-_,C=E>>>y&p,E=c[g++],_=32-I,C|=(E&(1<=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 h&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,h=new Uint8Array(c,f,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,h),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;if(m>=3&&(y=m>=4?52:48,_=this.computeChecksumFletcher32(new Uint8Array(c,f-y,p.blobSize-14)),_!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,u){var f=u.headerInfo,h=this.getDataTypeArray(f.imageType),p=f.numDims*this.getDataTypeSize(f.imageType),g=this.readSubArray(c,u.ptr,h,p),m=this.readSubArray(c,u.ptr+p,h,p);u.ptr+=2*p;var _,y=!0;for(_=0;_0){y=new Uint8Array(Math.ceil(p/8)),m=new DataView(c,f,_.numBytes);var E=m.getInt16(0,!0),I=2,b=0,S=0;do{if(E>0)for(;E--;)y[b++]=m.getUint8(I++);else for(S=m.getUint8(I++),E=-E;E--;)y[b++]=S;E=m.getInt16(I,!0),I+=2}while(I<_.numBytes);if(E!==-32768||b>3],B<<=v&7):B=y[v>>3],B&128&&(C[v]=1);u.pixels.resultMask=C,_.bitset=y,f+=_.numBytes}return u.ptr=f,u.mask=_,!0},readDataOneSweep:function(c,u,f){var h=u.ptr,p=u.headerInfo,g=p.numDims,m=p.width*p.height,_=p.imageType,y=p.numValidPixel*r.getDataTypeSize(_)*g,C,E=u.pixels.resultMask;if(f===Uint8Array)C=new Uint8Array(c,h,y);else{var I=new ArrayBuffer(y),b=new Uint8Array(I);b.set(new Uint8Array(c,h,y)),C=new f(I)}if(C.length===m*g)u.pixels.resultPixels=C;else{u.pixels.resultPixels=new f(m*g);var S=0,B=0,v=0,P=0;if(g>1)for(v=0;v=_)return!1;var y=new Uint32Array(_-m);r.decodeBits(c,u,y);var C=[],E,I,b,S;for(E=m;E<_;E++)I=E-(E0&&(C[I].second=x<>>32-S,32-A>=S?(A+=S,A===32&&(A=0,T++,x=L[T])):(A+=S-32,T++,x=L[T],C[I].second|=x>>>32-A));var w=0,R=0,O=new s;for(E=0;E=f?R=f:R=w,w>=30&&console.log("WARning, large NUM LUT BITS IS "+w);var k=[],F,z,Q,H,j,Z;for(E=m;E<_;E++)if(I=E-(E0)if(F=[S,I],S<=R)for(z=C[I].second<=0;H--)j=z>>>H&1,j?(Z.right||(Z.right=new s),Z=Z.right):(Z.left||(Z.left=new s),Z=Z.left),H===0&&!Z.val&&(Z.val=F[1]);return{decodeLut:k,numBitsLUTQick:R,numBitsLUT:w,tree:O,stuffedData:L,srcPtr:T,bitPos:A}},readHuffman:function(c,u,f){var h=u.headerInfo,p=h.numDims,g=u.headerInfo.height,m=u.headerInfo.width,_=m*g,y=this.readHuffmanTree(c,u),C=y.decodeLut,E=y.tree,I=y.stuffedData,b=y.srcPtr,S=y.bitPos,B=y.numBitsLUTQick,v=y.numBitsLUT,P=u.headerInfo.imageType===0?128:0,N,L,A,x=u.pixels.resultMask,T,w,R,O,k,F,z,Q=0;S>0&&(b++,S=0);var H=I[b],j=u.encodeMode===1,Z=new f(_*p),Y=Z,$;for($=0;$1&&(Y=new f(Z.buffer,_*$,_),Q=0),u.headerInfo.numValidPixel===m*g)for(F=0,O=0;O>>32-B,w=T,32-S>>64-S-B,w=T),C[w])L=C[w][1],S+=C[w][0];else for(T=H<>>32-v,w=T,32-S>>64-S-v,w=T),N=E,z=0;z>>v-z-1&1,N=R?N.right:N.left,!(N.left||N.right)){L=N.val,S=S+z+1;break}S>=32&&(S-=32,b++,H=I[b]),A=L-P,j?(k>0?A+=Q:O>0?A+=Y[F-m]:A+=Q,A&=255,Y[F]=A,Q=A):Y[F]=A}else for(F=0,O=0;O>>32-B,w=T,32-S>>64-S-B,w=T),C[w])L=C[w][1],S+=C[w][0];else for(T=H<>>32-v,w=T,32-S>>64-S-v,w=T),N=E,z=0;z>>v-z-1&1,N=R?N.right:N.left,!(N.left||N.right)){L=N.val,S=S+z+1;break}S>=32&&(S-=32,b++,H=I[b]),A=L-P,j?(k>0&&x[F-1]?A+=Q:O>0&&x[F-m]?A+=Y[F-m]:A+=Q,A&=255,Y[F]=A,Q=A):Y[F]=A}u.ptr=u.ptr+(b+1)*4+(S>0?4:0)}u.pixels.resultPixels=Z},decodeBits:function(c,u,f,h,p){{var g=u.headerInfo,m=g.fileVersion,_=0,y=new DataView(c,u.ptr,5),C=y.getUint8(0);_++;var E=C>>6,I=E===0?4:3-E,b=(C&32)>0,S=C&31,B=0;if(I===1)B=y.getUint8(_),_++;else if(I===2)B=y.getUint16(_,!0),_+=2;else if(I===4)B=y.getUint32(_,!0),_+=4;else throw"Invalid valid pixel count type";var v=2*g.maxZError,P,N,L,A,x,T,w,R,O,k,F=g.numDims>1?g.maxValues[p]:g.zMax;if(b){for(u.counter.lut++,R=y.getUint8(_),O=S,_++,A=Math.ceil((R-1)*S/8),x=Math.ceil(A/4),N=new ArrayBuffer(x*4),L=new Uint8Array(N),u.ptr+=_,L.set(new Uint8Array(c,u.ptr,A)),w=new Uint32Array(N),u.ptr+=A,k=0;R-1>>>k;)k++;A=Math.ceil(B*k/8),x=Math.ceil(A/4),N=new ArrayBuffer(x*4),L=new Uint8Array(N),L.set(new Uint8Array(c,u.ptr,A)),P=new Uint32Array(N),u.ptr+=A,m>=3?T=o.unstuffLUT2(w,S,R-1,h,v,F):T=o.unstuffLUT(w,S,R-1,h,v,F),m>=3?o.unstuff2(P,f,k,B,T):o.unstuff(P,f,k,B,T)}else u.counter.bitstuffer++,k=S,u.ptr+=_,k>0&&(A=Math.ceil(B*k/8),x=Math.ceil(A/4),N=new ArrayBuffer(x*4),L=new Uint8Array(N),L.set(new Uint8Array(c,u.ptr,A)),P=new Uint32Array(N),u.ptr+=A,m>=3?h==null?o.originalUnstuff2(P,f,k,B):o.unstuff2(P,f,k,B,!1,h,v,F):h==null?o.originalUnstuff(P,f,k,B):o.unstuff(P,f,k,B,!1,h,v,F))}},readTiles:function(c,u,f){var h=u.headerInfo,p=h.width,g=h.height,m=h.microBlockSize,_=h.imageType,y=r.getDataTypeSize(_),C=Math.ceil(p/m),E=Math.ceil(g/m);u.pixels.numBlocksY=E,u.pixels.numBlocksX=C,u.pixels.ptr=0;var I=0,b=0,S=0,B=0,v=0,P=0,N=0,L=0,A=0,x=0,T=0,w=0,R=0,O=0,k=0,F=0,z,Q,H,j,Z,Y,$=new f(m*m),J=g%m||m,pe=p%m||m,Ce,fe,ye=h.numDims,Ie,ve=u.pixels.resultMask,be=u.pixels.resultPixels;for(S=0;S1&&(be=new f(u.pixels.resultPixels.buffer,p*g*Ie*y,p*g)),N=c.byteLength-u.ptr,z=new DataView(c,u.ptr,Math.min(10,N)),Q={},F=0,L=z.getUint8(0),F++,A=L>>6&255,x=L>>2&15,x!==(B*m>>3&15))throw"integrity issue";if(Y=L&3,Y>3)throw u.ptr+=F,"Invalid block encoding ("+Y+")";if(Y===2){u.counter.constant++,u.ptr+=F;continue}else if(Y===0){if(u.counter.uncompressed++,u.ptr+=F,R=v*P*y,O=c.byteLength-u.ptr,R=R1)for(g=0;g=-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,h){var p=0;switch(f){case 0:p=h.getInt8(u);break;case 1:p=h.getUint8(u);break;case 2:p=h.getInt16(u,!0);break;case 3:p=h.getUint16(u,!0);break;case 4:p=h.getInt32(u,!0);break;case 5:p=h.getUInt32(u,!0);break;case 6:p=h.getFloat32(u,!0);break;case 7:p=h.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,h=0,p={};if(p.ptr=u.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var g=p.headerInfo,m=g.fileVersion,_=r.getDataTypeArray(g.imageType);r.readMask(c,p),g.numValidPixel!==g.width*g.height&&!p.pixels.resultMask&&(p.pixels.resultMask=u.maskData);var y=g.width*g.height;if(p.pixels.resultPixels=new _(y*g.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},g.numValidPixel!==0)if(g.zMax===g.zMin)r.constructConstantSurface(p);else if(m>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var C=new DataView(c,p.ptr,2),E=C.getUint8(0);if(p.ptr++,E)r.readDataOneSweep(c,p,_);else if(m>1&&g.imageType<=1&&Math.abs(g.maxZError-.5)<1e-5){var I=C.getUint8(1);if(p.ptr++,p.encodeMode=I,I>2||m<4&&I>1)throw"Invalid Huffman flag "+I;I?r.readHuffman(c,p,_):r.readTiles(c,p,_)}else r.readTiles(c,p,_)}p.eofOffset=p.ptr;var b;u.inputOffset?(b=p.headerInfo.blobSize+u.inputOffset-p.ptr,Math.abs(b)>=1&&(p.eofOffset=u.inputOffset+p.headerInfo.blobSize)):(b=p.headerInfo.blobSize-p.ptr,Math.abs(b)>=1&&(p.eofOffset=p.headerInfo.blobSize));var S={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&&r.isValidPixelValue(g.imageType,f)){var B=p.pixels.resultMask;for(h=0;h1&&E.fileInfo.mask&&E.fileInfo.mask.numBytes>0&&m.push(E.maskData),h++,C.pixels.push(E.pixelData),C.statistics.push({minValue:E.minValue,maxValue:E.maxValue,noDataValue:E.noDataValue,dimStats:E.dimStats})}var I,b,S;if(f>1&&m.length>1){for(S=C.width*C.height,C.bandMasks=m,y=new Uint8Array(S),y.set(m[0]),I=1;I{/*! NoSleep.min.js v0.12.0 - git.io/vfn01 - Rich Tibbett - MIT license */(function(e,t){typeof CU=="object"&&typeof Nee=="object"?Nee.exports=t():typeof define=="function"&&define.amd?define([],t):typeof CU=="object"?CU.NoSleep=t():e.NoSleep=t()})(CU,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(i,o,r){n.o(i,o)||Object.defineProperty(i,o,{enumerable:!0,get:r})},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,o){if(1&o&&(i=n(i)),8&o||4&o&&typeof i=="object"&&i&&i.__esModule)return i;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:i}),2&o&&typeof i!="string")for(var s in i)n.d(r,s,function(a){return i[a]}.bind(null,s));return r},n.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return n.d(o,"a",o),o},n.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var i=function(){function f(h,p){for(var g=0;g.5&&(h.noSleepVideo.currentTime=Math.random())})}))}return i(f,[{key:"_addSourceToVideo",value:function(h,p,g){var m=document.createElement("source");m.src=g,m.type="video/"+p,h.appendChild(m)}},{key:"enable",value:function(){var h=this;return c()?navigator.wakeLock.request("screen").then(function(p){h._wakeLock=p,h.enabled=!0,console.log("Wake Lock active."),h._wakeLock.addEventListener("release",function(){console.log("Wake Lock released.")})}).catch(function(p){throw h.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 h.enabled=!0,p}).catch(function(p){throw h.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,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",mp4:"data:video/mp4;base64,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"}}])})});var FPt={};qee(FPt,{AlphaMode:()=>Jm,AlphaPipelineStage:()=>Q1,AnchorPointDirect:()=>zM,AnchorPointIndirect:()=>VM,Animation:()=>Q3,AnimationViewModel:()=>k3,Appearance:()=>po,ApproximateTerrainHeights:()=>Ii,ArcGISTiledElevationTerrainProvider:()=>P$,ArcGisBaseMapType:()=>Fh,ArcGisMapServerImageryProvider:()=>XA,ArcGisMapService:()=>$u,ArcType:()=>ln,ArticulationStageType:()=>kc,AssociativeArray:()=>Pt,Atmosphere:()=>i0,AtmospherePipelineStage:()=>_1,AttributeCompression:()=>Fn,AttributeType:()=>Ht,AutoExposure:()=>KQ,AutomaticUniforms:()=>Xp,Axis:()=>fo,AxisAlignedBoundingBox:()=>B_,B3dmLoader:()=>n1,B3dmParser:()=>$M,BaseLayerPicker:()=>q3,BaseLayerPickerViewModel:()=>Y3,BatchTable:()=>fE,BatchTableHierarchy:()=>NE,BatchTexture:()=>xl,BatchTexturePipelineStage:()=>k1,Billboard:()=>Eo,BillboardCollection:()=>of,BillboardGraphics:()=>Pc,BillboardLoadState:()=>Is,BillboardTexture:()=>ng,BillboardVisualizer:()=>EP,BingMapsGeocoderService:()=>M$,BingMapsImageryProvider:()=>rN,BingMapsStyle:()=>nT,BlendEquation:()=>cc,BlendFunction:()=>Oo,BlendOption:()=>Uo,BlendingState:()=>An,BoundingRectangle:()=>qe,BoundingSphere:()=>le,BoundingSphereState:()=>mt,BoundingVolumeSemantics:()=>ZE,BoxEmitter:()=>BZ,BoxGeometry:()=>sc,BoxGeometryUpdater:()=>MR,BoxGraphics:()=>yE,BoxOutlineGeometry:()=>mh,BrdfLutGenerator:()=>$2,Buffer:()=>Ct,BufferLoader:()=>UE,BufferUsage:()=>Ue,CPUStylingPipelineStage:()=>V1,CallbackPositionProperty:()=>NR,CallbackProperty:()=>Ch,Camera:()=>_o,CameraEventAggregator:()=>nk,CameraEventType:()=>Yi,CameraFlightPath:()=>tQ,Cartesian2:()=>U,Cartesian3:()=>d,Cartesian4:()=>se,CartesianRectangle:()=>fT,Cartographic:()=>me,CartographicGeocoderService:()=>L$,CatmullRomSpline:()=>O$,Cesium3DContentGroup:()=>ME,Cesium3DTile:()=>bd,Cesium3DTileBatchTable:()=>SA,Cesium3DTileColorBlendMode:()=>ru,Cesium3DTileContent:()=>DZ,Cesium3DTileContentFactory:()=>T0,Cesium3DTileContentState:()=>or,Cesium3DTileContentType:()=>Ys,Cesium3DTileFeature:()=>da,Cesium3DTileFeatureTable:()=>Mh,Cesium3DTileOptimizationHint:()=>yd,Cesium3DTileOptimizations:()=>XL,Cesium3DTilePass:()=>Ko,Cesium3DTilePassState:()=>Hd,Cesium3DTilePointFeature:()=>ig,Cesium3DTileRefine:()=>nr,Cesium3DTileStyle:()=>lx,Cesium3DTileStyleEngine:()=>nO,Cesium3DTilesInspector:()=>V3,Cesium3DTilesInspectorViewModel:()=>z3,Cesium3DTilesVoxelProvider:()=>vZ,Cesium3DTileset:()=>Ms,Cesium3DTilesetBaseTraversal:()=>cO,Cesium3DTilesetCache:()=>$L,Cesium3DTilesetGraphics:()=>SE,Cesium3DTilesetHeatmap:()=>eO,Cesium3DTilesetMetadata:()=>L0,Cesium3DTilesetMostDetailedTraversal:()=>rO,Cesium3DTilesetSkipTraversal:()=>fO,Cesium3DTilesetStatistics:()=>Yh,Cesium3DTilesetTraversal:()=>_a,Cesium3DTilesetVisualizer:()=>dO,CesiumInspector:()=>j3,CesiumInspectorViewModel:()=>W3,CesiumTerrainProvider:()=>_x,CesiumWidget:()=>Xk,Check:()=>vo,CheckerboardMaterialProperty:()=>FT,CircleEmitter:()=>t3,CircleGeometry:()=>F$,CircleOutlineGeometry:()=>Q$,ClassificationModelDrawCommand:()=>$N,ClassificationPipelineStage:()=>U1,ClassificationPrimitive:()=>sb,ClassificationType:()=>Xn,ClearCommand:()=>pi,ClippingPlane:()=>$E,ClippingPlaneCollection:()=>Ps,ClippingPolygon:()=>Fb,ClippingPolygonCollection:()=>Dh,Clock:()=>Zh,ClockRange:()=>cs,ClockStep:()=>To,ClockViewModel:()=>L3,CloudCollection:()=>OZ,CloudType:()=>Pw,Color:()=>G,ColorBlendMode:()=>Qc,ColorGeometryInstanceAttribute:()=>en,ColorMaterialProperty:()=>Jt,Command:()=>Cee,ComponentDatatype:()=>q,Composite3DTileContent:()=>VR,CompositeEntityCollection:()=>tq,CompositeMaterialProperty:()=>kT,CompositePositionProperty:()=>za,CompositeProperty:()=>Wc,CompressedTextureBuffer:()=>CB,ComputeCommand:()=>sl,ComputeEngine:()=>yB,ConditionsExpression:()=>Jk,ConeEmitter:()=>QZ,ConstantPositionProperty:()=>ml,ConstantProperty:()=>si,ConstantSpline:()=>s1,ContentMetadata:()=>GL,Context:()=>hP,ContextLimits:()=>qt,CoplanarPolygonGeometry:()=>XO,CoplanarPolygonGeometryLibrary:()=>dg,CoplanarPolygonOutlineGeometry:()=>xd,CornerType:()=>Hi,CorrelationGroup:()=>HM,CorridorGeometry:()=>z0,CorridorGeometryLibrary:()=>$i,CorridorGeometryUpdater:()=>EO,CorridorGraphics:()=>EE,CorridorOutlineGeometry:()=>CO,Credit:()=>Bt,CreditDisplay:()=>rQ,CubeMap:()=>kr,CubeMapFace:()=>vB,CubicRealPolynomial:()=>XC,CullFace:()=>Pi,CullingVolume:()=>vs,CumulusCloud:()=>Nf,CustomDataSource:()=>wO,CustomHeightmapTerrainProvider:()=>k$,CustomShader:()=>ZI,CustomShaderMode:()=>KA,CustomShaderPipelineStage:()=>X1,CustomShaderTranslucencyMode:()=>fy,CylinderGeometry:()=>BO,CylinderGeometryLibrary:()=>V0,CylinderGeometryUpdater:()=>vO,CylinderGraphics:()=>IE,CylinderOutlineGeometry:()=>DO,CzmlDataSource:()=>UO,DataSource:()=>as,DataSourceClock:()=>$h,DataSourceCollection:()=>GO,DataSourceDisplay:()=>DF,DebugAppearance:()=>kZ,DebugCameraPrimitive:()=>Np,DebugInspector:()=>uk,DebugModelMatrixPrimitive:()=>i3,DefaultProxy:()=>U$,DepthFunction:()=>Na,DepthPlane:()=>fQ,DequantizationPipelineStage:()=>Z1,DerivedCommand:()=>Lp,DeveloperError:()=>he,DeviceOrientationCameraController:()=>dQ,DirectionalLight:()=>UZ,DiscardEmptyTileImagePolicy:()=>iT,DiscardMissingTileImagePolicy:()=>iN,DistanceDisplayCondition:()=>Gt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Kn,DoubleEndedPriorityQueue:()=>ix,DoublyLinkedList:()=>ZL,DracoLoader:()=>MA,DrawCommand:()=>nt,DynamicAtmosphereLightingType:()=>QA,DynamicEnvironmentMapManager:()=>kA,DynamicGeometryBatch:()=>X0,DynamicGeometryUpdater:()=>Ai,EarthOrientationParameters:()=>fB,EarthOrientationParametersSample:()=>h_,EasingFunction:()=>fs,EllipseGeometry:()=>Fl,EllipseGeometryLibrary:()=>yu,EllipseGeometryUpdater:()=>VO,EllipseGraphics:()=>xE,EllipseOutlineGeometry:()=>Af,Ellipsoid:()=>ne,EllipsoidGeodesic:()=>mA,EllipsoidGeometry:()=>Ca,EllipsoidGeometryUpdater:()=>WO,EllipsoidGraphics:()=>bE,EllipsoidOutlineGeometry:()=>cf,EllipsoidPrimitive:()=>q2,EllipsoidRhumbLine:()=>lc,EllipsoidSurfaceAppearance:()=>GZ,EllipsoidTangentPlane:()=>ms,EllipsoidTerrainProvider:()=>Pp,EllipsoidalOccluder:()=>xg,Empty3DTileContent:()=>bT,EncodedCartesian3:()=>$n,Entity:()=>dr,EntityCluster:()=>uf,EntityCollection:()=>ya,EntityView:()=>PF,Event:()=>ge,EventHelper:()=>Dr,Expression:()=>od,ExpressionNodeType:()=>It,ExtrapolationType:()=>df,FeatureDetection:()=>jt,FeatureIdPipelineStage:()=>uy,Fog:()=>hQ,ForEach:()=>Me,FrameRateMonitor:()=>s3,FrameState:()=>mQ,Framebuffer:()=>Xr,FramebufferManager:()=>Si,Frozen:()=>V,FrustumCommands:()=>yQ,FrustumGeometry:()=>PI,FrustumOutlineGeometry:()=>cQ,Fullscreen:()=>Or,FullscreenButton:()=>Z3,FullscreenButtonViewModel:()=>J3,GaussianSplat3DTileContent:()=>xT,GaussianSplatPrimitive:()=>IT,GaussianSplatRenderResources:()=>FL,GaussianSplatSorter:()=>ET,GaussianSplatTextureGenerator:()=>OL,GeoJsonDataSource:()=>Wy,GeoJsonLoader:()=>i1,GeocodeType:()=>bC,Geocoder:()=>eU,GeocoderService:()=>Ww,GeocoderViewModel:()=>$3,GeographicProjection:()=>Qi,GeographicTilingScheme:()=>oo,Geometry:()=>ht,Geometry3DTileContent:()=>jR,GeometryAttribute:()=>De,GeometryAttributes:()=>Cn,GeometryFactory:()=>G$,GeometryInstance:()=>Rt,GeometryInstanceAttribute:()=>Rc,GeometryOffsetAttribute:()=>dn,GeometryPipeline:()=>Vn,GeometryPipelineStage:()=>nN,GeometryType:()=>Hf,GeometryUpdater:()=>gi,GeometryUpdaterSet:()=>aI,GeometryVisualizer:()=>gF,GetFeatureInfoFormat:()=>u0,Globe:()=>H2,GlobeDepth:()=>CQ,GlobeSurfaceShaderSet:()=>M2,GlobeSurfaceTile:()=>zd,GlobeSurfaceTileProvider:()=>L2,GlobeTranslucency:()=>O2,GlobeTranslucencyFramebuffer:()=>EQ,GlobeTranslucencyState:()=>pQ,GltfBufferViewLoader:()=>yb,GltfDracoLoader:()=>Cb,GltfGpmLoader:()=>jM,GltfGpmLocal:()=>kb,GltfImageLoader:()=>Eb,GltfIndexBufferLoader:()=>Ib,GltfJsonLoader:()=>bb,GltfLoader:()=>Zu,GltfLoaderUtil:()=>cu,GltfMeshPrimitiveGpmLoader:()=>XM,GltfSpzLoader:()=>pM,GltfStructuralMetadataLoader:()=>UM,GltfTextureLoader:()=>Tb,GltfVertexBufferLoader:()=>Sb,GoogleEarthEnterpriseImageryProvider:()=>qZ,GoogleEarthEnterpriseMapsProvider:()=>cN,GoogleEarthEnterpriseMetadata:()=>r_,GoogleEarthEnterpriseTerrainData:()=>jw,GoogleEarthEnterpriseTerrainProvider:()=>W$,GoogleEarthEnterpriseTileInformation:()=>c3,GoogleGeocoderService:()=>Y$,GoogleMaps:()=>Ex,GpxDataSource:()=>QF,GregorianDate:()=>Zp,GridImageryProvider:()=>KZ,GridMaterialProperty:()=>KT,GroundGeometryUpdater:()=>ei,GroundPolylineGeometry:()=>pE,GroundPolylinePrimitive:()=>ph,GroundPrimitive:()=>dl,GroupMetadata:()=>NT,HeadingPitchRange:()=>Ld,HeadingPitchRoll:()=>ic,Heap:()=>aB,HeightReference:()=>Ze,HeightmapEncoding:()=>kd,HeightmapTerrainData:()=>yc,HeightmapTessellator:()=>ow,HermitePolynomialApproximation:()=>PO,HermiteSpline:()=>ay,HilbertOrder:()=>pb,HomeButton:()=>nU,HomeButtonViewModel:()=>tU,HorizontalOrigin:()=>vi,I3SBuildingSceneLayerExplorer:()=>Dee,I3SBuildingSceneLayerExplorerViewModel:()=>iU,I3SDataProvider:()=>wm,I3SDecoder:()=>l3,I3SFeature:()=>u3,I3SField:()=>f3,I3SGeometry:()=>Rw,I3SLayer:()=>px,I3SNode:()=>Mw,I3SStatistics:()=>m3,I3SSublayer:()=>A3,I3SSymbology:()=>h3,I3dmLoader:()=>r1,I3dmParser:()=>o1,ITwinData:()=>$Z,ITwinPlatform:()=>na,Iau2000Orientation:()=>j2,Iau2006XysData:()=>dB,Iau2006XysSample:()=>jC,IauOrientationAxes:()=>Y2,IauOrientationParameters:()=>W2,ImageBasedLighting:()=>RE,ImageBasedLightingPipelineStage:()=>C1,ImageMaterialProperty:()=>R_,Imagery:()=>lT,ImageryConfiguration:()=>cL,ImageryCoverage:()=>dT,ImageryFlags:()=>gN,ImageryInput:()=>CN,ImageryLayer:()=>ns,ImageryLayerCollection:()=>k0,ImageryLayerFeatureInfo:()=>Oh,ImageryPipelineStage:()=>EN,ImageryProvider:()=>Bl,ImageryState:()=>Yn,Implicit3DTileContent:()=>Pb,ImplicitAvailabilityBitstream:()=>gb,ImplicitMetadataView:()=>_b,ImplicitSubdivisionScheme:()=>gs,ImplicitSubtree:()=>XE,ImplicitSubtreeCache:()=>$k,ImplicitSubtreeMetadata:()=>YR,ImplicitTileCoordinates:()=>Q0,ImplicitTileset:()=>F0,IndexDatatype:()=>Qe,InfoBox:()=>rU,InfoBoxViewModel:()=>oU,InspectorShared:()=>Mu,InstanceAttributeSemantic:()=>ys,InstancingPipelineStage:()=>N1,InterpolationAlgorithm:()=>q$,InterpolationType:()=>Ph,Intersect:()=>tn,IntersectionTests:()=>fi,Intersections2D:()=>c_,Interval:()=>rc,InvertClassification:()=>pw,Ion:()=>xh,IonGeocodeProviderType:()=>u_,IonGeocoderService:()=>xx,IonImageryProvider:()=>JA,IonResource:()=>ju,IonWorldImageryStyle:()=>ZA,Iso8601:()=>Ye,JobScheduler:()=>AQ,JobType:()=>dc,JsonMetadataTable:()=>UA,JulianDate:()=>K,KTX2Transcoder:()=>EB,KeyboardEventModifier:()=>wa,KeyframeNode:()=>wo,KmlCamera:()=>kF,KmlDataSource:()=>II,KmlLookAt:()=>o2,KmlTour:()=>r2,KmlTourFlyTo:()=>a2,KmlTourWait:()=>c2,Label:()=>_y,LabelCollection:()=>sp,LabelGraphics:()=>gh,LabelStyle:()=>ir,LabelVisualizer:()=>_F,LagrangePolynomialApproximation:()=>RO,LeapSecond:()=>no,Light:()=>e$,LightingModel:()=>ip,LightingPipelineStage:()=>xN,LinearApproximation:()=>W0,LinearSpline:()=>sy,ManagedArray:()=>Il,MapMode2D:()=>wu,MapProjection:()=>J$,MapboxImageryProvider:()=>lN,MapboxStyleImageryProvider:()=>t$,MappedPositions:()=>yN,Material:()=>io,MaterialAppearance:()=>yo,MaterialPipelineStage:()=>TN,MaterialProperty:()=>fr,Math:()=>D,Matrix2:()=>ki,Matrix3:()=>X,Matrix4:()=>M,Megatexture:()=>xw,MeshPrimitiveGpmLocal:()=>KM,MetadataClass:()=>wh,MetadataClassProperty:()=>qm,MetadataComponentType:()=>zt,MetadataEntity:()=>jn,MetadataEnum:()=>_M,MetadataEnumValue:()=>gM,MetadataPicking:()=>gQ,MetadataPickingPipelineStage:()=>tf,MetadataPipelineStage:()=>ud,MetadataSchema:()=>Xu,MetadataSchemaLoader:()=>Bb,MetadataSemantic:()=>JE,MetadataTable:()=>rd,MetadataTableProperty:()=>KR,MetadataType:()=>At,MipmapHint:()=>Yf,Model:()=>kh,Model3DTileContent:()=>nf,ModelAlphaOptions:()=>p0,ModelAnimation:()=>u1,ModelAnimationChannel:()=>l1,ModelAnimationCollection:()=>f1,ModelAnimationLoop:()=>lu,ModelAnimationState:()=>Nh,ModelArticulation:()=>I1,ModelArticulationStage:()=>E1,ModelClippingPlanesPipelineStage:()=>T1,ModelClippingPolygonsPipelineStage:()=>B1,ModelColorPipelineStage:()=>ly,ModelComponents:()=>bn,ModelDrawCommand:()=>eL,ModelDrawCommands:()=>iL,ModelFeature:()=>d1,ModelFeatureTable:()=>m1,ModelGraphics:()=>yA,ModelImagery:()=>lL,ModelImageryMapping:()=>d0,ModelLightingOptions:()=>XN,ModelMatrixUpdateStage:()=>L1,ModelNode:()=>D1,ModelPrimitiveImagery:()=>h0,ModelReader:()=>_N,ModelRenderResources:()=>VN,ModelRuntimeNode:()=>F1,ModelRuntimePrimitive:()=>GN,ModelSceneGraph:()=>oL,ModelSilhouettePipelineStage:()=>jN,ModelSkin:()=>zN,ModelSplitterPipelineStage:()=>qN,ModelStatistics:()=>rL,ModelType:()=>wr,ModelUtility:()=>vt,ModelVisualizer:()=>yF,Moon:()=>X2,MorphTargetsPipelineStage:()=>wN,MorphWeightSpline:()=>Z$,MortonOrder:()=>by,Multiple3DTileContent:()=>HL,MultisampleFramebuffer:()=>mP,NavigationHelpButton:()=>aU,NavigationHelpButtonViewModel:()=>sU,NearFarScalar:()=>Kt,NeverTileDiscardPolicy:()=>i$,NodeRenderResources:()=>KN,NodeStatisticsPipelineStage:()=>O1,NodeTransformationProperty:()=>TE,OIT:()=>IQ,Occluder:()=>J2,OffsetGeometryInstanceAttribute:()=>uo,OpenCageGeocoderService:()=>eee,OpenStreetMapImageryProvider:()=>a_,OrderedGroundPrimitiveCollection:()=>zO,OrientedBoundingBox:()=>Qn,OrthographicFrustum:()=>mn,OrthographicOffCenterFrustum:()=>Jr,Packable:()=>tee,PackableForInterpolation:()=>nee,Particle:()=>Ow,ParticleBurst:()=>r$,ParticleEmitter:()=>s$,ParticleSystem:()=>a$,Pass:()=>Be,PassState:()=>vc,PathGraphics:()=>CA,PathVisualizer:()=>EF,PeliasGeocoderService:()=>B3,PerInstanceColorAppearance:()=>gn,PerformanceDisplay:()=>qg,PerformanceWatchdog:()=>lU,PerformanceWatchdogViewModel:()=>cU,PerspectiveFrustum:()=>Fi,PerspectiveOffCenterFrustum:()=>zl,PickDepth:()=>_Q,PickDepthFramebuffer:()=>bQ,PickFramebuffer:()=>SQ,PickedMetadataInfo:()=>Qk,Picking:()=>vQ,PickingPipelineStage:()=>BN,PinBuilder:()=>Qg,PixelDatatype:()=>Ve,PixelFormat:()=>$e,Plane:()=>hn,PlaneGeometry:()=>jO,PlaneGeometryUpdater:()=>qO,PlaneGraphics:()=>SR,PlaneOutlineGeometry:()=>YO,PntsLoader:()=>aL,PntsParser:()=>g0,PointCloud:()=>qk,PointCloudEyeDomeLighting:()=>zA,PointCloudShading:()=>$m,PointCloudStylingPipelineStage:()=>vN,PointGraphics:()=>wE,PointPrimitive:()=>Xs,PointPrimitiveCollection:()=>HT,PointVisualizer:()=>xF,PolygonGeometry:()=>FA,PolygonGeometryLibrary:()=>Zn,PolygonGeometryUpdater:()=>ZO,PolygonGraphics:()=>_h,PolygonHierarchy:()=>uc,PolygonOutlineGeometry:()=>JO,PolygonPipeline:()=>yi,Polyline:()=>pd,PolylineArrowMaterialProperty:()=>JT,PolylineCollection:()=>zh,PolylineColorAppearance:()=>ps,PolylineDashMaterialProperty:()=>$T,PolylineGeometry:()=>Fg,PolylineGeometryUpdater:()=>SF,PolylineGlowMaterialProperty:()=>tS,PolylineGraphics:()=>Mc,PolylineMaterialAppearance:()=>La,PolylineOutlineMaterialProperty:()=>Ry,PolylinePipeline:()=>Vi,PolylineVisualizer:()=>BF,PolylineVolumeGeometry:()=>tF,PolylineVolumeGeometryLibrary:()=>qh,PolylineVolumeGeometryUpdater:()=>rF,PolylineVolumeGraphics:()=>BE,PolylineVolumeOutlineGeometry:()=>oF,PositionProperty:()=>Ah,PositionPropertyArray:()=>wg,PostProcessStage:()=>bo,PostProcessStageCollection:()=>ZQ,PostProcessStageComposite:()=>Du,PostProcessStageLibrary:()=>Bf,PostProcessStageSampleMode:()=>wf,PostProcessStageTextureCache:()=>VI,PpeMetadata:()=>qM,PpeSource:()=>Aee,PpeTexture:()=>YM,Primitive:()=>kn,PrimitiveCollection:()=>Ol,PrimitiveLoadPlan:()=>s0,PrimitiveOutlineGenerator:()=>r0,PrimitiveOutlinePipelineStage:()=>MN,PrimitivePipeline:()=>dE,PrimitiveRenderResources:()=>JN,PrimitiveState:()=>zr,PrimitiveStatisticsPipelineStage:()=>NN,PrimitiveType:()=>Ne,ProjectionPicker:()=>fU,ProjectionPickerViewModel:()=>uU,Property:()=>W,PropertyArray:()=>iS,PropertyAttribute:()=>o0,PropertyAttributeProperty:()=>OM,PropertyBag:()=>Al,PropertyTable:()=>Sl,PropertyTexture:()=>GA,PropertyTextureProperty:()=>LM,ProviderViewModel:()=>Ts,Proxy:()=>iee,QuadraticRealPolynomial:()=>al,QuadtreeOccluders:()=>F2,QuadtreePrimitive:()=>V2,QuadtreeTile:()=>Q2,QuadtreeTileLoadState:()=>xa,QuadtreeTileProvider:()=>c$,QuantizedMeshTerrainData:()=>Ax,QuarticRealPolynomial:()=>bB,Quaternion:()=>Fe,QuaternionSpline:()=>c1,Queue:()=>$_,Ray:()=>xn,Rectangle:()=>ae,RectangleCollisionChecker:()=>lI,RectangleGeometry:()=>tI,RectangleGeometryLibrary:()=>qs,RectangleGeometryUpdater:()=>sF,RectangleGraphics:()=>yh,RectangleOutlineGeometry:()=>B0,ReferenceFrame:()=>Xi,ReferenceProperty:()=>Bg,RenderState:()=>Ge,Renderbuffer:()=>Uu,RenderbufferFormat:()=>ll,Request:()=>ar,RequestErrorEvent:()=>Mm,RequestScheduler:()=>wc,RequestState:()=>li,RequestType:()=>ws,Resource:()=>we,ResourceCache:()=>Li,ResourceCacheKey:()=>bl,ResourceCacheStatistics:()=>EM,ResourceLoader:()=>zi,ResourceLoaderState:()=>ft,Rotation:()=>Bd,RuntimeError:()=>ce,S2Cell:()=>DA,SDFSettings:()=>Aa,SampledPositionProperty:()=>Ha,SampledProperty:()=>mf,Sampler:()=>nn,ScaledPositionProperty:()=>Ap,Scene:()=>Uk,SceneFramebuffer:()=>OI,SceneMode:()=>oe,SceneMode2DPipelineStage:()=>LN,SceneModePicker:()=>hU,SceneModePickerViewModel:()=>dU,SceneTransforms:()=>Ji,SceneTransitioner:()=>tk,ScreenSpaceCameraController:()=>rk,ScreenSpaceEventHandler:()=>vf,ScreenSpaceEventType:()=>Dn,SelectedFeatureIdPipelineStage:()=>dy,SelectionIndicator:()=>AU,SelectionIndicatorViewModel:()=>pU,SensorVolumePortionToDisplay:()=>aS,ShaderBuilder:()=>cA,ShaderCache:()=>cP,ShaderDestination:()=>Ae,ShaderFunction:()=>gP,ShaderProgram:()=>cn,ShaderSource:()=>He,ShaderStruct:()=>AP,ShadowMap:()=>Jg,ShadowMapShader:()=>Qp,ShadowMode:()=>Bn,ShadowVolumeAppearance:()=>Vu,ShowGeometryInstanceAttribute:()=>wn,Simon1994PlanetaryPositions:()=>b_,SimplePolylineGeometry:()=>oee,SingleTileImageryProvider:()=>uN,SkinningPipelineStage:()=>FN,SkyAtmosphere:()=>Gk,SkyBox:()=>zk,SpatialNode:()=>Lk,Spdcf:()=>WM,SpecularEnvironmentCubeMap:()=>Ih,SphereEmitter:()=>u$,SphereGeometry:()=>ree,SphereOutlineGeometry:()=>mg,Spherical:()=>MO,Spline:()=>Ao,SplitDirection:()=>Tr,Splitter:()=>ww,StaticGeometryColorBatch:()=>Rd,StaticGeometryPerMaterialBatch:()=>Md,StaticGroundGeometryColorBatch:()=>wS,StaticGroundGeometryPerMaterialBatch:()=>AF,StaticGroundPolylinePerMaterialBatch:()=>wF,StaticOutlineGeometryBatch:()=>vS,StencilConstants:()=>Xt,StencilFunction:()=>Jn,StencilOperation:()=>_t,SteppedSpline:()=>a1,Stereographic:()=>Fc,StorageType:()=>ny,StripeMaterialProperty:()=>rS,StripeOrientation:()=>em,StructuralMetadata:()=>ma,StyleCommandsNeeded:()=>Lh,StyleExpression:()=>f$,Sun:()=>Wk,SunLight:()=>aA,SunPostProcess:()=>ck,SupportedImageFormats:()=>GM,SvgPathBindingHandler:()=>M3,TaskProcessor:()=>ui,Terrain:()=>x3,TerrainData:()=>Am,TerrainEncoding:()=>Jc,TerrainFillMesh:()=>cw,TerrainMesh:()=>Gd,TerrainOffsetProperty:()=>DE,TerrainProvider:()=>Es,TerrainQuantization:()=>Ia,TerrainState:()=>xo,Texture:()=>Nt,Texture3D:()=>w6,TextureAtlas:()=>sE,TextureCache:()=>lP,TextureMagnificationFilter:()=>di,TextureManager:()=>vk,TextureMinificationFilter:()=>$t,TexturePacker:()=>Zx,TextureUniform:()=>mee,TextureWrap:()=>Pn,TileAvailability:()=>Bm,TileBoundingRegion:()=>af,TileBoundingS2Cell:()=>qL,TileBoundingSphere:()=>pg,TileBoundingVolume:()=>_$,TileCoordinatesImageryProvider:()=>T3,TileDiscardPolicy:()=>C$,TileEdge:()=>Sn,TileImagery:()=>uT,TileMapServiceImageryProvider:()=>my,TileMetadata:()=>zL,TileOrientedBoundingBox:()=>Au,TileProviderError:()=>Qo,TileReplacementQueue:()=>k2,TileSelectionResult:()=>oi,TileState:()=>E$,Tileset3DTileContent:()=>dL,TilesetMetadata:()=>KL,TilesetPipelineStage:()=>p1,TilingScheme:()=>see,TimeConstants:()=>ii,TimeDynamicImagery:()=>f0,TimeDynamicPointCloud:()=>Dw,TimeInterval:()=>Rn,TimeIntervalCollection:()=>ss,TimeIntervalCollectionPositionProperty:()=>Dg,TimeIntervalCollectionProperty:()=>vg,TimeStandard:()=>ni,Timeline:()=>yU,TimelineHighlightRange:()=>gU,TimelineTrack:()=>_U,Tipsify:()=>TB,ToggleButtonViewModel:()=>DC,Tonemapper:()=>$g,TrackingReferenceFrame:()=>hA,Transforms:()=>Qt,TranslationRotationScale:()=>M_,TranslucentTileClassification:()=>wQ,TridiagonalSystemSolver:()=>jb,TrustedServers:()=>Ux,TweenCollection:()=>YI,UniformState:()=>dP,UniformType:()=>Ew,UrlTemplateImageryProvider:()=>mc,VERSION:()=>OPt,VRButton:()=>IU,VRButtonViewModel:()=>EU,VRTheWorldTerrainProvider:()=>aee,VaryingType:()=>pee,Vector3DTileBatch:()=>jm,Vector3DTileClampedPolylines:()=>ML,Vector3DTileContent:()=>LL,Vector3DTileGeometry:()=>BA,Vector3DTilePoints:()=>SL,Vector3DTilePolygons:()=>wL,Vector3DTilePolylines:()=>x0,Vector3DTilePrimitive:()=>FE,VelocityOrientationProperty:()=>LO,VelocityVectorProperty:()=>Pg,VertexArray:()=>ri,VertexArrayFacade:()=>lA,VertexAttributeSemantic:()=>rt,VertexFormat:()=>Re,VerticalExaggeration:()=>Gr,VerticalExaggerationPipelineStage:()=>kN,VerticalOrigin:()=>Hn,VideoSynchronizer:()=>cee,View:()=>kI,Viewer:()=>Oee,ViewportQuad:()=>I$,Visibility:()=>Rr,Visualizer:()=>EX,VoxelBoxShape:()=>ex,VoxelCell:()=>fk,VoxelContent:()=>$I,VoxelCylinderShape:()=>tx,VoxelEllipsoidShape:()=>nx,VoxelInspector:()=>bU,VoxelInspectorViewModel:()=>xU,VoxelMetadataOrder:()=>qd,VoxelPrimitive:()=>_C,VoxelProvider:()=>b$,VoxelRenderResources:()=>Sk,VoxelShape:()=>T$,VoxelShapeType:()=>Xa,VoxelTraversal:()=>Ok,VulkanConstants:()=>lee,WallGeometry:()=>cF,WallGeometryLibrary:()=>nI,WallGeometryUpdater:()=>fF,WallGraphics:()=>EA,WallOutlineGeometry:()=>uF,WebGLConstants:()=>te,WebMapServiceImageryProvider:()=>dN,WebMapTileServiceImageryProvider:()=>mN,WebMercatorProjection:()=>Ui,WebMercatorTilingScheme:()=>Cs,WindingOrder:()=>Bs,WireframeIndexGenerator:()=>hT,WireframePipelineStage:()=>UN,_shadersAcesTonemappingStage:()=>PQ,_shadersAdditiveBlend:()=>sk,_shadersAdjustTranslucentFS:()=>$S,_shadersAllMaterialAppearanceFS:()=>bP,_shadersAllMaterialAppearanceVS:()=>TP,_shadersAmbientOcclusionGenerate:()=>RQ,_shadersAmbientOcclusionModulate:()=>MQ,_shadersAspectRampMaterial:()=>vP,_shadersAtmosphereCommon:()=>vh,_shadersAtmosphereStageFS:()=>A1,_shadersAtmosphereStageVS:()=>g1,_shadersBasicMaterialAppearanceFS:()=>SP,_shadersBasicMaterialAppearanceVS:()=>wP,_shadersBillboardCollectionFS:()=>hL,_shadersBillboardCollectionVS:()=>mL,_shadersBlackAndWhite:()=>NQ,_shadersBloomComposite:()=>LQ,_shadersBrdfLutGeneratorFS:()=>d2,_shadersBrightPass:()=>ak,_shadersBrightness:()=>OQ,_shadersBumpMapMaterial:()=>PP,_shadersCPUStylingStageFS:()=>z1,_shadersCPUStylingStageVS:()=>G1,_shadersCheckerboardMaterial:()=>RP,_shadersCloudCollectionFS:()=>h2,_shadersCloudCollectionVS:()=>m2,_shadersCloudNoiseFS:()=>p2,_shadersCloudNoiseVS:()=>A2,_shadersCompareAndPackTranslucentDepth:()=>g2,_shadersCompositeOITFS:()=>_2,_shadersCompositeTranslucentClassification:()=>QI,_shadersComputeIrradianceFS:()=>BM,_shadersComputeRadianceMapFS:()=>DM,_shadersContrastBias:()=>FQ,_shadersConvolveSpecularMapFS:()=>vM,_shadersConvolveSpecularMapVS:()=>PM,_shadersCustomShaderStageFS:()=>W1,_shadersCustomShaderStageVS:()=>H1,_shadersCzmBuiltins:()=>nE,_shadersDepthOfField:()=>QQ,_shadersDepthPlaneFS:()=>y2,_shadersDepthPlaneVS:()=>C2,_shadersDepthView:()=>kQ,_shadersDepthViewPacked:()=>hee,_shadersDotMaterial:()=>MP,_shadersEdgeDetection:()=>UQ,_shadersElevationBandMaterial:()=>NP,_shadersElevationContourMaterial:()=>LP,_shadersElevationRampMaterial:()=>OP,_shadersEllipsoidFS:()=>ew,_shadersEllipsoidSurfaceAppearanceFS:()=>o3,_shadersEllipsoidSurfaceAppearanceVS:()=>r3,_shadersEllipsoidVS:()=>tw,_shadersFXAA:()=>VQ,_shadersFXAA3_11:()=>E2,_shadersFadeMaterial:()=>FP,_shadersFeatureIdStageFS:()=>j1,_shadersFeatureIdStageVS:()=>Y1,_shadersFilmicTonemapping:()=>GQ,_shadersGaussianBlur1D:()=>mC,_shadersGeometryStageFS:()=>$1,_shadersGeometryStageVS:()=>eN,_shadersGlobeFS:()=>I2,_shadersGlobeVS:()=>x2,_shadersGridMaterial:()=>QP,_shadersGroundAtmosphere:()=>nw,_shadersHSBToRGB:()=>TD,_shadersHSLToRGB:()=>SD,_shadersImageBasedLightingStageFS:()=>y1,_shadersInstancingStageCommon:()=>v1,_shadersInstancingStageVS:()=>P1,_shadersIntersectBox:()=>_k,_shadersIntersectClippingPlanes:()=>gk,_shadersIntersectCylinder:()=>yk,_shadersIntersectDepth:()=>Ak,_shadersIntersectEllipsoid:()=>Ck,_shadersIntersectLongitude:()=>Cw,_shadersIntersection:()=>XI,_shadersIntersectionUtils:()=>pk,_shadersLegacyInstancingStageVS:()=>R1,_shadersLensFlare:()=>HQ,_shadersLightingStageFS:()=>IN,_shadersMaterialStageFS:()=>bN,_shadersMegatexture:()=>Tk,_shadersMetadataStageFS:()=>q1,_shadersMetadataStageVS:()=>K1,_shadersModelClippingPlanesStageFS:()=>b1,_shadersModelClippingPolygonsStageFS:()=>w1,_shadersModelClippingPolygonsStageVS:()=>S1,_shadersModelColorStageFS:()=>x1,_shadersModelFS:()=>nL,_shadersModelSilhouetteStageFS:()=>HN,_shadersModelSilhouetteStageVS:()=>WN,_shadersModelSplitterStageFS:()=>YN,_shadersModelVS:()=>tL,_shadersModifiedReinhardTonemapping:()=>WQ,_shadersMorphTargetsStageVS:()=>SN,_shadersNightVision:()=>jQ,_shadersNormalMapMaterial:()=>kP,_shadersOctree:()=>bk,_shadersPassThrough:()=>Bu,_shadersPassThroughDepth:()=>fC,_shadersPbrNeutralTonemapping:()=>zQ,_shadersPerInstanceColorAppearanceFS:()=>XP,_shadersPerInstanceColorAppearanceVS:()=>JP,_shadersPerInstanceFlatColorAppearanceFS:()=>uE,_shadersPerInstanceFlatColorAppearanceVS:()=>ZP,_shadersPointCloudEyeDomeLighting:()=>JM,_shadersPointCloudStylingStageVS:()=>DN,_shadersPointPrimitiveCollectionFS:()=>Py,_shadersPointPrimitiveCollectionVS:()=>IO,_shadersPolygonSignedDistanceFS:()=>SM,_shadersPolylineArrowMaterial:()=>UP,_shadersPolylineColorAppearanceVS:()=>hR,_shadersPolylineCommon:()=>Hu,_shadersPolylineDashMaterial:()=>GP,_shadersPolylineFS:()=>gE,_shadersPolylineGlowMaterial:()=>zP,_shadersPolylineMaterialAppearanceVS:()=>mR,_shadersPolylineOutlineMaterial:()=>VP,_shadersPolylineShadowVolumeFS:()=>lR,_shadersPolylineShadowVolumeMorphFS:()=>uR,_shadersPolylineShadowVolumeMorphVS:()=>fR,_shadersPolylineShadowVolumeVS:()=>dR,_shadersPolylineVS:()=>CL,_shadersPrimitiveGaussianSplatFS:()=>kL,_shadersPrimitiveGaussianSplatVS:()=>QL,_shadersPrimitiveOutlineStageFS:()=>RN,_shadersPrimitiveOutlineStageVS:()=>PN,_shadersRGBToHSB:()=>wD,_shadersRGBToHSL:()=>BD,_shadersRGBToXYZ:()=>DD,_shadersReinhardTonemapping:()=>YQ,_shadersReprojectWebMercatorFS:()=>pN,_shadersReprojectWebMercatorVS:()=>AN,_shadersRimLightingMaterial:()=>HP,_shadersSelectedFeatureIdStageCommon:()=>$b,_shadersShadowVolumeAppearanceFS:()=>ob,_shadersShadowVolumeAppearanceVS:()=>tR,_shadersShadowVolumeFS:()=>D_,_shadersSilhouette:()=>qQ,_shadersSkinningStageVS:()=>ON,_shadersSkyAtmosphereCommon:()=>iw,_shadersSkyAtmosphereFS:()=>b2,_shadersSkyAtmosphereVS:()=>T2,_shadersSkyBoxFS:()=>S2,_shadersSkyBoxVS:()=>w2,_shadersSlopeRampMaterial:()=>WP,_shadersStripeMaterial:()=>jP,_shadersSunFS:()=>B2,_shadersSunTextureFS:()=>D2,_shadersSunVS:()=>v2,_shadersTexturedMaterialAppearanceFS:()=>BP,_shadersTexturedMaterialAppearanceVS:()=>DP,_shadersVector3DTileClampedPolylinesFS:()=>PL,_shadersVector3DTileClampedPolylinesVS:()=>vL,_shadersVector3DTilePolylinesVS:()=>BL,_shadersVectorTileVS:()=>mb,_shadersVerticalExaggerationStageVS:()=>QN,_shadersViewportQuadFS:()=>P2,_shadersViewportQuadVS:()=>YC,_shadersVoxelFS:()=>hk,_shadersVoxelUtils:()=>dk,_shadersVoxelVS:()=>mk,_shadersWater:()=>qP,_shadersWaterMaskMaterial:()=>YP,_shadersXYZToRGB:()=>vD,_shadersacesTonemapping:()=>PD,_shadersalphaWeight:()=>RD,_shadersantialias:()=>MD,_shadersapplyHSBShift:()=>ND,_shadersapproximateSphericalCoordinates:()=>LD,_shadersapproximateTanh:()=>OD,_shadersbackFacing:()=>FD,_shadersbranchFreeTernary:()=>QD,_shaderscascadeColor:()=>kD,_shaderscascadeDistance:()=>UD,_shaderscascadeMatrix:()=>GD,_shaderscascadeWeights:()=>zD,_shadersclipPolygons:()=>VD,_shaderscolumbusViewMorph:()=>HD,_shaderscomputeAtmosphereColor:()=>WD,_shaderscomputeGroundAtmosphereScattering:()=>jD,_shaderscomputePosition:()=>YD,_shaderscomputeScattering:()=>qD,_shadersconvertUvToBox:()=>Ek,_shadersconvertUvToCylinder:()=>Ik,_shadersconvertUvToEllipsoid:()=>xk,_shaderscosineAndSine:()=>KD,_shadersdecompressTextureCoordinates:()=>XD,_shadersdegreesPerRadian:()=>RB,_shadersdepthClamp:()=>JD,_shadersdepthRange:()=>MB,_shadersdepthRangeStruct:()=>gD,_shaderseastNorthUpToEyeCoordinates:()=>ZD,_shadersellipsoidContainsPoint:()=>$D,_shadersellipsoidTextureCoordinates:()=>ev,_shadersepsilon1:()=>NB,_shadersepsilon2:()=>LB,_shadersepsilon3:()=>OB,_shadersepsilon4:()=>FB,_shadersepsilon5:()=>QB,_shadersepsilon6:()=>kB,_shadersepsilon7:()=>UB,_shadersequalsEpsilon:()=>tv,_shaderseyeOffset:()=>nv,_shaderseyeToWindowCoordinates:()=>iv,_shadersfastApproximateAtan:()=>ov,_shadersfog:()=>rv,_shadersgammaCorrect:()=>sv,_shadersgeodeticSurfaceNormal:()=>av,_shadersgetDefaultMaterial:()=>cv,_shadersgetDynamicAtmosphereLightDirection:()=>lv,_shadersgetLambertDiffuse:()=>uv,_shadersgetSpecular:()=>fv,_shadersgetWaterNoise:()=>dv,_shadershue:()=>hv,_shadersinfinity:()=>GB,_shadersinverseGamma:()=>mv,_shadersisEmpty:()=>pv,_shadersisFull:()=>Av,_shaderslatitudeToWebMercatorFraction:()=>gv,_shaderslineDistance:()=>_v,_shaderslinearToSrgb:()=>yv,_shadersluminance:()=>Cv,_shadersmaterial:()=>_D,_shadersmaterialInput:()=>yD,_shadersmaximumComponent:()=>Ev,_shadersmetersPerPixel:()=>Iv,_shadersmodelMaterial:()=>CD,_shadersmodelToWindowCoordinates:()=>xv,_shadersmodelVertexOutput:()=>ED,_shadersmultiplyWithColorBalance:()=>bv,_shadersnearFarScalar:()=>Tv,_shadersoctDecode:()=>Sv,_shadersoneOverPi:()=>zB,_shadersoneOverTwoPi:()=>VB,_shaderspackDepth:()=>wv,_shaderspassCesium3DTile:()=>HB,_shaderspassCesium3DTileClassification:()=>WB,_shaderspassCesium3DTileClassificationIgnoreShow:()=>jB,_shaderspassClassification:()=>YB,_shaderspassCompute:()=>qB,_shaderspassEnvironment:()=>KB,_shaderspassGaussianSplats:()=>XB,_shaderspassGlobe:()=>JB,_shaderspassOpaque:()=>ZB,_shaderspassOverlay:()=>$B,_shaderspassTerrainClassification:()=>eD,_shaderspassTranslucent:()=>tD,_shaderspassVoxels:()=>nD,_shaderspbrLighting:()=>Bv,_shaderspbrNeutralTonemapping:()=>Dv,_shadersphong:()=>vv,_shaderspi:()=>iD,_shaderspiOverFour:()=>oD,_shaderspiOverSix:()=>rD,_shaderspiOverThree:()=>sD,_shaderspiOverTwo:()=>aD,_shadersplaneDistance:()=>Pv,_shaderspointAlongRay:()=>Rv,_shadersradiansPerDegree:()=>cD,_shadersray:()=>ID,_shadersrayEllipsoidIntersectionInterval:()=>Mv,_shadersraySegment:()=>xD,_shadersraySphereIntersectionInterval:()=>Nv,_shadersreadDepth:()=>Lv,_shadersreadNonPerspective:()=>Ov,_shadersreverseLogDepth:()=>Fv,_shadersround:()=>Qv,_shaderssaturation:()=>kv,_shaderssceneMode2D:()=>lD,_shaderssceneMode3D:()=>uD,_shaderssceneModeColumbusView:()=>fD,_shaderssceneModeMorphing:()=>dD,_shadersshadowDepthCompare:()=>Uv,_shadersshadowParameters:()=>bD,_shadersshadowVisibility:()=>Gv,_shaderssignNotZero:()=>zv,_shaderssolarRadius:()=>hD,_shaderssphericalHarmonics:()=>Vv,_shaderssrgbToLinear:()=>Hv,_shaderstangentToEyeSpaceMatrix:()=>Wv,_shaderstextureCube:()=>jv,_shadersthreePiOver2:()=>mD,_shaderstransformPlane:()=>Yv,_shaderstranslateRelativeToEye:()=>qv,_shaderstranslucentPhong:()=>Kv,_shaderstranspose:()=>Xv,_shaderstwoPi:()=>pD,_shadersunpackClippingExtents:()=>Jv,_shadersunpackDepth:()=>Zv,_shadersunpackFloat:()=>$v,_shadersunpackUint:()=>eP,_shadersvalueTransform:()=>tP,_shadersvertexLogDepth:()=>nP,_shaderswebMercatorMaxLatitude:()=>AD,_shaderswindowToEyeCoordinates:()=>iP,_shaderswriteDepthClamp:()=>oP,_shaderswriteLogDepth:()=>rP,_shaderswriteNonPerspective:()=>sP,addBuffer:()=>cM,addDefaults:()=>eM,addExtensionsRequired:()=>rM,addExtensionsUsed:()=>sd,addPipelineExtras:()=>H_,addToArray:()=>Hs,appendForwardSlash:()=>iB,arrayRemoveDuplicates:()=>Ro,barycentricCoordinates:()=>KC,binarySearch:()=>jo,buildModuleUrl:()=>fn,buildVoxelDrawCommands:()=>Bk,clone:()=>je,combine:()=>St,computeFlyToLocationForRectangle:()=>wI,createBillboardPointCallback:()=>y0,createCommand:()=>Mn,createDefaultImageryProviderViewModels:()=>K3,createDefaultTerrainProviderViewModels:()=>X3,createElevationBandMaterial:()=>S$,createGooglePhotorealistic3DTileset:()=>w$,createGuid:()=>qn,createMaterialPropertyDescriptor:()=>Yo,createOsmBuildingsAsync:()=>B$,createPropertyDescriptor:()=>de,createRawPropertyDescriptor:()=>pl,createTangentSpaceDebugPrimitive:()=>D$,createTaskProcessorWorker:()=>gee,createUniform:()=>AB,createUniformArray:()=>gB,createWorldBathymetryAsync:()=>I3,createWorldImageryAsync:()=>$A,createWorldTerrainAsync:()=>yx,decodeGoogleEarthEnterpriseData:()=>a3,decodeVectorPolylinePositions:()=>NL,defaultValue:()=>uee,defer:()=>Xl,defined:()=>l,demodernizeShader:()=>aP,deprecationWarning:()=>Vs,destroyObject:()=>ue,exportKml:()=>SX,findAccessorMinMax:()=>jE,findContentMetadata:()=>S0,findGroupMetadata:()=>w0,findTileMetadata:()=>VL,forEachTextureInMaterial:()=>xb,formatError:()=>tp,freezeRenderState:()=>v9,getAbsoluteUri:()=>Pm,getAccessorByteStride:()=>au,getBaseUri:()=>oB,getBinaryAccessor:()=>Yu,getClipAndStyleCode:()=>jk,getClippingFunction:()=>jg,getComponentReader:()=>LA,getElement:()=>Un,getExtensionFromUri:()=>QC,getFilenameFromUri:()=>Tg,getImageFromTypedArray:()=>Dk,getImagePixels:()=>rh,getJsonFromTypedArray:()=>hr,getMagic:()=>bh,getMetadataClassProperty:()=>Fk,getMetadataProperty:()=>kk,getStringFromTypedArray:()=>ou,getTimestamp:()=>Mi,hasExtension:()=>_i,heightReferenceOnEntityPropertyChanged:()=>IA,isBitSet:()=>nl,isBlobUri:()=>kC,isCrossOriginUrl:()=>p_,isDataUri:()=>$p,isLeapYear:()=>oh,knockout:()=>Ee,knockout_3_5_1:()=>Tx,knockout_es5:()=>R3,loadAndExecuteScript:()=>UC,loadCubeMap:()=>yP,loadImageFromTypedArray:()=>VE,loadKTX2:()=>Zl,mergeSort:()=>Rp,moveTechniqueRenderStates:()=>oM,moveTechniquesToExtension:()=>sM,numberOfComponentsForType:()=>Ku,objectToQuery:()=>GC,oneTimeWarning:()=>yt,parseBatchTable:()=>WA,parseFeatureMetadataLegacy:()=>kM,parseGlb:()=>nM,parseResponseHeaders:()=>rB,parseStructuralMetadata:()=>QM,pickModel:()=>AT,pointInsideTriangle:()=>fee,preprocess3DTileContent:()=>fg,processVoxelProperties:()=>wk,queryToObject:()=>Fu,readAccessorPacked:()=>lM,removeExtension:()=>YE,removeExtensionsRequired:()=>tM,removeExtensionsUsed:()=>WE,removePipelineExtras:()=>iM,removeUnusedElements:()=>aM,resizeImageToNextPowerOfTwo:()=>Y_,sampleTerrain:()=>R2,sampleTerrainMostDetailed:()=>SI,scaleToGeodeticSurface:()=>FC,srgbToLinear:()=>mx,subdivideArray:()=>nR,subscribeAndEvaluate:()=>Ja,updateAccessorComponentTypes:()=>uM,updateVersion:()=>fM,usesExtension:()=>Sr,viewerCesium3DTilesInspectorMixin:()=>Fee,viewerCesiumInspectorMixin:()=>Qee,viewerDragDropMixin:()=>Uee,viewerPerformanceWatchdogMixin:()=>Gee,viewerVoxelInspectorMixin:()=>Vee,webGLConstantToGlslType:()=>dee,wrapFunction:()=>v3,writeTextToCanvas:()=>E0});module.exports=ih(FPt);function uwe(e){return e!=null}var l=uwe;function LC(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(LC.prototype=Object.create(Error.prototype),LC.prototype.constructor=LC);LC.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=` ${this.stack.toString()}`),e};LC.throwInstantiationError=function(){throw new LC("This function defines an interface and should not be called directly.")};var he=LC;var Gs={};Gs.typeOf={};function fwe(e){return`${e} is required, actual value was undefined`}function vx(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}Gs.defined=function(e,t){if(!l(t))throw new he(fwe(e))};Gs.typeOf.func=function(e,t){if(typeof t!="function")throw new he(vx(typeof t,"function",e))};Gs.typeOf.string=function(e,t){if(typeof t!="string")throw new he(vx(typeof t,"string",e))};Gs.typeOf.number=function(e,t){if(typeof t!="number")throw new he(vx(typeof t,"number",e))};Gs.typeOf.number.lessThan=function(e,t,n){if(Gs.typeOf.number(e,t),t>=n)throw new he(`Expected ${e} to be less than ${n}, actual value was ${t}`)};Gs.typeOf.number.lessThanOrEquals=function(e,t,n){if(Gs.typeOf.number(e,t),t>n)throw new he(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};Gs.typeOf.number.greaterThan=function(e,t,n){if(Gs.typeOf.number(e,t),t<=n)throw new he(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};Gs.typeOf.number.greaterThanOrEquals=function(e,t,n){if(Gs.typeOf.number(e,t),t0?1:-1};ut.signNotZero=function(e){return e<0?-1:1};ut.toSNorm=function(e,t){return t=t??255,Math.round((ut.clamp(e,-1,1)*.5+.5)*t)};ut.fromSNorm=function(e,t){return t=t??255,ut.clamp(e,0,t)/t*2-1};ut.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:ut.clamp((e-t)/n,0,1)};ut.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};ut.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};ut.lerp=function(e,t,n){return(1-n)*e+n*t};ut.PI=Math.PI;ut.ONE_OVER_PI=1/Math.PI;ut.PI_OVER_TWO=Math.PI/2;ut.PI_OVER_THREE=Math.PI/3;ut.PI_OVER_FOUR=Math.PI/4;ut.PI_OVER_SIX=Math.PI/6;ut.THREE_PI_OVER_TWO=3*Math.PI/2;ut.TWO_PI=2*Math.PI;ut.ONE_OVER_TWO_PI=1/(2*Math.PI);ut.RADIANS_PER_DEGREE=Math.PI/180;ut.DEGREES_PER_RADIAN=180/Math.PI;ut.RADIANS_PER_ARCSECOND=ut.RADIANS_PER_DEGREE/3600;ut.toRadians=function(e){return e*ut.RADIANS_PER_DEGREE};ut.toDegrees=function(e){return e*ut.DEGREES_PER_RADIAN};ut.convertLongitudeRange=function(e){let t=ut.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};ut.clampToLatitudeRange=function(e){return ut.clamp(e,-1*ut.PI_OVER_TWO,ut.PI_OVER_TWO)};ut.negativePiToPi=function(e){return e>=-ut.PI&&e<=ut.PI?e:ut.zeroToTwoPi(e+ut.PI)-ut.PI};ut.zeroToTwoPi=function(e){if(e>=0&&e<=ut.TWO_PI)return e;let t=ut.mod(e,ut.TWO_PI);return Math.abs(t)ut.EPSILON14?ut.TWO_PI:t};ut.mod=function(e,t){return ut.sign(e)===ut.sign(t)&&Math.abs(e)n};ut.greaterThanOrEquals=function(e,t,n){return e-t>-n};var vU=[1];ut.factorial=function(e){let t=vU.length;if(e>=t){let n=vU[t-1];for(let i=t;i<=e;i++){let o=n*i;vU.push(o),n=o}}return vU[e]};ut.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};ut.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};ut.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};ut.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};ut.clamp=function(e,t,n){return en?n:e};var Jee=new U5.default;ut.setRandomNumberSeed=function(e){Jee=new U5.default(e)};ut.nextRandomNumber=function(){return Jee.random()};ut.randomBetween=function(e,t){return ut.nextRandomNumber()*(t-e)+e};ut.acosClamped=function(e){return Math.acos(ut.clamp(e,-1,1))};ut.asinClamped=function(e){return Math.asin(ut.clamp(e,-1,1))};ut.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};ut.logBase=function(e,t){return Math.log(e)/Math.log(t)};ut.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};ut.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};ut.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};ut.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};ut.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=ut.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?ut.PI_OVER_TWO-i:i,i=e<0?ut.PI-i:i,i=t<0?-i:i,i};var D=ut;function it(e,t,n){this.x=e??0,this.y=t??0,this.z=n??0}it.fromSpherical=function(e,t){l(t)||(t=new it);let n=e.clock,i=e.cone,o=e.magnitude??1,r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t};it.fromElements=function(e,t,n,i){return l(i)?(i.x=e,i.y=t,i.z=n,i):new it(e,t,n)};it.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new it(e.x,e.y,e.z)};it.fromCartesian4=it.clone;it.packedLength=3;it.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t};it.unpack=function(e,t,n){return t=t??0,l(n)||(n=new it),n.x=e[t++],n.y=e[t++],n.z=e[t],n};it.packArray=function(e,t){let n=e.length,i=n*3;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;oi&&(o=u,i=f)}let r=1,s=0,a=W5[o],c=j5[o];if(Math.abs(e[st.getElementIndex(c,a)])>n){let u=e[st.getElementIndex(c,c)],f=e[st.getElementIndex(a,a)],h=e[st.getElementIndex(c,a)],p=(u-f)/2/h,g;p<0?g=-1/(-p+Math.sqrt(1+p*p)):g=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+g*g),s=g*r}return t=st.clone(st.IDENTITY,t),t[st.getElementIndex(a,a)]=t[st.getElementIndex(c,c)]=r,t[st.getElementIndex(c,a)]=s,t[st.getElementIndex(a,c)]=-s,t}var NU=new st,nte=new st;st.computeEigenDecomposition=function(e,t){let n=D.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=st.clone(st.IDENTITY,t.unitary),a=t.diagonal=st.clone(e,t.diagonal),c=n*Cwe(a);for(;rc;)Iwe(a,NU),st.transpose(NU,nte),st.multiply(a,NU,a),st.multiply(nte,a,a),st.multiply(s,NU,s),++o>2&&(++r,o=0);return t};st.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t};st.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],u=e[8];return t*(r*u-c*s)+o*(c*i-n*u)+a*(n*s-r*i)};st.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],u=e[7],f=e[8],h=st.determinant(e);t[0]=s*f-u*a,t[1]=u*o-i*f,t[2]=i*a-s*o,t[3]=c*a-r*f,t[4]=n*f-c*o,t[5]=r*o-n*a,t[6]=r*u-c*s,t[7]=c*i-n*u,t[8]=n*s-r*i;let p=1/h;return st.multiplyByScalar(t,p,t)};var xwe=new st;st.inverseTranspose=function(e,t){return st.inverse(st.transpose(e,xwe),t)};st.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]};st.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n};st.IDENTITY=Object.freeze(new st(1,0,0,0,1,0,0,0,1));st.ZERO=Object.freeze(new st(0,0,0,0,0,0,0,0,0));st.COLUMN0ROW0=0;st.COLUMN0ROW1=1;st.COLUMN0ROW2=2;st.COLUMN1ROW0=3;st.COLUMN1ROW1=4;st.COLUMN1ROW2=5;st.COLUMN2ROW0=6;st.COLUMN2ROW1=7;st.COLUMN2ROW2=8;Object.defineProperties(st.prototype,{length:{get:function(){return st.packedLength}}});st.prototype.clone=function(e){return st.clone(this,e)};st.prototype.equals=function(e){return st.equals(this,e)};st.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]};st.prototype.equalsEpsilon=function(e,t){return st.equalsEpsilon(this,e,t)};st.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) (${this[1]}, ${this[4]}, ${this[7]}) (${this[2]}, ${this[5]}, ${this[8]})`};var X=st;function eB(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(eB.prototype=Object.create(Error.prototype),eB.prototype.constructor=eB);eB.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=` ${this.stack.toString()}`),e};var ce=eB;function ot(e,t,n,i,o,r,s,a,c,u,f,h,p,g,m,_){this[0]=e??0,this[1]=o??0,this[2]=c??0,this[3]=p??0,this[4]=t??0,this[5]=r??0,this[6]=u??0,this[7]=g??0,this[8]=n??0,this[9]=s??0,this[10]=f??0,this[11]=m??0,this[12]=i??0,this[13]=a??0,this[14]=h??0,this[15]=_??0}ot.packedLength=16;ot.pack=function(e,t,n){return n=n??0,t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};ot.unpack=function(e,t,n){return t=t??0,l(n)||(n=new ot),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};ot.packArray=function(e,t){let n=e.length,i=n*16;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};aa.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=D.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};aa.fromTypedArray=function(e){if(e instanceof Uint8Array)return aa.UNSIGNED_BYTE;if(e instanceof Uint16Array)return aa.UNSIGNED_SHORT;if(e instanceof Uint32Array)return aa.UNSIGNED_INT};var Qe=Object.freeze(aa);var LU={STREAM_DRAW:te.STREAM_DRAW,STATIC_DRAW:te.STATIC_DRAW,DYNAMIC_DRAW:te.DYNAMIC_DRAW,validate:function(e){return e===LU.STREAM_DRAW||e===LU.STATIC_DRAW||e===LU.DYNAMIC_DRAW}},Ue=Object.freeze(LU);function zf(e){e=e??V.EMPTY_OBJECT;let t=e.context._gl,n=e.bufferTarget,i=e.typedArray,o=e.sizeInBytes,r=e.usage,s=l(i);s&&(o=i.byteLength);let a=t.createBuffer();t.bindBuffer(n,a),t.bufferData(n,s?i:o,r),t.bindBuffer(n,null),this._id=qn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}zf.createVertexBuffer=function(e){return new zf({context:e.context,bufferTarget:te.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};zf.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Qe.getSizeInBytes(n),o=new zf({context:t,bufferTarget:te.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),r=o.sizeInBytes/i;return Object.defineProperties(o,{indexDatatype:{get:function(){return n}},bytesPerIndex:{get:function(){return i}},numberOfIndices:{get:function(){return r}}}),o};Object.defineProperties(zf.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});zf.prototype._getBuffer=function(){return this._buffer};zf.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)};zf.prototype.copyFromBuffer=function(e,t,n,i){let o=te.COPY_READ_BUFFER,r=te.COPY_WRITE_BUFFER,s=this._gl;s.bindBuffer(r,this._buffer),s.bindBuffer(o,e._buffer),s.copyBufferSubData(o,r,t,n,i),s.bindBuffer(r,null),s.bindBuffer(o,null)};zf.prototype.getBufferData=function(e,t,n,i){t=t??0,n=n??0;let o=this._gl,r=te.COPY_READ_BUFFER;o.bindBuffer(r,this._buffer),o.getBufferSubData(r,t,e,n,i),o.bindBuffer(r,null)};zf.prototype.isDestroyed=function(){return!1};zf.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),ue(this)};var Ct=zf;var d_,qr={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},Kl={};Object.defineProperties(Kl,{element:{get:function(){if(Kl.supportsFullscreen())return document[qr.fullscreenElement]}},changeEventName:{get:function(){if(Kl.supportsFullscreen())return qr.fullscreenchange}},errorEventName:{get:function(){if(Kl.supportsFullscreen())return qr.fullscreenerror}},enabled:{get:function(){if(Kl.supportsFullscreen())return document[qr.fullscreenEnabled]}},fullscreen:{get:function(){if(Kl.supportsFullscreen())return Kl.element!==null}}});Kl.supportsFullscreen=function(){if(l(d_))return d_;d_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return qr.requestFullscreen="requestFullscreen",qr.exitFullscreen="exitFullscreen",qr.fullscreenEnabled="fullscreenEnabled",qr.fullscreenElement="fullscreenElement",qr.fullscreenchange="fullscreenchange",qr.fullscreenerror="fullscreenerror",d_=!0,d_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i{let t=new Image;t.onload=function(){rl._result=t.width>0&&t.height>0,e(rl._result)},t.onerror=function(){rl._result=!1,e(rl._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),rl._promise};Object.defineProperties(rl,{initialized:{get:function(){return l(rl._result)}}});var Nx=[];typeof ArrayBuffer<"u"&&(Nx.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Nx.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Nx.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Nx.push(BigInt64Array),typeof BigUint64Array<"u"&&Nx.push(BigUint64Array));var Vf={isChrome:$5,chromeVersion:kwe,isSafari:ste,safariVersion:Uwe,isWebkit:ate,webkitVersion:Gwe,isInternetExplorer:cte,internetExplorerVersion:zwe,isEdge:zU,edgeVersion:Vwe,isFirefox:VU,firefoxVersion:jwe,isWindows:Hwe,isIPadOrIOS:Wwe,hardwareConcurrency:Tc.hardwareConcurrency??3,supportsPointerEvents:Ywe,supportsImageRenderingPixelated:fte,supportsWebP:rl,imageRenderingValue:qwe,typedArrayTypes:Nx};Vf.supportsBasis=function(e){return Vf.supportsWebAssembly()&&e.context.supportsBasis};Vf.supportsFullscreen=function(){return Or.supportsFullscreen()};Vf.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};Vf.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};Vf.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};Vf.supportsBigInt=function(){return typeof BigInt<"u"};Vf.supportsWebWorkers=function(){return typeof Worker<"u"};Vf.supportsWebAssembly=function(){return typeof WebAssembly<"u"};Vf.supportsWebgl2=function(e){return e.context.webgl2};Vf.supportsEsmWebWorkers=function(){return!VU()||parseInt(e9)>=114};var jt=Vf;function t9(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}function re(e,t,n,i){this.red=e??1,this.green=t??1,this.blue=n??1,this.alpha=i??1}re.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new re(e.x,e.y,e.z,e.w)};re.fromBytes=function(e,t,n,i,o){return e=re.byteToFloat(e??255),t=re.byteToFloat(t??255),n=re.byteToFloat(n??255),i=re.byteToFloat(i??255),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new re(e,t,n,i)};re.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new re(e.red,e.green,e.blue,t)};var n9,i9,Jp;jt.supportsTypedArrays()&&(n9=new ArrayBuffer(4),i9=new Uint32Array(n9),Jp=new Uint8Array(n9));re.fromRgba=function(e,t){return i9[0]=e,re.fromBytes(Jp[0],Jp[1],Jp[2],Jp[3],t)};re.fromHsl=function(e,t,n,i,o){e=(e??0)%1,t=t??0,n=n??0,i=i??1;let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let u=2*n-c;r=t9(u,c,e+1/3),s=t9(u,c,e),a=t9(u,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new re(r,s,a,i)};re.fromRandom=function(e,t){e=e??V.EMPTY_OBJECT;let n=e.red;if(!l(n)){let s=e.minimumRed??0,a=e.maximumRed??1;n=s+D.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=e.minimumGreen??0,a=e.maximumGreen??1;i=s+D.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=e.minimumBlue??0,a=e.maximumBlue??1;o=s+D.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=e.minimumAlpha??0,a=e.maximumAlpha??1;r=s+D.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new re(n,i,o,r)};var Kwe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Xwe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,Jwe=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,Zwe=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;re.fromCssColorString=function(e,t){l(t)||(t=new re),e=e.trim();let n=re[e.toUpperCase()];if(l(n))return re.clone(n,t),t;let i=Kwe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(i[4]??"f",16)/15,t):(i=Xwe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(i[4]??"ff",16)/255,t):(i=Jwe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(i[4]??"1.0"),t):(i=Zwe.exec(e),i!==null?re.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]??"1.0"),t):(t=void 0,t))))};re.packedLength=4;re.pack=function(e,t,n){return n=n??0,t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};re.unpack=function(e,t,n){return t=t??0,l(n)||(n=new re),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};re.byteToFloat=function(e){return e/255};re.floatToByte=function(e){return e===1?255:e*256|0};re.clone=function(e,t){if(l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new re(e.red,e.green,e.blue,e.alpha)};re.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};re.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};re.prototype.clone=function(e){return re.clone(this,e)};re.prototype.equals=function(e){return re.equals(this,e)};re.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};re.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};re.prototype.toCssColorString=function(){let e=re.floatToByte(this.red),t=re.floatToByte(this.green),n=re.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};re.prototype.toCssHexString=function(){let e=re.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=re.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=re.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=re.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};re.prototype.toBytes=function(e){let t=re.floatToByte(this.red),n=re.floatToByte(this.green),i=re.floatToByte(this.blue),o=re.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};re.prototype.toRgba=function(){return Jp[0]=re.floatToByte(this.red),Jp[1]=re.floatToByte(this.green),Jp[2]=re.floatToByte(this.blue),Jp[3]=re.floatToByte(this.alpha),i9[0]};re.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};re.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};re.prototype.withAlpha=function(e,t){return re.fromAlpha(this,e,t)};re.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};re.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};re.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};re.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};re.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};re.lerp=function(e,t,n,i){return i.red=D.lerp(e.red,t.red,n),i.green=D.lerp(e.green,t.green,n),i.blue=D.lerp(e.blue,t.blue,n),i.alpha=D.lerp(e.alpha,t.alpha,n),i};re.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};re.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};re.ALICEBLUE=Object.freeze(re.fromCssColorString("#F0F8FF"));re.ANTIQUEWHITE=Object.freeze(re.fromCssColorString("#FAEBD7"));re.AQUA=Object.freeze(re.fromCssColorString("#00FFFF"));re.AQUAMARINE=Object.freeze(re.fromCssColorString("#7FFFD4"));re.AZURE=Object.freeze(re.fromCssColorString("#F0FFFF"));re.BEIGE=Object.freeze(re.fromCssColorString("#F5F5DC"));re.BISQUE=Object.freeze(re.fromCssColorString("#FFE4C4"));re.BLACK=Object.freeze(re.fromCssColorString("#000000"));re.BLANCHEDALMOND=Object.freeze(re.fromCssColorString("#FFEBCD"));re.BLUE=Object.freeze(re.fromCssColorString("#0000FF"));re.BLUEVIOLET=Object.freeze(re.fromCssColorString("#8A2BE2"));re.BROWN=Object.freeze(re.fromCssColorString("#A52A2A"));re.BURLYWOOD=Object.freeze(re.fromCssColorString("#DEB887"));re.CADETBLUE=Object.freeze(re.fromCssColorString("#5F9EA0"));re.CHARTREUSE=Object.freeze(re.fromCssColorString("#7FFF00"));re.CHOCOLATE=Object.freeze(re.fromCssColorString("#D2691E"));re.CORAL=Object.freeze(re.fromCssColorString("#FF7F50"));re.CORNFLOWERBLUE=Object.freeze(re.fromCssColorString("#6495ED"));re.CORNSILK=Object.freeze(re.fromCssColorString("#FFF8DC"));re.CRIMSON=Object.freeze(re.fromCssColorString("#DC143C"));re.CYAN=Object.freeze(re.fromCssColorString("#00FFFF"));re.DARKBLUE=Object.freeze(re.fromCssColorString("#00008B"));re.DARKCYAN=Object.freeze(re.fromCssColorString("#008B8B"));re.DARKGOLDENROD=Object.freeze(re.fromCssColorString("#B8860B"));re.DARKGRAY=Object.freeze(re.fromCssColorString("#A9A9A9"));re.DARKGREEN=Object.freeze(re.fromCssColorString("#006400"));re.DARKGREY=re.DARKGRAY;re.DARKKHAKI=Object.freeze(re.fromCssColorString("#BDB76B"));re.DARKMAGENTA=Object.freeze(re.fromCssColorString("#8B008B"));re.DARKOLIVEGREEN=Object.freeze(re.fromCssColorString("#556B2F"));re.DARKORANGE=Object.freeze(re.fromCssColorString("#FF8C00"));re.DARKORCHID=Object.freeze(re.fromCssColorString("#9932CC"));re.DARKRED=Object.freeze(re.fromCssColorString("#8B0000"));re.DARKSALMON=Object.freeze(re.fromCssColorString("#E9967A"));re.DARKSEAGREEN=Object.freeze(re.fromCssColorString("#8FBC8F"));re.DARKSLATEBLUE=Object.freeze(re.fromCssColorString("#483D8B"));re.DARKSLATEGRAY=Object.freeze(re.fromCssColorString("#2F4F4F"));re.DARKSLATEGREY=re.DARKSLATEGRAY;re.DARKTURQUOISE=Object.freeze(re.fromCssColorString("#00CED1"));re.DARKVIOLET=Object.freeze(re.fromCssColorString("#9400D3"));re.DEEPPINK=Object.freeze(re.fromCssColorString("#FF1493"));re.DEEPSKYBLUE=Object.freeze(re.fromCssColorString("#00BFFF"));re.DIMGRAY=Object.freeze(re.fromCssColorString("#696969"));re.DIMGREY=re.DIMGRAY;re.DODGERBLUE=Object.freeze(re.fromCssColorString("#1E90FF"));re.FIREBRICK=Object.freeze(re.fromCssColorString("#B22222"));re.FLORALWHITE=Object.freeze(re.fromCssColorString("#FFFAF0"));re.FORESTGREEN=Object.freeze(re.fromCssColorString("#228B22"));re.FUCHSIA=Object.freeze(re.fromCssColorString("#FF00FF"));re.GAINSBORO=Object.freeze(re.fromCssColorString("#DCDCDC"));re.GHOSTWHITE=Object.freeze(re.fromCssColorString("#F8F8FF"));re.GOLD=Object.freeze(re.fromCssColorString("#FFD700"));re.GOLDENROD=Object.freeze(re.fromCssColorString("#DAA520"));re.GRAY=Object.freeze(re.fromCssColorString("#808080"));re.GREEN=Object.freeze(re.fromCssColorString("#008000"));re.GREENYELLOW=Object.freeze(re.fromCssColorString("#ADFF2F"));re.GREY=re.GRAY;re.HONEYDEW=Object.freeze(re.fromCssColorString("#F0FFF0"));re.HOTPINK=Object.freeze(re.fromCssColorString("#FF69B4"));re.INDIANRED=Object.freeze(re.fromCssColorString("#CD5C5C"));re.INDIGO=Object.freeze(re.fromCssColorString("#4B0082"));re.IVORY=Object.freeze(re.fromCssColorString("#FFFFF0"));re.KHAKI=Object.freeze(re.fromCssColorString("#F0E68C"));re.LAVENDER=Object.freeze(re.fromCssColorString("#E6E6FA"));re.LAVENDAR_BLUSH=Object.freeze(re.fromCssColorString("#FFF0F5"));re.LAWNGREEN=Object.freeze(re.fromCssColorString("#7CFC00"));re.LEMONCHIFFON=Object.freeze(re.fromCssColorString("#FFFACD"));re.LIGHTBLUE=Object.freeze(re.fromCssColorString("#ADD8E6"));re.LIGHTCORAL=Object.freeze(re.fromCssColorString("#F08080"));re.LIGHTCYAN=Object.freeze(re.fromCssColorString("#E0FFFF"));re.LIGHTGOLDENRODYELLOW=Object.freeze(re.fromCssColorString("#FAFAD2"));re.LIGHTGRAY=Object.freeze(re.fromCssColorString("#D3D3D3"));re.LIGHTGREEN=Object.freeze(re.fromCssColorString("#90EE90"));re.LIGHTGREY=re.LIGHTGRAY;re.LIGHTPINK=Object.freeze(re.fromCssColorString("#FFB6C1"));re.LIGHTSEAGREEN=Object.freeze(re.fromCssColorString("#20B2AA"));re.LIGHTSKYBLUE=Object.freeze(re.fromCssColorString("#87CEFA"));re.LIGHTSLATEGRAY=Object.freeze(re.fromCssColorString("#778899"));re.LIGHTSLATEGREY=re.LIGHTSLATEGRAY;re.LIGHTSTEELBLUE=Object.freeze(re.fromCssColorString("#B0C4DE"));re.LIGHTYELLOW=Object.freeze(re.fromCssColorString("#FFFFE0"));re.LIME=Object.freeze(re.fromCssColorString("#00FF00"));re.LIMEGREEN=Object.freeze(re.fromCssColorString("#32CD32"));re.LINEN=Object.freeze(re.fromCssColorString("#FAF0E6"));re.MAGENTA=Object.freeze(re.fromCssColorString("#FF00FF"));re.MAROON=Object.freeze(re.fromCssColorString("#800000"));re.MEDIUMAQUAMARINE=Object.freeze(re.fromCssColorString("#66CDAA"));re.MEDIUMBLUE=Object.freeze(re.fromCssColorString("#0000CD"));re.MEDIUMORCHID=Object.freeze(re.fromCssColorString("#BA55D3"));re.MEDIUMPURPLE=Object.freeze(re.fromCssColorString("#9370DB"));re.MEDIUMSEAGREEN=Object.freeze(re.fromCssColorString("#3CB371"));re.MEDIUMSLATEBLUE=Object.freeze(re.fromCssColorString("#7B68EE"));re.MEDIUMSPRINGGREEN=Object.freeze(re.fromCssColorString("#00FA9A"));re.MEDIUMTURQUOISE=Object.freeze(re.fromCssColorString("#48D1CC"));re.MEDIUMVIOLETRED=Object.freeze(re.fromCssColorString("#C71585"));re.MIDNIGHTBLUE=Object.freeze(re.fromCssColorString("#191970"));re.MINTCREAM=Object.freeze(re.fromCssColorString("#F5FFFA"));re.MISTYROSE=Object.freeze(re.fromCssColorString("#FFE4E1"));re.MOCCASIN=Object.freeze(re.fromCssColorString("#FFE4B5"));re.NAVAJOWHITE=Object.freeze(re.fromCssColorString("#FFDEAD"));re.NAVY=Object.freeze(re.fromCssColorString("#000080"));re.OLDLACE=Object.freeze(re.fromCssColorString("#FDF5E6"));re.OLIVE=Object.freeze(re.fromCssColorString("#808000"));re.OLIVEDRAB=Object.freeze(re.fromCssColorString("#6B8E23"));re.ORANGE=Object.freeze(re.fromCssColorString("#FFA500"));re.ORANGERED=Object.freeze(re.fromCssColorString("#FF4500"));re.ORCHID=Object.freeze(re.fromCssColorString("#DA70D6"));re.PALEGOLDENROD=Object.freeze(re.fromCssColorString("#EEE8AA"));re.PALEGREEN=Object.freeze(re.fromCssColorString("#98FB98"));re.PALETURQUOISE=Object.freeze(re.fromCssColorString("#AFEEEE"));re.PALEVIOLETRED=Object.freeze(re.fromCssColorString("#DB7093"));re.PAPAYAWHIP=Object.freeze(re.fromCssColorString("#FFEFD5"));re.PEACHPUFF=Object.freeze(re.fromCssColorString("#FFDAB9"));re.PERU=Object.freeze(re.fromCssColorString("#CD853F"));re.PINK=Object.freeze(re.fromCssColorString("#FFC0CB"));re.PLUM=Object.freeze(re.fromCssColorString("#DDA0DD"));re.POWDERBLUE=Object.freeze(re.fromCssColorString("#B0E0E6"));re.PURPLE=Object.freeze(re.fromCssColorString("#800080"));re.RED=Object.freeze(re.fromCssColorString("#FF0000"));re.ROSYBROWN=Object.freeze(re.fromCssColorString("#BC8F8F"));re.ROYALBLUE=Object.freeze(re.fromCssColorString("#4169E1"));re.SADDLEBROWN=Object.freeze(re.fromCssColorString("#8B4513"));re.SALMON=Object.freeze(re.fromCssColorString("#FA8072"));re.SANDYBROWN=Object.freeze(re.fromCssColorString("#F4A460"));re.SEAGREEN=Object.freeze(re.fromCssColorString("#2E8B57"));re.SEASHELL=Object.freeze(re.fromCssColorString("#FFF5EE"));re.SIENNA=Object.freeze(re.fromCssColorString("#A0522D"));re.SILVER=Object.freeze(re.fromCssColorString("#C0C0C0"));re.SKYBLUE=Object.freeze(re.fromCssColorString("#87CEEB"));re.SLATEBLUE=Object.freeze(re.fromCssColorString("#6A5ACD"));re.SLATEGRAY=Object.freeze(re.fromCssColorString("#708090"));re.SLATEGREY=re.SLATEGRAY;re.SNOW=Object.freeze(re.fromCssColorString("#FFFAFA"));re.SPRINGGREEN=Object.freeze(re.fromCssColorString("#00FF7F"));re.STEELBLUE=Object.freeze(re.fromCssColorString("#4682B4"));re.TAN=Object.freeze(re.fromCssColorString("#D2B48C"));re.TEAL=Object.freeze(re.fromCssColorString("#008080"));re.THISTLE=Object.freeze(re.fromCssColorString("#D8BFD8"));re.TOMATO=Object.freeze(re.fromCssColorString("#FF6347"));re.TURQUOISE=Object.freeze(re.fromCssColorString("#40E0D0"));re.VIOLET=Object.freeze(re.fromCssColorString("#EE82EE"));re.WHEAT=Object.freeze(re.fromCssColorString("#F5DEB3"));re.WHITE=Object.freeze(re.fromCssColorString("#FFFFFF"));re.WHITESMOKE=Object.freeze(re.fromCssColorString("#F5F5F5"));re.YELLOW=Object.freeze(re.fromCssColorString("#FFFF00"));re.YELLOWGREEN=Object.freeze(re.fromCssColorString("#9ACD32"));re.TRANSPARENT=Object.freeze(new re(0,0,0,0));var G=re;function HU(e){e=e??V.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}HU.ALL=Object.freeze(new HU({color:new G(0,0,0,0),depth:1,stencil:0}));HU.prototype.execute=function(e,t){e.clear(this,t)};var pi=HU;var $we={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE:4,CESIUM_3D_TILE_CLASSIFICATION:5,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:6,OPAQUE:7,TRANSLUCENT:8,VOXELS:9,GAUSSIAN_SPLATS:10,OVERLAY:11,NUMBER_OF_PASSES:12},Be=Object.freeze($we);function dte(e){e=e??V.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=Be.COMPUTE,this.owner=e.owner}dte.prototype.execute=function(e){e.execute(this)};var sl=dte;function Yt(e,t){this.x=e??0,this.y=t??0}Yt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new Yt(e,t)};Yt.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new Yt(e.x,e.y)};Yt.fromCartesian3=Yt.clone;Yt.fromCartesian4=Yt.clone;Yt.packedLength=2;Yt.pack=function(e,t,n){return n=n??0,t[n++]=e.x,t[n]=e.y,t};Yt.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Yt),n.x=e[t++],n.y=e[t],n};Yt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;oD.EPSILON12);return l(o)?(o.x=r*N,o.y=s*L,o.z=a*A,o):new d(r*N,s*L,a*A)}var FC=iBe;function $o(e,t,n){this.longitude=e??0,this.latitude=t??0,this.height=n??0}$o.fromRadians=function(e,t,n,i){return n=n??0,l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new $o(e,t,n)};$o.fromDegrees=function(e,t,n,i){return e=D.toRadians(e),t=D.toRadians(t),$o.fromRadians(e,t,n,i)};var oBe=new d,rBe=new d,sBe=new d;$o._ellipsoidOneOverRadii=new d(1/6378137,1/6378137,1/6356752314245179e-9);$o._ellipsoidOneOverRadiiSquared=new d(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));$o._ellipsoidCenterToleranceSquared=D.EPSILON1;$o.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:$o._ellipsoidOneOverRadii,o=l(t)?t.oneOverRadiiSquared:$o._ellipsoidOneOverRadiiSquared,r=l(t)?t._centerToleranceSquared:$o._ellipsoidCenterToleranceSquared,s=FC(e,i,o,r,rBe);if(!l(s))return;let a=d.multiplyComponents(s,o,oBe);a=d.normalize(a,a);let c=d.subtract(e,s,sBe),u=Math.atan2(a.y,a.x),f=Math.asin(a.z),h=D.sign(d.dot(c,e))*d.magnitude(c);return l(n)?(n.longitude=u,n.latitude=f,n.height=h,n):new $o(u,f,h)};$o.toCartesian=function(e,t,n){return d.fromRadians(e.longitude,e.latitude,e.height,t,n)};$o.clone=function(e,t){if(l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new $o(e.longitude,e.latitude,e.height)};$o.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};$o.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};$o.ZERO=Object.freeze(new $o(0,0,0));$o.prototype.clone=function(e){return $o.clone(this,e)};$o.prototype.equals=function(e){return $o.equals(this,e)};$o.prototype.equalsEpsilon=function(e,t){return $o.equalsEpsilon(this,e,t)};$o.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var me=$o;function gte(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new d(t,n,i),e._radiiSquared=new d(t*t,n*n,i*i),e._radiiToTheFourth=new d(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new d(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new d(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)}function Di(e,t,n){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,gte(this,e,t,n)}Object.defineProperties(Di.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});Di.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(d.clone(n,t._radii),d.clone(e._radiiSquared,t._radiiSquared),d.clone(e._radiiToTheFourth,t._radiiToTheFourth),d.clone(e._oneOverRadii,t._oneOverRadii),d.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new Di(n.x,n.y,n.z)};Di.fromCartesian3=function(e,t){return l(t)||(t=new Di),l(e)&>e(t,e.x,e.y,e.z),t};Di.WGS84=Object.freeze(new Di(6378137,6378137,6356752314245179e-9));Di.UNIT_SPHERE=Object.freeze(new Di(1,1,1));Di.MOON=Object.freeze(new Di(D.LUNAR_RADIUS,D.LUNAR_RADIUS,D.LUNAR_RADIUS));Di._default=Di.WGS84;Object.defineProperties(Di,{default:{get:function(){return Di._default},set:function(e){Di._default=e,d._ellipsoidRadiiSquared=e.radiiSquared,me._ellipsoidOneOverRadii=e.oneOverRadii,me._ellipsoidOneOverRadiiSquared=e.oneOverRadiiSquared,me._ellipsoidCenterToleranceSquared=e._centerToleranceSquared}}});Di.prototype.clone=function(e){return Di.clone(this,e)};Di.packedLength=d.packedLength;Di.pack=function(e,t,n){return n=n??0,d.pack(e._radii,t,n),t};Di.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t);return Di.fromCartesian3(i,n)};Di.prototype.geocentricSurfaceNormal=d.normalize;Di.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new d),t.x=r,t.y=s,t.z=a,d.normalize(t,t)};Di.prototype.geodeticSurfaceNormal=function(e,t){if(!d.equalsEpsilon(e,d.ZERO,D.EPSILON14))return l(t)||(t=new d),t=d.multiplyComponents(e,this._oneOverRadiiSquared,t),d.normalize(t,t)};var aBe=new d,cBe=new d;Di.prototype.cartographicToCartesian=function(e,t){let n=aBe,i=cBe;this.geodeticSurfaceNormalCartographic(e,n),d.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(d.dot(n,i));return d.divideByScalar(i,o,i),d.multiplyByScalar(n,e.height,n),l(t)||(t=new d),d.add(i,n,t)};Di.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=this._radii.z-t))return n};var dBe=new d;Di.prototype.getLocalCurvature=function(e,t){l(t)||(t=new U);let n=this.getSurfaceNormalIntersectionWithZAxis(e,0,dBe),i=d.distance(e,n),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return U.fromElements(1/i,1/r,t)};var hBe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],mBe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Ate(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*hBe[s];r+=mBe[s]*(n(i+a)+n(i-a))}return r*=o,r}Di.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n0){o=r-1;continue}return r}return~(o+1)}var jo=ABe;function gBe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var h_=gBe;function _Be(e){return e%4===0&&e%100!==0||e%400===0}var oh=_Be;var _te=[31,28,31,30,31,30,31,31,30,31,30,31];function yBe(e,t,n,i,o,r,s,a){e=e??1,t=t??1,n=n??1,i=i??0,o=o??0,r=r??0,s=s??0,a=a??!1,this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a;function _(){vo.typeOf.number.greaterThanOrEquals("Year",e,1),vo.typeOf.number.lessThanOrEquals("Year",e,9999),vo.typeOf.number.greaterThanOrEquals("Month",t,1),vo.typeOf.number.lessThanOrEquals("Month",t,12),vo.typeOf.number.greaterThanOrEquals("Day",n,1),vo.typeOf.number.lessThanOrEquals("Day",n,31),vo.typeOf.number.greaterThanOrEquals("Hour",i,0),vo.typeOf.number.lessThanOrEquals("Hour",i,23),vo.typeOf.number.greaterThanOrEquals("Minute",o,0),vo.typeOf.number.lessThanOrEquals("Minute",o,59),vo.typeOf.bool("IsLeapSecond",a),vo.typeOf.number.greaterThanOrEquals("Second",r,0),vo.typeOf.number.lessThanOrEquals("Second",r,a?60:59),vo.typeOf.number.greaterThanOrEquals("Millisecond",s,0),vo.typeOf.number.lessThan("Millisecond",s,1e3)}function y(){let C=t===2&&oh(e)?_te[t-1]+1:_te[t-1];if(n>C)throw new he("Month and Day represents invalid date")}}var Zp=yBe;function CBe(e,t){this.julianDate=e,this.offset=t}var no=CBe;var EBe={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},ii=Object.freeze(EBe);var IBe={UTC:0,TAI:1},ni=Object.freeze(IBe);var Cte=new Zp,o9=[31,28,31,30,31,30,31,31,30,31,30,31],r9=29;function s9(e,t){return Ft.compare(e.julianDate,t.julianDate)}var Lx=new no;function qU(e){Lx.julianDate=e;let t=Ft.leapSeconds,n=jo(t,Lx,s9);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&Ft.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),Ft.addSeconds(e,i,e)}function yte(e,t){Lx.julianDate=e;let n=Ft.leapSeconds,i=jo(n,Lx,s9);if(i<0&&(i=~i),i===0)return Ft.addSeconds(e,-n[0].offset,t);if(i>=n.length)return Ft.addSeconds(e,-n[i-1].offset,t);let o=Ft.secondsDifference(n[i].julianDate,e);if(o===0)return Ft.addSeconds(e,-n[i].offset,t);if(!(o<=1))return Ft.addSeconds(e,-n[--i].offset,t)}function m_(e,t,n){let i=t/ii.SECONDS_PER_DAY|0;return e+=i,t-=ii.SECONDS_PER_DAY*i,t<0&&(e--,t+=ii.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function a9(e,t,n,i,o,r,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=r+(i*ii.SECONDS_PER_HOUR+o*ii.SECONDS_PER_MINUTE+s*ii.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var xBe=/^(\d{4})$/,bBe=/^(\d{4})-(\d{2})$/,TBe=/^(\d{4})-?(\d{3})$/,SBe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,wBe=/^(\d{4})-?(\d{2})-?(\d{2})$/,c9=/([Z+\-])?(\d{2})?:?(\d{2})?$/,BBe=/^(\d{2})(\.\d+)?/.source+c9.source,DBe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+c9.source,vBe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+c9.source;function Ft(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=e??0,t=t??0,n=n??ni.UTC;let i=e|0;t=t+(e-i)*ii.SECONDS_PER_DAY,m_(i,t,this),n===ni.UTC&&qU(this)}Ft.fromGregorianDate=function(e,t){let n=a9(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(m_(n[0],n[1],t),qU(t),t):new Ft(n[0],n[1],ni.UTC)};Ft.fromDate=function(e,t){let n=a9(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(m_(n[0],n[1],t),qU(t),t):new Ft(n[0],n[1],ni.UTC)};Ft.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,u=0,f=n[0],h=n[1],p,g;if(n=f.match(wBe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=f.match(bBe),n!==null)i=+n[1],o=+n[2];else if(n=f.match(xBe),n!==null)i=+n[1];else{let C;if(n=f.match(TBe),n!==null)i=+n[1],C=+n[2],g=oh(i);else if(n=f.match(SBe),n!==null){i=+n[1];let E=+n[2],I=+n[3]||0,b=new Date(Date.UTC(i,0,4));C=E*7+I-b.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(C),o=p.getUTCMonth()+1,r=p.getUTCDate()}g=oh(i);let m;if(l(h)){n=h.match(vBe),n!==null?(s=+n[1],a=+n[2],c=+n[3],u=+(n[4]||0)*1e3,m=5):(n=h.match(DBe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,m=4):(n=h.match(BBe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,m=3)));let C=n[m],E=+n[m+1],I=+(n[m+2]||0);switch(C){case"+":s=s-E,a=a-I;break;case"-":s=s+E,a=a+I;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let _=c===60;for(_&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=g&&o===2?r9:o9[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=g&&o===2?r9:o9[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=g&&o===2?r9:o9[o-1],r+=p;let y=a9(i,o,r,s,a,c,u);return l(t)?(m_(y[0],y[1],t),qU(t)):t=new Ft(y[0],y[1],ni.UTC),_&&Ft.addSeconds(t,1,t),t};Ft.now=function(e){return Ft.fromDate(new Date,e)};var YU=new Ft(0,0,ni.TAI);Ft.toGregorianDate=function(e,t){let n=!1,i=yte(e,YU);l(i)||(Ft.addSeconds(e,-1,YU),i=yte(YU,YU),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let u=80*s/2447|0,f=s-(2447*u/80|0)|0;s=u/11|0;let h=u+2-12*s|0,p=100*(a-49)+c+s|0,g=r/ii.SECONDS_PER_HOUR|0,m=r-g*ii.SECONDS_PER_HOUR,_=m/ii.SECONDS_PER_MINUTE|0;m=m-_*ii.SECONDS_PER_MINUTE;let y=m|0,C=(m-y)/ii.SECONDS_PER_MILLISECOND;return g+=12,g>23&&(g-=24),n&&(y+=1),l(t)?(t.year=p,t.month=h,t.day=f,t.hour=g,t.minute=_,t.second=y,t.millisecond=C,t.isLeapSecond=n,t):new Zp(p,h,f,g,_,y,C,n)};Ft.toDate=function(e){let t=Ft.toGregorianDate(e,Cte),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};Ft.toIso8601=function(e,t){let n=Ft.toGregorianDate(e,Cte),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,u=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&u===0&&(i=9999,o=12,r=31,s=24);let f;if(!l(t)&&u!==0){let h=u*.01;return f=h<1e-6?h.toFixed(20).replace(".","").replace(/0+$/,""):h.toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`}return!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(f=(u*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`)};Ft.clone=function(e,t){if(l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new Ft(e.dayNumber,e.secondsOfDay,ni.TAI)};Ft.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};Ft.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};Ft.equalsEpsilon=function(e,t,n){return n=n??0,e===t||l(e)&&l(t)&&Math.abs(Ft.secondsDifference(e,t))<=n};Ft.totalDays=function(e){return e.dayNumber+e.secondsOfDay/ii.SECONDS_PER_DAY};Ft.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*ii.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};Ft.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/ii.SECONDS_PER_DAY;return n+i};Ft.computeTaiMinusUtc=function(e){Lx.julianDate=e;let t=Ft.leapSeconds,n=jo(t,Lx,s9);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};Ft.addSeconds=function(e,t,n){return m_(e.dayNumber,e.secondsOfDay+t,n)};Ft.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*ii.SECONDS_PER_MINUTE;return m_(e.dayNumber,i,n)};Ft.addHours=function(e,t,n){let i=e.secondsOfDay+t*ii.SECONDS_PER_HOUR;return m_(e.dayNumber,i,n)};Ft.addDays=function(e,t,n){let i=e.dayNumber+t;return m_(i,e.secondsOfDay,n)};Ft.lessThan=function(e,t){return Ft.compare(e,t)<0};Ft.lessThanOrEquals=function(e,t){return Ft.compare(e,t)<=0};Ft.greaterThan=function(e,t){return Ft.compare(e,t)>0};Ft.greaterThanOrEquals=function(e,t){return Ft.compare(e,t)>=0};Ft.prototype.clone=function(e){return Ft.clone(this,e)};Ft.prototype.equals=function(e){return Ft.equals(this,e)};Ft.prototype.equalsEpsilon=function(e,t){return Ft.equalsEpsilon(this,e,t)};Ft.prototype.toString=function(){return Ft.toIso8601(this)};Ft.leapSeconds=[new no(new Ft(2441317,43210,ni.TAI),10),new no(new Ft(2441499,43211,ni.TAI),11),new no(new Ft(2441683,43212,ni.TAI),12),new no(new Ft(2442048,43213,ni.TAI),13),new no(new Ft(2442413,43214,ni.TAI),14),new no(new Ft(2442778,43215,ni.TAI),15),new no(new Ft(2443144,43216,ni.TAI),16),new no(new Ft(2443509,43217,ni.TAI),17),new no(new Ft(2443874,43218,ni.TAI),18),new no(new Ft(2444239,43219,ni.TAI),19),new no(new Ft(2444786,43220,ni.TAI),20),new no(new Ft(2445151,43221,ni.TAI),21),new no(new Ft(2445516,43222,ni.TAI),22),new no(new Ft(2446247,43223,ni.TAI),23),new no(new Ft(2447161,43224,ni.TAI),24),new no(new Ft(2447892,43225,ni.TAI),25),new no(new Ft(2448257,43226,ni.TAI),26),new no(new Ft(2448804,43227,ni.TAI),27),new no(new Ft(2449169,43228,ni.TAI),28),new no(new Ft(2449534,43229,ni.TAI),29),new no(new Ft(2450083,43230,ni.TAI),30),new no(new Ft(2450630,43231,ni.TAI),31),new no(new Ft(2451179,43232,ni.TAI),32),new no(new Ft(2453736,43233,ni.TAI),33),new no(new Ft(2454832,43234,ni.TAI),34),new no(new Ft(2456109,43235,ni.TAI),35),new no(new Ft(2457204,43236,ni.TAI),36),new no(new Ft(2457754,43237,ni.TAI),37)];var K=Ft;var kte=br(Ou(),1);function PBe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var iB=PBe;function wte(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 o=e[i];t&&(o=wte(o,t)),n[i]=o}return n}var je=wte;function Bte(e,t,n){n=n??!1;let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=Bte(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var St=Bte;function RBe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var Xl=RBe;var Dte=br(Ou(),1);function l9(e,t){let n;return typeof document<"u"&&(n=document),l9._implementation(e,t,n)}l9._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new Dte.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var Pm=l9;var vte=br(Ou(),1);function MBe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new vte.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var oB=MBe;var Pte=br(Ou(),1);function NBe(e){let t=new Pte.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 QC=NBe;var Rte={};function LBe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=Rte[t];l(i)||(i={},Rte[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var rh=LBe;var OBe=/^blob:/i;function FBe(e){return OBe.test(e)}var kC=FBe;var Rm;function QBe(e){l(Rm)||(Rm=document.createElement("a")),Rm.href=window.location.href;let t=Rm.host,n=Rm.protocol;return Rm.href=e,Rm.href=Rm.href,n!==Rm.protocol||t!==Rm.host}var p_=QBe;var kBe=/^data:/i;function UBe(e){return kBe.test(e)}var $p=UBe;function GBe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var UC=GBe;function zBe(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var rB=jBe;function Mte(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=rB(this.responseHeaders))}Mte.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Mm=Mte;var $U=br(Ou(),1);function sB(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(sB.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});sB.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};sB.prototype.removeEventListener=function(e,t){let n=this._listeners,i=this._scopes,o=-1;for(let r=0;r0){for(o.sort(YBe),e=0;e=0;--t)this.heapify(t)};zC.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(oi&&(r=t[i],this._length=i),r};zC.prototype.pop=function(e){if(e=e??0,this._length===0)return;let t=this._array,n=t[e];return u9(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var aB=zC;function qBe(e,t){return e.priority-t.priority}var ho={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},Qx=20,Sc=new aB({comparator:qBe});Sc.maximumLength=Qx;Sc.reserve(Qx);var Nm=[],eA={},KBe=typeof document<"u"?new $U.default(document.location.href):new $U.default,eG=new ge;function cr(){}cr.maximumRequests=50;cr.maximumRequestsPerServer=18;cr.requestsByServer={};cr.throttleRequests=!0;cr.debugShowStatistics=!1;cr.requestCompletedEvent=eG;Object.defineProperties(cr,{statistics:{get:function(){return ho}},priorityHeapLength:{get:function(){return Qx},set:function(e){if(ee;){let t=Sc.pop();VC(t)}Qx=e,Sc.maximumLength=e,Sc.reserve(e)}}});function Nte(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}cr.serverHasOpenSlots=function(e,t){t=t??1;let n=cr.requestsByServer[e]??cr.maximumRequestsPerServer;return eA[e]+t<=n};cr.heapHasOpenSlots=function(e){return Sc.length+e<=Qx};function Lte(e){return e.state===li.UNISSUED&&(e.state=li.ISSUED,e.deferred=Xl()),e.deferred.promise}function XBe(e){return function(t){if(e.state===li.CANCELLED)return;let n=e.deferred;--ho.numberOfActiveRequests,--eA[e.serverKey],eG.raiseEvent(),e.state=li.RECEIVED,e.deferred=void 0,n.resolve(t)}}function JBe(e){return function(t){e.state!==li.CANCELLED&&(++ho.numberOfFailedRequests,--ho.numberOfActiveRequests,--eA[e.serverKey],eG.raiseEvent(t),e.state=li.FAILED,e.deferred.reject(t))}}function Ote(e){let t=Lte(e);return e.state=li.ACTIVE,Nm.push(e),++ho.numberOfActiveRequests,++ho.numberOfActiveRequestsEver,++eA[e.serverKey],e.requestFunction().then(XBe(e)).catch(JBe(e)),t}function VC(e){let t=e.state===li.ACTIVE;if(e.state=li.CANCELLED,++ho.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--ho.numberOfActiveRequests,--eA[e.serverKey],++ho.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}cr.update=function(){let e,t,n=0,i=Nm.length;for(e=0;e0&&(Nm[e-n]=t)}Nm.length-=n;let o=Sc.internalArray,r=Sc.length;for(e=0;e0;){if(t=Sc.pop(),t.cancelled){VC(t);continue}if(t.throttleByServer&&!cr.serverHasOpenSlots(t.serverKey)){VC(t);continue}Ote(t),++a}ZBe()};cr.getServerKey=function(e){let t=new $U.default(e);t.scheme()===""&&(t=t.absoluteTo(KBe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=eA[n];return l(i)||(eA[n]=0),n};cr.request=function(e){if($p(e.url)||kC(e.url))return eG.raiseEvent(),e.state=li.RECEIVED,e.requestFunction();if(++ho.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=cr.getServerKey(e.url)),cr.throttleRequests&&e.throttleByServer&&!cr.serverHasOpenSlots(e.serverKey))return;if(!cr.throttleRequests||!e.throttle)return Ote(e);if(Nm.length>=cr.maximumRequests)return;Nte(e);let t=Sc.insert(e);if(l(t)){if(t===e)return;VC(t)}return Lte(e)};function ZBe(){cr.debugShowStatistics&&(ho.numberOfActiveRequests===0&&ho.lastNumberOfActiveRequests>0&&(ho.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${ho.numberOfAttemptedRequests}`),ho.numberOfAttemptedRequests=0),ho.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${ho.numberOfCancelledRequests}`),ho.numberOfCancelledRequests=0),ho.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${ho.numberOfCancelledActiveRequests}`),ho.numberOfCancelledActiveRequests=0),ho.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${ho.numberOfFailedRequests}`),ho.numberOfFailedRequests=0)),ho.lastNumberOfActiveRequests=ho.numberOfActiveRequests)}cr.clearForSpecs=function(){for(;Sc.length>0;){let t=Sc.pop();VC(t)}let e=Nm.length;for(let t=0;t0}},credits:{get:function(){return this._credits}}});Ot.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Ot.prototype.parseUrl=function(e,t,n,i){let o=new kte.default(e),r=eDe(o.query());this._queryParameters=t?nG(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(Pm(i))),this._url=o.toString()};function eDe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Fu(e)}function nG(e,t,n){if(!n)return St(e,t);let i=je(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}Ot.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${tDe(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(o,r){let s=i[r];return l(s)?encodeURIComponent(s):o})),t&&l(this.proxy)&&(n=this.proxy.getURL(n)),n};function tDe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${GC(e)}`}Ot.prototype.setQueryParameters=function(e,t){t?this._queryParameters=nG(this._queryParameters,e,!1):this._queryParameters=nG(e,this._queryParameters,!1)};Ot.prototype.appendQueryParameters=function(e){this._queryParameters=nG(e,this._queryParameters,!0)};Ot.prototype.setTemplateValues=function(e,t){t?this._templateValues=St(this._templateValues,e):this._templateValues=St(e,this._templateValues)};Ot.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=St(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=St(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=St(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};Ot.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})};Ot.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 Ot({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})};Ot.prototype.getBaseUri=function(e){return oB(this.getUrlComponent(e),e)};Ot.prototype.appendForwardSlash=function(){this._url=iB(this._url)};Ot.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Ot.fetchArrayBuffer=function(e){return new Ot(e).fetchArrayBuffer()};Ot.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Ot.fetchBlob=function(e){return new Ot(e).fetchBlob()};Ot.prototype.fetchImage=function(e){e=e??V.EMPTY_OBJECT;let t=e.preferImageBitmap??!1,n=e.preferBlob??!1,i=e.flipY??!1,o=e.skipColorSpaceConversion??!1;if(d9(this.request),!Ute||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return f9({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,u;return Ot.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,r}).then(function(f){if(!l(f))return;if(u=f,a)return Ot.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let h=window.URL.createObjectURL(f);return c=new Ot({url:h}),f9({resource:c,flipY:i,skipColorSpaceConversion:o,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)})};function f9(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=Xl();return Ot._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=wc.request(r);if(l(s))return s.catch(function(a){return r.state!==li.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=li.UNISSUED,r.deferred=void 0,f9({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Ot.fetchImage=function(e){return new Ot(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Ot.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Ot.fetchText=function(e){return new Ot(e).fetchText()};Ot.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)})};Ot.fetchJson=function(e){return new Ot(e).fetchJson()};Ot.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Ot.fetchXML=function(e){return new Ot(e).fetchXML()};Ot.prototype.fetchJsonp=function(e){e=e??"callback",d9(this.request);let t;do t=`loadJsonp${D.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Gte(this,e,t)};function Gte(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request,r=e.url;o.url=r,o.requestFunction=function(){let a=Xl();return window[n]=function(c){a.resolve(c);try{delete window[n]}catch{window[n]=void 0}},Ot._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=wc.request(o);if(l(s))return s.catch(function(a){return o.state!==li.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=li.UNISSUED,o.deferred=void 0,Gte(e,t,n)):Promise.reject(a)})})}Ot.fetchJsonp=function(e){return new Ot(e).fetchJsonp(e.callbackParameterName)};Ot.prototype._makeRequest=function(e){let t=this;d9(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=St(e.headers,t.headers),a=e.overrideMimeType,c=e.method,u=e.data,f=Xl(),h=Ot._Implementations.loadWithXhr(i,r,c,u,s,f,a);return l(h)&&l(h.abort)&&(n.cancelFunction=function(){h.abort()}),f.promise};let o=wc.request(n);if(l(o))return o.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==li.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=li.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function d9(e){if(e.state===li.ISSUED||e.state===li.ACTIVE)throw new ce("The Resource is already being fetched.");e.state=li.UNISSUED,e.deferred=void 0}var nDe=/^data:(.*?)(;base64)?,(.*)$/;function tG(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function Qte(e,t){let n=tG(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r{if(!a.ok){let c={};a.headers.forEach((u,f)=>{c[f]=u}),r.reject(new Mm(a.status,a,c));return}switch(t){case"text":r.resolve(a.text());break;case"json":r.resolve(a.json());break;default:r.resolve(new Uint8Array(await a.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new Mm)})}var rDe=typeof XMLHttpRequest>"u";Ot._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=nDe.exec(e);if(a!==null){r.resolve(iDe(a,t));return}if(rDe){oDe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(Ux.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let f in o)o.hasOwnProperty(f)&&c.setRequestHeader(f,o[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)){r.reject(new Mm(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,h=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let g=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};g.forEach(function(_){let y=_.split(": "),C=y.shift();m[C]=y.join(": ")}),r.resolve(m);return}if(c.status===204)r.resolve(void 0);else if(l(f)&&(!l(t)||h===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(p){r.reject(p)}else(h===""||h==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(h===""||h==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new ce("Invalid XMLHttpRequest response type."))},c.onerror=function(f){r.reject(new Mm)},c.send(i),c};Ot._Implementations.loadAndExecuteScript=function(e,t,n){return UC(e,t).catch(function(i){n.reject(i)})};Ot._DefaultImplementations={};Ot._DefaultImplementations.createImage=Ot._Implementations.createImage;Ot._DefaultImplementations.loadWithXhr=Ot._Implementations.loadWithXhr;Ot._DefaultImplementations.loadAndExecuteScript=Ot._Implementations.loadAndExecuteScript;Ot.DEFAULT=Object.freeze(new Ot({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var we=Ot;function uB(e){e=e??V.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)?zte(this,e.data):zte(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}uB.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT;let n=we.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new ce(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new uB({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};uB.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 h_(0,0,0,0,0),t}});uB.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new h_(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,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],u=K.lessThanOrEquals(a,e),f=!l(c),h=f||K.greaterThanOrEquals(c,e);if(u&&h)return o=i,!f&&c.equals(e)&&++o,r=o+1,Hte(this,n,this._samples,e,o,r,t),t}let s=jo(n,e,K.compare,this._dateColumn);return s>=0?(st.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],u=t[r];if(c.equals(u)||i.equals(c))return Vte(e,n,o,a,s),s;if(i.equals(u))return Vte(e,n,r,a,s),s;let f=K.secondsDifference(i,c)/K.secondsDifference(u,c),h=o*a,p=r*a,g=n[h+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],_=m-g;if(_>.5||_<-.5){let y=n[h+e._taiMinusUtcSecondsColumn],C=n[p+e._taiMinusUtcSecondsColumn];y!==C&&(u.equals(i)?g=m:m-=C-y)}return s.xPoleWander=lB(f,n[h+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=lB(f,n[h+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=lB(f,n[h+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=lB(f,n[h+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=lB(f,g,m),s}var fB=uB;function Bc(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}Bc.fromQuaternion=function(e,t){l(t)||(t=new Bc);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=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,r),t.roll=Math.atan2(o,i),t.pitch=-D.asinClamped(n),t};Bc.fromDegrees=function(e,t,n,i){return l(i)||(i=new Bc),i.heading=e*D.RADIANS_PER_DEGREE,i.pitch=t*D.RADIANS_PER_DEGREE,i.roll=n*D.RADIANS_PER_DEGREE,i};Bc.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new Bc(e.heading,e.pitch,e.roll)};Bc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};Bc.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)};Bc.prototype.clone=function(e){return Bc.clone(this,e)};Bc.prototype.equals=function(e){return Bc.equals(this,e)};Bc.prototype.equalsEpsilon=function(e,t,n){return Bc.equalsEpsilon(this,e,t,n)};Bc.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var ic=Bc;var Wte={},jte=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function aDe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t"u"?e:(l(iG)||(iG=document.createElement("a")),iG.href=e,iG.href)}var HC;function qte(){if(l(HC))return HC;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l(Wte?.url)?e=Pm(".",Wte.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?e=Pm("..",WC("Core/buildModuleUrl.js")):e=aDe(),HC=new we({url:Yte(e)}),HC.appendForwardSlash(),HC}function cDe(e){return Yte(require.toUrl(`../${e}`))}function Kte(e){return qte().getDerivedResource({url:e}).url}var oG;function WC(e){return l(oG)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(require.toUrl)?oG=cDe:oG=Kte),oG(e)}WC._cesiumScriptRegex=jte;WC._buildModuleUrlFromBaseUrl=Kte;WC._clearBaseResource=function(){HC=void 0};WC.setBaseUrl=function(e){HC=we.DEFAULT.getDerivedResource({url:e})};WC.getCesiumBaseUrl=qte;var fn=WC;function lDe(e,t,n){this.x=e,this.y=t,this.s=n}var jC=lDe;function p9(e){e=e??V.EMPTY_OBJECT,this._xysFileUrlTemplate=we.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=e.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=e.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new K(this._sampleZeroJulianEphemerisDate,0,ni.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),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var uDe=new K(0,0,ni.TAI);function h9(e,t,n){let i=uDe;return i.dayNumber=t,i.secondsOfDay=n,K.daysDifference(i,e._sampleZeroDateTT)}p9.prototype.preload=function(e,t,n,i){let o=h9(this,e,t),r=h9(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/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 h=c;h<=u;++h)f.push(m9(this,h));return Promise.all(f)};p9.prototype.computeXysRadians=function(e,t,n){let i=h9(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,u=this._samples;if(l(u[s*3])||(m9(this,s/this._samplesPerXysFile|0),c=!0),l(u[a*3])||(m9(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new jC(0,0,0);let f=i-s*this._stepSizeDays,h=this._work,p=this._denominators,g=this._coef,m=this._xTable,_,y;for(_=0;_<=r;++_)h[_]=f-m[_];for(_=0;_<=r;++_){for(g[_]=1,y=0;y<=r;++y)y!==_&&(g[_]*=h[y]);g[_]*=p[_];let C=(s+_)*3;n.x+=g[_]*u[C++],n.y+=g[_]*u[C++],n.s+=g[_]*u[C]}return n};function m9(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new we({url:fn(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let u=0,f=a.length;u0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[X.COLUMN1ROW2]-e[X.COLUMN2ROW1])*n,o=(e[X.COLUMN2ROW0]-e[X.COLUMN0ROW2])*n,r=(e[X.COLUMN0ROW1]-e[X.COLUMN1ROW0])*n;else{let h=fDe,p=0;c>a&&(p=1),u>a&&u>c&&(p=2);let g=h[p],m=h[g];n=Math.sqrt(e[X.getElementIndex(p,p)]-e[X.getElementIndex(g,g)]-e[X.getElementIndex(m,m)]+1);let _=dDe;_[p]=.5*n,n=.5/n,s=(e[X.getElementIndex(m,g)]-e[X.getElementIndex(g,m)])*n,_[g]=(e[X.getElementIndex(g,p)]+e[X.getElementIndex(p,g)])*n,_[m]=(e[X.getElementIndex(m,p)]+e[X.getElementIndex(p,m)])*n,i=-_[0],o=-_[1],r=-_[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new at(i,o,r,s)};var Xte=new at,Jte=new at,A9=new at,Zte=new at;at.fromHeadingPitchRoll=function(e,t){return Zte=at.fromAxisAngle(d.UNIT_X,e.roll,Xte),A9=at.fromAxisAngle(d.UNIT_Y,-e.pitch,t),t=at.multiply(A9,Zte,A9),Jte=at.fromAxisAngle(d.UNIT_Z,-e.heading,Xte),at.multiply(Jte,t,t)};var rG=new d,g9=new d,sh=new at,$te=new at,sG=new at;at.packedLength=4;at.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};at.unpack=function(e,t,n){return t=t??0,l(n)||(n=new at),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};at.packedInterpolationLength=3;at.convertPackedArrayForInterpolation=function(e,t,n,i){at.unpack(e,n*4,sG),at.conjugate(sG,sG);for(let o=0,r=n-t+1;o=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,u=a*a;for(let g=7;g>=0;--g)tA[g]=(aG[g]*c-cG[g])*s,nA[g]=(aG[g]*u-cG[g])*s;let f=r*n*(1+tA[0]*(1+tA[1]*(1+tA[2]*(1+tA[3]*(1+tA[4]*(1+tA[5]*(1+tA[6]*(1+tA[7])))))))),h=a*(1+nA[0]*(1+nA[1]*(1+nA[2]*(1+nA[3]*(1+nA[4]*(1+nA[5]*(1+nA[6]*(1+nA[7])))))))),p=at.multiplyByScalar(e,h,pDe);return at.multiplyByScalar(t,f,i),at.add(p,i,i)};at.fastSquad=function(e,t,n,i,o,r){let s=at.fastSlerp(e,t,o,mB),a=at.fastSlerp(n,i,o,zx);return at.fastSlerp(s,a,2*o*(1-o),r)};at.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};at.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};at.ZERO=Object.freeze(new at(0,0,0,0));at.IDENTITY=Object.freeze(new at(0,0,0,1));at.prototype.clone=function(e){return at.clone(this,e)};at.prototype.equals=function(e){return at.equals(this,e)};at.prototype.equalsEpsilon=function(e,t){return at.equalsEpsilon(this,e,t)};at.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Fe=at;var bi={},E9={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"}},Vx={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},I9={},Jl={east:new d,north:new d,up:new d,west:new d,south:new d,down:new d},A_=new d,g_=new d,__=new d;bi.localFrameToFixedFrameGenerator=function(e,t){if(!E9.hasOwnProperty(e)||!E9[e].hasOwnProperty(t))throw new he("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=E9[e][t],i,o=e+t;return l(I9[o])?i=I9[o]:(i=function(r,s,a){if(l(a)||(a=new M),d.equalsEpsilon(r,d.ZERO,D.EPSILON14))d.unpack(Vx[e],0,A_),d.unpack(Vx[t],0,g_),d.unpack(Vx[n],0,__);else if(D.equalsEpsilon(r.x,0,D.EPSILON14)&&D.equalsEpsilon(r.y,0,D.EPSILON14)){let c=D.sign(r.z);d.unpack(Vx[e],0,A_),e!=="east"&&e!=="west"&&d.multiplyByScalar(A_,c,A_),d.unpack(Vx[t],0,g_),t!=="east"&&t!=="west"&&d.multiplyByScalar(g_,c,g_),d.unpack(Vx[n],0,__),n!=="east"&&n!=="west"&&d.multiplyByScalar(__,c,__)}else{s=s??ne.default,s.geodeticSurfaceNormal(r,Jl.up);let c=Jl.up,u=Jl.east;u.x=-r.y,u.y=r.x,u.z=0,d.normalize(u,Jl.east),d.cross(c,u,Jl.north),d.multiplyByScalar(Jl.up,-1,Jl.down),d.multiplyByScalar(Jl.east,-1,Jl.west),d.multiplyByScalar(Jl.north,-1,Jl.south),A_=Jl[e],g_=Jl[t],__=Jl[n]}return a[0]=A_.x,a[1]=A_.y,a[2]=A_.z,a[3]=0,a[4]=g_.x,a[5]=g_.y,a[6]=g_.z,a[7]=0,a[8]=__.x,a[9]=__.y,a[10]=__.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},I9[o]=i),i};bi.eastNorthUpToFixedFrame=bi.localFrameToFixedFrameGenerator("east","north");bi.northEastDownToFixedFrame=bi.localFrameToFixedFrameGenerator("north","east");bi.northUpEastToFixedFrame=bi.localFrameToFixedFrameGenerator("north","up");bi.northWestUpToFixedFrame=bi.localFrameToFixedFrameGenerator("north","west");var ADe=new Fe,gDe=new d(1,1,1),_De=new M;bi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=i??bi.eastNorthUpToFixedFrame;let r=Fe.fromHeadingPitchRoll(t,ADe),s=M.fromTranslationQuaternionRotationScale(d.ZERO,r,gDe,_De);return o=i(e,n,o),M.multiply(o,s,o)};var yDe=new M,CDe=new X;bi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=bi.headingPitchRollToFixedFrame(e,t,n,i,yDe),s=M.getMatrix3(r,CDe);return Fe.fromRotationMatrix(s,o)};var EDe=new d(1,1,1),IDe=new d,nne=new M,xDe=new M,bDe=new X,TDe=new Fe;bi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??ne.default,n=n??bi.eastNorthUpToFixedFrame,l(i)||(i=new ic);let o=M.getTranslation(e,IDe);if(d.equals(o,d.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=M.inverseTransformation(n(o,t,nne),nne),s=M.setScale(e,EDe,xDe);s=M.setTranslation(s,d.ZERO,s),r=M.multiply(r,s,r);let a=Fe.fromRotationMatrix(M.getMatrix3(r,bDe),TDe);return a=Fe.normalize(a,a),ic.fromQuaternion(a,i)};var SDe=6*3600+41*60+50.54841,wDe=8640184812866e-6,BDe=.093104,DDe=-62e-7,vDe=11772758384668e-32,PDe=72921158553e-15,RDe=D.TWO_PI/86400,lG=new K;bi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=bi.computeIcrfToFixedMatrix(e,t);return l(n)||(n=bi.computeTemeToPseudoFixedMatrix(e,t)),n};bi.computeTemeToPseudoFixedMatrix=function(e,t){lG=K.addSeconds(e,-K.computeTaiMinusUtc(e),lG);let n=lG.dayNumber,i=lG.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/ii.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/ii.DAYS_PER_JULIAN_CENTURY;let a=(SDe+o*(wDe+o*(BDe+o*DDe)))*RDe%D.TWO_PI,c=PDe+vDe*(n-24515455e-1),u=(i+ii.SECONDS_PER_DAY*.5)%ii.SECONDS_PER_DAY,f=a+c*u,h=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=h,t[1]=-p,t[2]=0,t[3]=p,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new X(h,p,0,-p,h,0,0,0,1)};bi.iau2006XysData=new dB;bi.earthOrientationParameters=fB.NONE;var T9=32.184,MDe=2451545;bi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+T9,i=e.stop.dayNumber,o=e.stop.secondsOfDay+T9;return bi.iau2006XysData.preload(t,n,i,o)};bi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new X);let n=bi.computeFixedToIcrfMatrix(e,t);if(l(n))return X.transpose(n,t)};var NDe=32.184,LDe=2451545,uG=new ic,ODe=new X,FDe=new K;bi.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new X);let n=K.addSeconds(e,NDe,FDe),i=K.totalDays(n)-LDe,o=D.toRadians(12.112)-D.toRadians(.052992)*i,r=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 uG.pitch=D.toRadians(180)-D.toRadians(3.878)*Math.sin(o)-D.toRadians(.12)*Math.sin(r)+D.toRadians(.07)*Math.sin(s)-D.toRadians(.017)*Math.sin(a),uG.roll=D.toRadians(66.53-90)+D.toRadians(1.543)*Math.cos(o)+D.toRadians(.24)*Math.cos(r)-D.toRadians(.028)*Math.cos(s)+D.toRadians(.007)*Math.cos(a),uG.heading=D.toRadians(244.375-90)+D.toRadians(13.17635831)*i+D.toRadians(3.558)*Math.sin(o)+D.toRadians(.121)*Math.sin(r)-D.toRadians(.064)*Math.sin(s)+D.toRadians(.016)*Math.sin(a)+D.toRadians(.025)*Math.sin(c),X.fromHeadingPitchRoll(uG,ODe)};bi.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new X);let n=bi.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return X.transpose(n,t)};var QDe=new jC(0,0,0),kDe=new h_(0,0,0,0,0,0),x9=new X,b9=new X;bi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new X);let n=bi.earthOrientationParameters.compute(e,kDe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+T9,r=bi.iau2006XysData.computeXysRadians(i,o,QDe);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),u=x9;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=X.fromRotationZ(-r.s,b9),h=X.multiply(u,f,x9),p=e.dayNumber,g=e.secondsOfDay-K.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,_=g/ii.SECONDS_PER_DAY,y=.779057273264+_+.00273781191135448*(m+_);y=y%1*D.TWO_PI;let C=X.fromRotationZ(y,b9),E=X.multiply(h,C,x9),I=Math.cos(n.xPoleWander),b=Math.cos(n.yPoleWander),S=Math.sin(n.xPoleWander),B=Math.sin(n.yPoleWander),v=i-MDe+o/ii.SECONDS_PER_DAY;v/=36525;let P=-47e-6*v*D.RADIANS_PER_DEGREE/3600,N=Math.cos(P),L=Math.sin(P),A=b9;return A[0]=I*N,A[1]=I*L,A[2]=S,A[3]=-b*L+B*S*N,A[4]=b*N+B*S*L,A[5]=-B*I,A[6]=-B*L-b*S*N,A[7]=B*N-b*S*L,A[8]=b*I,X.multiply(E,A,t)};var UDe=new se;bi.pointToWindowCoordinates=function(e,t,n,i){return i=bi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};bi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new U);let o=UDe;return M.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),M.multiplyByVector(t,o,o),U.fromCartesian4(o,i)};var GDe=new d,zDe=new d,VDe=new d;bi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=(n??ne.default).geodeticSurfaceNormal(e,GDe),r=d.cross(t,o,zDe);d.equalsEpsilon(r,d.ZERO,D.EPSILON6)&&(r=d.clone(d.UNIT_X,r));let s=d.cross(r,t,VDe);return d.normalize(s,s),d.cross(t,s,r),d.negate(r,r),d.normalize(r,r),l(i)||(i=new X),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var ine=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),one=new me,S9=new d,HDe=new d,WDe=new X,w9=new M,rne=new M;bi.basisTo2D=function(e,t,n){let i=M.getTranslation(t,HDe),o=e.ellipsoid,r;if(d.equals(i,d.ZERO))r=d.clone(d.ZERO,S9);else{let f=o.cartesianToCartographic(i,one);r=e.project(f,S9),d.fromElements(r.z,r.x,r.y,r)}let s=bi.eastNorthUpToFixedFrame(i,o,w9),a=M.inverseTransformation(s,rne),c=M.getMatrix3(t,WDe),u=M.multiplyByMatrix3(a,c,n);return M.multiply(ine,u,n),M.setTranslation(n,r,n),n};bi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=bi.eastNorthUpToFixedFrame(t,i,w9),r=M.inverseTransformation(o,rne),s=i.cartesianToCartographic(t,one),a=e.project(s,S9);d.fromElements(a.z,a.x,a.y,a);let c=M.fromTranslation(a,w9);return M.multiply(ine,r,n),M.multiply(c,n,n),n};var Qt=bi;function On(e,t,n,i){this.west=e??0,this.south=t??0,this.east=n??0,this.north=i??0}Object.defineProperties(On.prototype,{width:{get:function(){return On.computeWidth(this)}},height:{get:function(){return On.computeHeight(this)}}});On.packedLength=4;On.pack=function(e,t,n){return n=n??0,t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};On.unpack=function(e,t,n){return t=t??0,l(n)||(n=new On),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};On.computeWidth=function(e){let t=e.east,n=e.west;return t=0?f.longitude:f.longitude+D.TWO_PI;o=Math.min(o,h),r=Math.max(r,h)}return i-n>r-o&&(n=o,i=r,i>D.PI&&(i=i-D.TWO_PI),n>D.PI&&(n=n-D.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new On(n,s,i,a)};On.fromCartesianArray=function(e,t,n){t=t??ne.default;let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=e.length;u=0?h.longitude:h.longitude+D.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>D.PI&&(o=o-D.TWO_PI),i>D.PI&&(i=i-D.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new On(i,a,o,c)};var jDe=new d,YDe=new d,qDe=new d,KDe=new d,XDe=new d,B9=new Array(5);for(let e=0;e0?i+=D.TWO_PI:r0&&(r+=D.TWO_PI),i=f))return l(n)?(n.west=a,n.south=u,n.east=c,n.north=f,n):new On(a,u,c,f)};On.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new On(i,o,r,s)};On.union=function(e,t,n){l(n)||(n=new On);let i=e.east,o=e.west,r=t.east,s=t.west;i0?i+=D.TWO_PI:r0&&(r+=D.TWO_PI),io||D.equalsEpsilon(n,o,D.EPSILON14))&&(n=e.south&&i<=e.north};var JDe=new me;On.subsample=function(e,t,n,i){t=t??ne.default,n=n??0,l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,u=JDe;u.height=n,u.longitude=c,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:s>0?u.latitude=s:u.latitude=0;for(let f=1;f<8;++f)u.longitude=-Math.PI+f*D.PI_OVER_TWO,On.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i};On.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new On),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=D.TWO_PI+e.east-e.west;r.west=D.negativePiToPi(e.west+t*a),r.east=D.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};On.MAX_VALUE=Object.freeze(new On(-Math.PI,-D.PI_OVER_TWO,Math.PI,D.PI_OVER_TWO));var ae=On;function Kr(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}Kr.packedLength=4;Kr.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};Kr.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Kr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Kr.fromPoints=function(e,t){if(l(t)||(t=new Kr),!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,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;an.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Kr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.widthr+t.height?tn.OUTSIDE:tn.INTERSECTING};Kr.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};Kr.prototype.clone=function(e){return Kr.clone(this,e)};Kr.prototype.intersect=function(e){return Kr.intersect(this,e)};Kr.prototype.equals=function(e){return Kr.equals(this,e)};var qe=Kr;var oc={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};oc.isLines=function(e){return e===oc.LINES||e===oc.LINE_LOOP||e===oc.LINE_STRIP};oc.isTriangles=function(e){return e===oc.TRIANGLES||e===oc.TRIANGLE_STRIP||e===oc.TRIANGLE_FAN};oc.validate=function(e){return e===oc.POINTS||e===oc.LINES||e===oc.LINE_LOOP||e===oc.LINE_STRIP||e===oc.TRIANGLES||e===oc.TRIANGLE_STRIP||e===oc.TRIANGLE_FAN};var Ne=Object.freeze(oc);var YC=`in vec4 position; in vec2 textureCoordinates; out vec2 v_textureCoordinates; void main() { gl_Position = position; v_textureCoordinates = textureCoordinates; } `;var Fr={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};function pB(e){e=e??V.EMPTY_OBJECT,this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._modelMatrix=e.modelMatrix,this._primitiveType=e.primitiveType??Ne.TRIANGLES,this._vertexArray=e.vertexArray,this._count=e.count,this._offset=e.offset??0,this._instanceCount=e.instanceCount??0,this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._owner=e.owner,this._debugOverlappingFrustums=0,this._pickId=e.pickId,this._pickMetadataAllowed=e.pickMetadataAllowed===!0,this._pickedMetadataInfo=void 0,this._flags=0,this.cull=e.cull??!0,this.occlude=e.occlude??!0,this.executeInClosestFrustum=e.executeInClosestFrustum??!1,this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.castShadows=e.castShadows??!1,this.receiveShadows=e.receiveShadows??!1,this.pickOnly=e.pickOnly??!1,this.depthForTranslucentClassification=e.depthForTranslucentClassification??!1,this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}function Dc(e,t){return(e._flags&t)===t}function y_(e,t,n){n?e._flags|=t:e._flags&=~t}Object.defineProperties(pB.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return Dc(this,Fr.CULL)},set:function(e){Dc(this,Fr.CULL)!==e&&(y_(this,Fr.CULL,e),this.dirty=!0)}},occlude:{get:function(){return Dc(this,Fr.OCCLUDE)},set:function(e){Dc(this,Fr.OCCLUDE)!==e&&(y_(this,Fr.OCCLUDE,e),this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return Dc(this,Fr.CAST_SHADOWS)},set:function(e){Dc(this,Fr.CAST_SHADOWS)!==e&&(y_(this,Fr.CAST_SHADOWS,e),this.dirty=!0)}},receiveShadows:{get:function(){return Dc(this,Fr.RECEIVE_SHADOWS)},set:function(e){Dc(this,Fr.RECEIVE_SHADOWS)!==e&&(y_(this,Fr.RECEIVE_SHADOWS,e),this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return Dc(this,Fr.EXECUTE_IN_CLOSEST_FRUSTUM)},set:function(e){Dc(this,Fr.EXECUTE_IN_CLOSEST_FRUSTUM)!==e&&(y_(this,Fr.EXECUTE_IN_CLOSEST_FRUSTUM,e),this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return Dc(this,Fr.DEBUG_SHOW_BOUNDING_VOLUME)},set:function(e){Dc(this,Fr.DEBUG_SHOW_BOUNDING_VOLUME)!==e&&(y_(this,Fr.DEBUG_SHOW_BOUNDING_VOLUME,e),this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickMetadataAllowed:{get:function(){return this._pickMetadataAllowed}},pickedMetadataInfo:{get:function(){return this._pickedMetadataInfo},set:function(e){this._pickedMetadataInfo!==e&&(this._pickedMetadataInfo=e,this.dirty=!0)}},pickOnly:{get:function(){return Dc(this,Fr.PICK_ONLY)},set:function(e){Dc(this,Fr.PICK_ONLY)!==e&&(y_(this,Fr.PICK_ONLY,e),this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return Dc(this,Fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)},set:function(e){Dc(this,Fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==e&&(y_(this,Fr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION,e),this.dirty=!0)}}});pB.shallowClone=function(e,t){if(l(e))return l(t)||(t=new pB),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._owner=e._owner,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._pickId=e._pickId,t._pickMetadataAllowed=e._pickMetadataAllowed,t._pickedMetadataInfo=e._pickedMetadataInfo,t._flags=e._flags,t.dirty=!0,t.lastDirtyTime=0,t};pB.prototype.execute=function(e,t){e.draw(this,t)};var nt=pB;var Ti={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};Ti.toWebGLConstant=function(e,t){switch(e){case Ti.UNSIGNED_BYTE:return te.UNSIGNED_BYTE;case Ti.UNSIGNED_SHORT:return te.UNSIGNED_SHORT;case Ti.UNSIGNED_INT:return te.UNSIGNED_INT;case Ti.FLOAT:return te.FLOAT;case Ti.HALF_FLOAT:return t.webgl2?te.HALF_FLOAT:te.HALF_FLOAT_OES;case Ti.UNSIGNED_INT_24_8:return te.UNSIGNED_INT_24_8;case Ti.UNSIGNED_SHORT_4_4_4_4:return te.UNSIGNED_SHORT_4_4_4_4;case Ti.UNSIGNED_SHORT_5_5_5_1:return te.UNSIGNED_SHORT_5_5_5_1;case Ti.UNSIGNED_SHORT_5_6_5:return Ti.UNSIGNED_SHORT_5_6_5}};Ti.isPacked=function(e){return e===Ti.UNSIGNED_INT_24_8||e===Ti.UNSIGNED_SHORT_4_4_4_4||e===Ti.UNSIGNED_SHORT_5_5_5_1||e===Ti.UNSIGNED_SHORT_5_6_5};Ti.sizeInBytes=function(e){switch(e){case Ti.UNSIGNED_BYTE:return 1;case Ti.UNSIGNED_SHORT:case Ti.UNSIGNED_SHORT_4_4_4_4:case Ti.UNSIGNED_SHORT_5_5_5_1:case Ti.UNSIGNED_SHORT_5_6_5:case Ti.HALF_FLOAT:return 2;case Ti.UNSIGNED_INT:case Ti.FLOAT:case Ti.UNSIGNED_INT_24_8:return 4}};Ti.validate=function(e){return e===Ti.UNSIGNED_BYTE||e===Ti.UNSIGNED_SHORT||e===Ti.UNSIGNED_INT||e===Ti.FLOAT||e===Ti.HALF_FLOAT||e===Ti.UNSIGNED_INT_24_8||e===Ti.UNSIGNED_SHORT_4_4_4_4||e===Ti.UNSIGNED_SHORT_5_5_5_1||e===Ti.UNSIGNED_SHORT_5_6_5};Ti.getTypedArrayConstructor=function(e){let t=Ti.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Ti.FLOAT?Float32Array:Uint32Array};var Ve=Object.freeze(Ti);var Je={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};Je.componentsLength=function(e){switch(e){case Je.RGB:case Je.RGB_INTEGER:return 3;case Je.RGBA:case Je.RGBA_INTEGER:return 4;case Je.LUMINANCE_ALPHA:case Je.RG:case Je.RG_INTEGER:return 2;case Je.ALPHA:case Je.RED:case Je.RED_INTEGER:case Je.LUMINANCE:return 1;default:return 1}};Je.validate=function(e){return e===Je.DEPTH_COMPONENT||e===Je.DEPTH_STENCIL||e===Je.ALPHA||e===Je.RED||e===Je.RG||e===Je.RGB||e===Je.RGBA||e===Je.RED_INTEGER||e===Je.RG_INTEGER||e===Je.RGB_INTEGER||e===Je.RGBA_INTEGER||e===Je.LUMINANCE||e===Je.LUMINANCE_ALPHA||e===Je.RGB_DXT1||e===Je.RGBA_DXT1||e===Je.RGBA_DXT3||e===Je.RGBA_DXT5||e===Je.RGB_PVRTC_4BPPV1||e===Je.RGB_PVRTC_2BPPV1||e===Je.RGBA_PVRTC_4BPPV1||e===Je.RGBA_PVRTC_2BPPV1||e===Je.RGBA_ASTC||e===Je.RGB_ETC1||e===Je.RGB8_ETC2||e===Je.RGBA8_ETC2_EAC||e===Je.RGBA_BC7};Je.isColorFormat=function(e){return e===Je.RED||e===Je.ALPHA||e===Je.RGB||e===Je.RGBA||e===Je.LUMINANCE||e===Je.LUMINANCE_ALPHA};Je.isDepthFormat=function(e){return e===Je.DEPTH_COMPONENT||e===Je.DEPTH_STENCIL};Je.isCompressedFormat=function(e){return e===Je.RGB_DXT1||e===Je.RGBA_DXT1||e===Je.RGBA_DXT3||e===Je.RGBA_DXT5||e===Je.RGB_PVRTC_4BPPV1||e===Je.RGB_PVRTC_2BPPV1||e===Je.RGBA_PVRTC_4BPPV1||e===Je.RGBA_PVRTC_2BPPV1||e===Je.RGBA_ASTC||e===Je.RGB_ETC1||e===Je.RGB8_ETC2||e===Je.RGBA8_ETC2_EAC||e===Je.RGBA_BC7};Je.isDXTFormat=function(e){return e===Je.RGB_DXT1||e===Je.RGBA_DXT1||e===Je.RGBA_DXT3||e===Je.RGBA_DXT5};Je.isPVRTCFormat=function(e){return e===Je.RGB_PVRTC_4BPPV1||e===Je.RGB_PVRTC_2BPPV1||e===Je.RGBA_PVRTC_4BPPV1||e===Je.RGBA_PVRTC_2BPPV1};Je.isASTCFormat=function(e){return e===Je.RGBA_ASTC};Je.isETC1Format=function(e){return e===Je.RGB_ETC1};Je.isETC2Format=function(e){return e===Je.RGB8_ETC2||e===Je.RGBA8_ETC2_EAC};Je.isBC7Format=function(e){return e===Je.RGBA_BC7};Je.compressedTextureSizeInBytes=function(e,t,n){switch(e){case Je.RGB_DXT1:case Je.RGBA_DXT1:case Je.RGB_ETC1:case Je.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case Je.RGBA_DXT3:case Je.RGBA_DXT5:case Je.RGBA_ASTC:case Je.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case Je.RGB_PVRTC_4BPPV1:case Je.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case Je.RGB_PVRTC_2BPPV1:case Je.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case Je.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};Je.textureSizeInBytes=function(e,t,n,i){let o=Je.componentsLength(e);return Ve.isPacked(t)&&(o=1),o*Ve.sizeInBytes(t)*n*i};Je.texture3DSizeInBytes=function(e,t,n,i,o){let r=Je.componentsLength(e);return Ve.isPacked(t)&&(r=1),r*Ve.sizeInBytes(t)*n*i*o};Je.alignmentInBytes=function(e,t,n){let i=Je.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};Je.createTypedArray=function(e,t,n,i){let o=Ve.getTypedArrayConstructor(t),r=Je.componentsLength(e)*n*i;return new o(r)};Je.flipY=function(e,t,n,i,o){if(o===1)return e;let r=Je.createTypedArray(t,n,i,o),s=Je.componentsLength(t),a=i*s;for(let c=0;c0&&console.log(`${Qm}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${Qm}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${Qm}Shader program link log: ${c}`)),e.deleteShader(o),e.deleteShader(r),s;let u,f=t._debugShaders;throw e.getShaderParameter(r,e.COMPILE_STATUS)?e.getShaderParameter(o,e.COMPILE_STATUS)?(c=e.getProgramInfoLog(s),console.error(`${Qm}Shader program link log: ${c}`),h(o,"vertex"),h(r,"fragment"),u=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${Qm}Vertex shader compile log: ${c}`),console.error(`${Qm} Vertex shader source: ${n}`),u=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${Qm}Fragment shader compile log: ${c}`),console.error(`${Qm} Fragment shader source: ${i}`),u=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new ce(u);function h(p,g){if(!l(f))return;let m=f.getTranslatedShaderSource(p);if(m===""){console.error(`${Qm}${g} shader translation failed.`);return}console.error(`${Qm}Translated ${g} shaderSource: ${m}`)}}function Ave(e,t,n){let i={};for(let o=0;o=0){if(f=n[u.slice(0,m)],!l(f))continue;h=f._locations,h.length<=1&&(p=f.value,g=e.getUniformLocation(t,u),g!==null&&(h.push(g),p.push(e.getUniform(t,g))))}else{h=[];for(let _=0;_{e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i(s),e.terminate(),Ra._canTransferArrayBuffer=s}})}return Ra._canTransferArrayBuffer}var N9=new ge;function M9(e){let t;try{t=new Blob([e],{type:"application/javascript"})}catch{let o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(e),t=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(t)}function L9(e){let t=new Kne.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(p_(e))s=e;else if(!n){let a=fn(`${Ra._workerModulePrefix}/${i}.js`);p_(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=M9(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=` importScripts("${M9(CESIUM_WORKERS)}"); CesiumWorkers["${i}"](); `;return r=M9(a),new Worker(r,o)}if(r=e,n||(r=fn(`${Ra._workerModulePrefix+i}.js`)),!jt.supportsEsmWebWorkers())throw new ce("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function Ove(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!jt.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new ce(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=fn(t.fallbackModulePath),n}n.wasmBinaryFile=fn(t.wasmBinaryFile);let i=await we.fetchArrayBuffer({url:n.wasmBinaryFile});return n.wasmBinary=i,n}function Ra(e,t){this._workerPath=e,this._maximumActiveTasks=t??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}var Fve=(e,t,n,i)=>{let o=({data:r})=>{if(r.id===t){if(l(r.error)){let s=r.error;s.name==="RuntimeError"?(s=new ce(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new he(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),N9.raiseEvent(s),i(s)}else N9.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},Qve=[];async function kve(e,t,n){let i=await Promise.resolve(Xne());l(n)?i||(n.length=0):n=Qve;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",Fve(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:fn.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function Uve(e,t,n){++e._activeTasks;try{let i=await kve(e,t,n);return--e._activeTasks,i}catch(i){throw--e._activeTasks,i}}Ra.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=L9(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return Uve(this,e,t)};Ra.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=L9(this._workerPath),i=await Ove(this,e),o=await Promise.resolve(Xne()),r,s=i.wasmBinary;l(s)&&o&&(r=[s]);let a=new Promise((c,u)=>{n.onmessage=function({data:f}){l(f)?c(f.result):u(new ce("Could not configure wasm module"))}});return n.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),a};return this._webAssemblyPromise=t(),this._webAssemblyPromise};Ra.prototype.isDestroyed=function(){return!1};Ra.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),ue(this)};Ra.taskCompletedEvent=N9;Ra._defaultWorkerModulePrefix="Workers/";Ra._workerModulePrefix=Ra._defaultWorkerModulePrefix;Ra._canTransferArrayBuffer=void 0;var ui=Ra;function oA(){}oA._transcodeTaskProcessor=new ui("transcodeKTX2",Number.POSITIVE_INFINITY);oA._readyPromise=void 0;function Gve(){let e=oA._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return oA._transcodeTaskProcessor;throw new ce("KTX2 transcoder could not be initialized.")});oA._readyPromise=e}oA.transcode=function(e,t){return l(oA._readyPromise)||Gve(),oA._readyPromise.then(function(n){let i=e;e instanceof ArrayBuffer&&(i=new Uint8Array(e));let o={supportedTargetFormats:t,ktx2Buffer:i};return n.scheduleTask(o,[i.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]);for(let r=0;rs.x&&d.clone(n,s),Na.y&&d.clone(n,a),Lc.z&&d.clone(n,c)}let h=d.magnitudeSquared(d.subtract(s,i,Ma)),p=d.magnitudeSquared(d.subtract(a,o,Ma)),g=d.magnitudeSquared(d.subtract(c,r,Ma)),m=i,_=s,y=h;p>y&&(y=p,m=o,_=a),g>y&&(y=g,m=r,_=c);let C=W9;C.x=(m.x+_.x)*.5,C.y=(m.y+_.y)*.5,C.z=(m.z+_.z)*.5;let E=d.magnitudeSquared(d.subtract(_,C,Ma)),I=Math.sqrt(E),b=j9;b.x=i.x,b.y=o.y,b.z=r.z;let S=Y9;S.x=s.x,S.y=a.y,S.z=c.z;let B=d.midpoint(b,S,q9),v=0;for(f=0;fv&&(v=P);let N=d.magnitudeSquared(d.subtract(n,C,Ma));if(N>E){let L=Math.sqrt(N);I=(I+L)*.5,E=I*I;let A=L-I;C.x=(I*C.x+A*n.x)/L,C.y=(I*C.y+A*n.y)/L,C.z=(I*C.z+A*n.z)/L}}return Ic.x&&d.clone(o,c),Au.y&&d.clone(o,u),xf.z&&d.clone(o,f)}let g=d.magnitudeSquared(d.subtract(c,r,Ma)),m=d.magnitudeSquared(d.subtract(u,s,Ma)),_=d.magnitudeSquared(d.subtract(f,a,Ma)),y=r,C=c,E=g;m>E&&(E=m,y=s,C=u),_>E&&(E=_,y=a,C=f);let I=W9;I.x=(y.x+C.x)*.5,I.y=(y.y+C.y)*.5,I.z=(y.z+C.z)*.5;let b=d.magnitudeSquared(d.subtract(C,I,Ma)),S=Math.sqrt(b),B=j9;B.x=r.x,B.y=s.y,B.z=a.z;let v=Y9;v.x=c.x,v.y=u.y,v.z=f.z;let P=d.midpoint(B,v,q9),N=0;for(p=0;pN&&(N=L);let A=d.magnitudeSquared(d.subtract(o,I,Ma));if(A>b){let x=Math.sqrt(A);S=(S+x)*.5,b=S*S;let T=x-S;I.x=(S*I.x+T*o.x)/x,I.y=(S*I.y+T*o.y)/x,I.z=(S*I.z+T*o.z)/x}}return Sa.x&&d.clone(i,a),Lc.y&&d.clone(i,c),Au.z&&d.clone(i,u)}let p=d.magnitudeSquared(d.subtract(a,o,Ma)),g=d.magnitudeSquared(d.subtract(c,r,Ma)),m=d.magnitudeSquared(d.subtract(u,s,Ma)),_=o,y=a,C=p;g>C&&(C=g,_=r,y=c),m>C&&(C=m,_=s,y=u);let E=W9;E.x=(_.x+y.x)*.5,E.y=(_.y+y.y)*.5,E.z=(_.z+y.z)*.5;let I=d.magnitudeSquared(d.subtract(y,E,Ma)),b=Math.sqrt(I),S=j9;S.x=o.x,S.y=r.y,S.z=s.z;let B=Y9;B.x=a.x,B.y=c.y,B.z=u.z;let v=d.midpoint(S,B,q9),P=0;for(h=0;hP&&(P=N);let L=d.magnitudeSquared(d.subtract(i,E,Ma));if(L>I){let A=Math.sqrt(L);b=(b+A)*.5,I=b*b;let x=A-b;E.x=(b*E.x+x*i.x)/A,E.y=(b*E.y+x*i.y)/A,E.z=(b*E.z+x*i.z)/A}}return b=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let u=(o+c+s)*.5,f=d.multiplyByScalar(a,(-o+u)/c,ePe);return d.add(f,i,f),d.clone(f,n.center),n.radius=u,n};var tPe=new d;In.expand=function(e,t,n){n=In.clone(e,n);let i=d.magnitude(d.subtract(t,n.center,tPe));return i>n.radius&&(n.radius=i),n};In.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=d.dot(o,n)+t.distance;return r<-i?tn.OUTSIDE:r>1^-(e&1)}Po.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a>11,f=c>>5&o,h=c&i,p=3*a;t[p]=u*r,t[p+1]=f*s,t[p+2]=h*r}return t};var Fn=Po;var uie=new d,fie=new d,die=new d;function dPe(e,t,n,i,o){l(o)||(o=new d);let r,s,a,c,u,f,h,p;if(l(t.z)){if(d.equalsEpsilon(e,t,D.EPSILON14))return d.clone(d.UNIT_X,o);if(d.equalsEpsilon(e,n,D.EPSILON14))return d.clone(d.UNIT_Y,o);if(d.equalsEpsilon(e,i,D.EPSILON14))return d.clone(d.UNIT_Z,o);r=d.subtract(n,t,uie),s=d.subtract(i,t,fie),a=d.subtract(e,t,die),c=d.dot(r,r),u=d.dot(r,s),f=d.dot(r,a),h=d.dot(s,s),p=d.dot(s,a)}else{if(U.equalsEpsilon(e,t,D.EPSILON14))return d.clone(d.UNIT_X,o);if(U.equalsEpsilon(e,n,D.EPSILON14))return d.clone(d.UNIT_Y,o);if(U.equalsEpsilon(e,i,D.EPSILON14))return d.clone(d.UNIT_Z,o);r=U.subtract(n,t,uie),s=U.subtract(i,t,fie),a=U.subtract(e,t,die),c=U.dot(r,r),u=U.dot(r,s),f=U.dot(r,a),h=U.dot(s,s),p=U.dot(s,a)}o.y=h*f-u*p,o.z=c*p-u*f;let g=c*h-u*u;if(g!==0)return o.y/=g,o.z/=g,o.x=1-o.y-o.z,o}var KC=dPe;function km(){this.high=d.clone(d.ZERO),this.low=d.clone(d.ZERO)}km.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 rA={high:0,low:0};km.fromCartesian=function(e,t){l(t)||(t=new km);let n=t.high,i=t.low;return km.encode(e.x,rA),n.x=rA.high,i.x=rA.low,km.encode(e.y,rA),n.y=rA.high,i.y=rA.low,km.encode(e.z,rA),n.z=rA.high,i.z=rA.low,t};var Z9=new km;km.writeElements=function(e,t,n){km.fromCartesian(e,Z9);let i=Z9.high,o=Z9.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var $n=km;var $9={};$9.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function hie(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)))u&&u/c0?[a/e,n/a]:[n/a,a/e]};var al=$9;var t6={};t6.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function e6(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,u=r*a,f=r*r,h=s*s,p=o*s-f,g=o*a-r*s,m=r*a-h,_=4*p*m-g*g,y,C;if(_<0){let H,j,Z;f*u>=c*h?(H=o,j=p,Z=-2*r*p+o*g):(H=a,j=m,Z=-a*g+2*s*m);let $=-(Z<0?-1:1)*Math.abs(H)*Math.sqrt(-_);C=-Z+$;let J=C/2,pe=J<0?-Math.pow(-J,1/3):Math.pow(J,1/3),Ce=C===$?-pe:-j/pe;return y=j<=0?pe+Ce:-Z/(pe*pe+Ce*Ce+j),f*u>=c*h?[(y-r)/o]:[-a/(y+s)]}let E=p,I=-2*r*p+o*g,b=m,S=-a*g+2*s*m,B=Math.sqrt(_),v=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*B,-I)/3);y=2*Math.sqrt(-E);let N=Math.cos(P);C=y*N;let L=y*(-N/2-v*Math.sin(P)),A=C+L>2*r?C-r:L-r,x=o,T=A/x;P=Math.abs(Math.atan2(a*B,-S)/3),y=2*Math.sqrt(-b),N=Math.cos(P),C=y*N,L=y*(-N/2-v*Math.sin(P));let w=-a,R=C+L<2*s?C+s:L+s,O=w/R,k=x*R,F=-A*R-x*w,z=A*w,Q=(s*F-r*z)/(-r*F+s*k);return T<=Q?T<=O?Q<=O?[T,Q,O]:[T,O,Q]:[O,T,Q]:T<=O?[Q,T,O]:Q<=O?[Q,O,T]:[O,Q,T]}t6.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return al.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=al.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return e6(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):e6(e,t,0,i);if(i===0)return o=al.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return e6(e,t,n,i)};var XC=t6;var n6={};n6.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,u=n*n,f=u*n,h=i*i,p=h*i,g=o*o,m=g*o;return a*u*h-4*c*p-4*e*f*h+18*e*t*n*p-27*r*h*h+256*s*m+o*(18*c*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*h+144*r*n*h)+g*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)};function ch(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=XC.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)=0&&g>=0){let _=Math.sqrt(p),y=Math.sqrt(g);return[u-y,u-_,u+_,u+y]}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 h=Math.sqrt(f),p=(r+f-s/h)/2,g=(r+f+s/h)/2,m=al.computeRealRoots(1,h,p),_=al.computeRealRoots(1,-h,g);return m.length!==0?(m[0]+=u,m[1]+=u,_.length!==0?(_[0]+=u,_[1]+=u,m[1]<=_[0]?[m[0],m[1],_[0],_[1]]:_[1]<=m[0]?[_[0],_[1],m[0],m[1]]:m[0]>=_[0]&&m[1]<=_[1]?[_[0],m[0],m[1],_[1]]:_[0]>=m[0]&&_[1]<=m[1]?[m[0],_[0],_[1],m[1]]:m[0]>_[0]&&m[0]<_[1]?[_[0],m[0],_[1],m[1]]:[m[0],_[0],m[1],_[1]]):m):_.length!==0?(_[0]+=u,_[1]+=u,_):[]}}return[]}function xB(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,c=n*e+r-4*i,u=s*i-n*t*e+o,f=XC.computeRealRoots(1,a,c,u);if(f.length>0){let h=f[0],p=t-h,g=p*p,m=e/2,_=p/2,y=g-4*i,C=g+4*Math.abs(i),E=s-4*h,I=s+4*Math.abs(h),b,S;if(h<0||y*I=A[0]&&L[1]<=A[1]?[A[0],L[0],L[1],A[1]]:A[0]>=L[0]&&A[1]<=L[1]?[L[0],A[0],A[1],L[1]]:L[0]>A[0]&&L[0]f)||(p=d.cross(h,a,pie),m=d.dot(s,p),m<0||g+m>f))return;_=d.dot(c,p)/f}else{if(Math.abs(f)1||(p=d.cross(h,a,pie),m=d.dot(s,p)*y,m<0||g+m>1))return;_=d.dot(c,p)*y}return _};er.rayTriangle=function(e,t,n,i,o,r){let s=er.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new d),d.multiplyByScalar(e.direction,s,r),d.add(e.origin,r,r)};var pPe=new xn;er.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=pPe;d.clone(e,a.origin),d.subtract(t,e,a.direction),d.normalize(a.direction,a.direction);let c=er.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>d.distance(e,t)))return l(s)||(s=new d),d.multiplyByScalar(a.direction,c,s),d.add(a.origin,s,s)};function APe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,u=(-t-a)*s;return cs))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var yPe=new d,CPe=new d;er.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=d.multiplyComponents(n,e.origin,yPe),o=d.multiplyComponents(n,e.direction,CPe),r=d.magnitudeSquared(i),s=d.dot(i,o),a,c,u,f,h;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=d.magnitudeSquared(o),u=c*a,pu){f=s*s-u,h=-s+Math.sqrt(f);let m=h/c,_=a/h;return m<_?new rc(m,_):{start:_,stop:m}}let g=Math.sqrt(a/c);return new rc(g,g)}else if(r<1)return a=r-1,c=d.magnitudeSquared(o),u=c*a,f=s*s-u,h=-s+Math.sqrt(f),new rc(0,h/c);if(s<0)return c=d.magnitudeSquared(o),new rc(0,-s/c)};function JC(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)))0?g.push(new d(i,o*N,o*-x)):x!==0?(g.push(new d(i,o*N,o*-x)),g.push(new d(i,o*N,o*x)),++P):g.push(new d(i,o*N,o*x))}return g};var i6=new d,Aie=new d,gie=new d,_G=new d,EPe=new d,IPe=new X,xPe=new X,bPe=new X,TPe=new X,SPe=new X,_ie=new X,yie=new X,Cie=new d,wPe=new d,BPe=new me;er.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!d.equals(n,d.ZERO)){let B=t.geodeticSurfaceNormal(n,i6);if(d.dot(i,B)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,i6),s=d.normalize(r,r),a=d.mostOrthogonalAxis(r,_G),c=d.normalize(d.cross(a,s,Aie),Aie),u=d.normalize(d.cross(s,c,gie),gie),f=IPe;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 h=X.transpose(f,xPe),p=X.fromScale(t.radii,bPe),g=X.fromScale(t.oneOverRadii,TPe),m=SPe;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 _=X.multiply(X.multiply(h,g,_ie),m,_ie),y=X.multiply(X.multiply(_,p,yie),f,yie),C=X.multiplyByVector(_,n,EPe),E=er.quadraticVectorExpression(y,d.negate(C,i6),0,0,1),I,b,S=E.length;if(S>0){let B=d.clone(d.ZERO,wPe),v=Number.NEGATIVE_INFINITY;for(let N=0;Nv&&(v=A,B=d.clone(I,B))}let P=t.cartesianToCartographic(B,BPe);return v=D.clamp(v,0,1),b=d.magnitude(d.subtract(B,n,_G))*Math.sqrt(1-v*v),b=o?-b:b,P.height=b,t.cartographicToCartesian(P,new d)}};var DPe=new d;er.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new d);let o=d.subtract(t,e,DPe),r=n.normal,s=d.dot(r,o);if(Math.abs(s)1))return d.multiplyByScalar(o,c,i),d.add(e,i,i),i};er.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=d.dot(o,e)+r<0,a=d.dot(o,t)+r<0,c=d.dot(o,n)+r<0,u=0;u+=s?1:0,u+=a?1:0,u+=c?1:0;let f,h;if((u===1||u===2)&&(f=new d,h=new d),u===1){if(s)return er.lineSegmentPlane(e,t,i,f),er.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,f,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return er.lineSegmentPlane(t,n,i,f),er.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,f,h],indices:[1,3,4,2,0,4,2,4,3]};if(c)return er.lineSegmentPlane(n,e,i,f),er.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,f,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!c)return er.lineSegmentPlane(e,n,i,f),er.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,f,h],indices:[0,1,4,0,4,3,2,3,4]}}else return er.lineSegmentPlane(n,t,i,f),er.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,f,h],indices:[2,0,4,2,4,3,1,3,4]};else return er.lineSegmentPlane(t,e,i,f),er.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,f,h],indices:[1,2,4,1,4,3,0,3,4]}};var fi=er;function ca(e,t){this.normal=d.clone(e),this.distance=t}ca.fromPointNormal=function(e,t,n){let i=-d.dot(t,e);return l(n)?(d.clone(t,n.normal),n.distance=i,n):new ca(t,i)};var vPe=new d;ca.fromCartesian4=function(e,t){let n=d.fromCartesian4(e,vPe),i=e.w;return l(t)?(d.clone(n,t.normal),t.distance=i,t):new ca(n,i)};ca.getPointDistance=function(e,t){return d.dot(e.normal,t)+e.distance};var PPe=new d;ca.projectPointOntoPlane=function(e,t,n){l(n)||(n=new d);let i=ca.getPointDistance(e,t),o=d.multiplyByScalar(e.normal,i,PPe);return d.subtract(t,o,n)};var RPe=new M,MPe=new se,NPe=new d;ca.transform=function(e,t,n){let i=e.normal,o=e.distance,r=M.inverseTranspose(t,RPe),s=se.fromElements(i.x,i.y,i.z,o,MPe);s=M.multiplyByVector(r,s,s);let a=d.fromCartesian4(s,NPe);return s=se.divideByScalar(s,d.magnitude(a),s),ca.fromCartesian4(s,n)};ca.clone=function(e,t){return l(t)?(d.clone(e.normal,t.normal),t.distance=e.distance,t):new ca(e.normal,e.distance)};ca.equals=function(e,t){return e.distance===t.distance&&d.equals(e.normal,t.normal)};ca.ORIGIN_XY_PLANE=Object.freeze(new ca(d.UNIT_Z,0));ca.ORIGIN_YZ_PLANE=Object.freeze(new ca(d.UNIT_X,0));ca.ORIGIN_ZX_PLANE=Object.freeze(new ca(d.UNIT_Y,0));var hn=ca;var o6={};o6.calculateACMR=function(e){e=e??V.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;an&&(n=c),++a,c=t[a]}let r=[];for(let a=0;ai&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};o6.tipsify=function(e){e=e??V.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o;function r(A,x,T,w){for(;x.length>=1;){let R=x[x.length-1];if(x.splice(x.length-1,1),A[R].numLiveTriangles>0)return R}for(;o0)return++o,o-1;++o}return-1}function s(A,x,T,w,R,O,k){let F=-1,z,Q=-1,H=0;for(;HQ||Q===-1)&&(Q=z,F=j)),++H}return F===-1?r(w,O,A,k):F}let a=t.length,c=0,u=0,f=t[u],h=a;if(l(n))c=n+1;else{for(;uc&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],g;for(g=0;gi&&(I.timeStamp=y,++y),++u}_=s(t,i,C,p,y,E,c)}return B};var TB=o6;var cl={};function TG(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function LPe(e){let t=e.length,n=t/3*6,i=Qe.createTypedArray(t,n),o=0;for(let r=0;r=3){let n=(t-2)*6,i=Qe.createTypedArray(t,n);TG(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r0){let t=e.length-1,n=(t-1)*6,i=Qe.createTypedArray(t,n),o=e[0],r=0;for(let s=1;so&&(o=n[r]);e.indices=TB.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function xie(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 De({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function QPe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r=D.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=xie(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Ne.TRIANGLES?u=3:e.primitiveType===Ne.LINES?u=2:e.primitiveType===Ne.POINTS&&(u=1);for(let f=0;f=D.SIXTY_FOUR_KILOBYTES&&(t.push(new ht({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=xie(e.attributes))}o.length!==0&&t.push(new ht({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var bie=new d,kPe=new me;cl.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Qi;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),u=0;for(let f=0;fy&&(y=E)}return new ht({attributes:f,indices:m,primitiveType:u,boundingSphere:l(_)?new le(_,y):void 0})}cl.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r0&&o.push(c6(t,"geometry")),n.length>0&&(o.push(c6(n,"westHemisphereGeometry")),o.push(c6(n,"eastHemisphereGeometry"))),o};var Wf=new d,SB=new d,Wx=new d,jx=new d;cl.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),u;for(u=0;u0){for(f=0;f3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;oo?i>r?s=D.sign(e.y):s=D.sign(n.y):o>r?s=D.sign(t.y):s=D.sign(n.y);let a=s<0;C_(e,a),C_(t,a),C_(n,a)}var Bie=new d;function jf(e,t,n,i){d.add(e,d.multiplyByScalar(d.subtract(t,e,Bie),e.y/(e.y-t.y),Bie),n),d.clone(n,i),C_(n,!0),C_(i,!1)}var ZC=new d,$C=new d,eE=new d,tE=new d,l6={positions:new Array(7),indices:new Array(3*3)};function ZPe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;JPe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=l6.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(jf(e,t,ZC,eE),jf(e,n,$C,tE),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(jf(t,n,ZC,eE),jf(t,e,$C,tE),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(jf(n,e,ZC,eE),jf(n,t,$C,tE),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?o?r||(jf(n,e,ZC,eE),jf(n,t,$C,tE),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(jf(t,n,ZC,eE),jf(t,e,$C,tE),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(jf(e,t,ZC,eE),jf(e,n,$C,tE),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=l6.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=ZC,c[4]=$C,c[5]=eE,c[6]=tE,c.length=7),l6}function Die(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=q.createTypedArray(r.componentDatatype,r.values)}let i=ht.computeNumberOfVertices(e);return e.indices=Qe.createTypedArray(i,e.indices),t&&(e.boundingSphere=le.fromVertices(n.position.values)),e}function qx(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new De({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ht({attributes:n,indices:[],primitiveType:e.primitiveType})}function h6(e,t,n){let i=l(e.geometry.boundingSphere);t=Die(t,i),n=Die(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 m6(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,u,f,h,p){let g=e.fromArray(u,r*t,n),m=e.fromArray(u,s*t,i),_=e.fromArray(u,a*t,o);e.multiplyByScalar(g,c.x,g),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(_,c.z,_);let y=e.add(g,m,g);e.add(y,_,y),p&&e.normalize(y,y),e.pack(y,f,h*t)}}var $Pe=m6(se,4),bG=m6(d,3),Lie=m6(U,2),eRe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[s]=a+c+u>D.EPSILON6?1:0},BB=new d,u6=new d,f6=new d,tRe=new d;function IG(e,t,n,i,o,r,s,a,c,u,f,h,p,g,m,_){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&g===0)return;let y=d.fromArray(o,e*3,BB),C=d.fromArray(o,t*3,u6),E=d.fromArray(o,n*3,f6),I=KC(i,y,C,E,tRe);if(l(I)){if(l(r)&&bG(e,t,n,I,r,h.normal.values,_,!0),l(u)){let b=d.fromArray(u,e*3,BB),S=d.fromArray(u,t*3,u6),B=d.fromArray(u,n*3,f6);d.multiplyByScalar(b,I.x,b),d.multiplyByScalar(S,I.y,S),d.multiplyByScalar(B,I.z,B);let v;!d.equals(b,d.ZERO)||!d.equals(S,d.ZERO)||!d.equals(B,d.ZERO)?(v=d.add(b,S,b),d.add(v,B,v),d.normalize(v,v)):(v=BB,v.x=0,v.y=0,v.z=0),d.pack(v,h.extrudeDirection.values,_*3)}if(l(f)&&eRe(e,t,n,I,f,h.applyOffset.values,_),l(s)&&bG(e,t,n,I,s,h.tangent.values,_,!0),l(a)&&bG(e,t,n,I,a,h.bitangent.values,_,!0),l(c)&&Lie(e,t,n,I,c,h.st.values,_),g>0)for(let b=0;b3){let w=T.positions,R=T.indices,O=R.length;for(let k=0;k0)continue;let c=d.unpack(i,s,Qie);(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]):d.pack(a,i,s));let u=d.unpack(o,s,d6);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+30||le.intersectPlane(n,hn.ORIGIN_ZX_PLANE)!==tn.INTERSECTING))return e;if(t.geometryType!==Hf.NONE)switch(t.geometryType){case Hf.POLYLINES:fRe(e);break;case Hf.TRIANGLES:vie(e);break;case Hf.LINES:Pie(e);break}else XPe(t),t.primitiveType===Ne.TRIANGLES?vie(e):t.primitiveType===Ne.LINES&&Pie(e);return e};var Vn=cl;function DB(e,t,n,i,o,r,s,a,c,u,f){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=c,this._flipY=u,this._initialized=f}Object.defineProperties(DB.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});DB.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,{width:r,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,h=this._size,p=this._pixelFormat,g=this._internalFormat,m=this._pixelDatatype,_=this._preMultiplyAlpha,y=this._flipY,C=4;l(f)&&(C=$e.alignmentInBytes(p,m,r)),a.pixelStorei(a.UNPACK_ALIGNMENT,C),o?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let E=!1;if(!this._initialized){let I;t===0&&n===0&&r===h&&s===h?(l(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),y&&(f=$e.flipY(f,p,m,h,h)),I=f):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,y),I=i),E=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),I=$e.createTypedArray(p,m,h,h)),a.texImage2D(u,0,g,h,h,0,p,Ve.toWebGLConstant(m,this._context),I),this._initialized=!0}E||(l(f)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),y&&(f=$e.flipY(f,p,m,r,s)),a.texSubImage2D(u,0,t,n,r,s,p,Ve.toWebGLConstant(m,this._context),f)):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,_),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,y),a.texSubImage2D(u,0,t,n,p,Ve.toWebGLConstant(m,this._context),i))),a.bindTexture(c,null)};DB.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._size,r=r??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,o,r),s.bindTexture(a,null),this._initialized=!0};DB.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,o){e=e??0,t=t??0,n=n??this._size,i=i??this._size,o=o??0;let r=this._context._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture),r.copyTexImage2D(this._targetFace,o,this._internalFormat,e,t,n,i,0),r.bindTexture(s,null),this._initialized=!0};var vB=DB;var SG={DONT_CARE:te.DONT_CARE,FASTEST:te.FASTEST,NICEST:te.NICEST,validate:function(e){return e===SG.DONT_CARE||e===SG.FASTEST||e===SG.NICEST}},Yf=Object.freeze(SG);var wG={NEAREST:te.NEAREST,LINEAR:te.LINEAR};wG.validate=function(e){return e===wG.NEAREST||e===wG.LINEAR};var di=Object.freeze(wG);var E_={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};E_.validate=function(e){return e===E_.NEAREST||e===E_.LINEAR||e===E_.NEAREST_MIPMAP_NEAREST||e===E_.LINEAR_MIPMAP_NEAREST||e===E_.NEAREST_MIPMAP_LINEAR||e===E_.LINEAR_MIPMAP_LINEAR};var $t=Object.freeze(E_);var BG={CLAMP_TO_EDGE:te.CLAMP_TO_EDGE,REPEAT:te.REPEAT,MIRRORED_REPEAT:te.MIRRORED_REPEAT,validate:function(e){return e===BG.CLAMP_TO_EDGE||e===BG.REPEAT||e===BG.MIRRORED_REPEAT}},Pn=Object.freeze(BG);function PB(e){e=e??V.EMPTY_OBJECT;let{wrapS:t=Pn.CLAMP_TO_EDGE,wrapT:n=Pn.CLAMP_TO_EDGE,minificationFilter:i=$t.LINEAR,magnificationFilter:o=di.LINEAR,maximumAnisotropy:r=1}=e;this._wrapS=t,this._wrapT=n,this._minificationFilter=i,this._magnificationFilter=o,this._maximumAnisotropy=r}Object.defineProperties(PB.prototype,{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}}});PB.equals=function(e,t){return e===t||l(e)&&l(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy};PB.NEAREST=Object.freeze(new PB({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST}));var nn=PB;function dRe(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:t.index??n,enabled:t.enabled??!0,vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:t.componentDatatype??q.FLOAT,normalize:t.normalize??!1,offsetInBytes:t.offsetInBytes??0,strideInBytes:t.strideInBytes??0,instanceDivisor:t.instanceDivisor??0};if(o)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 Uie(e,t,n){for(let i=0;i0&&(c=!0),l(s[r].value)&&(u=!0);let h;t.vertexArrayObject&&(h=t.glCreateVertexArray(),t.glBindVertexArray(h),Uie(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=u,this._context=t,this._gl=n,this._vao=h,this._attributes=s,this._indexBuffer=o}function kie(e){return e.values.length/e.componentsPerAttribute}function hRe(e){return q.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function mRe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===q.DOUBLE&&(e[n].componentDatatype=q.FLOAT,e[n].values=q.createTypedArray(q.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=kie(e[o[0]]),t=1;t0){let u=q.getSizeInBytes(e[o[0]].componentDatatype),f=a%u;f!==0&&(a+=u-f);let h=r*a,p=new ArrayBuffer(h),g={};for(t=0;t=D.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=Ct.createIndexBuffer({context:t,typedArray:new Uint32Array(g),usage:i,indexDatatype:Qe.UNSIGNED_INT}):p=Ct.createIndexBuffer({context:t,typedArray:new Uint16Array(g),usage:i,indexDatatype:Qe.UNSIGNED_SHORT})),new sA({context:t,attributes:f,indexBuffer:p})};Object.defineProperties(sA.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});sA.prototype.getAttribute=function(e){return this._attributes[e]};function pRe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=qt.maximumVertexAttributes,s;if(n){let a=o.length;for(s=0;s0&&(t.glVertexAttribDivisor(s,0),i[s]=0)}function ARe(e,t){let n=e._attributes,i=n.length;for(let o=0;o1/pi. * * @alias czm_oneOverPi * @glslConstant * * @see CesiumMath.ONE_OVER_PI * * @example * // GLSL declaration * const float czm_oneOverPi = ...; * * // Example * float pi = 1.0 / czm_oneOverPi; */ const float czm_oneOverPi = 0.3183098861837907; `;var VB=`/** * A built-in GLSL floating-point constant for 1/2pi. * * @alias czm_oneOverTwoPi * @glslConstant * * @see CesiumMath.ONE_OVER_TWO_PI * * @example * // GLSL declaration * const float czm_oneOverTwoPi = ...; * * // Example * float pi = 2.0 * czm_oneOverTwoPi; */ const float czm_oneOverTwoPi = 0.15915494309189535; `;var HB=`/** * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE} * * @name czm_passCesium3DTile * @glslConstant * * @see czm_pass */ const float czm_passCesium3DTile = 4.0; `;var WB=`/** * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION} * * @name czm_passCesium3DTileClassification * @glslConstant * * @see czm_pass */ const float czm_passCesium3DTileClassification = 5.0; `;var jB=`/** * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW} * * @name czm_passCesium3DTileClassificationIgnoreShow * @glslConstant * * @see czm_pass */ const float czm_passCesium3DTileClassificationIgnoreShow = 6.0; `;var YB=`/** * The automatic GLSL constant for {@link Pass#CLASSIFICATION} * * @name czm_passClassification * @glslConstant * * @see czm_pass */ const float czm_passClassification = 7.0; `;var qB=`/** * The automatic GLSL constant for {@link Pass#COMPUTE} * * @name czm_passCompute * @glslConstant * * @see czm_pass */ const float czm_passCompute = 1.0; `;var KB=`/** * The automatic GLSL constant for {@link Pass#ENVIRONMENT} * * @name czm_passEnvironment * @glslConstant * * @see czm_pass */ const float czm_passEnvironment = 0.0; `;var XB=`/** * The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS} * * @name czm_passGaussianSplats * @glslConstant * * @see czm_pass */ const float czm_passGaussianSplats = 10.0; `;var JB=`/** * The automatic GLSL constant for {@link Pass#GLOBE} * * @name czm_passGlobe * @glslConstant * * @see czm_pass */ const float czm_passGlobe = 2.0; `;var ZB=`/** * The automatic GLSL constant for {@link Pass#OPAQUE} * * @name czm_passOpaque * @glslConstant * * @see czm_pass */ const float czm_passOpaque = 7.0; `;var $B=`/** * The automatic GLSL constant for {@link Pass#OVERLAY} * * @name czm_passOverlay * @glslConstant * * @see czm_pass */ const float czm_passOverlay = 11.0; `;var eD=`/** * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION} * * @name czm_passTerrainClassification * @glslConstant * * @see czm_pass */ const float czm_passTerrainClassification = 3.0; `;var tD=`/** * The automatic GLSL constant for {@link Pass#TRANSLUCENT} * * @name czm_passTranslucent * @glslConstant * * @see czm_pass */ const float czm_passTranslucent = 8.0; `;var nD=`/** * The automatic GLSL constant for {@link Pass#VOXELS} * * @name czm_passVoxels * @glslConstant * * @see czm_pass */ const float czm_passVoxels = 9.0; `;var iD=`/** * A built-in GLSL floating-point constant for Math.PI. * * @alias czm_pi * @glslConstant * * @see CesiumMath.PI * * @example * // GLSL declaration * const float czm_pi = ...; * * // Example * float twoPi = 2.0 * czm_pi; */ const float czm_pi = 3.141592653589793; `;var oD=`/** * A built-in GLSL floating-point constant for pi/4. * * @alias czm_piOverFour * @glslConstant * * @see CesiumMath.PI_OVER_FOUR * * @example * // GLSL declaration * const float czm_piOverFour = ...; * * // Example * float pi = 4.0 * czm_piOverFour; */ const float czm_piOverFour = 0.7853981633974483; `;var rD=`/** * A built-in GLSL floating-point constant for pi/6. * * @alias czm_piOverSix * @glslConstant * * @see CesiumMath.PI_OVER_SIX * * @example * // GLSL declaration * const float czm_piOverSix = ...; * * // Example * float pi = 6.0 * czm_piOverSix; */ const float czm_piOverSix = 0.5235987755982988; `;var sD=`/** * A built-in GLSL floating-point constant for pi/3. * * @alias czm_piOverThree * @glslConstant * * @see CesiumMath.PI_OVER_THREE * * @example * // GLSL declaration * const float czm_piOverThree = ...; * * // Example * float pi = 3.0 * czm_piOverThree; */ const float czm_piOverThree = 1.0471975511965976; `;var aD=`/** * A built-in GLSL floating-point constant for pi/2. * * @alias czm_piOverTwo * @glslConstant * * @see CesiumMath.PI_OVER_TWO * * @example * // GLSL declaration * const float czm_piOverTwo = ...; * * // Example * float pi = 2.0 * czm_piOverTwo; */ const float czm_piOverTwo = 1.5707963267948966; `;var cD=`/** * A built-in GLSL floating-point constant for converting degrees to radians. * * @alias czm_radiansPerDegree * @glslConstant * * @see CesiumMath.RADIANS_PER_DEGREE * * @example * // GLSL declaration * const float czm_radiansPerDegree = ...; * * // Example * float rad = czm_radiansPerDegree * deg; */ const float czm_radiansPerDegree = 0.017453292519943295; `;var lD=`/** * The constant identifier for the 2D {@link SceneMode} * * @name czm_sceneMode2D * @glslConstant * @see czm_sceneMode * @see czm_sceneModeColumbusView * @see czm_sceneMode3D * @see czm_sceneModeMorphing */ const float czm_sceneMode2D = 2.0; `;var uD=`/** * The constant identifier for the 3D {@link SceneMode} * * @name czm_sceneMode3D * @glslConstant * @see czm_sceneMode * @see czm_sceneMode2D * @see czm_sceneModeColumbusView * @see czm_sceneModeMorphing */ const float czm_sceneMode3D = 3.0; `;var fD=`/** * The constant identifier for the Columbus View {@link SceneMode} * * @name czm_sceneModeColumbusView * @glslConstant * @see czm_sceneMode * @see czm_sceneMode2D * @see czm_sceneMode3D * @see czm_sceneModeMorphing */ const float czm_sceneModeColumbusView = 1.0; `;var dD=`/** * The constant identifier for the Morphing {@link SceneMode} * * @name czm_sceneModeMorphing * @glslConstant * @see czm_sceneMode * @see czm_sceneMode2D * @see czm_sceneModeColumbusView * @see czm_sceneMode3D */ const float czm_sceneModeMorphing = 0.0; `;var hD=`/** * A built-in GLSL floating-point constant for one solar radius. * * @alias czm_solarRadius * @glslConstant * * @see CesiumMath.SOLAR_RADIUS * * @example * // GLSL declaration * const float czm_solarRadius = ...; */ const float czm_solarRadius = 695500000.0; `;var mD=`/** * A built-in GLSL floating-point constant for 3pi/2. * * @alias czm_threePiOver2 * @glslConstant * * @see CesiumMath.THREE_PI_OVER_TWO * * @example * // GLSL declaration * const float czm_threePiOver2 = ...; * * // Example * float pi = (2.0 / 3.0) * czm_threePiOver2; */ const float czm_threePiOver2 = 4.71238898038469; `;var pD=`/** * A built-in GLSL floating-point constant for 2pi. * * @alias czm_twoPi * @glslConstant * * @see CesiumMath.TWO_PI * * @example * // GLSL declaration * const float czm_twoPi = ...; * * // Example * float pi = czm_twoPi / 2.0; */ const float czm_twoPi = 6.283185307179586; `;var AD=`/** * The maximum latitude, in radians, both North and South, supported by a Web Mercator * (EPSG:3857) projection. Technically, the Mercator projection is defined * for any latitude up to (but not including) 90 degrees, but it makes sense * to cut it off sooner because it grows exponentially with increasing latitude. * The logic behind this particular cutoff value, which is the one used by * Google Maps, Bing Maps, and Esri, is that it makes the projection * square. That is, the rectangle is equal in the X and Y directions. * * The constant value is computed as follows: * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi))) * * @name czm_webMercatorMaxLatitude * @glslConstant */ const float czm_webMercatorMaxLatitude = 1.4844222297453324; `;var gD=`/** * @name czm_depthRangeStruct * @glslStruct */ struct czm_depthRangeStruct { float near; float far; }; `;var _D=`/** * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions. * * @name czm_material * @glslStruct * * @property {vec3} diffuse Incoming light that scatters evenly in all directions. * @property {float} specular Intensity of incoming light reflecting in a single direction. * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight. * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal. * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque. */ struct czm_material { vec3 diffuse; float specular; float shininess; vec3 normal; vec3 emission; float alpha; }; `;var yD=`/** * Used as input to every material's czm_getMaterial function. * * @name czm_materialInput * @glslStruct * * @property {float} s 1D texture coordinates. * @property {vec2} st 2D texture coordinates. * @property {vec3} str 3D texture coordinates. * @property {vec3} normalEC Unperturbed surface normal in eye coordinates. * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space. * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye. * @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials. * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials. * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials. * @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials. */ struct czm_materialInput { float s; vec2 st; vec3 str; vec3 normalEC; mat3 tangentToEyeMatrix; vec3 positionToEyeEC; float height; float slope; float aspect; float waterMask; }; `;var CD=`/** * Struct for representing a material for a {@link Model}. The model * rendering pipeline will pass this struct between material, custom shaders, * and lighting stages. This is not to be confused with {@link czm_material} * which is used by the older Fabric materials system, although they are similar. *

* All color values (diffuse, specular, emissive) are in linear color space. *

* * @name czm_modelMaterial * @glslStruct * * @property {vec4} baseColor The base color of the material. * @property {vec3} diffuse Incoming light that scatters evenly in all directions. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque. * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature. * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces. * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal. * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded. * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light. */ 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; // Add clearcoatF0 when KHR_materials_ior is implemented #endif }; `;var ED=`/** * Struct for representing the output of a custom vertex shader. * * @name czm_modelVertexOutput * @glslStruct * * @see {@link CustomShader} * @see {@link Model} * * @property {vec3} positionMC The position of the vertex in model coordinates * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives. */ struct czm_modelVertexOutput { vec3 positionMC; float pointSize; }; `;var ID=`/** * DOC_TBA * * @name czm_ray * @glslStruct */ struct czm_ray { vec3 origin; vec3 direction; }; `;var xD=`/** * DOC_TBA * * @name czm_raySegment * @glslStruct */ struct czm_raySegment { float start; float stop; }; /** * DOC_TBA * * @name czm_emptyRaySegment * @glslConstant */ const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity); /** * DOC_TBA * * @name czm_fullRaySegment * @glslConstant */ const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity); `;var bD=`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 TD=`/** * Converts an HSB color (hue, saturation, brightness) to RGB * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl} * * @name czm_HSBToRGB * @glslFunction * * @param {vec3} hsb The color in HSB. * * @returns {vec3} The color in RGB. * * @example * vec3 hsb = czm_RGBToHSB(rgb); * hsb.z *= 0.1; * rgb = czm_HSBToRGB(hsb); */ 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 SD=`/** * Converts an HSL color (hue, saturation, lightness) to RGB * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html} * * @name czm_HSLToRGB * @glslFunction * * @param {vec3} rgb The color in HSL. * * @returns {vec3} The color in RGB. * * @example * vec3 hsl = czm_RGBToHSL(rgb); * hsl.z *= 0.1; * rgb = czm_HSLToRGB(hsl); */ 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 wD=`/** * Converts an RGB color to HSB (hue, saturation, brightness) * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl} * * @name czm_RGBToHSB * @glslFunction * * @param {vec3} rgb The color in RGB. * * @returns {vec3} The color in HSB. * * @example * vec3 hsb = czm_RGBToHSB(rgb); * hsb.z *= 0.1; * rgb = czm_HSBToRGB(hsb); */ 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 BD=`/** * Converts an RGB color to HSL (hue, saturation, lightness) * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html} * * @name czm_RGBToHSL * @glslFunction * * @param {vec3} rgb The color in RGB. * * @returns {vec3} The color in HSL. * * @example * vec3 hsl = czm_RGBToHSL(rgb); * hsl.z *= 0.1; * rgb = czm_HSLToRGB(hsl); */ vec3 RGBtoHCV(vec3 rgb) { // Based on work by Sam Hocevar and Emil Persson 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 DD=`/** * Converts an RGB color to CIE Yxy. *

The conversion is described in * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform} *

* * @name czm_RGBToXYZ * @glslFunction * * @param {vec3} rgb The color in RGB. * * @returns {vec3} The color in CIE Yxy. * * @example * vec3 xyz = czm_RGBToXYZ(rgb); * xyz.x = max(xyz.x - luminanceThreshold, 0.0); * rgb = czm_XYZToRGB(xyz); */ 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 vD=`/** * Converts a CIE Yxy color to RGB. *

The conversion is described in * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform} *

* * @name czm_XYZToRGB * @glslFunction * * @param {vec3} Yxy The color in CIE Yxy. * * @returns {vec3} The color in RGB. * * @example * vec3 xyz = czm_RGBToXYZ(rgb); * xyz.x = max(xyz.x - luminanceThreshold, 0.0); * rgb = czm_XYZToRGB(xyz); */ 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 PD=`// See: // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/ 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 RD=`/** * @private */ float czm_alphaWeight(float a) { float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2]; // See Weighted Blended Order-Independent Transparency for examples of different weighting functions: // http://jcgt.org/published/0002/02/09/ 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 MD=`/** * Procedural anti-aliasing by blurring two colors that meet at a sharp edge. * * @name czm_antialias * @glslFunction * * @param {vec4} color1 The color on one side of the edge. * @param {vec4} color2 The color on the other side of the edge. * @param {vec4} currentcolor The current color, either color1 or color2. * @param {float} dist The distance to the edge in texture coordinates. * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors. * @returns {vec4} The anti-aliased color. * * @example * // GLSL declarations * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor); * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist); * * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space * float dist = abs(textureCoordinates.t - 0.5); * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t)); * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1); */ 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); //makes the transition nicer 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 ND=`/** * Apply a HSB color shift to an RGB color. * * @param {vec3} rgb The color in RGB space. * @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment * @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects. * * @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range. */ vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) { // Convert rgb color to hsb vec3 hsb = czm_RGBToHSB(rgb); // Perform hsb shift // Hue cycles around so no clamp is needed. hsb.x += hsbShift.x; // hue hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation // brightness // // Some shaders such as atmosphere-related effects need to leave black // pixels unchanged 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); // Convert shifted hsb back to rgb return czm_HSBToRGB(hsb); } `;var LD=`/** * Approximately computes spherical coordinates given a normal. * Uses approximate inverse trigonometry for speed and consistency, * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU. * * @name czm_approximateSphericalCoordinates * @glslFunction * * @param {vec3} normal arbitrary-length normal. * * @returns {vec2} Approximate latitude and longitude spherical coordinates. */ vec2 czm_approximateSphericalCoordinates(vec3 normal) { // Project into plane with vertical for latitude 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 OD=`/** * Compute a rational approximation to tanh(x) * * @param {float} x A real number input * @returns {float} An approximation for tanh(x) */ 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 FD=`/** * Determines if the fragment is back facing * * @name czm_backFacing * @glslFunction * * @returns {bool} true if the fragment is back facing; otherwise, false. */ bool czm_backFacing() { // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494. return gl_FrontFacing == false; } `;var QD=`/** * Branchless ternary operator to be used when it's inexpensive to explicitly * evaluate both possibilities for a float expression. * * @name czm_branchFreeTernary * @glslFunction * * @param {bool} comparison A comparison statement * @param {float} a Value to return if the comparison is true. * @param {float} b Value to return if the comparison is false. * * @returns {float} equivalent of comparison ? a : b */ float czm_branchFreeTernary(bool comparison, float a, float b) { float useA = float(comparison); return a * useA + b * (1.0 - useA); } /** * Branchless ternary operator to be used when it's inexpensive to explicitly * evaluate both possibilities for a vec2 expression. * * @name czm_branchFreeTernary * @glslFunction * * @param {bool} comparison A comparison statement * @param {vec2} a Value to return if the comparison is true. * @param {vec2} b Value to return if the comparison is false. * * @returns {vec2} equivalent of comparison ? a : b */ vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) { float useA = float(comparison); return a * useA + b * (1.0 - useA); } /** * Branchless ternary operator to be used when it's inexpensive to explicitly * evaluate both possibilities for a vec3 expression. * * @name czm_branchFreeTernary * @glslFunction * * @param {bool} comparison A comparison statement * @param {vec3} a Value to return if the comparison is true. * @param {vec3} b Value to return if the comparison is false. * * @returns {vec3} equivalent of comparison ? a : b */ vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) { float useA = float(comparison); return a * useA + b * (1.0 - useA); } /** * Branchless ternary operator to be used when it's inexpensive to explicitly * evaluate both possibilities for a vec4 expression. * * @name czm_branchFreeTernary * @glslFunction * * @param {bool} comparison A comparison statement * @param {vec3} a Value to return if the comparison is true. * @param {vec3} b Value to return if the comparison is false. * * @returns {vec3} equivalent of comparison ? a : b */ vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) { float useA = float(comparison); return a * useA + b * (1.0 - useA); } `;var kD=` 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 UD=` uniform vec4 shadowMap_cascadeDistances; float czm_cascadeDistance(vec4 weights) { return dot(shadowMap_cascadeDistances, weights); } `;var GD=` 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 zD=` uniform vec4 shadowMap_cascadeSplits[2]; vec4 czm_cascadeWeights(float depthEye) { // One component is set to 1.0 and all others set to 0.0. vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye)); vec4 far = step(depthEye, shadowMap_cascadeSplits[1]); return near * far; } `;var VD=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) { float signedDistance = texture(clippingDistance, uv).r; return (signedDistance - 0.5) * 2.0; } void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) { // Position is completely outside of polygons bounds vec2 rectUv = clippingPosition; if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) { #ifdef CLIPPING_INVERSE discard; #endif return; } vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0)); vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005)); float dimension = float(extentsLength); if (extentsLength > 2) { dimension = ceil(log2(float(extentsLength))); } vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension; vec2 uv = textureOffset + rectUv / dimension; float signedDistance = getSignedDistance(uv, clippingDistance); #ifdef CLIPPING_INVERSE if (signedDistance > 0.0) { discard; } #else if (signedDistance < 0.0) { discard; } #endif } `;var HD=`/** * DOC_TBA * * @name czm_columbusViewMorph * @glslFunction */ vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time) { // Just linear for now. vec3 p = mix(position2D.xyz, position3D.xyz, time); return vec4(p, 1.0); } `;var WD=`/** * Compute the atmosphere color, applying Rayleigh and Mie scattering. This * builtin uses automatic uniforms so the atmophere settings are synced with the * state of the Scene, even in other contexts like Model. * * @name czm_computeAtmosphereColor * @glslFunction * * @param {vec3} positionWC Position of the fragment in world coords (low precision) * @param {vec3} lightDirection Light direction from the sun or other light source. * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function * @param {vec3} mieColor The Mie scattering color computed by a scattering function * @param {float} opacity The opacity computed by a scattering function. */ vec4 czm_computeAtmosphereColor( vec3 positionWC, vec3 lightDirection, vec3 rayleighColor, vec3 mieColor, float opacity ) { // Setup the primary ray: from the camera position to the vertex position. 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; // The Rayleigh phase function. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq); // The Mie phase function. 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)); // The final color is generated by combining the effects of the Rayleigh and Mie scattering. vec3 rayleigh = rayleighPhase * rayleighColor; vec3 mie = miePhase * mieColor; vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity; return vec4(color, opacity); } /** * Compute the atmosphere color, applying Rayleigh and Mie scattering. This * builtin uses automatic uniforms so the atmophere settings are synced with the * state of the Scene, even in other contexts like Model. * * @name czm_computeAtmosphereColor * @glslFunction * * @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision) * @param {vec3} lightDirection Light direction from the sun or other light source. * @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function * @param {vec3} mieColor The Mie scattering color computed by a scattering function * @param {float} opacity The opacity computed by a scattering function. */ 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; // The Rayleigh phase function. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq); // The Mie phase function. 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)); // The final color is generated by combining the effects of the Rayleigh and Mie scattering. vec3 rayleigh = rayleighPhase * rayleighColor; vec3 mie = miePhase * mieColor; vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity; return vec4(color, opacity); } `;var jD=`/** * Compute atmosphere scattering for the ground atmosphere and fog. This method * uses automatic uniforms so it is always synced with the scene settings. * * @name czm_computeGroundAtmosphereScattering * @glslfunction * * @param {vec3} positionWC The position of the fragment in world coordinates. * @param {vec3} lightDirection The direction of the light to calculate the scattering from. * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to. * @param {vec3} mieColor The variable the Mie scattering will be written to. * @param {float} opacity The variable the transmittance will be written to. */ 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 YD=`/** * Returns a position in model coordinates relative to eye taking into * account the current scene mode: 3D, 2D, or Columbus view. *

* This uses standard position attributes, position3DHigh, * position3DLow, position2DHigh, and position2DLow, * and should be used when writing a vertex shader for an {@link Appearance}. *

* * @name czm_computePosition * @glslFunction * * @returns {vec4} The position relative to eye. * * @example * vec4 p = czm_computePosition(); * v_positionEC = (czm_modelViewRelativeToEye * p).xyz; * gl_Position = czm_modelViewProjectionRelativeToEye * p; * * @see czm_translateRelativeToEye */ vec4 czm_computePosition(); `;var qD=`/** * This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as * the transmittance value for the ray. This function uses automatic uniforms * so the atmosphere settings are always synced with the current scene. * * @name czm_computeScattering * @glslfunction * * @param {czm_ray} primaryRay The ray from the camera to the position. * @param {float} primaryRayLength The length of the primary ray. * @param {vec3} lightDirection The direction of the light to calculate the scattering from. * @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to. * @param {vec3} mieColor The variable the Mie scattering will be written to. * @param {float} opacity The variable the transmittance will be written to. */ 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; // The thickness of the atmosphere in meters. const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled. const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray. // Initialize the default scattering amounts to 0. rayleighColor = vec3(0.0); mieColor = vec3(0.0); opacity = 0.0; float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS; vec3 origin = vec3(0.0); // Calculate intersection from the camera to the outer ring of the atmosphere. czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius); // Return empty colors if no intersection with the atmosphere geometry. if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) { return; } // To deal with smaller values of PRIMARY_STEPS (e.g. 4) // we implement a split strategy: sky or horizon. // For performance reasons, instead of a if/else branch // a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0 float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength); // Value close to 0.0: close to the horizon // Value close to 1.0: above in the sky float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x)); // The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere. float start_0 = primaryRayAtmosphereIntersect.start; primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0); // The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller. primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength)); // For the number of ray steps, distinguish inside or outside atmosphere (outer space) // (1) from outer space we have to use more ray steps to get a realistic rendering // (2) within atmosphere we need fewer steps for faster rendering float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters 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); // Number of times the ray from the camera to the world position (primary ray) is sampled. int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray. // Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere. float rayPositionLength = primaryRayAtmosphereIntersect.start; // (1) Outside the atmosphere: constant rayStepLength // (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps 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); // Sample positions on the primary ray. for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) { // The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot // loop with non-constant condition, so it has to break early instead if (i >= PRIMARY_STEPS) { break; } // Calculate sample position along viewpoint ray. vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength); // Calculate height of sample position above ellipsoid. float sampleHeight = length(samplePosition) - atmosphereInnerRadius; // Calculate and accumulate density of particles at the sample position. vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength; opticalDepth += sampleDensity; // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere. 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); // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment. for (int j = 0; j < LIGHT_STEPS_MAX; ++j) { // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot // loop with non-constant condition, so it has to break early instead if (j >= LIGHT_STEPS) { break; } // Calculate sample position along light ray. vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5); // Calculate height of the light sample position above ellipsoid. float lightHeight = length(lightPosition) - atmosphereInnerRadius; // Calculate density of photons at the light sample position. lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength; // Increment distance on light ray. lightPositionLength += lightStepLength; } // Compute attenuation via the primary ray and the light ray. vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x)))); // Accumulate the scattering. rayleighAccumulation += sampleDensity.x * attenuation; mieAccumulation += sampleDensity.y * attenuation; // Increment distance on primary ray. rayPositionLength += (rayStepLength += rayStepLengthIncrease); } // Compute the scattering amount. rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation; mieColor = czm_atmosphereMieCoefficient * mieAccumulation; // Compute the transmittance i.e. how much light is passing through the atmosphere. opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x)))); } `;var KD=`/** * @private */ vec2 cordic(float angle) { // Scale the vector by the appropriate factor for the 24 iterations to follow. vec2 vector = vec2(6.0725293500888267e-1, 0.0); // Iteration 1 float sense = (angle < 0.0) ? -1.0 : 1.0; // float factor = sense * 1.0; // 2^-0 mat2 rotation = mat2(1.0, sense, -sense, 1.0); vector = rotation * vector; angle -= sense * 7.8539816339744828e-1; // atan(2^-0) // Iteration 2 sense = (angle < 0.0) ? -1.0 : 1.0; float factor = sense * 5.0e-1; // 2^-1 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 4.6364760900080609e-1; // atan(2^-1) // Iteration 3 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 2.5e-1; // 2^-2 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 2.4497866312686414e-1; // atan(2^-2) // Iteration 4 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.25e-1; // 2^-3 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.2435499454676144e-1; // atan(2^-3) // Iteration 5 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 6.25e-2; // 2^-4 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 6.2418809995957350e-2; // atan(2^-4) // Iteration 6 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 3.125e-2; // 2^-5 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 3.1239833430268277e-2; // atan(2^-5) // Iteration 7 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.5625e-2; // 2^-6 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.5623728620476831e-2; // atan(2^-6) // Iteration 8 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 7.8125e-3; // 2^-7 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 7.8123410601011111e-3; // atan(2^-7) // Iteration 9 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 3.90625e-3; // 2^-8 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 3.9062301319669718e-3; // atan(2^-8) // Iteration 10 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.953125e-3; // 2^-9 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.9531225164788188e-3; // atan(2^-9) // Iteration 11 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 9.765625e-4; // 2^-10 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 9.7656218955931946e-4; // atan(2^-10) // Iteration 12 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 4.8828125e-4; // 2^-11 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 4.8828121119489829e-4; // atan(2^-11) // Iteration 13 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 2.44140625e-4; // 2^-12 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 2.4414062014936177e-4; // atan(2^-12) // Iteration 14 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.220703125e-4; // 2^-13 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.2207031189367021e-4; // atan(2^-13) // Iteration 15 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 6.103515625e-5; // 2^-14 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 6.1035156174208773e-5; // atan(2^-14) // Iteration 16 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 3.0517578125e-5; // 2^-15 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 3.0517578115526096e-5; // atan(2^-15) // Iteration 17 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.52587890625e-5; // 2^-16 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.5258789061315762e-5; // atan(2^-16) // Iteration 18 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 7.62939453125e-6; // 2^-17 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 7.6293945311019700e-6; // atan(2^-17) // Iteration 19 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 3.814697265625e-6; // 2^-18 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 3.8146972656064961e-6; // atan(2^-18) // Iteration 20 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.9073486328125e-6; // 2^-19 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 1.9073486328101870e-6; // atan(2^-19) // Iteration 21 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 9.5367431640625e-7; // 2^-20 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 9.5367431640596084e-7; // atan(2^-20) // Iteration 22 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 4.76837158203125e-7; // 2^-21 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 4.7683715820308884e-7; // atan(2^-21) // Iteration 23 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 2.384185791015625e-7; // 2^-22 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; angle -= sense * 2.3841857910155797e-7; // atan(2^-22) // Iteration 24 sense = (angle < 0.0) ? -1.0 : 1.0; factor = sense * 1.1920928955078125e-7; // 2^-23 rotation[0][1] = factor; rotation[1][0] = -factor; vector = rotation * vector; // angle -= sense * 1.1920928955078068e-7; // atan(2^-23) return vector; } /** * Computes the cosine and sine of the provided angle using the CORDIC algorithm. * * @name czm_cosineAndSine * @glslFunction * * @param {float} angle The angle in radians. * * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate). * * @example * vec2 v = czm_cosineAndSine(czm_piOverSix); * float cosine = v.x; * float sine = v.y; */ 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 XD=`/** * Decompresses texture coordinates that were packed into a single float. * * @name czm_decompressTextureCoordinates * @glslFunction * * @param {float} encoded The compressed texture coordinates. * @returns {vec2} The decompressed texture coordinates. */ 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 JD=`// emulated noperspective #if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH) out float v_WindowZ; #endif /** * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2. * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes, * capping the shadow volume. More information here: * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt. * * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring * no geometry gets clipped by setting the clip space z value to 0.0 and then * sending the unaltered screen space z value (using emulated noperspective * interpolation) to the frag shader where it is clamped to [0,1] and then * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on: * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv. * * When GL_EXT_frag_depth is not available, which is the case on some mobile * devices, we must attempt to fix this only in the vertex shader. * The approach is to clamp the z value to the far plane, which closes the * shadow volume but also distorts the geometry, so there can still be artifacts * on frustum seams. * * @name czm_depthClamp * @glslFunction * * @param {vec4} coords The vertex in clip coordinates. * @returns {vec4} The modified vertex. * * @example * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0)); * * @see czm_writeDepthClamp */ 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 ZD=`/** * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping. *

* The ellipsoid is assumed to be centered at the model coordinate's origin. * * @name czm_eastNorthUpToEyeCoordinates * @glslFunction * * @param {vec3} positionMC The position on the ellipsoid in model coordinates. * @param {vec3} normalEC The normalized ellipsoid surface normal, at positionMC, in eye coordinates. * * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates. * * @example * // Transform a vector defined in the east-north-up coordinate * // system, (0, 0, 1) which is the surface normal, to eye * // coordinates. * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC); * vec3 normalEC = m * vec3(0.0, 0.0, 1.0); */ mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC) { vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates return mat3( tangentEC.x, tangentEC.y, tangentEC.z, bitangentEC.x, bitangentEC.y, bitangentEC.z, normalEC.x, normalEC.y, normalEC.z); } `;var $D=`/** * DOC_TBA * * @name czm_ellipsoidContainsPoint * @glslFunction * */ 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 ev=`/** * Approximate uv coordinates based on the ellipsoid normal. * * @name czm_ellipsoidTextureCoordinates * @glslFunction */ vec2 czm_ellipsoidTextureCoordinates(vec3 normal) { return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5); } `;var tv=`/** * Compares left and right componentwise. Returns true * if they are within epsilon and false otherwise. The inputs * left and right can be floats, vec2s, * vec3s, or vec4s. * * @name czm_equalsEpsilon * @glslFunction * * @param {} left The first vector. * @param {} right The second vector. * @param {float} epsilon The epsilon to use for equality testing. * @returns {bool} true if the components are within epsilon and false otherwise. * * @example * // GLSL declarations * bool czm_equalsEpsilon(float left, float right, float epsilon); * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon); * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon); * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon); */ 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 nv=`/** * DOC_TBA * * @name czm_eyeOffset * @glslFunction * * @param {vec4} positionEC DOC_TBA. * @param {vec3} eyeOffset DOC_TBA. * * @returns {vec4} DOC_TBA. */ vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset) { // This equation is approximate in x and y. vec4 p = positionEC; vec4 zEyeOffset = normalize(p) * eyeOffset.z; p.xy += eyeOffset.xy + zEyeOffset.xy; p.z += zEyeOffset.z; return p; } `;var iv=`/** * Transforms a position from eye to window coordinates. The transformation * from eye to clip coordinates is done using {@link czm_projection}. * The transform from normalized device coordinates to window coordinates is * done using {@link czm_viewportTransformation}, which assumes a depth range * of near = 0 and far = 1. *

* This transform is useful when there is a need to manipulate window coordinates * in a vertex shader as done by {@link BillboardCollection}. * * @name czm_eyeToWindowCoordinates * @glslFunction * * @param {vec4} position The position in eye coordinates to transform. * * @returns {vec4} The transformed position in window coordinates. * * @see czm_modelToWindowCoordinates * @see czm_projection * @see czm_viewportTransformation * @see BillboardCollection * * @example * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC); */ vec4 czm_eyeToWindowCoordinates(vec4 positionEC) { vec4 q = czm_projection * positionEC; // clip coordinates q.xyz /= q.w; // normalized device coordinates q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates return q; } `;var ov=`/** * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input. * * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on * "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006. * Adapted from ShaderFastLibs under MIT License. * * Chosen for the following characteristics over range [0, 1]: * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan) * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator) * * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301); * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2. * * @name czm_fastApproximateAtan * @glslFunction * * @param {float} x Value between 0 and 1 inclusive. * * @returns {float} Approximation of atan(x) */ float czm_fastApproximateAtan(float x) { return x * (-0.1784 * x - 0.0663 * x * x + 1.0301); } /** * Approximation of atan2. * * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html * However, we replaced their atan curve with Michael Drobot's (see above). * * @name czm_fastApproximateAtan * @glslFunction * * @param {float} x Value between -1 and 1 inclusive. * @param {float} y Value between -1 and 1 inclusive. * * @returns {float} Approximation of atan2(x, y) */ float czm_fastApproximateAtan(float x, float y) { // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications. // So range-reduce using abs and by flipping whether x or y is on top. float t = abs(x); // t used as swap and atan result. float opposite = abs(y); float adjacent = max(t, opposite); opposite = min(t, opposite); t = czm_fastApproximateAtan(opposite / adjacent); // Undo range reduction 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 rv=`/** * Gets the color with fog at a distance from the camera. * * @name czm_fog * @glslFunction * * @param {float} distanceToCamera The distance to the camera in meters. * @param {vec3} color The original color. * @param {vec3} fogColor The color of the fog. * * @returns {vec3} The color adjusted for fog at the distance from the camera. */ 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); } /** * Gets the color with fog at a distance from the camera. * * @name czm_fog * @glslFunction * * @param {float} distanceToCamera The distance to the camera in meters. * @param {vec3} color The original color. * @param {vec3} fogColor The color of the fog. * @param {float} fogModifierConstant A constant to modify the appearance of fog. * * @returns {vec3} The color adjusted for fog at the distance from the camera. */ 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 sv=`/** * Converts a color from RGB space to linear space. * * @name czm_gammaCorrect * @glslFunction * * @param {vec3} color The color in RGB space. * @returns {vec3} The color in linear space. */ 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 av=`/** * DOC_TBA * * @name czm_geodeticSurfaceNormal * @glslFunction * * @param {vec3} positionOnEllipsoid DOC_TBA * @param {vec3} ellipsoidCenter DOC_TBA * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA * * @returns {vec3} DOC_TBA. */ vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared) { return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared); } `;var cv=`/** * An czm_material with default values. Every material's czm_getMaterial * should use this default material as a base for the material it returns. * The default normal value is given by materialInput.normalEC. * * @name czm_getDefaultMaterial * @glslFunction * * @param {czm_materialInput} input The input used to construct the default material. * * @returns {czm_material} The default material. * * @see czm_materialInput * @see czm_material * @see czm_getMaterial */ 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 lv=`/** * Select which direction vector to use for dynamic atmosphere lighting based on an enum value * * @name czm_getDynamicAtmosphereLightDirection * @glslfunction * @see DynamicAtmosphereLightingType.js * * @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off. * @param {float} lightEnum The enum value for selecting between light sources. * @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC */ 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 uv=`/** * Calculates the intensity of diffusely reflected light. * * @name czm_getLambertDiffuse * @glslFunction * * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates. * @param {vec3} normalEC The surface normal in eye coordinates. * * @returns {float} The intensity of the diffuse reflection. * * @see czm_phong * * @example * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC); * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200); * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity); */ float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC) { return max(dot(lightDirectionEC, normalEC), 0.0); } `;var fv=`/** * Calculates the specular intensity of reflected light. * * @name czm_getSpecular * @glslFunction * * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates. * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates. * @param {vec3} normalEC The surface normal in eye coordinates. * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight. * * @returns {float} The intensity of the specular highlight. * * @see czm_phong * * @example * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC); * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200); * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity); */ float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess) { vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC); float specular = max(dot(toReflectedLight, toEyeEC), 0.0); // pow has undefined behavior if both parameters <= 0. // Prevent this by making sure shininess is at least czm_epsilon2. return pow(specular, max(shininess, czm_epsilon2)); } `;var dv=`/** * @private */ vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians) { float cosAngle = cos(angleInRadians); float sinAngle = sin(angleInRadians); // time dependent sampling directions 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); // rotate sampling direction by specified angle 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)); // average and scale to between -1 and 1 return ((noise / 4.0) - 0.5) * 2.0; } `;var hv=`/** * Adjusts the hue of a color. * * @name czm_hue * @glslFunction * * @param {vec3} rgb The color. * @param {float} adjustment The amount to adjust the hue of the color in radians. * * @returns {float} The color with the hue adjusted. * * @example * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi) */ 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 mv=`/** * Converts a color in linear space to RGB space. * * @name czm_inverseGamma * @glslFunction * * @param {vec3} color The color in linear space. * @returns {vec3} The color in RGB space. */ vec3 czm_inverseGamma(vec3 color) { return pow(color, vec3(1.0 / czm_gamma)); } `;var pv=`/** * Determines if a time interval is empty. * * @name czm_isEmpty * @glslFunction * * @param {czm_raySegment} interval The interval to test. * * @returns {bool} true if the time interval is empty; otherwise, false. * * @example * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0. */ bool czm_isEmpty(czm_raySegment interval) { return (interval.stop < 0.0); } `;var Av=`/** * Determines if a time interval is empty. * * @name czm_isFull * @glslFunction * * @param {czm_raySegment} interval The interval to test. * * @returns {bool} true if the time interval is empty; otherwise, false. * * @example * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0. */ bool czm_isFull(czm_raySegment interval) { return (interval.start == 0.0 && interval.stop == czm_infinity); } `;var gv=`/** * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located. * * @name czm_latitudeToWebMercatorFraction * @glslFunction * * @param {float} latitude The geodetic latitude, in radians. * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle. * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates. * * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection. */ 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 _v=`/** * Computes distance from an point in 2D to a line in 2D. * * @name czm_lineDistance * @glslFunction * * param {vec2} point1 A point along the line. * param {vec2} point2 A point along the line. * param {vec2} point A point that may or may not be on the line. * returns {float} The distance from the point to the line. */ 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 yv=`/** * Converts a linear RGB color to an sRGB color. * * @param {vec3|vec4} linearIn The color in linear color space. * @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input. */ 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 Cv=`/** * Computes the luminance of a color. * * @name czm_luminance * @glslFunction * * @param {vec3} rgb The color. * * @returns {float} The luminance. * * @example * float light = czm_luminance(vec3(0.0)); // 0.0 * float dark = czm_luminance(vec3(1.0)); // ~1.0 */ float czm_luminance(vec3 rgb) { // Algorithm from Chapter 10 of Graphics Shaders. const vec3 W = vec3(0.2125, 0.7154, 0.0721); return dot(rgb, W); } `;var Ev=`/** * Find the maximum component of a vector. * * @name czm_maximumComponent * @glslFunction * * @param {vec2|vec3|vec4} v The input vector. * @returns {float} The value of the largest component. */ 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 Iv=`/** * Computes the size of a pixel in meters at a distance from the eye. *

* Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel. *

* @name czm_metersPerPixel * @glslFunction * * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates. * @param {float} pixelRatio The scaling factor from pixel space to coordinate space * * @returns {float} The meters per pixel at positionEC. */ 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; } /** * Computes the size of a pixel in meters at a distance from the eye. *

* Use this version when scaling by pixel ratio. *

* @name czm_metersPerPixel * @glslFunction * * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates. * * @returns {float} The meters per pixel at positionEC. */ float czm_metersPerPixel(vec4 positionEC) { return czm_metersPerPixel(positionEC, czm_pixelRatio); } `;var xv=`/** * Transforms a position from model to window coordinates. The transformation * from model to clip coordinates is done using {@link czm_modelViewProjection}. * The transform from normalized device coordinates to window coordinates is * done using {@link czm_viewportTransformation}, which assumes a depth range * of near = 0 and far = 1. *

* This transform is useful when there is a need to manipulate window coordinates * in a vertex shader as done by {@link BillboardCollection}. *

* This function should not be confused with {@link czm_viewportOrthographic}, * which is an orthographic projection matrix that transforms from window * coordinates to clip coordinates. * * @name czm_modelToWindowCoordinates * @glslFunction * * @param {vec4} position The position in model coordinates to transform. * * @returns {vec4} The transformed position in window coordinates. * * @see czm_eyeToWindowCoordinates * @see czm_modelViewProjection * @see czm_viewportTransformation * @see czm_viewportOrthographic * @see BillboardCollection * * @example * vec4 positionWC = czm_modelToWindowCoordinates(positionMC); */ vec4 czm_modelToWindowCoordinates(vec4 position) { vec4 q = czm_modelViewProjection * position; // clip coordinates q.xyz /= q.w; // normalized device coordinates q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates return q; } `;var bv=`/** * DOC_TBA * * @name czm_multiplyWithColorBalance * @glslFunction */ vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right) { // Algorithm from Chapter 10 of Graphics Shaders. 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 Tv=`/** * Computes a value that scales with distance. The scaling is clamped at the near and * far distances, and does not extrapolate. This function works with the * {@link NearFarScalar} JavaScript class. * * @name czm_nearFarScalar * @glslFunction * * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w). * @param {float} cameraDistSq The square of the current distance from the camera. * * @returns {float} The value at this distance. */ 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 Sv=` /** * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ * * @name czm_octDecode * @param {vec2} encoded The oct-encoded, unit-length vector * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits. * @returns {vec3} The decoded and normalized vector */ 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); } /** * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ * * @name czm_octDecode * @param {vec2} encoded The oct-encoded, unit-length vector * @returns {vec3} The decoded and normalized vector */ vec3 czm_octDecode(vec2 encoded) { return czm_octDecode(encoded, 255.0); } /** * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ * * @name czm_octDecode * @param {float} encoded The oct-encoded, unit-length vector * @returns {vec3} The decoded and normalized vector */ 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)); } /** * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ * * @name czm_octDecode * @param {vec2} encoded The packed oct-encoded, unit-length vectors. * @param {vec3} vector1 One decoded and normalized vector. * @param {vec3} vector2 One decoded and normalized vector. * @param {vec3} vector3 One decoded and normalized vector. */ 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 wv=`/** * Packs a depth value into a vec4 that can be represented by unsigned bytes. * * @name czm_packDepth * @glslFunction * * @param {float} depth The floating-point depth. * @returns {vec4} The packed depth. */ vec4 czm_packDepth(float depth) { // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/ 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 Bv=`vec3 lambertianDiffuse(vec3 diffuseColor) { return diffuseColor / czm_pi; } vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) { float versine = 1.0 - VdotH; // pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269 float versineSquared = versine * versine; return f0 + (f90 - f0) * versineSquared * versineSquared * versine; } #ifdef USE_ANISOTROPY /** * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent) * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent) * @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates * @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates */ 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); } /** * @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent) * @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent) * @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates */ 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 /** * Estimate the geometric self-shadowing of the microfacets in a surface, * using the Smith Joint GGX visibility function. * Note: Vis = G / (4 * NdotL * NdotV) * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3 * see Real-Time Rendering. Page 331 to 336. * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg) * * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness. * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source. * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera. */ 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; } /** * Estimate the fraction of the microfacets in a surface that are aligned with * the halfway vector, which is aligned halfway between the directions from * the fragment to the camera and from the fragment to the light source. * * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness. * @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector. * @return {float} The fraction of microfacets aligned to the halfway vector. */ float GGX(float alphaRoughness, float NdotH) { float alphaRoughnessSquared = alphaRoughness * alphaRoughness; float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0; return alphaRoughnessSquared / (czm_pi * f * f); } /** * Compute the strength of the specular reflection due to direct lighting. * * @param {vec3} normal The surface normal. * @param {vec3} lightDirection The unit vector pointing from the fragment to the light source. * @param {vec3} viewDirection The unit vector pointing from the fragment to the camera. * @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera. * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness. * @return {float} The strength of the specular reflection. */ 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; } /** * Compute the diffuse and specular contributions using physically based * rendering. This function only handles direct lighting. *

* This function only handles the lighting calculations. Metallic/roughness * and specular/glossy must be handled separately. See {@MaterialStageFS} *

* * @name czm_pbrLighting * @glslFunction * * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position * @param {vec3} normalEC The surface normal in eye coordinates * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates. * @param {czm_modelMaterial} The material properties. * @return {vec3} The computed HDR color */ 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); // Typical dielectrics will have reflectance 0.04, so f90 will be 1.0. // In this case, at grazing angle, all incident energy is reflected. 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; // F here represents the specular contribution vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor); // Lo = (diffuse + specular) * Li * NdotL return (diffuseContribution + specularContribution) * NdotL; } `;var Dv=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral // Input color is non-negative and resides in the Linear Rec. 709 color space. // Output color is also Linear Rec. 709, but in the [0, 1] range. 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 vv=`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); } /** * Computes a color using the Phong lighting model. * * @name czm_phong * @glslFunction * * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates. * @param {czm_material} material The fragment's material. * * @returns {vec4} The computed color. * * @example * vec3 positionToEyeEC = // ... * czm_material material = // ... * vec3 lightDirectionEC = // ... * out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC); * * @see czm_getMaterial */ vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC) { // Diffuse from directional light sources at eye (for top-down) float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material); if (czm_sceneMode == czm_sceneMode3D) { // (and horizon views in 3D) diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material); } float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material); // Temporary workaround for adding ambient. 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 Pv=`/** * Computes distance from a point to a plane. * * @name czm_planeDistance * @glslFunction * * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js * param {vec3} point A point in the same space as the plane. * returns {float} The distance from the point to the plane. */ float czm_planeDistance(vec4 plane, vec3 point) { return (dot(plane.xyz, point) + plane.w); } /** * Computes distance from a point to a plane. * * @name czm_planeDistance * @glslFunction * * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js * param {vec3} point A point in the same space as the plane. * returns {float} The distance from the point to the plane. */ float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) { return (dot(planeNormal, point) + planeDistance); } `;var Rv=`/** * Computes the point along a ray at the given time. time can be positive, negative, or zero. * * @name czm_pointAlongRay * @glslFunction * * @param {czm_ray} ray The ray to compute the point along. * @param {float} time The time along the ray. * * @returns {vec3} The point along the ray at the given time. * * @example * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0) */ vec3 czm_pointAlongRay(czm_ray ray, float time) { return ray.origin + (time * ray.direction); } `;var Mv=`/** * DOC_TBA * * @name czm_rayEllipsoidIntersectionInterval * @glslFunction */ czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii) { // ray and ellipsoid center in eye coordinates. radii in model coordinates. 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) // Outside ellipsoid. { if (qw >= 0.0) // Looking outward or tangent (0 intersections). { return czm_emptyRaySegment; } else // qw < 0.0. { float qw2 = qw * qw; float difference = q2 - 1.0; // Positively valued. float w2 = dot(w, w); float product = w2 * difference; if (qw2 < product) // Imaginary roots (0 intersections). { return czm_emptyRaySegment; } else if (qw2 > product) // Distinct roots (2 intersections). { float discriminant = qw * qw - product; float temp = -qw + sqrt(discriminant); // Avoid cancellation. 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 // qw2 == product. Repeated roots (2 intersections). { float root = sqrt(difference / w2); czm_raySegment i = czm_raySegment(root, root); return i; } } } else if (q2 < 1.0) // Inside ellipsoid (2 intersections). { float difference = q2 - 1.0; // Negatively valued. float w2 = dot(w, w); float product = w2 * difference; // Negatively valued. float discriminant = qw * qw - product; float temp = -qw + sqrt(discriminant); // Positively valued. czm_raySegment i = czm_raySegment(0.0, temp / w2); return i; } else // q2 == 1.0. On ellipsoid. { if (qw < 0.0) // Looking inward. { float w2 = dot(w, w); czm_raySegment i = czm_raySegment(0.0, -qw / w2); return i; } else // qw >= 0.0. Looking outward or tangent. { return czm_emptyRaySegment; } } } `;var Nv=`/** * Compute the intersection interval of a ray with a sphere. * * @name czm_raySphereIntersectionInterval * @glslFunction * * @param {czm_ray} ray The ray. * @param {vec3} center The center of the sphere. * @param {float} radius The radius of the sphere. * @return {czm_raySegment} The intersection interval of the ray with the sphere. */ 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 Lv=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords) { return czm_reverseLogDepth(texture(depthTexture, texCoords).r); } `;var Ov=`/** * Reads a value previously transformed with {@link czm_writeNonPerspective} * by dividing it by \`w\`, the value used in the perspective divide. * This function is intended to be called in a fragment shader to access a * \`varying\` that should not be subject to perspective interpolation. * For example, screen-space texture coordinates. The value should have been * previously written in the vertex shader with a call to * {@link czm_writeNonPerspective}. * * @name czm_readNonPerspective * @glslFunction * * @param {float|vec2|vec3|vec4} value The non-perspective value to be read. * @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`. * @returns {float|vec2|vec3|vec4} The usable value. */ 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 Fv=`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 Qv=`/** * Round a floating point value. This function exists because round() doesn't * exist in GLSL 1.00. * * @param {float|vec2|vec3|vec4} value The value to round * @param {float|vec2|vec3|vec3} The rounded value. The type matches the input. */ 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 kv=`/** * Adjusts the saturation of a color. * * @name czm_saturation * @glslFunction * * @param {vec3} rgb The color. * @param {float} adjustment The amount to adjust the saturation of the color. * * @returns {float} The color with the saturation adjusted. * * @example * vec3 greyScale = czm_saturation(color, 0.0); * vec3 doubleSaturation = czm_saturation(color, 2.0); */ vec3 czm_saturation(vec3 rgb, float adjustment) { // Algorithm from Chapter 16 of OpenGL Shading Language const vec3 W = vec3(0.2125, 0.7154, 0.0721); vec3 intensity = vec3(dot(rgb, W)); return mix(intensity, rgb, adjustment); } `;var Uv=` 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 Gv=` 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 zv=`/** * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL * built-in function sign except that returns 1.0 instead of 0.0 when the input value is 0.0. * * @name czm_signNotZero * @glslFunction * * @param {} value The value for which to determine the sign. * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative. */ 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 Vv=`/** * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector. *

* The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22]. *

* * @name czm_sphericalHarmonics * @glslFunction * * @param {vec3} normal The normalized direction. * @param {vec3[9]} coefficients The third order spherical harmonic coefficients. * @returns {vec3} The color at the direction. * * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf */ 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 Hv=`/** * Converts an sRGB color to a linear RGB color. * * @param {vec3|vec4} srgbIn The color in sRGB space * @returns {vec3|vec4} The color in linear color space. The vector type matches the input. */ 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 Wv=`/** * Creates a matrix that transforms vectors from tangent space to eye space. * * @name czm_tangentToEyeSpaceMatrix * @glslFunction * * @param {vec3} normalEC The normal vector in eye coordinates. * @param {vec3} tangentEC The tangent vector in eye coordinates. * @param {vec3} bitangentEC The bitangent vector in eye coordinates. * * @returns {mat3} The matrix that transforms from tangent space to eye space. * * @example * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC); * vec3 normal = tangentToEye * texture(normalMap, st).xyz; */ 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 jv=`/** * A wrapper around the texture (WebGL2) / textureCube (WebGL1) * function to allow for WebGL 1 support. * * @name czm_textureCube * @glslFunction * * @param {samplerCube} sampler The sampler. * @param {vec3} p The coordinate at which to sample the texture. */ vec4 czm_textureCube(samplerCube sampler, vec3 p) { #if __VERSION__ == 300 return texture(sampler, p); #else return textureCube(sampler, p); #endif } /** * A wrapper around the textureLod (WebGL2) / textureCube (WebGL1) * function to allow for WebGL 1 support in fragment shaders. * * @name czm_textureCubeLod * @glslFunction * * @param {samplerCube} sampler The sampler. * @param {vec3} p The coordinate at which to sample the texture. * @param {float} lod The mipmap level from which to sample. */ 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 Yv=`/** * Transforms a plane. * * @name czm_transformPlane * @glslFunction * * @param {vec4} plane The plane in Hessian Normal Form. * @param {mat4} transform The inverse-transpose of a transformation matrix. */ vec4 czm_transformPlane(vec4 plane, mat4 transform) { vec4 transformedPlane = transform * plane; // Convert the transformed plane to Hessian Normal Form float normalMagnitude = length(transformedPlane.xyz); return transformedPlane / normalMagnitude; } `;var qv=`/** * Translates a position (or any vec3) that was encoded with {@link EncodedCartesian3}, * and then provided to the shader as separate high and low bits to * be relative to the eye. As shown in the example, the position can then be transformed in eye * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye}, * respectively. *

* This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}. *

* * @name czm_translateRelativeToEye * @glslFunction * * @param {vec3} high The position's high bits. * @param {vec3} low The position's low bits. * @returns {vec3} The position translated to be relative to the camera's position. * * @example * in vec3 positionHigh; * in vec3 positionLow; * * void main() * { * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow); * gl_Position = czm_modelViewProjectionRelativeToEye * p; * } * * @see czm_modelViewRelativeToEye * @see czm_modelViewProjectionRelativeToEye * @see czm_computePosition * @see EncodedCartesian3 */ vec4 czm_translateRelativeToEye(vec3 high, vec3 low) { vec3 highDifference = high - czm_encodedCameraPositionMCHigh; // This check handles the case when NaN values have gotten into \`highDifference\`. // Such a thing could happen on devices running iOS. if (length(highDifference) == 0.0) { highDifference = vec3(0); } vec3 lowDifference = low - czm_encodedCameraPositionMCLow; return vec4(highDifference + lowDifference, 1.0); } `;var Kv=`/** * @private */ vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC) { // Diffuse from directional light sources at eye (for top-down and horizon views) float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal); if (czm_sceneMode == czm_sceneMode3D) { // (and horizon views in 3D) 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); // Temporary workaround for adding ambient. 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 Xv=`/** * Returns the transpose of the matrix. The input matrix can be * a mat2, mat3, or mat4. * * @name czm_transpose * @glslFunction * * @param {} matrix The matrix to transpose. * * @returns {} The transposed matrix. * * @example * // GLSL declarations * mat2 czm_transpose(mat2 matrix); * mat3 czm_transpose(mat3 matrix); * mat4 czm_transpose(mat4 matrix); * * // Transpose a 3x3 rotation matrix to find its inverse. * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates( * positionMC, normalEC); * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye); */ 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 Jv=`vec2 getLookupUv(vec2 dimensions, int i) { int pixY = i / int(dimensions.x); int pixX = i - (pixY * int(dimensions.x)); float pixelWidth = 1.0 / dimensions.x; float pixelHeight = 1.0 / dimensions.y; float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel float v = (float(pixY) + 0.5) * pixelHeight; return vec2(u, v); } vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) { vec2 textureDimensions = vec2(textureSize(extentsTexture, 0)); return texture(extentsTexture, getLookupUv(textureDimensions, index)); }`;var Zv=`/** * Unpacks a vec4 depth value to a float in [0, 1) range. * * @name czm_unpackDepth * @glslFunction * * @param {vec4} packedDepth The packed depth. * * @returns {float} The floating-point depth in [0, 1) range. */ float czm_unpackDepth(vec4 packedDepth) { // See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/ return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0)); } `;var $v=`/** * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4. * * @name czm_unpackFloat * @glslFunction * * @param {vec4} packedFloat The packed float. * * @returns {float} The floating-point depth in arbitrary range. */ float czm_unpackFloat(vec4 packedFloat) { // Convert to [0.0, 255.0] and round to integer 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 eP=`/** * Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type, * so the return value is an int. *

* There are also precision limitations in WebGL 1. highp int is still limited * to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur. *

* * @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order. * * @return {int} The unpacked value. */ 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 tP=`/** * Transform metadata values following the EXT_structural_metadata spec * by multiplying by scale and adding the offset. Operations are always * performed component-wise, even for matrices. * * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply * @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value. * * @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input. */ 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 nP=`#ifdef LOG_DEPTH // 1.0 at the near plane, increasing linearly from there. 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 // With the very high far/near ratios used with the logarithmic depth // buffer, floating point rounding errors can cause linear depth values // to end up on the wrong side of the far plane, even for vertices that // are really nowhere near it. Since we always write a correct logarithmic // depth value in the fragment shader anyway, we just need to make sure // such errors don't cause the primitive to be clipped entirely before // we even get to the fragment shader. coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w; #endif return coords; } /** * Writes the logarithmic depth to gl_Position using the already computed gl_Position. * * @name czm_vertexLogDepth * @glslFunction */ void czm_vertexLogDepth() { #ifdef LOG_DEPTH v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0; gl_Position = czm_updatePositionDepth(gl_Position); #endif } /** * Writes the logarithmic depth to gl_Position using the provided clip coordinates. *

* An example use case for this function would be moving the vertex in window coordinates * before converting back to clip coordinates. Use the original vertex clip coordinates. *

* @name czm_vertexLogDepth * @glslFunction * * @param {vec4} clipCoords The vertex in clip coordinates. * * @example * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0)); */ void czm_vertexLogDepth(vec4 clipCoords) { #ifdef LOG_DEPTH v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0; czm_updatePositionDepth(clipCoords); #endif } `;var iP=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate) { // Reconstruct NDC coordinates 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); // Reverse the perspective division to obtain clip coordinates. q /= screenCoordinate.w; // Reverse the projection transformation to obtain eye coordinates. if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s { 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; } /** * Transforms a position from window to eye coordinates. * The transform from window to normalized device coordinates is done using components * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating * the inverse of czm_viewportTransformation. The transformation from * normalized device coordinates to clip coordinates is done using fragmentCoordinate.w, * which is expected to be the scalar used in the perspective divide. The transformation * from clip to eye coordinates is done using {@link czm_inverseProjection}. * * @name czm_windowToEyeCoordinates * @glslFunction * * @param {vec4} fragmentCoordinate The position in window coordinates to transform. * * @returns {vec4} The transformed position in eye coordinates. * * @see czm_modelToWindowCoordinates * @see czm_eyeToWindowCoordinates * @see czm_inverseProjection * @see czm_viewport * @see czm_viewportTransformation * * @example * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord); */ 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) { // See reverseLogDepth.glsl. This is separate to re-use the pow. #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; // Better precision #else vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0); vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord); #endif return eyeCoordinate; } /** * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates. * This function produces more accurate results for window positions with log depth than * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version * of czm_windowToEyeCoordinates. * * @name czm_windowToEyeCoordinates * @glslFunction * * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform. * @param {float} depthOrLogDepth A depth or log depth for the fragment. * * @see czm_modelToWindowCoordinates * @see czm_eyeToWindowCoordinates * @see czm_inverseProjection * @see czm_viewport * @see czm_viewportTransformation * * @returns {vec4} The transformed position in eye coordinates. */ vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth) { vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw; return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth); } `;var oP=`// emulated noperspective #if !defined(LOG_DEPTH) in float v_WindowZ; #endif /** * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane * by writing the fragment's depth. See czm_depthClamp for more details. * * @name czm_writeDepthClamp * @glslFunction * * @example * out_FragColor = color; * czm_writeDepthClamp(); * * @see czm_depthClamp */ 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 rP=`#ifdef LOG_DEPTH in float v_depthFromNearPlusOne; #ifdef POLYGON_OFFSET uniform vec2 u_polygonOffset; #endif #endif /** * Writes the fragment depth to the logarithmic depth buffer. *

* Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when * ray-casting geometry using a full screen quad. *

* @name czm_writeLogDepth * @glslFunction * * @param {float} depth The depth coordinate, where 1.0 is on the near plane and * depth increases in eye-space units from there * * @example * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0); */ void czm_writeLogDepth(float depth) { #if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth))) // Discard the vertex if it's not between the near and far planes. // We allow a bit of epsilon on the near plane comparison because a 1.0 // from the vertex shader (indicating the vertex should be _on_ the near // plane) will not necessarily come here as exactly 1.0. if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) { discard; } #ifdef POLYGON_OFFSET // Polygon offset: m * factor + r * units float factor = u_polygonOffset[0]; float units = u_polygonOffset[1]; #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives)) // This factor doesn't work in IE 10 if (factor != 0.0) { // m = sqrt(dZdX^2 + dZdY^2); float x = dFdx(depth); float y = dFdy(depth); float m = sqrt(x * x + y * y); // Apply the factor before computing the log depth. depth += m * factor; } #endif #endif gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne; #ifdef POLYGON_OFFSET // Apply the units after the log depth. gl_FragDepth += czm_epsilon7 * units; #endif #endif } /** * Writes the fragment depth to the logarithmic depth buffer. *

* Use this when the vertex shader calls {@link czm_vertexLogDepth}. *

* * @name czm_writeLogDepth * @glslFunction */ void czm_writeLogDepth() { #ifdef LOG_DEPTH czm_writeLogDepth(v_depthFromNearPlusOne); #endif } `;var sP=`/** * Transforms a value for non-perspective interpolation by multiplying * it by w, the value used in the perspective divide. This function is * intended to be called in a vertex shader to compute the value of a * \`varying\` that should not be subject to perspective interpolation. * For example, screen-space texture coordinates. The fragment shader * must call {@link czm_readNonPerspective} to retrieve the final * non-perspective value. * * @name czm_writeNonPerspective * @glslFunction * * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective. * @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`. * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the * fragment shader with {@link czm_readNonPerspective}. */ 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 nE={czm_degreesPerRadian:RB,czm_depthRange:MB,czm_epsilon1:NB,czm_epsilon2:LB,czm_epsilon3:OB,czm_epsilon4:FB,czm_epsilon5:QB,czm_epsilon6:kB,czm_epsilon7:UB,czm_infinity:GB,czm_oneOverPi:zB,czm_oneOverTwoPi:VB,czm_passCesium3DTile:HB,czm_passCesium3DTileClassification:WB,czm_passCesium3DTileClassificationIgnoreShow:jB,czm_passClassification:YB,czm_passCompute:qB,czm_passEnvironment:KB,czm_passGaussianSplats:XB,czm_passGlobe:JB,czm_passOpaque:ZB,czm_passOverlay:$B,czm_passTerrainClassification:eD,czm_passTranslucent:tD,czm_passVoxels:nD,czm_pi:iD,czm_piOverFour:oD,czm_piOverSix:rD,czm_piOverThree:sD,czm_piOverTwo:aD,czm_radiansPerDegree:cD,czm_sceneMode2D:lD,czm_sceneMode3D:uD,czm_sceneModeColumbusView:fD,czm_sceneModeMorphing:dD,czm_solarRadius:hD,czm_threePiOver2:mD,czm_twoPi:pD,czm_webMercatorMaxLatitude:AD,czm_depthRangeStruct:gD,czm_material:_D,czm_materialInput:yD,czm_modelMaterial:CD,czm_modelVertexOutput:ED,czm_ray:ID,czm_raySegment:xD,czm_shadowParameters:bD,czm_HSBToRGB:TD,czm_HSLToRGB:SD,czm_RGBToHSB:wD,czm_RGBToHSL:BD,czm_RGBToXYZ:DD,czm_XYZToRGB:vD,czm_acesTonemapping:PD,czm_alphaWeight:RD,czm_antialias:MD,czm_applyHSBShift:ND,czm_approximateSphericalCoordinates:LD,czm_approximateTanh:OD,czm_backFacing:FD,czm_branchFreeTernary:QD,czm_cascadeColor:kD,czm_cascadeDistance:UD,czm_cascadeMatrix:GD,czm_cascadeWeights:zD,czm_clipPolygons:VD,czm_columbusViewMorph:HD,czm_computeAtmosphereColor:WD,czm_computeGroundAtmosphereScattering:jD,czm_computePosition:YD,czm_computeScattering:qD,czm_cosineAndSine:KD,czm_decompressTextureCoordinates:XD,czm_depthClamp:JD,czm_eastNorthUpToEyeCoordinates:ZD,czm_ellipsoidContainsPoint:$D,czm_ellipsoidTextureCoordinates:ev,czm_equalsEpsilon:tv,czm_eyeOffset:nv,czm_eyeToWindowCoordinates:iv,czm_fastApproximateAtan:ov,czm_fog:rv,czm_gammaCorrect:sv,czm_geodeticSurfaceNormal:av,czm_getDefaultMaterial:cv,czm_getDynamicAtmosphereLightDirection:lv,czm_getLambertDiffuse:uv,czm_getSpecular:fv,czm_getWaterNoise:dv,czm_hue:hv,czm_inverseGamma:mv,czm_isEmpty:pv,czm_isFull:Av,czm_latitudeToWebMercatorFraction:gv,czm_lineDistance:_v,czm_linearToSrgb:yv,czm_luminance:Cv,czm_maximumComponent:Ev,czm_metersPerPixel:Iv,czm_modelToWindowCoordinates:xv,czm_multiplyWithColorBalance:bv,czm_nearFarScalar:Tv,czm_octDecode:Sv,czm_packDepth:wv,czm_pbrLighting:Bv,czm_pbrNeutralTonemapping:Dv,czm_phong:vv,czm_planeDistance:Pv,czm_pointAlongRay:Rv,czm_rayEllipsoidIntersectionInterval:Mv,czm_raySphereIntersectionInterval:Nv,czm_readDepth:Lv,czm_readNonPerspective:Ov,czm_reverseLogDepth:Fv,czm_round:Qv,czm_saturation:kv,czm_shadowDepthCompare:Uv,czm_shadowVisibility:Gv,czm_signNotZero:zv,czm_sphericalHarmonics:Vv,czm_srgbToLinear:Hv,czm_tangentToEyeSpaceMatrix:Wv,czm_textureCube:jv,czm_transformPlane:Yv,czm_translateRelativeToEye:qv,czm_translucentPhong:Kv,czm_transpose:Xv,czm_unpackClippingExtents:Jv,czm_unpackDepth:Zv,czm_unpackFloat:$v,czm_unpackUint:eP,czm_valueTransform:tP,czm_vertexLogDepth:nP,czm_windowToEyeCoordinates:iP,czm_writeDepthClamp:oP,czm_writeLogDepth:rP,czm_writeNonPerspective:sP};function yRe(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 aP=yRe;function zie(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o0;){let o=e.pop();n.push(o),o.requiredBy.length===0&&t.push(o)}for(;t.length>0;){let o=t.shift();e.push(o);for(let r=0;r=0;--o)i=`${i+t[o].glslSource} `;return i.replace(n.glslSource,"")}function Wie(e,t,n){let i,o,r="",s=e.sources;if(l(s))for(i=0,o=s.length;i-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};fh.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};fh.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new He({sources:[r]})),typeof s=="string"&&(s=new He({sources:[s]}));let c=this._context,u=r.createCombinedVertexShader(c),f=s.createCombinedFragmentShader(c),h=new cn({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:r,vertexShaderText:u,fragmentShaderSource:s,fragmentShaderText:f,attributeLocations:a}),p={cache:this,shaderProgram:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=p,this._shaders[o]=p,h};function A6(e,t){let n=t.derivedKeywords,i=n.length;for(let o=0;oGRe;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*D.TWO_PI,o}function VRe(e,t){let n=Math.floor(e/D.TWO_PI);e-=n*D.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=D.zeroToTwoPi(r),e<0&&(r-=D.TWO_PI),r+=n*D.TWO_PI,r}function HRe(e,t,n,i){let o=Math.cos(e),r=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*o-u*r*s,i[1]=u*o+c*r*s,i[2]=r*a,i[3]=-c*r-u*o*s,i[4]=-u*r+c*o*s,i[5]=o*a,i[6]=u*a,i[7]=-c*a,i[8]=s):i=new X(c*o-u*r*s,-c*r-u*o*s,u*a,u*o+c*r*s,-u*r+c*o*s,-c*a,r*a,o*a,s),i}var WRe=1.0000010178*ac,jRe=100.46645683*Kf,YRe=129597742283429e-5*ku,toe=16002,noe=21863,ioe=32004,ooe=10931,roe=14529,soe=16368,aoe=15318,coe=32794,qRe=64*1e-7*ac,KRe=-152*1e-7*ac,XRe=62*1e-7*ac,JRe=-8*1e-7*ac,ZRe=32*1e-7*ac,$Re=-41*1e-7*ac,eMe=19*1e-7*ac,tMe=-11*1e-7*ac,nMe=-150*1e-7*ac,iMe=-46*1e-7*ac,oMe=68*1e-7*ac,rMe=54*1e-7*ac,sMe=14*1e-7*ac,aMe=24*1e-7*ac,cMe=-28*1e-7*ac,lMe=22*1e-7*ac,loe=10,uoe=16002,foe=21863,doe=10931,hoe=1473,moe=32004,poe=4387,Aoe=73,uMe=-325*1e-7,fMe=-322*1e-7,dMe=-79*1e-7,hMe=232*1e-7,mMe=-52*1e-7,pMe=97*1e-7,AMe=55*1e-7,gMe=-41*1e-7,_Me=-105*1e-7,yMe=-137*1e-7,CMe=258*1e-7,EMe=35*1e-7,IMe=-116*1e-7,xMe=-88*1e-7,bMe=-112*1e-7,TMe=-80*1e-7,Kx=new K(0,0,ni.TAI);function SMe(e,t){_oe(e,Kx);let i=(Kx.dayNumber-vG.dayNumber+(Kx.secondsOfDay-vG.secondsOfDay)/ii.SECONDS_PER_DAY)/(ii.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=WRe+qRe*Math.cos(toe*o)+nMe*Math.sin(toe*o)+KRe*Math.cos(noe*o)+iMe*Math.sin(noe*o)+XRe*Math.cos(ioe*o)+oMe*Math.sin(ioe*o)+JRe*Math.cos(ooe*o)+rMe*Math.sin(ooe*o)+ZRe*Math.cos(roe*o)+sMe*Math.sin(roe*o)+$Re*Math.cos(soe*o)+aMe*Math.sin(soe*o)+eMe*Math.cos(aoe*o)+cMe*Math.sin(aoe*o)+tMe*Math.cos(coe*o)+lMe*Math.sin(coe*o),s=jRe+YRe*i+uMe*Math.cos(loe*o)+_Me*Math.sin(loe*o)+fMe*Math.cos(uoe*o)+yMe*Math.sin(uoe*o)+dMe*Math.cos(foe*o)+CMe*Math.sin(foe*o)+hMe*Math.cos(doe*o)+EMe*Math.sin(doe*o)+mMe*Math.cos(hoe*o)+IMe*Math.sin(hoe*o)+pMe*Math.cos(moe*o)+xMe*Math.sin(moe*o)+AMe*Math.cos(poe*o)+bMe*Math.sin(poe*o)+gMe*Math.cos(Aoe*o)+TMe*Math.sin(Aoe*o),a=.0167086342-.0004203654*i,c=102.93734808*Kf+11612.3529*ku*i,u=469.97289*ku*i,f=174.87317577*Kf-8679.27034*ku*i;return yoe(r,a,u,c,f,s,t)}function Coe(e,t){_oe(e,Kx);let i=(Kx.dayNumber-vG.dayNumber+(Kx.secondsOfDay-vG.secondsOfDay)/ii.SECONDS_PER_DAY)/ii.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,u=5.15668983*Kf,f=-8e-5*i+.02966*o-42e-6*r-13e-8*s,h=83.35324312*Kf,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,g=125.04455501*Kf,m=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,_=218.31664563*Kf,y=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,C=297.85019547*Kf+ku*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),E=93.27209062*Kf+ku*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),I=134.96340251*Kf+ku*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),b=357.52910918*Kf+ku*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),S=310.17137918*Kf-ku*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),B=2*C,v=4*C,P=6*C,N=2*I,L=3*I,A=4*I,x=2*E;a+=3400.4*Math.cos(B)-635.6*Math.cos(B-I)-235.6*Math.cos(I)+218.1*Math.cos(B-b)+181*Math.cos(B+I),c+=.014216*Math.cos(B-I)+.008551*Math.cos(B-N)-.001383*Math.cos(I)+.001356*Math.cos(B+I)-.001147*Math.cos(v-L)-914e-6*Math.cos(v-N)+869e-6*Math.cos(B-b-I)-627e-6*Math.cos(B)-394e-6*Math.cos(v-A)+282e-6*Math.cos(B-b-N)-279e-6*Math.cos(C-I)-236e-6*Math.cos(N)+231e-6*Math.cos(v)+229e-6*Math.cos(P-A)-201e-6*Math.cos(N-x),f+=486.26*Math.cos(B-x)-40.13*Math.cos(B)+37.51*Math.cos(x)+25.73*Math.cos(N-x)+19.97*Math.cos(B-b-x),p+=-55609*Math.sin(B-I)-34711*Math.sin(B-N)-9792*Math.sin(I)+9385*Math.sin(v-L)+7505*Math.sin(v-N)+5318*Math.sin(B+I)+3484*Math.sin(v-A)-3417*Math.sin(B-b-I)-2530*Math.sin(P-A)-2376*Math.sin(B)-2075*Math.sin(B-L)-1883*Math.sin(N)-1736*Math.sin(P-5*I)+1626*Math.sin(b)-1370*Math.sin(P-L),m+=-5392*Math.sin(B-x)-540*Math.sin(b)-441*Math.sin(B)+423*Math.sin(x)-288*Math.sin(N-x),y+=-3332.9*Math.sin(B)+1197.4*Math.sin(B-I)-662.5*Math.sin(b)+396.3*Math.sin(I)-218*Math.sin(B-b);let T=2*S,w=3*S;f+=46.997*Math.cos(S)*i-.614*Math.cos(B-x+S)*i+.614*Math.cos(B-x-S)*i-.0297*Math.cos(T)*o-.0335*Math.cos(S)*o+.0012*Math.cos(B-x+T)*o-16e-5*Math.cos(S)*r+4e-5*Math.cos(w)*r+4e-5*Math.cos(T)*r;let R=2.116*Math.sin(S)*i-.111*Math.sin(B-x-S)*i-.0015*Math.sin(S)*o;p+=R,y+=R,m+=-520.77*Math.sin(S)*i+13.66*Math.sin(B-x+S)*i+1.12*Math.sin(B-S)*i-1.06*Math.sin(x-S)*i+.66*Math.sin(T)*o+.371*Math.sin(S)*o-.035*Math.sin(B-x+T)*o-.015*Math.sin(B-x+S)*o+.0014*Math.sin(S)*r-.0011*Math.sin(w)*r-9e-4*Math.sin(T)*r,a*=FRe;let O=u+f*ku,k=h+p*ku,F=_+y*ku,z=g+m*ku;return yoe(a,c,O,k,z,F,t)}var goe=.012300034,wMe=goe/(goe+1)*-1;function BMe(e,t){return t=Coe(e,t),d.multiplyByScalar(t,wMe,t)}var Eoe=new X(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),fP=new d;_6.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=K.now()),l(t)||(t=new d),fP=SMe(e,fP),t=d.negate(fP,t),BMe(e,fP),d.subtract(t,fP,t),X.multiplyByVector(Eoe,t,t),t};_6.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=K.now()),t=Coe(e,t),X.multiplyByVector(Eoe,t,t),t};var b_=_6;var PG={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};PG.getMorphTime=function(e){return e===PG.SCENE3D?1:e===PG.MORPHING?void 0:0};var oe=Object.freeze(PG);function DMe(e){e=e??V.EMPTY_OBJECT,this.color=G.clone(e.color??G.WHITE),this.intensity=e.intensity??2}var aA=DMe;function Xx(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new qe,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=M.clone(M.IDENTITY),this._viewportTransformation=M.clone(M.IDENTITY),this._model=M.clone(M.IDENTITY),this._view=M.clone(M.IDENTITY),this._inverseView=M.clone(M.IDENTITY),this._projection=M.clone(M.IDENTITY),this._infiniteProjection=M.clone(M.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=X.clone(M.IDENTITY),this._view3DDirty=!0,this._view3D=new M,this._inverseView3DDirty=!0,this._inverseView3D=new M,this._inverseModelDirty=!0,this._inverseModel=new M,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new X,this._viewRotation=new X,this._inverseViewRotation=new X,this._viewRotation3D=new X,this._inverseViewRotation3D=new X,this._inverseProjectionDirty=!0,this._inverseProjection=new M,this._modelViewDirty=!0,this._modelView=new M,this._modelView3DDirty=!0,this._modelView3D=new M,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new M,this._inverseModelViewDirty=!0,this._inverseModelView=new M,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new M,this._viewProjectionDirty=!0,this._viewProjection=new M,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new M,this._modelViewProjectionDirty=!0,this._modelViewProjection=new M,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new M,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new M,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new M,this._normalDirty=!0,this._normal=new X,this._normal3DDirty=!0,this._normal3D=new X,this._inverseNormalDirty=!0,this._inverseNormal=new X,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new X,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new $n,this._cameraPosition=new d,this._sunPositionWC=new d,this._sunPositionColumbusView=new d,this._sunDirectionWC=new d,this._sunDirectionEC=new d,this._moonDirectionEC=new d,this._lightDirectionWC=new d,this._lightDirectionEC=new d,this._lightColor=new d,this._lightColorHdr=new d,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new d,this._cameraRight=new d,this._cameraUp=new d,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new U,this._eyeEllipsoidNormalEC=new d,this._eyeEllipsoidCurvature=new U,this._modelToEnu=new M,this._enuToModel=new M,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new G,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 d,this._atmosphereRayleighScaleHeight=new d,this._atmosphereMieCoefficient=new d,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(Xx.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!qe.equals(e,this._viewport)){qe.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 xoe(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return xoe(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){M.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,M.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,M.getMatrix3(this.inverseModel,e),X.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return C6(this),this._view3D}},viewRotation:{get:function(){return C6(this),this._viewRotation}},viewRotation3D:{get:function(){return C6(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return Soe(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return Soe(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return UMe(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return GMe(this),this._modelView}},modelView3D:{get:function(){return zMe(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return qMe(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return VMe(this),this._inverseModelView}},inverseModelView3D:{get:function(){return HMe(this),this._inverseModelView3D}},viewProjection:{get:function(){return WMe(this),this._viewProjection}},inverseViewProjection:{get:function(){return jMe(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return YMe(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return KMe(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return XMe(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return JMe(this),this._modelViewInfiniteProjection}},normal:{get:function(){return ZMe(this),this._normal}},normal3D:{get:function(){return $Me(this),this._normal3D}},inverseNormal:{get:function(){return e1e(this),this._inverseNormal}},inverseNormal3D:{get:function(){return t1e(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}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},eyeEllipsoidNormalEC:{get:function(){return this._eyeEllipsoidNormalEC}},eyeEllipsoidCurvature:{get:function(){return this._eyeEllipsoidCurvature}},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 Toe(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return Toe(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??ne.default}}});function vMe(e,t){M.clone(t,e._view),M.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 PMe(e,t){M.clone(t,e._inverseView),M.getMatrix3(t,e._inverseViewRotation)}function RMe(e,t){M.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function MMe(e,t){M.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var Ioe=new d,NMe=new M;function LMe(e,t){d.clone(t.positionWC,e._cameraPosition),d.clone(t.directionWC,e._cameraDirection),d.clone(t.rightWC,e._cameraRight),d.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=d.fromRadians(o.longitude,o.latitude,0,n,Ioe)):(e._eyeHeight=-n.maximumRadius,d.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=d.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,Ioe)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=X.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=Qt.eastNorthUpToFixedFrame(i,n,NMe);e._enuToModel=M.multiplyTransformation(e.inverseModel,r,e._enuToModel),e._modelToEnu=M.inverseTransformation(e._enuToModel,e._modelToEnu),D.equalsEpsilon(n._radii.x,n._radii.y,D.EPSILON15)&&(e._eyeEllipsoidCurvature=n.getLocalCurvature(i,e._eyeEllipsoidCurvature))}var y6=new X,OMe=new me;function FMe(e,t){Qt.computeIcrfToCentralBodyFixedMatrix(t.time,y6);let n=b_.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);X.multiplyByVector(y6,n,n),d.normalize(n,e._sunDirectionWC),n=X.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),d.normalize(n,n),n=b_.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),X.multiplyByVector(y6,n,n),X.multiplyByVector(e.viewRotation3D,n,n),d.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,OMe);i.project(r,e._sunPositionColumbusView)}Xx.prototype.updateCamera=function(e){vMe(this,e.viewMatrix),PMe(this,e.inverseViewMatrix),LMe(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==oe.SCENE2D&&e.frustum instanceof mn};Xx.prototype.updateFrustum=function(e){RMe(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&MMe(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};Xx.prototype.updatePass=function(e){this._pass=e};var QMe=[],kMe=new aA;Xx.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===oe.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),FMe(this,e);let n=e.light??kMe;n instanceof aA?(this._lightDirectionWC=d.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=d.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=d.normalize(d.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=X.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=d.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=d.multiplyByScalar(o,n.intensity,o);let r=d.maximumComponent(o);r>1?d.divideByScalar(o,r,this._lightColor):d.clone(o,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??QMe,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=d.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=d.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=d.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=Qt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let u=t.frustum.fov,f=this._viewport,h;l(u)?f.height>f.width?h=Math.tan(.5*u)*2/f.height:h=Math.tan(.5*u)*2/f.width:h=1/Math.max(f.width,f.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,G.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function xoe(e){if(e._viewportDirty){let t=e._viewport;M.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),M.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}function UMe(e){e._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode!==oe.SCENE2D&&e._mode!==oe.MORPHING&&!e._orthographicIn3D?M.inverse(e._projection,e._inverseProjection):M.clone(M.ZERO,e._inverseProjection))}function GMe(e){e._modelViewDirty&&(e._modelViewDirty=!1,M.multiplyTransformation(e._view,e._model,e._modelView))}function zMe(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,M.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function VMe(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,M.inverse(e.modelView,e._inverseModelView))}function HMe(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,M.inverse(e.modelView3D,e._inverseModelView3D))}function WMe(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,M.multiply(e._projection,e._view,e._viewProjection))}function jMe(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,M.inverse(e.viewProjection,e._inverseViewProjection))}function YMe(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,M.multiply(e._projection,e.modelView,e._modelViewProjection))}function qMe(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 KMe(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,M.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function XMe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,M.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function JMe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,M.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function ZMe(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;M.getMatrix3(e.inverseModelView,t),X.transpose(t,t)}}function $Me(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;M.getMatrix3(e.inverseModelView3D,t),X.transpose(t,t)}}function e1e(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;M.getMatrix3(e.modelView,t),X.transpose(t,t)}}function t1e(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;M.getMatrix3(e.modelView3D,t),X.transpose(t,t)}}var boe=new d;function Toe(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,M.multiplyByPoint(e.inverseModel,e._cameraPosition,boe),$n.fromCartesian(boe,e._encodedCameraPositionMC))}var n1e=new d,i1e=new d,o1e=new d,r1e=new d,s1e=new me,a1e=new d,c1e=new M;function l1e(e,t,n,i,o,r,s,a){let c=n1e;c.x=e.y,c.y=e.z,c.z=e.x;let u=i1e;u.x=n.y,u.y=n.z,u.z=n.x;let f=o1e;f.x=i.y,f.y=i.z,f.z=i.x;let h=r1e;h.x=t.y,h.y=t.z,h.z=t.x,r===oe.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,s1e);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,a1e),_=Qt.eastNorthUpToFixedFrame(m,g,c1e);return M.multiplyByPointAsVector(_,u,u),M.multiplyByPointAsVector(_,f,f),M.multiplyByPointAsVector(_,h,h),l(a)||(a=new M),a[0]=u.x,a[1]=f.x,a[2]=-h.x,a[3]=0,a[4]=u.y,a[5]=f.y,a[6]=-h.y,a[7]=0,a[8]=u.z,a[9]=f.z,a[10]=-h.z,a[11]=0,a[12]=-d.dot(u,m),a[13]=-d.dot(f,m),a[14]=d.dot(h,m),a[15]=1,a}function C6(e){e._view3DDirty&&(e._mode===oe.SCENE3D?M.clone(e._view,e._view3D):l1e(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),M.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function Soe(e){e._inverseView3DDirty&&(M.inverseTransformation(e.view3D,e._inverseView3D),M.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var dP=Xx;function Xf(e,t){let{getWebGLStub:n,requestWebgl1:i,webgl:o={},allowTextureFilterAnisotropic:r=!0}=t??{};o.alpha=o.alpha??!1,o.stencil=o.stencil??!0,o.powerPreference=o.powerPreference??"high-performance";let s=l(n)?n(e,o):u1e(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=qn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new cP(this),this._textureCache=new lP;let u=s;this._stencilBits=u.getParameter(u.STENCIL_BITS),qt._maximumCombinedTextureImageUnits=u.getParameter(u.MAX_COMBINED_TEXTURE_IMAGE_UNITS),qt._maximumCubeMapSize=u.getParameter(u.MAX_CUBE_MAP_TEXTURE_SIZE),qt._maximumFragmentUniformVectors=u.getParameter(u.MAX_FRAGMENT_UNIFORM_VECTORS),qt._maximumTextureImageUnits=u.getParameter(u.MAX_TEXTURE_IMAGE_UNITS),qt._maximumRenderbufferSize=u.getParameter(u.MAX_RENDERBUFFER_SIZE),qt._maximumTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),qt._maximumVaryingVectors=u.getParameter(u.MAX_VARYING_VECTORS),qt._maximumVertexAttributes=u.getParameter(u.MAX_VERTEX_ATTRIBS),qt._maximumVertexTextureImageUnits=u.getParameter(u.MAX_VERTEX_TEXTURE_IMAGE_UNITS),qt._maximumVertexUniformVectors=u.getParameter(u.MAX_VERTEX_UNIFORM_VECTORS),qt._maximumSamples=this._webgl2?u.getParameter(u.MAX_SAMPLES):0;let f=u.getParameter(u.ALIASED_LINE_WIDTH_RANGE);qt._minimumAliasedLineWidth=f[0],qt._maximumAliasedLineWidth=f[1];let h=u.getParameter(u.ALIASED_POINT_SIZE_RANGE);qt._minimumAliasedPointSize=h[0],qt._maximumAliasedPointSize=h[1];let p=u.getParameter(u.MAX_VIEWPORT_DIMS);qt._maximumViewportWidth=p[0],qt._maximumViewportHeight=p[1];let g=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_FLOAT);qt._highpFloatSupported=g.precision!==0;let m=u.getShaderPrecisionFormat(u.FRAGMENT_SHADER,u.HIGH_INT);qt._highpIntSupported=m.rangeMax!==0,this._antialias=u.getContextAttributes().antialias,this._standardDerivatives=!!Ur(u,["OES_standard_derivatives"]),this._blendMinmax=!!Ur(u,["EXT_blend_minmax"]),this._elementIndexUint=!!Ur(u,["OES_element_index_uint"]),this._depthTexture=!!Ur(u,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!Ur(u,["EXT_frag_depth"]),this._debugShaders=Ur(u,["WEBGL_debug_shaders"]),this._textureFloat=!!Ur(u,["OES_texture_float"]),this._textureHalfFloat=!!Ur(u,["OES_texture_half_float"]),this._textureFloatLinear=!!Ur(u,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!Ur(u,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!Ur(u,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!Ur(u,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!Ur(u,["EXT_float_blend"]),this._colorBufferHalfFloat=!!Ur(u,["EXT_color_buffer_half_float"]),this._s3tc=!!Ur(u,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!Ur(u,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!Ur(u,["WEBGL_compressed_texture_astc"]),this._etc=!!Ur(u,["WEBG_compressed_texture_etc"]),this._etc1=!!Ur(u,["WEBGL_compressed_texture_etc1"]),this._bc7=!!Ur(u,["EXT_texture_compression_bptc"]),Zl.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let _=r?Ur(u,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=_,qt._maximumTextureFilterAnisotropy=l(_)?u.getParameter(_.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let y,C,E,I,b,S,B,v,P,N;if(c){let T=this;y=function(){return T._gl.createVertexArray()},C=function(w){T._gl.bindVertexArray(w)},E=function(w){T._gl.deleteVertexArray(w)},I=function(w,R,O,k,F){u.drawElementsInstanced(w,R,O,k,F)},b=function(w,R,O,k){u.drawArraysInstanced(w,R,O,k)},S=function(w,R){u.vertexAttribDivisor(w,R)},B=function(w){u.drawBuffers(w)}}else v=Ur(u,["OES_vertex_array_object"]),l(v)&&(y=function(){return v.createVertexArrayOES()},C=function(T){v.bindVertexArrayOES(T)},E=function(T){v.deleteVertexArrayOES(T)}),P=Ur(u,["ANGLE_instanced_arrays"]),l(P)&&(I=function(T,w,R,O,k){P.drawElementsInstancedANGLE(T,w,R,O,k)},b=function(T,w,R,O){P.drawArraysInstancedANGLE(T,w,R,O)},S=function(T,w){P.vertexAttribDivisorANGLE(T,w)}),N=Ur(u,["WEBGL_draw_buffers"]),l(N)&&(B=function(T){N.drawBuffersWEBGL(T)});this.glCreateVertexArray=y,this.glBindVertexArray=C,this.glDeleteVertexArray=E,this.glDrawElementsInstanced=I,this.glDrawArraysInstanced=b,this.glVertexAttribDivisor=S,this.glDrawBuffers=B,this._vertexArrayObject=!!v,this._instancedArrays=!!P,this._drawBuffers=!!N,qt._maximumDrawBuffers=this.drawBuffers?u.getParameter(te.MAX_DRAW_BUFFERS):1,qt._maximumColorAttachments=this.drawBuffers?u.getParameter(te.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new G(0,0,0,0),this._clearDepth=1,this._clearStencil=0;let L=new dP,A=new vc(this),x=Ge.fromCache();this._defaultPassState=A,this._defaultRenderState=x,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=L,this._currentRenderState=x,this._currentPassState=A,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let T=0;T"u")throw new ce("The browser does not support WebGL. Visit http://get.webgl.org.");!n&&!(typeof WebGL2RenderingContext<"u")&&(n=!0);let o=n?"webgl":"webgl2",r=e.getContext(o,t);if(!l(r))throw new ce("The browser supports WebGL, but initialization failed.");return r}function f1e(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 d1e(e,t,n,i){let o=`${f1e(e,i)}: ${t.name}(`;for(let r=0;r=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=p1e(this._originalGLContext,e?h1e:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Nt({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return this._defaultEmissiveTexture===void 0&&(this._defaultEmissiveTexture=new Nt({context:this,pixelFormat:$e.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 Nt({context:this,pixelFormat:$e.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 kr({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 A1e}}});function woe(e,t,n,i){let o=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=n,Ge.partialApply(e._gl,o,t,r,n,i)}var E6;typeof WebGLRenderingContext<"u"&&(E6=[te.BACK]);function I6(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=E6;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var g1e=new pi;Xf.prototype.clear=function(e,t){e=e??g1e,t=t??this._defaultPassState;let n=this._gl,i=0,o=e.color,r=e.depth,s=e.stencil;l(o)&&(G.equals(this._clearColor,o)||(G.clone(o,this._clearColor),n.clearColor(o.red,o.green,o.blue,o.alpha)),i|=n.COLOR_BUFFER_BIT),l(r)&&(r!==this._clearDepth&&(this._clearDepth=r,n.clearDepth(r)),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;woe(this,a,t,!0);let c=e.framebuffer??t.framebuffer;I6(this,c),n.clear(i)};function _1e(e,t,n,i,o){I6(e,t),woe(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function y1e(e,t,n,i){let o=t._primitiveType,r=t._vertexArray,s=t._offset,a=t._count,c=t.instanceCount;e._us.model=t._modelMatrix??M.IDENTITY,n._setUniforms(i,e._us,e.validateShaderProgram),r._bind();let u=r.indexBuffer;l(u)?(s=s*u.bytesPerIndex,l(a)?a=Math.min(a,u.numberOfIndices):a=u.numberOfIndices,c===0?e._gl.drawElements(o,a,u.indexDatatype,s):e.glDrawElementsInstanced(o,a,u.indexDatatype,s,c)):(l(a)?a=Math.min(a,r.numberOfVertices):a=r.numberOfVertices,c===0?e._gl.drawArrays(o,s,a):e.glDrawArraysInstanced(o,s,a,c)),r._unBind()}Xf.prototype.draw=function(e,t,n,i){t=t??this._defaultPassState;let o=e._framebuffer??t.framebuffer,r=e._renderState??this._defaultRenderState;n=n??e._shaderProgram,i=i??e._uniformMap,_1e(this,o,t,n,r),y1e(this,e,n,i)};Xf.prototype.endFrame=function(){let e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);let t=E6;this.drawBuffers&&this.glDrawBuffers(t);let n=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(let i=0;i0&&(a=s.getColorTexture(0).pixelDatatype);let c=$e.createTypedArray($e.RGBA,a,o,r);return I6(this,s),t.readPixels(n,i,o,r,$e.RGBA,Ve.toWebGLConstant(a,this),c),c};var Boe={position:0,textureCoordinates:1};Xf.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new ht({attributes:{position:new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:Ne.TRIANGLES});e=ri.fromGeometry({context:this,geometry:t,attributeLocations:Boe,bufferUsage:Ue.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Xf.prototype.createViewportQuadCommand=function(e,t){return t=t??V.EMPTY_OBJECT,new nt({vertexArray:this.getViewportQuadVertexArray(),primitiveType:Ne.TRIANGLES,renderState:t.renderState,shaderProgram:cn.fromCache({context:this,vertexShaderSource:YC,fragmentShaderSource:e,attributeLocations:Boe}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})};Xf.prototype.getObjectByPickColor=function(e){return this._pickObjects[e.toRgba()]};function x6(e,t,n){this._pickObjects=e,this.key=t,this.color=n}Object.defineProperties(x6.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}});x6.prototype.destroy=function(){delete this._pickObjects[this.key]};Xf.prototype.createPickId=function(e){++this._nextPickColor[0];let t=this._nextPickColor[0];if(t===0)throw new ce("Out of unique Pick IDs.");return this._pickObjects[t]=e,new x6(this._pickObjects,t,G.fromRgba(t))};Xf.prototype.isDestroyed=function(){return!1};Xf.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(),ue(this)};var hP=Xf;function Jx(e){e=e??V.EMPTY_OBJECT;let{context:t,width:n,height:i,colorRenderbuffers:o,colorTextures:r,depthStencilRenderbuffer:s,depthStencilTexture:a,destroyAttachments:c}=e;if(this._width=n,this._height=i,l(o)!==l(r))throw new he("Both color renderbuffer and texture attachments must be provided.");if(l(s)!==l(a))throw new he("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new Xr({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:c}),this._colorFramebuffer=new Xr({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:c})}Jx.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};Jx.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};Jx.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)};Jx.prototype.isDestroyed=function(){return!1};Jx.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),ue(this)};var mP=Jx;var eu={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===eu.RGBA4||e===eu.RGBA8||e===eu.RGBA16F||e===eu.RGBA32F||e===eu.RGB5_A1||e===eu.RGB565||e===eu.DEPTH_COMPONENT16||e===eu.STENCIL_INDEX8||e===eu.DEPTH_STENCIL||e===eu.DEPTH24_STENCIL8},getColorFormat:function(e){return e===te.FLOAT?eu.RGBA32F:e===te.HALF_FLOAT_OES?eu.RGBA16F:eu.RGBA8}},ll=Object.freeze(eu);function pP(e){e=e??V.EMPTY_OBJECT;let n=e.context._gl,i=qt.maximumRenderbufferSize,o=e.format??ll.RGBA4,r=l(e.width)?e.width:n.drawingBufferWidth,s=l(e.height)?e.height:n.drawingBufferHeight,a=e.numSamples??1;this._gl=n,this._format=o,this._width=r,this._height=s,this._renderbuffer=this._gl.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,this._renderbuffer),a>1?n.renderbufferStorageMultisample(n.RENDERBUFFER,a,o,r,s):n.renderbufferStorage(n.RENDERBUFFER,o,r,s),n.bindRenderbuffer(n.RENDERBUFFER,null)}Object.defineProperties(pP.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});pP.prototype._getRenderbuffer=function(){return this._renderbuffer};pP.prototype.isDestroyed=function(){return!1};pP.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),ue(this)};var Uu=pP;function zs(e){e=e??V.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(zs.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}}});zs.prototype.isDirty=function(e,t,n,i,o){n=n??1;let r=this._width!==e||this._height!==t,s=this._numSamples!==n,a=l(i)&&this._pixelDatatype!==i||l(o)&&this._pixelFormat!==o,c=n===1?l(this._framebuffer):l(this._multisampleFramebuffer);return this._attachmentsDirty||r||s||a||!c||this._color&&!l(this._colorTextures[0])};zs.prototype.update=function(e,t,n,i,o,r){if(i=e.msaa?i??1:1,o=o??(this._color?this._pixelDatatype??Ve.UNSIGNED_BYTE:void 0),r=r??(this._color?this._pixelFormat??$e.RGBA:void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s1){let a=ll.getColorFormat(o);this._colorRenderbuffers[s]=new Uu({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Nt({context:e,width:t,height:n,pixelFormat:$e.DEPTH_STENCIL,pixelDatatype:Ve.UNSIGNED_INT_24_8,sampler:nn.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new Uu({context:e,width:t,height:n,format:ll.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new Uu({context:e,width:t,height:n,format:ll.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Nt({context:e,width:t,height:n,pixelFormat:$e.DEPTH_COMPONENT,pixelDatatype:Ve.UNSIGNED_INT,sampler:nn.NEAREST}):this._depthRenderbuffer=new Uu({context:e,width:t,height:n,format:ll.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new mP({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 Xr({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};zs.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};zs.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};zs.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};zs.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};zs.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};zs.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};zs.prototype.getDepthTexture=function(){return this._depthTexture};zs.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};zs.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};zs.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};zs.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};zs.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};zs.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};zs.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};zs.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};zs.prototype.destroy=function(){if(this._color){let e=this._colorTextures,t=this._colorRenderbuffers;for(let n=0;n1){let _=s,y=a,C=c;for(let E=0;Ea?(e.childNode1=new _P({x:i.x,y:i.y,width:t,height:r}),e.childNode2=new _P({x:i.x+t,y:i.y,width:s,height:r}),this._findNode(e.childNode1,{width:t,height:n})):(e.childNode1=new _P({x:i.x,y:i.y,width:o,height:n}),e.childNode2=new _P({x:i.x,y:i.y+n,width:o,height:a}),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 Zx=B6;var voe=16;function tu(e){e=e??V.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new U(voe,voe);this._pixelFormat=e.pixelFormat??$e.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=qn(),this._imagesToAddQueue=[],this._indexById=new Map,this._indexPromiseById=new Map,this._nextIndex=0}Object.defineProperties(tu.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}}});tu.prototype.computeTextureCoordinates=function(e,t){let n=this._texture,i=this._rectangles[e];if(l(t)||(t=new qe),!l(i))return t.x=0,t.y=0,t.width=0,t.height=0,t;let o=n.width,r=n.height,s=i.width,a=i.height,c=i.x,u=i.y,f=this._subRegions.get(e);if(l(f)){let h=this._rectangles[f];c+=h.x,u+=h.y}return t.x=c/o,t.y=u/r,t.width=s/o,t.height=a/r,t};tu.prototype._copyFromTexture=function(e,t,n,i){let o=this._pixelFormat,r=this._sampler,s=new Nt({context:e,height:n,width:t,pixelFormat:o,sampler:r}),a=e._gl,c=s._textureTarget,u=this._texture,f=new Xr({context:e,colorTextures:[u],destroyAttachments:!1});a.activeTexture(a.TEXTURE0),a.bindTexture(c,s._texture),f._bind();let h=this.rectangles,p=this._subRegions;for(let g=0;gnew Poe({index:I,image:E})).filter((E,I)=>l(E.image)&&!l(c.get(I))),f=0,h=0,p=0;for(let E=t;E=1;)m*=2,s>a?a*=m:s*=m;u.sort(({image:E},{image:I})=>I.height*I.width-E.height*E.width);let _=new Array(this._nextIndex);for(let E of this._subRegions.keys())l(c.get(E))&&(_[E]=i[E]);let y,C=!1;for(;!C;){y=new Zx({height:a,width:s,borderPadding:n});let E;for(E=0;Ea?a*=2:s*=2;break}_[I]=S.rectangle}C=E===u.length}this._texturePacker=y,this._texture=this._copyFromTexture(e,s,a,_),r.destroy(),this._rectangles=_,this._guid=qn()};tu.prototype.getImageIndex=function(e){return this._indexById.get(e)};tu.prototype._copyImageToTexture=function({index:e,image:t,resolve:n,reject:i}){let o=this._texture,r=this._rectangles[e];try{o.copyFrom({source:t,xOffset:r.x,yOffset:r.y}),l(n)&&n(e)}catch(s){if(l(i)){i(s);return}}};function Poe({index:e,image:t,resolve:n,reject:i}){this.index=e,this.image=t,this.resolve=n,this.reject=i,this.rectangle=void 0}tu.prototype._addImage=function(e,t){return new Promise((n,i)=>{this._imagesToAddQueue.push(new Poe({index:e,image:t,resolve:n,reject:i})),this._imagesToAddQueue.sort(({image:o},{image:r})=>r.height*r.width-o.height*o.width)})};tu.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=await T1e(t,e),this.isDestroyed()||!l(t)?-1:this._addImage(i,t)))(),this._indexPromiseById.set(e,n),n};tu.prototype.addImageSubRegion=function(e,t){let n=this._indexById.get(e);if(!l(n))throw new ce(`image with id "${e}" not found in the atlas.`);let i=this._indexPromiseById.get(e);for(let[r,s]of this._subRegions.entries())if(n===s&&this._rectangles[r].equals(t))return i.then(c=>c===-1?-1:r);let o=this._nextIndex++;return this._subRegions.set(o,n),this._rectangles[o]=t.clone(),i.then(r=>{if(r===-1)return-1;let s=this._rectangles[r];return o})};tu.prototype.isDestroyed=function(){return!1};tu.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),this._imagesToAddQueue.forEach(({resolve:e})=>{l(e)&&e(-1)}),ue(this)};var sE=tu;function ua(e,t,n,i){let o=ua._verifyAttributes(t);n=n??0;let r=[],s={},a,c,u=o.length;for(let h=0;h0?q.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};ua._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c0){t.needsCommit=!1;let n=t.vertexBuffer,i=e._size*t.vertexSizeInBytes,o=l(n);if(!o||n.sizeInBytes0){let i=e.vertexSizeInBytes*t,o=e.vertexSizeInBytes*n;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,i,o),i)}}ua.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t0&&(this._hash={},e.length=0)};var Pt=aE;function Gu(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(Gu.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}}});Gu.packedLength=2;Gu.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};Gu.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Gu),n.near=e[t++],n.far=e[t],n};Gu.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};Gu.clone=function(e,t){if(l(e))return l(t)||(t=new Gu),t.near=e.near,t.far=e.far,t};Gu.prototype.clone=function(e){return Gu.clone(this,e)};Gu.prototype.equals=function(e){return Gu.equals(this,e)};var Gt=Gu;function Jf(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}Jf.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 Jf(e.near,e.nearValue,e.far,e.farValue)};Jf.packedLength=4;Jf.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};Jf.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Jf),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};Jf.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};Jf.prototype.clone=function(e){return Jf.clone(this,e)};Jf.prototype.equals=function(e){return Jf.equals(this,e)};var Kt=Jf;var cE={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},Ze=Object.freeze(cE);function Zf(e){return e===cE.CLAMP_TO_GROUND||e===cE.CLAMP_TO_3D_TILE||e===cE.CLAMP_TO_TERRAIN}function $x(e){return e===cE.RELATIVE_TO_GROUND||e===cE.RELATIVE_TO_3D_TILE||e===cE.RELATIVE_TO_TERRAIN}var M1e={CENTER:0,LEFT:1,RIGHT:-1},vi=Object.freeze(M1e);var N1e={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},Hn=Object.freeze(N1e);var L1e=Object.freeze({DONE:0,PENDING:1,FAILED:2}),mt=L1e;function hh(){he.throwInstantiationError()}Object.defineProperties(hh.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError}});hh.prototype.getValue=he.throwInstantiationError;hh.prototype.equals=he.throwInstantiationError;hh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};hh.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-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new Roe(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Roe(r)):(v6(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],v6(s.get(r.id),r,a),s.remove(r.id)};function v6(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var EP=S_;var iNe=new d;function zm(e){e=e??V.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=d.clone(t),this._max=d.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}zm.fromDimensions=function(e){e=e??V.EMPTY_OBJECT;let t=e.dimensions,n=d.multiplyByScalar(t,.5,new d);return new zm({minimum:d.negate(n,new d),maximum:n,offsetAttribute:e.offsetAttribute})};zm.fromAxisAlignedBoundingBox=function(e){return new zm({minimum:e.minimum,maximum:e.maximum})};zm.packedLength=2*d.packedLength+1;zm.pack=function(e,t,n){return n=n??0,d.pack(e._min,t,n),d.pack(e._max,t,n+d.packedLength),t[n+d.packedLength*2]=e._offsetAttribute??-1,t};var Noe=new d,Loe=new d,Moe={minimum:Noe,maximum:Loe,offsetAttribute:void 0};zm.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t,Noe),o=d.unpack(e,t+d.packedLength,Loe),r=e[t+d.packedLength*2];return l(n)?(n._min=d.clone(i,n._min),n._max=d.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(Moe.offsetAttribute=r===-1?void 0:r,new zm(Moe))};zm.createGeometry=function(e){let t=e._min,n=e._max;if(d.equals(t,n))return;let i=new Cn,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=d.subtract(n,t,iNe),a=d.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===dn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new ht({attributes:i,indices:o,primitiveType:Ne.LINES,boundingSphere:new le(d.ZERO,a),offsetAttribute:e._offsetAttribute})};var mh=zm;function eb(e,t,n,i){e=e??1,t=t??1,n=n??1,i=i??1,this.value=new Uint8Array([G.floatToByte(e),G.floatToByte(t),G.floatToByte(n),G.floatToByte(i)])}Object.defineProperties(eb.prototype,{componentDatatype:{get:function(){return q.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});eb.fromColor=function(e){return new eb(e.red,e.green,e.blue,e.alpha)};eb.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};eb.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 en=eb;function IP(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(IP.prototype,{componentDatatype:{get:function(){return q.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});IP.fromDistanceDisplayCondition=function(e){return new IP(e.near,e.far)};IP.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Kn=IP;function oNe(e){e=e??V.EMPTY_OBJECT,this.geometry=e.geometry,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=e.attributes??{},this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var Rt=oNe;function ur(e){e=e??V.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(ur.prototype,{isEmpty:{get:function(){let e=K.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var tb={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};ur.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new he("options.iso8601 is an invalid ISO 8601 interval.");let i=K.fromIso8601(n[0]),o=K.fromIso8601(n[1]),r=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.data;return l(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(tb.start=i,tb.stop=o,tb.isStartIncluded=r,tb.isStopIncluded=s,tb.data=a,new ur(tb))};ur.toIso8601=function(e,t){return`${K.toIso8601(e.start,t)}/${K.toIso8601(e.stop,t)}`};ur.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 ur(e)};ur.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)))};ur.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)))};ur.intersect=function(e,t,n,i){if(!l(t))return ur.clone(ur.EMPTY,n);let o=e.start,r=e.stop,s=t.start,a=t.stop,c=K.greaterThanOrEquals(s,o)&&K.greaterThanOrEquals(r,s),u=!c&&K.lessThanOrEquals(s,o)&&K.lessThanOrEquals(o,a);if(!c&&!u)return ur.clone(ur.EMPTY,n);let f=e.isStartIncluded,h=e.isStopIncluded,p=t.isStartIncluded,g=t.isStopIncluded,m=K.lessThan(r,a);return l(n)||(n=new ur),n.start=c?s:o,n.isStartIncluded=f&&p||!K.equals(s,o)&&(c&&p||u&&f),n.stop=m?r:a,n.isStopIncluded=m?h:h&&g||!K.equals(a,r)&&g,n.data=l(i)?i(e.data,t.data):e.data,n};ur.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};ur.prototype.clone=function(e){return ur.clone(this,e)};ur.prototype.equals=function(e,t){return ur.equals(this,e,t)};ur.prototype.equalsEpsilon=function(e,t,n){return ur.equalsEpsilon(this,e,t,n)};ur.prototype.toString=function(){return ur.toIso8601(this)};ur.EMPTY=Object.freeze(new ur({start:new K,stop:new K,isStartIncluded:!1,isStopIncluded:!1}));var Rn=ur;var Ooe=Object.freeze(K.fromIso8601("0000-01-01T00:00:00Z")),Foe=Object.freeze(K.fromIso8601("9999-12-31T24:00:00Z")),rNe=Object.freeze(new Rn({start:Ooe,stop:Foe})),sNe={MINIMUM_VALUE:Ooe,MAXIMUM_VALUE:Foe,MAXIMUM_INTERVAL:rNe},Ye=sNe;function xP(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(xP.prototype,{componentDatatype:{get:function(){return q.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});xP.fromCartesian3=function(e){return new xP(e.x,e.y,e.z)};xP.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 uo=xP;function RG(e){e=e??!0,this.value=RG.toValue(e)}Object.defineProperties(RG.prototype,{componentDatatype:{get:function(){return q.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});RG.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var wn=RG;var bP=`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 TP=`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; // position in eye coordinates v_normalEC = czm_normal * normal; // normal in eye coordinates v_tangentEC = czm_normal * tangent; // tangent in eye coordinates v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates v_st = st; gl_Position = czm_modelViewProjectionRelativeToEye * p; } `;var SP=`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 wP=`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; // position in eye coordinates v_normalEC = czm_normal * normal; // normal in eye coordinates gl_Position = czm_modelViewProjectionRelativeToEye * p; } `;var BP=`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 DP=`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; // position in eye coordinates v_normalEC = czm_normal * normal; // normal in eye coordinates v_st = st; gl_Position = czm_modelViewProjectionRelativeToEye * p; } `;var aNe={ADD:te.FUNC_ADD,SUBTRACT:te.FUNC_SUBTRACT,REVERSE_SUBTRACT:te.FUNC_REVERSE_SUBTRACT,MIN:te.MIN,MAX:te.MAX},cc=Object.freeze(aNe);var cNe={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},Oo=Object.freeze(cNe);var lNe={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.SOURCE_ALPHA,functionSourceAlpha:Oo.ONE,functionDestinationRgb:Oo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Oo.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.ONE,functionSourceAlpha:Oo.ONE,functionDestinationRgb:Oo.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Oo.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.SOURCE_ALPHA,functionSourceAlpha:Oo.ONE,functionDestinationRgb:Oo.ONE,functionDestinationAlpha:Oo.ONE})},An=Object.freeze(lNe);var uNe={FRONT:te.FRONT,BACK:te.BACK,FRONT_AND_BACK:te.FRONT_AND_BACK},Pi=Object.freeze(uNe);function nb(e){e=e??V.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(nb.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}}});nb.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(` `)};nb.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};nb.prototype.getRenderState=function(){let e=this.isTranslucent(),t=je(this.renderState,!1);return e?(t.depthMask=!1,t.blending=An.ALPHA_BLEND):t.depthMask=!0,t};nb.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=An.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:Pi.BACK}),l(n)&&(i=St(n,i,!0)),i};var po=nb;var vP=`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 PP=`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 RP=`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; // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0 // Find the distance from the closest separator (region between two colors) 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 MP=`uniform vec4 lightColor; uniform vec4 darkColor; uniform vec2 repeat; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0 vec4 color = mix(lightColor, darkColor, b); color = czm_gammaCorrect(color); material.diffuse = color.rgb; material.alpha = color.a; return material; } `;var NP=`uniform sampler2D heights; uniform sampler2D colors; // This material expects heights to be sorted from lowest to highest. 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); // early-out when outside the height range if (height < minHeight || height > maxHeight) { material.diffuse = vec3(0.0); material.alpha = 0.0; return material; } // Binary search to find heights above and below. int idxBelow = 0; int idxAbove = heightsDimensions.x; float heightBelow = minHeight; float heightAbove = maxHeight; // while loop not allowed, so use for loop with max iterations. // maxIterations of 16 supports a texture size up to 65536 (2^16). 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); // undo preumultiplied alpha 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 LP=`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 // If no derivatives available (IE 10?), use pixel ratio 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 OP=`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 FP=`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 QP=`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; // Fuzz Factor - Controls blurriness of lines #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives)) const float fuzz = 1.2; vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0; // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13. 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 // If no derivatives available (IE 10?), revert to view-dependent fuzz 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 // Edges taken from RimLightingMaterial.glsl // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html 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 kP=`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 UP=`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 // If no derivatives available (IE 10?), 2.5% of the line will be the arrow head 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); // Find the distance from the closest separator (region between two colors) 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 GP=`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; // Get the relative position within the dash from 0 to 1 float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio)); // Figure out the mask index. float maskIndex = floor(dashPosition * maskLength); // Test the bit mask. float maskTest = floor(dashPattern / pow(2.0, maskIndex)); vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color; if (fragColor.a < 0.005) { // matches 0/255 and 1/255 discard; } fragColor = czm_gammaCorrect(fragColor); material.emission = fragColor.rgb; material.alpha = fragColor.a; return material; } `;var zP=`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(0.0, 1.0, glow) * color.a; fragColor = czm_gammaCorrect(fragColor); material.emission = fragColor.rgb; material.alpha = fragColor.a; return material; } `;var VP=`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); // Find the distance from the closest separator (region between two colors) 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 HP=`uniform vec4 color; uniform vec4 rimColor; uniform float width; czm_material czm_getMaterial(czm_materialInput materialInput) { czm_material material = czm_getDefaultMaterial(materialInput); // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html 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 WP=`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 jP=`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); // Based on the Stripes Fragment Shader in the Orange Book (11.1.2) 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 YP=`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 qP=`// Thanks for the contribution Jonas // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog 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; // fade is a function of the distance from the fragment and the frequency of the waves float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor); float specularMapValue = texture(specularMap, materialInput.st).r; // note: not using directional motion at this time, just set the angle to 0.0; vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0); vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude)); // fade out the normal perturbation as we move further from the water surface normalTangentSpace.xy /= fade; // attempt to fade out the normal perturbation as we approach non water areas (low specular map value) normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue); normalTangentSpace = normalize(normalTangentSpace); // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0); // fade out water effect as specular map value decreases material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue; // base color is a blend of the water and non-water color based on the value from the specular map // may need a uniform blend factor to better control this material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue); // diffuse highlights are based on how perturbed the normal is 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 Ke(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??$t.LINEAR,this._magnificationFilter=e.magnificationFilter??di.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,fNe(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),l(Ke._uniformList[this.type])||(Ke._uniformList[this.type]=Object.keys(this._uniforms))}Ke._uniformList={};Ke.fromType=function(e,t){let n=new Ke({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};Ke.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-1)return!0;return!1}function gNe(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 o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&ANe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s}; `}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha}; `:e.shaderSource+=`material.${o} = ${t[o]}; `}e.shaderSource+=`return material; } `}}var koe={mat2:ki,mat3:X,mat4:M},_Ne=/\.ktx2$/i;function yNe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===Ke.DefaultImageId;t=r;let c=n._textures[e],u,f;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let p=new nn({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Nt({context:i,source:r,sampler:p}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Nt&&r!==c){n._texturePaths[e]=void 0;let p=n._textures[e];l(p)&&p!==n._defaultTexture&&p.destroy(),n._textures[e]=r,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=r._width,f.y=r._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0),l(c)||(n._texturePaths[e]=void 0,c=n._textures[e]=n._defaultTexture,u=`${e}Dimensions`,o.hasOwnProperty(u)&&(f=o[u],f.x=c._width,f.y=c._height)),a)return;let h=r instanceof we;if(!l(n._texturePaths[e])||h&&r.url!==n._texturePaths[e].url||!h&&r!==n._texturePaths[e]){if(typeof r=="string"||h){let p=h?r:we.createIfNeeded(r),g;_Ne.test(p.url)?g=Zl(p.url):g=p.fetchImage(),Promise.resolve(g).then(function(m){n._loadedImages.push({id:e,image:m})}).catch(function(){l(c)&&c!==n._defaultTexture&&c.destroy(),n._textures[e]=n._defaultTexture})}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof ImageBitmap||r instanceof OffscreenCanvas)&&n._loadedImages.push({id:e,image:r});n._texturePaths[e]=r}}}function CNe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof kr){let r=t._textures[e];r!==t._defaultTexture&&r.destroy(),t._texturePaths[e]=void 0,t._textures[e]=i;return}if(l(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=n.defaultCubeMap),i===Ke.DefaultCubeMapId)return;let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o!==t._texturePaths[e]){let r=[we.createIfNeeded(i.positiveX).fetchImage(),we.createIfNeeded(i.negativeX).fetchImage(),we.createIfNeeded(i.positiveY).fetchImage(),we.createIfNeeded(i.negativeY).fetchImage(),we.createIfNeeded(i.positiveZ).fetchImage(),we.createIfNeeded(i.negativeZ).fetchImage()];Promise.all(r).then(function(s){t._loadedCubeMaps.push({id:e,images:s})}),t._texturePaths[e]=o}}}function ENe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&Uoe(e,n)}function Uoe(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=INe(o),s;if(r==="channels")s=KP(e,t,o,!1);else{if(r==="sampler2D"){let u=`${t}Dimensions`;bNe(e,u)>0&&(i[u]={type:"ivec3",x:1,y:1},Uoe(e,u))}if(!new RegExp(`uniform\\s+${r}\\s+${t}\\s*;`).test(e.shaderSource)){let u=`uniform ${r} ${t};`;e.shaderSource=u+e.shaderSource}let c=`${t}_${e._count++}`;if(s=KP(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(yNe(t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(CNe(t));else if(r.indexOf("mat")!==-1){let u=new koe[r];e._uniforms[c]=function(){return koe[r].fromColumnMajorArray(e.uniforms[t],u)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function INe(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 we||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageBitmap||e instanceof OffscreenCanvas)/^([rgba]){1,4}$/i.test(e)?t="channels":e===Ke.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 o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function xNe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new Ke({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=St(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;KP(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=KP(e,i,a)}}function KP(e,t,n,i){i=i??!0;let o=0,r="([\\w])?",s=`([\\w${i?".":""}])?`,a=new RegExp(s+t+r,"g");return e.shaderSource=e.shaderSource.replace(a,function(c,u,f){return u||f?c:(o+=1,n)}),o}function bNe(e,t,n){return KP(e,t,t,n)}Ke._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};Ke.DefaultImageId="czm_defaultImage";Ke.DefaultCubeMapId="czm_defaultCubeMap";Ke.ColorType="Color";Ke._materialCache.addMaterial(Ke.ColorType,{fabric:{type:Ke.ColorType,uniforms:{color:new G(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});Ke.ImageType="Image";Ke._materialCache.addMaterial(Ke.ImageType,{fabric:{type:Ke.ImageType,uniforms:{image:Ke.DefaultImageId,repeat:new U(1,1),color:new G(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}});Ke.DiffuseMapType="DiffuseMap";Ke._materialCache.addMaterial(Ke.DiffuseMapType,{fabric:{type:Ke.DiffuseMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",repeat:new U(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ke.AlphaMapType="AlphaMap";Ke._materialCache.addMaterial(Ke.AlphaMapType,{fabric:{type:Ke.AlphaMapType,uniforms:{image:Ke.DefaultImageId,channel:"a",repeat:new U(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});Ke.SpecularMapType="SpecularMap";Ke._materialCache.addMaterial(Ke.SpecularMapType,{fabric:{type:Ke.SpecularMapType,uniforms:{image:Ke.DefaultImageId,channel:"r",repeat:new U(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});Ke.EmissionMapType="EmissionMap";Ke._materialCache.addMaterial(Ke.EmissionMapType,{fabric:{type:Ke.EmissionMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",repeat:new U(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});Ke.BumpMapType="BumpMap";Ke._materialCache.addMaterial(Ke.BumpMapType,{fabric:{type:Ke.BumpMapType,uniforms:{image:Ke.DefaultImageId,channel:"r",strength:.8,repeat:new U(1,1)},source:PP},translucent:!1});Ke.NormalMapType="NormalMap";Ke._materialCache.addMaterial(Ke.NormalMapType,{fabric:{type:Ke.NormalMapType,uniforms:{image:Ke.DefaultImageId,channels:"rgb",strength:.8,repeat:new U(1,1)},source:kP},translucent:!1});Ke.GridType="Grid";Ke._materialCache.addMaterial(Ke.GridType,{fabric:{type:Ke.GridType,uniforms:{color:new G(0,1,0,1),cellAlpha:.1,lineCount:new U(8,8),lineThickness:new U(1,1),lineOffset:new U(0,0)},source:QP},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});Ke.StripeType="Stripe";Ke._materialCache.addMaterial(Ke.StripeType,{fabric:{type:Ke.StripeType,uniforms:{horizontal:!0,evenColor:new G(1,1,1,.5),oddColor:new G(0,0,1,.5),offset:0,repeat:5},source:jP},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});Ke.CheckerboardType="Checkerboard";Ke._materialCache.addMaterial(Ke.CheckerboardType,{fabric:{type:Ke.CheckerboardType,uniforms:{lightColor:new G(1,1,1,.5),darkColor:new G(0,0,0,.5),repeat:new U(5,5)},source:RP},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ke.DotType="Dot";Ke._materialCache.addMaterial(Ke.DotType,{fabric:{type:Ke.DotType,uniforms:{lightColor:new G(1,1,0,.75),darkColor:new G(0,1,1,.75),repeat:new U(5,5)},source:MP},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});Ke.WaterType="Water";Ke._materialCache.addMaterial(Ke.WaterType,{fabric:{type:Ke.WaterType,uniforms:{baseWaterColor:new G(.2,.3,.6,1),blendColor:new G(0,1,.699,1),specularMap:Ke.DefaultImageId,normalMap:Ke.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:qP},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});Ke.RimLightingType="RimLighting";Ke._materialCache.addMaterial(Ke.RimLightingType,{fabric:{type:Ke.RimLightingType,uniforms:{color:new G(1,0,0,.7),rimColor:new G(1,1,1,.4),width:.3},source:HP},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});Ke.FadeType="Fade";Ke._materialCache.addMaterial(Ke.FadeType,{fabric:{type:Ke.FadeType,uniforms:{fadeInColor:new G(1,0,0,1),fadeOutColor:new G(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new U(.5,.5)},source:FP},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});Ke.PolylineArrowType="PolylineArrow";Ke._materialCache.addMaterial(Ke.PolylineArrowType,{fabric:{type:Ke.PolylineArrowType,uniforms:{color:new G(1,1,1,1)},source:UP},translucent:!0});Ke.PolylineDashType="PolylineDash";Ke._materialCache.addMaterial(Ke.PolylineDashType,{fabric:{type:Ke.PolylineDashType,uniforms:{color:new G(1,0,1,1),gapColor:new G(0,0,0,0),dashLength:16,dashPattern:255},source:GP},translucent:!0});Ke.PolylineGlowType="PolylineGlow";Ke._materialCache.addMaterial(Ke.PolylineGlowType,{fabric:{type:Ke.PolylineGlowType,uniforms:{color:new G(0,.5,1,1),glowPower:.25,taperPower:1},source:zP},translucent:!0});Ke.PolylineOutlineType="PolylineOutline";Ke._materialCache.addMaterial(Ke.PolylineOutlineType,{fabric:{type:Ke.PolylineOutlineType,uniforms:{color:new G(1,1,1,1),outlineColor:new G(1,0,0,1),outlineWidth:1},source:VP},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});Ke.ElevationContourType="ElevationContour";Ke._materialCache.addMaterial(Ke.ElevationContourType,{fabric:{type:Ke.ElevationContourType,uniforms:{spacing:100,color:new G(1,0,0,1),width:1},source:LP},translucent:!1});Ke.ElevationRampType="ElevationRamp";Ke._materialCache.addMaterial(Ke.ElevationRampType,{fabric:{type:Ke.ElevationRampType,uniforms:{image:Ke.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:OP},translucent:!1});Ke.SlopeRampMaterialType="SlopeRamp";Ke._materialCache.addMaterial(Ke.SlopeRampMaterialType,{fabric:{type:Ke.SlopeRampMaterialType,uniforms:{image:Ke.DefaultImageId},source:WP},translucent:!1});Ke.AspectRampMaterialType="AspectRamp";Ke._materialCache.addMaterial(Ke.AspectRampMaterialType,{fabric:{type:Ke.AspectRampMaterialType,uniforms:{image:Ke.DefaultImageId},source:vP},translucent:!1});Ke.ElevationBandType="ElevationBand";Ke._materialCache.addMaterial(Ke.ElevationBandType,{fabric:{type:Ke.ElevationBandType,uniforms:{heights:Ke.DefaultImageId,colors:Ke.DefaultImageId},source:NP},translucent:!0});Ke.WaterMaskType="WaterMask";Ke._materialCache.addMaterial(Ke.WaterMaskType,{fabric:{type:Ke.WaterMaskType,source:YP,uniforms:{waterColor:new G(1,1,1,1),landColor:new G(0,0,0,0)}},translucent:!1});var io=Ke;function lE(e){e=e??V.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.materialSupport??lE.MaterialSupport.TEXTURED;this.material=l(e.material)?e.material:io.fromType(io.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??i.vertexShaderSource,this._fragmentShaderSource=e.fragmentShaderSource??i.fragmentShaderSource,this._renderState=po.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(lE.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}}});lE.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;lE.prototype.isTranslucent=po.prototype.isTranslucent;lE.prototype.getRenderState=po.prototype.getRenderState;lE.MaterialSupport={BASIC:Object.freeze({vertexFormat:Re.POSITION_AND_NORMAL,vertexShaderSource:wP,fragmentShaderSource:SP}),TEXTURED:Object.freeze({vertexFormat:Re.POSITION_NORMAL_AND_ST,vertexShaderSource:DP,fragmentShaderSource:BP}),ALL:Object.freeze({vertexFormat:Re.ALL,vertexShaderSource:TP,fragmentShaderSource:bP})};var yo=lE;var XP=`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 JP=`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; // position in eye coordinates v_normalEC = czm_normal * normal; // normal in eye coordinates v_color = color; gl_Position = czm_modelViewProjectionRelativeToEye * p; } `;var uE=`in vec4 v_color; void main() { out_FragColor = czm_gammaCorrect(v_color); } `;var ZP=`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 uA(e){e=e??V.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,o=i?ZP:JP,r=i?uE:XP,s=i?uA.FLAT_VERTEX_FORMAT:uA.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o,this._fragmentShaderSource=e.fragmentShaderSource??r,this._renderState=po.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(uA.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}}});uA.VERTEX_FORMAT=Re.POSITION_AND_NORMAL;uA.FLAT_VERTEX_FORMAT=Re.POSITION_ONLY;uA.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;uA.prototype.isTranslucent=po.prototype.isTranslucent;uA.prototype.getRenderState=po.prototype.getRenderState;var gn=uA;function ib(e){this._definitionChanged=new ge,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(ib.prototype,{isConstant:{get:function(){return W.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color")});ib.prototype.getType=function(e){return"Color"};var TNe=new K;ib.prototype.getValue=function(e,t){return l(e)||(e=K.now(TNe)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,G.WHITE,t.color),t};ib.prototype.equals=function(e){return this===e||e instanceof ib&&W.equals(this._color,e._color)};var Jt=ib;function w_(e){e=e??V.EMPTY_OBJECT,this._ellipsoid=e.ellipsoid??ne.default,this._rectangle=e.rectangle??ae.MAX_VALUE,this._projection=new Qi(this._ellipsoid),this._numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX??2,this._numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY??1}Object.defineProperties(w_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});w_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=o&&(u=o-1);let f=(i.north-e.latitude)/a|0;return f>=r&&(f=r-1),l(n)?(n.x=u,n.y=f,n):new U(u,f)};var oo=w_;var Goe=new d,zoe=new d,Voe=new me,R6=new d,SNe=new d,Hoe=new le,wNe=new oo,$P=[new me,new me,new me,new me],eR=new U,hs={};hs.initialize=function(){let e=hs._initPromise;return l(e)||(e=we.fetchJson(fn("Assets/approximateTerrainHeights.json")).then(function(t){hs._terrainHeights=t}),hs._initPromise=e),e};hs.getMinimumMaximumHeights=function(e,t){t=t??ne.default;let n=Woe(e),i=hs._defaultMinTerrainHeight,o=hs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=hs._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(ae.northeast(e,Voe),Goe),t.cartographicToCartesian(ae.southwest(e,Voe),zoe),d.midpoint(zoe,Goe,R6);let a=t.scaleToGeodeticSurface(R6,SNe);if(l(a)){let c=d.distance(R6,a);i=Math.min(i,-c)}else i=hs._defaultMinTerrainHeight}return i=Math.max(hs._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};hs.getBoundingSphere=function(e,t){t=t??ne.default;let n=Woe(e),i=hs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=hs._terrainHeights[r];l(s)&&(i=s[1])}let o=le.fromRectangle3D(e,t,0);return le.fromRectangle3D(e,t,i,Hoe),le.union(o,Hoe,o)};function Woe(e){me.fromRadians(e.east,e.north,0,$P[0]),me.fromRadians(e.west,e.north,0,$P[1]),me.fromRadians(e.east,e.south,0,$P[2]),me.fromRadians(e.west,e.south,0,$P[3]);let t=0,n=0,i=0,o=0,r=hs._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let u=$P[c];if(wNe.positionToTileXY(u,s,eR),c===0)i=eR.x,o=eR.y;else if(i!==eR.x||o!==eR.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}hs._terrainHeightsMaxLevel=6;hs._defaultMaxTerrainHeight=9e3;hs._defaultMinTerrainHeight=-1e5;hs._terrainHeights=void 0;hs._initPromise=void 0;Object.defineProperties(hs,{initialized:{get:function(){return l(hs._terrainHeights)}}});var Ii=hs;function fl(e,t,n){this.minimum=d.clone(e??d.ZERO),this.maximum=d.clone(t??d.ZERO),l(n)?n=d.clone(n):n=d.midpoint(this.minimum,this.maximum,new d),this.center=n}fl.fromCorners=function(e,t,n){return l(n)||(n=new fl),n.minimum=d.clone(e,n.minimum),n.maximum=d.clone(t,n.maximum),n.center=d.midpoint(e,t,n.center),n};fl.fromPoints=function(e,t){if(l(t)||(t=new fl),!l(e)||e.length===0)return t.minimum=d.clone(d.ZERO,t.minimum),t.maximum=d.clone(d.ZERO,t.maximum),t.center=d.clone(d.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let h=1;h0?tn.INSIDE:r+o<0?tn.OUTSIDE:tn.INTERSECTING};fl.prototype.clone=function(e){return fl.clone(this,e)};fl.prototype.intersectPlane=function(e){return fl.intersectPlane(this,e)};fl.prototype.equals=function(e){return fl.equals(this,e)};var B_=fl;var M6=new se;function Vm(e,t){t=t??ne.default,e=t.scaleToGeodeticSurface(e);let n=Qt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=d.fromCartesian4(M.getColumn(n,0,M6)),this._yAxis=d.fromCartesian4(M.getColumn(n,1,M6));let i=d.fromCartesian4(M.getColumn(n,2,M6));this._plane=hn.fromPointNormal(e,i)}Object.defineProperties(Vm.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 BNe=new B_;Vm.fromPoints=function(e,t){let n=B_.fromPoints(e,BNe);return new Vm(n.center,t)};var joe=new xn,NG=new d;Vm.prototype.projectPointOntoPlane=function(e,t){let n=joe;n.origin=e,d.normalize(e,n.direction);let i=fi.rayPlane(n,this._plane,NG);if(l(i)||(d.negate(n.direction,n.direction),i=fi.rayPlane(n,this._plane,NG)),l(i)){let o=d.subtract(i,this._origin,i),r=d.dot(this._xAxis,o),s=d.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new U(r,s)}};Vm.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o0?0:v.latitude,x=me.fromRadians(L,e.north,n,UNe),T=me.fromRadians(e.west,e.north,n,GNe),w=me.fromRadians(e.west,A,n,zNe),R=me.fromRadians(e.west,e.south,n,VNe),O=me.fromRadians(L,e.south,n,HNe),k=i.cartographicToCartesian(x,WNe),F=i.cartographicToCartesian(T,Koe),z=i.cartographicToCartesian(w,jNe),Q=i.cartographicToCartesian(R,Xoe),H=i.cartographicToCartesian(O,YNe),j=N.projectPointToNearestOnPlane(k,qNe),Z=N.projectPointToNearestOnPlane(F,KNe),Y=N.projectPointToNearestOnPlane(z,XNe),$=N.projectPointToNearestOnPlane(Q,JNe),J=N.projectPointToNearestOnPlane(H,ZNe);return r=Math.min(Z.x,Y.x,$.x),s=-r,c=Math.max(Z.y,j.y),a=Math.min($.y,J.y),T.height=R.height=t,F=i.cartographicToCartesian(T,Koe),Q=i.cartographicToCartesian(R,Xoe),u=Math.min(hn.getPointDistance(h,F),hn.getPointDistance(h,Q)),f=n,Yoe(N.origin,N.xAxis,N.yAxis,N.zAxis,r,s,a,c,u,f,o)}let p=e.south>0,g=e.north<0,m=p?e.south:g?e.north:0,_=ae.center(e,qoe).longitude,y=d.fromRadians(_,m,n,i,$Ne);y.z=0;let E=Math.abs(y.x)=c?tn.INSIDE:tn.INTERSECTING};var $oe=new d,ere=new d,tre=new d,cLe=new d,Joe=new d,lLe=new d;Ki.distanceSquaredTo=function(e,t){let n=d.subtract(t,e.center,Zoe),i=e.halfAxes,o=X.getColumn(i,0,$oe),r=X.getColumn(i,1,ere),s=X.getColumn(i,2,tre),a=d.magnitude(o),c=d.magnitude(r),u=d.magnitude(s),f=!0,h=!0,p=!0;a>0?d.divideByScalar(o,a,o):f=!1,c>0?d.divideByScalar(r,c,r):h=!1,u>0?d.divideByScalar(s,u,s):p=!1;let g=!f+!h+!p,m,_,y;if(g===1){let b=o;m=r,_=s,h?p||(b=s,_=o):(b=r,m=o),y=d.cross(m,_,Joe),b===o?o=y:b===r?r=y:b===s&&(s=y)}else if(g===2){m=o,h?m=r:p&&(m=s);let b=d.UNIT_Y;b.equalsEpsilon(m,D.EPSILON3)&&(b=d.UNIT_X),_=d.cross(m,b,cLe),d.normalize(_,_),y=d.cross(m,_,Joe),d.normalize(y,y),m===o?(r=_,s=y):m===r?(s=_,o=y):m===s&&(o=_,r=y)}else g===3&&(o=d.UNIT_X,r=d.UNIT_Y,s=d.UNIT_Z);let C=lLe;C.x=d.dot(n,o),C.y=d.dot(n,r),C.z=d.dot(n,s);let E=0,I;return C.x<-a?(I=C.x+a,E+=I*I):C.x>a&&(I=C.x-a,E+=I*I),C.y<-c?(I=C.y+c,E+=I*I):C.y>c&&(I=C.y-c,E+=I*I),C.z<-u?(I=C.z+u,E+=I*I):C.z>u&&(I=C.z-u,E+=I*I),E};var uLe=new d,fLe=new d;Ki.computePlaneDistances=function(e,t,n,i){l(i)||(i=new rc);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=X.getColumn(a,0,$oe),u=X.getColumn(a,1,ere),f=X.getColumn(a,2,tre),h=d.add(c,u,uLe);d.add(h,f,h),d.add(h,s,h);let p=d.subtract(h,t,fLe),g=d.dot(n,p);return o=Math.min(g,o),r=Math.max(g,r),d.add(s,c,h),d.add(h,u,h),d.subtract(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.add(s,c,h),d.subtract(h,u,h),d.add(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.add(s,c,h),d.subtract(h,u,h),d.subtract(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.subtract(s,c,h),d.add(h,u,h),d.add(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.subtract(s,c,h),d.add(h,u,h),d.subtract(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.subtract(s,c,h),d.subtract(h,u,h),d.add(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),d.subtract(s,c,h),d.subtract(h,u,h),d.subtract(h,f,h),d.subtract(h,t,p),g=d.dot(n,p),o=Math.min(g,o),r=Math.max(g,r),i.start=o,i.stop=r,i};var dLe=new d,hLe=new d,mLe=new d;Ki.computeCorners=function(e,t){l(t)||(t=[new d,new d,new d,new d,new d,new d,new d,new d]);let n=e.center,i=e.halfAxes,o=X.getColumn(i,0,dLe),r=X.getColumn(i,1,hLe),s=X.getColumn(i,2,mLe);return d.clone(n,t[0]),d.subtract(t[0],o,t[0]),d.subtract(t[0],r,t[0]),d.subtract(t[0],s,t[0]),d.clone(n,t[1]),d.subtract(t[1],o,t[1]),d.subtract(t[1],r,t[1]),d.add(t[1],s,t[1]),d.clone(n,t[2]),d.subtract(t[2],o,t[2]),d.add(t[2],r,t[2]),d.subtract(t[2],s,t[2]),d.clone(n,t[3]),d.subtract(t[3],o,t[3]),d.add(t[3],r,t[3]),d.add(t[3],s,t[3]),d.clone(n,t[4]),d.add(t[4],o,t[4]),d.subtract(t[4],r,t[4]),d.subtract(t[4],s,t[4]),d.clone(n,t[5]),d.add(t[5],o,t[5]),d.subtract(t[5],r,t[5]),d.add(t[5],s,t[5]),d.clone(n,t[6]),d.add(t[6],o,t[6]),d.add(t[6],r,t[6]),d.subtract(t[6],s,t[6]),d.clone(n,t[7]),d.add(t[7],o,t[7]),d.add(t[7],r,t[7]),d.add(t[7],s,t[7]),t};var pLe=new X;Ki.computeTransformation=function(e,t){l(t)||(t=new M);let n=e.center,i=X.multiplyByUniformScale(e.halfAxes,2,pLe);return M.fromRotationTranslation(i,n,t)};var ALe=new le;Ki.isOccluded=function(e,t){let n=le.fromOrientedBoundingBox(e,ALe);return!t.isBoundingSphereVisible(n)};Ki.prototype.intersectPlane=function(e){return Ki.intersectPlane(this,e)};Ki.prototype.distanceSquaredTo=function(e){return Ki.distanceSquaredTo(this,e)};Ki.prototype.computePlaneDistances=function(e,t,n){return Ki.computePlaneDistances(this,e,t,n)};Ki.prototype.computeCorners=function(e){return Ki.computeCorners(this,e)};Ki.prototype.computeTransformation=function(e){return Ki.computeTransformation(this,e)};Ki.prototype.isOccluded=function(e){return Ki.isOccluded(this,e)};Ki.equals=function(e,t){return e===t||l(e)&&l(t)&&d.equals(e.center,t.center)&&X.equals(e.halfAxes,t.halfAxes)};Ki.prototype.clone=function(e){return Ki.clone(this,e)};Ki.prototype.equals=function(e){return Ki.equals(this,e)};var Qn=Ki;var LG={};LG.getHeight=function(e,t,n){return(e-n)*t+n};var gLe=new me;LG.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,gLe);if(!l(r))return d.clone(e,o);let s=LG.getHeight(r.height,n,i);return d.fromRadians(r.longitude,r.latitude,s,t,o)};var Gr=LG;var tR=`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; //extrudeDirection is zero for the top layer 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); // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w): // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts) // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w) // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow) 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); // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0) // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x) // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow) 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 // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction 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 D_=`#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 nre={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};nre.NUMBER_OF_CLASSIFICATION_TYPES=3;var Xn=Object.freeze(nre);var _Le={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},Na=Object.freeze(_Le);function yLe(e,t){let n=[],i=e.length,o=0;for(;onu.MaximumLatitude?e=nu.MaximumLatitude:e<-nu.MaximumLatitude&&(e=-nu.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};nu.MaximumLatitude=nu.mercatorAngleToGeodeticLatitude(Math.PI);nu.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=nu.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new d(i,o,r)};nu.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=nu.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new me(i,o,r)};var Ui=nu;function MLe(e,t,n){let i=!n,o=e.length,r;if(!i&&o>1){let s=e[0].modelMatrix;for(r=1;r=0){let u=i[a];o=u.offset+u.count,s=u.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let c=e.length;for(let u=0;ur&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function OLe(e,t){let n=[];return L6(e,"geometry",t,n),L6(e,"westHemisphereGeometry",t,n),L6(e,"eastHemisphereGeometry",t,n),n}var dA={};dA.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=LLe(e),t.length>0&&(n=Vn.createAttributeLocations(t[0]),e.createPickOffsets&&(r=OLe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(o),a=!0));let c=new Array(o),u=new Array(o);for(let f=0;f0&&(n.set(c.indices,s),s+=m)}return t.push(n.buffer),{stringTable:i,packedData:n}};dA.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s0){let S=y.length/C;for(b=Qe.createTypedArray(S,_),i=0;i<_;i++)b[i]=n[s++]}o[r++]=new ht({primitiveType:c,geometryType:u,boundingSphere:h,boundingSphereCV:p,indices:b,attributes:E,offsetAttribute:f})}return o};function ULe(e,t){let n=e.length,i=new Float64Array(1+n*19),o=0;i[o++]=n;for(let r=0;r= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; gl_Position *= show; }`,`${i} ${o}`};function lre(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 o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",u=`in ${a} ${c};`,f="",h="";if(i){f+=`vec2 st; `;let m=s>1?`${c}.x`:c;h+=` st = czm_decompressTextureCoordinates(${m}); `}n&&o&&r?(f+=`vec3 normal; vec3 tangent; vec3 bitangent; `,h+=` czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent); `):(n&&(f+=`vec3 normal; `,h+=` normal = czm_octDecode(${c}${s>1?`.${i?"y":"x"}`:""}); `),o&&(f+=`vec3 tangent; `,h+=` tangent = czm_octDecode(${c}.${i&&n?"z":"y"}); `),r&&(f+=`vec3 bitangent; `,h+=` 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=He.replaceMain(p,"czm_non_compressed_main");let g=`void main() { ${h} czm_non_compressed_main(); }`;return[u,f,p,g].join(` `)}function JLe(e){let t=He.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() { czm_non_depth_clamp_main(); gl_Position = czm_depthClamp(gl_Position);} `,t}function ZLe(e){let t=He.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 ure(e,t){let n=e.vertexAttributes}function $Le(e,t){return function(){return e[t]}}var O6=Math.max(jt.hardwareConcurrency-1,1),OG,eOe=new ui("combineGeometry");function tOe(e,t){let n,i,o,r,s=e._instanceIds;if(e._state===zr.READY){n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let a=e._numberOfInstances=n.length,c=[],u=[];for(o=0;o0){let _=new Float64Array(h);for(m=[_.buffer],r=0;r0?(e._recomputeBoundingSpheres=!0,e._state=zr.COMBINED):rR(e,t,zr.FAILED,void 0)}).catch(function(h){rR(e,t,zr.FAILED,h)})}}function nOe(e,t){let n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],i=e._numberOfInstances=n.length,o=new Array(i),r=e._instanceIds,s,a,c=0;for(a=0;a0?(e._recomputeBoundingSpheres=!0,e._state=zr.COMBINED):rR(e,t,zr.FAILED,void 0)}function iOe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i0||le.intersectPlane(_,hn.ORIGIN_ZX_PLANE)!==tn.INTERSECTING?c.push(_):(u.push(_),f.push(_))}let h=c[0],p=f[0],g=u[0];for(i=1;i0){if(qt.maximumVertexTextureImageUnits===0)throw new ce("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!==zr.COMPLETE&&this._state!==zr.COMBINED&&(this.asynchronous?tOe(this,e):nOe(this,e)),this._state===zr.COMBINED&&(oOe(this,e),dre(this,e),sOe(this,e)),!this.show||this._state!==zr.COMPLETE)return;this._batchTableOffsetsUpdated||dre(this,e),this._recomputeBoundingSpheres&&iOe(this,e);let n=this.appearance,i=n.material,o=!1,r=!1;this._appearance!==n?(this._appearance=n,this._material=i,o=!0,r=!0):this._material!==i&&(this._material=i,r=!0);let s=this.depthFailAppearance,a=l(s)?s.material:void 0;this._depthFailAppearance!==s?(this._depthFailAppearance=s,this._depthFailMaterial=a,o=!0,r=!0):this._depthFailMaterial!==a&&(this._depthFailMaterial=a,r=!0);let c=this._appearance.isTranslucent();this._translucent!==c&&(this._translucent=c,o=!0),l(this._material)&&this._material.update(t);let u=n.closed&&c;o&&(this._createRenderStatesFunction??aOe)(this,t,n,u),r&&(this._createShaderProgramFunction??cOe)(this,e,n),(o||r)&&(this._createCommandsFunction??lOe)(this,n,i,c,u,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??uOe)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,u)};var fOe=new le,dOe=new le;function Cre(e,t,n){if(n===dn.TOP){let i=le.clone(e,fOe),o=le.clone(e,dOe);o.center=d.add(o.center,t,o.center),e=le.union(i,o,e)}else n===dn.ALL&&(e.center=d.add(e.center,t,e.center));return e}function hOe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=q.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function mOe(e,t,n,i,o){return function(r){let s=Are(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var pOe=new d;function AOe(e,t,n){t.boundingSphere={get:function(){let i=e._instanceBoundingSpheres[n];if(l(i)){i=i.clone();let o=e.modelMatrix,r=t.offset;l(r)&&Cre(i,d.fromArray(r.get(),0,pOe),e._offsetInstanceExtend[n]),l(o)&&(i=le.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function gOe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}Vr.prototype.getGeometryInstanceAttributes=function(e){let t=this._perInstanceAttributeCache.get(e);if(l(t))return t;let n=-1,i=this._lastPerInstanceAttributeIndex,o=this._instanceIds,r=o.length;for(let u=0;u 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 // Treat world coords as a sphere normal for spherical coordinates 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 // Unpack planes and transform to eye space 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 PICK #ifdef CULL_FRAGMENTS // When classifying translucent geometry, logDepthOrDepth == 0.0 // indicates a region that should not be classified, possibly due to there // being opaque pixels there in another buffer. // Check for logDepthOrDepth != 0.0 to make sure this should be classified. if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) { out_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource czm_writeDepthClamp(); } #else // CULL_FRAGMENTS out_FragColor.a = 1.0; #endif // CULL_FRAGMENTS #else // PICK #ifdef CULL_FRAGMENTS // When classifying translucent geometry, logDepthOrDepth == 0.0 // indicates a region that should not be classified, possibly due to there // being opaque pixels there in another buffer. if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) { discard; } #endif #ifdef NORMAL_EC // Compute normal by sampling adjacent pixels in 2x2 block in screen space 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 // Premultiply alpha. Required for classification primitives on translucent globe. out_FragColor.rgb *= out_FragColor.a; #else // PER_INSTANCE_COLOR // Material support. // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or // dependencies for culling but might not actually be used by the material. 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 // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired // texture coordinate system, which typically forms a tight oriented bounding box around the geometry. // Shader is provided a set of reference points for remapping. 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 // Premultiply alpha. Required for classification primitives on translucent globe. out_FragColor.rgb *= out_FragColor.a; #endif // PER_INSTANCE_COLOR czm_writeDepthClamp(); #endif // PICK } `;function $f(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new Q6;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new Q6;if(o.requiresTextureCoordinates=e,n instanceof gn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource} ${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}$f.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 gn&&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 o="";return t instanceof gn||(o=t.material.shaderSource),new He({defines:i,sources:[o,ob]})};$f.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 He({defines:n,sources:[ob],pickColorQualifier:"in"})};$f.prototype.createVertexShader=function(e,t,n,i){return Bre(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};$f.prototype.createPickVertexShader=function(e,t,n,i){return Bre(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var Ere=new d,Ire=new me,xre={high:0,low:0};function Bre(e,t,n,i,o,r,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let u=Ire;u.longitude=D.PI,u.latitude=0,u.height=0;let f=s.project(u,Ere),h=$n.encode(f.x,xre);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;let p=Ire;p.longitude=-D.PI,p.latitude=0,p.height=0;let g=s.project(p,Ere);h=$n.encode(g.x,xre),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(c.push(a.eastMostYhighDefine),c.push(a.eastMostYlowDefine),c.push(a.westMostYhighDefine),c.push(a.westMostYlowDefine)),l(r)&&r instanceof gn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new He({defines:c,sources:[o]})}function Q6(){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(Q6.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 bre(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 yOe=[new U,new U,new U,new U];function Dre(e,t){let n=yOe,i=U.unpack(t,0,n[0]),o=U.unpack(t,2,n[1]),r=U.unpack(t,4,n[2]);e.uMaxVmax=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/bre(i,o,r),a=1/bre(i,r,o);e.uvMinAndExtents=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var vre=new me,Pre=new d,COe=new d,EOe=new d,FG={high:0,low:0};function Rre(e,t,n){let i=vre;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,Pre);i.latitude=e.north;let r=t.project(i,COe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,EOe),a=[0,0,0,0],c=[0,0,0,0],u=$n.encode(o.x,FG);a[0]=u.high,c[0]=u.low,u=$n.encode(o.y,FG),a[1]=u.high,c[1]=u.low,u=$n.encode(r.y,FG),a[2]=u.high,c[2]=u.low,u=$n.encode(s.x,FG),a[3]=u.high,c[3]=u.low,n.planes2D_HIGH=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var IOe=new M,xOe=new M,Tre=new d,bOe=new me,TOe=[new me,new me,new me,new me,new me,new me,new me,new me];function SOe(e,t,n,i,o,r){let s=ae.center(e,bOe);s.height=n;let a=me.toCartesian(s,t,Tre),c=Qt.eastNorthUpToFixedFrame(a,t,IOe),u=M.inverse(c,xOe),f=e.west,h=e.east,p=e.north,g=e.south,m=TOe;m[0].latitude=g,m[0].longitude=f,m[1].latitude=p,m[1].longitude=f,m[2].latitude=p,m[2].longitude=h,m[3].latitude=g,m[3].longitude=h;let _=(f+h)*.5,y=(p+g)*.5;m[4].latitude=g,m[4].longitude=_,m[5].latitude=p,m[5].longitude=_,m[6].latitude=y,m[6].longitude=f,m[7].latitude=y,m[7].longitude=h;let C=Number.POSITIVE_INFINITY,E=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY;for(let P=0;P<8;P++){m[P].height=n;let N=me.toCartesian(m[P],t,Tre);M.multiplyByPoint(u,N,N),N.z=0,C=Math.min(C,N.x),E=Math.max(E,N.x),I=Math.min(I,N.y),b=Math.max(b,N.y)}let S=i;S.x=C,S.y=I,S.z=0,M.multiplyByPoint(c,S,S);let B=o;B.x=E,B.y=I,B.z=0,M.multiplyByPoint(c,B,B),d.subtract(B,S,o);let v=r;v.x=C,v.y=b,v.z=0,M.multiplyByPoint(c,v,v),d.subtract(v,S,r)}var wOe=new d,BOe=new d,DOe=new $n;$f.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=Pre,s=wOe,a=BOe;SOe(e,n,o??0,r,s,a);let c={};Dre(c,t);let u=$n.fromCartesian(r,DOe);return c.southWest_HIGH=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(u.high,[0,0,0])}),c.southWest_LOW=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(u.low,[0,0,0])}),c.eastward=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(s,[0,0,0])}),c.northward=new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:3,normalize:!1,value:d.pack(a,[0,0,0])}),Rre(e,i,c),c};var vOe=new d;function Sre(e,t,n,i){let o=vre;o.latitude=e,o.longitude=t,o.height=0;let r=me.toCartesian(o,n,vOe),s=Math.sqrt(r.x*r.x+r.y*r.y),a=D.fastApproximateAtan2(s,r.z),c=D.fastApproximateAtan2(r.x,r.y);return i.x=a,i.y=c,i}var wre=new U;$f.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=Sre(e.south,e.west,n,wre),r=o.x,s=o.y,a=Sre(e.north,e.east,n,wre),c=a.x,u=a.y,f=0;s>u&&(f=D.PI-s,s=-D.PI,u+=f),r-=D.EPSILON5,s-=D.EPSILON5,c+=D.EPSILON5,u+=D.EPSILON5;let h=1/(u-s),p=1/(c-r),g={sphericalExtents:new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,h]}),longitudeRotation:new Rc({componentDatatype:q.FLOAT,componentsPerAttribute:1,normalize:!1,value:[f]})};return Dre(g,t),Rre(e,i,g),g};$f.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)};$f.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 POe(e){return Math.max(e.width,e.height)>$f.MAX_WIDTH_FOR_PLANAR_EXTENTS}$f.shouldUseSphericalCoordinates=function(e){return POe(e)};$f.MAX_WIDTH_FOR_PLANAR_EXTENTS=D.toRadians(1);var Vu=$f;var ROe={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},Jn=Object.freeze(ROe);var MOe={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},_t=Object.freeze(MOe);var QG={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};QG.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:Jn.ALWAYS,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.REPLACE},backFunction:Jn.ALWAYS,backOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.REPLACE},reference:QG.CESIUM_3D_TILE_MASK,mask:QG.CESIUM_3D_TILE_MASK}};var Xt=Object.freeze(QG);function hE(e){e=e??V.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??Xn.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(hE.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}}});hE.isSupported=function(e){return e.context.stencilBuffer};function rb(e,t){let n=t?Jn.EQUAL:Jn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:_t.KEEP,zFail:_t.DECREMENT_WRAP,zPass:_t.KEEP},backFunction:n,backOperation:{fail:_t.KEEP,zFail:_t.INCREMENT_WRAP,zPass:_t.KEEP},reference:Xt.CESIUM_3D_TILE_MASK,mask:Xt.CESIUM_3D_TILE_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:Na.LESS_OR_EQUAL},depthMask:!1}}function U6(e){return{stencilTest:{enabled:e,frontFunction:Jn.NOT_EQUAL,frontOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},backFunction:Jn.NOT_EQUAL,backOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},reference:0,mask:Xt.CLASSIFICATION_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:An.PRE_MULTIPLIED_ALPHA_BLEND}}var NOe={stencilTest:{enabled:!0,frontFunction:Jn.NOT_EQUAL,frontOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},backFunction:Jn.NOT_EQUAL,backOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},reference:0,mask:Xt.CLASSIFICATION_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function LOe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=Ge.fromCache(rb(o,!1)),e._rsStencilDepthPass3DTiles=Ge.fromCache(rb(o,!0)),e._rsColorPass=Ge.fromCache(U6(o,!1)),e._rsPickPass=Ge.fromCache(NOe)}function OOe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection; `,r=` extrudeDirection = czm_octDecode(${n}, 65535.0); `,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=He.replaceMain(s,"czm_non_compressed_main");let a=`void main() { ${r} czm_non_compressed_main(); }`;return[i,o,s,a].join(` `)}}function FOe(e,t){let n=t.context,i=e._primitive,o=tR;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=kn._appendDistanceDisplayConditionToShader(i,o),o=kn._modifyShaderPosition(e,o,t.scene3DOnly),o=kn._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=OOe(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new He({defines:[a],sources:[o]}),u=new He({sources:[D_]}),f=e._primitive._attributeLocations,h=new Vu(s,r,e.appearance);if(e._spStencil=cn.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f}),e._primitive.allowPicking){let m=He.createPickVertexShaderSource(o);m=kn._appendShowToShader(i,m),m=kn._updatePickColorAttribute(m);let _=h.createPickFragmentShader(!1),y=h.createPickVertexShader([a],m,!1,t.mapProjection);if(e._spPick=cn.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:y,fragmentShaderSource:_,attributeLocations:f}),s){let C=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(C)){let E=h.createPickFragmentShader(!0),I=h.createPickVertexShader([a],m,!0,t.mapProjection);C=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:I,fragmentShaderSource:E,attributeLocations:f})}e._spPick2D=C}}else e._spPick=cn.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});o=kn._appendShowToShader(i,o),c=new He({defines:[a],sources:[o]}),e._sp=cn.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:f});let p=h.createFragmentShader(!1),g=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=cn.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 _=h.createFragmentShader(!0),y=h.createVertexShader([a],o,!0,t.mapProjection);m=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:y,fragmentShaderSource:_,attributeLocations:f})}e._spColor2D=m}}function QOe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,s,a=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),u=e._needs2DShader;for(o=0;o0&&(c=o[0].attributes,p=Vu.hasAttributesForSphericalExtents(c),g=Vu.hasAttributesForTextureCoordinatePlanes(c),h=c.color),s=0;s{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};hE.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};hE.prototype.isDestroyed=function(){return!1};hE.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,ue(this)};var sb=hE;var zOe={u_globeMinimumAltitude:function(){return 55e3}};function iu(e){e=e??V.EMPTY_OBJECT;let t=e.appearance,n=e.geometryInstances;if(!l(t)&&l(n)){let o=Array.isArray(n)?n:[n],r=o.length;for(let s=0;s{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};iu.prototype.getBoundingSphere=function(e){let t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]};iu.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};iu.prototype.isDestroyed=function(){return!1};iu.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};iu._supportsMaterials=function(e){return e.depthTexture};iu.supportsMaterials=function(e){return iu._supportsMaterials(e.frameState.context)};var dl=iu;function ab(){he.throwInstantiationError()}Object.defineProperties(ab.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError}});ab.prototype.getType=he.throwInstantiationError;ab.prototype.getValue=he.throwInstantiationError;ab.prototype.equals=he.throwInstantiationError;var JOe=new K;ab.getValue=function(e,t,n){let i;return l(e)||(e=K.now(JOe)),l(t)&&(i=t.getType(e),l(i))?((!l(n)||n.type!==i)&&(n=io.fromType(i)),t.getValue(e,n.uniforms),n):((!l(n)||n.type!==io.ColorType)&&(n=io.fromType(io.ColorType)),G.clone(G.WHITE,n.uniforms.color),n)};var fr=ab;function mE(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}mE.prototype._isHidden=function(e,t,n){return!e.isShowing||!e.isAvailable(n)||!W.getValueOrDefault(t.show,n,!0)};mE.prototype._setOptions=he.throwInstantiationError;mE.prototype.update=function(e){let t=this._geometryUpdater,n=t._onTerrain,i=this._primitives,o=this._orderedGroundPrimitives;n?o.remove(this._primitive):(i.removeAndDestroy(this._primitive),i.removeAndDestroy(this._outlinePrimitive),this._outlinePrimitive=void 0),this._primitive=void 0;let r=this._entity,s=r[this._geometryUpdater._geometryPropertyName];if(this._setOptions(r,s,e),this._isHidden(r,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 Jt,h,p=t._getIsClosed(c);if(f)h=new gn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let g=fr.getValue(e,u,this._material);this._material=g,h=new yo({material:g,translucent:g.isTranslucent(),closed:p})}if(n)c.vertexFormat=gn.VERTEX_FORMAT,this._primitive=o.add(new dl({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),W.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=h.vertexFormat;let g=this._geometryUpdater.createFillGeometryInstance(e);f&&(h.translucent=g.attributes.color.value[3]!==255),this._primitive=i.add(new kn({geometryInstances:g,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let u=this._geometryUpdater.createOutlineGeometryInstance(e),f=W.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new kn({geometryInstances:u,appearance:new gn({flat:!0,translucent:u.attributes.color.value[3]!==255,renderState:{lineWidth:t._scene.clampLineWidth(f)}}),asynchronous:!1,shadows:a}))}};mE.prototype.getBoundingSphere=function(e){let t=this._entity,n=this._primitive,i=this._outlinePrimitive,o;return l(n)&&n.show&&n.ready&&(o=n.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(le.clone(o.boundingSphere,e),mt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?mt.PENDING:mt.FAILED};mE.prototype.isDestroyed=function(){return!1};mE.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),ue(this)};var Ai=mE;var Qre={};function sR(e,t){l(Qre[e])||(Qre[e]=!0,console.warn(t??e))}sR.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.";sR.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";sR.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";sR.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var yt=sR;var ZOe={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3},hA=Object.freeze(ZOe);var $Oe={NONE:0,GEODESIC:1,RHUMB:2},ln=Object.freeze($Oe);var kre=D.EPSILON10;function eFe(e,t,n,i){if(!l(e))return;n=n??!1;let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,u,f=0,h=-1;for(s=1;sD.EPSILON12);let x=L*(t*t-n*n)/(n*n),T=1+x*(4096+x*(x*(320-175*x)-768))/16384,w=x*(256+x*(x*(74-47*x)-128))/1024,R=A*A,O=w*N*(A+w*(P*(2*R-1)-w*A*(4*N*N-3)*(4*R-3)/6)/4),k=n*T*(v-O),F=Math.atan2(g*B,y-E*S),z=Math.atan2(h*B,y*S-E);e._distance=k,e._startHeading=F,e._endHeading=z,e._uSquared=x}var oFe=new d,V6=new d;function Gre(e,t,n,i){let o=d.normalize(i.cartographicToCartesian(t,V6),oFe),r=d.normalize(i.cartographicToCartesian(n,V6),V6);iFe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=me.clone(t,e._start),e._end=me.clone(n,e._end),e._start.height=0,e._end.height=0,tFe(e)}function aR(e,t,n){let i=n??ne.default;this._ellipsoid=i,this._start=new me,this._end=new me,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&Gre(this,e,t,i)}Object.defineProperties(aR.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}}});aR.prototype.setEndPoints=function(e,t){Gre(this,e,t,this._ellipsoid)};aR.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};aR.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=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),h=i*i,p=i*h,g=n.u8Over256,m=n.u2Over4,_=n.u6Over64,y=n.u4Over16,C=2*p*g*o/3+i*(1-m+7*y/4-15*_/4+579*g/64-(y-15*_/4+187*g/16)*o-(5*_/4-115*g/16)*r-29*g*s/16)+(m/2-y+71*_/32-85*g/16)*a+(5*y/16-5*_/4+383*g/96)*c-h*((_-11*g/2)*a+5*g*c/2)+(29*_/96-29*g/16)*u+539*g*f/1536,E=Math.asin(Math.sin(C)*n.cosineAlpha),I=Math.atan(n.a/n.b*Math.tan(E));C=C-n.sigma;let b=Math.cos(2*n.sigma+C),S=Math.sin(C),B=Math.cos(C),v=n.cosineU*B,P=n.sineU*S,L=Math.atan2(S*n.sineHeading,v-P*n.cosineHeading)-Ure(n.f,n.sineAlpha,n.cosineSquaredAlpha,C,S,B,b);return l(t)?(t.longitude=this._start.longitude+L,t.latitude=I,t.height=0,t):new me(this._start.longitude+L,I,0)};var mA=aR;function W6(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),h=Math.sin(4*u),p=Math.sin(6*u),g=Math.sin(8*u),m=Math.sin(10*u),_=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*h-(35*r/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*_)}function rFe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,u=c*c,f=u*c,h=f*c,p=h*c,g=p*c,m=Math.sin(2*i),_=Math.cos(2*i),y=Math.sin(4*i),C=Math.cos(4*i),E=Math.sin(6*i),I=Math.cos(6*i),b=Math.sin(8*i),S=Math.cos(8*i),B=Math.sin(10*i),v=Math.cos(10*i),P=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*h/16384+1515*i*p/65536+16837*i*g/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*h/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*g/5242880)*_+(21*i*f/256+483*i*h/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*g/1048576)*C+(151*i*h/4096+4681*i*p/65536+1479*i*g/16384-453*r*g/32768)*I+(1097*i*p/65536+42783*i*g/1048576)*S+8011*i*g/1048576*v+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*h/4096-33*o*h/512+20861*p/524288-33*o*p/512+s*p/1024+28273*g/1048576-471*o*g/8192+9*s*g/4096)*m+(21*u/256+21*f/256+533*h/8192-21*o*h/512+197*p/4096-315*o*p/4096+584039*g/16777216-12517*o*g/131072+7*s*g/2048)*y+(151*f/6144+151*h/4096+5019*p/131072-453*o*p/16384+26965*g/786432-8607*o*g/131072)*E+(1097*h/131072+1097*p/65536+225797*g/10485760-1097*o*g/65536)*b+(8011*p/2621440+8011*g/1048576)*B+293393*g/251658240*P}function cb(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 sFe(e,t,n,i,o){let r=cb(e._ellipticity,n),s=cb(e._ellipticity,o);return Math.atan2(D.negativePiToPi(i-t),s-r)}function aFe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,u=0;if(D.equalsEpsilon(Math.abs(a),D.PI_OVER_TWO,D.EPSILON8))if(t===n)u=t*Math.cos(o)*D.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*D.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=W6(e._ellipticity,t,o);u=(W6(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var cFe=new d,H6=new d;function zre(e,t,n,i){let o=d.normalize(i.cartographicToCartesian(t,H6),cFe),r=d.normalize(i.cartographicToCartesian(n,H6),H6),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=me.clone(t,e._start),e._start.height=0,e._end=me.clone(n,e._end),e._end.height=0,e._heading=sFe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=aFe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function Vre(e,t,n,i,o,r){if(n===0)return me.clone(e,r);let s=o*o,a,c,u;if(Math.abs(D.PI_OVER_TWO-Math.abs(t))>D.EPSILON8){let f=W6(o,i,e.latitude),h=n*Math.cos(t),p=f+h;if(c=rFe(p,o,i),Math.abs(t)0?a=D.negativePiToPi(e.longitude+u):a=D.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new me(a,c,0)}function pA(e,t,n){let i=n??ne.default;this._ellipsoid=i,this._start=new me,this._end=new me,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&zre(this,e,t,i)}Object.defineProperties(pA.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}}});pA.fromStartHeadingDistance=function(e,t,n,i,o){let r=i??ne.default,s=r.maximumRadius,a=r.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=D.negativePiToPi(t);let h=Vre(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new pA(e,h,r):(o.setEndPoints(e,h),o)};pA.prototype.setEndPoints=function(e,t){zre(this,e,t,this._ellipsoid)};pA.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};pA.prototype.interpolateUsingSurfaceDistance=function(e,t){return Vre(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};pA.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=D.negativePiToPi(e),D.equalsEpsilon(Math.abs(e),Math.PI,D.EPSILON14)&&(e=D.sign(r.longitude)*Math.PI),l(t)||(t=new me),Math.abs(D.PI_OVER_TWO-o)<=D.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(D.equalsEpsilon(Math.abs(D.PI_OVER_TWO-o),D.PI_OVER_TWO,D.EPSILON8))return D.equalsEpsilon(e,r.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=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(D.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,h;do{h=f;let p=n*Math.sin(h),g=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(g/u,n/2))-D.PI_OVER_TWO}while(!D.equalsEpsilon(f,h,D.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};pA.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(D.equalsEpsilon(Math.abs(i),D.PI_OVER_TWO,D.EPSILON8))return;let r=cb(n,o.latitude),s=cb(n,e),a=Math.tan(i)*(s-r),c=D.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new me(c,e,0)};var lc=pA;var $6=[Qi,Ui],lFe=$6.length,lse=Math.cos(D.toRadians(30)),Hre=Math.cos(D.toRadians(150)),use=0,fse=1e3;function P_(e){e=e??V.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=ne.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(P_.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ne.packedLength+1+1}}});P_.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;ilse||rD.PI_OVER_TWO&&(a=!0,s=d.subtract(r,n,Zre),u=c.cartesianToCartographic(s,Jre)),u.height=0;let f=e.project(u,o);return o=d.subtract(f,i,o),o.z=0,o=d.normalize(o,o),a&&d.negate(o,o),o}var DFe=new d,$re=new d;function ese(e,t,n,i,o,r){let s=d.subtract(t,e,DFe);d.normalize(s,s);let a=n-use,c=d.multiplyByScalar(s,a,$re);d.add(e,c,o);let u=i-fse;c=d.multiplyByScalar(s,u,$re),d.add(t,c,r)}var vFe=new d;function zG(e,t){let n=hn.getPointDistance(VG,e),i=hn.getPointDistance(VG,t),o=vFe;D.equalsEpsilon(n,0,D.EPSILON2)?(o=AA(t,e,o),d.multiplyByScalar(o,D.EPSILON2,o),d.add(e,o,e)):D.equalsEpsilon(i,0,D.EPSILON2)&&(o=AA(e,t,o),d.multiplyByScalar(o,D.EPSILON2,o),d.add(t,o,t))}function PFe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(D.equalsEpsilon(n,D.PI,D.EPSILON11)){let o=D.sign(t.longitude);return e.longitude=o*(n-D.EPSILON11),1}else if(D.equalsEpsilon(i,D.PI,D.EPSILON11)){let o=D.sign(e.longitude);return t.longitude=o*(i-D.EPSILON11),2}return 0}var hse=new me,mse=new me,tse=new d,K6=new d,nse=new d,ise=new d,RFe=new d,ose=new d,MFe=[hse,mse],NFe=new ae,LFe=new d,OFe=new d,FFe=new d,QFe=new d,kFe=new d,UFe=new d,X6=new d,J6=new d,GFe=new d,zFe=new d,VFe=new d,rse=new d,HFe=new d,WFe=new d,jFe=new $n,YFe=new $n,sse=new d,qFe=new d,ase=new d,KFe=[new le,new le],pse=[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],cse=pse.length;function XFe(e,t,n,i,o,r,s){let a,c,u=t._ellipsoid,f=n.length/3-1,h=f*8,p=h*4,g=f*36,m=h>65535?new Uint32Array(g):new Uint16Array(g),_=new Float64Array(h*3),y=new Float32Array(p),C=new Float32Array(p),E=new Float32Array(p),I=new Float32Array(p),b=new Float32Array(p),S,B,v,P;s&&(S=new Float32Array(p),B=new Float32Array(p),v=new Float32Array(p),P=new Float32Array(h*2));let N=r.length/2,L=0,A=hse;A.height=0;let x=mse;x.height=0;let T=tse,w=K6;if(s)for(c=0,a=1;alse?(kt=cR(t,A,We,tt,X6),Oe=cR(t,x,$,Mt,J6)):Ei===1?(Oe=cR(t,x,$,Mt,J6),kt.x=0,kt.y=D.sign(A.longitude-Math.abs(x.longitude)),kt.z=0):(kt=cR(t,A,We,tt,X6),Oe.x=0,Oe.y=D.sign(A.longitude-x.longitude),Oe.z=0)}let _n=d.distance(ze,Y),Ut=$n.fromCartesian(be,jFe),gt=d.subtract(Z,be,GFe),ti=d.normalize(gt,rse),ai=d.subtract(ze,be,zFe);ai=d.normalize(ai,ai);let Vt=d.cross(ti,ai,rse);Vt=d.normalize(Vt,Vt);let wt=d.cross(ai,We,HFe);wt=d.normalize(wt,wt);let qi=d.subtract(Y,Z,VFe);qi=d.normalize(qi,qi);let Et=d.cross($,qi,WFe);Et=d.normalize(Et,Et);let Ho=_n/O,No=J/O,ds=0,Wo,Ir,ke,ct=0,Xe=0;if(s){ds=d.distance(tt,Mt),Wo=$n.fromCartesian(tt,YFe),Ir=d.subtract(Mt,tt,sse),ke=d.normalize(Ir,qFe);let Ei=ke.x;ke.x=ke.y,ke.y=-Ei,ct=ds/L,Xe=pe/L}for(k=0;k<8;k++){let Ei=H+k*4,Do=z+k*2,xr=Ei+3,$a=k<4?1:-1,to=k===2||k===3||k===6||k===7?1:-1;d.pack(Ut.high,y,Ei),y[xr]=gt.x,d.pack(Ut.low,C,Ei),C[xr]=gt.y,d.pack(wt,E,Ei),E[xr]=gt.z,d.pack(Et,I,Ei),I[xr]=Ho*$a,d.pack(Vt,b,Ei);let Jo=No*to;Jo===0&&to<0&&(Jo=9),b[xr]=Jo,s&&(S[Ei]=Wo.high.x,S[Ei+1]=Wo.high.y,S[Ei+2]=Wo.low.x,S[Ei+3]=Wo.low.y,v[Ei]=-kt.y,v[Ei+1]=kt.x,v[Ei+2]=Oe.y,v[Ei+3]=-Oe.x,B[Ei]=Ir.x,B[Ei+1]=Ir.y,B[Ei+2]=ke.x,B[Ei+3]=ke.y,P[Do]=ct*$a,Jo=Xe*to,Jo===0&&to<0&&(Jo=9),P[Do+1]=Jo)}let et=FFe,pt=QFe,Zt=LFe,Tn=OFe,Bo=ae.fromCartographicArray(MFe,NFe),lo=Ii.getMinimumMaximumHeights(Bo,u),ia=lo.minimumTerrainHeight,ks=lo.maximumTerrainHeight;Ce+=Math.abs(ia),Ce+=Math.abs(ks),ese(be,ze,ia,ks,et,Zt),ese(Z,Y,ia,ks,pt,Tn);let xi=d.multiplyByScalar(Vt,D.EPSILON5,ase);d.add(et,xi,et),d.add(pt,xi,pt),d.add(Zt,xi,Zt),d.add(Tn,xi,Tn),zG(et,pt),zG(Zt,Tn),d.pack(et,_,Q),d.pack(pt,_,Q+3),d.pack(Tn,_,Q+6),d.pack(Zt,_,Q+9),xi=d.multiplyByScalar(Vt,-2*D.EPSILON5,ase),d.add(et,xi,et),d.add(pt,xi,pt),d.add(Zt,xi,Zt),d.add(Tn,xi,Tn),zG(et,pt),zG(Zt,Tn),d.pack(et,_,Q+12),d.pack(pt,_,Q+15),d.pack(Tn,_,Q+18),d.pack(Zt,_,Q+21),F+=2,c+=3,z+=16,Q+=24,H+=32,J+=_n,pe+=ds}c=0;let fe=0;for(a=0;a 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 } // Check distance of the eye coordinate against start and end planes with normals in the right plane. // For computing unskewed lengthwise texture coordinate. // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking. // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward" vec3 alignedPlaneNormal; // start aligned plane alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz); alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz)); distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz); // end aligned plane 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 // Clamp - distance to aligned planes may be negative due to mitering, // so fragment texture coordinate might be out-of-bounds. 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 // Premultiply alpha. Required for classification primitives on translucent globe. out_FragColor.rgb *= out_FragColor.a; czm_writeDepthClamp(); } `;var uR=`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) { // We don't expect the ray to ever be parallel to the plane 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 // Use distances for planes aligned with segment to prevent skew in dashing 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); // Clamp - distance to aligned planes may be negative due to mitering 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 fR=`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; // For materials #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 // Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume. // Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient. void main() { v_batchId = batchId; // Start position 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; // Start plane 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); // Right plane 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); // End position 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)); // End plane 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); // Forward direction 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 // For computing texture coordinates 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 // Compute a normal along which to "push" the position out, extending the miter depending on view distance. // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes. // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be. // Since this is morphing, compute both 3D and 2D positions and then blend. // ****** 3D ****** // Check distance to the end plane and start plane, pick the plane that is closer vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition 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)); // Points "up" for start plane, "down" at end plane. vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too. // Nudge the top vertex upwards to prevent flickering vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D)); geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0); geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT; positionEc3D.xyz += geodeticSurfaceNormal; // Determine if this vertex is on the "left" or "right" normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w); // A "perfect" implementation would push along normals according to the angle against forward. // In practice, just pushing the normal out by halfWidth is sufficient for morph views. positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera) // ****** 2D ****** // Check distance to the end plane and start plane, pick the plane that is closer vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition 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)); // Points "up" for start plane, "down" at end plane. normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too. // Nudge the top vertex upwards to prevent flickering geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D)); geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0); geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT; positionEc2D.xyz += geodeticSurfaceNormal; // Determine if this vertex is on the "left" or "right" normalEC *= sign(texcoordNormalization2D.x); #ifndef PER_INSTANCE_COLOR // Use vertex's sidedness to compute its texture coordinate. v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0); #endif // A "perfect" implementation would push along normals according to the angle against forward. // In practice, just pushing the normal out by halfWidth is sufficient for morph views. positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera) // Blend for actual position gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime); #ifdef ANGLE_VARYING // Approximate relative screen space direction of the line. 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 dR=`in vec3 position3DHigh; in vec3 position3DLow; // In 2D and in 3D, texture coordinate normalization component signs encodes: // * X sign - sidedness relative to right plane // * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume #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; // For materials #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); // Right plane v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw); v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart); // start plane vec4 startPlaneEC; startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy); startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart); // end plane 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); // start plane vec4 startPlaneEC; startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz; startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart); // end plane vec4 endPlaneEC; endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz; endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd); // Right plane 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 // Compute a normal along which to "push" the position out, extending the miter depending on view distance. // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes. // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be. vec4 positionRelativeToEye = czm_computePosition(); // Check distance to the end plane and start plane, pick the plane that is closer vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition 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)); // Points "up" for start plane, "down" at end plane. vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too. // Extrude bottom vertices downward for far view distances, like for GroundPrimitives 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)); // Determine distance along normalEC to push for a volume of appropriate width. // Make volumes about double pixel width for a conservative fit - in practice the // extra cost here is minimal compared to the loose volume heights. // // N = normalEC (guaranteed "right-facing") // R = rightEC // p = angle between N and R // w = distance to push along R if R == N // d = distance to push along N // // N R // { p| } * cos(p) = dot(N, R) = w / d // d | |w * d = w / dot(N, R) // { | } // o---------- polyline segment ----> // 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 = distance to push along R width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N // Determine if this vertex is on the "left" or "right" #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 // Approximate relative screen space direction of the line. 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 hR=`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 Hu=`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); // Distance that p0 is behind the near plane. Negative means p0 is // in front of the near plane. float endPoint0Distance = czm_currentFrustum.x + p0.z; // Camera looks down -Z. // When moving a point along +Z: LESS VISIBLE // * Points in front of the camera move closer to the camera. // * Points behind the camrea move farther away from the camera. // When moving a point along -Z: MORE VISIBLE // * Points in front of the camera move farther away from the camera. // * Points behind the camera move closer to the camera. // Positive denominator: -Z, becoming more visible // Negative denominator: +Z, becoming less visible // Nearly zero: parallel to near plane float denominator = -direction.z; if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7) { // p0 is behind the near plane and the line to p1 is nearly parallel to // the near plane, so cull the segment completely. culledByNearPlane = true; } else if (endPoint0Distance > 0.0) { // p0 is behind the near plane, and the line to p1 is moving distinctly // toward or away from it. // t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction) float t = endPoint0Distance / denominator; if (t < 0.0 || t > magnitude) { // Near plane intersection is not between the two points. // We already confirmed p0 is behind the naer plane, so now // we know the entire segment is behind it. culledByNearPlane = true; } else { // Segment crosses the near plane, update p0 to lie exactly on it. p0 = p0 + t * direction; // Numerical noise might put us a bit on the wrong side of the near plane. // Don't let that happen. 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) { // expandDirection +1 is to the _left_ when looking from positionEC toward nextEC. #ifdef POLYLINE_DASH // Compute the window coordinates of the points. vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC); vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC); vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC); // Determine the relative screen space direction of the line. 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; // precomputed atan(1,0) // Quantize the angle so it doesn't change rapidly between segments. 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 a segment was culled, we can't use the corresponding direction // computed above. We should never see both of these be true without // \`segmentCulled\` above also being true. 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; // When lines are split at the anti-meridian, the position may be at the // same location as the next or previous position, and we need to handle // that to avoid producing NaNs. 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); // The sine of the angle between the two vectors is given by the formula // |a x b| = |a||b|sin(theta) // which is // float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0))); // Because the z components of both vectors are zero, the x and y coordinate will be zero. // Therefore, the sine of the angle is just the z component of the cross product. 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 eW=`${Hu} ${hR}`,JFe=uE;jt.isInternetExplorer()||(eW=`#define CLIP_POLYLINE ${eW}`);function AE(e){e=e??V.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=AE.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??eW,this._fragmentShaderSource=e.fragmentShaderSource??JFe,this._renderState=po.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(AE.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}}});AE.VERTEX_FORMAT=Re.POSITION_ONLY;AE.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;AE.prototype.isTranslucent=po.prototype.isTranslucent;AE.prototype.getRenderState=po.prototype.getRenderState;var ps=AE;var mR=`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 gE=`#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 tW=`${Hu} ${mR}`,ZFe=gE;jt.isInternetExplorer()||(tW=`#define CLIP_POLYLINE ${tW}`);function _E(e){e=e??V.EMPTY_OBJECT;let t=e.translucent??!0,n=!1,i=_E.VERTEX_FORMAT;this.material=l(e.material)?e.material:io.fromType(io.ColorType),this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??tW,this._fragmentShaderSource=e.fragmentShaderSource??ZFe,this._renderState=po.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=i}Object.defineProperties(_E.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}}});_E.VERTEX_FORMAT=Re.POSITION_AND_ST;_E.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;_E.prototype.isTranslucent=po.prototype.isTranslucent;_E.prototype.getRenderState=po.prototype.getRenderState;var La=_E;function gA(e){e=e??V.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;l(t)||(t=new La),this.appearance=t,this.show=e.show??!0,this.classificationType=e.classificationType??Xn.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=Ase(!1),this._renderState3DTiles=Ase(!0),this._renderStateMorph=Ge.fromCache({cull:{enabled:!0,face:Pi.FRONT},depthTest:{enabled:!0},blending:An.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(gA.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}}});gA.initializeTerrainHeights=function(){return Ii.initialize()};function $Fe(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,s=o._batchTable.getVertexShaderCallback()(dR);s=kn._appendShowToShader(o,s),s=kn._appendDistanceDisplayConditionToShader(o,s),s=kn._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()(fR);a=kn._appendShowToShader(o,a),a=kn._appendDistanceDisplayConditionToShader(o,a),a=kn._modifyShaderPosition(e,a,t.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(lR),u=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],f="",h="";l(n.material)?(h=l(n.material)?n.material.shaderSource:"",h.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&u.push("ANGLE_VARYING"),h.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 He({defines:u,sources:[s]}),m=new He({defines:p,sources:[h,c]});e._sp=cn.replaceCache({context:i,shaderProgram:o._sp,vertexShaderSource:g,fragmentShaderSource:m,attributeLocations:r});let _=i.shaderCache.getDerivedShaderProgram(e._sp,"2dColor");if(!l(_)){let C=new He({defines:u.concat(["COLUMBUS_VIEW_2D"]),sources:[s]});_=i.shaderCache.createDerivedShaderProgram(e._sp,"2dColor",{context:i,shaderProgram:e._sp2D,vertexShaderSource:C,fragmentShaderSource:m,attributeLocations:r})}e._sp2D=_;let y=i.shaderCache.getDerivedShaderProgram(e._sp,"MorphColor");if(!l(y)){let C=new He({defines:u.concat([`MAX_TERRAIN_HEIGHT ${Ii._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});c=o._batchTable.getVertexShaderCallback()(uR);let E=new He({defines:p,sources:[h,c]});y=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:C,fragmentShaderSource:E,attributeLocations:r})}e._spMorph=y}function Ase(e){return Ge.fromCache({cull:{enabled:!0},blending:An.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Jn.EQUAL,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},backFunction:Jn.EQUAL,backOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},reference:Xt.CESIUM_3D_TILE_MASK,mask:Xt.CESIUM_3D_TILE_MASK}})}function e2e(e,t,n,i,o,r){let s=e._primitive,a=s._va.length;o.length=a,r.length=a;let u=t instanceof ps?{}:n._uniforms,f=s._batchTable.getUniformMapCallback()(u);for(let h=0;h{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})};gA.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};gA.isSupported=function(e){return e.frameState.context.depthTexture};gA.prototype.isDestroyed=function(){return!1};gA.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,ue(this)};var ph=gA;var n2e=new U(1,1),i2e=!1,o2e=G.WHITE;function lb(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(lb.prototype,{isConstant:{get:function(){return W.isConstant(this._image)&&W.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},image:de("image"),repeat:de("repeat"),color:de("color"),transparent:de("transparent")});lb.prototype.getType=function(e){return"Image"};var r2e=new K;lb.prototype.getValue=function(e,t){return l(e)||(e=K.now(r2e)),l(t)||(t={}),t.image=W.getValueOrUndefined(this._image,e),t.repeat=W.getValueOrClonedDefault(this._repeat,e,n2e,t.repeat),t.color=W.getValueOrClonedDefault(this._color,e,o2e,t.color),W.getValueOrDefault(this._transparent,e,i2e)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};lb.prototype.equals=function(e){return this===e||e instanceof lb&&W.equals(this._image,e._image)&&W.equals(this._repeat,e._repeat)&&W.equals(this._color,e._color)&&W.equals(this._transparent,e._transparent)};var R_=lb;function s2e(e){if(e instanceof G)return new Jt(e);if(typeof e=="string"||e instanceof we||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new R_;return t.image=e,t}}function a2e(e,t){return de(e,t,s2e)}var Yo=a2e;function pR(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(pR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),dimensions:de("dimensions"),heightReference:de("heightReference"),fill:de("fill"),material:Yo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});pR.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 pR(this)};pR.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 yE=pR;var c2e={FIXED:0,INERTIAL:1},Xi=Object.freeze(c2e);function ub(){he.throwInstantiationError()}Object.defineProperties(ub.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError},referenceFrame:{get:he.throwInstantiationError}});ub.prototype.getValue=he.throwInstantiationError;ub.prototype.getValueInReferenceFrame=he.throwInstantiationError;ub.prototype.equals=he.throwInstantiationError;var _se=new X;ub.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new d),n===i)return d.clone(t,o);let r=Qt.computeIcrfToCentralBodyFixedMatrix(e,_se);if(n===Xi.INERTIAL)return X.multiplyByVector(r,t,o);if(n===Xi.FIXED)return X.multiplyByVector(X.transpose(r,_se),t,o)};var Ah=ub;function CE(e,t){this._definitionChanged=new ge,this._value=d.clone(e),this._referenceFrame=t??Xi.FIXED}Object.defineProperties(CE.prototype,{isConstant:{get:function(){return!l(this._value)||this._referenceFrame===Xi.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var l2e=new K;CE.prototype.getValue=function(e,t){return l(e)||(e=K.now(l2e)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};CE.prototype.setValue=function(e,t){let n=!1;d.equals(this._value,e)||(n=!0,this._value=d.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};CE.prototype.getValueInReferenceFrame=function(e,t,n){return Ah.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};CE.prototype.equals=function(e){return this===e||e instanceof CE&&d.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var ml=CE;function AR(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(AR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),positions:de("positions"),width:de("width"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),cornerType:de("cornerType"),granularity:de("granularity"),fill:de("fill"),material:Yo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});AR.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 AR(this)};AR.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 EE=AR;function u2e(e){return e}function f2e(e,t){return de(e,t,u2e)}var pl=f2e;function gR(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(gR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),length:de("length"),topRadius:de("topRadius"),bottomRadius:de("bottomRadius"),heightReference:de("heightReference"),fill:de("fill"),material:Yo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),slices:de("slices"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});gR.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 gR(this)};gR.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 IE=gR;function _R(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(_R.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),semiMajorAxis:de("semiMajorAxis"),semiMinorAxis:de("semiMinorAxis"),height:de("height"),heightReference:de("heightReference"),extrudedHeight:de("extrudedHeight"),extrudedHeightReference:de("extrudedHeightReference"),rotation:de("rotation"),stRotation:de("stRotation"),granularity:de("granularity"),fill:de("fill"),material:Yo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),numberOfVerticalLines:de("numberOfVerticalLines"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition"),classificationType:de("classificationType"),zIndex:de("zIndex")});_R.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 _R(this)};_R.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 xE=_R;function yR(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(yR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),radii:de("radii"),innerRadii:de("innerRadii"),minimumClock:de("minimumClock"),maximumClock:de("maximumClock"),minimumCone:de("minimumCone"),maximumCone:de("maximumCone"),heightReference:de("heightReference"),fill:de("fill"),material:Yo("material"),outline:de("outline"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),stackPartitions:de("stackPartitions"),slicePartitions:de("slicePartitions"),subdivisions:de("subdivisions"),shadows:de("shadows"),distanceDisplayCondition:de("distanceDisplayCondition")});yR.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 yR(this)};yR.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 bE=yR;function CR(e){this._definitionChanged=new ge,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??V.EMPTY_OBJECT)}Object.defineProperties(CR.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:de("show"),text:de("text"),font:de("font"),style:de("style"),scale:de("scale"),showBackground:de("showBackground"),backgroundColor:de("backgroundColor"),backgroundPadding:de("backgroundPadding"),pixelOffset:de("pixelOffset"),eyeOffset:de("eyeOffset"),horizontalOrigin:de("horizontalOrigin"),verticalOrigin:de("verticalOrigin"),heightReference:de("heightReference"),fillColor:de("fillColor"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth"),translucencyByDistance:de("translucencyByDistance"),pixelOffsetScaleByDistance:de("pixelOffsetScaleByDistance"),scaleByDistance:de("scaleByDistance"),distanceDisplayCondition:de("distanceDisplayCondition"),disableDepthTestDistance:de("disableDepthTestDistance")});CR.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 CR(this)};CR.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 gh=CR;var d2e=new d(1,1,1),h2e=d.ZERO,m2e=Fe.IDENTITY;function yse(e,t,n){this.translation=d.clone(e??h2e),this.rotation=Fe.clone(t??m2e),this.scale=d.clone(n??d2e)}yse.prototype.equals=function(e){return this===e||l(e)&&d.equals(this.translation,e.translation)&&Fe.equals(this.rotation,e.rotation)&&d.equals(this.scale,e.scale)};var M_=yse;var nW=new M_;function ER(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(ER.prototype,{isConstant:{get:function(){return W.isConstant(this._translation)&&W.isConstant(this._rotation)&&W.isConstant(this._scale)}},definitionChanged:{get:function(){return this._definitionChanged}},translation:de("translation"),rotation:de("rotation"),scale:de("scale")});var p2e=new K;ER.prototype.getValue=function(e,t){return l(e)||(e=K.now(p2e)),l(t)||(t=new M_),t.translation=W.getValueOrClonedDefault(this._translation,e,nW.translation,t.translation),t.rotation=W.getValueOrClonedDefault(this._rotation,e,nW.rotation,t.rotation),t.scale=W.getValueOrClonedDefault(this._scale,e,nW.scale,t.scale),t};ER.prototype.equals=function(e){return this===e||e instanceof ER&&W.equals(this._translation,e._translation)&&W.equals(this._rotation,e._rotation)&&W.equals(this._scale,e._scale)};var TE=ER;function _A(e,t){this._propertyNames=[],this._definitionChanged=new ge,l(e)&&this.merge(e,t)}Object.defineProperties(_A.prototype,{propertyNames:{get:function(){return this._propertyNames}},isConstant:{get:function(){let e=this._propertyNames;for(let t=0,n=e.length;t{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};var O2e=new K;db.prototype.getValue=function(e,t){l(e)||(e=K.now(O2e));let n=W.getValueOrDefault(this._heightReference,e,Ze.NONE),i=W.getValueOrDefault(this._extrudedHeightReference,e,Ze.NONE);if(n===Ze.NONE&&!$x(i))return this._position=d.clone(d.ZERO,this._position),d.clone(d.ZERO,t);if(this._positionProperty.isConstant)return d.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,bse);if(!l(r)||d.equals(r,d.ZERO)||!l(o.globe))return d.clone(d.ZERO,t);if(d.equalsEpsilon(this._position,r,D.EPSILON10))return d.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=d.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return d.multiplyByScalar(s,this._terrainHeight,t)};db.prototype.isDestroyed=function(){return!1};db.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),ue(this)};var DE=db;function F2e(e,t,n,i){if(gi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let s=new Ch(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new DE(this._scene,s,r)}}var IA=F2e;var Tse=d.ZERO,Sse=new d,Q2e=new d,wse=new G;function k2e(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function Wu(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new k2e(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(Wu.prototype=Object.create(gi.prototype),Wu.prototype.constructor=Wu);Object.defineProperties(Wu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Wu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Jt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,wse)),l(a)||(a=G.WHITE),s.color=en.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,Tse,Sse))),new Rt({id:t,geometry:sc.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:s})};Wu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,wse),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,Tse,Sse))),new Rt({id:t,geometry:mh.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.5,this._scene.ellipsoid),attributes:r})};Wu.prototype._computeCenter=function(e,t){return W.getValueOrUndefined(this._entity.position,e,t)};Wu.prototype._isHidden=function(e,t){return!l(t.dimensions)||!l(e.position)||gi.prototype._isHidden.call(this,e,t)};Wu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!W.isConstant(e.orientation)||!t.dimensions.isConstant||!W.isConstant(t.outlineWidth)};Wu.prototype._setStaticOptions=function(e,t){let n=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Jt?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Ye.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==Ze.NONE?dn.ALL:void 0};Wu.prototype._onEntityPropertyChanged=IA;Wu.DynamicGeometryUpdater=hb;function hb(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(hb.prototype=Object.create(Ai.prototype),hb.prototype.constructor=hb);hb.prototype._isHidden=function(e,t,n){let i=W.getValueOrUndefined(e.position,n,Q2e),o=this._options.dimensions;return!l(i)||!l(o)||Ai.prototype._isHidden.call(this,e,t,n)};hb.prototype._setOptions=function(e,t,n){let i=W.getValueOrDefault(t.heightReference,n,Ze.NONE),o=this._options;o.dimensions=W.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==Ze.NONE?dn.ALL:void 0};var MR=Wu;function vE(e,t,n){this._callback=void 0,this._isConstant=void 0,this._referenceFrame=n??Xi.FIXED,this._definitionChanged=new ge,this.setCallback(e,t)}Object.defineProperties(vE.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var U2e=new K;vE.prototype.getValue=function(e,t){return l(e)||(e=K.now(U2e)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};vE.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};vE.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._callback(e,n);return Ah.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};vE.prototype.equals=function(e){return this===e||e instanceof vE&&this._callback===e._callback&&this._isConstant===e._isConstant&&this._referenceFrame===e._referenceFrame};var NR=vE;/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */var{entries:Fse,setPrototypeOf:Bse,isFrozen:G2e,getPrototypeOf:z2e,getOwnPropertyDescriptor:V2e}=Object,{freeze:yl,seal:td,create:Qse}=Object,{apply:uW,construct:fW}=typeof Reflect<"u"&&Reflect;yl||(yl=function(t){return t});td||(td=function(t){return t});uW||(uW=function(t,n,i){return t.apply(n,i)});fW||(fW=function(t,n){return new t(...n)});var HG=Cl(Array.prototype.forEach),H2e=Cl(Array.prototype.lastIndexOf),Dse=Cl(Array.prototype.pop),LR=Cl(Array.prototype.push),W2e=Cl(Array.prototype.splice),jG=Cl(String.prototype.toLowerCase),rW=Cl(String.prototype.toString),vse=Cl(String.prototype.match),OR=Cl(String.prototype.replace),j2e=Cl(String.prototype.indexOf),Y2e=Cl(String.prototype.trim),Eh=Cl(Object.prototype.hasOwnProperty),_l=Cl(RegExp.prototype.test),FR=q2e(TypeError);function Cl(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:jG;Bse&&Bse(e,null);let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){let r=n(o);r!==o&&(G2e(t)||(t[i]=r),o=r)}e[o]=!0}return e}function K2e(e){for(let t=0;t/gm),eQe=td(/\$\{[\w\W]*/gm),tQe=td(/^data-[\-\w.\u00B7-\uFFFF]+$/),nQe=td(/^aria-[\-\w]+$/),kse=td(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),iQe=td(/^(?:\w+script|data):/i),oQe=td(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Use=td(/^html$/i),rQe=td(/^[a-z][.\w]*(-[.\w]+)+$/i),Lse=Object.freeze({__proto__:null,ARIA_ATTR:nQe,ATTR_WHITESPACE:oQe,CUSTOM_ELEMENT:rQe,DATA_ATTR:tQe,DOCTYPE_NAME:Use,ERB_EXPR:$2e,IS_ALLOWED_URI:kse,IS_SCRIPT_OR_DATA:iQe,MUSTACHE_EXPR:Z2e,TMPLIT_EXPR:eQe}),kR={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},sQe=function(){return typeof window>"u"?null:window},aQe=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(i=n.getAttribute(o));let r="dompurify"+(i?"#"+i:"");try{return t.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ose=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Gse(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sQe(),t=an=>Gse(an);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==kR.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,i=n,o=i.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:c,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:g}=e,m=c.prototype,_=QR(m,"cloneNode"),y=QR(m,"remove"),C=QR(m,"nextSibling"),E=QR(m,"childNodes"),I=QR(m,"parentNode");if(typeof s=="function"){let an=n.createElement("template");an.content&&an.content.ownerDocument&&(n=an.content.ownerDocument)}let b,S="",{implementation:B,createNodeIterator:v,createDocumentFragment:P,getElementsByTagName:N}=n,{importNode:L}=i,A=Ose();t.isSupported=typeof Fse=="function"&&typeof I=="function"&&B&&B.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:x,ERB_EXPR:T,TMPLIT_EXPR:w,DATA_ATTR:R,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=Lse,{IS_ALLOWED_URI:Q}=Lse,H=null,j=Gi({},[...Pse,...sW,...aW,...cW,...Rse]),Z=null,Y=Gi({},[...Mse,...lW,...Nse,...WG]),$=Object.seal(Qse(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}})),J=null,pe=null,Ce=!0,fe=!0,ye=!1,Ie=!0,ve=!1,be=!0,ze=!1,We=!1,tt=!1,Mt=!1,kt=!1,Oe=!1,_n=!0,Ut=!1,gt="user-content-",ti=!0,ai=!1,Vt={},wt=null,qi=Gi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Et=null,Ho=Gi({},["audio","video","img","source","image","track"]),No=null,ds=Gi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wo="http://www.w3.org/1998/Math/MathML",Ir="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",ct=ke,Xe=!1,et=null,pt=Gi({},[Wo,Ir,ke],rW),Zt=Gi({},["mi","mo","mn","ms","mtext"]),Tn=Gi({},["annotation-xml"]),Bo=Gi({},["title","style","font","a","script"]),lo=null,ia=["application/xhtml+xml","text/html"],ks="text/html",xi=null,Ei=null,Do=n.createElement("form"),xr=function(Te){return Te instanceof RegExp||Te instanceof Function},$a=function(){let Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ei&&Ei===Te)){if((!Te||typeof Te!="object")&&(Te={}),Te=xA(Te),lo=ia.indexOf(Te.PARSER_MEDIA_TYPE)===-1?ks:Te.PARSER_MEDIA_TYPE,xi=lo==="application/xhtml+xml"?rW:jG,H=Eh(Te,"ALLOWED_TAGS")?Gi({},Te.ALLOWED_TAGS,xi):j,Z=Eh(Te,"ALLOWED_ATTR")?Gi({},Te.ALLOWED_ATTR,xi):Y,et=Eh(Te,"ALLOWED_NAMESPACES")?Gi({},Te.ALLOWED_NAMESPACES,rW):pt,No=Eh(Te,"ADD_URI_SAFE_ATTR")?Gi(xA(ds),Te.ADD_URI_SAFE_ATTR,xi):ds,Et=Eh(Te,"ADD_DATA_URI_TAGS")?Gi(xA(Ho),Te.ADD_DATA_URI_TAGS,xi):Ho,wt=Eh(Te,"FORBID_CONTENTS")?Gi({},Te.FORBID_CONTENTS,xi):qi,J=Eh(Te,"FORBID_TAGS")?Gi({},Te.FORBID_TAGS,xi):xA({}),pe=Eh(Te,"FORBID_ATTR")?Gi({},Te.FORBID_ATTR,xi):xA({}),Vt=Eh(Te,"USE_PROFILES")?Te.USE_PROFILES:!1,Ce=Te.ALLOW_ARIA_ATTR!==!1,fe=Te.ALLOW_DATA_ATTR!==!1,ye=Te.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=Te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=Te.SAFE_FOR_TEMPLATES||!1,be=Te.SAFE_FOR_XML!==!1,ze=Te.WHOLE_DOCUMENT||!1,Mt=Te.RETURN_DOM||!1,kt=Te.RETURN_DOM_FRAGMENT||!1,Oe=Te.RETURN_TRUSTED_TYPE||!1,tt=Te.FORCE_BODY||!1,_n=Te.SANITIZE_DOM!==!1,Ut=Te.SANITIZE_NAMED_PROPS||!1,ti=Te.KEEP_CONTENT!==!1,ai=Te.IN_PLACE||!1,Q=Te.ALLOWED_URI_REGEXP||kse,ct=Te.NAMESPACE||ke,Zt=Te.MATHML_TEXT_INTEGRATION_POINTS||Zt,Tn=Te.HTML_INTEGRATION_POINTS||Tn,$=Te.CUSTOM_ELEMENT_HANDLING||{},Te.CUSTOM_ELEMENT_HANDLING&&xr(Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&xr(Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&typeof Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(fe=!1),kt&&(Mt=!0),Vt&&(H=Gi({},Rse),Z=[],Vt.html===!0&&(Gi(H,Pse),Gi(Z,Mse)),Vt.svg===!0&&(Gi(H,sW),Gi(Z,lW),Gi(Z,WG)),Vt.svgFilters===!0&&(Gi(H,aW),Gi(Z,lW),Gi(Z,WG)),Vt.mathMl===!0&&(Gi(H,cW),Gi(Z,Nse),Gi(Z,WG))),Te.ADD_TAGS&&(H===j&&(H=xA(H)),Gi(H,Te.ADD_TAGS,xi)),Te.ADD_ATTR&&(Z===Y&&(Z=xA(Z)),Gi(Z,Te.ADD_ATTR,xi)),Te.ADD_URI_SAFE_ATTR&&Gi(No,Te.ADD_URI_SAFE_ATTR,xi),Te.FORBID_CONTENTS&&(wt===qi&&(wt=xA(wt)),Gi(wt,Te.FORBID_CONTENTS,xi)),ti&&(H["#text"]=!0),ze&&Gi(H,["html","head","body"]),H.table&&(Gi(H,["tbody"]),delete J.tbody),Te.TRUSTED_TYPES_POLICY){if(typeof Te.TRUSTED_TYPES_POLICY.createHTML!="function")throw FR('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Te.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw FR('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=Te.TRUSTED_TYPES_POLICY,S=b.createHTML("")}else b===void 0&&(b=aQe(g,o)),b!==null&&typeof S=="string"&&(S=b.createHTML(""));yl&&yl(Te),Ei=Te}},to=Gi({},[...sW,...aW,...X2e]),Jo=Gi({},[...cW,...J2e]),kf=function(Te){let xt=I(Te);(!xt||!xt.tagName)&&(xt={namespaceURI:ct,tagName:"template"});let yn=jG(Te.tagName),sr=jG(xt.tagName);return et[Te.namespaceURI]?Te.namespaceURI===Ir?xt.namespaceURI===ke?yn==="svg":xt.namespaceURI===Wo?yn==="svg"&&(sr==="annotation-xml"||Zt[sr]):!!to[yn]:Te.namespaceURI===Wo?xt.namespaceURI===ke?yn==="math":xt.namespaceURI===Ir?yn==="math"&&Tn[sr]:!!Jo[yn]:Te.namespaceURI===ke?xt.namespaceURI===Ir&&!Tn[sr]||xt.namespaceURI===Wo&&!Zt[sr]?!1:!Jo[yn]&&(Bo[yn]||!to[yn]):!!(lo==="application/xhtml+xml"&&et[Te.namespaceURI]):!1},Nr=function(Te){LR(t.removed,{element:Te});try{I(Te).removeChild(Te)}catch{y(Te)}},Da=function(Te,xt){try{LR(t.removed,{attribute:xt.getAttributeNode(Te),from:xt})}catch{LR(t.removed,{attribute:null,from:xt})}if(xt.removeAttribute(Te),Te==="is")if(Mt||kt)try{Nr(xt)}catch{}else try{xt.setAttribute(Te,"")}catch{}},oa=function(Te){let xt=null,yn=null;if(tt)Te=""+Te;else{let Ss=vse(Te,/^[\r\n\t ]+/);yn=Ss&&Ss[0]}lo==="application/xhtml+xml"&&ct===ke&&(Te=''+Te+"");let sr=b?b.createHTML(Te):Te;if(ct===ke)try{xt=new p().parseFromString(sr,lo)}catch{}if(!xt||!xt.documentElement){xt=B.createDocument(ct,"template",null);try{xt.documentElement.innerHTML=Xe?S:sr}catch{}}let va=xt.body||xt.documentElement;return Te&&yn&&va.insertBefore(n.createTextNode(yn),va.childNodes[0]||null),ct===ke?N.call(xt,ze?"html":"body")[0]:ze?xt.documentElement:va},th=function(Te){return v.call(Te.ownerDocument||Te,Te,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Zo=function(Te){return Te instanceof h&&(typeof Te.nodeName!="string"||typeof Te.textContent!="string"||typeof Te.removeChild!="function"||!(Te.attributes instanceof f)||typeof Te.removeAttribute!="function"||typeof Te.setAttribute!="function"||typeof Te.namespaceURI!="string"||typeof Te.insertBefore!="function"||typeof Te.hasChildNodes!="function")},ec=function(Te){return typeof a=="function"&&Te instanceof a};function ra(an,Te,xt){HG(an,yn=>{yn.call(t,Te,xt,Ei)})}let Lr=function(Te){let xt=null;if(ra(A.beforeSanitizeElements,Te,null),Zo(Te))return Nr(Te),!0;let yn=xi(Te.nodeName);if(ra(A.uponSanitizeElement,Te,{tagName:yn,allowedTags:H}),be&&Te.hasChildNodes()&&!ec(Te.firstElementChild)&&_l(/<[/\w!]/g,Te.innerHTML)&&_l(/<[/\w!]/g,Te.textContent)||Te.nodeType===kR.progressingInstruction||be&&Te.nodeType===kR.comment&&_l(/<[/\w]/g,Te.data))return Nr(Te),!0;if(!H[yn]||J[yn]){if(!J[yn]&&Yl(yn)&&($.tagNameCheck instanceof RegExp&&_l($.tagNameCheck,yn)||$.tagNameCheck instanceof Function&&$.tagNameCheck(yn)))return!1;if(ti&&!wt[yn]){let sr=I(Te)||Te.parentNode,va=E(Te)||Te.childNodes;if(va&&sr){let Ss=va.length;for(let xc=Ss-1;xc>=0;--xc){let nh=_(va[xc],!0);nh.__removalCount=(Te.__removalCount||0)+1,sr.insertBefore(nh,C(Te))}}}return Nr(Te),!0}return Te instanceof c&&!kf(Te)||(yn==="noscript"||yn==="noembed"||yn==="noframes")&&_l(/<\/no(script|embed|frames)/i,Te.innerHTML)?(Nr(Te),!0):(ve&&Te.nodeType===kR.text&&(xt=Te.textContent,HG([x,T,w],sr=>{xt=OR(xt,sr," ")}),Te.textContent!==xt&&(LR(t.removed,{element:Te.cloneNode()}),Te.textContent=xt)),ra(A.afterSanitizeElements,Te,null),!1)},Ic=function(Te,xt,yn){if(_n&&(xt==="id"||xt==="name")&&(yn in n||yn in Do))return!1;if(!(fe&&!pe[xt]&&_l(R,xt))){if(!(Ce&&_l(O,xt))){if(!Z[xt]||pe[xt]){if(!(Yl(Te)&&($.tagNameCheck instanceof RegExp&&_l($.tagNameCheck,Te)||$.tagNameCheck instanceof Function&&$.tagNameCheck(Te))&&($.attributeNameCheck instanceof RegExp&&_l($.attributeNameCheck,xt)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(xt))||xt==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&_l($.tagNameCheck,yn)||$.tagNameCheck instanceof Function&&$.tagNameCheck(yn))))return!1}else if(!No[xt]){if(!_l(Q,OR(yn,F,""))){if(!((xt==="src"||xt==="xlink:href"||xt==="href")&&Te!=="script"&&j2e(yn,"data:")===0&&Et[Te])){if(!(ye&&!_l(k,OR(yn,F,"")))){if(yn)return!1}}}}}}return!0},Yl=function(Te){return Te!=="annotation-xml"&&vse(Te,z)},ql=function(Te){ra(A.beforeSanitizeAttributes,Te,null);let{attributes:xt}=Te;if(!xt||Zo(Te))return;let yn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},sr=xt.length;for(;sr--;){let va=xt[sr],{name:Ss,namespaceURI:xc,value:nh}=va,MC=xi(Ss),NC=nh,sa=Ss==="value"?NC:Y2e(NC);if(yn.attrName=MC,yn.attrValue=sa,yn.keepAttr=!0,yn.forceKeepAttr=void 0,ra(A.uponSanitizeAttribute,Te,yn),sa=yn.attrValue,Ut&&(MC==="id"||MC==="name")&&(Da(Ss,Te),sa=gt+sa),be&&_l(/((--!?|])>)|<\/(style|title)/i,sa)){Da(Ss,Te);continue}if(yn.forceKeepAttr)continue;if(!yn.keepAttr){Da(Ss,Te);continue}if(!Ie&&_l(/\/>/i,sa)){Da(Ss,Te);continue}ve&&HG([x,T,w],TU=>{sa=OR(sa,TU," ")});let Dx=xi(Te.nodeName);if(!Ic(Dx,MC,sa)){Da(Ss,Te);continue}if(b&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!xc)switch(g.getAttributeType(Dx,MC)){case"TrustedHTML":{sa=b.createHTML(sa);break}case"TrustedScriptURL":{sa=b.createScriptURL(sa);break}}if(sa!==NC)try{xc?Te.setAttributeNS(xc,Ss,sa):Te.setAttribute(Ss,sa),Zo(Te)?Nr(Te):Dse(t.removed)}catch{Da(Ss,Te)}}ra(A.afterSanitizeAttributes,Te,null)},Lo=function an(Te){let xt=null,yn=th(Te);for(ra(A.beforeSanitizeShadowDOM,Te,null);xt=yn.nextNode();)ra(A.uponSanitizeShadowNode,xt,null),Lr(xt),ql(xt),xt.content instanceof r&&an(xt.content);ra(A.afterSanitizeShadowDOM,Te,null)};return t.sanitize=function(an){let Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xt=null,yn=null,sr=null,va=null;if(Xe=!an,Xe&&(an=""),typeof an!="string"&&!ec(an))if(typeof an.toString=="function"){if(an=an.toString(),typeof an!="string")throw FR("dirty is not a string, aborting")}else throw FR("toString is not a function");if(!t.isSupported)return an;if(We||$a(Te),t.removed=[],typeof an=="string"&&(ai=!1),ai){if(an.nodeName){let nh=xi(an.nodeName);if(!H[nh]||J[nh])throw FR("root node is forbidden and cannot be sanitized in-place")}}else if(an instanceof a)xt=oa(""),yn=xt.ownerDocument.importNode(an,!0),yn.nodeType===kR.element&&yn.nodeName==="BODY"||yn.nodeName==="HTML"?xt=yn:xt.appendChild(yn);else{if(!Mt&&!ve&&!ze&&an.indexOf("<")===-1)return b&&Oe?b.createHTML(an):an;if(xt=oa(an),!xt)return Mt?null:Oe?S:""}xt&&tt&&Nr(xt.firstChild);let Ss=th(ai?an:xt);for(;sr=Ss.nextNode();)Lr(sr),ql(sr),sr.content instanceof r&&Lo(sr.content);if(ai)return an;if(Mt){if(kt)for(va=P.call(xt.ownerDocument);xt.firstChild;)va.appendChild(xt.firstChild);else va=xt;return(Z.shadowroot||Z.shadowrootmode)&&(va=L.call(i,va,!0)),va}let xc=ze?xt.outerHTML:xt.innerHTML;return ze&&H["!doctype"]&&xt.ownerDocument&&xt.ownerDocument.doctype&&xt.ownerDocument.doctype.name&&_l(Use,xt.ownerDocument.doctype.name)&&(xc=" `+xc),ve&&HG([x,T,w],nh=>{xc=OR(xc,nh," ")}),b&&Oe?b.createHTML(xc):xc},t.setConfig=function(){let an=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$a(an),We=!0},t.clearConfig=function(){Ei=null,We=!1},t.isValidAttribute=function(an,Te,xt){Ei||$a({});let yn=xi(an),sr=xi(Te);return Ic(yn,sr,xt)},t.addHook=function(an,Te){typeof Te=="function"&&LR(A[an],Te)},t.removeHook=function(an,Te){if(Te!==void 0){let xt=H2e(A[an],Te);return xt===-1?void 0:W2e(A[an],xt,1)[0]}return Dse(A[an])},t.removeHooks=function(an){A[an]=[]},t.removeAllHooks=function(){A=Ose()},t}var zse=Gse();var cQe=0,dW={};function Hm(e,t){let n,i=e;l(dW[i])?n=dW[i]:(n=cQe++,dW[i]=n),t=t??!1,this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Hm.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=zse.sanitize(this._html),t=document.createElement("div");t.className="cesium-credit-wrapper",t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i{f[h]=void 0});for(let h=r;h0||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 uQe(e,t){if(Ih.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new Ih(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}UR.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber)return;this._previousFrameNumber=e.frameNumber;let t=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&&(uQe(this,t),this._specularEnvironmentCubeMapDirty=!1),l(this._specularEnvironmentCubeMap)&&(this._specularEnvironmentCubeMap.update(e),this._specularEnvironmentCubeMap.ready&&(this._specularEnvironmentMapLoaded=!0));let o=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps)&&!this._useDefaultSpecularMaps,r=!l(e.specularEnvironmentMaps)&&this._useDefaultSpecularMaps,s=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)&&!this._useDefaultSphericalHarmonics,a=!l(e.sphericalHarmonicCoefficients)&&this._useDefaultSphericalHarmonics;this._shouldRegenerateShaders=this._shouldRegenerateShaders||o||r||s||a,this._useDefaultSpecularMaps=!l(this._specularEnvironmentCubeMap)&&l(e.specularEnvironmentMaps),this._useDefaultSphericalHarmonics=!l(this._sphericalHarmonicCoefficients)&&l(e.sphericalHarmonicCoefficients)};UR.prototype.isDestroyed=function(){return!1};UR.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),ue(this)};var RE=UR;var pW=br(Ou(),1);var mW,Vse="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwNDljNWFmZC03MzRlLTRiMDMtYWIwMi00Yjk4YWQ4NzQwZGEiLCJpZCI6MjU5LCJpYXQiOjE3NTEzNzkyMzR9.OTqPNs3UGNnT1LYkPTavV80wN8Es_YphpJgQcpdnqWc",YG={};YG.defaultAccessToken=Vse;YG.defaultServer=new we({url:"https://api.cesium.com/"});YG.getDefaultTokenCredit=function(e){if(e===Vse){if(!l(mW)){let t=` This application is using Cesium's default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at
https://cesium.com.`;mW=new Bt(t,!0)}return mW}};var xh=YG;function El(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:fQe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new ce("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");we.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new pW.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(El.prototype=Object.create(we.prototype),El.prototype.constructor=El);El.fromAssetId=function(e,t){let n=El._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new El(i,n)})};Object.defineProperties(El.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=El.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});El.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Bt.getIonCredit),i=xh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Bt.clone(i)),n};El.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=new El(t._ionEndpoint,t._ionEndpointResource)),e=we.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};El.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return we.prototype.fetchImage.call(this,e)};El.prototype._makeRequest=function(e){return this._isExternal||new pW.default(this.url).authority()!==this._ionEndpointDomain?we.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,e.headers["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e.headers["X-Cesium-Client-Version"]=CESIUM_VERSION),we.prototype._makeRequest.call(this,e))};El._createEndpointResource=function(e,t){t=t??V.EMPTY_OBJECT;let n=t.server??xh.defaultServer,i=t.accessToken??xh.defaultAccessToken;n=we.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function fQe(e,t){let n=e._ionRoot??e,i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var ju=El;function Wm(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(Wm.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(et.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});Wm.prototype.get=function(e){return this._array[e]};Wm.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};Wm.prototype.peek=function(){return this._array[this._length-1]};Wm.prototype.push=function(e){let t=this.length++;this._array[t]=e};Wm.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};Wm.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};Wm.prototype.resize=function(e){this.length=e};Wm.prototype.trim=function(e){e=e??this._length,this._array.length=e};var Il=Wm;var bA={X:0,Y:1,Z:2};bA.Y_UP_TO_Z_UP=M.fromRotationTranslation(X.fromArray([1,0,0,0,0,1,0,-1,0]));bA.Z_UP_TO_Y_UP=M.fromRotationTranslation(X.fromArray([1,0,0,0,0,-1,0,1,0]));bA.X_UP_TO_Z_UP=M.fromRotationTranslation(X.fromArray([0,0,1,0,1,0,-1,0,0]));bA.Z_UP_TO_X_UP=M.fromRotationTranslation(X.fromArray([0,0,-1,0,1,0,1,0,0]));bA.X_UP_TO_Y_UP=M.fromRotationTranslation(X.fromArray([0,1,0,-1,0,0,0,0,1]));bA.Y_UP_TO_X_UP=M.fromRotationTranslation(X.fromArray([0,-1,0,1,0,0,0,0,1]));bA.fromName=function(e){return bA[e]};var fo=Object.freeze(bA);function Hse(e){e=e??V.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(Hse.prototype,{metadata:{get:function(){return this._metadata}}});var ME=Hse;function N_(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),N_.decode(e)}N_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};N_.decodeWithFromCharCode=function(e){let t="",n=dQe(e),i=n.length;for(let o=0;o>10)+55296,(r&1023)+56320))}return t};function GR(e,t,n){return t<=e&&e<=n}function dQe(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c0){let o=Math.min(t,qt.maximumTextureSize),r=Math.ceil(t/qt.maximumTextureSize),s=1/o,a=s*.5,c=1/r,u=c*.5;n=new U(o,r),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(Nc.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}}});Nc.DEFAULT_COLOR_VALUE=G.WHITE;Nc.DEFAULT_SHOW_VALUE=!0;function Wse(e){let t=e._textureDimensions;return t.x*t.y*4}function jse(e){if(!l(e._batchValues)){let t=Wse(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Yse(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}Nc.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Yse(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=jse(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};Nc.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n0){let i=e._pickIds,o=Wse(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let c=0;c0;){if(t=f.pop(),c[t]===u)continue;c[t]=u;let h=n(e,t);if(l(h))return h;let p=o[t],g=s[t];for(let m=0;m0?(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}); }`,`${r} ${QQe(i)}${s}`}};function Kse(e,t){return e=He.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 kQe(e,t){let n=`texture(${t}`,i=0,o=e.indexOf(n,i),r;for(;o>-1;){let s=0;for(let u=o;u0?(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 UQe(e){let t=e._content.tileset,n=t.colorBlendMode,i=t.colorBlendAmount;if(n===ru.HIGHLIGHT)return 0;if(n===ru.REPLACE)return 1;if(n===ru.MIX)return D.clamp(i,D.EPSILON4,1)}Mo.prototype.getUniformMapCallback=function(){if(this.featuresLength===0)return;let e=this;return function(t){return St(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 UQe(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};Mo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var L_={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Mo.prototype.addDerivedCommands=function(e,t){let n=e.commandList,i=n.length,o=this._content._tile,r=o._finalResolution,s=o.tileset,a=s.isSkippingLevelOfDetail&&s.hasMixedContent&&e.context.stencilBuffer,c=GQe(this);for(let u=t;u>>Xt.SKIP_LOD_BIT_SHIFT}function KQe(e){let t=je(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=An.ALPHA_BLEND,t.stencilTest=Xt.setCesium3DTileBit(),t.stencilMask=Xt.CESIUM_3D_TILE_MASK,Ge.fromCache(t)}function XQe(e){let t=je(e,!0);return t.stencilTest=Xt.setCesium3DTileBit(),t.stencilMask=Xt.CESIUM_3D_TILE_MASK,Ge.fromCache(t)}Mo.prototype.update=function(e,t){this._batchTexture.update(e,t)};Mo.prototype.isDestroyed=function(){return!1};Mo.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),ue(this)};var SA=Mo;function JQe(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var jm=JQe;var mb=`in vec3 position; in float a_batchId; uniform mat4 u_modifiedModelViewProjection; void main() { gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0)); } `;function id(e,t){this._content=e,this._batchId=t,this._color=void 0}Object.defineProperties(id.prototype,{show:{get:function(){return this._content.batchTable.getShow(this._batchId)},set:function(e){this._content.batchTable.setShow(this._batchId,e)}},color:{get:function(){return l(this._color)||(this._color=new G),this._content.batchTable.getColor(this._batchId,this._color)},set:function(e){this._content.batchTable.setColor(this._batchId,e)}},polylinePositions:{get:function(){if(l(this._content.getPolylinePositions))return this._content.getPolylinePositions(this._batchId)}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},featureId:{get:function(){return this._batchId}},pickId:{get:function(){return this._content.batchTable.getPickColor(this._batchId)}}});id.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};id.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};id.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};id.getPropertyInherited=function(e,t,n){let i=e.batchTable;if(l(i)){if(i.hasPropertyBySemantic(t,n))return i.getPropertyBySemantic(t,n);if(i.hasProperty(t,n))return i.getProperty(t,n)}let o=e.metadata;if(l(o)){if(o.hasPropertyBySemantic(n))return o.getPropertyBySemantic(n);if(o.hasProperty(n))return o.getProperty(n)}let r=e.tile,s=r.metadata;if(l(s)){if(s.hasPropertyBySemantic(n))return s.getPropertyBySemantic(n);if(s.hasProperty(n))return s.getProperty(n)}let a;if(l(r.implicitSubtree)&&(a=r.implicitSubtree.metadata),l(a)){if(a.hasPropertyBySemantic(n))return a.getPropertyBySemantic(n);if(a.hasProperty(n))return a.getProperty(n)}let c=l(e.group)?e.group.metadata:void 0;if(l(c)){if(c.hasPropertyBySemantic(n))return c.getPropertyBySemantic(n);if(c.hasProperty(n))return c.getProperty(n)}let u=e.tileset.metadata;if(l(u)){if(u.hasPropertyBySemantic(n))return u.getPropertyBySemantic(n);if(u.hasProperty(n))return u.getProperty(n)}};id.prototype.getPropertyInherited=function(e){return id.getPropertyInherited(this._content,this._batchId,e)};id.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};id.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};id.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};id.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var da=id;var _W=class{add(t,n,i){if(typeof arguments[0]!="string")for(let o in arguments[0])this.add(o,arguments[0][o],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(o){this[o]=this[o]||[],n&&this[o][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)})}},yW=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)})}},su=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,o;for(;this.index0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.lengthr.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&f(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=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=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s":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"});su.max_unop_len=su.getMaxKeyLen(su.unary_ops);su.max_binop_len=su.getMaxKeyLen(su.binary_ops);var O_=e=>new su(e).parse(),$Qe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(su).filter(e=>!$Qe.includes(e)&&O_[e]===void 0).forEach(e=>{O_[e]=su[e]});O_.Jsep=su;var eke="ConditionalExpression",tke={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,o=this.gobbleExpression();if(o||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let r=this.gobbleExpression();if(r||this.throwError("Expected expression"),n.node={type:eke,test:i,consequent:o,alternate:r},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 :")}})}};O_.plugins.register(tke);var nke={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},It=Object.freeze(nke);function Th(e,t){this._expression=e,e=pke(e,t),e=gke(Ake(e)),O_.addBinaryOp("=~",0),O_.addBinaryOp("!~",0);let n;try{n=O_(e)}catch(i){throw new ce(i)}this._runtimeAst=Ni(this,n)}Object.defineProperties(Th.prototype,{expression:{get:function(){return this._expression}}});var zn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new U],cartesian3Array:[new d],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 d),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Th.prototype.evaluate=function(e,t){zn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof G&&n instanceof se?G.fromCartesian4(n,t):n instanceof U||n instanceof d||n instanceof se?n.clone(t):n};Th.prototype.evaluateColor=function(e,t){zn.reset();let n=this._runtimeAst.evaluate(e);return G.fromCartesian4(n,t)};Th.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e} { return ${o}; } `,o};Th.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Th.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var ike=["!","-","+"],Zse=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],WR=/\${(.*?)}/g,oke=/\\/g,rke="@#%",ske=/@#%/g,XG=new G,JG={abs:ha(Math.abs),sqrt:ha(Math.sqrt),cos:ha(Math.cos),sin:ha(Math.sin),tan:ha(Math.tan),acos:ha(Math.acos),asin:ha(Math.asin),atan:ha(Math.atan),radians:ha(D.toRadians),degrees:ha(D.toDegrees),sign:ha(D.sign),floor:ha(Math.floor),ceil:ha(Math.ceil),round:ha(Math.round),exp:ha(Math.exp),exp2:ha(cke),log:ha(Math.log),log2:ha(lke),fract:ha(ake),length:uke,normalize:fke},ZG={atan2:qG(Math.atan2,!1),pow:qG(Math.pow,!1),min:qG(Math.min,!0),max:qG(Math.max,!0),distance:dke,dot:hke,cross:mke},IW={clamp:$se(D.clamp,!0),mix:$se(D.lerp,!0)};function ake(e){return e-Math.floor(e)}function cke(e){return Math.pow(2,e)}function lke(e){return D.log2(e)}function ha(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),zn.getCartesian2());if(n instanceof d)return d.fromElements(e(n.x),e(n.y),e(n.z),zn.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),zn.getCartesian4());throw new ce(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function qG(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof U)return U.fromElements(e(i.x,o),e(i.y,o),zn.getCartesian2());if(i instanceof d)return d.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),zn.getCartesian3());if(i instanceof se)return se.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),e(i.w,o),zn.getCartesian4())}if(typeof i=="number"&&typeof o=="number")return e(i,o);if(i instanceof U&&o instanceof U)return U.fromElements(e(i.x,o.x),e(i.y,o.y),zn.getCartesian2());if(i instanceof d&&o instanceof d)return d.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),zn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),zn.getCartesian4());throw new ce(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function $se(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof U&&o instanceof U)return U.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),zn.getCartesian2());if(i instanceof d&&o instanceof d)return d.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),zn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),zn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof U&&o instanceof U&&r instanceof U)return U.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),zn.getCartesian2());if(i instanceof d&&o instanceof d&&r instanceof d)return d.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),zn.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),zn.getCartesian4());throw new ce(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function uke(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof U)return U.magnitude(t);if(t instanceof d)return d.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new ce(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function fke(e,t){if(typeof t=="number")return 1;if(t instanceof U)return U.normalize(t,zn.getCartesian2());if(t instanceof d)return d.normalize(t,zn.getCartesian3());if(t instanceof se)return se.normalize(t,zn.getCartesian4());throw new ce(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function dke(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 d&&n instanceof d)return d.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new ce(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function hke(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 d&&n instanceof d)return d.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new ce(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function mke(e,t,n){if(t instanceof d&&n instanceof d)return d.cross(t,n,zn.getCartesian3());throw new ce(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function Dt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,wke(this)}function pke(e,t){if(!l(t))return e;for(let n in t)if(t.hasOwnProperty(n)){let i=new RegExp(`\\$\\{${n}\\}`,"g"),o=`(${t[n]})`;l(o)&&(e=e.replace(i,o))}return e}function Ake(e){return e.replace(oke,rke)}function EW(e){return e.replace(ske,"\\")}function gke(e){let t=e,n="",i=t.indexOf("${");for(;i>=0;){let o=t.indexOf("'"),r=t.indexOf('"'),s;if(o>=0&&o=0&&r=0?new Dt(It.VARIABLE_IN_STRING,e.value):new Dt(It.LITERAL_STRING,EW(e.value))}function yke(e,t){let n=t.arguments,i=n.length,o,r,s,a;if(t.callee.type==="MemberExpression"){o=t.callee.property.name;let c=t.callee.object;if(o==="test"||o==="exec"){if(!l(c.callee)||c.callee.name!=="regExp")throw new ce(`${o} is not a function.`);return i===0?o==="test"?new Dt(It.LITERAL_BOOLEAN,!1):new Dt(It.LITERAL_NULL,null):(s=Ni(e,c),a=Ni(e,n[0]),new Dt(It.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=Ni(e,c),new Dt(It.FUNCTION_CALL,o,r);throw new ce(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new Dt(It.LITERAL_COLOR,o);if(r=Ni(e,n[0]),l(n[1])){let c=Ni(e,n[1]);return new Dt(It.LITERAL_COLOR,o,[r,c])}return new Dt(It.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new ce(`${o} requires three arguments.`);return r=[Ni(e,n[0]),Ni(e,n[1]),Ni(e,n[2])],new Dt(It.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new ce(`${o} requires four arguments.`);return r=[Ni(e,n[0]),Ni(e,n[1]),Ni(e,n[2]),Ni(e,n[3])],new Dt(It.LITERAL_COLOR,o,r)}else if(o==="vec2"||o==="vec3"||o==="vec4"){r=new Array(i);for(let c=0;c1)throw new ce(`${o} requires exactly one argument.`);return r=Ni(e,n[0]),new Dt(It.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new ce(`${o} does not take any argument.`);return new Dt(It.UNARY,o)}else if(l(JG[o])){if(i!==1)throw new ce(`${o} requires exactly one argument.`);return r=Ni(e,n[0]),new Dt(It.UNARY,o,r)}else if(l(ZG[o])){if(i!==2)throw new ce(`${o} requires exactly two arguments.`);return s=Ni(e,n[0]),a=Ni(e,n[1]),new Dt(It.BINARY,o,s,a)}else if(l(IW[o])){if(i!==3)throw new ce(`${o} requires exactly three arguments.`);s=Ni(e,n[0]),a=Ni(e,n[1]);let c=Ni(e,n[2]);return new Dt(It.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new Dt(It.LITERAL_BOOLEAN,!1):(r=Ni(e,n[0]),new Dt(It.UNARY,o,r));if(o==="Number")return i===0?new Dt(It.LITERAL_NUMBER,0):(r=Ni(e,n[0]),new Dt(It.UNARY,o,r));if(o==="String")return i===0?new Dt(It.LITERAL_STRING,""):(r=Ni(e,n[0]),new Dt(It.UNARY,o,r));if(o==="regExp")return Cke(e,t)}}throw new ce(`Unexpected function call "${o}".`)}function Cke(e,t){let n=t.arguments;if(n.length===0)return new Dt(It.LITERAL_REGEX,new RegExp);let i=Ni(e,n[0]),o;if(n.length>1){let r=Ni(e,n[1]);if(CW(i)&&CW(r)){try{o=new RegExp(EW(String(i._value)),r._value)}catch(s){throw new ce(s)}return new Dt(It.LITERAL_REGEX,o)}return new Dt(It.REGEX,i,r)}if(CW(i)){try{o=new RegExp(EW(String(i._value)))}catch(r){throw new ce(r)}return new Dt(It.LITERAL_REGEX,o)}return new Dt(It.REGEX,i)}function Eke(e){if(Tke(e.name)){let t=Ske(e.name);return t.substr(0,8)==="tiles3d_"?new Dt(It.BUILTIN_VARIABLE,t):new Dt(It.VARIABLE,t)}else{if(e.name==="NaN")return new Dt(It.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new Dt(It.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new Dt(It.LITERAL_UNDEFINED,void 0)}throw new ce(`${e.name} is not defined.`)}function Ike(e){let t=e.property.name;if(t==="PI")return new Dt(It.LITERAL_NUMBER,Math.PI);if(t==="E")return new Dt(It.LITERAL_NUMBER,Math.E)}function xke(e){if(e.property.name==="POSITIVE_INFINITY")return new Dt(It.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function bke(e,t){if(t.object.name==="Math")return Ike(t);if(t.object.name==="Number")return xke(t);let n,i=Ni(e,t.object);return t.computed?(n=Ni(e,t.property),new Dt(It.MEMBER,"brackets",i,n)):(n=new Dt(It.LITERAL_STRING,t.property.name),new Dt(It.MEMBER,"dot",i,n))}function CW(e){return e._type>=It.LITERAL_NULL}function Tke(e){return e.substr(0,4)==="czm_"}function Ske(e){return e.substr(4)}function Ni(e,t){let n,i,o,r;if(t.type==="Literal")n=_ke(t);else if(t.type==="CallExpression")n=yke(e,t);else if(t.type==="Identifier")n=Eke(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=Ni(e,t.argument);if(ike.indexOf(i)>-1)n=new Dt(It.UNARY,i,s);else throw new ce(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=Ni(e,t.left),r=Ni(e,t.right),Zse.indexOf(i)>-1)n=new Dt(It.BINARY,i,o,r);else throw new ce(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=Ni(e,t.left),r=Ni(e,t.right),Zse.indexOf(i)>-1&&(n=new Dt(It.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=Ni(e,t.test);o=Ni(e,t.consequent),r=Ni(e,t.alternate),n=new Dt(It.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=bke(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a"?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(ZG[e._value])&&(e.evaluate=vke(e._value)):e._type===It.TERNARY?e.evaluate=Pke(e._value):e._type===It.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===It.ARRAY?e.evaluate=e._evaluateArray:e._type===It.VARIABLE?e.evaluate=e._evaluateVariable:e._type===It.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===It.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===It.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===It.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===It.REGEX?e.evaluate=e._evaluateRegExp:e._type===It.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=Bke):e.evaluate=e._evaluateLiteral}function Bke(e){return l(e)?e.content.tileset.timeSinceLoad:0}function Dke(e){let t=JG[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function vke(e){let t=ZG[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function Pke(e){let t=IW[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n),r=this._test.evaluate(n);return t(e,i,o,r)}}function $G(e,t){if(l(e))return e.getPropertyInherited(t)}Dt.prototype._evaluateLiteral=function(){return this._value};Dt.prototype._evaluateLiteralColor=function(e){let t=XG,n=this._left;if(this._value==="color")l(n)?n.length>1?(G.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):G.fromCssColorString(n[0].evaluate(e),t):G.fromBytes(255,255,255,255,t);else if(this._value==="rgb")G.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;G.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?G.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&G.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,zn.getCartesian4())};Dt.prototype._evaluateLiteralVector=function(e){let t=zn.getArray(),n=this._value,i=this._left,o=i.length;for(let a=0;a1)throw new ce(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new ce(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return U.fromArray(t,0,zn.getCartesian2());if(n==="vec3")return d.fromArray(t,0,zn.getCartesian3());if(n==="vec4")return se.fromArray(t,0,zn.getCartesian4())};Dt.prototype._evaluateLiteralString=function(){return this._value};Dt.prototype._evaluateVariableString=function(e){let t=this._value,n=WR.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=$G(e,o);l(r)||(r=""),t=t.replace(i,r),WR.lastIndex+=r.length-i.length,n=WR.exec(t)}return t};Dt.prototype._evaluateVariable=function(e){return $G(e,this._value)};function LE(e){return e._value==="feature"}Dt.prototype._evaluateMemberDot=function(e){if(LE(this._left))return $G(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 d||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]};Dt.prototype._evaluateMemberBrackets=function(e){if(LE(this._left))return $G(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 d||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]};Dt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};Dt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new ce(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};Dt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ce(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ce(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};Dt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new ce(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new ce(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};Dt.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,zn.getCartesian2());if(n instanceof d&&t instanceof d)return d.add(t,n,zn.getCartesian3());if(n instanceof se&&t instanceof se)return se.add(t,n,zn.getCartesian4());if(typeof t=="string"||typeof n=="string")return t+n;if(typeof t=="number"&&typeof n=="number")return t+n;throw new ce(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};Dt.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,zn.getCartesian2());if(n instanceof d&&t instanceof d)return d.subtract(t,n,zn.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,zn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new ce(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Dt.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,zn.getCartesian2());if(n instanceof U&&typeof t=="number")return U.multiplyByScalar(n,t,zn.getCartesian2());if(t instanceof U&&typeof n=="number")return U.multiplyByScalar(t,n,zn.getCartesian2());if(n instanceof d&&t instanceof d)return d.multiplyComponents(t,n,zn.getCartesian3());if(n instanceof d&&typeof t=="number")return d.multiplyByScalar(n,t,zn.getCartesian3());if(t instanceof d&&typeof n=="number")return d.multiplyByScalar(t,n,zn.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,zn.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,zn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,zn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new ce(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};Dt.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,zn.getCartesian2());if(t instanceof U&&typeof n=="number")return U.divideByScalar(t,n,zn.getCartesian2());if(n instanceof d&&t instanceof d)return d.divideComponents(t,n,zn.getCartesian3());if(t instanceof d&&typeof n=="number")return d.divideByScalar(t,n,zn.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,zn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,zn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new ce(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};Dt.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,zn.getCartesian2());if(n instanceof d&&t instanceof d)return d.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,zn.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,zn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new ce(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};Dt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof U&&t instanceof U||n instanceof d&&t instanceof d||n instanceof se&&t instanceof se?t.equals(n):t===n};Dt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof U&&t instanceof U||n instanceof d&&t instanceof d||n instanceof se&&t instanceof se?!t.equals(n):t!==n};Dt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new ce(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};Dt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};Dt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};Dt.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};Dt.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};Dt.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};Dt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};Dt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};Dt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};Dt.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(o){throw new ce(o)}return i};Dt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ce(`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)};Dt.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 ce(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Dt.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 ce(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};Dt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new ce(`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};Dt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof U||t instanceof d||t instanceof se)return String(t);throw new ce(`Unexpected function call "${this._value}".`)};function eae(e){let t=e._left,n=t.length;for(let a=0;a1){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=tae(this),l(i)?KG(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=tae(this),l(i)?KG(i):`vec4(${u[0]} / 255.0, ${u[1]} / 255.0, ${u[2]} / 255.0, ${u[3]})`;if(c==="hsl")return i=eae(this),l(i)?KG(i):`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), 1.0)`;if(c==="hsla")return i=eae(this),l(i)?(i.alpha!==1&&(t.translucent=!0),KG(i)):(u[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${u[0]}, ${u[1]}, ${u[2]})), ${u[3]})`)}break;case It.LITERAL_VECTOR:f=o.length,h=`${c}(`;for(let p=0;p0;){let f=t.pop();if(G.equals(f.color,a.color))u=xW(n,s,u,i,o,f.batchIds,r),a.batchIds=a.batchIds.concat(f.batchIds),a.count=u-a.offset;else{let h=u;u=xW(n,s,u,i,o,f.batchIds,r),f.offset=h,f.count=u-h,c.push(f),a=f}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function bW(e,t,n,i,o,r,s){let a=e.bytesPerIndex,c=r.length;for(let u=0;u0;){let h=t.pop();if(G.equals(h.color,r.color))u=bW(a,c,u,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=u-r.offset;else{let p=u;u=bW(a,c,u,n,i,h.batchIds,o),h.offset=p,h.count=u-p,s.push(h),r=h}}let f=e._va;e._va=e._vaSwap,e._vaSwap=f,e._batchedIndices=s}function zke(e,t){return t.color.toRgba()-e.color.toRgba()}function Vke(e,t){if(!e._batchDirty)return!1;let n=e._batchedIndices,i=n.length,o=!1,r={};for(let s=0;s=_&&s<_+y)break}c.push(new jm({color:G.clone(t),offset:s,count:a,batchIds:[e]}));let h=[],p=[],g=c[f].batchIds,m=g.length;for(let _=0;_{e.isDestroyed()||(e._error=m)}):void 0}}function r3e(e){l(e._primitive)||(e._primitive=new FE({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)}qu.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};qu.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};qu.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};qu.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};qu.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=o3e(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)};qu.prototype.isDestroyed=function(){return!1};qu.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var BA=qu;function Ym(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,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,c3e(this,i,o)}Object.defineProperties(Ym.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return l(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function s3e(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function a3e(e,t){let n,i,o,r,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;o=new Uint16Array(t.buffer,m,u)}if(f>0&&l(e.SPHERE_BATCH_IDS)){let m=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,m,f)}let h=l(n)||l(i)||l(o)||l(r),p=a>0&&!l(n)||c>0&&!l(i)||u>0&&!l(o)||f>0&&!l(r);if(h&&p)throw new ce("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)&&!l(r)){let m=0;if(!l(n)&&a>0)for(n=new Uint16Array(a),s=0;s0)for(i=new Uint16Array(c),s=0;s0)for(o=new Uint16Array(u),s=0;s0)for(r=new Uint16Array(f),s=0;s0&&(g=hr(i,n,u),n+=u,f>0&&(m=new Uint8Array(t,n,f),m=new Uint8Array(m)));let _=h.BOXES_LENGTH??0,y=h.CYLINDERS_LENGTH??0,C=h.ELLIPSOIDS_LENGTH??0,E=h.SPHERES_LENGTH??0,I=_+y+C+E,b=new SA(e,I,g,m,s3e(e));if(e._batchTable=b,I===0)return;let S=e.tile.computedTransform,B;l(h.RTC_CENTER)&&(B=d.unpack(h.RTC_CENTER),M.multiplyByPoint(S,B,B));let v=a3e(h,p);if(_>0||y>0||C>0||E>0){let P,N,L,A;if(_>0){let x=p.byteOffset+h.BOXES.byteOffset;P=new Float32Array(p.buffer,x,BA.packedBoxLength*_)}if(y>0){let x=p.byteOffset+h.CYLINDERS.byteOffset;N=new Float32Array(p.buffer,x,BA.packedCylinderLength*y)}if(C>0){let x=p.byteOffset+h.ELLIPSOIDS.byteOffset;L=new Float32Array(p.buffer,x,BA.packedEllipsoidLength*C)}if(E>0){let x=p.byteOffset+h.SPHERES.byteOffset;A=new Float32Array(p.buffer,x,BA.packedSphereLength*E)}return e._geometries=new BA({boxes:P,boxBatchIds:v.boxes,cylinders:N,cylinderBatchIds:v.cylinders,ellipsoids:L,ellipsoidBatchIds:v.ellipsoids,spheres:A,sphereBatchIds:v.spheres,center:B,modelMatrix:S,batchTable:b,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function aae(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}}Ym.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};Ym.prototype.getFeature=function(e){return aae(this),this._features[e]};Ym.prototype.applyDebugSettings=function(e,t){l(this._geometries)&&this._geometries.applyDebugSettings(e,t)};Ym.prototype.applyStyle=function(e){aae(this),l(this._geometries)&&this._geometries.applyStyle(e,this._features)};Ym.prototype.update=function(e,t){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};Ym.prototype.pick=function(e,t,n){};Ym.prototype.isDestroyed=function(){return!1};Ym.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),ue(this)};var jR=Ym;var TW={};TW.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),cae(i,o,r,s);return c};TW.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s>>0,SW=2*kE+1,Q_=4,fae=[],dae=[],f3e=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],k_=1,Ab=2,ez=[k_,0,0,k_|Ab];function As(e){if(!jt.supportsBigInt())throw new ce("S2 required BigInt support");this._cellId=e,this._level=As.getLevel(e)}As.fromToken=function(e){return new As(As.getIdFromToken(e))};As.isValidId=function(e){return!(e<=0||e>>BigInt(SW)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};As.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?As.isValidId(As.getIdFromToken(e)):!1};As.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};As.getTokenFromId=function(e){let t=Math.floor(E3e(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};As.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return kE-(t>>1)};As.prototype.getChild=function(e){let t=pae(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new As(n)};As.prototype.getParent=function(){let e=pae(this._cellId)<>1&1;return mae(i[0],o[0][r^n&1],o[1][r])}function m3e(e,t){let n=hae(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,u=(o<<1)+c,f=(r<<1)+c;return[i,u,f]}function hae(e){fae.length===0&&_3e();let t=Number(e>>BigInt(SW)),n=t&k_,i=(1<=0;s--){let c=(1<<2*(s===7?kE-7*Q_:Q_))-1;n+=Number(e>>BigInt(s*2*Q_+1)&BigInt(c))<<2,n=dae[n];let u=s*Q_;o+=n>>Q_+2<>2&i)<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function lae(e){return 1/u3e*e}function A3e(e,t){let n=[[],[]],i=g3e(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=tz(uae(r)),n[o][1]=tz(uae(s))}return n}function g3e(e){return 1<>>0}function uae(e){return 1/l3e*e}function U_(e,t,n,i,o,r){if(e===Q_){let s=(t<>1),n+(s[0]&1),i,o,r^ez[0]),U_(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^ez[1]),U_(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^ez[2]),U_(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^ez[3])}}function _3e(){U_(0,0,0,0,0,0),U_(0,0,0,k_,0,k_),U_(0,0,0,Ab,0,Ab),U_(0,0,0,k_|Ab,0,k_|Ab)}function pae(e){return e&~e+BigInt(1)}function y3e(e){return BigInt(1)<>3,r=i%8;n+=e[o]>>r&1}return n}Object.defineProperties(wW.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});wW.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 gb=wW;function vA(e){e=e??V.EMPTY_OBJECT;let t=e.metadataTable,n=e.class,i=e.entityId,o=e.propertyTableJson;this._class=n,this._metadataTable=t,this._entityId=i,this._extensions=o.extensions,this._extras=o.extras}Object.defineProperties(vA.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});vA.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};vA.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};vA.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};vA.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};vA.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};vA.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};vA.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var _b=vA;var nz={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};nz.getBranchingFactor=function(e){switch(e){case nz.OCTREE:return 8;case nz.QUADTREE:return 4}};var gs=Object.freeze(nz);function Oa(){}Object.defineProperties(Oa.prototype,{class:{get:function(){he.throwInstantiationError()}}});Oa.prototype.hasProperty=function(e){he.throwInstantiationError()};Oa.prototype.hasPropertyBySemantic=function(e){he.throwInstantiationError()};Oa.prototype.getPropertyIds=function(e){he.throwInstantiationError()};Oa.prototype.getProperty=function(e){he.throwInstantiationError()};Oa.prototype.setProperty=function(e,t){he.throwInstantiationError()};Oa.prototype.getPropertyBySemantic=function(e){he.throwInstantiationError()};Oa.prototype.setPropertyBySemantic=function(e,t){he.throwInstantiationError()};Oa.hasProperty=function(e,t,n){if(l(t[e]))return!0;let i=n.properties;if(!l(i))return!1;let o=i[e];return!!(l(o)&&l(o.default))};Oa.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};Oa.getPropertyIds=function(e,t,n){n=l(n)?n:[],n.length=0;for(let o in e)e.hasOwnProperty(o)&&l(e[o])&&n.push(o);let i=t.properties;if(l(i))for(let o in i)i.hasOwnProperty(o)&&!l(e[o])&&l(i[o].default)&&n.push(o);return n};Oa.getProperty=function(e,t,n){let i=n.properties[e],o=t[e];Array.isArray(o)&&(o=o.slice());let r=!0;if(o=i.handleNoData(o),!l(o)&&l(i.default))return o=je(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};Oa.setProperty=function(e,t,n,i){if(!l(n[e]))return!1;Array.isArray(t)&&(t=t.slice());let o,r=i.properties;return l(r)&&(o=r[e]),l(o)&&(t=o.packVectorAndMatrixTypes(t,!0),t=o.unapplyValueTransform(t),t=o.unnormalize(t)),n[e]=t,!0};Oa.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return Oa.getProperty(o.id,t,n)};Oa.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?Oa.setProperty(r.id,t,n,i):!1};var jn=Oa;function PA(e){e=e??V.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(PA.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});PA.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};PA.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};PA.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};PA.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};PA.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};PA.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};PA.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var YR=PA;var Wt={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"};Wt.getMinimum=function(e){switch(e){case Wt.INT8:return-128;case Wt.UINT8:return 0;case Wt.INT16:return-32768;case Wt.UINT16:return 0;case Wt.INT32:return-2147483648;case Wt.UINT32:return 0;case Wt.INT64:return jt.supportsBigInt()?BigInt("-9223372036854775808"):-Math.pow(2,63);case Wt.UINT64:return jt.supportsBigInt()?BigInt(0):0;case Wt.FLOAT32:return-34028234663852886e22;case Wt.FLOAT64:return-Number.MAX_VALUE}};Wt.getMaximum=function(e){switch(e){case Wt.INT8:return 127;case Wt.UINT8:return 255;case Wt.INT16:return 32767;case Wt.UINT16:return 65535;case Wt.INT32:return 2147483647;case Wt.UINT32:return 4294967295;case Wt.INT64:return jt.supportsBigInt()?BigInt("9223372036854775807"):Math.pow(2,63)-1;case Wt.UINT64:return jt.supportsBigInt()?BigInt("18446744073709551615"):Math.pow(2,64)-1;case Wt.FLOAT32:return 34028234663852886e22;case Wt.FLOAT64:return Number.MAX_VALUE}};Wt.isIntegerType=function(e){switch(e){case Wt.INT8:case Wt.UINT8:case Wt.INT16:case Wt.UINT16:case Wt.INT32:case Wt.UINT32:case Wt.INT64:case Wt.UINT64:return!0;default:return!1}};Wt.isUnsignedIntegerType=function(e){switch(e){case Wt.UINT8:case Wt.UINT16:case Wt.UINT32:case Wt.UINT64:return!0;default:return!1}};Wt.isVectorCompatible=function(e){switch(e){case Wt.INT8:case Wt.UINT8:case Wt.INT16:case Wt.UINT16:case Wt.INT32:case Wt.UINT32:case Wt.FLOAT32:case Wt.FLOAT64:return!0;default:return!1}};Wt.normalize=function(e,t){return Math.max(Number(e)/Number(Wt.getMaximum(t)),-1)};Wt.unnormalize=function(e,t){let n=Wt.getMaximum(t),i=Wt.isUnsignedIntegerType(t)?0:-n;return e=D.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===Wt.INT64||t===Wt.UINT64)&&jt.supportsBigInt()&&(e=BigInt(e)),e>n?n:e1;if(!n&&o===1)return e;if(!n)return new Array(o).fill(e);if(!r)return new Array(i).fill(e);if(!t)return new Array(this._arrayLength*o).fill(e);let s=new Array(o).fill(e);return new Array(this._arrayLength).fill(s)};fc.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!yae(e,t))return e};function yae(e,t){if(!Array.isArray(e))return e===t;if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n1;return l(n)?t&&r?e.map(function(s){return n.unpack(s)}):i?n.unpackArray(e):n.unpack(e):e};fc.prototype.packVectorAndMatrixTypes=function(e,t){t=t??!1;let n=At.getMathType(this._type),i=this._isArray,o=At.getComponentCount(this._type),r=i&&o>1;return l(n)?t&&r?e.map(function(s){return n.pack(s,[])}):i?n.packArray(e,[]):n.pack(e,[]):e};fc.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?S3e(this,e):Cae(this,e)};function S3e(e,t){if(!Array.isArray(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;i1?Aae(e,t,n):void 0}if(ezt.getMaximum(t))return Aae(e,t,n)}function _ae(e,t){return`value ${e} of type ${t} must be finite`}function BW(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function F3e(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=c*Math.pow(256,a)}return r&&(o=-o),o}function k3e(e,t){let n=t.dataView,i=e*8,o=BigInt(0),r=(n.getUint8(i+7)&128)>0,s=!0;for(let a=0;a<8;++a){let c=n.getUint8(i+a);r&&(s?c!==0&&(c=~(c-1)&255,s=!1):c=~c&255),o+=BigInt(c)*(BigInt(1)<{Zr._error=t}),Zr._decoderTaskProcessor=e}return Zr._decoderTaskProcessor};Zr.decodePointCloud=function(e){let t=Zr._getDecoderTaskProcessor();if(l(Zr._error))throw Zr._error;if(Zr._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])};Zr.decodeBufferView=function(e){let t=Zr._getDecoderTaskProcessor();if(l(Zr._error))throw Zr._error;if(Zr._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])};var MA=Zr;var Wn={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"_FEATURE_ID",SCALE:"_SCALE",ROTATION:"_ROTATION"};function nUe(e){switch(e){case Wn.POSITION:return"positionMC";case Wn.NORMAL:return"normalMC";case Wn.TANGENT:return"tangentMC";case Wn.TEXCOORD:return"texCoord";case Wn.COLOR:return"color";case Wn.JOINTS:return"joints";case Wn.WEIGHTS:return"weights";case Wn.FEATURE_ID:return"featureId";case Wn.SCALE:return"scale";case Wn.ROTATION:return"rotation"}}Wn.hasSetIndex=function(e){switch(e){case Wn.POSITION:case Wn.NORMAL:case Wn.TANGENT:return!1;case Wn.TEXCOORD:case Wn.COLOR:case Wn.JOINTS:case Wn.WEIGHTS:case Wn.FEATURE_ID:case Wn.SCALE:case Wn.ROTATION:return!0}};Wn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Wn.POSITION;case"NORMAL":return Wn.NORMAL;case"TANGENT":return Wn.TANGENT;case"TEXCOORD":return Wn.TEXCOORD;case"COLOR":return Wn.COLOR;case"JOINTS":return Wn.JOINTS;case"WEIGHTS":return Wn.WEIGHTS;case"_FEATURE_ID":return Wn.FEATURE_ID;case"_SCALE":return Wn.SCALE;case"_ROTATION":return Wn.ROTATION}};Wn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return Wn.POSITION;case"RGBA":case"RGB":case"RGB565":return Wn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Wn.NORMAL;case"BATCH_ID":return Wn.FEATURE_ID}};Wn.getGlslType=function(e){switch(e){case Wn.POSITION:case Wn.NORMAL:case Wn.TANGENT:return"vec3";case Wn.TEXCOORD:return"vec2";case Wn.COLOR:return"vec4";case Wn.JOINTS:return"ivec4";case Wn.WEIGHTS:return"vec4";case Wn.FEATURE_ID:return"int";case Wn.SCALE:return"vec3";case Wn.ROTATION:return"vec4";case Wn.OPACITY:return"float"}};Wn.getVariableName=function(e,t){let n=nUe(e);return l(t)&&(n+=`_${t}`),n};var rt=Object.freeze(Wn);function z_(e){e=e??V.EMPTY_OBJECT;let t=e.resourceCache,n=e.gltf,i=e.primitive,o=e.draco,r=e.gltfResource,s=e.baseResource,a=e.cacheKey;this._resourceCache=t,this._gltfResource=r,this._baseResource=s,this._gltf=n,this._primitive=i,this._draco=o,this._cacheKey=a,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=ft.UNLOADED,this._promise=void 0,this._dracoError=void 0}l(Object.create)&&(z_.prototype=Object.create(zi.prototype),z_.prototype.constructor=z_);Object.defineProperties(z_.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}});async function iUe(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=ft.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Rae(e,n)}}z_.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=iUe(this),this._promise)};function Rae(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load Draco",t)}async function oUe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=ft.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var zE={};zE[rt.POSITION]="POSITION";zE[rt.NORMAL]="NORMAL";zE[rt.COLOR]="COLOR";zE[rt.TEXCOORD]="TEX_COORD";function rUe(e){for(let t in zE)if(zE.hasOwnProperty(t)&&e.startsWith(t))return zE[t]}z_.prototype.process=function(e){if(this._state===ft.READY)return!0;if(this._state!==ft.PROCESSING||(l(this._dracoError)&&Rae(this,this._dracoError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let t=this._draco,n=this._primitive,i=this._gltf,o=i.bufferViews,r=t.bufferView,s=o[r],a=t.attributes,c=[];for(let h in n.attributes)if(n.attributes.hasOwnProperty(h)){let p=rUe(h);l(p)&&i.accessors[n.attributes[h]].componentType===q.FLOAT&&(c.includes(p)||c.push(p))}let u={array:new Uint8Array(this._bufferViewTypedArray),bufferView:s,compressedAttributes:a,dequantizeInShader:!0,attributesToSkipTransform:c},f=MA.decodeBufferView(u);if(!l(f))return!1;this._decodePromise=oUe(this,f)};z_.prototype.unload=function(){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};var Cb=z_;function sUe(e){let t=e.uint8Array,n=e.format,i=e.request,o=e.flipY??!1,r=e.skipColorSpaceConversion??!1,s=new Blob([t],{type:n}),a;return we.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(we.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new we({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).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 VE=sUe;function NA(e){e=e??V.EMPTY_OBJECT;let t=e.resourceCache,n=e.gltf,i=e.imageId,o=e.gltfResource,r=e.baseResource,s=e.cacheKey,a=n.images[i],c=a.bufferView,u=a.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._bufferViewId=c,this._uri=u,this._cacheKey=s,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=ft.UNLOADED,this._promise=void 0}l(Object.create)&&(NA.prototype=Object.create(zi.prototype),NA.prototype.constructor=NA);Object.defineProperties(NA.prototype,{cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}});NA.prototype.load=function(){return l(this._promise)?this._promise:l(this._bufferViewId)?(this._promise=aUe(this),this._promise):(this._promise=cUe(this),this._promise)};function Mae(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 aUe(e){e._state=ft.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,o=await uUe(i);if(e.isDestroyed())return;let r=Mae(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ft.READY,e}catch(n){return e.isDestroyed()?void 0:Nae(e,n,"Failed to load embedded image")}}async function cUe(e){e._state=ft.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await dUe(i);if(e.isDestroyed())return;let r=Mae(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ft.READY,e}catch(o){return e.isDestroyed()?void 0:Nae(e,o,`Failed to load image: ${n}`)}}function Nae(e,t,n){return e.unload(),e._state=ft.FAILED,Promise.reject(e.getError(n,t))}function lUe(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 ce("Image format is not recognized")}async function uUe(e){let t=lUe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return Zl(n)}return NA._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var fUe=/(^data:image\/ktx2)|(\.ktx2$)/i;function dUe(e){let t=e.getUrlComponent(!1,!0);return fUe.test(t)?Zl(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}NA.prototype.unload=function(){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};NA._loadImageFromTypedArray=VE;var Eb=NA;var hUe={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3},dc=Object.freeze(hUe);function V_(e){e=e??V.EMPTY_OBJECT;let t=e.resourceCache,n=e.gltf,i=e.accessorId,o=e.gltfResource,r=e.baseResource,s=e.primitive,a=e.draco,c=e.cacheKey,u=e.asynchronous??!0,f=e.loadBuffer??!1,h=e.loadTypedArray??!1,p=n.accessors[i].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=r,this._gltf=n,this._accessorId=i,this._indexDatatype=p,this._primitive=s,this._draco=a,this._cacheKey=c,this._asynchronous=u,this._loadBuffer=f,this._loadTypedArray=h,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=ft.UNLOADED,this._promise=void 0}l(Object.create)&&(V_.prototype=Object.create(zi.prototype),V_.prototype.constructor=V_);Object.defineProperties(V_.prototype,{cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},indexDatatype:{get:function(){return this._indexDatatype}}});var mUe=new LW;V_.prototype.load=async function(){return l(this._promise)?this._promise:l(this._draco)?(this._promise=pUe(this),this._promise):(this._promise=AUe(this),this._promise)};async function pUe(e){e._state=ft.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=ft.LOADED,e)}catch(n){if(e.isDestroyed())return;NW(e,n)}}async function AUe(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=ft.LOADING;let r=e._resourceCache;try{let s=r.getBufferViewLoader({gltf:t,bufferViewId:o,gltfResource:e._gltfResource,baseResource:e._baseResource});if(e._bufferViewLoader=s,await s.load(),e.isDestroyed())return;let a=s.typedArray;return e._typedArray=gUe(e,a),e._state=ft.PROCESSING,e}catch(s){if(e.isDestroyed())return;NW(e,s)}}function gUe(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Qe.getSizeInBytes(s),c=t.buffer,u=t.byteOffset+o.byteOffset;if(u%a!==0){let h=r*a,p=new Uint8Array(c,u,h);c=new Uint8Array(p).buffer,u=0,Vs("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let f;return s===Qe.UNSIGNED_BYTE?f=new Uint8Array(c,u,r):s===Qe.UNSIGNED_SHORT?f=new Uint16Array(c,u,r):s===Qe.UNSIGNED_INT&&(f=new Uint32Array(c,u,r)),f}function NW(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load index buffer",t)}function LW(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}LW.prototype.set=function(e,t,n){this.typedArray=e,this.indexDatatype=t,this.context=n};LW.prototype.execute=function(){this.buffer=Lae(this.typedArray,this.indexDatatype,this.context)};function Lae(e,t,n){let i=Ct.createIndexBuffer({typedArray:e,context:n,usage:Ue.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}V_.prototype.process=function(e){if(this._state===ft.READY)return!0;if(this._state!==ft.LOADED&&this._state!==ft.PROCESSING)return!1;let t=this._typedArray,n=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(e)&&(t=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=t,n=q.fromTypedArray(t),this._indexDatatype=n)}catch(o){NW(this,o)}if(!l(t))return!1;let i;if(this._loadBuffer&&this._asynchronous){let o=mUe;if(o.set(t,n,e.context),!e.jobScheduler.execute(o,dc.BUFFER))return!1;i=o.buffer}else this._loadBuffer&&(i=Lae(t,n,e.context));return this.unload(),this._buffer=i,this._typedArray=this._loadTypedArray?t:void 0,this._state=ft.READY,this._resourceCache.statistics.addGeometryLoader(this),!0};V_.prototype.unload=function(){l(this._buffer)&&this._buffer.destroy();let e=this._resourceCache;l(this._bufferViewLoader)&&!this._bufferViewLoader.isDestroyed()&&e.unload(this._bufferViewLoader),l(this._dracoLoader)&&e.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};var Ib=V_;function _Ue(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 Hs=_Ue;function yUe(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var Sr=yUe;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],o=t(i,n);if(l(o))return o}}};rn.object=function(e,t){if(l(e)){let n=e.length;for(let i=0;i0)return i.byteStride}return q.getSizeInBytes(t.componentType)*Ku(t.type)}var au=EUe;function IUe(e){Me.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),Me.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),Me.mesh(e,function(n){Me.meshPrimitive(n,function(i){if(i.mode=i.mode??te.TRIANGLES,!l(i.material)){l(e.materials)||(e.materials=[]);let o={name:"default"};i.material=Hs(e.materials,o)}})}),Me.accessorContainingVertexAttributeData(e,function(n){let i=e.accessors[n],o=i.bufferView;if(i.normalized=i.normalized??!1,l(o)){let r=e.bufferViews[o];r.byteStride=au(e,i),r.target=te.ARRAY_BUFFER}}),Me.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=te.ELEMENT_ARRAY_BUFFER}}),Me.material(e,function(n){let i=n.extensions??V.EMPTY_OBJECT,o=i.KHR_materials_common;if(l(o)){let c=o.technique,u=l(o.values)?o.values:{};o.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)),o.transparent=o.transparent??!1,o.doubleSided=o.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 r=i.KHR_techniques_webgl;l(r)&&Me.materialValue(n,function(c){l(c.index)&&HE(c)}),HE(n.emissiveTexture),HE(n.normalTexture),HE(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,HE(s.baseColorTexture),HE(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,HE(a.specularGlossinessTexture))}),Me.animation(e,function(n){Me.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=xUe(e);return Me.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]}),Me.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 xUe(e){let t={};return Me.animation(e,function(n){Me.animationChannel(n,function(i){let o=i.target,r=o.node,s=o.path;(s==="translation"||s==="rotation"||s==="scale")&&(t[r]=!0)})}),t}function HE(e){l(e)&&(e.texCoord=e.texCoord??0)}var eM=IUe;function bUe(e){return Me.shader(e,function(t){cz(t)}),Me.buffer(e,function(t){cz(t)}),Me.image(e,function(t){cz(t)}),cz(e),e}function cz(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var H_=bUe;function TUe(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 tM=TUe;function SUe(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),tM(e,t),n.length===0&&delete e.extensionsUsed}}var WE=SUe;var wUe=4;function BUe(e){if(bh(e)!=="glTF")throw new ce("File is not valid binary glTF");let n=Oae(e,0,5),i=n[1];if(i!==1&&i!==2)throw new ce("Binary glTF version is not 1 or 2");return i===1?DUe(e,n):vUe(e,n)}function Oae(e,t,n){let i=new DataView(e.buffer),o=new Array(n);for(let r=0;r0){let h=f.binary_glTF??f.KHR_binary_glTF;l(h)&&(h.extras._pipeline.source=u,delete h.uri)}return WE(c,"KHR_binary_glTF"),c}function vUe(e,t){let n=t[2],i=12,o,r;for(;i0){let a=s[0];a.extras._pipeline.source=r}}return o}var nM=BUe;function PUe(e){return Me.shader(e,function(t){lz(t)}),Me.buffer(e,function(t){lz(t)}),Me.image(e,function(t){lz(t)}),lz(e),e}function lz(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var iM=PUe;function RUe(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),Hs(n,t,!0)}var sd=RUe;function MUe(e){switch(e){case q.BYTE:return function(t,n,i,o,r){for(let s=0;s-1:!1}var FUe=[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 QUe(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(FUe.indexOf(e[n])===-1)return t;return e}function kUe(e){let t={},n={},i=e.techniques;return l(i)&&(Me.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(Fae(s,te.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:c.blendEquationSeparate??LUe,blendFactors:QUe(c.blendFuncSeparate,OUe)})}Fae(s,te.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),sd(e,"KHR_blend")),Me.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Me.objectLegacy(r,function(a,c){o[c]=a});let s=t[o.technique];l(s)&&(l(o.extensions)||(o.extensions={}),o.extensions.KHR_blend=s)}})),e}var oM=kUe;function UUe(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),Hs(n,t,!0),sd(e,t)}var rM=UUe;function GUe(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Me.technique(e,function(a,c){let u={name:a.name,program:void 0,attributes:{},uniforms:{}},f;if(Me.techniqueAttribute(a,function(h,p){f=a.parameters[h],u.attributes[p]={semantic:f.semantic}}),Me.techniqueUniform(a,function(h,p){f=a.parameters[h],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][h]=p}),l(o[a.program]))u.program=o[a.program];else{let h=e.programs[a.program],p={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},g=e.shaders[h.fragmentShader];p.fragmentShader=Hs(r.shaders,g,!0);let m=e.shaders[h.vertexShader];p.vertexShader=Hs(r.shaders,m,!0),u.program=Hs(r.programs,p),o[a.program]=u.program}i[c]=Hs(r.techniques,u)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,sd(e,"KHR_techniques_webgl"),rM(e,"KHR_techniques_webgl"))}return Me.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};Me.objectLegacy(r.values,function(a,c){l(s.values)||(s.values={});let u=n[r.technique][c];l(u)&&(s.values[u]=a)}),l(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl=s}delete r.technique,delete r.values}),delete e.techniques,delete e.programs,delete e.shaders,e}var sM=GUe;function zUe(e,t){vo.typeOf.object("material",e),vo.defined("handler",t);let n=e.pbrMetallicRoughness;if(l(n)){if(l(n.baseColorTexture)){let r=n.baseColorTexture,s=t(r.index,r);if(l(s))return s}if(l(n.metallicRoughnessTexture)){let r=n.metallicRoughnessTexture,s=t(r.index,r);if(l(s))return s}}let{extensions:i}=e;if(l(i)){let r=i.KHR_materials_pbrSpecularGlossiness;if(l(r)){if(l(r.diffuseTexture)){let c=r.diffuseTexture,u=t(c.index,c);if(l(u))return u}if(l(r.specularGlossinessTexture)){let c=r.specularGlossinessTexture,u=t(c.index,c);if(l(u))return u}}let s=i.KHR_materials_specular;if(l(s)){let{specularTexture:c,specularColorTexture:u}=s;if(l(c)){let f=t(c.index,c);if(l(f))return f}if(l(u)){let f=t(u.index,u);if(l(f))return f}}let a=i.KHR_materials_common;if(l(a)&&l(a.values)){let{diffuse:c,ambient:u,emission:f,specular:h}=a.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(f)&&l(f.index)){let p=t(f.index,f);if(l(p))return p}if(l(h)&&l(h.index)){let p=t(h.index,h);if(l(p))return p}}}let o=Me.materialValue(e,function(r){if(l(r.index)){let s=t(r.index,r);if(l(s))return s}});if(l(o))return o;if(l(e.emissiveTexture)){let r=e.emissiveTexture,s=t(r.index,r);if(l(s))return s}if(l(e.normalTexture)){let r=e.normalTexture,s=t(r.index,r);if(l(s))return s}if(l(e.occlusionTexture)){let r=e.occlusionTexture,s=t(r.index,r);if(l(s))return s}}var xb=zUe;var Qae=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function VUe(e,t){return t=t??Qae,Qae.forEach(function(n){t.indexOf(n)>-1&&WUe(e,n)}),e}var HUe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function WUe(e,t){let n=HUe[t],i=e[n];if(l(i)){let o=0,r=Xm[t](e),s=i.length;for(let a=0;at&&o.attributes[c]--}),Me.meshPrimitiveTarget(o,function(a){Me.meshPrimitiveTargetAttribute(a,function(c,u){c>t&&a[u]--})});let r=o.indices;l(r)&&r>t&&o.indices--;let s=o.extensions;l(s)&&l(s.CESIUM_primitive_outline)&&s.CESIUM_primitive_outline.indices>t&&--s.CESIUM_primitive_outline.indices})}),Me.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Me.animation(e,function(i){Me.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};Km.buffer=function(e,t){e.buffers.splice(t,1),Me.bufferView(e,function(i){l(i.buffer)&&i.buffer>t&&i.buffer--,l(i.extensions)&&l(i.extensions.EXT_meshopt_compression)&&i.extensions.EXT_meshopt_compression.buffer--})};Km.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Me.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Me.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Me.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Sr(e,"KHR_draco_mesh_compression")&&Me.mesh(e,function(i){Me.meshPrimitive(i,function(o){l(o.extensions)&&l(o.extensions.KHR_draco_mesh_compression)&&o.extensions.KHR_draco_mesh_compression.bufferView>t&&o.extensions.KHR_draco_mesh_compression.bufferView--})}),Sr(e,"EXT_feature_metadata")){let o=e.extensions.EXT_feature_metadata.featureTables;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].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(Sr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTables;if(l(o)){let r=o.length;for(let s=0;st&&f.values--,l(f.arrayOffsets)&&f.arrayOffsets>t&&f.arrayOffsets--,l(f.stringOffsets)&&f.stringOffsets>t&&f.stringOffsets--}}}}};Km.image=function(e,t){e.images.splice(t,1),Me.texture(e,function(i){l(i.source)&&i.source>t&&--i.source;let o=i.extensions;l(o)&&l(o.EXT_texture_webp)&&o.EXT_texture_webp.source>t?--i.extensions.EXT_texture_webp.source:l(o)&&l(o.KHR_texture_basisu)&&o.KHR_texture_basisu.source>t&&--i.extensions.KHR_texture_basisu.source})};Km.mesh=function(e,t){e.meshes.splice(t,1),Me.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};Km.node=function(e,t){e.nodes.splice(t,1),Me.skin(e,function(i){l(i.skeleton)&&i.skeleton>t&&i.skeleton--,i.joints=i.joints.map(function(o){return o>t?o-1:o})}),Me.animation(e,function(i){Me.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Me.technique(e,function(i){Me.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Me.node(e,function(i){l(i.children)&&(i.children=i.children.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o}))}),Me.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};Km.material=function(e,t){e.materials.splice(t,1),Me.mesh(e,function(i){Me.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};Km.sampler=function(e,t){e.samplers.splice(t,1),Me.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};Km.texture=function(e,t){if(e.textures.splice(t,1),Me.material(e,function(i){xb(i,function(o,r){r.index>t&&--r.index})}),Sr(e,"EXT_feature_metadata")){Me.mesh(e,function(r){Me.meshPrimitive(r,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 h=0;ht&&--g.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let f=a[c].texture;f.index>t&&--f.index}}}}if(Sr(e,"EXT_mesh_features")&&Me.mesh(e,function(i){Me.meshPrimitive(i,function(o){let r=o.extensions;if(l(r)&&l(r.EXT_mesh_features)){let a=r.EXT_mesh_features.featureIds;if(l(a)){let c=a.length;for(let u=0;ut&&--f.texture.index}}}})}),Sr(e,"EXT_structural_metadata")){let o=e.extensions.EXT_structural_metadata.propertyTextures;if(l(o)){let r=o.length;for(let s=0;st&&--f.index}}}}};function Xm(){}Xm.accessor=function(e){let t={};return Me.mesh(e,function(n){Me.meshPrimitive(n,function(i){Me.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Me.meshPrimitiveTarget(i,function(r){Me.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Me.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Me.animation(e,function(n){Me.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),Sr(e,"EXT_mesh_gpu_instancing")&&Me.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 o=n.extensions.EXT_mesh_gpu_instancing.attributes[i];t[o]=!0})}),Sr(e,"CESIUM_primitive_outline")&&Me.mesh(e,function(n){Me.meshPrimitive(n,function(i){let o=i.extensions;if(l(o)&&l(o.CESIUM_primitive_outline)){let s=o.CESIUM_primitive_outline.indices;l(s)&&(t[s]=!0)}})}),t};Xm.buffer=function(e){let t={};return Me.bufferView(e,function(n){l(n.buffer)&&(t[n.buffer]=!0),l(n.extensions)&&l(n.extensions.EXT_meshopt_compression)&&(t[n.extensions.EXT_meshopt_compression.buffer]=!0)}),t};Xm.bufferView=function(e){let t={};if(Me.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Me.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Me.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Sr(e,"KHR_draco_mesh_compression")&&Me.mesh(e,function(n){Me.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),Sr(e,"EXT_feature_metadata")){let i=e.extensions.EXT_feature_metadata.featureTables;for(let o in i)if(i.hasOwnProperty(o)){let s=i[o].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(Sr(e,"EXT_structural_metadata")){let i=e.extensions.EXT_structural_metadata.propertyTables;if(l(i)){let o=i.length;for(let r=0;r0&&(t[n.mesh]=!0)}}),t};function kae(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(o){return!kae(e,o,n)}).length===0}Xm.node=function(e){let t={};return Me.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Me.skinJoint(n,function(i){t[i]=!0})}),Me.animation(e,function(n){Me.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Me.technique(e,function(n){Me.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Me.node(e,function(n,i){kae(e,i,t)||(t[i]=!0)}),t};Xm.material=function(e){let t={};return Me.mesh(e,function(n){Me.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};Xm.texture=function(e){let t={};if(Me.material(e,function(n){xb(n,function(i){t[i]=!0})}),Sr(e,"EXT_feature_metadata")){Me.mesh(e,function(o){Me.meshPrimitive(o,function(r){let s=r.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;f0)for(s.mesh=n.meshes[c[0]],t=1;t0&&l(s.skin)){let f=e.skins[s.skin];f.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),Me.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=0&&(a=r.substring(0,s),c=r.substring(s));let u,f=mGe[a];l(f)?(u=f+c,t[r]=u):l(hGe[a])||(u=`_${r}`,t[r]=u)}});for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o],s=i.attributes[o];l(s)&&(delete i.attributes[o],i.attributes[r]=s)}})}),Me.technique(e,function(n){Me.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function AGe(e){Me.camera(e,function(t){let n=t.perspective;if(l(n)){let i=n.aspectRatio;l(i)&&i===0&&delete n.aspectRatio;let o=n.yfov;l(o)&&o===0&&(n.yfov=1)}})}function QW(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:au(e,t)}function gGe(e){Me.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Me.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=QW(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(i.byteLength??0,r)}})}function _Ge(e){let t,n,i,o=e.bufferViews,r={};Me.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};Me.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=o[a];let c=s[a];c.sort(function(p,g){return p.byteOffset-g.byteOffset});let u=0,f=0,h=c.length;for(t=0;t=0;--r)if(i[r]===t){i.splice(r,1);return}}}),Me.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),Vae(n)&&Hae(e,i))}}),delete e.nodes[t]}function CGe(e){return Me.node(e,function(t,n){Vae(t)&&Hae(e,n)}),e}function EGe(e){Me.animation(e,function(t){Me.animationSampler(t,function(n){let i=e.accessors[n.input];if(!l(i.min)||!l(i.max)){let o=jE(e,i);i.min=o.min,i.max=o.max}})})}function IGe(e){Me.accessor(e,function(t){if(l(t.min)||l(t.max)){let n=jE(e,t);l(t.min)&&(t.min=n.min),l(t.max)&&(t.max=n.max)}})}function xGe(e){e.asset=e.asset??{},e.asset.version="2.0",zae(e),iGe(e),CGe(e),oGe(e),rGe(e),aGe(e),lGe(e),gGe(e),_Ge(e),yGe(e),EGe(e),IGe(e),uGe(e),fGe(e),dGe(e),pGe(e),uM(e),AGe(e),oM(e),sM(e),sGe(e)}var bGe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],TGe=["u_diffuse","u_diffuse_mat"];function kW(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function UW(e){return l(e.index)}function GW(e){return Array.isArray(e)&&e.length===4}function Wae(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 SGe(e,t){t=t??V.EMPTY_OBJECT;let n=t.baseColorTextureNames??bGe,i=t.baseColorFactorNames??TGe;Me.material(e,function(o){Me.materialValue(o,function(r,s){n.indexOf(s)!==-1&&UW(r)?(kW(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&GW(r)&&(kW(o),o.pbrMetallicRoughness.baseColorFactor=Wae(r))})}),YE(e,"KHR_techniques_webgl"),YE(e,"KHR_blend")}function FW(e,t){l(t)&&(GW(t)?e.pbrMetallicRoughness.baseColorFactor=Wae(t):UW(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function Gae(e,t){l(t)&&(GW(t)?e.emissiveFactor=t.slice(0,3):UW(t)&&(e.emissiveTexture=t))}function wGe(e){Me.material(e,function(t){let n=(t.extensions??V.EMPTY_OBJECT).KHR_materials_common;if(!l(n))return;let i=n.values??{},o=i.ambient,r=i.diffuse,s=i.emission,a=i.transparency,c=n.doubleSided,u=n.transparent;kW(t),n.technique==="CONSTANT"?(sd(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},FW(t,s),FW(t,o)):(FW(t,r),Gae(t,o),Gae(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")}),YE(e,"KHR_materials_common")}var fM=JUe;function Lc(){}Lc.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=` ${n.message}`);let o=new ce(i);return l(n)&&(o.stack=`Original stack: ${n.stack} Handler stack: ${o.stack}`),o};Lc.getNodeTransform=function(e){return l(e.matrix)?e.matrix:M.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:d.ZERO,l(e.rotation)?e.rotation:Fe.IDENTITY,l(e.scale)?e.scale:d.ONE)};Lc.getAttributeBySemantic=function(e,t,n){let i=e.attributes,o=i.length;for(let r=0;r{var e=mz.url;return async function(t={}){var n,i=t,o,r,s=new Promise((ie,ee)=>{o=ie,r=ee}),a=typeof window=="object",c=typeof WorkerGlobalScope<"u",u=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(u){let{createRequire:ie}=await Promise.resolve().then(()=>Cze),ee=mz.url;ee.startsWith("data:")&&(ee="/");var f=ie(ee)}var h=Object.assign({},i),p="./this.program",g="",m;if(u){var _=f("fs"),y=f("path");mz.url.startsWith("data:")||(g=y.dirname(f("url").fileURLToPath(mz.url))+"/"),m=ie=>(ie=Z(ie)?new URL(ie):y.normalize(ie),_.readFileSync(ie)),!i.thisProgram&&1{var ee=new XMLHttpRequest;return ee.open("GET",ie,!1),ee.responseType="arraybuffer",ee.send(null),new Uint8Array(ee.response)}));var C=i.print||console.log.bind(console),E=i.printErr||console.error.bind(console);Object.assign(i,h),h=null,i.thisProgram&&(p=i.thisProgram);var I=i.wasmBinary,b,S=!1,B,v,P,N,L,A,x,T;function w(){var ie=b.buffer;i.HEAP8=B=new Int8Array(ie),i.HEAP16=P=new Int16Array(ie),i.HEAPU8=v=new Uint8Array(ie),i.HEAPU16=N=new Uint16Array(ie),i.HEAP32=L=new Int32Array(ie),i.HEAPU32=A=new Uint32Array(ie),i.HEAPF32=x=new Float32Array(ie),i.HEAPF64=T=new Float64Array(ie)}var R=[],O=[],k=[];function F(){var ie=i.preRun.shift();R.unshift(ie)}var z=0,Q=null;function H(ie){var ee;throw(ee=i.onAbort)==null||ee.call(i,ie),ie="Aborted("+ie+")",E(ie),S=!0,ie=new WebAssembly.RuntimeError(ie+". Build with -sASSERTIONS for more info."),r(ie),ie}var j=ie=>ie.startsWith("data:application/octet-stream;base64,"),Z=ie=>ie.startsWith("file://"),Y;function $(){var ie=Y;return Promise.resolve().then(()=>{if(ie==Y&&I)var ee=new Uint8Array(I);else{if(j(ie))if(ee=ie.slice(37),typeof u<"u"&&u)ee=Buffer.from(ee,"base64"),ee=new Uint8Array(ee.buffer,ee.byteOffset,ee.length);else{ee=atob(ee);for(var xe=new Uint8Array(ee.length),Se=0;SeWebAssembly.instantiate(xe,ie)).then(ee,xe=>{E(`failed to asynchronously prepare wasm: ${xe}`),H(xe)})}function pe(ie,ee){return J(ie,ee)}var Ce=ie=>{for(;0{for(;ie.length;){var ee=ie.pop();ie.pop()(ee)}};function Ie(ie){return this.fromWireType(A[ie>>2])}var ve={},be={},ze={},We,tt=(ie,ee,xe)=>{function Se(dt){if(dt=xe(dt),dt.length!==ie.length)throw new We("Mismatched type converter count");for(var on=0;onze[dt]=ee);var Pe=Array(ee.length),lt=[],bt=0;ee.forEach((dt,on)=>{be.hasOwnProperty(dt)?Pe[on]=be[dt]:(lt.push(dt),ve.hasOwnProperty(dt)||(ve[dt]=[]),ve[dt].push(()=>{Pe[on]=be[dt],++bt,bt===lt.length&&Se(Pe)}))}),lt.length===0&&Se(Pe)},Mt,kt=ie=>{for(var ee="";v[ie];)ee+=Mt[v[ie++]];return ee},Oe,_n=ie=>{throw new Oe(ie)};function Ut(ie,ee,xe={}){var Se=ee.name;if(!ie)throw new Oe(`type "${Se}" must have a positive integer typeid pointer`);if(be.hasOwnProperty(ie)){if(xe.sa)return;throw new Oe(`Cannot register type '${Se}' twice`)}be[ie]=ee,delete ze[ie],ve.hasOwnProperty(ie)&&(ee=ve[ie],delete ve[ie],ee.forEach(Pe=>Pe()))}function gt(ie,ee,xe={}){return Ut(ie,ee,xe)}var ti=ie=>{throw new Oe(ie.K.N.L.name+" instance already deleted")},ai=!1,Vt=()=>{},wt=(ie,ee,xe)=>ee===xe?ie:xe.R===void 0?null:(ie=wt(ie,ee,xe.R),ie===null?null:xe.la(ie)),qi={},Et={},Ho=(ie,ee)=>{if(ee===void 0)throw new Oe("ptr should not be undefined");for(;ie.R;)ee=ie.aa(ee),ie=ie.R;return Et[ee]},No=(ie,ee)=>{if(!ee.N||!ee.M)throw new We("makeClassHandle requires ptr and ptrType");if(!!ee.S!=!!ee.P)throw new We("Both smartPtrType and smartPtr must be specified");return ee.count={value:1},ds(Object.create(ie,{K:{value:ee,writable:!0}}))},ds=ie=>typeof FinalizationRegistry>"u"?(ds=ee=>ee,ie):(ai=new FinalizationRegistry(ee=>{ee=ee.K,--ee.count.value,ee.count.value===0&&(ee.P?ee.S.U(ee.P):ee.N.L.U(ee.M))}),ds=ee=>{var xe=ee.K;return xe.P&&ai.register(ee,{K:xe},ee),ee},Vt=ee=>{ai.unregister(ee)},ds(ie));function Wo(){}var Ir=(ie,ee)=>Object.defineProperty(ee,"name",{value:ie}),ke=(ie,ee,xe)=>{if(ie[ee].O===void 0){var Se=ie[ee];ie[ee]=function(...Pe){if(!ie[ee].O.hasOwnProperty(Pe.length))throw new Oe(`Function '${xe}' called with an invalid number of arguments (${Pe.length}) - expects one of (${ie[ee].O})!`);return ie[ee].O[Pe.length].apply(this,Pe)},ie[ee].O=[],ie[ee].O[Se.Y]=Se}},ct=(ie,ee,xe)=>{if(i.hasOwnProperty(ie)){if(xe===void 0||i[ie].O!==void 0&&i[ie].O[xe]!==void 0)throw new Oe(`Cannot register public name '${ie}' twice`);if(ke(i,ie,ie),i[ie].O.hasOwnProperty(xe))throw new Oe(`Cannot register multiple overloads of a function with the same number of arguments (${xe})!`);i[ie].O[xe]=ee}else i[ie]=ee,i[ie].Y=xe},Xe=ie=>{ie=ie.replace(/[^a-zA-Z0-9_]/g,"$");var ee=ie.charCodeAt(0);return 48<=ee&&57>=ee?`_${ie}`:ie};function et(ie,ee,xe,Se,Pe,lt,bt,dt){this.name=ie,this.constructor=ee,this.X=xe,this.U=Se,this.R=Pe,this.na=lt,this.aa=bt,this.la=dt,this.ua=[]}var pt=(ie,ee,xe)=>{for(;ee!==xe;){if(!ee.aa)throw new Oe(`Expected null or instance of ${xe.name}, got an instance of ${ee.name}`);ie=ee.aa(ie),ee=ee.R}return ie};function Zt(ie,ee){if(ee===null){if(this.ea)throw new Oe(`null is not a valid ${this.name}`);return 0}if(!ee.K)throw new Oe(`Cannot pass "${Ic(ee)}" as a ${this.name}`);if(!ee.K.M)throw new Oe(`Cannot pass deleted object as a pointer of type ${this.name}`);return pt(ee.K.M,ee.K.N.L,this.L)}function Tn(ie,ee){if(ee===null){if(this.ea)throw new Oe(`null is not a valid ${this.name}`);if(this.da){var xe=this.fa();return ie!==null&&ie.push(this.U,xe),xe}return 0}if(!ee||!ee.K)throw new Oe(`Cannot pass "${Ic(ee)}" as a ${this.name}`);if(!ee.K.M)throw new Oe(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ba&&ee.K.N.ba)throw new Oe(`Cannot convert argument of type ${ee.K.S?ee.K.S.name:ee.K.N.name} to parameter type ${this.name}`);if(xe=pt(ee.K.M,ee.K.N.L,this.L),this.da){if(ee.K.P===void 0)throw new Oe("Passing raw pointer to smart pointer is illegal");switch(this.za){case 0:if(ee.K.S===this)xe=ee.K.P;else throw new Oe(`Cannot convert argument of type ${ee.K.S?ee.K.S.name:ee.K.N.name} to parameter type ${this.name}`);break;case 1:xe=ee.K.P;break;case 2:if(ee.K.S===this)xe=ee.K.P;else{var Se=ee.clone();xe=this.va(xe,ra(()=>Se.delete())),ie!==null&&ie.push(this.U,xe)}break;default:throw new Oe("Unsupporting sharing policy")}}return xe}function Bo(ie,ee){if(ee===null){if(this.ea)throw new Oe(`null is not a valid ${this.name}`);return 0}if(!ee.K)throw new Oe(`Cannot pass "${Ic(ee)}" as a ${this.name}`);if(!ee.K.M)throw new Oe(`Cannot pass deleted object as a pointer of type ${this.name}`);if(ee.K.N.ba)throw new Oe(`Cannot convert argument of type ${ee.K.N.name} to parameter type ${this.name}`);return pt(ee.K.M,ee.K.N.L,this.L)}function lo(ie,ee,xe,Se,Pe,lt,bt,dt,on,pn,vn){this.name=ie,this.L=ee,this.ea=xe,this.ba=Se,this.da=Pe,this.ta=lt,this.za=bt,this.ja=dt,this.fa=on,this.va=pn,this.U=vn,Pe||ee.R!==void 0?this.toWireType=Tn:(this.toWireType=Se?Zt:Bo,this.T=null)}var ia=(ie,ee,xe)=>{if(!i.hasOwnProperty(ie))throw new We("Replacing nonexistent public symbol");i[ie].O!==void 0&&xe!==void 0?i[ie].O[xe]=ee:(i[ie]=ee,i[ie].Y=xe)},ks,xi=(ie,ee,xe=[])=>(ie.includes("j")?(ie=ie.replace(/p/g,"i"),ee=(0,i["dynCall_"+ie])(ee,...xe)):ee=ks.get(ee)(...xe),ee),Ei=(ie,ee)=>(...xe)=>xi(ie,ee,xe),Do=(ie,ee)=>{ie=kt(ie);var xe=ie.includes("j")?Ei(ie,ee):ks.get(ee);if(typeof xe!="function")throw new Oe(`unknown function pointer with signature ${ie}: ${ee}`);return xe},xr,$a=ie=>{ie=Wee(ie);var ee=kt(ie);return Yp(ie),ee},to=(ie,ee)=>{function xe(lt){Pe[lt]||be[lt]||(ze[lt]?ze[lt].forEach(xe):(Se.push(lt),Pe[lt]=!0))}var Se=[],Pe={};throw ee.forEach(xe),new xr(`${ie}: `+Se.map($a).join([", "]))},Jo=(ie,ee)=>{for(var xe=[],Se=0;Se>2]);return xe};function kf(ie){for(var ee=1;eebt)throw new Oe("argTypes array size mismatch! Must at least get return value and 'this' types!");var dt=ee[1]!==null&&xe!==null,on=kf(ee);for(xe=ee[0].name!=="void",Se=[ie,_n,Se,Pe,ye,ee[0],ee[1]],Pe=0;Pe{ie=ie.trim();let ee=ie.indexOf("(");return ee!==-1?ie.substr(0,ee):ie},th=[],Zo=[],ec=ie=>{9{switch(ie){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let ee=th.pop()||Zo.length;return Zo[ee]=ie,Zo[ee+1]=1,ee}},Lr={name:"emscripten::val",fromWireType:ie=>{if(!ie)throw new Oe("Cannot use deleted val. handle = "+ie);var ee=Zo[ie];return ec(ie),ee},toWireType:(ie,ee)=>ra(ee),V:8,readValueFromPointer:Ie,T:null},Ic=ie=>{if(ie===null)return"null";var ee=typeof ie;return ee==="object"||ee==="array"||ee==="function"?ie.toString():""+ie},Yl=(ie,ee)=>{switch(ee){case 4:return function(xe){return this.fromWireType(x[xe>>2])};case 8:return function(xe){return this.fromWireType(T[xe>>3])};default:throw new TypeError(`invalid float width (${ee}): ${ie}`)}},ql=(ie,ee,xe)=>{switch(ee){case 1:return xe?Se=>B[Se]:Se=>v[Se];case 2:return xe?Se=>P[Se>>1]:Se=>N[Se>>1];case 4:return xe?Se=>L[Se>>2]:Se=>A[Se>>2];default:throw new TypeError(`invalid integer width (${ee}): ${ie}`)}},Lo=Object.assign({optional:!0},Lr),an=(ie,ee,xe)=>{var Se=v;if(0=lt){var bt=ie.charCodeAt(++Pe);lt=65536+((lt&1023)<<10)|bt&1023}if(127>=lt){if(ee>=xe)break;Se[ee++]=lt}else{if(2047>=lt){if(ee+1>=xe)break;Se[ee++]=192|lt>>6}else{if(65535>=lt){if(ee+2>=xe)break;Se[ee++]=224|lt>>12}else{if(ee+3>=xe)break;Se[ee++]=240|lt>>18,Se[ee++]=128|lt>>12&63}Se[ee++]=128|lt>>6&63}Se[ee++]=128|lt&63}}Se[ee]=0}},Te=typeof TextDecoder<"u"?new TextDecoder:void 0,xt=(ie,ee=0,xe=NaN)=>{var Se=ee+xe;for(xe=ee;ie[xe]&&!(xe>=Se);)++xe;if(16Pe?Se+=String.fromCharCode(Pe):(Pe-=65536,Se+=String.fromCharCode(55296|Pe>>10,56320|Pe&1023))}}else Se+=String.fromCharCode(Pe)}return Se},yn=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,sr=(ie,ee)=>{for(var xe=ie>>1,Se=xe+ee/2;!(xe>=Se)&&N[xe];)++xe;if(xe<<=1,32=ee/2);++Se){var Pe=P[ie+2*Se>>1];if(Pe==0)break;xe+=String.fromCharCode(Pe)}return xe},va=(ie,ee,xe)=>{if(xe??(xe=2147483647),2>xe)return 0;xe-=2;var Se=ee;xe=xe<2*ie.length?xe/2:ie.length;for(var Pe=0;Pe>1]=ie.charCodeAt(Pe),ee+=2;return P[ee>>1]=0,ee-Se},Ss=ie=>2*ie.length,xc=(ie,ee)=>{for(var xe=0,Se="";!(xe>=ee/4);){var Pe=L[ie+4*xe>>2];if(Pe==0)break;++xe,65536<=Pe?(Pe-=65536,Se+=String.fromCharCode(55296|Pe>>10,56320|Pe&1023)):Se+=String.fromCharCode(Pe)}return Se},nh=(ie,ee,xe)=>{if(xe??(xe=2147483647),4>xe)return 0;var Se=ee;xe=Se+xe-4;for(var Pe=0;Pe=lt){var bt=ie.charCodeAt(++Pe);lt=65536+((lt&1023)<<10)|bt&1023}if(L[ee>>2]=lt,ee+=4,ee+4>xe)break}return L[ee>>2]=0,ee-Se},MC=ie=>{for(var ee=0,xe=0;xe=Se&&++xe,ee+=4}return ee},NC={},sa=()=>{if(!Dx){var ie={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:p||"./this.program"},ee;for(ee in NC)NC[ee]===void 0?delete ie[ee]:ie[ee]=NC[ee];var xe=[];for(ee in ie)xe.push(`${ee}=${ie[ee]}`);Dx=xe}return Dx},Dx,TU=[null,[],[]];We=i.InternalError=class extends Error{constructor(ie){super(ie),this.name="InternalError"}};for(var Hee=Array(256),SU=0;256>SU;++SU)Hee[SU]=String.fromCharCode(SU);Mt=Hee,Oe=i.BindingError=class extends Error{constructor(ie){super(ie),this.name="BindingError"}},Object.assign(Wo.prototype,{isAliasOf:function(ie){if(!(this instanceof Wo&&ie instanceof Wo))return!1;var ee=this.K.N.L,xe=this.K.M;ie.K=ie.K;var Se=ie.K.N.L;for(ie=ie.K.M;ee.R;)xe=ee.aa(xe),ee=ee.R;for(;Se.R;)ie=Se.aa(ie),Se=Se.R;return ee===Se&&xe===ie},clone:function(){if(this.K.M||ti(this),this.K.$)return this.K.count.value+=1,this;var ie=ds,ee=Object,xe=ee.create,Se=Object.getPrototypeOf(this),Pe=this.K;return ie=ie(xe.call(ee,Se,{K:{value:{count:Pe.count,Z:Pe.Z,$:Pe.$,M:Pe.M,N:Pe.N,P:Pe.P,S:Pe.S}}})),ie.K.count.value+=1,ie.K.Z=!1,ie},delete(){if(this.K.M||ti(this),this.K.Z&&!this.K.$)throw new Oe("Object already scheduled for deletion");Vt(this);var ie=this.K;--ie.count.value,ie.count.value===0&&(ie.P?ie.S.U(ie.P):ie.N.L.U(ie.M)),this.K.$||(this.K.P=void 0,this.K.M=void 0)},isDeleted:function(){return!this.K.M},deleteLater:function(){if(this.K.M||ti(this),this.K.Z&&!this.K.$)throw new Oe("Object already scheduled for deletion");return this.K.Z=!0,this}}),Object.assign(lo.prototype,{oa(ie){return this.ja&&(ie=this.ja(ie)),ie},ha(ie){var ee;(ee=this.U)==null||ee.call(this,ie)},V:8,readValueFromPointer:Ie,fromWireType:function(ie){function ee(){return this.da?No(this.L.X,{N:this.ta,M:xe,S:this,P:ie}):No(this.L.X,{N:this,M:ie})}var xe=this.oa(ie);if(!xe)return this.ha(ie),null;var Se=Ho(this.L,xe);if(Se!==void 0)return Se.K.count.value===0?(Se.K.M=xe,Se.K.P=ie,Se.clone()):(Se=Se.clone(),this.ha(ie),Se);if(Se=this.L.na(xe),Se=qi[Se],!Se)return ee.call(this);Se=this.ba?Se.ka:Se.pointerType;var Pe=wt(xe,this.L,Se.L);return Pe===null?ee.call(this):this.da?No(Se.L.X,{N:Se,M:Pe,S:this,P:ie}):No(Se.L.X,{N:Se,M:Pe})}}),xr=i.UnboundTypeError=((ie,ee)=>{var xe=Ir(ee,function(Se){this.name=ee,this.message=Se,Se=Error(Se).stack,Se!==void 0&&(this.stack=this.toString()+` `+Se.replace(/^Error(:[^\n]*)?\n/,""))});return xe.prototype=Object.create(ie.prototype),xe.prototype.constructor=xe,xe.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},xe})(Error,"UnboundTypeError"),Zo.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=()=>Zo.length/2-5-th.length;var iwe={u:()=>{H("")},y:ie=>{var ee=fe[ie];delete fe[ie];var xe=ee.fa,Se=ee.U,Pe=ee.ia,lt=Pe.map(bt=>bt.ra).concat(Pe.map(bt=>bt.xa));tt([ie],lt,bt=>{var dt={};return Pe.forEach((on,pn)=>{var vn=bt[pn],Us=on.pa,tc=on.qa,ol=bt[pn+Pe.length],nc=on.wa,Uf=on.ya;dt[on.ma]={read:qp=>vn.fromWireType(Us(tc,qp)),write:(qp,Zw)=>{var Lu=[];nc(Uf,qp,ol.toWireType(Lu,Zw)),ye(Lu)}}}),[{name:ee.name,fromWireType:on=>{var pn={},vn;for(vn in dt)pn[vn]=dt[vn].read(on);return Se(on),pn},toWireType:(on,pn)=>{for(var vn in dt)if(!(vn in pn))throw new TypeError(`Missing field: "${vn}"`);var Us=xe();for(vn in dt)dt[vn].write(Us,pn[vn]);return on!==null&&on.push(Se,Us),Us},V:8,readValueFromPointer:Ie,T:Se}]})},p:()=>{},w:(ie,ee,xe,Se)=>{ee=kt(ee),gt(ie,{name:ee,fromWireType:function(Pe){return!!Pe},toWireType:function(Pe,lt){return lt?xe:Se},V:8,readValueFromPointer:function(Pe){return this.fromWireType(v[Pe])},T:null})},i:(ie,ee,xe,Se,Pe,lt,bt,dt,on,pn,vn,Us,tc)=>{vn=kt(vn),lt=Do(Pe,lt),dt&&(dt=Do(bt,dt)),pn&&(pn=Do(on,pn)),tc=Do(Us,tc);var ol=Xe(vn);ct(ol,function(){to(`Cannot construct ${vn} due to unbound types`,[Se])}),tt([ie,ee,xe],Se?[Se]:[],nc=>{if(nc=nc[0],Se)var Uf=nc.L,qp=Uf.X;else qp=Wo.prototype;nc=Ir(vn,function(...k5){if(Object.getPrototypeOf(this)!==Zw)throw new Oe("Use 'new' to construct "+vn);if(Lu.W===void 0)throw new Oe(vn+" has no accessible constructor");var Yee=Lu.W[k5.length];if(Yee===void 0)throw new Oe(`Tried to invoke ctor of ${vn} with invalid number of parameters (${k5.length}) - expected (${Object.keys(Lu.W).toString()}) parameters instead!`);return Yee.apply(this,k5)});var Zw=Object.create(qp,{constructor:{value:nc}});nc.prototype=Zw;var Lu=new et(vn,nc,Zw,tc,Uf,lt,dt,pn);if(Lu.R){var $w;($w=Lu.R).ga??($w.ga=[]),Lu.R.ga.push(Lu)}return Uf=new lo(vn,Lu,!0,!1,!1),$w=new lo(vn+"*",Lu,!1,!1,!1),qp=new lo(vn+" const*",Lu,!1,!0,!1),qi[ie]={pointerType:$w,ka:qp},ia(ol,nc),[Uf,$w,qp]})},g:(ie,ee,xe,Se,Pe,lt)=>{var bt=Jo(ee,xe);Pe=Do(Se,Pe),tt([],[ie],dt=>{dt=dt[0];var on=`constructor ${dt.name}`;if(dt.L.W===void 0&&(dt.L.W=[]),dt.L.W[ee-1]!==void 0)throw new Oe(`Cannot register multiple constructors with identical number of parameters (${ee-1}) for class '${dt.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return dt.L.W[ee-1]=()=>{to(`Cannot construct ${dt.name} due to unbound types`,bt)},tt([],bt,pn=>(pn.splice(1,0,null),dt.L.W[ee-1]=Da(on,pn,null,Pe,lt),[])),[]})},b:(ie,ee,xe,Se,Pe,lt,bt,dt,on)=>{var pn=Jo(xe,Se);ee=kt(ee),ee=oa(ee),lt=Do(Pe,lt),tt([],[ie],vn=>{function Us(){to(`Cannot call ${tc} due to unbound types`,pn)}vn=vn[0];var tc=`${vn.name}.${ee}`;ee.startsWith("@@")&&(ee=Symbol[ee.substring(2)]),dt&&vn.L.ua.push(ee);var ol=vn.L.X,nc=ol[ee];return nc===void 0||nc.O===void 0&&nc.className!==vn.name&&nc.Y===xe-2?(Us.Y=xe-2,Us.className=vn.name,ol[ee]=Us):(ke(ol,ee,tc),ol[ee].O[xe-2]=Us),tt([],pn,Uf=>(Uf=Da(tc,Uf,vn,lt,bt,on),ol[ee].O===void 0?(Uf.Y=xe-2,ol[ee]=Uf):ol[ee].O[xe-2]=Uf,[])),[]})},v:ie=>gt(ie,Lr),l:(ie,ee,xe)=>{ee=kt(ee),gt(ie,{name:ee,fromWireType:Se=>Se,toWireType:(Se,Pe)=>Pe,V:8,readValueFromPointer:Yl(ee,xe),T:null})},m:(ie,ee,xe,Se,Pe,lt,bt)=>{var dt=Jo(ee,xe);ie=kt(ie),ie=oa(ie),Pe=Do(Se,Pe),ct(ie,function(){to(`Cannot call ${ie} due to unbound types`,dt)},ee-1),tt([],dt,on=>(on=[on[0],null].concat(on.slice(1)),ia(ie,Da(ie,on,null,Pe,lt,bt),ee-1),[]))},c:(ie,ee,xe,Se,Pe)=>{if(ee=kt(ee),Pe===-1&&(Pe=4294967295),Pe=dt=>dt,Se===0){var lt=32-8*xe;Pe=dt=>dt<>>lt}var bt=ee.includes("unsigned")?function(dt,on){return on>>>0}:function(dt,on){return on};gt(ie,{name:ee,fromWireType:Pe,toWireType:bt,V:8,readValueFromPointer:ql(ee,xe,Se!==0),T:null})},a:(ie,ee,xe)=>{function Se(lt){return new Pe(B.buffer,A[lt+4>>2],A[lt>>2])}var Pe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][ee];xe=kt(xe),gt(ie,{name:xe,fromWireType:Se,V:8,readValueFromPointer:Se},{sa:!0})},h:ie=>{gt(ie,Lo)},k:(ie,ee)=>{ee=kt(ee);var xe=ee==="std::string";gt(ie,{name:ee,fromWireType:function(Se){var Pe=A[Se>>2],lt=Se+4;if(xe)for(var bt=lt,dt=0;dt<=Pe;++dt){var on=lt+dt;if(dt==Pe||v[on]==0){if(bt=bt?xt(v,bt,on-bt):"",pn===void 0)var pn=bt;else pn+="\0",pn+=bt;bt=on+1}}else{for(pn=Array(Pe),dt=0;dt=on?lt++:2047>=on?lt+=2:55296<=on&&57343>=on?(lt+=4,++dt):lt+=3}else lt=Pe.length;if(dt=Q5(4+lt+1),on=dt+4,A[dt>>2]=lt,xe&&bt)an(Pe,on,lt+1);else if(bt)for(bt=0;bt{if(xe=kt(xe),ee===2)var Se=sr,Pe=va,lt=Ss,bt=dt=>N[dt>>1];else ee===4&&(Se=xc,Pe=nh,lt=MC,bt=dt=>A[dt>>2]);gt(ie,{name:xe,fromWireType:dt=>{for(var on=A[dt>>2],pn,vn=dt+4,Us=0;Us<=on;++Us){var tc=dt+4+Us*ee;(Us==on||bt(tc)==0)&&(vn=Se(vn,tc-vn),pn===void 0?pn=vn:(pn+="\0",pn+=vn),vn=tc+ee)}return Yp(dt),pn},toWireType:(dt,on)=>{if(typeof on!="string")throw new Oe(`Cannot pass non-string to C++ string type ${xe}`);var pn=lt(on),vn=Q5(4+pn+ee);return A[vn>>2]=pn/ee,Pe(on,vn+4,pn+ee),dt!==null&&dt.push(Yp,vn),vn},V:8,readValueFromPointer:Ie,T(dt){Yp(dt)}})},o:(ie,ee,xe,Se,Pe,lt)=>{fe[ie]={name:kt(ee),fa:Do(xe,Se),U:Do(Pe,lt),ia:[]}},d:(ie,ee,xe,Se,Pe,lt,bt,dt,on,pn)=>{fe[ie].ia.push({ma:kt(ee),ra:xe,pa:Do(Se,Pe),qa:lt,xa:bt,wa:Do(dt,on),ya:pn})},x:(ie,ee)=>{ee=kt(ee),gt(ie,{Aa:!0,name:ee,V:0,fromWireType:()=>{},toWireType:()=>{}})},n:ec,f:(ie,ee)=>{var xe=be[ie];if(xe===void 0)throw ie=`_emval_take_value has unknown type ${$a(ie)}`,new Oe(ie);return ie=xe,ie=ie.readValueFromPointer(ee),ra(ie)},q:(ie,ee,xe,Se)=>{var Pe=new Date().getFullYear(),lt=new Date(Pe,0,1).getTimezoneOffset();Pe=new Date(Pe,6,1).getTimezoneOffset(),A[ie>>2]=60*Math.max(lt,Pe),L[ee>>2]=+(lt!=Pe),ee=bt=>{var dt=Math.abs(bt);return`UTC${0<=bt?"-":"+"}${String(Math.floor(dt/60)).padStart(2,"0")}${String(dt%60).padStart(2,"0")}`},ie=ee(lt),ee=ee(Pe),Pe{var ee=v.length;if(ie>>>=0,2147483648=xe;xe*=2){var Se=ee*(1+.2/xe);Se=Math.min(Se,ie+100663296);e:{Se=(Math.min(2147483648,65536*Math.ceil(Math.max(ie,Se)/65536))-b.buffer.byteLength+65535)/65536|0;try{b.grow(Se),w();var Pe=1;break e}catch{}Pe=void 0}if(Pe)return!0}return!1},r:(ie,ee)=>{var xe=0;return sa().forEach((Se,Pe)=>{var lt=ee+xe;for(Pe=A[ie+4*Pe>>2]=lt,lt=0;lt{var xe=sa();A[ie>>2]=xe.length;var Se=0;return xe.forEach(Pe=>Se+=Pe.length+1),A[ee>>2]=Se,0},j:(ie,ee,xe,Se)=>{for(var Pe=0,lt=0;lt>2],dt=A[ee+4>>2];ee+=8;for(var on=0;on>2]=Pe,0}},Nu=function(){var ie;function ee(Se){var Pe;return Nu=Se.exports,b=Nu.z,w(),ks=Nu.B,O.unshift(Nu.A),z--,(Pe=i.monitorRunDependencies)==null||Pe.call(i,z),z==0&&Q&&(Se=Q,Q=null,Se()),Nu}z++,(ie=i.monitorRunDependencies)==null||ie.call(i,z);var xe={a:iwe};if(i.instantiateWasm)try{return i.instantiateWasm(xe,ee)}catch(Se){E(`Module.instantiateWasm callback failed with error: ${Se}`),r(Se)}return Y??(Y="data:application/octet-stream;base64,AGFzbQEAAAAB1AM4YAF/AX9gAn9/AGABfwBgAn9/AX9gA39/fwF/YAN/f38AYAZ/f39/f38Bf2AEf39/fwBgBX9/f39/AX9gBH9/f38Bf2AGf39/f39/AGAFf39/f38AYAh/f39/f39/fwF/YAAAYAd/f39/f39/AX9gB39/f39/f38AYAV/fn5+fgBgBX9/f39+AX9gCn9/f39/f39/f38AYAABf2AFf39+f38AYAh/f39/f39/fwBgBH9+fn8AYAN/fn8BfmAKf39/f39/f39/fwF/YAd/f39/f35+AX9gBn9/f39+fgF/YAJ/fgBgA39/fwF+YAx/f39/f39/f39/f38Bf2AGf39/f35/AX9gD39/f39/f39/f39/f39/fwBgC39/f39/f39/f39/AX9gBH9/f38BfmAGf3x/f39/AX9gBX9/f398AX9gDX9/f39/f39/f39/f38AYAJ/fABgBH5+fn4Bf2ACfn8Bf2ABfwF8YAR/f39+AX5gAn5+AXxgBH9/fn4AYAN/f38BfGADf39/AX1gA39/fgBgAn5+AX1gAn9/AX5gBH9+fn4AYAN+fn4Bf2ACfH8BfGAEf39/fQF/YAl/f39/f39/f38Bf2AEf39/fQBgA39/fQAClwEZAWEBYQAFAWEBYgASAWEBYwALAWEBZAASAWEBZQAFAWEBZgADAWEBZwAKAWEBaAABAWEBaQAkAWEBagAJAWEBawABAWEBbAAFAWEBbQAVAWEBbgACAWEBbwAKAWEBcAAPAWEBcQAHAWEBcgADAWEBcwADAWEBdAAAAWEBdQANAWEBdgACAWEBdwAHAWEBeAABAWEBeQACA4wFigUAAAEDAAACAAABAQEDAxMCEAADBQIAAAIEAAACDQQBBAAAEAMFBwEWCwEABAEADQAAABADAQgAAQEBBQQDAQAAAQEBAQUABAQFAAIDGwAAAwEICAkEACUADAwHDQEAAAEBAQADAAcDAAAFAwYAAwMBAQYEJgMDAAUWAgQBAAEAAQAFAwMYBAAYAQAAAQEAAwcAAQAnAw0CCAUDBQEAAAQCCwEVAAMAAAIBAAAAAQQHAw4DAwIOCQkDCQMABQMFAQEAAAECAQMoAAQABgEKBQcDBQEcAAAABAMAAwsBAgACBB0LBB0LAQcAKQAAEAACAQIJAgUEAgAAAxsBACoDDQ0CAg0AHgYe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An9B8OQBKAIAIgdBASABdCICcUUEQEHw5AEgAiAHcjYCACAEIAM2AgBBGCEBQQgMAQsgAEEZIAFBAXZrQQAgAUEfRxt0IQEgBCgCACEEA0AgBCICKAIEQXhxIABGDQIgAUEddiEEIAFBAXQhASACIARBBHFqIgcoAhAiBA0ACyAHIAM2AhBBGCEBIAIhBEEICyEAIAMiAgwBCyACKAIIIgQgAzYCDCACIAM2AghBGCEAQQghAUEACyEHIAEgA2ogBDYCACADIAI2AgwgACADaiAHNgIAQYzlAUGM5QEoAgBBAWsiAEF/IAAbNgIACwu7CgIFfw9+IwBB4ABrIgUkACAEQv///////z+DIQwgAiAEhUKAgICAgICAgIB/gyEKIAJC////////P4MiDUIgiCEOIARCMIinQf//AXEhBwJAAkAgAkIwiKdB//8BcSIJQf//AWtBgoB+TwRAIAdB//8Ba0GBgH5LDQELIAFQIAJC////////////AIMiC0KAgICAgIDA//8AVCALQoCAgICAgMD//wBRG0UEQCACQoCAgICAgCCEIQoMAgsgA1AgBEL///////////8AgyICQoCAgICAgMD//wBUIAJCgICAgICAwP//AFEbRQRAIARCgICAgICAIIQhCiADIQEMAgsgASALQoCAgICAgMD//wCFhFAEQCACIAOEUARAQoCAgICAgOD//wAhCkIAIQEMAwsgCkKAgICAgIDA//8AhCEKQgAhAQwCCyADIAJCgICAgICAwP//AIWEUARAIAEgC4RCACEBUARAQoCAgICAgOD//wAhCgwDCyAKQoCAgICAgMD//wCEIQoMAgsgASALhFAEQEIAIQEMAgsgAiADhFAEQEIAIQEMAgsgC0L///////8/WARAIAVB0ABqIAEgDSABIA0gDVAiBht5IAZBBnStfKciBkEPaxBAQRAgBmshBiAFKQNYIg1CIIghDiAFKQNQIQELIAJC////////P1YNACAFQUBrIAMgDCADIAwgDFAiCBt5IAhBBnStfKciCEEPaxBAIAYgCGtBEGohBiAFKQNIIQwgBSkDQCEDCyADQg+GIgtCgID+/w+DIgIgAUIgiCIEfiIQIAtCIIgiEyABQv////8PgyIBfnwiD0IghiIRIAEgAn58IgsgEVStIAIgDUL/////D4MiDX4iFSAEIBN+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IgMkACADIAE2AgwgACADQQxqEI0BIgBBBGogAhCNARogA0EQaiQAIAALCgAgACgCABCzAwsLACAAKAIAELgDwAs7AQJ/IwBBEGsiASQAIAEgADYCDCABKAIMIgAoAgAiAgRAIAAgAjYCBCAAKAIIGiACECgLIAFBEGokAAsGABCuAQALLQAgAkUEQCAAKAIEIAEoAgRGDwsgACABRgRAQQEPCyAAKAIEIAEoAgQQ0AFFCyQBAX8gACgCACECIAAgATYCACACBEAgAiAAEJkBKAIAEQIACwspAQF/IAIEQCAAIQMDQCADIAE6AAAgA0EBaiEDIAJBAWsiAg0ACwsgAAsNACAAKAIAELIDGiAACw0AIAAoAgAQmwIaIAALdQEBfiAAIAEgBH4gAiADfnwgA0IgiCICIAFCIIgiBH58IANC/////w+DIgMgAUL/////D4MiAX4iBUIgiCADIAR+fCIDQiCIfCABIAJ+IANC/////w+DfCIBQiCIfDcDCCAAIAVC/////w+DIAFCIIaENwMACxEAIAAgASAAKAIAKAIcEQMAC8EBAQN/IAAtAABBIHFFBEACQCAAKAIQIgMEfyADBSAAEOABDQEgACgCEAsgACgCFCIEayACSQRAIAAgASACIAAoAiQRBAAaDAELAkACQCACRSAAKAJQQQBIcg0AIAIhAwNAIAEgA2oiBUEBay0AAEEKRwRAIANBAWsiAw0BDAILCyAAIAEgAyAAKAIkEQQAIANJDQIgAiADayECIAAoAhQhBAwBCyABIQULIAQgBSACEEQaIAAgACgCFCACajYCFAsLC6EBAQJ/AkAgABAZRSACIAFrQQVIcg0AIAEgAhDFASACQQRrIQQgABAdIgIgABAZaiEFAkADQAJAIAIsAAAhACABIARPDQAgAEEATCAAQf8ATnJFBEAgASgCACACLAAARw0DCyABQQRqIQEgAiAFIAJrQQFKaiECDAELCyAAQQBMIABB/wBOcg0BIAIsAAAgBCgCAEEBa0sNAQsgA0EENgIACws8ACAALAALQQBIBEAgACgCCBogACgCABAoCyAAIAEpAgA3AgAgACABKAIINgIIIAFBADoACyABQQA6AAALUAEBfgJAIANBwABxBEAgASADQUBqrYYhAkIAIQEMAQsgA0UNACACIAOtIgSGIAFBwAAgA2utiIQhAiABIASGIQELIAAgATcDACAAIAI3AwgLaQEBfyMAQYACayIFJAAgBEGAwARxIAIgA0xyRQRAIAUgASACIANrIgNBgAIgA0GAAkkiARsQOBogAUUEQANAIAAgBUGAAhA9IANBgAJrIgNB/wFLDQALCyAAIAUgAxA9CyAFQYACaiQACwkAIAAgATYCBAsEAEEACzMBAX8gAgRAIAAhAwNAIAMgAS0AADoAACADQQFqIQMgAUEBaiEBIAJBAWsiAg0ACwsgAAsRACAAIAEgASgCACgCFBEBAAsPACAAIAAoAgAoAhARAAALBQAQNQALCgAgAC0AC0EHdgsKACAAQajtARB/CwoAIABBsO0BEH8LyQkCBH8EfiMAQfAAayIGJAAgBEL///////////8AgyEJAkACQCABUCIFIAJC////////////AIMiCkKAgICAgIDA//8AfUKAgICAgIDAgIB/VCAKUBtFBEAgA0IAUiAJQoCAgICAgMD//wB9IgtCgICAgICAwICAf1YgC0KAgICAgIDAgIB/URsNAQsgBSAKQoCAgICAgMD//wBUIApCgICAgICAwP//AFEbRQRAIAJCgICAgICAIIQhBCABIQMMAgsgA1AgCUKAgICAgIDA//8AVCAJQoCAgICAgMD//wBRG0UEQCAEQoCAgICAgCCEIQQMAgsgASAKQoCAgICAgMD//wCFhFAEQEKAgICAgIDg//8AIAIgASADhSACIASFQoCAgICAgICAgH+FhFAiBRshBEIAIAEgBRshAwwCCyADIAlCgICAgICAwP//AIWEUA0BIAEgCoRQBEAgAyAJhEIAUg0CIAEgA4MhAyACIASDIQQMAgsgAyAJhFBFDQAgASEDIAIhBAwBCyADIAEgASADVCAJIApWIAkgClEbIggbIQogBCACIAgbIgxC////////P4MhCSACIAQgCBsiC0IwiKdB//8BcSEHIAxCMIinQf//AXEiBUUEQCAGQeAAaiAKIAkgCiAJIAlQIgUbeSAFQQZ0rXynIgVBD2sQQCAGKQNoIQkgBikDYCEKQRAgBWshBQsgASADIAgbIQMgC0L///////8/gyEBIAcEfiABBSAGQdAAaiADIAEgAyABIAFQIgcbeSAHQQZ0rXynIgdBD2sQQEEQIAdrIQcgBikDUCEDIAYpA1gLQgOGIANCPYiEQoCAgICA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AXFBAnRBsDBqKAIAIANBCHZzIQMLIANBf3MLC+UDAQV/IwBBEGsiAyQAIAMgACgCACIEQQhrKAIAIgI2AgwgAyAAIAJqNgIEIAMgBEEEaygCADYCCCADKAIIIgQgAUEAEDYhAiADKAIEIQUCQCACBEAgAygCDCEAIwBBQGoiASQAIAFBQGskAEEAIAUgABshAgwBCyMAQUBqIgIkACAAIAVOBEAgAkIANwIcIAJCADcCJCACQgA3AiwgAkIANwIUIAJBADYCECACIAE2AgwgAiAENgIEIAJBADYCPCACQoGAgICAgICAATcCNCACIAA2AgggBCACQQRqIAUgBUEBQQAgBCgCACgCFBEKACAAQQAgAigCHBshBgsgAkFAayQAIAYiAg0AIwBBQGoiAiQAIAJBADYCECACQfDSATYCDCACIAA2AgggAiABNgIEQQAhACACQRRqQQBBJxA4GiACQQA2AjwgAkEBOgA7IAQgAkEEaiAFQQFBACAEKAIAKAIYEQsAAkACQAJAIAIoAigOAgABAgsgAigCGEEAIAIoAiRBAUYbQQAgAigCIEEBRhtBACACKAIsQQFGGyEADAELIAIoAhxBAUcEQCACKAIsDQEgAigCIEEBRw0BIAIoAiRBAUcNAQsgAigCFCEACyACQUBrJAAgACECCyADQRBqJAAgAgsHACAAEB4aCw8AIAAgACgCACgCDBEAAAsHACAAEBlFCxEAIAAgASABKAIAKAIcEQEACxEAIAAgASABKAIAKAIYEQEACy4AIAAgACgCCEGAgICAeHEgAUH/////B3FyNgIIIAAgACgCCEGAgICAeHI2AggLCQAgACABNgIACwsAIAAgASACENQBCwsAIAAtAAtB/wBxCxMAIAAgASACIAAoAgAoAgwRBAALIwEBfyACQQBOBH8gACgCCCACQQJ0aigCACABcUEARwVBAAsLfAECfyMAQRBrIgQkACMAQSBrIgMkACADQRhqIAEgASACahDWASADQRBqIAMoAhggAygCHCAAEKsDIAMgASADKAIQENUBNgIMIAMgACADKAIUEI4BNgIIIARBCGogA0EMaiADQQhqEF0gA0EgaiQAIAQoAgwaIARBEGokAAvsAQEDfyAARQRAQdjaASgCAARAQdjaASgCABBiIQELQZjbASgCAARAQZjbASgCABBiIAFyIQELQaDbASgCACIABEADQCAAKAJMGiAAKAIUIAAoAhxHBEAgABBiIAFyIQELIAAoAjgiAA0ACwsgAQ8LIAAoAkxBAEghAgJAAkAgACgCFCAAKAIcRg0AIABBAEEAIAAoAiQRBAAaIAAoAhQNAEF/IQEMAQsgACgCBCIBIAAoAggiA0cEQCAAIAEgA2usQQEgACgCKBEXABoLQQAhASAAQQA2AhwgAEIANwMQIABCADcCBCACDQALIAELEgAgACgCACIABEAgABCKAxoLCxEAIAAgASgCABCKAzYCACAAC0EBAX8gACABNwNwIAAgACgCLCAAKAIEIgJrrDcDeCAAIAFQIAEgACgCCCIAIAJrrFlyBH8gAAUgAiABp2oLNgJoCzsBAn9BASAAIABBAU0bIQEDQAJAIAEQLyIADQBBvPkBKAIAIgJFDQAgAhENAAwBCwsgAEUEQBBHCyAACxQBAX9BBBBmIgEgACgCADYCACABCwsAIAAgATYCACAAC34BAn8jAEEQayICJAAgABBIBEAgACgCACAAEIEBGhCvAQsgARAZGiABEEghAyAAIAEoAgg2AgggACABKQIANwIAIAFBABBSIAJBADYCDCABIAJBDGoQTQJAIAAgAUYiASADckUNAAsgABBIIAFyRQRAIAAQXhoLIAJBEGokAAu1AQECfyMAQRBrIgUkACAFIAE2AgxBACEBAkAgAgJ/QQYgACAFQQxqECUNABpBBCADQcAAIAAQMiIGEF9FDQAaIAMgBhCbASEBA0ACQCAAEDkaIAFBMGshASAAIAVBDGoQJSAEQQJIcg0AIANBwAAgABAyIgYQX0UNAyAEQQFrIQQgAyAGEJsBIAFBCmxqIQEMAQsLIAAgBUEMahAlRQ0BQQILIAIoAgByNgIACyAFQRBqJAAgAQu1AQECfyMAQRBrIgUkACAFIAE2AgxBACEBAkAgAgJ/QQYgACAFQQxqECYNABpBBCADQcAAIAAQMyIGEGBFDQAaIAMgBhCcASEBA0ACQCAAEDoaIAFBMGshASAAIAVBDGoQJiAEQQJIcg0AIANBwAAgABAzIgYQYEUNAyAEQQFrIQQgAyAGEJwBIAFBCmxqIQEMAQsLIAAgBUEMahAmRQ0BQQILIAIoAgByNgIACyAFQRBqJAAgAQuVAQEDfyMAQRBrIgQkACAEIAE2AgwgBCADNgIIIARBBGogBEEMahBkIAQoAgghAyMAQRBrIgEkACABIAM2AgwgASADNgIIQX8hBQJAQQBBACACIAMQzwEiA0EASA0AIAAgA0EBaiIDEC8iADYCACAARQ0AIAAgAyACIAEoAgwQzwEhBQsgAUEQaiQAEGMgBEEQaiQAIAULYwAgAigCBEGwAXEiAkEgRgRAIAEPCwJAIAJBEEcNAAJAAkAgAC0AACICQStrDgMAAQABCyAAQQFqDwsgAkEwRyABIABrQQJIcg0AIAAtAAFBIHJB+ABHDQAgAEECaiEACyAACy4AAkAgACgCBEHKAHEiAARAIABBwABGBEBBCA8LIABBCEcNAUEQDwtBAA8LQQoL4gECBH4CfyMAQRBrIgYkACABvSIFQv////////8HgyECIAACfiAFQjSIQv8PgyIDUEUEQCADQv8PUgRAIAJCBIghBCADQoD4AHwhAyACQjyGDAILIAJCBIghBEL//wEhAyACQjyGDAELIAJQBEBCACEDQgAMAQsgBiACQgAgBadnQSByIAJCIIinZyACQoCAgIAQVBsiB0ExahBAQYz4ACAHa60hAyAGKQMIQoCAgICAgMAAhSEEIAYpAwALNwMAIAAgBUKAgICAgICAgIB/gyADQjCGhCAEhDcDCCAGQRBqJAALEAAgACgCBCAAKAIAa0ECdQuyAwEDfyMAQRBrIggkACAIIAI2AgggCCABNgIMIAhBBGoiASADECIgARBJIQkgARAfIARBADYCAEEAIQECQANAIAYgB0YgAXINAQJAIAhBDGogCEEIahAlDQACQCAJIAYoAgAQmwFBJUYEQCAGQQRqIAdGDQJBACECAn8CQCAJIAYoAgQQmwEiAUHFAEYNAEEEIQogAUH/AXFBMEYNACABDAELIAZBCGogB0YNA0EIIQogASECIAkgBigCCBCbAQshASAIIAAgCCgCDCAIKAIIIAMgBCAFIAEgAiAAKAIAKAIkEQwANgIMIAYgCmpBBGohBgwBCyAJQQEgBigCABBfBEADQCAHIAZBBGoiBkcEQCAJQQEgBigCABBfDQELCwNAIAhBDGoiASAIQQhqECUNAiAJQQEgARAyEF9FDQIgARA5GgwACwALIAkgCEEMaiIBEDIQPCAJIAYoAgAQPEYEQCAGQQRqIQYgARA5GgwBCyAEQQQ2AgALIAQoAgAhAQwB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AhAgACACNgIMIAAgATYCCAsIACAAQf8BcQs8ACAAQQA2AgggAEIANwIAIAAgASgCADYCACAAIAEoAgQ2AgQgACABKAIINgIIIAFBADYCCCABQgA3AgALUgECf0Hc2gEoAgAiASAAQQdqQXhxIgJqIQACQCACQQAgACABTRtFBEAgAD8AQRB0TQ0BIAAQEw0BC0Ho5AFBMDYCAEF/DwtB3NoBIAA2AgAgAQt/AgF+A38CQCAAQoCAgIAQVARAIAAhAgwBCwNAIAFBAWsiASAAIABCCoAiAkIKfn2nQTByOgAAIABC/////58BViACIQANAAsLIAJQRQRAIAKnIQMDQCABQQFrIgEgAyADQQpuIgRBCmxrQTByOgAAIANBCUsgBCEDDQALCyABCywBAX8gAEEANgIIIABCADcCACAAIAEoAgAiAiABKAIEIgEgASACaxDCAyAACwUAEBQACwkAIABBBBCnAwsLACAEIAI2AgBBAws3AQJ/IwBBEGsiAyQAIANBDGoiBCABECIgAiAEEJ8BIgEQRjYCACAAIAEQRSAEEB8gA0EQaiQACzUBAn8jAEEQayICJAAgAkEMaiIDIAAQIiADEElBsJwBQcqcASABEHMgAxAfIAJBEGokACABCzcBAn8jAEEQayIDJAAgA0EMaiIEIAEQIiACIAQQogEiARBGOgAAIAAgARBFIAQQHyADQRBqJAALkQEBA38CQCABELYBIQIjAEEQayIDJAAgAkH3////B00EQAJAIAIQ0wEEQCAAIAIQUiAAIQQMAQsgA0EIaiACEKYBQQFqEKUBIAMoAgwaIAAgAygCCCIEEFwgACADKAIMEFsgACACEEILIAQgASACEGEgA0EAOgAHIAIgBGogA0EHahBRIANBEGokAAwBCxBHAAsLRgEBfyAAQdj4ACgCACIBNgIAIAAgAUEMaygCAGpB+PgAKAIANgIAIABB/PgAKAIANgIIIABBDGoQggIaIABBQGsQ3AEgAAt9AQN/AkACQCAAIgFBA3FFDQAgAS0AAEUEQEEADwsDQCABQQFqIgFBA3FFDQEgAS0AAA0ACwwBCwNAIAEiAkEEaiEBQYCChAggAigCACIDayADckGAgYKEeHFBgIGChHhGDQALA0AgAiIBQQFqIQIgAS0AAA0ACwsgASAAawu7BwEFfwJ/IABB//8DcSEDIABB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AgggASACNgIMIAEgASgCBDYCAAsJACAAQQEQpwMLSgEBfyAAIAM2AhAgAEEANgIMIAEEQCABELwCIQQLIAAgBDYCACAAIAQgAkECdGoiAjYCCCAAIAQgAUECdGo2AgwgACACNgIEIAALCQAgABC1ARAoCxcAIAAgAjYCHCAAIAE2AhQgACABNgIYCxMAIAAgASACIAAoAgAoAjARBAALCQAgABDZARAoCwwAIABBBGoQ3AEgAAsMACAAQQhqENwBIAALKAECfyMAQRBrIgIkACABKAIAIAAoAgBIIQMgAkEQaiQAIAEgACADGwsQACAAIAE3AwggAEIANwMACwIACxQAIABB+PEANgIAIABBBGoQHyAAC/IDAgJ+BX8jAEEgayIFJAAgAUL///////8/gyECAn4gAUIwiEL//wGDIgOnIgRBgfgAa0H9D00EQCACQgSGIABCPIiEIQIgBEGA+ABrrSEDAkAgAEL//////////w+DIgBCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyAAQoCAgICAgICACFINACACQgGDIAJ8IQILQgAgAiACQv////////8HViIEGyEAIAStIAN8DAELIAAgAoRQIANC//8BUnJFBEAgAkIEhiAAQjyIhEKAgICAgICABIQhAEL/DwwBCyAEQf6HAUsEQEIAIQBC/w8MAQtBgPgAQYH4ACADUCIHGyIIIARrIgZB8ABKBEBCACEAQgAMAQsgBUEQaiAAIAIgAkKAgICAgIDAAIQgBxsiAkGAASAGaxBAIAUgACACIAYQkQEgBSkDCEIEhiAFKQMAIgJCPIiEIQACQCAEIAhHIAUpAxAgBSkDGIRCAFJxrSACQv//////////D4OEIgJCgYCAgICAgIAIWgRAIABCAXwhAAwBCyACQoCAgICAgICACFINACAAQgGDIAB8IQALIABCgICAgICAgAiFIAAgAEL/////////B1YiBBshACAErQshAiAFQSBqJAAgAUKAgICAgICAgIB/gyACQjSGhCAAhL8LiQIAAkAgAAR/IAFB/wBNDQECQEG83AEoAgAoAgBFBEAgAUGAf3FBgL8DRg0DDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIPCyABQYBAcUGAwANHIAFBgLADT3FFBEAgACABQT9xQYABcjoA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EKUBIAMoAgwaIAAgAygCCCIEEFwgACADKAIMEFsgACABEEILIAQgASACEKoCIANBADoAByABIARqIANBB2oQUSADQRBqJAAPCxBHAAtFAQJ/IAAQICEDIAAQGSEEIAIgA00EQCAAEB0iAyABIAIQqgMgACADIAIQugIPCyAAIAMgAiADayAEQQAgBCACIAEQuwELPQEBfyMAQRBrIgMkACADIAI6AA8DQCABBEAgACADLQAPOgAAIAFBAWshASAAQQFqIQAMAQsLIANBEGokAAsWACAAIAEgAkKAgICAgICAgIB/EIECCwkAIAAQJzYCAAsjAQJ/IAAhAQNAIAEiAkEEaiEBIAIoAgANAAsgAiAAa0ECdQsHACAAERMACw8AIAAgACgCAEEEazYCAAsKACAAKAIAQQRrCy0BAX8jAEEQayICJAACQCAAIAFGBEAgAEEAOgB4DAELIAEQrwELIAJBEGokAAsTACAAELwBKAIAIAAoAgBrQQJ1CywBAX8gACgCBCECA0AgASACRwRAIAAQhQEaIAJBBGshAgwBCwsgACABNgIECwkAIABBADYCAAtJAQF/IwBBEGsiAyQAAkACQCACQR5LDQAgAS0AeEEBcQ0AIAFBAToAeAwBCyACELsCIQELIANBEGokACAAIAI2AgQgACABNgIAC0ABAX8jAEEQayIBJAAgABCFARogAUH/////AzYCDCABQf////8HNgIIIAFBDGogAUEIahCsAygCACABQRBqJAALCwAgAEEANgIAIAALNQEBfyMAQRBrIgMkACADIAEQdjYCDCADIAIQdjYCCCAAIANBDGogA0EIahDUASADQRBqJAALTgEBfyMAQRBrIgMkACADIAE2AgggAyAANgIMIAMgAjYCBEEAIQEgA0EEaiIAIANBDGoQ0gFFBEAgACADQQhqENIBIQELIANBEGokACABCzMBAX8jAEEQayIDJAAgABAZGiAAIAIQiAEgA0EAOgAPIAEgAmogA0EPahBRIANBEGokAAsbACAAQf////8DSwRAEDUACyAAQQJ0QQQQowMLGAAgAEGAgICABE8EQBA1AAsgAEECdBBmCwkAIAAQ7gEQKAsVACAAQdCnATYCACAAQRBqEBoaIAALFQAgAEGopwE2AgAgAEEMahAaGiAAC7cDAQR/AkAgAyACIgBrQQNIQQFyDQAg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pMABNgIAIAFBvPgBQaDrARAqECxBxPgBQQEQK0G4wQE2AgAgAUHE+AFBqOsBECoQLEHM+AFBARArQazCATYCACABQcz4AUGw6wEQKhAsQdT4AUEBECtBoMMBNgIAIAFB1PgBQbjrARAqECxB3PgBQQEQK0GUxAE2AgAgAUHc+AFBwOsBECoQLEHk+AFBARArQbzFATYCACABQeT4AUHI6wEQKhAsQez4AUEBECtB5MYBNgIAIAFB7PgBQdDrARAqECxB9PgBQQEQK0GMyAE2AgAgAUH0+AFB2OsBECoQLEH8+AFBARArIgJB+NEBNgIIIAJBiLoBNgIAIAJBuLoBNgIIIAFB/PgBQYDrARAqECxBiPkBQQEQKyICQZzSATYCCCACQZS8ATYCACACQcS8ATYCCCABQYj5AUGI6wEQKhAsQZT5AUEBECsiAkEIahCsAiACQYS+ATYCACABQZT5AUGQ6wEQKhAsQaD5AUEBECsiAkEIahCsAiACQaS/ATYCACABQaD5AUGY6wEQKhAsQaz5AUEBECtBtMkBNgIAIAFBrPkBQeDrARAqECxBtPkBQQEQK0GsygE2AgAgAUG0+QFB6OsBECoQLCAGQRBqJAAgBUH46wE2AghBlO0BIAUoAggQaBpBmO0BQQE6AAALIAVBEGokAEGc7QFBlO0BEM8CQaDtAUEBOgAACyAAQZztASgCACIANgIAIAAQzgILEQAgAEH46wFHBEAgABDRAgsLEwAgACABKAIAIgA2AgAgABDOAgubAQEEfyAAQaieATYCACAAQQhqIQEDQCABEHAgAksEQCABIAIQhwEoAgAEQCABIAIQhwEoAgAQwAELIAJBAWohAgwBCwsgAEGQAWoQGhojAEEQayICJAAgAkEMaiABEGgiASgCACIDKAIABEAgAxDSAiABKAIAGiABKAIAEIUBIAEoAgAiASgCACABELICGhCxAgsgAkEQaiQAIAALDwAgACAAKAIEQQFqNgIECwwAIAAgACgCABCzAgt7AQN/IwBBEGsiBCQAIARBBGoiAiAANgIAIAIgACgCBCIDNgIEIAIgAyABQQJ0ajYCCCACIgMoAgQhASACKAIIIQIDQCABIAJGBEAgAygCACADKAIENgIEIARBEGokAAUgABCFARogARC0AiADIAFBBGoiATYCBAwBCwsLIAAgAEH4pgE2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AWo2AgAgBCABOgAAIApBAWoMAQsgERAZRSAKRXINASALLQBaIAFB/wFxRw0BIAsoAmQiASALKAJgRgRAIA8gC0HkAGogC0HgAGoQmgEgCygCZCEBCyALIAFBBGo2AmQgASAKNgIAQQALIQogABA6GgwBCwsgCkUgCygCZCIBIA8oAgBGckUEQCALKAJgIAFGBEAgDyALQeQAaiALQeAAahCaASALKAJkIQELIAsgAUEEajYCZCABIAo2AgALAkAgCygCGEEATA0AAkAgACALQYwEahAmRQRAIAAQM0H/AXEgCy0AW0YNAQsgBSAFKAIAQQRyNgIAQQAhAAwDCwNAIAAQOhogCygCGEEATA0BAkAgACALQYwEahAmRQRAIAdBwAAgABAzEGANAQsgBSAFKAIAQQRyNgIAQQAhAAwECyAJKAIAIAsoAogERgRAIAggCSALQYgEahDmAgsgABAzIQEgCSAJKAIAIgRBAWo2AgAgBCABOgAAIAsgCygCGEEBazYCGAwACwALIAIhASAIKAIAIAkoAgBHDQMgBSAFKAIAQQRyNgIAQQAhAAwBCwJAIAJFDQBBASEKA0AgAhAZIApNDQECQCAAIAtBjARqECZFBEAgABAzQf8BcSACIAoQHC0AAEYNAQsgBSAFKAIAQQRyNgIAQQAhAAwDCyAAEDoaIApBAWohCgwACwALQQEhACAPKAIAIAsoAmRGDQBBACEAIAtBADYCECARIA8oAgAgCygCZCALQRBqED4gCygCEARAIAUgBSgCAEEEcjYCAAwBC0EBIQALIBAQGhogDRAaGiAOEBoaIAwQGhogERAaGiAPEDAMAwsgAiEBCyADQQFqIQMMAAsACyALQZAEaiQAIAALDAAgAEEBQS0Q9QIaCxsAIwBBEGsiASQAIABBAUEtEKgCIAFBEGokAAsKACABIABrQQJ1CxwBAX8gAC0AACECIAAgAS0AADoAACABIAI6AAALZQEBfyMAQRBrIgYkACAGQQA6AA8gBiAFOgAOIAYgBDoADSAGQSU6AAwgBQRAIAZBDWogBkEOahDsAgsgAiABIAEgAigCABCkAyAGQQxqIAMgACgCABCPAyABajYCACAGQRBqJAALQQAgASACIAMgBEEEEGohASADLQAAQQRxRQRAIAAgAUHQD2ogAUHsDmogASABQeQASRsgAUHFAEgb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IRYgDCAVNwMoIAwgFjcDICAEQZDGAGokACAMKQMoIRUgDCkDICEWDAILQgAhFgwBC0IAIRULIAAgFjcDACAAIBU3AwggDEEwaiQAC8MGAgR/A34jAEGAAWsiBSQAAkACQAJAIAMgBEIAQgAQjAFFDQACfyAEQv///////z+DIQoCfyAEQjCIp0H//wFxIgdB//8BRwRAQQQgBw0BGkECQQMgAyAKhFAbDAILIAMgCoRQCwtFDQAgAkIwiKciCEH//wFxIgZB//8BRw0BCyAFQRBqIAEgAiADIAQQKSAFIAUpAxAiAiAFKQMYIgEgAiABEJ0DIAUpAwghAiAFKQMAIQQMAQsgASACQv///////////wCDIgogAyAEQv///////////wCDIgkQjAFBAEwEQCABIAogAyAJEIwBBEAgASEEDAILIAVB8ABqIAEgAkIAQgAQKSAFKQN4IQIgBSkDcCEEDAELIARCMIinQf//AXEhByAGBH4gAQUgBUHgAGogASAKQgBCgICAgICAwLvAABApIAUpA2giCkIwiKdB+ABrIQYgBSkDYAshBCAHRQRAIAVB0ABqIAMgCUIAQoCAgICAgMC7wAAQKSAFKQNYIglCMIinQfgAayEHIAUpA1AhAwsgCUL///////8/g0KAgICAgIDAAIQhCyAKQv///////z+DQoCAgICAgMAAhCEKIAYgB0oEQANAAn4gCiALfSADIARWrX0iCUIAWQRAIAkgBCADfSIEhFAEQCAFQSBqIAEgAkIAQgAQKSAFKQMoIQIgBSkDICEEDAULIAlCAYYgBEI/iIQMAQsgCkIBhiAEQj+IhAshCiAEQgGGIQQgBkEBayIGIAdKDQALIAchBgsCQCAKIAt9IAMgBFatfSIJQgBTBEAgCiEJDAELIAkgBCADfSIEhEIAUg0AIAVBMGogASACQgBCABApIAUpAzghAiAFKQMwIQQMAQsgCUL///////8/WARAA0AgBEI/iCAGQQFrIQYgBEIBhiEEIAlCAYaEIglCgICAgICAwABUDQALCyAIQYCAAnEhByAGQQBMBEAgBUFAayAEIAlC////////P4MgBkH4AGogB3KtQjCGhEIAQoCAgICAgMDDPxApIAUpA0ghAiAFKQNAIQQMAQsgCUL///////8/gyAGIAdyrUIwhoQhAgsgACAENwMAIAAgAjcDCCAFQYABaiQAC6oPAgV/D34jAEHQAmsiBSQAIARC////////P4MhCiACQv///////z+DIQsgAiAEhUKAgICAgICAgIB/gyEMIARCMIinQf//AXEhCAJAAkAgAkIwiKdB//8BcSIJQf//AWtBgoB+TwRAIAhB//8Ba0GBgH5LDQELIAFQIAJC////////////AIMiDUKAgICAgIDA//8AVCANQoCAgICAgMD//wBRG0UEQCACQoCAgICAgCCEIQwMAgsgA1AgBEL///////////8AgyICQoCAgICAgMD//wBUIAJCgICAgICAwP//AFEbRQRAIARCgICAgICAIIQhDCADIQEMAgsgASANQoCAgICAgMD//wCFhFAEQCADIAJCgICAgICAwP//AIWEUARAQgAhAUKAgICAgIDg//8AIQwMAwsgDEKAgICAgIDA//8AhCEMQgAhAQwCCyADIAJCgICAgICAwP//AIWEUARAQgAhAQwCCyABIA2EUARAQoCAgICAgOD//wAgDCACIAOEUBshDEIAIQEMAgsgAiADhFAEQCAMQoCAgICAgMD//wCEIQxCACEBDAILIA1C////////P1gEQCAFQcACaiABIAsgASALIAtQIgYbeSAGQQZ0rXynIgZBD2sQQEEQIAZrIQYgBSkDyAIhCyAFKQPAAiEBCyACQv///////z9WDQAgBUGwAmogAyAKIAMgCiAKUCIHG3kgB0EGdK18pyIHQQ9rEEAgBiAHakEQayEGIAUpA7gCIQogBSkDsAIhAwsgBUGgAmogCkKAgICAgIDAAIQiEkIPhiADQjGIhCICQgBCgICAgLDmvIL1ACACfSIEQgAQOyAFQZACakIAIAUpA6gCfUIAIARCABA7IAVBgAJqIAUpA5gCQgGGIAUpA5ACQj+IhCIEQgAgAkIAEDsgBUHwAWogBEIAQgAgBSkDiAJ9QgAQOyAFQeABaiAFKQP4AUIBhiAFKQPwAUI/iIQiBEIAIAJCABA7IAVB0AFqIARCAEIAIAUpA+gBfUIAEDsgBUHAAWogBSkD2AFCAYYgBSkD0AFCP4iEIgRCACACQgAQOyAFQbABaiAEQgBCACAFKQPIAX1CABA7IAVBoAFqIAJCACAFKQO4AUIBhiAFKQOwAUI/iIRCAX0iAkIAEDsgBUGQAWogA0IPhkIAIAJCABA7IAVB8ABqIAJCAEIAIAUpA6gBIAUpA6ABIg0gBSkDmAF8IgQgDVStfCAEQgFWrXx9QgAQOyAFQYABakIBIAR9QgAgAkIAEDsgBiAJIAhraiEGAn8gBSkDcCITQgGGIg4gBSkDiAEiD0IBhiAFKQOAAUI/iIR8IhBC5+wAfSIUQiCIIgIgC0KAgICAgIDAAIQiFUIBhiIWQiCIIgR+IhEgAUIBhiINQiCIIgogECAUVq0gDiAQVq0gBSkDeEIBhiATQj+IhCAPQj+IfHx8QgF9IhNCIIgiEH58Ig4gEVStIA4gDiATQv////8PgyITIAFCP4giFyALQgGGhEL/////D4MiC358Ig5WrXwgBCAQfnwgBCATfiIRIAsgEH58Ig8gEVStQiCGIA9CIIiEfCAOIA4gD0IghnwiDlatfCAOIA4gFEL/////D4MiFCALfiIRIAIgCn58Ig8gEVStIA8gDyATIA1C/v///w+DIhF+fCIPVq18fCIOVq18IA4gBCAUfiIYIBAgEX58IgQgAiALfnwiCyAKIBN+fCIQQiCIIAsgEFatIAQgGFStIAQgC1atfHxCIIaEfCIEIA5UrXwgBCAPIAIgEX4iAiAKIBR+fCIKQiCIIAIgClatQiCGhHwiAiAPVK0gAiAQQiCGfCACVK18fCICIARUrXwiBEL/////////AFgEQCAWIBeEIRUgBUHQAGogAiAEIAMgEhA7IAFCMYYgBSkDWH0gBSkDUCIBQgBSrX0hCkIAIAF9IQsgBkH+/wBqDAELIAVB4ABqIARCP4YgAkIBiIQiAiAEQgGIIgQgAyASEDsgAUIwhiAFKQNofSAFKQNgIg1CAFKtfSEKQgAgDX0hCyABIQ0gBkH//wBqCyIGQf//AU4EQCAMQoCAgICAgMD//wCEIQxCACEBDAELAn4gBkEASgRAIApCAYYgC0I/iIQhASAEQv///////z+DIAatQjCGhCEKIAtCAYYMAQsgBkGPf0wEQEIAIQEMAgsgBUFAayACIARBASAGaxCRASAFQTBqIA0gFSAGQfAAahBAIAVBIGogAyASIAUpA0AiAiAFKQNIIgoQOyAFKQM4IAUpAyhCAYYgBSkDICIBQj+IhH0gBSkDMCIEIAFCAYYiDVStfSEBIAQgDX0LIQQgBUEQaiADIBJCA0IAEDsgBSADIBJCBUIAEDsgCiACIAIgAyAEIAJCAYMiBHwiA1QgASADIARUrXwiASASViABIBJRG618IgJWrXwiBCACIAIgBEKAgICAgIDA//8AVCADIAUpAxBWIAEgBSkDGCIEViABIARRG3GtfCICVq18IgQgAiAEQoCAgICAgMD//wBUIAMgBSkDAFYgASAFKQMIIgNWIAEgA1Ebca18IgEgAlStfCAMhCEMCyAAIAE3AwAgACAMNwMIIAVB0AJqJAALvwIBAX8jAEHQAGsiBCQAAkAgA0GAgAFOBEAgBEEgaiABIAJCAEKAgICAgICA//8AECkgBCkDKCECIAQpAyAhASADQf//AUkEQCADQf//AGshAwwCCyAEQRBqIAEgAkIAQoCAgICAgID//wAQKUH9/wIgAyADQf3/Ak8bQf7/AWshAyAEKQMYIQIgBCkDECEBDAELIANBgYB/Sg0AIARBQGsgASACQgBCgICAgICAgDkQKSAEKQNIIQIgBCkDQCEBIANB9IB+SwRAIANBjf8AaiEDDAELIARBMGogASACQgBCgICAgICAgDkQKUHogX0gAyADQeiBfU0bQZr+AWohAyAEKQM4IQIgBCkDMCEBCyAEIAEgAkIAIANB//8Aaq1CMIYQKSAAIAQpAwg3AwggACAEKQMANwMAIARB0ABqJAALPAAgACABNwMAIAAgAkL///////8/gyACQoCAgICAgMD//wCDQjCIpyADQjCIp0GAgAJxcq1CMIaENwMIC8ABAgF/An5BfyEDAkAgAEIAUiABQv///////////wCDIgRCgICAgICAwP//AFYgBEKAgICAgIDA//8AURsNACACQv///////////wCDIgVCgICAgICAwP//AFYgBUKAgICAgIDA//8AUnENACAAIAQgBYSEUARAQQAPCyABIAKDQgBZBEAgASACUiABIAJTcQ0BIAAgASAChYRCAFIPCyAAQgBSIAEgAlUgASACURsNACAAIAEgAoWEQgBSIQMLIAMLLAEBfyAAKAIAIgEEQCABELMDQX8QgwFFBEAgACgCAEUPCyAAQQA2AgALQQELLAEBfyAAKAIAIgEEQCABELgDQX8QgwFFBEAgACgCAEUPCyAAQQA2AgALQQELngUBCH8gARCmAwRAQQQgASABQQRNGyEDQQEgACAAQQFNGyEHA0ACQCAHIAMgB2pBAWtBACADa3Ei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AgseACABQQBOBH9BoJABKAIAIAFBAnRqKAIABSABC8ALDwAgACABIAJBlIQBEKECCx4AIAFBAE4Ef0GUhAEoAgAgAUECdGooAgAFIAELwAsJACAAEMkCECgLNQADQCABIAJGRQRAIAQgASgCACIAIAMgAEGAAUkbOgAAIARBAWohBCABQQRqIQEMAQsLIAELDgAgASACIAFBgAFJG8ALKgADQCABIAJGRQRAIAMgASwAADYCACADQQRqIQMgAUEBaiEBDAELCyABCw0AIAEgACgCAGooAgALDwAgACABIAJBoJABEKICCx4AIAFB/wBNBH9BoJABKAIAIAFBAnRqKAIABSABCwsPACAAIAEgAkGUhAEQogILHgAgAUH/AE0Ef0GUhAEoAgAgAUECdGooAgAFIAELCzoAA0ACQCACIANGDQAgAigCACIAQf8ASw0AIABBAnRB8J4BaigCACABcUUNACACQQRqIQIMAQsLIAILOgADQAJAIAIgA0YNACACKAIAIgBB/wBNBEAgAEECdEHwngFqKAIAIAFxDQELIAJBBGohAgwBCwsgAgtJAQF/A0AgASACRkUEQEEAIQAgAyABKAIAIgRB/wBNBH8gBEECdEHwngFqKAIABUEACzYCACADQQRqIQMgAUEEaiEBDAELCyABCyUAQQAhACACQf8ATQR/IAJBAnRB8J4BaigCACABcUEARwVBAAsLDwAgACAAKAIAKAIEEQIACxAAIAAEQCAAEJgCCyAAECgLCQAgABDQAhAoCw4AQdQAEGZBAEHUABA4C70BACMAQRBrIgMkAAJAIAUQSEUEQCAAIAUoAgg2AgggACAFKQIANwIAIAAQXhoMAQsgBSgCACECIAUoAgQhBSMAQRBrIgQkAAJAAkACQCAFEL4BBEAgACIBIAUQUgwBCyAFQff///8DSw0BIARBCGogBRCXAUEBahCWASAEKAIMGiAAIAQoAggiARBcIAAgBCgCDBBbIAAgBRBCCyABIAIgBUEBahCCASAEQRBqJAAMAQsQRwALCyADQRBqJAALCQAgACAFEOQBC4QDAQh/IwBB4ANrIgAkACAAQdwDaiIGIAMQIiAGEEkhCiAFEBkEQCAFQQAQyAEoAgAgCkEtEExGIQsLIAIgCyAAQdwDaiAAQdgDaiAAQdQDaiAAQdADaiAAQcQDahAeIgwgAEG4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QQA6AAALIAAtAA9BAUYEQCAGIAFBLRA8ELoBCyABQTAQPCAJKAIAIQIgACgCFCIIQQFrIQNB/wFxIQEDQAJAIAIgA08NACACLQAAIAFHDQAgAkEBaiECDAELCyMAQRBrIgEkACAGEBkhAyAGECAhBAJAIAIgCBClAyIHRQ0AIAYQHSAGEB0gBhAZakEBaiACELkCRQRAIAcgBCADa0sEQCAGIAQgAyAEayAHaiADIAMQ8wELIAYQHSADaiEEA0AgAiAIRwRAIAQgAhBRIAJBAWohAiAEQQFqIQQMAQsLIAFBADoADyAEIAFBD2oQUSAGIAMgB2oQiAEMAQsjAEEQayIDJAAgASACIAgQsAMgA0EQaiQAIAEiChAdIQggARAZIQIjAEEQayIEJAACQCACIAYQICIHIAYQGSIDa00EQCACRQ0BIAYQHSIHIANqIAggAhBhIAYgAiADaiICEIgBIARBADoADyACIAdqIARBD2oQUQwBCyAGIAcgAiAHayADaiADIANBACACIAgQuwELIARBEGokACAKEBoaCyABQRBqJAALIABBjAFqIABBiAFqECYEQCAFIAUoAgBBAnI2AgALIAAoAowBIABBEGoQHyAJEDAgAEGQAWokAAvHAwEDfyMAQZACayIAJAAgACACNgKIAiAAIAE2AowCIABB4AA2AhAgAEGYAWogAEGgAWogAEEQaiIBEDEhByAAQZABaiIIIAQQIiAIEEohCSAAQQA6AI8BAkAgAEGMAmogAiADIAggBCgCBCAFIABBjwFqIAkgByAAQZQBaiAAQYQCahDoAkUNACAAQeoZKAAANgCHASAAQeMZKQAANwOAASAJIABBgAFqIABBigFqIABB9gBqEH4gAEHfADYCECAAQQhqQQAgARAxIQMgASEEAkAgACgClAEgBygCAGsiAUHjAE4EQCADIAFBAmoQLxA3IAMoAgBFDQEgAygCACEECyAALQCPAUEBRgRAIARBLToAACAEQQFqIQQLIAcoAgAhAgNAIAAoApQBIAJNBEACQCAEQQA6AAAgACAGNgIAIABBEGogABCNA0EBRw0AIAMQMAwECwUgBCAAQfYAaiIBIAFBCmogAhD7ASAAayAAai0ACjoAACAEQQFqIQQgAkEBaiECDAELCxA1AAsQNQALIABBjAJqIABBiAJqECYEQCAFIAUoAgBB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ZiIAIAMpAgA3AgAgACADLQAIOgAIIABBDGogA0EMahCGARogAEEYaiADQRhqEIYBGiAAQSRqIANBJGoQhgEaIABBMGogA0EwahCGARogAEE8aiADQTxqEIYBGiAAQcgAaiADQcgAahCGARogAxCYAiAEQeAAaiQAIAALtgMAIwBB8AJrIgAkACAAIAI2AugCIAAgATYC7AIgAEHMAWogAyAAQeABaiAAQdwBaiAAQdgBahD6ASAAQcABahAeIgEgARAgEBsgACABQQAQHCICNgK8ASAAIABBEGo2AgwgAEEANgIIIABBAToAByAAQcUAOgAGA0ACQCAAQewCaiAAQegCahAlDQAgACgCvAEgARAZIAJqRgRAIAEQGSEDIAEgARAZQQF0EBsgASABECAQGyAAIAMgAUEAEBwiAmo2ArwBCyAAQewCaiIDEDIgAEEHaiAAQQZqIAIgAEG8AWogACgC3AEgACgC2AEgAEHMAWogAEEQaiAAQQxqIABBCGogAEHgAWoQ+QENACADEDkaDAELCwJAIABBzAFqEBlFDQAgAC0AB0EBRw0AIAAoAgwiAyAAQRBqa0GfAUoNACAAIANBBGo2AgwgAyAAKAIINgIACyAFIAIgACgCvAEgBBCBAzgCACAAQcwBaiAAQRBqIAAoAgwgBBA+IABB7AJqIABB6AJqECUEQCAEIAQoAgBBAnI2AgALIAAoAuwCIAEQGhogAEHMAWoQGhogAEHwAmokAAuWAwECfyMAQdACayIAJAAgACACNgLIAiAAIAE2AswCIAMQbiEGIAMgAEHQAWoQsgEhByAAQcQBaiADIABBxAJqELEBIABBuAFqEB4iASABECAQGyAAIAFBABAcIgI2ArQBIAAgAEEQajYCDCAAQQA2AggDQAJAIABBzAJqIABByAJqECUNACAAKAK0ASABEBkgAmpGBEAgARAZIQMgASABEBlBAXQQGyABIAEQIBAbIAAgAyABQQAQHCICajYCtAELIABBzAJqIgMQMiAGIAIgAEG0AWogAEEIaiAAKALEAiAAQcQBaiAAQRBqIABBDGogBxCdAQ0AIAMQORoMAQsLAkAgAEHEAWoQGUUNACAAKAIMIgMgAEEQamtBnwFKDQAgACADQQRqNgIMIAMgACgCCDYCAAsgBSACIAAoArQBIAQgBhCCAzcDACAAQcQBaiAAQRBqIAAoAgwgBBA+IABBzAJqIABByAJqECUEQCAEIAQoAgBBAnI2AgALIAAoAswCIAEQGhogAEHEAWoQGhogAEHQAmokAAuWAwECfyMAQdACayIAJAAgACACNgLIAiAAIAE2AswCIAMQbiEGIAMgAEHQAWoQsgEhByAAQcQBaiADIABBxAJqELEBIABBuAFqEB4iASABECAQGyAAIAFBABAcIgI2ArQBIAAgAEEQajYCDCAAQQA2AggDQAJAIABBzAJqIABByAJqECUNACAAKAK0ASABEBkgAmpGBEAgARAZIQMgASABEBlBAXQQGyABIAEQIBAbIAAgAyABQQAQHCICajYCtAELIABBzAJqIgMQMiAGIAIgAEG0AWogAEEIaiAAKALEAiAAQcQBaiAAQRBqIABBDGogBxCdAQ0AIAMQORoMAQsLAkAgAEHEAWoQGUUNACAAKAIMIgMgAEEQamtBnwFKDQAgACADQQRqNgIMIAMgACgCCDYCAAsgBSACIAAoArQBIAQgBhCFAzsBACAAQcQBaiAAQRBqIAAoAgwgBBA+IABBzAJqIABByAJqECUEQCAEIAQoAgBBAnI2AgALIAAoAswCIAEQGhogAEHEAWoQGhogAEHQAmokAAuWAwECfyMAQdACayIAJAAgACACNgLIAiAAIAE2AswCIAMQbiEGIAMgAEHQAWoQsgEhByAAQcQBaiADIABBxAJqELEBIABBuAFqEB4iASABECAQGyAAIAFBABAcIgI2ArQBIAAgAEEQajYCDCAAQQA2AggDQAJAIABBzAJqIABByAJqECUNACAAKAK0ASABEBkgAmpGBEAgARAZIQMgASABEBlBAXQQGyABIAEQIBAbIAAgAyABQQAQHCICajYCtAELIABBzAJqIgMQMiAGIAIgAEG0AWogAEEIaiAAKALEAiAAQcQBaiAAQRBqIABBDGogBxCdAQ0AIAMQORoMAQsLAkAgAEHEAWoQGUUNACAAKAIMIgMgAEEQamtBnwFKDQAgACADQQRqNgIMIAMgACgCCDYCAAsgBSACIAAoArQBIAQgBhCGAzcDACAAQcQBaiAAQRBqIAAoAgwgBBA+IABBzAJqIABByAJqECUEQCAEIAQoAgBBAnI2AgALIAAoAswCIAEQGhogAEHEAWoQGhogAEHQAmokAAuWAwECfyMAQdACayIA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IGRpc3RhbmNlIHN5bWJvbHMAaW52YWxpZCBzdG9yZWQgYmxvY2sgbGVuZ3RocwBzY2FsZXMAYWxwaGFzAFtTUFo6IEVSUk9SXSBDaGVjayBmYWlsZWQ6ICVzOiVkOiAlcwB2ZjMyX3B0cgBBcHIAdmVjdG9yAG1vbmV5X2dldCBlcnJvcgBbU1BaIEVSUk9SXSBkZXNlcmlhbGl6ZVBhY2tlZEdhdXNzaWFuczogcmVhZCBlcnJvcgBPY3RvYmVyAE5vdmVtYmVyAFNlcHRlbWJlcgBEZWNlbWJlcgB1bnNpZ25lZCBjaGFyAGlvc19iYXNlOjpjbGVhcgBNYXIAU2VwACVJOiVNOiVTICVwAFN1bgBKdW4ATW9uAG5hbgBKYW4ASnVsAGJvb2wAbGwAQXByaWwAaW52YWxpZCBjb2RlIC0tIG1pc3NpbmcgZW5kLW9mLWJsb2NrAGluY29ycmVjdCBoZWFkZXIgY2hlY2sAaW5jb3JyZWN0IGxlbmd0aCBjaGVjawBpbmNvcnJlY3QgZGF0YSBjaGVjawBwdXNoX2JhY2sAaW52YWxpZCBkaXN0YW5jZSB0b28gZmFyIGJhY2sARnJpAHNoAGhlYWRlciBjcmMgbWlzbWF0Y2gATWFyY2gAQXVnAHVuc2lnbmVkIGxvbmcAc3RkOjp3c3RyaW5nAGJhc2ljX3N0cmluZwBzdGQ6OnN0cmluZwBzdGQ6OnUxNnN0cmluZwBzdGQ6OnUzMnN0cmluZwBpbmYAJS4wTGYAJUxmAHJlc2l6ZQBpbnZhbGlkIHdpbmRvdyBzaXplAHRydWUAVHVlAGZhbHNlAGludmFsaWQgYmxvY2sgdHlwZQBKdW5lAGRvdWJsZQBzaERlZ3JlZQBpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUAaW52YWxpZCBkaXN0YW5jZSBjb2RlAFJhd0dhdXNzaWFuQ2xvdWQAdW5rbm93biBjb21wcmVzc2lvbiBtZXRob2QAW1NQWiBFUlJPUl0gZGVzZXJpYWxpemVQYWNrZWRHYXVzc2lhbnM6IGhlYWRlciBub3QgZm91bmQAJTAqbGxkACUqbGxkACslbGxkACUrLjRsZAB2b2lkAGxvY2FsZSBub3Qgc3VwcG9ydGVkAGFudGlhbGlhc2VkAFdlZAAlWS0lbS0lZABbU1BaIEVSUk9SXSBkZXNlcmlhbGl6ZVBhY2tlZEdhdXNzaWFuczogVG9vIG1hbnkgcG9pbnRzOiAlZABbU1BaIEVSUk9SXSBkZXNlcmlhbGl6ZVBhY2tlZEdhdXNzaWFuczogVW5zdXBwb3J0ZWQgU0ggZGVncmVlOiAlZABbU1BaIEVSUk9SXSBkZXNlcmlhbGl6ZVBhY2tlZEdhdXNzaWFuczogdmVyc2lvbiBub3Qgc3VwcG9ydGVkOiAlZABEZWMALi9zcHovc3JjL2NjL2xvYWQtc3B6LmNjAEZlYgAlYSAlYiAlZCAlSDolTTolUyAlWQBQT1NJWABWZWN0b3JVSW50OFQAJUg6JU06JVMATkFOAFBNAEFNACVIOiVNAExDX0FMTABBU0NJSQBMQU5HAElORgBDAGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHNob3J0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBzaG9ydD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBpbnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGZsb2F0PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQ4X3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxpbnQxNl90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50NjRfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50NjRfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGNoYXI+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIGNoYXI+AHN0ZDo6YmFzaWNfc3RyaW5nPHVuc2lnbmVkIGNoYXI+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHNpZ25lZCBjaGFyPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxsb25nPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBsb25nPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxkb3VibGU+ADAxMjM0NTY3ODkAQy5VVEYtOAAxLjIuMTMAVmVjdG9yRmxvYXQzMgAuAC0AKHBhY2tlZC5hbHBoYXMuc2l6ZSgpKSA9PSAobnVtUG9pbnRzKQAobnVsbCkAKHBhY2tlZC5jb2xvcnMuc2l6ZSgpKSA9PSAobnVtUG9pbnRzICogMykAKHBhY2tlZC5yb3RhdGlvbnMuc2l6ZSgpKSA9PSAobnVtUG9pbnRzICogMykAKHBhY2tlZC5zY2FsZXMuc2l6ZSgpKSA9PSAobnVtUG9pbnRzICogMykAKHBhY2tlZC5zaC5zaXplKCkpID09IChudW1Qb2ludHMgKiBzaERpbSAqIDMpAChwYWNrZWQucG9zaXRpb25zLnNpemUoKSkgPT0gKG51bVBvaW50cyAqIDMgKiAodXNlc0Zsb2F0MTYgPyAyIDogMykpACUAUHVyZSB2aXJ0dWFsIGZ1bmN0aW9uIGNhbGxlZCEAW1NQWjogRVJST1JdIFVuc3VwcG9ydGVkIFNIIGRlZ3JlZTogJWQKAAkAAAAAAAAAAQAAAAMAAAAGAAAACAAAAAoAAAALAAAADQAAAKgOAABQawAAUGsAALhrAACwDgAATjNzcHoxM0dhdXNzaWFuQ2xvdWRFAHBwaWkAAFBrAADUDgAAuGsAANwOAABOU3QzX18yNnZlY3RvcklmTlNfOWFsbG9jYXRvcklmRUVFRQBpcHAAPGwAACwPAAAAAAAAAwAAAEQPAAAAAAAAkBAAAAAAAADAEAAAAAAAAE5TdDNfXzI4b3B0aW9uYWxJZkVFAAAAAOBrAABQDwAAgA8AAE5TdDNfXzIyN19fb3B0aW9uYWxfbW92ZV9hc3NpZ25fYmFzZUlmTGIxRUVFAAAAAOBrAACMDwAAvA8AAE5TdDNfXzIyN19fb3B0aW9uYWxfY29weV9hc3NpZ25fYmFzZUlmTGIxRUVFAAAAAOBrAADIDwAA8A8AAE5TdDNfXzIyMF9fb3B0aW9uYWxfbW92ZV9iYXNlSWZMYjFFRUUAAADgawAA/A8AACQQAABOU3QzX18yMjBfX29wdGlvbmFsX2NvcHlfYmFzZUlmTGIxRUVFAAAA4GsAADAQAABcEAAATlN0M19fMjIzX19vcHRpb25hbF9zdG9yYWdlX2Jhc2VJZkxiMEVFRQAAAAC4awAAZBAAAE5TdDNfXzIyNF9fb3B0aW9uYWxfZGVzdHJ1Y3RfYmFzZUlmTGIxRUVFAAAAuGsAAJgQAABOU3QzX18yMThfX3NmaW5hZV9jdG9yX2Jhc2VJTGIxRUxiMUVFRQAAuGsAAMgQAABOU3QzX18yMjBfX3NmaW5hZV9hc3NpZ25fYmFzZUlMYjFFTGIxRUVFAAAAAJhsAAAEEQAAAAAAANQOAABQTlN0M19fMjZ2ZWN0b3JJZk5TXzlhbGxvY2F0b3JJZkVFRUUAAAAAmGwAADwRAAABAAAA1A4AAFBLTlN0M19fMjZ2ZWN0b3JJZk5TXzlhbGxvY2F0b3JJZkVFRUUAcHAAdgB2cAAAAPQQAADwagAA9BAAAJhrAAB2cHBmAEGQIws08GoAAPQQAAB0awAAmGsAAHZwcHBmAAAAdGsAACwRAABwcHAABA8AANQOAAB0awAAcHBwcABB0CML1AQIawAA1A4AAHRrAACYawAAaXBwcGYAAAA8bAAAEBIAAAAAAAADAAAAKBIAAAAAAACQEAAAAAAAAMAQAAAAAAAATlN0M19fMjhvcHRpb25hbEloRUUAAAAA4GsAADQSAABkEgAATlN0M19fMjI3X19vcHRpb25hbF9tb3ZlX2Fzc2lnbl9iYXNlSWhMYjFFRUUAAAAA4GsAAHASAACgEgAATlN0M19fMjI3X19vcHRpb25hbF9jb3B5X2Fzc2lnbl9iYXNlSWhMYjFFRUUAAAAA4GsAAKwSAADUEgAATlN0M19fMjIwX19vcHRpb25hbF9tb3ZlX2Jhc2VJaExiMUVFRQAAAOBrAADgEgAACBMAAE5TdDNfXzIyMF9fb3B0aW9uYWxfY29weV9iYXNlSWhMYjFFRUUAAADgawAAFBMAAEATAABOU3QzX18yMjNfX29wdGlvbmFsX3N0b3JhZ2VfYmFzZUloTGIwRUVFAAAAALhrAABIEwAATlN0M19fMjI0X19vcHRpb25hbF9kZXN0cnVjdF9iYXNlSWhMYjFFRUUAAAC4awAAfBMAAE5TdDNfXzI2dmVjdG9ySWhOU185YWxsb2NhdG9ySWhFRUVFAJhsAACwEwAAAAAAAHQTAABQTlN0M19fMjZ2ZWN0b3JJaE5TXzlhbGxvY2F0b3JJaEVFRUUAAAAAmGwAAOgTAAABAAAAdBMAAFBLTlN0M19fMjZ2ZWN0b3JJaE5TXzlhbGxvY2F0b3JJaEVFRUUAAACgEwAA8GoAAKATAAAgawAAdnBwaQBBsCgL9gfwagAAoBMAAHRrAAAgawAAdnBwcGkAAAB0awAA2BMAAOgRAAB0EwAAdGsAAAAAAAAIawAAdBMAAHRrAAAgawAAaXBwcGkAcABwcHAAdnBwcAAAAAAAAAAAAwAAAAgAAAAPAAAAuGsAAJwUAABOU3QzX18yMTJiYXNpY19zdHJpbmdJY05TXzExY2hhcl90cmFpdHNJY0VFTlNfOWFsbG9jYXRvckljRUVFRQAAuGsAAOQUAABOU3QzX18yMTJiYXNpY19zdHJpbmdJaE5TXzExY2hhcl90cmFpdHNJaEVFTlNfOWFsbG9jYXRvckloRUVFRQAAuGsAACwVAABOU3QzX18yMTJiYXNpY19zdHJpbmdJd05TXzExY2hhcl90cmFpdHNJd0VFTlNfOWFsbG9jYXRvckl3RUVFRQAAuGsAAHQVAABOU3QzX18yMTJiYXNpY19zdHJpbmdJRHNOU18xMWNoYXJfdHJhaXRzSURzRUVOU185YWxsb2NhdG9ySURzRUVFRQAAALhrAADAFQAATlN0M19fMjEyYmFzaWNfc3RyaW5nSURpTlNfMTFjaGFyX3RyYWl0c0lEaUVFTlNfOWFsbG9jYXRvcklEaUVFRUUAAAC4awAADBYAAE4xMGVtc2NyaXB0ZW4zdmFsRQAAuGsAACgWAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0ljRUUAALhrAABQFgAATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJYUVFAAC4awAAeBYAAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWhFRQAAuGsAAKAWAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lzRUUAALhrAADIFgAATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJdEVFAAC4awAA8BYAAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWlFRQAAuGsAABgXAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlf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9P//TlN0M19fMjEzYmFzaWNfb3N0cmVhbUljTlNfMTFjaGFyX3RyYWl0c0ljRUVFRQAADAAAAAAAAACcOgAAQAAAAEEAAAD0////9P///5w6AABCAAAAQwAAAAQAAAAAAAAA5DoAAEQAAABFAAAA/P////z////kOgAARgAAAEcAAAA8bAAAnDsAAAMAAAACAAAAnDoAAAIAAADkOgAAAggAAE5TdDNfXzIxNGJhc2ljX2lvc3RyZWFtSWNOU18xMWNoYXJfdHJhaXRzSWNFRUVFAOBrAADYOwAAYDoAAE5TdDNfXzIxNWJhc2ljX3N0cmluZ2J1ZkljTlNfMTFjaGFyX3RyYWl0c0ljRUVOU185YWxsb2NhdG9ySWNFRUVFAAAAQAAAAAAAAAAMPQAAVQAAAFYAAAA4AAAA+P///ww9AABXAAAAWAAAAMD////A////DD0AAFkAAABaAAAAKDwAAIw8AADIPAAA3DwAAPA8AAAEPQAAtDwAAKA8AABQPAAAPDwAAEAAAAAAAAAAfDsAAEgAAABJAAAAOAAAAPj///98OwAASgAAAEsAAADA////wP///3w7AABMAAAATQAAAEAAAAAAAAAAnDoAAEAAAABBAAAAwP///8D///+cOgAAQgAAAEMAAAA4AAAAAAAAAOQ6AABEAAAARQAAAMj////I////5DoAAEYAAABHAAAA4GsAABg9AAB8OwAATlN0M19fMjE4YmFzaWNfc3RyaW5nc3RyZWFtSWNOU18xMWNoYXJfdHJhaXRzSWNFRU5TXzlhbGxvY2F0b3JJY0VFRUUAAAAAAAAAAHA9AABbAAAAXAAAALhrAAB4PQAATlN0M19fMjhpb3NfYmFzZUUAAAAAAAAA0XSeAFedvSqAcFIP//8+JwoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFGAAAADUAAABxAAAAa////877//+Sv///AAAAAAAAAAD/////////////////////////////////////////////////////////////////AAECAwQFBgcICf////////8KCwwNDg8QERITFBUWFxgZGhscHR4fICEiI////////woLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIj/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wABAgQHAwYFAAAAAAAAAAIAAMADAADABAAAwAUAAMAGAADABwAAwAgAAMAJAADACgAAwAsAAMAMAADADQAAwA4AAMAPAADAEAAAwBEAAMASAADAEwAAwBQAAMAVAADAFgAAwBcAAMAYAADAGQAAwBoAAMAbAADAHAAAwB0AAMAeAADAHwAAwAAAALMBAADDAgAAwwMAAMMEAADDBQAAwwYAAMMHAADDCAAAwwkAAMMKAADDCwAAwwwAAMMNAADTDgAAww8AAMMAAAy7AQAMwwIADMMDAAzDBAAM2wAAAADeEgSVAAAAAP///////////////8A/AAAUAAAAQy5VVEYtOABBkIABCwLUPwBBsIABC0dMQ19DVFlQRQAAAABMQ19OVU1FUklDAABMQ19USU1FAAAAAABMQ19DT0xMQVRFAABMQ19NT05FVEFSWQBMQ19NRVNTQUdFUwBBhIEBCy2A3igAgMhNAACndgAANJ4AgBLHAICf7gAAfhcBgFxAAYDpZwEAyJABAFW4AS4AQcCBAQvWAlN1bgBNb24AVHVlAFdlZABUaHUARnJpAFNhdABTdW5kYXkATW9uZGF5AFR1ZXNkYXkAV2VkbmVzZGF5AFRodXJzZGF5AEZyaWRheQBTYXR1cmRheQBKYW4ARmViAE1hcgBBcHIATWF5AEp1bgBKdWwAQXVnAFNlcABPY3QATm92AERlYwBKYW51YXJ5AEZlYnJ1YXJ5AE1hcmNoAEFwcmlsAE1heQBKdW5lAEp1bHkAQXVndXN0AFNlcHRlbWJlcgBPY3RvYmVyAE5vdmVtYmVyAERlY2VtYmVyAEFNAFBNACVhICViICVlICVUICVZACVtLyVkLyV5ACVIOiVNOiVTACVJOiVNOiVTICVwAAAAJW0vJWQvJXkAMDEyMzQ1Njc4OQAlYSAlYiAlZSAlVCAlWQAlSDolTTolUwAAAAAAXlt5WV0AXltuTl0AeWVzAG5vAAAgRABBpIgBC/kDAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAM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"),pe(xe,function(Se){ee(Se.instance)}).catch(r),{}}(),Wee=ie=>(Wee=Nu.C)(ie),Q5=i._malloc=ie=>(Q5=i._malloc=Nu.D)(ie),Yp=i._free=ie=>(Yp=i._free=Nu.E)(ie);i.dynCall_jiji=(ie,ee,xe,Se,Pe)=>(i.dynCall_jiji=Nu.F)(ie,ee,xe,Se,Pe),i.dynCall_viijii=(ie,ee,xe,Se,Pe,lt,bt)=>(i.dynCall_viijii=Nu.G)(ie,ee,xe,Se,Pe,lt,bt),i.dynCall_iiiiij=(ie,ee,xe,Se,Pe,lt,bt)=>(i.dynCall_iiiiij=Nu.H)(ie,ee,xe,Se,Pe,lt,bt),i.dynCall_iiiiijj=(ie,ee,xe,Se,Pe,lt,bt,dt,on)=>(i.dynCall_iiiiijj=Nu.I)(ie,ee,xe,Se,Pe,lt,bt,dt,on),i.dynCall_iiiiiijj=(ie,ee,xe,Se,Pe,lt,bt,dt,on,pn)=>(i.dynCall_iiiiiijj=Nu.J)(ie,ee,xe,Se,Pe,lt,bt,dt,on,pn);var wU;Q=function ie(){wU||jee(),wU||(Q=ie)};function jee(){function ie(){var ee;if(!wU&&(wU=!0,i.calledRun=!0,!S)){if(Ce(O),o(i),(ee=i.onRuntimeInitialized)==null||ee.call(i),i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;){var xe=i.postRun.shift();k.unshift(xe)}Ce(k)}}if(!(0{setTimeout(()=>i.setStatus(""),1),ie()},1)):ie())}}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);0i)=>{let i=e.vf32_ptr(t),o=t.size();return new Float32Array(e.HEAPF32.buffer,i,o).map(n)},Aze=e=>1/(1+Math.exp(-e)),gze=e=>t=>t*e+.5,_ze=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:wb(e,t.positions),scales:wb(e,t.scales,Math.exp),rotations:wb(e,t.rotations),alphas:wb(e,t.alphas,Aze),colors:wb(e,t.colors,gze(i)),sh:wb(e,t.sh)}},yze=(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))},Jae=async(e,t)=>{let n=await pze(),i=null;try{if(i=n._malloc(Uint8Array.BYTES_PER_ELEMENT*e.length),i===null)throw new Error("could'nt allocate memory");n.HEAPU8.set(e,i/Uint8Array.BYTES_PER_ELEMENT);let o=n.load_spz(i,e.length),r=_ze(n,o,t);return yze(n,o),r}catch(o){throw o}finally{i!==null&&n._free(i)}},Cze=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function X_(e){e=e??V.EMPTY_OBJECT;let t=e.resourceCache,n=e.gltf,i=e.primitive,o=e.spz,r=e.gltfResource,s=e.baseResource,a=e.cacheKey;this._resourceCache=t,this._gltfResource=r,this._baseResource=s,this._gltf=n,this._primitive=i,this._spz=o,this._cacheKey=a,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=ft.UNLOADED,this._promise=void 0,this._spzError=void 0}l(Object.create)&&(X_.prototype=Object.create(zi.prototype),X_.prototype.constructor=X_);Object.defineProperties(X_.prototype,{cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}});async function Eze(e){let t=e._resourceCache;try{let n=t.getBufferViewLoader({gltf:e._gltf,bufferViewId:0,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoader=n,await n.load(),e.isDestroyed()?void 0:(e._bufferViewTypedArray=n.typedArray,e._state=ft.PROCESSING,e)}catch(n){if(e.isDestroyed())return;Zae(e,n)}}X_.prototype.load=async function(){return l(this._promise)?this._promise:(this._state=ft.LOADING,this._promise=Eze(this),this._promise)};function Zae(e,t){throw e.unload(),e._state=ft.FAILED,e.getError("Failed to load SPZ",t)}async function Ize(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=ft.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}X_.prototype.process=function(e){if(this._state===ft.READY)return!0;if(this._state!==ft.PROCESSING||(l(this._spzError)&&Zae(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let t=Jae(this._bufferViewTypedArray);if(!l(t))return!1;this._decodePromise=Ize(this,t)};X_.prototype.unload=function(){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};var pM=X_;function AM(e){e=e??V.EMPTY_OBJECT;let t=e.id,n=e.properties??{},i={};for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r.semantic)&&(i[r.semantic]=r)}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)}AM.fromJson=function(e){e=e??V.EMPTY_OBJECT;let t=e.id,n=e.class,i={};for(let o in n.properties)if(n.properties.hasOwnProperty(o)){let r=qm.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new AM({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(AM.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}}});AM.BATCH_TABLE_CLASS_NAME="_batchTable";var wh=AM;function pz(e){e=e??V.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)}pz.fromJson=function(e){return new pz({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(pz.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 gM=pz;function Az(e){e=e??V.EMPTY_OBJECT;let t=e.id,n=e.values,i={},o={},r=n.length;for(let a=0;a>t};Fa.fromSubtreeJson=async function(e,t,n,i,o){let r=new Fa(e,i,o),s;l(t)?s={json:t,binary:void 0}:s=wze(n);let a=s.json;r._subtreeJson=a;let c;if(_i(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let E=a.tileMetadata;c=a.propertyTables[E]}let u=[];if(l(a.contentMetadata)){let E=a.contentMetadata.length;for(let I=0;I0;f=f||h;for(let p=0;p>BigInt(61)),u=c%2===0?pb.encode2D(i,o,r):pb.encode2D(i,r,o),f=DA.fromFacePositionLevel(c,BigInt(u),i),h,p;if(l(s)){let g=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:g,p=n<4?g:a.maximumHeight}else h=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:DA.getTokenFromId(f._cellId),minimumHeight:h,maximumHeight:p}}}}var Kze=new d,Xze=new d,qW=new d,Jze=new X;function cce(e,t,n,i,o){if(t===0)return e;let r=d.unpack(e,0,Xze),s=X.unpack(e,3,Jze),a=Math.pow(2,-t),c=-1+(2*n+1)*a,u=-1+(2*i+1)*a,f=0,h=d.fromElements(a,a,1,Kze);l(o)&&(f=-1+(2*o+1)*a,h.z=a);let p=d.fromElements(c,u,f,qW);p=X.multiplyByVector(s,p,qW),p=d.add(p,r,qW);let g=X.clone(s);g=X.multiplyByScale(g,h,g);let m=new Array(12);return d.pack(p,m),X.pack(g,m,3),m}var Zze=new ae;function lce(e,t,n,i,o){if(t===0)return e.slice();let r=ae.unpack(e,0,Zze),s=e[4],a=e[5],c=Math.pow(2,-t),u=c*r.width,f=D.negativePiToPi(r.west+n*u),h=D.negativePiToPi(f+u),p=c*r.height,g=D.negativePiToPi(r.south+i*p),m=D.negativePiToPi(g+p),_=s,y=a;if(l(o)){let C=c*(a-s);_+=o*C,y=_+C}return[f,g,h,m,_,y]}function $ze(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=sce(i,o,n,!1,t),s=rce(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},u=uce(e,i.baseResource,c,t);return u.implicitTileset=i,u.implicitCoordinates=o,u}function uce(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}Tl.prototype.hasProperty=function(e,t){return!1};Tl.prototype.getFeature=function(e){};Tl.prototype.applyDebugSettings=function(e,t){};Tl.prototype.applyStyle=function(e){};Tl.prototype.update=function(e,t){};Tl.prototype.pick=function(e,t,n){};Tl.prototype.isDestroyed=function(){return!1};Tl.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),ue(this)};Tl._deriveBoundingBox=cce;Tl._deriveBoundingRegion=lce;Tl._deriveBoundingVolumeS2=ace;var Pb=Tl;var eVe={NONE:0,REPEAT:1,MIRRORED_REPEAT:2},lu=Object.freeze(eVe);function Rb(e,t){this._distance=t,this._normal=new fce(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(Rb.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)&&!d.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),d.clone(e,this._normal._cartesian3)}}});Rb.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new Rb(e.normal,e.distance),t};Rb.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new Rb(e.normal,e.distance)};function fce(e,t){this._clippingPlane=t,this._cartesian3=d.clone(e)}Object.defineProperties(fce.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 $E=Rb;function Oc(e){e=e??V.EMPTY_OBJECT,this._planes=[],this._dirtyIndex=-1,this._multipleDirtyPlanes=!1,this._enabled=e.enabled??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.edgeColor=G.clone(e.edgeColor??G.WHITE),this.edgeWidth=e.edgeWidth??0,this.planeAdded=new ge,this.planeRemoved=new ge,this._owner=void 0;let t=e.unionClippingRegions??!1;this._unionClippingRegions=t,this._testIntersection=t?Ace:gce,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 o=0;o0&&(r=tn.OUTSIDE);for(let s=0;s80*n){a=1/0,c=1/0;let f=-1/0,h=-1/0;for(let p=n;pf&&(f=g),m>h&&(h=m)}u=Math.max(f-a,h-c),u=u!==0?32767/u:0}return xM(r,s,n,a,c,u,0),s}function Ece(e,t,n,i,o){let r;if(o===CVe(e,t,n,i)>0)for(let s=t;s=t;s-=i)r=Cce(s/i|0,e[s],e[s+1],r);return r&&Mb(r,r.next)&&(TM(r),r=r.next),r}function e0(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(Mb(n,n.next)||$r(n.prev,n,n.next)===0)){if(TM(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function xM(e,t,n,i,o,r,s){if(!e)return;!s&&r&&mVe(e,i,o,r);let a=e;for(;e.prev!==e.next;){let c=e.prev,u=e.next;if(r?sVe(e,i,o,r):rVe(e)){t.push(c.i,e.i,u.i),TM(e),e=u.next,a=u.next;continue}if(e=u,e===a){s?s===1?(e=aVe(e0(e),t),xM(e,t,n,i,o,r,2)):s===2&&cVe(e,t,n,i,o,r):xM(e0(e),t,n,i,o,r,1);break}}}function rVe(e){let t=e.prev,n=e,i=e.next;if($r(t,n,i)>=0)return!1;let o=t.x,r=n.x,s=i.x,a=t.y,c=n.y,u=i.y,f=Math.min(o,r,s),h=Math.min(a,c,u),p=Math.max(o,r,s),g=Math.max(a,c,u),m=i.next;for(;m!==t;){if(m.x>=f&&m.x<=p&&m.y>=h&&m.y<=g&&IM(o,a,r,c,s,u,m.x,m.y)&&$r(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function sVe(e,t,n,i){let o=e.prev,r=e,s=e.next;if($r(o,r,s)>=0)return!1;let a=o.x,c=r.x,u=s.x,f=o.y,h=r.y,p=s.y,g=Math.min(a,c,u),m=Math.min(f,h,p),_=Math.max(a,c,u),y=Math.max(f,h,p),C=XW(g,m,t,n,i),E=XW(_,y,t,n,i),I=e.prevZ,b=e.nextZ;for(;I&&I.z>=C&&b&&b.z<=E;){if(I.x>=g&&I.x<=_&&I.y>=m&&I.y<=y&&I!==o&&I!==s&&IM(a,f,c,h,u,p,I.x,I.y)&&$r(I.prev,I,I.next)>=0||(I=I.prevZ,b.x>=g&&b.x<=_&&b.y>=m&&b.y<=y&&b!==o&&b!==s&&IM(a,f,c,h,u,p,b.x,b.y)&&$r(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;I&&I.z>=C;){if(I.x>=g&&I.x<=_&&I.y>=m&&I.y<=y&&I!==o&&I!==s&&IM(a,f,c,h,u,p,I.x,I.y)&&$r(I.prev,I,I.next)>=0)return!1;I=I.prevZ}for(;b&&b.z<=E;){if(b.x>=g&&b.x<=_&&b.y>=m&&b.y<=y&&b!==o&&b!==s&&IM(a,f,c,h,u,p,b.x,b.y)&&$r(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function aVe(e,t){let n=e;do{let i=n.prev,o=n.next.next;!Mb(i,o)&&xce(i,n,n.next,o)&&bM(i,o)&&bM(o,i)&&(t.push(i.i,n.i,o.i),TM(n),TM(n.next),n=e=o),n=n.next}while(n!==e);return e0(n)}function cVe(e,t,n,i,o,r){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&gVe(s,a)){let c=bce(s,a);s=e0(s,s.next),c=e0(c,c.next),xM(s,t,n,i,o,r,0),xM(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function lVe(e,t,n,i){let o=[];for(let r=0,s=t.length;r=n.next.y&&n.next.y!==n.y){let h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=i&&h>r&&(r=h,s=n.x=n.x&&n.x>=c&&i!==n.x&&Ice(os.x||n.x===s.x&&hVe(s,n)))&&(s=n,f=h)}n=n.next}while(n!==a);return s}function hVe(e,t){return $r(e.prev,e,t.prev)<0&&$r(t.next,e,e.next)<0}function mVe(e,t,n,i){let o=e;do o.z===0&&(o.z=XW(o.x,o.y,t,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,pVe(o)}function pVe(e){let t,n=1;do{let i=e,o;e=null;let r=null;for(t=0;i;){t++;let s=i,a=0;for(let u=0;u0||c>0&&s;)a!==0&&(c===0||!s||i.z<=s.z)?(o=i,i=i.nextZ,a--):(o=s,s=s.nextZ,c--),r?r.nextZ=o:e=o,o.prevZ=r,r=o;i=s}r.nextZ=null,n*=2}while(t>1);return e}function XW(e,t,n,i,o){return e=(e-n)*o|0,t=(t-i)*o|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 AVe(e){let t=e,n=e;do(t.x=(e-s)*(r-a)&&(e-s)*(i-a)>=(n-s)*(t-a)&&(n-s)*(r-a)>=(o-s)*(i-a)}function IM(e,t,n,i,o,r,s,a){return!(e===s&&t===a)&&Ice(e,t,n,i,o,r,s,a)}function gVe(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!_Ve(e,t)&&(bM(e,t)&&bM(t,e)&&yVe(e,t)&&($r(e.prev,e,t.prev)||$r(e,t.prev,t))||Mb(e,t)&&$r(e.prev,e,e.next)>0&&$r(t.prev,t,t.next)>0)}function $r(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Mb(e,t){return e.x===t.x&&e.y===t.y}function xce(e,t,n,i){let o=Cz($r(e,t,n)),r=Cz($r(e,t,i)),s=Cz($r(n,i,e)),a=Cz($r(n,i,t));return!!(o!==r&&s!==a||o===0&&yz(e,n,t)||r===0&&yz(e,i,t)||s===0&&yz(n,e,i)||a===0&&yz(n,t,i))}function yz(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 Cz(e){return e>0?1:e<0?-1:0}function _Ve(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&&xce(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function bM(e,t){return $r(e.prev,e,e.next)<0?$r(e,t,e.next)>=0&&$r(e,e.prev,t)>=0:$r(e,t,e.prev)<0||$r(e,e.next,t)<0}function yVe(e,t){let n=e,i=!1,o=(e.x+t.x)/2,r=(e.y+t.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&o<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e);return i}function bce(e,t){let n=JW(e.i,e.x,e.y),i=JW(t.i,t.x,t.y),o=e.next,r=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function Cce(e,t,n,i){let o=JW(e,t,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function TM(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 JW(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CVe(e,t,n,i){let o=0;for(let r=t,s=n-i;r0?Bs.COUNTER_CLOCKWISE:Bs.CLOCKWISE};J_.triangulate=function(e,t){let n=U.packArray(e);return ZW(n,t,2)};var Bce=new d,Dce=new d,vce=new d,Tce=new d,Sce=new d,wce=new d,OA=new d,Pce=new U,Rce=new U,Mce=new U,Nb=new U;J_.computeSubdivision=function(e,t,n,i,o){o=o??D.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),h=0,p=0;for(a=0;a0;){let I=s.pop(),b=s.pop(),S=s.pop(),B=d.fromArray(u,S*3,Bce),v=d.fromArray(u,b*3,Dce),P=d.fromArray(u,I*3,vce),N,L,A;r&&(N=U.fromArray(f,S*2,Pce),L=U.fromArray(f,b*2,Rce),A=U.fromArray(f,I*2,Mce));let x=d.multiplyByScalar(d.normalize(B,Tce),_,Tce),T=d.multiplyByScalar(d.normalize(v,Sce),_,Sce),w=d.multiplyByScalar(d.normalize(P,wce),_,wce),R=d.magnitudeSquared(d.subtract(x,T,OA)),O=d.magnitudeSquared(d.subtract(T,w,OA)),k=d.magnitudeSquared(d.subtract(w,x,OA)),F=Math.max(R,O,k),z,Q,H;F>C?R===F?(z=`${Math.min(S,b)} ${Math.max(S,b)}`,a=m[z],l(a)||(Q=d.add(B,v,OA),d.multiplyByScalar(Q,.5,Q),u.push(Q.x,Q.y,Q.z),a=u.length/3-1,m[z]=a,r&&(H=U.add(N,L,Nb),U.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),s.push(S,a,I),s.push(a,b,I)):O===F?(z=`${Math.min(b,I)} ${Math.max(b,I)}`,a=m[z],l(a)||(Q=d.add(v,P,OA),d.multiplyByScalar(Q,.5,Q),u.push(Q.x,Q.y,Q.z),a=u.length/3-1,m[z]=a,r&&(H=U.add(L,A,Nb),U.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),s.push(b,a,S),s.push(a,I,S)):k===F&&(z=`${Math.min(I,S)} ${Math.max(I,S)}`,a=m[z],l(a)||(Q=d.add(P,B,OA),d.multiplyByScalar(Q,.5,Q),u.push(Q.x,Q.y,Q.z),a=u.length/3-1,m[z]=a,r&&(H=U.add(A,N,Nb),U.multiplyByScalar(H,.5,H),f.push(H.x,H.y))),s.push(I,a,b),s.push(a,S,b)):(g.push(S),g.push(b),g.push(I))}let E={attributes:{position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Ne.TRIANGLES};return r&&(E.attributes.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:f})),new ht(E)};var xVe=new me,bVe=new me,TVe=new me,$W=new me;J_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=o??D.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),h=0,p=0;for(a=0;a0;){let S=s.pop(),B=s.pop(),v=s.pop(),P=d.fromArray(u,v*3,Bce),N=d.fromArray(u,B*3,Dce),L=d.fromArray(u,S*3,vce),A,x,T;r&&(A=U.fromArray(f,v*2,Pce),x=U.fromArray(f,B*2,Rce),T=U.fromArray(f,S*2,Mce));let w=e.cartesianToCartographic(P,xVe),R=e.cartesianToCartographic(N,bVe),O=e.cartesianToCartographic(L,TVe);C.setEndPoints(w,R);let k=C.surfaceDistance;E.setEndPoints(R,O);let F=E.surfaceDistance;I.setEndPoints(O,w);let z=I.surfaceDistance,Q=Math.max(k,F,z),H,j,Z,Y,$;Q>y?k===Q?(H=`${Math.min(v,B)} ${Math.max(v,B)}`,a=m[H],l(a)||(j=C.interpolateUsingFraction(.5,$W),Z=(w.height+R.height)*.5,Y=d.fromRadians(j.longitude,j.latitude,Z,e,OA),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,m[H]=a,r&&($=U.add(A,x,Nb),U.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(v,a,S),s.push(a,B,S)):F===Q?(H=`${Math.min(B,S)} ${Math.max(B,S)}`,a=m[H],l(a)||(j=E.interpolateUsingFraction(.5,$W),Z=(R.height+O.height)*.5,Y=d.fromRadians(j.longitude,j.latitude,Z,e,OA),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,m[H]=a,r&&($=U.add(x,T,Nb),U.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(B,a,v),s.push(a,S,v)):z===Q&&(H=`${Math.min(S,v)} ${Math.max(S,v)}`,a=m[H],l(a)||(j=I.interpolateUsingFraction(.5,$W),Z=(O.height+w.height)*.5,Y=d.fromRadians(j.longitude,j.latitude,Z,e,OA),u.push(Y.x,Y.y,Y.z),a=u.length/3-1,m[H]=a,r&&($=U.add(T,A,Nb),U.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(S,a,B),s.push(a,v,B)):(g.push(v),g.push(B),g.push(S))}let b={attributes:{position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:u})},indices:g,primitiveType:Ne.TRIANGLES};return r&&(b.attributes.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:f})),new ht(b)};J_.scaleToGeodeticHeight=function(e,t,n,i){n=n??ne.default;let o=EVe,r=IVe;if(t=t??0,i=i??!0,l(e)){let s=e.length;for(let a=0;a10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};Z_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};Z_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};Z_.prototype.clear=function(){this._array.length=this._offset=this._length=0};Z_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var $_=Z_;var mr={};mr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.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;u0?new Array(o):void 0;for(let a=0;aD.PI){let c=s;s=a,a=c}if(!(r.longitudea))return n.cartographicToCartesian(r)}function LVe(e,t,n,i){if(i===ln.RHUMB)return NVe(e,t,n);let o=fi.lineSegmentPlane(e,t,hn.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var OVe=new me;function FVe(e,t,n){let i=[],o,r,s,a,c,u=0;for(;ut.cartesianToCartographic(h,OVe).longitude;if(s===0)i.push({position:u,type:s,visited:!1,next:a,theta:f(o)});else if(a!==0){if(c=LVe(o,r,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 Fce(e,t,n,i,o,r,s){let a=[],c=r,u=h=>p=>p.position===h,f=[];do{let h=n[c];a.push(h);let p=i.findIndex(u(c)),g=i[p];if(!l(g)){++c;continue}let{visited:m,type:_,next:y}=g;if(g.visited=!0,_===0){if(y===0){let b=i[p-(s?1:-1)];if(b?.position===c+1)b.visited=!0;else{++c;continue}}if(!m&&s&&y>0||r===c&&!s&&y<0){++c;continue}}if(!(s?_>=0:_<=0)){++c;continue}m||f.push(c);let E=p+(s?1:-1),I=i[E];if(!l(I)){++c;continue}c=I.position}while(c=0&&c!==r&&a.lengthu.theta-f.theta);let c=s[0].z>=0;o=Fce(i,o,s,a,1,0,c)}return i};mr.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new $_;c.enqueue(e);let u=l(r);for(;c.length!==0;){let f=c.dequeue(),h=f.positions,p=f.holes,g,m;if(i)for(m=h.length,g=0;g1){for(let v of B)c.enqueue(new uc(v,p));continue}}let E=h.slice(),I=l(p)?p.length:0,b=[],S;for(g=0;gMath.PI&&(e-=D.TWO_PI),e}}});var Lb=new me,HVe=new d;es.prototype.getLatitude=function(e){l(e)||(e=ne.default),Lb.latitude=this.conformalLatitude,Lb.longitude=this.longitude,Lb.height=0;let t=this.ellipsoid.cartographicToCartesian(Lb,HVe);return e.cartesianToCartographic(t,Lb),Lb.latitude};var WVe=new xn,jVe=new d,YVe=new d;es.fromCartesian=function(e,t){let n=D.signNotZero(e.z),i=es.NORTH_POLE_TANGENT_PLANE,o=es.SOUTH_POLE;n<0&&(i=es.SOUTH_POLE_TANGENT_PLANE,o=es.NORTH_POLE);let r=WVe;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=d.subtract(r.origin,o,jVe),d.normalize(r.direction,r.direction);let s=fi.rayPlane(r,i.plane,YVe),a=d.subtract(s,o,s),c=d.dot(i.xAxis,a),u=n*d.dot(i.yAxis,a);return l(t)?(t.position=new U(c,u),t.tangentPlane=i,t):new es(new U(c,u),i)};es.fromCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i=0?s:s+D.TWO_PI;o.westOverIdl=Math.min(o.westOverIdl,a),o.eastOverIdl=Math.max(o.eastOverIdl,a),r.west=Math.min(r.west,s),r.east=Math.max(r.east,s);let c=e.getLatitude(n),u=c;if(r.south=Math.min(r.south,c),r.north=Math.max(r.north,c),i!==ln.RHUMB){let p=U.subtract(t.position,e.position,f4e),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),d4e),_=Fc.clone(t,h4e);_.position=m;let y=_.getLatitude(n);r.south=Math.min(r.south,y),r.north=Math.max(r.north,y),Math.abs(c)>Math.abs(y)&&(u=y)}}let f=t.x*e.y-e.x*t.y,h=Math.sign(f);h!==0&&(h*=U.angleBetween(t.position,e.position)),u>=0&&(o.northAngle+=h),u<=0&&(o.southAngle+=h)}var Vce=new Fc,m4e=new Fc,cd={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};ld.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ae),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,cd.northAngle=0,cd.southAngle=0,cd.westOverIdl=Number.POSITIVE_INFINITY,cd.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=Fc.fromCartesian(e[0],m4e);for(let s=1;scd.eastOverIdl-cd.westOverIdl&&(i.west=cd.westOverIdl,i.east=cd.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(cd.northAngle),D.TWO_PI,D.EPSILON10)&&(i.north=D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),D.equalsEpsilon(Math.abs(cd.southAngle),D.TWO_PI,D.EPSILON10)&&(i.south=-D.PI_OVER_TWO,i.east=D.PI,i.west=-D.PI),i};var p4e=new Fc;function A4e(e,t,n){return e.height>=D.PI||e.width>=D.PI?Fc.fromCartesian(t[0],p4e).tangentPlane:ms.fromPoints(t,n)}var Hce=new me;function g4e(e,t,n){return(i,o)=>{if(e.height>=D.PI||e.width>=D.PI){if(e.south<0&&e.north>0){l(o)||(o=[]);for(let s=0;s=D.PI||e.width>=D.PI)return(o,r)=>{if(e.south<0&&e.north>0){let s=n.cartesianToCartographic(o,Hce);return l(r)||(r=new U),r.x=s.longitude/D.PI,r.y=s.latitude/D.PI_OVER_TWO,r}return Fc.fromCartesian(o,r)};let i=ms.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function y4e(e,t,n,i){return(o,r)=>!i&&(e.height>=D.PI_OVER_TWO||e.width>=2*D.PI_OVER_THREE)?Zn.splitPolygonsOnEquator(o,t,n,r):o}function C4e(e,t,n,i){if(t.height>=D.PI||t.width>=D.PI)return qe.fromRectangle(t,void 0,kce);let o=e,r=ms.fromPoints(o,n);return Zn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,kce)}ld.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,u=e._arcType,f=e._textureCoordinates,h=l(f),p=r.positions;if(p.length<3)return;let g=e.rectangle,m=Zn.polygonsFromHierarchy(r,h,g4e(g,p,n),!s,n,y4e(g,n,u,s)),_=m.hierarchy,y=m.polygons,C=function(w){return w},E=h?Zn.polygonsFromHierarchy(f,!0,C,!1,n).polygons:void 0;if(_.length===0)return;let I=_[0].outerRing,b=C4e(I,g,n,o),S=[],B=e._height,v=e._extrudedHeight,P=e._perPositionHeightExtrude||!D.equalsEpsilon(B,v,0,D.EPSILON2),N={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:A4e(g,I,n).plane.normal,projectTo2d:_4e(g,I,n),boundingRectangle:b,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},L;if(P)for(N.extrude=!0,N.top=a,N.bottom=c,N.shadowVolume=e._shadowVolume,N.offsetAttribute=e._offsetAttribute,L=0;L 2) { dimension = ceil(log2(float(u_extentsLength))); } int regionIndex = getPolygonIndex(dimension, v_textureCoordinates); for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) { ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex); int positionsLength = positionsLengthAndExtents.x; int polygonExtentsIndex = positionsLengthAndExtents.y; lastPolygonIndex += 1; // Only compute signed distance for the relevant part of the atlas if (polygonExtentsIndex == regionIndex) { float clipAmount = czm_infinity; vec4 extents = getExtents(polygonExtentsIndex); vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension; vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents); float s = 1.0; // Check each edge for absolute distance for (int i = 0, j = positionsLength - 1; i < positionsLength; j = i, i++) { vec2 a = getPolygonPosition(lastPolygonIndex + i); vec2 b = getPolygonPosition(lastPolygonIndex + j); vec2 ab = b - a; vec2 pa = p - a; float t = dot(pa, ab) / dot(ab, ab); t = clamp(t, 0.0, 1.0); vec2 pq = pa - t * ab; float d = length(pq); // Inside / outside computation to determine sign bvec3 cond = bvec3(p.y >= a.y, p.y < b.y, ab.x * pa.y > ab.y * pa.x); if (all(cond) || all(not(cond))) s = -s; if (abs(d) < abs(clipAmount)) { clipAmount = d; } } // Normalize the range to [0,1] vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5; // In the case where we've iterated through multiple polygons, take the minimum out_FragColor = min(out_FragColor, result); } lastPolygonIndex += positionsLength; } }`;function _s(e){e=e??V.EMPTY_OBJECT,this._polygons=[],this._totalPositions=0,this.enabled=e.enabled??!0,this.inverse=e.inverse??!1,this.polygonAdded=new ge,this.polygonRemoved=new ge,this._owner=void 0,this._float32View=void 0,this._extentsFloat32View=void 0,this._extentsCount=0,this._polygonsTexture=void 0,this._extentsTexture=void 0,this._signedDistanceTexture=void 0,this._signedDistanceComputeCommand=void 0;let t=e.polygons;if(l(t)){let n=t.length;for(let i=0;iFb.equals(t,e))};_s.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>Fb.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};var x4e=new ae;function b4e(e){let t=[],n=[],i=e.length;for(let r=0;rae.union(e[y].computeSphericalExtents(x4e),_,_),a),t[p]=void 0,n[p]=void 0,c=Math.max(a.height*2.5,.001),u=Math.max(a.width*2.5,.001),f=ae.clone(a,f),f.south-=c,f.west-=u,f.north+=c,f.east+=u,f.south=Math.max(f.south,-Math.PI),f.west=Math.max(f.west,-Math.PI),f.north=Math.min(f.north,Math.PI),f.east=Math.min(f.east,Math.PI),p=-1}}t.push(f),n.push(h)}let o=new Map;return n.filter(l).forEach((r,s)=>r.forEach(a=>o.set(a,s))),{extentsList:t.filter(l),extentsIndexByPolygon:o}}_s.prototype.removeAll=function(){let e=this._polygons,t=e.length;for(let n=0;ns+a.length,0);if(n===this.totalPositions||(this._totalPositions=n,this.length===0))return;l(this._signedDistanceComputeCommand)&&(this._signedDistanceComputeCommand.canceled=!0,this._signedDistanceComputeCommand=void 0);let i=this._polygonsTexture,o=this._extentsTexture,r=this._signedDistanceTexture;if(l(i)){let s=i.width*i.height;(s{e._signedDistanceComputeCommand=void 0}})}var jce=new ae,w4e=new ae;_s.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=tn.OUTSIDE;this.inverse&&(o=tn.INSIDE);for(let r=0;r= PRIMARY_STEPS) { break; } // Calculate sample position along viewpoint ray. vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength); // Calculate height of sample position above ellipsoid. float sampleHeight = length(samplePosition) - atmosphereInnerRadius; // Calculate and accumulate density of particles at the sample position. vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength; opticalDepth += sampleDensity; // Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere. 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); // Sample positions along the light ray, to accumulate incidence of light on the latest sample segment. for (int j = 0; j < LIGHT_STEPS_MAX; ++j) { // The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot // loop with non-constant condition, so it has to break early instead if (j >= LIGHT_STEPS) { break; } // Calculate sample position along light ray. vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5); // Calculate height of the light sample position above ellipsoid. float lightHeight = length(lightPosition) - atmosphereInnerRadius; // Calculate density of photons at the light sample position. lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength; // Increment distance on light ray. lightPositionLength += lightStepLength; } // Compute attenuation via the primary ray and the light ray. vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x)))); // Accumulate the scattering. rayleighAccumulation += sampleDensity.x * attenuation; mieAccumulation += sampleDensity.y * attenuation; // Increment distance on primary ray. rayPositionLength += (rayStepLength += rayStepLengthIncrease); } // Compute the scattering amount. rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation; mieColor = u_atmosphereMieCoefficient * mieAccumulation; // Compute the transmittance i.e. how much light is passing through the atmosphere. opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x)))); } vec4 computeAtmosphereColor( vec3 positionWC, vec3 lightDirection, vec3 rayleighColor, vec3 mieColor, float opacity ) { // Setup the primary ray: from the camera position to the vertex position. 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; // The Rayleigh phase function. float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq); // The Mie phase function. 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)); // The final color is generated by combining the effects of the Rayleigh and Mie scattering. vec3 rayleigh = rayleighPhase * rayleighColor; vec3 mie = miePhase * mieColor; vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity; return vec4(color, opacity); } `;var BM=`uniform samplerCube u_radianceMap; in vec2 v_textureCoordinates; const float twoSqrtPi = 2.0 * sqrt(czm_pi); // Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf float computeShBasis(int index, vec3 s) { if (index == 0) { // l = 0, m = 0 return 1.0 / twoSqrtPi; } if (index == 1) { // l = 1, m = -1 return -sqrt(3.0) * s.y / twoSqrtPi; } if (index == 2) { // l = 1, m = 0 return sqrt(3.0) * s.z / twoSqrtPi; } if (index == 3) { // l = 1, m = 1 return -sqrt(3.0) * s.x / twoSqrtPi; } if (index == 4) { // l = 2, m = -2 return sqrt(15.0) * s.y * s.x / twoSqrtPi; } if (index == 5) { // l = 2, m = -1 return -sqrt(15.0) * s.y * s.z / twoSqrtPi; } if (index == 6) { // l = 2, m = 0 return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi; } if (index == 7) { // l = 2, m = 1 return -sqrt(15.0) * s.x * s.z / twoSqrtPi; } if (index == 8) { // l = 2, m = 2 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)); } // Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics const int samples = 256; const float solidAngle = 1.0 / float(samples); void main() { // Get the current coefficient based on the uv 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))); // Generate the spherical harmonics basis from the direction float Ylm = computeShBasis(coefficientIndex, direction); vec3 lookupDirection = -direction.xyz; lookupDirection.z = -lookupDirection.z; vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0); // Use the relevant function for this coefficient out_FragColor += Ylm * color * solidAngle * sinTheta; } } `;var DM=`precision highp float; in vec2 v_textureCoordinates; uniform vec3 u_faceDirection; // Current cubemap face uniform vec3 u_positionWC; uniform mat4 u_enuToFixedFrame; uniform vec4 u_brightnessSaturationGammaIntensity; uniform vec4 u_groundColor; // alpha component represent albedo 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); // Scale the position to ensure the sky color is present, even when underground. 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); // Compute sky color for each position on a sphere at radius centered around the provided position's origin 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; // Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z. lookupDirection.x = -lookupDirection.x; lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection); lookupDirection.x = -lookupDirection.x; // Values outside the atmopshere are rendered as black, when they should be treated as transparent float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0); skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent // Blend starmap with atmopshere scattering 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); // Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height 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)); // Normally this would be in the ifdef above, but there is a precision issue with the atmopshere scattering transmittance (alpha). Having this line is a workaround for that issue, even when gamma is 1.0. color.rgb = czm_gammaCorrect(color.rgb); out_FragColor = color; } `;var vM=`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; } // Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses 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; // reflected vector 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 PM=`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 hi(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??V.EMPTY_OBJECT;let t=Math.min(e.mipmapLevels??7,Math.log2(qt.maximumCubeMapSize));this._mipmapLevels=t,this._radianceMapComputeCommands=new Array(6),this._convolutionComputeCommands=new Array((t-1)*6),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((t-1)*6),this._radianceCubeMap=void 0,this._irradianceMapTexture=void 0,this._sphericalHarmonicCoefficients=hi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new K;let n=Math.pow(2,t-1);this._textureDimensions=new U(n,n),this._radiiAndDynamicAtmosphereColor=new d,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=e.enabled??!0,this.shouldUpdate=!0,this.maximumSecondsDifference=e.maximumSecondsDifference??60*60,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??hi.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(hi.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){d.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=d.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}}});hi._maximumComputeCommandCount=8;hi._activeComputeCommandCount=0;hi._nextFrameCommandQueue=[];hi._queueCommand=(e,t)=>{if(hi._activeComputeCommandCount>=hi._maximumComputeCommandCount){hi._nextFrameCommandQueue.push(e);return}t.commandList.push(e),hi._activeComputeCommandCount++};hi._updateCommandQueue=e=>{if(hi._maximumComputeCommandCount=Math.log2(qt.maximumCubeMapSize),hi._nextFrameCommandQueue.length>0&&hi._activeComputeCommandCounts,u_enuToFixedFrame:()=>c,u_faceDirection:()=>kr.getDirection(h,qce),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>u,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,M4e)},owner:e});m.postExecute=()=>{if(e.isDestroyed()||m.canceled){hi._activeComputeCommandCount--;return}let _=e._radianceMapComputeCommands;_[g]=void 0;let y=new Xr({context:n,colorTextures:[e._radianceMapTextures[g]]});y._bind(),e._radianceCubeMap[h].copyFromFramebuffer(),y._unBind(),y.destroy(),hi._activeComputeCommandCount--,_.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[f]=m,hi._queueCommand(m,t),f++}e._radianceCommandsDirty=!1}}function L4e(e,t){let n=e._radianceCubeMap;n.generateMipmap();let i=e._mipmapLevels,o=e._textureDimensions,r=o.x/2,s=o.y/2,a=t.context,c=0,u=(h,p,g,m,_)=>()=>{if(e.isDestroyed()||h.canceled){hi._activeComputeCommandCount--;return}let y=e._convolutionComputeCommands;y[p]=void 0,n.copyFace(t,g,m,_),c++,hi._activeComputeCommandCount--,g.destroy(),e._specularMapTextures[p]=void 0;let C=e._specularMapTextures.length;c>=C&&(e._irradianceCommandDirty=!0,n.sampler=new nn({minificationFilter:$t.LINEAR_MIPMAP_LINEAR}),e._shouldRegenerateShaders=!0,e._va.destroy(),e._va=void 0,e._convolveSP.destroy(),e._convolveSP=void 0)},f=0;for(let h=1;hh/(i-1),u_radianceTexture:()=>n??a.defaultTexture,u_faceDirection:()=>kr.getDirection(p,qce)}});y.postExecute=u(y,f,g,p,h),e._convolutionComputeCommands[f]=y,hi._queueCommand(y,t),++f}r/=2,s/=2}}var Kce=new U(3,3);function O4e(e,t){let n=t.context,i=Kce,o=e._irradianceMapTexture;l(o)&&!o.isDestroyed()&&o.destroy(),o=new Nt({context:n,width:i.x,height:i.y,pixelDatatype:Ve.FLOAT,pixelFormat:$e.RGBA}),e._irradianceMapTexture=o;let r=e._irradianceMapFS;l(r)||(r=new He({sources:[BM]}),e._irradianceMapFS=r);let s=new sl({fragmentShaderSource:r,outputTexture:o,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});s.postExecute=()=>{if(e.isDestroyed()||s.canceled){hi._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,hi._activeComputeCommandCount--},e._irradianceComputeCommand=s,hi._queueCommand(s,t),e._irradianceTextureDirty=!0}function F4e(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new Xr({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=Kce,r=n.readPixels({x:0,y:0,width:o.x,height:o.y,framebuffer:i});for(let s=0;s<9;++s)e._sphericalHarmonicCoefficients[s]=d.unpack(r,s*4),d.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}hi.prototype.update=function(e){let t=e.mode;if(!hi.isDynamicUpdateSupported(e)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===oe.MORPHING){this._shouldRegenerateShaders=!1;return}hi._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,o=v4e(this,e)||i===QA.SUNLIGHT&&!K.equalsEpsilon(e.time,this._lastTime,this.maximumSecondsDifference);if(this._shouldReset||o){this.reset(),this._shouldReset=!1,this._lastTime=K.clone(e.time,this._lastTime);return}if(this._radianceMapDirty&&(N4e(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(L4e(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(O4e(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){F4e(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};hi.prototype.isDestroyed=function(){return!1};hi.prototype.destroy=function(){let e=this._radianceMapComputeCommands.length;for(let t=0;t4?(yt(`Property texture property ${e.id} is an array of length ${e.arrayLength}, but may have at most a length of 4`),!1):t!==At.SCALAR?(yt(`Property texture property ${e.id} is an array of type ${t}, but only SCALAR is supported`),!1):n!==zt.UINT8?(yt(`Property texture property ${e.id} is an array with component type ${n}, but only UINT8 is supported`),!1):!0:At.isVectorType(t)||t===At.SCALAR?n!==zt.UINT8?(yt(`Property texture property ${e.id} has component type ${n}, but only UINT8 is supported`),!1):!0:(yt(`Property texture property ${e.id} has an unsupported type`),!1)};var U4e=[void 0,"float","vec2","vec3","vec4"],G4e=[void 0,"int","ivec2","ivec3","ivec4"];NM.prototype.getGlslType=function(){let e=this._classProperty,t=At.getComponentCount(e.type);return e.isArray&&(t=e.arrayLength),e.normalized?U4e[t]:G4e[t]};NM.prototype.unpackInShader=function(e){return this._classProperty.normalized?e:`${this.getGlslType()}(255.0 * ${e})`};function z4e(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var LM=NM;function ij(e){e=e??V.EMPTY_OBJECT;let t=e.propertyTexture,n=e.class,i=e.textures,o=t.extensions,r=t.extras,s={};if(l(t.properties))for(let a in t.properties)t.properties.hasOwnProperty(a)&&(s[a]=new LM({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=r,this._extensions=o}Object.defineProperties(ij.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}}});ij.prototype.getProperty=function(e){return this._properties[e]};var GA=ij;function Jce(e){e=e??V.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,o=t.scale,r=n.hasValueTransform||l(i)||l(o);i=i??n.offset,o=o??n.scale,i=n.unpackVectorAndMatrixTypes(i),o=n.unpackVectorAndMatrixTypes(o),this._offset=i,this._scale=o,this._hasValueTransform=r,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Jce.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 OM=Jce;function oj(e){e=e??V.EMPTY_OBJECT;let t=e.propertyAttribute,n=e.class,i={};if(l(t.properties))for(let o in t.properties)t.properties.hasOwnProperty(o)&&(i[o]=new OM({property:t.properties[o],classProperty:n.properties[o]}));this._name=e.name,this._id=e.id,this._class=n,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(oj.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}}});oj.prototype.getProperty=function(e){return this._properties[e]};var o0=oj;function FM(e){e=e??V.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(FM.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=r;)C=o[C-r];o.push(C),s[_]=y}y>s8e&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):y>a8e&&t instanceof Uint8Array&&(t=new Uint16Array(t)),_===c?(c=y,t[a]=y):_===u?(u=y,t[a+1]=y):(f=y,t[a+2]=y),_=$ce(i,c,u,f,p,g,m)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function $ce(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,u=0,f=rj(e,t,a,c,u);if(f===0)return t;let h=0,p=o?1:0,g=r?1:0,m=rj(e,n,h,p,g);if(m===0)return n;let _=s?1:0,y=0,C=r?1:0,E=rj(e,i,_,y,C);if(E===0)return i;let I=f&m&E,b,S,B;if(I&1)b=0,S=1,B=2;else if(I&2)b=0,B=1,S=2;else if(I&4)S=0,b=1,B=2;else if(I&8)S=0,B=1,b=2;else if(I&16)B=0,b=1,S=2;else if(I&32)B=0,S=1,b=2;else{let L=sj(f),A=sj(m),x=sj(E);return L>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}Tz.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a1;)i>>=1,r.push(ele(i));let s=new Nt({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:$e.LUMINANCE,sampler:new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.LINEAR_MIPMAP_LINEAR,magnificationFilter:di.LINEAR})});return t.outlineTexture=s,s};function ele(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 tle(e,t){this._originalVertexCount=t,this._edges=new Set;for(let n=0;n{this._resourcesLoaded=!0}).catch(o=>{this._processError=o})),l(this._processError)){this._state=qo.FAILED;let o=this._processError;this._processError=void 0,wz(this,o)}let t=this._textureErrors.pop();if(l(t)){let o=this.getError("Failed to load glTF texture",t);throw o.name="TextureError",o}if(this._state===qo.FAILED)return!1;let n=!1;try{n=this._process(e)}catch(o){this._state=qo.FAILED,wz(this,o)}let i=!1;try{i=this._processTextures(e)}catch(o){this._textureState=qo.FAILED,wz(this,o)}return this._incrementallyLoadTextures?n:n&&i};function K8e(e,t,n,i,o,r,s,a,c){let u=e.gltfJson,h=u.accessors[t].bufferView;return Li.getVertexBufferLoader({gltf:u,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:h,primitive:i,draco:o,spz:r,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:s,loadTypedArray:a})}function X8e(e,t,n,i,o,r,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:o,loadTypedArray:r})}function J8e(e,t){let n=Li.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function ple(e,t,n){let i=t.byteOffset,o=au(e,t),r=t.count,s=Ku(t.type),a=t.componentType,c=q.getSizeInBytes(a),u=c*s,f=r*s;if(o===u)return n=new Uint8Array(n),q.createArrayBufferView(a,n.buffer,n.byteOffset+i,f);let h=q.createTypedArray(a,f),p=new DataView(n.buffer),g=new Array(s),m=LA(t.componentType);i=n.byteOffset+i;for(let _=0;_{let a=1/0,c=-1/0,u=1/0,f=-1/0,h=1/0,p=-1/0;for(let g=0;g{l(o)&&l(o.attributes)&&l(o.attributes[p])?lHe(C,E,s,a):l(r)?uHe(C,E,s,a):fHe(u,f,C,E,s,a)},C}function _le(e,t,n,i,o,r,s,a,c){let u=n.modelSemantic,f=u===rt.POSITION,h=u===rt.FEATURE_ID,p=f&&!s&&e._loadAttributesFor2D&&!c.scene3DOnly,g=f&&e._enablePick&&!c.context.webgl2,m=e._loadForClassification&&h,_=e._loadAttributesAsTypedArray,y=!_,C=_||p||g||m,b=gle(e,t,n,i,o,r,a?!1:y,a?!0:C,c),S=new s0.AttributeLoadPlan(b);return S.loadBuffer=y,S.loadTypedArray=C,S}function dHe(e,t,n,i,o){let r=e.gltfJson.accessors,s=l(n.ROTATION),a=l(n.TRANSLATION)&&l(r[n.TRANSLATION].min)&&l(r[n.TRANSLATION].max),c=lj(e,ys,i),u=c.modelSemantic,f=u===ys.TRANSLATION||u===ys.ROTATION||u===ys.SCALE,h=u===ys.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&f||!o.context.instancedArrays,g=e._enablePick&&!o.context.webgl2,m=!p,_=e._loadAttributesFor2D&&!o.scene3DOnly;return gle(e,t,c,void 0,void 0,void 0,m,p||h&&(!a||_||g),o)}function hHe(e,t,n,i,o,r,s){let a=e.gltfJson.accessors[t],c=a.bufferView;if(!l(i)&&!l(c))return;let u=new b8e;u.count=a.count;let f=e._loadAttributesAsTypedArray,h=(e._loadIndicesForWireframe||e._enablePick)&&!s.context.webgl2,p=e._loadForClassification&&o,m=!f,_=f||h||p,E=X8e(e,t,n,i,r?!1:m,r?!0:_,s),I=e._geometryLoaders.length;e._geometryLoaders.push(E);let b=E.load();e._loaderPromises.push(b),e._geometryCallbacks[I]=()=>{u.indexDatatype=E.indexDatatype,u.buffer=E.buffer,u.typedArray=E.typedArray};let S=new s0.IndicesLoadPlan(u);return S.loadBuffer=m,S.loadTypedArray=_,S}function wl(e,t,n,i){let o=e.gltfJson,r=cu.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=Li.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=cu.createModelTextureReader({textureInfo:t}),c=e._textureLoaders.length;e._textureLoaders.push(s);let u=s.load().catch(f=>{if(!e.isDestroyed()){if(!e._incrementallyLoadTextures)throw f;e._textureState=qo.FAILED,e._textureErrors.push(f)}});return e._texturesPromises.push(u),e._textureCallbacks[c]=()=>{a.texture=s.texture,l(i)&&(a.texture.sampler=i)},a}function mHe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new G8e;return l(i)&&(c.diffuseTexture=wl(e,i,n)),l(o)&&(c.specularGlossinessTexture=wl(e,o,n)),c.diffuseFactor=Ju(se,r),c.specularFactor=Ju(d,s),c.glossinessFactor=a,c}function pHe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new U8e;return l(i)&&(c.baseColorTexture=wl(e,i,n)),l(o)&&(c.metallicRoughnessTexture=wl(e,o,n)),c.baseColorFactor=Ju(se,r),c.metallicFactor=s,c.roughnessFactor=a,c}function AHe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new z8e;return l(o)&&(a.specularTexture=wl(e,o,n)),l(s)&&(a.specularColorTexture=wl(e,s,n)),a.specularFactor=i,a.specularColorFactor=Ju(d,r),a}function gHe(e,t,n){let{anisotropyStrength:i=aj.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=aj.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new aj;return l(r)&&(s.anisotropyTexture=wl(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function _He(e,t,n){let{clearcoatFactor:i=cj.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=cj.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new cj;return l(o)&&(c.clearcoatTexture=wl(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=wl(e,s,n)),l(a)&&(c.clearcoatNormalTexture=wl(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function yHe(e,t,n){let i=new V8e,o=t.extensions??V.EMPTY_OBJECT,r=o.KHR_materials_pbrSpecularGlossiness,s=o.KHR_materials_specular,a=o.KHR_materials_anisotropy,c=o.KHR_materials_clearcoat,u=t.pbrMetallicRoughness;return i.unlit=l(o.KHR_materials_unlit),l(r)?i.specularGlossiness=mHe(e,r,n):(l(u)&&(i.metallicRoughness=pHe(e,u,n)),l(s)&&!i.unlit&&(i.specular=AHe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=gHe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=_He(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=wl(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=wl(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=wl(e,t.occlusionTexture,n)),i.emissiveFactor=Ju(d,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided,i}function yle(e,t){let n=new dle;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 Cle(e,t,n,i){let o=new dle,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=Ale(r.attribute),o.positionalLabel=i,o}function Ele(e,t){let n=new mle;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 Ile(e,t,n,i){let o=new mle,r=e.featureIds;o.propertyTableId=t,o.featureCount=n,o.offset=r.constant??0;let s=r.divisor??0;return o.repeat=s===0?void 0:s,o.positionalLabel=i,o}function CHe(e,t,n,i){let o=new hle;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=wl(e,r,n,nn.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function EHe(e,t,n,i,o,r){let s=new hle,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=wl(e,c,i,nn.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function IHe(e,t,n,i,o){let r=new T8e,s=void 0,a=void 0,c=void 0,u=!1;for(let f in t){if(!t.hasOwnProperty(f))continue;let h=t[f],p=lj(e,rt,f),g=_le(e,h,p,s,a,c,u,n,o);r.attributes.push(g.attribute),i.attributePlans.push(g)}return r}function xHe(e,t,n,i){let o=new S8e,r=new s0(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=yHe(e,e.gltfJson.materials[s],i));let a=t.extensions??V.EMPTY_OBJECT,c=!1,u=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(u)&&(c=!0,r.needsOutlines=!0,r.outlineIndices=bHe(e,u,r));let f=a.KHR_spz_gaussian_splats_compression;l(f)&&(c=!0,r.needsGaussianSplats=!0);let h=e._loadForClassification,p=a.KHR_draco_mesh_compression,g=!1,m=t.attributes;if(l(m))for(let B in m){if(!m.hasOwnProperty(B))continue;let v=m[B],P=lj(e,rt,B),N=P.modelSemantic;if(h&&!cHe(N))continue;N===rt.FEATURE_ID&&(g=!0);let L=_le(e,v,P,t,p,f,n,c,i);r.attributePlans.push(L),o.attributes.push(L.attribute)}let _=t.targets;if(l(_)&&!h)for(let B=0;B<_.length;++B)o.morphTargets.push(IHe(e,_[B],c,r,i));let y=t.indices;if(l(y)){let B=hHe(e,y,t,p,g,c,i);l(B)&&(r.indicesPlan=B,o.indices=B.indices)}let C=a.EXT_structural_metadata,E=a.EXT_mesh_features,I=a.EXT_feature_metadata,b=l(I);l(E)?THe(e,o,E,i):b&&SHe(e,o,I,i),l(C)?wHe(o,C):b&&BHe(e,o,I);let S=t.mode;if(h&&S!==Ne.TRIANGLES)throw new ce("Only triangle meshes can be used for classification.");return o.primitiveType=S,o}function bHe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return Bz(e,i,!1)}function THe(e,t,n,i){let o;l(n)&&l(n.featureIds)?o=n.featureIds:o=[];for(let r=0;rn[s]);let r=t.inverseBindMatrices;if(l(r)){let s=e.gltfJson.accessors[r];i.inverseBindMatrices=Bz(e,s)}else i.inverseBindMatrices=new Array(o.length).fill(M.IDENTITY);return i}function LHe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=NHe(e,r,t);return a.index=s,a}),o=e.gltfJson.nodes;for(let r=0;r=s.clientWidth)u=!0;else{if(I.x>s.clientWidth*.5){a.width=I.x,c.frustum.right=p.x-C,Gc=ZM(r,n,c,Gc),hc.clipToGLWindowCoordinates(a,Gc,fj),a.x+=I.x,c.position.x=-c.position.x;let b=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-b,Gc=ZM(r,n,c,Gc),hc.clipToGLWindowCoordinates(a,Gc,dj)}else{a.x+=I.x,a.width-=I.x,c.frustum.left=-p.x-C,Gc=ZM(r,n,c,Gc),hc.clipToGLWindowCoordinates(a,Gc,fj),a.x=a.x-a.width,c.position.x=-c.position.x;let b=c.frustum.left;c.frustum.left=-c.frustum.right,c.frustum.right=-b,Gc=ZM(r,n,c,Gc),hc.clipToGLWindowCoordinates(a,Gc,dj)}d.clone(g,c.position),c.frustum=m.clone(),i=U.clone(fj,i),(i.x<0||i.x>s.clientWidth)&&(i.x=dj.x)}}if(o.mode!==oe.SCENE2D||u){if(Gc=ZM(r,n,c,Gc),Gc.z<0&&!(c.frustum instanceof mn)&&!(c.frustum instanceof Jr))return;i=hc.clipToGLWindowCoordinates(a,Gc,i)}return i.y=s.clientHeight-i.y,i};hc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=hc.worldToWindowCoordinates(e,t,n),!!l(n))return hc.transformWindowToDrawingBuffer(e,n,n)};var VA=new d,u5e=new me;hc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===oe.SCENE3D)return d.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,u5e);if(!l(r))return;if(o.project(r,VA),i===oe.COLUMBUS_VIEW)return d.fromElements(VA.z,VA.x,VA.y,n);if(i===oe.SCENE2D)return d.fromElements(0,VA.x,VA.y,n);let s=e.morphTime;return d.fromElements(D.lerp(VA.z,t.x,s),D.lerp(VA.x,t.y,s),D.lerp(VA.y,t.z,s),n)};var Ble=new d,Dle=new d,vle=new M;hc.clipToGLWindowCoordinates=function(e,t,n){return d.divideByScalar(t,t.w,Ble),M.computeViewportTransformation(e,0,1,vle),M.multiplyByPoint(vle,Ble,Dle),U.fromCartesian3(Dle,n)};hc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return U.fromElements(t.x*o,t.y*r,n)};var f5e=new se,Ple=new se;hc.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let g=n*r.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,f5e);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 h,p=e.camera.frustum;if(l(p.fovy)){h=M.multiplyByVector(r.inverseViewProjection,f,Ple);let g=1/h.w;d.multiplyByScalar(h,g,h)}else{let g=p.offCenterFrustum;l(g)&&(p=g),h=Ple,h.x=(f.x*(p.right-p.left)+p.left+p.right)*.5,h.y=(f.y*(p.top-p.bottom)+p.bottom+p.top)*.5,h.z=(f.z*(a-c)-a-c)*.5,h.w=1,h=M.multiplyByVector(r.inverseView,h,h)}return d.fromCartesian4(h,i)};var Ji=hc;var zb={};zb._deprecationWarning=Vs;var HA=Uint32Array.BYTES_PER_ELEMENT;zb.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=HA;let r=o.getUint32(t,!0);if(r!==1)throw new ce(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=HA;let s=o.getUint32(t,!0);t+=HA;let a=o.getUint32(t,!0);t+=HA;let c=o.getUint32(t,!0);t+=HA;let u=o.getUint32(t,!0);t+=HA;let f=o.getUint32(t,!0);t+=HA;let h;u>=570425344?(t-=HA*2,h=a,u=c,f=0,a=0,c=0,zb._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-=HA,h=u,u=a,f=c,a=0,c=0,zb._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:h??0}:(p=hr(i,t,a),t+=a);let g=new Uint8Array(e,t,c);t+=c;let m,_;u>0&&(m=hr(i,t,u),t+=u,f>0&&(_=new Uint8Array(e,t,f),_=new Uint8Array(_),t+=f));let y=n+s-t;if(y===0)throw new ce("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,y):(zb._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+y))),{batchLength:h,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:_,gltf:C}};var $M=zb;function e1(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function Rle(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=q.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function d5e(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=q.createTypedArray(n,i),o[t]=r),r}e1.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??q.UNSIGNED_INT,n=n??1,Rle(this,e,t,n,1,i.byteOffset)):i};e1.prototype.hasProperty=function(e){return l(this.json[e])};e1.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=q.fromName(i.componentType)),Rle(this,e,t,n,this.featuresLength,i.byteOffset)):d5e(this,e,t,i)};e1.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a0&&(m=hr(i,t,u),t+=u,f>0&&(_=new Uint8Array(e,t,f),_=new Uint8Array(_),t+=f));let y=n+s-t;if(y===0)throw new ce("glTF byte length must be greater than 0.");let C;return t%4===0?C=new Uint8Array(e,t,y):(vz._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),C=new Uint8Array(i.subarray(t,t+y))),{gltfFormat:h,featureTableJson:p,featureTableBinary:g,batchTableJson:m,batchTableBinary:_,gltf:C}};var o1=vz;var jA={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},Pz=bn.Attribute,M5e=bn.FeatureIdAttribute,Qle=bn.Instances;function YA(e){e=e??V.EMPTY_OBJECT;let t=e.i3dmResource,n=e.arrayBuffer,i=e.baseResource,o=e.byteOffset??0,r=e.releaseGltfJson??!1,s=e.asynchronous??!0,a=e.incrementallyLoadTextures??!0,c=e.upAxis??fo.Y,u=e.forwardAxis??fo.X,f=e.loadAttributesAsTypedArray??!1,h=e.loadIndicesForWireframe??!1,p=e.loadPrimitiveOutline??!0,g=e.enablePick??!1;i=l(i)?i:t.clone(),this._i3dmResource=t,this._baseResource=i,this._arrayBuffer=n,this._byteOffset=o,this._releaseGltfJson=r,this._asynchronous=s,this._incrementallyLoadTextures=a,this._upAxis=c,this._forwardAxis=u,this._loadAttributesAsTypedArray=f,this._loadIndicesForWireframe=h,this._loadPrimitiveOutline=p,this._enablePick=g,this._state=jA.NOT_LOADED,this._promise=void 0,this._gltfLoader=void 0,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY,this._batchTable=void 0,this._featureTable=void 0,this._instancesLength=0}l(Object.create)&&(YA.prototype=Object.create(zi.prototype),YA.prototype.constructor=YA);Object.defineProperties(YA.prototype,{texturesLoaded:{get:function(){return this._gltfLoader?.texturesLoaded}},cacheKey:{get:function(){}},components:{get:function(){return this._components}}});YA.prototype.load=function(){if(l(this._promise))return this._promise;let e=o1.parse(this._arrayBuffer,this._byteOffset),t=e.featureTableJson,n=e.featureTableBinary,i=e.batchTableJson,o=e.batchTableBinary,r=e.gltfFormat,s=new Mh(t,n);this._featureTable=s;let a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!l(a))throw new ce("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=a;let c=s.getGlobalProperty("RTC_CENTER",q.FLOAT,3);l(c)&&(this._transform=M.fromTranslation(d.fromArray(c))),this._batchTable={json:i,binary:o};let u={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(r===0){let h=ou(e.gltf);h=h.replace(/[\s\0]+$/,"");let p=this._baseResource.getDerivedResource({url:h});u.gltfResource=p,u.baseResource=p}else u.gltfResource=this._i3dmResource,u.typedArray=e.gltf;let f=new Zu(u);return this._gltfLoader=f,this._state=jA.LOADING,this._promise=f.load().then(()=>{if(!this.isDestroyed())return this._state=jA.PROCESSING,this}).catch(h=>{if(!this.isDestroyed())throw N5e(this,h)}),this._promise};function N5e(e,t){return e.unload(),e._state=jA.FAILED,e.getError("Failed to load i3dm",t)}YA.prototype.process=function(e){if(this._state===jA.READY)return!0;let t=this._gltfLoader,n=!1;if(this._state===jA.PROCESSING&&(n=t.process(e)),!n)return!1;let i=t.components;return i.transform=M.multiplyTransformation(this._transform,i.transform,i.transform),F5e(this,i,e),L5e(this,i),this._components=i,this._arrayBuffer=void 0,this._state=jA.READY,!0};function L5e(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=WA({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Sl({name:wh.BATCH_TABLE_CLASS_NAME,count:i});o=new ma({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var Rz=new d,pj=new Array(4),O5e=new M;function F5e(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",q.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,u=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),f=k5e(o,r),h;c&&(h=new Float32Array(4*r));let p;u&&(p=new Float32Array(3*r));let g=new Float32Array(r),m=d.unpackArray(f),_=new d,y=new d,C=new d,E=new d,I=new X,b=new Fe,S=new Array(4),B=new d,v=new Array(3),P=new M;if(!l(s)||d.equals(d.unpack(s),d.ZERO)){let F=le.fromPoints(m);for(i=0;i0&&(F.instances=k?Q5e(N):N,k=!0)}}function Q5e(e){let t=new Qle;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o=n[t]){if(t+1=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o=n[o]&&e=0&&!(e>=n[o]&&en&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};Vb.prototype.clampTime=function(e){let t=this.times;return D.clamp(e,t[0],t[t.length-1])};var Ao=Vb;function Hb(e){this._value=e,this._valueType=Ao.getPointType(e)}Object.defineProperties(Hb.prototype,{value:{get:function(){return this._value}}});Hb.prototype.findTimeInterval=function(e){};Hb.prototype.wrapTime=function(e){return 0};Hb.prototype.clampTime=function(e){return 0};Hb.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var s1=Hb;function Wb(e){e=e??V.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=Ao.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(Wb.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});Wb.prototype.findTimeInterval=Ao.prototype.findTimeInterval;Wb.prototype.wrapTime=Ao.prototype.wrapTime;Wb.prototype.clampTime=Ao.prototype.clampTime;Wb.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new d),d.lerp(n[o],n[o+1],r,t))};var sy=Wb;var kle={};kle.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a=0;--a)s[a]=d.subtract(r[a],d.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var jb=kle;var Ule=[],Gle=[],zle=[],Vle=[];function H5e(e,t,n){let i=Ule,o=zle,r=Gle,s=Vle;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new d),d.clone(t,c),a=1;a0&&e.afterRender.push(a._raiseStartEvent)),a.loop===lu.REPEAT)g=g-Math.floor(g);else if(a.loop===lu.MIRRORED_REPEAT){let C=Math.floor(g),E=g-C;g=C%2===1?1-E:E}a.reverse&&(g=1-g);let y=g*u*a.multiplier;y=D.clamp(y,a.localStartTime,a.localStopTime),a.animate(y),a.update.numberOfListeners>0&&(a._updateEventTime=y,e.afterRender.push(a._raiseUpdateEvent)),i=!0,_||(a._state=Nh.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&Mz.push(a))}}n=Mz.length;for(let s=0;sD.EPSILON3}};var _1=jle;var y1=`#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) { // see https://bruop.github.io/ibl/ at Single Scattering Results // Roughness dependent fresnel, from Fdez-Aguera 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) /** * Compute the light contributions from environment maps and spherical harmonic coefficients. * See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation * of the single- and multi-scattering terms. * * @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position. * @param {vec3} normalEC The surface normal in eye coordinates. * @param {czm_modelMaterial} The material properties. * @return {vec3} The computed HDR color. */ 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); // see https://bruop.github.io/ibl/ at Single Scattering Results // Roughness dependent fresnel, from Fdez-Aguera 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 // Bend normal to account for anisotropic distortion of specular reflection 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 Yle={name:"ImageBasedLightingPipelineStage"},i9e=new U;Yle.process=function(e,t,n){let i=t.imageBasedLighting,o=t.environmentMapManager,r=e.shaderBuilder,s;l(i.specularEnvironmentMaps)||(s=o.radianceCubeMap);let a=i.sphericalHarmonicCoefficients??o.sphericalHarmonicCoefficients;r.addDefine("USE_IBL_LIGHTING",void 0,Ae.FRAGMENT),r.addUniform("vec2","model_iblFactor",Ae.FRAGMENT),Ih.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",Ae.FRAGMENT),l(s)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,Ae.BOTH),l(a)&&l(a[0])?(r.addDefine("DIFFUSE_IBL",void 0,Ae.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,Ae.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",Ae.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,Ae.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(s)?(r.addDefine("SPECULAR_IBL",void 0,Ae.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,Ae.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",Ae.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",Ae.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,Ae.FRAGMENT)),r.addFragmentLines(y1);let c={model_iblFactor:function(){return U.multiplyByScalar(i.imageBasedLightingFactor,o?.intensity||1,i9e)},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 o.maximumMipmapLevel}),e.uniformMap=St(c,e.uniformMap)};var C1=Yle;var o9e=D.EPSILON16;function Cj(e){e=e??V.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(Cj.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,o9e)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var r9e=new d,yj=new X;Cj.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=r9e,o;switch(t){case kc.XROTATE:o=X.fromRotationX(D.toRadians(n),yj),e=M.multiplyByMatrix3(e,o,e);break;case kc.YROTATE:o=X.fromRotationY(D.toRadians(n),yj),e=M.multiplyByMatrix3(e,o,e);break;case kc.ZROTATE:o=X.fromRotationZ(D.toRadians(n),yj),e=M.multiplyByMatrix3(e,o,e);break;case kc.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case kc.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=M.multiplyByTranslation(e,i,e);break;case kc.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=M.multiplyByTranslation(e,i,e);break;case kc.XSCALE:i.x=n,i.y=1,i.z=1,e=M.multiplyByScale(e,i,e);break;case kc.YSCALE:i.x=1,i.y=n,i.z=1,e=M.multiplyByScale(e,i,e);break;case kc.ZSCALE:i.x=1,i.y=1,i.z=n,e=M.multiplyByScale(e,i,e);break;case kc.UNIFORMSCALE:e=M.multiplyByUniformScale(e,n,e);break;default:break}return e};var E1=Cj;function Nz(e){e=e??V.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,s9e(this)}Object.defineProperties(Nz.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 s9e(e){let n=e.articulation.stages,i=n.length,o=e._runtimeStages,r=e._runtimeStagesByName;for(let s=0;s 0.0 && clipDistance < clippingPlanesEdgeWidth) { color = clippingPlanesEdgeColor; } } `;var qle={name:"ModelClippingPlanesPipelineStage"},l9e=new U;qle.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,Ae.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,Ae.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,Ae.FRAGMENT),Ps.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,Ae.FRAGMENT);let s=Ps.getTextureResolution(i,o,l9e);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,Ae.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,Ae.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",Ae.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",Ae.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",Ae.FRAGMENT),r.addFragmentLines(b1);let a={model_clippingPlanes:function(){return i.texture},model_clippingPlanesEdgeStyle:function(){let c=G.clone(i.edgeColor);return c.alpha=i.edgeWidth,c},model_clippingPlanesMatrix:function(){return t._clippingPlanesMatrix}};e.uniformMap=St(a,e.uniformMap)};var T1=qle;var S1=`void modelClippingPolygonsStage(ProcessedAttributes attributes) { vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC); sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi); vec2 minDistance = vec2(czm_infinity); v_regionIndex = -1; v_clippingPosition = vec2(czm_infinity); for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) { vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex); vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz; vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0)); vec2 distance = abs(rectUv - clamped) * extents.wz; if (minDistance.x > distance.x || minDistance.y > distance.y) { minDistance = distance; v_clippingPosition = rectUv; } float threshold = 0.01; if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) { v_regionIndex = regionIndex; } } } `;var w1=`void modelClippingPolygonsStage() { vec2 clippingPosition = v_clippingPosition; int regionIndex = v_regionIndex; czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex); } `;var Kle={name:"ModelClippingPolygonsPipelineStage"};Kle.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,Ae.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,Ae.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,Ae.BOTH),o.addUniform("sampler2D","model_clippingDistance",Ae.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",Ae.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines(S1),o.addFragmentLines(w1);let r={model_clippingDistance:function(){return i.clippingTexture},model_clippingExtents:function(){return i.extentsTexture}};e.uniformMap=St(r,e.uniformMap)};var B1=Kle;function Xle(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(Xle.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 D1=Xle;var v1=`mat4 getInstancingTransform() { mat4 instancingTransform; #ifdef HAS_INSTANCE_MATRICES instancingTransform = mat4( a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1 a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2 a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3 a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4 ); #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, // Column 1 a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2 a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3 a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4 ); #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 P1=`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 R1=`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 Lz=new M,u9e=new M,f9e=new M,Zle={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:iue,_transformsToTypedArray:Ij};Zle.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(v1);let s=e.model,a=s.sceneGraph,c=e.runtimeNode,u=n.mode!==oe.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,f=s._enablePick&&!n.context.webgl2,h=[];S9e(e,n,i,h,u,f),D9e(e,n,i,h);let p={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,Ae.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",Ae.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",Ae.VERTEX),p.u_instance_modifiedModelView=function(){let g=M.multiplyTransformation(s.modelMatrix,a.components.transform,Lz);return u?M.multiplyTransformation(n.context.uniformState.view3D,g,Lz):(n.mode!==oe.SCENE3D&&(g=Qt.basisTo2D(n.mapProjection,g,Lz)),M.multiplyTransformation(n.context.uniformState.view,g,Lz))},p.u_instance_nodeTransform=function(){return M.multiplyTransformation(a.axisCorrectionMatrix,c.computedTransform,u9e)},r.addVertexLines(R1)):r.addVertexLines(P1),u){r.addDefine("USE_2D_INSTANCING",void 0,Ae.VERTEX),r.addUniform("mat4","u_modelView2D",Ae.VERTEX);let g=n.context,m=M.fromTranslation(c.instancingReferencePoint2D,new M);p.u_modelView2D=function(){return M.multiplyTransformation(g.uniformState.view,m,f9e)}}e.uniformMap=St(p,e.uniformMap),e.instanceCount=o,e.attributes.push.apply(e.attributes,h)};var M1=new M,d9e=new d;function h9e(e,t,n,i,o){let r=M.multiplyTransformation(t,e,M1);return r=M.multiplyTransformation(r,n,M1),o=Qt.basisTo2D(i.mapProjection,r,o),o}function m9e(e,t,n,i,o){let r=M.fromTranslation(e,M1),s=M.multiplyTransformation(t,r,M1);s=M.multiplyTransformation(s,n,M1);let a=M.getTranslation(s,d9e);return o=Ji.computeActualEllipsoidPosition(i,a,o),o}function $le(e,t,n){let i=e.model,o=i.sceneGraph;e.runtimeNode.node.instances.transformInWorldSpace?(t=M.multiplyTransformation(i.modelMatrix,o.components.transform,t),n=M.multiplyTransformation(o.axisCorrectionMatrix,e.runtimeNode.computedTransform,n)):(t=M.clone(o.computedModelMatrix,t),t=M.multiplyTransformation(t,e.runtimeNode.computedTransform,t),n=M.clone(M.IDENTITY,n))}var eue=new M,tue=new M,p9e=new M,A9e=new d;function g9e(e,t,n,i){let o=eue,r=tue;$le(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let u=0;u=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Ht.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var N1=Zle;var bj={};bj.name="ModelMatrixUpdateStage";bj.update=function(e,t,n){let i=n.mode!==oe.SCENE3D;if(!(i&&t._model._projectTo2D)&&e._transformDirty){let o=i?t._computedModelMatrix2D:t._computedModelMatrix;oue(e,t,o,e.transformToRoot),e._transformDirty=!1}};function v9e(e,t,n){e.modelMatrix=M.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=vt.getCullFace(e.modelMatrix,e.primitiveType)}function oue(e,t,n,i){let o;i=M.multiplyTransformation(i,e.transform,new M),e.updateComputedTransform();let r=e.runtimePrimitives.length;for(o=0;o1&&(i.addDefine("MULTILINE_BATCH_TEXTURE"),i.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return c.textureDimensions}),e.uniformMap=St(o,e.uniformMap)};var k1=lue;var uue={name:"ClassificationPipelineStage"};uue.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,Ae.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||R9e(t,o)};function R9e(e,t){let n=vt.getAttributeBySemantic(e,rt.POSITION);if(!l(n))throw new ce("Primitives must have a position attribute to be used for classification.");let i,o=e.indices,r=l(o);r&&(i=o.typedArray,o.typedArray=void 0);let s=r?o.count:n.count,a=vt.getAttributeBySemantic(e,rt.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],h=r?i[0]:0,p=c[h],g=0;for(let _=1;_z9e(i,t,n)):[]}function z9e(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=vt,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),u=new Array(c.length);for(let f=0;fH9e(n,t)):[]}function H9e(e,t){let{sanitizeGlslIdentifier:n}=vt,i=e.class.id,o=t?.classes[i],r=Object.entries(e.properties).filter(([a,c])=>c.isGpuCompatible()),s=new Array(r.length);for(let a=0;af),n.addStructField(Oi.STRUCT_ID_METADATA_FS,r,o);let g=`attributes.texCoord_${a}`,m=g;if(l(h)&&!X.equals(h,X.IDENTITY)){let I=`${p}Transform`;n.addUniform("mat3",I,Ae.FRAGMENT),i[I]=function(){return h},m=`vec2(${I} * vec3(${g}, 1.0))`}let _=`texture(${p}, ${m}).${c}`,y=s.unpackInShader(_),C=_ue({valueExpression:y,renderResources:e,glslType:r,metadataVariable:o,shaderDestination:Ae.FRAGMENT,property:s}),E=`metadata.${o} = ${C};`;n.addFunctionLines(Oi.FUNCTION_ID_INITIALIZE_METADATA_FS,[E])}function pue(e,t){let{classProperty:n}=t.property,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=gue(Oi.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Oi.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Oi.FUNCTION_ID_INITIALIZE_METADATA_FS,s),Ae.includesVertexShader(r)&&(e.addStructField(Oi.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Oi.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function Aue(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===At.ENUM)return;let s=Oi.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=gue(s,n,a,r),u=`${r}MetadataStatistics`;e.addStructField(Oi.STRUCT_ID_METADATA_STATISTICS_FS,u,i),e.addFunctionLines(Oi.FUNCTION_ID_INITIALIZE_METADATA_FS,c),Ae.includesVertexShader(t.shaderDestination)&&(e.addStructField(Oi.STRUCT_ID_METADATA_STATISTICS_VS,u,i),e.addFunctionLines(Oi.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function gue(e,t,n,i){function o(r){let s=t[r.specName];if(l(s))return`${n}.${r.shaderName} = ${i}(${s});`}return l(t)?e.map(o).filter(l):[]}function _ue(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:u}=e;s.addUniform(c,o,u),s.addUniform(c,r,u);let{offset:f,scale:h}=n;return a[o]=()=>f,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}var ud=Oi;var $9e={INHERIT:0,OPAQUE:1,TRANSLUCENT:2},fy=Object.freeze($9e);var Qa={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:yt};Qa.process=function(e,t,n){let{shaderBuilder:i,model:o,alphaOptions:r}=e,{customShader:s}=o,{lightingModel:a,translucencyMode:c}=s;l(a)&&(e.lightingOptions.lightingModel=a),c===fy.TRANSLUCENT?r.pass=Be.TRANSLUCENT:c===fy.OPAQUE&&(r.pass=void 0);let u=a6e(s,t);if(!u.customShaderEnabled)return;if(f6e(i,s,u),u.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,Ae.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,Ae.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,Ae.FRAGMENT);let p=KA.getDefineName(s.mode);i.addDefine(p,void 0,Ae.FRAGMENT)}let f=s.uniforms;for(let p in f)if(f.hasOwnProperty(p)){let g=f[p];i.addUniform(g.type,p)}let h=s.varyings;for(let p in h)if(h.hasOwnProperty(p)){let g=h[p];i.addVarying(g,p)}e.uniformMap=St(e.uniformMap,s.uniformMap)};function e6e(e){let t={};for(let n=0;n1?(g=e.attributeIndex,e.attributeIndex+=h):p&&!a?g=0:g=e.attributeIndex++,_6e(e,f,g,h,r,s)}w6e(i,t.attributes),t.primitiveType===Ne.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(eN),i.addFragmentLines($1)};function _6e(e,t,n,i,o,r){let s=e.shaderBuilder,a=vt.getAttributeInfo(t),c=o&&!r;i>1?E6e(e,t,n,i):C6e(e,t,n,c),x6e(s,a,c),I6e(s,a),l(t.semantic)&&y6e(s,t),b6e(s,a,o),T6e(s,a,c),S6e(s,a)}function y6e(e,t){let{semantic:n,setIndex:i}=t;switch(n){case rt.NORMAL:e.addDefine("HAS_NORMALS");break;case rt.TANGENT:e.addDefine("HAS_TANGENTS");break;case rt.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case rt.TEXCOORD:case rt.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function C6e(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===rt.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let u=r===rt.POSITION,f=u?0:n,h=Ht.getNumberOfComponents(a),p={index:f,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,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:h,componentDatatype:q.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(m)}function E6e(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,u=Ht.getNumberOfComponents(s)/i,f=q.getSizeInBytes(a),h=u*f,p=t.byteStride;for(let g=0;g=o&&(m=o-1);let _=g/u|0;return _>=r&&(_=r-1),l(n)?(n.x=m,n.y=_,n):new U(m,_)};var Cs=hy;var Sj,Tue="AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmTvj0sIevECBw-bvZAvk8zYQRQq68aswXB6_yVObhIYNHapUAk3eqDIvpDZAUjFHpy1wJdPnkcKqSGXXGM22C1fqVC0gbU2S_RjRHuIHK5WVIYP7fUJQPjRGD1weDGyD5vBqwZX1Ah4LLUPG9474k1fvB1_vIROH9r9R-Sd9f9pbBFr9FjKfISJZiiJdaXVas4.AT1_eWrg8X2i",eT={};eT.defaultAccessToken=Tue;eT.defaultWorldImageryServer=new we({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});eT.defaultWorldHillshadeServer=new we({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});eT.defaultWorldOceanServer=new we({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});eT.getDefaultTokenCredit=function(e){if(e===Tue){if(!l(Sj)){let t=' This application is using a default ArcGIS access token. Please assign Cesium.ArcGisMapService.defaultAccessToken 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 https://developers.arcgis.com/.';Sj=new Bt(t,!0)}return Sj}};var $u=eT;function wj(e){e=e??V.EMPTY_OBJECT,this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=we.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=rh(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,u=e.pixelsToCheck;for(let f=0,h=u.length;a&&f0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}wj.prototype.isReady=function(){return this._isReady};wj.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=rh(e),o=e.width;for(let r=0,s=t.length;r1&&o==="name"?(t=1,n=i):t>2&&o==="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])};Bj.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=``:i+=``)}return i+="
${o}${t(r)}
${o}${r}
",i}this.description=t(e)};var Oh=Bj;function tT(){he.throwInstantiationError()}Object.defineProperties(tT.prototype,{rectangle:{get:he.throwInstantiationError},tileWidth:{get:he.throwInstantiationError},tileHeight:{get:he.throwInstantiationError},maximumLevel:{get:he.throwInstantiationError},minimumLevel:{get:he.throwInstantiationError},tilingScheme:{get:he.throwInstantiationError},tileDiscardPolicy:{get:he.throwInstantiationError},errorEvent:{get:he.throwInstantiationError},credit:{get:he.throwInstantiationError},proxy:{get:he.throwInstantiationError},hasAlphaChannel:{get:he.throwInstantiationError}});tT.prototype.getTileCredits=function(e,t,n){he.throwInstantiationError()};tT.prototype.requestImage=function(e,t,n,i){he.throwInstantiationError()};tT.prototype.pickFeatures=function(e,t,n,i,o){he.throwInstantiationError()};var B6e=/\.ktx2$/i;tT.loadImage=function(e,t){let n=we.createIfNeeded(t);return B6e.test(n.url)?Zl(n):l(e)&&l(e.tileDiscardPolicy)?n.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):n.fetchImage({preferImageBitmap:!0,flipY:!0})};var Bl=tT;var D6e={SATELLITE:1,OCEANS:2,HILLSHADE:3},Fh=Object.freeze(D6e);function Sue(e){this.useTiles=e.usePreCachedTilesIfAvailable??!0;let t=e.ellipsoid;this.tilingScheme=e.tilingScheme??new oo({ellipsoid:t}),this.rectangle=e.rectangle??this.tilingScheme.rectangle,this.ellipsoid=t;let n=e.credit;typeof n=="string"&&(n=new Bt(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}Sue.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 iN({missingImageUrl:wue(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 v6e(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 Cs({ellipsoid:t.ellipsoid});else if(e.tileInfo.spatialReference.wkid===4326)t.tilingScheme=new oo({ellipsoid:t.ellipsoid});else{let i=`Tile spatial reference WKID ${e.tileInfo.spatialReference.wkid} is not supported.`;throw new ce(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 Ui,o=e.fullExtent,r=i.unproject(new d(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new d(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ae(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ae.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 ce(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new Bt(e.copyrightText)]:t.credit=new Bt(e.copyrightText))}function P6e(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new ce(n)}async function R6e(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();v6e(i,t)}catch(i){P6e(e,i)}}function ep(e){e=e??V.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 oo({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;let t=e.credit;typeof t=="string"&&(t=new Bt(t)),this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new ge}ep.fromBasemapType=async function(e,t){t=t??V.EMPTY_OBJECT;let n,i,o;switch(e){case Fh.SATELLITE:{n=t.token??$u.defaultAccessToken,i=we.createIfNeeded($u.defaultWorldImageryServer),i.appendForwardSlash();let r=$u.getDefaultTokenCredit(n);l(r)&&(o=Bt.clone(r))}break;case Fh.OCEANS:{n=t.token??$u.defaultAccessToken,i=we.createIfNeeded($u.defaultWorldOceanServer),i.appendForwardSlash();let r=$u.getDefaultTokenCredit(n);l(r)&&(o=Bt.clone(r))}break;case Fh.HILLSHADE:{n=t.token??$u.defaultAccessToken,i=we.createIfNeeded($u.defaultWorldHillshadeServer),i.appendForwardSlash();let r=$u.getDefaultTokenCredit(n);l(r)&&(o=Bt.clone(r))}break;default:}return ep.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function wue(e,t,n,i,o){let r;if(e._useTiles)r=e._resource.getDerivedResource({url:`tile/${i}/${n}/${t}`,request:o});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 Qi?(c.bboxSR=4326,c.imageSR=4326):(c.bboxSR=3857,c.imageSR=3857),e.layers&&(c.layers=`show:${e.layers}`),r=e._resource.getDerivedResource({url:"export",request:o,queryParameters:c})}return r}Object.defineProperties(ep.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}}});ep.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT;let n=we.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&n.setQueryParameters({token:t.token});let i=new ep(t);i._resource=n;let o=new Sue(t);return(t.usePreCachedTilesIfAvailable??!0)&&await R6e(n,o),o.build(i),i};ep.prototype.getTileCredits=function(e,t,n){return this._tileCredits};ep.prototype.requestImage=function(e,t,n,i){return Bl.loadImage(this,wue(this,e,t,n,i))};ep.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures)return;let r=this._tilingScheme.tileXYToNativeRectangle(e,t,n),s,a,c;if(this._tilingScheme.projection instanceof Qi)s=D.toDegrees(i),a=D.toDegrees(o),c="4326";else{let p=this._tilingScheme.projection.project(new me(i,o,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:`${r.west},${r.south},${r.east},${r.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 _=0;_0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${tp(i)}`),c};Oz.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Qo=Oz;var N6e={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"},nT=Object.freeze(N6e);function oN(e){}oN.prototype.isReady=function(){return!0};oN.prototype.shouldDiscardImage=function(e){return oN.EMPTY_IMAGE===e};var Fz;Object.defineProperties(oN,{EMPTY_IMAGE:{get:function(){return l(Fz)||(Fz=new Image,Fz.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),Fz}}});var iT=oN;function Bue(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}Bue.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;no.coverageAreas?.some(r=>l(r.bbox)))),t.attributionList=i}function O6e(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Qo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new ce(i)}async function F6e(e,t,n){let i=e.url,o=Ws._metadataCache[i];l(o)||(o=e.fetchJsonp("jsonp"),Ws._metadataCache[i]=o);try{let r=await o;return L6e(r,t)}catch(r){O6e(e,r,n)}}function Ws(e){e=e??V.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??nT.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new iT),this._proxy=e.proxy,this._credit=new Bt(``),this._tilingScheme=new Cs({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 ge}Object.defineProperties(Ws.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)}}});Ws.fromUrl=async function(e,t){t=t??V.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??nT.AERIAL,o=we.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new Ws(t);a._resource=o;let c=new Bue(t);return await F6e(s,c),c.build(a),a};var Q6e=new ae;Ws.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,Q6e);return G6e(this._attributionList,n,i)};Ws.prototype.requestImage=function(e,t,n,i){let o=Bl.loadImage(this,k6e(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?iT.EMPTY_IMAGE:Promise.reject(r)})};Ws.prototype.pickFeatures=function(e,t,n,i,o){};Ws.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<=0;--o){let r=1<=h.zoomMin&&t<=h.zoomMax){let p=ae.intersection(n,h.bbox,U6e);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}Ws._metadataCache={};var rN=Ws;var Due=/{[^}]+}/g,vue={x:W6e,y:Y6e,z:X6e,s:J6e,reverseX:j6e,reverseY:q6e,reverseZ:K6e,westDegrees:Z6e,southDegrees:$6e,eastDegrees:eWe,northDegrees:tWe,westProjected:nWe,southProjected:iWe,eastProjected:oWe,northProjected:rWe,width:sWe,height:aWe},z6e=St(vue,{i:cWe,j:lWe,reverseI:uWe,reverseJ:fWe,longitudeDegrees:hWe,latitudeDegrees:mWe,longitudeProjected:pWe,latitudeProjected:AWe,format:_We});function sN(e){e=e??V.EMPTY_OBJECT,this._errorEvent=new ge;let t=we.createIfNeeded(e.url),n=we.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 Cs({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=ae.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new Bt(o)),this._credit=o,this._hasAlphaChannel=e.hasAlphaChannel??!0;let r=e.customTags,s=St(vue,r),a=St(z6e,r);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(sN.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}}});sN.prototype.getTileCredits=function(e,t,n){};sN.prototype.requestImage=function(e,t,n,i){return Bl.loadImage(this,V6e(this,e,t,n,i))};sN.prototype.pickFeatures=function(e,t,n,i,o){if(!this.enablePickFeatures||!l(this._pickFeaturesResource)||this._getFeatureInfoFormats.length===0)return;let r=0,s=this;function a(u,f){return u.callback(f)}function c(){if(r>=s._getFeatureInfoFormats.length)return Promise.resolve([]);let u=s._getFeatureInfoFormats[r],f=H6e(s,e,t,n,i,o,u.format);return++r,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 Qz=!1,ef=new ae,kz=!1,aN=new ae;function V6e(e,t,n,i,o){Qz=!1,kz=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},u=s.match(Due);return l(u)&&u.forEach(function(f){let h=f.substring(1,f.length-1);l(a[h])&&(c[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var Dj=!1,rT=new U,vj=!1;function H6e(e,t,n,i,o,r,s){Qz=!1,kz=!1,Dj=!1,vj=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),u=e._pickFeaturesTags,f={},h=c.match(Due);return l(h)&&h.forEach(function(p){let g=p.substring(1,p.length-1);l(u[g])&&(f[g]=u[g](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:f})}function sT(e,t,n){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){let i=e.urlSchemeZeroPadding[t];if(typeof i=="string"){let o=i.length;o>1&&(n=n.length>=o?n:new Array(o-n.toString().length+1).join("0")+n)}}return n}function W6e(e,t,n,i){return sT(e,"{x}",t)}function j6e(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return sT(e,"{reverseX}",o)}function Y6e(e,t,n,i){return sT(e,"{y}",n)}function q6e(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return sT(e,"{reverseY}",o)}function K6e(e,t,n,i){let o=e.maximumLevel,r=l(o)&&it.rectangle.east&&(e.east=t.rectangle.east),e.southt.rectangle.north&&(e.north=t.rectangle.north),e}function Rue(e,t,n){let i=e.positionToTileXY(ae.southwest(t),n),o=e.positionToTileXY(ae.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}fd._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,u,f,h,p=[],g=e.childNodes[0].childNodes;for(let P=0;P`),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new ge}Object.defineProperties(fu.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}}});fu.fromUrl=async function(e,t,n){n=n??{};let i=n.path??"/default_map",o=we.createIfNeeded(e).getDerivedResource({url:i[0]==="/"?i.substring(1):i});o.appendForwardSlash();let r=o.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),s=new Mue(n);s.channel=t,await EWe(r,s);let a=new fu(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};fu.prototype.getTileCredits=function(e,t,n){};fu.prototype.requestImage=function(e,t,n,i){let o=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 Bl.loadImage(this,o)};fu.prototype.pickFeatures=function(e,t,n,i,o){};fu._logoUrl=void 0;Object.defineProperties(fu,{logoUrl:{get:function(){return l(fu._logoUrl)||(fu._logoUrl=fn("Assets/Images/google_earth_credit.png")),fu._logoUrl},set:function(e){fu._logoUrl=e}}});var cN=fu;var IWe=/\/$/,Nue=new Bt('© Mapbox © OpenStreetMap Improve this map');function aT(e){e=e??V.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=we.createIfNeeded(e.url??"https://{s}.tiles.mapbox.com/v4/");this._mapId=t,this._accessToken=n;let o=e.format??"png";/\./.test(o)||(o=`.${o}`),this._format=o;let r=i.getUrlComponent();IWe.test(r)||(r+="/"),r+=`${t}/{z}/{x}/{y}${this._format}`,i.url=r,i.setQueryParameters({access_token:n});let s;l(e.credit)?(s=e.credit,typeof s=="string"&&(s=new Bt(s))):s=Nue,this._resource=i,this._imageryProvider=new mc({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(aT.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}}});aT.prototype.getTileCredits=function(e,t,n){};aT.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};aT.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};aT._defaultCredit=Nue;var lN=aT;function l0(e){e=e??V.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??ae.MAX_VALUE,n=new oo({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 ge;let i=e.credit;typeof i=="string"&&(i=new Bt(i)),this._credit=i;let o=we.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(l0.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 xWe(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Qo.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return Rj(e,n,r);throw l(n)&&(n._hasError=!0),new ce(o)}async function Rj(e,t,n){try{return await Bl.loadImage(null,e)}catch(i){return xWe(e,i,t,n)}}l0.fromUrl=async function(e,t){let n=we.createIfNeeded(e),i=await Rj(n);t=t??V.EMPTY_OBJECT;let o=new l0({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};l0.prototype.getTileCredits=function(e,t,n){};l0.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await Rj(this._resource,this);return this._image=o,Qo.reportSuccess(this._errorEvent),o}return this._image};l0.prototype.pickFeatures=function(e,t,n,i,o){};var uN=l0;function bWe(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=TWe:e==="xml"?n=DWe:(e==="html"||e==="text")&&(n=Lue)),this.callback=n}function TWe(e){let t=[],n=e.features;for(let i=0;i0)for(let r=0;r\s*<\/body>/im,OWe=//im,FWe=/([\s\S]*)<\/title>/im;function Lue(e){if(LWe.test(e)||OWe.test(e))return;let t,n=FWe.exec(e);n&&n.length>1&&(t=n[1]);let i=new Oh;return i.name=t,i.description=e,i.data=e,[i]}var u0=bWe;function fN(e){e=e??V.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(fN.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)}}});fN.prototype.getFromCache=function(e,t,n,i){let o=Oue(e,t,n),r,s=this._tileCache[this._currentIntervalIndex];if(l(s)&&l(s[o])){let a=s[o];r=a.promise.catch(function(c){throw i.state=a.request.state,c}),delete s[o]}return r};fN.prototype.checkApproachingInterval=function(e,t,n,i){let o=Oue(e,t,n),r=this._tilesRequestedForInterval,s=Fue(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!Que(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};fN.prototype._clockOnTick=function(e){let t=e.currentTime,i=this._times.indexOf(t),o=this._currentIntervalIndex;if(i!==o){let s=this._tileCache[o];for(let a in s)s.hasOwnProperty(a)&&s[a].request.cancel();delete this._tileCache[o],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,this._reloadFunction();return}let r=Fue(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=Que(this,c,r),a||s.push(c)}}};function Oue(e,t,n){return`${e}-${t}-${n}`}function QWe(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Fue(e){let t=e._times;if(!l(t))return;let n=e._clock,i=n.currentTime,o=n.canAnimate&&n.shouldAnimate,r=n.multiplier;if(!o&&r!==0)return;let s,a=t.indexOf(i);if(a<0)return;let c=t.get(a);return r>0?(s=K.secondsDifference(c.stop,i),++a):(s=K.secondsDifference(c.start,i),--a),s/=r,a>=0&&s<=5?t.get(a):void 0}function Que(e,t,n){let i=e._times.indexOf(n.start),o=e._tileCache,r=o[i];l(r)||(r=o[i]={});let s=t.key;if(l(r[s]))return!0;let a=QWe(s),c=new ar({throttle:!1,throttleByServer:!0,type:ws.IMAGERY,priorityFunction:t.priorityFunction}),u=e._requestImageFunction(a.x,a.y,a.level,c,n);return l(u)?(r[s]={promise:u,request:c},!0):!1}var f0=fN;var kWe=[3034,3035,3042,3043,3044],UWe=[4471,4559];function Qh(e){if(e=e??V.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new he("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=we.createIfNeeded(e.url),n=we.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(Qh.DefaultParameters,!0),n.setQueryParameters(Qh.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(kue(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(kue(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new f0({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,u,f){return Uue(i,s,a,c,u,f)},reloadFunction:function(){l(i._reload)&&i._reload()}}));let o={};if(o.layers=e.layers,o.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",o.width="{width}",o.height="{height}",parseFloat(t.queryParameters.version)>=1.3){o.crs=e.crs??(e.tilingScheme&&e.tilingScheme.projection instanceof Ui?"EPSG:3857":"CRS:84");let s=o.crs.split(":");if(s[0]==="EPSG"&&s.length===2){let a=Number(s[1]);(a>=4e3&&a<5e3&&!UWe.includes(a)||kWe.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof Ui?"EPSG:3857":"EPSG:4326");t.setQueryParameters(o,!0),n.setQueryParameters(o,!0);let r={query_layers:e.layers,info_format:"{format}"};parseFloat(n.queryParameters.version)>=1.3?(r.i="{i}",r.j="{j}"):(r.x="{i}",r.y="{j}"),n.setQueryParameters(r,!0),this._resource=t,this._pickFeaturesResource=n,this._layers=e.layers,this._tileProvider=new mc({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new oo({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??Qh.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function Uue(e,t,n,i,o,r){let s=l(r)?r.data:void 0,a=e._tileProvider;return l(s)&&a._resource.setQueryParameters(s),a.requestImage(t,n,i,o)}function GWe(e,t,n,i,o,r,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(Qh.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}}});Qh.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};Qh.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Uue(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};Qh.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return GWe(this,e,t,n,i,o,s)};Qh.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});Qh.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});Qh.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new u0("json","application/json")),Object.freeze(new u0("xml","text/xml")),Object.freeze(new u0("text","text/html"))]);function kue(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var dN=Qh;var zWe=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function hN(e){e=e??V.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=we.createIfNeeded(e.url),n=e.style,i=e.tileMatrixSetID,o=t.url,r=o.match(/{/g);if(!l(r)||r.length===1&&/{s}/.test(o))t.setQueryParameters(zWe),this._useKvp=!0;else{let h={style:n,Style:n,TileMatrixSet:i};t.setTemplateValues(h),this._useKvp=!1}this._resource=t,this._layer=e.layer,this._style=n,this._tileMatrixSetID=i,this._tileMatrixLabels=e.tileMatrixLabels,this._format=e.format??"image/jpeg",this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new Cs({ellipsoid:e.ellipsoid}),this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._minimumLevel=e.minimumLevel??0,this._maximumLevel=e.maximumLevel,this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._dimensions=e.dimensions;let s=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new f0({clock:e.clock,times:e.times,requestImageFunction:function(h,p,g,m,_){return Gue(s,h,p,g,m,_)},reloadFunction:function(){l(s._reload)&&s._reload()}}));let a=this._tilingScheme.positionToTileXY(ae.southwest(this._rectangle),this._minimumLevel),c=this._tilingScheme.positionToTileXY(ae.northeast(this._rectangle),this._minimumLevel),u=(Math.abs(c.x-a.x)+1)*(Math.abs(c.y-a.y)+1);this._errorEvent=new ge;let f=e.credit;this._credit=typeof f=="string"?new Bt(f):f,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():l(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function Gue(e,t,n,i,o,r){let s=e._tileMatrixLabels,a=l(s)?s[i]:i.toString(),c=e._subdomains,u=e._dimensions,f=l(r)?r.data:void 0,h,p;if(!e._useKvp)p={TileMatrix:a,TileRow:n.toString(),TileCol:t.toString(),s:c[(t+n+i)%c.length]},h=e._resource.getDerivedResource({request:o}),h.setTemplateValues(p),l(u)&&h.setTemplateValues(u),l(f)&&h.setTemplateValues(f);else{let g={};g.tilematrix=a,g.layer=e._layer,g.style=e._style,g.tilerow=n,g.tilecol=t,g.tilematrixset=e._tileMatrixSetID,g.format=e._format,l(u)&&(g=St(g,u)),l(f)&&(g=St(g,f)),p={s:c[(t+n+i)%c.length]},h=e._resource.getDerivedResource({queryParameters:g,request:o}),h.setTemplateValues(p)}return Bl.loadImage(e,h)}Object.defineProperties(hN.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 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}},format:{get:function(){return this._format}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},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())}}});hN.prototype.getTileCredits=function(e,t,n){};hN.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Gue(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};hN.prototype.pickFeatures=function(e,t,n,i,o){};var mN=hN;var VWe={ARCGIS_MAPSERVER:XA.fromUrl,BING:async(e,t)=>rN.fromUrl(e,t),GOOGLE_EARTH:async(e,t)=>{let n=t.channel;return delete t.channel,cN.fromUrl(e,n,t)},MAPBOX:(e,t)=>new lN({url:e,...t}),SINGLE_TILE:uN.fromUrl,TMS:my.fromUrl,URL_TEMPLATE:(e,t)=>new mc({url:e,...t}),WMS:(e,t)=>new dN({url:e,...t}),WMTS:(e,t)=>new mN({url:e,...t})};function np(e){e=e??V.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._tileCredits=void 0,this._errorEvent=new ge}Object.defineProperties(np.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(){}}});np.fromAssetId=async function(e,t){t=t??V.EMPTY_OBJECT;let n=ju._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=np._endpointCache[i];l(o)||(o=n.fetchJson(),np._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new ce(`Cesium ion asset ${e} is not an imagery asset.`);let s,a=r.externalType;if(!l(a))s=await my.fromUrl(new ju(r,n));else{let u=VWe[a];if(!l(u))throw new ce(`Unrecognized Cesium ion imagery type: ${a}`);let f={...r.options},h=f.url;delete f.url,s=await u(h,f)}let c=new np(t);return s.errorEvent.addEventListener(function(u){u.provider=c,c._errorEvent.raiseEvent(u)}),c._tileCredits=ju.getCreditsFromEndpoint(r,n),c._imageryProvider=s,c};np.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};np.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};np.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};np._endpointCache={};var JA=np;var HWe={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4},ZA=Object.freeze(HWe);function WWe(e){e=e??V.EMPTY_OBJECT;let t=e.style??ZA.AERIAL;return JA.fromAssetId(t)}var $A=WWe;function Dl(){he.throwInstantiationError()}Object.defineProperties(Dl.prototype,{errorEvent:{get:he.throwInstantiationError},credit:{get:he.throwInstantiationError},tilingScheme:{get:he.throwInstantiationError},hasWaterMask:{get:he.throwInstantiationError},hasVertexNormals:{get:he.throwInstantiationError},availability:{get:he.throwInstantiationError}});var zue=[];Dl.getRegularGridIndices=function(e,t){let n=zue[e];l(n)||(zue[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),jue(e,t,i,0)),i};var Vue=[];Dl.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=Vue[e];l(n)||(Vue[e]=n=[]);let i=n[t];if(!l(i)){let o=Dl.getRegularGridIndices(e,t),r=Wue(e,t),s=r.westIndicesSouthToNorth,a=r.southIndicesEastToWest,c=r.eastIndicesNorthToSouth,u=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var Hue=[];Dl.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=Hue[e];l(n)||(Hue[e]=n=[]);let i=n[t];if(!l(i)){let o=e*t,r=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,c=o+s,u=r+a,f=Wue(e,t),h=f.westIndicesSouthToNorth,p=f.southIndicesEastToWest,g=f.eastIndicesNorthToSouth,m=f.northIndicesWestToEast,_=Qe.createTypedArray(c,u);jue(e,t,_,0),Dl.addSkirtIndices(h,p,g,m,o,_,r),i=n[t]={indices:_,westIndicesSouthToNorth:h,southIndicesEastToWest:p,eastIndicesNorthToSouth:g,northIndicesWestToEast:m,indexCountWithoutSkirts:r}}return i};Dl.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=Hz(e,a,r,s),a+=e.length,s=Hz(t,a,r,s),a+=t.length,s=Hz(n,a,r,s),a+=n.length,Hz(i,a,r,s)};function Wue(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function jue(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,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,++o}++o}}function Hz(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}Dl.heightmapTerrainQuality=.25;Dl.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Dl.heightmapTerrainQuality/(t*n)};Dl.prototype.requestTileGeometry=he.throwInstantiationError;Dl.prototype.getLevelMaximumGeometricError=he.throwInstantiationError;Dl.prototype.getTileDataAvailable=he.throwInstantiationError;Dl.prototype.loadTileDataAvailability=he.throwInstantiationError;var Es=Dl;var pN=`uniform sampler2D u_texture; in vec2 v_textureCoordinates; void main() { out_FragColor = texture(u_texture, v_textureCoordinates); } `;var AN=`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 jWe={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7},Yn=Object.freeze(jWe);function cT(e,t,n,i,o){if(this.imageryLayer=e,this.x=t,this.y=n,this.level=i,this.request=void 0,i!==0){let r=t/2|0,s=n/2|0,a=i-1;this.parent=e.getImageryFromCache(r,s,a)}this.state=Yn.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(o)&&e.ready&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,n,i)),this.rectangle=o}cT.createPlaceholder=function(e){let t=new cT(e,0,0,0);return t.addReference(),t.state=Yn.PLACEHOLDER,t};cT.prototype.addReference=function(){++this.referenceCount};cT.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(),ue(this),0):this.referenceCount};cT.prototype.processStateMachine=function(e,t,n){this.state===Yn.UNLOADED&&!n&&(this.state=Yn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Yn.RECEIVED&&(this.state=Yn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Yn.READY&&t&&!this.texture;(this.state===Yn.TEXTURE_LOADED||i)&&(this.state=Yn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var lT=cT;function Lj(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}Lj.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};Lj.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Yn.READY)return l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;let r=i.parent,s;for(;l(r)&&(r.state!==Yn.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==Yn.FAILED&&r.state!==Yn.INVALID&&(s=s||r),r=r.parent;return this.readyImagery!==r&&(l(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=r,l(r)&&(r.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),i.state===Yn.FAILED||i.state===Yn.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var uT=Lj;function Ri(e,t){this._imageryProvider=e,this._readyEvent=new ge,this._errorEvent=new ge,t=t??V.EMPTY_OBJECT,e=e??V.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??Ri.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??Ri.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??Ri.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??Ri.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??Ri.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??Ri.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??Ri.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??Ri.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??ae.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new uT(lT.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??Ri.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(Ri.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}}});Ri.DEFAULT_BRIGHTNESS=1;Ri.DEFAULT_CONTRAST=1;Ri.DEFAULT_HUE=0;Ri.DEFAULT_SATURATION=1;Ri.DEFAULT_GAMMA=1;Ri.DEFAULT_SPLIT=Tr.NONE;Ri.DEFAULT_MINIFICATION_FILTER=$t.LINEAR;Ri.DEFAULT_MAGNIFICATION_FILTER=di.LINEAR;Ri.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;Ri.fromProviderAsync=function(e,t){let n=new Ri(void 0,t);return JWe(n,Promise.resolve(e)),n};Ri.fromWorldImagery=function(e){return e=e??V.EMPTY_OBJECT,Ri.fromProviderAsync($A({style:e.style}),e)};Ri.prototype.isBaseLayer=function(){return this._isBaseLayer};Ri.prototype.isDestroyed=function(){return!1};Ri.prototype.destroy=function(){return ue(this)};var Kue=new ae,Yue=new ae,Oj=new ae,Xue=new ae;Ri.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ae.intersection(e.rectangle,t)};Ri.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 o=this._imageryProvider;if(!this.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),i.imagery.splice(n,0,this._skeletonPlaceholder),!0;let r=o.tilingScheme.projection instanceof Ui&&e.rectangle.north<Ui.MaximumLatitude&&e.rectangle.south>-Ui.MaximumLatitude,s=ae.intersection(o.rectangle,this._rectangle,Kue),a=ae.intersection(e.rectangle,s,Yue);if(!l(a)){if(!this.isBaseLayer())return!1;let T=s,w=e.rectangle;a=Yue,w.south>=T.north?a.north=a.south=T.north:w.north<=T.south?a.north=a.south=T.south:(a.south=Math.max(w.south,T.south),a.north=Math.min(w.north,T.north)),w.west>=T.east?a.west=a.east=T.east:w.east<=T.west?a.west=a.east=T.west:(a.west=Math.max(w.west,T.west),a.east=Math.min(w.east,T.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let f=1*t.getLevelMaximumGeometricError(e.level),h=KWe(this,f,c);h=Math.max(0,h);let p=o.maximumLevel;if(h>p&&(h=p),l(o.minimumLevel)){let T=o.minimumLevel;h<T&&(h=T)}let g=o.tilingScheme,m=g.positionToTileXY(ae.northwest(a),h),_=g.positionToTileXY(ae.southeast(a),h),y=e.rectangle.width/512,C=e.rectangle.height/512,E=g.tileXYToRectangle(m.x,m.y,h);Math.abs(E.south-e.rectangle.north)<C&&m.y<_.y&&++m.y,Math.abs(E.east-e.rectangle.west)<y&&m.x<_.x&&++m.x;let I=g.tileXYToRectangle(_.x,_.y,h);Math.abs(I.north-e.rectangle.south)<C&&_.y>m.y&&--_.y,Math.abs(I.west-e.rectangle.east)<y&&_.x>m.x&&--_.x;let b=ae.clone(e.rectangle,Xue),S=g.tileXYToRectangle(m.x,m.y,h),B=ae.intersection(S,s,Oj),v;r?(g.rectangleToNativeRectangle(b,b),g.rectangleToNativeRectangle(S,S),g.rectangleToNativeRectangle(B,B),g.rectangleToNativeRectangle(s,s),v=g.tileXYToNativeRectangle.bind(g),y=b.width/512,C=b.height/512):v=g.tileXYToRectangle.bind(g);let P,N=0,L=1,A;!this.isBaseLayer()&&Math.abs(B.west-b.west)>=y&&(N=Math.min(1,(B.west-b.west)/b.width)),!this.isBaseLayer()&&Math.abs(B.north-b.north)>=C&&(L=Math.max(0,(B.north-b.south)/b.height));let x=L;for(let T=m.x;T<=_.x;T++)if(P=N,S=v(T,m.y,h),B=ae.simpleIntersection(S,s,Oj),!!l(B)){N=Math.min(1,(B.east-b.west)/b.width),T===_.x&&(this.isBaseLayer()||Math.abs(B.east-b.east)<y)&&(N=1),L=x;for(let w=m.y;w<=_.y;w++){if(A=L,S=v(T,w,h),B=ae.simpleIntersection(S,s,Oj),!l(B))continue;L=Math.max(0,(B.south-b.south)/b.height),w===_.y&&(this.isBaseLayer()||Math.abs(B.south-b.south)<C)&&(L=0);let R=new se(P,L,N,A),O=this.getImageryFromCache(T,w,h);i.imagery.splice(n,0,new uT(O,R,r)),++n}}return!0};Ri.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,Kue),i=c.rectangleToNativeRectangle(i,Xue)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new se(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};Ri.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=Yn.RECEIVED,e.request=void 0,Qo.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===li.CANCELLED){e.state=Yn.UNLOADED,e.request=void 0;return}e.state=Yn.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Qo.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new ar({throttle:!1,throttleByServer:!0,type:ws.IMAGERY});e.request=s,e.state=Yn.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=Yn.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){o(c)})}r()};Ri.prototype._createTextureWebGL=function(e,t){let n=new nn({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Nt({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Nt({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?$e.RGBA:$e.RGB,sampler:n})};Ri.prototype._createTexture=function(e,t){let n=this._imageryProvider,i=t.image;if(l(n.tileDiscardPolicy)){let r=n.tileDiscardPolicy;if(l(r)){if(!r.isReady()){t.state=Yn.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=Yn.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof Ui?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Yn.TEXTURE_LOADED};function que(e,t,n){return`${e}:${t}:${n}`}Ri.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===$t.LINEAR&&i===di.LINEAR&&!$e.isCompressedFormat(t.pixelFormat)&&D.isPowerOfTwo(t.width)&&D.isPowerOfTwo(t.height)){n=$t.LINEAR_MIPMAP_LINEAR;let r=qt.maximumTextureFilterAnisotropy,s=Math.min(r,this._maximumAnisotropy??r),a=que(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let u=c[a];l(u)||(u=c[a]=new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(Yf.NICEST),t.sampler=u}else{let r=que(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};Ri.prototype._reprojectTexture=function(e,t,n){let i=t.textureWebMercator||t.texture,o=t.rectangle,r=e.context;if(n=n??!0,n&&!(this._imageryProvider.tilingScheme.projection instanceof Qi)&&o.width/i.width>1e-5){let s=this;t.addReference();let a=new sl({persists:!0,owner:this,preExecute:function(c){qWe(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=Yn.READY,t.releaseReference()},canceled:function(){t.state=Yn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Yn.READY};Ri.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};Ri.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};Ri.prototype.getImageryFromCache=function(e,t,n,i){let o=Jue(e,t,n),r=this._imageryCache[o];return l(r)||(r=new lT(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};Ri.prototype.removeImageryFromCache=function(e){let t=Jue(e.x,e.y,e.level);delete this._imageryCache[t]};function Jue(e,t,n){return JSON.stringify([e,t,n])}var Wz={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new U,texture:void 0},YWe=jt.supportsTypedArrays()?new Float32Array(2*64):void 0;function qWe(e,t,n,i){let o=t.cache.imageryLayer_reproject;if(!l(o)){o=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 y=new Float32Array(2*64*2),C=0;for(let B=0;B<64;++B){let v=B/63;y[C++]=0,y[C++]=v,y[C++]=1,y[C++]=v}let E={position:0,webMercatorT:1},I=Es.getRegularGridIndices(2,64),b=Ct.createIndexBuffer({context:t,typedArray:I,usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT});o.vertexArray=new ri({context:t,attributes:[{index:E.position,vertexBuffer:Ct.createVertexBuffer({context:t,typedArray:y,usage:Ue.STATIC_DRAW}),componentsPerAttribute:2},{index:E.webMercatorT,vertexBuffer:Ct.createVertexBuffer({context:t,sizeInBytes:64*2*4,usage:Ue.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:b});let S=new He({sources:[AN]});o.shaderProgram=cn.fromCache({context:t,vertexShaderSource:S,fragmentShaderSource:pN,attributeLocations:E}),o.sampler=new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.LINEAR,magnificationFilter:di.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;Wz.textureDimensions.x=r,Wz.textureDimensions.y=s,Wz.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),h=new Nt({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});D.isPowerOfTwo(r)&&D.isPowerOfTwo(s)&&h.generateMipmap(Yf.NICEST);let p=i.south,g=i.north,m=YWe,_=0;for(let y=0;y<64;++y){let C=y/63,E=D.lerp(p,g,C);a=Math.sin(E);let b=(.5*Math.log((1+a)/(1-a))-c)*f;m[_++]=b,m[_++]=b}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(m),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=Wz,e.vertexArray=o.vertexArray}function KWe(e,t,n){let i=e._imageryProvider,o=i.tilingScheme,r=o.ellipsoid,s=e._imageryProvider.tilingScheme.projection instanceof Qi?1:Math.cos(n),a=o.rectangle,u=r.maximumRadius*a.width*s/(i.tileWidth*o.getNumberOfXTilesAtLevel(0))/t,f=Math.log(u)/Math.log(2);return Math.round(f)|0}function XWe(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function JWe(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){XWe(e._errorEvent,i)}}var ns=Ri;var Fj=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},gN=Fj;var Qj=class{constructor(t,n,i,o){this._minX=t??0,this._minY=n??0,this._maxX=i??0,this._maxY=o??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}},fT=Qj;var ZWe=new ae,Zue=new ae,$We=new ae,eje=new ae,tje=new ae,nje=new ae,kj=class e{constructor(t,n,i,o,r){this._x=t,this._y=n,this._level=i,this._textureCoordinateRectangle=o,this._imagery=r}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 o=n.imageryProvider,r=e._clampImageryLevel(o,i),s=ae.intersection(o.rectangle,n.rectangle,ZWe),a=o.tilingScheme,c=e._computeImageryRange(t,s,a,r),u=eje;a.rectangleToNativeRectangle(t,u);let f=tje;a.rectangleToNativeRectangle(s,f);let h=(g,m,_)=>{let y=a.tileXYToRectangle(g,m,_),C=ae.intersection(y,s,$We);if(!l(C))return;let E=nje;return a.rectangleToNativeRectangle(C,E),E};return e._computeImageryCoverages(n,c,r,u,h)}static _clampImageryLevel(t,n){let i=t.minimumLevel??0,o=t.maximumLevel??Number.POSITIVE_INFINITY,r=Math.min(o-1,Math.max(i,n));return Math.floor(r)}static _computeImageryRange(t,n,i,o){let r=e._computeOverlappedRectangle(t,n),s=i.positionToTileXY(ae.northwest(r),o),a=i.positionToTileXY(ae.southeast(r),o),c=new fT;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,h=i.tileXYToRectangle(c.minX,c.minY,o);Math.abs(h.south-t.north)<f&&c.minY<c.maxY&&++c.minY,Math.abs(h.east-t.west)<u&&c.minX<c.maxX&&++c.minX;let m=i.tileXYToRectangle(c.maxX,c.maxY,o);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 ae),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=ae.intersection(t,n,Zue);return l(i)?i:e._clampRectangle(t,n,Zue)}static _computeImageryCoverages(t,n,i,o,r){let s=[];for(let a=n.minX;a<=n.maxX;a++){let c=r(a,n.maxY,i);if(l(c))for(let u=n.minY;u<=n.maxY;u++){let f=r(a,u,i);if(!l(f))continue;let h=e._localizeToCartesianRectangle(f,o,void 0),p=t.getImageryFromCache(a,u,i),g=new e(a,u,i,h,p);s.push(g)}}return s}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new fT);let o=1/n.width,r=1/n.height;return i.minX=(t.west-n.west)*o,i.minY=(t.south-n.south)*r,i.maxX=(t.east-n.west)*o,i.maxY=(t.north-n.south)*r,i}},dT=kj;var Uj=class e{static readAttributeAsTypedArray(t){let n=e.readAttributeAsRawCompactTypedArray(t),i=t.normalized,o=t.quantization;if(!l(o)&&!i)return n;let r=t.type,s=t.count,a=n;return i&&(a=Fn.dequantize(n,t.componentDatatype,r,s)),l(o)?e.dequantize(a,s,r,o):a}static readAttributeAsRawCompactTypedArray(t){let n=t.type,i=t.count,o=Ht.getNumberOfComponents(n),r=i*o,s=t.componentDatatype,a=t.quantization;l(a)&&(s=a.componentDatatype);let c=t.buffer,u=t.byteOffset,f=t.byteStride,h=q.getSizeInBytes(s),p=o*h;if(!l(f)||f===p){let I=q.createTypedArray(s,r);return c.getBufferData(I,u),I}let g=new Uint8Array(c.sizeInBytes);c.getBufferData(g);let m=q.createTypedArray(s,r),_=f??p,y=new DataView(g.buffer,g.byteOffset,g.byteLength),C=new Array(o),E=e.createComponentsReader(s);for(let I=0;I<i;++I){let b=u+I*_;E(y,b,o,C);for(let S=0;S<o;++S)m[I*o+S]=C[S]}return m}static dequantize(t,n,i,o){if(o.octEncoded){let a=e.octDecode(t,n,o.normalizationRange,void 0);return o.octEncodedZXY&&e.convertZxyToXyz(a,a),a}let r=o.quantizedVolumeStepSize,s=o.quantizedVolumeOffset;if(i===Ht.SCALAR)return e.dequantize1D(t,n,r,s,void 0);if(i===Ht.VEC2)return e.dequantize2D(t,n,r,s,void 0);if(i===Ht.VEC3)return e.dequantize3D(t,n,r,s,void 0);if(i===Ht.VEC4)return e.dequantize4D(t,n,r,s,void 0);throw new he(`Element type for dequantization must be SCALAR, VEC2, VEC3, or VEC4, but is ${i}`)}static octDecode(t,n,i,o){l(o)||(o=new Float32Array(t.length));let r=new d;for(let s=0;s<n;s++)d.unpack(t,s*3,r),Fn.octDecodeInRange(r,i,r),d.pack(o,r,s*3);return o}static convertZxyToXyz(t,n,i){l(i)||(i=new Float32Array(t.length));let o=0;for(let r=0;r<n;r++,o+=3){let s=t[o+0],a=t[o+1],c=t[o+2];i[o+0]=a,i[o+1]=c,i[o+2]=s}return i}static dequantize1D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));for(let s=0;s<n;s++){let c=t[s]*i+o;r[s]=c}return r}static dequantize2D(t,n,i,o,r){l(r)||(r=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,o,s),U.pack(s,r,a*2);return r}static dequantize3D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new d;for(let a=0;a<n;a++)d.unpack(t,a*3,s),d.multiplyComponents(s,i,s),d.add(s,o,s),d.pack(s,r,a*3);return r}static dequantize4D(t,n,i,o,r){l(r)||(r=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,o,s),se.pack(s,r,a*4);return r}static createComponentsReader(t){let n=e.createComponentReader(t),i=q.getSizeInBytes(t);return function(o,r,s,a){let c=r;for(let u=0;u<s;++u)a[u]=n(o,c),c+=i}}static createComponentReader(t){switch(t){case q.BYTE:return function(n,i){return n.getInt8(i)};case q.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case q.SHORT:return function(n,i){return n.getInt16(i,!0)};case q.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case q.INT:return function(n,i){return n.getInt32(i,!0)};case q.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case q.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case q.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new he(`The componentType must be a valid ComponentDatatype, but is ${t}`)}static transform3D(t,n,i){l(i)||(i=new Float32Array(t.length));let o=new d,r=t.length/3;for(let s=0;s<r;s++)d.unpack(t,s*3,o),M.multiplyByPoint(n,o,o),d.pack(o,i,s*3);return i}static readIndicesAsTypedArray(t){let n=t.typedArray;if(l(n))return n;let i=t.buffer,o=t.count,r=t.indexDatatype,s=e.createIndexTypedArray(r,o);return i.getBufferData(s),s}static readIndicesAsTriangleIndicesTypedArray(t,n){let i=e.readIndicesAsTypedArray(t);if(n===Ne.TRIANGLES)return i;if(n===Ne.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===Ne.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new he(`The primitiveType must be TRIANGLES (${Ne.TRIANGLES}, TRIANGLE_STRIP (${Ne.TRIANGLE_STRIP}, or TRIANGLE_FAN (${Ne.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 Qe.UNSIGNED_BYTE:return new Uint8Array(n);case Qe.UNSIGNED_SHORT:return new Uint16Array(n);case Qe.UNSIGNED_INT:return new Uint32Array(n)}throw new he(`The indexDatatype must be UNSIGNED_BYTE (${Qe.UNSIGNED_BYTE}, UNSIGNED_SHORT (${Qe.UNSIGNED_SHORT}, or UNSIGNED_INT (${Qe.UNSIGNED_INT}, but is ${t}`)}},_N=Uj;var Gj=class e{static createTextureCoordinatesForMappedPositions(t,n){let i=t.cartographicPositions,o=t.cartographicBoundingRectangle,r=t.numPositions;return e._createTextureCoordinates(i,r,o,n)}static _createTextureCoordinates(t,n,i,o){let r=new qe;qe.fromRectangle(i,o,r);let s=e.createProjectedPositions(t,o),a=e.computeTexCoords(s,r);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 o=_N.readAttributeAsTypedArray(t),r=t.type,s=Ht.getNumberOfComponents(r),a=e.createIterableCartesian3FromTypedArray(o,s),c=e.transformCartesians3(a,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new d,o=t.length/n;return{[Symbol.iterator]:function*(){for(let s=0;s<o;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 o of t)yield n(o)}}}static computeCartographicBoundingRectangle(t,n){l(n)||(n=new ae);let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(let a of t)i=Math.max(i,a.latitude),o=Math.min(o,a.latitude),r=Math.max(r,a.longitude),s=Math.min(s,a.longitude);return n.north=i,n.south=o,n.east=r,n.west=s,n}static transformCartesians3(t,n){let i=new d;return e.map(t,r=>(M.multiplyByPoint(n,r,i),i))}static transformToCartographic(t,n){let i=new me;return e.map(t,r=>(n.cartesianToCartographic(r,i),i))}static createProjectedPositions(t,n){let i=new d;return e.map(t,r=>(n.project(r,i),i))}static computeTexCoords(t,n){let i=new U,o=1/n.width,r=1/n.height;return e.map(t,a=>{let c=(a.x-n.x)*o,u=(a.y-n.y)*r,f=Math.min(Math.max(c,0),1),h=Math.min(Math.max(u,0),1);return i.x=f,i.y=h,i})}static createTypedArrayFromCartesians2(t,n){let i=new Float32Array(t*2),o=0;for(let r of n)i[o*2+0]=r.x,i[o*2+1]=r.y,o++;return i}static createTexCoordAttribute(t){return{name:"Imagery Texture Coordinates",semantic:rt.TEXCOORD,setIndex:0,componentDatatype:q.FLOAT,type:Ht.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}}},d0=Gj;var zj=class{constructor(t,n,i,o){this._cartographicPositions=t,this._numPositions=n,this._cartographicBoundingRectangle=i,this._ellipsoid=o}get cartographicPositions(){return this._cartographicPositions}get numPositions(){return this._numPositions}get cartographicBoundingRectangle(){return this._cartographicBoundingRectangle}get ellipsoid(){return this._ellipsoid}},yN=zj;var Vj=class e{constructor(t,n,i){this._model=t,this._runtimeNode=n,this._runtimePrimitive=i,this._mappedPositionsPerEllipsoid=void 0,this._mappedPositionsModelMatrix=new M,this._lastImageryLayersModificationCounter=0,this._imageryTexCoordAttributesPerProjection=void 0,this._currentImageryLayers=void 0,this._coveragesPerLayer=void 0,this._allImageriesReady=!1}coveragesForImageryLayer(t){let o=this._model.imageryLayers.indexOf(t);if(o===-1)throw new he("Imagery layer is not part of the model");let r=this._coveragesPerLayer;if(!l(r))throw new he("The coveragesPerLayer have not been computed yet");return r[o]}update(t){let n=this._model,r=n.content.tileset.imageryLayersModificationCounter;this._lastImageryLayersModificationCounter!==r&&(delete this._mappedPositionsPerEllipsoid,this._lastImageryLayersModificationCounter=r),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 o=0;o<i;o++){let r=n[o],s=t[o];this._deleteCoverages(r,s)}delete this._currentImageryLayers,delete this._coveragesPerLayer}_deleteCoverages(t,n){if(t.isDestroyed())return;let i=n.length;for(let o=0;o<i;o++)n[o].imagery.releaseReference()}_uploadImageryTexCoordAttributes(t){let n=this._imageryTexCoordAttributesPerProjection;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=Ct.createVertexBuffer({context:t,typedArray:r.typedArray,usage:Ue.STATIC_DRAW});s.vertexArrayDestroyable=!1,r.buffer=s}}_destroyImageryTexCoordAttributes(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++){let o=t[i];l(o)&&(l(o.buffer)&&(o.buffer.isDestroyed()||o.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!M.equals(t.modelMatrix,n)}_computeMappedPositionsPerEllipsoid(){let t=this._model,n=this._runtimeNode,i=this._runtimePrimitive,o=e._obtainPrimitivePositionAttribute(i.primitive),r=o.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 h=c[f],p=d0.createCartographicPositions(o,s,h),g=d0.computeCartographicBoundingRectangle(p),m=new yN(p,r,g,h);a.push(m)}return M.clone(t.modelMatrix,this._mappedPositionsModelMatrix),a}static _computeUniqueEllipsoids(t){let n=new Set,i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getEllipsoid(r);n.add(s)}return[...n]}_computeImageryTexCoordsAttributesPerProjection(){let n=this._model.imageryLayers,i=e._extractProjections(n),o=[...new Set(i)];return this._createImageryTexCoordAttributes(o)}static _extractProjections(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getProjection(r);n.push(s)}return n}static _getProjection(t){return t.imageryProvider.tilingScheme.projection}_createImageryTexCoordAttributes(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t[o],s=r.ellipsoid,a=this.mappedPositionsForEllipsoid(s),c=d0.createTextureCoordinatesAttributeForMappedPositions(a,r);n.push(c)}return n}_computeCoveragesPerLayer(){let t=[],n=[],o=this._model.imageryLayers,r=o.length;for(let s=0;s<r;s++){let a=o.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,o=this._computeImageryLevel(t,i);return dT.createImageryCoverages(i,t,o)}_computeImageryLevel(t,n){let i=t.imageryProvider,r=i.tilingScheme.rectangle,s=1,a=n.width,c=r.width;n.height>n.width&&(a=n.height,c=r.height);let u=Math.log2(s*c/a);return dT._clampImageryLevel(i,u)}_updateImageries(t){let n=this._model,i=this._coveragesPerLayer,o=i.length,r=!0;for(let s=0;s<o;s++){let a=i[s],c=a.length;for(let u=0;u<c;u++){let h=a[u].imagery;h.state===Yn.READY||h.state===Yn.FAILED||h.state===Yn.INVALID||(r=!1,h.processStateMachine(t,!1,!1))}}r&&n.resetDrawCommands(),this._allImageriesReady=r}mappedPositionsForImageryLayer(t){let n=e._getEllipsoid(t);return this.mappedPositionsForEllipsoid(n)}mappedPositionsForEllipsoid(t){let n=this._mappedPositionsPerEllipsoid;if(!l(n))throw new he("The mappedPositions have not been computed yet");let i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.ellipsoid===t)return r}throw new he(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new he("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(),ue(this)}static _computePrimitivePositionTransform(t,n,i){l(i)||(i=new M);let o=t.sceneGraph;return M.clone(M.IDENTITY,i),M.multiply(i,t.modelMatrix,i),M.multiply(i,o.components.transform,i),M.multiply(i,o.axisCorrectionMatrix,i),M.multiply(i,n.computedTransform,i),i}static _obtainPrimitivePositionAttribute(t){let n=vt.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new he("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},h0=Vj;var Hj=class{constructor(t,n,i,o,r){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=o,this.imageryTexCoordAttributeSetIndex=r}},CN=Hj;var ije=!1,oje=new ae,rje=new ae,Wj=class e{static process(t,n,i){let o=t.model,r=n.modelPrimitiveImagery;if(!l(r)||!r.ready)return;let s=o.imageryLayers,a=h0._extractProjections(s),c=[...new Set(a)],u=e._computeIndexMapping(a,c),f=e._createImageryInputs(s,r,u);if(f.length===0)return;f.length>10&&(yt("imagery-texture-units",`Warning: Draped imagery requires ${f.length} texture units, truncating`),f.length=10),e._addImageryTexCoordAttributesToRenderResources(r,t);let h=[];for(let p=0;p<s.length;p++)h.push(s.get(p));e._processImageryInputs(h,t,f,c.length)}static _addImageryTexCoordAttributesToRenderResources(t,n){let i=t.imageryTexCoordAttributesPerProjection();for(let o of i)e._addImageryTexCoordAttributeToRenderResources(o,n)}static _addImageryTexCoordAttributeToRenderResources(t,n){let i=Ht.getNumberOfComponents(t.type),o={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(o)}static _processImageryInputs(t,n,i,o){let r=n.shaderBuilder,s=e._computeImageryFlags(t),a=i.length;r.addDefine("HAS_IMAGERY"),r.addDefine(`IMAGERY_TEXTURE_UNITS ${a}`),e._addAttributes(r,o),e._defineUniforms(r,s),e._buildSampleAndBlendFunction(r,s),e._createMainImageryShader(r,i,s);let c=n.uniformMap,u=e._createImageryUniforms(i);e._setImageryUniforms(c,u)}static _addAttributes(t,n){for(let r=0;r<n;r++)t.addAttribute("vec2",`a_imagery_texCoord_${r}`),t.addVarying("vec2",`v_imagery_texCoord_${r}`);let i="initializeImageryAttributes",o=`void ${i}()`;t.addFunction(i,o,Ae.VERTEX);for(let r=0;r<n;r++)t.addFunctionLines(i,[`v_imagery_texCoord_${r} = a_imagery_texCoord_${r};`])}static _computeImageryFlags(t){let n=new gN;for(let i=0;i<t.length;i++){let o=t[i];n.alpha|=o.alpha!==1,n.brightness|=o.brightness!==ns.DEFAULT_BRIGHTNESS,n.contrast|=o.contrast!==ns.DEFAULT_CONTRAST,n.hue|=o.hue!==ns.DEFAULT_HUE,n.saturation|=o.saturation!==ns.DEFAULT_SATURATION,n.gamma|=o.gamma!==ns.DEFAULT_GAMMA;let r=l(o.colorToAlpha)&&o.colorToAlphaThreshold>0;n.colorToAlpha|=r}return n}static _defineUniforms(t,n){t.addUniform("sampler2D","u_imageryTextures[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",Ae.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",Ae.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 o=i.join(", ");return`vec4 ${n}(${o})`}static _buildSampleAndBlendFunction(t,n){let i="sampleAndBlend",o=e._createSampleAndBlendFunctionSignature(n);t.addFunction(i,o,Ae.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));"]),ije&&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 o=`v_imagery_texCoord_${n}`,r=[];return r.push("blendedBaseColor"),r.push(`u_imageryTextures[${i}]`),r.push(`${o}`),r.push(`u_imageryTextureCoordinateRectangle[${i}]`),r.push(`u_imageryTextureTranslationAndScale[${i}]`),t.alpha&&r.push(`u_imageryTextureAlpha[${i}]`),t.brightness&&r.push(`u_imageryTextureBrightness[${i}]`),t.contrast&&r.push(`u_imageryTextureContrast[${i}]`),t.hue&&r.push(`u_imageryTextureHue[${i}]`),t.saturation&&r.push(`u_imageryTextureSaturation[${i}]`),t.gamma&&r.push(`u_imageryTextureOneOverGamma[${i}]`),t.colorToAlpha&&r.push(`u_imageryTextureColorToAlpha[${i}]`),r.join(", ")}static _createMainImageryShader(t,n,i){let o="blendBaseColorWithImagery";t.addFunction(o,"vec4 blendBaseColorWithImagery(vec4 baseColorWithAlpha)",Ae.FRAGMENT),t.addFunctionLines(o,["vec4 blendedBaseColor = baseColorWithAlpha;"]);for(let r=0;r<n.length;r++){let a=n[r].imageryTexCoordAttributeSetIndex,c=e._createSampleAndBlendCallArguments(i,a,r);t.addFunctionLines(o,[`blendedBaseColor = sampleAndBlend(${c});`])}t.addFunctionLines(o,["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 o=0;o<n;o++){let r=t[o],s=r.imageryLayer,a=r.texture,c=r.textureCoordinateRectangle,u=r.textureTranslationAndScale;i.imageryTextures[o]=a,i.imageryTextureTranslationAndScale[o]=u,i.imageryTextureCoordinateRectangle[o]=c,i.imageryTextureAlpha[o]=s.alpha,i.imageryTextureBrightness[o]=s.brightness,i.imageryTextureContrast[o]=s.contrast,i.imageryTextureHue[o]=s.hue,i.imageryTextureSaturation[o]=s.saturation,i.imageryTextureOneOverGamma[o]=1/s.gamma;let f=i.imageryTextureColorToAlpha[o];if(l(f)||(f=new se,i.imageryTextureColorToAlpha[o]=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 o=`u_${i}`;t[o]=function(){return n[i]}}}static _createImageryInputs(t,n,i){let o=[];for(let r=0;r<t.length;r++){let s=t.get(r),a=i[r],u=n.mappedPositionsForImageryLayer(s).cartographicBoundingRectangle,f=n.coveragesForImageryLayer(s);for(let h=0;h<f.length;h++){let p=f[h],g=e._createImageryInput(s,p,u,a);l(g)&&o.push(g)}}return o}static _createImageryInput(t,n,i,o){let r=n.imagery;if(r.state===Yn.FAILED||r.state===Yn.INVALID)return;let s=r.textureWebMercator;if(!l(s)&&(s=r.texture,!l(s))){r.state===Yn.READY&&console.log(`Imagery at ${n.x}, ${n.y} (level ${n.level}) does not have any texture - state ${r.state}`);return}let a=e._computeTextureTranslationAndScale(t,i,r.rectangle),c=n.textureCoordinateRectangle,u=new se(c.minX,c.minY,c.maxX,c.maxY);return new CN(t,s,a,u,o)}static _computeTextureTranslationAndScale(t,n,i){let o=t.imageryProvider.tilingScheme,r=o.rectangleToNativeRectangle(n,oje),s=o.rectangleToNativeRectangle(i,rje);return e._computeTextureTranslationAndScaleFromNative(r,s)}static _computeTextureTranslationAndScaleFromNative(t,n){let i=1/n.width,o=1/n.height,r=t.west-n.west,s=t.south-n.south,a=r*i,c=s*o,u=t.width*i,f=t.height*o;return new se(a,c,u,f)}static _computeIndexMapping(t,n){let i=[],o=t.length;for(let r=0;r<o;r++){let s=t[r],a=n.indexOf(s);i.push(a)}return i}},EN=Wj;var IN=`#ifdef USE_IBL_LIGHTING vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material) { #if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL) // Environment maps were provided, use them for 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); // clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5. vec3 f0 = vec3(0.04); vec3 f90 = vec3(1.0); // Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h). // This is to make it energy conserving with a simple layering function. float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0); vec3 F = fresnelSchlick2(f0, f90, NdotV); // compute specular reflection from direct lighting 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 // Find the direction in which to sample the environment map 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; // Dim base layer based on transmission loss through clearcoat 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; // Accumulate colors from base layer 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 /** * Compute the material color under the current lighting conditions. * All other material properties are passed through so further stages * have access to them. * * @param {czm_modelMaterial} material The material properties from {@MaterialStageFS} * @param {ProcessedAttributes} attributes */ 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 // In HDR mode, the frame buffer is in linear color space. The // post-processing stages (see PostProcessStageCollection) will handle // tonemapping. However, if HDR is not enabled, we must tonemap else large // values may be clamped to 1.0 #ifndef HDR color = czm_pbrNeutralTonemapping(color); #endif #else // unlit vec3 color = material.diffuse; #endif #ifdef HAS_POINT_CLOUD_COLOR_STYLE // The colors resulting from point cloud styles are adjusted differently. color = czm_gammaCorrect(color); #elif !defined(HDR) // If HDR is not enabled, the frame buffer stores sRGB colors rather than // linear colors so the linear value must be converted. color = czm_linearToSrgb(color); #endif material.diffuse = color; } `;var sje={UNLIT:0,PBR:1},ip=Object.freeze(sje);var $ue={name:"LightingPipelineStage"};$ue.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(l(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,Ae.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",Ae.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===ip.PBR?o.addDefine("LIGHTING_PBR",void 0,Ae.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,Ae.FRAGMENT),o.addFragmentLines(IN)};var xN=$ue;var bN=`// If the style color is white, it implies the feature has not been styled. 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; } vec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform) { return vec2(textureTransform * vec3(texCoord, 1.0)); } #ifdef HAS_NORMAL_TEXTURE vec2 getNormalTexCoords() { vec2 texCoord = TEXCOORD_NORMAL; #ifdef HAS_NORMAL_TEXTURE_TRANSFORM texCoord = vec2(u_normalTextureTransform * vec3(texCoord, 1.0)); #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 = texture(u_normalTexture, normalTexCoords).rgb; 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(); // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set #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_normalTexture, normalTexCoords).rgb; 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 // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set #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) { // Geometry normal. This is already normalized 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 = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform); #endif vec4 baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords)); #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 = 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 = 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 = 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)); // the specular glossiness extension's alpha overrides anything set // by the base material. material.alpha = diffuse.a; material.specular = specular; // glossiness is the opposite of roughness, but easier for artists to use. 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 = 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 // dielectrics use f0 = 0.04, metals use albedo as f0 const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04); vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness); material.specular = f0; // diffuse only applies to dielectrics. material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness); // This is perceptual roughness. The square of this value is used for direct lighting 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 = 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 = 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 = 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 = 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 // PERFORMANCE_IDEA: this case should turn the whole extension off float clearcoatFactor = 0.0; #endif #endif #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS; #ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM clearcoatRoughnessTexCoords = 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; // This is perceptual roughness. The square of this value is used for direct lighting 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); // Regardless of whether we use PBR, set a base color #ifdef 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; // .pnts files store colors in the sRGB color space #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 = 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{Material:aje,MetallicRoughness:jj,SpecularGlossiness:Yj,Specular:efe,Clearcoat:tfe}=bn,nfe={name:"MaterialPipelineStage",_processTexture:du,_processTextureTransform:ife};nfe.process=function(e,t,n){let i=t.material,{model:o,uniformMap:r,shaderBuilder:s}=e,a=l(o.classificationType),c=a,{defaultTexture:u,defaultNormalTexture:f,defaultEmissiveTexture:h}=n.context;lje(i,r,s,u,f,h,c),l(i.specularGlossiness)?uje(i.specularGlossiness,r,s,u,c):(l(i.specular)&&vt.supportedExtensions.KHR_materials_specular&&fje(i.specular,r,s,u,c),l(i.anisotropy)&&vt.supportedExtensions.KHR_materials_anisotropy&&hje(i.anisotropy,r,s,u,c),l(i.clearcoat)&&vt.supportedExtensions.KHR_materials_clearcoat&&mje(i.clearcoat,r,s,u,c),pje(i.metallicRoughness,r,s,u,c));let p=vt.getAttributeBySemantic(t,rt.NORMAL),g=e.lightingOptions;i.unlit||!p||a?g.lightingModel=ip.UNLIT:g.lightingModel=ip.PBR;let m=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=m;let _=e.alphaOptions;i.alphaMode===Jm.BLEND?_.pass=Be.TRANSLUCENT:i.alphaMode===Jm.MASK&&(_.alphaCutoff=i.alphaCutoff),s.addFragmentLines(bN),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,Ae.BOTH)};function ife(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,Ae.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,Ae.FRAGMENT),t[s]=function(){return n.transform}}function cje(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,Ae.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,Ae.FRAGMENT),t[s]=function(){return n.scale}}function du(e,t,n,i,o,r){e.addUniform("sampler2D",i,Ae.FRAGMENT),t[i]=function(){return n.texture??r};let s=`HAS_${o}_TEXTURE`;e.addDefine(s,void 0,Ae.FRAGMENT);let c=`v_texCoord_${n.texCoord}`,u=`TEXCOORD_${o}`;e.addDefine(u,c,Ae.FRAGMENT);let f=n.transform;l(f)&&!X.equals(f,X.IDENTITY)&&ife(e,t,n,i,o);let{scale:h}=n;l(h)&&h!==1&&cje(e,t,n,i,o)}function lje(e,t,n,i,o,r,s){let{emissiveFactor:a,emissiveTexture:c,normalTexture:u,occlusionTexture:f}=e;l(a)&&!d.equals(a,aje.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",Ae.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,Ae.FRAGMENT),l(c)&&!s&&du(n,t,c,"u_emissiveTexture","EMISSIVE",r)),l(u)&&!s&&du(n,t,u,"u_normalTexture","NORMAL",o),l(f)&&!s&&du(n,t,f,"u_occlusionTexture","OCCLUSION",i)}function uje(e,t,n,i,o){let{diffuseTexture:r,diffuseFactor:s,specularGlossinessTexture:a,specularFactor:c,glossinessFactor:u}=e;n.addDefine("USE_SPECULAR_GLOSSINESS",void 0,Ae.FRAGMENT),l(r)&&!o&&du(n,t,r,"u_diffuseTexture","DIFFUSE",i),l(s)&&!se.equals(s,Yj.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",Ae.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,Ae.FRAGMENT)),l(a)&&!o&&du(n,t,a,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(c)&&!d.equals(c,Yj.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",Ae.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,Ae.FRAGMENT)),l(u)&&u!==Yj.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",Ae.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,Ae.FRAGMENT))}function fje(e,t,n,i,o){let{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,Ae.FRAGMENT),l(r)&&!o&&du(n,t,r,"u_specularTexture","SPECULAR",i),l(s)&&s!==efe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",Ae.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,Ae.FRAGMENT)),l(a)&&!o&&du(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!d.equals(c,efe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",Ae.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,Ae.FRAGMENT))}var dje=new d;function hje(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,Ae.FRAGMENT),l(a)&&!o&&du(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(s),u=Math.sin(s);n.addUniform("vec3","u_anisotropy",Ae.FRAGMENT),t.u_anisotropy=function(){return d.fromElements(c,u,r,dje)}}function mje(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:c,clearcoatNormalTexture:u}=e;n.addDefine("USE_CLEARCOAT",void 0,Ae.FRAGMENT),l(r)&&r!==tfe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",Ae.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,Ae.FRAGMENT)),l(s)&&!o&&du(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),l(a)&&r!==tfe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",Ae.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,Ae.FRAGMENT)),l(c)&&!o&&du(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(u)&&!o&&du(n,t,u,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function pje(e,t,n,i,o){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,Ae.FRAGMENT);let r=e.baseColorTexture;l(r)&&!o&&du(n,t,r,"u_baseColorTexture","BASE_COLOR",i);let s=e.baseColorFactor;l(s)&&!se.equals(s,jj.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",Ae.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,Ae.FRAGMENT));let a=e.metallicRoughnessTexture;l(a)&&!o&&du(n,t,a,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let c=e.metallicFactor;l(c)&&c!==jj.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",Ae.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,Ae.FRAGMENT));let u=e.roughnessFactor;l(u)&&u!==jj.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",Ae.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,Ae.FRAGMENT))}var TN=nfe;var vl={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"};vl.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(vl.METADATA_PICKING_VALUE_TYPE,"float",Ae.FRAGMENT),i.addDefine(vl.METADATA_PICKING_VALUE_STRING,"0.0",Ae.FRAGMENT),i.addDefine(vl.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",Ae.FRAGMENT),i.addDefine(vl.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",Ae.FRAGMENT),i.addDefine(vl.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",Ae.FRAGMENT),i.addDefine(vl.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",Ae.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",Ae.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${vl.METADATA_PICKING_VALUE_TYPE} value = ${vl.METADATA_PICKING_VALUE_TYPE}(${vl.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${vl.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${vl.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${vl.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${vl.METADATA_PICKING_VALUE_COMPONENT_W};`],Ae.FRAGMENT)};var tf=vl;var SN=`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 pc={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)"};pc.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,Ae.VERTEX),Eje(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 h=c[f],p=h.semantic;p!==rt.POSITION&&p!==rt.NORMAL&&p!==rt.TANGENT||(gje(e,h,e.attributeIndex,a),e.attributeIndex++)}}Ije(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,Ae.VERTEX),n.addVertexLines(SN);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=St(s,e.uniformMap)};var Aje={attributeString:void 0,functionId:void 0};function gje(e,t,n,i){let o=e.shaderBuilder;_je(e,t,n);let r=yje(t,Aje);Cje(o,r,i)}function _je(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Ht.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function yje(e,t){switch(e.semantic){case rt.POSITION:t.attributeString="Position",t.functionId=pc.FUNCTION_ID_GET_MORPHED_POSITION;break;case rt.NORMAL:t.attributeString="Normal",t.functionId=pc.FUNCTION_ID_GET_MORPHED_NORMAL;break;case rt.TANGENT:t.attributeString="Tangent",t.functionId=pc.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function Cje(e,t,n){let i=t.attributeString,o=`a_target${i}_${n}`,r=`morphed${i} += u_morphWeights[${n}] * a_target${i}_${n};`;e.addAttribute("vec3",o),e.addFunctionLines(t.functionId,[r])}function Eje(e){e.addFunction(pc.FUNCTION_ID_GET_MORPHED_POSITION,pc.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,Ae.VERTEX),e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(pc.FUNCTION_ID_GET_MORPHED_NORMAL,pc.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,Ae.VERTEX),e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(pc.FUNCTION_ID_GET_MORPHED_TANGENT,pc.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,Ae.VERTEX),e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function Ije(e){e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(pc.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var wN=pc;var ofe={name:"PickingPipelineStage"};ofe.process=function(e,t,n){let i=n.context,o=e.runtimeNode,r=e.shaderBuilder,s=e.model,a=o.node.instances;if(e.hasPropertyTable)xje(e,t,a,i);else if(l(a))bje(e,i);else{let c=rfe(e),u=i.createPickId(c);s._pipelineResources.push(u),s._pickIds.push(u),r.addUniform("vec4","czm_pickColor",Ae.FRAGMENT);let f=e.uniformMap;f.czm_pickColor=function(){return u.color},e.pickId="czm_pickColor"}};function rfe(e,t){let n=e.model;if(l(n.pickObject))return n.pickObject;let i={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},o;if(wr.is3DTiles(n.type)){let r=n.content;o={content:r,primitive:r.tileset,detail:i}}else o={primitive:n,detail:i};return o.id=n.id,l(t)&&(o.instanceId=t),o}function xje(e,t,n){let i=e.model,o,r,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;l(i.featureTableId)?o=i.featureTableId:l(n)?(r=vt.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=vt.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);let c=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",Ae.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))"}function bje(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,s=r._pipelineResources;for(let h=0;h<n;h++){let p=rfe(e,h),g=t.createPickId(p);s.push(g),i[h]=g;let m=g.color;o[h*4+0]=G.floatToByte(m.red),o[h*4+1]=G.floatToByte(m.green),o[h*4+2]=G.floatToByte(m.blue),o[h*4+3]=G.floatToByte(m.alpha)}r._pickIds=i;let a=Ct.createVertexBuffer({context:t,typedArray:o,usage:Ue.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);let u={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:q.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(u);let f=e.shaderBuilder;f.addDefine("USE_PICKING",void 0,Ae.BOTH),f.addAttribute("vec4","a_pickColor"),f.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var BN=ofe;var Tje={ADD:0,REPLACE:1},nr=Object.freeze(Tje);var DN=`float getPointSizeFromAttenuation(vec3 positionEC) { // Variables are packed into a single vector to minimize gl.uniformXXX() calls 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) // This needs to be computed in eye coordinates so we can't use attributes.normalMC return step(-v_normalEC.z, 0.0); #else return 1.0; #endif } #endif `;var Sje=new se,afe={name:"PointCloudStylingPipelineStage"};afe.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=o.style,s=o.structuralMetadata,a=l(s)?s.propertyAttributes:void 0,c=l(o.featureTableId)&&o.featureTables[o.featureTableId].featuresLength>0,u=!l(a)&&c;if(l(r)&&!u){let _=vje(a),y=Pje(r,_);Rje(i,y);let E=Mje(y).indexOf("normalMC")>=0,I=vt.getAttributeBySemantic(t,rt.NORMAL);if(E&&!I)throw new ce("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,Ae.VERTEX),y.styleTranslucent&&(e.alphaOptions.pass=Be.TRANSLUCENT)}let f=o.pointCloudShading;f.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,Ae.VERTEX),f.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,Ae.VERTEX);let h,p,g;wr.is3DTiles(o.type)&&(p=!0,h=o.content,g=h.tile.refine===nr.ADD),i.addUniform("vec4","model_pointCloudParameters",Ae.VERTEX),i.addVertexLines(DN);let m=e.uniformMap;m.model_pointCloudParameters=function(){let _=Sje,y=1;p&&(y=g?5:h.tileset.memoryAdjustedScreenSpaceError),_.x=f.maximumAttenuation??y,_.x*=n.pixelRatio;let C=wje(e,t,f,h);_.y=C*f.geometricErrorScale;let E=n.context,I=n.camera.frustum,b;return n.mode===oe.SCENE2D||I instanceof mn?b=Number.POSITIVE_INFINITY:b=E.drawingBufferHeight/n.camera.frustum.sseDenominator,_.z=b,p&&(_.w=h.tileset.timeSinceLoad),_}};var sfe=new d;function wje(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 o=vt.getAttributeBySemantic(t,rt.POSITION),r=o.count,s=e.runtimeNode.transform,a=d.subtract(o.max,o.min,sfe);a=M.multiplyByPointAsVector(s,a,sfe);let c=a.x*a.y*a.z;return D.cbrt(c/r)}var Bje={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},Dje={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function vje(e){let t=je(Dje);if(!l(e))return t;for(let n=0;n<e.length;n++){let o=e[n].properties;for(let r in o)o.hasOwnProperty(r)&&(t[r]=`metadata.${r}`)}return t}var qj="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function Pje(e,t){let n=Bje,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${qj})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${qj})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${qj})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function Rje(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,Ae.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,Ae.BOTH),e.addVertexLines(i),e.addVarying("float","v_pointCloudShow"));let o=t.pointSizeStyleFunction;l(o)&&(e.addDefine("HAS_POINT_CLOUD_POINT_SIZE_STYLE",void 0,Ae.VERTEX),e.addVertexLines(o))}function Kj(e,t){let n=/attributes\.(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function Mje(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return l(t)&&Kj(t,o),l(n)&&Kj(n,o),l(i)&&Kj(i,o),o}var vN=afe;var PN=`void primitiveOutlineStage() { v_outlineCoordinates = a_outlineCoordinates; } `;var RN=`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 cfe={name:"PrimitiveOutlinePipelineStage"};cfe.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,Ae.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Ht.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",Ae.FRAGMENT);let a=r0.createTexture(n.context);o.model_outlineTexture=function(){return a};let c=e.model;i.addUniform("vec4","model_outlineColor",Ae.FRAGMENT),o.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",Ae.FRAGMENT),o.model_showOutline=function(){return c.showOutline},i.addVertexLines(PN),i.addFragmentLines(RN)};var MN=cfe;var lfe={name:"PrimitiveStatisticsPipelineStage",_countGeometry:ufe,_count2DPositions:ffe,_countMorphTargetAttributes:dfe,_countMaterialTextures:hfe,_countFeatureIdTextures:mfe,_countBinaryMetadata:pfe};lfe.process=function(e,t,n){let i=e.model,o=i.statistics;ufe(o,t),ffe(o,e.runtimePrimitive),dfe(o,t),hfe(o,t.material),mfe(o,t.featureIds),pfe(o,i)};function ufe(e,t){let n=l(t.indices)?t.indices.count:vt.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===Ne.POINTS?e.pointsLength+=n:Ne.isTriangles(i)&&(e.trianglesLength+=Nje(i,n));let o=t.attributes,r=o.length;for(let c=0;c<r;c++){let u=o[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 Nje(e,t){switch(e){case Ne.TRIANGLES:return t/3;case Ne.TRIANGLE_STRIP:case Ne.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function ffe(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function dfe(e,t){let n=t.morphTargets;if(!l(n))return;let i=!1,o=n.length;for(let r=0;r<o;r++){let s=n[r].attributes,a=s.length;for(let c=0;c<a;c++){let u=s[c];l(u.buffer)&&e.addBuffer(u.buffer,i)}}}function hfe(e,t){let n=Lje(t),i=n.length;for(let o=0;o<i;o++){let r=n[o];l(r)&&l(r.texture)&&e.addTexture(r.texture)}}function Lje(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 mfe(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof bn.FeatureIdTexture){let r=o.textureReader;l(r.texture)&&e.addTexture(r.texture)}}}function pfe(e,t){let n=t.structuralMetadata;l(n)&&(Oje(e,n),e.propertyTablesByteLength+=n.propertyTablesByteLength);let i=t.featureTables;if(!l(i))return;let o=i.length;for(let r=0;r<o;r++){let s=i[r];e.addBatchTexture(s.batchTexture)}}function Oje(e,t){let n=t.propertyTextures;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let s=n[o].properties;for(let a in s)if(s.hasOwnProperty(a)){let u=s[a].textureReader;l(u.texture)&&e.addTexture(u.texture)}}}var NN=lfe;var Fje=new M,Qje=new M,Afe={name:"SceneMode2DPipelineStage"};Afe.process=function(e,t,n){let i=vt.getAttributeBySemantic(t,rt.POSITION),o=e.shaderBuilder,r=e.model,s=r.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,c=M.multiplyTransformation(s,a,Fje),u=Gje(e,c,n),f=e.runtimePrimitive;f.boundingSphere2D=u;let h=e.runtimeNode.node.instances;if(l(h))return;if(l(i.typedArray)){let _=Hje(i,c,u,n);f.positionBuffer2D=_,r._modelResources.push(_),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,Ae.VERTEX),o.addUniform("mat4","u_modelView2D",Ae.VERTEX);let p=M.fromTranslation(u.center,new M),g=n.context,m={u_modelView2D:function(){return M.multiplyTransformation(g.uniformState.view,p,Qje)}};e.uniformMap=St(m,e.uniformMap)};var kje=new d,Uje=new d;function Gje(e,t,n){let i=M.multiplyByPoint(t,e.positionMin,kje),o=Ji.computeActualEllipsoidPosition(n,i,i),r=M.multiplyByPoint(t,e.positionMax,Uje),s=Ji.computeActualEllipsoidPosition(n,r,r);return le.fromCornerPoints(o,s,new le)}var gfe=new d;function zje(e,t){let n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){let a=d.fromArray(e,s,gfe),c=d.multiplyComponents(a,r,a),u=d.add(c,o,c);i[s]=u.x,i[s+1]=u.y,i[s+2]=u.z}return i}function Vje(e,t,n,i){let o;l(e.quantization)?o=zje(e.typedArray,e.quantization):o=e.typedArray.slice();let r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=o.length,a=l(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let c=r;c<s;c+=a){let u=d.fromArray(o,c,gfe);if(isNaN(u.x)||isNaN(u.y)||isNaN(u.z))continue;let f=M.multiplyByPoint(t,u,u),h=Ji.computeActualEllipsoidPosition(i,f,f),p=d.subtract(h,n,h);o[c]=p.x,o[c+1]=p.y,o[c+2]=p.z}return o}function Hje(e,t,n,i){let o=je(i);o.mode=oe.COLUMBUS_VIEW;let r=n.center,s=Vje(e,t,r,o),a=Ct.createVertexBuffer({context:i.context,typedArray:s,usage:Ue.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var LN=Afe;var ON=`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 m0={name:"SkinningPipelineStage",FUNCTION_ID_GET_SKINNING_MATRIX:"getSkinningMatrix",FUNCTION_SIGNATURE_GET_SKINNING_MATRIX:"mat4 getSkinningMatrix()"};m0.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_SKINNING",void 0,Ae.VERTEX),jje(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,Ae.VERTEX),n.addVertexLines(ON);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=St(r,e.uniformMap)};function Wje(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===rt.JOINTS||r.semantic===rt.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function jje(e,t){e.addFunction(m0.FUNCTION_ID_GET_SKINNING_MATRIX,m0.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,Ae.VERTEX),e.addFunctionLines(m0.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],s=Wje(t);for(i=0;i<=s;i++)for(o=0;o<=3;o++){let c=r[o],u=`skinnedMatrix += a_weights_${i}.${c} * u_jointMatrices[int(a_joints_${i}.${c})];`;e.addFunctionLines(m0.FUNCTION_ID_GET_SKINNING_MATRIX,[u])}e.addFunctionLines(m0.FUNCTION_ID_GET_SKINNING_MATRIX,["return skinnedMatrix;"])}var FN=m0;var QN=`void verticalExaggerationStage( inout ProcessedAttributes attributes ) { // Compute the distance from the camera to the local center of curvature. vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0); vec2 vertexAzimuth = normalize(vertexPositionENU.xy); // Curvature = 1 / radius of curvature. float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature); float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight; // Compute the approximate ellipsoid normal at the vertex position. // Uses a circular approximation for the Earth curvature along the geodesic. vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz; vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC; vec3 vertexNormal = normalize(centerToVertex); // Estimate the (sine of the) angle between the camera direction and the vertex normal 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; // Approximate the change in height above the ellipsoid, from camera to vertex position. float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal); float smallAngleVersine = 0.5 * sinTheta * sinTheta; float versine = isSmallAngle ? smallAngleVersine : exactVersine; float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine; float vertexHeight = czm_eyeHeight + dHeight; // Transform the approximate vertex normal to model coordinates. vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz; vertexNormalMC = normalize(vertexNormalMC); // Compute the exaggeration and apply it along the approximate vertex normal. float stretch = u_verticalExaggerationAndRelativeHeight.x; float shift = u_verticalExaggerationAndRelativeHeight.y; float exaggeration = (vertexHeight - shift) * (stretch - 1.0); attributes.positionMC += exaggeration * vertexNormalMC; } `;var _fe={name:"VerticalExaggerationPipelineStage"},Yje=new U;_fe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(QN),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,Ae.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",Ae.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return U.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,Yje)}};var kN=_fe;var Xj={};function qje(e){let t=Qe.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function Kje(e,t){let n=t.length,i=Qe.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let s=t[r],a=t[r+1],c=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=c,i[o++]=c,i[o++]=s}return i}function Xje(e){let t=e-2,n=2+t*4,i=Qe.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function Jje(e,t){let i=t.length-2,o=2+i*4,r=Qe.createTypedArray(e,o),s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){let c=t[a],u=t[a+1],f=t[a+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=c}return r}function Zje(e){let t=e-2,n=2+t*4,i=Qe.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function $je(e,t){let i=t.length-2,o=2+i*4,r=Qe.createTypedArray(e,o),s=0,a=t[0];r[s++]=a,r[s++]=t[1];for(let c=0;c<i;c++){let u=t[c+1],f=t[c+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=a}return r}Xj.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Ne.TRIANGLES)return i?Kje(t,n):qje(t);if(e===Ne.TRIANGLE_STRIP)return i?Jje(t,n):Xje(t);if(e===Ne.TRIANGLE_FAN)return i?$je(t,n):Zje(t)};Xj.getWireframeIndicesCount=function(e,t){return e===Ne.TRIANGLES?t*2:e===Ne.TRIANGLE_STRIP||e===Ne.TRIANGLE_FAN?2+(t-2)*4:t};var hT=Xj;var yfe={name:"WireframePipelineStage"};yfe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,Ae.FRAGMENT);let o=e.model,r=eYe(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);let a=e.primitiveType,c=e.count;e.primitiveType=Ne.LINES,e.count=hT.getWireframeIndicesCount(a,c)};function eYe(e,t,n){let o=vt.getAttributeBySemantic(e,rt.POSITION).count,r=n.context.webgl2,s;if(l(t)){let f=t.buffer,h=t.count;l(f)&&r?(s=f.sizeInBytes===h?new Uint8Array(h):Qe.createTypedArray(o,h),f.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,c=hT.createWireframeIndices(a,o,s),u=Qe.fromSizeInBytes(c.BYTES_PER_ELEMENT);return Ct.createIndexBuffer({context:n.context,typedArray:c,usage:Ue.STATIC_DRAW,indexDatatype:u})}var UN=yfe;function Cfe(e){e=e??V.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=[]}Cfe.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,o=this.model,r=o.customShader,s=o.style,a=e.context.webgl2,u=e.mode!==oe.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,f=e.verticalExaggeration!==1&&o.hasVerticalExaggeration,h=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),g=l(o.imageryLayers),m=l(r),y=!(m&&l(r.fragmentShaderText))||r.mode!==KA.REPLACE_MATERIAL,C=vt.hasQuantizedAttributes(n.attributes),E=o.debugWireframe&&Ne.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),I=o.pointCloudShading,b=l(I)&&I.attenuation,S=l(I)&&I.backFaceCulling,B=n.primitiveType===Ne.POINTS&&(l(s)||b||S),v=o._enableShowOutline&&l(n.outlineCoordinates),P=tYe(o,i,n),N=l(o.classificationType);u&&t.push(LN),t.push(nN),E&&t.push(UN),N&&t.push(U1),h&&t.push(wN),p&&t.push(FN),B&&t.push(vN),C&&t.push(Z1),g&&(v?yt("outlines-and-draping","Primitive outlines disable imagery draping"):t.push(EN)),y&&t.push(TN),t.push(uy),t.push(ud),t.push(tf),P.hasPropertyTable&&(t.push(dy),t.push(k1),t.push(V1)),f&&t.push(kN),m&&t.push(X1),t.push(xN),o.allowPicking&&t.push(BN),v&&t.push(MN),t.push(Q1),t.push(NN)};function tYe(e,t,n){let i;return l(t.instances)&&(i=vt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=vt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var GN=Cfe;function Jj(e){e=e??V.EMPTY_OBJECT,this._sceneGraph=e.sceneGraph;let t=e.skin;this._skin=t,this._inverseBindMatrices=void 0,this._joints=[],this._jointMatrices=[],nYe(this)}Object.defineProperties(Jj.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 nYe(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c<o;c++){let u=i[c].index,f=r[u];s.push(f);let h=n[c],p=Efe(f,h,new M);a.push(p)}}function Efe(e,t,n){let i=M.multiplyTransformation(e.transformToRoot,e.transform,n);return n=M.multiplyTransformation(i,t,n),n}Jj.prototype.updateJointMatrices=function(){let e=this._jointMatrices,t=e.length;for(let n=0;n<t;n++){let i=this.joints[n],o=this.inverseBindMatrices[n];e[n]=Efe(i,o,e[n])}};var zN=Jj;function iYe(){this.pass=void 0,this.alphaCutoff=void 0}var p0=iYe;function oYe(e){this.shaderBuilder=new cA,this.model=e,this.uniformMap={},this.alphaOptions=new p0,this.renderStateOptions=Ge.getState(Ge.fromCache({depthTest:{enabled:!0,func:Na.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var VN=oYe;var HN=`void silhouetteStage(inout vec4 color) { if(model_silhouettePass) { color = czm_gammaCorrect(model_silhouetteColor); } }`;var WN=`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 jz={name:"ModelSilhouettePipelineStage"};jz.silhouettesLength=0;jz.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++jz.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,Ae.BOTH),i.addVertexLines(WN),i.addFragmentLines(HN),i.addUniform("vec4","model_silhouetteColor",Ae.FRAGMENT),i.addUniform("float","model_silhouetteSize",Ae.VERTEX),i.addUniform("bool","model_silhouettePass",Ae.BOTH);let o={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=St(o,e.uniformMap),e.hasSilhouette=!0};var jN=jz;var YN=`void modelSplitterStage() { // Don't split when rendering the shadow map, because it is rendered from // the perspective of a totally different camera. #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 Yz={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};Yz.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,Ae.FRAGMENT),i.addFragmentLines(YN);let o={};i.addUniform("float",Yz.SPLIT_DIRECTION_UNIFORM_NAME,Ae.FRAGMENT),o[Yz.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=St(o,e.uniformMap)};var qN=Yz;function rYe(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 KN=rYe;function sYe(e){e=e??V.EMPTY_OBJECT,this.lightingModel=e.lightingModel??ip.UNLIT}var XN=sYe;function aYe(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.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;let n=t.primitive;this.count=l(n.indices)?n.indices.count:vt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=vt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=d.clone(i.min,new d),this.positionMax=d.clone(i.max,new d),this.boundingSphere=le.fromCornerPoints(this.positionMin,this.positionMax,new le),this.lightingOptions=new XN,this.pickId=void 0}var JN=aYe;function $j(e){e=e??V.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 o=i.classificationType;this._classificationType=o,this._classifiesTerrain=o!==Xn.CESIUM_3D_TILE,this._classifies3DTiles=o!==Xn.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],fYe(this)}function cYe(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:_t.KEEP,zFail:_t.DECREMENT_WRAP,zPass:_t.KEEP},backFunction:e,backOperation:{fail:_t.KEEP,zFail:_t.INCREMENT_WRAP,zPass:_t.KEEP},reference:Xt.CESIUM_3D_TILE_MASK,mask:Xt.CESIUM_3D_TILE_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:Na.LESS_OR_EQUAL},depthMask:!1}}var lYe={stencilTest:{enabled:!0,frontFunction:Jn.NOT_EQUAL,frontOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},backFunction:Jn.NOT_EQUAL,backOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},reference:0,mask:Xt.CLASSIFICATION_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:An.PRE_MULTIPLIED_ALPHA_BLEND},uYe={stencilTest:{enabled:!0,frontFunction:Jn.NOT_EQUAL,frontOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},backFunction:Jn.NOT_EQUAL,backOperation:{fail:_t.ZERO,zFail:_t.ZERO,zPass:_t.ZERO},reference:0,mask:Xt.CLASSIFICATION_MASK},stencilMask:Xt.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},bfe=[];function fYe(e){let t=e._command,n=bfe;if(e._useDebugWireframe){t.pass=Be.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=ZN(e,n,e._commandListDebugWireframe);let r=e._commandListDebugWireframe,s=r.length;for(let a=0;a<s;a++){let c=r[a];c.count*=2,c.offset*=2}return}let o=e.model.allowPicking;if(e._classifiesTerrain){let r=Be.TERRAIN_CLASSIFICATION,s=Zj(t,r),a=Ife(t,r);n.length=0,n.push(s,a),e._commandListTerrain=ZN(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=xfe(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=Be.CESIUM_3D_TILE_CLASSIFICATION,s=Zj(t,r),a=Ife(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=ZN(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=xfe(e,n,e._commandList3DTilesPicking))}}function ZN(e,t,n){let i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,s=o.length,a=t.length;for(let c=0;c<s;c++){let u=o[c],f=r[c];for(let h=0;h<a;h++){let p=t[h],g=nt.shallowClone(p);g.count=u,g.offset=f,n.push(g)}}return n}function Zj(e,t){let n=nt.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Be.TERRAIN_CLASSIFICATION?Jn.ALWAYS:Jn.EQUAL,o=cYe(i);return n.renderState=Ge.fromCache(o),n}function Ife(e,t){let n=nt.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=Ge.fromCache(lYe),n}var dYe=[];function xfe(e,t,n){let i=Ge.fromCache(uYe),o=t[0],r=t[1],s=nt.shallowClone(o);s.cull=!0,s.pickOnly=!0;let a=nt.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let c=dYe;return c.length=0,c.push(s,a),ZN(e,c,n)}Object.defineProperties($j.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=M.clone(e,this._modelMatrix);let t=this._runtimePrimitive.boundingSphere;this._boundingVolume=le.transform(t,this._modelMatrix,this._boundingVolume)}},boundingVolume:{get:function(){return this._boundingVolume}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace=e}}});$j.prototype.pushCommands=function(e,t){let n=e.passes;if(n.render){if(this._useDebugWireframe){t.push.apply(t,this._commandListDebugWireframe);return}if(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrain),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTiles),e.invertClassification&&this._classifies3DTiles){if(this._commandListIgnoreShow.length===0){let o=Be.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,r=Zj(this._command,o),s=bfe;s.length=0,s.push(r),this._commandListIgnoreShow=ZN(this,s,this._commandListIgnoreShow)}t.push.apply(t,this._commandListIgnoreShow)}}return n.pick&&(this._classifiesTerrain&&t.push.apply(t,this._commandListTerrainPicking),this._classifies3DTiles&&t.push.apply(t,this._commandList3DTilesPicking)),t};var $N=$j;function qz(e){e=e??V.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._model=i;let o=n.runtimePrimitive;this._runtimePrimitive=o;let r=t.pass===Be.TRANSLUCENT,a=!o.primitive.material.doubleSided&&!r,c=n.hasSilhouette,u=!r&&!c,f=n.hasSkipLevelOfDetail&&!r,h=c;this._command=t,this._modelMatrix=M.clone(t.modelMatrix),this._boundingVolume=le.clone(t.boundingVolume),this._modelMatrix2D=new M,this._boundingVolume2D=new le,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=h,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._derivedCommands=[],this._has2DCommands=!1,hYe(this)}function eg(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}eg.clone=function(e){return new eg({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function hYe(e){let t=e._command;t.modelMatrix=e._modelMatrix,t.boundingVolume=e._boundingVolume;let n=e._model,i=e._usesBackFaceCulling,o=e._derivedCommands;e._originalCommand=new eg({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new eg({command:CYe(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new eg({command:SYe(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new eg({command:wYe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new eg({command:EYe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new eg({command:IYe(t,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._silhouetteModelCommand),o.push(e._silhouetteColorCommand))}Object.defineProperties(qz.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=M.clone(e,this._modelMatrix),this._modelMatrix2DDirty=!0,this._boundingVolume=le.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,pYe(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,AYe(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,gYe(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,_Ye(this))}}});function mYe(e,t){let n=e._modelMatrix;e._modelMatrix2D=M.clone(n,e._modelMatrix2D),e._modelMatrix2D[13]-=D.sign(n[13])*2*D.PI*t.mapProjection.ellipsoid.maximumRadius,e._boundingVolume2D=le.transform(e.runtimePrimitive.boundingSphere,e._modelMatrix2D,e._boundingVolume2D)}function pYe(e){let t=e.shadows,n=Bn.castShadows(t),i=Bn.receiveShadows(t),o=e._derivedCommands;for(let r=0;r<o.length;++r){let s=o[r];if(s.updateShadows){let a=s.command;a.castShadows=n,a.receiveShadows=i}}}function AYe(e){let t=e.backFaceCulling,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateBackFaceCulling){let r=o.command,s=je(r.renderState,!0);s.cull.enabled=t,r.renderState=Ge.fromCache(s)}}}function gYe(e){let t=e.cullFace,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateCullFace){let r=o.command,s=je(r.renderState,!0);s.cull.face=t,r.renderState=Ge.fromCache(s)}}}function _Ye(e){let t=e.debugShowBoundingVolume,n=e._derivedCommands;for(let i=0;i<n.length;++i){let o=n[i];if(o.updateDebugShowBoundingVolume){let r=o.command;r.debugShowBoundingVolume=t}}}qz.prototype.pushCommands=function(e,t){let n=Tfe(this,e);n&&!this._has2DCommands&&(yYe(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(mYe(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==Lh.ALL_OPAQUE&&pT(t,this._translucentCommand,n),i===Lh.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||pT(o._backfaceCommands,this._skipLodBackfaceCommand,n),xYe(this,r,n),pT(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){pT(t,this._silhouetteModelCommand,n);return}return pT(t,this._originalCommand,n),t}};qz.prototype.pushSilhouetteCommands=function(e,t){let n=Tfe(this,e);return pT(t,this._silhouetteColorCommand,n),t};function pT(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function Tfe(e,t){if(t.mode!==oe.SCENE2D||e.model._projectTo2D)return!1;let i=e.model.sceneGraph._boundingSphere2D,o=i.center.y-i.radius,r=i.center.y+i.radius,s=t.mapProjection.ellipsoid.maximumRadius*D.PI;return o<s&&r>s||o<-s&&r>-s}function mT(e,t){if(!l(t))return;let n=eg.clone(t),i=nt.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 yYe(e){mT(e,e._originalCommand),mT(e,e._translucentCommand),mT(e,e._skipLodBackfaceCommand),mT(e,e._skipLodStencilCommand),mT(e,e._silhouetteModelCommand),mT(e,e._silhouetteColorCommand)}function CYe(e){let t=nt.shallowClone(e);t.pass=Be.TRANSLUCENT;let n=je(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=An.ALPHA_BLEND,t.renderState=Ge.fromCache(n),t}function EYe(e,t){let n=t._silhouetteId%255,i=nt.shallowClone(e),o=je(e.renderState,!0);return o.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()&&(o.colorMask={red:!1,green:!1,blue:!1,alpha:!1}),i.renderState=Ge.fromCache(o),i}function IYe(e,t){let n=t._silhouetteId%255,i=nt.shallowClone(e),o=je(e.renderState,!0);o.cull.enabled=!1,(e.pass===Be.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Be.TRANSLUCENT,o.depthMask=!1,o.blending=An.ALPHA_BLEND),o.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(o),i.uniformMap=s,i.castShadows=!1,i.receiveShadows=!1,i}function xYe(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=bYe(o);if(r!==s){let a=TYe(r),c=je(o.renderState,!0);c.stencilTest.reference=a,o.renderState=Ge.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function bYe(e){return(e.renderState.stencilTest.reference&Xt.SKIP_LOD_MASK)>>>Xt.SKIP_LOD_BIT_SHIFT}function TYe(e){return Xt.CESIUM_3D_TILE_MASK|e<<Xt.SKIP_LOD_BIT_SHIFT}function SYe(e){let t=nt.shallowClone(e),n=je(e.renderState,!0);n.cull.enabled=!0,n.cull.face=Pi.FRONT,n.colorMask={red:!1,green:!1,blue:!1,alpha:!1},n.polygonOffset={enabled:!0,factor:5,units:5};let i=je(t.uniformMap),o=new U(5,5);return i.u_polygonOffset=function(){return o},t.renderState=Ge.fromCache(n),t.uniformMap=i,t.castShadows=!1,t.receiveShadows=!1,t}function wYe(e){let t=nt.shallowClone(e),n=je(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Xt.SKIP_LOD_MASK,i.reference=Xt.CESIUM_3D_TILE_MASK,i.frontFunction=Jn.GREATER_OR_EQUAL,i.frontOperation.zPass=_t.REPLACE,i.backFunction=Jn.GREATER_OR_EQUAL,i.backOperation.zPass=_t.REPLACE,n.stencilMask=Xt.CESIUM_3D_TILE_MASK|Xt.SKIP_LOD_MASK,t.renderState=Ge.fromCache(n),t}var eL=qz;var tL=`precision highp float; czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) { czm_modelVertexOutput vsOutput; vsOutput.positionMC = positionMC; vsOutput.pointSize = 1.0; return vsOutput; } void main() { // Initialize the attributes struct with all // attributes except quantized ones. ProcessedAttributes attributes; initializeAttributes(attributes); #ifdef HAS_IMAGERY initializeImageryAttributes(); #endif // Dequantize the quantized ones and add them to the // attributes struct. #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 // Compute the bitangent according to the formula in the glTF spec. // Normal and tangents can be affected by morphing and skinning, so // the bitangent should not be computed until their values are finalized. #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); // Handle any show properties that come from the style. cpuStylingStage(attributes.positionMC, feature); #endif #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING) // The scene mode 2D pipeline stage and instancing stage add a different // model view matrix to accurately project the model to 2D. However, the // output positions and normals should be transformed by the 3D matrices // to keep the data the same for the fragment shader. mat4 modelView = czm_modelView3D; mat3 normal = czm_normal3D; #else // These are used for individual model projection because they will // automatically change based on the scene mode. mat4 modelView = czm_modelView; mat3 normal = czm_normal; #endif // Update the position for this instance in place #ifdef HAS_INSTANCING // The legacy instance stage is used when rendering i3dm models that // encode instances transforms in world space, as opposed to glTF models // that use EXT_mesh_gpu_instancing, where instance transforms are encoded // in object space. #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(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 // Compute the final position in each coordinate system needed. // This returns the value that will be assigned to gl_Position. vec4 positionClip = geometryStage(attributes, modelView, normal); // This must go after the geometry stage as it needs v_positionWC #ifdef HAS_ATMOSPHERE atmosphereStage(attributes); #endif #ifdef ENABLE_CLIPPING_POLYGONS modelClippingPolygonsStage(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); #else gl_PointSize = 1.0; #endif gl_PointSize *= show; #endif // Important NOT to compute gl_Position = show * positionClip or we hit: // https://github.com/CesiumGS/cesium/issues/11270 // // We will discard points with v_pointCloudShow == 0 in the fragment shader. gl_Position = positionClip; #ifdef HAS_POINT_CLOUD_SHOW_STYLE v_pointCloudShow = show; #endif } `;var nL=` precision highp float; 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); } SelectedFeature selectedFeature; void main() { #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); Metadata metadata; MetadataClass metadataClass; MetadataStatistics metadataStatistics; metadataStage(metadata, metadataClass, metadataStatistics, attributes); //======================================================================== // When not picking metadata START #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); // When not picking metadata END //======================================================================== #else //======================================================================== // When picking metadata START vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0); metadataPickingStage(metadata, metadataClass, metadataValues); vec4 color = metadataValues; #endif // When picking metadata END //======================================================================== #ifdef HAS_CLIPPING_PLANES modelClippingPlanesStage(color); #endif #ifdef ENABLE_CLIPPING_POLYGONS modelClippingPolygonsStage(); #endif //======================================================================== // When not picking metadata START #ifndef METADATA_PICKING_ENABLED #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS) silhouetteStage(color); #endif #ifdef HAS_ATMOSPHERE atmosphereStage(color, attributes); #endif #endif // When not picking metadata END //======================================================================== out_FragColor = color; } `;function Sfe(){}Sfe.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=BYe(e,n,t),o=DYe(e,i,t),r=e.model;return l(r.classificationType)?new $N({primitiveRenderResources:e,command:o}):new eL({primitiveRenderResources:e,command:o})};function BYe(e,t,n){t.addVertexLines(tL),t.addFragmentLines(nL);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function DYe(e,t,n){let i=vYe(e),o=new ri({context:n.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);let s=e.alphaOptions.pass,a=r.sceneGraph,c=n.mode===oe.SCENE3D,u,f;if(!c&&!n.scene3DOnly&&r._projectTo2D)u=M.multiplyTransformation(a._computedModelMatrix,e.runtimeNode.computedTransform,new M),f=e.runtimePrimitive.boundingSphere2D;else{let C=c?a._computedModelMatrix:a._computedModelMatrix2D;u=M.multiplyTransformation(C,e.runtimeNode.computedTransform,new M),f=le.transform(e.boundingSphere,u)}let h=je(Ge.fromCache(e.renderStateOptions),!0);h.cull.face=vt.getCullFace(u,e.primitiveType),h=Ge.fromCache(h);let p=l(r.classificationType),g=p?!1:Bn.castShadows(r.shadows),m=p?!1:Bn.receiveShadows(r.shadows),_=p?void 0:e.pickId;return new nt({boundingVolume:f,modelMatrix:u,uniformMap:e.uniformMap,renderState:h,vertexArray:o,shaderProgram:t,cull:r.cull,pass:s,count:e.count,owner:r,pickId:_,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:g,receiveShadows:m})}function vYe(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var iL=Sfe;function zc(e){e=e??V.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._boundingSphere2D=void 0,this._computedModelMatrix=M.clone(M.IDENTITY),this._computedModelMatrix2D=M.clone(M.IDENTITY),this._axisCorrectionMatrix=vt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new M),this._runtimeArticulations={},PYe(this)}Object.defineProperties(zc.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 PYe(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;wfe(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let E=0;E<s;E++){let I=r[E],b=new I1({articulation:I,sceneGraph:e}),S=b.name;a[S]=b}let c=t.nodes,u=c.length;e._runtimeNodes=new Array(u);let h=n.nodes.length,p=M.IDENTITY;for(let E=0;E<h;E++){let I=n.nodes[E],b=Bfe(e,I,p);e._rootNodes.push(b)}let g=t.skins,m=e._runtimeSkins,_=g.length;for(let E=0;E<_;E++){let I=g[E];m.push(new zN({skin:I,sceneGraph:e}))}let y=e._skinnedNodes,C=y.length;for(let E=0;E<C;E++){let I=y[E],b=e._runtimeNodes[I],B=c[I].skin.index;b._runtimeSkin=m[B],b.updateJointMatrices()}e.applyArticulations()}function wfe(e,t){let n=e._components,i=e._model;e._computedModelMatrix=M.multiplyTransformation(t,n.transform,e._computedModelMatrix),e._computedModelMatrix=M.multiplyTransformation(e._computedModelMatrix,e._axisCorrectionMatrix,e._computedModelMatrix),e._computedModelMatrix=M.multiplyByUniformScale(e._computedModelMatrix,i.computedScale,e._computedModelMatrix)}var RYe=new d;function MYe(e,t){let n=e._computedModelMatrix,i=M.getTranslation(n,RYe);if(!d.equals(i,d.ZERO))e._computedModelMatrix2D=Qt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=Qt.ellipsoidTo2DModelMatrix(t.mapProjection,o,e._computedModelMatrix2D);e._computedModelMatrix2D=M.multiply(r,n,e._computedModelMatrix2D)}e._boundingSphere2D=le.transform(e._boundingSphere,e._computedModelMatrix2D,e._boundingSphere2D)}function Bfe(e,t,n){let i=[],o=vt.getNodeTransform(t),r=t.children.length;for(let f=0;f<r;f++){let h=t.children[f],p=M.multiplyTransformation(n,o,new M),g=Bfe(e,h,p);i.push(g)}let s=new F1({node:t,transform:o,transformToRoot:n,children:i,sceneGraph:e}),a=t.primitives.length;for(let f=0;f<a;f++)s.runtimePrimitives.push(new GN({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,h=new D1(f,s);f._nodesByName[u]=h}return c}var NYe=new d,LYe=new d,OYe=new d,FYe=new d;zc.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};zc.prototype.buildRenderResources=function(e){let t=this._model,n=new VN(t);t.statistics.clear(),this.configurePipeline(e);let i=this.modelPipelineStages;for(let o=0;o<i.length;o++)i[o].process(n,t,e);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;r.configurePipeline();let s=r.pipelineStages,a=new KN(n,r);n.nodeRenderResources[o]=a;for(let c=0;c<s.length;c++)s[c].process(a,r.node,e);for(let c=0;c<r.runtimePrimitives.length;c++){let u=r.runtimePrimitives[c];u.configurePipeline(e);let f=u.pipelineStages,h=new JN(a,u);a.primitiveRenderResources[c]=h;for(let p=0;p<f.length;p++)f[p].process(h,u.primitive,e)}}return n};zc.prototype.computeBoundingVolumes=function(e){let t=this._model,n=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,NYe),i=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,LYe);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;let s=e.nodeRenderResources[o],a=r.computedTransform;for(let c=0;c<r.runtimePrimitives.length;c++){let u=r.runtimePrimitives[c],f=s.primitiveRenderResources[c];u.boundingSphere=le.clone(f.boundingSphere,new le);let h=M.multiplyByPoint(a,f.positionMin,OYe),p=M.multiplyByPoint(a,f.positionMax,FYe);d.minimumByComponent(n,h,n),d.maximumByComponent(i,p,i)}}this._boundingSphere=le.fromCornerPoints(n,i,new le),this._boundingSphere=le.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=le.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=le.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};zc.prototype.createDrawCommands=function(e,t){for(let n=0;n<this._runtimeNodes.length;n++){let i=this._runtimeNodes[n];if(!l(i))continue;let o=e.nodeRenderResources[n];for(let r=0;r<i.runtimePrimitives.length;r++){let s=i.runtimePrimitives[r],a=o.primitiveRenderResources[r],c=iL.buildModelDrawCommand(a,t);s.drawCommand=c}}};zc.prototype.configurePipeline=function(e){let t=this.modelPipelineStages;t.length=0;let n=this._model,i=e.fog.enabled&&e.fog.renderable;l(n.color)&&t.push(ly),!l(n.classificationType)&&(n.imageBasedLighting.enabled&&t.push(C1),n.isClippingEnabled()&&t.push(T1),n.isClippingPolygonsEnabled()&&t.push(B1),n.hasSilhouette(e)&&t.push(jN),l(n.splitDirection)&&n.splitDirection!==Tr.NONE&&t.push(qN),wr.is3DTiles(n.type)&&t.push(p1),i&&t.push(_1))};zc.prototype.update=function(e,t){let n,i,o;for(n=0;n<this._runtimeNodes.length;n++){let r=this._runtimeNodes[n];if(!l(r))continue;for(i=0;i<r.updateStages.length;i++)r.updateStages[i].update(r,this,e);let s=e.mode!==oe.SCENE3D&&this._model._projectTo2D;for(t&&!s&&this.updateJointMatrices(),i=0;i<r.runtimePrimitives.length;i++){let a=r.runtimePrimitives[i];for(o=0;o<a.updateStages.length;o++)a.updateStages[o].update(a,this)}}};zc.prototype.updateModelMatrix=function(e,t){wfe(this,e),t.mode!==oe.SCENE3D&&MYe(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};zc.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 Dfe(e,t,n,i,o){if(n&&!t.show)return;let r=t.children.length;for(let c=0;c<r;c++){let u=t.getChild(c);Dfe(e,u,n,i,o)}let s=t.runtimePrimitives,a=s.length;for(let c=0;c<a;c++){let u=s[c];i(u,o)}}function Kz(e,t,n,i){let o=e._rootNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s],c=e._runtimeNodes[a];Dfe(e,c,t,n,i)}}var QYe={backFaceCulling:void 0};zc.prototype.updateBackFaceCulling=function(e){let t=QYe;t.backFaceCulling=e,Kz(this,!1,kYe,t)};function kYe(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var UYe={shadowMode:void 0};zc.prototype.updateShadows=function(e){let t=UYe;t.shadowMode=e,Kz(this,!1,GYe,t)};function GYe(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var zYe={debugShowBoundingVolume:void 0};zc.prototype.updateShowBoundingVolume=function(e){let t=zYe;t.debugShowBoundingVolume=e,Kz(this,!1,VYe,t)};function VYe(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var vfe=[],HYe={frameState:void 0,hasSilhouette:void 0};zc.prototype.pushDrawCommands=function(e){let t=vfe;t.length=0;let n=HYe;n.hasSilhouette=this._model.hasSilhouette(e),n.frameState=e,Kz(this,!0,WYe,n),e.commandList.push.apply(e.commandList,t)};function WYe(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=vfe,s=e.drawCommand;s.pushCommands(n,n.commandList),i&&!o.pick&&s.pushSilhouetteCommands(n,r)}zc.prototype.setArticulationStage=function(e,t){let n=e.split(" ");if(n.length!==2)return;let i=n[0],o=n[1],r=this._runtimeArticulations[i];l(r)&&r.setArticulationStage(o,t)};zc.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var oL=zc;function py(){this.pointsLength=0,this.trianglesLength=0,this.geometryByteLength=0,this.texturesByteLength=0,this.propertyTablesByteLength=0,this._bufferIdSet={},this._textureIdByteLengths={},this._batchTextureIdMap=new Pt}Object.defineProperties(py.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}}});py.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()};py.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};py.prototype.addTexture=function(e){this._textureIdByteLengths.hasOwnProperty(e._id)||(this.texturesByteLength+=e.sizeInBytes,this._textureIdByteLengths[e._id]=e.sizeInBytes)};py.prototype.getTextureIds=function(){return Object.keys(this._textureIdByteLengths)};py.prototype.getTextureByteLengthById=function(e){return this._textureIdByteLengths[e]};py.prototype.addBatchTexture=function(e){this._batchTextureIdMap.contains(e._id)||this._batchTextureIdMap.set(e._id,e)};var rL=py;var Nfe=br(DU(),1);var Pfe={},A0=Uint32Array.BYTES_PER_ELEMENT;Pfe.parse=function(e,t){t=t??0;let n=new Uint8Array(e),i=new DataView(e);t+=A0;let o=i.getUint32(t,!0);if(o!==1)throw new ce(`Only Point Cloud tile version 1 is supported. Version ${o} is not.`);t+=A0,t+=A0;let r=i.getUint32(t,!0);if(r===0)throw new ce("Feature table must have a byte length greater than zero");t+=A0;let s=i.getUint32(t,!0);t+=A0;let a=i.getUint32(t,!0);t+=A0;let c=i.getUint32(t,!0);t+=A0;let u=hr(n,t,r);t+=r;let f=new Uint8Array(e,t,s);t+=s;let h,p;a>0&&(h=hr(n,t,a),t+=a,c>0&&(p=new Uint8Array(e,t,c),t+=c));let g=new Mh(u,f),m=g.getGlobalProperty("POINTS_LENGTH");if(g.featuresLength=m,!l(m))throw new ce("Feature table global property: POINTS_LENGTH must be defined");let _=g.getGlobalProperty("RTC_CENTER",q.FLOAT,3);l(_)&&(_=d.unpack(_));let y=jYe(g,h);if(y.rtcCenter=_,y.pointsLength=m,!y.hasPositions){let C=YYe(g);y.positions=C,y.hasPositions=y.hasPositions||l(C)}if(!y.hasPositions)throw new ce("Either POSITION or POSITION_QUANTIZED must be defined.");if(!y.hasNormals){let C=KYe(g);y.normals=C,y.hasNormals=y.hasNormals||l(C)}if(!y.hasColors){let C=qYe(g);y.colors=C,y.hasColors=y.hasColors||l(C),y.hasConstantColor=l(y.constantColor),y.isTranslucent=l(C)&&C.isTranslucent}if(!y.hasBatchIds){let C=XYe(g);y.batchIds=C,y.hasBatchIds=y.hasBatchIds||l(C)}if(y.hasBatchIds){let C=g.getGlobalProperty("BATCH_LENGTH");if(!l(C))throw new ce("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");y.batchLength=C}return l(p)&&(p=new Uint8Array(p),y.batchTableJson=h,y.batchTableBinary=p),y};function jYe(e,t){let n=e.json,i,o,r,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)&&(r=a.properties);let c,u,f,h,p;if(l(s)){o=s.properties;let m=s.byteOffset,_=s.byteLength;if(!l(o)||!l(m)||!l(_))throw new ce("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(m,m+_),c=l(o.POSITION),u=l(o.RGB)||l(o.RGBA),f=l(o.NORMAL),h=l(o.BATCH_ID),p=l(o.RGBA)}let g;return l(i)&&(g={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:St(o,r),dequantizeInShader:!0}),{draco:g,hasPositions:c,hasColors:u,isTranslucent:p,hasNormals:f,hasBatchIds:h}}function YYe(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",q.FLOAT,3),{name:rt.POSITION,semantic:rt.POSITION,typedArray:n,isQuantized:!1,componentDatatype:q.FLOAT,type:Ht.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",q.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",q.FLOAT,3);if(!l(i))throw new ce("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",q.FLOAT,3);if(!l(r))throw new ce("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:rt.POSITION,semantic:rt.POSITION,typedArray:n,isQuantized:!0,componentDatatype:q.FLOAT,type:Ht.VEC3,quantizedRange:o,quantizedVolumeOffset:d.unpack(r),quantizedVolumeScale:d.unpack(i),quantizedComponentDatatype:q.UNSIGNED_SHORT,quantizedType:Ht.VEC3}}}function qYe(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",q.UNSIGNED_BYTE,4),{name:rt.COLOR,semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:q.UNSIGNED_BYTE,type:Ht.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",q.UNSIGNED_BYTE,3),{name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:q.UNSIGNED_BYTE,type:Ht.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",q.UNSIGNED_SHORT,1),{name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n,componentDatatype:q.FLOAT,type:Ht.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",q.UNSIGNED_BYTE,4),o=i[3],r=G.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:rt.COLOR,semantic:rt.COLOR,setIndex:0,constantColor:r,componentDatatype:q.FLOAT,type:Ht.VEC4,isQuantized:!1,isTranslucent:s}}}function KYe(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",q.FLOAT,3),{name:rt.NORMAL,semantic:rt.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:q.FLOAT,type:Ht.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",q.UNSIGNED_BYTE,2),{name:rt.NORMAL,semantic:rt.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:Ht.VEC2,quantizedComponentDatatype:q.UNSIGNED_BYTE,componentDatatype:q.FLOAT,type:Ht.VEC3}}function XYe(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",q.UNSIGNED_SHORT,1);return{name:rt.FEATURE_ID,semantic:rt.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:q.fromTypedArray(n),type:Ht.SCALAR}}}var g0=Pfe;var JYe=bn.Components,ZYe=bn.Scene,$Ye=bn.Node,eqe=bn.Primitive,tqe=bn.Attribute,Rfe=bn.Quantization,nqe=bn.FeatureIdAttribute,iqe=bn.Material,oqe=bn.MetallicRoughness;function Ay(e){e=e??V.EMPTY_OBJECT;let t=e.arrayBuffer,n=e.byteOffset??0;this._arrayBuffer=t,this._byteOffset=n,this._loadAttributesFor2D=e.loadAttributesFor2D??!1,this._parsedContent=void 0,this._decodePromise=void 0,this._decodedAttributes=void 0,this._promise=void 0,this._error=void 0,this._state=ft.UNLOADED,this._buffers=[],this._components=void 0,this._transform=M.IDENTITY}l(Object.create)&&(Ay.prototype=Object.create(zi.prototype),Ay.prototype.constructor=Ay);Object.defineProperties(Ay.prototype,{cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}});Ay.prototype.load=function(){if(l(this._promise))return this._promise;this._parsedContent=g0.parse(this._arrayBuffer,this._byteOffset),this._state=ft.PROCESSING,this._promise=Promise.resolve(this)};Ay.prototype.process=function(e){if(l(this._error)){let t=this._error;throw this._error=void 0,t}if(this._state===ft.READY)return!0;if(this._state===ft.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=rqe(this,e.context)}return!1};function rqe(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=MA.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&sqe(e,i,r),gqe(e,t),e._state=ft.READY,e}).catch(function(r){e.unload(),e._state=ft.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function sqe(e,t,n){e._state=ft.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:rt.POSITION,typedArray:n.POSITION.array,componentDatatype:q.FLOAT,type:Ht.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,u=d.fromElements(c,c,c),f=d.unpack(a.minValues),h=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=h,o.quantizedVolumeOffset=f,o.quantizedVolumeScale=u,o.quantizedComponentDatatype=h<=255?q.UNSIGNED_BYTE:q.UNSIGNED_SHORT,o.quantizedType=Ht.VEC3}i.positions=o}if(l(n.NORMAL)){if(o={name:"NORMAL",semantic:rt.NORMAL,typedArray:n.NORMAL.array,componentDatatype:q.FLOAT,type:Ht.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},l(n.NORMAL.data.quantization)){let a=(1<<n.NORMAL.data.quantization.quantizationBits)-1;o.quantizedRange=a,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=q.UNSIGNED_BYTE,o.quantizedType=Ht.VEC2}i.normals=o}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:q.UNSIGNED_BYTE,type:Ht.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:rt.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:q.UNSIGNED_BYTE,type:Ht.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:rt.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:q.fromTypedArray(a),type:Ht.SCALAR}}let r=i.batchTableJson,s=t.batchTableProperties;for(let a in s)if(s.hasOwnProperty(a)){let c=n[a];l(r)||(r={}),i.hasDracoBatchTable=!0;let u=c.data;r[a]={byteOffset:u.byteOffset,type:aqe(u.componentsPerAttribute),componentType:cqe(u.componentDatatype),typedArray:c.array}}i.batchTableJson=r}function aqe(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function cqe(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 sL(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new Rfe,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new Rfe;let a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=d.ZERO;let c=t.quantizedVolumeScale;o.quantizedVolumeDimensions=c,o.quantizedVolumeStepSize=d.divideByScalar(c,a,new d),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new tqe;if(r.name=t.name,r.semantic=t.semantic,r.setIndex=t.setIndex,r.componentDatatype=t.componentDatatype,r.type=t.type,r.normalized=t.normalized??!1,r.min=t.min,r.max=t.max,r.quantization=o,t.isRGB565&&(i=Fn.decodeRGB565(i)),l(t.constantColor)){let a=new Array(4);r.constant=G.pack(t.constantColor,a)}else{let a=Ct.createVertexBuffer({typedArray:i,context:n,usage:Ue.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}let s=e._loadAttributesFor2D;return r.semantic===rt.POSITION&&s&&(r.typedArray=i),r}var Mfe,Xz;function lqe(e){if(!l(Xz)){Mfe=new Nfe.default(0),Xz=new Array(e);for(let t=0;t<e;++t)Xz[t]=Mfe.random()}return Xz}var uqe=new d,fqe=new d,dqe=new d;function hqe(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=lqe(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=d.fromElements(s,s,s,uqe),u=d.fromElements(a,a,a,fqe),f,h,p;if(e.isQuantized)c=d.ZERO,u=e.quantizedVolumeScale;else for(f=0;f<o;++f)h=Math.floor(r[f]*i),p=d.unpack(t,h*3,dqe),d.minimumByComponent(c,p,c),d.maximumByComponent(u,p,u);e.min=d.clone(c),e.max=d.clone(u)}var mqe={name:rt.COLOR,semantic:rt.COLOR,setIndex:0,constantColor:G.DARKGRAY,componentDatatype:q.FLOAT,type:Ht.VEC4,isQuantized:!1,isTranslucent:!1};function pqe(e,t,n){let i=[],o,r=t.positions;return l(r)&&(hqe(r),o=sL(e,r,n),o.count=t.pointsLength,i.push(o)),l(t.normals)&&(o=sL(e,t.normals,n),i.push(o)),l(t.colors)?(o=sL(e,t.colors,n),i.push(o)):(o=sL(e,mqe,n),i.push(o)),l(t.batchIds)&&(o=sL(e,t.batchIds,n),i.push(o)),i}function Aqe(e,t){let n=e.batchLength,i=e.pointsLength,o=e.batchTableBinary,r=!l(e.batchIds);return l(o)||e.hasDracoBatchTable?WA({count:n??i,batchTable:e.batchTableJson,binaryBody:o,parseAsPropertyAttributes:r,customAttributeOutput:t}):new ma({schema:{},propertyTables:[]})}function gqe(e,t){let n=e._parsedContent,i=new oqe;i.metallicFactor=0,i.roughnessFactor=.9;let o=new iqe;o.metallicRoughness=i;let r=n.colors;l(r)&&r.isTranslucent&&(o.alphaMode=Jm.BLEND);let s=!l(n.normals);o.unlit=s;let a=new eqe;if(a.attributes=pqe(e,n,t),a.primitiveType=Ne.POINTS,a.material=o,l(n.batchIds)){let g=new nqe;g.propertyTableId=0,g.setIndex=0,g.positionalLabel="featureId_0",a.featureIds.push(g)}let c=new $Ye;c.index=0,c.primitives=[a];let u=new ZYe;u.nodes=[c],u.upAxis=fo.Z,u.forwardAxis=fo.X;let f=new JYe;f.scene=u,f.nodes=[c];let h=[];f.structuralMetadata=Aqe(n,h),h.length>0&&_qe(e,a,h,t),l(n.rtcCenter)&&(f.transform=M.multiplyByTranslation(f.transform,n.rtcCenter,f.transform));let p=n.positions;l(p)&&p.isQuantized&&(f.transform=M.multiplyByTranslation(f.transform,p.quantizedVolumeOffset,f.transform)),e._components=f,e._parsedContent=void 0,e._arrayBuffer=void 0}function _qe(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=Ct.createVertexBuffer({typedArray:a.typedArray,context:i,usage:Ue.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),a.buffer=c,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}Ay.prototype.unload=function(){let e=this._buffers;for(let t=0;t<e.length;t++)e[t].destroy();e.length=0,this._components=void 0,this._parsedContent=void 0,this._arrayBuffer=void 0};var aL=Ay;var yqe=new d,Cqe=new d,Eqe=new d,Iqe=new M,xqe=new M,bqe=new M,Tqe=new me,Sqe=new le;function AT(e,t,n,i,o,r,s){if(!e._ready||n.mode===oe.MORPHING)return;let a=Number.MAX_VALUE,c=e.sceneGraph,u=c._runtimeNodes;for(let f=0;f<u.length;f++){let h=u[f],p=h.node,g=M.clone(h.computedTransform,Iqe),m=M.clone(c.computedModelMatrix,xqe),_=p.instances;l(_)&&_.transformInWorldSpace&&(m=M.multiplyTransformation(e.modelMatrix,c.components.transform,m),g=M.multiplyTransformation(c.axisCorrectionMatrix,h.computedTransform,g));let y=M.multiplyTransformation(m,g,bqe);n.mode!==oe.SCENE3D&&(y=Qt.basisTo2D(n.mapProjection,y,y));let C=[];if(l(_)){let I=_.attributes[0].count,b=_.attributes[0].componentDatatype,S=12,B=h.transformsTypedArray;if(!l(B)){let v=h.instancingTransformsBuffer;l(v)&&n.context.webgl2&&(B=q.createTypedArray(b,I*S),v.getBufferData(B))}if(l(B))for(let v=0;v<I;v++){let P=v*S,N=new M(B[P],B[P+1],B[P+2],B[P+3],B[P+4],B[P+5],B[P+6],B[P+7],B[P+8],B[P+9],B[P+10],B[P+11],0,0,0,1);_.transformInWorldSpace?(M.multiplyTransformation(N,g,N),M.multiplyTransformation(m,N,N)):M.multiplyTransformation(N,y,N),C.push(N)}}C.length===0&&C.push(y);let E=h.runtimePrimitives.length;for(let I=0;I<E;I++){let b=h.runtimePrimitives[I],S=b.primitive;if(l(b.boundingSphere)&&!l(_)){let j=le.transform(b.boundingSphere,y,Sqe),Z=fi.raySphere(t,j);if(!l(Z))continue}let B=vt.getAttributeBySemantic(S,rt.POSITION),v=B.byteOffset,P=B.byteStride,N=B.count;if(!l(S.indices))continue;let L=S.indices.typedArray;if(!l(L)){let j=S.indices.buffer,Z=S.indices.count,Y=S.indices.indexDatatype;l(j)&&n.context.webgl2&&(Y===Qe.UNSIGNED_BYTE?L=new Uint8Array(Z):Y===Qe.UNSIGNED_SHORT?L=new Uint16Array(Z):Y===Qe.UNSIGNED_INT&&(L=new Uint32Array(Z)),j.getBufferData(L))}let A=B.typedArray,x=B.componentDatatype,T=B.type,w=B.quantization;l(w)&&(x=B.quantization.componentDatatype,T=B.quantization.type);let R=Ht.getNumberOfComponents(T),O=q.getSizeInBytes(x),k=!l(A)&&l(P)&&P!==R*O,F=R,z=0;k&&(F=P/O,z=v/O);let Q=N*F;if(!l(A)){let j=B.buffer;l(j)&&n.context.webgl2&&(A=q.createTypedArray(x,Q),j.getBufferData(A,k?0:v,0,Q)),w&&B.normalized&&(A=Fn.dequantize(A,x,T,N))}if(!l(L)||!l(A))return;r=r??ne.default,i=i??1,o=o??0;let H=L.length;for(let j=0;j<H;j+=3){let Z=L[j],Y=L[j+1],$=L[j+2];for(let J of C){let pe=eY(A,Z,z,F,w,J,i,o,r,yqe),Ce=eY(A,Y,z,F,w,J,i,o,r,Cqe),fe=eY(A,$,z,F,w,J,i,o,r,Eqe),ye=fi.rayTriangleParametric(t,pe,Ce,fe,e.backFaceCulling??!0);l(ye)&&ye<a&&ye>=0&&(a=ye)}}}}if(a!==Number.MAX_VALUE){if(s=xn.getPoint(t,a,s),n.mode!==oe.SCENE3D){d.fromElements(s.y,s.z,s.x,s);let f=n.mapProjection,h=f.ellipsoid,p=f.unproject(s,Tqe);h.cartographicToCartesian(p,s)}return s}}function eY(e,t,n,i,o,r,s,a,c,u){let f=n+t*i;if(u.x=e[f],u.y=e[f+1],u.z=e[f+2],l(o))if(o.octEncoded){if(u=Fn.octDecodeInRange(u,o.normalizationRange,u),o.octEncodedZXY){let h=u.x;u.x=u.z,u.z=u.y,u.y=h}}else u=d.multiplyComponents(u,o.quantizedVolumeStepSize,u),u=d.add(u,o.quantizedVolumeOffset,u);return u=M.multiplyByPoint(r,u,u),s!==1&&Gr.getPosition(u,c,s,a,u),u}var tY=class{constructor(t){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}},cL=tY;var nY=class{constructor(t){this._model=t,this._modelPrimitiveImageries=void 0,this._imageryConfigurations=[]}update(t){this._hasImagery&&this._allImageryLayersReady&&(l(this._modelPrimitiveImageries)||(this._modelPrimitiveImageries=this._createModelPrimitiveImageries()),this._updateModelPrimitiveImageries(t),this._checkForModifiedImageryConfigurations())}_createModelPrimitiveImageries(){let t=this._model,n=this._collectRuntimeNodesAndPrimitives(),i=[],o=n.length;for(let r=0;r<o;r++){let s=n[r],a=s.runtimeNode,c=s.runtimePrimitive,u=new h0(t,a,c);c.primitive.modelPrimitiveImagery=u,i.push(u)}return i}_collectRuntimeNodesAndPrimitives(){let i=this._model.sceneGraph._runtimeNodes,o=[];for(let r=0;r<i.length;r++){let s=i[r];if(l(s))for(let a=0;a<s.runtimePrimitives.length;a++){let c=s.runtimePrimitives[a];o.push({runtimeNode:s,runtimePrimitive:c})}}return o}_updateModelPrimitiveImageries(t){if(!l(this._modelPrimitiveImageries))throw new he("The modelPrimitiveImageries have not been created");let n=this._modelPrimitiveImageries,i=n.length;for(let o=0;o<i;o++)n[o].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}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 o=0;o<n.length;o++){let r=n.get(o),s=i[o];if(r.alpha!==s.alpha||r.brightness!==s.brightness||r.contrast!==s.contrast||r.hue!==s.hue||r.saturation!==s.saturation||r.gamma!==s.gamma||r.colorToAlpha!==s.colorToAlpha)return!0}return!1}_updateImageryConfigurations(){let n=this._model.imageryLayers,i=this._imageryConfigurations;i.length=n.length;for(let o=0;o<n.length;o++){let r=n.get(o);i[o]=new cL(r)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),ue(this)}},lL=nY;function Co(e){e=e??V.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??wr.GLTF,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.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=X.clone(X.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 f1(this),this._clampAnimations=e.clampAnimations??!0,this._userAnimationDirty=!1,this._id=e.id,this._idDirty=!1,this._color=G.clone(e.color),this._colorBlendMode=e.colorBlendMode??Qc.HIGHLIGHT,this._colorBlendAmount=e.colorBlendAmount??.5;let t=e.silhouetteColor??G.RED;this._silhouetteColor=G.clone(t),this._silhouetteSize=e.silhouetteSize??0,this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=e.cull??!0,this._opaquePass=e.opaquePass??Be.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 le,this._initialRadius=void 0,this._heightReference=e.heightReference??Ze.NONE,this._heightDirty=this._heightReference!==Ze.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=e.enableVerticalExaggeration??!0,this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new $m(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?Ps.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=M.clone(M.IDENTITY);let a=e.clippingPolygons;l(a)&&a.owner===void 0?Dh.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._modelImagery=new lL(this),this._lightColor=d.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new RE,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new kA(e.environmentMapOptions);kA.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??Bn.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._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===wr.GLTF&&yt("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 Bt(u)),this._credits=[],this._credit=u,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Tr.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??G.BLACK,this._classificationType=e.classificationType,this._statistics=new rL,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 ge,this._readyEvent=new ge,this._texturesReadyEvent=new ge,this._sceneGraph=void 0,this._nodesByName={},this.pickObject=e.pickObject}function iY(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function wqe(e,t){let n=e._featureTables,i=t.propertyTables,o=i.length;for(let r=0;r<o;r++){let s=i[r],a=new m1({model:e,propertyTable:s});n.push(a)}return n}function Bqe(e,t){let n=t._featureIdLabel,i=t._instanceFeatureIdLabel,o,r,s,a;for(o=0;o<e.nodes.length;o++)if(a=e.nodes[o],l(a.instances)&&(s=vt.getFeatureIdsByLabel(a.instances.featureIds,i),l(s)&&l(s.propertyTableId)))return s.propertyTableId;for(o=0;o<e.nodes.length;o++)for(a=e.nodes[o],r=0;r<a.primitives.length;r++){let c=a.primitives[r],u=vt.getFeatureIdsByLabel(c.featureIds,n);if(l(u))return u.propertyTableId}if(t._featureTables.length===1)return 0}function sY(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(Co.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=Gt.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){sY(e,this._color)&&this.resetDrawCommands(),this._color=G.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(!G.equals(e,this._silhouetteColor)){let t=sY(e,this._silhouetteColor);this._silhouetteDirty=this._silhouetteDirty||t}this._silhouetteColor=G.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}},boundingSphere:{get:function(){let e=l(this._clampedModelMatrix)?this._clampedModelMatrix:this.modelMatrix;return Ffe(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===wr.GLTF&&yt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},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&&(Ps.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Dh.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},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=d.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&&(kA.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}}});Co.prototype.getNode=function(e){return this._nodesByName[e]};Co.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};Co.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};Co.prototype.getExtension=function(e){return this._loader.components.extensions[e]};Co.prototype.makeStyleDirty=function(){this._styleDirty=!0};Co.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var Dqe=new M,vqe=new X,Pqe=new M;Co.prototype.update=function(e){let t=!1;try{t=Rqe(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")iY(this,i);else{let o=vt.getError("model",this._resource,i);iY(this,o)}}if(Mqe(this,e),Nqe(this,e),Lqe(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let s=vt.getError("model",this._resource,new ce("Failed to load model."));iY(s),this._rejectLoad=this._rejectLoad&&this._rejectLoad(s)}let o=i.structuralMetadata;l(o)&&o.propertyTableCount>0&&wqe(this,o);let r=new oL({model:this,modelComponents:i});this._sceneGraph=r,this._gltfCredits=r.components.asset.credits}if(!this._resourcesLoaded||e.mode===oe.MORPHING)return;let n=this._modelImagery;if(n.update(e),!(!n.ready&&!(this._content?.tileset?._asynchronouslyLoadImagery??!1))){if(Oqe(this),Fqe(this),Qqe(this,e),kqe(this),Uqe(this,e),Gqe(this,e),zqe(this,e),Vqe(this,e),Hqe(this,e),Wqe(this,e),jqe(this,e),this._defaultTexture=e.context.defaultTexture,Yqe(this,e),qqe(this,e),Kqe(this),Xqe(this,e),e7e(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)),Zqe(this),t7e(this,e),n7e(this),i7e(this,e)}};function Rqe(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function Mqe(e,t){l(e._customShader)&&e._customShader.update(t)}function Nqe(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 Lqe(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function Oqe(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=Bqe(t,e),e._styleDirty=!0,e.resetDrawCommands())}function Fqe(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function Qqe(e,t){let n=e._featureTables,i=n.length,o=!1;for(let r=0;r<i;r++)n[r].update(t),n[r].styleCommandsNeededDirty&&(o=!0);o&&Ofe(e)}function Ofe(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=Lh.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function kqe(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 Uqe(e,t){e._silhouetteDirty&&(Qfe(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function Gqe(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function zqe(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 Vqe(e,t){let n=0;e.isClippingPolygonsEnabled()&&(e._clippingPolygons.owner===e&&(e._clippingPolygons.update(t),e._clippingPolygons.queueCommands(t)),n=e._clippingPolygons.clippingPolygonsState),n!==e._clippingPolygonsState&&(e.resetDrawCommands(),e._clippingPolygonsState=n)}function Hqe(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function Wqe(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function jqe(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 Yqe(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function qqe(e,t){M.equals(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=M.clone(e.modelMatrix,e._modelMatrix))}var gy=new d,oY=new me;function Kqe(e){if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0)return;l(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);let t=e._scene;if(!l(t)||e.heightReference===Ze.NONE){e._clampedModelMatrix=void 0;return}let n=t.ellipsoid??ne.default,i=e.modelMatrix;gy.x=i[12],gy.y=i[13],gy.z=i[14];let o=n.cartesianToCartographic(gy);l(e._clampedModelMatrix)||(e._clampedModelMatrix=M.clone(i,new M)),e._removeUpdateHeightCallback=t.updateHeight(o,Lfe(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(l(r)){let s=Lfe(e,n,o);me.clone(o,oY),oY.height=r,s(oY)}e._heightDirty=!1,e._updateModelMatrix=!0}function Xqe(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;Ffe(e,n),Jqe(e,n,t)}function Ffe(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=d.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=le.transform(e._boundingSphere,t,e._boundingSphere)}function Jqe(e,t,n){let i=e.scale;if(e.minimumPixelSize!==0&&!e._projectTo2D){let o=n.context,r=Math.max(o.drawingBufferWidth,o.drawingBufferHeight);M.getTranslation(t,gy),e._sceneMode!==oe.SCENE3D&&Ji.computeActualEllipsoidPosition(n,gy,gy);let s=e._boundingSphere.radius,a=o7e(gy,s,n),c=1/a;Math.min(c*(2*s),r)<e.minimumPixelSize&&(i=e.minimumPixelSize*a/(2*e._initialRadius))}e._computedScale=l(e.maximumScale)?Math.min(e.maximumScale,i):i}function Zqe(e){if(!e._idDirty)return;e._idDirty=!1;let t=e._id,n=e._pickIds,i=n.length;for(let o=0;o<i;++o)n[o].object.id=t}var $qe=new X(1,0,0,0,0,1,0,-1,0);function e7e(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,o=t.context,r=vqe,s=Dqe;if(s=M.multiply(o.uniformState.view3D,i,s),r=M.getRotation(s,r),r=X.transpose(r,r),e._iblReferenceFrameMatrix=X.multiply($qe,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=Pqe;a=M.multiply(o.uniformState.view3D,i,a),a=M.multiply(a,e._clippingPlanes.modelMatrix,a),e._clippingPlanesMatrix=M.inverseTranspose(a,e._clippingPlanesMatrix)}}function t7e(e,t){let n=e._sceneGraph;if(e._updateModelMatrix||e._minimumPixelSize!==0){let o=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;n.updateModelMatrix(o,t),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)||(i=e._userAnimationDirty||e._activeAnimations.update(t)),n.update(t,i),e._userAnimationDirty=!1}function n7e(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let s=Bt.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=Bt.clone(n[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}let o=e._gltfCredits,r=o.length;for(let s=0;s<r;s++){let a=Bt.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function i7e(e,t){let n=s7e(e,t),i=e.isInvisible(),o=e.hasSilhouette(t),r=e._show&&e._computedScale!==0&&n&&(!i||o),s=t.passes,a=s.render||s.pick&&e.allowPicking;r&&!e._ignoreCommands&&a&&(a7e(e,t),e._sceneGraph.pushDrawCommands(t))}var rY=new le;function o7e(e,t,n){return rY.center=e,rY.radius=t,n.camera.getPixelSize(rY,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var Jz=new d;function Lfe(e,t,n){return function(i){$x(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,Jz);let o=e._clampedModelMatrix;M.clone(e.modelMatrix,o),o[12]=Jz.x,o[13]=Jz.y,o[14]=Jz.z,e._heightDirty=!0}}var r7e=new d;function s7e(e,t){let n=e.distanceDisplayCondition;if(!l(n))return!0;let i=n.near*n.near,o=n.far*n.far,r;if(t.mode===oe.SCENE2D){let a=(t.camera.frustum.right-t.camera.frustum.left)*.5;r=a*a}else{let s=M.getTranslation(e.modelMatrix,r7e);Ji.computeActualEllipsoidPosition(t,s,s),r=d.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}function a7e(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}Co.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};Co.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function Qfe(e){return e.context.stencilBuffer}Co.prototype.hasSilhouette=function(e){return Qfe(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};Co.prototype.hasSkipLevelOfDetail=function(e){if(!wr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};Co.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};Co.prototype.pick=function(e,t,n,i,o){return AT(this,e,t,n,i,o)};Co.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};Co.prototype.isDestroyed=function(){return!1};Co.prototype.destroy=function(){let e=this._loader;l(e)&&e.destroy();let t=this._featureTables;if(l(t)){let r=t.length;for(let s=0;s<r;s++)t[s].destroy()}this.destroyPipelineResources(),this.destroyModelResources(),l(this._removeUpdateHeightCallback)&&(this._removeUpdateHeightCallback(),this._removeUpdateHeightCallback=void 0),l(this._terrainProviderChangedCallback)&&(this._terrainProviderChangedCallback(),this._terrainProviderChangedCallback=void 0);let n=this._clippingPlanes;l(n)&&!n.isDestroyed()&&n.owner===this&&n.destroy(),this._clippingPlanes=void 0;let i=this._clippingPolygons;l(i)&&!i.isDestroyed()&&i.owner===this&&i.destroy(),this._clippingPolygons=void 0,this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=void 0;let o=this._environmentMapManager;!o.isDestroyed()&&o.owner===this&&o.destroy(),this._environmentMapManager=void 0,ue(this)};Co.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};Co.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};Co.fromGltfAsync=async function(e){e=e??V.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??"",o=we.createIfNeeded(i);l(t.asset)?(n.gltfJson=t,n.baseResource=o,n.gltfResource=o):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=o,n.gltfResource=o):n.gltfResource=we.createIfNeeded(t);let r=new Zu(n),a=l(e.content)?wr.TILE_GLTF:wr.GLTF,c=n.gltfResource,u=uL(r,a,e);u.resource=c,u.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(g){throw r.destroy(),vt.getError("model",c,g)}let f=e.gltfCallback;l(f)&&f(r.gltfJson);let h=new Co(u),p=h._resource.credits;if(l(p)){let g=p.length;for(let m=0;m<g;m++)h._resourceCredits.push(Bt.clone(p[m]))}return h};Co.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 n1(t);try{await n.load();let i=uL(n,wr.TILE_B3DM,e);return new Co(i)}catch(i){throw n.destroy(),i}};Co.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new aL(t);try{await n.load();let i=uL(n,wr.TILE_PNTS,e);return new Co(i)}catch(i){throw n.destroy(),i}};Co.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 r1(t);try{await n.load();let i=uL(n,wr.TILE_I3DM,e);return new Co(i)}catch(i){throw n.destroy(),i}};Co.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new i1(t),i=uL(n,wr.TILE_GEOJSON,e);return new Co(i)};var c7e=new G;Co.prototype.applyColorAndShow=function(e){let t=G.clone(this._color,c7e),n=l(e)&&l(e.color),i=l(e)&&l(e.show);this._color=n?e.color.evaluateColor(void 0,this._color):G.clone(G.WHITE,this._color),this._show=i?e.show.evaluate(void 0):!0,sY(t,this._color)&&this.resetDrawCommands()};Co.prototype.applyStyle=function(e){let t=this.type===wr.TILE_PNTS,n=l(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0,i=l(this.structuralMetadata)?this.structuralMetadata.propertyAttributes:void 0,o=l(i)&&l(i[0]);if(t&&(!n||o)){this.resetDrawCommands();return}n?(this.featureTables[this.featureTableId].applyStyle(e),Ofe(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function uL(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,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 kh=Co;function is(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(is.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return l(t)&&l(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(l(t)&&l(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});is.prototype.getTextureIds=function(){return this._model.statistics.getTextureIds()};is.prototype.getTextureByteLengthById=function(e){return this._model.statistics.getTextureByteLengthById(e)};is.prototype.getExtension=function(e){return this._model.getExtension(e)};is.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;return t.featureTables[n].getFeature(e)};is.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return l(i)?n.featureTables[i].hasProperty(e,t):!1};is.prototype.applyDebugSettings=function(e,t){t=e?t:G.WHITE,this.featuresLength===0?this._model.color=t:l(this.batchTable)&&this.batchTable.setAllColor(t)};is.prototype.applyStyle=function(e){this._model.style=e};is.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,l(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0);let r=e.environmentMapManager;n.environmentMapManager!==o&&(n._environmentMapManager=r),l(o)&&l(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let s=e.clippingPolygons;l(s)&&i.clippingPolygonsDirty&&(n._clippingPolygons=s.enabled&&i._isClippedByPolygon?s:void 0),l(s)&&l(n._clippingPolygons)&&n._clippingPolygons!==s&&(n._clippingPolygons=s,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:lu.REPEAT}),this._ready=!0)};is.prototype.isDestroyed=function(){return!1};is.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),ue(this)};is.fromGltf=async function(e,t,n,i){let o=new is(e,t,n),s=fL(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let c=await kh.fromGltfAsync(s);return o._model=c,o};is.fromB3dm=async function(e,t,n,i,o){let r=new is(e,t,n),a=fL(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=c;let u=await kh.fromB3dm(a);return r._model=u,r};is.fromI3dm=async function(e,t,n,i,o){let r=new is(e,t,n),a=fL(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await kh.fromI3dm(a);return r._model=c,r};is.fromPnts=async function(e,t,n,i,o){let r=new is(e,t,n),a=fL(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await kh.fromPnts(a);return r._model=c,r};is.fromGeoJson=async function(e,t,n,i){let o=new is(e,t,n),s=fL(e,t,o,{geoJson:i,resource:n}),a=await kh.fromGeoJson(s);return o._model=a,o};is.prototype.pick=function(e,t,n){if(!l(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,ne.WGS84,n)};function fL(e,t,n,i){let o={cull:!1,releaseGltfJson:!0,opaquePass:Be.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._modelUpAxis,forwardAxis:e._modelForwardAxis,incrementallyLoadTextures:!1,customShader:e.customShader,content:n,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 St(i,o)}var nf=is;function dd(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(dd.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});dd.fromJson=function(e,t,n,i){let o=new dd(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};dd.prototype.hasProperty=function(e,t){return!1};dd.prototype.getFeature=function(e){};dd.prototype.applyDebugSettings=function(e,t){};dd.prototype.applyStyle=function(e){};dd.prototype.update=function(e,t){};dd.prototype.pick=function(e,t,n){};dd.prototype.isDestroyed=function(){return!1};dd.prototype.destroy=function(){return ue(this)};var dL=dd;var hL=`uniform sampler2D u_atlas; #ifdef VECTOR_TILE uniform vec4 u_highlightColor; #endif in vec2 v_textureCoordinates; in vec4 v_pickColor; in vec4 v_color; in float v_splitDirection; #ifdef SDF in vec4 v_outlineColor; in float v_outlineWidth; #endif #ifdef FRAGMENT_DEPTH_CHECK in vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates in vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs) in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize in mat2 v_rotationMatrix; const float SHIFT_LEFT12 = 4096.0; const float SHIFT_LEFT1 = 2.0; const float SHIFT_RIGHT12 = 1.0 / 4096.0; const float SHIFT_RIGHT1 = 1.0 / 2.0; float getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize) { vec2 lookupVector = imageSize * (depthLookupST - adjustedST); lookupVector = v_rotationMatrix * lookupVector; vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal vec2 translation = v_originTextureCoordinateAndTranslate.zw; if (applyTranslate) { // this is only needed for labels where the horizontal origin is not LEFT // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0)); } vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw; float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); if (logDepthOrDepth == 0.0) { return 0.0; // not on the globe } vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); return eyeCoordinate.z / eyeCoordinate.w; } #endif #ifdef SDF // Get the distance from the edge of a glyph at a given position sampling an SDF texture. float getDistance(vec2 position) { return texture(u_atlas, position).r; } // Samples the sdf texture at the given position and produces a color based on the fill color and the outline. vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing) { float distance = getDistance(position); if (outlineWidth > 0.0) { // Don't get the outline edge exceed the SDF_EDGE 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 void main() { if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; vec4 color = texture(u_atlas, v_textureCoordinates); #ifdef SDF float outlineWidth = v_outlineWidth; vec4 outlineColor = v_outlineColor; // Get the current distance float distance = getDistance(v_textureCoordinates); #if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives)) float smoothing = fwidth(distance); // Get an offset that is approximately half the distance to the neighbor pixels // 0.354 is approximately half of 1/sqrt(2) vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates)); // Sample the center point vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing); // Sample the 4 neighbors 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); // Equally weight the center sample and the 4 neighboring samples color = (center + color1 + color2 + color3 + color4)/5.0; #else // If no derivatives available (IE 10?), just do a single sample 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 // Fully transparent parts of the billboard are not pickable. #if !defined(OPAQUE) && !defined(TRANSLUCENT) if (color.a < 0.005) // matches 0/255 and 1/255 { discard; } #else // The billboard is rendered twice. The opaque pass discards translucent fragments // and the translucent pass discards opaque fragments. #ifdef OPAQUE if (color.a < 0.995) // matches < 254/255 { discard; } #else if (color.a >= 0.995) // matches 254/255 and 255/255 { discard; } #endif #endif #ifdef VECTOR_TILE color *= u_highlightColor; #endif out_FragColor = color; #ifdef LOG_DEPTH czm_writeLogDepth(); #endif #ifdef FRAGMENT_DEPTH_CHECK float temp = v_compressed.y; temp = temp * SHIFT_RIGHT1; float temp2 = (temp - floor(temp)) * SHIFT_LEFT1; bool enableDepthTest = temp2 != 0.0; bool applyTranslate = floor(temp) != 0.0; if (enableDepthTest) { temp = v_compressed.z; temp = temp * SHIFT_RIGHT12; vec2 dimensions; dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12; dimensions.x = floor(temp); temp = v_compressed.w; temp = temp * SHIFT_RIGHT12; vec2 imageSize; imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12; imageSize.x = floor(temp); vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy; adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y); float epsilonEyeDepth = v_compressed.x + czm_epsilon1; float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize); // negative values go into the screen if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth) { float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth) { float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth) { discard; } } } } #endif } `;var mL=`#ifdef INSTANCED in vec2 direction; #endif in vec4 positionHighAndScale; in vec4 positionLowAndRotation; in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset) in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range) in vec4 scaleByDistance; // near, nearScale, far, farScale in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions in vec2 sdf; // sdf outline color (rgb) and width (w) in float splitDirection; // splitDirection #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK) in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates #endif #ifdef VECTOR_TILE in float a_batchId; #endif out vec2 v_textureCoordinates; #ifdef FRAGMENT_DEPTH_CHECK out vec4 v_textureCoordinateBounds; out vec4 v_originTextureCoordinateAndTranslate; out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize out mat2 v_rotationMatrix; #endif out vec4 v_pickColor; out vec4 v_color; out float v_splitDirection; #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) { // Note the halfSize cannot be computed in JavaScript because it is sent via // compressed vertex attributes that coerce it to an integer. 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 VERTEX_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; // not on the globe } vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth); return eyeCoordinate.z / eyeCoordinate.w; } #endif void main() { // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition // unpack attributes 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; #ifdef FRAGMENT_DEPTH_CHECK vec2 depthOrigin = origin.xy; #endif origin -= vec2(1.0); float show = floor(compressed * SHIFT_RIGHT2); compressed -= show * SHIFT_LEFT2; #ifdef INSTANCED vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w); vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w); vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange; #else vec2 direction; direction.x = floor(compressed * SHIFT_RIGHT1); direction.y = compressed - direction.x * SHIFT_LEFT1; vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w); #endif 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.y += (temp - floor(temp)) * SHIFT_LEFT8; translate.y -= UPPER_BOUND; temp = compressedAttribute1.x * SHIFT_RIGHT8; float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2); vec2 imageSize = vec2(floor(temp), temp2); #ifdef FRAGMENT_DEPTH_CHECK float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2)); float applyTranslate = 0.0; if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false { applyTranslate = 1.0; labelHorizontalOrigin -= 2.0; depthOrigin.x = labelHorizontalOrigin + 1.0; } depthOrigin = vec2(1.0) - (depthOrigin * 0.5); #endif #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 #if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_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 pickColor; vec4 color; temp = compressedAttribute2.y; temp = temp * SHIFT_RIGHT8; pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8; pickColor.r = floor(temp); temp = compressedAttribute2.x; temp = temp * SHIFT_RIGHT8; color.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; color.g = (temp - floor(temp)) * SHIFT_LEFT8; color.r = floor(temp); 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 /= 255.0; color.a = floor(temp); color /= 255.0; /////////////////////////////////////////////////////////////////////////// vec4 p = czm_translateRelativeToEye(positionHigh, positionLow); vec4 positionEC = czm_modelViewRelativeToEye * p; #if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK) float eyeDepth = positionEC.z; #endif 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) { // 2D camera distance is a special case // treat all billboards as flattened to the z=0.0 plane 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; // push vertex behind near plane for clipping if (scale == 0.0) { positionEC.xyz = vec3(0.0); } #endif float translucency = 1.0; #ifdef EYE_DISTANCE_TRANSLUCENCY translucency = czm_nearFarScalar(translucencyByDistance, lengthSq); // push vertex behind near plane for clipping 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; #ifdef DISABLE_DEPTH_DISTANCE float disableDepthTestDistance = compressedAttribute3.z; #endif #ifdef VERTEX_DEPTH_CHECK if (lengthSq < disableDepthTestDistance) { float depthsilon = 10.0; vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy; vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, 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), origin, labelTranslate, 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), origin, labelTranslate, 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 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 (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0) { disableDepthTestDistance = czm_minimumDisableDepthTestDistance; } if (disableDepthTestDistance != 0.0) { // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w. 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))) { // Position z on the near plane. gl_Position.z = -gl_Position.w; #ifdef LOG_DEPTH v_depthFromNearPlusOne = 1.0; #endif } } #endif #ifdef FRAGMENT_DEPTH_CHECK if (sizeInMeters) { translate /= mpp; dimensions /= mpp; imageSize /= mpp; } #if defined(ROTATION) || defined(ALIGNED_AXIS) v_rotationMatrix = rotationMatrix; #else v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0); #endif float enableDepthCheck = 0.0; if (lengthSq < disableDepthTestDistance) { enableDepthCheck = 1.0; } float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12)); float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12)); float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12)); float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12)); v_compressed.x = eyeDepth; v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck; v_compressed.z = dw * SHIFT_LEFT12 + dh; v_compressed.w = iw * SHIFT_LEFT12 + ih; v_originTextureCoordinateAndTranslate.xy = depthOrigin; v_originTextureCoordinateAndTranslate.zw = translate; v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate; #endif #ifdef SDF vec4 outlineColor; float outlineWidth; temp = sdf.x; temp = temp * SHIFT_RIGHT8; outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8; outlineColor.r = floor(temp); 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 /= 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_splitDirection = splitDirection; } `;var l7e=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),Is=l7e;function tg(e){this._billboardCollection=e,this._id=void 0,this._loadState=Is.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(tg.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===Is.LOADED}},hasImage:{get:function(){return this._loadState!==Is.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});tg.prototype.unload=async function(){this._loadState!==Is.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=Is.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};tg.prototype.loadImage=async function(e,t){if(this._id===e)return;let n=this._billboardCollection,i=n.billboardTextureCache,o=i.get(e);if(l(o)&&t.loadState===Is.LOADING||t.loadState===Is.LOADED){tg.clone(o,this);return}l(o)||(o=new tg(n),i.set(e,o)),o._id=this._id=e,o._loadState=this._loadState=Is.LOADING,o._loadError=this._loadError=void 0;let r,s=this._billboardCollection.textureAtlas;try{r=await s.addImage(e,t)}catch(c){if(o._loadState=Is.ERROR,o._loadError=c,this._id!==e)return;this._loadState=Is.ERROR,this._loadError=c;return}if(!l(r)||r===-1){if(o._loadState=Is.FAILED,o._index=-1,this._id!==e)return;this._loadState=Is.FAILED,this._index=-1;return}o._index=r,o._loadState=Is.LOADED;let a=s.rectangles[r];o._width=a.width,o._height=a.height,this._id===e&&(this._index=r,this._loadState=Is.LOADED,this._width=a.width,this._height=a.height,this.dirty=!0)};tg.prototype.addImageSubRegion=async function(e,t){this._id=e,this._loadState=Is.LOADING,this._loadError=void 0,this._hasSubregion=!0;let n,i=this._billboardCollection.textureAtlas;try{n=await i.addImageSubRegion(e,t)}catch(o){this._loadState=Is.ERROR,this._loadError=o;return}if(!l(n)||n===-1){this._loadState=Is.FAILED,this._index=-1,this._width=void 0,this._height=void 0;return}this._width=t.width,this._height=t.height,this._index=n,this._loadState=Is.LOADED,this.dirty=!0};tg.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};tg.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 ng=tg;function wi(e,t){e=e??V.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=Kt.clone(n)),l(i)&&(i=Kt.clone(i)),l(o)&&(o=Kt.clone(o)),l(r)&&(r=Gt.clone(r)),this._show=e.show??!0,this._position=d.clone(e.position??d.ZERO),this._actualPosition=d.clone(this._position),this._pixelOffset=U.clone(e.pixelOffset??U.ZERO),this._translate=new U(0,0),this._eyeOffset=d.clone(e.eyeOffset??d.ZERO),this._heightReference=e.heightReference??Ze.NONE,this._verticalOrigin=e.verticalOrigin??Hn.CENTER,this._horizontalOrigin=e.horizontalOrigin??vi.CENTER,this._scale=e.scale??1,this._color=G.clone(e.color??G.WHITE),this._rotation=e.rotation??0,this._alignedAxis=d.clone(e.alignedAxis??d.ZERO),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=e.sizeInMeters??!1,this._distanceDisplayCondition=r,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 ng(t),this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;let s=e.image,a=e.imageId;l(s)&&(l(a)||(typeof s=="string"?a=s:l(s.src)?a=s.src:a=qn()),this._imageTexture.loadImage(a,s)),l(e.imageSubRegion)&&this._imageTexture.addImageSubRegion(a,e.imageSubRegion),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=oe.SCENE3D,this._clusterShow=!0,this._outlineColor=G.clone(e.outlineColor??G.BLACK),this._outlineWidth=e.outlineWidth??0,this._updateClamping(),this._splitDirection=e.splitDirection??Tr.NONE}var kfe=wi.SHOW_INDEX=0,$z=wi.POSITION_INDEX=1,Hfe=wi.PIXEL_OFFSET_INDEX=2,u7e=wi.EYE_OFFSET_INDEX=3,f7e=wi.HORIZONTAL_ORIGIN_INDEX=4,d7e=wi.VERTICAL_ORIGIN_INDEX=5,h7e=wi.SCALE_INDEX=6,Ufe=wi.IMAGE_INDEX_INDEX=7,Gfe=wi.COLOR_INDEX=8,m7e=wi.ROTATION_INDEX=9,p7e=wi.ALIGNED_AXIS_INDEX=10,A7e=wi.SCALE_BY_DISTANCE_INDEX=11,g7e=wi.TRANSLUCENCY_BY_DISTANCE_INDEX=12,_7e=wi.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,y7e=wi.DISTANCE_DISPLAY_CONDITION=14,C7e=wi.DISABLE_DEPTH_DISTANCE=15;wi.TEXTURE_COORDINATE_BOUNDS=16;var zfe=wi.SDF_INDEX=17,E7e=wi.SPLIT_DIRECTION_INDEX=18;wi.NUMBER_OF_PROPERTIES=19;function pr(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(wi.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,pr(this,kfe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;d.equals(t,e)||(d.clone(e,t),d.clone(e,this._actualPosition),this._updateClamping(),pr(this,$z))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),pr(this,$z))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;U.equals(t,e)||(U.clone(e,t),pr(this,Hfe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Kt.equals(t,e)||(this._scaleByDistance=Kt.clone(e,t),pr(this,A7e))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Kt.equals(t,e)||(this._translucencyByDistance=Kt.clone(e,t),pr(this,g7e))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;Kt.equals(t,e)||(this._pixelOffsetScaleByDistance=Kt.clone(e,t),pr(this,_7e))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;d.equals(t,e)||(d.clone(e,t),pr(this,u7e))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,pr(this,f7e))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,pr(this,d7e))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,pr(this,h7e))}},color:{get:function(){return this._color},set:function(e){let t=this._color;G.equals(t,e)||(G.clone(e,t),pr(this,Gfe))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,pr(this,m7e))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;d.equals(t,e)||(d.clone(e,t),pr(this,p7e))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,pr(this,Ufe))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,pr(this,Ufe))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,pr(this,Gfe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Gt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Gt.clone(e,this._distanceDisplayCondition),pr(this,y7e))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,pr(this,C7e))}},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}let t;typeof e=="string"?t=e:e instanceof we?t=e._url:l(e.src)?t=e.src:t=qn(),this._imageTexture.loadImage(t,e)}},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=d.clone(e,this._actualClampedPosition),pr(this,$z)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,pr(this,kfe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;G.equals(t,e)||(G.clone(e,t),pr(this,zfe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,pr(this,zfe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,pr(this,E7e))}}});wi.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};wi.prototype._updateClamping=function(){wi._updateClamping(this._billboardCollection,this)};var eV=new me;wi._updateClamping=function(e,t){if(!l(e)||!l(e._scene))return;let n=e._scene,i=n.ellipsoid??ne.default,o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===Ze.NONE||r)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===Ze.NONE||!l(t._position))return;l(t._removeCallbackFunc)&&t._removeCallbackFunc();let s=i.cartesianToCartographic(t._position);if(!l(s)){t._actualClampedPosition=void 0;return}function a(u){let f=i.cartographicToCartesian(u,t._clampedPosition);$x(t._heightReference)&&(t._mode===oe.SCENE3D?(u.height+=s.height,i.cartographicToCartesian(u,f)):f.x+=s.height),t._clampedPosition=f}t._removeCallbackFunc=n.updateHeight(s,a,t._heightReference),me.clone(s,eV);let c=n.getHeight(s,t._heightReference);l(c)&&(eV.height=c),a(eV)};wi.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};wi.prototype.setImage=function(e,t){this._imageTexture.loadImage(e,t)};wi.prototype.setImageTexture=function(e){ng.clone(e,this._imageTexture)};wi.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};wi.prototype._setTranslate=function(e){let t=this._translate;U.equals(t,e)||(U.clone(e,t),pr(this,Hfe))};wi.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};wi.prototype._setActualPosition=function(e){l(this._clampedPosition)||d.clone(e,this._actualPosition),pr(this,$z)};var Vfe=new se;wi._computeActualPosition=function(e,t,n,i){return l(e._clampedPosition)?(n.mode!==e._mode&&e._updateClamping(),e._clampedPosition):n.mode===oe.SCENE3D?t:(M.multiplyByPoint(i,t,Vfe),Ji.computeActualEllipsoidPosition(n,Vfe))};var Wfe=new d;wi._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=M.multiplyByPoint(e,t,Wfe),a=Ji.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return U.add(a,i,a),a};var Zz=new U(0,0);wi.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new U),U.clone(this._pixelOffset,Zz),U.add(Zz,this._translate,Zz);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==oe.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(o,eV);o=a.cartographicToCartesian(c,Wfe),i=M.IDENTITY}return wi._computeScreenSpacePosition(i,o,this._eyeOffset,Zz,e,t)};wi.getScreenSpaceBoundingBox=function(e,t,n){let i=e.width,o=e.height,r=e.scale;i*=r,o*=r;let s=t.x;e.horizontalOrigin===vi.RIGHT?s-=i:e.horizontalOrigin===vi.CENTER&&(s-=i*.5);let a=t.y;return e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?a-=o:e.verticalOrigin===Hn.CENTER&&(a-=o*.5),l(n)||(n=new qe),n.x=s,n.y=a,n.width=i,n.height=o,n};wi.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&d.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&&G.equals(this._color,e._color)&&U.equals(this._pixelOffset,e._pixelOffset)&&U.equals(this._translate,e._translate)&&d.equals(this._eyeOffset,e._eyeOffset)&&Kt.equals(this._scaleByDistance,e._scaleByDistance)&&Kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Kt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Gt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};wi.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 Eo=wi;var I7e={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2},Uo=Object.freeze(I7e);var x7e={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Aa=Object.freeze(x7e);var b7e=Eo.SHOW_INDEX,pL=Eo.POSITION_INDEX,jfe=Eo.PIXEL_OFFSET_INDEX,Yfe=Eo.EYE_OFFSET_INDEX,T7e=Eo.HORIZONTAL_ORIGIN_INDEX,S7e=Eo.VERTICAL_ORIGIN_INDEX,w7e=Eo.SCALE_INDEX,_0=Eo.IMAGE_INDEX_INDEX,qfe=Eo.COLOR_INDEX,B7e=Eo.ROTATION_INDEX,D7e=Eo.ALIGNED_AXIS_INDEX,Kfe=Eo.SCALE_BY_DISTANCE_INDEX,Xfe=Eo.TRANSLUCENCY_BY_DISTANCE_INDEX,Jfe=Eo.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,Zfe=Eo.DISTANCE_DISPLAY_CONDITION,v7e=Eo.DISABLE_DEPTH_DISTANCE,P7e=Eo.TEXTURE_COORDINATE_BOUNDS,$fe=Eo.SDF_INDEX,ede=Eo.SPLIT_DIRECTION_INDEX,hY=Eo.NUMBER_OF_PROPERTIES,Io,R7e={positionHighAndScale:0,positionLowAndRotation:1,compressedAttribute0:2,compressedAttribute1:3,compressedAttribute2:4,eyeOffset:5,scaleByDistance:6,pixelOffsetScaleByDistance:7,compressedAttribute3:8,textureCoordinateBoundsOrLabelTranslate:9,a_batchId:10,sdf:11,splitDirection:12},M7e={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 md(e){e=e??V.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=e.textureAtlas;l(t)||(t=new sE),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(hY),this._maxSize=0,this._maxEyeOffset=0,this._maxScale=1,this._maxPixelOffset=0,this._allHorizontalCenter=!0,this._allVerticalCenter=!0,this._allSizedInMeters=!0,this._baseVolume=new le,this._baseVolumeWC=new le,this._baseVolume2D=new le,this._boundingVolume=new le,this._boundingVolumeDirty=!1,this._colorCommands=[],this._allBillboardsReady=!1,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowTextureAtlas=e.debugShowTextureAtlas??!1,this.blendOption=e.blendOption??Uo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=oe.SCENE3D,this._buffersUsage=[Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW],this._highlightColor=G.clone(G.WHITE),this._uniforms={u_atlas:()=>this.textureAtlas.texture,u_highlightColor:()=>this._highlightColor};let n=this._scene;l(n)&&l(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,o=i.length;for(let r=0;r<o;++r)l(i[r])&&i[r]._updateClamping()},this))}Object.defineProperties(md.prototype,{length:{get:function(){return mY(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}}});function tde(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}md.prototype.add=function(e){let t=new Eo(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};md.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};md.prototype.removeAll=function(){tde(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function mY(e){if(e._billboardsRemoved){e._billboardsRemoved=!1;let t=[],n=e._billboards,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(s._index=r++,t.push(s))}e._billboards=t}}md.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};md.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};md.prototype.get=function(e){return mY(this),this._billboards[e]};var aY;function N7e(e){let n=e.cache.billboardCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s+0,o[r+4]=s+2,o[r+5]=s+3;return n=Ct.createIndexBuffer({context:e,typedArray:o,usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferBatched=n,n}function L7e(e){let t=e.cache.billboardCollection_indexBufferInstanced;return l(t)||(t=Ct.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function O7e(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return l(t)||(t=Ct.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Ue.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}md.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<hY;++i){let o=n[i]===0?Ue.STATIC_DRAW:Ue.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function F7e(e,t,n,i,o,r){let s=[{index:Io.positionHighAndScale,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[pL]},{index:Io.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[pL]},{index:Io.compressedAttribute0,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[jfe]},{index:Io.compressedAttribute1,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Xfe]},{index:Io.compressedAttribute2,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[qfe]},{index:Io.eyeOffset,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Yfe]},{index:Io.scaleByDistance,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Kfe]},{index:Io.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Jfe]},{index:Io.compressedAttribute3,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Zfe]},{index:Io.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[P7e]},{index:Io.splitDirection,componentsPerAttribute:1,componentDatatype:q.FLOAT,usage:n[ede]}];i&&s.push({index:Io.direction,componentsPerAttribute:2,componentDatatype:q.FLOAT,vertexBuffer:O7e(e)}),l(o)&&s.push({index:Io.a_batchId,componentsPerAttribute:1,componentDatatype:q.FLOAT,bufferUsage:Ue.STATIC_DRAW}),r&&s.push({index:Io.sdf,componentsPerAttribute:2,componentDatatype:q.FLOAT,usage:n[$fe]});let a=i?t:4*t;return new lA(e,s,a,i)}var cY=new $n;function nde(e,t,n,i){let o,r=n[Io.positionHighAndScale],s=n[Io.positionLowAndRotation],a=i._getActualPosition();e._mode===oe.SCENE3D&&(le.expand(e._baseVolume,a,e._baseVolume),e._boundingVolumeDirty=!0),$n.fromCartesian(a,cY);let c=i.scale,u=i.rotation;u!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,c);let f=cY.high,h=cY.low;e._instanced?(o=i._index,r(o,f.x,f.y,f.z,c),s(o,h.x,h.y,h.z,u)):(o=i._index*4,r(o+0,f.x,f.y,f.z,c),r(o+1,f.x,f.y,f.z,c),r(o+2,f.x,f.y,f.z,c),r(o+3,f.x,f.y,f.z,c),s(o+0,h.x,h.y,h.z,u),s(o+1,h.x,h.y,h.z,u),s(o+2,h.x,h.y,h.z,u),s(o+3,h.x,h.y,h.z,u))}var hu=new U,hd=32768,gT=65536,lY=4096,op=256,Q7e=128,k7e=32,U7e=8,ide=4,G7e=1/256,ode=0,rde=2,sde=3,ade=1,pY=new qe;function cde(e,t,n,i){let o,r=n[Io.compressedAttribute0],s=i.pixelOffset,a=s.x,c=s.y,u=i._translate,f=u.x,h=u.y;e._maxPixelOffset=Math.max(e._maxPixelOffset,Math.abs(a+f),Math.abs(-c+h));let p=i.horizontalOrigin,g=i._verticalOrigin,m=i.show&&i.clusterShow;i.color.alpha===0&&(m=!1),g===Hn.BASELINE&&(g=Hn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&p===vi.CENTER,e._allVerticalCenter=e._allVerticalCenter&&g===Hn.CENTER;let _=0,y=0,C=0,E=0;if(i.ready){let R=i.computeTextureCoordinates(pY);_=R.x,y=R.y,C=R.width,E=R.height}let I=_+C,b=y+E,S=Math.floor(D.clamp(a,-hd,hd)+hd)*Q7e;S+=(p+1)*k7e,S+=(g+1)*U7e,S+=(m?1:0)*ide;let B=Math.floor(D.clamp(c,-hd,hd)+hd)*op,v=Math.floor(D.clamp(f,-hd,hd)+hd)*op,P=(D.clamp(h,-hd,hd)+hd)*G7e,N=Math.floor(P),L=Math.floor((P-N)*op);B+=N,v+=L,hu.x=_,hu.y=y;let A=Fn.compressTextureCoordinates(hu);hu.x=I;let x=Fn.compressTextureCoordinates(hu);hu.y=b;let T=Fn.compressTextureCoordinates(hu);hu.x=_;let w=Fn.compressTextureCoordinates(hu);e._instanced?(o=i._index,r(o,S,B,v,A)):(o=i._index*4,r(o+0,S+ode,B,v,A),r(o+1,S+rde,B,v,x),r(o+2,S+sde,B,v,T),r(o+3,S+ade,B,v,w))}function lde(e,t,n,i){let o,r=n[Io.compressedAttribute1],s=i.alignedAxis;d.equals(s,d.ZERO)||(e._shaderAlignedAxis=!0);let a=0,c=1,u=1,f=1,h=i.translucencyByDistance;l(h)&&(a=h.near,c=h.nearValue,u=h.far,f=h.farValue,(c!==1||f!==1)&&(e._shaderTranslucencyByDistance=!0));let p=i.width??0;e._maxSize=Math.max(e._maxSize,p);let g=D.clamp(p,0,gT),m=0;Math.abs(d.magnitudeSquared(s)-1)<D.EPSILON6&&(m=Fn.octEncodeFloat(s)),c=D.clamp(c,0,1),c=c===1?255:c*255|0,g=g*op+c,f=D.clamp(f,0,1),f=f===1?255:f*255|0,m=m*op+f,e._instanced?(o=i._index,r(o,g,m,a,u)):(o=i._index*4,r(o+0,g,m,a,u),r(o+1,g,m,a,u),r(o+2,g,m,a,u),r(o+3,g,m,a,u))}function fY(e,t,n,i){let o,r=n[Io.compressedAttribute2],s=i.color,a=l(e._batchTable)?G.WHITE:i.getPickId(t.context).color,c=i.sizeInMeters?1:0,u=Math.abs(d.magnitudeSquared(i.alignedAxis)-1)<D.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&c===1;let f=i.height??0;e._maxSize=Math.max(e._maxSize,f);let h=i._labelHorizontalOrigin??-2;h+=2;let p=f*ide+h,g=G.floatToByte(s.red),m=G.floatToByte(s.green),_=G.floatToByte(s.blue),y=g*gT+m*op+_;g=G.floatToByte(a.red),m=G.floatToByte(a.green),_=G.floatToByte(a.blue);let C=g*gT+m*op+_,E=G.floatToByte(s.alpha)*gT+G.floatToByte(a.alpha)*op;E+=c*2+u,e._instanced?(o=i._index,r(o,y,C,E,p)):(o=i._index*4,r(o+0,y,C,E,p),r(o+1,y,C,E,p),r(o+2,y,C,E,p),r(o+3,y,C,E,p))}function dY(e,t,n,i){let o,r=n[Io.eyeOffset],s=i.eyeOffset,a=s.z;if(i._heightReference!==Ze.NONE&&(a*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(s.x),Math.abs(s.y),Math.abs(a)),e._instanced){if(hu.x=0,hu.y=0,i.ready){let u=i.computeTextureCoordinates(pY);hu.x=u.width,hu.y=u.height}let c=Fn.compressTextureCoordinates(hu);o=i._index,r(o,s.x,s.y,a,c)}else o=i._index*4,r(o+0,s.x,s.y,a,0),r(o+1,s.x,s.y,a,0),r(o+2,s.x,s.y,a,0),r(o+3,s.x,s.y,a,0)}function ude(e,t,n,i){let o,r=n[Io.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)),e._instanced?(o=i._index,r(o,s,a,c,u)):(o=i._index*4,r(o+0,s,a,c,u),r(o+1,s,a,c,u),r(o+2,s,a,c,u),r(o+3,s,a,c,u))}function fde(e,t,n,i){let o,r=n[Io.pixelOffsetScaleByDistance],s=0,a=1,c=1,u=1,f=i.pixelOffsetScaleByDistance;l(f)&&(s=f.near,a=f.nearValue,c=f.far,u=f.farValue,(a!==1||u!==1)&&(e._shaderPixelOffsetScaleByDistance=!0)),e._instanced?(o=i._index,r(o,s,a,c,u)):(o=i._index*4,r(o+0,s,a,c,u),r(o+1,s,a,c,u),r(o+2,s,a,c,u),r(o+3,s,a,c,u))}function dde(e,t,n,i){let o,r=n[Io.compressedAttribute3],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,f=Zf(i.heightReference)&&t.context.depthTexture;l(u)||(u=f?5e3:0),u*=u,(f||u>0)&&(e._shaderDisableDepthDistance=!0,u===Number.POSITIVE_INFINITY&&(u=-1));let h,p;l(i._labelDimensions)?(p=i._labelDimensions.x,h=i._labelDimensions.y):(p=i.width??0,h=i.height??0);let g=Math.floor(D.clamp(p,0,lY)),m=Math.floor(D.clamp(h,0,lY)),_=g*lY+m;e._instanced?(o=i._index,r(o,s,a,u,_)):(o=i._index*4,r(o+0,s,a,u,_),r(o+1,s,a,u,_),r(o+2,s,a,u,_),r(o+3,s,a,u,_))}function hde(e,t,n,i){if(Zf(i.heightReference)){let p=e._scene,g=t.context,m=t.globeTranslucencyState.translucent,_=l(p.globe)&&p.globe.depthTestAgainstTerrain;e._shaderClampToGround=g.depthTexture&&!m&&_}let o,r=n[Io.textureCoordinateBoundsOrLabelTranslate];if(qt.maximumVertexTextureImageUnits>0){let p=0,g=0;l(i._labelTranslate)&&(p=i._labelTranslate.x,g=i._labelTranslate.y),e._instanced?(o=i._index,r(o,p,g,0,0)):(o=i._index*4,r(o+0,p,g,0,0),r(o+1,p,g,0,0),r(o+2,p,g,0,0),r(o+3,p,g,0,0));return}let s=0,a=0,c=0,u=0;if(i.ready){let p=i.computeTextureCoordinates(pY);s=p.x,a=p.y,c=p.width,u=p.height}let f=s+c,h=a+u;e._instanced?(o=i._index,r(o,s,a,f,h)):(o=i._index*4,r(o+0,s,a,f,h),r(o+1,s,a,f,h),r(o+2,s,a,f,h),r(o+3,s,a,f,h))}function z7e(e,t,n,i){if(!l(e._batchTable))return;let o=n[Io.a_batchId],r=i._batchIndex,s;e._instanced?(s=i._index,o(s,r)):(s=i._index*4,o(s+0,r),o(s+1,r),o(s+2,r),o(s+3,r))}function mde(e,t,n,i){if(!e._sdf)return;let o,r=n[Io.sdf],s=i.outlineColor,a=i.outlineWidth,c=G.floatToByte(s.red),u=G.floatToByte(s.green),f=G.floatToByte(s.blue),h=c*gT+u*op+f,p=a/Aa.RADIUS,g=G.floatToByte(s.alpha)*gT+G.floatToByte(p)*op;e._instanced?(o=i._index,r(o,h,g)):(o=i._index*4,r(o+0,h+ode,g),r(o+1,h+rde,g),r(o+2,h+sde,g),r(o+3,h+ade,g))}function pde(e,t,n,i){let o=n[Io.splitDirection],r=0,s=i.splitDirection;l(s)&&(r=s);let a;e._instanced?(a=i._index,o(a,r)):(a=i._index*4,o(a+0,r),o(a+1,r),o(a+2,r),o(a+3,r))}function V7e(e,t,n,i){nde(e,t,n,i),cde(e,t,n,i),lde(e,t,n,i),fY(e,t,n,i),dY(e,t,n,i),ude(e,t,n,i),fde(e,t,n,i),dde(e,t,n,i),hde(e,t,n,i),z7e(e,t,n,i),mde(e,t,n,i),pde(e,t,n,i)}function uY(e,t,n,i,o,r){let s;i.mode===oe.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,h=Eo._computeActualPosition(u,f,i,o);l(h)&&(u._setActualPosition(h),r?a.push(h):le.expand(s,h,s))}r&&le.fromPoints(a,s)}function H7e(e,t){let n=t.mode,i=e._billboards,o=e._billboardsToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==oe.SCENE3D&&!M.equals(r,e.modelMatrix)?(e._mode=n,M.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===oe.SCENE3D||n===oe.SCENE2D||n===oe.COLUMBUS_VIEW)&&uY(e,i,i.length,t,r,!0)):n===oe.MORPHING?uY(e,i,i.length,t,r,!0):(n===oe.SCENE2D||n===oe.COLUMBUS_VIEW)&&uY(e,o,e._billboardsToUpdateIndex,t,r,!1)}function W7e(e,t,n){let i=1;(!e._allSizedInMeters||e._maxPixelOffset!==0)&&(i=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight));let o=i*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(o*=.5);let r=i*e._maxPixelOffset+e._maxEyeOffset;n.radius+=o+r}function j7e(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=Be.OVERLAY,i}var Y7e=[];md.prototype.update=function(e){if(mY(this),!this.show)return;let t=e.context;this._instanced=t.instancedArrays,Io=this._instanced?M7e:R7e,aY=this._instanced?L7e:N7e;let n=this._billboards,i=n.length,o=!0;for(let P=0;P<i;++P){let N=n[P];l(N.loadError)&&(console.error(`Error loading image for billboard: ${N.loadError}`),N.image=void 0),N.textureDirty&&this._updateBillboard(N,_0),N.show&&(o=o&&N.ready)}let r=this._textureAtlas;if(e.afterRender.push(()=>{if(!this.isDestroyed())return r.update(e.context)}),!l(r.texture))return;H7e(this,e),n=this._billboards,i=n.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,u=r.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let h,p=e.passes,g=p.pick;if(f||!g&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let P=0;P<hY;++P)c[P]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=F7e(t,i,this._buffersUsage,this._instanced,this._batchTable,this._sdf),h=this._vaf.writers;for(let P=0;P<i;++P){let N=this._billboards[P];N._dirty=!1,N.textureDirty=!1,V7e(this,e,h,N)}this._vaf.commit(aY(t))}this._billboardsToUpdateIndex=0}else if(a>0){let P=Y7e;P.length=0,(c[pL]||c[B7e]||c[w7e])&&P.push(nde),(c[_0]||c[jfe]||c[T7e]||c[S7e]||c[b7e])&&(P.push(cde),this._instanced&&P.push(dY)),(c[_0]||c[D7e]||c[Xfe])&&(P.push(lde),P.push(fY)),(c[_0]||c[qfe])&&P.push(fY),(c[_0]||c[Yfe])&&P.push(dY),c[Kfe]&&P.push(ude),c[Jfe]&&P.push(fde),(c[Zfe]||c[v7e]||c[_0]||c[pL])&&P.push(dde),(c[_0]||c[pL])&&P.push(hde),c[$fe]&&P.push(mde),c[ede]&&P.push(pde);let N=P.length;if(h=this._vaf.writers,a/i>.1){for(let L=0;L<a;++L){let A=s[L];A._dirty=!1,A.textureDirty=!1;for(let x=0;x<N;++x)P[x](this,e,h,A)}this._vaf.commit(aY(t))}else{for(let L=0;L<a;++L){let A=s[L];A._dirty=!1,A.textureDirty=!1;for(let x=0;x<N;++x)P[x](this,e,h,A);this._instanced?this._vaf.subCommit(A._index,1):this._vaf.subCommit(A._index*4,4)}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,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,_=M.IDENTITY;e.mode===oe.SCENE3D?(_=this.modelMatrix,m=le.clone(this._baseVolumeWC,this._boundingVolume)):m=le.clone(this._baseVolume2D,this._boundingVolume),W7e(this,e,m);let y=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,y){this._blendOption===Uo.OPAQUE||this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ge.fromCache({depthTest:{enabled:!0,func:te.LESS},depthMask:!0}):this._rsOpaque=void 0;let P=this._blendOption===Uo.TRANSLUCENT;this._blendOption===Uo.TRANSLUCENT||this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ge.fromCache({depthTest:{enabled:!0,func:P?te.LEQUAL:te.LESS},depthMask:P,blending:An.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let C,E,I,b,S,B=qt.maximumVertexTextureImageUnits>0;if(y||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){C=mL,E=hL,S=[],l(this._batchTable)&&(S.push("VECTOR_TILE"),C=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(C),E=this._batchTable.getFragmentShaderCallback(!1,void 0)(E)),I=new He({defines:S,sources:[C]}),this._instanced&&I.defines.push("INSTANCED"),this._shaderRotation&&I.defines.push("ROTATION"),this._shaderAlignedAxis&&I.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&I.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&I.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&I.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&I.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&I.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(B?I.defines.push("VERTEX_DEPTH_CHECK"):I.defines.push("FRAGMENT_DEPTH_CHECK"));let P=1-Aa.CUTOFF;this._sdf&&I.defines.push("SDF");let N=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT&&(b=new He({defines:["OPAQUE",N],sources:[E]}),this._shaderClampToGround&&(B?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(b.defines.push("SDF"),b.defines.push(`SDF_EDGE ${P}`)),this._sp=cn.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:I,fragmentShaderSource:b,attributeLocations:Io}),b=new He({defines:["TRANSLUCENT",N],sources:[E]}),this._shaderClampToGround&&(B?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(b.defines.push("SDF"),b.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=cn.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:I,fragmentShaderSource:b,attributeLocations:Io})),this._blendOption===Uo.OPAQUE&&(b=new He({defines:[N],sources:[E]}),this._shaderClampToGround&&(B?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(b.defines.push("SDF"),b.defines.push(`SDF_EDGE ${P}`)),this._sp=cn.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:I,fragmentShaderSource:b,attributeLocations:Io})),this._blendOption===Uo.TRANSLUCENT&&(b=new He({defines:[N],sources:[E]}),this._shaderClampToGround&&(B?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(b.defines.push("SDF"),b.defines.push(`SDF_EDGE ${P}`)),this._spTranslucent=cn.replaceCache({context:t,shaderProgram:this._spTranslucent,vertexShaderSource:I,fragmentShaderSource:b,attributeLocations:Io})),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 v=e.commandList;if(p.render||p.pick){let P=this._colorCommands,N=this._blendOption===Uo.OPAQUE,L=this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT,A=this._vaf.va,x=A.length,T=this._uniforms,w;l(this._batchTable)?(T=this._batchTable.getUniformMapCallback()(T),w=this._batchTable.getPickId()):w="v_pickColor",P.length=x;let R=L?x*2:x;for(let O=0;O<R;++O){let k=P[O];l(k)||(k=P[O]=new nt);let F=N||L&&O%2===0;k.pass=F||!L?Be.OPAQUE:Be.TRANSLUCENT,k.owner=this;let z=L?Math.floor(O/2):O;k.boundingVolume=m,k.modelMatrix=_,k.count=A[z].indicesCount,k.shaderProgram=F?this._sp:this._spTranslucent,k.uniformMap=T,k.vertexArray=A[z].va,k.renderState=F?this._rsOpaque:this._rsTranslucent,k.debugShowBoundingVolume=this.debugShowBoundingVolume,k.pickId=w,this._instanced&&(k.count=6,k.instanceCount=i),v.push(k)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=j7e(this,e.context)),v.push(this.debugCommand))}this._allBillboardsReady=o};md.prototype.isDestroyed=function(){return!1};md.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(),tde(this._billboards),ue(this)};var of=md;function q7e(e,t,n,i,o){return function(){let r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;let a=r.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,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}}var y0=q7e;function ka(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,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),_T(this)}var K7e=new me;Object.defineProperties(ka.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=G.clone(e,this._color),_T(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,_T(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=G.clone(e,this._pointOutlineColor),_T(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,_T(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=this._heightOffset??0,n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,K7e);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=G.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&_T(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});ka.defaultColor=G.WHITE;ka.defaultPointOutlineColor=G.BLACK;ka.defaultPointOutlineWidth=0;ka.defaultPointSize=8;function _T(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??ka.defaultColor,i=e._pointOutlineColor??ka.defaultPointOutlineColor,o=e._pointOutlineWidth??ka.defaultPointOutlineWidth,r=e._pointSize??ka.defaultPointSize,s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,u=e._billboardSize;if(G.equals(n,s)&&G.equals(i,a)&&o===c&&r===u)return;e._billboardColor=G.clone(n,e._billboardColor),e._billboardOutlineColor=G.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let f=n.alpha,h=n.toCssColorString(),p=i.toCssColorString(),g=JSON.stringify([h,r,p,o]);t.setImage(g,y0(f,h,p,o,r))}ka.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};ka.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};ka.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};ka.prototype.getPropertyInherited=function(e){return da.getPropertyInherited(this._content,this._batchId,e)};ka.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};ka.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};ka.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};ka.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var ig=ka;function X7e(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),c=document.createElement("canvas"),u=100,f=r.width+u|0,h=3*a,p=h/2;c.width=f,c.height=h;let g=c.getContext("2d");g.font=n,g.fillStyle="white",g.fillRect(0,0,c.width+1,c.height+1),i&&(g.strokeStyle="black",g.lineWidth=e.lineWidth,g.strokeText(t,u/2,p)),o&&(g.fillStyle="black",g.fillText(t,u/2,p));let m=g.getImageData(0,0,f,h).data,_=m.length,y=f*4,C,E,I,b;for(C=0;C<_;++C)if(m[C]!==255){I=C/y|0;break}for(C=_-1;C>=0;--C)if(m[C]!==255){b=C/y|0;break}let S=-1;for(C=0;C<f&&S===-1;++C)for(E=0;E<h;++E){let B=C*4+E*y;if(m[B]!==255||m[B+1]!==255||m[B+2]!==255||m[B+3]!==255){S=C;break}}return{width:r.width,height:b-I,ascent:p-I,descent:b-p,minx:S-u/2}}return{width:r.width,height:0,ascent:0,descent:0,minx:0}}var C0;function J7e(e,t){if(e==="")return;t=t??V.EMPTY_OBJECT;let n=t.font??"10px sans-serif",i=t.stroke??!1,o=t.fill??!0,r=t.strokeWidth??1,s=t.backgroundColor??G.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(C0)||(l(f.imageSmoothingEnabled)?C0="imageSmoothingEnabled":l(f.mozImageSmoothingEnabled)?C0="mozImageSmoothingEnabled":l(f.webkitImageSmoothingEnabled)?C0="webkitImageSmoothingEnabled":l(f.msImageSmoothingEnabled)&&(C0="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=r,f[C0]=!1,u.style.visibility="hidden",document.body.appendChild(u);let h=X7e(f,e,n,i,o);u.dimensions=h,document.body.removeChild(u),u.style.visibility="";let p=-h.minx,g=Math.ceil(h.width)+p+c,m=h.height+c,_=m-h.ascent+a,y=m-_+c;if(u.width=g,u.height=m,f.font=n,f.lineJoin="round",f.lineWidth=r,f[C0]=!1,s!==G.TRANSPARENT&&(f.fillStyle=s.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let C=t.strokeColor??G.BLACK;f.strokeStyle=C.toCssColorString(),f.strokeText(e,p+a,y)}if(o){let C=t.fillColor??G.WHITE;f.fillStyle=C.toCssColorString(),f.fillText(e,p+a,y)}return u}var E0=J7e;var wde=br(yde(),1);var $7e={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},ir=Object.freeze($7e);var Cde={},Ede=0,eKe=256,tKe=new G(.165,.165,.165,.8),nKe=new U(7,5),Rs=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function I0(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function gL(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function _L(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function xde(e){let t=Cde[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(_L(n,"line-height"));isNaN(i)&&(i=void 0),t={family:_L(n,"font-family"),size:_L(n,"font-size").replace("px",""),style:_L(n,"font-style"),weight:_L(n,"font-weight"),lineHeight:i},document.body.removeChild(n),Ede<eKe&&(Cde[e._font]=t,Ede++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function Uh(e,t){e=e??V.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=Kt.clone(n)),l(i)&&(i=Kt.clone(i)),l(o)&&(o=Kt.clone(o)),l(r)&&(r=Gt.clone(r)),this._renderedText=void 0,this._text=void 0,this._show=e.show??!0,this._font=e.font??"30px sans-serif",this._fillColor=G.clone(e.fillColor??G.WHITE),this._outlineColor=G.clone(e.outlineColor??G.BLACK),this._outlineWidth=e.outlineWidth??1,this._showBackground=e.showBackground??!1,this._backgroundColor=G.clone(e.backgroundColor??tKe),this._backgroundPadding=U.clone(e.backgroundPadding??nKe),this._style=e.style??ir.FILL,this._verticalOrigin=e.verticalOrigin??Hn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??vi.LEFT,this._pixelOffset=U.clone(e.pixelOffset??U.ZERO),this._eyeOffset=d.clone(e.eyeOffset??d.ZERO),this._position=d.clone(e.position??d.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=e.heightReference??Ze.NONE,this._distanceDisplayCondition=r,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._mode=void 0,this._clusterShow=!0,this.text=e.text??"",this._relativeSize=1,xde(this),this._updateClamping()}Object.defineProperties(Uh.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,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.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(!d.equals(t,e)){d.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].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,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),gL(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=Uh.filterUnsupportedCharacters(e);this._renderedText=Uh.enableRightToLeftDetection?cKe(t):t,I0(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,I0(this),xde(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;G.equals(t,e)||(G.clone(e,t),I0(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;G.equals(t,e)||(G.clone(e,t),I0(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,I0(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,I0(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!G.equals(t,e)){G.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),gL(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,I0(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 o=0,r=n.length;o<r;o++){let s=n[o];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(!Kt.equals(t,e)){this._translucencyByDistance=Kt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];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(!Kt.equals(t,e)){this._pixelOffsetScaleByDistance=Kt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];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(!Kt.equals(t,e)){this._scaleByDistance=Kt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];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(!d.equals(t,e)){d.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];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,gL(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,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),gL(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,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),gL(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Gt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Gt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.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,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.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,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.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=d.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.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,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}}});Uh.prototype._updateClamping=function(){Eo._updateClamping(this._labelCollection,this)};Uh.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new U);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Eo._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};Uh.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0,a=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,o=t.y-c._translate.y,r=c.width*a,s=c.height*a,e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?o-=s:e.verticalOrigin===Hn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,f=0,h=e._glyphs,p=h.length;for(let g=0;g<p;++g){let m=h[g],_=m.billboard;if(!l(_))continue;let y=t.x+_._translate.x,C=t.y-_._translate.y,E=m.dimensions.width*a,I=m.dimensions.height*a;e.verticalOrigin===Hn.BOTTOM||e.verticalOrigin===Hn.BASELINE?C-=I:e.verticalOrigin===Hn.CENTER&&(C-=I*.5),e._verticalOrigin===Hn.TOP?C+=Aa.PADDING*a:(e._verticalOrigin===Hn.BOTTOM||e._verticalOrigin===Hn.BASELINE)&&(C-=Aa.PADDING*a),i=Math.min(i,y),o=Math.min(o,C),u=Math.max(u,y+E),f=Math.max(f,C+I)}r=u-i,s=f-o}return l(n)||(n=new qe),n.x=i,n.y=o,n.width=r,n.height=s,n};Uh.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};Uh.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&&d.equals(this._position,e._position)&&G.equals(this._fillColor,e._fillColor)&&G.equals(this._outlineColor,e._outlineColor)&&G.equals(this._backgroundColor,e._backgroundColor)&&U.equals(this._backgroundPadding,e._backgroundPadding)&&U.equals(this._pixelOffset,e._pixelOffset)&&d.equals(this._eyeOffset,e._eyeOffset)&&Kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Kt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Kt.equals(this._scaleByDistance,e._scaleByDistance)&&Gt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};Uh.prototype.isDestroyed=function(){return!1};Uh.enableRightToLeftDetection=!1;function iKe(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=Rs.LTR,a="",c=e.length;for(let u=0;u<c;++u){let f=e.charAt(u);t.test(f)?a=Rs.RTL:n.test(f)?a=Rs.LTR:i.test(f)?a=Rs.BRACKETS:a=Rs.WEAK,u===0&&(s=a),s===a&&a!==Rs.BRACKETS?r+=f:(r!==""&&o.push({Type:s,Word:r}),s=a,r=f)}return o.push({Type:a,Word:r}),o}function oKe(e){return e.split("").reverse().join("")}function yL(e,t,n){return e.slice(0,t)+n+e.slice(t)}function rKe(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var sKe="\u05D0-\u05EA",aKe="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",Ide=new RegExp(`[${sKe}${aKe}]`);function cKe(e){let t=e.split(` `),n="";for(let i=0;i<t.length;i++){let o=t[i],r=Ide.test(o.charAt(0)),s=iKe(o,Ide),a=0,c="";for(let u=0;u<s.length;++u){let f=s[u],h=f.Type===Rs.BRACKETS?rKe(f.Word):oKe(f.Word);r?f.Type===Rs.RTL?(c=h+c,a=0):f.Type===Rs.LTR?(c=yL(c,a,f.Word),a+=f.Word.length):(f.Type===Rs.WEAK||f.Type===Rs.BRACKETS)&&(f.Type===Rs.WEAK&&s[u-1].Type===Rs.BRACKETS?c=h+c:s[u-1].Type===Rs.RTL?(c=h+c,a=0):s.length>u+1?s[u+1].Type===Rs.RTL?(c=h+c,a=0):(c=yL(c,a,f.Word),a+=f.Word.length):c=yL(c,0,h)):f.Type===Rs.RTL?c=yL(c,a,h):f.Type===Rs.LTR?(c+=f.Word,a=c.length):(f.Type===Rs.WEAK||f.Type===Rs.BRACKETS)&&(u>0&&s[u-1].Type===Rs.RTL?s.length>u+1?s[u+1].Type===Rs.RTL?c=yL(c,a,h):(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 _y=Uh;var Bde=br(bde(),1);function uKe(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var fKe=1.2,Tde="ID_WHITE_PIXEL",AY=new U(4,4),dKe=new qe(1,1,1,1);function hKe(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let o=document.createElement("canvas");o.width=AY.x,o.height=AY.y;let r=o.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,o.width,o.height),n.loadImage(Tde,o),n.addImageSubRegion(Tde,dKe)}let i=e.add({collection:t});return i.setImageTexture(n),i}var og={};function mKe(e,t,n,i,o,r){return og.font=t,og.fillColor=n,og.strokeColor=i,og.strokeWidth=o,og.padding=Aa.PADDING,og.fill=r===ir.FILL||r===ir.FILL_AND_OUTLINE,og.stroke=r===ir.OUTLINE||r===ir.FILL_AND_OUTLINE,og.backgroundColor=G.BLACK,E0(e,og)}function gY(e,t){let n=t.billboard;l(n)&&(n.show=!1,l(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}var pKe=new Bde.default,AKe=/\s/;function gKe(e,t){let n=t._renderedText,i=pKe.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length;if(t._relativeSize=t._fontSize/Aa.FONT_SIZE,o<s)for(let g=o;g<s;++g)gY(e,r[g]);r.length=o;let a=t.show&&t._showBackground&&n.split(` `).join("").length>0,c=t._backgroundBillboard,u=e._backgroundBillboardCollection;a?(l(c)||(c=hKe(u,e),t._backgroundBillboard=c),c.color=t._backgroundColor,c.show=t._show,c.position=t._position,c.eyeOffset=t._eyeOffset,c.pixelOffset=t._pixelOffset,c.horizontalOrigin=vi.LEFT,c.verticalOrigin=t._verticalOrigin,c.heightReference=t._heightReference,c.scale=t.totalScale,c.pickPrimitive=t,c.id=t._id,c.translucencyByDistance=t._translucencyByDistance,c.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,c.scaleByDistance=t._scaleByDistance,c.distanceDisplayCondition=t._distanceDisplayCondition,c.disableDepthTestDistance=t._disableDepthTestDistance,c.clusterShow=t.clusterShow):l(c)&&(u.remove(c),t._backgroundBillboard=c=void 0);let f=e._glyphBillboardCollection,h=f.billboardTextureCache,p=e._textDimensionsCache;for(let g=0;g<o;++g){let m=i[g],_=t._verticalOrigin,y=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+_]),C=p[y],E=h.get(y);if(!l(E)||!l(C)){E=new ng(f),h.set(y,E);let B=`${t._fontStyle} ${t._fontWeight} ${Aa.FONT_SIZE}px ${t._fontFamily}`,v=mKe(m,B,G.WHITE,G.WHITE,0,ir.FILL);if(C=v.dimensions,p[y]=C,v.width>0&&v.height>0&&!AKe.test(m)){let P=(0,wde.default)(v,{cutoff:Aa.CUTOFF,radius:Aa.RADIUS}),N=v.getContext("2d"),L=v.width,A=v.height,x=N.getImageData(0,0,L,A);for(let T=0;T<L;T++)for(let w=0;w<A;w++){let R=w*L+T,O=P[R]*255,k=R*4;x.data[k+0]=O,x.data[k+1]=O,x.data[k+2]=O,x.data[k+3]=O}N.putImageData(x,0,0),E.loadImage(y,v)}}let I=r[g];if(l(I)||(I=new uKe,I.dimensions=C,I.billboardTexture=E,r[g]=I),I.billboardTexture.id!==y&&(I.billboardTexture=E,I.dimensions=C),!E.hasImage){gY(e,I);continue}let b=I.billboard,S=e._spareBillboards;l(b)||(S.length>0?b=S.pop():(b=f.add({collection:e}),b._labelDimensions=new U,b._labelTranslate=new U),I.billboard=b),b.setImageTexture(E),b.show=t._show,b.position=t._position,b.eyeOffset=t._eyeOffset,b.pixelOffset=t._pixelOffset,b.horizontalOrigin=vi.LEFT,b.verticalOrigin=t._verticalOrigin,b.heightReference=t._heightReference,b.scale=t.totalScale,b.pickPrimitive=t,b.id=t._id,b.translucencyByDistance=t._translucencyByDistance,b.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,b.scaleByDistance=t._scaleByDistance,b.distanceDisplayCondition=t._distanceDisplayCondition,b.disableDepthTestDistance=t._disableDepthTestDistance,b._batchIndex=t._batchIndex,b.outlineColor=t.outlineColor,t.style===ir.FILL_AND_OUTLINE?(b.color=t._fillColor,b.outlineWidth=t.outlineWidth):t.style===ir.FILL?(b.color=t._fillColor,b.outlineWidth=0):t.style===ir.OUTLINE&&(b.color=G.TRANSPARENT,b.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function Sde(e,t,n){return t===vi.CENTER?-e/2:t===vi.RIGHT?-(e+n.x):n.x}var Br=new U,_Ke=new U;function yKe(e){let t=e._glyphs,n=e._renderedText,i=0,o=0,r=[],s=Number.NEGATIVE_INFINITY,a=0,c=1,u=t.length,f=e._backgroundBillboard,h=U.clone(l(f)?e._backgroundPadding:U.ZERO,_Ke);h.x/=e._relativeSize,h.y/=e._relativeSize;for(let N=0;N<u;++N){if(n.charAt(N)===` `){r.push(i),++c,i=0;continue}let A=t[N].dimensions;l(A)&&(a=Math.max(a,A.height-A.descent),s=Math.max(s,A.descent),i+=A.width-A.minx,N<u-1&&(i+=t[N+1].dimensions.minx),o=Math.max(o,i))}r.push(i);let p=a+s,g=e.totalScale,m=e._horizontalOrigin,_=e._verticalOrigin,y=0,C=r[y],E=Sde(C,m,h),I=(l(e._lineHeight)?e._lineHeight:fKe*e._fontSize)/e._relativeSize,b=I*(c-1),S=o,B=p+b;l(f)&&(S+=h.x*2,B+=h.y*2,f._labelHorizontalOrigin=m),Br.x=E*g,Br.y=0;let v=!0,P=0;for(let N=0;N<u;++N){if(n.charAt(N)===` `){++y,P+=I,C=r[y],E=Sde(C,m,h),Br.x=E*g,v=!0;continue}let L=t[N],A=L.dimensions;if(l(A)&&(_===Hn.TOP?(Br.y=A.height-a-h.y,Br.y+=Aa.PADDING):_===Hn.CENTER?Br.y=(b+A.height-a)/2:_===Hn.BASELINE?(Br.y=b,Br.y-=Aa.PADDING):(Br.y=b+s+h.y,Br.y-=Aa.PADDING),Br.y=(Br.y-A.descent-P)*g,v&&(Br.x-=Aa.PADDING*g,v=!1),l(L.billboard)&&(L.billboard._setTranslate(Br),L.billboard._labelDimensions.x=S,L.billboard._labelDimensions.y=B,L.billboard._labelHorizontalOrigin=m),N<u-1)){let x=t[N+1];Br.x+=(A.width-A.minx+x.dimensions.minx)*g}}if(l(f)&&n.split(` `).join("").length>0&&(m===vi.CENTER?E=-o/2-h.x:m===vi.RIGHT?E=-(o+h.x*2):E=0,Br.x=E*g,_===Hn.TOP?Br.y=p-a-s:_===Hn.CENTER?Br.y=(p-a)/2-s:_===Hn.BASELINE?Br.y=-h.y-s:Br.y=0,Br.y=Br.y*g,f.width=S,f.height=B,f._setTranslate(Br),f._labelTranslate=U.clone(Br,f._labelTranslate)),Zf(e.heightReference))for(let N=0;N<u;++N){let A=t[N].billboard;l(A)&&(A._labelTranslate=U.clone(Br,A._labelTranslate))}}function Dde(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)gY(e,n[i]);l(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,l(t._removeCallbackFunc)&&t._removeCallbackFunc(),ue(t)}function rp(e){e=e??V.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new of({scene:this._scene,textureAtlas:new sE({initialSize:AY})});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new ng(t),this._glyphBillboardCollection=new of({scene:this._scene,batchTable:this._batchTable}),this._glyphBillboardCollection._sdf=!0,this._spareBillboards=[],this._textDimensionsCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=G.clone(G.WHITE),this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Uo.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(rp.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}}});rp.prototype.add=function(e){let t=new _y(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};rp.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),Dde(this,e),!0}return!1};rp.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)Dde(this,e[t]);e.length=0};rp.prototype.contains=function(e){return l(e)&&e._labelCollection===this};rp.prototype.get=function(e){return this._labels[e]};rp.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 r=0;r<i;++r){let s=this._labelsToUpdate[r];if(s.isDestroyed())continue;let a=s._glyphs.length;s._rebindAllGlyphs&&(gKe(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(yKe(s),s._repositionAllGlyphs=!1);let c=s._glyphs.length-a;this._totalGlyphCount+=c}let o=n.length>0?Uo.TRANSLUCENT:this.blendOption;t.blendOption=o,n.blendOption=o,t._highlightColor=this._highlightColor,n._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,n.update(e),t.update(e)};rp.prototype.isDestroyed=function(){return!1};rp.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),ue(this)};var sp=rp;var CL=`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 Pl={};Pl.numberOfPoints=function(e,t,n){let i=d.distance(e,t);return Math.ceil(i/n)};Pl.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 CKe=new me;Pl.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,CKe).height}return i};var EKe=new M,IKe=new d,vde=new d,xKe=new hn(d.UNIT_X,0),Pde=new d,bKe=new hn(d.UNIT_X,0),TKe=new d,SKe=new d,yY=[];function Mde(e,t,n){let i=yY;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var iV=new me,nV=new me,yy=new d,CY=new d,wKe=new d,_Y=new mA,EL=new lc;function BKe(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,CY),u=i.scaleToGeodeticSurface(t,wKe),f=Pl.numberOfPoints(e,t,n),h=i.cartesianToCartographic(c,iV),p=i.cartesianToCartographic(u,nV),g=Mde(f,o,r);_Y.setEndPoints(h,p);let m=_Y.surfaceDistance/f,_=a;h.height=o;let y=i.cartographicToCartesian(h,yy);d.pack(y,s,_),_+=3;for(let C=1;C<f;C++){let E=_Y.interpolateUsingSurfaceDistance(C*m,nV);E.height=g[C],y=i.cartographicToCartesian(E,yy),d.pack(y,s,_),_+=3}return _}function DKe(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,iV),u=i.cartesianToCartographic(t,nV),f=Pl.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let h=Mde(f,o,r);EL.ellipsoid.equals(i)||(EL=new lc(void 0,void 0,i)),EL.setEndPoints(c,u);let p=EL.surfaceDistance/f,g=a;c.height=o;let m=i.cartographicToCartesian(c,yy);d.pack(m,s,g),g+=3;for(let _=1;_<f;_++){let y=EL.interpolateUsingSurfaceDistance(_*p,nV);y.height=h[_],m=i.cartographicToCartesian(y,yy),d.pack(m,s,g),g+=3}return g}Pl.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??M.IDENTITY;let o=M.inverseTransformation(t,EKe),r=M.multiplyByPoint(o,d.ZERO,IKe),s=d.normalize(M.multiplyByPointAsVector(o,d.UNIT_Y,vde),vde),a=hn.fromPointNormal(r,s,xKe),c=d.normalize(M.multiplyByPointAsVector(o,d.UNIT_X,Pde),Pde),u=hn.fromPointNormal(r,c,bKe),f=1;n.push(d.clone(e[0]));let h=n[0],p=e.length;for(let g=1;g<p;++g){let m=e[g];if(hn.getPointDistance(u,h)<0||hn.getPointDistance(u,m)<0){let _=fi.lineSegmentPlane(h,m,a,TKe);if(l(_)){let y=d.multiplyByScalar(s,5e-9,SKe);hn.getPointDistance(a,h)<0&&d.negate(y,y),n.push(d.add(_,y,new d)),i.push(f+1),d.negate(y,y),n.push(d.add(_,y,new d)),f=1}}n.push(d.clone(e[g])),f++,h=m}i.push(f)}return{positions:n,lengths:i}};Pl.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ne.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let _=i.scaleToGeodeticSurface(t[0],CY);if(o=r?o[0]:o,o!==0){let y=i.geodeticSurfaceNormal(_,yy);d.multiplyByScalar(y,o,y),d.add(_,y,_)}return[_.x,_.y,_.z]}let s=e.minDistance;if(!l(s)){let _=e.granularity??D.RADIANS_PER_DEGREE;s=D.chordLength(_,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=Pl.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),h=0;for(c=0;c<n-1;c++){let _=t[c],y=t[c+1],C=r?o[c]:o,E=r?o[c+1]:o;h=BKe(_,y,s,i,C,E,f,h)}yY.length=0;let p=t[n-1],g=i.cartesianToCartographic(p,iV);g.height=r?o[n-1]:o;let m=i.cartographicToCartesian(g,yy);return d.pack(m,f,u-3),f};var Rde=new me,vKe=new me;Pl.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ne.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let C=i.scaleToGeodeticSurface(t[0],CY);if(o=r?o[0]:o,o!==0){let E=i.geodeticSurfaceNormal(C,yy);d.multiplyByScalar(E,o,E),d.add(C,E,C)}return[C.x,C.y,C.z]}let s=e.granularity??D.RADIANS_PER_DEGREE,a=0,c,u=i.cartesianToCartographic(t[0],Rde),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],vKe),a+=Pl.numberOfPointsRhumbLine(u,f,s),u=me.clone(f,Rde);let h=(a+1)*3,p=new Array(h),g=0;for(c=0;c<n-1;c++){let C=t[c],E=t[c+1],I=r?o[c]:o,b=r?o[c+1]:o;g=DKe(C,E,s,i,I,b,p,g)}yY.length=0;let m=t[n-1],_=i.cartesianToCartographic(m,iV);_.height=r?o[n-1]:o;let y=i.cartographicToCartesian(_,yy);return d.pack(y,p,h-3),p};Pl.generateCartesianArc=function(e){let t=Pl.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=d.unpack(t,o*3);return i};Pl.generateCartesianRhumbArc=function(e){let t=Pl.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=d.unpack(t,o*3);return i};var Vi=Pl;function rf(e,t){e=e??V.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=io.fromType(io.ColorType,{color:new G(1,1,1,1)}));let n=e.positions;l(n)||(n=[]),this._positions=n,this._actualPositions=Ro(n,d.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(d.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=M.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Vi.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(Lde),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=le.fromPoints(this._actualPositions),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new le}var Nde=rf.POSITION_INDEX=0,PKe=rf.SHOW_INDEX=1,RKe=rf.WIDTH_INDEX=2,MKe=rf.MATERIAL_INDEX=3,IL=rf.POSITION_SIZE_INDEX=4,NKe=rf.DISTANCE_DISPLAY_CONDITION=5,Lde=rf.NUMBER_OF_PROPERTIES=6;function rg(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(rf.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,rg(this,PKe))}},positions:{get:function(){return this._positions},set:function(e){let t=Ro(e,d.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(d.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&rg(this,IL),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=le.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=le.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),rg(this,Nde),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,rg(this,MKe))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,rg(this,RKe))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!d.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(d.clone(t[0]))):t.length>2&&d.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,rg(this,IL)}}},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){Gt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Gt.clone(e,this._distanceDisplayCondition),rg(this,NKe))}}});rf.prototype.update=function(){let e=M.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[Nde]>0||this._propertiesChanged[IL]>0;if((!M.equals(e,this._modelMatrix)||i)&&(this._segments=Vi.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=le.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=M.clone(e,this._modelMatrix),this._segments.positions.length!==t)rg(this,IL);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){rg(this,IL);break}}};rf.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};rf.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<Lde-1;++t)e[t]=0};rf.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var pd=rf;var LKe=pd.SHOW_INDEX,OKe=pd.WIDTH_INDEX,IY=pd.POSITION_INDEX,FKe=pd.MATERIAL_INDEX,Ode=pd.POSITION_SIZE_INDEX,QKe=pd.DISTANCE_DISPLAY_CONDITION,Vde=pd.NUMBER_OF_PROPERTIES,mu={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 Gh(e){e=e??V.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.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(Vde),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Ue.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=G.clone(G.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(Gh.prototype,{length:{get:function(){return xY(this),this._polylines.length}}});Gh.prototype.add=function(e){let t=new pd(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};Gh.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};Gh.prototype.removeAll=function(){bY(this),qde(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};Gh.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};Gh.prototype.get=function(e){return xY(this),this._polylines[e]};function kKe(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:q.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:q.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:q.FLOAT,componentsPerAttribute:2}];e._batchTable=new fE(t,n,e._polylines.length)}var Hde=new $n,Wde=new se,jde=new U;Gh.prototype.update=function(e){if(xY(this),this._polylines.length===0||!this.show)return;WKe(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(qt.maximumVertexTextureImageUnits===0)throw new ce("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");kKe(this,t),this._createBatchTable=!1}if(this._createVertexArray||GKe(this))kde(this,t,n);else if(this._polylinesUpdated){let c=this._polylinesToUpdate;if(this._mode!==oe.SCENE3D){let u=c.length;for(let f=0;f<u;++f)i=c[f],i.update()}if(o[Ode]||o[FKe])kde(this,t,n);else{let u=c.length,f=this._polylineBuckets;for(let h=0;h<u;++h){i=c[h],o=i._propertiesChanged;let p=i._bucket,g=0;for(let m in f)if(f.hasOwnProperty(m)){if(f[m]===p){o[IY]&&p.writeUpdate(g,i,this._positionBuffer,n);break}g+=f[m].lengthOfPositions}if((o[LKe]||o[OKe])&&this._batchTable.setBatchedAttribute(i._index,0,new U(i._width,i._show)),this._batchTable.attributes.length>2){if(o[IY]||o[Ode]){let m=e.mode===oe.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,_=$n.fromCartesian(m.center,Hde),y=se.fromElements(_.low.x,_.low.y,_.low.z,m.radius,Wde);this._batchTable.setBatchedAttribute(i._index,2,_.high),this._batchTable.setBatchedAttribute(i._index,3,y)}if(o[QKe]){let m=jde;m.x=0,m.y=Number.MAX_VALUE;let _=i.distanceDisplayCondition;l(_)&&(m.x=_.near,m.y=_.far),this._batchTable.setBatchedAttribute(i._index,4,m)}}i._clean()}}c.length=0,this._polylinesUpdated=!1}o=this._propertiesChanged;for(let c=0;c<Vde;++c)o[c]=0;let r=M.IDENTITY;e.mode===oe.SCENE3D&&(r=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:An.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;UKe(this,e,c,r)}};var xL=new le,Fde=new le;function UKe(e,t,n,i){let o=t.context,r=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 _=u[m],y=_.buckets,C=y.length;for(let E=0;E<C;++E){let I=y[E],b=I.offset,S=I.bucket.shaderProgram,B=I.bucket.polylines,v=B.length,P,N,L=0,A,x;for(let T=0;T<v;++T){let w=B[T],R=VKe(w._material);if(R!==P){if(l(P)&&L>0){let z=N.isTranslucent();a>=s?(A=new nt({owner:e}),n.push(A)):A=n[a],++a,x=St(p(N._uniforms),e._uniformMap),A.boundingVolume=le.clone(xL,A.boundingVolume),A.modelMatrix=i,A.shaderProgram=S,A.vertexArray=_.va,A.renderState=z?e._translucentRS:e._opaqueRS,A.pass=z?Be.TRANSLUCENT:Be.OPAQUE,A.debugShowBoundingVolume=f,A.pickId="v_pickColor",A.uniformMap=x,A.count=L,A.offset=b,b+=L,L=0,c=!0,r.push(A)}N=w._material,N.update(o),P=R}let O=w._locatorBuckets,k=O.length;for(let z=0;z<k;++z){let Q=O[z];Q.locator===I&&(L+=Q.count)}let F;t.mode===oe.SCENE3D?F=w._boundingVolumeWC:t.mode===oe.COLUMBUS_VIEW?F=w._boundingVolume2D:t.mode===oe.SCENE2D?l(w._boundingVolume2D)&&(F=le.clone(w._boundingVolume2D,Fde),F.center.x=0):l(w._boundingVolumeWC)&&l(w._boundingVolume2D)&&(F=le.union(w._boundingVolumeWC,w._boundingVolume2D,Fde)),c?(c=!1,le.clone(F,xL)):le.union(F,xL,xL)}l(P)&&L>0&&(a>=s?(A=new nt({owner:e}),n.push(A)):A=n[a],++a,x=St(p(N._uniforms),e._uniformMap),A.boundingVolume=le.clone(xL,A.boundingVolume),A.modelMatrix=i,A.shaderProgram=S,A.vertexArray=_.va,A.renderState=N.isTranslucent()?e._translucentRS:e._opaqueRS,A.pass=N.isTranslucent()?Be.TRANSLUCENT:Be.OPAQUE,A.debugShowBoundingVolume=f,A.pickId="v_pickColor",A.uniformMap=x,A.count=L,A.offset=b,c=!0,r.push(A)),P=void 0}}n.length=a}Gh.prototype.isDestroyed=function(){return!1};Gh.prototype.destroy=function(){return Yde(this),bY(this),qde(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),ue(this)};function GKe(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[IY]?(i.bufferUsage!==Ue.STREAM_DRAW&&(t=!0,i.bufferUsage=Ue.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Ue.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Ue.STATIC_DRAW):i.frameCount--),t}var Qde=[0,0,0];function kde(e,t,n){e._createVertexArray=!1,bY(e),Yde(e),HKe(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,u=[[]],f=0,h=e._polylineBuckets,p,g;for(p in h)h.hasOwnProperty(p)&&(g=h[p],g.updateShader(t,r,s),f+=g.lengthOfPositions);if(f>0){let m=e._mode,_=new Float32Array(6*f*3),y=new Float32Array(f*4),C,E=0,I=0,b=0;for(p in h)if(h.hasOwnProperty(p)){g=h[p],g.write(_,y,E,I,b,r,t,n),m===oe.MORPHING&&(l(C)||(C=new Float32Array(6*f*3)),g.writeForMorph(C,E));let x=g.lengthOfPositions;E+=6*x*3,I+=x*4,b+=x*4,c=g.updateIndices(i,a,u,c)}let S=e._positionBufferUsage.bufferUsage,B=Ue.STATIC_DRAW;e._positionBuffer=Ct.createVertexBuffer({context:t,typedArray:_,usage:S});let v;l(C)&&(v=Ct.createVertexBuffer({context:t,typedArray:C,usage:S})),e._texCoordExpandAndBatchIndexBuffer=Ct.createVertexBuffer({context:t,typedArray:y,usage:B});let P=3*Float32Array.BYTES_PER_ELEMENT,N=4*Float32Array.BYTES_PER_ELEMENT,L=0,A=i.length;for(let x=0;x<A;++x)if(o=i[x],o.length>0){let T=new Uint16Array(o),w=Ct.createIndexBuffer({context:t,typedArray:T,usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT});L+=a[x];let R=6*(x*(P*D.SIXTY_FOUR_KILOBYTES)-L*P),O=P+R,k=P+O,F=P+k,z=P+F,Q=P+z,H=x*(N*D.SIXTY_FOUR_KILOBYTES)-L*N,j=[{index:mu.position3DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:R,strideInBytes:6*P},{index:mu.position3DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:mu.position2DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:R,strideInBytes:6*P},{index:mu.position2DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:O,strideInBytes:6*P},{index:mu.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:mu.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:F,strideInBytes:6*P},{index:mu.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:k,strideInBytes:6*P},{index:mu.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:F,strideInBytes:6*P},{index:mu.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:z,strideInBytes:6*P},{index:mu.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:Q,strideInBytes:6*P},{index:mu.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:z,strideInBytes:6*P},{index:mu.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:q.FLOAT,offsetInBytes:Q,strideInBytes:6*P},{index:mu.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:q.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:H}],Z,Y,$,J;m===oe.SCENE3D?(Y=e._positionBuffer,Z="vertexBuffer",$=Qde,J="value"):m===oe.SCENE2D||m===oe.COLUMBUS_VIEW?(Y=Qde,Z="value",$=e._positionBuffer,J="vertexBuffer"):(Y=v,Z="vertexBuffer",$=e._positionBuffer,J="vertexBuffer"),j[0][Z]=Y,j[1][Z]=Y,j[2][J]=$,j[3][J]=$,j[4][Z]=Y,j[5][Z]=Y,j[6][J]=$,j[7][J]=$,j[8][Z]=Y,j[9][Z]=Y,j[10][J]=$,j[11][J]=$;let pe=new ri({context:t,attributes:j,indexBuffer:w});e._vertexArrays.push({va:pe,buckets:u[x]})}}}function zKe(e,t){return t instanceof Nt?t.id:t}var oV=[];function VKe(e){let t=io._uniformList[e.type],n=t.length;oV.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];oV[i]=r,oV[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(oV,zKe)}`}function HKe(e){let t=e._mode,n=e._modelMatrix,i=e._polylineBuckets={},o=e._polylines,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a._actualPositions.length>1){a.update();let c=a.material,u=i[c.type];l(u)||(u=i[c.type]=new ap(c,t,n)),u.addPolyline(a)}}}function WKe(e,t){let n=t.mode;(e._mode!==n||!M.equals(e._modelMatrix,e.modelMatrix))&&(e._mode=n,e._modelMatrix=M.clone(e.modelMatrix),e._createVertexArray=!0)}function xY(e){if(e._polylinesRemoved){e._polylinesRemoved=!1;let t=[],n=[],i=0,o,r=e._polylines.length;for(let s=0;s<r;++s)o=e._polylines[s],o.isDestroyed||(o._index=i++,n.push(o),t.push(o));e._polylines=t,e._polylinesToUpdate=n}}function bY(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)if(!t[i].isDestroyed){let o=t[i]._bucket;l(o)&&(o.shaderProgram=o.shaderProgram&&o.shaderProgram.destroy())}}function Yde(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}Gh.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function qde(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function EY(e,t,n){this.count=e,this.offset=t,this.bucket=n}function ap(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}ap.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};ap.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"),jt.isInternetExplorer()||i.push("CLIP_POLYLINE");let o=new He({defines:i,sources:[`in vec4 v_pickColor; `,this.material.shaderSource,gE]}),r=t.getVertexShaderCallback()(CL),s=new He({defines:i,sources:[Hu,r]});this.shaderProgram=cn.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:mu})};function Kde(e){return d.dot(d.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(hn.ORIGIN_ZX_PLANE)===tn.INTERSECTING}ap.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===oe.SCENE3D||!Kde(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=i[o]*4-4;return n};var js=new d,Ad=new d,gd=new d,rV=new d,jKe=new se,YKe=new U;ap.prototype.write=function(e,t,n,i,o,r,s,a){let c=this.mode,u=a.ellipsoid.maximumRadius*D.PI,f=this.polylines,h=f.length;for(let p=0;p<h;++p){let g=f[p],m=g.width,_=g.show&&m>0,y=g._index,C=this.getSegments(g,a),E=C.positions,I=C.lengths,b=E.length,S=g.getPickId(s).color,B=0,v=0,P;for(let k=0;k<b;++k){k===0?g._loop?P=E[b-2]:(P=rV,d.subtract(E[0],E[1],P),d.add(E[0],P,P)):P=E[k-1],d.clone(P,Ad),d.clone(E[k],js),k===b-1?g._loop?P=E[1]:(P=rV,d.subtract(E[b-1],E[b-2],P),d.add(E[b-1],P,P)):P=E[k+1],d.clone(P,gd);let F=I[B];k===v+F&&(v+=F,++B);let z=k-v===0,Q=k===v+I[B]-1;c===oe.SCENE2D&&(Ad.z=0,js.z=0,gd.z=0),(c===oe.SCENE2D||c===oe.MORPHING)&&(z||Q)&&u-Math.abs(js.x)<1&&((js.x<0&&Ad.x>0||js.x>0&&Ad.x<0)&&d.clone(js,Ad),(js.x<0&&gd.x>0||js.x>0&&gd.x<0)&&d.clone(js,gd));let H=z?2:0,j=Q?2:4;for(let Z=H;Z<j;++Z){$n.writeElements(js,e,n),$n.writeElements(Ad,e,n+6),$n.writeElements(gd,e,n+12);let Y=Z-2<0?-1:1;t[o]=k/(b-1),t[o+1]=2*(Z%2)-1,t[o+2]=Y,t[o+3]=y,n+=6*3,o+=4}}let N=jKe;N.x=G.floatToByte(S.red),N.y=G.floatToByte(S.green),N.z=G.floatToByte(S.blue),N.w=G.floatToByte(S.alpha);let L=YKe;L.x=m,L.y=_?1:0;let A=c===oe.SCENE2D?g._boundingVolume2D:g._boundingVolumeWC,x=$n.fromCartesian(A.center,Hde),T=x.high,w=se.fromElements(x.low.x,x.low.y,x.low.z,A.radius,Wde),R=jde;R.x=0,R.y=Number.MAX_VALUE;let O=g.distanceDisplayCondition;l(O)&&(R.x=O.near,R.y=O.far),r.setBatchedAttribute(y,0,L),r.setBatchedAttribute(y,1,N),r.attributes.length>2&&(r.setBatchedAttribute(y,2,T),r.setBatchedAttribute(y,3,w),r.setBatchedAttribute(y,4,R))}};var qKe=new d,KKe=new d,XKe=new d,Ude=new d;ap.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=s._segments.positions,c=s._segments.lengths,u=a.length,f=0,h=0;for(let p=0;p<u;++p){let g;p===0?s._loop?g=a[u-2]:(g=Ude,d.subtract(a[0],a[1],g),d.add(a[0],g,g)):g=a[p-1],g=M.multiplyByPoint(n,g,KKe);let m=M.multiplyByPoint(n,a[p],qKe),_;p===u-1?s._loop?_=a[1]:(_=Ude,d.subtract(a[u-1],a[u-2],_),d.add(a[u-1],_,_)):_=a[p+1],_=M.multiplyByPoint(n,_,XKe);let y=c[f];p===h+y&&(h+=y,++f);let C=p-h===0,E=p===h+c[f]-1,I=C?2:0,b=E?2:4;for(let S=I;S<b;++S)$n.writeElements(m,e,t),$n.writeElements(g,e,t+6),$n.writeElements(_,e,t+12),t+=6*3}}};var JKe=new Array(1);ap.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new EY(0,i,this);n[o].push(r);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 h=0;h<f;++h){let p=u[h];p._locatorBuckets=[];let g;if(this.mode===oe.SCENE3D){g=JKe;let _=p._actualPositions.length;if(_>0)g[0]=_;else continue}else g=p._segments.lengths;let m=g.length;if(m>0){let _=0;for(let y=0;y<m;++y){let C=g[y]-1;for(let E=0;E<C;++E)c+4>D.SIXTY_FOUR_KILOBYTES&&(p._locatorBuckets.push({locator:r,count:_}),_=0,t.push(4),a=[],e.push(a),c=0,r.count=s,s=0,i=0,r=new EY(0,0,this),n[++o]=[r]),a.push(c,c+2,c+1),a.push(c+1,c+2,c+3),_+=6,s+=6,i+=6,c+=4}p._locatorBuckets.push({locator:r,count:_}),c+4>D.SIXTY_FOUR_KILOBYTES&&(t.push(0),a=[],e.push(a),c=0,r.count=s,i=0,s=0,r=new EY(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};ap.prototype.getPolylineStartIndex=function(e){let t=this.polylines,n=0,i=t.length;for(let o=0;o<i;++o){let r=t[o];if(r===e)break;n+=r._actualLength}return n};var yT={positions:void 0,lengths:void 0},Gde=new Array(1),ZKe=new d,$Ke=new me;ap.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===oe.SCENE3D)return Gde[0]=n.length,yT.positions=n,yT.lengths=Gde,yT;Kde(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length,a,c=ZKe;for(let u=0;u<s;++u)a=n[u],c=M.multiplyByPoint(r,a,c),o.push(t.project(i.cartesianToCartographic(c,$Ke)));if(o.length>0){e._boundingVolume2D=le.fromPoints(o,e._boundingVolume2D);let u=e._boundingVolume2D.center;e._boundingVolume2D.center=new d(u.z,u.x,u.y)}return yT.positions=o,yT.lengths=e._segments.lengths,yT};var zde;ap.prototype.writeUpdate=function(e,t,n,i){let o=this.mode,r=i.ellipsoid.maximumRadius*D.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);let a=zde,c=6*s*3;!l(a)||a.length<c?a=zde=new Float32Array(c):a.length>c&&(a=new Float32Array(a.buffer,0,c));let u=this.getSegments(t,i),f=u.positions,h=u.lengths,p=0,g=0,m=0,_;s=f.length;for(let y=0;y<s;++y){y===0?t._loop?_=f[s-2]:(_=rV,d.subtract(f[0],f[1],_),d.add(f[0],_,_)):_=f[y-1],d.clone(_,Ad),d.clone(f[y],js),y===s-1?t._loop?_=f[1]:(_=rV,d.subtract(f[s-1],f[s-2],_),d.add(f[s-1],_,_)):_=f[y+1],d.clone(_,gd);let C=h[g];y===m+C&&(m+=C,++g);let E=y-m===0,I=y===m+h[g]-1;o===oe.SCENE2D&&(Ad.z=0,js.z=0,gd.z=0),(o===oe.SCENE2D||o===oe.MORPHING)&&(E||I)&&r-Math.abs(js.x)<1&&((js.x<0&&Ad.x>0||js.x>0&&Ad.x<0)&&d.clone(js,Ad),(js.x<0&&gd.x>0||js.x>0&&gd.x<0)&&d.clone(js,gd));let b=E?2:0,S=I?2:4;for(let B=b;B<S;++B)$n.writeElements(js,a,p),$n.writeElements(Ad,a,p+6),$n.writeElements(gd,a,p+12),p+=6*3}n.copyFromArrayView(a,6*3*Float32Array.BYTES_PER_ELEMENT*e)}};var zh=Gh;function Cy(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 of({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new sp({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new zh,this._polylineCollection._useHighlightColor=!0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Cy.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 eXe(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+ae.packedLength+ne.packedLength,s=new Float64Array(r),a=0;return s[a++]=i,s[a++]=o,ae.pack(n,s,a),a+=ae.packedLength,ne.pack(t,s,a),s}var tXe=new ui("createVectorTilePoints",5),nXe=new d;function iXe(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=eXe(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},s=tXe.scheduleTask(r,o);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 h=e._batchIds,p=n.length/3,g=e._heightReference??Ze.NONE;for(let m=0;m<p;++m){let _=h[m],y=d.unpack(n,m*3,nXe),C=c.add();C.position=y,C._batchIndex=_,C.heightReference=g;let E=u.add();E.text=" ",E.position=y,E._batchIndex=_,E.heightReference=g;let I=f.add();I.positions=[d.clone(y),d.clone(y)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}Cy.prototype.createFeatures=function(e,t){let n=this._billboardCollection,i=this._labelCollection,o=this._polylineCollection,r=this._batchIds,s=r.length;for(let a=0;a<s;++a){let c=r[a],u=n.get(a),f=i.get(a),h=o.get(a);t[c]=new ig(e,c,u,f,h)}};Cy.prototype.applyDebugSettings=function(e,t){e?(G.clone(t,this._billboardCollection._highlightColor),G.clone(t,this._labelCollection._highlightColor),G.clone(t,this._polylineCollection._highlightColor)):(G.clone(G.WHITE,this._billboardCollection._highlightColor),G.clone(G.WHITE,this._labelCollection._highlightColor),G.clone(G.WHITE,this._polylineCollection._highlightColor))};function oXe(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.pointSize=ig.defaultPointSize,s.color=ig.defaultColor,s.pointOutlineColor=ig.defaultPointOutlineColor,s.pointOutlineWidth=ig.defaultPointOutlineWidth,s.labelColor=G.WHITE,s.labelOutlineColor=G.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=ir.FILL,s.labelText=void 0,s.backgroundColor=new G(.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=G.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=vi.CENTER,s.verticalOrigin=Hn.CENTER,s.labelHorizontalOrigin=vi.RIGHT,s.labelVerticalOrigin=Hn.BASELINE}}var rXe=new G,sXe=new G,aXe=new G,cXe=new G,lXe=new G,uXe=new G,bL=new Kt,TL=new Kt,TY=new Gt;Cy.prototype.applyStyle=function(e,t){if(!l(e)){oXe(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];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,rXe)),l(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,sXe)),l(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),l(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,aXe)),l(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,cXe)),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,lXe)),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)?(bL.near=a.x,bL.nearValue=a.y,bL.far=a.z,bL.farValue=a.w,s.scaleByDistance=bL):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);l(a)?(TL.near=a.x,TL.nearValue=a.y,TL.far=a.z,TL.farValue=a.w,s.translucencyByDistance=TL):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);l(a)?(TY.near=a.x,TY.far=a.y,s.distanceDisplayCondition=TY):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,uXe)),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))}};Cy.prototype.update=function(e){if(!this._ready&&(l(this._promise)||(this._promise=iXe(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)};Cy.prototype.isDestroyed=function(){return!1};Cy.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(),ue(this)};var SL=Cy;function sg(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??ne.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e.center??d.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=Xn.BOTH}Object.defineProperties(sg.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 fXe(e){let t=new Float64Array(3+d.packedLength+ne.packedLength+ae.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,d.pack(e._center,t,n),n+=d.packedLength,ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,ae.pack(e._rectangle,t,n),t}function dXe(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=Qn.unpack(t,n),n+=Qn.packedLength;let r=t[n++],s=e._batchedIndices=new Array(r);for(let a=0;a<r;++a){let c=G.unpack(t,n);n+=G.packedLength;let u=t[n++],f=t[n++],h=t[n++],p=new Array(h);for(let g=0;g<h;++g)p[g]=t[n++];s[a]=new jm({color:c,offset:u,count:f,batchIds:p})}}var hXe=new ui("createVectorTilePolygons",5),mXe=new G;function pXe(e){if(l(e._primitive))return;let t=e._positions,n=e._counts,i=e._indexCounts,o=e._indices,r=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(),o=e._indices=e._indices.slice(),e._center=e._ellipsoid.cartographicToCartesian(ae.center(e._rectangle)),r=e._transferrableBatchIds=new Uint32Array(e._batchIds),s=e._batchTableColors=new Uint32Array(r.length);let g=e._batchTable,m=s.length;for(let _=0;_<m;++_){let y=g.getColor(_,mXe);s[_]=y.toRgba()}a=e._packedBuffer=fXe(e)}let c=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,s.buffer,a.buffer],u={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:s.buffer},f=e._polygonMinimumHeights,h=e._polygonMaximumHeights;l(f)&&l(h)&&(f=f.slice(),h=h.slice(),c.push(f.buffer,h.buffer),u.minimumHeights=f,u.maximumHeights=h);let p=hXe.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),_=m[0];dXe(e,m),e._indices=Qe.getSizeInBytes(_)===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),AXe(e),e._ready=!0}).catch(g=>{e.isDestroyed()||(e._error=g)})}function AXe(e){l(e._primitive)||(e._primitive=new FE({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)}sg.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};sg.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};sg.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};sg.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};sg.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=pXe(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)};sg.prototype.isDestroyed=function(){return!1};sg.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var wL=sg;var BL=`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 Vh(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ne.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=G.clone(G.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(Vh.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function gXe(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ae.packedLength+ne.packedLength+d.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ae.pack(t,a,c),c+=ae.packedLength,ne.pack(o,a,c),c+=ne.packedLength,d.pack(r,a,c),a}var _Xe=new ui("createVectorTilePolylines",5),CT={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function yXe(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=gXe(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=_Xe.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 h=f.indexDatatype;e._indices=h===Qe.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),CXe(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function CXe(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let u=Ct.createVertexBuffer({context:t,typedArray:i,usage:Ue.STATIC_DRAW}),f=Ct.createVertexBuffer({context:t,typedArray:n,usage:Ue.STATIC_DRAW}),h=Ct.createVertexBuffer({context:t,typedArray:o,usage:Ue.STATIC_DRAW}),p=Ct.createVertexBuffer({context:t,typedArray:r,usage:Ue.STATIC_DRAW}),g=Ct.createVertexBuffer({context:t,typedArray:s,usage:Ue.STATIC_DRAW}),m=Ct.createIndexBuffer({context:t,typedArray:a,usage:Ue.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Qe.UNSIGNED_SHORT:Qe.UNSIGNED_INT}),_=[{index:CT.previousPosition,vertexBuffer:u,componentDatatype:q.FLOAT,componentsPerAttribute:3},{index:CT.currentPosition,vertexBuffer:f,componentDatatype:q.FLOAT,componentsPerAttribute:3},{index:CT.nextPosition,vertexBuffer:h,componentDatatype:q.FLOAT,componentsPerAttribute:3},{index:CT.expandAndWidth,vertexBuffer:p,componentDatatype:q.FLOAT,componentsPerAttribute:2},{index:CT.a_batchId,vertexBuffer:g,componentDatatype:q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ri({context:t,attributes:_,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 DL=new M,Xde=new d;function EXe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,DL),M.multiplyByPoint(DL,e._center,Xde),M.setTranslation(DL,Xde,DL),DL},u_highlightColor:function(){return e._highlightColor}})}function IXe(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=Ge.fromCache({blending:An.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var xXe=`uniform vec4 u_highlightColor; void main() { out_FragColor = u_highlightColor; } `;function bXe(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(BL),o=n.getFragmentShaderCallback(!1,void 0,!1)(xXe),r=new He({defines:["VECTOR_TILE",jt.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Hu,i]}),s=new He({defines:["VECTOR_TILE"],sources:[o]});e._sp=cn.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:CT})}function TXe(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new nt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Be.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}Vh.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let r,s,a=n.length,c=0,u=0;for(r=0;r<a;++r)n[r]===t&&(c+=o[r+1]-o[r]);if(c===0)return;let f=new Float64Array(c*3);for(r=0;r<a;++r)if(n[r]===t){let h=o[r],p=o[r+1]-h;for(s=0;s<p;++s){let g=(h+s)*3;f[u++]=i[g],f[u++]=i[g+1],f[u++]=i[g+2]}}return f};Vh.prototype.getPositions=function(e){return Vh.getPolylinePositions(this,e)};Vh.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new da(e,r)}};Vh.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function SXe(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=G.WHITE}}var wXe=new G,BXe=G.WHITE,DXe=!0;Vh.prototype.applyStyle=function(e,t){if(!l(e)){SXe(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=l(e.color)?e.color.evaluateColor(s,wXe):BXe,s.show=l(e.show)?e.show.evaluate(s):DXe}};Vh.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=yXe(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}EXe(this,t),bXe(this,t),IXe(this);let n=e.passes;(n.render||n.pick)&&TXe(this,e)};Vh.prototype.isDestroyed=function(){return!1};Vh.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),ue(this)};var x0=Vh;var vL=`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() { // vertex corner IDs // 3-----------7 // /| left /| // / | 1 / | // 2-----------6 5 end // | / | / // start |/ right |/ // 0-----------4 // float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top 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)); // Push for volume height float offset; vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd); // offset height to create volume offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd); offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset; position.xyz += offset * ellipsoidNormal; // move from RTC to EC position = u_modifiedModelView * position; right = czm_normal * right; // Push for width in a direction that is in the start or end plane and in a plane with right // N = normalEC ("right-facing" direction for push) // R = right // p = angle between N and R // w = distance to push along R if R == N // d = distance to push along N // // N R // { p| } * cos(p) = dot(N, R) = w / d // d | |w * d = w / dot(N, R) // { | } // o---------- polyline segment ----> // 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 = widthEC 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 PL=`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))); // Discard for sky 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); // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC)); // Check distance of the eye coordinate against the right-facing plane float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz); // Check eye coordinate against the mitering planes 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 ag(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ne.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(Ii._defaultMinTerrainHeight,Ii._defaultMaxTerrainHeight),this._boundingVolume=Qn.fromRectangle(e.rectangle,Ii._defaultMinTerrainHeight,Ii._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=G.clone(G.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._promise=void 0,this._error=void 0}Object.defineProperties(ag.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function vXe(e,t,n){let i=Ii.getMinimumMaximumHeights(t,n),o=i.minimumTerrainHeight,r=i.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=o,s.y=r;let a=e._boundingVolume,c=e._rectangle;Qn.fromRectangle(c,o,r,n,a)}function PXe(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ae.packedLength+ne.packedLength+d.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ae.pack(t,a,c),c+=ae.packedLength,ne.pack(o,a,c),c+=ne.packedLength,d.pack(r,a,c),a}var RXe=new ui("createVectorTileClampedPolylines"),Ey={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function MXe(e,t){if(l(e._va))return;let n=e._positions,i=e._widths,o=e._counts,r=e._transferrableBatchIds,s=e._packedBuffer;l(s)||(n=e._positions=n.slice(),i=e._widths=i.slice(),o=e._counts=o.slice(),r=e._transferrableBatchIds=e._batchIds.slice(),s=e._packedBuffer=PXe(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},u=RXe.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 h=f.indexDatatype;e._indices=h===Qe.UNSIGNED_SHORT?new Uint16Array(f.indices):new Uint32Array(f.indices),NXe(e,t),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)})}function NXe(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,u=e._indices,f=n.byteLength+i.byteLength;f+=o.byteLength+r.byteLength,f+=s.byteLength+a.byteLength,f+=c.byteLength+u.byteLength,e._trianglesLength=u.length/3,e._geometryByteLength=f;let h=Ct.createVertexBuffer({context:t,typedArray:n,usage:Ue.STATIC_DRAW}),p=Ct.createVertexBuffer({context:t,typedArray:i,usage:Ue.STATIC_DRAW}),g=Ct.createVertexBuffer({context:t,typedArray:o,usage:Ue.STATIC_DRAW}),m=Ct.createVertexBuffer({context:t,typedArray:r,usage:Ue.STATIC_DRAW}),_=Ct.createVertexBuffer({context:t,typedArray:s,usage:Ue.STATIC_DRAW}),y=Ct.createVertexBuffer({context:t,typedArray:a,usage:Ue.STATIC_DRAW}),C=Ct.createVertexBuffer({context:t,typedArray:c,usage:Ue.STATIC_DRAW}),E=Ct.createIndexBuffer({context:t,typedArray:u,usage:Ue.STATIC_DRAW,indexDatatype:u.BYTES_PER_ELEMENT===2?Qe.UNSIGNED_SHORT:Qe.UNSIGNED_INT}),I=[{index:Ey.startEllipsoidNormal,vertexBuffer:h,componentDatatype:q.FLOAT,componentsPerAttribute:3},{index:Ey.endEllipsoidNormal,vertexBuffer:p,componentDatatype:q.FLOAT,componentsPerAttribute:3},{index:Ey.startPositionAndHeight,vertexBuffer:g,componentDatatype:q.FLOAT,componentsPerAttribute:4},{index:Ey.endPositionAndHeight,vertexBuffer:m,componentDatatype:q.FLOAT,componentsPerAttribute:4},{index:Ey.startFaceNormalAndVertexCorner,vertexBuffer:_,componentDatatype:q.FLOAT,componentsPerAttribute:4},{index:Ey.endFaceNormalAndHalfWidth,vertexBuffer:y,componentDatatype:q.FLOAT,componentsPerAttribute:4},{index:Ey.a_batchId,vertexBuffer:C,componentDatatype:q.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new ri({context:t,attributes:I,indexBuffer:E}),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 RL=new M,Jde=new d;function LXe(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return M.clone(n,RL),M.multiplyByPoint(RL,e._center,Jde),M.setTranslation(RL,Jde,RL),RL},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function Zde(e){return Ge.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:An.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:Jn.EQUAL,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},backFunction:Jn.EQUAL,backOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},reference:Xt.CESIUM_3D_TILE_MASK,mask:Xt.CESIUM_3D_TILE_MASK}})}function OXe(e){l(e._rs)||(e._rs=Zde(!1),e._rs3DTiles=Zde(!0))}function FXe(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(vL),o=n.getFragmentShaderCallback(!1,void 0,!0)(PL),r=new He({defines:["VECTOR_TILE",jt.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[Hu,i]}),s=new He({defines:["VECTOR_TILE"],sources:[o]});e._sp=cn.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Ey})}function QXe(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new nt({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Be.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=nt.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Be.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===Xn.TERRAIN||i===Xn.BOTH)&&t.commandList.push(n),(i===Xn.CESIUM_3D_TILE||i===Xn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}ag.prototype.getPositions=function(e){return x0.getPolylinePositions(this,e)};ag.prototype.createFeatures=function(e,t){let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o];t[r]=new da(e,r)}};ag.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function kXe(e,t){let n=e._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.show=!0,s.color=G.WHITE}}var UXe=new G,GXe=G.WHITE,zXe=!0;ag.prototype.applyStyle=function(e,t){if(!l(e)){kXe(this,t);return}let n=this._batchIds,i=n.length;for(let o=0;o<i;++o){let r=n[o],s=t[r];s.color=l(e.color)?e.color.evaluateColor(s,UXe):GXe,s.show=l(e.show)?e.show.evaluate(s):zXe}};function VXe(e){return Ii.initialize().then(function(){vXe(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}ag.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=VXe(this).then(MXe(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}LXe(this,t),FXe(this,t),OXe(this);let n=e.passes;(n.render||n.pick)&&QXe(this,e)};ag.prototype.isDestroyed=function(){return!1};ag.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),ue(this)};var ML=ag;var SY=32767,HXe=new me,WXe=new d;function jXe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);Fn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let h=s[f],p=a[f],g=c[f],m=D.lerp(t.west,t.east,h/SY),_=D.lerp(t.south,t.north,p/SY),y=D.lerp(n,i,g/SY),C=me.fromRadians(m,_,y,HXe),E=o.cartographicToCartesian(C,WXe);d.pack(E,u,f*3)}return u}var NL=jXe;function Wh(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,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,JXe(this,i,o)}Object.defineProperties(Wh.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return l(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.trianglesLength),l(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.geometryByteLength),l(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return l(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function YXe(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function qXe(e,t){let n,i,o,r,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;o=new Uint16Array(t.buffer,p,c)}let u=l(n)||l(i)||l(o),f=s>0&&!l(n)||a>0&&!l(i)||c>0&&!l(o);if(u&&f)throw new ce("If one group of batch ids is defined, then all batch ids must be defined");if(!l(n)&&!l(i)&&!l(o)){let p=0;if(!l(n)&&s>0)for(n=new Uint16Array(s),r=0;r<s;++r)n[r]=p++;if(!l(i)&&a>0)for(i=new Uint16Array(a),r=0;r<a;++r)i[r]=p++;if(!l(o)&&c>0)for(o=new Uint16Array(c),r=0;r<c;++r)o[r]=p++}return{polygons:n,polylines:i,points:o}}var Hh=Uint32Array.BYTES_PER_ELEMENT;function KXe(e){return new x0(e)}function XXe(e){return new ML(e)}function JXe(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=Hh;let r=o.getUint32(n,!0);if(r!==1)throw new ce(`Only Vector tile version 1 is supported. Version ${r} is not.`);n+=Hh;let s=o.getUint32(n,!0);if(n+=Hh,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=Hh,a===0)throw new ce("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=Hh;let u=o.getUint32(n,!0);n+=Hh;let f=o.getUint32(n,!0);n+=Hh;let h=o.getUint32(n,!0);n+=Hh;let p=o.getUint32(n,!0);n+=Hh;let g=o.getUint32(n,!0);n+=Hh;let m=o.getUint32(n,!0);n+=Hh;let _=hr(i,n,a);n+=a;let y=new Uint8Array(t,n,c);n+=c;let C,E;u>0&&(C=hr(i,n,u),n+=u,f>0&&(E=new Uint8Array(t,n,f),E=new Uint8Array(E),n+=f));let I=_.POLYGONS_LENGTH??0,b=_.POLYLINES_LENGTH??0,S=_.POINTS_LENGTH??0,B=I+b+S,v=new SA(e,B,C,E,YXe(e));if(e._batchTable=v,B===0)return;let P=new Mh(_,y),N=P.getGlobalProperty("REGION");if(!l(N))throw new ce("Feature table global property: REGION must be defined");let L=ae.unpack(N),A=N[4],x=N[5],T=e._tile.computedTransform,w=P.getGlobalProperty("RTC_CENTER",q.FLOAT,3);l(w)?(w=d.unpack(w),M.multiplyByPoint(T,w,w)):(w=ae.center(L),w.height=D.lerp(A,x,.5),w=ne.WGS84.cartographicToCartesian(w));let R=qXe(_,y);if(n+=(4-n%4)%4,I>0){P.featuresLength=I;let k=P.getPropertyArray("POLYGON_COUNTS",q.UNSIGNED_INT,1)??P.getPropertyArray("POLYGON_COUNT",q.UNSIGNED_INT,1);if(!l(k))throw new ce("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let F=P.getPropertyArray("POLYGON_INDEX_COUNTS",q.UNSIGNED_INT,1)??P.getPropertyArray("POLYGON_INDEX_COUNT",q.UNSIGNED_INT,1);if(!l(F))throw new ce("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let z=k.reduce(function($,J){return $+J*2},0),Q=F.reduce(function($,J){return $+J},0),H=new Uint32Array(t,n,Q);n+=h;let j=new Uint16Array(t,n,z);n+=p;let Z,Y;l(_.POLYGON_MINIMUM_HEIGHTS)&&l(_.POLYGON_MAXIMUM_HEIGHTS)&&(Z=P.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",q.FLOAT,1),Y=P.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",q.FLOAT,1)),e._polygons=new wL({positions:j,counts:k,indexCounts:F,indices:H,minimumHeight:A,maximumHeight:x,polygonMinimumHeights:Z,polygonMaximumHeights:Y,center:w,rectangle:L,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,batchIds:R.polygons,modelMatrix:T})}let O=e._tileset;if(b>0){P.featuresLength=b;let k=P.getPropertyArray("POLYLINE_COUNTS",q.UNSIGNED_INT,1)??P.getPropertyArray("POLYLINE_COUNT",q.UNSIGNED_INT,1);if(!l(k))throw new ce("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let F=P.getPropertyArray("POLYLINE_WIDTHS",q.UNSIGNED_SHORT,1);if(!l(F)){F=new Uint16Array(b);for(let Z=0;Z<b;++Z)F[Z]=2}let z=k.reduce(function(Z,Y){return Z+Y*3},0),Q=new Uint16Array(t,n,z);n+=g;let H=O.examineVectorLinesFunction;if(l(H)){let Z=NL(new Uint16Array(Q),L,A,x,ne.WGS84);ZXe(Z,k,R.polylines,v,e.url,H)}let j=KXe;l(O.classificationType)&&(j=XXe),e._polylines=j({positions:Q,widths:F,counts:k,batchIds:R.polylines,minimumHeight:A,maximumHeight:x,center:w,rectangle:L,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,classificationType:O.classificationType,keepDecodedPositions:O.vectorKeepDecodedPositions})}if(S>0){let k=new Uint16Array(t,n,S*3);n+=m,e._points=new SL({positions:k,batchIds:R.points,minimumHeight:A,maximumHeight:x,rectangle:L,batchTable:v,heightReference:O.heightReference,scene:O.scene})}}function wY(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}}Wh.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};Wh.prototype.getFeature=function(e){return l(this._features)||wY(this),this._features[e]};Wh.prototype.applyDebugSettings=function(e,t){l(this._polygons)&&this._polygons.applyDebugSettings(e,t),l(this._polylines)&&this._polylines.applyDebugSettings(e,t),l(this._points)&&this._points.applyDebugSettings(e,t)};Wh.prototype.applyStyle=function(e){l(this._features)||wY(this),l(this._polygons)&&this._polygons.applyStyle(e,this._features),l(this._polylines)&&this._polylines.applyStyle(e,this._features),l(this._points)&&this._points.applyStyle(e,this._features)};Wh.prototype.update=function(e,t){let n=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),l(this._points)&&(this._points.update(t),n=n&&this._points.ready),l(this._batchTable)&&n&&(l(this._features)||wY(this),this._batchTable.update(e,t),this._ready=!0)};Wh.prototype.pick=function(e,t,n){};Wh.prototype.getPolylinePositions=function(e){let t=this._polylines;if(l(t))return t.getPositions(e)};Wh.prototype.isDestroyed=function(){return!1};Wh.prototype.destroy=function(){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(),ue(this)};function ZXe(e,t,n,i,o,r){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,r(f,n[c],o,i)}}var LL=Wh;function Ua(){}Ua._maxSortingConcurrency=Math.max(jt.hardwareConcurrency-1,1);Ua._sorterTaskProcessor=void 0;Ua._taskProcessorReady=!1;Ua._error=void 0;Ua._getSorterTaskProcessor=function(){if(!l(Ua._sorterTaskProcessor)){let e=new ui("gaussianSplatSorter",Ua._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?Ua._taskProcessorReady=!0:Ua._error=new ce("Gaussian splat sorter could not be initialized.")}).catch(t=>{Ua._error=t}),Ua._sorterTaskProcessor=e}return Ua._sorterTaskProcessor};Ua.radixSortIndexes=function(e){let t=Ua._getSorterTaskProcessor();if(l(Ua._error))throw Ua._error;if(Ua._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var ET=Ua;function Ga(){}Ga._maxSortingConcurrency=Math.max(jt.hardwareConcurrency-1,1);Ga._textureTaskProcessor=void 0;Ga._taskProcessorReady=!1;Ga._error=void 0;Ga._getTextureTaskProcessor=function(){if(!l(Ga._textureTaskProcessor)){let e=new ui("gaussianSplatTextureGenerator",Ga._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?Ga._taskProcessorReady=!0:Ga._error=new ce("Gaussian splat sorter could not be initialized.")}).catch(t=>{Ga._error=t}),Ga._textureTaskProcessor=e}return Ga._textureTaskProcessor};Ga.generateFromAttributes=function(e){let t=Ga._getTextureTaskProcessor();if(l(Ga._error))throw Ga._error;if(!Ga._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var OL=Ga;function $Xe(e){let t=new cA;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=Ge.getState(Ge.fromCache({depthTest:{enabled:!0,func:Na.LESS_OR_EQUAL}})),this.alphaOptions=new p0,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,Ae.FRAGMENT)}var FL=$Xe;var QL=`// // Vertex shader for Gaussian splats. // The splats are rendered as quads in view space. Splat attributes are loaded from a texture with precomputed 3D covariance. // Passes local quad coordinates and color to the fragment shader for Gaussian evaluation. // // Discards splats outside the view frustum or with negligible screen size. // // Transforms and projects splat covariance into screen space and extracts the major and minor axes of the Gaussian ellipsoid // which is used to calculate the vertex position in clip space. vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) { vec4 t = vec4(viewPos, 1.0); float focal = czm_viewport.z * czm_projection[0][0]; float J1 = focal / t.z; vec2 J2 = -J1 / t.z * t.xy; mat3 J = mat3( J1, 0.0, J2.x, 0.0, J1, J2.y, 0.0, 0.0, 0.0 ); //We need to take our view and remove the scale component //quantized models can have a scaled matrix which will throw our splat size off mat3 R = mat3(czm_modelView); vec3 scale; scale.x = length(R[0].xyz); scale.y = length(R[1].xyz); scale.z = length(R[2].xyz); mat3 Rs = mat3( R[0].xyz / scale.x, R[1].xyz / scale.y, R[2].xyz / scale.z ); //transform our covariance into view space //ensures orientation is correct mat3 Vrk_view = Rs * Vrk * transpose(Rs); 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); ivec2 posCoord = ivec2((texIdx & 0x3ffu) << 1, texIdx >> 10); 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(((texIdx & 0x3ffu) << 1) | 1u, texIdx >> 10); 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); //we can still apply scale here even though cov3d is pre-computed Vrk *= u_splatScale; 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; v_splitDirection = u_splitDirection; }`;var kL=`// // Fragment shader for Gaussian splats. // Renders a Gaussian splat within a quad, discarding fragments outside the unit circle. // Applies an approximate Gaussian falloff based on distance from the center and outputs // a color modulated by the alpha and Gaussian weight. // void main() { if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard; if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard; mediump float A = dot(v_vertPos, v_vertPos); if(A > 1.0) { discard; } mediump float scale = 4.0; mediump float B = exp(-A * scale) * (v_splatColor.a); out_FragColor = vec4(v_splatColor.rgb * B, B); } `;var UL=new M,ehe=new M,b0=new M,pu={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4};function $de(e,t){return new Nt({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:$e.RGBA_INTEGER,pixelDatatype:Ve.UNSIGNED_INT,flipY:!1,sampler:nn.NEAREST})}function sf(e){e=e??V.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._splatScale=1,this._prevViewMatrix=new M,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.gaussianSplatTexture=void 0,this._lastTextureWidth=0,this._lastTextureHeight=0,this._vertexArray=void 0,this._vertexArrayLen=-1,this._splitDirection=Tr.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._ready=!1,this._hasGaussianSplatTexture=!1,this._gaussianSplatTexturePending=!1,this._drawCommand=void 0,this._rootTransform=void 0,this._axisCorrectionMatrix=vt.getAxisCorrectionMatrix(fo.Y,fo.X,new M),this._isDestroyed=!1,this._sorterState=pu.IDLE,this._sorterPromise=void 0,this._sorterError=void 0}Object.defineProperties(sf.prototype,{ready:{get:function(){return this._ready}},splatScale:{get:function(){return this._splatScale},set:function(e){this._splatScale=e}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});sf.prototype._wrappedUpdate=function(e){this._baseTilesetUpdate.call(this._tileset,e),this.update(e)};sf.prototype.destroy=function(){this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,l(this.gaussianSplatTexture)&&(this.gaussianSplatTexture.destroy(),this.gaussianSplatTexture=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),ue(this)};sf.prototype.isDestroyed=function(){return this._isDestroyed};sf.prototype.onTileLoad=function(e){this._dirty=!0};sf.prototype.onTileVisible=function(e){};sf.transformTile=function(e){let t=e.computedTransform,n=e.content.splatPrimitive,i=e.tileset.gaussianSplatPrimitive,o=M.multiplyTransformation(t,i._axisCorrectionMatrix,UL);M.multiplyTransformation(o,e.content.worldTransform,o);let r=M.multiply(e.tileset.modelMatrix,M.fromArray(e.tileset.root.transform),ehe),s=M.inverse(r,b0),a=M.multiplyTransformation(s,o,UL),c=e.content._originalPositions,u=e.content._originalRotations,f=e.content._originalScales,h=vt.getAttributeBySemantic(n,rt.POSITION).typedArray,p=vt.getAttributeBySemantic(n,rt.ROTATION).typedArray,g=vt.getAttributeBySemantic(n,rt.SCALE).typedArray,m=new d,_=new Fe,y=new d;for(let C=0;C<c.length/3;++C)m.x=c[C*3],m.y=c[C*3+1],m.z=c[C*3+2],_.x=u[C*4],_.y=u[C*4+1],_.z=u[C*4+2],_.w=u[C*4+3],y.x=f[C*3],y.y=f[C*3+1],y.z=f[C*3+2],M.fromTranslationQuaternionRotationScale(m,_,y,b0),M.multiplyTransformation(a,b0,b0),M.getTranslation(b0,m),M.getRotation(b0,_),M.getScale(b0,y),h[C*3]=m.x,h[C*3+1]=m.y,h[C*3+2]=m.z,p[C*4]=_.x,p[C*4+1]=_.y,p[C*4+2]=_.z,p[C*4+3]=_.w,g[C*3]=y.x,g[C*3+1]=y.y,g[C*3+2]=y.z};sf.generateSplatTexture=function(e,t){e._gaussianSplatTexturePending=!0;let n=OL.generateFromAttributes({attributes:{positions:new Float32Array(e._positions),scales:new Float32Array(e._scales),rotations:new Float32Array(e._rotations),colors:new Uint8Array(e._colors)},count:e._numSplats});if(!l(n)){e._gaussianSplatTexturePending=!1;return}n.then(i=>{if(!e._gaussianSplatTexture)e.gaussianSplatTexture=$de(t.context,i);else if(e._lastTextureHeight!==i.height||e._lastTextureWidth!==i.width){let o=e.gaussianSplatTexture;e._gaussianSplatTexture=$de(t.context,i),o.destroy()}else e.gaussianSplatTexture.copyFrom({source:{width:i.width,height:i.height,arrayBufferView:i.data}});e._lastTextureHeight=i.height,e._lastTextureWidth=i.width,e._hasGaussianSplatTexture=!0,e._needsGaussianSplatTexture=!1,e._gaussianSplatTexturePending=!1,(!l(e._indexes)||e._indexes.length<e._numSplats)&&(e._indexes=new Uint32Array(e._numSplats));for(let o=0;o<e._numSplats;++o)e._indexes[o]=o}).catch(i=>{console.error("Error generating Gaussian splat texture:",i),e._gaussianSplatTexturePending=!1})};sf.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new FL(e),{shaderBuilder:o}=i,r=i.renderStateOptions;r.cull.enabled=!1,r.depthMask=!1,r.depthTest.enabled=!0,r.blending=An.PRE_MULTIPLIED_ALPHA_BLEND,i.alphaOptions.pass=Be.GAUSSIAN_SPLATS,o.addAttribute("vec2","a_screenQuadPosition"),o.addAttribute("float","a_splatIndex"),o.addVarying("vec4","v_splatColor"),o.addVarying("vec2","v_vertPos"),o.addUniform("float","u_splitDirection",Ae.VERTEX),o.addVarying("float","v_splitDirection"),o.addUniform("highp usampler2D","u_splatAttributeTexture",Ae.VERTEX),o.addUniform("float","u_splatScale",Ae.VERTEX);let s=i.uniformMap;s.u_splatScale=function(){return e.splatScale},s.u_splatAttributeTexture=function(){return e.gaussianSplatTexture},s.u_splitDirection=function(){return e.splitDirection},i.instanceCount=e._numSplats,i.count=4,i.primitiveType=Ne.TRIANGLE_STRIP,o.addVertexLines(QL),o.addFragmentLines(kL);let a=o.buildShaderProgram(t.context),c=je(Ge.fromCache(i.renderStateOptions),!0);c.cull.face=vt.getCullFace(n.modelMatrix,Ne.TRIANGLE_STRIP),c=Ge.fromCache(c);let u={screenQuadPosition:0,splatIndex:2},f=new bn.Attribute;if(f.name="_SPLAT_INDEXES",f.typedArray=e._indexes,f.componentDatatype=q.UNSIGNED_INT,f.type=Ht.SCALAR,f.normalized=!1,f.count=i.instanceCount,f.constant=0,f.instanceDivisor=1,!l(e._vertexArray)||e._indexes.length>e._vertexArrayLen){let g=new ht({attributes:{screenQuadPosition:new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...f,variableName:"splatIndex"}},primitiveType:Ne.TRIANGLE_STRIP});e._vertexArray=ri.fromGeometry({context:t.context,geometry:g,attributeLocations:u,bufferUsage:Ue.DYNAMIC_DRAW,interleave:!1})}else e._vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(e._indexes);e._vertexArrayLen=e._indexes.length;let h=M.multiply(n.modelMatrix,M.fromArray(n.root.transform),ehe),p=new nt({boundingVolume:n.boundingSphere,modelMatrix:h,uniformMap:s,renderState:c,vertexArray:e._vertexArray,shaderProgram:a,cull:r.cull.enabled,pass:Be.GAUSSIAN_SPLATS,count:i.count,owner:this,instanceCount:i.instanceCount,primitiveType:Ne.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=p};sf.prototype.update=function(e){let t=this._tileset;if(l(this._rootTransform)||(this._rootTransform=t.root.computedTransform),this._drawCommand&&e.commandList.push(this._drawCommand),t._modelMatrixChanged){this._dirty=!0;return}if(e.passes.pick!==!0){if(this.splitDirection!==t.splitDirection&&(this.splitDirection=t.splitDirection),this._sorterState===pu.IDLE){if(!this._dirty&&M.equals(e.camera.viewMatrix,this._prevViewMatrix))return;if(t._selectedTiles.length!==0&&t._selectedTiles.length!==this.selectedTileLength){this._numSplats=0,this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,this._needsGaussianSplatTexture=!0,this._gaussianSplatTexturePending=!1;let n=t._selectedTiles,i=n.reduce((r,s)=>r+s.content.pointsLength,0),o=(r,s)=>{let a,c=0;for(let u of n){let f=u.content.splatPrimitive,h=s(f);l(a)||(a=q.createTypedArray(r,i*Ht.getNumberOfComponents(h.type))),a.set(h.typedArray,c),c+=h.typedArray.length}return a};this._positions=o(q.FLOAT,r=>vt.getAttributeBySemantic(r,rt.POSITION)),this._scales=o(q.FLOAT,r=>vt.getAttributeBySemantic(r,rt.SCALE)),this._rotations=o(q.FLOAT,r=>vt.getAttributeBySemantic(r,rt.ROTATION)),this._colors=o(q.UNSIGNED_BYTE,r=>vt.getAttributeBySemantic(r,rt.COLOR)),this._numSplats=i,this.selectedTileLength=t._selectedTiles.length}if(this._numSplats===0)return;if(this._needsGaussianSplatTexture){this._gaussianSplatTexturePending||sf.generateSplatTexture(this,e);return}if(M.clone(e.camera.viewMatrix,this._prevViewMatrix),M.multiply(e.camera.viewMatrix,this._rootTransform,UL),l(this._sorterPromise)||(this._sorterPromise=ET.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(UL),count:this._numSplats},sortType:"Index"})),!l(this._sorterPromise)){this._sorterState=pu.WAITING;return}this._sorterPromise.catch(n=>{this._sorterState=pu.ERROR,this._sorterError=n}),this._sorterPromise.then(n=>{this._indexes=n,this._sorterState=pu.SORTED})}else if(this._sorterState===pu.WAITING){if(l(this._sorterPromise)||(this._sorterPromise=ET.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(UL),count:this._numSplats},sortType:"Index"})),!l(this._sorterPromise)){this._sorterState=pu.WAITING;return}this._sorterPromise.catch(n=>{this._sorterState=pu.ERROR,this._sorterError=n}),this._sorterPromise.then(n=>{this._indexes=n,this._sorterState=pu.SORTED}),this._sorterState=pu.SORTING}else{if(this._sorterState===pu.SORTING)return;if(this._sorterState===pu.SORTED)sf.buildGSplatDrawCommand(this,e),this._sorterState=pu.IDLE,this._dirty=!1,this._sorterPromise=void 0;else if(this._sorterState===pu.ERROR)throw this._sorterError}this._dirty=!1}};var IT=sf;function _d(e,t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._loader=e,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new IT({tileset:this._tileset})),this._originalPositions=void 0,this._originalRotations=void 0,this._originalScales=void 0,this.splatPrimitive=void 0,this.worldTransform=void 0,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1,this._transformed=!1}Object.defineProperties(_d.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return this.splatPrimitive.attributes[0].count}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this.splatPrimitive.attributes.reduce((e,t)=>e+t.byteLength,0)}},texturesByteLength:{get:function(){let e=this._tileset.gaussianSplatPrimitive.gaussianSplatTexture,t=this._tileset.gaussianSplatPrimitive.selectedTileLength;return!l(e)||t===0?0:e.sizeInBytes/t}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},transformed:{get:function(){return this._transformed}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});_d.fromGltf=async function(e,t,n,i){let o=n,r=we.createIfNeeded(o),s={releaseGltfJson:!1,upAxis:fo.Y,forwardAxis:fo.Z};l(i.asset)?(s.gltfJson=i,s.baseResource=r,s.gltfResource=r):i instanceof Uint8Array?(s.typedArray=i,s.baseResource=r,s.gltfResource=r):s.gltfResource=we.createIfNeeded(i);let a=new Zu(s);try{await a.load()}catch(c){throw a.destroy(),new ce(`Failed to load glTF: ${c.message}`)}return new _d(a,e,t,n)};_d.prototype.update=function(e,t){let n=this._loader;if(this._ready){!this._transformed&&e.root.content.ready&&(IT.transformTile(this._tile),this._transformed=!0);return}if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){this.splatPrimitive=n.components.scene.nodes[0].primitives[0],this.worldTransform=n.components.scene.nodes[0].matrix,this._ready=!0,this._originalPositions=new Float32Array(vt.getAttributeBySemantic(this.splatPrimitive,rt.POSITION).typedArray),this._originalRotations=new Float32Array(vt.getAttributeBySemantic(this.splatPrimitive,rt.ROTATION).typedArray),this._originalScales=new Float32Array(vt.getAttributeBySemantic(this.splatPrimitive,rt.SCALE).typedArray);return}this._resourcesLoaded=n.process(t)};_d.prototype.hasProperty=function(e,t){return!1};_d.prototype.getFeature=function(e){};_d.prototype.applyDebugSettings=function(e,t){};_d.prototype.applyStyle=function(e){};_d.prototype.pick=function(e,t,n){};_d.prototype.isDestroyed=function(){return this.isDestroyed};_d.prototype.destroy=function(){return this.splatPrimitive=void 0,this._tileset.gaussianSplatPrimitive.destroy(),this._tileset.gaussianSplatPrimitive=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,l(this._loader)&&(this._loader.destroy(),this._loader=void 0),ue(this)};var xT=_d;var the={b3dm:function(e,t,n,i,o){return nf.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return nf.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return nf.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return VR.fromTileType(e,t,n,i,o,the)},externalTileset:function(e,t,n,i){return dL.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new jR(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new LL(e,t,n,i,o)},subt:function(e,t,n,i,o){return Pb.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return Pb.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new ce("Invalid glb content");let a=new DataView(i,o).getUint32(8,!0),c=new Uint8Array(i,o,a),u=!1;return e.isGltfExtensionRequired instanceof Function&&(u=e.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")),u?xT.fromGltf(e,t,n,c):nf.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){let o=e.debugTreatTilesetAsGaussianSplats??!1,r=!1;return e.isGltfExtensionRequired instanceof Function&&(r=e.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")),o||r?xT.fromGltf(e,t,n,i):nf.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return nf.fromGeoJson(e,t,n,i)}},T0=the;var eJe={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5},or=Object.freeze(eJe);var jh={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"};jh.isBinaryFormat=function(e){switch(e){case jh.BATCHED_3D_MODEL:case jh.INSTANCED_3D_MODEL:case jh.COMPOSITE:case jh.POINT_CLOUD:case jh.VECTOR:case jh.GEOMETRY:case jh.IMPLICIT_SUBTREE:case jh.VOXEL_BINARY:case jh.GLTF_BINARY:return!0;default:return!1}};var Ys=Object.freeze(jh);var tJe={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0},yd=Object.freeze(tJe);var ga={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},cg=new Array(ga.NUMBER_OF_PASSES);cg[ga.RENDER]=Object.freeze({pass:ga.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});cg[ga.PICK]=Object.freeze({pass:ga.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});cg[ga.SHADOW]=Object.freeze({pass:ga.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});cg[ga.PRELOAD]=Object.freeze({pass:ga.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});cg[ga.PRELOAD_FLIGHT]=Object.freeze({pass:ga.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});cg[ga.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:ga.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});cg[ga.MOST_DETAILED_PRELOAD]=Object.freeze({pass:ga.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});cg[ga.MOST_DETAILED_PICK]=Object.freeze({pass:ga.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});ga.getPassOptions=function(e){return cg[e]};var Ko=Object.freeze(ga);function cp(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(cp.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){}}});cp.prototype.hasProperty=function(e,t){return!1};cp.prototype.getFeature=function(e){};cp.prototype.applyDebugSettings=function(e,t){};cp.prototype.applyStyle=function(e){};cp.prototype.update=function(e,t){};cp.prototype.pick=function(e,t,n){};cp.prototype.isDestroyed=function(){return!1};cp.prototype.destroy=function(){return ue(this)};var bT=cp;function lg(e){e=e??V.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(lg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});lg.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};lg.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};lg.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};lg.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};lg.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};lg.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};lg.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var GL=lg;function BY(e,t){let n=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){BY._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??V.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new GL({content:n,class:o})}}BY._oneTimeWarning=yt;var S0=BY;function nJe(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,o=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"].group:t.group;if(typeof o=="number")return i[o];let r=n.groupIds.findIndex(function(s){return s===o});return r>=0?i[r]:void 0}var w0=nJe;function ug(e){e=e??V.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(ug.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});ug.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};ug.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};ug.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};ug.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};ug.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};ug.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};ug.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var zL=ug;function DY(e,t){let n=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){DY._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??V.EMPTY_OBJECT;if(l(n.class)){let o=i[n.class];return new zL({tile:n,class:o})}}DY._oneTimeWarning=yt;var VL=DY;function iJe(e){let t=new Uint8Array(e),n=bh(t);if(n==="glTF"&&(n="glb"),Ys.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=oJe(t);if(l(i.root))return{contentType:Ys.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:Ys.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:Ys.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:Ys.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:Ys.VOXEL_JSON,jsonPayload:i};throw new ce("Invalid tile content.")}function oJe(e){let t;try{t=hr(e)}catch{throw new ce("Invalid tile content.")}return t}var fg=iJe;function Cd(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=l(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;s<r;s++){let a=n.getDerivedResource({url:o[s].uri}),c=wc.getServerKey(a.getUrlComponent());this._innerContentResources[s]=a,this._serverKeys[s]=c}}Object.defineProperties(Cd.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._contentsCreated?this._ready:!1}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(){}},batchTable:{get:function(){}},group:{get:function(){},set:function(){}},innerContentUrls:{get:function(){return this._innerContentHeaders.map(function(e){return e.uri})}}});function vY(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function nhe(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)}Cd.prototype.requestInnerContents=function(){if(!rJe(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let e=this._innerContentHeaders;vY(this,e.length);let t=this._cancelCount;for(let n=0;n<e.length;n++)this._arrayFetchPromises[n]=sJe(this,n,t,this._tile._contentState);return aJe(this)};function rJe(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)&&!wc.serverHasOpenSlots(n,t[n]))return!1;return wc.heapHasOpenSlots(e.length)}function sJe(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,s=function(){return r._priority},a=e._serverKeys[t],c=new ar({throttle:!0,throttleByServer:!0,type:ws.TILES3D,priorityFunction:s,serverKey:a});o.request=c,e._requests[t]=c;let u=o.fetchArrayBuffer();if(l(u))return u.then(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===li.CANCELLED){nhe(e,i);return}return vY(e,-1),f}}).catch(function(f){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===li.CANCELLED){nhe(e,i);return}vY(e,-1),ihe(e,t,f)}})}async function aJe(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,s)=>cJe(e,r,s)),o=await Promise.all(i);if(e._contentsCreated=!0,e._contents=o.filter(l),e._externalTilesetCount===e._contents.length){let r=e._tile;r.hasRenderableContent=!1}return o}async function cJe(e,t,n){if(l(t))try{let i=fg(t),o=e._tileset,r=e._innerContentResources[n],s=e._tile;i.contentType===Ys.EXTERNAL_TILESET&&(e._externalTilesetCount++,s.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===Ys.GEOMETRY||i.contentType===Ys.VECTOR;let a,c=T0[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(o,s,r,i.jsonPayload));let u=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let h=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=h.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=S0(o,u));let f=w0(o,u);return l(f)&&(a.group=new ME({metadata:f})),a}catch(i){ihe(e,n,i)}}function ihe(e,t,n){let i=e._tileset,o=e._innerContentResources[t].url,r=l(n.message)?n.message:n.toString();i.tileFailed.numberOfListeners>0?i.tileFailed.raiseEvent({url:o,message:r}):(console.log(`A content failed to load: ${o}`),console.log(`Error: ${r}`))}Cd.prototype.cancelRequests=function(){for(let e=0;e<this._requests.length;e++){let t=this._requests[e];l(t)&&t.cancel()}};Cd.prototype.hasProperty=function(e,t){return!1};Cd.prototype.getFeature=function(e){};Cd.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};Cd.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};Cd.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};Cd.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let c=r[a].pick(e,t,n);if(!l(c))continue;let u=d.distance(e.origin,c);u<o&&(i=c,o=u)}if(l(i))return n};Cd.prototype.isDestroyed=function(){return!1};Cd.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var HL=Cd;var ohe=Math.cos,rhe=Math.sin,lJe=Math.sqrt,PY={};PY.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,c=e.nwCorner,u=e.boundingRectangle,f=c.latitude-e.granYCos*i+o*e.granXSin,h=ohe(f),p=rhe(f),g=a.z*p,m=c.longitude+i*e.granYSin+o*e.granXCos,_=h*ohe(m),y=h*rhe(m),C=a.x*_,E=a.y*y,I=lJe(C*_+E*y+g*p);if(r.x=C/I,r.y=E/I,r.z=g/I,n){let b=e.stNwCorner;l(b)?(f=b.latitude-e.stGranYCos*i+o*e.stGranXSin,m=b.longitude+i*e.stGranYSin+o*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 uJe=new ki,Ed=new d,fJe=new me,sV=new d,WL=new Qi;function she(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,u=n*a,f=Math.sin(t),h=i*f,p=n*f;WL._ellipsoid=ne.default,Ed=WL.project(e,Ed),Ed=d.subtract(Ed,sV,Ed);let g=ki.fromRotation(t,uJe);Ed=ki.multiplyByVector(g,Ed,Ed),Ed=d.add(Ed,sV,Ed),e=WL.unproject(Ed,e),r-=1,s-=1;let m=e.latitude,_=m+r*p,y=m-c*s,C=m-c*s+r*p,E=Math.max(m,_,y,C),I=Math.min(m,_,y,C),b=e.longitude,S=b+r*u,B=b+s*h,v=b+s*h+r*u,P=Math.max(b,S,B,v),N=Math.min(b,S,B,v);return{north:E,south:I,east:P,west:N,granYCos:c,granYSin:h,granXCos:u,granXSin:p,nwCorner:e}}PY.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,u=e.north,f=e.south,h=!1,p=!1;u===D.PI_OVER_TWO&&(h=!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 _=Math.ceil(g/t)+1,y=Math.ceil(m/t)+1,C=g/(_-1),E=m/(y-1),I=ae.northwest(e,r),b=ae.center(e,fJe);(n!==0||i!==0)&&(b.longitude<I.longitude&&(b.longitude+=D.TWO_PI),WL._ellipsoid=ne.default,sV=WL.project(b,sV));let S=E,B=C,v=0,P=0,N=ae.clone(e,o),L={granYCos:S,granYSin:v,granXCos:B,granXSin:P,nwCorner:I,boundingRectangle:N,width:_,height:y,northCap:h,southCap:p};if(n!==0){let A=she(I,n,C,E,b,_,y);u=A.north,f=A.south,a=A.east,c=A.west,L.granYCos=A.granYCos,L.granYSin=A.granYSin,L.granXCos=A.granXCos,L.granXSin=A.granXSin,N.north=u,N.south=f,N.east=a,N.west=c}if(i!==0){n=n-i;let A=ae.northwest(N,s),x=she(A,n,C,E,b,_,y);L.stGranYCos=x.granYCos,L.stGranXCos=x.granXCos,L.stGranYSin=x.granYSin,L.stGranXSin=x.granXSin,L.stNwCorner=A,L.stWest=x.west,L.stSouth=x.south}return L};var qs=PY;var dJe=new le,hJe=new le,mJe=new d,pJe=new ae;function ahe(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,c=2,u=0,f=4;r&&(c-=1,a-=1,u+=1,f-=2),s&&(c-=1,a-=1,u+=1,f-=2),u+=c*o+2*a-f;let h=new Float64Array(u*3),p=0,g=0,m,_=mJe;if(r)qs.computePosition(t,n,!1,g,0,_),h[p++]=_.x,h[p++]=_.y,h[p++]=_.z;else for(m=0;m<o;m++)qs.computePosition(t,n,!1,g,m,_),h[p++]=_.x,h[p++]=_.y,h[p++]=_.z;for(m=o-1,g=1;g<i;g++)qs.computePosition(t,n,!1,g,m,_),h[p++]=_.x,h[p++]=_.y,h[p++]=_.z;if(g=i-1,!s)for(m=o-2;m>=0;m--)qs.computePosition(t,n,!1,g,m,_),h[p++]=_.x,h[p++]=_.y,h[p++]=_.z;for(m=0,g=i-2;g>0;g--)qs.computePosition(t,n,!1,g,m,_),h[p++]=_.x,h[p++]=_.y,h[p++]=_.z;let y=h.length/3*2,C=Qe.createTypedArray(h.length/3,y),E=0;for(let b=0;b<h.length/3-1;b++)C[E++]=b,C[E++]=b+1;C[E++]=h.length/3-1,C[E++]=0;let I=new ht({attributes:new Cn,primitiveType:Ne.LINES});return I.attributes.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:h}),I.indices=C,I}function AJe(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=ahe(e,t),s=t.height,a=t.width,c=yi.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),u=c.length,f=new Float64Array(u*2);f.set(c);let h=yi.scaleToGeodeticHeight(r.attributes.position.values,i,o);f.set(h,u),r.attributes.position.values=f;let p=t.northCap,g=t.southCap,m=4;p&&(m-=1),g&&(m-=1);let _=(f.length/3+m)*2,y=Qe.createTypedArray(f.length/3,_);u=f.length/6;let C=0;for(let I=0;I<u-1;I++)y[C++]=I,y[C++]=I+1,y[C++]=I+u,y[C++]=I+u+1;y[C++]=u-1,y[C++]=0,y[C++]=u+u-1,y[C++]=u,y[C++]=0,y[C++]=u;let E;if(p)E=s-1;else{let I=a-1;y[C++]=I,y[C++]=I+u,E=a+s-2}if(y[C++]=E,y[C++]=E+u,!g){let I=a+E-1;y[C++]=I,y[C]=I+u}return r.indices=y,r}function ST(e){e=e??V.EMPTY_OBJECT;let t=e.rectangle,n=e.granularity??D.RADIANS_PER_DEGREE,i=e.ellipsoid??ne.default,o=e.rotation??0,r=e.height??0,s=e.extrudedHeight??r;this._rectangle=ae.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}ST.packedLength=ae.packedLength+ne.packedLength+5;ST.pack=function(e,t,n){return n=n??0,ae.pack(e._rectangle,t,n),n+=ae.packedLength,ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=e._offsetAttribute??-1,t};var che=new ae,lhe=ne.clone(ne.UNIT_SPHERE),TT={rectangle:che,ellipsoid:lhe,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};ST.unpack=function(e,t,n){t=t??0;let i=ae.unpack(e,t,che);t+=ae.packedLength;let o=ne.unpack(e,t,lhe);t+=ne.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t];return l(n)?(n._rectangle=ae.clone(i,n._rectangle),n._ellipsoid=ne.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=u===-1?void 0:u,n):(TT.granularity=r,TT.height=s,TT.rotation=a,TT.extrudedHeight=c,TT.offsetAttribute=u===-1?void 0:u,new ST(TT))};var gJe=new me;ST.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=qs.computeOptions(t,e._granularity,e._rotation,0,pJe,gJe),o,r;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(o=AJe(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,g=new Uint8Array(p);e._offsetAttribute===dn.TOP?g=g.fill(1,0,p/2):(u=e._offsetAttribute===dn.NONE?0:1,g=g.fill(u)),o.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let f=le.fromRectangle3D(t,n,s,hJe),h=le.fromRectangle3D(t,n,a,dJe);r=le.union(f,h)}else{if(o=ahe(e,i),o.attributes.position.values=yi.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let f=o.attributes.position.values.length;u=e._offsetAttribute===dn.NONE?0:1;let h=new Uint8Array(f/3).fill(u);o.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}r=le.fromRectangle3D(t,n,s)}return new ht({attributes:o.attributes,indices:o.indices,primitiveType:Ne.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var B0=ST;function BT(e){this.rectangle=ae.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new d,this.northeastCornerCartesian=new d,this.westNormal=new d,this.southNormal=new d,this.eastNormal=new d,this.northNormal=new d;let t=e.ellipsoid??ne.WGS84;IJe(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(BT.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});BT.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=Qn.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=le.fromOrientedBoundingBox(this._orientedBoundingBox)};var uhe=new d,aV=new d,fhe=new d,_Je=new d,yJe=new d,CJe=new d,EJe=new d,Id=new me,dhe=new hn(d.UNIT_X,0),wT=new xn;function IJe(e,t,n){n.cartographicToCartesian(ae.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(ae.northeast(t),e.northeastCornerCartesian),Id.longitude=t.west,Id.latitude=(t.south+t.north)*.5,Id.height=0;let i=n.cartographicToCartesian(Id,CJe),o=d.cross(i,d.UNIT_Z,_Je);d.normalize(o,e.westNormal),Id.longitude=t.east;let r=n.cartographicToCartesian(Id,EJe),s=d.cross(d.UNIT_Z,r,uhe);d.normalize(s,e.eastNormal);let a=d.subtract(i,r,uhe);d.magnitude(a)===0&&(a=d.clone(o,a));let c=d.normalize(a,yJe),u=t.south,f;if(u>0){Id.longitude=(t.west+t.east)*.5,Id.latitude=u;let _=n.cartographicToCartesian(Id,wT.origin);d.clone(c,wT.direction);let y=hn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,dhe);fi.rayPlane(wT,y,e.southwestCornerCartesian),f=n.geodeticSurfaceNormal(_,aV)}else f=n.geodeticSurfaceNormalCartographic(ae.southeast(t),aV);let h=d.cross(f,a,fhe);d.normalize(h,e.southNormal);let p=t.north,g;if(p<0){Id.longitude=(t.west+t.east)*.5,Id.latitude=p;let _=n.cartographicToCartesian(Id,wT.origin);d.negate(c,wT.direction);let y=hn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,dhe);fi.rayPlane(wT,y,e.northeastCornerCartesian),g=n.geodeticSurfaceNormal(_,aV)}else g=n.geodeticSurfaceNormalCartographic(ae.northwest(t),aV);let m=d.cross(a,g,fhe);d.normalize(m,e.northNormal)}var xJe=new d,bJe=new d,TJe=new d(0,-1,0),SJe=new d(0,0,-1),hhe=new d;function wJe(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!ae.contains(e.rectangle,o)){let u=e.southwestCornerCartesian,f=e.northeastCornerCartesian,h=e.westNormal,p=e.southNormal,g=e.eastNormal,m=e.northNormal;t.mode!==oe.SCENE3D&&(u=t.mapProjection.project(ae.southwest(e.rectangle),xJe),u.z=u.y,u.y=u.x,u.x=0,f=t.mapProjection.project(ae.northeast(e.rectangle),bJe),f.z=f.y,f.y=f.x,f.x=0,h=TJe,g=d.UNIT_Y,p=SJe,m=d.UNIT_Z);let _=d.subtract(i,u,hhe),y=d.dot(_,h),C=d.dot(_,p),E=d.subtract(i,f,hhe),I=d.dot(E,g),b=d.dot(E,m);y>0?r+=y*y:I>0&&(r+=I*I),C>0?r+=C*C:b>0&&(r+=b*b)}let s,a,c;if(t.mode===oe.SCENE3D?(s=o.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let u=s-c;r+=u*u}else if(s<a){let u=a-s;r+=u*u}return Math.sqrt(r)}BT.prototype.distanceToCamera=function(e){let t=wJe(this,e);if(e.mode===oe.SCENE3D&&l(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};BT.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};BT.prototype.createDebugVolume=function(e){let t=new M.clone(M.IDENTITY),n=new B0({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new Rt({geometry:n,id:"outline",modelMatrix:t,attributes:{color:en.fromColor(e)}});return new kn({geometryInstances:i,appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})};var af=BT;var jL={},BJe=new d,mhe=new d,phe=new d,Ahe=new d,ghe=new Qn;jL.validOutline=function(e){let n=Qn.fromPoints(e,ghe).halfAxes,i=X.getColumn(n,0,mhe),o=X.getColumn(n,1,phe),r=X.getColumn(n,2,Ahe),s=d.magnitude(i),a=d.magnitude(o),c=d.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};jL.computeProjectTo2DArguments=function(e,t,n,i){let o=Qn.fromPoints(e,ghe),r=o.halfAxes,s=X.getColumn(r,0,mhe),a=X.getColumn(r,1,phe),c=X.getColumn(r,2,Ahe),u=d.magnitude(s),f=d.magnitude(a),h=d.magnitude(c),p=Math.min(u,f,h);if(u===0&&(f===0||h===0)||f===0&&h===0)return!1;let g,m;return(p===f||p===h)&&(g=s),p===u?g=a:p===h&&(m=a),(p===u||p===f)&&(m=c),d.normalize(g,n),d.normalize(m,i),d.clone(o.center,t),!0};function _he(e,t,n,i,o){let r=d.subtract(e,t,BJe),s=d.dot(n,r),a=d.dot(i,r);return U.fromElements(s,a,o)}jL.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=_he(i[r],e,t,n);return o}};jL.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return _he(i,e,t,n,o)}};var dg=jL;function DJe(e){let t=e.length,n=new Float64Array(t*3),i=Qe.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:n})});return new ht({attributes:s,indices:i,primitiveType:Ne.LINES})}function D0(e){e=e??V.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Zn.computeHierarchyPackedLength(t,d)+1}D0.fromPositions=function(e){e=e??V.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new D0(t)};D0.pack=function(e,t,n){return n=n??0,n=Zn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),t[n]=e.packedLength,t};var vJe={polygonHierarchy:{}};D0.unpack=function(e,t,n){t=t??0;let i=Zn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new D0(vJe)),n._polygonHierarchy=i,n.packedLength=o,n};D0.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Ro(n,d.equalsEpsilon,!0),n.length<3||!dg.validOutline(n))return;let o=Zn.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new Rt({geometry:DJe(o[c])});r.push(u)}let s=Vn.combineInstances(r)[0],a=le.fromPoints(t.positions);return new ht({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var xd=D0;var cV=new me;function YL(e){let t=DA.fromToken(e.token),n=e.minimumHeight??0,i=e.maximumHeight??0,o=e.ellipsoid??ne.WGS84;this.s2Cell=t,this.minimumHeight=n,this.maximumHeight=i,this.ellipsoid=o;let r=kJe(t,n,i,o);this._boundingPlanes=r;let s=VJe(r);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=kY(r[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=d.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=kY(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=kY(r[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();cV=o.cartesianToCartographic(c,cV),cV.height=(i+n)/2,this.center=o.cartographicToCartesian(cV,c),this._boundingSphere=le.fromPoints(s)}var PJe=new d,RJe=new me,MJe=new d,NJe=new me,LJe=new d,OJe=new d,FJe=new d,QJe=new d;function kJe(e,t,n,i){let o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,PJe),a=i.cartesianToCartographic(r,RJe);a.height=n;let c=i.cartographicToCartesian(a,MJe),u=hn.fromPointNormal(c,s);o[0]=u;let f=0,h,p=[],g,m;for(h=0;h<4;h++){g=e.getVertex(h),p[h]=g,m=i.cartesianToCartographic(g,NJe),m.height=t;let y=hn.getPointDistance(u,i.cartographicToCartesian(m,LJe));y<f&&(f=y)}let _=hn.clone(u);for(_.normal=d.negate(_.normal,_.normal),_.distance=_.distance*-1+f,o[1]=_,h=0;h<4;h++){g=p[h];let y=p[(h+1)%4],C=i.geodeticSurfaceNormal(g,OJe),E=d.subtract(y,g,QJe),I=d.cross(E,C,FJe);I=d.normalize(I,I),o[2+h]=hn.fromPointNormal(g,I)}return o}var v0=new d,P0=new d,R0=new d,RY=new d,MY=new d,NY=new d,UJe=new d,GJe=new d,zJe=new d,LY=new d,OY=new d,FY=new d,Iy=new d,lp=new X;function yhe(e,t,n){v0=e.normal,P0=t.normal,R0=n.normal,RY=d.multiplyByScalar(e.normal,-e.distance,RY),MY=d.multiplyByScalar(t.normal,-t.distance,MY),NY=d.multiplyByScalar(n.normal,-n.distance,NY),LY=d.multiplyByScalar(d.cross(P0,R0,UJe),d.dot(RY,v0),LY),OY=d.multiplyByScalar(d.cross(R0,v0,GJe),d.dot(MY,P0),OY),FY=d.multiplyByScalar(d.cross(v0,P0,zJe),d.dot(NY,R0),FY),lp[0]=v0.x,lp[1]=P0.x,lp[2]=R0.x,lp[3]=v0.y,lp[4]=P0.y,lp[5]=R0.y,lp[6]=v0.z,lp[7]=P0.z,lp[8]=R0.z;let i=X.determinant(lp);return Iy=d.add(LY,OY,Iy),Iy=d.add(Iy,FY,Iy),new d(Iy.x/i,Iy.y/i,Iy.z/i)}function VJe(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=yhe(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=yhe(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var QY=new d,DT=new d;function kY(e,t){let n=[];for(let i=0;i<4;i++)QY=d.subtract(t[(i+1)%4],t[i],QY),DT=d.cross(e.normal,QY,DT),DT=d.normalize(DT,DT),n[i]=d.clone(DT);return n}Object.defineProperties(YL.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var UY=new d;YL.prototype.distanceToCamera=function(e){let t=e.camera.positionWC,n=[],i=[],o;hn.getPointDistance(this._boundingPlanes[0],t)>0?(n.push(0),i.push(this._planeVertices[0]),o=this._edgeNormals[0]):hn.getPointDistance(this._boundingPlanes[1],t)>0&&(n.push(1),i.push(this._planeVertices[1]),o=this._edgeNormals[1]);let r,s;for(r=0;r<4;r++)s=2+r,hn.getPointDistance(this._boundingPlanes[s],t)>0&&(n.push(s),i.push(this._planeVertices[s]),o=this._edgeNormals[s]);if(n.length===0)return 0;let a,c;if(n.length===1)return c=this._boundingPlanes[n[0]],a=GY(hn.projectPointOntoPlane(c,t,UY),i[0],c,o),d.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=Che(t,p[0],p[1]),d.distance(a,t)}let f=Number.MAX_VALUE,h;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=GY(hn.projectPointOntoPlane(c,t,UY),i[r],c,this._edgeNormals[n[r]]),h=d.distanceSquared(a,t),h<f&&(f=h);return Math.sqrt(f)}else if(n.length>3)return a=GY(hn.projectPointOntoPlane(this._boundingPlanes[1],t,UY),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),d.distance(a,t);let u=n[1]===2&&n[2]===5?0:1;return n[0]===0?d.distance(t,this._vertices[(n[1]-2+u)%4]):d.distance(t,this._vertices[4+(n[1]-2+u)%4])};var HJe=new d,WJe=new d;function Che(e,t,n){let i=d.subtract(n,t,HJe),o=d.subtract(e,t,WJe),r=d.dot(i,o);if(r<=0)return t;let s=d.dot(i,i);return r>=s?n:(r=r/s,new d((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var jJe=new hn(d.UNIT_X,0);function GY(e,t,n,i){let o=Number.MAX_VALUE,r,s,a;for(let c=0;c<t.length;c++){let u=hn.fromPointNormal(t[c],i[c],jJe);hn.getPointDistance(u,e)<0||(a=Che(e,t[c],t[(c+1)%4]),r=d.distance(e,a),r<o&&(o=r,s=a))}return l(s)?s:e}YL.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)d.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?tn.INSIDE:n===this._vertices.length?tn.OUTSIDE:tn.INTERSECTING};YL.prototype.createDebugVolume=function(e){let t=new M.clone(M.IDENTITY),n=new xd({polygonHierarchy:{positions:this._planeVertices[0]}}),i=xd.createGeometry(n),o=new Rt({geometry:i,id:"outline",modelMatrix:t,attributes:{color:en.fromColor(e)}}),r=new xd({polygonHierarchy:{positions:this._planeVertices[1]}}),s=xd.createGeometry(r),a=new Rt({geometry:s,id:"outline",modelMatrix:t,attributes:{color:en.fromColor(e)}}),c=[];for(let u=0;u<4;u++){let f=new xd({polygonHierarchy:{positions:this._planeVertices[2+u]}}),h=xd.createGeometry(f);c[u]=new Rt({geometry:h,id:"outline",modelMatrix:t,attributes:{color:en.fromColor(e)}})}return new kn({geometryInstances:[c[0],c[1],c[2],c[3],a,o],appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})};var qL=YL;var YJe=new d(1,1,1),lV=Math.cos,uV=Math.sin;function vT(e){e=e??V.EMPTY_OBJECT;let t=e.radii??YJe,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??D.TWO_PI,r=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=d.clone(t),this._innerRadii=d.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}vT.packedLength=2*d.packedLength+8;vT.pack=function(e,t,n){return n=n??0,d.pack(e._radii,t,n),n+=d.packedLength,d.pack(e._innerRadii,t,n),n+=d.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 Ehe=new d,Ihe=new d,hg={radii:Ehe,innerRadii:Ihe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};vT.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t,Ehe);t+=d.packedLength;let o=d.unpack(e,t,Ihe);t+=d.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=d.clone(i,n._radii),n._innerRadii=d.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=h,n._offsetAttribute=p===-1?void 0:p,n):(hg.minimumClock=r,hg.maximumClock=s,hg.minimumCone=a,hg.maximumCone=c,hg.stackPartitions=u,hg.slicePartitions=f,hg.subdivisions=h,hg.offsetAttribute=p===-1?void 0:p,new vT(hg))};vT.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,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=ne.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/D.TWO_PI),f=Math.round(f*Math.abs(s-r)/D.PI),u<2&&(u=2),f<2&&(f=2);let h=0,p=1,g=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,_=!1;g&&(p=2,r>0&&(m=!0,h+=u),s<Math.PI&&(_=!0,h+=u));let y=a*p*(f+u),C=new Float64Array(y*3),E=2*(y+h-(u+f)*p),I=Qe.createTypedArray(y,E),b,S,B,v,P=0,N=new Array(f),L=new Array(f);for(b=0;b<f;b++)v=r+b*(s-r)/(f-1),N[b]=uV(v),L[b]=lV(v);let A=new Array(a),x=new Array(a);for(b=0;b<a;b++)B=i+b*(o-i)/(a-1),A[b]=uV(B),x[b]=lV(B);for(b=0;b<f;b++)for(S=0;S<a;S++)C[P++]=t.x*N[b]*x[S],C[P++]=t.y*N[b]*A[S],C[P++]=t.z*L[b];if(g)for(b=0;b<f;b++)for(S=0;S<a;S++)C[P++]=n.x*N[b]*x[S],C[P++]=n.y*N[b]*A[S],C[P++]=n.z*L[b];for(N.length=a,L.length=a,b=0;b<a;b++)v=r+b*(s-r)/(a-1),N[b]=uV(v),L[b]=lV(v);for(A.length=u,x.length=u,b=0;b<u;b++)B=i+b*(o-i)/(u-1),A[b]=uV(B),x[b]=lV(B);for(b=0;b<a;b++)for(S=0;S<u;S++)C[P++]=t.x*N[b]*x[S],C[P++]=t.y*N[b]*A[S],C[P++]=t.z*L[b];if(g)for(b=0;b<a;b++)for(S=0;S<u;S++)C[P++]=n.x*N[b]*x[S],C[P++]=n.y*N[b]*A[S],C[P++]=n.z*L[b];for(P=0,b=0;b<f*p;b++){let R=b*a;for(S=0;S<a-1;S++)I[P++]=R+S,I[P++]=R+S+1}let T=f*a*p;for(b=0;b<u;b++)for(S=0;S<a-1;S++)I[P++]=T+b+S*u,I[P++]=T+b+(S+1)*u;if(g)for(T=f*a*p+u*a,b=0;b<u;b++)for(S=0;S<a-1;S++)I[P++]=T+b+S*u,I[P++]=T+b+(S+1)*u;if(g){let R=f*a*p,O=R+a*u;if(m)for(b=0;b<u;b++)I[P++]=R+b,I[P++]=O+b;if(_)for(R+=a*u-u,O+=a*u-u,b=0;b<u;b++)I[P++]=R+b,I[P++]=O+b}let w=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:C})});if(l(e._offsetAttribute)){let R=C.length,O=e._offsetAttribute===dn.NONE?0:1,k=new Uint8Array(R/3).fill(O);w.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:k})}return new ht({attributes:w,indices:I,primitiveType:Ne.LINES,boundingSphere:le.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var cf=vT;function PT(e){let t=e.radius??1,i={radii:new d(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new cf(i),this._workerName="createSphereOutlineGeometry"}PT.packedLength=cf.packedLength;PT.pack=function(e,t,n){return cf.pack(e._ellipsoidGeometry,t,n)};var qJe=new cf,M0={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};PT.unpack=function(e,t,n){let i=cf.unpack(e,t,qJe);return M0.stackPartitions=i._stackPartitions,M0.slicePartitions=i._slicePartitions,M0.subdivisions=i._subdivisions,l(n)?(d.clone(i._radii,M0.radii),n._ellipsoidGeometry=new cf(M0),n):(M0.radius=i._radii.x,new PT(M0))};PT.createGeometry=function(e){return cf.createGeometry(e._ellipsoidGeometry)};var mg=PT;function RT(e,t){t===0&&(t=D.EPSILON7),this._boundingSphere=new le(e,t)}Object.defineProperties(RT.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}}});RT.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,d.distance(t.center,e.camera.positionWC)-t.radius)};RT.prototype.intersectPlane=function(e){return le.intersectPlane(this._boundingSphere,e)};RT.prototype.update=function(e,t){d.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};RT.prototype.createDebugVolume=function(e){let t=new mg({radius:this.radius}),n=M.fromTranslation(this.center,new M.clone(M.IDENTITY)),i=new Rt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:en.fromColor(e)}});return new kn({geometryInstances:i,appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})};var pg=RT;var KJe=new d,XJe=new d,JJe=new d,ZJe=new d;function N0(e,t,n){n=d.cross(e,t,n);let i=d.magnitude(n);return d.multiplyByScalar(n,D.EPSILON7/i,n)}function zY(e,t){let n=d.normalize(e,ZJe),i=d.equalsEpsilon(n,d.UNIT_X,D.EPSILON6)?d.UNIT_Y:d.UNIT_X;return N0(e,i,t)}function xhe(e){let t=X.getColumn(e,0,KJe),n=X.getColumn(e,1,XJe),i=X.getColumn(e,2,JJe),o=d.equals(t,d.ZERO),r=d.equals(n,d.ZERO),s=d.equals(i,d.ZERO);return!o&&!r&&!s?e:o&&r&&s?(e[0]=D.EPSILON7,e[4]=D.EPSILON7,e[8]=D.EPSILON7,e):(o&&!r&&!s?t=N0(n,i,t):!o&&r&&!s?n=N0(t,i,n):!o&&!r&&s?i=N0(n,t,i):o?r?s||(t=zY(i,t),n=N0(i,t,n)):(t=zY(n,t),i=N0(n,t,i)):(n=zY(t,n),i=N0(n,t,i)),X.setColumn(e,0,t,e),X.setColumn(e,1,n,e),X.setColumn(e,2,i,e),e)}function MT(e,t){t=xhe(t),this._orientedBoundingBox=new Qn(e,t),this._boundingSphere=le.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(MT.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});MT.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};MT.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};MT.prototype.update=function(e,t){d.clone(e,this._orientedBoundingBox.center),t=xhe(t),X.clone(t,this._orientedBoundingBox.halfAxes),le.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};MT.prototype.createDebugVolume=function(e){let t=new mh({minimum:new d(-1,-1,-1),maximum:new d(1,1,1)}),n=M.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new Rt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:en.fromColor(e)}});return new kn({geometryInstances:i,appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})};var Au=MT;function Ar(e,t,n,i){this._tileset=e,this._header=n;let o=l(n.contents),r=o&&n.contents.length>1||_i(n,"3DTILES_multiple_contents"),s=o&&!r?n.contents[0]:n.content;this._contentHeader=s,this.transform=l(n.transform)?M.unpack(n.transform):M.clone(M.IDENTITY);let a=l(i)?i.computedTransform:e.modelMatrix,c=M.multiply(a,this.transform,new M),u=l(i)?i._initialTransform:M.IDENTITY;this._initialTransform=M.multiply(u,this.transform,new M),this.computedTransform=c,this.metadata=VL(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 h;l(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,Ar._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")&&Ar._deprecationWarning("lowercase-refine",`This tile uses a lowercase refine "${n.refine}". Instead use "${n.refine.toUpperCase()}".`),p=n.refine.toUpperCase()==="REPLACE"?nr.REPLACE:nr.ADD):l(i)?p=i.refine:p=nr.REPLACE,this.refine=p,this.children=[],this.parent=i;let g,m=!1,_,y,C;if(t=we.createIfNeeded(t),r)_=or.UNLOADED,y=t.clone();else if(l(s)){let S=s.uri;l(s.url)&&(Ar._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),S=s.url),S===""?(Ar._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 bT(e,this),m=!0,_=or.READY):(_=or.UNLOADED,y=t.getDerivedResource({url:S}),C=wc.getServerKey(y.getUrlComponent()))}else g=new bT(e,this),m=!0,_=or.READY;this._content=g,this._contentResource=y,this._contentState=_,this._expiredContent=void 0,this._serverKey=C,this.hasEmptyContent=m,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasRenderableContent=!m,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let E=n.expire,I,b;l(E)&&(I=E.duration,l(E.date)&&(b=K.fromIso8601(E.date))),this.expireDuration=I,this.expireDate=b,this.lastStyleTime=0,this._optimChildrenWithinParent=yd.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!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=G.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}Ar._deprecationWarning=Vs;Object.defineProperties(Ar.prototype,{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 G),G.clone(this._color)},set:function(e){this._color=G.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===or.READY}},contentUnloaded:{get:function(){return this._contentState===or.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===or.EXPIRED}},contentFailed:{get:function(){return this._contentState===or.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var xy=new d;function $Je(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=d.multiplyByScalar(s.directionWC,e._centerZDepth,xy),c=d.add(s.positionWC,a,xy),u=d.subtract(c,r,xy);if(d.magnitude(u)>o){let b=d.normalize(u,xy),S=d.multiplyByScalar(b,o,xy),B=d.add(r,S,xy),v=d.subtract(B,s.positionWC,xy),P=d.normalize(v,xy);e._foveatedFactor=1-Math.abs(d.dot(s.directionWC,P))}else e._foveatedFactor=0;let p=e.refine===nr.REPLACE,g=n.isSkippingLevelOfDetail;if(p&&!g||!n.foveatedScreenSpaceError||n.foveatedConeSize===1||e._priorityProgressiveResolution&&p&&g||n._pass===Ko.PRELOAD_FLIGHT||n._pass===Ko.PRELOAD)return!1;let m=1-Math.cos(s.frustum.fov*.5),_=n.foveatedConeSize*m;if(e._foveatedFactor<=_)return!1;let y=m-_,C=D.clamp((e._foveatedFactor-_)/y,0,1),E=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,C),I=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-E<=I}var Bhe=new K;Ar.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=n??1,r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,u=a.frustum,f=c.drawingBufferWidth,h=c.drawingBufferHeight*o,p;if(e.mode===oe.SCENE2D||u instanceof mn){let g=u.offCenterFrustum;l(g)&&(u=g);let m=Math.max(u.top-u.bottom,u.right-u.left)/Math.max(f,h);p=s/m}else{let g=Math.max(this._distanceToCamera,D.EPSILON7),m=u.sseDenominator;if(p=s*h/(g*m),i.dynamicScreenSpaceError){let _=i._dynamicScreenSpaceErrorComputedDensity,y=i.dynamicScreenSpaceErrorFactor,C=D.fog(g,_)*y;p-=C}}return p/=e.pixelRatio,p};function eZe(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;let n=e.memoryAdjustedScreenSpaceError,i=t._screenSpaceErrorProgressiveResolution>n;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;let o=t.parent,r=t._screenSpaceErrorProgressiveResolution<=n,s=l(o)&&o._screenSpaceErrorProgressiveResolution>n;return r&&s&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}function tZe(e,t){let n=t.parent,o=l(n)&&(!e.isSkippingLevelOfDetail||t._screenSpaceError===0||n.hasTilesetContent||n.hasImplicitContent)?n._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-o}Ar.prototype.updateVisibility=function(e){let{parent:t,tileset:n}=this;if(this._updatedVisibilityFrame===n._updatedVisibilityFrame)return;let i=l(t)?t.computedTransform:n.modelMatrix,o=l(t)?t._visibilityPlaneMask:vs.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,o),this._visible=this._visibilityPlaneMask!==vs.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=tZe(n,this),this._priorityProgressiveResolution=eZe(n,this),this.priorityDeferred=$Je(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};Ar.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=K.now(Bhe);K.lessThan(this.expireDate,e)&&(this._contentState=or.EXPIRED,this._expiredContent=this._content)}};function nZe(e){if(!l(e.expireDuration))return;let t=K.now(Bhe);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 iZe(e){return function(){return e._priority}}Ar.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?oZe(this):sZe(this)};function oZe(e){let t=e._content,n=e._tileset;if(!l(t)){let o=_i(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new HL(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=or.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=or.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=or.FAILED,o})}async function rZe(e,t,n,i,o){let r=e._contentState;e._contentState=or.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===li.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=or.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===li.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await aZe(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=or.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=or.FAILED,a}}function sZe(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new ar({throttle:!0,throttleByServer:!0,type:ws.TILES3D,priorityFunction:iZe(e),serverKey:e._serverKey});e._request=i,t.request=i;let o=e._tileset,r=t.fetchArrayBuffer();if(!l(r)){++o.statistics.numberOfAttemptedRequests;return}return rZe(e,o,i,n,r)}async function aZe(e,t){let n=fg(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===Ys.GEOMETRY||n.contentType===Ys.VECTOR,(n.contentType===Ys.IMPLICIT_SUBTREE||n.contentType===Ys.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),n.contentType===Ys.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let o,r=T0[n.contentType];if(e.isDestroyed())return;l(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let c=e.implicitSubtree,u=e.implicitCoordinates;o.metadata=c.getContentMetadataView(u,0)}else e.hasImplicitContent||(o.metadata=S0(i,s));let a=w0(i,s);return l(a)&&(o.group=new ME({metadata:a})),o}Ar.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};Ar.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=or.UNLOADED,this.lastStyleTime=0,this.clippingPlanesDirty=this._clippingPlanesState===0,this._clippingPlanesState=0,this.clippingPolygonsDirty=this._clippingPolygonsState===0,this._clippingPolygonsState=0,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 Dhe=new le;function HY(e,t){if(t.mode!==oe.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Dhe);e._boundingVolume2D=new pg(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._boundingVolume2D:e._boundingVolume}function cZe(e,t){if(t.mode!==oe.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=le.projectTo2D(n,t.mapProjection,Dhe);e._contentBoundingVolume2D=new pg(i.center,i.radius)}return t.mode!==oe.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Ar.prototype.visibility=function(e,t){let n=e.cullingVolume,i=HY(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==tn.INSIDE,a===tn.OUTSIDE)return vs.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==tn.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};Ar.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return tn.INSIDE;if(this._visibilityPlaneMask===vs.MASK_INSIDE)return tn.INSIDE;let t=e.cullingVolume,n=cZe(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==tn.INSIDE,s===tn.OUTSIDE)return tn.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==tn.OUTSIDE,s===tn.INSIDE)return tn.OUTSIDE}return t.computeVisibility(n)};Ar.prototype.distanceToTile=function(e){return HY(this,e).distanceToCamera(e)};var lZe=new d;Ar.prototype.distanceToTileCenter=function(e){let n=HY(this,e).boundingVolume,i=d.subtract(n.center,e.camera.positionWC,lZe);return d.dot(e.camera.directionWC,i)};Ar.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var vhe=new X,Phe=new d,uZe=new X,WY=new d,Rhe=new ae,Mhe=new Qn,VY=new M;function fZe(e,t,n){let i=d.fromElements(e[0],e[1],e[2],WY),o=X.fromArray(e,3,uZe);i=M.multiplyByPoint(t,i,i);let r=M.getMatrix3(t,vhe);return o=X.multiply(r,o,o),l(n)?(n.update(i,o),n):new Au(i,o)}function bhe(e,t,n,i){let o=ae.unpack(e,0,Rhe),r=e[4],s=e[5],a=Qn.fromRectangle(o,r,s,ne.WGS84,Mhe),c=a.center,u=a.halfAxes;t=M.multiplyTransformation(t,M.inverseTransformation(n,VY),VY),c=M.multiplyByPoint(t,c,c);let f=M.getMatrix3(t,vhe);return u=X.multiply(f,u,u),l(i)&&i instanceof Au?(i.update(c,u),i):new Au(c,u)}function dZe(e,t,n,i){if(!M.equalsEpsilon(t,n,D.EPSILON8))return i instanceof Au?bhe(e,t,n,i):bhe(e,t,n,void 0);let o=ae.unpack(e,0,Rhe);return i instanceof af?(i.rectangle=ae.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ne.WGS84),i):new af({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function hZe(e,t,n){let i=d.fromElements(e[0],e[1],e[2],WY),o=e[3];i=M.multiplyByPoint(t,i,i);let r=M.getScale(t,Phe),s=d.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new pg(i,o)}Ar.prototype.createBoundingVolume=function(e,t,n){let i=this.metadata,o;if(l(i)&&(o=ZE.parseBoundingVolumeSemantic("TILE",i)),l(o)&&(e=o),!l(e))throw new ce("boundingVolume must be defined");if(_i(e,"3DTILES_bounding_volume_S2"))return new qL(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=fZe(r,t,n);return this._verticalExaggeration!==1&&The(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=dZe(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Au?The(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=Gr.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=Gr.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ne.WGS84))),c}if(l(a)){let c=hZe(a,t,n);if(this._verticalExaggeration!==1){let u=Gr.getPosition(c.center,ne.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,WY),f=c.radius*this._verticalExaggeration;c.update(u,f)}return c}throw new ce("boundingVolume must contain a sphere, region, or box")};var mZe=d.unpackArray(new Array(8*3).fill(0));function The(e,t,n){let i=e.boundingVolume.computeCorners(mZe).map(r=>Gr.getPosition(r,ne.WGS84,t,n,r)),o=Qn.fromPoints(i,Mhe);e.update(o.center,o.halfAxes)}Ar.prototype.updateTransform=function(e,t){e=e??M.IDENTITY;let n=M.multiplyTransformation(e,this.transform,VY),i=!M.equals(n,this.computedTransform),o=l(t)&&(this._verticalExaggeration!==t.verticalExaggeration||this._verticalExaggerationRelativeHeight!==t.verticalExaggerationRelativeHeight);if(!i&&!o)return;i&&M.clone(n,this.computedTransform),o&&(this._verticalExaggeration=t.verticalExaggeration,this._verticalExaggerationRelativeHeight=t.verticalExaggerationRelativeHeight);let r=this._header,s=this._contentHeader;this._boundingVolume=this.createBoundingVolume(r.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(r.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()};Ar.prototype.updateGeometricErrorScale=function(){let e=M.getScale(this.computedTransform,Phe),t=d.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function pZe(e,t,n,i){if(!i.isRender)return;let o=l(e._contentHeader)&&l(e._contentHeader.boundingVolume),r=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!o;if(r){let c;e._finalResolution?e.hasRenderableContent?c=G.WHITE:c=G.DARKGRAY:c=G.YELLOW,l(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(c)),e._debugBoundingVolume.update(n);let u=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");u.color=en.toValue(c,u.color)}else!r&&l(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&o?(l(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(G.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(G.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=G.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),a&&t.makeStyleDirty()}function AZe(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(o){throw e._contentState=or.FAILED,o}}function gZe(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 _Ze(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)}Ar.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;gZe(this,e),_Ze(this,e),pZe(this,e,t,n),AZe(this,e,t);let r=i.length;this._commandsLength=r-o;for(let s=o;s<r;++s){let a=i[s],c=a.pass===Be.TRANSLUCENT;a.depthForTranslucentClassification=c}this.clippingPlanesDirty=!1,this.clippingPolygonsDirty=!1};var She=[];Ar.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(nZe(this),this._selectedFrame=0,this.lastStyleTime=0,K.now(this._loadTimestamp),this._contentState=or.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=She;try{this._content.update(e,t)}catch(i){throw this._contentState=or.FAILED,i}She.length=0,t.commandList=n};function whe(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function fV(e,t,n){return Math.max(D.normalize(e,t,n)-D.EPSILON7,0)}Ar.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,o=4,r=1,s=0,a=o,c=s+a,u=o,f=c+u,h=r,p=Math.pow(10,f),g=f+h,m=r,_=Math.pow(10,g),y=g+m,C=Math.pow(10,y),E=fV(this._depth,n.depth,i.depth);E=t?1-E:E;let b=!e.isSkippingLevelOfDetail&&this.refine===nr.REPLACE?fV(this._priorityHolder._distanceToCamera,n.distance,i.distance):fV(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),S=whe(b,a,s),B=this._priorityProgressiveResolution?0:p,v=fV(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),P=whe(v,u,c),N=this.priorityDeferred?_:0,L=e._pass===Ko.PRELOAD_FLIGHT?0:C;this._priority=E+S+B+P+N+L};Ar.prototype.isDestroyed=function(){return!1};Ar.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(),ue(this)};var bd=Ar;function Ag(e){e=e??V.EMPTY_OBJECT;let t=e.id,n=e.group,i=e.class,o=l(n.properties)?n.properties:{};this._class=i,this._properties=o,this._id=t,this._extras=n.extras,this._extensions=n.extensions}Object.defineProperties(Ag.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}}});Ag.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};Ag.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};Ag.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};Ag.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};Ag.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};Ag.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};Ag.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var NT=Ag;function gg(e){e=e??V.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(gg.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});gg.prototype.hasProperty=function(e){return jn.hasProperty(e,this._properties,this._class)};gg.prototype.hasPropertyBySemantic=function(e){return jn.hasPropertyBySemantic(e,this._properties,this._class)};gg.prototype.getPropertyIds=function(e){return jn.getPropertyIds(this._properties,this._class,e)};gg.prototype.getProperty=function(e){return jn.getProperty(e,this._properties,this._class)};gg.prototype.setProperty=function(e,t){return jn.setProperty(e,t,this._properties,this._class)};gg.prototype.getPropertyBySemantic=function(e){return jn.getPropertyBySemantic(e,this._properties,this._class)};gg.prototype.setPropertyBySemantic=function(e,t){return jn.setPropertyBySemantic(e,t,this._properties,this._class)};var KL=gg;function Nhe(e){e=e??V.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,o;l(i)&&(o=new KL({tileset:i,class:n.classes[i.class]}));let r=[],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 NT({group:f,class:n.classes[f.class]}))}}else if(l(a)){r=Object.keys(a).sort();let c=r.length;for(let u=0;u<c;u++){let f=r[u];if(a.hasOwnProperty(f)){let h=a[f];s.push(new NT({id:f,group:a[f],class:n.classes[h.class]}))}}}this._schema=n,this._groups=s,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Nhe.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 L0=Nhe;var Lhe={},yZe=new d;Lhe.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof Au||i instanceof af){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=yd.USE_OPTIMIZATION;for(let r=0;r<n;++r){let a=t[r].boundingVolume;if(!(a instanceof Au||a instanceof af)){e._optimChildrenWithinParent=yd.SKIP_OPTIMIZATION;break}let c=a._orientedBoundingBox,u=d.subtract(c.center,o.center,yZe),f=d.magnitude(u);d.divideByScalar(u,f,u);let h=Math.abs(o.halfAxes[0]*u.x)+Math.abs(o.halfAxes[1]*u.y)+Math.abs(o.halfAxes[2]*u.z)+Math.abs(o.halfAxes[3]*u.x)+Math.abs(o.halfAxes[4]*u.y)+Math.abs(o.halfAxes[5]*u.z)+Math.abs(o.halfAxes[6]*u.x)+Math.abs(o.halfAxes[7]*u.y)+Math.abs(o.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(h<=p+f){e._optimChildrenWithinParent=yd.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===yd.USE_OPTIMIZATION};var XL=Lhe;function JL(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(JL.prototype,{length:{get:function(){return this._length}}});function CZe(e,t,n){this.item=e,this.previous=t,this.next=n}JL.prototype.add=function(e){let t=new CZe(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 Ohe(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}JL.prototype.remove=function(e){l(e)&&(Ohe(this,e),--this._length)};JL.prototype.splice=function(e,t){if(e===t)return;Ohe(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 ZL=JL;function O0(){this._list=new ZL,this._sentinel=this._list.add(),this._trimTiles=!1}O0.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};O0.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};O0.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};O0.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};O0.prototype.unloadTiles=function(e,t){let n=this._trimTiles;this._trimTiles=!1;let i=this._list,o=this._sentinel,r=i.head;for(;r!==o&&(e.totalMemoryUsageInBytes>e.cacheBytes||n);){let s=r.item;r=r.next,this.unloadTile(e,s,t)}};O0.prototype.trim=function(){this._trimTiles=!0};var $L=O0;function dV(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 YY(e,t){let n;return t==="_loadTimestamp"?n=K.toDate(e).getTime():n=e,n}dV.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=YY(e,n),this._referenceMaximum[n]=YY(t,n)};function EZe(e,t){let n=e.tilePropertyName;if(l(n)){let i=YY(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 jY=[new G(.1,.1,.1,1),new G(.153,.278,.878,1),new G(.827,.231,.49,1),new G(.827,.188,.22,1),new G(1,.592,.259,1),new G(1,.843,0,1)];dV.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=EZe(this,e),o=this._previousMinimum,r=this._previousMaximum;if(o===Number.MAX_VALUE||r===-Number.MAX_VALUE)return;let s=r-o+D.EPSILON7,c=D.clamp(i-o,0,s)/s,u=jY.length-1,f=c*u,h=Math.floor(f),p=Math.ceil(f),g=f-h,m=jY[h],_=jY[p],y=G.clone(G.WHITE);y.red=D.lerp(m.red,_.red,g),y.green=D.lerp(m.green,_.green,g),y.blue=D.lerp(m.blue,_.blue,g),e._debugColor=y};dV.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 eO=dV;function LT(){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}LT.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};LT.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])}};LT.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof nf))this.texturesByteLength+=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i]??0;if(o===0){let r=e.getTextureByteLengthById(i);this.texturesByteLength+=r}this.texturesReferenceCounterById[i]=o+1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementLoadCounts(t[i])}};LT.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof nf))this.texturesByteLength-=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i];if(o===1){delete this.texturesReferenceCounterById[i];let r=e.getTextureByteLengthById(i);this.texturesByteLength-=r}else this.texturesReferenceCounterById[i]=o-1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.decrementLoadCounts(t[i])}};LT.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.texturesReferenceCounterById={...e.texturesReferenceCounterById},t.batchTableByteLength=e.batchTableByteLength};var Yh=LT;function tO(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(tO.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});tO.prototype.makeDirty=function(){this._styleDirty=!0};tO.prototype.resetDirty=function(){this._styleDirty=!1};tO.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,o=t?e._selectedTiles:e._selectedTilesToStyle,r=o.length;for(let s=0;s<r;++s){let a=o[s];if(a.lastStyleTime!==n){let c=a.content;a.lastStyleTime=n,c.applyStyle(this._style),i.numberOfFeaturesStyled+=c.featuresLength,++i.numberOfTilesStyled}}};var nO=tO;function IZe(e,t,n){let i=_i(t,"3DTILES_implicit_tiling")?t.extensions["3DTILES_implicit_tiling"]:t.implicitTiling;this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=n;let o=t.boundingVolume;if(!l(o.box)&&!l(o.region)&&!_i(o,"3DTILES_bounding_volume_S2")&&!_i(o,"3DTILES_bounding_volume_cylinder"))throw new ce("Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling");this.boundingVolume=o,this.refine=t.refine,this.subtreeUriTemplate=new we({url:i.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];let r=xZe(t);for(let s=0;s<r.length;s++){let a=r[s];this.contentHeaders.push(je(a,!0));let c=new we({url:a.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=bZe(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 xZe(e){if(_i(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 bZe(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 F0=IZe;var iO={};function Fhe(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function qY(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function Qhe(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 KY(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}iO.encode2D=function(e,t){return(Fhe(e)|Fhe(t)<<1)>>>0};iO.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Qhe(e),t[1]=Qhe(e>>1),t};iO.encode3D=function(e,t,n){return qY(e)|qY(t)<<1|qY(n)<<2};iO.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=KY(e),t[1]=KY(e>>1),t[2]=KY(e>>2),t};var by=iO;function rr(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(rr.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?by.encode3D(this.x,this.y,this.z):by.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}}});rr.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 o=(this.z<<e.level)+e.z;return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};rr.prototype.getAncestorCoordinates=function(e){let t=1<<e,n=this.level-e,i=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===gs.OCTREE){let r=Math.floor(this.z/t);return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o,z:r})}return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:n,x:i,y:o})};rr.prototype.getOffsetCoordinates=function(e){let t=e.level-this.level,n=1<<t,i=e.x%n,o=e.y%n;if(this.subdivisionScheme===gs.OCTREE){let r=e.z%n;return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o,z:r})}return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:o})};rr.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 o=2*this.z+Math.floor(e/4)%2;return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i,z:o})}return new rr({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:i})};rr.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)};rr.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)};rr.prototype.isAncestor=function(e){let t=e.level-this.level;if(t<=0)return!1;let n=e.x>>t,i=e.y>>t,o=this.x===n,r=this.y===i;if(this.subdivisionScheme===gs.OCTREE){let s=e.z>>t,a=this.z===s;return o&&r&&a}return o&&r};rr.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)};rr.prototype.isImplicitTilesetRoot=function(){return this.level===0};rr.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels===0};rr.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels===this.subtreeLevels-1};rr.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 khe=[0,0,0];rr.fromMortonIndex=function(e,t,n,i){let o;return e===gs.OCTREE?(o=by.decode3D(i,khe),new rr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=by.decode2D(i,khe),new rr({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1]}))};rr.fromTileIndex=function(e,t,n){let i,o,r;return e===gs.OCTREE?(i=Math.floor(D.log2(7*n+1)/3),o=((1<<3*i)-1)/7,r=n-o):(i=Math.floor(D.log2(3*n+1)/2),o=((1<<2*i)-1)/3,r=n-o),rr.fromMortonIndex(e,t,i,r)};var Q0=rr;function _g(){}_g.selectTiles=function(e,t){he.throwInstantiationError()};_g.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};_g.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};_g.selectTile=function(e,t){if(e.contentVisibility(t)===tn.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)};_g.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};_g.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};_g.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!TZe(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function TZe(e,t){let{tileset:n}=e;if(!n._cullRequestsWhileMoving)return!0;let{positionWCDeltaMagnitude:i,positionWCDeltaMagnitudeLastFrame:o}=t.camera,r=i!==0?i:o,s=Math.max(e.boundingSphere.radius*2,1);return n.cullRequestsWhileMovingMultiplier*r/s<1}_g.updateTile=function(e,t){Uhe(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,BZe(e),e._shouldSelect=!1,e._finalResolution=!0};function Uhe(e,t){if(e.updateVisibility(t),!e.isVisible)return;let n=e.children.length>0;if((e.hasTilesetContent||e.hasImplicitContent)&&n){let r=e.children[0];Uhe(r,t),e._visible=r._visible;return}if(SZe(e,t)){e._visible=!1;return}let i=e.refine===nr.REPLACE,o=e._optimChildrenWithinParent===yd.USE_OPTIMIZATION;if(i&&o&&n&&!wZe(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function SZe(e,t){let{parent:n,tileset:i}=e;return!l(n)||n.hasTilesetContent||n.hasImplicitContent||n.refine!==nr.ADD?!1:e.getScreenSpaceError(t,!0)<=i.memoryAdjustedScreenSpaceError}function wZe(e,t){let n=!1,i=e.children;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(t),n=n||r.isVisible}return n}function BZe(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 _a=_g;function Ghe(){}var oO={stack:new Il,stackMaximumLength:0};Ghe.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:o,visitTile:r}=_a,s=oO.stack;for(s.push(i);s.length>0;){oO.stackMaximumLength=Math.max(oO.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===nr.ADD,u=a.refine===nr.REPLACE,f=DZe(a);f&&vZe(a,s,t),(c||u&&!f)&&(PZe(e,a),o(a,t),RZe(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return oO.stack.trim(oO.stackMaximumLength),n};function DZe(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function vZe(e,t,n){let{children:i}=e;for(let o=0;o<i.length;++o){let r=i[o];r.updateVisibility(n),r.isVisible&&t.push(r)}}function PZe(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function RZe(e,t){e.contentAvailable&&e.contentVisibility(t)!==tn.OUTSIDE&&e.tileset._selectedTiles.push(e)}var rO=Ghe;function zhe(){}var sO={stack:new Il,stackMaximumLength:0},aO={stack:new Il,stackMaximumLength:0};zhe.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(_a.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;NZe(n,t),sO.stack.trim(sO.stackMaximumLength),aO.stack.trim(aO.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function XY(e,t){e.contentAvailable&&_a.selectTile(e,t)}function MZe(e,t,n){let i=e.refine===nr.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:c}=_a;for(let m=0;m<r.length;++m)s(r[m],n);r.sort(_a.sortChildrenByDistanceToCamera);let u=i&&e.hasRenderableContent,f=!0,h=!1,p=-1,g=Number.MAX_VALUE;for(let m=0;m<r.length;++m){let _=r[m];if(_.isVisible?(t.push(_),_._foveatedFactor<g&&(p=m,g=_._foveatedFactor),h=!0):(u||o.loadSiblings)&&(_._foveatedFactor<g&&(p=m,g=_._foveatedFactor),a(_,n),c(_,n)),u){let y;_._inRequestVolume?_.hasRenderableContent?y=_.contentAvailable:y=LZe(_,n):y=!1,f=f&&y}}if(h||(f=!1),p!==-1&&i){let m=r[p];m._wasMinPriorityChild=!0;let _=(e._wasMinPriorityChild||e===o.root)&&g<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;_._foveatedFactor=Math.min(m._foveatedFactor,_._foveatedFactor),_._distanceToCamera=Math.min(m._distanceToCamera,_._distanceToCamera);for(let y=0;y<r.length;++y)r[y]._priorityHolder=_}return f}function NZe(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=_a,a=sO.stack;for(a.push(e);a.length>0;){sO.stackMaximumLength=Math.max(sO.stackMaximumLength,a.length);let c=a.pop(),u=c.parent,f=!l(u)||u._refines;c._refines=i(c)?MZe(c,a,t)&&f:!1;let h=!c._refines&&f;c.hasRenderableContent?c.refine===nr.ADD?(XY(c,t),o(c,t)):c.refine===nr.REPLACE&&(o(c,t),h&&XY(c,t)):(n._emptyTiles.push(c),o(c,t),h&&XY(c,t)),r(c,t),s(c,t)}}function LZe(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=_a,s=!0,a=aO.stack;for(a.push(e);a.length>0;){aO.stackMaximumLength=Math.max(aO.stackMaximumLength,a.length);let c=a.pop(),u=c.children,f=u.length,h=!c.hasRenderableContent&&n(c);if(!h&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),h)for(let p=0;p<f;++p){let g=u[p];a.push(g)}}return e.hasEmptyContent||s}var cO=zhe;function Vhe(){}var lO={stack:new Il,stackMaximumLength:0},uO={stack:new Il,stackMaximumLength:0},yg={stack:new Il,stackMaximumLength:0,ancestorStack:new Il,ancestorStackMaximumLength:0},OZe=2;Vhe.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(_a.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;zZe(n,t),VZe(n,t),lO.stack.trim(lO.stackMaximumLength),uO.stack.trim(uO.stackMaximumLength),yg.stack.trim(yg.stackMaximumLength),yg.ancestorStack.trim(yg.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function FZe(e,t){let{updateTile:n,touchTile:i,selectTile:o}=_a,r=uO.stack;for(r.push(e);r.length>0;){uO.stackMaximumLength=Math.max(uO.stackMaximumLength,r.length);let a=r.pop().children;for(let c=0;c<a.length;++c){let u=a[c];u.isVisible&&(u.contentAvailable?(n(u,t),i(u,t),o(u,t)):u._depth-e._depth<OZe&&r.push(u))}}}function hV(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:FZe(e,t)}function QZe(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 kZe(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 UZe(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=_a;for(let u=0;u<o.length;++u)r(o[u],n);o.sort(_a.sortChildrenByDistanceToCamera);let c=!1;for(let u=0;u<o.length;++u){let f=o[u];f.isVisible?(t.push(f),c=!0):i.loadSiblings&&(s(f,n),a(f,n))}return c}function GZe(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 zZe(e,t){let{tileset:n}=e,i=n.immediatelyLoadDesiredLevelOfDetail?Number.MAX_VALUE:Math.max(n.baseScreenSpaceError,n.memoryAdjustedScreenSpaceError),{canTraverse:o,loadTile:r,visitTile:s,touchTile:a}=_a,c=lO.stack;for(c.push(e);c.length>0;){lO.stackMaximumLength=Math.max(lO.stackMaximumLength,c.length);let u=c.pop();QZe(u,t);let f=u.parent,h=!l(f)||f._refines;u._refines=o(u)?UZe(u,c,t)&&h:!1;let p=!u._refines&&h;u.hasRenderableContent?u.refine===nr.ADD?(hV(u,t),r(u,t)):u.refine===nr.REPLACE&&(GZe(u,i)?(r(u,t),p&&hV(u,t)):p?(hV(u,t),r(u,t)):kZe(n,u)&&r(u,t)):(n._emptyTiles.push(u),r(u,t),p&&hV(u,t)),s(u,t),a(u,t)}}function VZe(e,t){let{selectTile:n,canTraverse:i}=_a,{stack:o,ancestorStack:r}=yg,s;for(o.push(e);o.length>0||r.length>0;){if(yg.stackMaximumLength=Math.max(yg.stackMaximumLength,o.length),yg.ancestorStackMaximumLength=Math.max(yg.ancestorStackMaximumLength,r.length),r.length>0){let u=r.peek();if(u._stackLength===o.length){r.pop(),u!==s&&(u._finalResolution=!1),n(u,t);continue}}let a=o.pop();if(!l(a))continue;let c=i(a);if(a._shouldSelect)if(a.refine===nr.ADD)n(a,t);else{if(a._selectionDepth=r.length,a._selectionDepth>0&&(a.tileset.hasMixedContent=!0),s=a,!c){n(a,t);continue}r.push(a),a._stackLength=o.length}if(c){let u=a.children;for(let f=0;f<u.length;++f){let h=u[f];h.isVisible&&o.push(h)}}}}var fO=Vhe;function Ks(){this._layers=[],this.layerAdded=new ge,this.layerRemoved=new ge,this.layerMoved=new ge,this.layerShownOrHidden=new ge}Object.defineProperties(Ks.prototype,{length:{get:function(){return this._layers.length}}});Ks.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()})};Ks.prototype.addImageryProvider=function(e,t){let n=new ns(e);return this.add(n,t),n};Ks.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};Ks.prototype.removeAll=function(e){e=e??!0;let t=this._layers;for(let n=0,i=t.length;n<i;n++){let o=t[n];this.layerRemoved.raiseEvent(o,n),e&&o.destroy()}this._layers=[]};Ks.prototype.contains=function(e){return this.indexOf(e)!==-1};Ks.prototype.indexOf=function(e){return this._layers.indexOf(e)};Ks.prototype.get=function(e){return this._layers[e]};function mV(e,t){return e.indexOf(t)}function Hhe(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 o=i[t];i[t]=i[n],i[n]=o,e._update(),e.layerMoved.raiseEvent(o,n,t)}Ks.prototype.raise=function(e){let t=mV(this._layers,e);Hhe(this,t,t+1)};Ks.prototype.lower=function(e){let t=mV(this._layers,e);Hhe(this,t,t-1)};Ks.prototype.raiseToTop=function(e){let t=mV(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))};Ks.prototype.lowerToBottom=function(e){let t=mV(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 HZe=new ae;function Whe(e,t,n,i){let o=e.globe._surface._tilesToRender,r;for(let a=0;!l(r)&&a<o.length;++a){let c=o[a];ae.contains(c.rectangle,t)&&(r=c)}if(!l(r))return;let s=r.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)||!ae.contains(u.rectangle,t))continue;let h=HZe,p=1/1024;h.west=D.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),h.east=D.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),h.south=D.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),h.north=D.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),ae.contains(h,t)&&i(u)}}Ks.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(Whe(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};Ks.prototype.pickImageryLayerFeatures=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[],r=[];if(Whe(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let c=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let c=0;c<s.length;++c){let u=s[c],f=r[c];if(l(u)&&u.length>0)for(let h=0;h<u.length;++h){let p=u[h];p.imageryLayer=f,l(p.position)||(p.position=i),a.push(p)}}return a})};Ks.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};Ks.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};Ks.prototype.isDestroyed=function(){return!1};Ks.prototype.destroy=function(){return this.removeAll(!0),ue(this)};Ks.prototype._update=function(){let e=!0,t=this._layers,n,i,o,r;for(o=0,r=t.length;o<r;++o)i=t[o],i._layerIndex=o,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(o=0,r=n.length;o<r;++o)i=n[o],this.layerShownOrHidden.raiseEvent(i,i._layerIndex,i.show)};var k0=Ks;function Xo(e){e=e??V.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 $L,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 Il,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 nO,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?M.clone(e.modelMatrix):M.clone(M.IDENTITY),this._addHeightCallbacks=[],this._statistics=new Yh,this._statisticsLast=new Yh,this._statisticsPerPass=new Array(Ko.NUMBER_OF_PASSES);for(let o=0;o<Ko.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new Yh;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 eO(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??ne.WGS84,this._initialClippingPlanesOriginMatrix=M.IDENTITY,this._clippingPlanesOriginMatrix=void 0,this._clippingPlanesOriginMatrixDirty=!0,this._vectorClassificationOnly=e.vectorClassificationOnly??!1,this._vectorKeepDecodedPositions=e.vectorKeepDecodedPositions??!1,this._imageryLayers=new k0(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??Bn.ENABLED,this.show=e.show??!0,this.colorBlendMode=ru.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new $m(e.pointCloudShading),this._pointCloudEyeDomeLighting=new zA,this.loadProgress=new ge,this.allTilesLoaded=new ge,this.initialTilesLoaded=new ge,this.tileLoad=new ge,this.tileUnload=new ge,this.tileFailed=new ge,this.tileVisible=new ge,this.skipLevelOfDetail=e.skipLevelOfDetail??!1,this._disableSkipLevelOfDetail=!1,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)&&Ps.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,l(e.clippingPolygons)&&Dh.setOwner(e.clippingPolygons,this,"_clippingPolygons"),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new RE,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new kA(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??G.BLACK,this.splitDirection=e.splitDirection??Tr.NONE,this.enableCollision=e.enableCollision??!1,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&&yt("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),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(Xo.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){Ps.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Dh.setOwner(e,this,"_clippingPolygons")}},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 Vs("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}},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=M.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&&(M.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):M.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,$he(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}}});Xo.fromIonAssetId=async function(e,t){let n=await ju.fromAssetId(e);return Xo.fromUrl(n,t)};Xo.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT;let n=we.createIfNeeded(e),i;n.extension==="json"?i=n.getBaseUri(!0):n.isDataUri&&(i="");let o=await Xo.loadJson(n),r=await WZe(n,o),s=new Xo(t);s._resource=n,s._url=n.url,s._basePath=i,s._metadataExtension=r,s._geometricError=o.geometricError,s._scaledGeometricError=o.geometricError;let a=o.asset;s._asset=a,s._extras=o.extras,$he(s);let c=l(o.asset.gltfUpAxis)?fo.fromName(o.asset.gltfUpAxis):fo.Y,u=t.modelUpAxis??c,f=t.modelForwardAxis??fo.X;s._properties=o.properties,s._extensionsUsed=o.extensionsUsed,s._extensions=o.extensions,s._modelUpAxis=u,s._modelForwardAxis=f,s._root=s.loadTileset(n,o);let p=s._root.createBoundingVolume(o.root.boundingVolume,M.IDENTITY).boundingSphere.center,g=s._ellipsoid.cartesianToCartographic(p);return l(g)&&g.height>Ii._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=Qt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=M.clone(s._initialClippingPlanesOriginMatrix),s};Xo.loadJson=function(e){return we.createIfNeeded(e).fetchJson()};Xo.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};Xo.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new ce("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new ce("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&Xo.checkSupportedExtensions(t.extensionsRequired);let o=this._statistics,r=i.tilesetVersion;l(r)&&(this._basePath+=`?v=${r}`,e=e.clone(),e.setQueryParameters({v:r}));let s=jhe(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();++o.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&c.refine===nr.ADD;let u=c._header.children;if(l(u))for(let f=0;f<u.length;++f){let h=u[f],p=jhe(this,e,h,c);c.children.push(p),p._depth=c._depth+1,a.push(p)}this._cullWithChildrenBounds&&XL.checkChildrenWithinParent(c)}return s};function jhe(e,t,n,i){if(!(l(n.implicitTiling)||_i(n,"3DTILES_implicit_tiling")))return new bd(e,t,n,i);let r=e.schema,s=new F0(t,n,r),a=new Q0({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 h=new bd(e,t,f,i);return h.implicitTileset=s,h.implicitCoordinates=a,h}async function WZe(e,t){let n=_i(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 o=new L0({schema:i.schema,metadataJson:n});return Li.unload(i),o}var Yhe=new d,jZe=new me,YZe=new M,qZe=new d,KZe=new d,XZe=new d,JZe=new d;function ZZe(e,t){let n,i,o,r,s,a=t.camera,c=e._root,u=c.contentBoundingVolume;if(u instanceof af)n=d.normalize(a.positionWC,Yhe),i=a.directionWC,o=a.positionCartographic.height,r=u.minimumHeight,s=u.maximumHeight;else{let _=M.inverseTransformation(c.computedTransform,YZe),y=t.mapProjection.ellipsoid,C=u.boundingVolume,E=M.multiplyByPoint(_,C.center,qZe);if(d.magnitude(E)>y.minimumRadius){let I=me.fromCartesian(E,y,jZe);n=d.normalize(a.positionWC,Yhe),i=a.directionWC,o=a.positionCartographic.height,r=0,s=I.height*2}else{let I=M.multiplyByPoint(_,a.positionWC,KZe);if(n=d.UNIT_Z,i=M.multiplyByPointAsVector(_,a.directionWC,XZe),i=d.normalize(i,i),o=I.z,u instanceof Au){let b=X.getColumn(C.halfAxes,2,JZe),S=d.magnitude(b);r=E.z-S,s=E.z+S}else if(u instanceof pg){let b=C.radius;r=E.z-b,s=E.z+b}}}let f=e.dynamicScreenSpaceErrorHeightFalloff,h=r+(s-r)*f,p=s,g=D.clamp((o-h)/(p-h),0,1),m=1-Math.abs(d.dot(i,n));m=m*(1-g),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*m}function $Ze(e,t){if(t.hasEmptyContent)return;let{statistics:n}=e,i=t.contentExpired,o=t.requestContent();l(o)&&(o.then(r=>{!l(r)||t.isDestroyed()||e.isDestroyed()||(e._processingQueue.push(t),++n.numberOfTilesProcessing)}).catch(r=>{Xhe(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?h$e(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function Khe(e,t){return e._priority-t._priority}Xo.prototype.postPassesUpdate=function(e){l(this._root)&&(e$e(this,e),p$e(this,e),this._cache.unloadTiles(this,Zhe),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};Xo.prototype.prePassesUpdate=function(e){if(!l(this._root))return;a$e(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),l(this._loadTimestamp)||(this._loadTimestamp=K.clone(e.time)),this._timeSinceLoad=Math.max(K.secondsDifference(e.time,this._loadTimestamp)*1e3,0),this.dynamicScreenSpaceError&&ZZe(this,e),e.newFrame&&this._cache.reset()};function e$e(e,t){let n=e._requestedTilesInFlight,i=0;for(let o=0;o<n.length;++o){let r=n[o],s=t.frameNumber-r._touchedFrame>=1;if(r._contentState!==or.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function t$e(e){let t=e._requestedTiles;t.sort(Khe);for(let n=0;n<t.length;++n)$Ze(e,t[n])}function Xhe(e,t,n){if(t.isDestroyed())return;let i;n.isDestroyed()||(i=n._contentResource.url);let o=l(e.message)?e.message:e.toString();t.tileFailed.numberOfListeners>0?t.tileFailed.raiseEvent({url:i,message:o}):(console.log(`A 3D tile failed to load: ${i}`),console.log(`Error: ${o}`),console.log(e.stack))}function n$e(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==or.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var i$e=new me,o$e=new me,r$e=new d;function s$e(e,t,n){if(!e.enableCollision||!e.show)return;let i=e._addHeightCallbacks,o=t.boundingSphere;for(let r of i){if(r.invoked||t._wasSelectedLastFrame)continue;let s=r.ellipsoid,a=me.clone(r.positionCartographic,i$e),c=me.fromCartesian(o.center,s,o$e);l(c)&&(a.height=c.height);let u=me.toCartesian(a,s,r$e);d.distance(u,o.center)<=o.radius&&(r.invoked=!0,n.afterRender.push(()=>{l(r.callback)&&r.callback(),r.invoked=!1}))}}function a$e(e,t){n$e(e);let n=e._processingQueue,{cacheBytes:i,maximumCacheOverflowBytes:o,statistics:r}=e,s=i+o,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&&(--r.numberOfTilesProcessing,e.tileLoad.raiseEvent(u))}catch(f){--r.numberOfTilesProcessing,Xhe(f,e,u)}}e.totalMemoryUsageInBytes<i?l$e(e):a&&n.length>0&&c$e(e)}function c$e(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(Khe)}function l$e(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var pV=new d,u$e={maximumFractionDigits:3};function qhe(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,u$e):Math.round(t).toLocaleString()}function JY(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=d.clone(i,pV);if(l(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(l(n)){let r=d.normalize(i,pV);r=d.multiplyByScalar(r,.75*n,pV),o=d.add(r,i,pV)}return o}function ZY(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=` Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=` Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=` Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=` Triangles: ${e.content.trianglesLength}`,o++),i+=` Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=` Texture Memory: ${qhe(e.content.texturesByteLength)}`,i+=` Geometry Memory: ${qhe(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=` Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=` - ${s[a]}`;o+=s.length}else i+=` Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function f$e(e,t){let n=e._selectedTiles,i=n.length,o=e._emptyTiles,r=o.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(l(e.debugPickedTile)){let s=l(e.debugPickPosition)?e.debugPickPosition:JY(e.debugPickedTile),a=ZY(e.debugPickedTile,e,s);a.pixelOffset=new U(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];ZY(a,e,JY(a))}for(let s=0;s<r;++s){let a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&ZY(a,e,JY(a))}}e._tileDebugLabels.update(t)}function d$e(e,t,n){e._styleEngine.applyStyle(e),e._styleApplied=!0;let{commandList:i,context:o}=t,r=i.length,s=e._selectedTiles,a=e.isSkippingLevelOfDetail&&e._hasMixedContent&&o.stencilBuffer&&s.length>0;e._backfaceCommands.length=0,a&&(l(e._stencilClearCommand)||(e._stencilClearCommand=new pi({stencil:0,pass:Be.CESIUM_3D_TILE,renderState:Ge.fromCache({stencilMask:Xt.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:u}=e,f=n.isRender,h=i.length;for(let m=0;m<s.length;++m){let _=s[m];f&&u.raiseEvent(_),s$e(e,_,t),_.update(e,t,n),c.incrementSelectionCounts(_.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-h;if(e._backfaceCommands.trim(),a){let m=e._backfaceCommands.values,_=m.length;i.length+=_;for(let y=g-1;y>=0;--y)i[h+_+y]=i[h+y];for(let y=0;y<_;++y)i[h+y]=m[y]}g=i.length-r,c.numberOfCommands=g,f&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&g>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new sp),f$e(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var Jhe=[];function h$e(e,t){let n=t,i=Jhe;for(i.push(t);i.length>0;){t=i.pop();let o=t.children;for(let r=0;r<o.length;++r)i.push(o[r]);t!==n&&(m$e(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function Zhe(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function m$e(e,t){e._cache.unloadTile(e,t,Zhe),t.destroy()}Xo.prototype.trimLoadedTiles=function(){this._cache.trim()};function p$e(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;Yh.clone(n,i);let c=o!==s||r!==a;c&&t.afterRender.push(function(){return e.loadProgress.raiseEvent(o,r),!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 A$e(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 g$e(e,t){t.frameNumber===e._updatedModelMatrixFrame&&l(e._previousModelMatrix)||(e._updatedModelMatrixFrame=t.frameNumber,e._modelMatrixChanged=!M.equals(e.modelMatrix,e._previousModelMatrix),e._modelMatrixChanged&&(e._previousModelMatrix=M.clone(e.modelMatrix,e._previousModelMatrix)))}function _$e(e,t,n,i){if(t.mode===oe.MORPHING||!l(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,A$e(e),g$e(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&t$e(e),d$e(e,t,i),Yh.clone(o,n),i.isRender){let s=e._credits;if(l(s)&&o.selected!==0)for(let a=0;a<s.length;++a){let c=s[a];t.creditDisplay.addCreditToNextFrame(c)}}return r}function $he(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(Bt.clone(i))});let n=e.asset.extras;if(l(n)&&l(n.cesium)&&l(n.cesium.credits)){let i=n.cesium.credits;for(let o=0;o<i.length;++o){let r=i[o];t.push(new Bt(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}Xo.prototype.getTraversal=function(e){let{pass:t}=e;return t===Ko.MOST_DETAILED_PRELOAD||t===Ko.MOST_DETAILED_PICK?rO:this.isSkippingLevelOfDetail?fO:cO};Xo.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};Xo.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===Ko.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===Ko.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===Ko.REQUEST_RENDER_MODE_DEFER_CHECK&&(!this._cullRequestsWhileMoving&&this.foveatedTimeDelay<=0||!this.show))return;let i=e.commandList,o=e.camera,r=e.cullingVolume;t.ready=!1;let s=Ko.getPassOptions(n),a=s.ignoreCommands,c=t.commandList??i,u=c.length;if(e.commandList=c,e.camera=t.camera??o,e.cullingVolume=t.cullingVolume??r,s.isRender){let p=this._environmentMapManager;l(this._root)&&(p.position=this.boundingSphere.center),p.update(e)}let f=this._clippingPolygons;l(f)&&f.enabled&&f.queueCommands(e);let h=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=_$e(this,e,h,s)),a&&(c.length=u),e.commandList=i,e.camera=o,e.cullingVolume=r};Xo.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};Xo.prototype.isDestroyed=function(){return!1};Xo.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),l(this._root)){let e=Jhe;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,ue(this)};Xo.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,MAXAR_content_geojson:!0};Xo.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!Xo.supportedExtensions[e[t]])throw new ce(`Unsupported 3D Tiles Extension: ${e[t]}`)};var y$e=new xn,C$e=new d,E$e=new me;Xo.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=ne.WGS84);let i=y$e,o=n.cartographicToCartesian(e,i.direction);d.normalize(i.direction,i.direction),i.direction=d.normalize(o,i.direction),i.direction=d.negate(o,i.direction),i.origin=d.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,C$e);if(l(r))return n.cartesianToCartographic(r,E$e)?.height};Xo.prototype.updateHeight=function(e,t,n){n=n??ne.WGS84;let i={positionCartographic:e,ellipsoid:n,callback:t,invoked:!1},o=()=>{let r=this._addHeightCallbacks,s=r.length;for(let a=0;a<s;++a)if(r[a]===i){r.splice(a,1);break}i.callback&&(i.callback=void 0)};return this._addHeightCallbacks.push(i),o};var I$e=new rc,x$e=new d;Xo.prototype.pick=function(e,t,n){if(!t.context.webgl2&&!this._enablePick)return;let i=this._selectedTiles,o=i.length,r=[];for(let c=0;c<o;++c){let u=i[c],f=fi.raySphere(e,u.contentBoundingVolume.boundingSphere,I$e);!l(f)||!l(u.content)||r.push(u)}let s=r.length;r.sort((c,u)=>{let f=le.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),h=le.distanceSquaredTo(u.contentBoundingVolume.boundingSphere,e.origin);return f-h});let a;for(let c=0;c<s;++c){let f=r[c].content.pick(e,t,x$e);if(l(f))return a=d.clone(f,n),a}};Xo.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};Xo.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 Ms=Xo;var b$e=new M;function Ty(e,t){t.collectionChanged.addEventListener(Ty.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new Pt,this._onCollectionChanged(t,t.values,[],[])}Ty.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._tilesetHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._tileset,c,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&W.getValueOrDefault(a._show,e,!0),h;f&&(h=s.computeModelMatrix(e,b$e),c=we.createIfNeeded(W.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],T$e(c,n,s,i)),l(p)&&(p.show=!0,l(h)&&(p.modelMatrix=h),p.maximumScreenSpaceError=W.getValueOrDefault(a.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};Ty.prototype.isDestroyed=function(){return!1};Ty.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Ty.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._tilesetHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)$Y(this,e[i],t,n);return ue(this)};Ty.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return mt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(le.clone(i.boundingSphere,t),mt.DONE):mt.FAILED:mt.PENDING};Ty.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._tilesetHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._tileset)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._tileset)?s.set(r.id,r):($Y(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],$Y(this,r,a,c),s.remove(r.id)};function $Y(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function T$e(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await Ms.fromUrl(e);if(o.id=n,i.add(o),!l(t[n.id]))return;t[n.id].tilesetPrimitive=o}catch(o){console.error(o),t[n.id].loadFail=!0}}var dO=Ty;var S$e=G.WHITE,w$e=G.BLACK,B$e=new U(2,2);function OT(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(OT.prototype,{isConstant:{get:function(){return W.isConstant(this._evenColor)&&W.isConstant(this._oddColor)&&W.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:de("evenColor"),oddColor:de("oddColor"),repeat:de("repeat")});OT.prototype.getType=function(e){return"Checkerboard"};var D$e=new K;OT.prototype.getValue=function(e,t){return l(e)||(e=K.now(D$e)),l(t)||(t={}),t.lightColor=W.getValueOrClonedDefault(this._evenColor,e,S$e,t.lightColor),t.darkColor=W.getValueOrClonedDefault(this._oddColor,e,w$e,t.darkColor),t.repeat=W.getValueOrDefault(this._repeat,e,B$e),t};OT.prototype.equals=function(e){return this===e||e instanceof OT&&W.equals(this._evenColor,e._evenColor)&&W.equals(this._oddColor,e._oddColor)&&W.equals(this._repeat,e._repeat)};var FT=OT;var eme={id:void 0};function hO(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 o=t.values.slice(0),r=n.values.slice(0),s=i.values.slice(0);t.removeAll(),n.removeAll(),i.removeAll(),e._collectionChanged.raiseEvent(e,o,r,s)}while(e._refire);e._firing=!1}}}function Vc(e){this._owner=e,this._entities=new Pt,this._addedEntities=new Pt,this._removedEntities=new Pt,this._changedEntities=new Pt,this._suspendCount=0,this._collectionChanged=new ge,this._id=qn(),this._show=!0,this._firing=!1,this._refire=!1}Vc.prototype.suspendEvents=function(){this._suspendCount++};Vc.prototype.resumeEvents=function(){this._suspendCount--,hO(this)};Object.defineProperties(Vc.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,o=i.length;for(t=0;t<o;t++)n.push(i[t].isShowing);for(this._show=e,t=0;t<o;t++){let r=n[t],s=i[t];r!==s.isShowing&&s.definitionChanged.raiseEvent(s,"isShowing",s.isShowing,r)}this.resumeEvents()}},owner:{get:function(){return this._owner}}});Vc.prototype.computeAvailability=function(){let e=Ye.MAXIMUM_VALUE,t=Ye.MINIMUM_VALUE,n=this._entities.values;for(let i=0,o=n.length;i<o;i++){let s=n[i].availability;if(l(s)){let a=s.start,c=s.stop;K.lessThan(a,e)&&!a.equals(Ye.MINIMUM_VALUE)&&(e=a),K.greaterThan(c,t)&&!c.equals(Ye.MAXIMUM_VALUE)&&(t=c)}}return Ye.MAXIMUM_VALUE.equals(e)&&(e=Ye.MINIMUM_VALUE),Ye.MINIMUM_VALUE.equals(t)&&(t=Ye.MAXIMUM_VALUE),new Rn({start:e,stop:t})};Vc.prototype.add=function(e){e instanceof dr||(e=new dr(e));let t=e.id,n=this._entities;if(n.contains(t))throw new he(`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(Vc.prototype._onEntityDefinitionChanged,this),hO(this),e};Vc.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};Vc.prototype.contains=function(e){return this._entities.get(e.id)===e};Vc.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(Vc.prototype._onEntityDefinitionChanged,this),hO(this),!0):!1};Vc.prototype.removeAll=function(){let e=this._entities,t=e.length,n=e.values,i=this._addedEntities,o=this._removedEntities;for(let r=0;r<t;r++){let s=n[r],a=s.id,c=i.get(a);l(c)||(s.definitionChanged.removeEventListener(Vc.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),hO(this)};Vc.prototype.getById=function(e){return this._entities.get(e)};Vc.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(eme.id=e,t=new dr(eme),this.add(t)),t};Vc.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),hO(this)};var ya=Vc;var AV={id:void 0},QT=new Array(2);function eq(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 tme(e,t,n,i){QT[0]=n,QT[1]=i.id,t[JSON.stringify(QT)]=i.definitionChanged.addEventListener(os.prototype._onDefinitionChanged,e)}function nme(e,t,n,i){QT[0]=n,QT[1]=i.id;let o=JSON.stringify(QT);t[o](),t[o]=void 0}function Sy(e){if(e._shouldRecomposite=!0,e._suspendCount!==0)return;let t=e._collections,n=t.length,i=e._collectionsCopy,o=i.length,r,s,a,c,u,f=e._composite,h=new ya(e),p=e._eventHash,g;for(r=0;r<o;r++)for(u=i[r],u.collectionChanged.removeEventListener(os.prototype._onCollectionChanged,e),a=u.values,g=u.id,c=a.length-1;c>-1;c--)s=a[c],nme(e,p,g,s);for(r=n-1;r>=0;r--)for(u=t[r],u.collectionChanged.addEventListener(os.prototype._onCollectionChanged,e),a=u.values,g=u.id,c=a.length-1;c>-1;c--){s=a[c],tme(e,p,g,s);let _=h.getById(s.id);l(_)||(_=f.getById(s.id),l(_)?eq(_):(AV.id=s.id,_=new dr(AV)),h.add(_)),_.merge(s)}e._collectionsCopy=t.slice(0),f.suspendEvents(),f.removeAll();let m=h.values;for(r=0;r<m.length;r++)f.add(m[r]);f.resumeEvents()}function os(e,t){this._owner=t,this._composite=new ya(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=qn(),this._eventHash={},Sy(this),this._shouldRecomposite=!1}Object.defineProperties(os.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}}});os.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),Sy(this)};os.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),Sy(this),!0):!1};os.prototype.removeAllCollections=function(){this._collections.length=0,Sy(this)};os.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};os.prototype.contains=function(e){return this._composite.contains(e)};os.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};os.prototype.getCollection=function(e){return this._collections[e]};os.prototype.getCollectionsLength=function(){return this._collections.length};function gV(e,t){return e.indexOf(t)}function ime(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 o=i[t];i[t]=i[n],i[n]=o,Sy(e)}os.prototype.raiseCollection=function(e){let t=gV(this._collections,e);ime(this,t,t+1)};os.prototype.lowerCollection=function(e){let t=gV(this._collections,e);ime(this,t,t-1)};os.prototype.raiseCollectionToTop=function(e){let t=gV(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),Sy(this))};os.prototype.lowerCollectionToBottom=function(e){let t=gV(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),Sy(this))};os.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};os.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(Sy(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};os.prototype.computeAvailability=function(){return this._composite.computeAvailability()};os.prototype.getById=function(e){return this._composite.getById(e)};os.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,o=i.length,r=this._composite;r.suspendEvents();let s,a,c,u,f=n.length,h=this._eventHash,p=e.id;for(s=0;s<f;s++){let m=n[s];nme(this,h,p,m);let _=m.id;for(a=o-1;a>=0;a--)c=i[a].getById(_),l(c)&&(l(u)||(u=r.getById(_),eq(u)),u.merge(c));l(u)||r.removeById(_),u=void 0}let g=t.length;for(s=0;s<g;s++){let m=t[s];tme(this,h,p,m);let _=m.id;for(a=o-1;a>=0;a--)c=i[a].getById(_),l(c)&&(l(u)||(u=r.getById(_),l(u)?eq(u):(AV.id=_,u=new dr(AV),r.add(u))),u.merge(c));u=void 0}r.resumeEvents()};os.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,c=r.getById(a),u=c[t],f=!l(u),h=!0;for(let p=s-1;p>=0;p--){let g=o[p].getById(e.id);if(l(g)){let m=g[t];if(l(m)){if(h)if(h=!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 tq=os;function nq(){this._removalFunctions=[]}nq.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};nq.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Dr=nq;function rq(e,t){return K.compare(e.start,t.start)}function rs(e){if(this._intervals=[],this._changedEvent=new ge,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(rs.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}}});rs.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof rs))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!Rn.equals(n[r],i[r],t))return!1;return!0};rs.prototype.get=function(e){return this._intervals[e]};rs.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};rs.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};rs.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};rs.prototype.contains=function(e){return this.indexOf(e)>=0};var iq=new Rn;rs.prototype.indexOf=function(e){let t=this._intervals;iq.start=e,iq.stop=e;let n=jo(t,iq,rq);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&&Rn.contains(t[n-1],e)?n-1:~n)};rs.prototype.findInterval=function(e){e=e??V.EMPTY_OBJECT;let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){let c=r[s];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(o)||c.isStopIncluded===o))return r[s]}};rs.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=jo(n,e,rq);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 o;for(i>0&&(o=K.compare(n[i-1].stop,e.start),(o>0||o===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 Rn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new Rn({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):(o=K.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new Rn({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 Rn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=K.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new Rn({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 Rn({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)};rs.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=jo(t,e,rq);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 Rn({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 Rn({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 Rn({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 Rn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new Rn({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 Rn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};rs.prototype.intersect=function(e,t,n){let i=new rs,o=0,r=0,s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){let c=s[o],u=a[r];if(K.lessThan(c.stop,u.start))++o;else if(K.lessThan(u.stop,c.start))++r;else{if(l(n)||l(t)&&t(c.data,u.data)||!l(t)&&u.data===c.data){let f=Rn.intersect(c,u,new Rn,n);f.isEmpty||i.addInterval(f,t)}K.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++o:++r}}return i};rs.fromJulianDateArray=function(e,t){l(t)||(t=new rs);let n=e.julianDates,i=n.length,o=e.dataCallback,r=e.isStartIncluded??!0,s=e.isStopIncluded??!0,a=e.leadingInterval??!1,c=e.trailingInterval??!1,u,f=0;a&&(++f,u=new Rn({start:Ye.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u));for(let h=0;h<i-1;++h){let p=n[h],g=n[h+1];u=new Rn({start:p,stop:g,isStartIncluded:t.length===f?r:!0,isStopIncluded:h===i-2?s:!1}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u),p=g}return c&&(u=new Rn({start:n[i-1],stop:Ye.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u)),t};var Hc=new Zp,mO=[0,31,28,31,30,31,30,31,31,30,31,30,31];function oq(e,t,n){l(n)||(n=new K),K.toGregorianDate(e,Hc);let i=Hc.millisecond+t.millisecond,o=Hc.second+t.second,r=Hc.minute+t.minute,s=Hc.hour+t.hour,a=Hc.day+t.day,c=Hc.month+t.month,u=Hc.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),mO[2]=oh(u)?29:28;a>mO[c]||c>=13;)a>mO[c]&&(a-=mO[c],++c),c>=13&&(--c,u+=Math.floor(c/12),c=c%12,++c),mO[2]=oh(u)?29:28;return Hc.millisecond=i,Hc.second=o,Hc.minute=r,Hc.hour=s,Hc.day=a,Hc.month=c,Hc.year=u,K.fromGregorianDate(Hc,n)}var v$e=new K,P$e=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function ome(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(P$e);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,v$e),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var pO=new Zp;rs.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=K.fromIso8601(n[0]),o=K.fromIso8601(n[1]),r=[];if(!ome(n[2],pO))r.push(i,o);else{let s=K.clone(i);for(r.push(s);K.compare(s,o)<0;)s=oq(s,pO),K.compare(o,s)<=0&&K.clone(o,s),r.push(s)}return rs.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};rs.fromIso8601DateArray=function(e,t){return rs.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)};rs.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=e.relativeToPrevious??!1,r=[],s,a,c=i.length;for(let u=0;u<c;++u)(ome(i[u],pO)||u===0)&&(o&&l(a)?s=oq(a,pO):s=oq(n,pO),r.push(s),a=s);return rs.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var ss=rs;function R$e(e,t,n,i){function o(){n.raiseEvent(e)}let r=[];t.removeAll();let s=i.length;for(let a=0;a<s;a++){let c=i.get(a);l(c.data)&&r.indexOf(c.data)===-1&&t.add(c.data.definitionChanged,o)}}function U0(){this._eventHelper=new Dr,this._definitionChanged=new ge,this._intervals=new ss,this._intervals.changedEvent.addEventListener(U0.prototype._intervalsChanged,this)}Object.defineProperties(U0.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var M$e=new K;U0.prototype.getValue=function(e,t){l(e)||(e=K.now(M$e));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};U0.prototype.equals=function(e){return this===e||e instanceof U0&&this._intervals.equals(e._intervals,W.equals)};U0.prototype._intervalsChanged=function(){R$e(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var Wc=U0;function wy(){this._definitionChanged=new ge,this._composite=new Wc,this._composite.definitionChanged.addEventListener(wy.prototype._raiseDefinitionChanged,this)}Object.defineProperties(wy.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}});wy.prototype.getType=function(e){let t=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(t))return t.getType(e)};var N$e=new K;wy.prototype.getValue=function(e,t){l(e)||(e=K.now(N$e));let n=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};wy.prototype.equals=function(e){return this===e||e instanceof wy&&this._composite.equals(e._composite,W.equals)};wy.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var kT=wy;function By(e){this._referenceFrame=e??Xi.FIXED,this._definitionChanged=new ge,this._composite=new Wc,this._composite.definitionChanged.addEventListener(By.prototype._raiseDefinitionChanged,this)}Object.defineProperties(By.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 L$e=new K;By.prototype.getValue=function(e,t){return l(e)||(e=K.now(L$e)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};By.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._composite._intervals.findDataForIntervalContainingDate(e);if(l(i))return i.getValueInReferenceFrame(e,t,n)};By.prototype.equals=function(e){return this===e||e instanceof By&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,W.equals)};By.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var za=By;var O$e={ROUNDED:0,MITERED:1,BEVELED:2},Hi=Object.freeze(O$e);var Va=[new d,new d],F$e=new d,Q$e=new d,k$e=new d,U$e=new d,G$e=new d,z$e=new d,V$e=new d,H$e=new d,W$e=new d,UT=new d,_V=new d,AO={},sq=new me;function j$e(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];sq=t.cartesianToCartographic(o,sq),n[i]=sq.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function aq(e,t,n,i){let o=e[0],r=e[1],s=d.angleBetween(o,r),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 h=(n-t)/a;for(u=1;u<a;u++){let p=t+u*h;c[u]=p}return c[0]=t,c.push(n),c}var yV=new d,CV=new d;function Y$e(e,t,n,i){let o=new ms(n,i),r=o.projectPointOntoPlane(d.add(n,e,yV),yV),s=o.projectPointOntoPlane(d.add(n,t,CV),CV),a=U.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var q$e=new d(-1,0,0),G0=new M,K$e=new M,cq=new X,X$e=X.IDENTITY.clone(),J$e=new d,Z$e=new se,rme=new d;function Cg(e,t,n,i,o,r,s,a){let c=J$e,u=Z$e;G0=Qt.eastNorthUpToFixedFrame(e,o,G0),c=M.multiplyByPointAsVector(G0,q$e,c),c=d.normalize(c,c);let f=Y$e(c,t,e,o);cq=X.fromRotationZ(f,cq),rme.z=r,G0=M.multiplyTransformation(G0,M.fromRotationTranslation(cq,rme,K$e),G0);let h=X$e;h[0]=s;for(let p=0;p<a;p++)for(let g=0;g<n.length;g+=3)u=d.fromArray(n,g,u),u=X.multiplyByVector(h,u,u),u=M.multiplyByPoint(G0,u,u),i.push(u.x,u.y,u.z);return i}var $$e=new d;function lq(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=d.fromArray(e,a,$$e);i=Cg(c,t,n,i,o,r[a/3],s,1)}return i}function eet(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function sme(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var ame=new Fe,cme=new d,lme=new X;function ume(e,t,n,i,o,r,s,a,c,u){let f=d.angleBetween(d.subtract(t,e,UT),d.subtract(n,e,_V)),h=i===Hi.BEVELED?0:Math.ceil(f/D.toRadians(5)),p;o?p=X.fromQuaternion(Fe.fromAxisAngle(d.negate(e,UT),f/(h+1),ame),lme):p=X.fromQuaternion(Fe.fromAxisAngle(e,f/(h+1),ame),lme);let g,m;if(t=d.clone(t,cme),h>0){let _=u?2:1;for(let y=0;y<h;y++)t=X.multiplyByVector(p,t,t),g=d.subtract(t,e,UT),g=d.normalize(g,g),o||(g=d.negate(g,g)),m=r.scaleToGeodeticSurface(t,_V),s=Cg(m,g,a,s,r,c,1,_)}else g=d.subtract(t,e,UT),g=d.normalize(g,g),o||(g=d.negate(g,g)),m=r.scaleToGeodeticSurface(t,_V),s=Cg(m,g,a,s,r,c,1,1),n=d.clone(n,cme),g=d.subtract(n,e,UT),g=d.normalize(g,g),o||(g=d.negate(g,g)),m=r.scaleToGeodeticSurface(n,_V),s=Cg(m,g,a,s,r,c,1,1);return s}AO.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];U.equals(r,s)||n.push(s)}return n};AO.angleIsGreaterThanPi=function(e,t,n,i){let o=new ms(n,i),r=o.projectPointOntoPlane(d.add(n,e,yV),yV),s=o.projectPointOntoPlane(d.add(n,t,CV),CV);return s.x*r.y-s.y*r.x>=0};var tet=new d,net=new d;AO.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=j$e(e,r),a=i._granularity,c=i._cornerType,u=o?eet(t,n):sme(t,n),f=o?sme(t,n):void 0,h=n.height/2,p=n.width/2,g=e.length,m=[],_=o?[]:void 0,y=F$e,C=Q$e,E=k$e,I=U$e,b=G$e,S=z$e,B=V$e,v=H$e,P=W$e,N=e[0],L=e[1];I=r.geodeticSurfaceNormal(N,I),y=d.subtract(L,N,y),y=d.normalize(y,y),v=d.cross(I,y,v),v=d.normalize(v,v);let A=s[0],x=s[1];o&&(_=Cg(N,v,f,_,r,A+h,1,1)),P=d.clone(N,P),N=L,C=d.negate(y,C);let T,w;for(let k=1;k<g-1;k++){let F=o?2:1;if(L=e[k+1],N.equals(L)){yt("Positions are too close and are considered equivalent with rounding error.");continue}y=d.subtract(L,N,y),y=d.normalize(y,y),I=r.geodeticSurfaceNormal(N,I);let z=d.multiplyByScalar(I,d.dot(y,I),tet);d.subtract(y,z,z),d.normalize(z,z);let Q=d.multiplyByScalar(I,d.dot(C,I),net);if(d.subtract(C,Q,Q),d.normalize(Q,Q),!D.equalsEpsilon(Math.abs(d.dot(z,Q)),1,D.EPSILON7)){E=d.add(y,C,E),E=d.normalize(E,E),E=d.cross(E,I,E),E=d.cross(I,E,E),E=d.normalize(E,E);let j=1/Math.max(.25,d.magnitude(d.cross(E,C,UT))),Z=AO.angleIsGreaterThanPi(y,C,N,r);Z?(b=d.add(N,d.multiplyByScalar(E,j*p,E),b),S=d.add(b,d.multiplyByScalar(v,p,S),S),Va[0]=d.clone(P,Va[0]),Va[1]=d.clone(S,Va[1]),T=aq(Va,A+h,x+h,a),w=Vi.generateArc({positions:Va,granularity:a,ellipsoid:r}),m=lq(w,v,u,m,r,T,1),v=d.cross(I,y,v),v=d.normalize(v,v),B=d.add(b,d.multiplyByScalar(v,p,B),B),c===Hi.ROUNDED||c===Hi.BEVELED?ume(b,S,B,c,Z,r,m,u,x+h,o):(E=d.negate(E,E),m=Cg(N,E,u,m,r,x+h,j,F)),P=d.clone(B,P)):(b=d.add(N,d.multiplyByScalar(E,j*p,E),b),S=d.add(b,d.multiplyByScalar(v,-p,S),S),Va[0]=d.clone(P,Va[0]),Va[1]=d.clone(S,Va[1]),T=aq(Va,A+h,x+h,a),w=Vi.generateArc({positions:Va,granularity:a,ellipsoid:r}),m=lq(w,v,u,m,r,T,1),v=d.cross(I,y,v),v=d.normalize(v,v),B=d.add(b,d.multiplyByScalar(v,-p,B),B),c===Hi.ROUNDED||c===Hi.BEVELED?ume(b,S,B,c,Z,r,m,u,x+h,o):m=Cg(N,E,u,m,r,x+h,j,F),P=d.clone(B,P)),C=d.negate(y,C)}else m=Cg(P,v,u,m,r,A+h,1,1),P=N;A=x,x=s[k+1],N=L}Va[0]=d.clone(P,Va[0]),Va[1]=d.clone(N,Va[1]),T=aq(Va,A+h,x+h,a),w=Vi.generateArc({positions:Va,granularity:a,ellipsoid:r}),m=lq(w,v,u,m,r,T,1),o&&(_=Cg(N,v,f,_,r,x+h,1,1)),g=m.length;let R=o?g+_.length:g,O=new Float64Array(R);return O.set(m),o&&O.set(_,g),O};var qh=AO;var fq={},GT=new d,pme=new d,iet=new d,fme=new d,Rl=[new d,new d],Ame=new d,gme=new d,_me=new d,oet=new d,ret=new d,set=new d,aet=new d,cet=new d,uet=new d,fet=new d,dme=new Fe,hme=new X;function EV(e,t,n,i,o){let r=d.angleBetween(d.subtract(t,e,GT),d.subtract(n,e,pme)),s=i===Hi.BEVELED?1:Math.ceil(r/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;o?u=X.fromQuaternion(Fe.fromAxisAngle(d.negate(e,GT),r/s,dme),hme):u=X.fromQuaternion(Fe.fromAxisAngle(e,r/s,dme),hme);let f=0;t=d.clone(t,GT);for(let h=0;h<s;h++)t=X.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function det(e){let t=Ame,n=gme,i=_me,o=e[1];n=d.fromArray(e[1],o.length-3,n),i=d.fromArray(e[0],0,i),t=d.midpoint(n,i,t);let r=EV(t,n,i,Hi.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=d.fromArray(a,a.length-3,n),i=d.fromArray(o,0,i),t=d.midpoint(n,i,t);let c=EV(t,n,i,Hi.ROUNDED,!1);return[r,c]}function mme(e,t,n,i){let o=GT;return i?o=d.add(e,t,o):(t=d.negate(t,t),o=d.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function uq(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=d.multiplyByScalar(t,n,GT),a=d.negate(s,pme),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let h=d.fromArray(e,f,iet),p=d.add(h,a,fme);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let g=d.add(h,s,fme);r[u--]=g.z,r[u--]=g.y,r[u--]=g.x}return i.push(o,r),i}fq.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var het=new d,met=new d;fq.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=Ame,c=gme,u=_me,f=oet,h=ret,p=set,g=aet,m=cet,_=uet,y=fet,C=[],E=s?[]:void 0,I=s?[]:void 0,b=n[0],S=n[1];c=d.normalize(d.subtract(S,b,c),c),a=i.geodeticSurfaceNormal(b,a),f=d.normalize(d.cross(a,c,f),f),s&&(E.push(f.x,f.y,f.z),I.push(a.x,a.y,a.z)),g=d.clone(b,g),b=S,u=d.negate(c,u);let B,v=[],P,N=n.length;for(P=1;P<N-1;P++){a=i.geodeticSurfaceNormal(b,a),S=n[P+1],c=d.normalize(d.subtract(S,b,c),c);let A=d.multiplyByScalar(a,d.dot(c,a),het);d.subtract(c,A,A),d.normalize(A,A);let x=d.multiplyByScalar(a,d.dot(u,a),met);if(d.subtract(u,x,x),d.normalize(x,x),!D.equalsEpsilon(Math.abs(d.dot(A,x)),1,D.EPSILON7)){h=d.normalize(d.add(c,u,h),h),h=d.cross(h,a,h),h=d.cross(a,h,h),h=d.normalize(h,h);let w=o/Math.max(.25,d.magnitude(d.cross(h,u,GT))),R=qh.angleIsGreaterThanPi(c,u,b,i);h=d.multiplyByScalar(h,w,h),R?(m=d.add(b,h,m),y=d.add(m,d.multiplyByScalar(f,o,y),y),_=d.add(m,d.multiplyByScalar(f,o*2,_),_),Rl[0]=d.clone(g,Rl[0]),Rl[1]=d.clone(y,Rl[1]),B=Vi.generateArc({positions:Rl,granularity:t,ellipsoid:i}),C=uq(B,f,o,C),s&&(E.push(f.x,f.y,f.z),I.push(a.x,a.y,a.z)),p=d.clone(_,p),f=d.normalize(d.cross(a,c,f),f),_=d.add(m,d.multiplyByScalar(f,o*2,_),_),g=d.add(m,d.multiplyByScalar(f,o,g),g),r===Hi.ROUNDED||r===Hi.BEVELED?v.push({leftPositions:EV(m,p,_,r,R)}):v.push({leftPositions:mme(b,d.negate(h,h),_,R)})):(_=d.add(b,h,_),y=d.add(_,d.negate(d.multiplyByScalar(f,o,y),y),y),m=d.add(_,d.negate(d.multiplyByScalar(f,o*2,m),m),m),Rl[0]=d.clone(g,Rl[0]),Rl[1]=d.clone(y,Rl[1]),B=Vi.generateArc({positions:Rl,granularity:t,ellipsoid:i}),C=uq(B,f,o,C),s&&(E.push(f.x,f.y,f.z),I.push(a.x,a.y,a.z)),p=d.clone(m,p),f=d.normalize(d.cross(a,c,f),f),m=d.add(_,d.negate(d.multiplyByScalar(f,o*2,m),m),m),g=d.add(_,d.negate(d.multiplyByScalar(f,o,g),g),g),r===Hi.ROUNDED||r===Hi.BEVELED?v.push({rightPositions:EV(_,p,m,r,R)}):v.push({rightPositions:mme(b,h,m,R)})),u=d.negate(c,u)}b=S}a=i.geodeticSurfaceNormal(b,a),Rl[0]=d.clone(g,Rl[0]),Rl[1]=d.clone(b,Rl[1]),B=Vi.generateArc({positions:Rl,granularity:t,ellipsoid:i}),C=uq(B,f,o,C),s&&(E.push(f.x,f.y,f.z),I.push(a.x,a.y,a.z));let L;return r===Hi.ROUNDED&&(L=det(C)),{positions:C,corners:v,lefts:E,normals:I,endPositions:L}};var $i=fq;var Eme=new d,Ime=new d,IV=new d,xV=new d,pet=new d,xme=new d,Dy=new d,zT=new d;function bme(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Kh(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,u=d.normalize(d.cross(n,t,Dy),Dy);r.normal&&$i.addAttribute(s,t,i,o),r.tangent&&$i.addAttribute(a,u,i,o),r.bitangent&&$i.addAttribute(c,n,i,o)}function Tme(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new Cn,u,f=0,h=0,p,g=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,g+=m*2,h+=i[p+1].length-3;for(f+=3,h+=3,p=0;p<o.length;p++){u=o[p];let J=o[p].leftPositions;l(J)?(m=J.length,f+=m,g+=m):(m=o[p].rightPositions.length,h+=m,g+=m)}let _=l(r),y;_&&(y=r[0].length-3,f+=y,h+=y,y/=3,g+=y*6);let C=f+h,E=new Float64Array(C),I=t.normal?new Float32Array(C):void 0,b=t.tangent?new Float32Array(C):void 0,S=t.bitangent?new Float32Array(C):void 0,B={normals:I,tangents:b,bitangents:S},v=0,P=C-1,N,L,A,x,T=Eme,w=Ime,R,O,k=y/2,F=Qe.createTypedArray(C/3,g),z=0;if(_){O=IV,R=xV;let J=r[0];for(T=d.fromArray(a,0,T),w=d.fromArray(s,0,w),p=0;p<k;p++)O=d.fromArray(J,(k-1-p)*3,O),R=d.fromArray(J,(k+p)*3,R),$i.addAttribute(E,R,v),$i.addAttribute(E,O,void 0,P),Kh(B,T,w,v,P,t),L=v/3,x=L+1,N=(P-2)/3,A=N-1,F[z++]=N,F[z++]=L,F[z++]=A,F[z++]=A,F[z++]=L,F[z++]=x,v+=3,P-=3}let Q=0,H=0,j=i[Q++],Z=i[Q++];E.set(j,v),E.set(Z,P-Z.length+1),w=d.fromArray(s,H,w);let Y,$;for(m=Z.length-3,p=0;p<m;p+=3)Y=n.geodeticSurfaceNormal(d.fromArray(j,p,Dy),Dy),$=n.geodeticSurfaceNormal(d.fromArray(Z,m-p,zT),zT),T=d.normalize(d.add(Y,$,T),T),Kh(B,T,w,v,P,t),L=v/3,x=L+1,N=(P-2)/3,A=N-1,F[z++]=N,F[z++]=L,F[z++]=A,F[z++]=A,F[z++]=L,F[z++]=x,v+=3,P-=3;for(Y=n.geodeticSurfaceNormal(d.fromArray(j,m,Dy),Dy),$=n.geodeticSurfaceNormal(d.fromArray(Z,m,zT),zT),T=d.normalize(d.add(Y,$,T),T),H+=3,p=0;p<o.length;p++){let J;u=o[p];let pe=u.leftPositions,Ce=u.rightPositions,fe,ye,Ie=xme,ve=IV,be=xV;if(T=d.fromArray(a,H,T),l(pe)){for(Kh(B,T,w,void 0,P,t),P-=3,fe=x,ye=A,J=0;J<pe.length/3;J++)Ie=d.fromArray(pe,J*3,Ie),F[z++]=fe,F[z++]=ye-J-1,F[z++]=ye-J,$i.addAttribute(E,Ie,void 0,P),ve=d.fromArray(E,(ye-J-1)*3,ve),be=d.fromArray(E,fe*3,be),w=d.normalize(d.subtract(ve,be,w),w),Kh(B,T,w,void 0,P,t),P-=3;Ie=d.fromArray(E,fe*3,Ie),ve=d.subtract(d.fromArray(E,ye*3,ve),Ie,ve),be=d.subtract(d.fromArray(E,(ye-J)*3,be),Ie,be),w=d.normalize(d.add(ve,be,w),w),Kh(B,T,w,v,void 0,t),v+=3}else{for(Kh(B,T,w,v,void 0,t),v+=3,fe=A,ye=x,J=0;J<Ce.length/3;J++)Ie=d.fromArray(Ce,J*3,Ie),F[z++]=fe,F[z++]=ye+J,F[z++]=ye+J+1,$i.addAttribute(E,Ie,v),ve=d.fromArray(E,fe*3,ve),be=d.fromArray(E,(ye+J)*3,be),w=d.normalize(d.subtract(ve,be,w),w),Kh(B,T,w,v,void 0,t),v+=3;Ie=d.fromArray(E,fe*3,Ie),ve=d.subtract(d.fromArray(E,(ye+J)*3,ve),Ie,ve),be=d.subtract(d.fromArray(E,ye*3,be),Ie,be),w=d.normalize(d.negate(d.add(be,ve,w),w),w),Kh(B,T,w,void 0,P,t),P-=3}for(j=i[Q++],Z=i[Q++],j.splice(0,3),Z.splice(Z.length-3,3),E.set(j,v),E.set(Z,P-Z.length+1),m=Z.length-3,H+=3,w=d.fromArray(s,H,w),J=0;J<Z.length;J+=3)Y=n.geodeticSurfaceNormal(d.fromArray(j,J,Dy),Dy),$=n.geodeticSurfaceNormal(d.fromArray(Z,m-J,zT),zT),T=d.normalize(d.add(Y,$,T),T),Kh(B,T,w,v,P,t),x=v/3,L=x-1,A=(P-2)/3,N=A+1,F[z++]=N,F[z++]=L,F[z++]=A,F[z++]=A,F[z++]=L,F[z++]=x,v+=3,P-=3;v-=3,P+=3}if(T=d.fromArray(a,a.length-3,T),Kh(B,T,w,v,P,t),_){v+=3,P-=3,O=IV,R=xV;let J=r[1];for(p=0;p<k;p++)O=d.fromArray(J,(y-p-1)*3,O),R=d.fromArray(J,p*3,R),$i.addAttribute(E,O,void 0,P),$i.addAttribute(E,R,v),Kh(B,T,w,v,P,t),x=v/3,L=x-1,A=(P-2)/3,N=A+1,F[z++]=N,F[z++]=L,F[z++]=A,F[z++]=A,F[z++]=L,F[z++]=x,v+=3,P-=3}if(c.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:E}),t.st){let J=new Float32Array(C/3*2),pe,Ce,fe=0;if(_){f/=3,h/=3;let ye=Math.PI/(y+1);Ce=1/(f-y+1),pe=1/(h-y+1);let Ie,ve=y/2;for(p=ve+1;p<y+1;p++)Ie=D.PI_OVER_TWO+ye*p,J[fe++]=pe*(1+Math.cos(Ie)),J[fe++]=.5*(1+Math.sin(Ie));for(p=1;p<h-y+1;p++)J[fe++]=p*pe,J[fe++]=0;for(p=y;p>ve;p--)Ie=D.PI_OVER_TWO-p*ye,J[fe++]=1-pe*(1+Math.cos(Ie)),J[fe++]=.5*(1+Math.sin(Ie));for(p=ve;p>0;p--)Ie=D.PI_OVER_TWO-ye*p,J[fe++]=1-Ce*(1+Math.cos(Ie)),J[fe++]=.5*(1+Math.sin(Ie));for(p=f-y;p>0;p--)J[fe++]=p*Ce,J[fe++]=1;for(p=1;p<ve+1;p++)Ie=D.PI_OVER_TWO+ye*p,J[fe++]=Ce*(1+Math.cos(Ie)),J[fe++]=.5*(1+Math.sin(Ie))}else{for(f/=3,h/=3,Ce=1/(f-1),pe=1/(h-1),p=0;p<h;p++)J[fe++]=p*pe,J[fe++]=0;for(p=f;p>0;p--)J[fe++]=(p-1)*Ce,J[fe++]=1}c.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:B.normals})),t.tangent&&(c.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:B.tangents})),t.bitangent&&(c.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:B.bitangents})),{attributes:c,indices:F}}function Aet(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,h=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,g=Eme,m=Ime,_=IV,y=xV,C=pet,E=xme,I=c;for(u=0;u<s;u+=3){let b=I+c;g=d.fromArray(n,u,g),m=d.fromArray(n,u+s,m),_=d.fromArray(n,(u+3)%s,_),m=d.subtract(m,g,m),_=d.subtract(_,g,_),y=d.normalize(d.cross(m,_,y),y),t.normal&&($i.addAttribute(f,y,b),$i.addAttribute(f,y,b+3),$i.addAttribute(f,y,I),$i.addAttribute(f,y,I+3)),(t.tangent||t.bitangent)&&(E=d.fromArray(i,u,E),t.bitangent&&($i.addAttribute(p,E,b),$i.addAttribute(p,E,b+3),$i.addAttribute(p,E,I),$i.addAttribute(p,E,I+3)),t.tangent&&(C=d.normalize(d.cross(E,y,C),C),$i.addAttribute(h,C,b),$i.addAttribute(h,C,b+3),$i.addAttribute(h,C,I),$i.addAttribute(h,C,I+3))),I+=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(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let b=e.tangent.values;h.set(b),h.set(b,s),e.tangent.values=h}}if(t.st){let f=e.st.values,h=new Float32Array(a*6);h.set(f),h.set(f,a);let p=a*2;for(let g=0;g<2;g++){for(h[p++]=f[0],h[p++]=f[1],u=2;u<a;u+=2){let m=f[u],_=f[u+1];h[p++]=m,h[p++]=_,h[p++]=m,h[p++]=_}h[p++]=f[0],h[p++]=f[1]}e.st.values=h}return e}function dq(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 o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function get(e,t){let n=new Re({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=$i.computePositions(e),r=Tme(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,h=f.length,p=new Float64Array(h*6),g=new Float64Array(h);g.set(f);let m=new Float64Array(h*4);f=yi.scaleToGeodeticHeight(f,s,i),m=dq(f,0,m),g=yi.scaleToGeodeticHeight(g,a,i),m=dq(g,h*2,m),p.set(f),p.set(g,h),p.set(m,h*2),c.position.values=p,c=Aet(c,t);let _,y=h/3;if(e.shadowVolume){let N=c.normal.values;h=N.length;let L=new Float32Array(h*6);for(_=0;_<h;_++)N[_]=-N[_];L.set(N,h),L=dq(N,h*4,L),c.extrudeDirection=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:L}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let N=new Uint8Array(y*6);if(e.offsetAttribute===dn.TOP)N=N.fill(1,0,y).fill(1,y*2,y*4);else{let L=e.offsetAttribute===dn.NONE?0:1;N=N.fill(L)}c.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:N})}let C=u.length,E=y+y,I=Qe.createTypedArray(p.length/3,C*2+E*3);I.set(u);let b=C;for(_=0;_<C;_+=3){let N=u[_],L=u[_+1],A=u[_+2];I[b++]=A+y,I[b++]=L+y,I[b++]=N+y}let S,B,v,P;for(_=0;_<E;_+=2)S=_+E,B=S+E,v=S+1,P=B+1,I[b++]=S,I[b++]=B,I[b++]=v,I[b++]=v,I[b++]=B,I[b++]=P;return{attributes:c,indices:I}}var yme=new d,gO=new d,Sd=new me;function Cme(e,t,n,i,o,r){let s=d.subtract(t,e,yme);d.normalize(s,s);let a=n.geodeticSurfaceNormal(e,gO),c=d.cross(s,a,yme);d.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,h=r.latitude,p=r.longitude;d.add(e,c,gO),n.cartesianToCartographic(gO,Sd);let g=Sd.latitude,m=Sd.longitude;u=Math.min(u,g),f=Math.min(f,m),h=Math.max(h,g),p=Math.max(p,m),d.subtract(e,c,gO),n.cartesianToCartographic(gO,Sd),g=Sd.latitude,m=Sd.longitude,u=Math.min(u,g),f=Math.min(f,m),h=Math.max(h,g),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=h,r.longitude=p}var Td=new d,_O=new d,gu=new me,_u=new me;function Sme(e,t,n,i,o){e=bme(e,t);let r=Ro(e,d.equalsEpsilon),s=r.length;if(s<2||n<=0)return new ae;let a=n*.5;gu.latitude=Number.POSITIVE_INFINITY,gu.longitude=Number.POSITIVE_INFINITY,_u.latitude=Number.NEGATIVE_INFINITY,_u.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Hi.ROUNDED){let p=r[0];d.subtract(p,r[1],Td),d.normalize(Td,Td),d.multiplyByScalar(Td,a,Td),d.add(p,Td,_O),t.cartesianToCartographic(_O,Sd),c=Sd.latitude,u=Sd.longitude,gu.latitude=Math.min(gu.latitude,c),gu.longitude=Math.min(gu.longitude,u),_u.latitude=Math.max(_u.latitude,c),_u.longitude=Math.max(_u.longitude,u)}for(let p=0;p<s-1;++p)Cme(r[p],r[p+1],t,a,gu,_u);let f=r[s-1];d.subtract(f,r[s-2],Td),d.normalize(Td,Td),d.multiplyByScalar(Td,a,Td),d.add(f,Td,_O),Cme(f,_O,t,a,gu,_u),i===Hi.ROUNDED&&(t.cartesianToCartographic(_O,Sd),c=Sd.latitude,u=Sd.longitude,gu.latitude=Math.min(gu.latitude,c),gu.longitude=Math.min(gu.longitude,u),_u.latitude=Math.max(_u.latitude,c),_u.longitude=Math.max(_u.longitude,u));let h=l(o)?o:new ae;return h.north=_u.latitude,h.south=gu.latitude,h.east=_u.longitude,h.west=gu.longitude,h}function Ig(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._vertexFormat=Re.clone(e.vertexFormat??Re.DEFAULT),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??Hi.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*d.packedLength+ne.packedLength+Re.packedLength+7}Ig.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=d.packedLength)d.pack(i[r],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.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 wme=ne.clone(ne.UNIT_SPHERE),Bme=new Re,Eg={positions:void 0,ellipsoid:wme,vertexFormat:Bme,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Ig.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=d.packedLength)o[m]=d.unpack(e,t);let r=ne.unpack(e,t,wme);t+=ne.packedLength;let s=Re.unpack(e,t,Bme);t+=Re.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++],p=e[t++]===1,g=e[t];return l(n)?(n._positions=o,n._ellipsoid=ne.clone(r,n._ellipsoid),n._vertexFormat=Re.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=h,n._shadowVolume=p,n._offsetAttribute=g===-1?void 0:g,n):(Eg.positions=o,Eg.width=a,Eg.height=c,Eg.extrudedHeight=u,Eg.cornerType=f,Eg.granularity=h,Eg.shadowVolume=p,Eg.offsetAttribute=g===-1?void 0:g,new Ig(Eg))};Ig.computeRectangle=function(e,t){e=e??V.EMPTY_OBJECT;let n=e.positions,i=e.width,o=e.ellipsoid??ne.default,r=e.cornerType??Hi.ROUNDED;return Sme(n,o,i,r,t)};Ig.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=bme(t,i);let o=Ro(t,d.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!D.equalsEpsilon(r,s,0,D.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=get(u,c);else{let g=$i.computePositions(u);if(f=Tme(g,c,i),f.attributes.position.values=yi.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===dn.NONE?0:1,_=f.attributes.position.values.length,y=new Uint8Array(_/3).fill(m);f.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let h=f.attributes,p=le.fromVertices(h.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new ht({attributes:h,indices:f.indices,primitiveType:Ne.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Ig.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Ig({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Re.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Ig.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Sme(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var z0=Ig;var Dme=new d,vme=new d,_et=new d;function yet(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Pme(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new Cn,a,c=0,u=0,f,h=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,h+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){a=o[f];let R=o[f].leftPositions;l(R)?(p=R.length,c+=p,h+=p/3*2):(p=o[f].rightPositions.length,u+=p,h+=p/3*2)}let g=l(r),m;g&&(m=r[0].length-3,c+=m,u+=m,m/=3,h+=m*4);let _=c+u,y=new Float64Array(_),C=0,E=_-1,I,b,S,B,v,P,N=m/2,L=Qe.createTypedArray(_/3,h+4),A=0;if(L[A++]=C/3,L[A++]=(E-2)/3,g){n.push(C/3),P=Dme,v=vme;let R=r[0];for(f=0;f<N;f++)P=d.fromArray(R,(N-1-f)*3,P),v=d.fromArray(R,(N+f)*3,v),$i.addAttribute(y,v,C),$i.addAttribute(y,P,void 0,E),b=C/3,B=b+1,I=(E-2)/3,S=I-1,L[A++]=I,L[A++]=S,L[A++]=b,L[A++]=B,C+=3,E-=3}let x=0,T=i[x++],w=i[x++];for(y.set(T,C),y.set(w,E-w.length+1),p=w.length-3,n.push(C/3,(E-2)/3),f=0;f<p;f+=3)b=C/3,B=b+1,I=(E-2)/3,S=I-1,L[A++]=I,L[A++]=S,L[A++]=b,L[A++]=B,C+=3,E-=3;for(f=0;f<o.length;f++){let R;a=o[f];let O=a.leftPositions,k=a.rightPositions,F,z=_et;if(l(O)){for(E-=3,F=S,n.push(B),R=0;R<O.length/3;R++)z=d.fromArray(O,R*3,z),L[A++]=F-R-1,L[A++]=F-R,$i.addAttribute(y,z,void 0,E),E-=3;n.push(F-Math.floor(O.length/6)),t===Hi.BEVELED&&n.push((E-2)/3+1),C+=3}else{for(C+=3,F=B,n.push(S),R=0;R<k.length/3;R++)z=d.fromArray(k,R*3,z),L[A++]=F+R,L[A++]=F+R+1,$i.addAttribute(y,z,C),C+=3;n.push(F+Math.floor(k.length/6)),t===Hi.BEVELED&&n.push(C/3-1),E-=3}for(T=i[x++],w=i[x++],T.splice(0,3),w.splice(w.length-3,3),y.set(T,C),y.set(w,E-w.length+1),p=w.length-3,R=0;R<w.length;R+=3)B=C/3,b=B-1,S=(E-2)/3,I=S+1,L[A++]=I,L[A++]=S,L[A++]=b,L[A++]=B,C+=3,E-=3;C-=3,E+=3,n.push(C/3,(E-2)/3)}if(g){C+=3,E-=3,P=Dme,v=vme;let R=r[1];for(f=0;f<N;f++)P=d.fromArray(R,(m-f-1)*3,P),v=d.fromArray(R,f*3,v),$i.addAttribute(y,P,void 0,E),$i.addAttribute(y,v,C),B=C/3,b=B-1,S=(E-2)/3,I=S+1,L[A++]=I,L[A++]=S,L[A++]=b,L[A++]=B,C+=3,E-=3;n.push(C/3)}else n.push(C/3,(E-2)/3);return L[A++]=C/3,L[A++]=(E-2)/3,s.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:y}),{attributes:s,indices:L,wallIndices:n}}function Cet(e){let t=e.ellipsoid,n=$i.computePositions(e),i=Pme(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,h=new Float64Array(f);h.set(u);let p=new Float64Array(f*2);if(u=yi.scaleToGeodeticHeight(u,r,t),h=yi.scaleToGeodeticHeight(h,s,t),p.set(u),p.set(h,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let I=new Uint8Array(f*2);if(e.offsetAttribute===dn.TOP)I=I.fill(1,0,f);else{let b=e.offsetAttribute===dn.NONE?0:1;I=I.fill(b)}a.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}let g,m=c.length,_=Qe.createTypedArray(p.length/3,(m+o.length)*2);_.set(c);let y=m;for(g=0;g<m;g+=2){let I=c[g],b=c[g+1];_[y++]=I+f,_[y++]=b+f}let C,E;for(g=0;g<o.length;g++)C=o[g],E=C+f,_[y++]=C,_[y++]=E;return{attributes:a,indices:_}}function yO(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??Hi.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*d.packedLength+ne.packedLength+6}yO.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=d.packedLength)d.pack(i[r],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.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 Rme=ne.clone(ne.UNIT_SPHERE),vy={positions:void 0,ellipsoid:Rme,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};yO.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=d.packedLength)o[p]=d.unpack(e,t);let r=ne.unpack(e,t,Rme);t+=ne.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t];return l(n)?(n._positions=o,n._ellipsoid=ne.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=h===-1?void 0:h,n):(vy.positions=o,vy.width=s,vy.height=a,vy.extrudedHeight=c,vy.cornerType=u,vy.granularity=f,vy.offsetAttribute=h===-1?void 0:h,new yO(vy))};yO.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=yet(t,i);let o=Ro(t,d.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!D.equalsEpsilon(r,s,0,D.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=Cet(c);else{let p=$i.computePositions(c);if(u=Pme(p,c.cornerType),u.attributes.position.values=yi.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let g=u.attributes.position.values.length,m=e._offsetAttribute===dn.NONE?0:1,_=new Uint8Array(g/3).fill(m);u.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}}let f=u.attributes,h=le.fromVertices(f.position.values,void 0,3);return new ht({attributes:f,indices:u.indices,primitiveType:Ne.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};var CO=yO;var Eet=new si(0);function Ml(e){gi.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(Ml.prototype=Object.create(gi.prototype),Ml.prototype.constructor=Ml);Object.defineProperties(Ml.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Ml.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&dl.isSupported(this._scene)};Ml.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};Ml.prototype._computeCenter=he.throwInstantiationError;Ml.prototype._onEntityPropertyChanged=function(e,t,n,i){if(gi.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(o.zIndex)&&(l(o.height)||l(o.extrudedHeight))&&yt(yt.geometryZIndex),this._zIndex=o.zIndex??Eet,l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference,s=o.extrudedHeightReference;if(l(r)||l(s)){let a=new Ch(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new DE(this._scene,a,r,s)}};Ml.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),gi.prototype.destroy.call(this)};Ml.getGeometryHeight=function(e,t){if(!l(e)){t!==Ze.NONE&&yt(yt.geometryHeightReference);return}return Zf(t)?0:e};Ml.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==Ze.NONE&&yt(yt.geometryExtrudedHeightReference);return}return Zf(t)?Ml.CLAMP_TO_GROUND:e};Ml.CLAMP_TO_GROUND="clamp";Ml.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=Ze.NONE),(!l(n)||!l(i))&&(i=Ze.NONE);let o=0;if(t!==Ze.NONE&&o++,i===Ze.RELATIVE_TO_GROUND&&o++,o===2)return dn.ALL;if(o===1)return dn.TOP};var ei=Ml;var Mme=new G,Nme=d.ZERO,Lme=new d,Ome=new ae;function Iet(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 Xh(e,t){ei.call(this,{entity:e,scene:t,geometryOptions:new Iet(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(Xh.prototype=Object.create(ei.prototype),Xh.prototype.constructor=Xh);Xh.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new wn(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 Jt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Mme)),l(o)||(o=G.WHITE),i.color=en.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,Nme,Lme))),new Rt({id:t,geometry:new z0(this._options),attributes:i})};Xh.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,Mme),o={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,Nme,Lme))),new Rt({id:t,geometry:new CO(this._options),attributes:o})};Xh.prototype._computeCenter=function(e,t){let n=W.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return d.clone(n[Math.floor(n.length/2)],t)};Xh.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||gi.prototype._isHidden.call(this,e,t)};Xh.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!W.isConstant(t.height)||!W.isConstant(t.extrudedHeight)||!W.isConstant(t.granularity)||!W.isConstant(t.width)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.cornerType)||!W.isConstant(t.zIndex)||this._onTerrain&&!W.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Jt)};Xh.prototype._setStaticOptions=function(e,t){let n=W.getValueOrUndefined(t.height,Ye.MINIMUM_VALUE),i=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),o=W.getValueOrUndefined(t.extrudedHeight,Ye.MINIMUM_VALUE),r=W.getValueOrDefault(t.extrudedHeightReference,Ye.MINIMUM_VALUE,Ze.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Jt?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Ye.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(Ye.MINIMUM_VALUE),s.granularity=W.getValueOrUndefined(t.granularity,Ye.MINIMUM_VALUE),s.cornerType=W.getValueOrUndefined(t.cornerType,Ye.MINIMUM_VALUE),s.offsetAttribute=ei.computeGeometryOffsetAttribute(n,i,o,r),s.height=ei.getGeometryHeight(n,i),o=ei.getGeometryExtrudedHeight(o,r),o===ei.CLAMP_TO_GROUND&&(o=Ii.getMinimumMaximumHeights(z0.computeRectangle(s,Ome)).minimumTerrainHeight),s.extrudedHeight=o};Xh.DynamicGeometryUpdater=VT;function VT(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(VT.prototype=Object.create(Ai.prototype),VT.prototype.constructor=VT);VT.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||Ai.prototype._isHidden.call(this,e,t,n)};VT.prototype._setOptions=function(e,t,n){let i=this._options,o=W.getValueOrUndefined(t.height,n),r=W.getValueOrDefault(t.heightReference,n,Ze.NONE),s=W.getValueOrUndefined(t.extrudedHeight,n),a=W.getValueOrDefault(t.extrudedHeightReference,n,Ze.NONE);l(s)&&!l(o)&&(o=0),i.positions=W.getValueOrUndefined(t.positions,n),i.width=W.getValueOrUndefined(t.width,n),i.granularity=W.getValueOrUndefined(t.granularity,n),i.cornerType=W.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=ei.computeGeometryOffsetAttribute(o,r,s,a),i.height=ei.getGeometryHeight(o,r),s=ei.getGeometryExtrudedHeight(s,a),s===ei.CLAMP_TO_GROUND&&(s=Ii.getMinimumMaximumHeights(z0.computeRectangle(i,Ome)).minimumTerrainHeight),i.extrudedHeight=s};var EO=Xh;function bV(){he.throwInstantiationError()}Object.defineProperties(bV.prototype,{name:{get:he.throwInstantiationError},clock:{get:he.throwInstantiationError},entities:{get:he.throwInstantiationError},isLoading:{get:he.throwInstantiationError},changedEvent:{get:he.throwInstantiationError},errorEvent:{get:he.throwInstantiationError},loadingEvent:{get:he.throwInstantiationError},show:{get:he.throwInstantiationError},clustering:{get:he.throwInstantiationError}});bV.prototype.update=function(e){he.throwInstantiationError()};bV.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var as=bV;function up(e,t){this._ellipsoid=e,this._cameraPosition=new d,this._cameraPositionInScaledSpace=new d,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(up.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=d.magnitudeSquared(n)-1;d.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var Fme=new d;up.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,Fme);return mq(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};up.prototype.isScaledSpacePointVisible=function(e){return mq(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var xet=new d;up.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=xet,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),mq(e,o,i)};up.prototype.computeHorizonCullingPoint=function(e,t,n){return Ume(this._ellipsoid,e,t,n)};var Qme=ne.clone(ne.UNIT_SPHERE);up.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=kme(this._ellipsoid,n,Qme);return Ume(o,e,t,i)};up.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return Gme(this._ellipsoid,e,t,n,i,o)};up.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=kme(this._ellipsoid,o,Qme);return Gme(s,e,t,n,i,r)};var bet=[];up.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ae.subsample(e,t,0,bet),o=le.fromPoints(i);if(!(d.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Tet=new d;function kme(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=d.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Tet);e=ne.fromCartesian3(i,n)}return e}function Ume(e,t,n,i){l(i)||(i=new d);let o=Hme(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],u=zme(e,c,o);if(u<0)return;r=Math.max(r,u)}return Vme(o,r,i)}var TV=new d;function Gme(e,t,n,i,o,r){l(r)||(r=new d),i=i??3,o=o??d.ZERO;let s=Hme(e,t),a=0;for(let c=0,u=n.length;c<u;c+=i){TV.x=n[c]+o.x,TV.y=n[c+1]+o.y,TV.z=n[c+2]+o.z;let f=zme(e,TV,s);if(f<0)return;a=Math.max(a,f)}return Vme(s,a,r)}function mq(e,t,n){let i=t,o=n,r=d.subtract(e,i,Fme),s=-d.dot(r,i);return!(o<0?s>0:s>o&&s*s/d.magnitudeSquared(r)>o)}var wet=new d,Bet=new d;function zme(e,t,n){let i=e.transformPositionToScaledSpace(t,wet),o=d.magnitudeSquared(i),r=Math.sqrt(o),s=d.divideByScalar(i,r,Bet);o=Math.max(1,o),r=Math.max(1,r);let a=d.dot(s,n),c=d.magnitude(d.cross(s,n,s)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(a*u-c*f)}function Vme(e,t,n){if(!(t<=0||t===1/0||t!==t))return d.multiplyByScalar(e,t,n)}var hq=new d;function Hme(e,t){return d.equals(t,d.ZERO)?t:(e.transformPositionToScaledSpace(t,hq),d.normalize(hq,hq))}var xg=up;function Wr(e,t){e=e??V.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=Kt.clone(n)),l(i)&&(i=Kt.clone(i)),l(o)&&(o=Gt.clone(o)),this._show=e.show??!0,this._position=d.clone(e.position??d.ZERO),this._actualPosition=d.clone(this._position),this._color=G.clone(e.color??G.WHITE),this._outlineColor=G.clone(e.outlineColor??G.TRANSPARENT),this._outlineWidth=e.outlineWidth??0,this._pixelSize=e.pixelSize??10,this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,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??Tr.NONE}var Wme=Wr.SHOW_INDEX=0,qme=Wr.POSITION_INDEX=1,Det=Wr.COLOR_INDEX=2,vet=Wr.OUTLINE_COLOR_INDEX=3,Pet=Wr.OUTLINE_WIDTH_INDEX=4,Ret=Wr.PIXEL_SIZE_INDEX=5,Met=Wr.SCALE_BY_DISTANCE_INDEX=6,Net=Wr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,Let=Wr.DISTANCE_DISPLAY_CONDITION_INDEX=8,Oet=Wr.DISABLE_DEPTH_DISTANCE_INDEX=9,Fet=Wr.SPLIT_DIRECTION_INDEX=10;Wr.NUMBER_OF_PROPERTIES=11;function lf(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(Wr.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,lf(this,Wme))}},position:{get:function(){return this._position},set:function(e){let t=this._position;d.equals(t,e)||(d.clone(e,t),d.clone(e,this._actualPosition),lf(this,qme))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;Kt.equals(t,e)||(this._scaleByDistance=Kt.clone(e,t),lf(this,Met))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;Kt.equals(t,e)||(this._translucencyByDistance=Kt.clone(e,t),lf(this,Net))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,lf(this,Ret))}},color:{get:function(){return this._color},set:function(e){let t=this._color;G.equals(t,e)||(G.clone(e,t),lf(this,Det))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;G.equals(t,e)||(G.clone(e,t),lf(this,vet))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,lf(this,Pet))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Gt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Gt.clone(e,this._distanceDisplayCondition),lf(this,Let))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,lf(this,Oet))}},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,lf(this,Wme))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,lf(this,Fet))}}});Wr.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};Wr.prototype._getActualPosition=function(){return this._actualPosition};Wr.prototype._setActualPosition=function(e){d.clone(e,this._actualPosition),lf(this,qme)};var jme=new se;Wr._computeActualPosition=function(e,t,n){return t.mode===oe.SCENE3D?e:(M.multiplyByPoint(n,e,jme),Ji.computeActualEllipsoidPosition(t,jme))};var Yme=new se;Wr._computeScreenSpacePosition=function(e,t,n,i){let o=M.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,Yme),Yme);return Ji.worldToWindowCoordinates(n,o,i)};Wr.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new U);let i=n.modelMatrix,o=Wr._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};Wr.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,c=i;return l(n)||(n=new qe),n.x=r,n.y=s,n.width=a,n.height=c,n};Wr.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&d.equals(this._position,e._position)&&G.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&G.equals(this._outlineColor,e._outlineColor)&&Kt.equals(this._scaleByDistance,e._scaleByDistance)&&Kt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Gt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};Wr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var Xs=Wr;var Py=`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; // The distance in UV space from this fragment to the center of the point, at most 0.5. float distanceToCenter = length(gl_PointCoord - vec2(0.5)); // The max distance stops one pixel shy of the edge to leave space for anti-aliasing. 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; // Fully transparent parts of the billboard are not pickable. #if !defined(OPAQUE) && !defined(TRANSLUCENT) if (color.a < 0.005) // matches 0/255 and 1/255 { discard; } #else // The billboard is rendered twice. The opaque pass discards translucent fragments // and the translucent pass discards opaque fragments. #ifdef OPAQUE if (color.a < 0.995) // matches < 254/255 { discard; } #else if (color.a >= 0.995) // matches 254/255 and 255/255 { discard; } #endif #endif out_FragColor = czm_gammaCorrect(color); czm_writeLogDepth(); } `;var IO=`uniform float u_maxTotalPointSize; in vec4 positionHighAndSize; in vec4 positionLowAndOutline; in vec4 compressedAttribute0; // color, outlineColor, pick color in vec4 compressedAttribute1; // show, translucency by distance, some free space in vec4 scaleByDistance; // near, nearScale, far, farScale in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection 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() { // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition // unpack attributes vec3 positionHigh = positionHighAndSize.xyz; vec3 positionLow = positionLowAndOutline.xyz; float outlineWidthBothSides = 2.0 * positionLowAndOutline.w; float totalSize = positionHighAndSize.w + outlineWidthBothSides; float outlinePercent = outlineWidthBothSides / totalSize; // Scale in response to browser-zoom. 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; vec4 outlineColor; vec4 pickColor; // compressedAttribute0.z => pickColor.rgb temp = compressedAttribute0.z * SHIFT_RIGHT8; pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8; pickColor.r = floor(temp); // compressedAttribute0.x => color.rgb temp = compressedAttribute0.x * SHIFT_RIGHT8; color.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; color.g = (temp - floor(temp)) * SHIFT_LEFT8; color.r = floor(temp); // compressedAttribute0.y => outlineColor.rgb temp = compressedAttribute0.y * SHIFT_RIGHT8; outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8; temp = floor(temp) * SHIFT_RIGHT8; outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8; outlineColor.r = floor(temp); // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a temp = compressedAttribute0.w * SHIFT_RIGHT8; pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8; pickColor = pickColor / 255.0; temp = floor(temp) * SHIFT_RIGHT8; outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8; outlineColor /= 255.0; color.a = floor(temp); color /= 255.0; /////////////////////////////////////////////////////////////////////////// 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) { // 2D camera distance is a special case // treat all billboards as flattened to the z=0.0 plane 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) { // Add padding for anti-aliasing on both sides. totalSize += 3.0; } // Clamp to max point size. totalSize = min(totalSize, u_maxTotalPointSize); // If size is too small, push vertex behind near plane for clipping. // Note that context.minimumAliasedPointSize "will be at most 1.0". 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); // push vertex behind near plane for clipping 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) { // push vertex behind camera to force it to be clipped 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) { // Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w. 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))) { // Position z on the near plane. 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 Qet=Xs.SHOW_INDEX,gq=Xs.POSITION_INDEX,Kme=Xs.COLOR_INDEX,ket=Xs.OUTLINE_COLOR_INDEX,Uet=Xs.OUTLINE_WIDTH_INDEX,Get=Xs.PIXEL_SIZE_INDEX,Xme=Xs.SCALE_BY_DISTANCE_INDEX,Jme=Xs.TRANSLUCENCY_BY_DISTANCE_INDEX,Zme=Xs.DISTANCE_DISPLAY_CONDITION_INDEX,zet=Xs.DISABLE_DEPTH_DISTANCE_INDEX,Vet=Xs.SPLIT_DIRECTION_INDEX,_q=Xs.NUMBER_OF_PROPERTIES,jc={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function wd(e){e=e??V.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(_q),this._maxPixelSize=1,this._baseVolume=new le,this._baseVolumeWC=new le,this._baseVolume2D=new le,this._boundingVolume=new le,this._boundingVolumeDirty=!1,this._colorCommands=[],this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??Uo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=oe.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW,Ue.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(wd.prototype,{length:{get:function(){return yq(this),this._pointPrimitives.length}}});function $me(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}wd.prototype.add=function(e){let t=new Xs(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};wd.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};wd.prototype.removeAll=function(){$me(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function yq(e){if(e._pointPrimitivesRemoved){e._pointPrimitivesRemoved=!1;let t=[],n=e._pointPrimitives,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];s&&(s._index=r++,t.push(s))}e._pointPrimitives=t}}wd.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};wd.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};wd.prototype.get=function(e){return yq(this),this._pointPrimitives[e]};wd.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<_q;++i){let o=n[i]===0?Ue.STATIC_DRAW:Ue.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function Het(e,t,n){return new lA(e,[{index:jc.positionHighAndSize,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[gq]},{index:jc.positionLowAndShow,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[gq]},{index:jc.compressedAttribute0,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Kme]},{index:jc.compressedAttribute1,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Jme]},{index:jc.scaleByDistance,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Xme]},{index:jc.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:n[Zme]}],t)}var pq=new $n;function epe(e,t,n,i){let o=i._index,r=i._getActualPosition();e._mode===oe.SCENE3D&&(le.expand(e._baseVolume,r,e._baseVolume),e._boundingVolumeDirty=!0),$n.fromCartesian(r,pq);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let c=n[jc.positionHighAndSize],u=pq.high;c(o,u.x,u.y,u.z,s);let f=n[jc.positionLowAndOutline],h=pq.low;f(o,h.x,h.y,h.z,a)}var SV=65536,xO=256;function tpe(e,t,n,i){let o=i._index,r=i.color,s=i.getPickId(t).color,a=i.outlineColor,c=G.floatToByte(r.red),u=G.floatToByte(r.green),f=G.floatToByte(r.blue),h=c*SV+u*xO+f;c=G.floatToByte(a.red),u=G.floatToByte(a.green),f=G.floatToByte(a.blue);let p=c*SV+u*xO+f;c=G.floatToByte(s.red),u=G.floatToByte(s.green),f=G.floatToByte(s.blue);let g=c*SV+u*xO+f,m=G.floatToByte(r.alpha)*SV+G.floatToByte(a.alpha)*xO+G.floatToByte(s.alpha),_=n[jc.compressedAttribute0];_(o,h,p,g,m)}function npe(e,t,n,i){let o=i._index,r=0,s=1,a=1,c=1,u=i.translucencyByDistance;l(u)&&(r=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 h=(f?1:0)*xO+s;c=D.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,g=n[jc.compressedAttribute1];g(o,h,p,r,a)}function ipe(e,t,n,i){let o=i._index,r=n[jc.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)),r(o,s,a,c,u)}function ope(e,t,n,i){let o=i._index,r=n[jc.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,h=i.splitDirection;l(h)&&(f=h),r(o,s,a,u,f)}function Wet(e,t,n,i){epe(e,t,n,i),tpe(e,t,n,i),npe(e,t,n,i),ipe(e,t,n,i),ope(e,t,n,i)}function Aq(e,t,n,i,o,r){let s;i.mode===oe.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,h=Xs._computeActualPosition(f,i,o);l(h)&&(u._setActualPosition(h),r?a.push(h):le.expand(s,h,s))}r&&le.fromPoints(a,s)}function jet(e,t){let n=t.mode,i=e._pointPrimitives,o=e._pointPrimitivesToUpdate,r=e._modelMatrix;e._createVertexArray||e._mode!==n||n!==oe.SCENE3D&&!M.equals(r,e.modelMatrix)?(e._mode=n,M.clone(e.modelMatrix,r),e._createVertexArray=!0,(n===oe.SCENE3D||n===oe.SCENE2D||n===oe.COLUMBUS_VIEW)&&Aq(e,i,i.length,t,r,!0)):n===oe.MORPHING?Aq(e,i,i.length,t,r,!0):(n===oe.SCENE2D||n===oe.COLUMBUS_VIEW)&&Aq(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function Yet(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var qet=[];wd.prototype.update=function(e){if(yq(this),!this.show)return;this._maxTotalPointSize=qt.maximumAliasedPointSize,jet(this,e);let n=this._pointPrimitives.length,i=this._pointPrimitivesToUpdate,o=this._pointPrimitivesToUpdateIndex,r=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 S=0;S<_q;++S)r[S]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=Het(c,n,this._buffersUsage),a=this._vaf.writers;for(let S=0;S<n;++S){let B=this._pointPrimitives[S];B._dirty=!1,Wet(this,c,a,B)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let S=qet;S.length=0,(r[gq]||r[Uet]||r[Get])&&S.push(epe),(r[Kme]||r[ket])&&S.push(tpe),(r[Qet]||r[Jme])&&S.push(npe),r[Xme]&&S.push(ipe),(r[Zme]||r[zet]||r[Vet])&&S.push(ope);let B=S.length;if(a=this._vaf.writers,o/n>.1){for(let v=0;v<o;++v){let P=i[v];P._dirty=!1;for(let N=0;N<B;++N)S[N](this,c,a,P)}this._vaf.commit()}else{for(let v=0;v<o;++v){let P=i[v];P._dirty=!1;for(let N=0;N<B;++N)S[N](this,c,a,P);this._vaf.subCommit(P._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>n*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,le.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,p=M.IDENTITY;e.mode===oe.SCENE3D?(p=this.modelMatrix,h=le.clone(this._baseVolumeWC,this._boundingVolume)):h=le.clone(this._baseVolume2D,this._boundingVolume),Yet(this,e,h);let g=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,g&&(this._blendOption===Uo.OPAQUE||this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ge.fromCache({depthTest:{enabled:!0,func:te.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===Uo.TRANSLUCENT||this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ge.fromCache({depthTest:{enabled:!0,func:te.LEQUAL},depthMask:!1,blending:An.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let m,_;(g||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(m=new He({sources:[IO]}),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===Uo.OPAQUE_AND_TRANSLUCENT&&(_=new He({defines:["OPAQUE"],sources:[Py]}),this._sp=cn.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:_,attributeLocations:jc}),_=new He({defines:["TRANSLUCENT"],sources:[Py]}),this._spTranslucent=cn.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:_,attributeLocations:jc})),this._blendOption===Uo.OPAQUE&&(_=new He({sources:[Py]}),this._sp=cn.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:m,fragmentShaderSource:_,attributeLocations:jc})),this._blendOption===Uo.TRANSLUCENT&&(_=new He({sources:[Py]}),this._spTranslucent=cn.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:m,fragmentShaderSource:_,attributeLocations:jc})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let y,C,E,I,b=e.commandList;if(u.render||f){let S=this._colorCommands,B=this._blendOption===Uo.OPAQUE,v=this._blendOption===Uo.OPAQUE_AND_TRANSLUCENT;y=this._vaf.va,C=y.length,S.length=C;let P=v?C*2:C;for(I=0;I<P;++I){let N=B||v&&I%2===0;E=S[I],l(E)||(E=S[I]=new nt),E.primitiveType=Ne.POINTS,E.pass=N||!v?Be.OPAQUE:Be.TRANSLUCENT,E.owner=this;let L=v?Math.floor(I/2):I;E.boundingVolume=h,E.modelMatrix=p,E.shaderProgram=N?this._sp:this._spTranslucent,E.uniformMap=this._uniforms,E.vertexArray=y[L].va,E.renderState=N?this._rsOpaque:this._rsTranslucent,E.debugShowBoundingVolume=this.debugShowBoundingVolume,E.pickId="v_pickColor",b.push(E)}}};wd.prototype.isDestroyed=function(){return!1};wd.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(),$me(this._pointPrimitives),ue(this)};var HT=wd;var rpe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Cq=1,bO=8,SO=class e{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");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 o=i>>4;if(o!==Cq)throw new Error(`Got v${o} data when expected v${Cq}.`);let r=rpe[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected 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 r=rpe.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,bO,t),this.coords=new this.ArrayType(this.data,bO+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(bO+s+a+c),this.ids=new this.IndexArrayType(this.data,bO,t),this.coords=new this.ArrayType(this.data,bO+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Cq<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,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 Iq(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,c=[0,r.length-1,0],u=[];for(;c.length;){let f=c.pop()||0,h=c.pop()||0,p=c.pop()||0;if(h-p<=a){for(let y=p;y<=h;y++){let C=s[2*y],E=s[2*y+1];C>=t&&C<=i&&E>=n&&E<=o&&u.push(r[y])}continue}let g=p+h>>1,m=s[2*g],_=s[2*g+1];m>=t&&m<=i&&_>=n&&_<=o&&u.push(r[g]),(f===0?t<=m:n<=_)&&(c.push(p),c.push(g-1),c.push(1-f)),(f===0?i>=m:o>=_)&&(c.push(g+1),c.push(h),c.push(1-f))}return u}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],c=[],u=i*i;for(;a.length;){let f=a.pop()||0,h=a.pop()||0,p=a.pop()||0;if(h-p<=s){for(let y=p;y<=h;y++)spe(r[2*y],r[2*y+1],t,n)<=u&&c.push(o[y]);continue}let g=p+h>>1,m=r[2*g],_=r[2*g+1];spe(m,_,t,n)<=u&&c.push(o[g]),(f===0?t-i<=m:n-i<=_)&&(a.push(p),a.push(g-1),a.push(1-f)),(f===0?t+i>=m:n+i>=_)&&(a.push(g+1),a.push(h),a.push(1-f))}return c}};function Iq(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;ape(e,t,s,i,o,r),Iq(e,t,n,i,s-1,1-r),Iq(e,t,n,s+1,o,1-r)}function ape(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let u=o-i+1,f=n-i+1,h=Math.log(u),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(u-p)/u)*(f-u/2<0?-1:1),m=Math.max(i,Math.floor(n-f*p/u+g)),_=Math.min(o,Math.floor(n+(u-f)*p/u+g));ape(e,t,n,m,_,r)}let s=t[2*n+r],a=i,c=o;for(TO(e,t,i,n),t[2*o+r]>s&&TO(e,t,i,o);a<c;){for(TO(e,t,a,c),a++,c--;t[2*a+r]<s;)a++;for(;t[2*c+r]>s;)c--}t[2*i+r]===s?TO(e,t,i,c):(c++,TO(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function TO(e,t,n,i){Eq(e,n,i),Eq(t,2*n,2*i),Eq(t,2*n+1,2*i+1)}function Eq(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function spe(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function Jh(e){e=e??V.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 ge,this.show=e.show??!0}function cpe(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var Ket=new qe;function lpe(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=_y.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=Eo.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=Xs.getScreenSpaceBoundingBox(e,t,o)),cpe(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&fpe(i,e.id.id)&&l(e.id._label)){let r=i._collectionIndicesByEntity[e.id.id].labelIndex,s=i._labelCollection.get(r),a=_y.getScreenSpaceBoundingBox(s,t,Ket);cpe(a,n),o=qe.union(o,a,o)}return o}function Xet(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&fpe(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 upe(e,t,n,i){let o={billboard:i._clusterBillboardCollection.add(),label:i._clusterLabelCollection.add(),point:i._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=n,o.billboard.position=o.label.position=o.point.position=e,i._clusterEvent.raiseEvent(n,o)}function fpe(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function xq(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let s=0;s<r;++s){let a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===oe.SCENE3D&&!i.isPointVisible(a.position))continue;let c=o._clusterLabels&&l(a._labelCollection),u=o._clusterBillboards&&l(a.id._billboard),f=o._clusterPoints&&l(a.id._point);if(c&&(f||u))continue;let h=a.computeScreenSpacePosition(n);l(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}var Jet=new qe,Zet=new qe,$et=new qe;function ett(e){return function(t){if(l(t)&&t<.05||!e.enabled)return;let n=e._scene,i=e._labelCollection,o=e._billboardCollection,r=e._pointCollection;if(!l(i)&&!l(o)&&!l(r)||!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 sp({scene:n}),l(a)?a.removeAll():a=e._clusterBillboardCollection=new of({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new HT;let u=e._pixelRange,f=e._minimumClusterSize,h=e._previousClusters,p=[],g=e._previousHeight,m=n.camera.positionCartographic.height,_=n.ellipsoid,y=n.camera.positionWC,C=new xg(_,y),E=[];e._clusterLabels&&xq(i,E,n,C,e),e._clusterBillboards&&xq(o,E,n,C,e),e._clusterPoints&&xq(r,E,n,C,e);let I,b,S,B,v,P,N,L,A,x,T,w;if(E.length>0){let R=new SO(E.length,64,Uint32Array);for(let O=0;O<E.length;++O)R.add(E[O].coord.x,E[O].coord.y);if(R.finish(),m<g)for(S=h.length,I=0;I<S;++I){let O=h[I];if(!C.isPointVisible(O.position))continue;let k=Eo._computeScreenSpacePosition(M.IDENTITY,O.position,d.ZERO,U.ZERO,n);if(!l(k))continue;let F=1-m/g,z=O.width=O.width*F,Q=O.height=O.height*F;z=Math.max(z,O.minimumWidth),Q=Math.max(Q,O.minimumHeight);let H=k.x-z*.5,j=k.y-Q*.5,Z=k.x+z,Y=k.y+Q;for(v=R.range(H,j,Z,Y),P=v.length,x=0,A=[],b=0;b<P;++b)N=v[b],L=E[N],L.clustered||(++x,T=L.collection,w=L.index,A.push(T.get(w).id));if(x>=f)for(upe(O.position,x,A,e),p.push(O),b=0;b<P;++b)E[v[b]].clustered=!0}for(S=E.length,I=0;I<S;++I){let O=E[I];if(O.clustered)continue;O.clustered=!0,T=O.collection,w=O.index;let k=T.get(w);B=lpe(k,O.coord,u,e,Jet);let F=qe.clone(B,Zet);v=R.range(B.x,B.y,B.x+B.width,B.y+B.height),P=v.length;let z=d.clone(k.position);for(x=1,A=[k.id],b=0;b<P;++b)if(N=v[b],L=E[N],!L.clustered){let Q=L.collection.get(L.index),H=lpe(Q,L.coord,u,e,$et);d.add(Q.position,z,z),qe.union(F,H,F),++x,A.push(Q.id)}if(x>=f){let Q=d.multiplyByScalar(z,1/x,z);for(upe(Q,x,A,e),p.push({position:Q,width:F.width,height:F.height,minimumWidth:B.width,minimumHeight:B.height}),b=0;b<P;++b)E[v[b]].clustered=!0}else Xet(k,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}}Jh.prototype._initialize=function(e){this._scene=e;let t=ett(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(Jh.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 Tq(e,t,n,i){return function(o){let r=this[e];l(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let s=this._collectionIndicesByEntity[o.id];if(l(s)||(s=this._collectionIndicesByEntity[o.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),l(r)&&l(s[i]))return r.get(s[i]);l(r)||(r=this[e]=new t({scene:this._scene}));let a,c,u=this[n];u.length>0?(a=u.shift(),c=r.get(a)):(c=r.add(),a=r.length-1),s[i]=a;let f=this;return Promise.resolve().then(function(){f._clusterDirty=!0}),c}}function Sq(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}Jh.prototype.getLabel=Tq("_labelCollection",sp,"_unusedLabelIndices","labelIndex");Jh.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,Sq(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};Jh.prototype.getBillboard=Tq("_billboardCollection",of,"_unusedBillboardIndices","billboardIndex");Jh.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,Sq(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};Jh.prototype.getPoint=Tq("_pointCollection",HT,"_unusedPointIndices","pointIndex");Jh.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,Sq(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function bq(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function ttt(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,bq(e._labelCollection),bq(e._billboardCollection),bq(e._pointCollection))}Jh.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,ttt(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)};Jh.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 uf=Jh;function wq(e){this._name=e,this._clock=void 0,this._changed=new ge,this._error=new ge,this._isLoading=!1,this._loading=new ge,this._entityCollection=new ya(this),this._entityCluster=new uf}Object.defineProperties(wq.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){as.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}}});wq.prototype.update=function(e){return!0};var wO=wq;var dpe={};dpe.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,u=new Float64Array(c*3),f,h=0,p=0,g=o?a*3:0,m=o?(a+i)*3:i*3;for(f=0;f<i;f++){let _=f/i*D.TWO_PI,y=Math.cos(_),C=Math.sin(_),E=y*n,I=C*n,b=y*t,S=C*t;u[p+g]=E,u[p+g+1]=I,u[p+g+2]=s,u[p+m]=b,u[p+m+1]=S,u[p+m+2]=r,p+=3,o&&(u[h++]=E,u[h++]=I,u[h++]=s,u[h++]=b,u[h++]=S,u[h++]=r)}return u};var V0=dpe;var Bq=new U,ntt=new d,itt=new d,ott=new d,rtt=new d;function bg(e){e=e??V.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.vertexFormat??Re.DEFAULT,r=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Re.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}bg.packedLength=Re.packedLength+5;bg.pack=function(e,t,n){return n=n??0,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var hpe=new Re,WT={vertexFormat:hpe,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};bg.unpack=function(e,t,n){t=t??0;let i=Re.unpack(e,t,hpe);t+=Re.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Re.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(WT.length=o,WT.topRadius=r,WT.bottomRadius=s,WT.slices=a,WT.offsetAttribute=c===-1?void 0:c,new bg(WT))};bg.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,u=V0.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,h=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,g=o.bitangent?new Float32Array(c*3):void 0,m,_=o.normal||o.tangent||o.bitangent;if(_){let v=o.tangent||o.bitangent,P=0,N=0,L=0,A=Math.atan2(i-n,t),x=ntt;x.z=Math.sin(A);let T=Math.cos(A),w=ott,R=itt;for(m=0;m<r;m++){let O=m/r*D.TWO_PI,k=T*Math.cos(O),F=T*Math.sin(O);_&&(x.x=k,x.y=F,v&&(w=d.normalize(d.cross(d.UNIT_Z,x,w),w)),o.normal&&(h[P++]=x.x,h[P++]=x.y,h[P++]=x.z,h[P++]=x.x,h[P++]=x.y,h[P++]=x.z),o.tangent&&(p[N++]=w.x,p[N++]=w.y,p[N++]=w.z,p[N++]=w.x,p[N++]=w.y,p[N++]=w.z),o.bitangent&&(R=d.normalize(d.cross(x,w,R),R),g[L++]=R.x,g[L++]=R.y,g[L++]=R.z,g[L++]=R.x,g[L++]=R.y,g[L++]=R.z))}for(m=0;m<r;m++)o.normal&&(h[P++]=0,h[P++]=0,h[P++]=-1),o.tangent&&(p[N++]=1,p[N++]=0,p[N++]=0),o.bitangent&&(g[L++]=0,g[L++]=-1,g[L++]=0);for(m=0;m<r;m++)o.normal&&(h[P++]=0,h[P++]=0,h[P++]=1),o.tangent&&(p[N++]=1,p[N++]=0,p[N++]=0),o.bitangent&&(g[L++]=0,g[L++]=1,g[L++]=0)}let y=12*r-12,C=Qe.createTypedArray(c,y),E=0,I=0;for(m=0;m<r-1;m++)C[E++]=I,C[E++]=I+2,C[E++]=I+3,C[E++]=I,C[E++]=I+3,C[E++]=I+1,I+=2;for(C[E++]=s-2,C[E++]=0,C[E++]=1,C[E++]=s-2,C[E++]=1,C[E++]=s-1,m=1;m<r-1;m++)C[E++]=s+m+1,C[E++]=s+m,C[E++]=s;for(m=1;m<r-1;m++)C[E++]=a,C[E++]=a+m,C[E++]=a+m+1;let b=0;if(o.st){let v=Math.max(n,i);for(m=0;m<c;m++){let P=d.fromArray(u,m*3,rtt);f[b++]=(P.x+v)/(2*v),f[b++]=(P.y+v)/(2*v)}}let S=new Cn;o.position&&(S.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(S.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(S.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(S.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:g})),o.st&&(S.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:f})),Bq.x=t*.5,Bq.y=Math.max(i,n);let B=new le(d.ZERO,U.magnitude(Bq));if(l(e._offsetAttribute)){t=u.length;let v=e._offsetAttribute===dn.NONE?0:1,P=new Uint8Array(t/3).fill(v);S.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}return new ht({attributes:S,indices:C,primitiveType:Ne.TRIANGLES,boundingSphere:B,offsetAttribute:e._offsetAttribute})};var Dq;bg.getUnitCylinder=function(){return l(Dq)||(Dq=bg.createGeometry(new bg({topRadius:1,bottomRadius:1,length:1,vertexFormat:Re.POSITION_ONLY}))),Dq};var BO=bg;var vq=new U;function jT(e){e=e??V.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.slices??128,r=Math.max(e.numberOfVerticalLines??16,0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}jT.packedLength=6;jT.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 H0={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};jT.unpack=function(e,t,n){t=t??0;let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(H0.length=i,H0.topRadius=o,H0.bottomRadius=r,H0.slices=s,H0.numberOfVerticalLines=a,H0.offsetAttribute=c===-1?void 0:c,new jT(H0))};jT.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=V0.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let _=Math.min(r,o);u=Math.round(o/_),c+=_}let f=Qe.createTypedArray(s,c*2),h=0,p;for(p=0;p<o-1;p++)f[h++]=p,f[h++]=p+1,f[h++]=p+o,f[h++]=p+1+o;if(f[h++]=o-1,f[h++]=0,f[h++]=o+o-1,f[h++]=o,r>0)for(p=0;p<o;p+=u)f[h++]=p,f[h++]=p+o;let g=new Cn;g.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:a}),vq.x=t*.5,vq.y=Math.max(i,n);let m=new le(d.ZERO,U.magnitude(vq));if(l(e._offsetAttribute)){t=a.length;let _=e._offsetAttribute===dn.NONE?0:1,y=new Uint8Array(t/3).fill(_);g.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}return new ht({attributes:g,indices:f,primitiveType:Ne.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var DO=jT;var mpe=d.ZERO,ppe=new d,stt=new d,Ape=new G;function att(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 ff(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new att(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&(ff.prototype=Object.create(gi.prototype),ff.prototype.constructor=ff);Object.defineProperties(ff.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ff.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Jt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Ape)),l(a)||(a=G.WHITE),s.color=en.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,mpe,ppe))),new Rt({id:t,geometry:new BO(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};ff.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,Ape),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,mpe,ppe))),new Rt({id:t,geometry:new DO(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};ff.prototype._computeCenter=function(e,t){return W.getValueOrUndefined(this._entity.position,e,t)};ff.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||gi.prototype._isHidden.call(this,e,t)};ff.prototype._isDynamic=function(e,t){return!e.position.isConstant||!W.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!W.isConstant(t.slices)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.numberOfVerticalLines)};ff.prototype._setStaticOptions=function(e,t){let n=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Jt?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(Ye.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(Ye.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(Ye.MINIMUM_VALUE),i.slices=W.getValueOrUndefined(t.slices,Ye.MINIMUM_VALUE),i.numberOfVerticalLines=W.getValueOrUndefined(t.numberOfVerticalLines,Ye.MINIMUM_VALUE),i.offsetAttribute=n!==Ze.NONE?dn.ALL:void 0};ff.prototype._onEntityPropertyChanged=IA;ff.DynamicGeometryUpdater=YT;function YT(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(YT.prototype=Object.create(Ai.prototype),YT.prototype.constructor=YT);YT.prototype._isHidden=function(e,t,n){let i=this._options,o=W.getValueOrUndefined(e.position,n,stt);return!l(o)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||Ai.prototype._isHidden.call(this,e,t,n)};YT.prototype._setOptions=function(e,t,n){let i=W.getValueOrDefault(t.heightReference,n,Ze.NONE),o=this._options;o.length=W.getValueOrUndefined(t.length,n),o.topRadius=W.getValueOrUndefined(t.topRadius,n),o.bottomRadius=W.getValueOrUndefined(t.bottomRadius,n),o.slices=W.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=W.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==Ze.NONE?dn.ALL:void 0};var vO=ff;var ctt={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},cs=Object.freeze(ctt);var ltt={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},To=Object.freeze(ltt);var utt={NONE:0,HOLD:1,EXTRAPOLATE:2},df=Object.freeze(utt);var gpe=br(Ou(),1);function ftt(e){let t=new gpe.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var Tg=ftt;var dtt=D.factorial;function Pq(e,t,n,i,o,r){let s=0,a,c,u;if(i>0){for(c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(r.push(c),s+=Pq(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return s}for(s=1,c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(s*=e-n[t[c]])}return s}var wV={type:"Hermite"};wV.getRequiredDataPoints=function(e,t){return t=t??0,Math.max(Math.floor((e+1)/(t+1)),2)};wV.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,u,f,h=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let y=new Array(h);for(p[r]=y,s=0;s<h;s++)y[s]=[]}let g=h,m=new Array(g);for(r=0;r<g;r++)m[r]=r;let _=h-1;for(c=0;c<i;c++){for(s=0;s<g;s++)f=m[s]*i+c,p[c][0].push(n[f]);for(r=1;r<g;r++){let y=!1;for(s=0;s<g-r;s++){let C=t[m[s]],E=t[m[s+r]],I;E-C<=0?(f=m[s]*i+i*r+c,I=n[f],p[c][r].push(I/dtt(r))):(I=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(I/(E-C))),y=y||I!==0}y||(_=r-1)}}for(a=0,u=0;a<=u;a++)for(r=a;r<=_;r++){let y=Pq(e,m,t,a,r,[]);for(c=0;c<i;c++){let C=p[c][r][0];o[c+a*i]+=C*y}}return o};var htt=[];wV.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);l(s)||(s=new Array(a));for(let C=0;C<a;C++)s[C]=0;let c=t.length,u=new Array(c*(o+1)),f;for(f=0;f<c;f++)for(let C=0;C<o+1;C++)u[f*(o+1)+C]=f;let h=u.length,p=htt,g=mtt(p,u,t,n,i,o),m=[],_=h*(h+1)/2,y=Math.min(g,r);for(let C=0;C<=y;C++)for(f=C;f<=g;f++){m.length=0;let E=Pq(e,u,t,C,f,m),I=Math.floor(f*(1-f)/2)+h*f;for(let b=0;b<i;b++){let S=Math.floor(b*_),B=p[S+I];s[b+C*i]+=B*E}}return s};function mtt(e,t,n,i,o,r){let s,a,c=-1,u=t.length,f=u*(u+1)/2;for(let h=0;h<o;h++){let p=Math.floor(h*f);for(s=0;s<u;s++)a=t[s]*o*(r+1)+h,e[p+s]=i[a];for(let g=1;g<u;g++){let m=0,_=Math.floor(g*(1-g)/2)+u*g,y=!1;for(s=0;s<u-g;s++){let C=n[t[s]],E=n[t[s+g]],I,b;if(E-C<=0)a=t[s]*o*(r+1)+o*g+h,I=i[a],b=I/D.factorial(g),e[p+_+m]=b,m++;else{let S=Math.floor((g-1)*(2-g)/2)+u*(g-1);I=e[p+S+s+1]-e[p+S+s],b=I/(E-C),e[p+_+m]=b,m++}y=y||I!==0}y&&(c=Math.max(c,g))}}return c}var PO=wV;var Rq={type:"Lagrange"};Rq.getRequiredDataPoints=function(e){return Math.max(e+1,2)};Rq.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let c=1;for(s=0;s<a;s++)if(s!==r){let u=t[r]-t[s];c*=(e-t[s])/u}for(s=0;s<i;s++)o[s]+=c*n[r*i+s]}return o};var RO=Rq;var Mq={type:"Linear"};Mq.getRequiredDataPoints=function(e){return 2};Mq.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c=t[0],u=t[1];for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-c*a)/(u-c);return o};var W0=Mq;function Yc(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}Yc.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new Yc),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};Yc.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Yc(e.clock,e.cone,e.magnitude)};Yc.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Yc(e.clock,e.cone,1)};Yc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};Yc.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};Yc.prototype.equals=function(e){return Yc.equals(this,e)};Yc.prototype.clone=function(e){return Yc.clone(this,e)};Yc.prototype.equalsEpsilon=function(e,t){return Yc.equalsEpsilon(this,e,t)};Yc.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var MO=Yc;var QO=br(Ou(),1);var Nq;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?Nq=function(){return performance.now()}:Nq=function(){return Date.now()};var Mi=Nq;function Lq(e){e=e??V.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??cs.UNBOUNDED,this.canAnimate=e.canAnimate??!0,this.onTick=new ge,this.onStop=new ge,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Mi(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??To.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(Lq.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){K.equals(this._currentTime,e)||(this._clockStep===To.SYSTEM_CLOCK&&(this._clockStep=To.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===To.SYSTEM_CLOCK&&(this._clockStep=To.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===To.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===To.SYSTEM_CLOCK&&(this._clockStep=To.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});Lq.prototype.tick=function(){let e=Mi(),t=K.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===To.SYSTEM_CLOCK)t=K.now(t);else{let i=this._multiplier;if(n===To.TICK_DEPENDENT)t=K.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=K.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===cs.CLAMPED)K.lessThan(t,r)?t=K.clone(r,t):K.greaterThan(t,s)&&(t=K.clone(s,t),this.onStop.raiseEvent(this));else if(o===cs.LOOP_STOP)for(K.lessThan(t,r)&&(t=K.clone(r,t));K.greaterThan(t,s);)t=K.addSeconds(r,K.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Zh=Lq;function j0(){this._definitionChanged=new ge,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(j0.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:pl("startTime"),stopTime:pl("stopTime"),currentTime:pl("currentTime"),clockRange:pl("clockRange"),clockStep:pl("clockStep"),multiplier:pl("multiplier")});j0.prototype.clone=function(e){return l(e)||(e=new j0),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};j0.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};j0.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};j0.prototype.getValue=function(e){return l(e)||(e=new Zh),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 $h=j0;var ptt=G.WHITE,Att=.1,gtt=new U(8,8),_tt=new U(0,0),ytt=new U(1,1);function qT(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(qT.prototype,{isConstant:{get:function(){return W.isConstant(this._color)&&W.isConstant(this._cellAlpha)&&W.isConstant(this._lineCount)&&W.isConstant(this._lineThickness)&&W.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color"),cellAlpha:de("cellAlpha"),lineCount:de("lineCount"),lineThickness:de("lineThickness"),lineOffset:de("lineOffset")});qT.prototype.getType=function(e){return"Grid"};var Ctt=new K;qT.prototype.getValue=function(e,t){return l(e)||(e=K.now(Ctt)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,ptt,t.color),t.cellAlpha=W.getValueOrDefault(this._cellAlpha,e,Att),t.lineCount=W.getValueOrClonedDefault(this._lineCount,e,gtt,t.lineCount),t.lineThickness=W.getValueOrClonedDefault(this._lineThickness,e,ytt,t.lineThickness),t.lineOffset=W.getValueOrClonedDefault(this._lineOffset,e,_tt,t.lineOffset),t};qT.prototype.equals=function(e){return this===e||e instanceof qT&&W.equals(this._color,e._color)&&W.equals(this._cellAlpha,e._cellAlpha)&&W.equals(this._lineCount,e._lineCount)&&W.equals(this._lineThickness,e._lineThickness)&&W.equals(this._lineOffset,e._lineOffset)};var KT=qT;function XT(e){this._definitionChanged=new ge,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(XT.prototype,{isConstant:{get:function(){return W.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color")});XT.prototype.getType=function(e){return"PolylineArrow"};var Ett=new K;XT.prototype.getValue=function(e,t){return l(e)||(e=K.now(Ett)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,G.WHITE,t.color),t};XT.prototype.equals=function(e){return this===e||e instanceof XT&&W.equals(this._color,e._color)};var JT=XT;var Itt=G.WHITE,xtt=G.TRANSPARENT,btt=16,Ttt=255;function ZT(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(ZT.prototype,{isConstant:{get:function(){return W.isConstant(this._color)&&W.isConstant(this._gapColor)&&W.isConstant(this._dashLength)&&W.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color"),gapColor:de("gapColor"),dashLength:de("dashLength"),dashPattern:de("dashPattern")});ZT.prototype.getType=function(e){return"PolylineDash"};var Stt=new K;ZT.prototype.getValue=function(e,t){return l(e)||(e=K.now(Stt)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,Itt,t.color),t.gapColor=W.getValueOrClonedDefault(this._gapColor,e,xtt,t.gapColor),t.dashLength=W.getValueOrDefault(this._dashLength,e,btt,t.dashLength),t.dashPattern=W.getValueOrDefault(this._dashPattern,e,Ttt,t.dashPattern),t};ZT.prototype.equals=function(e){return this===e||e instanceof ZT&&W.equals(this._color,e._color)&&W.equals(this._gapColor,e._gapColor)&&W.equals(this._dashLength,e._dashLength)&&W.equals(this._dashPattern,e._dashPattern)};var $T=ZT;var wtt=G.WHITE,Btt=.25,Dtt=1;function eS(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(eS.prototype,{isConstant:{get:function(){return W.isConstant(this._color)&&W.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color"),glowPower:de("glowPower"),taperPower:de("taperPower")});eS.prototype.getType=function(e){return"PolylineGlow"};var vtt=new K;eS.prototype.getValue=function(e,t){return l(e)||(e=K.now(vtt)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,wtt,t.color),t.glowPower=W.getValueOrDefault(this._glowPower,e,Btt,t.glowPower),t.taperPower=W.getValueOrDefault(this._taperPower,e,Dtt,t.taperPower),t};eS.prototype.equals=function(e){return this===e||e instanceof eS&&W.equals(this._color,e._color)&&W.equals(this._glowPower,e._glowPower)&&W.equals(this._taperPower,e._taperPower)};var tS=eS;var Ptt=G.WHITE,Rtt=G.BLACK,Mtt=1;function nS(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(nS.prototype,{isConstant:{get:function(){return W.isConstant(this._color)&&W.isConstant(this._outlineColor)&&W.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:de("color"),outlineColor:de("outlineColor"),outlineWidth:de("outlineWidth")});nS.prototype.getType=function(e){return"PolylineOutline"};var Ntt=new K;nS.prototype.getValue=function(e,t){return l(e)||(e=K.now(Ntt)),l(t)||(t={}),t.color=W.getValueOrClonedDefault(this._color,e,Ptt,t.color),t.outlineColor=W.getValueOrClonedDefault(this._outlineColor,e,Rtt,t.outlineColor),t.outlineWidth=W.getValueOrDefault(this._outlineWidth,e,Mtt),t};nS.prototype.equals=function(e){return this===e||e instanceof nS&&W.equals(this._color,e._color)&&W.equals(this._outlineColor,e._outlineColor)&&W.equals(this._outlineWidth,e._outlineWidth)};var Ry=nS;function Sg(e,t){this._value=void 0,this._definitionChanged=new ge,this._eventHelper=new Dr,this._referenceFrame=t??Xi.FIXED,this.setValue(e)}Object.defineProperties(Sg.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(!W.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}});var Ltt=new K;Sg.prototype.getValue=function(e,t){return l(e)||(e=K.now(Ltt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};Sg.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._value;if(!l(i))return;let o=i.length;l(n)||(n=new Array(o));let r=0,s=0;for(;r<o;){let c=i[r].getValueInReferenceFrame(e,t,n[r]);l(c)&&(n[s]=c,s++),r++}return n.length=s,n};Sg.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 o=e[i];l(o)&&t.add(o.definitionChanged,Sg.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};Sg.prototype.equals=function(e){return this===e||e instanceof Sg&&this._referenceFrame===e._referenceFrame&&W.arrayEquals(this._value,e._value)};Sg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var wg=Sg;function My(e){this._value=void 0,this._definitionChanged=new ge,this._eventHelper=new Dr,this.setValue(e)}Object.defineProperties(My.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(!W.isConstant(e[n]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}});var Ott=new K;My.prototype.getValue=function(e,t){l(e)||(e=K.now(Ott));let n=this._value;if(!l(n))return;let i=n.length;l(t)||(t=new Array(i));let o=0,r=0;for(;o<i;){let a=this._value[o].getValue(e,t[o]);l(a)&&(t[r]=a,r++),o++}return t.length=r,t};My.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 o=e[i];l(o)&&t.add(o.definitionChanged,My.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};My.prototype.equals=function(e){return this===e||e instanceof My&&W.arrayEquals(this._value,e._value)};My.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var iS=My;function Y0(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}n.definitionChanged.addEventListener(hf.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&l(t);++o)t=t[i[o]];e._targetProperty=t}return t}function hf(e,t,n){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new ge,e.collectionChanged.addEventListener(hf.prototype._onCollectionChanged,this)}Object.defineProperties(hf.prototype,{isConstant:{get:function(){return W.isConstant(Y0(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=Y0(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 Y0(this)}}});hf.fromString=function(e,t){let n,i=[],o=!0,r=!1,s="";for(let a=0;a<t.length;++a){let c=t.charAt(a);r?(s+=c,r=!1):c==="\\"?r=!0:o&&c==="#"?(n=s,o=!1,s=""):!o&&c==="."?(i.push(s),s=""):s+=c}return i.push(s),new hf(e,n,i)};var Ftt=new K;hf.prototype.getValue=function(e,t){let n=Y0(this);return l(e)||(e=K.now(Ftt)),l(n)?n.getValue(e,t):void 0};hf.prototype.getValueInReferenceFrame=function(e,t,n){let i=Y0(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};hf.prototype.getType=function(e){let t=Y0(this);return l(t)?t.getType(e):void 0};hf.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 o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0};hf.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};hf.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(hf.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):l(i)||(i=Y0(this),l(i)&&this._definitionChanged.raiseEvent(this))};var Bg=hf;var Qtt={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 o;for(let r=0,s=n-t+1;r<s;r++){let a=e[t+r];r===0||Math.abs(o-a)<Math.PI?i[r]=a:i[r]=a-D.TWO_PI,o=a}},unpackInterpolationResult:function(e,t,n,i,o){return o=e[0],o<0?o+D.TWO_PI:o}},Bd=Qtt;var _pe={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 ype(e,t,n){let i,o=e.length,r=n.length,s=o+r;if(e.length=s,o!==t){let a=o-1;for(i=s-1;i>=t;i--)e[i]=e[a--]}for(i=0;i<r;i++)e[t++]=n[i]}function Cpe(e,t){return e instanceof K?e:typeof e=="string"?K.fromIso8601(e):K.addSeconds(t,e,new K)}var Oq=[],Fq=[];function BV(e,t,n,i,o){let r=0,s,a,c,u,f,h;for(;r<i.length;){f=Cpe(i[r],e),c=jo(t,f,K.compare);let p=0,g=0;if(c<0){for(c=~c,u=c*o,a=void 0,h=t[c];r<i.length&&(f=Cpe(i[r],e),!(l(a)&&K.compare(a,f)>=0||l(h)&&K.compare(f,h)>=0));){for(Oq[p++]=f,r=r+1,s=0;s<o;s++)Fq[g++]=i[r],r=r+1;a=f}p>0&&(Fq.length=g,ype(n,u,Fq),Oq.length=p,ype(t,c,Oq))}else{for(s=0;s<o;s++)r++,n[c*o+s]=i[r];r++}}}function Dd(e,t){let n=e;n===Number&&(n=_pe);let i=n.packedLength,o=n.packedInterpolationLength??i,r=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=_pe);let f=u.packedLength;i+=f,o+=u.packedInterpolationLength??f,s[c]=u}r=a}this._type=e,this._innerType=n,this._interpolationDegree=1,this._interpolationAlgorithm=W0,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new ge,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=df.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=df.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(Dd.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 ktt=new K;Dd.prototype.getValue=function(e,t){l(e)||(e=K.now(ktt));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,s=this._values,a=jo(n,e,K.compare);if(a<0){if(a=~a,a===0){let b=n[a];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===df.NONE||o!==0&&K.secondsDifference(b,e)>o)return;if(this._backwardExtrapolationType===df.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let b=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===df.NONE||o!==0&&K.secondsDifference(e,b)>o)return;if(this._forwardExtrapolationType===df.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,u=this._yTable,f=this._interpolationAlgorithm,h=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let b=Math.min(f.getRequiredDataPoints(this._interpolationDegree,p),i);b!==this._numberOfPoints&&(this._numberOfPoints=b,c.length=b,u.length=b*h)}let g=this._numberOfPoints-1;if(g<1)return;let m=0,_=i-1;if(_-m+1>=g+1){let b=a-(g/2|0)-1;b<m&&(b=m);let S=b+g;S>_&&(S=_,b=S-g,b<m&&(b=m)),m=b,_=S}let C=_-m+1;for(let b=0;b<C;++b)c[b]=K.secondsDifference(n[m+b],n[_]);if(l(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,m,_,u);else{let b=0,S=this._packedLength,B=m*S,v=(_+1)*S;for(;B<v;)u[b]=s[B],B++,b++}let E=K.secondsDifference(e,n[_]),I;if(p===0||!l(f.interpolate))I=f.interpolateOrderZero(E,c,u,h,this._interpolationResult);else{let b=Math.floor(h/(p+1));I=f.interpolate(E,c,u,b,p,p,this._interpolationResult)}return l(r.unpackInterpolationResult)?r.unpackInterpolationResult(I,s,m,_,t):r.unpack(I,0,t)}return r.unpack(s,a*this._packedLength,t)};Dd.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))};Dd.prototype.addSample=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,s=[];if(s.push(e),r.pack(t,s,s.length),o){let a=i.length;for(let c=0;c<a;c++)i[c].pack(n[c],s,s.length)}BV(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Dd.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,s=e.length,a=[];for(let c=0;c<s;c++)if(a.push(e[c]),r.pack(t[c],a,a.length),o){let u=n[c],f=i.length;for(let h=0;h<f;h++)i[h].pack(u[h],a,a.length)}BV(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Dd.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};Dd.prototype.addSamplesPackedArray=function(e,t){BV(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};Dd.prototype.removeSample=function(e){let t=jo(this._times,e,K.compare);return t<0?!1:(Epe(this,t,1),!0)};function Epe(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)}Dd.prototype.removeSamples=function(e){let t=this._times,n=jo(t,e.start,K.compare);n<0?n=~n:e.isStartIncluded||++n;let i=jo(t,e.stop,K.compare);i<0?i=~i:e.isStopIncluded&&++i,Epe(this,n,i-n)};Dd.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,o=l(i);if(n!==o)return!1;let r,s;if(n){if(s=t.length,s!==i.length)return!1;for(r=0;r<s;r++)if(t[r]!==i[r])return!1}let a=this._times,c=e._times;if(s=a.length,s!==c.length)return!1;for(r=0;r<s;r++)if(!K.equals(a[r],c[r]))return!1;let u=this._values,f=e._values;for(s=u.length,r=0;r<s;r++)if(u[r]!==f[r])return!1;return!0};Dd._mergeNewSamples=BV;var mf=Dd;function vd(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=d}this._numberOfDerivatives=t,this._property=new mf(d,n),this._definitionChanged=new ge,this._referenceFrame=e??Xi.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties(vd.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 Utt=new K;vd.prototype.getValue=function(e,t){return l(e)||(e=K.now(Utt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};vd.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return Ah.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};vd.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};vd.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};vd.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};vd.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};vd.prototype.removeSample=function(e){return this._property.removeSample(e)};vd.prototype.removeSamples=function(e){this._property.removeSamples(e)};vd.prototype.equals=function(e){return this===e||e instanceof vd&&W.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var Ha=vd;var Gtt={HORIZONTAL:0,VERTICAL:1},em=Object.freeze(Gtt);var ztt=em.HORIZONTAL,Vtt=G.WHITE,Htt=G.BLACK,Wtt=0,jtt=1;function oS(e){e=e??V.EMPTY_OBJECT,this._definitionChanged=new ge,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(oS.prototype,{isConstant:{get:function(){return W.isConstant(this._orientation)&&W.isConstant(this._evenColor)&&W.isConstant(this._oddColor)&&W.isConstant(this._offset)&&W.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:de("orientation"),evenColor:de("evenColor"),oddColor:de("oddColor"),offset:de("offset"),repeat:de("repeat")});oS.prototype.getType=function(e){return"Stripe"};var Ytt=new K;oS.prototype.getValue=function(e,t){return l(e)||(e=K.now(Ytt)),l(t)||(t={}),t.horizontal=W.getValueOrDefault(this._orientation,e,ztt)===em.HORIZONTAL,t.evenColor=W.getValueOrClonedDefault(this._evenColor,e,Vtt,t.evenColor),t.oddColor=W.getValueOrClonedDefault(this._oddColor,e,Htt,t.oddColor),t.offset=W.getValueOrDefault(this._offset,e,Wtt),t.repeat=W.getValueOrDefault(this._repeat,e,jtt),t};oS.prototype.equals=function(e){return this===e||e instanceof oS&&W.equals(this._orientation,e._orientation)&&W.equals(this._evenColor,e._evenColor)&&W.equals(this._oddColor,e._oddColor)&&W.equals(this._offset,e._offset)&&W.equals(this._repeat,e._repeat)};var rS=oS;function Ny(e){this._definitionChanged=new ge,this._intervals=new ss,this._intervals.changedEvent.addEventListener(Ny.prototype._intervalsChanged,this),this._referenceFrame=e??Xi.FIXED}Object.defineProperties(Ny.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 qtt=new K;Ny.prototype.getValue=function(e,t){return l(e)||(e=K.now(qtt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};Ny.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return Ah.convertToReferenceFrame(e,i,this._referenceFrame,t,n)};Ny.prototype.equals=function(e){return this===e||e instanceof Ny&&this._intervals.equals(e._intervals,W.equals)&&this._referenceFrame===e._referenceFrame};Ny.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var Dg=Ny;function q0(){this._definitionChanged=new ge,this._intervals=new ss,this._intervals.changedEvent.addEventListener(q0.prototype._intervalsChanged,this)}Object.defineProperties(q0.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var Ktt=new K;q0.prototype.getValue=function(e,t){l(e)||(e=K.now(Ktt));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};q0.prototype.equals=function(e){return this===e||e instanceof q0&&this._intervals.equals(e._intervals,W.equals)};q0.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var vg=q0;function sS(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new ge,this._normalize=t??!0,this.position=e}Object.defineProperties(sS.prototype,{isConstant:{get:function(){return W.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 Xtt=new d,Ipe=new d,xpe=new K,Jtt=new K,Qq=1/60;sS.prototype.getValue=function(e,t){return this._getValue(e,t)};sS.prototype._getValue=function(e,t,n){l(e)||(e=K.now(Jtt)),l(t)||(t=new d);let i=this._position;if(W.isConstant(i))return this._normalize?void 0:d.clone(d.ZERO,t);let o=i.getValue(e,Xtt),r=i.getValue(K.addSeconds(e,Qq,xpe),Ipe);if(!l(o)||!l(r)&&(r=o,o=i.getValue(K.addSeconds(e,-Qq,xpe),Ipe),!l(o)))return;if(d.equals(o,r))return this._normalize?void 0:d.clone(d.ZERO,t);l(n)&&o.clone(n);let s=d.subtract(r,o,t);return this._normalize?d.normalize(s,t):d.divideByScalar(s,Qq,t)};sS.prototype.equals=function(e){return this===e||e instanceof sS&&W.equals(this._position,e._position)};var Pg=sS;function NO(e,t){this._velocityVectorProperty=new Pg(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new ge,this.ellipsoid=t??ne.default;let n=this;this._velocityVectorProperty.definitionChanged.addEventListener(function(){n._definitionChanged.raiseEvent(n)})}Object.defineProperties(NO.prototype,{isConstant:{get:function(){return W.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 bpe=new d,Ztt=new d,Tpe=new X,$tt=new K;NO.prototype.getValue=function(e,t){l(e)||(e=K.now($tt));let n=this._velocityVectorProperty._getValue(e,Ztt,bpe);if(l(n))return Qt.rotationMatrixFromPositionVelocity(bpe,n,this._ellipsoid,Tpe),Fe.fromRotationMatrix(Tpe,t)};NO.prototype.equals=function(e){return this===e||e instanceof NO&&W.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var LO=NO;var Rg={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};Rg.validate=function(e){return e===Rg.COMPLETE||e===Rg.BELOW_ELLIPSOID_HORIZON||e===Rg.ABOVE_ELLIPSOID_HORIZON};Rg.toString=function(e){switch(e){case Rg.COMPLETE:return"COMPLETE";case Rg.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case Rg.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new he("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var aS=Rg;function Ly(){}Ly.packedLength=d.packedLength;Ly.unpack=d.unpack;Ly.pack=d.pack;var kq;function OO(e,t){return t[0]==="#"&&(t=kq+t),Bg.fromString(e,t)}function Spe(e,t,n){if(l(n.reference))return OO(t,n.reference);if(l(n.velocityReference)){let i=OO(t,n.velocityReference);switch(e){case d:case Ly:return new Pg(i,e===Ly);case Fe:return new LO(i)}}throw new ce(`${JSON.stringify(n)} is not valid CZML.`)}function ent(e,t){return new Ch(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var eo=new d,Nl=new MO,qc=new me,K0=new Rn,DV=new Fe;function tnt(e){let t=e.rgbaf;if(l(t))return t;let n=e.rgba;if(!l(n))return;let i=n.length;if(i===G.packedLength)return[G.byteToFloat(n[0]),G.byteToFloat(n[1]),G.byteToFloat(n[2]),G.byteToFloat(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=G.byteToFloat(n[o+1]),t[o+2]=G.byteToFloat(n[o+2]),t[o+3]=G.byteToFloat(n[o+3]),t[o+4]=G.byteToFloat(n[o+4]);return t}function wpe(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):we.createIfNeeded(n)}function nnt(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===ae.packedLength)return[D.toRadians(n[0]),D.toRadians(n[1]),D.toRadians(n[2]),D.toRadians(n[3])];t=new Array(i);for(let o=0;o<i;o+=5)t[o]=n[o],t[o+1]=D.toRadians(n[o+1]),t[o+2]=D.toRadians(n[o+2]),t[o+3]=D.toRadians(n[o+3]),t[o+4]=D.toRadians(n[o+4]);return t}function int(e){let t=e.length;if(Nl.magnitude=1,t===2)return Nl.clock=e[0],Nl.cone=e[1],d.fromSpherical(Nl,eo),[eo.x,eo.y,eo.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],Nl.clock=e[i+1],Nl.cone=e[i+2],d.fromSpherical(Nl,eo),n[o+1]=eo.x,n[o+2]=eo.y,n[o+3]=eo.z;return n}function ont(e){let t=e.length;if(t===3)return Nl.clock=e[0],Nl.cone=e[1],Nl.magnitude=e[2],d.fromSpherical(Nl,eo),[eo.x,eo.y,eo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],Nl.clock=e[i+1],Nl.cone=e[i+2],Nl.magnitude=e[i+3],d.fromSpherical(Nl,eo),n[i+1]=eo.x,n[i+2]=eo.y,n[i+3]=eo.z;return n}function rnt(e){let t=e.length;if(t===3)return qc.longitude=e[0],qc.latitude=e[1],qc.height=e[2],ne.default.cartographicToCartesian(qc,eo),[eo.x,eo.y,eo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],qc.longitude=e[i+1],qc.latitude=e[i+2],qc.height=e[i+3],ne.default.cartographicToCartesian(qc,eo),n[i+1]=eo.x,n[i+2]=eo.y,n[i+3]=eo.z;return n}function snt(e){let t=e.length;if(t===3)return qc.longitude=D.toRadians(e[0]),qc.latitude=D.toRadians(e[1]),qc.height=e[2],ne.default.cartographicToCartesian(qc,eo),[eo.x,eo.y,eo.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],qc.longitude=D.toRadians(e[i+1]),qc.latitude=D.toRadians(e[i+2]),qc.height=e[i+3],ne.default.cartographicToCartesian(qc,eo),n[i+1]=eo.x,n[i+2]=eo.y,n[i+3]=eo.z;return n}function Uq(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 o=e.unitSpherical;if(l(o))return int(o);let r=e.spherical;if(l(r))return ont(r);let s=e.cartographicRadians;if(l(s))return rnt(s);let a=e.cartographicDegrees;if(l(a))return snt(a);throw new ce(`${JSON.stringify(e)} is not a valid CZML interval.`)}function Bpe(e,t){d.unpack(e,t,eo),d.normalize(eo,eo),d.pack(eo,e,t)}function ant(e){let t=Uq(e);if(t.length===3)return Bpe(t,0),t;for(let n=1;n<t.length;n+=4)Bpe(t,n);return t}function Dpe(e,t){Fe.unpack(e,t,DV),Fe.normalize(DV,DV),Fe.pack(DV,e,t)}function cnt(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return Dpe(t,0),t;for(let n=1;n<t.length;n+=5)Dpe(t,n)}return t}function vpe(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")?qe:e.hasOwnProperty("cartesian2")?U:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?d:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?Ly:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?G:e.hasOwnProperty("arcType")?ln:e.hasOwnProperty("classificationType")?Xn:e.hasOwnProperty("colorBlendMode")?Qc:e.hasOwnProperty("cornerType")?Hi:e.hasOwnProperty("heightReference")?Ze:e.hasOwnProperty("horizontalOrigin")?vi:e.hasOwnProperty("date")?K:e.hasOwnProperty("labelStyle")?ir:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?Kt:e.hasOwnProperty("distanceDisplayCondition")?Gt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Fe:e.hasOwnProperty("shadowMode")?Bn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?em:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?ae:e.hasOwnProperty("uri")?QO.default:e.hasOwnProperty("verticalOrigin")?Hn:Object}function lnt(e,t,n){switch(e){case ln:return ln[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case qe:return t.boundingRectangle;case U:return t.cartesian2;case d:return Uq(t);case Ly:return ant(t);case G:return tnt(t);case Xn:return Xn[t.classificationType??t];case Qc:return Qc[t.colorBlendMode??t];case Hi:return Hi[t.cornerType??t];case Ze:return Ze[t.heightReference??t];case vi:return vi[t.horizontalOrigin??t];case Image:return wpe(t,n);case K:return K.fromIso8601(t.date??t);case ir:return ir[t.labelStyle??t];case Number:return t.number??t;case Kt:return t.nearFarScalar;case Gt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case Fe:return cnt(t);case Bd:return t.number??t;case aS:return aS[t.portionToDisplay??t];case Bn:return Bn[t.shadowMode??t.shadows??t];case String:return t.string??t;case em:return em[t.stripeOrientation??t];case ae:return nnt(t);case QO.default:return wpe(t,n);case Hn:return Hn[t.verticalOrigin??t];default:throw new ce(`Unknown CzmlDataSource interval type: ${e}`)}}var unt={HERMITE:PO,LAGRANGE:RO,LINEAR:W0};function vV(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:unt[n],interpolationDegree:i});let o=e.forwardExtrapolationType;l(o)&&(t.forwardExtrapolationType=df[o]);let r=e.forwardExtrapolationDuration;l(r)&&(t.forwardExtrapolationDuration=r);let s=e.backwardExtrapolationType;l(s)&&(t.backwardExtrapolationType=df[s]);let a=e.backwardExtrapolationDuration;l(a)&&(t.backwardExtrapolationDuration=a)}var Ppe={iso8601:void 0};function vr(e){if(l(e))return Ppe.iso8601=e,Rn.fromIso8601(Ppe)}function Gq(e){let t=Ye.MAXIMUM_INTERVAL.clone();return t.data=e,t}function Rpe(e){let t=new Wc;return t.intervals.addInterval(Gq(e)),t}function Mpe(e){let t=new za(e.referenceFrame);return t.intervals.addInterval(Gq(e)),t}function PV(e,t,n,i,o,r,s){let a=vr(i.interval);l(o)&&(l(a)?a=Rn.intersect(a,o,K0):a=o);let c,u,f,h=!l(i.reference)&&!l(i.velocityReference),p=l(a)&&!a.equals(Ye.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return Hpe(t[n],a)}let g=!1;if(h){if(u=lnt(e,i,r),!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!==Bd;if(!g&&!p){h?t[n]=new si(m?e.unpack(u,0):u):t[n]=Spe(e,s,i);return}let _=t[n],y,C=i.epoch;if(l(C)&&(y=K.fromIso8601(C)),g&&!p){_ instanceof mf||(t[n]=_=new mf(e)),_.addSamplesPackedArray(u,y),vV(i,_);return}let E;if(!g&&p){a=a.clone(),h?a.data=m?e.unpack(u,0):u:a.data=Spe(e,s,i),l(_)||(t[n]=_=h?new vg:new Wc),h&&_ instanceof vg?_.intervals.addInterval(a):_ instanceof Wc?(h&&(a.data=new si(a.data)),_.intervals.addInterval(a)):(t[n]=_=Rpe(_),h&&(a.data=new si(a.data)),_.intervals.addInterval(a));return}l(_)||(t[n]=_=new Wc),_ instanceof Wc||(t[n]=_=Rpe(_));let I=_.intervals;E=I.findInterval(a),(!l(E)||!(E.data instanceof mf))&&(E=a.clone(),E.data=new mf(e),I.addInterval(E)),E.data.addSamplesPackedArray(u,y),vV(i,E.data)}function Hpe(e,t){if(e instanceof mf){e.removeSamples(t);return}else if(e instanceof vg){e.intervals.removeInterval(t);return}else if(e instanceof Wc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=Rn.intersect(n.get(i),t,K0);o.isEmpty||Hpe(o.data,t)}n.removeInterval(t);return}}function _e(e,t,n,i,o,r,s){if(l(i))if(Array.isArray(i))for(let a=0,c=i.length;a<c;++a)PV(e,t,n,i[a],o,r,s);else PV(e,t,n,i,o,r,s)}function Npe(e,t,n,i,o,r){let s=vr(n.interval);l(i)&&(l(s)?s=Rn.intersect(s,i,K0):s=i);let a=l(n.cartesianVelocity)?1:0,c=d.packedLength*(a+1),u,f,h=!l(n.reference),p=l(s)&&!s.equals(Ye.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return Wpe(e[t],s)}let g,m=!1;if(h&&(l(n.referenceFrame)&&(g=Xi[n.referenceFrame]),g=g??Xi.FIXED,u=Uq(n),f=u.length??1,m=f>c),!m&&!p){h?e[t]=new ml(d.unpack(u),g):e[t]=OO(r,n.reference);return}let _=e[t],y,C=n.epoch;if(l(C)&&(y=K.fromIso8601(C)),m&&!p){(!(_ instanceof Ha)||l(g)&&_.referenceFrame!==g)&&(e[t]=_=new Ha(g,a)),_.addSamplesPackedArray(u,y),vV(n,_);return}let E;if(!m&&p){s=s.clone(),h?s.data=d.unpack(u):s.data=OO(r,n.reference),l(_)||(h?_=new Dg(g):_=new za(g),e[t]=_),h&&_ instanceof Dg&&l(g)&&_.referenceFrame===g?_.intervals.addInterval(s):_ instanceof za?(h&&(s.data=new ml(s.data,g)),_.intervals.addInterval(s)):(e[t]=_=Mpe(_),h&&(s.data=new ml(s.data,g)),_.intervals.addInterval(s));return}l(_)?_ instanceof za||(e[t]=_=Mpe(_)):e[t]=_=new za(g);let I=_.intervals;E=I.findInterval(s),(!l(E)||!(E.data instanceof Ha)||l(g)&&E.data.referenceFrame!==g)&&(E=s.clone(),E.data=new Ha(g,a),I.addInterval(E)),E.data.addSamplesPackedArray(u,y),vV(n,E.data)}function Wpe(e,t){if(e instanceof Ha){e.removeSamples(t);return}else if(e instanceof Dg){e.intervals.removeInterval(t);return}else if(e instanceof za){let n=e.intervals;for(let i=0;i<n.length;++i){let o=Rn.intersect(n.get(i),t,K0);o.isEmpty||Wpe(o.data,t)}n.removeInterval(t);return}}function jpe(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Npe(e,t,n[s],i,o,r);else Npe(e,t,n,i,o,r)}function Lpe(e,t,n,i){l(n.references)?RV(e,t,n.references,n.interval,i,iS,Wc):(l(n.cartesian2)?n.array=U.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=U.unpackArray(n.cartesian)),l(n.array)&&_e(Array,e,t,n,void 0,void 0,i))}function Ope(e,t,n,i,o,r){let s=vr(n.interval);l(i)&&(l(s)?s=Rn.intersect(s,i,K0):s=i);let a=e[t],c,u;if(l(s)){a instanceof kT||(a=new kT,e[t]=a);let h=a.intervals;u=h.findInterval({start:s.start,stop:s.stop}),l(u)?c=u.data:(u=s.clone(),h.addInterval(u))}else c=a;let f;l(n.solidColor)?(c instanceof Jt||(c=new Jt),f=n.solidColor,_e(G,c,"color",f.color,void 0,void 0,r)):l(n.grid)?(c instanceof KT||(c=new KT),f=n.grid,_e(G,c,"color",f.color,void 0,o,r),_e(Number,c,"cellAlpha",f.cellAlpha,void 0,o,r),_e(U,c,"lineCount",f.lineCount,void 0,o,r),_e(U,c,"lineThickness",f.lineThickness,void 0,o,r),_e(U,c,"lineOffset",f.lineOffset,void 0,o,r)):l(n.image)?(c instanceof R_||(c=new R_),f=n.image,_e(Image,c,"image",f.image,void 0,o,r),_e(U,c,"repeat",f.repeat,void 0,o,r),_e(G,c,"color",f.color,void 0,o,r),_e(Boolean,c,"transparent",f.transparent,void 0,o,r)):l(n.stripe)?(c instanceof rS||(c=new rS),f=n.stripe,_e(em,c,"orientation",f.orientation,void 0,o,r),_e(G,c,"evenColor",f.evenColor,void 0,o,r),_e(G,c,"oddColor",f.oddColor,void 0,o,r),_e(Number,c,"offset",f.offset,void 0,o,r),_e(Number,c,"repeat",f.repeat,void 0,o,r)):l(n.polylineOutline)?(c instanceof Ry||(c=new Ry),f=n.polylineOutline,_e(G,c,"color",f.color,void 0,o,r),_e(G,c,"outlineColor",f.outlineColor,void 0,o,r),_e(Number,c,"outlineWidth",f.outlineWidth,void 0,o,r)):l(n.polylineGlow)?(c instanceof tS||(c=new tS),f=n.polylineGlow,_e(G,c,"color",f.color,void 0,o,r),_e(Number,c,"glowPower",f.glowPower,void 0,o,r),_e(Number,c,"taperPower",f.taperPower,void 0,o,r)):l(n.polylineArrow)?(c instanceof JT||(c=new JT),f=n.polylineArrow,_e(G,c,"color",f.color,void 0,void 0,r)):l(n.polylineDash)?(c instanceof $T||(c=new $T),f=n.polylineDash,_e(G,c,"color",f.color,void 0,void 0,r),_e(G,c,"gapColor",f.gapColor,void 0,void 0,r),_e(Number,c,"dashLength",f.dashLength,void 0,o,r),_e(Number,c,"dashPattern",f.dashPattern,void 0,o,r)):l(n.checkerboard)&&(c instanceof FT||(c=new FT),f=n.checkerboard,_e(G,c,"evenColor",f.evenColor,void 0,o,r),_e(G,c,"oddColor",f.oddColor,void 0,o,r),_e(U,c,"repeat",f.repeat,void 0,o,r)),l(u)?u.data=c:e[t]=c}function pf(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)Ope(e,t,n[s],i,o,r);else Ope(e,t,n,i,o,r)}function fnt(e,t,n,i){let o=t.name;l(o)&&(e.name=t.name)}function dnt(e,t,n,i){let o=t.description;l(o)&&_e(String,e,"description",o,void 0,i,n)}function hnt(e,t,n,i){let o=t.position;l(o)&&jpe(e,"position",o,void 0,i,n)}function mnt(e,t,n,i){let o=t.viewFrom;l(o)&&_e(d,e,"viewFrom",o,void 0,i,n)}function pnt(e,t,n,i){let o=t.orientation;l(o)&&_e(Fe,e,"orientation",o,void 0,i,n)}function Ant(e,t,n,i){let o=t.properties;if(l(o)){l(e.properties)||(e.properties=new Al);for(let r in o)if(o.hasOwnProperty(r)){e.properties.hasProperty(r)||e.properties.addProperty(r);let s=o[r];if(Array.isArray(s))for(let a=0,c=s.length;a<c;++a)PV(vpe(s[a]),e.properties,r,s[a],void 0,i,n);else PV(vpe(s),e.properties,r,s,void 0,i,n)}}}function RV(e,t,n,i,o,r,s){let a=n.map(function(c){return OO(o,c)});if(l(i)){i=vr(i);let c=e[t];if(!(c instanceof s)){let u=new s;u.intervals.addInterval(Gq(c)),e[t]=c=u}i.data=new r(a),c.intervals.addInterval(i)}else e[t]=new r(a)}function Fpe(e,t,n,i){let o=n.references;l(o)?RV(e,t,o,n.interval,i,iS,Wc):_e(Array,e,t,n,void 0,void 0,i)}function Qpe(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Fpe(e,t,n[o],i);else Fpe(e,t,n,i)}function kpe(e,t,n,i){let o=n.references;l(o)?RV(e,t,o,n.interval,i,wg,za):(l(n.cartesian)?n.array=d.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=d.fromRadiansArrayHeights(n.cartographicRadians,ne.default):l(n.cartographicDegrees)&&(n.array=d.fromDegreesArrayHeights(n.cartographicDegrees,ne.default)),l(n.array)&&_e(Array,e,t,n,void 0,void 0,i))}function kO(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)kpe(e,t,n[o],i);else kpe(e,t,n,i)}function gnt(e){return d.unpackArray(e)}function _nt(e){return d.fromRadiansArrayHeights(e,ne.default)}function ynt(e){return d.fromDegreesArrayHeights(e,ne.default)}function Upe(e,t,n,i){let o=n.references;if(l(o)){let r=o.map(function(s){let a={};return RV(a,"positions",s,n.interval,i,wg,za),a.positions});e[t]=new wg(r)}else l(n.cartesian)?n.array=n.cartesian.map(gnt):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(_nt):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(ynt)),l(n.array)&&_e(Array,e,t,n,void 0,void 0,i)}function Cnt(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)Upe(e,t,n[o],i);else Upe(e,t,n,i)}function Ent(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)Lpe(e,t,n[o],i);else Lpe(e,t,n,i)}function Int(e,t,n,i){let o=t.availability;if(!l(o))return;let r;if(Array.isArray(o))for(let s=0,a=o.length;s<a;++s)l(r)||(r=new ss),r.addInterval(vr(o[s]));else r=new ss,r.addInterval(vr(o));e.availability=r}function xnt(e,t,n,i,o){l(t)&&_e(Ly,e,"alignedAxis",t,n,i,o)}function bnt(e,t,n,i){let o=t.billboard;if(!l(o))return;let r=vr(o.interval),s=e.billboard;l(s)||(e.billboard=s=new Pc),_e(Boolean,s,"show",o.show,r,i,n),_e(Image,s,"image",o.image,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(U,s,"pixelOffset",o.pixelOffset,r,i,n),_e(d,s,"eyeOffset",o.eyeOffset,r,i,n),_e(vi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),_e(Hn,s,"verticalOrigin",o.verticalOrigin,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(G,s,"color",o.color,r,i,n),_e(Bd,s,"rotation",o.rotation,r,i,n),xnt(s,o.alignedAxis,r,i,n),_e(Boolean,s,"sizeInMeters",o.sizeInMeters,r,i,n),_e(Number,s,"width",o.width,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),_e(Kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),_e(Kt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),_e(qe,s,"imageSubRegion",o.imageSubRegion,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Tnt(e,t,n,i){let o=t.box;if(!l(o))return;let r=vr(o.interval),s=e.box;l(s)||(e.box=s=new yE),_e(Boolean,s,"show",o.show,r,i,n),_e(d,s,"dimensions",o.dimensions,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Snt(e,t,n,i){let o=t.corridor;if(!l(o))return;let r=vr(o.interval),s=e.corridor;l(s)||(e.corridor=s=new EE),_e(Boolean,s,"show",o.show,r,i,n),kO(s,"positions",o.positions,n),_e(Number,s,"width",o.width,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Ze,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Hi,s,"cornerType",o.cornerType,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Xn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function wnt(e,t,n,i){let o=t.cylinder;if(!l(o))return;let r=vr(o.interval),s=e.cylinder;l(s)||(e.cylinder=s=new IE),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"length",o.length,r,i,n),_e(Number,s,"topRadius",o.topRadius,r,i,n),_e(Number,s,"bottomRadius",o.bottomRadius,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),_e(Number,s,"slices",o.slices,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Bnt(e,t){let n=e.version;if(l(n)&&typeof n=="string"){let r=n.split(".");if(r.length===2){if(r[0]!=="1")throw new ce("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new ce("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 o=e.clock;if(l(o)){let r=i.clock;l(r)?(r.interval=o.interval??r.interval,r.currentTime=o.currentTime??r.currentTime,r.range=o.range??r.range,r.step=o.step??r.step,r.multiplier=o.multiplier??r.multiplier):i.clock={interval:o.interval,currentTime:o.currentTime,range:o.range,step:o.step,multiplier:o.multiplier}}}function Dnt(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=vr(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new xE),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),_e(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Ze,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Bd,s,"rotation",o.rotation,r,i,n),_e(Bd,s,"stRotation",o.stRotation,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Xn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function vnt(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=vr(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new bE),_e(Boolean,s,"show",o.show,r,i,n),_e(d,s,"radii",o.radii,r,i,n),_e(d,s,"innerRadii",o.innerRadii,r,i,n),_e(Number,s,"minimumClock",o.minimumClock,r,i,n),_e(Number,s,"maximumClock",o.maximumClock,r,i,n),_e(Number,s,"minimumCone",o.minimumCone,r,i,n),_e(Number,s,"maximumCone",o.maximumCone,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"stackPartitions",o.stackPartitions,r,i,n),_e(Number,s,"slicePartitions",o.slicePartitions,r,i,n),_e(Number,s,"subdivisions",o.subdivisions,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Pnt(e,t,n,i){let o=t.label;if(!l(o))return;let r=vr(o.interval),s=e.label;l(s)||(e.label=s=new gh),_e(Boolean,s,"show",o.show,r,i,n),_e(String,s,"text",o.text,r,i,n),_e(String,s,"font",o.font,r,i,n),_e(ir,s,"style",o.style,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Boolean,s,"showBackground",o.showBackground,r,i,n),_e(G,s,"backgroundColor",o.backgroundColor,r,i,n),_e(U,s,"backgroundPadding",o.backgroundPadding,r,i,n),_e(U,s,"pixelOffset",o.pixelOffset,r,i,n),_e(d,s,"eyeOffset",o.eyeOffset,r,i,n),_e(vi,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),_e(Hn,s,"verticalOrigin",o.verticalOrigin,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(G,s,"fillColor",o.fillColor,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),_e(Kt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),_e(Kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Rnt(e,t,n,i){let o=t.model;if(!l(o))return;let r=vr(o.interval),s=e.model;l(s)||(e.model=s=new yA),_e(Boolean,s,"show",o.show,r,i,n),_e(QO.default,s,"uri",o.gltf,r,i,n),_e(Number,s,"scale",o.scale,r,i,n),_e(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),_e(Number,s,"maximumScale",o.maximumScale,r,i,n),_e(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),_e(Boolean,s,"runAnimations",o.runAnimations,r,i,n),_e(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(G,s,"silhouetteColor",o.silhouetteColor,r,i,n),_e(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),_e(G,s,"color",o.color,r,i,n),_e(Qc,s,"colorBlendMode",o.colorBlendMode,r,i,n),_e(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n);let a,c,u=o.nodeTransformations;if(l(u))if(Array.isArray(u))for(a=0,c=u.length;a<c;++a)Gpe(s,u[a],r,i,n);else Gpe(s,u,r,i,n);let f=o.articulations;if(l(f))if(Array.isArray(f))for(a=0,c=f.length;a<c;++a)zpe(s,f[a],r,i,n);else zpe(s,f,r,i,n)}function Gpe(e,t,n,i,o){let r=vr(t.interval);l(n)&&(l(r)?r=Rn.intersect(r,n,K0):r=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 h=t[f];if(!l(h))continue;l(s)||(e.nodeTransformations=s=new Al),s.hasProperty(f)||s.addProperty(f);let p=s[f];l(p)||(s[f]=p=new TE),_e(d,p,"translation",h.translation,r,i,o),_e(Fe,p,"rotation",h.rotation,r,i,o),_e(d,p,"scale",h.scale,r,i,o)}}function zpe(e,t,n,i,o){let r=vr(t.interval);l(n)&&(l(r)?r=Rn.intersect(r,n,K0):r=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 h=t[f];l(h)&&(l(s)||(e.articulations=s=new Al),s.hasProperty(f)||s.addProperty(f),_e(Number,s,f,h,r,i,o))}}function Mnt(e,t,n,i){let o=t.path;if(!l(o))return;let r=vr(o.interval),s=e.path;l(s)||(e.path=s=new CA),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"leadTime",o.leadTime,r,i,n),_e(Number,s,"trailTime",o.trailTime,r,i,n),_e(Number,s,"width",o.width,r,i,n),_e(Number,s,"resolution",o.resolution,r,i,n),pf(s,"material",o.material,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Nnt(e,t,n,i){let o=t.point;if(!l(o))return;let r=vr(o.interval),s=e.point;l(s)||(e.point=s=new wE),_e(Boolean,s,"show",o.show,r,i,n),_e(Number,s,"pixelSize",o.pixelSize,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(G,s,"color",o.color,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Kt,s,"scaleByDistance",o.scaleByDistance,r,i,n),_e(Kt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function FO(e){this.polygon=e,this._definitionChanged=new ge}Object.defineProperties(FO.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}}});FO.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(o){return new uc(o)}))),l(t)?(t.positions=n,t.holes=i,t):new uc(n,i)};FO.prototype.equals=function(e){return this===e||e instanceof FO&&W.equals(this.polygon._positions,e.polygon._positions)&&W.equals(this.polygon._holes,e.polygon._holes)};function Lnt(e,t,n,i){let o=t.polygon;if(!l(o))return;let r=vr(o.interval),s=e.polygon;l(s)||(e.polygon=s=new _h),_e(Boolean,s,"show",o.show,r,i,n),kO(s,"_positions",o.positions,n),Cnt(s,"_holes",o.holes,n),(l(s._positions)||l(s._holes))&&(s.hierarchy=new FO(s)),_e(Number,s,"height",o.height,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Ze,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Bd,s,"stRotation",o.stRotation,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Boolean,s,"perPositionHeight",o.perPositionHeight,r,i,n),_e(Boolean,s,"closeTop",o.closeTop,r,i,n),_e(Boolean,s,"closeBottom",o.closeBottom,r,i,n),_e(ln,s,"arcType",o.arcType,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Xn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function Ont(e){return e?ln.GEODESIC:ln.NONE}function Fnt(e,t,n,i){let o=t.polyline;if(!l(o))return;let r=vr(o.interval),s=e.polyline;if(l(s)||(e.polyline=s=new Mc),_e(Boolean,s,"show",o.show,r,i,n),kO(s,"positions",o.positions,n),_e(Number,s,"width",o.width,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),pf(s,"material",o.material,r,i,n),pf(s,"depthFailMaterial",o.depthFailMaterial,r,i,n),_e(ln,s,"arcType",o.arcType,r,i,n),_e(Boolean,s,"clampToGround",o.clampToGround,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Xn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n),l(o.followSurface)&&!l(o.arcType)){let a={};_e(Boolean,a,"followSurface",o.followSurface,r,i,n),s.arcType=ent(a.followSurface,Ont)}}function Qnt(e,t,n,i){let o=t.polylineVolume;if(!l(o))return;let r=vr(o.interval),s=e.polylineVolume;l(s)||(e.polylineVolume=s=new BE),kO(s,"positions",o.positions,n),Ent(s,"shape",o.shape,n),_e(Boolean,s,"show",o.show,r,i,n),_e(Hi,s,"cornerType",o.cornerType,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function knt(e,t,n,i){let o=t.rectangle;if(!l(o))return;let r=vr(o.interval),s=e.rectangle;l(s)||(e.rectangle=s=new yh),_e(Boolean,s,"show",o.show,r,i,n),_e(ae,s,"coordinates",o.coordinates,r,i,n),_e(Number,s,"height",o.height,r,i,n),_e(Ze,s,"heightReference",o.heightReference,r,i,n),_e(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),_e(Ze,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),_e(Bd,s,"rotation",o.rotation,r,i,n),_e(Bd,s,"stRotation",o.stRotation,r,i,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),_e(Xn,s,"classificationType",o.classificationType,r,i,n),_e(Number,s,"zIndex",o.zIndex,r,i,n)}function Unt(e,t,n,i){let o=t.tileset;if(!l(o))return;let r=vr(o.interval),s=e.tileset;l(s)||(e.tileset=s=new SE),_e(Boolean,s,"show",o.show,r,i,n),_e(QO.default,s,"uri",o.uri,r,i,n),_e(Number,s,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function Gnt(e,t,n,i){let o=t.wall;if(!l(o))return;let r=vr(o.interval),s=e.wall;l(s)||(e.wall=s=new EA),_e(Boolean,s,"show",o.show,r,i,n),kO(s,"positions",o.positions,n),Qpe(s,"minimumHeights",o.minimumHeights,n),Qpe(s,"maximumHeights",o.maximumHeights,n),_e(Number,s,"granularity",o.granularity,r,i,n),_e(Boolean,s,"fill",o.fill,r,i,n),pf(s,"material",o.material,r,i,n),_e(Boolean,s,"outline",o.outline,r,i,n),_e(G,s,"outlineColor",o.outlineColor,r,i,n),_e(Number,s,"outlineWidth",o.outlineWidth,r,i,n),_e(Bn,s,"shadows",o.shadows,r,i,n),_e(Gt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Vpe(e,t,n,i,o){let r=e.id;if(l(r)||(r=qn()),kq=r,!l(o._version)&&r!=="document")throw new ce("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")Bnt(e,o);else{let s=t.getOrCreateEntity(r),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)}kq=void 0}function znt(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Ye.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=K.secondsDifference(s,r),c=Math.round(a/120);return t=new $h,t.startTime=K.clone(r),t.stopTime=K.clone(s),t.clockRange=cs.LOOP_STOP,t.multiplier=c,t.currentTime=K.clone(r),t.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}l(e._clock)?t=e._clock.clone():(t=new $h,t.startTime=Ye.MINIMUM_VALUE.clone(),t.stopTime=Ye.MAXIMUM_VALUE.clone(),t.currentTime=Ye.MINIMUM_VALUE.clone(),t.clockRange=cs.LOOP_STOP,t.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=vr(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=cs[n.range]??cs.LOOP_STOP),l(n.step)&&(t.clockStep=To[n.step]??To.SYSTEM_CLOCK_MULTIPLIER),l(n.multiplier)&&(t.multiplier=n.multiplier),t.equals(e._clock)?!1:(e._clock=t.clone(e._clock),!0)}function Ype(e,t,n,i){n=n??V.EMPTY_OBJECT;let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new Bt(s)),e._credit=s,typeof t=="string"||t instanceof we){t=we.createIfNeeded(t),o=t.fetchJson(),r=r??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 r=we.createIfNeeded(r),as.setLoading(e,!0),Promise.resolve(o).then(function(a){return Vnt(e,a,r,i)}).catch(function(a){return as.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function Vnt(e,t,n,i){as.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new qpe,o.removeAll()),Ns._processCzml(t,o,n,void 0,e);let r=znt(e),s=e._documentPacket;return l(s.name)&&e._name!==s.name?(e._name=s.name,r=!0):!l(e._name)&&l(n)&&(e._name=Tg(n.getUrlComponent()),r=!0),as.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function qpe(){this.name=void 0,this.clock=void 0}function Ns(e){this._name=e,this._changed=new ge,this._error=new ge,this._isLoading=!1,this._loading=new ge,this._clock=void 0,this._documentPacket=new qpe,this._version=void 0,this._entityCollection=new ya(this),this._entityCluster=new uf,this._credit=void 0,this._resourceCredits=[]}Ns.load=function(e,t){return new Ns().load(e,t)};Object.defineProperties(Ns.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}}});Ns.updaters=[bnt,Tnt,Snt,wnt,Dnt,vnt,Pnt,Rnt,fnt,dnt,Mnt,Nnt,Lnt,Fnt,Qnt,Ant,knt,hnt,Unt,mnt,Gnt,pnt,Int];Ns.registerUpdater=function(e){Ns.updaters.includes(e)||Ns.updaters.push(e)};Ns.unregisterUpdater=function(e){if(Ns.updaters.includes(e)){let t=Ns.updaters.indexOf(e);Ns.updaters.splice(t,1)}};Ns.prototype.process=function(e,t){return Ype(this,e,t,!1)};Ns.prototype.load=function(e,t){return Ype(this,e,t,!0)};Ns.prototype.update=function(e){return!0};Ns.processPacketData=_e;Ns.processPositionPacketData=jpe;Ns.processMaterialPacketData=pf;Ns._processCzml=function(e,t,n,i,o){if(i=i??Ns.updaters,Array.isArray(e))for(let r=0,s=e.length;r<s;++r)Vpe(e[r],t,i,n,o);else Vpe(e,t,i,n,o)};var UO=Ns;function Ll(){this._dataSources=[],this._dataSourceAdded=new ge,this._dataSourceRemoved=new ge,this._dataSourceMoved=new ge}Object.defineProperties(Ll.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}}});Ll.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})};Ll.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};Ll.prototype.removeAll=function(e){e=e??!1;let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&typeof o.destroy=="function"&&o.destroy()}this._dataSources=[]};Ll.prototype.contains=function(e){return this.indexOf(e)!==-1};Ll.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};Ll.prototype.get=function(e){return this._dataSources[e]};Ll.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function MV(e,t){return e.indexOf(t)}function Kpe(e,t,n){let i=e._dataSources,o=i.length-1;if(t=D.clamp(t,0,o),n=D.clamp(n,0,o),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}Ll.prototype.raise=function(e){let t=MV(this._dataSources,e);Kpe(this,t,t+1)};Ll.prototype.lower=function(e){let t=MV(this._dataSources,e);Kpe(this,t,t-1)};Ll.prototype.raiseToTop=function(e){let t=MV(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))};Ll.prototype.lowerToBottom=function(e){let t=MV(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};Ll.prototype.isDestroyed=function(){return!1};Ll.prototype.destroy=function(){return this.removeAll(!0),ue(this)};var GO=Ll;function Wa(e){e=e??V.EMPTY_OBJECT,this._primitives=[],this._guid=qn(),this._primitiveAdded=new ge,this._primitiveRemoved=new ge,this._zIndex=void 0,this.show=e.show??!0,this.destroyPrimitives=e.destroyPrimitives??!0}Object.defineProperties(Wa.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});Wa.prototype.add=function(e,t){let n=l(t),i=e._external=e._external||{},o=i._composites=i._composites||{};return o[this._guid]={collection:this},n?this._primitives.splice(t,0,e):this._primitives.push(e),this._primitiveAdded.raiseEvent(e),e};Wa.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.destroyPrimitives&&e.destroy(),this._primitiveRemoved.raiseEvent(e),!0}return!1};Wa.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};Wa.prototype.removeAll=function(){let e=this._primitives,t=e.length;for(let n=0;n<t;++n)delete e[n]._external._composites[this._guid],this.destroyPrimitives&&e[n].destroy(),this._primitiveRemoved.raiseEvent(e[n]);this._primitives=[]};Wa.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function NV(e,t){return e._primitives.indexOf(t)}Wa.prototype.raise=function(e){if(l(e)){let t=NV(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};Wa.prototype.raiseToTop=function(e){if(l(e)){let t=NV(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};Wa.prototype.lower=function(e){if(l(e)){let t=NV(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};Wa.prototype.lowerToBottom=function(e){if(l(e)){let t=NV(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};Wa.prototype.get=function(e){return this._primitives[e]};Wa.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};Wa.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)}};Wa.prototype.updateForPass=function(e,t){let n=this._primitives;for(let i=0;i<n.length;++i){let o=n[i];l(o.updateForPass)&&o.updateForPass(e,t)}};Wa.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)}};Wa.prototype.isDestroyed=function(){return!1};Wa.prototype.destroy=function(){return this.removeAll(),ue(this)};var Ol=Wa;function fp(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(fp.prototype,{length:{get:function(){return this._length}}});fp.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new Ol({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e};fp.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};fp.prototype.remove=function(e,t){if(this.contains(e)){let n=e._zIndex,i=this._collections[n],o;return t?o=i.remove(e):o=i.removeAndDestroy(e),o&&this._length--,i.length===0&&(this._collectionsArray.splice(this._collectionsArray.indexOf(i),1),this._collections[n]=void 0,i.destroy()),o}return!1};fp.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};fp.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};fp.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};fp.prototype.isDestroyed=function(){return!1};fp.prototype.destroy=function(){return this.removeAll(),ue(this)};var zO=fp;function cS(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new Pt}cS.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};cS.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};cS.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};cS.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};cS.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):mt.FAILED};var X0=cS;var Vq={},LV=new d,Xpe=new d,Jpe=new Fe,Zpe=new X;function lS(e,t,n,i,o,r,s,a,c,u){let f=e+t;d.multiplyByScalar(i,Math.cos(f),LV),d.multiplyByScalar(n,Math.sin(f),Xpe),d.add(LV,Xpe,LV);let h=Math.cos(e);h=h*h;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(s*h+o*p)/a;return Fe.fromAxisAngle(LV,m,Jpe),X.fromQuaternion(Jpe,Zpe),X.multiplyByVector(Zpe,c,u),d.normalize(u,u),d.multiplyByScalar(u,a,u),u}var $pe=new d,eAe=new d,zq=new d,Hnt=new d;Vq.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=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 h=f+1,p=f+2,g=d.fromArray(e,f,$pe);i.scaleToGeodeticSurface(g,g);let m=d.clone(g,eAe),_=i.geodeticSurfaceNormal(g,Hnt),y=d.multiplyByScalar(_,o,zq);d.add(g,y,g),n&&(d.multiplyByScalar(_,r,y),d.add(m,y,m),a[f+u]=m.x,a[h+u]=m.y,a[p+u]=m.z),a[f]=g.x,a[h]=g.y,a[p]=g.z}return a};var Wnt=new d,jnt=new d,Ynt=new d;Vq.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=o*o,f=o*i,h=d.magnitude(s),p=d.normalize(s,Wnt),g=d.cross(d.UNIT_Z,s,jnt);g=d.normalize(g,g);let m=d.cross(p,g,Ynt),_=1+Math.ceil(D.PI_OVER_TWO/a),y=D.PI_OVER_TWO/(_-1),C=D.PI_OVER_TWO-_*y;C<0&&(_-=Math.ceil(Math.abs(C)/y));let E=2*(_*(_+2)),I=t?new Array(E*3):void 0,b=0,S=$pe,B=eAe,v=_*4*3,P=v-1,N=0,L=n?new Array(v):void 0,A,x,T,w,R;for(C=D.PI_OVER_TWO,S=lS(C,r,m,g,c,f,u,h,p,S),t&&(I[b++]=S.x,I[b++]=S.y,I[b++]=S.z),n&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x),C=D.PI_OVER_TWO-y,A=1;A<_+1;++A){if(S=lS(C,r,m,g,c,f,u,h,p,S),B=lS(Math.PI-C,r,m,g,c,f,u,h,p,B),t){for(I[b++]=S.x,I[b++]=S.y,I[b++]=S.z,T=2*A+2,x=1;x<T-1;++x)w=x/(T-1),R=d.lerp(S,B,w,zq),I[b++]=R.x,I[b++]=R.y,I[b++]=R.z;I[b++]=B.x,I[b++]=B.y,I[b++]=B.z}n&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[N++]=B.x,L[N++]=B.y,L[N++]=B.z),C=D.PI_OVER_TWO-(A+1)*y}for(A=_;A>1;--A){if(C=D.PI_OVER_TWO-(A-1)*y,S=lS(-C,r,m,g,c,f,u,h,p,S),B=lS(C+Math.PI,r,m,g,c,f,u,h,p,B),t){for(I[b++]=S.x,I[b++]=S.y,I[b++]=S.z,T=2*(A-1)+2,x=1;x<T-1;++x)w=x/(T-1),R=d.lerp(S,B,w,zq),I[b++]=R.x,I[b++]=R.y,I[b++]=R.z;I[b++]=B.x,I[b++]=B.y,I[b++]=B.z}n&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,L[N++]=B.x,L[N++]=B.y,L[N++]=B.z)}C=D.PI_OVER_TWO,S=lS(-C,r,m,g,c,f,u,h,p,S);let O={};return t&&(I[b++]=S.x,I[b++]=S.y,I[b++]=S.z,O.positions=I,O.numPts=_),n&&(L[P--]=S.z,L[P--]=S.y,L[P--]=S.x,O.outerPositions=L),O};var yu=Vq;var uS=new d,Hq=new d,Wq=new d,tAe=new d,Js=new U,nAe=new X,qnt=new X,jq=new Fe,iAe=new d,oAe=new d,rAe=new d,QV=new me,sAe=new d,aAe=new U,cAe=new U;function lAe(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,h=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,_=f?new Float32Array(u*3):void 0,y=0,C=iAe,E=oAe,I=rAe,b=new Qi(a),S=b.project(a.cartesianToCartographic(o,QV),sAe),B=a.scaleToGeodeticSurface(o,uS);a.geodeticSurfaceNormal(B,B);let v=nAe,P=qnt;if(c!==0){let R=Fe.fromAxisAngle(B,c,jq);v=X.fromQuaternion(R,v),R=Fe.fromAxisAngle(B,-c,jq),P=X.fromQuaternion(R,P)}else v=X.clone(X.IDENTITY,v),P=X.clone(X.IDENTITY,P);let N=U.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,aAe),L=U.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,cAe),A=e.length,x=n?A:0,T=x/3*2;for(let R=0;R<A;R+=3){let O=R+1,k=R+2,F=d.fromArray(e,R,uS);if(i.st){let z=X.multiplyByVector(v,F,Hq),Q=b.project(a.cartesianToCartographic(z,QV),Wq);d.subtract(Q,S,Q),Js.x=(Q.x+r)/(2*r),Js.y=(Q.y+s)/(2*s),N.x=Math.min(Js.x,N.x),N.y=Math.min(Js.y,N.y),L.x=Math.max(Js.x,L.x),L.y=Math.max(Js.y,L.y),n&&(h[y+T]=Js.x,h[y+1+T]=Js.y),h[y++]=Js.x,h[y++]=Js.y}(i.normal||i.tangent||i.bitangent||f)&&(C=a.geodeticSurfaceNormal(F,C),f&&(_[R+x]=-C.x,_[O+x]=-C.y,_[k+x]=-C.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(E=d.normalize(d.cross(d.UNIT_Z,C,E),E),X.multiplyByVector(P,E,E)),i.normal&&(p[R]=C.x,p[O]=C.y,p[k]=C.z,n&&(p[R+x]=-C.x,p[O+x]=-C.y,p[k+x]=-C.z)),i.tangent&&(g[R]=E.x,g[O]=E.y,g[k]=E.z,n&&(g[R+x]=-E.x,g[O+x]=-E.y,g[k+x]=-E.z)),i.bitangent&&(I=d.normalize(d.cross(C,E,I),I),m[R]=I.x,m[O]=I.y,m[k]=I.z,n&&(m[R+x]=I.x,m[O+x]=I.y,m[k+x]=I.z))))}if(i.st){A=h.length;for(let R=0;R<A;R+=2)h[R]=(h[R]-N.x)/(L.x-N.x),h[R+1]=(h[R+1]-N.y)/(L.y-N.y)}let w=new Cn;if(i.position){let R=yu.raisePositionsToHeight(e,t,n);w.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:R})}if(i.st&&(w.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(w.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(w.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:g})),i.bitangent&&(w.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:m})),f&&(w.extrudeDirection=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:_})),n&&l(t.offsetAttribute)){let R=new Uint8Array(u);if(t.offsetAttribute===dn.TOP)R=R.fill(1,0,u/2);else{let O=t.offsetAttribute===dn.NONE?0:1;R=R.fill(O)}w.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:R})}return w}function uAe(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var J0=new d;function Knt(e){let t=e.center;J0=d.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,J0),e.height,J0),J0=d.add(t,J0,J0);let n=new le(J0,e.semiMajorAxis),i=yu.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=lAe(o,e,!1),a=uAe(r);return a=Qe.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function Xnt(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,h=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,_=n.bitangent?new Float32Array(f*3):void 0,y=t.shadowVolume,C=y?new Float32Array(f*3):void 0,E=0,I=iAe,b=oAe,S=rAe,B=new Qi(s),v=B.project(s.cartesianToCartographic(i,QV),sAe),P=s.scaleToGeodeticSurface(i,uS);s.geodeticSurfaceNormal(P,P);let N=Fe.fromAxisAngle(P,u,jq),L=X.fromQuaternion(N,nAe),A=U.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,aAe),x=U.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,cAe),T=e.length,w=T/3*2;for(let O=0;O<T;O+=3){let k=O+1,F=O+2,z=d.fromArray(e,O,uS),Q;if(n.st){let j=X.multiplyByVector(L,z,Hq),Z=B.project(s.cartesianToCartographic(j,QV),Wq);d.subtract(Z,v,Z),Js.x=(Z.x+o)/(2*o),Js.y=(Z.y+r)/(2*r),A.x=Math.min(Js.x,A.x),A.y=Math.min(Js.y,A.y),x.x=Math.max(Js.x,x.x),x.y=Math.max(Js.y,x.y),p[E+w]=Js.x,p[E+1+w]=Js.y,p[E++]=Js.x,p[E++]=Js.y}z=s.scaleToGeodeticSurface(z,z),Q=d.clone(z,Hq),I=s.geodeticSurfaceNormal(z,I),y&&(C[O+T]=-I.x,C[k+T]=-I.y,C[F+T]=-I.z);let H=d.multiplyByScalar(I,a,tAe);if(z=d.add(z,H,z),H=d.multiplyByScalar(I,c,H),Q=d.add(Q,H,Q),n.position&&(h[O+T]=Q.x,h[k+T]=Q.y,h[F+T]=Q.z,h[O]=z.x,h[k]=z.y,h[F]=z.z),n.normal||n.tangent||n.bitangent){S=d.clone(I,S);let j=d.fromArray(e,(O+3)%T,tAe);d.subtract(j,z,j);let Z=d.subtract(Q,z,Wq);I=d.normalize(d.cross(Z,j,I),I),n.normal&&(g[O]=I.x,g[k]=I.y,g[F]=I.z,g[O+T]=I.x,g[k+T]=I.y,g[F+T]=I.z),n.tangent&&(b=d.normalize(d.cross(S,I,b),b),m[O]=b.x,m[k]=b.y,m[F]=b.z,m[O+T]=b.x,m[O+1+T]=b.y,m[O+2+T]=b.z),n.bitangent&&(_[O]=S.x,_[k]=S.y,_[F]=S.z,_[O+T]=S.x,_[k+T]=S.y,_[F+T]=S.z)}}if(n.st){T=p.length;for(let O=0;O<T;O+=2)p[O]=(p[O]-A.x)/(x.x-A.x),p[O+1]=(p[O+1]-A.y)/(x.y-A.y)}let R=new Cn;if(n.position&&(R.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(R.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(R.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:g})),n.tangent&&(R.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(R.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:_})),y&&(R.extrudeDirection=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:C})),l(t.offsetAttribute)){let O=new Uint8Array(f);if(t.offsetAttribute===dn.TOP)O=O.fill(1,0,f/2);else{let k=t.offsetAttribute===dn.NONE?0:1;O=O.fill(k)}R.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return R}function Jnt(e){let t=e.length/3,n=Qe.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var OV=new le,FV=new le;function Znt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,uS),e.height,uS);OV.center=d.add(t,o,OV.center),OV.radius=i,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),FV.center=d.add(t,o,FV.center),FV.radius=i;let r=yu.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,u=le.union(OV,FV),f=lAe(s,e,!0),h=uAe(a),p=h.length;h.length=p*2;let g=s.length/3;for(let b=0;b<p;b+=3)h[b+p]=h[b+2]+g,h[b+1+p]=h[b+1]+g,h[b+2+p]=h[b]+g;let m=Qe.createTypedArray(g*2/3,h),_=new ht({attributes:f,indices:m,primitiveType:Ne.TRIANGLES}),y=Xnt(c,e);h=Jnt(c);let C=Qe.createTypedArray(c.length*2/3,h),E=new ht({attributes:y,indices:C,primitiveType:Ne.TRIANGLES}),I=Vn.combineInstances([new Rt({geometry:_}),new Rt({geometry:E})]);return{boundingSphere:u,attributes:I[0].attributes,indices:I[0].indices}}function fAe(e,t,n,i,o,r,s){let c=yu.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=d.fromArray(c,p*3);let h=ae.fromCartesianArray(f,r,s);return h.width>D.PI&&(h.north=h.north>0?D.PI_OVER_TWO-D.EPSILON7:h.north,h.south=h.south<0?D.EPSILON7-D.PI_OVER_TWO:h.south,h.east=D.PI,h.west=-D.PI),h}function hp(e){e=e??V.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ne.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??D.RADIANS_PER_DEGREE,s=e.vertexFormat??Re.DEFAULT,a=e.height??0,c=e.extrudedHeight??a;this._center=d.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ne.clone(n),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Re.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}hp.packedLength=d.packedLength+ne.packedLength+Re.packedLength+9;hp.pack=function(e,t,n){return n=n??0,d.pack(e._center,t,n),n+=d.packedLength,ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.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 dAe=new d,hAe=new ne,mAe=new Re,dp={center:dAe,ellipsoid:hAe,vertexFormat:mAe,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};hp.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t,dAe);t+=d.packedLength;let o=ne.unpack(e,t,hAe);t+=ne.packedLength;let r=Re.unpack(e,t,mAe);t+=Re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++],p=e[t++],g=e[t++]===1,m=e[t];return l(n)?(n._center=d.clone(i,n._center),n._ellipsoid=ne.clone(o,n._ellipsoid),n._vertexFormat=Re.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=h,n._extrudedHeight=p,n._shadowVolume=g,n._offsetAttribute=m===-1?void 0:m,n):(dp.height=f,dp.extrudedHeight=p,dp.granularity=h,dp.stRotation=u,dp.rotation=c,dp.semiMajorAxis=s,dp.semiMinorAxis=a,dp.shadowVolume=g,dp.offsetAttribute=m===-1?void 0:m,new hp(dp))};hp.computeRectangle=function(e,t){e=e??V.EMPTY_OBJECT;let n=e.center,i=e.ellipsoid??ne.default,o=e.semiMajorAxis,r=e.semiMinorAxis,s=e.granularity??D.RADIANS_PER_DEGREE,a=e.rotation??0;return fAe(n,o,r,a,s,i,t)};hp.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 o={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},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=Znt(o);else if(r=Knt(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===dn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ht({attributes:r.attributes,indices:r.indices,primitiveType:Ne.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};hp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new hp({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Re.POSITION_ONLY,shadowVolume:!0})};function $nt(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=yu.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=d.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ht._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(hp.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=fAe(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=$nt(this)),this._textureCoordinateRotationPoints}}});var Fl=hp;var pAe=new d,Z0=new d;function eit(e){let t=e.center;Z0=d.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,Z0),e.height,Z0),Z0=d.add(t,Z0,Z0);let n=new le(Z0,e.semiMajorAxis),i=yu.computeEllipsePositions(e,!1,!0).outerPositions,o=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:yu.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Qe.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var kV=new le,UV=new le;function tit(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,pAe),e.height,pAe);kV.center=d.add(t,o,kV.center),kV.radius=i,o=d.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),UV.center=d.add(t,o,UV.center),UV.radius=i;let r=yu.computeEllipsePositions(e,!1,!0).outerPositions,s=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:yu.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=le.union(kV,UV),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===dn.TOP)m=m.fill(1,0,c/2);else{let _=e.offsetAttribute===dn.NONE?0:1;m=m.fill(_)}s.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=e.numberOfVerticalLines??16;u=D.clamp(u,0,c/2);let f=Qe.createTypedArray(c,c*2+u*2);c/=2;let h=0,p;for(p=0;p<c;++p)f[h++]=p,f[h++]=(p+1)%c,f[h++]=p+c,f[h++]=(p+1)%c+c;let g;if(u>0){let m=Math.min(u,c);g=Math.round(c/m);let _=Math.min(g*u,c);for(p=0;p<_;p+=g)f[h++]=p,f[h++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function fS(e){e=e??V.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ne.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??D.RADIANS_PER_DEGREE,s=e.height??0,a=e.extrudedHeight??s;this._center=d.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ne.clone(n),this._rotation=e.rotation??0,this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(e.numberOfVerticalLines??16,0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}fS.packedLength=d.packedLength+ne.packedLength+8;fS.pack=function(e,t,n){return n=n??0,d.pack(e._center,t,n),n+=d.packedLength,ne.pack(e._ellipsoid,t,n),n+=ne.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 AAe=new d,gAe=new ne,Mg={center:AAe,ellipsoid:gAe,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};fS.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t,AAe);t+=d.packedLength;let o=ne.unpack(e,t,gAe);t+=ne.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++],p=e[t];return l(n)?(n._center=d.clone(i,n._center),n._ellipsoid=ne.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=h,n._offsetAttribute=p===-1?void 0:p,n):(Mg.height=c,Mg.extrudedHeight=f,Mg.granularity=u,Mg.rotation=a,Mg.semiMajorAxis=r,Mg.semiMinorAxis=s,Mg.numberOfVerticalLines=h,Mg.offsetAttribute=p===-1?void 0:p,new fS(Mg))};fS.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 o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=tit(o);else if(r=eit(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===dn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ht({attributes:r.attributes,indices:r.indices,primitiveType:Ne.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Af=fS;var _Ae=new G,yAe=d.ZERO,CAe=new d,EAe=new ae;function nit(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 tm(e,t){ei.call(this,{entity:e,scene:t,geometryOptions:new nit(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(tm.prototype=Object.create(ei.prototype),tm.prototype.constructor=tm);tm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new wn(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 Jt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,_Ae)),l(o)||(o=G.WHITE),i.color=en.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,yAe,CAe))),new Rt({id:t,geometry:new Fl(this._options),attributes:i})};tm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,_Ae),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,yAe,CAe))),new Rt({id:t,geometry:new Af(this._options),attributes:r})};tm.prototype._computeCenter=function(e,t){return W.getValueOrUndefined(this._entity.position,e,t)};tm.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||gi.prototype._isHidden.call(this,e,t)};tm.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!W.isConstant(t.rotation)||!W.isConstant(t.height)||!W.isConstant(t.extrudedHeight)||!W.isConstant(t.granularity)||!W.isConstant(t.stRotation)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.numberOfVerticalLines)||!W.isConstant(t.zIndex)||this._onTerrain&&!W.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Jt)};tm.prototype._setStaticOptions=function(e,t){let n=W.getValueOrUndefined(t.height,Ye.MINIMUM_VALUE),i=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),o=W.getValueOrUndefined(t.extrudedHeight,Ye.MINIMUM_VALUE),r=W.getValueOrDefault(t.extrudedHeightReference,Ye.MINIMUM_VALUE,Ze.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Jt?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(Ye.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(Ye.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(Ye.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=W.getValueOrUndefined(t.rotation,Ye.MINIMUM_VALUE),s.granularity=W.getValueOrUndefined(t.granularity,Ye.MINIMUM_VALUE),s.stRotation=W.getValueOrUndefined(t.stRotation,Ye.MINIMUM_VALUE),s.numberOfVerticalLines=W.getValueOrUndefined(t.numberOfVerticalLines,Ye.MINIMUM_VALUE),s.offsetAttribute=ei.computeGeometryOffsetAttribute(n,i,o,r),s.height=ei.getGeometryHeight(n,i),o=ei.getGeometryExtrudedHeight(o,r),o===ei.CLAMP_TO_GROUND&&(o=Ii.getMinimumMaximumHeights(Fl.computeRectangle(s,EAe)).minimumTerrainHeight),s.extrudedHeight=o};tm.DynamicGeometryUpdater=dS;function dS(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(dS.prototype=Object.create(Ai.prototype),dS.prototype.constructor=dS);dS.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||Ai.prototype._isHidden.call(this,e,t,n)};dS.prototype._setOptions=function(e,t,n){let i=this._options,o=W.getValueOrUndefined(t.height,n),r=W.getValueOrDefault(t.heightReference,n,Ze.NONE),s=W.getValueOrUndefined(t.extrudedHeight,n),a=W.getValueOrDefault(t.extrudedHeightReference,n,Ze.NONE);l(s)&&!l(o)&&(o=0),i.center=W.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=W.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=W.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=W.getValueOrUndefined(t.rotation,n),i.granularity=W.getValueOrUndefined(t.granularity,n),i.stRotation=W.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=W.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=ei.computeGeometryOffsetAttribute(o,r,s,a),i.height=ei.getGeometryHeight(o,r),s=ei.getGeometryExtrudedHeight(s,a),s===ei.CLAMP_TO_GROUND&&(s=Ii.getMinimumMaximumHeights(Fl.computeRectangle(i,EAe)).minimumTerrainHeight),i.extrudedHeight=s};var VO=tm;var iit=new d,oit=new d,rit=new d,sit=new d,ait=new d,cit=new d(1,1,1),IAe=Math.cos,xAe=Math.sin;function Ng(e){e=e??V.EMPTY_OBJECT;let t=e.radii??cit,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??D.TWO_PI,r=e.minimumCone??0,s=e.maximumCone??D.PI,a=Math.round(e.stackPartitions??64),c=Math.round(e.slicePartitions??64),u=e.vertexFormat??Re.DEFAULT;this._radii=d.clone(t),this._innerRadii=d.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Re.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}Ng.packedLength=2*d.packedLength+Re.packedLength+7;Ng.pack=function(e,t,n){return n=n??0,d.pack(e._radii,t,n),n+=d.packedLength,d.pack(e._innerRadii,t,n),n+=d.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.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 bAe=new d,TAe=new d,SAe=new Re,Oy={radii:bAe,innerRadii:TAe,vertexFormat:SAe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};Ng.unpack=function(e,t,n){t=t??0;let i=d.unpack(e,t,bAe);t+=d.packedLength;let o=d.unpack(e,t,TAe);t+=d.packedLength;let r=Re.unpack(e,t,SAe);t+=Re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=d.clone(i,n._radii),n._innerRadii=d.clone(o,n._innerRadii),n._vertexFormat=Re.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=h,n._offsetAttribute=p===-1?void 0:p,n):(Oy.minimumClock=s,Oy.maximumClock=a,Oy.minimumCone=c,Oy.maximumCone=u,Oy.stackPartitions=f,Oy.slicePartitions=h,Oy.offsetAttribute=p===-1?void 0:p,new Ng(Oy))};Ng.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,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/D.TWO_PI),u=Math.round(u*Math.abs(s-r)/D.PI),c<2&&(c=2),u<2&&(u=2);let f,h,p=0,g=[r],m=[i];for(f=0;f<u;f++)g.push(r+f*(s-r)/(u-1));for(g.push(s),h=0;h<c;h++)m.push(i+h*(o-i)/(c-1));m.push(o);let _=g.length,y=m.length,C=0,E=1,I=n.x!==t.x||n.y!==t.y||n.z!==t.z,b=!1,S=!1,B=!1;I&&(E=2,r>0&&(b=!0,C+=c-1),s<Math.PI&&(S=!0,C+=c-1),(o-i)%D.TWO_PI?(B=!0,C+=(u-1)*2+1):C+=1);let v=y*_*E,P=new Float64Array(v*3),N=new Array(v).fill(!1),L=new Array(v).fill(!1),A=c*u*E,x=6*(A+C+1-(c+u)*E),T=Qe.createTypedArray(A,x),w=a.normal?new Float32Array(v*3):void 0,R=a.tangent?new Float32Array(v*3):void 0,O=a.bitangent?new Float32Array(v*3):void 0,k=a.st?new Float32Array(v*2):void 0,F=new Array(_),z=new Array(_);for(f=0;f<_;f++)F[f]=xAe(g[f]),z[f]=IAe(g[f]);let Q=new Array(y),H=new Array(y);for(h=0;h<y;h++)H[h]=IAe(m[h]),Q[h]=xAe(m[h]);for(f=0;f<_;f++)for(h=0;h<y;h++)P[p++]=t.x*F[f]*H[h],P[p++]=t.y*F[f]*Q[h],P[p++]=t.z*z[f];let j=v/2;if(I)for(f=0;f<_;f++)for(h=0;h<y;h++)P[p++]=n.x*F[f]*H[h],P[p++]=n.y*F[f]*Q[h],P[p++]=n.z*z[f],N[j]=!0,f>0&&f!==_-1&&h!==0&&h!==y-1&&(L[j]=!0),j++;p=0;let Z,Y;for(f=1;f<_-2;f++)for(Z=f*y,Y=(f+1)*y,h=1;h<y-2;h++)T[p++]=Y+h,T[p++]=Y+h+1,T[p++]=Z+h+1,T[p++]=Y+h,T[p++]=Z+h+1,T[p++]=Z+h;if(I){let tt=_*y;for(f=1;f<_-2;f++)for(Z=tt+f*y,Y=tt+(f+1)*y,h=1;h<y-2;h++)T[p++]=Y+h,T[p++]=Z+h,T[p++]=Z+h+1,T[p++]=Y+h,T[p++]=Z+h+1,T[p++]=Y+h+1}let $,J;if(I){if(b)for(J=_*y,f=1;f<y-2;f++)T[p++]=f,T[p++]=f+1,T[p++]=J+f+1,T[p++]=f,T[p++]=J+f+1,T[p++]=J+f;if(S)for($=_*y-y,J=_*y*E-y,f=1;f<y-2;f++)T[p++]=$+f+1,T[p++]=$+f,T[p++]=J+f,T[p++]=$+f+1,T[p++]=J+f,T[p++]=J+f+1}if(B){for(f=1;f<_-2;f++)J=y*_+y*f,$=y*f,T[p++]=J,T[p++]=$+y,T[p++]=$,T[p++]=J,T[p++]=J+y,T[p++]=$+y;for(f=1;f<_-2;f++)J=y*_+y*(f+1)-1,$=y*(f+1)-1,T[p++]=$+y,T[p++]=J,T[p++]=$,T[p++]=$+y,T[p++]=J+y,T[p++]=J}let pe=new Cn;a.position&&(pe.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:P}));let Ce=0,fe=0,ye=0,Ie=0,ve=v/2,be,ze=ne.fromCartesian3(t),We=ne.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<v;f++){be=N[f]?We:ze;let tt=d.fromArray(P,f*3,iit),Mt=be.geodeticSurfaceNormal(tt,oit);if(L[f]&&d.negate(Mt,Mt),a.st){let kt=U.negate(Mt,ait);k[Ce++]=Math.atan2(kt.y,kt.x)/D.TWO_PI+.5,k[Ce++]=Math.asin(Mt.z)/Math.PI+.5}if(a.normal&&(w[fe++]=Mt.x,w[fe++]=Mt.y,w[fe++]=Mt.z),a.tangent||a.bitangent){let kt=rit,Oe=0,_n;if(N[f]&&(Oe=ve),!b&&f>=Oe&&f<Oe+y*2?_n=d.UNIT_X:_n=d.UNIT_Z,d.cross(_n,Mt,kt),d.normalize(kt,kt),a.tangent&&(R[ye++]=kt.x,R[ye++]=kt.y,R[ye++]=kt.z),a.bitangent){let Ut=d.cross(Mt,kt,sit);d.normalize(Ut,Ut),O[Ie++]=Ut.x,O[Ie++]=Ut.y,O[Ie++]=Ut.z}}}a.st&&(pe.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:k})),a.normal&&(pe.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:w})),a.tangent&&(pe.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:R})),a.bitangent&&(pe.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:O}))}if(l(e._offsetAttribute)){let tt=P.length,Mt=e._offsetAttribute===dn.NONE?0:1,kt=new Uint8Array(tt/3).fill(Mt);pe.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:kt})}return new ht({attributes:pe,indices:T,primitiveType:Ne.TRIANGLES,boundingSphere:le.fromEllipsoid(ze),offsetAttribute:e._offsetAttribute})};var Yq;Ng.getUnitEllipsoid=function(){return l(Yq)||(Yq=Ng.createGeometry(new Ng({radii:new d(1,1,1),vertexFormat:Re.POSITION_ONLY}))),Yq};var Ca=Ng;var lit=new Jt(G.WHITE),qq=d.ZERO,Kq=new d,uit=new d,fit=new d,Xq=new G,dit=new d(1,1,1);function hit(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 gf(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new hit(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(gf.prototype=Object.create(gi.prototype),gf.prototype.constructor=gf);Object.defineProperties(gf.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});gf.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r,s=new wn(o&&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 Jt){let f;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(f=this._materialProperty.color.getValue(e,Xq)),l(f)||(f=G.WHITE),r=en.fromColor(f),u.color=r}return l(this._options.offsetAttribute)&&(u.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,qq,Kq))),new Rt({id:i,geometry:new Ca(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:u})};gf.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,Xq),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new wn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(r),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(s),offset:void 0};return l(this._options.offsetAttribute)&&(a.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,qq,Kq))),new Rt({id:i,geometry:new cf(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};gf.prototype._computeCenter=function(e,t){return W.getValueOrUndefined(this._entity.position,e,t)};gf.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||gi.prototype._isHidden.call(this,e,t)};gf.prototype._isDynamic=function(e,t){return!e.position.isConstant||!W.isConstant(e.orientation)||!t.radii.isConstant||!W.isConstant(t.innerRadii)||!W.isConstant(t.stackPartitions)||!W.isConstant(t.slicePartitions)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.minimumClock)||!W.isConstant(t.maximumClock)||!W.isConstant(t.minimumCone)||!W.isConstant(t.maximumCone)||!W.isConstant(t.subdivisions)};gf.prototype._setStaticOptions=function(e,t){let n=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Jt?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(Ye.MINIMUM_VALUE,i.radii),i.innerRadii=W.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=W.getValueOrUndefined(t.minimumClock,Ye.MINIMUM_VALUE),i.maximumClock=W.getValueOrUndefined(t.maximumClock,Ye.MINIMUM_VALUE),i.minimumCone=W.getValueOrUndefined(t.minimumCone,Ye.MINIMUM_VALUE),i.maximumCone=W.getValueOrUndefined(t.maximumCone,Ye.MINIMUM_VALUE),i.stackPartitions=W.getValueOrUndefined(t.stackPartitions,Ye.MINIMUM_VALUE),i.slicePartitions=W.getValueOrUndefined(t.slicePartitions,Ye.MINIMUM_VALUE),i.subdivisions=W.getValueOrUndefined(t.subdivisions,Ye.MINIMUM_VALUE),i.offsetAttribute=n!==Ze.NONE?dn.ALL:void 0};gf.prototype._onEntityPropertyChanged=IA;gf.DynamicGeometryUpdater=HO;function HO(e,t,n){Ai.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new M,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 d,this._material={}}l(Object.create)&&(HO.prototype=Object.create(Ai.prototype),HO.prototype.constructor=HO);HO.prototype.update=function(e){let t=this._entity,n=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!W.getValueOrDefault(n.show,e,!0)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let i=W.getValueOrUndefined(n.radii,e,uit),o=l(i)?t.computeModelMatrixForHeightReference(e,n.heightReference,i.z*.5,this._scene.ellipsoid,this._modelMatrix):void 0;if(!l(o)||!l(i)){l(this._primitive)&&(this._primitive.show=!1),l(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1);return}let r=W.getValueOrDefault(n.fill,e,!0),s=W.getValueOrDefault(n.outline,e,!1),a=W.getValueOrClonedDefault(n.outlineColor,e,G.BLACK,Xq),c=fr.getValue(e,n.material??lit,this._material),u=W.getValueOrUndefined(n.innerRadii,e,fit),f=W.getValueOrUndefined(n.minimumClock,e),h=W.getValueOrUndefined(n.maximumClock,e),p=W.getValueOrUndefined(n.minimumCone,e),g=W.getValueOrUndefined(n.maximumCone,e),m=W.getValueOrUndefined(n.stackPartitions,e),_=W.getValueOrUndefined(n.slicePartitions,e),y=W.getValueOrUndefined(n.subdivisions,e),C=W.getValueOrDefault(n.outlineWidth,e,1),E=W.getValueOrDefault(n.heightReference,e,Ze.NONE),I=E!==Ze.NONE?dn.ALL:void 0,b=this._scene.mode,S=b===oe.SCENE3D&&E===Ze.NONE,B=this._options,v=this._geometryUpdater.shadowsProperty.getValue(e),N=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),L=W.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,qq,Kq);if(!S||this._lastSceneMode!==b||!l(this._primitive)||B.stackPartitions!==m||B.slicePartitions!==_||l(u)&&!d.equals(B.innerRadii!==u)||B.minimumClock!==f||B.maximumClock!==h||B.minimumCone!==p||B.maximumCone!==g||B.subdivisions!==y||this._lastOutlineWidth!==C||B.offsetAttribute!==I){let x=this._primitives;x.removeAndDestroy(this._primitive),x.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=b,this._lastOutlineWidth=C,B.stackPartitions=m,B.slicePartitions=_,B.subdivisions=y,B.offsetAttribute=I,B.radii=d.clone(S?dit:i,B.radii),l(u)?S?B.innerRadii=d.fromElements(u.x/i.x,u.y/i.y,u.z/i.z,B.innerRadii):B.innerRadii=d.clone(u,B.innerRadii):B.innerRadii=void 0,B.minimumClock=f,B.maximumClock=h,B.minimumCone=p,B.maximumCone=g;let T=new yo({material:c,translucent:c.isTranslucent(),closed:!0});B.vertexFormat=T.vertexFormat;let w=this._geometryUpdater.createFillGeometryInstance(e,S,this._modelMatrix);this._primitive=x.add(new kn({geometryInstances:w,appearance:T,asynchronous:!1,shadows:v}));let R=this._geometryUpdater.createOutlineGeometryInstance(e,S,this._modelMatrix);this._outlinePrimitive=x.add(new kn({geometryInstances:R,appearance:new gn({flat:!0,translucent:R.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(C)}}),asynchronous:!1,shadows:v})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=G.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=N,this._lastOffset=d.clone(L,this._lastOffset)}else if(this._primitive.ready){let x=this._primitive,T=this._outlinePrimitive;x.show=!0,T.show=!0,x.appearance.material=c;let w=this._attributes;l(w)||(w=x.getGeometryInstanceAttributes(t),this._attributes=w),r!==this._lastShow&&(w.show=wn.toValue(r,w.show),this._lastShow=r);let R=this._outlineAttributes;l(R)||(R=T.getGeometryInstanceAttributes(t),this._outlineAttributes=R),s!==this._lastOutlineShow&&(R.show=wn.toValue(s,R.show),this._lastOutlineShow=s),G.equals(a,this._lastOutlineColor)||(R.color=en.toValue(a,R.color),G.clone(a,this._lastOutlineColor)),Gt.equals(N,this._lastDistanceDisplayCondition)||(w.distanceDisplayCondition=Kn.toValue(N,w.distanceDisplayCondition),R.distanceDisplayCondition=Kn.toValue(N,R.distanceDisplayCondition),Gt.clone(N,this._lastDistanceDisplayCondition)),d.equals(L,this._lastOffset)||(w.offset=uo.toValue(L,w.offset),R.offset=uo.toValue(L,w.offset),d.clone(L,this._lastOffset))}S&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=M.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};var WO=gf;function hS(e){e=e??V.EMPTY_OBJECT;let t=e.vertexFormat??Re.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}hS.packedLength=Re.packedLength;hS.pack=function(e,t,n){return n=n??0,Re.pack(e._vertexFormat,t,n),t};var wAe=new Re,mit={vertexFormat:wAe};hS.unpack=function(e,t,n){t=t??0;let i=Re.unpack(e,t,wAe);return l(n)?(n._vertexFormat=Re.clone(i,n._vertexFormat),n):new hS(mit)};var GV=new d(-.5,-.5,0),zV=new d(.5,.5,0);hS.createGeometry=function(e){let t=e._vertexFormat,n=new Cn,i,o;if(t.position){if(o=new Float64Array(4*3),o[0]=GV.x,o[1]=GV.y,o[2]=0,o[3]=zV.x,o[4]=GV.y,o[5]=0,o[6]=zV.x,o[7]=zV.y,o[8]=0,o[9]=GV.x,o[10]=zV.y,o[11]=0,n.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(2*3),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new ht({attributes:n,indices:i,primitiveType:Ne.TRIANGLES,boundingSphere:new le(d.ZERO,Math.sqrt(2))})};var jO=hS;function mS(){this._workerName="createPlaneOutlineGeometry"}mS.packedLength=0;mS.pack=function(e,t){return t};mS.unpack=function(e,t,n){return l(n)?n:new mS};var Fy=new d(-.5,-.5,0),VV=new d(.5,.5,0);mS.createGeometry=function(){let e=new Cn,t=new Uint16Array(4*2),n=new Float64Array(4*3);return n[0]=Fy.x,n[1]=Fy.y,n[2]=Fy.z,n[3]=VV.x,n[4]=Fy.y,n[5]=Fy.z,n[6]=VV.x,n[7]=VV.y,n[8]=Fy.z,n[9]=Fy.x,n[10]=VV.y,n[11]=Fy.z,e.position=new De({componentDatatype:q.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 ht({attributes:e,indices:t,primitiveType:Ne.LINES,boundingSphere:new le(d.ZERO,Math.sqrt(2))})};var YO=mS;var pit=new d,BAe=new G;function Ait(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function Pd(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new Ait(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(Pd.prototype=Object.create(gi.prototype),Pd.prototype.constructor=Pd);Pd.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Jt){let g;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(g=this._materialProperty.color.getValue(e,BAe)),l(g)||(g=G.WHITE),o=en.fromColor(g),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};let c=t.plane,u=this._options,f=t.computeModelMatrix(e),h=W.getValueOrDefault(c.plane,e,u.plane),p=W.getValueOrUndefined(c.dimensions,e,u.dimensions);return u.plane=h,u.dimensions=p,f=Jq(h,p,f,f),new Rt({id:t,geometry:new jO(this._options),modelMatrix:f,attributes:i})};Pd.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,BAe),o=this._distanceDisplayConditionProperty.getValue(e),r=t.plane,s=this._options,a=t.computeModelMatrix(e),c=W.getValueOrDefault(r.plane,e,s.plane),u=W.getValueOrUndefined(r.dimensions,e,s.dimensions);return s.plane=c,s.dimensions=u,a=Jq(c,u,a,a),new Rt({id:t,geometry:new YO,modelMatrix:a,attributes:{show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};Pd.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||gi.prototype._isHidden.call(this,e,t)};Pd.prototype._getIsClosed=function(e){return!1};Pd.prototype._isDynamic=function(e,t){return!e.position.isConstant||!W.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!W.isConstant(t.outlineWidth)};Pd.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Jt,i=this._options;i.vertexFormat=n?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(Ye.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(Ye.MINIMUM_VALUE,i.dimensions)};Pd.DynamicGeometryUpdater=pS;function pS(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(pS.prototype=Object.create(Ai.prototype),pS.prototype.constructor=pS);pS.prototype._isHidden=function(e,t,n){let i=this._options,o=W.getValueOrUndefined(e.position,n,pit);return!l(o)||!l(i.plane)||!l(i.dimensions)||Ai.prototype._isHidden.call(this,e,t,n)};pS.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=W.getValueOrDefault(t.plane,n,i.plane),i.dimensions=W.getValueOrUndefined(t.dimensions,n,i.dimensions)};var git=new d,_it=new d,yit=new d,Cit=new d,Eit=new X,Iit=new X,xit=new M;function Jq(e,t,n,i){let o=e.normal,r=e.distance,s=d.multiplyByScalar(o,-r,yit),a=d.clone(d.UNIT_Z,_it);D.equalsEpsilon(Math.abs(d.dot(a,o)),1,D.EPSILON8)&&(a=d.clone(d.UNIT_Y,a));let c=d.cross(a,o,git);a=d.cross(o,c,a),d.normalize(c,c),d.normalize(a,a);let u=Eit;X.setColumn(u,0,c,u),X.setColumn(u,1,a,u),X.setColumn(u,2,o,u);let f=d.fromElements(t.x,t.y,1,Cit),h=X.multiplyByScale(u,f,Iit),p=M.fromRotationTranslation(h,s,xit);return M.multiplyTransformation(n,p,i)}Pd.createPrimitiveMatrix=Jq;var qO=Pd;var bit=new d,Tit=new qe,Sit=new U,wit=new U,Bit=new d,Dit=new d,vit=new d,KO=new d,Pit=new d,Rit=new d,DAe=new Fe,Mit=new X,Nit=new X,Lit=new d;function Oit(e,t,n,i,o,r,s,a,c){let u=e.positions,f=yi.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let h=Qe.createTypedArray(u.length,f.length);h.set(f);let p=Mit;if(i!==0){let A=Fe.fromAxisAngle(s,i,DAe);if(p=X.fromQuaternion(A,p),t.tangent||t.bitangent){A=Fe.fromAxisAngle(s,-i,DAe);let x=X.fromQuaternion(A,Nit);a=d.normalize(X.multiplyByVector(x,a,a),a),t.bitangent&&(c=d.normalize(d.cross(s,a,c),c))}}else p=X.clone(X.IDENTITY,p);let g=wit;t.st&&(g.x=n.x,g.y=n.y);let m=u.length,_=m*3,y=new Float64Array(_),C=t.normal?new Float32Array(_):void 0,E=t.tangent?new Float32Array(_):void 0,I=t.bitangent?new Float32Array(_):void 0,b=t.st?new Float32Array(m*2):void 0,S=0,B=0,v=0,P=0,N=0;for(let A=0;A<m;A++){let x=u[A];if(y[S++]=x.x,y[S++]=x.y,y[S++]=x.z,t.st)if(l(o)&&o.positions.length===m)b[N++]=o.positions[A].x,b[N++]=o.positions[A].y;else{let T=X.multiplyByVector(p,x,bit),w=r(T,Sit);U.subtract(w,g,w);let R=D.clamp(w.x/n.width,0,1),O=D.clamp(w.y/n.height,0,1);b[N++]=R,b[N++]=O}t.normal&&(C[B++]=s.x,C[B++]=s.y,C[B++]=s.z),t.tangent&&(E[P++]=a.x,E[P++]=a.y,E[P++]=a.z),t.bitangent&&(I[v++]=c.x,I[v++]=c.y,I[v++]=c.z)}let L=new Cn;return t.position&&(L.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:y})),t.normal&&(L.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:C})),t.tangent&&(L.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:E})),t.bitangent&&(L.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:I})),t.st&&(L.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:b})),new ht({attributes:L,indices:h,primitiveType:Ne.TRIANGLES})}function $0(e){e=e??V.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Re.DEFAULT;this._vertexFormat=Re.clone(i),this._polygonHierarchy=t,this._stRotation=e.stRotation??0,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Zn.computeHierarchyPackedLength(t,d)+Re.packedLength+ne.packedLength+(l(n)?Zn.computeHierarchyPackedLength(n,U):1)+2}$0.fromPositions=function(e){e=e??V.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new $0(t)};$0.pack=function(e,t,n){return n=n??0,n=Zn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Zn.packPolygonHierarchy(e._textureCoordinates,t,n,U):t[n++]=-1,t[n++]=e.packedLength,t};var Fit=ne.clone(ne.UNIT_SPHERE),Qit=new Re,kit={polygonHierarchy:{}};$0.unpack=function(e,t,n){t=t??0;let i=Zn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=ne.unpack(e,t,Fit);t+=ne.packedLength;let r=Re.unpack(e,t,Qit);t+=Re.packedLength;let s=e[t++],a=e[t]===-1?void 0:Zn.unpackPolygonHierarchy(e,t,U);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new $0(kit)),n._polygonHierarchy=i,n._ellipsoid=ne.clone(o,n._ellipsoid),n._vertexFormat=Re.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};$0.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=Ro(s,d.equalsEpsilon,!0),s.length<3)return;let a=Bit,c=Dit,u=vit,f=Pit,h=Rit;if(!dg.computeProjectTo2DArguments(s,KO,f,h))return;if(a=d.cross(f,h,a),a=d.normalize(a,a),!d.equalsEpsilon(KO,d.ZERO,D.EPSILON6)){let N=e._ellipsoid.geodeticSurfaceNormal(KO,Lit);d.dot(a,N)<0&&(a=d.negate(a,a),f=d.negate(f,f))}let g=dg.createProjectPointsTo2DFunction(KO,f,h),m=dg.createProjectPointTo2DFunction(KO,f,h);t.tangent&&(c=d.clone(f,c)),t.bitangent&&(u=d.clone(h,u));let _=Zn.polygonsFromHierarchy(n,r,g,!1),y=_.hierarchy,C=_.polygons,E=function(N){return N},I=r?Zn.polygonsFromHierarchy(o,!0,E,!1).polygons:void 0;if(y.length===0)return;s=y[0].outerRing;let b=le.fromPoints(s),S=Zn.computeBoundingRectangle(a,m,s,i,Tit),B=[];for(let N=0;N<C.length;N++){let L=new Rt({geometry:Oit(C[N],t,S,i,r?I[N]:void 0,m,a,c,u)});B.push(L)}let v=Vn.combineInstances(B)[0];v.attributes.position.values=new Float64Array(v.attributes.position.values),v.indices=Qe.createTypedArray(v.attributes.position.values.length/3,v.indices);let P=v.attributes;return t.position||delete P.position,new ht({attributes:P,indices:v.indices,primitiveType:v.primitiveType,boundingSphere:b})};var XO=$0;var vAe=[],HV=[];function Uit(e,t,n,i,o){let s=ms.fromPoints(t,e).projectPointsOntoPlane(t,vAe);yi.computeWindingOrder2D(s)===Bs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,h=0;if(i)for(c=new Float64Array(f*2*3),u=0;u<f;u++){let m=t[u],_=t[(u+1)%f];c[h++]=m.x,c[h++]=m.y,c[h++]=m.z,c[h++]=_.x,c[h++]=_.y,c[h++]=_.z}else{let m=0;if(o===ln.GEODESIC)for(u=0;u<f;u++)m+=Zn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===ln.RHUMB)for(u=0;u<f;u++)m+=Zn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(m*3),u=0;u<f;u++){let _;o===ln.GEODESIC?_=Zn.subdivideLine(t[u],t[(u+1)%f],n,HV):o===ln.RHUMB&&(_=Zn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,HV));let y=_.length;for(let C=0;C<y;++C)c[h++]=_[C]}}f=c.length/3;let p=f*2,g=Qe.createTypedArray(f,p);for(h=0,u=0;u<f-1;u++)g[h++]=u,g[h++]=u+1;return g[h++]=f-1,g[h++]=0,new Rt({geometry:new ht({attributes:new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:c})}),indices:g,primitiveType:Ne.LINES})})}function Git(e,t,n,i,o){let s=ms.fromPoints(t,e).projectPointsOntoPlane(t,vAe);yi.computeWindingOrder2D(s)===Bs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,h=new Array(f),p=0;if(i)for(c=new Float64Array(f*2*3*2),u=0;u<f;++u){h[u]=p/3;let y=t[u],C=t[(u+1)%f];c[p++]=y.x,c[p++]=y.y,c[p++]=y.z,c[p++]=C.x,c[p++]=C.y,c[p++]=C.z}else{let y=0;if(o===ln.GEODESIC)for(u=0;u<f;u++)y+=Zn.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===ln.RHUMB)for(u=0;u<f;u++)y+=Zn.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(y*3*2),u=0;u<f;++u){h[u]=p/3;let C;o===ln.GEODESIC?C=Zn.subdivideLine(t[u],t[(u+1)%f],n,HV):o===ln.RHUMB&&(C=Zn.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,HV));let E=C.length;for(let I=0;I<E;++I)c[p++]=C[I]}}f=c.length/(3*2);let g=h.length,m=(f*2+g)*2,_=Qe.createTypedArray(f+g,m);for(p=0,u=0;u<f;++u)_[p++]=u,_[p++]=(u+1)%f,_[p++]=u+f,_[p++]=(u+1)%f+f;for(u=0;u<g;u++){let y=h[u];_[p++]=y,_[p++]=y+f}return new Rt({geometry:new ht({attributes:new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:c})}),indices:_,primitiveType:Ne.LINES})})}function eI(e){let t=e.polygonHierarchy,n=e.ellipsoid??ne.default,i=e.granularity??D.RADIANS_PER_DEGREE,o=e.perPositionHeight??!1,r=o&&l(e.extrudedHeight),s=e.arcType??ln.GEODESIC,a=e.height??0,c=e.extrudedHeight??a;if(!r){let u=Math.max(a,c);c=Math.min(a,c),a=u}this._ellipsoid=ne.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=Zn.computeHierarchyPackedLength(t,d)+ne.packedLength+8}eI.pack=function(e,t,n){return n=n??0,n=Zn.packPolygonHierarchy(e._polygonHierarchy,t,n,d),ne.pack(e._ellipsoid,t,n),n+=ne.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 zit=ne.clone(ne.UNIT_SPHERE),Vit={polygonHierarchy:{}};eI.unpack=function(e,t,n){t=t??0;let i=Zn.unpackPolygonHierarchy(e,t,d);t=i.startingIndex,delete i.startingIndex;let o=ne.unpack(e,t,zit);t+=ne.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,u=e[t++]===1,f=e[t++],h=e[t++],p=e[t];return l(n)||(n=new eI(Vit)),n._polygonHierarchy=i,n._ellipsoid=ne.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=c,n._arcType=f,n._offsetAttribute=h===-1?void 0:h,n.packedLength=p,n};eI.fromPositions=function(e){e=e??V.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 eI(t)};eI.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Zn.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],u=D.chordLength(n,t.maximumRadius),f=e._height,h=e._extrudedHeight,p=e._perPositionHeightExtrude||!D.equalsEpsilon(f,h,0,D.EPSILON2),g,m;if(p)for(m=0;m<s.length;m++){if(a=Git(t,s[m],u,o,r),a.geometry=Zn.scaleToGeodeticHeightExtruded(a.geometry,f,h,t,o),l(e._offsetAttribute)){let C=a.geometry.attributes.position.values.length/3,E=new Uint8Array(C);e._offsetAttribute===dn.TOP?E=E.fill(1,0,C/2):(g=e._offsetAttribute===dn.NONE?0:1,E=E.fill(g)),a.geometry.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}c.push(a)}else for(m=0;m<s.length;m++){if(a=Uit(t,s[m],u,o,r),a.geometry.attributes.position.values=yi.scaleToGeodeticHeight(a.geometry.attributes.position.values,f,t,!o),l(e._offsetAttribute)){let C=a.geometry.attributes.position.values.length;g=e._offsetAttribute===dn.NONE?0:1;let E=new Uint8Array(C/3).fill(g);a.geometry.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}c.push(a)}let _=Vn.combineInstances(c)[0],y=le.fromVertices(_.attributes.position.values);return new ht({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:y,offsetAttribute:e._offsetAttribute})};var JO=eI;var PAe="Entity polygons cannot have both height and perPositionHeight. height will be ignored",RAe="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",MAe=new G,NAe=d.ZERO,LAe=new d,OAe=new ae,Hit=[],Wit=new U;function jit(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 _f(e,t){ei.call(this,{entity:e,scene:t,geometryOptions:new jit(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(_f.prototype=Object.create(ei.prototype),_f.prototype.constructor=_f);_f.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new wn(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 Jt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,MAe)),l(s)||(s=G.WHITE),o.color=en.fromColor(s)}l(i.offsetAttribute)&&(o.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,NAe,LAe)));let r;return i.perPositionHeight&&!l(i.extrudedHeight)?r=new XO(i):r=new FA(i),new Rt({id:t,geometry:r,attributes:o})};_f.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,MAe),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(o),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};l(i.offsetAttribute)&&(s.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,NAe,LAe)));let a;return i.perPositionHeight&&!l(i.extrudedHeight)?a=new xd(i):a=new JO(i),new Rt({id:t,geometry:a,attributes:s})};_f.prototype._computeCenter=function(e,t){let n=W.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!l(n))return;let i=n.positions;if(i.length===0)return;let o=this._scene.ellipsoid,r=ms.fromPoints(i,o),s=r.projectPointsOntoPlane(i,Hit),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],_=g.x*m.y-m.x*g.y,y=U.add(g,m,Wit);y=U.multiplyByScalar(y,_,y),f=U.add(f,y,f),c+=_}let h=1/(c*3);return f=U.multiplyByScalar(f,h,f),r.projectPointOntoEllipsoid(f,t)};_f.prototype._isHidden=function(e,t){return!l(t.hierarchy)||gi.prototype._isHidden.call(this,e,t)};_f.prototype._isOnTerrain=function(e,t){let n=ei.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=l(i)&&(i.isConstant?i.getValue(Ye.MINIMUM_VALUE):!0);return n&&!o};_f.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!W.isConstant(t.height)||!W.isConstant(t.extrudedHeight)||!W.isConstant(t.granularity)||!W.isConstant(t.stRotation)||!W.isConstant(t.textureCoordinates)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.perPositionHeight)||!W.isConstant(t.closeTop)||!W.isConstant(t.closeBottom)||!W.isConstant(t.zIndex)||!W.isConstant(t.arcType)||this._onTerrain&&!W.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Jt)};_f.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Jt,i=this._options;i.vertexFormat=n?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(Ye.MINIMUM_VALUE),r=W.getValueOrUndefined(t.height,Ye.MINIMUM_VALUE),s=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),a=W.getValueOrUndefined(t.extrudedHeight,Ye.MINIMUM_VALUE),c=W.getValueOrDefault(t.extrudedHeightReference,Ye.MINIMUM_VALUE,Ze.NONE),u=W.getValueOrDefault(t.perPositionHeight,Ye.MINIMUM_VALUE,!1);r=ei.getGeometryHeight(r,s);let f;if(u?(l(r)&&(r=void 0,yt(PAe)),s!==Ze.NONE&&u&&(r=void 0,yt(RAe))):(l(a)&&!l(r)&&(r=0),f=ei.computeGeometryOffsetAttribute(r,s,a,c)),i.polygonHierarchy=o,i.granularity=W.getValueOrUndefined(t.granularity,Ye.MINIMUM_VALUE),i.stRotation=W.getValueOrUndefined(t.stRotation,Ye.MINIMUM_VALUE),i.perPositionHeight=u,i.closeTop=W.getValueOrDefault(t.closeTop,Ye.MINIMUM_VALUE,!0),i.closeBottom=W.getValueOrDefault(t.closeBottom,Ye.MINIMUM_VALUE,!0),i.offsetAttribute=f,i.height=r,i.arcType=W.getValueOrDefault(t.arcType,Ye.MINIMUM_VALUE,ln.GEODESIC),i.textureCoordinates=W.getValueOrUndefined(t.textureCoordinates,Ye.MINIMUM_VALUE),a=ei.getGeometryExtrudedHeight(a,c),a===ei.CLAMP_TO_GROUND){let h=FA.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,OAe);a=Ii.getMinimumMaximumHeights(h).minimumTerrainHeight}i.extrudedHeight=a};_f.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)};_f.DynamicGeometryUpdater=AS;function AS(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(AS.prototype=Object.create(Ai.prototype),AS.prototype.constructor=AS);AS.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||Ai.prototype._isHidden.call(this,e,t,n)};AS.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=W.getValueOrUndefined(t.hierarchy,n);let o=W.getValueOrUndefined(t.height,n),r=W.getValueOrDefault(t.heightReference,n,Ze.NONE),s=W.getValueOrDefault(t.extrudedHeightReference,n,Ze.NONE),a=W.getValueOrUndefined(t.extrudedHeight,n),c=W.getValueOrUndefined(t.perPositionHeight,n);o=ei.getGeometryHeight(o,s);let u;if(c?(l(o)&&(o=void 0,yt(PAe)),r!==Ze.NONE&&c&&(o=void 0,yt(RAe))):(l(a)&&!l(o)&&(o=0),u=ei.computeGeometryOffsetAttribute(o,r,a,s)),i.granularity=W.getValueOrUndefined(t.granularity,n),i.stRotation=W.getValueOrUndefined(t.stRotation,n),i.textureCoordinates=W.getValueOrUndefined(t.textureCoordinates,n),i.perPositionHeight=W.getValueOrUndefined(t.perPositionHeight,n),i.closeTop=W.getValueOrDefault(t.closeTop,n,!0),i.closeBottom=W.getValueOrDefault(t.closeBottom,n,!0),i.offsetAttribute=u,i.height=o,i.arcType=W.getValueOrDefault(t.arcType,n,ln.GEODESIC),a=ei.getGeometryExtrudedHeight(a,s),a===ei.CLAMP_TO_GROUND){let f=FA.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,OAe);a=Ii.getMinimumMaximumHeights(f).minimumTerrainHeight}i.extrudedHeight=a};var ZO=_f;function Yit(e,t,n,i){let o=new Cn;i.position&&(o.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=yi.triangulate(t),u=(a-1)*r*6+c.length*2,f=Qe.createTypedArray(s,u),h,p,g,m,_,y,C=r*2,E=0;for(h=0;h<a-1;h++){for(p=0;p<r-1;p++)g=p*2+h*r*2,y=g+C,m=g+1,_=m+C,f[E++]=m,f[E++]=g,f[E++]=_,f[E++]=_,f[E++]=g,f[E++]=y;g=r*2-2+h*r*2,m=g+1,_=m+C,y=g+C,f[E++]=m,f[E++]=g,f[E++]=_,f[E++]=_,f[E++]=g,f[E++]=y}if(i.st||i.tangent||i.bitangent){let S=new Float32Array(s*2),B=1/(a-1),v=1/n.height,P=n.height/2,N,L,A=0;for(h=0;h<a;h++){for(N=h*B,L=v*(t[0].y+P),S[A++]=N,S[A++]=L,p=1;p<r;p++)L=v*(t[p].y+P),S[A++]=N,S[A++]=L,S[A++]=N,S[A++]=L;L=v*(t[0].y+P),S[A++]=N,S[A++]=L}for(p=0;p<r;p++)N=0,L=v*(t[p].y+P),S[A++]=N,S[A++]=L;for(p=0;p<r;p++)N=(a-1)*B,L=v*(t[p].y+P),S[A++]=N,S[A++]=L;o.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:new Float32Array(S)})}let I=s-r*2;for(h=0;h<c.length;h+=3){let S=c[h]+I,B=c[h+1]+I,v=c[h+2]+I;f[E++]=S,f[E++]=B,f[E++]=v,f[E++]=v+r,f[E++]=B+r,f[E++]=S+r}let b=new ht({attributes:o,indices:f,boundingSphere:le.fromVertices(e),primitiveType:Ne.TRIANGLES});if(i.normal&&(b=Vn.computeNormal(b)),i.tangent||i.bitangent){try{b=Vn.computeTangentAndBitangent(b)}catch{yt("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(b.attributes.tangent=void 0),i.bitangent||(b.attributes.bitangent=void 0),i.st||(b.attributes.st=void 0)}return b}function eF(e){e=e??V.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._cornerType=e.cornerType??Hi.ROUNDED,this._vertexFormat=Re.clone(e.vertexFormat??Re.DEFAULT),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*d.packedLength;i+=1+n.length*U.packedLength,this.packedLength=i+ne.packedLength+Re.packedLength+2}eF.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var FAe=ne.clone(ne.UNIT_SPHERE),QAe=new Re,$O={polylinePositions:void 0,shapePositions:void 0,ellipsoid:FAe,vertexFormat:QAe,cornerType:void 0,granularity:void 0};eF.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ne.unpack(e,t,FAe);t+=ne.packedLength;let c=Re.unpack(e,t,QAe);t+=Re.packedLength;let u=e[t++],f=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=ne.clone(a,n._ellipsoid),n._vertexFormat=Re.clone(c,n._vertexFormat),n._cornerType=u,n._granularity=f,n):($O.polylinePositions=r,$O.shapePositions=s,$O.cornerType=u,$O.granularity=f,new eF($O))};var qit=new qe;eF.createGeometry=function(e){let t=e._positions,n=Ro(t,d.equalsEpsilon),i=e._shape;if(i=qh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;yi.computeWindingOrder2D(i)===Bs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,qit),r=qh.computePositions(n,i,o,e,!0);return Yit(r,i,o,e._vertexFormat)};var tF=eF;function Kit(e,t){let n=new Cn;n.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Qe.createTypedArray(o,2*i*(s+1)),c,u,f=0;c=0;let h=c*i;for(u=0;u<i-1;u++)a[f++]=u+h,a[f++]=u+h+1;for(a[f++]=i-1+h,a[f++]=h,c=s-1,h=c*i,u=0;u<i-1;u++)a[f++]=u+h,a[f++]=u+h+1;for(a[f++]=i-1+h,a[f++]=h,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 ht({attributes:n,indices:Qe.createTypedArray(o,a),boundingSphere:le.fromVertices(e),primitiveType:Ne.LINES})}function iF(e){e=e??V.EMPTY_OBJECT;let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._cornerType=e.cornerType??Hi.ROUNDED,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*d.packedLength;i+=1+n.length*U.packedLength,this.packedLength=i+ne.packedLength+2}iF.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var kAe=ne.clone(ne.UNIT_SPHERE),nF={polylinePositions:void 0,shapePositions:void 0,ellipsoid:kAe,height:void 0,cornerType:void 0,granularity:void 0};iF.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ne.unpack(e,t,kAe);t+=ne.packedLength;let c=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=ne.clone(a,n._ellipsoid),n._cornerType=c,n._granularity=u,n):(nF.polylinePositions=r,nF.shapePositions=s,nF.cornerType=c,nF.granularity=u,new iF(nF))};var Xit=new qe;iF.createGeometry=function(e){let t=e._positions,n=Ro(t,d.equalsEpsilon),i=e._shape;if(i=qh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;yi.computeWindingOrder2D(i)===Bs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,Xit),r=qh.computePositions(n,i,o,e,!1);return Kit(r,i)};var oF=iF;var UAe=new G;function Jit(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 mp(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new Jit(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(mp.prototype=Object.create(gi.prototype),mp.prototype.constructor=mp);mp.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Jt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,UAe)),l(c)||(c=G.WHITE),o=en.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Rt({id:t,geometry:new tF(this._options),attributes:i})};mp.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,UAe),o=this._distanceDisplayConditionProperty.getValue(e);return new Rt({id:t,geometry:new oF(this._options),attributes:{show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};mp.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||gi.prototype._isHidden.call(this,e,t)};mp.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!W.isConstant(t.granularity)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.cornerType)};mp.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Jt;o.vertexFormat=r?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(Ye.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(Ye.MINIMUM_VALUE,o.shape),o.granularity=l(n)?n.getValue(Ye.MINIMUM_VALUE):void 0,o.cornerType=l(i)?i.getValue(Ye.MINIMUM_VALUE):void 0};mp.DynamicGeometryUpdater=gS;function gS(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(gS.prototype=Object.create(Ai.prototype),gS.prototype.constructor=gS);gS.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||Ai.prototype._isHidden.call(this,e,t,n)};gS.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=W.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=W.getValueOrUndefined(t.shape,n),i.granularity=W.getValueOrUndefined(t.granularity,n),i.cornerType=W.getValueOrUndefined(t.cornerType,n)};var rF=mp;var Zq=new d,VAe=new d,HAe=new d,WAe=new d,jAe=new ae,Zit=new U,$it=new le,eot=new le;function YAe(e,t){let n=new ht({attributes:new Cn,primitiveType:Ne.TRIANGLES});return n.attributes.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function tot(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0,c=0,u=WAe,f=HAe,h=VAe;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let g=d.fromArray(e,p,Zq),m=c+1,_=c+2;h=n.geodeticSurfaceNormal(g,h),(t.tangent||t.bitangent)&&(d.cross(d.UNIT_Z,h,f),X.multiplyByVector(i,f,f),d.normalize(f,f),t.bitangent&&d.normalize(d.cross(h,f,u),u)),t.normal&&(r[c]=h.x,r[m]=h.y,r[_]=h.z),t.tangent&&(s[c]=f.x,s[m]=f.y,s[_]=f.z),t.bitangent&&(a[c]=u.x,a[m]=u.y,a[_]=u.z),c+=3}return YAe(t,{positions:e,normals:r,tangents:s,bitangents:a})}var $q=new d,qAe=new d;function not(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,u=0,f=!0,h=WAe,p=HAe,g=VAe;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<i;m+=6){let _=d.fromArray(e,m,Zq),y=d.fromArray(e,(m+6)%i,$q);if(f){let C=d.fromArray(e,(m+3)%i,qAe);d.subtract(y,_,y),d.subtract(C,_,C),g=d.normalize(d.cross(C,y,g),g),f=!1}d.equalsEpsilon(y,_,D.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(_,h),t.tangent&&(p=d.normalize(d.cross(h,g,p),p))),t.normal&&(o[a++]=g.x,o[a++]=g.y,o[a++]=g.z,o[a++]=g.x,o[a++]=g.y,o[a++]=g.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(s[u++]=h.x,s[u++]=h.y,s[u++]=h.z,s[u++]=h.x,s[u++]=h.y,s[u++]=h.z)}return YAe(t,{positions:e,normals:o,tangents:r,bitangents:s})}function KAe(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,c=0,u=o,f=o,h=0;s&&(c=1,f-=1,h+=1),a&&(u-=1,f-=1,h+=1),h+=r*f;let p=n.position?new Float64Array(h*3):void 0,g=n.st?new Float32Array(h*2):void 0,m=0,_=0,y=Zq,C=Zit,E=Number.MAX_VALUE,I=Number.MAX_VALUE,b=-Number.MAX_VALUE,S=-Number.MAX_VALUE;for(let x=c;x<u;++x)for(let T=0;T<r;++T)qs.computePosition(t,i,n.st,x,T,y,C),p[m++]=y.x,p[m++]=y.y,p[m++]=y.z,n.st&&(g[_++]=C.x,g[_++]=C.y,E=Math.min(E,C.x),I=Math.min(I,C.y),b=Math.max(b,C.x),S=Math.max(S,C.y));if(s&&(qs.computePosition(t,i,n.st,0,0,y,C),p[m++]=y.x,p[m++]=y.y,p[m++]=y.z,n.st&&(g[_++]=C.x,g[_++]=C.y,E=C.x,I=C.y,b=C.x,S=C.y)),a&&(qs.computePosition(t,i,n.st,o-1,0,y,C),p[m++]=y.x,p[m++]=y.y,p[m]=y.z,n.st&&(g[_++]=C.x,g[_]=C.y,E=Math.min(E,C.x),I=Math.min(I,C.y),b=Math.max(b,C.x),S=Math.max(S,C.y))),n.st&&(E<0||I<0||b>1||S>1))for(let x=0;x<g.length;x+=2)g[x]=(g[x]-E)/(b-E),g[x+1]=(g[x+1]-I)/(S-I);let B=tot(p,n,i,t.tangentRotationMatrix),v=6*(r-1)*(f-1);s&&(v+=3*(r-1)),a&&(v+=3*(r-1));let P=Qe.createTypedArray(h,v),N=0,L=0,A;for(A=0;A<f-1;++A){for(let x=0;x<r-1;++x){let T=N,w=T+r,R=w+1,O=T+1;P[L++]=T,P[L++]=w,P[L++]=O,P[L++]=O,P[L++]=w,P[L++]=R,++N}++N}if(s||a){let x=h-1,T=h-1;s&&a&&(x=h-2);let w,R;if(N=0,s)for(A=0;A<r-1;A++)w=N,R=w+1,P[L++]=x,P[L++]=w,P[L++]=R,++N;if(a)for(N=(f-1)*r,A=0;A<r-1;A++)w=N,R=w+1,P[L++]=w,P[L++]=T,P[L++]=R,++N}return B.indices=P,n.st&&(B.attributes.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:g})),B}function _S(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function yS(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 e7=new Re;function iot(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,c=t.height,u=t.width,f;if(n){let Oe=Re.clone(o,e7);Oe.normal=!0,e._vertexFormat=Oe}let h=KAe(e,t);n&&(e._vertexFormat=o);let p=yi.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);p=new Float64Array(p);let g=p.length,m=g*2,_=new Float64Array(m);_.set(p);let y=yi.scaleToGeodeticHeight(h.attributes.position.values,r,a);_.set(y,g),h.attributes.position.values=_;let C=o.normal?new Float32Array(m):void 0,E=o.tangent?new Float32Array(m):void 0,I=o.bitangent?new Float32Array(m):void 0,b=o.st?new Float32Array(m/3*2):void 0,S,B;if(o.normal){for(B=h.attributes.normal.values,C.set(B),f=0;f<g;f++)B[f]=-B[f];C.set(B,g),h.attributes.normal.values=C}if(n){B=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);let Oe=new Float32Array(m);for(f=0;f<g;f++)B[f]=-B[f];Oe.set(B,g),h.attributes.extrudeDirection=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:Oe})}let v,P=l(i);if(P){let Oe=g/3*2,_n=new Uint8Array(Oe);i===dn.TOP?_n=_n.fill(1,0,Oe/2):(v=i===dn.NONE?0:1,_n=_n.fill(v)),h.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:_n})}if(o.tangent){let Oe=h.attributes.tangent.values;for(E.set(Oe),f=0;f<g;f++)Oe[f]=-Oe[f];E.set(Oe,g),h.attributes.tangent.values=E}if(o.bitangent){let Oe=h.attributes.bitangent.values;I.set(Oe),I.set(Oe,g),h.attributes.bitangent.values=I}o.st&&(S=h.attributes.st.values,b.set(S),b.set(S,g/3*2),h.attributes.st.values=b);let N=h.indices,L=N.length,A=g/3,x=Qe.createTypedArray(m/3,L*2);for(x.set(N),f=0;f<L;f+=3)x[f+L]=N[f+2]+A,x[f+1+L]=N[f+1]+A,x[f+2+L]=N[f]+A;h.indices=x;let T=t.northCap,w=t.southCap,R=c,O=2,k=0,F=4,z=4;T&&(O-=1,R-=1,k+=1,F-=2,z-=1),w&&(O-=1,R-=1,k+=1,F-=2,z-=1),k+=O*u+2*R-F;let Q=(k+z)*2,H=new Float64Array(Q*3),j=n?new Float32Array(Q*3):void 0,Z=P?new Uint8Array(Q):void 0,Y=o.st?new Float32Array(Q*2):void 0,$=i===dn.TOP;P&&!$&&(v=i===dn.ALL?1:0,Z=Z.fill(v));let J=0,pe=0,Ce=0,fe=0,ye=u*R,Ie;for(f=0;f<ye;f+=u)Ie=f*3,H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,f*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1);if(w){let Oe=T?ye+1:ye;for(Ie=Oe*3,f=0;f<2;f++)H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,Oe*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1)}else for(f=ye-u;f<ye;f++)Ie=f*3,H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,f*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1);for(f=ye-1;f>0;f-=u)Ie=f*3,H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,f*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1);if(T){let Oe=ye;for(Ie=Oe*3,f=0;f<2;f++)H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,Oe*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1)}else for(f=u-1;f>=0;f--)Ie=f*3,H=_S(H,J,Ie,p,y),J+=6,o.st&&(Y=yS(Y,pe,f*2,S),pe+=4),n&&(Ce+=3,j[Ce++]=B[Ie],j[Ce++]=B[Ie+1],j[Ce++]=B[Ie+2]),$&&(Z[fe++]=1,fe+=1);let ve=not(H,o,a);o.st&&(ve.attributes.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:Y})),n&&(ve.attributes.extrudeDirection=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:j})),P&&(ve.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let be=Qe.createTypedArray(Q,k*6),ze,We,tt,Mt;g=H.length/3;let kt=0;for(f=0;f<g-1;f+=2){ze=f,Mt=(ze+2)%g;let Oe=d.fromArray(H,ze*3,$q),_n=d.fromArray(H,Mt*3,qAe);d.equalsEpsilon(Oe,_n,D.EPSILON10)||(We=(ze+1)%g,tt=(We+2)%g,be[kt++]=ze,be[kt++]=We,be[kt++]=Mt,be[kt++]=Mt,be[kt++]=We,be[kt++]=tt)}return ve.indices=be,ve=Vn.combineInstances([new Rt({geometry:h}),new Rt({geometry:ve})]),ve[0]}var oot=[new d,new d,new d,new d],XAe=new me,rot=new me;function t7(e,t,n,i,o){if(n===0)return ae.clone(e,o);let r=qs.computeOptions(e,t,n,0,jAe,XAe),s=r.height,a=r.width,c=oot;return qs.computePosition(r,i,!1,0,0,c[0]),qs.computePosition(r,i,!1,0,a-1,c[1]),qs.computePosition(r,i,!1,s-1,0,c[2]),qs.computePosition(r,i,!1,s-1,a-1,c[3]),ae.fromCartesianArray(c,i,o)}function pp(e){e=e??V.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=ae.clone(t),this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._surfaceHeight=Math.max(n,i),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._vertexFormat=Re.clone(e.vertexFormat??Re.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}pp.packedLength=ae.packedLength+ne.packedLength+Re.packedLength+7;pp.pack=function(e,t,n){return n=n??0,ae.pack(e._rectangle,t,n),n+=ae.packedLength,ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.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 JAe=new ae,ZAe=ne.clone(ne.UNIT_SPHERE),Qy={rectangle:JAe,ellipsoid:ZAe,vertexFormat:e7,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};pp.unpack=function(e,t,n){t=t??0;let i=ae.unpack(e,t,JAe);t+=ae.packedLength;let o=ne.unpack(e,t,ZAe);t+=ne.packedLength;let r=Re.unpack(e,t,e7);t+=Re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],h=e[t++]===1,p=e[t];return l(n)?(n._rectangle=ae.clone(i,n._rectangle),n._ellipsoid=ne.clone(o,n._ellipsoid),n._vertexFormat=Re.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=h,n._offsetAttribute=p===-1?void 0:p,n):(Qy.granularity=s,Qy.height=a,Qy.rotation=c,Qy.stRotation=u,Qy.extrudedHeight=f,Qy.shadowVolume=h,Qy.offsetAttribute=p===-1?void 0:p,new pp(Qy))};pp.computeRectangle=function(e,t){e=e??V.EMPTY_OBJECT;let n=e.rectangle,i=e.granularity??D.RADIANS_PER_DEGREE,o=e.ellipsoid??ne.default,r=e.rotation??0;return t7(n,i,r,o,t)};var sot=new X,GAe=new Fe,aot=new me;pp.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,o=e._stRotation,r=e._vertexFormat,s=qs.computeOptions(t,e._granularity,i,o,jAe,XAe,rot),a=sot;if(o!==0||i!==0){let g=ae.center(t,aot),m=n.geodeticSurfaceNormalCartographic(g,$q);Fe.fromAxisAngle(m,-o,GAe),X.fromQuaternion(GAe,a)}else X.clone(X.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 h,p;if(t=e._rectangle,f){h=iot(e,s);let g=le.fromRectangle3D(t,n,c,eot),m=le.fromRectangle3D(t,n,u,$it);p=le.union(g,m)}else{if(h=KAe(e,s),h.attributes.position.values=yi.scaleToGeodeticHeight(h.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let g=h.attributes.position.values.length,m=e._offsetAttribute===dn.NONE?0:1,_=new Uint8Array(g/3).fill(m);h.attributes.applyOffset=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}p=le.fromRectangle3D(t,n,c)}return r.position||delete h.attributes.position,new ht({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};pp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new pp({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Re.POSITION_ONLY,shadowVolume:!0})};var zAe=new ae,cot=[new U,new U,new U],lot=new ki,uot=new me;function fot(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=ae.clone(e._rectangle,zAe),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=t7(t,n,o,i,zAe),s=cot;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;let a=e.rectangle,c=ki.fromRotation(e._stRotation,lot),u=ae.center(a,uot);for(let m=0;m<3;++m){let _=s[m];_.x-=u.longitude,_.y-=u.latitude,ki.multiplyByVector(c,_,_),_.x+=u.longitude,_.y+=u.latitude,_.x=(_.x-a.west)/a.width,_.y=(_.y-a.south)/a.height}let f=s[0],h=s[1],p=s[2],g=new Array(6);return U.pack(f,g),U.pack(h,g,2),U.pack(p,g,4),g}Object.defineProperties(pp.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=t7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=fot(this)),this._textureCoordinateRotationPoints}}});var tI=pp;var $Ae=new G,ege=d.ZERO,tge=new d,nge=new ae,dot=new ae,hot=new me;function mot(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 nm(e,t){ei.call(this,{entity:e,scene:t,geometryOptions:new mot(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(nm.prototype=Object.create(ei.prototype),nm.prototype.constructor=nm);nm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new wn(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 Jt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,$Ae)),l(o)||(o=G.WHITE),i.color=en.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,ege,tge))),new Rt({id:t,geometry:new tI(this._options),attributes:i})};nm.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,$Ae),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=uo.fromCartesian3(W.getValueOrDefault(this._terrainOffsetProperty,e,ege,tge))),new Rt({id:t,geometry:new B0(this._options),attributes:r})};nm.prototype._computeCenter=function(e,t){let n=W.getValueOrUndefined(this._entity.rectangle.coordinates,e,dot);if(!l(n))return;let i=ae.center(n,hot);return me.toCartesian(i,ne.default,t)};nm.prototype._isHidden=function(e,t){return!l(t.coordinates)||gi.prototype._isHidden.call(this,e,t)};nm.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!W.isConstant(t.height)||!W.isConstant(t.extrudedHeight)||!W.isConstant(t.granularity)||!W.isConstant(t.stRotation)||!W.isConstant(t.rotation)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.zIndex)||this._onTerrain&&!W.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Jt)};nm.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Jt,i=W.getValueOrUndefined(t.height,Ye.MINIMUM_VALUE),o=W.getValueOrDefault(t.heightReference,Ye.MINIMUM_VALUE,Ze.NONE),r=W.getValueOrUndefined(t.extrudedHeight,Ye.MINIMUM_VALUE),s=W.getValueOrDefault(t.extrudedHeightReference,Ye.MINIMUM_VALUE,Ze.NONE);l(r)&&!l(i)&&(i=0);let a=this._options;a.vertexFormat=n?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(Ye.MINIMUM_VALUE,a.rectangle),a.granularity=W.getValueOrUndefined(t.granularity,Ye.MINIMUM_VALUE),a.stRotation=W.getValueOrUndefined(t.stRotation,Ye.MINIMUM_VALUE),a.rotation=W.getValueOrUndefined(t.rotation,Ye.MINIMUM_VALUE),a.offsetAttribute=ei.computeGeometryOffsetAttribute(i,o,r,s),a.height=ei.getGeometryHeight(i,o),r=ei.getGeometryExtrudedHeight(r,s),r===ei.CLAMP_TO_GROUND&&(r=Ii.getMinimumMaximumHeights(tI.computeRectangle(a,nge)).minimumTerrainHeight),a.extrudedHeight=r};nm.DynamicGeometryUpdater=CS;function CS(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(CS.prototype=Object.create(Ai.prototype),CS.prototype.constructor=CS);CS.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||Ai.prototype._isHidden.call(this,e,t,n)};CS.prototype._setOptions=function(e,t,n){let i=this._options,o=W.getValueOrUndefined(t.height,n),r=W.getValueOrDefault(t.heightReference,n,Ze.NONE),s=W.getValueOrUndefined(t.extrudedHeight,n),a=W.getValueOrDefault(t.extrudedHeightReference,n,Ze.NONE);l(s)&&!l(o)&&(o=0),i.rectangle=W.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=W.getValueOrUndefined(t.granularity,n),i.stRotation=W.getValueOrUndefined(t.stRotation,n),i.rotation=W.getValueOrUndefined(t.rotation,n),i.offsetAttribute=ei.computeGeometryOffsetAttribute(o,r,s,a),i.height=ei.getGeometryHeight(o,r),s=ei.getGeometryExtrudedHeight(s,a),s===ei.CLAMP_TO_GROUND&&(s=Ii.getMinimumMaximumHeights(tI.computeRectangle(i,nge)).minimumTerrainHeight),i.extrudedHeight=s};var sF=nm;var ige={};function pot(e,t){return D.equalsEpsilon(e.latitude,t.latitude,D.EPSILON10)&&D.equalsEpsilon(e.longitude,t.longitude,D.EPSILON10)}var Aot=new me,got=new me;function _ot(e,t,n,i){t=Ro(t,d.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),s=l(n),a=new Array(o),c=new Array(o),u=new Array(o),f=t[0];a[0]=f;let h=e.cartesianToCartographic(f,Aot);s&&(h.height=n[0]),c[0]=h.height,r?u[0]=i[0]:u[0]=0;let p=c[0],g=u[0],m=p===g,_=1;for(let y=1;y<o;++y){let C=t[y],E=e.cartesianToCartographic(C,got);s&&(E.height=n[y]),m=m&&E.height===0,pot(h,E)?h.height<E.height&&(c[_-1]=E.height):(a[_]=C,c[_]=E.height,r?u[_]=i[y]:u[_]=0,m=m&&c[_]===u[_],me.clone(E,h),++_)}if(!(m||_<2))return a.length=_,c.length=_,u.length=_,{positions:a,topHeights:c,bottomHeights:u}}var yot=new Array(2),Cot=new Array(2),Eot={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};ige.computePositions=function(e,t,n,i,o,r){let s=_ot(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,h=D.chordLength(o,e.maximumRadius),p=Eot;if(p.minDistance=h,p.ellipsoid=e,r){let g=0,m;for(m=0;m<a-1;m++)g+=Vi.numberOfPoints(t[m],t[m+1],h)+1;u=new Float64Array(g*3),f=new Float64Array(g*3);let _=yot,y=Cot;p.positions=_,p.height=y;let C=0;for(m=0;m<a-1;m++){_[0]=t[m],_[1]=t[m+1],y[0]=n[m],y[1]=n[m+1];let E=Vi.generateArc(p);u.set(E,C),y[0]=i[m],y[1]=i[m+1],f.set(Vi.generateArc(p),C),C+=E.length}}else p.positions=t,p.height=n,u=new Float64Array(Vi.generateArc(p)),p.height=i,f=new Float64Array(Vi.generateArc(p));return{bottomPositions:f,topPositions:u,numCorners:c}};var nI=ige;var n7=new d,WV=new d,Iot=new d,oge=new d,xot=new d,bot=new d,Tot=new d;function iI(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.vertexFormat??Re.DEFAULT,r=e.granularity??D.RADIANS_PER_DEGREE,s=e.ellipsoid??ne.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Re.clone(o),this._granularity=r,this._ellipsoid=ne.clone(s),this._workerName="createWallGeometry";let a=1+t.length*d.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+ne.packedLength+Re.packedLength+1}iI.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n]=e._granularity,t};var rge=ne.clone(ne.UNIT_SPHERE),sge=new Re,aF={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:rge,vertexFormat:sge,granularity:void 0};iI.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ne.unpack(e,t,rge);t+=ne.packedLength;let u=Re.unpack(e,t,sge);t+=Re.packedLength;let f=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ne.clone(c,n._ellipsoid),n._vertexFormat=Re.clone(u,n._vertexFormat),n._granularity=f,n):(aF.positions=r,aF.minimumHeights=s,aF.maximumHeights=a,aF.granularity=f,new iI(aF))};iI.fromConstantHeights=function(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);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]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new iI(c)};iI.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=nI.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,u=a.topPositions,f=a.numCorners,h=u.length,p=h*2,g=o.position?new Float64Array(p):void 0,m=o.normal?new Float32Array(p):void 0,_=o.tangent?new Float32Array(p):void 0,y=o.bitangent?new Float32Array(p):void 0,C=o.st?new Float32Array(p/3*2):void 0,E=0,I=0,b=0,S=0,B=0,v=Tot,P=bot,N=xot,L=!0;h/=3;let A,x=0,T=1/(h-f-1);for(A=0;A<h;++A){let F=A*3,z=d.fromArray(u,F,n7),Q=d.fromArray(c,F,WV);if(o.position&&(g[E++]=Q.x,g[E++]=Q.y,g[E++]=Q.z,g[E++]=z.x,g[E++]=z.y,g[E++]=z.z),o.st&&(C[B++]=x,C[B++]=0,C[B++]=x,C[B++]=1),o.normal||o.tangent||o.bitangent){let H=d.clone(d.ZERO,oge),j=d.subtract(z,s.geodeticSurfaceNormal(z,WV),WV);if(A+1<h&&(H=d.fromArray(u,F+3,oge)),L){let Z=d.subtract(H,z,Iot),Y=d.subtract(j,z,n7);v=d.normalize(d.cross(Y,Z,v),v),L=!1}d.equalsEpsilon(z,H,D.EPSILON10)?L=!0:(x+=T,o.tangent&&(P=d.normalize(d.subtract(H,z,P),P)),o.bitangent&&(N=d.normalize(d.cross(v,P,N),N))),o.normal&&(m[I++]=v.x,m[I++]=v.y,m[I++]=v.z,m[I++]=v.x,m[I++]=v.y,m[I++]=v.z),o.tangent&&(_[S++]=P.x,_[S++]=P.y,_[S++]=P.z,_[S++]=P.x,_[S++]=P.y,_[S++]=P.z),o.bitangent&&(y[b++]=N.x,y[b++]=N.y,y[b++]=N.z,y[b++]=N.x,y[b++]=N.y,y[b++]=N.z)}}let w=new Cn;o.position&&(w.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:g})),o.normal&&(w.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:m})),o.tangent&&(w.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:_})),o.bitangent&&(w.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:y})),o.st&&(w.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:C}));let R=p/3;p-=6*(f+1);let O=Qe.createTypedArray(R,p),k=0;for(A=0;A<R-2;A+=2){let F=A,z=A+2,Q=d.fromArray(g,F*3,n7),H=d.fromArray(g,z*3,WV);if(d.equalsEpsilon(Q,H,D.EPSILON10))continue;let j=A+1,Z=A+3;O[k++]=j,O[k++]=F,O[k++]=Z,O[k++]=Z,O[k++]=F,O[k++]=z}return new ht({attributes:w,indices:O,primitiveType:Ne.TRIANGLES,boundingSphere:new le.fromVertices(g)})};var cF=iI;var age=new d,cge=new d;function oI(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.granularity??D.RADIANS_PER_DEGREE,r=e.ellipsoid??ne.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=ne.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*d.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+ne.packedLength+1}oI.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,t[n]=e._granularity,t};var lge=ne.clone(ne.UNIT_SPHERE),lF={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:lge,granularity:void 0};oI.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ne.unpack(e,t,lge);t+=ne.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ne.clone(c,n._ellipsoid),n._granularity=u,n):(lF.positions=r,lF.minimumHeights=s,lF.maximumHeights=a,lF.granularity=u,new oI(lF))};oI.fromConstantHeights=function(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);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]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new oI(c)};oI.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=nI.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,u=c.length,f=u*2,h=new Float64Array(f),p=0;u/=3;let g;for(g=0;g<u;++g){let E=g*3,I=d.fromArray(c,E,age),b=d.fromArray(a,E,cge);h[p++]=b.x,h[p++]=b.y,h[p++]=b.z,h[p++]=I.x,h[p++]=I.y,h[p++]=I.z}let m=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:h})}),_=f/3;f=2*_-4+_;let y=Qe.createTypedArray(_,f),C=0;for(g=0;g<_-2;g+=2){let E=g,I=g+2,b=d.fromArray(h,E*3,age),S=d.fromArray(h,I*3,cge);if(d.equalsEpsilon(b,S,D.EPSILON10))continue;let B=g+1,v=g+3;y[C++]=B,y[C++]=E,y[C++]=B,y[C++]=v,y[C++]=E,y[C++]=I}return y[C++]=_-2,y[C++]=_-1,new ht({attributes:m,indices:y,primitiveType:Ne.LINES,boundingSphere:new le.fromVertices(h)})};var uF=oI;var uge=new G;function Sot(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 im(e,t){gi.call(this,{entity:e,scene:t,geometryOptions:new Sot(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(im.prototype=Object.create(gi.prototype),im.prototype.constructor=im);im.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Jt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,uge)),l(c)||(c=G.WHITE),o=en.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Rt({id:t,geometry:new cF(this._options),attributes:i})};im.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=W.getValueOrDefault(this._outlineColorProperty,e,G.BLACK,uge),o=this._distanceDisplayConditionProperty.getValue(e);return new Rt({id:t,geometry:new uF(this._options),attributes:{show:new wn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:en.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};im.prototype._isHidden=function(e,t){return!l(t.positions)||gi.prototype._isHidden.call(this,e,t)};im.prototype._getIsClosed=function(e){return!1};im.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!W.isConstant(t.minimumHeights)||!W.isConstant(t.maximumHeights)||!W.isConstant(t.outlineWidth)||!W.isConstant(t.granularity)};im.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,r=this._materialProperty instanceof Jt,s=this._options;s.vertexFormat=r?gn.VERTEX_FORMAT:yo.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Ye.MINIMUM_VALUE,s.positions),s.minimumHeights=l(n)?n.getValue(Ye.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=l(i)?i.getValue(Ye.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=l(o)?o.getValue(Ye.MINIMUM_VALUE):void 0};im.DynamicGeometryUpdater=ES;function ES(e,t,n){Ai.call(this,e,t,n)}l(Object.create)&&(ES.prototype=Object.create(Ai.prototype),ES.prototype.constructor=ES);ES.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||Ai.prototype._isHidden.call(this,e,t,n)};ES.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=W.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=W.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=W.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=W.getValueOrUndefined(t.granularity,n)};var fF=im;var rI=[MR,vO,EO,VO,WO,qO,ZO,rF,sF,fF];function sI(e,t){this.entity=e,this.scene=t;let n=new Array(rI.length),i=new ge,o=new Dr;for(let r=0;r<n.length;r++){let s=new rI[r](e,t);o.add(s.geometryChanged,a=>{i.raiseEvent(a)}),n[r]=s}this.updaters=n,this.geometryChanged=i,this.eventHelper=o,this._removeEntitySubscription=e.definitionChanged.addEventListener(sI.prototype._onEntityPropertyChanged,this)}sI.prototype._onEntityPropertyChanged=function(e,t,n,i){let o=this.updaters;for(let r=0;r<o.length;r++)o[r]._onEntityPropertyChanged(e,t,n,i)};sI.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};sI.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),ue(this)};sI.registerUpdater=function(e){rI.includes(e)||rI.push(e)};sI.unregisterUpdater=function(e){if(rI.includes(e)){let t=rI.indexOf(e);rI.splice(t,1)}};var aI=sI;var fge=new G,wot=new Gt,Bot=new Gt,Dot=d.ZERO,vot=new d;function om(e,t,n,i,o,r,s){this.translucent=t,this.appearanceType=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.depthFailMaterial=void 0,this.closed=r,this.shadows=s,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Pt,this.updaters=new Pt,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.subscriptions=new Pt,this.showsUpdated=new Pt,this.itemsToRemove=[],this.invalidated=!1;let a;l(o)&&(a=o.definitionChanged.addEventListener(om.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}om.prototype.onMaterialChanged=function(){this.invalidated=!0};om.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};om.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||!W.isConstant(e.distanceDisplayConditionProperty)||!W.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};om.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};om.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0){l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i);let c;l(this.depthFailAppearanceType)&&(l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=fr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),c=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),i=new kn({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:c,shadows:this.shadows}),o.add(i),t=!1}else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.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)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Jt)&&(this.depthFailMaterial=fr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.fillMaterialProperty.isConstant||c){let y=u.fillMaterialProperty.color,C=W.getValueOrDefault(y,e,G.WHITE,fge);G.equals(h._lastColor,C)||(h._lastColor=G.clone(C,h._lastColor),h.color=en.toValue(C,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=u))}if(l(this.depthFailAppearanceType)&&u.depthFailMaterialProperty instanceof Jt&&(!u.depthFailMaterialProperty.isConstant||c)){let y=u.depthFailMaterialProperty.color,C=W.getValueOrDefault(y,e,G.WHITE,fge);G.equals(h._lastDepthFailColor,C)||(h._lastDepthFailColor=G.clone(C,h._lastDepthFailColor),h.depthFailColor=en.toValue(C,h.depthFailColor))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=u.distanceDisplayConditionProperty;if(!W.isConstant(m)){let y=W.getValueOrDefault(m,e,Bot,wot);Gt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}let _=u.terrainOffsetProperty;if(!W.isConstant(_)){let y=W.getValueOrDefault(_,e,Dot,vot);d.equals(y,h._lastOffset)||(h._lastOffset=d.clone(y,h._lastOffset),h.offset=uo.toValue(y,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};om.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=wn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};om.prototype.contains=function(e){return this.updaters.contains(e.id)};om.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?mt.FAILED:(i.boundingSphere.clone(t),mt.DONE)};om.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 IS(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}IS.prototype.add=function(e,t){let n,i,o=t.createFillGeometryInstance(e);o.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let r=n.length;for(let a=0;a<r;a++){let c=n[a];if(c.isMaterial(t)){c.add(t,o);return}}let s=new om(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)};function dge(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}IS.prototype.remove=function(e){dge(this._solidItems,e)||dge(this._translucentItems,e)};function hge(e,t,n){let i=!1,o=t.length;for(let r=0;r<o;++r){let s=t[r],a=s.itemsToRemove,c=a.length;if(c>0)for(r=0;r<c;r++){let u=a[r];s.remove(u),e.add(n,u),i=!0}}return i}function jV(e,t,n,i){let o=t.length,r;for(r=o-1;r>=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,c=a.length;for(let u=0;u<c;u++)e.add(n,a[u]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}IS.prototype.update=function(e){let t=jV(this,this._solidItems,e,!0);t=jV(this,this._translucentItems,e,t)&&t;let n=hge(this,this._solidItems,e),i=hge(this,this._translucentItems,e);return(n||i)&&(t=jV(this,this._solidItems,e,t)&&t,t=jV(this,this._translucentItems,e,t)&&t),t};function mge(e,t,n){let i=e.length;for(let o=0;o<i;o++){let r=e[o];if(r.contains(t))return r.getBoundingSphere(t,n)}return mt.FAILED}IS.prototype.getBoundingSphere=function(e,t){let n=mge(this._solidItems,e,t);return n===mt.FAILED?mge(this._translucentItems,e,t):n};function pge(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}IS.prototype.removeAllPrimitives=function(){pge(this._solidItems),pge(this._translucentItems)};var Rd=IS;var Pot=new Gt,Rot=new Gt,Mot=d.ZERO,Not=new d;function rm(e,t,n,i,o,r,s){this.primitives=e,this.appearanceType=t,this.materialProperty=n,this.depthFailAppearanceType=i,this.depthFailMaterialProperty=o,this.closed=r,this.shadows=s,this.updaters=new Pt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Pt,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(rm.prototype.onMaterialChanged,this),this.subscriptions=new Pt,this.showsUpdated=new Pt}rm.prototype.onMaterialChanged=function(){this.invalidated=!0};rm.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty,i=this.depthFailMaterialProperty,o=e.depthFailMaterialProperty;if(n===t&&o===i)return!0;let r=l(t)&&t.equals(n);return r=(!l(i)&&!l(o)||l(i)&&i.equals(o))&&r,r};rm.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||!W.isConstant(t.distanceDisplayConditionProperty)||!W.isConstant(t.terrainOffsetProperty))this.updatersWithAttributes.set(n,t);else{let i=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};rm.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 Lot=new G;rm.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=fr.getValue(e,this.materialProperty,this.material);let a;l(this.depthFailMaterialProperty)&&(this.depthFailMaterial=fr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),a=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new kn({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({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=fr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Jt)&&(this.depthFailMaterial=fr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],u=c.entity,f=this.geometry.get(c.id),h=this.attributes.get(f.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Jt&&!c.depthFailMaterialProperty.isConstant){let y=c.depthFailMaterialProperty.color,C=W.getValueOrDefault(y,e,G.WHITE,Lot);G.equals(h._lastDepthFailColor,C)||(h._lastDepthFailColor=G.clone(C,h._lastDepthFailColor),h.depthFailColor=en.toValue(C,h.depthFailColor))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=c.distanceDisplayConditionProperty;if(!W.isConstant(m)){let y=W.getValueOrDefault(m,e,Rot,Pot);Gt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}let _=c.terrainOffsetProperty;if(!W.isConstant(_)){let y=W.getValueOrDefault(_,e,Mot,Not);d.equals(y,h._lastOffset)||(h._lastOffset=d.clone(y,h._lastOffset),h.offset=uo.toValue(y,h.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};rm.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,u=a.show[0]===1;c!==u&&(a.show=wn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};rm.prototype.contains=function(e){return this.updaters.contains(e.id)};rm.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?mt.FAILED:(i.boundingSphere.clone(t),mt.DONE)};rm.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 xS(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}xS.prototype.add=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let s=n[r];if(s.isMaterial(t)){s.add(e,t);return}}let o=new rm(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};xS.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};xS.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};xS.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return mt.FAILED};xS.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 Md=xS;function YV(e,t,n=0,i=e.length-1,o=Oot){for(;i>n;){if(i-n>600){let c=i-n+1,u=t-n+1,f=Math.log(c),h=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*h*(c-h)/c)*(u-c/2<0?-1:1),g=Math.max(n,Math.floor(t-u*h/c+p)),m=Math.min(i,Math.floor(t+(c-u)*h/c+p));YV(e,t,g,m,o)}let r=e[t],s=n,a=i;for(dF(e,n,t),o(e[i],r)>0&&dF(e,n,i);s<a;){for(dF(e,s,a),s++,a--;o(e[s],r)<0;)s++;for(;o(e[a],r)>0;)a--}o(e[n],r)===0?dF(e,n,a):(a++,dF(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}}function dF(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function Oot(e,t){return e<t?-1:e>t?1:0}var pF=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(!KV(t,n))return i;let o=this.toBBox,r=[];for(;n;){for(let s=0;s<n.children.length;s++){let a=n.children[s],c=n.leaf?o(a):a;KV(t,c)&&(n.leaf?i.push(a):o7(t,c)?this._all(a,i):r.push(a))}n=r.pop()}return i}collides(t){let n=this.data;if(!KV(t,n))return!1;let i=[];for(;n;){for(let o=0;o<n.children.length;o++){let r=n.children[o],s=n.leaf?this.toBBox(r):r;if(KV(t,s)){if(n.leaf||o7(t,s))return!0;i.push(r)}}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=TS([]),this}remove(t,n){if(!t)return this;let i=this.data,o=this.toBBox(t),r=[],s=[],a,c,u;for(;i||r.length;){if(i||(i=r.pop(),c=r[r.length-1],a=s.pop(),u=!0),i.leaf){let f=Fot(t,i.children,n);if(f!==-1)return i.children.splice(f,1),r.push(i),this._condense(r),this}!u&&!i.leaf&&o7(i,o)?(r.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,o){let r=i-n+1,s=this._maxEntries,a;if(r<=s)return a=TS(t.slice(n,i+1)),bS(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=TS([]),a.leaf=!1,a.height=o;let c=Math.ceil(r/s),u=c*Math.ceil(Math.sqrt(s));Age(t,n,i,u,this.compareMinX);for(let f=n;f<=i;f+=u){let h=Math.min(f+u-1,i);Age(t,f,h,c,this.compareMinY);for(let p=f;p<=h;p+=c){let g=Math.min(p+c-1,h);a.children.push(this._build(t,p,g,o-1))}}return bS(a,this.toBBox),a}_chooseSubtree(t,n,i,o){for(;o.push(n),!(n.leaf||o.length-1===i);){let r=1/0,s=1/0,a;for(let c=0;c<n.children.length;c++){let u=n.children[c],f=i7(u),h=Uot(t,u)-f;h<s?(s=h,r=f<r?f:r,a=u):h===s&&f<r&&(r=f,a=u)}n=a||n.children[0]}return n}_insert(t,n,i){let o=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,n,r);for(s.children.push(t),mF(s,o);n>=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(o,r,n)}_split(t,n){let i=t[n],o=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,o);let s=this._chooseSplitIndex(i,r,o),a=TS(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,bS(i,this.toBBox),bS(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,n){this.data=TS([t,n]),this.data.height=t.height+1,this.data.leaf=!1,bS(this.data,this.toBBox)}_chooseSplitIndex(t,n,i){let o,r=1/0,s=1/0;for(let a=n;a<=i-n;a++){let c=hF(t,0,a,this.toBBox),u=hF(t,a,i,this.toBBox),f=Got(c,u),h=i7(c)+i7(u);f<r?(r=f,o=a,s=h<s?h:s):f===r&&h<s&&(s=h,o=a)}return o||i-n}_chooseSplitAxis(t,n,i){let o=t.leaf?this.compareMinX:Qot,r=t.leaf?this.compareMinY:kot,s=this._allDistMargin(t,n,i,o),a=this._allDistMargin(t,n,i,r);s<a&&t.children.sort(o)}_allDistMargin(t,n,i,o){t.children.sort(o);let r=this.toBBox,s=hF(t,0,n,r),a=hF(t,i-n,i,r),c=qV(s)+qV(a);for(let u=n;u<i-n;u++){let f=t.children[u];mF(s,t.leaf?r(f):f),c+=qV(s)}for(let u=i-n-1;u>=n;u--){let f=t.children[u];mF(a,t.leaf?r(f):f),c+=qV(a)}return c}_adjustParentBBoxes(t,n,i){for(let o=i;o>=0;o--)mF(n[o],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():bS(t[n],this.toBBox)}};function Fot(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 bS(e,t){hF(e,0,e.children.length,t,e)}function hF(e,t,n,i,o){o||(o=TS(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let r=t;r<n;r++){let s=e.children[r];mF(o,e.leaf?i(s):s)}return o}function mF(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 Qot(e,t){return e.minX-t.minX}function kot(e,t){return e.minY-t.minY}function i7(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function qV(e){return e.maxX-e.minX+(e.maxY-e.minY)}function Uot(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 Got(e,t){let n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),o=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,o-n)*Math.max(0,r-i)}function o7(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function KV(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function TS(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Age(e,t,n,i,o){let r=[t,n];for(;r.length;){if(n=r.pop(),t=r.pop(),n-t<=i)continue;let s=t+Math.ceil((n-t)/i/2)*i;YV(e,s,t,n,o),r.push(t,s,s,n)}}function XV(){this._tree=new pF}function cI(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}cI.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};XV.prototype.insert=function(e,t){let n=cI.fromRectangleAndId(e,t,new cI);this._tree.insert(n)};function zot(e,t){return e.id===t.id}var Vot=new cI;XV.prototype.remove=function(e,t){let n=cI.fromRectangleAndId(e,t,Vot);this._tree.remove(n,zot)};var Hot=new cI;XV.prototype.collides=function(e){let t=cI.fromRectangleAndId("",e,Hot);return this._tree.collides(t)};var lI=XV;var Wot=new G,jot=new Gt,Yot=new Gt;function Lg(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 Pt,this.updaters=new Pt,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.subscriptions=new Pt,this.showsUpdated=new Pt,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new lI}Lg.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Lg.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||!W.isConstant(e.distanceDisplayConditionProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Lg.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};Lg.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new dl({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.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)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.fillMaterialProperty.isConstant||c){let _=u.fillMaterialProperty.color,y=W.getValueOrDefault(_,e,G.WHITE,Wot);G.equals(h._lastColor,y)||(h._lastColor=G.clone(y,h._lastColor),h.color=en.toValue(y,h.color))}let p=u.entity.isShowing&&(u.hasConstantFill||u.isFilled(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=u.distanceDisplayConditionProperty;if(!W.isConstant(m)){let _=W.getValueOrDefault(m,e,Yot,jot);Gt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Lg.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=wn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Lg.prototype.contains=function(e){return this.updaters.contains(e.id)};Lg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),mt.DONE):mt.FAILED};Lg.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 SS(e,t){this._batches=[],this._primitives=e,this._classificationType=t}SS.prototype.add=function(e,t){let n=t.createFillGeometryInstance(e),i=this._batches,o=W.getValueOrDefault(t.zIndex,0),r,s=i.length;for(let a=0;a<s;++a){let c=i[a];if(c.zIndex===o&&!c.overlapping(n.geometry.rectangle)){r=c;break}}return l(r)||(r=new Lg(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};SS.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};SS.prototype.update=function(e){let t,n,i=!0,o=this._batches,r=o.length;for(t=0;t<r;++t)i=o[t].update(e)&&i;for(t=0;t<r;++t){let s=o[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=r-1;t>=0;--t){let s=o[t];s.isDirty&&(i=o[t].update(e)&&i,s.isDirty=!1),s.geometry.length===0&&o.splice(t,1)}return i};SS.prototype.getBoundingSphere=function(e,t){let n=this._batches,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return mt.FAILED};SS.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var wS=SS;var qot=new Gt,Kot=new Gt;function Nd(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new Pt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Pt,this.material=void 0,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(Nd.prototype.onMaterialChanged,this),this.subscriptions=new Pt,this.showsUpdated=new Pt,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new lI}Nd.prototype.onMaterialChanged=function(){this.invalidated=!0};Nd.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Nd.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Jt&&t instanceof Jt?!0:l(t)&&t.equals(n)};Nd.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||!W.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};Nd.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)),!0}return!1};Nd.prototype.update=function(e){let t=!0,n=this.primitive,i=this.primitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),this.material=fr.getValue(e,this.materialProperty,this.material),n=new dl({show:!1,asynchronous:!0,geometryInstances:o.slice(),appearance:new this.appearanceType({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=fr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],u=c.entity,f=this.geometry.get(c.id),h=this.attributes.get(f.id.id);l(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h));let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=c.distanceDisplayConditionProperty;if(!W.isConstant(m)){let _=W.getValueOrDefault(m,e,Kot,qot);Gt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Nd.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,u=a.show[0]===1;c!==u&&(a.show=wn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Nd.prototype.contains=function(e){return this.updaters.contains(e.id)};Nd.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?mt.FAILED:(i.boundingSphere.clone(t),mt.DONE)};Nd.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 BS(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}BS.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=Vu.shouldUseSphericalCoordinates(o.geometry.rectangle),s=W.getValueOrDefault(t.zIndex,0);for(let c=0;c<i;++c){let u=n[c];if(u.isMaterial(t)&&u.usingSphericalTextureCoordinates===r&&u.zIndex===s&&!u.overlapping(o.geometry.rectangle)){u.add(e,t,o);return}}let a=new Nd(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)};BS.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};BS.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};BS.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return mt.FAILED};BS.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 AF=BS;var Xot=new G,Jot=new Gt,Zot=new Gt,$ot=d.ZERO,ert=new d;function Og(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 Pt,this.updaters=new Pt,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.itemsToRemove=[],this.subscriptions=new Pt,this.showsUpdated=new Pt}Og.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||!W.isConstant(e.distanceDisplayConditionProperty)||!W.isConstant(e.terrainOffsetProperty))this.updatersWithAttributes.set(n,e);else{let i=this;this.subscriptions.set(n,e.entity.definitionChanged.addEventListener(function(o,r,s,a){r==="isShowing"&&i.showsUpdated.set(e.id,e)}))}};Og.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};Og.prototype.update=function(e){let t=!0,n=0,i=this.primitive,o=this.primitives,r;if(this.createPrimitive){let s=this.geometry.values;if(s.length>0)l(i)&&(l(this.oldPrimitive)?o.remove(i):this.oldPrimitive=i),i=new kn({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new gn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.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)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let u=s[r],f=this.geometry.get(u.id),h=this.attributes.get(f.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!u.outlineColorProperty.isConstant||c){let y=u.outlineColorProperty,C=W.getValueOrDefault(y,e,G.WHITE,Xot);G.equals(h._lastColor,C)||(h._lastColor=G.clone(C,h._lastColor),h.color=en.toValue(C,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=u))}let p=u.entity.isShowing&&(u.hasConstantOutline||u.isOutlineVisible(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=u.distanceDisplayConditionProperty;if(!W.isConstant(m)){let y=W.getValueOrDefault(m,e,Zot,Jot);Gt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}let _=u.terrainOffsetProperty;if(!W.isConstant(_)){let y=W.getValueOrDefault(_,e,$ot,ert);d.equals(y,h._lastOffset)||(h._lastOffset=d.clone(y,h._lastOffset),h.offset=uo.toValue(y,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Og.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=this.geometry.get(o.id),s=this.attributes.get(r.id.id);l(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));let a=o.entity.isShowing,c=s.show[0]===1;a!==c&&(s.show=wn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Og.prototype.contains=function(e){return this.updaters.contains(e.id)};Og.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?mt.FAILED:(i.boundingSphere.clone(t),mt.DONE)};Og.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 DS(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new Pt,this._translucentBatches=new Pt}DS.prototype.add=function(e,t){let n=t.createOutlineGeometryInstance(e),i=this._scene.clampLineWidth(t.outlineWidth),o,r;n.attributes.color.value[3]===255?(o=this._solidBatches,r=o.get(i),l(r)||(r=new Og(this._primitives,!1,i,this._shadows),o.set(i,r)),r.add(t,n)):(o=this._translucentBatches,r=o.get(i),l(r)||(r=new Og(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};DS.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 o=this._translucentBatches.values,r=o.length;for(t=0;t<r;t++)if(o[t].remove(e))return};DS.prototype.update=function(e){let t,n,i,o,r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,c=a.length,u,f=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],f=o.update(e),u=o.itemsToRemove;let p=u.length;if(p>0)for(h=!0,t=0;t<p;t++)i=u[t],o.remove(i),this.add(e,i)}for(n=0;n<c;n++){o=a[n],f=o.update(e),u=o.itemsToRemove;let p=u.length;if(p>0)for(h=!0,t=0;t<p;t++)i=u[t],o.remove(i),this.add(e,i)}}while(h);return f};DS.prototype.getBoundingSphere=function(e,t){let n,i=this._solidBatches.values,o=i.length;for(n=0;n<o;n++){let a=i[n];if(a.contains(e))return a.getBoundingSphere(e,t)}let r=this._translucentBatches.values,s=r.length;for(n=0;n<s;n++){let a=r[n];if(a.contains(e))return a.getBoundingSphere(e,t)}return mt.FAILED};DS.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,o=i.length;for(e=0;e<o;e++)i[e].removeAllPrimitives()};var vS=DS;var trt=[];function Cu(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 Pt,this._removedObjects=new Pt,this._changedObjects=new Pt;let o=Bn.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(o*2),this._closedColorBatches=new Array(o*2),this._closedMaterialBatches=new Array(o*2),this._openColorBatches=new Array(o*2),this._openMaterialBatches=new Array(o*2);let r=dr.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let s;for(s=0;s<o;++s)this._outlineBatches[s]=new vS(n,e,s,!1),this._outlineBatches[o+s]=new vS(n,e,s,!0),this._closedColorBatches[s]=new Rd(n,gn,void 0,!0,s,!0),this._closedColorBatches[o+s]=new Rd(n,gn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new Md(n,yo,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new Md(n,yo,void 0,!0,s,!1),this._openColorBatches[s]=new Rd(n,gn,void 0,!1,s,!0),this._openColorBatches[o+s]=new Rd(n,gn,void 0,!1,s,!1),this._openMaterialBatches[s]=new Md(n,yo,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new Md(n,yo,void 0,!1,s,!1);let a=Xn.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(a),u=[];if(r)for(s=0;s<a;++s)u.push(new AF(i,s,yo)),c[s]=new wS(i,s);else for(s=0;s<a;++s)c[s]=new wS(i,s);this._groundColorBatches=c,this._groundMaterialBatches=u,this._dynamicBatch=new X0(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new Pt,this._updaterSets=new Pt,this._entityCollection=t,t.collectionChanged.addEventListener(Cu.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,trt)}Cu.registerUpdater=function(e){aI.registerUpdater(e)};Cu.unregisterUpdater=function(e){aI.unregisterUpdater(e)};Cu.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,c,u,f,h=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(_){h._removeUpdater(_),h._insertUpdaterIntoBatch(e,_)}):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[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 aI(c,this._scene),this._updaterSets.set(u,f),f.forEach(function(_){h._insertUpdaterIntoBatch(e,_)}),this._subscriptions.set(u,f.geometryChanged.addEventListener(Cu._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.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 nrt=[],irt=new le;Cu.prototype.getBoundingSphere=function(e,t){let n=nrt,i=irt,o=0,r=mt.DONE,s=this._batches,a=s.length,c=e.id,u=this._updaterSets.get(c).updaters;for(let f=0;f<u.length;f++){let h=u[f];for(let p=0;p<a;p++){if(r=s[p].getBoundingSphere(h,i),r===mt.PENDING)return mt.PENDING;r===mt.DONE&&(n[o]=le.clone(i,n[o]),o++)}}return o===0?mt.FAILED:(n.length=o,le.fromBoundingSpheres(n,t),mt.DONE)};Cu.prototype.isDestroyed=function(){return!1};Cu.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Cu.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 o=this._updaterSets.values;for(n=o.length,e=0;e<n;e++)o[e].destroy();return this._updaterSets.removeAll(),ue(this)};Cu.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};Cu.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=Bn.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 o=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof Jt?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Jt?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 Jt?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)};Cu._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};Cu.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var gF=Cu;var ort=1,rrt="30px sans-serif",srt=ir.FILL,art=G.WHITE,crt=G.BLACK,lrt=1,urt=!1,frt=new G(.165,.165,.165,.8),drt=new U(7,5),hrt=U.ZERO,mrt=d.ZERO,prt=Ze.NONE,Art=vi.CENTER,grt=Hn.CENTER,_rt=new d,yrt=new G,Crt=new G,Ert=new G,Irt=new U,xrt=new d,brt=new U,Trt=new Kt,Srt=new Kt,wrt=new Kt,Brt=new Gt;function gge(e){this.entity=e,this.label=void 0,this.index=void 0}function ky(e,t){t.collectionChanged.addEventListener(ky.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Pt,this._onCollectionChanged(t,t.values,[],[])}ky.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._label,c,u=r.label,f=s.isShowing&&s.isAvailable(e)&&W.getValueOrDefault(a._show,e,!0),h;if(f&&(h=W.getValueOrUndefined(s._position,e,_rt),c=W.getValueOrUndefined(a._text,e),f=l(h)&&l(c)),!f){r7(r,s,n);continue}W.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,g=W.getValueOrDefault(a._heightReference,e,prt);l(u)||(u=n.getLabel(s),u.id=s,r.label=u,p=d.equals(u.position,h)&&u.heightReference===g),u.show=!0,u.position=h,u.text=c,u.scale=W.getValueOrDefault(a._scale,e,ort),u.font=W.getValueOrDefault(a._font,e,rrt),u.style=W.getValueOrDefault(a._style,e,srt),u.fillColor=W.getValueOrDefault(a._fillColor,e,art,yrt),u.outlineColor=W.getValueOrDefault(a._outlineColor,e,crt,Crt),u.outlineWidth=W.getValueOrDefault(a._outlineWidth,e,lrt),u.showBackground=W.getValueOrDefault(a._showBackground,e,urt),u.backgroundColor=W.getValueOrDefault(a._backgroundColor,e,frt,Ert),u.backgroundPadding=W.getValueOrDefault(a._backgroundPadding,e,drt,Irt),u.pixelOffset=W.getValueOrDefault(a._pixelOffset,e,hrt,brt),u.eyeOffset=W.getValueOrDefault(a._eyeOffset,e,mrt,xrt),u.heightReference=g,u.horizontalOrigin=W.getValueOrDefault(a._horizontalOrigin,e,Art),u.verticalOrigin=W.getValueOrDefault(a._verticalOrigin,e,grt),u.translucencyByDistance=W.getValueOrUndefined(a._translucencyByDistance,e,Trt),u.pixelOffsetScaleByDistance=W.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,Srt),u.scaleByDistance=W.getValueOrUndefined(a._scaleByDistance,e,wrt),u.distanceDisplayCondition=W.getValueOrUndefined(a._distanceDisplayCondition,e,Brt),u.disableDepthTestDistance=W.getValueOrUndefined(a._disableDepthTestDistance,e),p&&u._updateClamping()}return!0};ky.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.label))return mt.FAILED;let i=n.label;return t.center=d.clone(i._clampedPosition??i.position,t.center),t.radius=0,mt.DONE};ky.prototype.isDestroyed=function(){return!1};ky.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ky.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return ue(this)};ky.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._label)&&l(r._position)&&s.set(r.id,new gge(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._label)&&l(r._position)?s.contains(r.id)||s.set(r.id,new gge(r)):(r7(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],r7(s.get(r.id),r,a),s.remove(r.id)};function r7(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var _F=ky;var Drt=1,vrt=!0,Prt=0,Rrt=!0,Mrt=!0,Nrt=Bn.ENABLED,Lrt=Ze.NONE,Ort=G.RED,Frt=0,Qrt=G.WHITE,krt=Qc.HIGHLIGHT,Urt=.5,Grt=new U(1,1),_ge={maximumPositionEpsilon:Number.POSITIVE_INFINITY},zrt=new M,Vrt=new M,yge=new G,Cge=new Array(4),Hrt=new d;function Uy(e,t){t.collectionChanged.addEventListener(Uy.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new Pt,this._onCollectionChanged(t,t.values,[],[])}async function Wrt(e,t,n,i,o){let r=e._primitives,s=e._modelHash;try{let a=await kh.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene,environmentMapOptions:o});if(e.isDestroyed()||!l(s[t.id]))return;a.id=t,r.add(a),s[t.id].modelPrimitive=a,a.errorEvent.addEventListener(c=>{l(s[t.id])&&(console.log(c),c.name!=="TextureError"&&a.incrementallyLoadTextures&&(s[t.id].loadFailed=!0))})}catch(a){if(e.isDestroyed()||!l(s[t.id]))return;console.log(a),s[t.id].loadFailed=!0}}Uy.prototype.update=function(e){let t=this._entitiesToVisualize.values,n=this._modelHash,i=this._primitives;for(let o=0,r=t.length;o<r;o++){let s=t[o],a=s._model,c,u=n[s.id],f=s.isShowing&&s.isAvailable(e)&&W.getValueOrDefault(a._show,e,!0),h;if(f&&(h=s.computeModelMatrix(e,zrt),c=we.createIfNeeded(W.getValueOrUndefined(a._uri,e)),f=l(h)&&l(c)),!f){l(u)&&u.modelPrimitive&&(u.modelPrimitive.show=!1);continue}if(!l(u)||c.url!==u.url){l(u?.modelPrimitive)&&(i.removeAndDestroy(u.modelPrimitive),delete n[s.id]),u={modelPrimitive:void 0,url:c.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,environmentMapOptionsScratch:{..._ge}},n[s.id]=u;let m=W.getValueOrDefault(a._incrementallyLoadTextures,e,Rrt),_=W.getValueOrDefault(a._environmentMapOptions,e,_ge,u.environmentMapOptionsScratch);Wrt(this,s,c,m,_)}let p=u.modelPrimitive;if(!l(p))continue;p.show=!0,p.scale=W.getValueOrDefault(a._scale,e,Drt),p.enableVerticalExaggeration=W.getValueOrDefault(a._enableVerticalExaggeration,e,vrt),p.minimumPixelSize=W.getValueOrDefault(a._minimumPixelSize,e,Prt),p.maximumScale=W.getValueOrUndefined(a._maximumScale,e),p.modelMatrix=M.clone(h,p.modelMatrix),p.shadows=W.getValueOrDefault(a._shadows,e,Nrt),p.heightReference=W.getValueOrDefault(a._heightReference,e,Lrt),p.distanceDisplayCondition=W.getValueOrUndefined(a._distanceDisplayCondition,e),p.silhouetteColor=W.getValueOrDefault(a._silhouetteColor,e,Ort,yge),p.silhouetteSize=W.getValueOrDefault(a._silhouetteSize,e,Frt),p.color=W.getValueOrDefault(a._color,e,Qrt,yge),p.colorBlendMode=W.getValueOrDefault(a._colorBlendMode,e,krt),p.colorBlendAmount=W.getValueOrDefault(a._colorBlendAmount,e,Urt),p.clippingPlanes=W.getValueOrUndefined(a._clippingPlanes,e),p.clampAnimations=W.getValueOrDefault(a._clampAnimations,e,Mrt),p.imageBasedLighting.imageBasedLightingFactor=W.getValueOrDefault(a._imageBasedLightingFactor,e,Grt);let g=W.getValueOrUndefined(a._lightColor,e);if(l(g)&&(G.pack(g,Cge,0),g=d.unpack(Cge,0,Hrt)),p.lightColor=g,p.customShader=W.getValueOrUndefined(a._customShader,e),n[s.id].modelUpdated=!0,p.ready){let m=W.getValueOrDefault(a._runAnimations,e,!0);u.animationsRunning!==m&&(m?p.activeAnimations.addAll({loop:lu.REPEAT}):p.activeAnimations.removeAll(),u.animationsRunning=m);let _=W.getValueOrUndefined(a._nodeTransformations,e,u.nodeTransformationsScratch);if(l(_)){let E=Object.keys(_);for(let I=0,b=E.length;I<b;++I){let S=E[I],B=_[S];if(!l(B))continue;let v=p.getNode(S);if(!l(v))continue;let P=M.fromTranslationRotationScale(B,Vrt);v.matrix=M.multiply(v.originalMatrix,P,P)}}let y=!1,C=W.getValueOrUndefined(a._articulations,e,u.articulationsScratch);if(l(C)){let E=Object.keys(C);for(let I=0,b=E.length;I<b;++I){let S=E[I],B=C[S];l(B)&&(y=!0,p.setArticulationStage(S,B))}}y&&p.applyArticulations()}}return!0};Uy.prototype.isDestroyed=function(){return!1};Uy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Uy.prototype._onCollectionChanged,this);let e=this._entitiesToVisualize.values,t=this._modelHash,n=this._primitives;for(let i=e.length-1;i>-1;i--)s7(this,e[i],t,n);return ue(this)};var JV=new d,jrt=new me;Uy.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return mt.FAILED;if(n.loadFailed)return mt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return mt.PENDING;if(!i.ready||!n.modelUpdated)return mt.PENDING;let o=this._scene,r=o.ellipsoid??ne.default;if(i.heightReference!==Ze.NONE){let a=i.modelMatrix;JV.x=a[12],JV.y=a[13],JV.z=a[14];let c=r.cartesianToCartographic(JV,jrt),u=o.getHeight(c,i.heightReference);return l(u)&&(Zf(i.heightReference)?c.height=u:c.height+=u),le.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),mt.DONE}return le.clone(i.boundingSphere,t),mt.DONE};Uy.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._entitiesToVisualize,a=this._modelHash,c=this._primitives;for(o=t.length-1;o>-1;o--)r=t[o],l(r._model)&&l(r._position)&&s.set(r.id,r);for(o=i.length-1;o>-1;o--)r=i[o],l(r._model)&&l(r._position)?(Yrt(r,a),s.set(r.id,r)):(s7(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],s7(this,r,a,c),s.remove(r.id)};function s7(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function Yrt(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var yF=Uy;function Gy(e){this._definitionChanged=new ge,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(Gy.prototype,{isConstant:{get:function(){return W.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return l(this._value)?this._value.referenceFrame:Xi.FIXED}}});var qrt=new K;Gy.prototype.getValue=function(e,t){return l(e)||(e=K.now(qrt)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};Gy.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))};Gy.prototype.getValueInReferenceFrame=function(e,t,n){if(l(this._value))return n=this._value.getValueInReferenceFrame(e,t,n),l(n)?ne.default.scaleToGeodeticSurface(n,n):void 0};Gy.prototype.equals=function(e){return this===e||e instanceof Gy&&this._value===e._value};Gy.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var Ap=Gy;var Krt=60,Xrt=1,Ige=new Rn,a7=new Rn,c7=new Rn;function Ege(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function Jrt(e,t,n,i,o,r,s,a,c){let u=a,f;f=e.getValueInReferenceFrame(t,r,c[u]),l(f)&&(c[u++]=f);let h=!l(o)||K.lessThanOrEquals(o,t)||K.greaterThanOrEquals(o,n),p=0,g=i.length,m=i[p],_=n,y=!1,C,E,I;for(;p<g;){if(!h&&K.greaterThanOrEquals(m,o)&&(f=e.getValueInReferenceFrame(o,r,c[u]),l(f)&&(c[u++]=f),h=!0),K.greaterThan(m,t)&&K.lessThan(m,_)&&!m.equals(o)&&(f=e.getValueInReferenceFrame(m,r,c[u]),l(f)&&(c[u++]=f)),p<g-1){if(s>0&&!y){let b=i[p+1],S=K.secondsDifference(b,m);y=S>s,y&&(C=Math.ceil(S/s),E=0,I=S/Math.max(C,2),C=Math.max(C-1,1))}if(y&&E<C){m=K.addSeconds(m,I,new K),E++;continue}}y=!1,p++,m=i[p]}return f=e.getValueInReferenceFrame(n,r,c[u]),l(f)&&(c[u++]=f),u}function Zrt(e,t,n,i,o,r,s,a){let c,u=0,f=s,h=t,p=!l(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(h,n);)!p&&K.greaterThanOrEquals(h,i)&&(p=!0,c=e.getValueInReferenceFrame(i,o,a[f]),l(c)&&(a[f]=c,f++)),c=e.getValueInReferenceFrame(h,o,a[f]),l(c)&&(a[f]=c,f++),u++,h=K.addSeconds(t,r*u,new K);return c=e.getValueInReferenceFrame(n,o,a[f]),l(c)&&(a[f]=c,f++),f}function $rt(e,t,n,i,o,r,s,a){let c,u=0,f=s,h=t,p=Math.max(r,60),g=!l(i)||K.lessThanOrEquals(i,t)||K.greaterThanOrEquals(i,n);for(;K.lessThan(h,n);)!g&&K.greaterThanOrEquals(h,i)&&(g=!0,c=e.getValueInReferenceFrame(i,o,a[f]),l(c)&&(a[f]=c,f++)),c=e.getValueInReferenceFrame(h,o,a[f]),l(c)&&(a[f]=c,f++),u++,h=K.addSeconds(t,p*u,new K);return c=e.getValueInReferenceFrame(n,o,a[f]),l(c)&&(a[f]=c,f++),f}function est(e,t,n,i,o,r,s,a){c7.start=t,c7.stop=n;let c=s,u=e.intervals;for(let f=0;f<u.length;f++){let h=u.get(f);if(!Rn.intersect(h,c7,Ige).isEmpty){let p=h.start;h.isStartIncluded||(h.isStopIncluded?p=h.stop:p=K.addSeconds(h.start,K.secondsDifference(h.stop,h.start)/2,new K));let g=e.getValueInReferenceFrame(p,o,a[c]);l(g)&&(a[c]=g,c++)}}return c}function tst(e,t,n,i,o,r,s,a){let c=e.getValueInReferenceFrame(t,o,a[s]);return l(c)&&(a[s++]=c),s}function nst(e,t,n,i,o,r,s,a){a7.start=t,a7.stop=n;let c=s,u=e.intervals;for(let f=0;f<u.length;f++){let h=u.get(f);if(!Rn.intersect(h,a7,Ige).isEmpty){let p=h.start,g=h.stop,m=t;K.greaterThan(p,m)&&(m=p);let _=n;K.lessThan(g,_)&&(_=g),c=xge(h.data,m,_,i,o,r,c,a)}}return c}function xge(e,t,n,i,o,r,s,a){for(;e instanceof Bg;)e=e.resolvedProperty;if(e instanceof Ha){let c=e._property._times;s=Jrt(e,t,n,c,i,o,r,s,a)}else e instanceof NR?s=Zrt(e,t,n,i,o,r,s,a):e instanceof za?s=nst(e,t,n,i,o,r,s,a):e instanceof Dg?s=est(e,t,n,i,o,r,s,a):e instanceof ml||e instanceof Ap&&W.isConstant(e)?s=tst(e,t,n,i,o,r,s,a):s=$rt(e,t,n,i,o,r,s,a);return s}function bge(e,t,n,i,o,r,s){l(s)||(s=[]);let a=xge(e,t,n,i,o,r,0,s);return s.length=a,s}var ist=new X;function CF(e,t){this._unusedIndexes=[],this._polylineCollection=new zh,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}CF.prototype.update=function(e){if(this._referenceFrame===Xi.INERTIAL){let t=Qt.computeIcrfToCentralBodyFixedMatrix(e,ist);M.fromRotationTranslation(t,d.ZERO,this._polylineCollection.modelMatrix)}};CF.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,o=n._position,r,s,a=i._show,c=t.polyline,u=n.isShowing&&n.isAvailable(e)&&(!l(a)||a.getValue(e));if(u){let h=W.getValueOrUndefined(i._leadTime,e),p=W.getValueOrUndefined(i._trailTime,e),g=n._availability,m=l(g),_=l(h),y=l(p);if(u=m||_&&y,u){if(y&&(r=K.addSeconds(e,-p,new K)),_&&(s=K.addSeconds(e,h,new K)),m){let C=g.start,E=g.stop;(!y||K.greaterThan(C,r))&&(r=C),(!_||K.lessThan(E,s))&&(s=E)}u=K.lessThan(r,s)}}if(!u){l(c)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,c.show=!1,t.index=void 0);return}if(!l(c)){let h=this._unusedIndexes;if(h.length>0){let g=h.pop();c=this._polylineCollection.get(g),t.index=g}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let f=W.getValueOrDefault(i._resolution,e,Krt);c.show=!0,c.positions=bge(o,r,s,e,this._referenceFrame,f,c.positions.slice()),c.material=fr.getValue(e,i._material,c.material),c.width=W.getValueOrDefault(i._width,e,Xrt),c.distanceDisplayCondition=W.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};CF.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)};CF.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),ue(this)};function zy(e,t){t.collectionChanged.addEventListener(zy.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new Pt,this._onCollectionChanged(t,t.values,[],[])}zy.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,o=n.length;i<o;i++){let r=n[i],a=r.entity._position,c=r.updater,u=Xi.FIXED;this._scene.mode===oe.SCENE3D&&(u=a.referenceFrame);let f=this._updaters[u];if(c===f&&l(f)){f.updateObject(e,r);continue}l(c)&&c.removeObject(r),l(f)||(f=new CF(this._scene,u),f.update(e),this._updaters[u]=f),r.updater=f,l(f)&&f.updateObject(e,r)}return!0};zy.prototype.isDestroyed=function(){return!1};zy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(zy.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return ue(this)};zy.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s,a=this._items;for(o=t.length-1;o>-1;o--)r=t[o],l(r._path)&&l(r._position)&&a.set(r.id,new Ege(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._path)&&l(r._position)?a.contains(r.id)||a.set(r.id,new Ege(r)):(s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id)));for(o=n.length-1;o>-1;o--)r=n[o],s=a.get(r.id),l(s)&&(l(s.updater)&&s.updater.removeObject(s),a.remove(r.id))};zy._subSample=bge;var EF=zy;var Tge=G.WHITE,Sge=G.BLACK,wge=0,Bge=1,Dge=0,vge=Tr.NONE,Pge=new G,ost=new d,Rge=new G,Mge=new Kt,Nge=new Kt,Lge=new Gt;function Oge(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 Vy(e,t){t.collectionChanged.addEventListener(Vy.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new Pt,this._onCollectionChanged(t,t.values,[],[])}Vy.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._point,c=r.pointPrimitive,u=r.billboard,f=W.getValueOrDefault(a._heightReference,e,Ze.NONE),h=s.isShowing&&s.isAvailable(e)&&W.getValueOrDefault(a._show,e,!0),p;if(h&&(p=W.getValueOrUndefined(s._position,e,ost),h=l(p)),!h){IF(r,s,n);continue}W.isConstant(s._position)||(n._clusterDirty=!0);let g=!1,m=!1;if(f!==Ze.NONE&&!l(u)?(l(c)&&(IF(r,s,n),c=void 0),u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u,g=!0,m=d.equals(u.position,p)&&u.heightReference===f):f===Ze.NONE&&!l(c)&&(l(u)&&(IF(r,s,n),u=void 0),c=n.getPoint(s),c.id=s,r.pointPrimitive=c),l(c))c.show=!0,c.position=p,c.scaleByDistance=W.getValueOrUndefined(a._scaleByDistance,e,Mge),c.translucencyByDistance=W.getValueOrUndefined(a._translucencyByDistance,e,Nge),c.color=W.getValueOrDefault(a._color,e,Tge,Pge),c.outlineColor=W.getValueOrDefault(a._outlineColor,e,Sge,Rge),c.outlineWidth=W.getValueOrDefault(a._outlineWidth,e,wge),c.pixelSize=W.getValueOrDefault(a._pixelSize,e,Bge),c.distanceDisplayCondition=W.getValueOrUndefined(a._distanceDisplayCondition,e,Lge),c.disableDepthTestDistance=W.getValueOrDefault(a._disableDepthTestDistance,e,Dge),c.splitDirection=W.getValueOrDefault(a._splitDirection,e,vge);else if(l(u)){u.show=!0,u.position=p,u.scaleByDistance=W.getValueOrUndefined(a._scaleByDistance,e,Mge),u.translucencyByDistance=W.getValueOrUndefined(a._translucencyByDistance,e,Nge),u.distanceDisplayCondition=W.getValueOrUndefined(a._distanceDisplayCondition,e,Lge),u.disableDepthTestDistance=W.getValueOrDefault(a._disableDepthTestDistance,e,Dge),u.splitDirection=W.getValueOrDefault(a._splitDirection,e,vge),u.heightReference=f;let _=W.getValueOrDefault(a._color,e,Tge,Pge),y=W.getValueOrDefault(a._outlineColor,e,Sge,Rge),C=Math.round(W.getValueOrDefault(a._outlineWidth,e,wge)),E=Math.max(1,Math.round(W.getValueOrDefault(a._pixelSize,e,Bge)));if(C>0?(u.scale=1,g=g||C!==r.outlineWidth||E!==r.pixelSize||!G.equals(_,r.color)||!G.equals(y,r.outlineColor)):(u.scale=E/50,E=50,g=g||C!==r.outlineWidth||!G.equals(_,r.color)||!G.equals(y,r.outlineColor)),g){r.color=G.clone(_,r.color),r.outlineColor=G.clone(y,r.outlineColor),r.pixelSize=E,r.outlineWidth=C;let I=_.alpha,b=_.toCssColorString(),S=y.toCssColorString(),B=JSON.stringify([b,E,S,C]);u.setImage(B,y0(I,b,S,C,E))}m&&u._updateClamping()}}return!0};Vy.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!(l(n.pointPrimitive)||l(n.billboard)))return mt.FAILED;if(l(n.pointPrimitive))t.center=d.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return mt.PENDING;t.center=d.clone(i._clampedPosition,t.center)}return t.radius=0,mt.DONE};Vy.prototype.isDestroyed=function(){return!1};Vy.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Vy.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return ue(this)};Vy.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._point)&&l(r._position)&&s.set(r.id,new Oge(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._point)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Oge(r)):(IF(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],IF(s.get(r.id),r,a),s.remove(r.id)};function IF(e,t,n){if(l(e)){let i=e.pointPrimitive;if(l(i)){e.pointPrimitive=void 0,n.removePoint(t);return}let o=e.billboard;l(o)&&(e.billboard=void 0,n.removeBillboard(t))}}var xF=Vy;var Gge=[];function rst(e,t,n,i,o){let r=Gge;r.length=o;let s,a=n.red,c=n.green,u=n.blue,f=n.alpha,h=i.red,p=i.green,g=i.blue,m=i.alpha;if(G.equals(n,i)){for(s=0;s<o;s++)r[s]=G.clone(n);return r}let _=(h-a)/o,y=(p-c)/o,C=(g-u)/o,E=(m-f)/o;for(s=0;s<o;s++)r[s]=new G(a+s*_,c+s*y,u+s*C,f+s*E);return r}function bF(e){e=e??V.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.width??1,o=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Re.clone(e.vertexFormat??Re.DEFAULT),this._arcType=e.arcType??ln.GEODESIC,this._granularity=e.granularity??D.RADIANS_PER_DEGREE,this._ellipsoid=ne.clone(e.ellipsoid??ne.default),this._workerName="createPolylineGeometry";let r=1+t.length*d.packedLength;r+=l(n)?1+n.length*G.packedLength:1,this.packedLength=r+ne.packedLength+Re.packedLength+4}bF.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var zge=ne.clone(ne.UNIT_SPHERE),Vge=new Re,uI={positions:void 0,colors:void 0,ellipsoid:zge,vertexFormat:Vge,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};bF.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=ne.unpack(e,t,zge);t+=ne.packedLength;let c=Re.unpack(e,t,Vge);t+=Re.packedLength;let u=e[t++],f=e[t++]===1,h=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=ne.clone(a,n._ellipsoid),n._vertexFormat=Re.clone(c,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=h,n._granularity=p,n):(uI.positions=r,uI.colors=s,uI.width=u,uI.colorsPerVertex=f,uI.arcType=h,uI.granularity=p,new bF(uI))};var Fge=new d,Qge=new d,kge=new d,Uge=new d;bF.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,c,u,f,h=[],p=Ro(e._positions,d.equalsEpsilon,!1,h);if(l(i)&&h.length>0){let R=0,O=h[0];i=i.filter(function(k,F){let z=!1;return o?z=F===O||F===0&&O===1:z=F+1===O,z?(R++,O=h[R],!1):!0})}let g=p.length;if(g<2||t<=0)return;if(r===ln.GEODESIC||r===ln.RHUMB){let R,O;r===ln.GEODESIC?(R=D.chordLength(s,a.maximumRadius),O=Vi.numberOfPoints):(R=s,O=Vi.numberOfPointsRhumbLine);let k=Vi.extractHeights(p,a);if(l(i)){let F=1;for(c=0;c<g-1;++c)F+=O(p[c],p[c+1],R);let z=new Array(F),Q=0;for(c=0;c<g-1;++c){let H=p[c],j=p[c+1],Z=i[c],Y=O(H,j,R);if(o&&c<F){let $=i[c+1],J=rst(H,j,Z,$,Y),pe=J.length;for(u=0;u<pe;++u)z[Q++]=J[u]}else for(u=0;u<Y;++u)z[Q++]=G.clone(Z)}z[Q]=G.clone(i[i.length-1]),i=z,Gge.length=0}r===ln.GEODESIC?p=Vi.generateCartesianArc({positions:p,minDistance:R,ellipsoid:a,height:k}):p=Vi.generateCartesianRhumbArc({positions:p,granularity:R,ellipsoid:a,height:k})}g=p.length;let m=g*4-4,_=new Float64Array(m*3),y=new Float64Array(m*3),C=new Float64Array(m*3),E=new Float32Array(m*2),I=n.st?new Float32Array(m*2):void 0,b=l(i)?new Uint8Array(m*4):void 0,S=0,B=0,v=0,P=0,N;for(u=0;u<g;++u){u===0?(N=Fge,d.subtract(p[0],p[1],N),d.add(p[0],N,N)):N=p[u-1],d.clone(N,kge),d.clone(p[u],Qge),u===g-1?(N=Fge,d.subtract(p[g-1],p[g-2],N),d.add(p[g-1],N,N)):N=p[u+1],d.clone(N,Uge);let R,O;l(b)&&(u!==0&&!o?R=i[u-1]:R=i[u],u!==g-1&&(O=i[u]));let k=u===0?2:0,F=u===g-1?2:4;for(f=k;f<F;++f){d.pack(Qge,_,S),d.pack(kge,y,S),d.pack(Uge,C,S),S+=3;let z=f-2<0?-1:1;if(E[B++]=2*(f%2)-1,E[B++]=z*t,n.st&&(I[v++]=u/(g-1),I[v++]=Math.max(E[B-2],0)),l(b)){let Q=f<2?R:O;b[P++]=G.floatToByte(Q.red),b[P++]=G.floatToByte(Q.green),b[P++]=G.floatToByte(Q.blue),b[P++]=G.floatToByte(Q.alpha)}}}let L=new Cn;L.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:_}),L.prevPosition=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:y}),L.nextPosition=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:C}),L.expandAndWidth=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:E}),n.st&&(L.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:I})),l(b)&&(L.color=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:4,values:b,normalize:!0}));let A=Qe.createTypedArray(m,g*6-6),x=0,T=0,w=g-1;for(u=0;u<w;++u)A[T++]=x,A[T++]=x+2,A[T++]=x+1,A[T++]=x+1,A[T++]=x+2,A[T++]=x+3,x+=4;return new ht({attributes:L,indices:A,primitiveType:Ne.TRIANGLES,boundingSphere:le.fromPoints(p),geometryType:Hf.POLYLINES})};var Fg=bF;var sst=new si(0),ZV={},Hge=new G,ast=new Jt(G.WHITE),cst=new si(!0),lst=new si(Bn.DISABLED),ust=new si(new Gt),fst=new si(Xn.BOTH);function dst(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function hst(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function sm(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(sm.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new ge,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 dst,this._groundGeometryOptions=new hst,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=dr.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(sm.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)&&W.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}}});sm.prototype.isOutlineVisible=function(e){return!1};sm.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};sm.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new wn(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r},a;return this._materialProperty instanceof Jt&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,Hge)),l(a)||(a=G.WHITE),s.color=en.fromColor(a)),this.clampToGround?new Rt({id:t,geometry:new pE(this._groundGeometryOptions),attributes:s}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Jt&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,Hge)),l(a)||(a=G.WHITE),s.depthFailColor=en.fromColor(a)),new Rt({id:t,geometry:new Fg(this._geometryOptions),attributes:s}))};sm.prototype.createOutlineGeometryInstance=function(e){};sm.prototype.isDestroyed=function(){return!1};sm.prototype.destroy=function(){this._entitySubscription(),ue(this)};sm.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let o=this._entity.polyline;if(!l(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.positions,s=o.show;if(l(s)&&s.isConstant&&!s.getValue(Ye.MINIMUM_VALUE)||!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=o.zIndex,c=o.material??ast,u=c instanceof Jt;this._materialProperty=c,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=s??cst,this._shadowsProperty=o.shadows??lst,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??ust,this._classificationTypeProperty=o.classificationType??fst,this._fillEnabled=!0,this._zIndex=a??sst;let f=o.width,h=o.arcType,p=o.clampToGround,g=o.granularity;if(!r.isConstant||!W.isConstant(f)||!W.isConstant(h)||!W.isConstant(g)||!W.isConstant(p)||!W.isConstant(a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let m=this._geometryOptions,_=r.getValue(Ye.MINIMUM_VALUE,m.positions);if(!l(_)||_.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let y;u&&(!l(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Jt)?y=ps.VERTEX_FORMAT:y=La.VERTEX_FORMAT,m.vertexFormat=y,m.positions=_,m.width=l(f)?f.getValue(Ye.MINIMUM_VALUE):void 0,m.arcType=l(h)?h.getValue(Ye.MINIMUM_VALUE):void 0,m.granularity=l(g)?g.getValue(Ye.MINIMUM_VALUE):void 0;let C=this._groundGeometryOptions;C.positions=_,C.width=m.width,C.arcType=m.arcType,C.granularity=m.granularity,this._clampToGround=l(p)?p.getValue(Ye.MINIMUM_VALUE):!1,!this._clampToGround&&l(a)&&yt("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};sm.prototype.createDynamicUpdater=function(e,t){return new TF(e,t,this)};var PS={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function TF(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 Wge(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=ZV[n];!l(i)||i.isDestroyed()?(i=new zh,ZV[n]=i,t.add(i)):t.contains(i)||t.add(i);let o=i.add();return o.id=e._geometryUpdater._entity,e._line=o,o}TF.prototype.update=function(e){let t=this._geometryUpdater,n=t._entity,i=n.polyline,o=i.positions,r=W.getValueOrUndefined(o,e,this._positions);t._clampToGround=W.getValueOrDefault(i._clampToGround,e,!1),t._groundGeometryOptions.positions=r,t._groundGeometryOptions.width=W.getValueOrDefault(i._width,e,1),t._groundGeometryOptions.arcType=W.getValueOrDefault(i._arcType,e,ln.GEODESIC),t._groundGeometryOptions.granularity=W.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)||!W.getValueOrDefault(i._show,e,!0)||!l(r)||r.length<2)return;let h=t.fillMaterialProperty,p;if(h instanceof Jt)p=new ps;else{let g=fr.getValue(e,h,this._material);p=new La({material:g,translucent:g.isTranslucent()}),this._material=g}this._groundPolylinePrimitive=s.add(new ph({geometryInstances:t.createFillGeometryInstance(e),appearance:p,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),W.getValueOrUndefined(t.zIndex,e)),l(this._line)&&(this._line.show=!1);return}let a=Wge(this);if(!n.isShowing||!n.isAvailable(e)||!W.getValueOrDefault(i._show,e,!0)){a.show=!1;return}if(!l(r)||r.length<2){a.show=!1;return}let c=ln.GEODESIC;c=W.getValueOrDefault(i._arcType,e,c);let u=t._scene.globe,f=t._scene.ellipsoid;c!==ln.NONE&&l(u)&&(PS.ellipsoid=f,PS.positions=r,PS.granularity=W.getValueOrUndefined(i._granularity,e),PS.height=Vi.extractHeights(r,f),c===ln.GEODESIC?r=Vi.generateCartesianArc(PS):r=Vi.generateCartesianRhumbArc(PS)),a.show=!0,a.positions=r.slice(),a.material=fr.getValue(e,t.fillMaterialProperty,a.material),a.width=W.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=W.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};TF.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 le.clone(n.boundingSphere,e),mt.DONE}return l(t)&&!t.ready?mt.PENDING:mt.DONE}else{let t=Wge(this);if(t.show&&t.positions.length>0)return le.fromPoints(t.positions,e),mt.DONE}return mt.FAILED};TF.prototype.isDestroyed=function(){return!1};TF.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=ZV[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete ZV[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),ue(this)};var SF=sm;var mst=new G,pst=new Gt,Ast=new Gt;function am(e,t,n,i,o){let r;n instanceof Jt?r=ps:r=La,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new Pt,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new Pt,this.material=void 0,this.updatersWithAttributes=new Pt,this.attributes=new Pt,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(am.prototype.onMaterialChanged,this),this.subscriptions=new Pt,this.showsUpdated=new Pt,this.zIndex=i,this._asynchronous=o}am.prototype.onMaterialChanged=function(){this.invalidated=!0};am.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Jt&&t instanceof Jt?!0:l(t)&&t.equals(n)};am.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||!W.isConstant(t.distanceDisplayConditionProperty))this.updatersWithAttributes.set(i,t);else{let o=this;this.subscriptions.set(i,t.entity.definitionChanged.addEventListener(function(r,s,a,c){s==="isShowing"&&o.showsUpdated.set(t.id,t)}))}this.createPrimitive=!0};am.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)),!0}return!1};am.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0)l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n),n=new ph({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===La&&(this.material=fr.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===La&&(this.material=fr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],u=c.entity,f=this.geometry.get(c.id),h=this.attributes.get(f.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(f.id),this.attributes.set(f.id.id,h)),!c.fillMaterialProperty.isConstant){let _=c.fillMaterialProperty.color,y=W.getValueOrDefault(_,e,G.WHITE,mst);G.equals(h._lastColor,y)||(h._lastColor=G.clone(y,h._lastColor),h.color=en.toValue(y,h.color))}let p=u.isShowing&&(c.hasConstantFill||c.isFilled(e)),g=h.show[0]===1;p!==g&&(h.show=wn.toValue(p,h.show));let m=c.distanceDisplayConditionProperty;if(!W.isConstant(m)){let _=W.getValueOrDefault(m,e,Ast,pst);Gt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Gt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};am.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=o.entity,s=this.geometry.get(o.id),a=this.attributes.get(s.id.id);l(a)||(a=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,a));let c=r.isShowing,u=a.show[0]===1;c!==u&&(a.show=wn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};am.prototype.contains=function(e){return this.updaters.contains(e.id)};am.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return mt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?mt.FAILED:(i.boundingSphere.clone(t),mt.DONE)};am.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 RS(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}RS.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=W.getValueOrDefault(t.zIndex,0);for(let a=0;a<i;++a){let c=n[a];if(c.isMaterial(t)&&c.zIndex===r){c.add(e,t,o);return}}let s=new am(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)};RS.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};RS.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};RS.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return mt.FAILED};RS.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 wF=RS;var gst=[];function jge(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function Yge(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 o=0;l(n.depthFailMaterialProperty)&&(o=n.depthFailMaterialProperty instanceof Jt?1:2);let r;l(i)&&(r=i+o*Bn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Jt?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function gp(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 Pt,this._removedObjects=new Pt,this._changedObjects=new Pt;let o,r=Bn.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(r*3),this._materialBatches=new Array(r*3),o=0;o<r;++o)this._colorBatches[o]=new Rd(n,ps,void 0,!1,o),this._materialBatches[o]=new Md(n,La,void 0,!1,o),this._colorBatches[o+r]=new Rd(n,ps,ps,!1,o),this._materialBatches[o+r]=new Md(n,La,ps,!1,o),this._colorBatches[o+r*2]=new Rd(n,ps,La,!1,o),this._materialBatches[o+r*2]=new Md(n,La,La,!1,o);this._dynamicBatch=new X0(n,i);let s=Xn.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new wF(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new Pt,this._updaters=new Pt,this._entityCollection=t,t.collectionChanged.addEventListener(gp.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,gst)}gp.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.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?(jge(this,f),Yge(this,e,f)):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],u=c.id,f=this._updaters.get(u),jge(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 SF(c,this._scene),this._updaters.set(u,f),Yge(this,e,f),this._subscriptions.set(u,f.geometryChanged.addEventListener(gp._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0,p=this._batches,g=p.length;for(a=0;a<g;a++)h=p[a].update(e)&&h;return h};var _st=[],yst=new le;gp.prototype.getBoundingSphere=function(e,t){let n=_st,i=yst,o=0,r=mt.DONE,s=this._batches,a=s.length,c=this._updaters.get(e.id);for(let u=0;u<a;u++){if(r=s[u].getBoundingSphere(c,i),r===mt.PENDING)return mt.PENDING;r===mt.DONE&&(n[o]=le.clone(i,n[o]),o++)}return o===0?mt.FAILED:(n.length=o,le.fromBoundingSpheres(n,t),mt.DONE)};gp.prototype.isDestroyed=function(){return!1};gp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(gp.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(),ue(this)};gp._onGeometryChanged=function(e){let t=this._removedObjects,n=this._changedObjects,i=e.entity,o=i.id;!l(t.get(o))&&!l(n.get(o))&&n.set(o,i)};gp.prototype._onCollectionChanged=function(e,t,n){let i=this._addedObjects,o=this._removedObjects,r=this._changedObjects,s,a,c;for(s=n.length-1;s>-1;s--)c=n[s],a=c.id,i.remove(a)||(o.set(a,c),r.remove(a));for(s=t.length-1;s>-1;s--)c=t[s],a=c.id,o.remove(a)?r.set(a,c):i.set(a,c)};var BF=gp;function Eu(e){dl.initializeTerrainHeights(),ph.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new Dr,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??Eu.defaultVisualizersCallback;let i=!1,o=new Ol,r=new Ol;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let u=0,f=n.length;u<f;u++)this._onDataSourceAdded(n,n.get(u));let s=new wO;this._onDataSourceAdded(void 0,s),this._defaultDataSource=s;let a,c;if(!i){let u=this,f=function(){t.primitives.add(o),t.groundPrimitives.add(r),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 MS=[];Eu.registerVisualizer=function(e){MS.includes(e)||MS.push(e)};Eu.unregisterVisualizer=function(e){if(MS.includes(e)){let t=MS.indexOf(e);MS.splice(t,1)}};Eu.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new EP(t,i),new gF(e,i,n._primitives,n._groundPrimitives),new _F(t,i),new yF(e,i),new dO(e,i),new xF(t,i),new EF(e,i),new BF(e,i,n._primitives,n._groundPrimitives),...MS.map(o=>new o(e,i))]};Object.defineProperties(Eu.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}}});Eu.prototype.isDestroyed=function(){return!1};Eu.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)),ue(this)};Eu.prototype.update=function(e){if(!Ii.initialized)return this._ready=!1,!1;let t=!0,n,i,o,r,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),o=c._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t}for(o=this._defaultDataSource._visualizers,r=o.length,i=0;i<r;i++)t=o[i].update(e)&&t;return!this._ready&&t&&this._scene.requestRender(),this._ready=this._ready||t,t};Eu.prototype._postRender=function(){let e=this._scene.frameState,t=this._dataSourceCollection,n=t.length;for(let i=0;i<n;i++){let o=t.get(i),r=o.credit;l(r)&&e.creditDisplay.addCreditToNextFrame(r);let s=o._resourceCredits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)e.creditDisplay.addCreditToNextFrame(s[c])}}};var Cst=[],Est=new le;Eu.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return mt.PENDING;let i,o,r=this._defaultDataSource;if(!r.entities.contains(e)){r=void 0;let p=this._dataSourceCollection;for(o=p.length,i=0;i<o;i++){let g=p.get(i);if(g.entities.contains(e)){r=g;break}}}if(!l(r))return mt.FAILED;let s=Cst,a=Est,c=0,u=mt.DONE,f=r._visualizers,h=f.length;for(i=0;i<h;i++){let p=f[i];if(l(p.getBoundingSphere)){if(u=f[i].getBoundingSphere(e,a),!t&&u===mt.PENDING)return mt.PENDING;u===mt.DONE&&(s[c]=le.clone(a,s[c]),c++)}}return c===0?mt.FAILED:(s.length=c,le.fromBoundingSpheres(s,n),mt.DONE)};Eu.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new Ol),s=o.add(new zO);t._primitives=r,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)};Eu.prototype._onDataSourceRemoved=function(e,t){let n=this._primitives,i=this._groundPrimitives,o=t._primitives,r=t._groundPrimitives,s=t.clustering;o.remove(s);let a=t._visualizers,c=a.length;for(let u=0;u<c;u++)a[u].destroy();n.remove(o),i.remove(r),t._visualizers=void 0};Eu.prototype._onDataSourceMoved=function(e,t,n){let i=this._primitives,o=this._groundPrimitives,r=e._primitives,s=e._groundPrimitives;t===n+1?(i.raise(r),o.raise(s)):t===n-1?(i.lower(r),o.lower(s)):t===0?(i.lowerToBottom(r),o.lowerToBottom(s),i.raise(r),o.raise(s)):(i.raiseToTop(r),o.raiseToTop(s))};var DF=Eu;function l7(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}l7.clone=function(e,t){if(l(e))return l(t)||(t=new l7),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var Ld=l7;var qge=new X,Kge=new X,Xge=new X,Ist=new M,$V=new d,Jge=new d,u7=new d,f7=new d,Zge=new d,$ge=new d,xst=new Fe,bst=new d,Tst=new X,NS=new K,Sst=1.25;function wst(e,t,n,i,o,r,s,a,c,u){let f=e.scene.mode,h=o.getValue(c,e._lastCartesian);if(l(h)){let p=!1,g=!1,m,_,y;if(f===oe.SCENE3D){K.addSeconds(c,.001,NS);let v=o.getValue(NS,$V);if(l(v)||(K.addSeconds(c,-.001,NS),v=o.getValue(NS,$V),g=!0),l(v)){let P=Qt.computeFixedToIcrfMatrix(c,qge),N=Qt.computeFixedToIcrfMatrix(NS,Kge),L;!l(P)||!l(N)?(L=Qt.computeTemeToPseudoFixedMatrix(c,Xge),P=X.transpose(L,qge),N=Qt.computeTemeToPseudoFixedMatrix(NS,Kge),X.transpose(N,N)):L=X.transpose(P,Xge);let A=X.multiplyByVector(P,h,Zge),x=X.multiplyByVector(N,v,$ge);d.subtract(A,x,f7);let T=d.magnitude(f7)*1e3,w=D.GRAVITATIONALPARAMETER,R=-w/(T*T-2*w/d.magnitude(A));R<0||R>Sst*u.maximumRadius?(m=Jge,d.normalize(h,m),d.negate(m,m),y=d.clone(d.UNIT_Z,u7),_=d.cross(y,m,$V),d.magnitude(_)>D.EPSILON7&&(d.normalize(m,m),d.normalize(_,_),y=d.cross(m,_,u7),d.normalize(y,y),p=!0)):d.equalsEpsilon(h,v,D.EPSILON7)||(y=Jge,d.normalize(A,y),d.normalize(x,x),_=d.cross(y,x,u7),g&&(_=d.multiplyByScalar(_,-1,_)),d.equalsEpsilon(_,d.ZERO,D.EPSILON7)||(m=d.cross(_,y,$V),X.multiplyByVector(L,m,m),X.multiplyByVector(L,_,_),X.multiplyByVector(L,y,y),d.normalize(m,m),d.normalize(_,_),d.normalize(y,y),p=!0))}}l(e.boundingSphere)&&(h=e.boundingSphere.center);let C,E,I;i&&(C=d.clone(t.position,f7),E=d.clone(t.direction,Zge),I=d.clone(t.up,$ge));let b=Ist,S;l(s)&&(S=s.getValue(c,xst));let B=r.getValue(c,bst);if(a===hA.INERTIAL&&l(S))M.fromTranslationQuaternionRotationScale(h,S,d.ONE,b);else if(a===hA.VELOCITY&&l(B)){let v=Qt.rotationMatrixFromPositionVelocity(h,B,u,Tst);M.fromRotationTranslation(v,h,b)}else a===hA.ENU||!p?Qt.eastNorthUpToFixedFrame(h,u,b):(b[0]=m.x,b[1]=m.y,b[2]=m.z,b[3]=0,b[4]=_.x,b[5]=_.y,b[6]=_.z,b[7]=0,b[8]=y.x,b[9]=y.y,b[10]=y.z,b[11]=0,b[12]=h.x,b[13]=h.y,b[14]=h.z,b[15]=0);t._setTransform(b),i&&(d.clone(C,t.position),d.clone(E,t.direction),d.clone(I,t.up),d.cross(E,I,t.right))}if(n){let p=f===oe.SCENE2D||d.equals(e._offset3D,d.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function vF(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=n??ne.default,this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new d,this._defaultOffset3D=void 0,this._velocityProperty=new Pg(e.position,!0),this._offset3D=new d}Object.defineProperties(vF,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=d.clone(e,new d)}}});vF.defaultOffset3D=new d(-14e3,3500,3500);var e4=new Ld,Bst=new d;vF.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===oe.MORPHING)return;let r=this.entity,s=r.trackingReferenceFrame,a=r.position;if(!l(a))return;let c=this._velocityProperty,u=r.orientation,f=r!==this._lastEntity,h=o!==this._mode,p=n.camera,g=f||h,m=!0;if(f){let _=r.viewFrom,y=l(_);if(!y&&l(t)){e4.pitch=-D.PI_OVER_FOUR,e4.range=0;let C=a.getValue(e,Bst);if(l(C)){let E=2-1/Math.max(1,d.magnitude(C)/i.maximumRadius);e4.pitch*=E}p.viewBoundingSphere(t,e4),this.boundingSphere=t,g=!1,m=!1}else(!y||!l(_.getValue(e,this._offset3D)))&&d.clone(vF._defaultOffset3D,this._offset3D)}else!h&&this._mode!==oe.SCENE2D&&d.clone(p.position,this._offset3D);this._lastEntity=r,this._mode=o,wst(this,p,g,m,a,c,u,s,e,i)};var PF=vF;function MF(){this._cache={}}MF.prototype.fromColor=function(e,t){return t4(void 0,void 0,e,t,this._cache)};MF.prototype.fromUrl=function(e,t,n){return t4(e,void 0,t,n,this._cache)};MF.prototype.fromMakiIconId=function(e,t,n){return t4(fn(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};MF.prototype.fromText=function(e,t,n){return t4(void 0,e,t,n,this._cache)};var Dst=new G;function vst(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,Dst).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 e_e(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=G.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=G.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}var RF=new Array(4);function t4(e,t,n,i,o){RF[0]=e,RF[1]=t,RF[2]=n,RF[3]=i;let r=JSON.stringify(RF),s=o[r];if(l(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let c=a.getContext("2d");if(vst(c,n,i),l(e)){let f=we.createIfNeeded(e).fetchImage().then(function(h){return e_e(c,h,i),o[r]=a,a});return o[r]=f,f}else if(l(t)){let u=E0(t,{font:`bold ${i}px sans-serif`});e_e(c,u,i)}return o[r]=a,a}var Qg=MF;var i_e=br(n_e(),1);function i4(e){return d.fromDegrees(e[0],e[1],e[2])}var d7={"urn:ogc:def:crs:OGC:1.3:CRS84":i4,"EPSG:4326":i4,"urn:ogc:def:crs:EPSG::4326":i4},o_e={},r_e={},h7=48,m7,p7=G.ROYALBLUE,A7=G.YELLOW,g7=2,_7=G.fromBytes(255,255,0,100),y7=!1,Pst={small:24,medium:48,large:64},Rst=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function s_e(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||Rst.indexOf(i)!==-1)continue;let o=e[i];l(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${s_e(o)}</td></tr>`:n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}return n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function Mst(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function Nst(e,t){return new Ch(Mst(s_e,e,t),!0)}function o4(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=qn();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let s,a=r.title;if(l(a))o.name=a,s="title";else{let u=Number.MAX_VALUE;for(let f in r)if(r.hasOwnProperty(f)&&r[f]){let h=f.toLowerCase();if(u>1&&h==="title"){u=1,s=f;break}else u>2&&h==="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)&&(o.name=r[s])}let c=r.description;c!==null&&(o.description=l(c)?new si(c):n(r,s))}return o}function C7(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var a_e={Feature:l_e,FeatureCollection:Lst,GeometryCollection:u_e,LineString:p_e,MultiLineString:A_e,MultiPoint:h_e,MultiPolygon:y_e,Point:d_e,Polygon:__e,Topology:C_e},c_e={GeometryCollection:u_e,LineString:p_e,MultiLineString:A_e,MultiPoint:h_e,MultiPolygon:y_e,Point:d_e,Polygon:__e,Topology:C_e};function l_e(e,t,n,i,o){if(t.geometry===null){o4(t,e._entityCollection,o.describe);return}if(!l(t.geometry))throw new ce("feature.geometry is required.");let r=t.geometry.type,s=c_e[r];if(!l(s))throw new ce(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function Lst(e,t,n,i,o){let r=t.features;for(let s=0,a=r.length;s<a;s++)l_e(e,r[s],void 0,i,o)}function u_e(e,t,n,i,o){let r=n.geometries;for(let s=0,a=r.length;s<a;s++){let c=r[s],u=c.type,f=c_e[u];if(!l(f))throw new ce(`Unknown geometry type: ${u}`);f(e,t,c,i,o)}}function f_e(e,t,n,i,o){let r=o.markerSymbol,s=o.markerColor,a=o.markerSize,c=t.properties;if(l(c)){let g=c["marker-color"];l(g)&&(s=G.fromCssColorString(g)),a=Pst[c["marker-size"]]??a;let m=c["marker-symbol"];l(m)&&(r=m)}let u;l(r)?r.length===1?u=e._pinBuilder.fromText(r.toUpperCase(),s,a):u=e._pinBuilder.fromMakiIconId(r,s,a):u=e._pinBuilder.fromColor(s,a);let f=new Pc;f.verticalOrigin=new si(Hn.BOTTOM),i.length===2&&o.clampToGround&&(f.heightReference=Ze.CLAMP_TO_GROUND);let h=o4(t,e._entityCollection,o.describe);h.billboard=f,h.position=new ml(n(i));let p=Promise.resolve(u).then(function(g){f.image=new si(g)}).catch(function(){f.image=new si(e._pinBuilder.fromColor(s,a))});e._promises.push(p)}function d_e(e,t,n,i,o){f_e(e,t,i,n.coordinates,o)}function h_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)f_e(e,t,i,r[s],o)}function m_e(e,t,n,i,o){let r=o.strokeMaterialProperty,s=o.strokeWidthProperty,a=t.properties;if(l(a)){let f=a["stroke-width"];l(f)&&(s=new si(f));let h,p=a.stroke;l(p)&&(h=G.fromCssColorString(p));let g=a["stroke-opacity"];l(g)&&g!==1&&(l(h)||(h=r.color.getValue().clone()),h.alpha=g),l(h)&&(r=new Jt(h))}let c=o4(t,e._entityCollection,o.describe),u=new Mc;c.polyline=u,u.clampToGround=o.clampToGround,u.material=r,u.width=s,u.positions=new si(C7(i,n)),u.arcType=ln.RHUMB}function p_e(e,t,n,i,o){m_e(e,t,i,n.coordinates,o)}function A_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)m_e(e,t,i,r[s],o)}function g_e(e,t,n,i,o){if(i.length===0||i[0].length===0)return;let r=o.strokeMaterialProperty.color,s=o.fillMaterialProperty,a=o.strokeWidthProperty,c=t.properties;if(l(c)){let g=c["stroke-width"];l(g)&&(a=new si(g));let m,_=c.stroke;l(_)&&(m=G.fromCssColorString(_));let y=c["stroke-opacity"];l(y)&&y!==1&&(l(m)||(m=r.getValue().clone()),m.alpha=y),l(m)&&(r=new si(m));let C,E=c.fill,I=s.color.getValue();l(E)&&(C=G.fromCssColorString(E),C.alpha=I.alpha),y=c["fill-opacity"],l(y)&&y!==I.alpha&&(l(C)||(C=I.clone()),C.alpha=y),l(C)&&(s=new Jt(C))}let u=new _h;u.outline=new si(!0),u.outlineColor=r,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 uc(C7(i[g],n)));let h=i[0];u.hierarchy=new si(new uc(C7(h,n),f)),h[0].length>2?u.perPositionHeight=new si(!0):o.clampToGround||(u.height=0);let p=o4(t,e._entityCollection,o.describe);p.polygon=u}function __e(e,t,n,i,o){g_e(e,t,i,n.coordinates,o)}function y_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)g_e(e,t,i,r[s],o)}function C_e(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let s=i_e.feature(n,n.objects[r]),a=a_e[s.type];a(e,s,s,i,o)}}function Hy(e){this._name=e,this._changed=new ge,this._error=new ge,this._isLoading=!1,this._loading=new ge,this._entityCollection=new ya(this),this._promises=[],this._pinBuilder=new Qg,this._entityCluster=new uf,this._credit=void 0,this._resourceCredits=[]}Hy.load=function(e,t){return new Hy().load(e,t)};Object.defineProperties(Hy,{markerSize:{get:function(){return h7},set:function(e){h7=e}},markerSymbol:{get:function(){return m7},set:function(e){m7=e}},markerColor:{get:function(){return p7},set:function(e){p7=e}},stroke:{get:function(){return A7},set:function(e){A7=e}},strokeWidth:{get:function(){return g7},set:function(e){g7=e}},fill:{get:function(){return _7},set:function(e){_7=e}},clampToGround:{get:function(){return y7},set:function(e){y7=e}},crsNames:{get:function(){return d7}},crsLinkHrefs:{get:function(){return o_e}},crsLinkTypes:{get:function(){return r_e}}});Object.defineProperties(Hy.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}}});Hy.prototype.load=function(e,t){return E_e(this,e,t,!0)};Hy.prototype.process=function(e,t){return E_e(this,e,t,!1)};function E_e(e,t,n,i){as.setLoading(e,!0),n=n??V.EMPTY_OBJECT;let o=n.credit;typeof o=="string"&&(o=new Bt(o)),e._credit=o;let r=t,s=n.sourceUri;if(typeof t=="string"||t instanceof we){t=we.createIfNeeded(t),r=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??Nst,markerSize:n.markerSize??h7,markerSymbol:n.markerSymbol??m7,markerColor:n.markerColor??p7,strokeWidthProperty:new si(n.strokeWidth??g7),strokeMaterialProperty:new Jt(n.stroke??A7),fillMaterialProperty:new Jt(n.fill??_7),clampToGround:n.clampToGround??y7},Promise.resolve(r).then(function(a){return Ost(e,a,n,s,i)}).catch(function(a){throw as.setLoading(e,!1),e._error.raiseEvent(e,a),a})}Hy.prototype.update=function(e){return!0};function Ost(e,t,n,i,o){let r;l(i)&&(r=Tg(i)),l(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let s=a_e[t.type];if(!l(s))throw new ce(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,c=a!==null?i4:null;if(l(a)){if(!l(a.properties))throw new ce("crs.properties is undefined.");let u=a.properties;if(a.type==="name"){if(c=d7[u.name],!l(c))throw new ce(`Unknown crs name: ${u.name}`)}else if(a.type==="link"){let f=o_e[u.href];if(l(f)||(f=r_e[u.type]),!l(f))throw new ce(`Unable to resolve crs link: ${JSON.stringify(u)}`);c=f(u)}else if(a.type==="EPSG"){if(c=d7[`EPSG:${u.code}`],!l(c))throw new ce(`Unknown crs EPSG code: ${u.code}`)}else throw new ce(`Unknown crs type: ${a.type}`)}return Promise.resolve(c).then(function(u){return o&&e._entityCollection.removeAll(),u!==null&&s(e,t,t,u,n),Promise.all(e._promises).then(function(){return e._promises.length=0,as.setLoading(e,!1),e})})}var Wy=Hy;var bye=br(Y7(),1);var Tye;typeof DOMParser<"u"&&(Tye=new DOMParser);var Klt=new bye.default({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),b4=32,Aye=2414016,gye=1,_ye=16093e3,yye=.1,Xlt=[null,void 0,"http://www.topografix.com/GPX/1/1"],zo={gpx:Xlt};function Jlt(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 q7(e,t){let n=FF(e,"id");return n=l(n)?n:qn(),t.getOrCreateEntity(n)}function K7(e){let t=Cye(e,"lon"),n=Cye(e,"lat"),i=LF(e,"ele",zo.gpx);return d.fromDegrees(t,n,i)}function Cye(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 FF(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function qy(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function X7(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagName(t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function LF(e,t,n){let i=qy(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Iu(e,t,n){let i=qy(e,t,n);if(l(i))return i.textContent.trim()}function Sye(e){let t=new Pc;return t.width=b4,t.height=b4,t.scaleByDistance=new Kt(Aye,gye,_ye,yye),t.pixelOffsetScaleByDistance=new Kt(Aye,gye,_ye,yye),t.verticalOrigin=new si(Hn.BOTTOM),t.image=e,t}function Zlt(){let e=new gh;return e.translucencyByDistance=new Kt(3e6,1,5e6,0),e.pixelOffset=new U(17,0),e.horizontalOrigin=vi.LEFT,e.font="16px sans-serif",e.style=ir.FILL_AND_OUTLINE,e}function wye(e){let t=new Mc;return t.width=4,t.material=new Ry,t.material.color=l(e)?e:G.RED,t.material.outlineWidth=2,t.material.outlineColor=G.BLACK,t}var Eye={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"}},OF;typeof document<"u"&&(OF=document.createElement("div"));function J7(e,t){let n,i="",o=Object.keys(Eye),r=o.length;for(n=0;n<r;n++){let f=o[n],h=Eye[f];h.value=Iu(e,h.tag,zo.gpx)??"",l(h.value)&&h.value!==""&&(i=`${i}<p>${h.text}: ${h.value}</p>`)}if(!l(i)||i==="")return;i=Klt.link(i),OF.innerHTML=i;let s=OF.querySelectorAll("a");for(n=0;n<s.length;n++)s[n].setAttribute("target","_blank");let a=G.WHITE,c=G.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+=`${OF.innerHTML}</div>`,OF.innerHTML="",u}function Bye(e,t,n,i){let o=K7(t),r=q7(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",G.RED,b4);r.billboard=Sye(s);let a=Iu(t,"name",zo.gpx);r.name=a,r.label=Zlt(),r.label.text=a,r.description=J7(t,r),i.clampToGround&&(r.billboard.heightReference=Ze.CLAMP_TO_GROUND,r.label.heightReference=Ze.CLAMP_TO_GROUND)}function $lt(e,t,n,i){let o=q7(t,n);o.description=J7(t,o);let r=X7(t,"rtept",zo.gpx),s=new Array(r.length);for(let a=0;a<r.length;a++)Bye(e,r[a],n,i),s[a]=K7(r[a]);o.polyline=wye(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=s}function eut(e,t,n,i){let o=q7(t,n);o.description=J7(t,o);let r=X7(t,"trkseg",zo.gpx),s=[],a=[],c,u=!0,f=new Ha;for(let h=0;h<r.length;h++)c=tut(r[h]),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 h=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",G.RED,b4);o.billboard=Sye(h),o.position=f,i.clampToGround&&(o.billboard.heightReference=Ze.CLAMP_TO_GROUND),o.availability=new ss,o.availability.addInterval(new Rn({start:a[0],stop:a[a.length-1]}))}o.polyline=wye(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function tut(e){let t={positions:[],times:[]},n=X7(e,"trkpt",zo.gpx),i;for(let o=0;o<n.length;o++){let r=K7(n[o]);t.positions.push(r),i=Iu(n[o],"time",zo.gpx),l(i)&&t.times.push(K.fromIso8601(i))}return t}function nut(e){let t=qy(e,"metadata",zo.gpx);if(l(t)){let n={name:Iu(t,"name",zo.gpx),desc:Iu(t,"desc",zo.gpx),author:iut(t),copyright:rut(t),link:Dye(t),time:Iu(t,"time",zo.gpx),keywords:Iu(t,"keywords",zo.gpx),bounds:sut(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 iut(e){let t=qy(e,"author",zo.gpx);if(l(t)){let n={name:Iu(t,"name",zo.gpx),email:out(t),link:Dye(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function out(e){let t=qy(e,"email",zo.gpx);if(l(t)){let n=Iu(t,"id",zo.gpx),i=Iu(t,"domain",zo.gpx);return`${n}@${i}`}}function Dye(e){let t=qy(e,"link",zo.gpx);if(l(t)){let n={href:FF(t,"href"),text:Iu(t,"text",zo.gpx),mimeType:Iu(t,"type",zo.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function rut(e){let t=qy(e,"copyright",zo.gpx);if(l(t)){let n={author:FF(t,"author"),year:Iu(t,"year",zo.gpx),license:Iu(t,"license",zo.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function sut(e){let t=qy(e,"bounds",zo.gpx);if(l(t)){let n={minLat:LF(t,"minlat",zo.gpx),maxLat:LF(t,"maxlat",zo.gpx),minLon:LF(t,"minlon",zo.gpx),maxLon:LF(t,"maxlon",zo.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var Iye={wpt:Bye,rte:$lt,trk:eut};function aut(e,t,n,i){let o=Object.keys(Iye),r=o.length;for(let s=0;s<r;s++){let a=o[s],c=Iye[a],u=t.childNodes,f=u.length;for(let h=0;h<f;h++){let p=u[h];p.localName===a&&zo.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function xye(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=FF(o,"version"),s=FF(o,"creator"),a,c=nut(o);l(c)&&(a=c.name),o.localName==="gpx"?aut(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let u,f=i.computeAvailability(),h=f.start,p=f.stop,g=K.equals(h,Ye.MINIMUM_VALUE),m=K.equals(p,Ye.MAXIMUM_VALUE);if(!g||!m){let y;g&&(y=new Date,y.setHours(0,0,0,0),h=K.fromDate(y)),m&&(y=new Date,y.setHours(24,0,0,0),p=K.fromDate(y)),u=new $h,u.startTime=h,u.stopTime=p,u.currentTime=K.clone(h),u.clockRange=cs.LOOP_STOP,u.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,u.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(p,h)/60,1),31556900))}let _=!1;return e._name!==a&&(e._name=a,_=!0),e._creator!==s&&(e._creator=s,_=!0),cut(e._metadata,c)&&(e._metadata=c,_=!0),e._version!==r&&(e._version=r,_=!0),u!==e._clock&&(_=!0,e._clock=u),_&&e._changed.raiseEvent(e),as.setLoading(e,!1),e}function cut(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 lut(e,t,n,i){i=i??V.EMPTY_OBJECT;let o=n;if(typeof n=="string"||n instanceof we){n=we.createIfNeeded(n),o=n.fetchBlob();let r=e._resourceCredits,s=n.credits;if(l(s)){let a=s.length;for(let c=0;c<a;c++)r.push(s[c])}}return Promise.resolve(o).then(function(r){return r instanceof Blob?Jlt(r).then(function(s){let a,c;try{a=Tye.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 ce(u)}return xye(e,a,i)}):xye(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function GS(){this._changed=new ge,this._error=new ge,this._loading=new ge,this._clock=void 0,this._entityCollection=new ya(this),this._entityCluster=new uf,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new Qg}GS.load=function(e,t){return new GS().load(e,t)};Object.defineProperties(GS.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}}});GS.prototype.update=function(e){return!0};GS.prototype.load=function(e,t){if(!l(e))throw new he("data is required.");t=t??V.EMPTY_OBJECT,as.setLoading(this,!0);let n=this._name,i=this;return lut(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=K.equals(s,Ye.MINIMUM_VALUE),u=K.equals(a,Ye.MAXIMUM_VALUE);if(!c||!u){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=K.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=K.fromDate(h)),o=new $h,o.startTime=s,o.stopTime=a,o.currentTime=K.clone(s),o.clockRange=cs.LOOP_STOP,o.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(a,s)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),as.setLoading(i,!1),i}).catch(function(o){return as.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var QF=GS;function uut(e,t){this.position=e,this.headingPitchRoll=t}var kF=uut;var fEe=br(Y7(),1),l2=br(Ou(),1);function P4(e){return R4(e.map(([t,n])=>new Array(t).fill(n,0,t)))}function R4(e){return e.reduce((t,n)=>t.concat(Array.isArray(n)?R4(n):n),[])}var vye=[0,1,2,3].concat(...P4([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Pr(){let e=this;function t(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,u=e.stat_desc.max_length,f,h,p,g,m,_,y=0;for(g=0;g<=15;g++)o.bl_count[g]=0;for(r[o.heap[o.heap_max]*2+1]=0,f=o.heap_max+1;f<573;f++)h=o.heap[f],g=r[r[h*2+1]*2+1]+1,g>u&&(g=u,y++),r[h*2+1]=g,!(h>e.max_code)&&(o.bl_count[g]++,m=0,h>=c&&(m=a[h-c]),_=r[h*2],o.opt_len+=_*(g+m),s&&(o.static_len+=_*(s[h*2+1]+m)));if(y!==0){do{for(g=u-1;o.bl_count[g]===0;)g--;o.bl_count[g]--,o.bl_count[g+1]+=2,o.bl_count[u]--,y-=2}while(y>0);for(g=u;g!==0;g--)for(h=o.bl_count[g];h!==0;)p=o.heap[--f],!(p>e.max_code)&&(r[p*2+1]!=g&&(o.opt_len+=(g-r[p*2+1])*r[p*2],r[p*2+1]=g),h--)}}function n(o,r){let s=0;do s|=o&1,o>>>=1,s<<=1;while(--r>0);return s>>>1}function i(o,r,s){let a=[],c=0,u,f,h;for(u=1;u<=15;u++)a[u]=c=c+s[u-1]<<1;for(f=0;f<=r;f++)h=o[f*2+1],h!==0&&(o[f*2]=n(a[h]++,h))}e.build_tree=function(o){let r=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems,c,u,f=-1,h;for(o.heap_len=0,o.heap_max=573,c=0;c<a;c++)r[c*2]!==0?(o.heap[++o.heap_len]=f=c,o.depth[c]=0):r[c*2+1]=0;for(;o.heap_len<2;)h=o.heap[++o.heap_len]=f<2?++f:0,r[h*2]=1,o.depth[h]=0,o.opt_len--,s&&(o.static_len-=s[h*2+1]);for(e.max_code=f,c=Math.floor(o.heap_len/2);c>=1;c--)o.pqdownheap(r,c);h=a;do c=o.heap[1],o.heap[1]=o.heap[o.heap_len--],o.pqdownheap(r,1),u=o.heap[1],o.heap[--o.heap_max]=c,o.heap[--o.heap_max]=u,r[h*2]=r[c*2]+r[u*2],o.depth[h]=Math.max(o.depth[c],o.depth[u])+1,r[c*2+1]=r[u*2+1]=h,o.heap[1]=h++,o.pqdownheap(r,1);while(o.heap_len>=2);o.heap[--o.heap_max]=o.heap[1],t(o),i(r,e.max_code,o.bl_count)}}Pr._length_code=[0,1,2,3,4,5,6,7].concat(...P4([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));Pr.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];Pr.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];Pr.d_code=function(e){return e<256?vye[e]:vye[256+(e>>>7)]};Pr.extra_lbits=[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];Pr.extra_dbits=[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];Pr.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];Pr.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ac(e,t,n,i,o){let r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=o}var fut=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],dut=P4([[144,8],[112,9],[24,7],[8,8]]);Ac.static_ltree=R4(fut.map((e,t)=>[e,dut[t]]));var hut=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],mut=P4([[30,5]]);Ac.static_dtree=R4(hut.map((e,t)=>[e,mut[t]]));Ac.static_l_desc=new Ac(Ac.static_ltree,Pr.extra_lbits,257,286,15);Ac.static_d_desc=new Ac(Ac.static_dtree,Pr.extra_dbits,0,30,15);Ac.static_bl_desc=new Ac(null,Pr.extra_blbits,0,19,7);var put=9,Aut=8;function Ip(e,t,n,i,o){let r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=o}var Rye=0,D4=1,AI=2,fm=[new Ip(0,0,0,0,Rye),new Ip(4,4,8,4,D4),new Ip(4,5,16,8,D4),new Ip(4,6,32,32,D4),new Ip(4,4,16,16,AI),new Ip(8,16,32,32,AI),new Ip(8,16,128,128,AI),new Ip(8,32,128,256,AI),new Ip(32,128,258,1024,AI),new Ip(32,258,258,4096,AI)],T4=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Fd=0,S4=1,UF=2,w4=3,gut=32,Z7=42,B4=113,GF=666,$7=8,_ut=0,eK=1,yut=2,jr=3,v4=258,Cf=v4+jr+1;function Pye(e,t,n,i){let o=e[t*2],r=e[n*2];return o<r||o==r&&i[t]<=i[n]}function Cut(){let e=this,t,n,i,o,r,s,a,c,u,f,h,p,g,m,_,y,C,E,I,b,S,B,v,P,N,L,A,x,T,w,R,O,k,F=new Pr,z=new Pr,Q=new Pr;e.depth=[];let H,j,Z,Y,$,J;e.bl_count=[],e.heap=[],R=[],O=[],k=[];function pe(){u=2*r,h[g-1]=0;for(let ke=0;ke<g-1;ke++)h[ke]=0;L=fm[A].max_lazy,T=fm[A].good_length,w=fm[A].nice_length,N=fm[A].max_chain,S=0,C=0,v=0,E=P=jr-1,b=0,p=0}function Ce(){let ke;for(ke=0;ke<286;ke++)R[ke*2]=0;for(ke=0;ke<30;ke++)O[ke*2]=0;for(ke=0;ke<19;ke++)k[ke*2]=0;R[256*2]=1,e.opt_len=e.static_len=0,j=Z=0}function fe(){F.dyn_tree=R,F.stat_desc=Ac.static_l_desc,z.dyn_tree=O,z.stat_desc=Ac.static_d_desc,Q.dyn_tree=k,Q.stat_desc=Ac.static_bl_desc,$=0,J=0,Y=8,Ce()}e.pqdownheap=function(ke,ct){let Xe=e.heap,et=Xe[ct],pt=ct<<1;for(;pt<=e.heap_len&&(pt<e.heap_len&&Pye(ke,Xe[pt+1],Xe[pt],e.depth)&&pt++,!Pye(ke,et,Xe[pt],e.depth));)Xe[ct]=Xe[pt],ct=pt,pt<<=1;Xe[ct]=et};function ye(ke,ct){let Xe=-1,et,pt=ke[0*2+1],Zt=0,Tn=7,Bo=4;pt===0&&(Tn=138,Bo=3),ke[(ct+1)*2+1]=65535;for(let lo=0;lo<=ct;lo++)et=pt,pt=ke[(lo+1)*2+1],!(++Zt<Tn&&et==pt)&&(Zt<Bo?k[et*2]+=Zt:et!==0?(et!=Xe&&k[et*2]++,k[16*2]++):Zt<=10?k[17*2]++:k[18*2]++,Zt=0,Xe=et,pt===0?(Tn=138,Bo=3):et==pt?(Tn=6,Bo=3):(Tn=7,Bo=4))}function Ie(){let ke;for(ye(R,F.max_code),ye(O,z.max_code),Q.build_tree(e),ke=18;ke>=3&&k[Pr.bl_order[ke]*2+1]===0;ke--);return e.opt_len+=3*(ke+1)+5+5+4,ke}function ve(ke){e.pending_buf[e.pending++]=ke}function be(ke){ve(ke&255),ve(ke>>>8&255)}function ze(ke){ve(ke>>8&255),ve(ke&255&255)}function We(ke,ct){let Xe,et=ct;J>16-et?(Xe=ke,$|=Xe<<J&65535,be($),$=Xe>>>16-J,J+=et-16):($|=ke<<J&65535,J+=et)}function tt(ke,ct){let Xe=ke*2;We(ct[Xe]&65535,ct[Xe+1]&65535)}function Mt(ke,ct){let Xe,et=-1,pt,Zt=ke[0*2+1],Tn=0,Bo=7,lo=4;for(Zt===0&&(Bo=138,lo=3),Xe=0;Xe<=ct;Xe++)if(pt=Zt,Zt=ke[(Xe+1)*2+1],!(++Tn<Bo&&pt==Zt)){if(Tn<lo)do tt(pt,k);while(--Tn!==0);else pt!==0?(pt!=et&&(tt(pt,k),Tn--),tt(16,k),We(Tn-3,2)):Tn<=10?(tt(17,k),We(Tn-3,3)):(tt(18,k),We(Tn-11,7));Tn=0,et=pt,Zt===0?(Bo=138,lo=3):pt==Zt?(Bo=6,lo=3):(Bo=7,lo=4)}}function kt(ke,ct,Xe){let et;for(We(ke-257,5),We(ct-1,5),We(Xe-4,4),et=0;et<Xe;et++)We(k[Pr.bl_order[et]*2+1],3);Mt(R,ke-1),Mt(O,ct-1)}function Oe(){J==16?(be($),$=0,J=0):J>=8&&(ve($&255),$>>>=8,J-=8)}function _n(){We(eK<<1,3),tt(256,Ac.static_ltree),Oe(),1+Y+10-J<9&&(We(eK<<1,3),tt(256,Ac.static_ltree),Oe()),Y=7}function Ut(ke,ct){let Xe,et,pt;if(e.dist_buf[j]=ke,e.lc_buf[j]=ct&255,j++,ke===0?R[ct*2]++:(Z++,ke--,R[(Pr._length_code[ct]+256+1)*2]++,O[Pr.d_code(ke)*2]++),(j&8191)===0&&A>2){for(Xe=j*8,et=S-C,pt=0;pt<30;pt++)Xe+=O[pt*2]*(5+Pr.extra_dbits[pt]);if(Xe>>>=3,Z<Math.floor(j/2)&&Xe<Math.floor(et/2))return!0}return j==H-1}function gt(ke,ct){let Xe,et,pt=0,Zt,Tn;if(j!==0)do Xe=e.dist_buf[pt],et=e.lc_buf[pt],pt++,Xe===0?tt(et,ke):(Zt=Pr._length_code[et],tt(Zt+256+1,ke),Tn=Pr.extra_lbits[Zt],Tn!==0&&(et-=Pr.base_length[Zt],We(et,Tn)),Xe--,Zt=Pr.d_code(Xe),tt(Zt,ct),Tn=Pr.extra_dbits[Zt],Tn!==0&&(Xe-=Pr.base_dist[Zt],We(Xe,Tn)));while(pt<j);tt(256,ke),Y=ke[256*2+1]}function ti(){J>8?be($):J>0&&ve($&255),$=0,J=0}function ai(ke,ct,Xe){ti(),Y=8,Xe&&(be(ct),be(~ct)),e.pending_buf.set(c.subarray(ke,ke+ct),e.pending),e.pending+=ct}function Vt(ke,ct,Xe){We((_ut<<1)+(Xe?1:0),3),ai(ke,ct,!0)}function wt(ke,ct,Xe){let et,pt,Zt=0;A>0?(F.build_tree(e),z.build_tree(e),Zt=Ie(),et=e.opt_len+3+7>>>3,pt=e.static_len+3+7>>>3,pt<=et&&(et=pt)):et=pt=ct+5,ct+4<=et&&ke!=-1?Vt(ke,ct,Xe):pt==et?(We((eK<<1)+(Xe?1:0),3),gt(Ac.static_ltree,Ac.static_dtree)):(We((yut<<1)+(Xe?1:0),3),kt(F.max_code+1,z.max_code+1,Zt+1),gt(R,O)),Ce(),Xe&&ti()}function qi(ke){wt(C>=0?C:-1,S-C,ke),C=S,t.flush_pending()}function Et(){let ke,ct,Xe,et;do{if(et=u-v-S,et===0&&S===0&&v===0)et=r;else if(et==-1)et--;else if(S>=r+r-Cf){c.set(c.subarray(r,r+r),0),B-=r,S-=r,C-=r,ke=g,Xe=ke;do ct=h[--Xe]&65535,h[Xe]=ct>=r?ct-r:0;while(--ke!==0);ke=r,Xe=ke;do ct=f[--Xe]&65535,f[Xe]=ct>=r?ct-r:0;while(--ke!==0);et+=r}if(t.avail_in===0)return;ke=t.read_buf(c,S+v,et),v+=ke,v>=jr&&(p=c[S]&255,p=(p<<y^c[S+1]&255)&_)}while(v<Cf&&t.avail_in!==0)}function Ho(ke){let ct=65535,Xe;for(ct>i-5&&(ct=i-5);;){if(v<=1){if(Et(),v===0&&ke==0)return Fd;if(v===0)break}if(S+=v,v=0,Xe=C+ct,(S===0||S>=Xe)&&(v=S-Xe,S=Xe,qi(!1),t.avail_out===0)||S-C>=r-Cf&&(qi(!1),t.avail_out===0))return Fd}return qi(ke==4),t.avail_out===0?ke==4?UF:Fd:ke==4?w4:S4}function No(ke){let ct=N,Xe=S,et,pt,Zt=P,Tn=S>r-Cf?S-(r-Cf):0,Bo=w,lo=a,ia=S+v4,ks=c[Xe+Zt-1],xi=c[Xe+Zt];P>=T&&(ct>>=2),Bo>v&&(Bo=v);do if(et=ke,!(c[et+Zt]!=xi||c[et+Zt-1]!=ks||c[et]!=c[Xe]||c[++et]!=c[Xe+1])){Xe+=2,et++;do;while(c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&c[++Xe]==c[++et]&&Xe<ia);if(pt=v4-(ia-Xe),Xe=ia-v4,pt>Zt){if(B=ke,Zt=pt,pt>=Bo)break;ks=c[Xe+Zt-1],xi=c[Xe+Zt]}}while((ke=f[ke&lo]&65535)>Tn&&--ct!==0);return Zt<=v?Zt:v}function ds(ke){let ct=0,Xe;for(;;){if(v<Cf){if(Et(),v<Cf&&ke==0)return Fd;if(v===0)break}if(v>=jr&&(p=(p<<y^c[S+(jr-1)]&255)&_,ct=h[p]&65535,f[S&a]=h[p],h[p]=S),ct!==0&&(S-ct&65535)<=r-Cf&&x!=2&&(E=No(ct)),E>=jr)if(Xe=Ut(S-B,E-jr),v-=E,E<=L&&v>=jr){E--;do S++,p=(p<<y^c[S+(jr-1)]&255)&_,ct=h[p]&65535,f[S&a]=h[p],h[p]=S;while(--E!==0);S++}else S+=E,E=0,p=c[S]&255,p=(p<<y^c[S+1]&255)&_;else Xe=Ut(0,c[S]&255),v--,S++;if(Xe&&(qi(!1),t.avail_out===0))return Fd}return qi(ke==4),t.avail_out===0?ke==4?UF:Fd:ke==4?w4:S4}function Wo(ke){let ct=0,Xe,et;for(;;){if(v<Cf){if(Et(),v<Cf&&ke==0)return Fd;if(v===0)break}if(v>=jr&&(p=(p<<y^c[S+(jr-1)]&255)&_,ct=h[p]&65535,f[S&a]=h[p],h[p]=S),P=E,I=B,E=jr-1,ct!==0&&P<L&&(S-ct&65535)<=r-Cf&&(x!=2&&(E=No(ct)),E<=5&&(x==1||E==jr&&S-B>4096)&&(E=jr-1)),P>=jr&&E<=P){et=S+v-jr,Xe=Ut(S-1-I,P-jr),v-=P-1,P-=2;do++S<=et&&(p=(p<<y^c[S+(jr-1)]&255)&_,ct=h[p]&65535,f[S&a]=h[p],h[p]=S);while(--P!==0);if(b=0,E=jr-1,S++,Xe&&(qi(!1),t.avail_out===0))return Fd}else if(b!==0){if(Xe=Ut(0,c[S-1]&255),Xe&&qi(!1),S++,v--,t.avail_out===0)return Fd}else b=1,S++,v--}return b!==0&&(Xe=Ut(0,c[S-1]&255),b=0),qi(ke==4),t.avail_out===0?ke==4?UF:Fd:ke==4?w4:S4}function Ir(ke){return ke.total_in=ke.total_out=0,ke.msg=null,e.pending=0,e.pending_out=0,n=B4,o=0,fe(),pe(),0}e.deflateInit=function(ke,ct,Xe,et,pt,Zt){return et||(et=$7),pt||(pt=Aut),Zt||(Zt=0),ke.msg=null,ct==-1&&(ct=6),pt<1||pt>put||et!=$7||Xe<9||Xe>15||ct<0||ct>9||Zt<0||Zt>2?-2:(ke.dstate=e,s=Xe,r=1<<s,a=r-1,m=pt+7,g=1<<m,_=g-1,y=Math.floor((m+jr-1)/jr),c=new Uint8Array(r*2),f=[],h=[],H=1<<pt+6,e.pending_buf=new Uint8Array(H*4),i=H*4,e.dist_buf=new Uint16Array(H),e.lc_buf=new Uint8Array(H),A=ct,x=Zt,Ir(ke))},e.deflateEnd=function(){return n!=Z7&&n!=B4&&n!=GF?-2:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,f=null,c=null,e.dstate=null,n==B4?-3:0)},e.deflateParams=function(ke,ct,Xe){let et=0;return ct==-1&&(ct=6),ct<0||ct>9||Xe<0||Xe>2?-2:(fm[A].func!=fm[ct].func&&ke.total_in!==0&&(et=ke.deflate(1)),A!=ct&&(A=ct,L=fm[A].max_lazy,T=fm[A].good_length,w=fm[A].nice_length,N=fm[A].max_chain),x=Xe,et)},e.deflateSetDictionary=function(ke,ct,Xe){let et=Xe,pt,Zt=0;if(!ct||n!=Z7)return-2;if(et<jr)return 0;for(et>r-Cf&&(et=r-Cf,Zt=Xe-et),c.set(ct.subarray(Zt,Zt+et),0),S=et,C=et,p=c[0]&255,p=(p<<y^c[1]&255)&_,pt=0;pt<=et-jr;pt++)p=(p<<y^c[pt+(jr-1)]&255)&_,f[pt&a]=h[p],h[p]=pt;return 0},e.deflate=function(ke,ct){let Xe,et,pt,Zt,Tn;if(ct>4||ct<0)return-2;if(!ke.next_out||!ke.next_in&&ke.avail_in!==0||n==GF&&ct!=4)return ke.msg=T4[4],-2;if(ke.avail_out===0)return ke.msg=T4[7],-5;if(t=ke,Zt=o,o=ct,n==Z7&&(et=$7+(s-8<<4)<<8,pt=(A-1&255)>>1,pt>3&&(pt=3),et|=pt<<6,S!==0&&(et|=gut),et+=31-et%31,n=B4,ze(et)),e.pending!==0){if(t.flush_pending(),t.avail_out===0)return o=-1,0}else if(t.avail_in===0&&ct<=Zt&&ct!=4)return t.msg=T4[7],-5;if(n==GF&&t.avail_in!==0)return ke.msg=T4[7],-5;if(t.avail_in!==0||v!==0||ct!=0&&n!=GF){switch(Tn=-1,fm[A].func){case Rye:Tn=Ho(ct);break;case D4:Tn=ds(ct);break;case AI:Tn=Wo(ct);break;default:}if((Tn==UF||Tn==w4)&&(n=GF),Tn==Fd||Tn==UF)return t.avail_out===0&&(o=-1),0;if(Tn==S4){if(ct==1)_n();else if(Vt(0,0,!1),ct==3)for(Xe=0;Xe<g;Xe++)h[Xe]=0;if(t.flush_pending(),t.avail_out===0)return o=-1,0}}return ct!=4?0:1}}function Mye(){let e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Mye.prototype={deflateInit(e,t){let n=this;return n.dstate=new Cut,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){let t=this;return t.dstate?t.dstate.deflate(t,e):-2},deflateEnd(){let e=this;if(!e.dstate)return-2;let t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){let n=this;return n.dstate?n.dstate.deflateParams(n,e,t):-2},deflateSetDictionary(e,t){let n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):-2},read_buf(e,t,n){let i=this,o=i.avail_in;return o>n&&(o=n),o===0?0:(i.avail_in-=o,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+o),t),i.next_in_index+=o,i.total_in+=o,o)},flush_pending(){let e=this,t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Nye(e){let t=this,n=new Mye,i=Eut(e&&e.chunkSize?e.chunkSize:64*1024),o=0,r=new Uint8Array(i),s=e?e.level:-1;typeof s>"u"&&(s=-1),n.deflateInit(s),n.next_out=r,t.append=function(a,c){let u,f,h=0,p=0,g=0,m=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,u=n.deflate(o),u!=0)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==i?m.push(new Uint8Array(r)):m.push(r.subarray(0,n.next_out_index))),g+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=h&&(c(n.next_in_index),h=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return m.length>1?(f=new Uint8Array(g),m.forEach(function(_){f.set(_,p),p+=_.length})):f=m[0]?new Uint8Array(m[0]):new Uint8Array,f}},t.flush=function(){let a,c,u=0,f=0,h=[];do{if(n.next_out_index=0,n.avail_out=i,a=n.deflate(4),a!=1&&a!=0)throw new Error("deflating: "+n.msg);i-n.avail_out>0&&h.push(r.slice(0,n.next_out_index)),f+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),c=new Uint8Array(f),h.forEach(function(p){c.set(p,u),u+=p.length}),c}}function Eut(e){return e+5*(Math.floor(e/16383)+1)}var Ef=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],eCe=1440,Iut=0,xut=4,but=9,Tut=5,Sut=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],wut=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],But=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Dut=[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,112,112],vut=[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],Put=[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],Ky=15;function oK(){let e=this,t,n,i,o,r,s;function a(u,f,h,p,g,m,_,y,C,E,I){let b,S,B,v,P,N,L,A,x,T,w,R,O,k,F;T=0,P=h;do i[u[f+T]]++,T++,P--;while(P!==0);if(i[0]==h)return _[0]=-1,y[0]=0,0;for(A=y[0],N=1;N<=Ky&&i[N]===0;N++);for(L=N,A<N&&(A=N),P=Ky;P!==0&&i[P]===0;P--);for(B=P,A>P&&(A=P),y[0]=A,k=1<<N;N<P;N++,k<<=1)if((k-=i[N])<0)return-3;if((k-=i[P])<0)return-3;for(i[P]+=k,s[1]=N=0,T=1,O=2;--P!==0;)s[O]=N+=i[T],O++,T++;P=0,T=0;do(N=u[f+T])!==0&&(I[s[N]++]=P),T++;while(++P<h);for(h=s[B],s[0]=P=0,T=0,v=-1,R=-A,r[0]=0,w=0,F=0;L<=B;L++)for(b=i[L];b--!==0;){for(;L>R+A;){if(v++,R+=A,F=B-R,F=F>A?A:F,(S=1<<(N=L-R))>b+1&&(S-=b+1,O=L,N<F))for(;++N<F&&!((S<<=1)<=i[++O]);)S-=i[O];if(F=1<<N,E[0]+F>eCe)return-3;r[v]=w=E[0],E[0]+=F,v!==0?(s[v]=P,o[0]=N,o[1]=A,N=P>>>R-A,o[2]=w-r[v-1]-N,C.set(o,(r[v-1]+N)*3)):_[0]=w}for(o[1]=L-R,T>=h?o[0]=192:I[T]<p?(o[0]=I[T]<256?0:96,o[2]=I[T++]):(o[0]=m[I[T]-p]+16+64,o[2]=g[I[T++]-p]),S=1<<L-R,N=P>>>R;N<F;N+=S)C.set(o,(w+N)*3);for(N=1<<L-1;(P&N)!==0;N>>>=1)P^=N;for(P^=N,x=(1<<R)-1;(P&x)!=s[v];)v--,R-=A,x=(1<<R)-1}return k!==0&&B!=1?-5:0}function c(u){let f;for(t||(t=[],n=[],i=new Int32Array(Ky+1),o=[],r=new Int32Array(Ky),s=new Int32Array(Ky+1)),n.length<u&&(n=[]),f=0;f<u;f++)n[f]=0;for(f=0;f<Ky+1;f++)i[f]=0;for(f=0;f<3;f++)o[f]=0;r.set(i.subarray(0,Ky),0),s.set(i.subarray(0,Ky+1),0)}e.inflate_trees_bits=function(u,f,h,p,g){let m;return c(19),t[0]=0,m=a(u,0,19,19,null,null,h,f,p,t,n),m==-3?g.msg="oversubscribed dynamic bit lengths tree":(m==-5||f[0]===0)&&(g.msg="incomplete dynamic bit lengths tree",m=-3),m},e.inflate_trees_dynamic=function(u,f,h,p,g,m,_,y,C){let E;return c(288),t[0]=0,E=a(h,0,u,257,But,Dut,m,p,y,t,n),E!=0||p[0]===0?(E==-3?C.msg="oversubscribed literal/length tree":E!=-4&&(C.msg="incomplete literal/length tree",E=-3),E):(c(288),E=a(h,u,f,0,vut,Put,_,g,y,t,n),E!=0||g[0]===0&&u>257?(E==-3?C.msg="oversubscribed distance tree":E==-5?(C.msg="incomplete distance tree",E=-3):E!=-4&&(C.msg="empty distance tree with lengths",E=-3),E):0)}}oK.inflate_trees_fixed=function(e,t,n,i){return e[0]=but,t[0]=Tut,n[0]=Sut,i[0]=wut,0};var M4=0,Lye=1,Oye=2,Fye=3,Qye=4,kye=5,Uye=6,tK=7,Gye=8,N4=9;function Rut(){let e=this,t,n=0,i,o=0,r=0,s=0,a=0,c=0,u=0,f=0,h,p=0,g,m=0;function _(y,C,E,I,b,S,B,v){let P,N,L,A,x,T,w,R,O,k,F,z,Q,H,j,Z;w=v.next_in_index,R=v.avail_in,x=B.bitb,T=B.bitk,O=B.write,k=O<B.read?B.read-O-1:B.end-O,F=Ef[y],z=Ef[C];do{for(;T<20;)R--,x|=(v.read_byte(w++)&255)<<T,T+=8;if(P=x&F,N=E,L=I,Z=(L+P)*3,(A=N[Z])===0){x>>=N[Z+1],T-=N[Z+1],B.win[O++]=N[Z+2],k--;continue}do{if(x>>=N[Z+1],T-=N[Z+1],(A&16)!==0){for(A&=15,Q=N[Z+2]+(x&Ef[A]),x>>=A,T-=A;T<15;)R--,x|=(v.read_byte(w++)&255)<<T,T+=8;P=x&z,N=b,L=S,Z=(L+P)*3,A=N[Z];do if(x>>=N[Z+1],T-=N[Z+1],(A&16)!==0){for(A&=15;T<A;)R--,x|=(v.read_byte(w++)&255)<<T,T+=8;if(H=N[Z+2]+(x&Ef[A]),x>>=A,T-=A,k-=Q,O>=H)j=O-H,O-j>0&&2>O-j?(B.win[O++]=B.win[j++],B.win[O++]=B.win[j++],Q-=2):(B.win.set(B.win.subarray(j,j+2),O),O+=2,j+=2,Q-=2);else{j=O-H;do j+=B.end;while(j<0);if(A=B.end-j,Q>A){if(Q-=A,O-j>0&&A>O-j)do B.win[O++]=B.win[j++];while(--A!==0);else B.win.set(B.win.subarray(j,j+A),O),O+=A,j+=A,A=0;j=0}}if(O-j>0&&Q>O-j)do B.win[O++]=B.win[j++];while(--Q!==0);else B.win.set(B.win.subarray(j,j+Q),O),O+=Q,j+=Q,Q=0;break}else if((A&64)===0)P+=N[Z+2],P+=x&Ef[A],Z=(L+P)*3,A=N[Z];else return v.msg="invalid distance code",Q=v.avail_in-R,Q=T>>3<Q?T>>3:Q,R+=Q,w-=Q,T-=Q<<3,B.bitb=x,B.bitk=T,v.avail_in=R,v.total_in+=w-v.next_in_index,v.next_in_index=w,B.write=O,-3;while(!0);break}if((A&64)===0){if(P+=N[Z+2],P+=x&Ef[A],Z=(L+P)*3,(A=N[Z])===0){x>>=N[Z+1],T-=N[Z+1],B.win[O++]=N[Z+2],k--;break}}else return(A&32)!==0?(Q=v.avail_in-R,Q=T>>3<Q?T>>3:Q,R+=Q,w-=Q,T-=Q<<3,B.bitb=x,B.bitk=T,v.avail_in=R,v.total_in+=w-v.next_in_index,v.next_in_index=w,B.write=O,1):(v.msg="invalid literal/length code",Q=v.avail_in-R,Q=T>>3<Q?T>>3:Q,R+=Q,w-=Q,T-=Q<<3,B.bitb=x,B.bitk=T,v.avail_in=R,v.total_in+=w-v.next_in_index,v.next_in_index=w,B.write=O,-3)}while(!0)}while(k>=258&&R>=10);return Q=v.avail_in-R,Q=T>>3<Q?T>>3:Q,R+=Q,w-=Q,T-=Q<<3,B.bitb=x,B.bitk=T,v.avail_in=R,v.total_in+=w-v.next_in_index,v.next_in_index=w,B.write=O,0}e.init=function(y,C,E,I,b,S){t=M4,u=y,f=C,h=E,p=I,g=b,m=S,i=null},e.proc=function(y,C,E){let I,b,S,B=0,v=0,P=0,N,L,A,x;for(P=C.next_in_index,N=C.avail_in,B=y.bitb,v=y.bitk,L=y.write,A=L<y.read?y.read-L-1:y.end-L;;)switch(t){case M4:if(A>=258&&N>=10&&(y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,E=_(u,f,h,p,g,m,y,C),P=C.next_in_index,N=C.avail_in,B=y.bitb,v=y.bitk,L=y.write,A=L<y.read?y.read-L-1:y.end-L,E!=0)){t=E==1?tK:N4;break}r=u,i=h,o=p,t=Lye;case Lye:for(I=r;v<I;){if(N!==0)E=0;else return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);N--,B|=(C.read_byte(P++)&255)<<v,v+=8}if(b=(o+(B&Ef[I]))*3,B>>>=i[b+1],v-=i[b+1],S=i[b],S===0){s=i[b+2],t=Uye;break}if((S&16)!==0){a=S&15,n=i[b+2],t=Oye;break}if((S&64)===0){r=S,o=b/3+i[b+2];break}if((S&32)!==0){t=tK;break}return t=N4,C.msg="invalid literal/length code",E=-3,y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);case Oye:for(I=a;v<I;){if(N!==0)E=0;else return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);N--,B|=(C.read_byte(P++)&255)<<v,v+=8}n+=B&Ef[I],B>>=I,v-=I,r=f,i=g,o=m,t=Fye;case Fye:for(I=r;v<I;){if(N!==0)E=0;else return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);N--,B|=(C.read_byte(P++)&255)<<v,v+=8}if(b=(o+(B&Ef[I]))*3,B>>=i[b+1],v-=i[b+1],S=i[b],(S&16)!==0){a=S&15,c=i[b+2],t=Qye;break}if((S&64)===0){r=S,o=b/3+i[b+2];break}return t=N4,C.msg="invalid distance code",E=-3,y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);case Qye:for(I=a;v<I;){if(N!==0)E=0;else return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);N--,B|=(C.read_byte(P++)&255)<<v,v+=8}c+=B&Ef[I],B>>=I,v-=I,t=kye;case kye:for(x=L-c;x<0;)x+=y.end;for(;n!==0;){if(A===0&&(L==y.end&&y.read!==0&&(L=0,A=L<y.read?y.read-L-1:y.end-L),A===0&&(y.write=L,E=y.inflate_flush(C,E),L=y.write,A=L<y.read?y.read-L-1:y.end-L,L==y.end&&y.read!==0&&(L=0,A=L<y.read?y.read-L-1:y.end-L),A===0)))return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);y.win[L++]=y.win[x++],A--,x==y.end&&(x=0),n--}t=M4;break;case Uye:if(A===0&&(L==y.end&&y.read!==0&&(L=0,A=L<y.read?y.read-L-1:y.end-L),A===0&&(y.write=L,E=y.inflate_flush(C,E),L=y.write,A=L<y.read?y.read-L-1:y.end-L,L==y.end&&y.read!==0&&(L=0,A=L<y.read?y.read-L-1:y.end-L),A===0)))return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);E=0,y.win[L++]=s,A--,t=M4;break;case tK:if(v>7&&(v-=8,N++,P--),y.write=L,E=y.inflate_flush(C,E),L=y.write,A=L<y.read?y.read-L-1:y.end-L,y.read!=y.write)return y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);t=Gye;case Gye:return E=1,y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);case N4:return E=-3,y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E);default:return E=-2,y.bitb=B,y.bitk=v,C.avail_in=N,C.total_in+=P-C.next_in_index,C.next_in_index=P,y.write=L,y.inflate_flush(C,E)}},e.free=function(){}}var zye=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],zS=0,nK=1,Vye=2,Hye=3,Wye=4,jye=5,L4=6,O4=7,Yye=8,gI=9;function Mut(e,t){let n=this,i=zS,o=0,r=0,s=0,a,c=[0],u=[0],f=new Rut,h=0,p=new Int32Array(eCe*3),g=0,m=new oK;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(_,y){y&&(y[0]=g),i==L4&&f.free(_),i=zS,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(_,y){let C,E,I;return E=_.next_out_index,I=n.read,C=(I<=n.write?n.write:n.end)-I,C>_.avail_out&&(C=_.avail_out),C!==0&&y==-5&&(y=0),_.avail_out-=C,_.total_out+=C,_.next_out.set(n.win.subarray(I,I+C),E),E+=C,I+=C,I==n.end&&(I=0,n.write==n.end&&(n.write=0),C=n.write-I,C>_.avail_out&&(C=_.avail_out),C!==0&&y==-5&&(y=0),_.avail_out-=C,_.total_out+=C,_.next_out.set(n.win.subarray(I,I+C),E),E+=C,I+=C),_.next_out_index=E,n.read=I,y},n.proc=function(_,y){let C,E,I,b,S,B,v,P;for(b=_.next_in_index,S=_.avail_in,E=n.bitb,I=n.bitk,B=n.write,v=B<n.read?n.read-B-1:n.end-B;;){let N,L,A,x,T,w,R,O;switch(i){case zS:for(;I<3;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}switch(C=E&7,h=C&1,C>>>1){case 0:E>>>=3,I-=3,C=I&7,E>>>=C,I-=C,i=nK;break;case 1:N=[],L=[],A=[[]],x=[[]],oK.inflate_trees_fixed(N,L,A,x),f.init(N[0],L[0],A[0],0,x[0],0),E>>>=3,I-=3,i=L4;break;case 2:E>>>=3,I-=3,i=Hye;break;case 3:return E>>>=3,I-=3,i=gI,_.msg="invalid block type",y=-3,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y)}break;case nK:for(;I<32;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}if((~E>>>16&65535)!=(E&65535))return i=gI,_.msg="invalid stored block lengths",y=-3,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);o=E&65535,E=I=0,i=o!==0?Vye:h!==0?O4:zS;break;case Vye:if(S===0||v===0&&(B==n.end&&n.read!==0&&(B=0,v=B<n.read?n.read-B-1:n.end-B),v===0&&(n.write=B,y=n.inflate_flush(_,y),B=n.write,v=B<n.read?n.read-B-1:n.end-B,B==n.end&&n.read!==0&&(B=0,v=B<n.read?n.read-B-1:n.end-B),v===0)))return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);if(y=0,C=o,C>S&&(C=S),C>v&&(C=v),n.win.set(_.read_buf(b,C),B),b+=C,S-=C,B+=C,v-=C,(o-=C)!==0)break;i=h!==0?O4:zS;break;case Hye:for(;I<14;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}if(r=C=E&16383,(C&31)>29||(C>>5&31)>29)return i=gI,_.msg="too many length or distance symbols",y=-3,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);if(C=258+(C&31)+(C>>5&31),!a||a.length<C)a=[];else for(P=0;P<C;P++)a[P]=0;E>>>=14,I-=14,s=0,i=Wye;case Wye:for(;s<4+(r>>>10);){for(;I<3;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}a[zye[s++]]=E&7,E>>>=3,I-=3}for(;s<19;)a[zye[s++]]=0;if(c[0]=7,C=m.inflate_trees_bits(a,c,u,p,_),C!=0)return y=C,y==-3&&(a=null,i=gI),n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);s=0,i=jye;case jye:for(;C=r,!(s>=258+(C&31)+(C>>5&31));){let k,F;for(C=c[0];I<C;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}if(C=p[(u[0]+(E&Ef[C]))*3+1],F=p[(u[0]+(E&Ef[C]))*3+2],F<16)E>>>=C,I-=C,a[s++]=F;else{for(P=F==18?7:F-14,k=F==18?11:3;I<C+P;){if(S!==0)y=0;else return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);S--,E|=(_.read_byte(b++)&255)<<I,I+=8}if(E>>>=C,I-=C,k+=E&Ef[P],E>>>=P,I-=P,P=s,C=r,P+k>258+(C&31)+(C>>5&31)||F==16&&P<1)return a=null,i=gI,_.msg="invalid bit length repeat",y=-3,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);F=F==16?a[P-1]:0;do a[P++]=F;while(--k!==0);s=P}}if(u[0]=-1,T=[],w=[],R=[],O=[],T[0]=9,w[0]=6,C=r,C=m.inflate_trees_dynamic(257+(C&31),1+(C>>5&31),a,T,w,R,O,p,_),C!=0)return C==-3&&(a=null,i=gI),y=C,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);f.init(T[0],w[0],p,R[0],p,O[0]),i=L4;case L4:if(n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,(y=f.proc(n,_,y))!=1)return n.inflate_flush(_,y);if(y=0,f.free(_),b=_.next_in_index,S=_.avail_in,E=n.bitb,I=n.bitk,B=n.write,v=B<n.read?n.read-B-1:n.end-B,h===0){i=zS;break}i=O4;case O4:if(n.write=B,y=n.inflate_flush(_,y),B=n.write,v=B<n.read?n.read-B-1:n.end-B,n.read!=n.write)return n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);i=Yye;case Yye:return y=1,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);case gI:return y=-3,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y);default:return y=-2,n.bitb=E,n.bitk=I,_.avail_in=S,_.total_in+=b-_.next_in_index,_.next_in_index=b,n.write=B,n.inflate_flush(_,y)}}},n.free=function(_){n.reset(_,null),n.win=null,p=null},n.set_dictionary=function(_,y,C){n.win.set(_.subarray(y,y+C),0),n.read=n.write=C},n.sync_point=function(){return i==nK?1:0}}var Nut=32,Lut=8,Out=0,qye=1,Kye=2,Xye=3,Jye=4,Zye=5,iK=6,zF=7,$ye=12,Xy=13,Fut=[0,0,255,255];function Qut(){let e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(n){return!n||!n.istate?-2:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=zF,n.istate.blocks.reset(n,null),0)}e.inflateEnd=function(n){return e.blocks&&e.blocks.free(n),e.blocks=null,0},e.inflateInit=function(n,i){return n.msg=null,e.blocks=null,i<8||i>15?(e.inflateEnd(n),-2):(e.wbits=i,n.istate.blocks=new Mut(n,1<<i),t(n),0)},e.inflate=function(n,i){let o,r;if(!n||!n.istate||!n.next_in)return-2;let s=n.istate;for(i=i==xut?-5:0,o=-5;;)switch(s.mode){case Out:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,((s.method=n.read_byte(n.next_in_index++))&15)!=Lut){s.mode=Xy,n.msg="unknown compression method",s.marker=5;break}if((s.method>>4)+8>s.wbits){s.mode=Xy,n.msg="invalid win size",s.marker=5;break}s.mode=qye;case qye:if(n.avail_in===0)return o;if(o=i,n.avail_in--,n.total_in++,r=n.read_byte(n.next_in_index++)&255,((s.method<<8)+r)%31!==0){s.mode=Xy,n.msg="incorrect header check",s.marker=5;break}if((r&Nut)===0){s.mode=zF;break}s.mode=Kye;case Kye:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,s.mode=Xye;case Xye:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,s.mode=Jye;case Jye:if(n.avail_in===0)return o;o=i,n.avail_in--,n.total_in++,s.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,s.mode=Zye;case Zye:return n.avail_in===0?o:(o=i,n.avail_in--,n.total_in++,s.need+=n.read_byte(n.next_in_index++)&255,s.mode=iK,2);case iK:return s.mode=Xy,n.msg="need dictionary",s.marker=0,-2;case zF:if(o=s.blocks.proc(n,o),o==-3){s.mode=Xy,s.marker=0;break}if(o==0&&(o=i),o!=1)return o;o=i,s.blocks.reset(n,s.was),s.mode=$ye;case $ye:return n.avail_in=0,1;case Xy:return-3;default:return-2}},e.inflateSetDictionary=function(n,i,o){let r=0,s=o;if(!n||!n.istate||n.istate.mode!=iK)return-2;let a=n.istate;return s>=1<<a.wbits&&(s=(1<<a.wbits)-1,r=o-s),a.blocks.set_dictionary(i,r,s),a.mode=zF,0},e.inflateSync=function(n){let i,o,r,s,a;if(!n||!n.istate)return-2;let c=n.istate;if(c.mode!=Xy&&(c.mode=Xy,c.marker=0),(i=n.avail_in)===0)return-5;for(o=n.next_in_index,r=c.marker;i!==0&&r<4;)n.read_byte(o)==Fut[r]?r++:n.read_byte(o)!==0?r=0:r=4-r,o++,i--;return n.total_in+=o-n.next_in_index,n.next_in_index=o,n.avail_in=i,c.marker=r,r!=4?-3:(s=n.total_in,a=n.total_out,t(n),n.total_in=s,n.total_out=a,c.mode=zF,0)},e.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?-2:n.istate.blocks.sync_point()}}function tCe(){}tCe.prototype={inflateInit(e){let t=this;return t.istate=new Qut,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){let t=this;return t.istate?t.istate.inflate(t,e):-2},inflateEnd(){let e=this;if(!e.istate)return-2;let t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){let e=this;return e.istate?e.istate.inflateSync(e):-2},inflateSetDictionary(e,t){let n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):-2},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};function nCe(e){let t=this,n=new tCe,i=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,o=Iut,r=new Uint8Array(i),s=!1;n.inflateInit(),n.next_out=r,t.append=function(a,c){let u=[],f,h,p=0,g=0,m=0;if(a.length!==0){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=i,n.avail_in===0&&!s&&(n.next_in_index=0,s=!0),f=n.inflate(o),s&&f===-5){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(f!==0&&f!==1)throw new Error("inflating: "+n.msg);if((s||f===1)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===i?u.push(new Uint8Array(r)):u.push(r.subarray(0,n.next_out_index))),m+=n.next_out_index,c&&n.next_in_index>0&&n.next_in_index!=p&&(c(n.next_in_index),p=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return u.length>1?(h=new Uint8Array(m),u.forEach(function(_){h.set(_,g),g+=_.length})):h=u[0]?new Uint8Array(u[0]):new Uint8Array,h}},t.flush=function(){n.inflateEnd()}}var _I="/",rK=new Date(2107,11,31),sK=new Date(1980,0,1),Bi=void 0,If="undefined",Gg="function";var VF=class{constructor(t){return class extends null{constructor(n,i){let o=new t(i);super({transform(r,s){s.enqueue(o.append(r))},flush(r){let s=o.flush();s&&r.enqueue(s)}})}}}};var kut=64,iCe=2;try{typeof navigator!=If&&navigator.hardwareConcurrency&&(iCe=navigator.hardwareConcurrency)}catch{}var Uut={chunkSize:512*1024,maxWorkers:iCe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Bi,CompressionStreamNative:typeof CompressionStream!=If&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=If&&DecompressionStream},Zy=Object.assign({},Uut);function HF(){return Zy}function F4(e){return Math.max(e.chunkSize,kut)}function VS(e){let{baseURL:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,Deflate:a,Inflate:c,CompressionStream:u,DecompressionStream:f,workerScripts:h}=e;if(Jy("baseURL",t),Jy("chunkSize",n),Jy("maxWorkers",i),Jy("terminateWorkerTimeout",o),Jy("useCompressionStream",r),Jy("useWebWorkers",s),a&&(Zy.CompressionStream=new VF(a)),c&&(Zy.DecompressionStream=new VF(c)),Jy("CompressionStream",u),Jy("DecompressionStream",f),h!==Bi){let{deflate:p,inflate:g}=h;if((p||g)&&(Zy.workerScripts||(Zy.workerScripts={})),p){if(!Array.isArray(p))throw new Error("workerScripts.deflate must be an array");Zy.workerScripts.deflate=p}if(g){if(!Array.isArray(g))throw new Error("workerScripts.inflate must be an array");Zy.workerScripts.inflate=g}}}function Jy(e,t){t!==Bi&&(Zy[e]=t)}var oCe=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=t>>>1^3988292384:t=t>>>1;oCe[e]=t}var zg=class{constructor(t){this.crc=t||-1}append(t){let n=this.crc|0;for(let i=0,o=t.length|0;i<o;i++)n=n>>>8^oCe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var WF=class extends null{constructor(){let t,n=new zg;super({transform(i,o){n.append(i),o.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,n.get()),t.value=i}}),t=this}};function HS(e){if(typeof TextEncoder==If){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 kl={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=kl.getPartial(n);return i===32?e.concat(t):kl._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+kl.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]=kl.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 o=e.length?e[e.length-1]:0,r=kl.getPartial(o);return i.push(kl.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},jF={bytes:{fromBits(e){let n=kl.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r<n;r++)(r&3)===0&&(o=e[r/4]),i[r]=o>>>24,o<<=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(kl.partial(8*(n&3),i)),t}}},rCe={};rCe.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=jF.utf8String.toBits(e));let n=t._buffer=kl.concat(t._buffer,e),i=t._length,o=t._length=i+kl.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.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=kl.concat(t,[kl.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 o=n[0],r=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,o)+t._f(u,r,s,a)+c+i[u]+t._key[Math.floor(u/20)]|0;c=a,a=s,s=t._S(30,r),r=o,o=f}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};var aK={};aK.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],o=e.length,r,s,a,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let u=s[r-1];(r%o===0||o===8&&r%o===4)&&(u=n[u>>>24]<<24^n[u>>16&255]<<16^n[u>>8&255]<<8^n[u&255],r%o===0&&(u=u<<8^u>>>24^c<<24,c=c<<1^(c>>7)*283)),s[r]=s[r-o]^u}for(let u=0;r;u++,r--){let f=s[u&3?r:r-4];r<=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],o=[],r=[],s,a,c,u;for(let f=0;f<256;f++)r[(o[f]=f<<1^(f>>7)*283)^f]=f;for(let f=s=0;!n[f];f^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^h&255^99,n[f]=h,i[h]=f,u=o[c=o[a=o[f]]];let p=u*16843009^c*65537^a*257^f*16843008,g=o[h]*257^h*16843008;for(let m=0;m<4;m++)e[m][f]=g=g<<24^g>>>8,t[m][h]=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,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],c=r[2],u=r[3],f=r[4],h=e[0]^n[0],p=e[t?3:1]^n[1],g=e[2]^n[2],m=e[t?1:3]^n[3],_=4,y,C,E;for(let I=0;I<i;I++)y=s[h>>>24]^a[p>>16&255]^c[g>>8&255]^u[m&255]^n[_],C=s[p>>>24]^a[g>>16&255]^c[m>>8&255]^u[h&255]^n[_+1],E=s[g>>>24]^a[m>>16&255]^c[h>>8&255]^u[p&255]^n[_+2],m=s[m>>>24]^a[h>>16&255]^c[p>>8&255]^u[g&255]^n[_+3],_+=4,h=y,p=C,g=E;for(let I=0;I<4;I++)o[t?3&-I:I]=f[h>>>24]<<24^f[p>>16&255]<<16^f[g>>8&255]<<8^f[m&255]^n[_++],y=h,h=p,p=g,g=m,m=y;return o}};var sCe={getRandomValues(e){let t=new Uint32Array(e.buffer),n=i=>{let o=987654321,r=4294967295;return function(){return o=36969*(o&65535)+(o>>16)&r,i=18e3*(i&65535)+(i>>16)&r,(((o<<16)+i&r)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,o;i<e.length;i+=4){let r=n((o||Math.random())*4294967296);o=r()*987654071,t[i/4]=r()*4294967296|0}return e}},cK={};cK.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 o=kl.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);let s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return kl.clamp(t,o)}};var $y={importKey(e){return new $y.hmacSha1(jF.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let o=(i>>5)+1<<2,r,s,a,c,u,f=new ArrayBuffer(o),h=new DataView(f),p=0,g=kl;for(t=jF.bytes.toBits(t),u=1;p<(o||1);u++){for(r=s=e.encrypt(g.concat(t,[u])),a=1;a<n;a++)for(s=e.encrypt(s),c=0;c<s.length;c++)r[c]^=s[c];for(a=0;p<(o||1)&&a<r.length;a++)h.setInt32(p,r[a]),p+=4}return f.slice(0,i/8)}};$y.hmacSha1=class{constructor(e){let t=this,n=t._hash=rCe.sha1,i=[[],[]];t._baseHash=[new n,new n];let o=t._baseHash[0].blockSize/32;e.length>o&&(e=new n().update(e).finalize());for(let r=0;r<o;r++)i[0][r]=e[r]^909522486,i[1][r]=e[r]^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)}};var Gut=typeof crypto!=If&&typeof crypto.getRandomValues==Gg,eC="Invalid password",yI="Invalid signature",Vg="zipjs-abort-check-password";function Q4(e){return Gut?crypto.getRandomValues(e):sCe.getRandomValues(e)}var WS=16,zut="raw",lCe={name:"PBKDF2"},Vut={name:"HMAC"},Hut="SHA-1",Wut=Object.assign({hash:Vut},lCe),lK=Object.assign({iterations:1e3,hash:{name:Hut}},lCe),jut=["deriveBits"],qF=[8,12,16],YF=[16,24,32],tC=10,Yut=[0,0,0,0],G4=typeof crypto!=If,JF=G4&&crypto.subtle,uCe=G4&&typeof JF!=If,xp=jF.bytes,qut=aK.aes,Kut=cK.ctrGladman,Xut=$y.hmacSha1,aCe=G4&&uCe&&typeof JF.importKey==Gg,cCe=G4&&uCe&&typeof JF.deriveBits==Gg,k4=class extends null{constructor({password:t,rawPassword:n,signed:i,encryptionStrength:o,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(s=>this.resolveReady=s),password:hCe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:u,strength:f,resolveReady:h,ready:p}=c;u?(await Jut(c,f,u,Qd(s,0,qF[f]+2)),s=Qd(s,qF[f]+2),r?a.error(new Error(Vg)):h()):await p;let g=new Uint8Array(s.length-tC-(s.length-tC)%WS);a.enqueue(fCe(c,s,g,0,tC,!0))},async flush(s){let{signed:a,ctr:c,hmac:u,pending:f,ready:h}=this;if(u&&c){await h;let p=Qd(f,0,f.length-tC),g=Qd(f,f.length-tC),m=new Uint8Array;if(p.length){let _=XF(xp,p);u.update(_);let y=c.update(_);m=KF(xp,y)}if(a){let _=Qd(KF(xp,u.digest()),0,tC);for(let y=0;y<tC;y++)if(_[y]!=g[y])throw new Error(yI)}s.enqueue(m)}}})}},U4=class extends null{constructor({password:t,rawPassword:n,encryptionStrength:i}){let o;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:hCe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:u,resolveReady:f,ready:h}=a,p=new Uint8Array;c?(p=await Zut(a,u,c),f()):await h;let g=new Uint8Array(p.length+r.length-r.length%WS);g.set(p,0),s.enqueue(fCe(a,r,g,p.length,0))},async flush(r){let{ctr:s,hmac:a,pending:c,ready:u}=this;if(a&&s){await u;let f=new Uint8Array;if(c.length){let h=s.update(XF(xp,c));a.update(h),f=KF(xp,h)}o.signature=KF(xp,a.digest()).slice(0,tC),r.enqueue(uK(f,o.signature))}}}),o=this}};function fCe(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,u=t.length-o;c.length&&(t=uK(c,t),n=tft(n,u-u%WS));let f;for(f=0;f<=u-WS;f+=WS){let h=XF(xp,Qd(t,f,f+WS));r&&a.update(h);let p=s.update(h);r||a.update(p),n.set(KF(xp,p),f+i)}return e.pending=Qd(t,f),n}async function Jut(e,t,n,i){let o=await dCe(e,t,n,Qd(i,0,qF[t])),r=Qd(i,qF[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(eC)}async function Zut(e,t,n){let i=Q4(new Uint8Array(qF[t])),o=await dCe(e,t,n,i);return uK(i,o)}async function dCe(e,t,n,i){e.password=null;let o=await $ut(zut,n,Wut,!1,jut),r=await eft(Object.assign({salt:i},lK),o,8*(YF[t]*2+2)),s=new Uint8Array(r),a=XF(xp,Qd(s,0,YF[t])),c=XF(xp,Qd(s,YF[t],YF[t]*2)),u=Qd(s,YF[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:u},ctr:new Kut(new qut(a),Array.from(Yut)),hmac:new Xut(c)}),u}async function $ut(e,t,n,i,o){if(aCe)try{return await JF.importKey(e,t,n,i,o)}catch{return aCe=!1,$y.importKey(t)}else return $y.importKey(t)}async function eft(e,t,n){if(cCe)try{return await JF.deriveBits(e,t,n)}catch{return cCe=!1,$y.pbkdf2(t,e.salt,lK.iterations,n)}else return $y.pbkdf2(t,e.salt,lK.iterations,n)}function hCe(e,t){return t===Bi?HS(e):t}function uK(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function tft(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function Qd(e,t,n){return e.subarray(t,n)}function KF(e,t){return e.fromBits(t)}function XF(e,t){return e.toBits(t)}var jS=12,z4=class extends null{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),gCe(this,t)},transform(o,r){let s=this;if(s.password){let a=mCe(s,o.subarray(0,jS));if(s.password=null,a[jS-1]!=s.passwordVerification)throw new Error(eC);o=o.subarray(jS)}i?r.error(new Error(Vg)):r.enqueue(mCe(s,o))}})}},V4=class extends null{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),gCe(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=Q4(new Uint8Array(jS));c[jS-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(pCe(r,c),0),a=jS}else s=new Uint8Array(i.length),a=0;s.set(pCe(r,i),a),o.enqueue(s)}})}};function mCe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=_Ce(e)^t[i],fK(e,n[i]);return n}function pCe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=_Ce(e)^t[i],fK(e,t[i]);return n}function gCe(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new zg(n[0]),crcKey2:new zg(n[2])});for(let i=0;i<t.length;i++)fK(e,t.charCodeAt(i))}function fK(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=ACe(Math.imul(ACe(i+yCe(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function _Ce(e){let t=e.keys[2]|2;return yCe(Math.imul(t,t^1)>>>8)}function yCe(e){return e&255}function ACe(e){return e&4294967295}var CCe="deflate-raw",H4=class extends null{constructor(t,{chunkSize:n,CompressionStream:i,CompressionStreamNative:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:c,signed:u,level:f}=t,h=this,p,g,m=ECe(super.readable);(!s||c)&&u&&(p=new WF,m=bp(m,p)),r&&(m=xCe(m,a,{level:f,chunkSize:n},o,i)),s&&(c?m=bp(m,new V4(t)):(g=new U4(t),m=bp(m,g))),ICe(h,m,()=>{let _;s&&!c&&(_=g.signature),(!s||c)&&u&&(_=new DataView(p.value.buffer).getUint32(0)),h.signature=_})}},W4=class extends null{constructor(t,{chunkSize:n,DecompressionStream:i,DecompressionStreamNative:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:c,compressed:u,useCompressionStream:f}=t,h,p,g=ECe(super.readable);s&&(r?g=bp(g,new z4(t)):(p=new k4(t),g=bp(g,p))),u&&(g=xCe(g,f,{chunkSize:n},o,i)),(!s||r)&&a&&(h=new WF,g=bp(g,h)),ICe(this,g,()=>{if((!s||r)&&a){let m=new DataView(h.value.buffer);if(c!=m.getUint32(0,!1))throw new Error(yI)}})}};function ECe(e){return bp(e,new null({transform(t,n){t&&t.length&&n.enqueue(t)}}))}function ICe(e,t,n){t=bp(t,new null({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function xCe(e,t,n,i,o){try{let r=t&&i?i:o;e=bp(e,new r(CCe,n))}catch{if(t)try{e=bp(e,new o(CCe,n))}catch{return e}else return e}return e}function bp(e,t){return e.pipeThrough(t)}var bCe="message",TCe="start",SCe="pull",dK="data",wCe="ack",hK="close",q4="deflate",K4="inflate";var j4=class extends null{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(q4)?r=H4:o.startsWith(K4)&&(r=W4);let s=0,a=0,c=new r(t,n),u=super.readable,f=new null({transform(p,g){p&&p.length&&(a+=p.length,g.enqueue(p))},flush(){Object.assign(i,{inputSize:a})}}),h=new null({transform(p,g){p&&p.length&&(s+=p.length,g.enqueue(p))},flush(){let{signature:p}=c;Object.assign(i,{signature:p,outputSize:s,inputSize:a})}});Object.defineProperty(i,"readable",{get(){return u.pipeThrough(f).pipeThrough(c).pipeThrough(h)}})}},Y4=class extends null{constructor(t){let n;super({transform:i,flush(o){n&&n.length&&o.enqueue(n)}});function i(o,r){if(n){let s=new Uint8Array(n.length+o.length);s.set(n),s.set(o,n.length),o=s,n=null}o.length>t?(r.enqueue(o.slice(0,t)),i(o.slice(t),r)):n=o}}};var vCe=typeof Worker!=If;var YS=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,scripts:u},f){let{signal:h}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new Y4(r.chunkSize)).pipeThrough(new pK(n,s),{signal:h}),writable:i,options:Object.assign({},o),scripts:u,transferStreams:c,terminate(){return new Promise(p=>{let{worker:g,busy:m}=t;g?(m?t.resolveTerminated=p:(g.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,f(t)}}),(a&&vCe?nft:PCe)(t,r)}},pK=class extends null{constructor(t,{onstart:n,onprogress:i,size:o,onend:r}){let s=0;super({async start(){n&&await mK(n,o)},async transform(a,c){s+=a.length,i&&await mK(i,s,o),c.enqueue(a)},async flush(){t.size=s,r&&await mK(r,s)}})}};async function mK(e,...t){try{await e(...t)}catch{}}function PCe(e,t){return{run:()=>ift(e,t)}}function nft(e,t){let{baseURL:n,chunkSize:i}=t;if(!e.interface){let o;try{o=sft(e.scripts[0],n,e)}catch{return vCe=!1,PCe(e,t)}Object.assign(e,{worker:o,interface:{run:()=>oft(e,{chunkSize:i})}})}return e.interface}async function ift({options:e,readable:t,writable:n,onTaskFinished:i},o){try{let r=new j4(e,o);await t.pipeThrough(r).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:s,inputSize:a,outputSize:c}=r;return{signature:s,inputSize:a,outputSize:c}}finally{i()}}async function oft(e,t){let n,i,o=new Promise((p,g)=>{n=p,i=g});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s,scripts:a}=e,{writable:c,closed:u}=rft(e.writable),f=X4({type:TCe,scripts:a.slice(1),options:s,config:t,readable:r,writable:c},e);f||Object.assign(e,{reader:r.getReader(),writer:c.getWriter()});let h=await o;return f||await c.getWriter().close(),await u,h}function rft(e){let t,n=new Promise(o=>t=o);return{writable:new WritableStream({async write(o){let r=e.getWriter();await r.ready,await r.write(o),r.releaseLock()},close(){t()},abort(o){return e.getWriter().abort(o)}}),closed:n}}var BCe=!0,DCe=!0;function sft(e,t,n){let i={type:"module"},o,r;typeof e==Gg&&(e=e());try{o=new URL(e,t)}catch{o=e}if(BCe)try{r=new Worker(o)}catch{BCe=!1,r=new Worker(o,i)}else r=new Worker(o,i);return r.addEventListener(bCe,s=>aft(s,n)),r}function X4(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:o}){try{let{value:r,readable:s,writable:a}=e,c=[];if(r&&(r.byteLength<r.buffer.byteLength?e.value=r.buffer.slice(0,r.byteLength):e.value=r.buffer,c.push(e.value)),o&&DCe?(s&&c.push(s),a&&c.push(a)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{DCe=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function aft({data:e},t){let{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:c,resolveResult:u,rejectResult:f,onTaskFinished:h}=t;try{if(s){let{message:g,stack:m,code:_,name:y}=s,C=new Error(g);Object.assign(C,{stack:m,code:_,name:y}),p(C)}else{if(n==SCe){let{value:g,done:m}=await a.read();X4({type:dK,value:g,done:m,messageId:o},t)}n==dK&&(await c.ready,await c.write(new Uint8Array(i)),X4({type:wCe,messageId:o},t)),n==hK&&p(null,r)}}catch(g){X4({type:hK,messageId:o},t),p(g)}function p(g,m){g?f(g):u(m),c&&c.releaseLock(),h()}}var CI=[],AK=[];var RCe=0;async function J4(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,codecType:a,compressed:c,signed:u,encrypted:f}=n,{workerScripts:h,maxWorkers:p}=i;t.transferStreams=o||o===Bi;let g=!c&&!u&&!f&&!t.transferStreams;return t.useWebWorkers=!g&&(r||r===Bi&&i.useWebWorkers),t.scripts=t.useWebWorkers&&h?h[a]:[],n.useCompressionStream=s||s===Bi&&i.useCompressionStream,(await m()).run();async function m(){let y=CI.find(C=>!C.busy);if(y)return MCe(y),new YS(y,e,t,_);if(CI.length<p){let C={indexWorker:RCe};return RCe++,CI.push(C),new YS(C,e,t,_)}else return new Promise(C=>AK.push({resolve:C,stream:e,workerOptions:t}))}function _(y){if(AK.length){let[{resolve:C,stream:E,workerOptions:I}]=AK.splice(0,1);C(new YS(y,E,I,_))}else y.worker?(MCe(y),cft(y,t)):CI=CI.filter(C=>C!=y)}}function cft(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{CI=CI.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function MCe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var lft="Writer iterator completed too soon",uft="Writer not initialized",fft="text/plain";var dft="Content-Type";var hft=64*1024,yK="writable",qS=class{constructor(){this.size=0}init(){this.initialized=!0}},Z4=class extends qS{get readable(){let t=this,{chunkSize:n=hft}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(o){let{offset:r=0,size:s,diskNumberStart:a}=i,{chunkOffset:c}=this,u=s===Bi?n:Math.min(n,s-c),f=await gc(t,r+c,u,a);o.enqueue(f),c+n>s||s===Bi&&!f.length&&u?o.close():this.chunkOffset+=n}});return i}},gK=class extends qS{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(uft);return t.writeUint8Array(i)}});Object.defineProperty(t,yK,{get(){return n}})}writeUint8Array(){}};var $4=class extends gK{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){let n=this,i=0,o=n.pending,r=n.pending.length;for(n.pending="",i=0;i<Math.floor((r+t.length)/3)*3-r;i++)o+=String.fromCharCode(t[i]);for(;i<t.length;i++)n.pending+=String.fromCharCode(t[i]);o.length>2?n.data+=btoa(o):n.pending=o}getData(){return this.data+btoa(this.pending)}},Hg=class extends Z4{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,n){let i=this,o=t+n,s=await(t||o<i.size?i.blob.slice(t,o):i.blob).arrayBuffer();return s.byteLength>n&&(s=s.slice(t,o)),new Uint8Array(s)}},ZF=class extends qS{constructor(t){super();let n=this,i=new null,o=[];t&&o.push([dft,t]),Object.defineProperty(n,yK,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},e8=class extends Hg{constructor(t){super(new Blob([t],{type:fft}))}},t8=class extends ZF{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:n}=this,i=await super.getData();if(i.text&&n)return i.text();{let o=new FileReader;return new Promise((r,s)=>{Object.assign(o,{onload:({target:a})=>r(a.result),onerror:()=>s(o.error)}),o.readAsText(i,t)})}}};var _K=class extends Z4{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:n}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(n.map(async(i,o)=>{await i.init(),o!=n.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,n,i=0){let o=this,{readers:r}=this,s,a=i;a==-1&&(a=r.length-1);let c=t;for(;c>=r[a].size;)c-=r[a].size,a++;let u=r[a],f=u.size;if(c+n<=f)s=await gc(u,c,n);else{let h=f-c;s=new Uint8Array(n),s.set(await gc(u,c,h)),s.set(await o.readUint8Array(t+h,n-h,i),h)}return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},n8=class extends qS{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(f){let{availableSize:h}=i;if(s)f.length>=h?(await c(f.slice(0,h)),await u(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(f.slice(h))):await c(f);else{let{value:p,done:g}=await t.next();if(g&&!p)throw new Error(lft);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await Sp(o),r=p.writable,s=r.getWriter(),await this.write(f)}},async close(){await s.ready,await u()}});Object.defineProperty(i,yK,{get(){return a}});async function c(f){let h=f.length;h&&(await s.ready,await s.write(f),o.size+=h,i.size+=h,i.availableSize-=h)}async function u(){r.size=o.size,await s.close()}}};async function Sp(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function i8(e){return Array.isArray(e)&&(e=new _K(e)),e instanceof ReadableStream&&(e={readable:e}),e}function o8(e){e.writable===Bi&&typeof e.next==Gg&&(e=new n8(e)),e instanceof WritableStream&&(e={writable:e});let{writable:t}=e;return t.size===Bi&&(t.size=0),e instanceof n8||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function gc(e,t,n,i){return e.readUint8Array(t,n,i)}var NCe="\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 ".split(""),mft=NCe.length==256;function LCe(e){if(mft){let t="";for(let n=0;n<e.length;n++)t+=NCe[e[n]];return t}else return new TextDecoder().decode(e)}function $F(e,t){return t&&t.trim().toLowerCase()=="cp437"?LCe(e):new TextDecoder(t).decode(e)}var CK="filename",EK="rawFilename",IK="comment",xK="rawComment",bK="uncompressedSize",TK="compressedSize",SK="offset",r8="diskNumberStart",KS="lastModDate",s8="rawLastModDate",e2="lastAccessDate",OCe="rawLastAccessDate",t2="creationDate",FCe="rawCreationDate",wK="internalFileAttribute",BK="internalFileAttributes",DK="externalFileAttribute",vK="externalFileAttributes",PK="msDosCompatible",a8="zip64",RK="encrypted",MK="version",NK="versionMadeBy",LK="zipCrypto",OK="directory",FK="executable",pft=[CK,EK,TK,bK,KS,s8,IK,xK,e2,t2,SK,r8,r8,wK,BK,DK,vK,PK,a8,RK,MK,NK,LK,OK,FK,"bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"],nC=class{constructor(t){pft.forEach(n=>this[n]=t[n])}};var QK="File format is not recognized",Cft="End of central directory not found",Eft="End of Zip64 central directory locator not found",Ift="Central directory header not found",xft="Local file header not found",bft="Zip64 extra field not found",Tft="File contains encrypted entry",Sft="Encryption method not supported",QCe="Compression method not supported",kCe="Split zip file",UCe="utf-8",GCe="cp437",wft=[[bK,4294967295],[TK,4294967295],[SK,4294967295],[r8,65535]],Bft={[65535]:{getValue:Os,bytes:4},[4294967295]:{getValue:c8,bytes:8}},p8=class{constructor(t,n={}){Object.assign(this,{reader:i8(t),options:n,config:HF()})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await Sp(i),(i.size===Bi||!i.readUint8Array)&&(i=new Hg(await new Response(i.readable).blob()),await Sp(i)),i.size<22)throw new Error(QK);i.chunkSize=F4(o);let r=await Mft(i,101010256,i.size,22,65535*16);if(!r){let L=await gc(i,0,4),A=Ya(L);throw Os(A)==134695760?new Error(kCe):new Error(Cft)}let s=Ya(r),a=Os(s,12),c=Os(s,16),u=r.offset,f=ja(s,20),h=u+22+f,p=ja(s,4),g=i.lastDiskNumber||0,m=ja(s,6),_=ja(s,8),y=0,C=0;if(c==4294967295||a==4294967295||_==65535||m==65535){let L=await gc(i,r.offset-20,20),A=Ya(L);if(Os(A,0)==117853008){c=c8(A,8);let x=await gc(i,c,56,-1),T=Ya(x),w=r.offset-20-56;if(Os(T,0)!=101075792&&c!=w){let R=c;c=w,y=c-R,x=await gc(i,c,56,-1),T=Ya(x)}if(Os(T,0)!=101075792)throw new Error(Eft);p==65535&&(p=Os(T,16)),m==65535&&(m=Os(T,20)),_==65535&&(_=c8(T,32)),a==4294967295&&(a=c8(T,40)),c-=a}}if(c>=i.size&&(y=i.size-c-a-22,c=i.size-a-22),g!=p)throw new Error(kCe);if(c<0)throw new Error(QK);let E=0,I=await gc(i,c,a,m),b=Ya(I);if(a){let L=r.offset-a;if(Os(b,E)!=33639248&&c!=L){let A=c;c=L,y+=c-A,I=await gc(i,c,a,m),b=Ya(I)}}let S=r.offset-c-(i.lastDiskOffset||0);if(a!=S&&S>=0&&(a=S,I=await gc(i,c,a,m),b=Ya(I)),c<0||c>=i.size)throw new Error(QK);let B=Ul(n,t,"filenameEncoding"),v=Ul(n,t,"commentEncoding");for(let L=0;L<_;L++){let A=new UK(i,o,n.options);if(Os(b,E)!=33639248)throw new Error(Ift);VCe(A,b,E+6);let x=!!A.bitFlag.languageEncodingFlag,T=E+46,w=T+A.filenameLength,R=w+A.extraFieldLength,O=ja(b,E+4),k=O>>8==0,F=O>>8==3,z=I.subarray(T,w),Q=ja(b,E+32),H=R+Q,j=I.subarray(R,H),Z=x,Y=x,$=Os(b,E+38),J=k&&(XS(b,E+38)&16)==16||F&&($>>16&61440)==16384||z.length&&z[z.length-1]==_I.charCodeAt(0),pe=F&&($>>16&73)!=0,Ce=Os(b,E+42)+y;Object.assign(A,{versionMadeBy:O,msDosCompatible:k,compressedSize:0,uncompressedSize:0,commentLength:Q,directory:J,offset:Ce,diskNumberStart:ja(b,E+34),internalFileAttributes:ja(b,E+36),externalFileAttributes:$,rawFilename:z,filenameUTF8:Z,commentUTF8:Y,rawExtraField:I.subarray(w,R),executable:pe}),A.internalFileAttribute=A.internalFileAttributes,A.externalFileAttribute=A.externalFileAttributes;let fe=Ul(n,t,"decodeText")||$F,ye=Z?UCe:B||GCe,Ie=Y?UCe:v||GCe,ve=fe(z,ye);ve===Bi&&(ve=$F(z,ye));let be=fe(j,Ie);be===Bi&&(be=$F(j,Ie)),Object.assign(A,{rawComment:j,filename:ve,comment:be,directory:J||ve.endsWith(_I)}),C=Math.max(Ce,C),HCe(A,A,b,E+6),A.zipCrypto=A.encrypted&&!A.extraFieldAES;let ze=new nC(A);ze.getData=(tt,Mt)=>A.getData(tt,ze,Mt),E=H;let{onprogress:We}=t;if(We)try{await We(L+1,_,new nC(A))}catch{}yield ze}let P=Ul(n,t,"extractPrependedData"),N=Ul(n,t,"extractAppendedData");return P&&(n.prependedData=C>0?await gc(i,0,C):new Uint8Array),n.comment=f?await gc(i,u+22,f):new Uint8Array,N&&(n.appendedData=h<i.size?await gc(i,h,i.size-h):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var UK=class{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}async getData(t,n,i={}){let o=this,{reader:r,offset:s,diskNumberStart:a,extraFieldAES:c,compressionMethod:u,config:f,bitFlag:h,signature:p,rawLastModDate:g,uncompressedSize:m,compressedSize:_}=o,y=n.localDirectory={},C=await gc(r,s,30,a),E=Ya(C),I=Ul(o,i,"password"),b=Ul(o,i,"rawPassword"),S=Ul(o,i,"passThrough");if(I=I&&I.length&&I,b=b&&b.length&&b,c&&c.originalCompressionMethod!=99)throw new Error(QCe);if(u!=0&&u!=8&&!S)throw new Error(QCe);if(Os(E,0)!=67324752)throw new Error(xft);VCe(y,E,4),y.rawExtraField=y.extraFieldLength?await gc(r,s+30+y.filenameLength,y.extraFieldLength,a):new Uint8Array,HCe(o,y,E,4,!0),Object.assign(n,{lastAccessDate:y.lastAccessDate,creationDate:y.creationDate});let B=o.encrypted&&y.encrypted&&!S,v=B&&!c;if(S||(n.zipCrypto=v),B){if(!v&&c.strength===Bi)throw new Error(Sft);if(!I&&!b)throw new Error(Tft)}let P=s+30+y.filenameLength+y.extraFieldLength,N=_,L=r.readable;Object.assign(L,{diskNumberStart:a,offset:P,size:N});let A=Ul(o,i,"signal"),x=Ul(o,i,"checkPasswordOnly");x&&(t=new WritableStream),t=o8(t),await Sp(t,S?_:m);let{writable:T}=t,{onstart:w,onprogress:R,onend:O}=i,k={options:{codecType:K4,password:I,rawPassword:b,zipCrypto:v,encryptionStrength:c&&c.strength,signed:Ul(o,i,"checkSignature")&&!S,passwordVerification:v&&(h.dataDescriptor?g>>>8&255:p>>>24&255),signature:p,compressed:u!=0&&!S,encrypted:o.encrypted&&!S,useWebWorkers:Ul(o,i,"useWebWorkers"),useCompressionStream:Ul(o,i,"useCompressionStream"),transferStreams:Ul(o,i,"transferStreams"),checkPasswordOnly:x},config:f,streamOptions:{signal:A,size:N,onstart:w,onprogress:R,onend:O}},F=0;try{({outputSize:F}=await J4({readable:L,writable:T},k))}catch(z){if(!x||z.message!=Vg)throw z}finally{let z=Ul(o,i,"preventClose");T.size+=F,!z&&!T.locked&&await T.getWriter().close()}return x?Bi:t.getData?t.getData():T}};function VCe(e,t,n){let i=e.rawBitFlag=ja(t,n+2),o=(i&1)==1,r=Os(t,n+6);Object.assign(e,{encrypted:o,version:ja(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:Nft(r),filenameLength:ja(t,n+22),extraFieldLength:ja(t,n+24)})}function HCe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=Ya(new Uint8Array(r)),c=0;try{for(;c<r.length;){let C=ja(a,c),E=ja(a,c+2);s.set(C,{type:C,data:r.slice(c+4,c+4+E)}),c+=4+E}}catch{}let u=ja(n,i+4);Object.assign(t,{signature:Os(n,i+10),uncompressedSize:Os(n,i+18),compressedSize:Os(n,i+14)});let f=s.get(1);f&&(Dft(f,t),t.extraFieldZip64=f);let h=s.get(28789);h&&(zCe(h,CK,EK,t,e),t.extraFieldUnicodePath=h);let p=s.get(25461);p&&(zCe(p,IK,xK,t,e),t.extraFieldUnicodeComment=p);let g=s.get(39169);g?(vft(g,t,u),t.extraFieldAES=g):t.compressionMethod=u;let m=s.get(10);m&&(Pft(m,t),t.extraFieldNTFS=m);let _=s.get(21589);_&&(Rft(_,t,o),t.extraFieldExtendedTimestamp=_);let y=s.get(6534);y&&(t.extraFieldUSDZ=y)}function Dft(e,t){t.zip64=!0;let n=Ya(e.data),i=wft.filter(([o,r])=>t[o]==r);for(let o=0,r=0;o<i.length;o++){let[s,a]=i[o];if(t[s]==a){let c=Bft[a];t[s]=e[s]=c.getValue(n,r),r+=c.bytes}else if(e[s])throw new Error(bft)}}function zCe(e,t,n,i,o){let r=Ya(e.data),s=new zg;s.append(o[n]);let a=Ya(new Uint8Array(4));a.setUint32(0,s.get(),!0);let c=Os(r,1);Object.assign(e,{version:XS(r,0),[t]:$F(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==Os(a,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function vft(e,t,n){let i=Ya(e.data),o=XS(i,4);Object.assign(e,{vendorVersion:XS(i,0),vendorId:XS(i,2),strength:o,originalCompressionMethod:n,compressionMethod:ja(i,5)}),t.compressionMethod=e.compressionMethod}function Pft(e,t){let n=Ya(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=ja(n,i),s=ja(n,i+2);r==1&&(o=e.data.slice(i+4,i+4+s)),i+=4+s}}catch{}try{if(o&&o.length==24){let r=Ya(o),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),c=r.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:c});let u=kK(s),f=kK(a),h=kK(c),p={lastModDate:u,lastAccessDate:f,creationDate:h};Object.assign(e,p),Object.assign(t,p)}}catch{}}function Rft(e,t,n){let i=Ya(e.data),o=XS(i,0),r=[],s=[];n?((o&1)==1&&(r.push(KS),s.push(s8)),(o&2)==2&&(r.push(e2),s.push(OCe)),(o&4)==4&&(r.push(t2),s.push(FCe))):e.data.length>=5&&(r.push(KS),s.push(s8));let a=1;r.forEach((c,u)=>{if(e.data.length>=a+4){let f=Os(i,a);t[c]=e[c]=new Date(f*1e3);let h=s[u];e[h]=f}a+=4})}async function Mft(e,t,n,i,o){let r=new Uint8Array(4),s=Ya(r);Lft(s,0,t);let a=i+o;return await c(i)||await c(Math.min(a,n));async function c(u){let f=n-u,h=await gc(e,f,u);for(let p=h.length-i;p>=0;p--)if(h[p]==r[0]&&h[p+1]==r[1]&&h[p+2]==r[2]&&h[p+3]==r[3])return{offset:f+p,buffer:h.slice(p,p+i).buffer}}}function Ul(e,t,n){return t[n]===Bi?e.options[n]:t[n]}function Nft(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function kK(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function XS(e,t){return e.getUint8(t)}function ja(e,t){return e.getUint16(t,!0)}function Os(e,t){return e.getUint32(t,!0)}function c8(e,t){return Number(e.getBigUint64(t,!0))}function Lft(e,t,n){e.setUint32(t,n,!0)}function Ya(e){return new DataView(e.buffer)}var kft="File already exists",Uft="Zip file comment exceeds 64KB",Gft="File entry comment exceeds 64KB",zft="File entry name exceeds 64KB",YCe="Version exceeds 65535",Vft="The strength must equal 1, 2, or 3",Hft="Extra field type exceeds 65535",Wft="Extra field data exceeds 64KB",iX="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",jft="Undefined uncompressed size",qCe=new Uint8Array([7,0,2,0,65,69,3,0,0]),eX=0,KCe=[],y8=class{constructor(t,n={}){t=o8(t);let i=t.availableSize!==Bi&&t.availableSize>0&&t.availableSize!==1/0&&t.maxSize!==Bi&&t.maxSize>0&&t.maxSize!==1/0;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:HF(),files:new Map,filenames:new Set,offset:n.offset===Bi?t.writable.size:n.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;eX<s.maxWorkers?eX++:await new Promise(c=>KCe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(kft);return o.filenames.add(t),a=Yft(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=KCe.shift();c?c():eX--}}async close(t=new Uint8Array,n={}){let i=this,{pendingAddFileCalls:o,writer:r}=this,{writable:s}=r;for(;o.size;)await Promise.allSettled(Array.from(o));return await ndt(this,t,n),ro(i,n,"preventClose")||await s.getWriter().close(),r.getData?r.getData():s}};async function Yft(e,t,n,i){t=t.trim();let o=ro(e,i,PK),r=ro(e,i,NK,o?20:768),s=ro(e,i,FK);if(r>65535)throw new Error(YCe);let a=ro(e,i,vK,0);a===0&&(a=ro(e,i,DK,0)),!i.directory&&t.endsWith(_I)&&(i.directory=!0),ro(e,i,OK)?(t.endsWith(_I)||(t+=_I),a===0&&(a=16,o||(a|=16877<<16))):!o&&a===0&&(s?a=493<<16:a=420<<16);let u=ro(e,i,"encodeText",HS),f=u(t);if(f===Bi&&(f=HS(t)),ao(f)>65535)throw new Error(zft);let h=i.comment||"",p=u(h);if(p===Bi&&(p=HS(h)),ao(p)>65535)throw new Error(Gft);let g=ro(e,i,MK,20);if(g>65535)throw new Error(YCe);let m=ro(e,i,KS,new Date),_=ro(e,i,e2),y=ro(e,i,t2),C=ro(e,i,BK,0);C===0&&(C=ro(e,i,wK,0));let E=ro(e,i,"passThrough"),I,b;E||(I=ro(e,i,"password"),b=ro(e,i,"rawPassword"));let S=ro(e,i,"encryptionStrength",3),B=ro(e,i,LK),v=ro(e,i,"extendedTimestamp",!0),P=ro(e,i,"keepOrder",!0),N=ro(e,i,"level"),L=ro(e,i,"useWebWorkers"),A=ro(e,i,"bufferedWrite"),x=ro(e,i,"dataDescriptorSignature",!1),T=ro(e,i,"signal"),w=ro(e,i,"useUnicodeFileNames",!0),R=ro(e,i,"useCompressionStream"),O=ro(e,i,"compressionMethod"),k=ro(e,i,"dataDescriptor",!0),F=ro(e,i,a8);if(!B&&(I!==Bi||b!==Bi)&&!(S>=1&&S<=3))throw new Error(Vft);let z=new Uint8Array,{extraField:Q}=i;if(Q){let Oe=0,_n=0;Q.forEach(Ut=>Oe+=4+ao(Ut)),z=new Uint8Array(Oe),Q.forEach((Ut,gt)=>{if(gt>65535)throw new Error(Hft);if(ao(Ut)>65535)throw new Error(Wft);Zs(z,new Uint16Array([gt]),_n),Zs(z,new Uint16Array([ao(Ut)]),_n+2),Zs(z,Ut,_n+4),_n+=4+ao(Ut)})}let H=0,j=0,Z=0;if(E&&({uncompressedSize:Z}=i,Z===Bi))throw new Error(jft);let Y=F===!0;n&&(n=i8(n),await Sp(n),E?H=XCe(Z):n.size===Bi?(k=!0,(F||F===Bi)&&(F=!0,Z=H=4294967296)):(Z=n.size,H=XCe(Z)));let{diskOffset:$,diskNumber:J,maxSize:pe}=e.writer,Ce=Y||Z>4294967295,fe=Y||H>4294967295,ye=Y||e.offset+e.pendingEntriesSize-$>4294967295,ve=ro(e,i,"supportZip64SplitFile",!0)&&Y||J+Math.ceil(e.pendingEntriesSize/pe)>65535;if(ye||Ce||fe||ve){if(F===!1||!P)throw new Error(iX);F=!0}F=F||!1;let be=ro(e,i,RK),{signature:ze}=i;i=Object.assign({},i,{rawFilename:f,rawComment:p,version:g,versionMadeBy:r,lastModDate:m,lastAccessDate:_,creationDate:y,rawExtraField:z,zip64:F,zip64UncompressedSize:Ce,zip64CompressedSize:fe,zip64Offset:ye,zip64DiskNumberStart:ve,password:I,rawPassword:b,level:!R&&e.config.CompressionStream===Bi&&e.config.CompressionStreamNative===Bi?0:N,useWebWorkers:L,encryptionStrength:S,extendedTimestamp:v,zipCrypto:B,bufferedWrite:A,keepOrder:P,useUnicodeFileNames:w,dataDescriptor:k,dataDescriptorSignature:x,signal:T,msDosCompatible:o,internalFileAttribute:C,internalFileAttributes:C,externalFileAttribute:a,externalFileAttributes:a,useCompressionStream:R,passThrough:E,encrypted:!!(I&&ao(I)||b&&ao(b))||E&&be,signature:ze,compressionMethod:O});let We=Xft(i),tt=Zft(i),Mt=ao(We.localHeaderArray,tt.dataDescriptorArray);j=Mt+H,e.options.usdz&&(j+=j+64),e.pendingEntriesSize+=j;let kt;try{kt=await qft(e,t,n,{headerInfo:We,dataDescriptorInfo:tt,metadataSize:Mt},i)}finally{e.pendingEntriesSize-=j}return Object.assign(kt,{name:t,comment:h,extraField:Q}),new nC(kt)}async function qft(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:u}=o,{headerInfo:f}=i,{usdz:h}=e.options,p=Array.from(r.values()).pop(),g={},m,_,y,C,E,I,b;r.set(t,g);try{let P;a&&(P=p&&p.lock,S()),(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!c)&&!h?(I=new null,b=new Response(I.readable).blob(),I.writable.size=0,m=!0,e.bufferedWrites++,await Sp(s)):(I=s,await B()),await Sp(I);let{writable:N}=s,{diskOffset:L}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let x=new Uint8Array(4),T=_c(x);so(T,0,134695760),await wp(N,x),e.offset+=4}h&&Jft(i,e.offset-L),m||(await P,await v(N));let{diskNumber:A}=s;if(E=!0,g.diskNumberStart=A,g=await Kft(n,I,g,i,e.config,o),E=!1,r.set(t,g),g.filename=t,m){await I.writable.getWriter().close();let x=await b;await P,await B(),C=!0,c||(x=await edt(g,x,N,o)),await v(N),g.diskNumberStart=s.diskNumber,L=s.diskOffset,await x.stream().pipeTo(N,{preventClose:!0,preventAbort:!0,signal:u}),N.size+=x.size,C=!1}if(g.offset=e.offset-L,g.zip64)tdt(g,o);else if(g.offset>4294967295)throw new Error(iX);return e.offset+=g.size,g}catch(P){if(m&&C||!m&&E){if(e.hasCorruptedEntries=!0,P)try{P.corruptedEntry=!0}catch{}m?e.offset+=I.writable.size:e.offset=I.writable.size}throw r.delete(t),P}finally{m&&e.bufferedWrites--,y&&y(),_&&_()}function S(){g.lock=new Promise(P=>y=P)}async function B(){e.writerLocked=!0;let{lockWriter:P}=e;e.lockWriter=new Promise(N=>_=()=>{e.writerLocked=!1,N()}),await P}async function v(P){ao(f.localHeaderArray)>s.availableSize&&(s.availableSize=0,await wp(P,new Uint8Array))}}async function Kft(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:u}=o,{localHeaderArray:f,headerArray:h,lastModDate:p,rawLastModDate:g,encrypted:m,compressed:_,version:y,compressionMethod:C,rawExtraFieldExtendedTimestamp:E,extraFieldExtendedTimestampFlag:I,rawExtraFieldNTFS:b,rawExtraFieldAES:S}=a,{dataDescriptorArray:B}=c,{rawFilename:v,lastAccessDate:P,creationDate:N,password:L,rawPassword:A,level:x,zip64:T,zip64UncompressedSize:w,zip64CompressedSize:R,zip64Offset:O,zip64DiskNumberStart:k,zipCrypto:F,dataDescriptor:z,directory:Q,executable:H,versionMadeBy:j,rawComment:Z,rawExtraField:Y,useWebWorkers:$,onstart:J,onprogress:pe,onend:Ce,signal:fe,encryptionStrength:ye,extendedTimestamp:Ie,msDosCompatible:ve,internalFileAttributes:be,externalFileAttributes:ze,useCompressionStream:We,passThrough:tt}=s,Mt={lock:i,versionMadeBy:j,zip64:T,directory:!!Q,executable:!!H,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:Z,rawExtraFieldExtendedTimestamp:E,rawExtraFieldNTFS:b,rawExtraFieldAES:S,rawExtraField:Y,extendedTimestamp:Ie,msDosCompatible:ve,internalFileAttributes:be,externalFileAttributes:ze,diskNumberStart:n},{signature:kt,uncompressedSize:Oe}=s,_n=0;tt||(Oe=0);let{writable:Ut}=t;if(e){e.chunkSize=F4(r),await wp(Ut,f);let ti=e.readable,ai=ti.size=e.size,Vt={options:{codecType:q4,level:x,rawPassword:A,password:L,encryptionStrength:ye,zipCrypto:m&&F,passwordVerification:m&&F&&g>>8&255,signed:!tt,compressed:_&&!tt,encrypted:m&&!tt,useWebWorkers:$,useCompressionStream:We,transferStreams:!1},config:r,streamOptions:{signal:fe,size:ai,onstart:J,onprogress:pe,onend:Ce}},wt=await J4({readable:ti,writable:Ut},Vt);_n=wt.outputSize,tt||(Oe=wt.inputSize,kt=wt.signature),Ut.size+=Oe}else await wp(Ut,f);let gt;if(T){let ti=4;w&&(ti+=8),R&&(ti+=8),O&&(ti+=8),k&&(ti+=4),gt=new Uint8Array(ti)}else gt=new Uint8Array;return $ft({signature:kt,rawExtraFieldZip64:gt,compressedSize:_n,uncompressedSize:Oe,headerInfo:a,dataDescriptorInfo:c},s),z&&await wp(Ut,B),Object.assign(Mt,{uncompressedSize:Oe,compressedSize:_n,lastModDate:p,rawLastModDate:g,creationDate:N,lastAccessDate:P,encrypted:m,zipCrypto:F,size:u+_n,compressionMethod:C,version:y,headerArray:h,signature:kt,rawExtraFieldZip64:gt,extraFieldExtendedTimestampFlag:I,zip64UncompressedSize:w,zip64CompressedSize:R,zip64Offset:O,zip64DiskNumberStart:k}),Mt}function Xft(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:s,zipCrypto:a,useUnicodeFileNames:c,dataDescriptor:u,directory:f,rawExtraField:h,encryptionStrength:p,extendedTimestamp:g,encrypted:m}=e,{version:_,compressionMethod:y}=e,C=!f&&(r>0||r===Bi&&y!==0),E;if(m&&!a){E=new Uint8Array(ao(qCe)+2);let O=_c(E);go(O,0,39169),Zs(E,qCe,2),nX(O,8,p)}else E=new Uint8Array;let I,b,S;if(g){b=new Uint8Array(9+(i?4:0)+(o?4:0));let O=_c(b);go(O,0,21589),go(O,2,ao(b)-4),S=1+(i?2:0)+(o?4:0),nX(O,4,S);let k=5;so(O,k,Math.floor(n.getTime()/1e3)),k+=4,i&&(so(O,k,Math.floor(i.getTime()/1e3)),k+=4),o&&so(O,k,Math.floor(o.getTime()/1e3));try{I=new Uint8Array(36);let F=_c(I),z=tX(n);go(F,0,10),go(F,2,32),go(F,8,1),go(F,10,24),xu(F,12,z),xu(F,20,tX(i)||z),xu(F,28,tX(o)||z)}catch{I=new Uint8Array}}else I=b=new Uint8Array;let B=0;c&&(B=B|2048),u&&(B=B|8),y===Bi&&(y=C?8:0),y==8&&(r>=1&&r<3&&(B=B|6),r>=3&&r<5&&(B=B|1),r===9&&(B=B|2)),s&&(_=_>45?_:45),m&&(B=B|1,a||(_=_>51?_:51,E[9]=y,y=99));let v=new Uint8Array(26),P=_c(v);go(P,0,_),go(P,2,B),go(P,4,y);let N=new Uint32Array(1),L=_c(N),A;n<sK?A=sK:n>rK?A=rK:A=n,go(L,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),go(L,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());let x=N[0];so(P,6,x),go(P,22,ao(t));let T=ao(E,b,I,h);go(P,24,T);let w=new Uint8Array(30+ao(t)+T),R=_c(w);return so(R,0,67324752),Zs(w,v,4),Zs(w,t,30),Zs(w,E,30+ao(t)),Zs(w,b,30+ao(t,E)),Zs(w,I,30+ao(t,E,b)),Zs(w,h,30+ao(t,E,b,I)),{localHeaderArray:w,headerArray:v,headerView:P,lastModDate:n,rawLastModDate:x,encrypted:m,compressed:C,version:_,compressionMethod:y,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:b,rawExtraFieldNTFS:I,rawExtraFieldAES:E,extraFieldLength:T}}function Jft(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=_c(i),s=64-(t+ao(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=_c(a);go(c,0,6534),go(c,2,s-2);let u=i;n.localHeaderArray=i=new Uint8Array(ao(u)+s),Zs(i,u),Zs(i,a,ao(u)),r=_c(i),go(r,28,o+s),e.metadataSize+=s}function Zft(e){let{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e,o=new Uint8Array,r,s=0;return n&&(o=new Uint8Array(t?i?24:20:i?16:12),r=_c(o),i&&(s=4,so(r,0,134695760))),{dataDescriptorArray:o,dataDescriptorView:r,dataDescriptorOffset:s}}function $ft(e,t){let{signature:n,rawExtraFieldZip64:i,compressedSize:o,uncompressedSize:r,headerInfo:s,dataDescriptorInfo:a}=e,{headerView:c,encrypted:u}=s,{dataDescriptorView:f,dataDescriptorOffset:h}=a,{zip64:p,zip64UncompressedSize:g,zip64CompressedSize:m,zipCrypto:_,dataDescriptor:y}=t;if((!u||_)&&n!==Bi&&(so(c,10,n),y&&so(f,h,n)),p){let C=_c(i);go(C,0,1),go(C,2,ao(i)-4);let E=4;g&&(so(c,18,4294967295),xu(C,E,BigInt(r)),E+=8),m&&(so(c,14,4294967295),xu(C,E,BigInt(o))),y&&(xu(f,h+4,BigInt(o)),xu(f,h+12,BigInt(r)))}else so(c,14,o),so(c,18,r),y&&(so(f,h+4,o),so(f,h+8,r))}async function edt(e,t,n,{zipCrypto:i}){let o;o=await t.slice(0,26).arrayBuffer(),o.byteLength!=26&&(o=o.slice(0,26));let r=new DataView(o);return(!e.encrypted||i)&&so(r,14,e.signature),e.zip64?(so(r,18,4294967295),so(r,22,4294967295)):(so(r,18,e.compressedSize),so(r,22,e.uncompressedSize)),await wp(n,new Uint8Array(o)),t.slice(o.byteLength)}function tdt(e,t){let{rawExtraFieldZip64:n,offset:i,diskNumberStart:o}=e,{zip64UncompressedSize:r,zip64CompressedSize:s,zip64Offset:a,zip64DiskNumberStart:c}=t,u=_c(n),f=4;r&&(f+=8),s&&(f+=8),a&&(xu(u,f,BigInt(i)),f+=8),c&&so(u,f,o)}async function ndt(e,t,n){let{files:i,writer:o}=e,{diskOffset:r,writable:s}=o,{diskNumber:a}=o,c=0,u=0,f=e.offset-r,h=i.size;for(let[,S]of i){let{rawFilename:B,rawExtraFieldZip64:v,rawExtraFieldAES:P,rawComment:N,rawExtraFieldNTFS:L,rawExtraField:A,extendedTimestamp:x,extraFieldExtendedTimestampFlag:T,lastModDate:w}=S,R;if(x){R=new Uint8Array(9);let O=_c(R);go(O,0,21589),go(O,2,5),nX(O,4,T),so(O,5,Math.floor(w.getTime()/1e3))}else R=new Uint8Array;S.rawExtraFieldCDExtendedTimestamp=R,u+=46+ao(B,N,v,P,L,R,A)}let p=new Uint8Array(u),g=_c(p);await Sp(o);let m=0;for(let[S,B]of Array.from(i.values()).entries()){let{offset:v,rawFilename:P,rawExtraFieldZip64:N,rawExtraFieldAES:L,rawExtraFieldCDExtendedTimestamp:A,rawExtraFieldNTFS:x,rawExtraField:T,rawComment:w,versionMadeBy:R,headerArray:O,zip64:k,zip64UncompressedSize:F,zip64CompressedSize:z,zip64DiskNumberStart:Q,zip64Offset:H,internalFileAttributes:j,externalFileAttributes:Z,diskNumberStart:Y,uncompressedSize:$,compressedSize:J}=B,pe=ao(N,L,A,x,T);so(g,c,33639248),go(g,c+4,R);let Ce=_c(O);F||so(Ce,18,$),z||so(Ce,14,J),Zs(p,O,c+6),go(g,c+30,pe),go(g,c+32,ao(w)),go(g,c+34,k&&Q?65535:Y),go(g,c+36,j),Z&&so(g,c+38,Z),so(g,c+42,k&&H?4294967295:v),Zs(p,P,c+46),Zs(p,N,c+46+ao(P)),Zs(p,L,c+46+ao(P,N)),Zs(p,A,c+46+ao(P,N,L)),Zs(p,x,c+46+ao(P,N,L,A)),Zs(p,T,c+46+ao(P,N,L,A,x)),Zs(p,w,c+46+ao(P)+pe);let fe=46+ao(P,w)+pe;if(c-m>o.availableSize&&(o.availableSize=0,await wp(s,p.slice(m,c)),m=c),c+=fe,n.onprogress)try{await n.onprogress(S+1,i.size,new nC(B))}catch{}}await wp(s,m?p.slice(m):p);let _=o.diskNumber,{availableSize:y}=o;y<22&&_++;let C=ro(e,n,a8);if(f>4294967295||u>4294967295||h>65535||_>65535){if(C===!1)throw new Error(iX);C=!0}let E=new Uint8Array(C?98:22),I=_c(E);c=0,C&&(so(I,0,101075792),xu(I,4,BigInt(44)),go(I,12,45),go(I,14,45),so(I,16,_),so(I,20,a),xu(I,24,BigInt(h)),xu(I,32,BigInt(h)),xu(I,40,BigInt(u)),xu(I,48,BigInt(f)),so(I,56,117853008),xu(I,64,BigInt(f)+BigInt(u)),so(I,72,_+1),ro(e,n,"supportZip64SplitFile",!0)&&(_=65535,a=65535),h=65535,f=4294967295,u=4294967295,c+=76),so(I,c,101010256),go(I,c+4,_),go(I,c+6,a),go(I,c+8,h),go(I,c+10,h),so(I,c+12,u),so(I,c+16,f);let b=ao(t);if(b)if(b<=65535)go(I,c+20,b);else throw new Error(Uft);await wp(s,E),b&&await wp(s,t)}async function wp(e,t){let n=e.getWriter();try{await n.ready,e.size+=ao(t),await n.write(t)}finally{n.releaseLock()}}function tX(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function ro(e,t,n,i){let o=t[n]===Bi?e.options[n]:t[n];return o===Bi?i:o}function XCe(e){return e+5*(Math.floor(e/16383)+1)}function nX(e,t,n){e.setUint8(t,n)}function go(e,t,n){e.setUint16(t,n,!0)}function so(e,t,n){e.setUint32(t,n,!0)}function xu(e,t,n){e.setBigUint64(t,n,!0)}function Zs(e,t,n){e.set(t,n)}function _c(e){return new DataView(e.buffer)}function ao(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}VS({Deflate:Nye,Inflate:nCe});function idt(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var Un=idt;function odt(e,t){this.position=e,this.headingPitchRange=t}var o2=odt;function C8(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new ge,this.tourEnd=new ge,this.entryStart=new ge,this.entryEnd=new ge,this._activeEntries=[]}C8.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};C8.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;$Ce.call(this,e,t,function(i){n.playlistIndex=0,i||ZCe(n._activeEntries),n.tourEnd.raiseEvent(i)})};C8.prototype.stop=function(){ZCe(this._activeEntries)};function ZCe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function $Ce(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=rdt.bind(this,e,t,n);if(this._activeEntries.push(i),this.entryStart.raiseEvent(i),i.blocking)i.play(o,e.scene.camera,t);else{let r=this;i.play(function(){r.entryEnd.raiseEvent(i);let s=r._activeEntries.indexOf(i);s>=0&&r._activeEntries.splice(s,1)}),o(e,t,n)}}else l(n)&&n(!1)}function rdt(e,t,n,i){let o=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(o,i),i)n(i);else{let r=this._activeEntries.indexOf(o);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,$Ce.call(this,e,t,n)}}var r2=C8;var Wi=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-Wi.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?Wi.Bounce.In(e*2)*.5:Wi.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}}}}),s2=function(){return performance.now()},sdt=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 o=0,r=n;o<r.length;o++){var s=r[o];(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,o=t;i<o.length;i++){var r=o[i];r._group=void 0,delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(t){return!t.isPlaying()})},e.prototype.update=function(t,n){t===void 0&&(t=s2()),n===void 0&&(n=!0);var i=Object.keys(this._tweens);if(i.length!==0)for(;i.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<i.length;o++){var r=this._tweens[i[o]],s=!n;r&&r.update(t,s)===!1&&!n&&this.remove(r)}i=Object.keys(this._tweensAddedDuringUpdate)}},e}(),JS={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=JS.Utils.Linear;return t<0?r(e[0],e[1],i):t>1?r(e[n],e[n-1],n-i):r(e[o],e[o+1>n?n:o+1],i-o)},Bezier:function(e,t){for(var n=0,i=e.length-1,o=Math.pow,r=JS.Utils.Bernstein,s=0;s<=i;s++)n+=o(1-t,i-s)*o(t,s)*e[s]*r(i,s);return n},CatmullRom:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=JS.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(i=n*(1+t))),r(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],i-o)):t<0?e[0]-(r(e[0],e[0],e[1],e[1],-i)-e[0]):t>1?e[n]-(r(e[n],e[n],e[n-1],e[n-1],i-n)-e[n]):r(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],i-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=JS.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,o){var r=(n-e)*.5,s=(i-t)*.5,a=o*o,c=o*a;return(2*t-2*n+r+s)*c+(-3*t+3*n-2*r-s)*a+r*o+t}}},eEe=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),oX=new sdt,tEe=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=Wi.Linear.None,this._interpolationFunction=JS.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=eEe.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=oX,oX.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=s2()),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 o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}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,o,r){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 h=i[s];if(h.length===0)continue;for(var p=[a],g=0,m=h.length;g<m;g+=1){var _=this._handleRelativeValue(a,h[g]);if(isNaN(_)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(_)}f&&(i[s]=p)}if((u==="object"||c)&&a&&!f){n[s]=c?[]:{};var y=a;for(var C in y)n[s][C]=y[C];o[s]=c?[]:{};var h=i[s];if(!this._isDynamic){var E={};for(var C in h)E[C]=h[C];i[s]=h=E}this._setupProperties(y,n[s],h,o[s],r)}else(typeof n[s]>"u"||r)&&(n[s]=a),c||(n[s]*=1),f?o[s]=i[s].slice().reverse():o[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=s2()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=s2()),!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=Wi.Linear.None),this._easingFunction=t,this},e.prototype.interpolation=function(t){return t===void 0&&(t=JS.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,o;if(t===void 0&&(t=s2()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var r;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+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*a,u=function(){if(i._duration===0||s>c)return 1;var _=Math.trunc(s/a),y=s-_*a,C=Math.min(y/i._duration,1);return C===0&&s===i._duration?1:C},f=u(),h=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),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(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];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,o){for(var r in i)if(n[r]!==void 0){var s=n[r]||0,a=i[r],c=Array.isArray(t[r]),u=Array.isArray(a),f=!c&&u;f?t[r]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[r],s,a,o):(a=this._handleRelativeValue(s,a),typeof a=="number"&&(t[r]=s+(a-s)*o))}},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 Sfi=eEe.nextId,Bp=oX,wfi=Bp.getAll.bind(Bp),Bfi=Bp.removeAll.bind(Bp),Dfi=Bp.add.bind(Bp),vfi=Bp.remove.bind(Bp),Pfi=Bp.update.bind(Bp);var adt={LINEAR_NONE:Wi.Linear.None,QUADRATIC_IN:Wi.Quadratic.In,QUADRATIC_OUT:Wi.Quadratic.Out,QUADRATIC_IN_OUT:Wi.Quadratic.InOut,CUBIC_IN:Wi.Cubic.In,CUBIC_OUT:Wi.Cubic.Out,CUBIC_IN_OUT:Wi.Cubic.InOut,QUARTIC_IN:Wi.Quartic.In,QUARTIC_OUT:Wi.Quartic.Out,QUARTIC_IN_OUT:Wi.Quartic.InOut,QUINTIC_IN:Wi.Quintic.In,QUINTIC_OUT:Wi.Quintic.Out,QUINTIC_IN_OUT:Wi.Quintic.InOut,SINUSOIDAL_IN:Wi.Sinusoidal.In,SINUSOIDAL_OUT:Wi.Sinusoidal.Out,SINUSOIDAL_IN_OUT:Wi.Sinusoidal.InOut,EXPONENTIAL_IN:Wi.Exponential.In,EXPONENTIAL_OUT:Wi.Exponential.Out,EXPONENTIAL_IN_OUT:Wi.Exponential.InOut,CIRCULAR_IN:Wi.Circular.In,CIRCULAR_OUT:Wi.Circular.Out,CIRCULAR_IN_OUT:Wi.Circular.InOut,ELASTIC_IN:Wi.Elastic.In,ELASTIC_OUT:Wi.Elastic.Out,ELASTIC_IN_OUT:Wi.Elastic.InOut,BACK_IN:Wi.Back.In,BACK_OUT:Wi.Back.Out,BACK_IN_OUT:Wi.Back.InOut,BOUNCE_IN:Wi.Bounce.In,BOUNCE_OUT:Wi.Bounce.Out,BOUNCE_IN_OUT:Wi.Bounce.InOut},fs=Object.freeze(adt);function E8(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}E8.prototype.play=function(e,t,n){if(this.activeCamera=t,l(e)&&e!==null){let o=this;this.activeCallback=function(r){delete o.activeCallback,delete o.activeCamera,e(l(r)?!1:r)}}let i=this.getCameraOptions(n);if(this.view.headingPitchRoll)t.flyTo(i);else if(this.view.headingPitchRange){let o=new le(this.view.position);t.flyToBoundingSphere(o,i)}};E8.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};E8.prototype.getCameraOptions=function(e){let t={duration:this.duration};return l(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=fs.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=St(t,e)),t};var a2=E8;function rX(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}rX.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};rX.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var c2=rX;var dEe={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=QC(t),dEe[t]}},dX;typeof DOMParser<"u"&&(dX=new DOMParser);var cdt=new fEe.default({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),iC=32,nEe=2414016,iEe=1,oEe=16093e3,rEe=.1,sEe=[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"],aEe=["http://www.google.com/kml/ext/2.2"],ldt=["http://www.w3.org/2005/Atom"],Le={kml:sEe,gx:aEe,atom:ldt,kmlgx:sEe.concat(aEe)},hX={Document:IEe,Folder:Bdt,Placemark:Ddt,NetworkLink:Qdt,GroundOverlay:Ldt,PhotoOverlay:TEe,ScreenOverlay:Ndt,Tour:Pdt};function Dp(e){this._dataSource=e,this._deferred=Xl(),this._stack=[],this._promises=[],this._timeoutSet=!1,this._used=!1,this._started=0,this._timeThreshold=1e3}Object.defineProperties(Dp.prototype,{dataSource:{get:function(){return this._dataSource}}});Dp.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};Dp.prototype.addPromise=function(e){this._promises.push(e)};Dp.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};Dp.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=Tf._getTimestamp()),this._process(e)};Dp.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=Tf._getTimestamp(),e._process(!0)},0)};Dp.prototype._nextNode=function(){let e=this._stack,t=e[e.length-1],n=t.index,i=t.nodes;if(n!==i.length)return++t.index,i[n]};Dp.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};Dp.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;l(i);){let o=hX[i.localName];if(l(o)&&(Le.kml.indexOf(i.namespaceURI)!==-1||Le.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||Tf._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function udt(e){let t=e.slice(0,Math.min(4,e.size)),n=Xl(),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 fdt(e){let t=Xl(),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 hEe(e){let t={xsi:"http://www.w3.org/2001/XMLSchema-instance"},n,i,o,r;for(let s in t)t.hasOwnProperty(s)&&(o=RegExp(`[< ]${s}:`),r=`xmlns:${s}=`,o.test(e)&&e.indexOf(r)===-1&&(l(n)||(n=e.substr(0,e.indexOf("<kml")+4),i=e.substr(n.length)),n+=` ${r}"${t[s]}"`));return l(n)&&(e=n+i),e}function mEe(e){let t=e.indexOf("xmlns:"),n=e.indexOf(">",t),i,o,r;for(;t!==-1&&t<n;)i=e.slice(t,e.indexOf('"',t)),o=t,t=e.indexOf(i,t+1),t!==-1?(r=e.indexOf('"',e.indexOf('"',t)+1),e=e.slice(0,t-1)+e.slice(r+1,e.length),t=e.indexOf("xmlns:",o-1)):t=e.indexOf("xmlns:",o+1);return e}function ddt(e,t){return Promise.resolve(e.getData(new t8)).then(function(n){n=hEe(n),n=mEe(n),t.kml=dX.parseFromString(n,"application/xml")})}function sX(e,t){let n=dEe.detectFromFilename(e.filename)??"application/octet-stream";return Promise.resolve(e.getData(new $4(n))).then(function(i){t[e.filename]=i})}function xf(e,t,n,i){let o=i.keys,r=new l2.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 h=new l2.default(u).absoluteTo(r).toString(),p=o.indexOf(h);if(p!==-1){let g=o[p];c.setAttribute(n,i[g]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",g)}}}}function bf(e,t,n,i){let o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){let s=o[r],a=s.getAttribute(n),c=mX(a,i);l(c)&&s.setAttribute(n,c.url)}}function pEe(e,t,n){let i=$s(e,"id");i=l(i)&&i.length!==0?i:qn(),l(n)&&(i=n+i);let o=t.getById(i);return l(o)&&(i=qn(),l(n)&&(i=n+i)),o=t.add(new dr({id:i})),l(o.kml)||(o.addProperty("kml"),o.kml=new zdt),o}function u2(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function T8(e,t){if(!l(e))return d.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return d.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,d.fromDegrees(i,o,r,t)}function I8(e,t){if(!l(e))return;let n=e.textContent.match(/[^\s\n]+/g);if(!l(n))return;let i=n.length,o=new Array(i),r=0;for(let s=0;s<i;s++)o[r++]=T8(n[s],t);return o}function oC(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 $s(e,t){if(!l(e))return;let n=e.getAttribute(t);return n!==null?n:void 0}function ji(e,t,n){if(!l(e))return;let i=e.childNodes,o=i.length;for(let r=0;r<o;r++){let s=i[r];if(s.localName===t&&n.indexOf(s.namespaceURI)!==-1)return s}}function cEe(e,t,n){if(!l(e))return;let i=[],o=e.getElementsByTagNameNS("*",t),r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function dm(e,t,n){if(!l(e))return[];let i=[],o=e.childNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s];a.localName===t&&n.indexOf(a.namespaceURI)!==-1&&i.push(a)}return i}function mi(e,t,n){let i=ji(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function Gn(e,t,n){let i=ji(e,t,n);if(l(i))return i.textContent.trim()}function hm(e,t,n){let i=ji(e,t,n);if(l(i)){let o=i.textContent.trim();return o==="1"||/^true$/i.test(o)}}function mX(e,t,n){if(!l(e))return;let i;if(l(n)){e=e.replace(/\\/g,"/");let o=n[e];if(l(o))i=new we({url:o});else{let r=new l2.default(t.getUrlComponent()),s=new l2.default(e);o=n[s.absoluteTo(r)],l(o)&&(i=new we({url:o}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var bu={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function uX(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,o=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(bu.maximumRed=r,bu.red=void 0):(bu.maximumRed=void 0,bu.red=0),o>0?(bu.maximumGreen=o,bu.green=void 0):(bu.maximumGreen=void 0,bu.green=0),i>0?(bu.maximumBlue=i,bu.blue=void 0):(bu.maximumBlue=void 0,bu.blue=0),bu.alpha=n,G.fromRandom(bu)):new G(r,o,i,n)}function EI(e,t,n){let i=Gn(e,t,n);if(l(i))return uX(i,Gn(e,"colorMode",n)==="random")}function hdt(e){let t=ji(e,"TimeStamp",Le.kmlgx),n=Gn(t,"when",Le.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=K.fromIso8601(n),o=new ss;return o.addInterval(new Rn({start:i,stop:Ye.MAXIMUM_VALUE})),o}function mdt(e){let t=ji(e,"TimeSpan",Le.kmlgx);if(!l(t))return;let n,i=ji(t,"begin",Le.kmlgx),o=l(i)?K.fromIso8601(i.textContent):void 0,r=ji(t,"end",Le.kmlgx),s=l(r)?K.fromIso8601(r.textContent):void 0;if(l(o)&&l(s)){if(K.lessThan(s,o)){let a=o;o=s,s=a}n=new ss,n.addInterval(new Rn({start:o,stop:s}))}else l(o)?(n=new ss,n.addInterval(new Rn({start:o,stop:Ye.MAXIMUM_VALUE}))):l(s)&&(n=new ss,n.addInterval(new Rn({start:Ye.MINIMUM_VALUE,stop:s})));return n}function AEe(){let e=new Pc;return e.width=iC,e.height=iC,e.scaleByDistance=new Kt(nEe,iEe,oEe,rEe),e.pixelOffsetScaleByDistance=new Kt(nEe,iEe,oEe,rEe),e}function pX(){let e=new _h;return e.outline=!0,e.outlineColor=G.WHITE,e}function gEe(){let e=new gh;return e.translucencyByDistance=new Kt(3e6,1,5e6,0),e.pixelOffset=new U(17,0),e.horizontalOrigin=vi.LEFT,e.font="16px sans-serif",e.style=ir.FILL_AND_OUTLINE,e}function AX(e,t,n,i,o){let r=Gn(e,"href",Le.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=mi(e,"x",Le.gx)??0,u=mi(e,"y",Le.gx)??0;c=Math.min(c/32,7),u=7-Math.min(u/32,7);let f=8*u+c;r=`https://maps.google.com/mapfiles/kml/pal${a}/icon${f}.png`}let s=mX(r,n,i);if(o){let a=Gn(e,"refreshMode",Le.kml),c=Gn(e,"viewRefreshMode",Le.kml);a==="onInterval"||a==="onExpire"?yt(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&yt(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let u=Gn(e,"viewBoundScale",Le.kml)??1,f=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=Gn(e,"viewFormat",Le.kml)??f,p=Gn(e,"httpQuery",Le.kml);l(h)&&s.setQueryParameters(Fu(b8(h))),l(p)&&s.setQueryParameters(Fu(b8(p)));let g=t._ellipsoid;return _X(s,t.camera,t.canvas,u,t._lastCameraView.bbox,g),s}return s}function pdt(e,t,n,i,o){let r=mi(t,"scale",Le.kml),s=mi(t,"heading",Le.kml),a=EI(t,"color",Le.kml),c=ji(t,"Icon",Le.kml),u=AX(c,e,i,o,!1);l(c)&&!l(u)&&(u=!1);let f=mi(c,"x",Le.gx),h=mi(c,"y",Le.gx),p=mi(c,"w",Le.gx),g=mi(c,"h",Le.gx),m=ji(t,"hotSpot",Le.kml),_=oC(m,"x"),y=oC(m,"y"),C=$s(m,"xunits"),E=$s(m,"yunits"),I=n.billboard;l(I)||(I=AEe(),n.billboard=I),I.image=u,I.scale=r,I.color=a,(l(f)||l(h)||l(p)||l(g))&&(I.imageSubRegion=new qe(f,h,p,g)),l(s)&&s!==0&&(I.rotation=D.toRadians(-s),I.alignedAxis=d.UNIT_Z),r=r??1;let b,S;l(_)&&(C==="pixels"?b=-_*r:C==="insetPixels"?b=(_-iC)*r:C==="fraction"&&(b=-_*iC*r),b+=iC*.5*r),l(y)&&(E==="pixels"?S=y*r:E==="insetPixels"?S=(-y+iC)*r:E==="fraction"&&(S=y*iC*r),S-=iC*.5*r),(l(b)||l(S))&&(I.pixelOffset=new U(b,S))}function x8(e,t,n,i,o){for(let r=0,s=t.childNodes.length;r<s;r++){let a=t.childNodes.item(r);if(a.localName==="IconStyle")pdt(e,a,n,i,o);else if(a.localName==="LabelStyle"){let c=n.label;l(c)||(c=gEe(),n.label=c),c.scale=mi(a,"scale",Le.kml)??c.scale,c.fillColor=EI(a,"color",Le.kml)??c.fillColor,c.text=n.name}else if(a.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new Mc,n.polyline=c),c.width=mi(a,"width",Le.kml),c.material=EI(a,"color",Le.kml),l(EI(a,"outerColor",Le.gx))&&yt("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(mi(a,"outerWidth",Le.gx))&&yt("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(mi(a,"physicalWidth",Le.gx))&&yt("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(hm(a,"labelVisibility",Le.gx))&&yt("kml-gx:labelVisibility","KML - gx:labelVisibility is not supported in a LineStyle")}else if(a.localName==="PolyStyle"){let c=n.polygon;l(c)||(c=pX(),n.polygon=c),c.material=EI(a,"color",Le.kml)??c.material,c.fill=hm(a,"fill",Le.kml)??c.fill,c.outline=hm(a,"outline",Le.kml)??c.outline}else if(a.localName==="BalloonStyle"){let c=uX(Gn(a,"bgColor",Le.kml))??G.WHITE,u=uX(Gn(a,"textColor",Le.kml))??G.BLACK,f=Gn(a,"text",Le.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:u,text:f}}else if(a.localName==="ListStyle"){let c=Gn(a,"listItemType",Le.kml);(c==="radioFolder"||c==="checkOffOnly")&&yt(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function Adt(e,t,n,i,o){let r=new dr,s,a=-1,c=t.childNodes,u=c.length;for(let h=0;h<u;h++){let p=c[h];(p.localName==="Style"||p.localName==="StyleMap")&&(a=h)}if(a!==-1){let h=c[a];if(h.localName==="Style")x8(e,h,r,i,o);else{let p=dm(h,"Pair",Le.kml);for(let g=0;g<p.length;g++){let m=p[g],_=Gn(m,"key",Le.kml);if(_==="normal"){let y=Gn(m,"styleUrl",Le.kml);if(l(y))s=n.getById(y),l(s)||(s=n.getById(`#${y}`)),l(s)&&r.merge(s);else{let C=ji(m,"Style",Le.kml);x8(e,C,r,i,o)}}else yt(`kml-styleMap-${_}`,`KML - Unsupported StyleMap key: ${_}`)}}}let f=Gn(t,"styleUrl",Le.kml);if(l(f)){let h=f;if(f[0]!=="#"&&f.indexOf("#")!==-1){let p=f.split("#"),g=p[0];h=`${i.getDerivedResource({url:g}).getUrlComponent()}#${p[1]}`}s=n.getById(h),l(s)||(s=n.getById(`#${h}`)),l(s)&&r.merge(s)}return r}function gdt(e,t,n){return t.fetchXML().then(function(i){return _Ee(e,i,n,t,!0)})}function _Ee(e,t,n,i,o,r){let s,a,c,u,f=cEe(t,"Style",Le.kml);if(l(f)){let _=f.length;for(s=0;s<_;s++)u=f[s],a=$s(u,"id"),l(a)&&(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),l(n.getById(a))||(c=new dr({id:a}),n.add(c),x8(e,u,c,i,r)))}let h=cEe(t,"StyleMap",Le.kml);if(l(h)){let _=h.length;for(s=0;s<_;s++){let y=h[s];if(a=$s(y,"id"),l(a)){let C=dm(y,"Pair",Le.kml);for(let E=0;E<C.length;E++){let I=C[E],b=Gn(I,"key",Le.kml);if(b==="normal"){if(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),!l(n.getById(a))){c=n.getOrCreateEntity(a);let S=Gn(I,"styleUrl",Le.kml);if(l(S)){S[0]!=="#"&&(S=`#${S}`),o&&l(i)&&(S=i.getUrlComponent()+S);let B=n.getById(S);l(B)&&c.merge(B)}else u=ji(I,"Style",Le.kml),x8(e,u,c,i,r)}}else yt(`kml-styleMap-${b}`,`KML - Unsupported StyleMap key: ${b}`)}}}}let p=[],g=t.getElementsByTagName("styleUrl"),m=g.length;for(s=0;s<m;s++){let _=g[s].textContent;if(_[0]!=="#"){let y=_.split("#");if(y.length===2){let C=y[0],E=i.getDerivedResource({url:C});p.push(gdt(e,E,n))}}}return p}function gX(e,t,n){let i=new Bg(e,t.id,["position"]),o=new Ap(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new Mc,t.polyline.positions=new wg([i,o])}function yEe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?Ze.CLAMP_TO_GROUND:e==="relativeToGround"?Ze.RELATIVE_TO_GROUND:e==="absolute"?Ze.NONE:t==="clampToSeaFloor"?(yt("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),Ze.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(yt("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),Ze.RELATIVE_TO_GROUND):(l(e)?yt("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):yt("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),Ze.CLAMP_TO_GROUND)}function _dt(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&yt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new Ap(e))}function ydt(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")&&yt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`);let o=e.length;for(let r=0;r<o;r++){let s=e[r];i.scaleToGeodeticSurface(s,s)}return e}function S8(e,t,n,i){let o=t.label;l(o)||(o=l(n.label)?n.label.clone():gEe(),t.label=o),o.text=t.name;let r=t.billboard;l(r)||(r=l(n.billboard)?n.billboard.clone():AEe(),t.billboard=r),l(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(G.YELLOW,64);let s=1;l(r.scale)&&(s=r.scale.getValue(),s!==0?o.pixelOffset=new U(s*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),l(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function CEe(e,t){let n=e.path;l(n)||(n=new CA,n.leadTime=0,e.path=n);let i=t.polyline;l(i)&&(n.material=i.material,n.width=i.width)}function Cdt(e,t,n,i,o){let r=Gn(n,"coordinates",Le.kml),s=Gn(n,"altitudeMode",Le.kml),a=Gn(n,"altitudeMode",Le.gx),c=hm(n,"extrude",Le.kml),u=e._ellipsoid,f=T8(r,u);return i.position=f,S8(e,i,o,yEe(s,a)),c&&u2(s,a)&&gX(t,i,o),!0}function lEe(e,t,n,i,o){let r=ji(n,"coordinates",Le.kml),s=Gn(n,"altitudeMode",Le.kml),a=Gn(n,"altitudeMode",Le.gx),c=hm(n,"extrude",Le.kml),u=hm(n,"tessellate",Le.kml),f=u2(s,a),h=mi(n,"drawOrder",Le.gx),p=e._ellipsoid,g=I8(r,p),m=o.polyline;if(f&&c){let _=new EA;i.wall=_,_.positions=g;let y=o.polygon;l(y)&&(_.fill=y.fill,_.material=y.material),_.outline=!0,l(m)?(_.outlineColor=l(m.material)?m.material.color:G.WHITE,_.outlineWidth=m.width):l(y)&&(_.outlineColor=l(y.material)?y.material.color:G.WHITE)}else if(e._clampToGround&&!f&&u){let _=new Mc;_.clampToGround=!0,i.polyline=_,_.positions=g,l(m)?(_.material=l(m.material)?m.material.color.getValue(Ye.MINIMUM_VALUE):G.WHITE,_.width=m.width??1):(_.material=G.WHITE,_.width=1),_.zIndex=h}else l(h)&&yt("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!u&&yt("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),m=l(m)?m.clone():new Mc,i.polyline=m,m.positions=ydt(g,s,a,p),(!u||f)&&(m.arcType=ln.NONE);return!0}function Edt(e,t,n,i,o){let r=ji(n,"outerBoundaryIs",Le.kml),s=ji(r,"LinearRing",Le.kml),a=ji(s,"coordinates",Le.kml),c=e._ellipsoid,u=I8(a,c),f=hm(n,"extrude",Le.kml),h=Gn(n,"altitudeMode",Le.kml),p=Gn(n,"altitudeMode",Le.gx),g=u2(h,p),m=l(o.polygon)?o.polygon.clone():pX(),_=o.polyline;if(l(_)&&(m.outlineColor=l(_.material)?_.material.color:G.WHITE,m.outlineWidth=_.width),i.polygon=m,g?(m.perPositionHeight=!0,m.extrudedHeight=f?0:void 0):e._clampToGround||(m.height=0),l(u)){let y=new uc(u),C=dm(n,"innerBoundaryIs",Le.kml);for(let E=0;E<C.length;E++){s=dm(C[E],"LinearRing",Le.kml);for(let I=0;I<s.length;I++)a=ji(s[I],"coordinates",Le.kml),u=I8(a,c),l(u)&&y.holes.push(new uc(u))}m.hierarchy=y}return!0}function Idt(e,t,n,i,o){let r=Gn(n,"altitudeMode",Le.kml),s=Gn(n,"altitudeMode",Le.gx),a=dm(n,"coord",Le.gx),c=dm(n,"angles",Le.gx),u=dm(n,"when",Le.kml),f=hm(n,"extrude",Le.kml),h=u2(r,s),p=e._ellipsoid;c.length>0&&yt("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");let g=Math.min(a.length,u.length),m=[],_=[];for(let C=0;C<g;C++){let E=T8(a[C].textContent,p);m.push(E),_.push(K.fromIso8601(u[C].textContent))}let y=new Ha;return y.addSamples(_,m),i.position=y,S8(e,i,o,yEe(r,s)),CEe(i,o),i.availability=new ss,u.length>0&&i.availability.addInterval(new Rn({start:_[0],stop:_[_.length-1]})),h&&f&&gX(t,i,o),!0}function uEe(e,t,n,i,o,r,s,a,c){let u=e[0],f=e[e.length-1],h=new Ha;h.addSamples(e,t),n.intervals.addInterval(new Rn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:_dt(h,s,a)})),i.addInterval(new Rn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new Rn({start:u,stop:f,isStartIncluded:c,isStopIncluded:c,data:r}))}function xdt(e,t,n,i,o){let r=hm(n,"interpolate",Le.gx),s=dm(n,"Track",Le.gx),a,c,u,f=!1,h=new vg,p=new ss,g=new za,m=e._ellipsoid;for(let _=0,y=s.length;_<y;_++){let C=s[_],E=dm(C,"when",Le.kml),I=dm(C,"coord",Le.gx),b=Gn(C,"altitudeMode",Le.kml),S=Gn(C,"altitudeMode",Le.gx),B=u2(b,S),v=hm(C,"extrude",Le.kml),P=Math.min(I.length,E.length),N=[];a=[];for(let L=0;L<P;L++){let A=T8(I[L].textContent,m);N.push(A),a.push(K.fromIso8601(E[L].textContent))}r&&(l(c)&&uEe([c,a[0]],[u,N[0]],g,p,h,!1,"absolute",void 0,!1),c=a[P-1],u=N[N.length-1]),uEe(a,N,g,p,h,B&&v,b,S,!0),f=f||B&&v}return i.availability=p,i.position=g,S8(e,i,o),CEe(i,o),f&&(gX(t,i,o),i.polyline.show=h),!0}var EEe={Point:Cdt,LineString:lEe,LinearRing:lEe,Polygon:Edt,Track:Idt,MultiTrack:xdt,MultiGeometry:bdt,Model:Tdt};function bdt(e,t,n,i,o,r){let s=n.childNodes,a=!1;for(let c=0,u=s.length;c<u;c++){let f=s.item(c),h=EEe[f.localName];if(l(h)){let p=pEe(f,t,r);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,h(e,t,f,p,o)&&(a=!0)}}return a}function Tdt(e,t,n,i,o){return yt("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function Sdt(e,t){let n=ji(e,"ExtendedData",Le.kml);if(!l(n))return;l(ji(n,"SchemaData",Le.kml))&&yt("kml-schemaData","KML - SchemaData is unsupported"),l($s(n,"xmlns:prefix"))&&yt("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=dm(n,"Data",Le.kml);if(l(o)){let r=o.length;for(let s=0;s<r;s++){let a=o[s],c=$s(a,"name");l(c)&&(i[c]={displayName:Gn(a,"displayName",Le.kml),value:Gn(a,"value",Le.kml)})}}t.kml.extendedData=i}var So;typeof document<"u"&&(So=document.createElement("div"));function wdt(e,t,n,i,o){let r,s,a,c=t.kml,u=c.extendedData,f=Gn(e,"description",Le.kml),h=t.balloonStyle??n.balloonStyle,p=G.WHITE,g=G.BLACK,m=f;l(h)&&(p=h.bgColor??G.WHITE,g=h.textColor??G.BLACK,m=h.text??f);let _;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 E=m.match(/\$\[.+?\]/g);if(E!==null)for(r=0;r<E.length;r++){let I=E[r],b=I.substr(2,I.length-3),S=/\/displayName$/.test(b);b=b.replace(/\/displayName$/,""),_=u[b],l(_)&&(_=S?_.displayName:_.value),l(_)&&(m=m.replace(I,_??""))}}}else if(l(u)&&(a=Object.keys(u),a.length>0)){for(m='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],_=u[s],m+=`<tr><th>${_.displayName??s}</th><td>${_.value??""}</td></tr>`;m+="</tbody></table>"}if(!l(m))return;m=cdt.link(m),So.innerHTML=m;let y=So.querySelectorAll("a");for(r=0;r<y.length;r++)y[r].setAttribute("target","_blank");l(i)&&i.keys.length>1&&(xf(So,"a","href",i),xf(So,"link","href",i),xf(So,"area","href",i),xf(So,"img","src",i),xf(So,"iframe","src",i),xf(So,"video","src",i),xf(So,"audio","src",i),xf(So,"source","src",i),xf(So,"track","src",i),xf(So,"input","src",i),xf(So,"embed","src",i),xf(So,"script","src",i),xf(So,"video","poster",i)),bf(So,"a","href",o),bf(So,"link","href",o),bf(So,"area","href",o),bf(So,"img","src",o),bf(So,"iframe","src",o),bf(So,"video","src",o),bf(So,"audio","src",o),bf(So,"source","src",o),bf(So,"track","src",o),bf(So,"input","src",o),bf(So,"embed","src",o),bf(So,"script","src",o),bf(So,"video","poster",o);let C='<div class="cesium-infoBox-description-lighter" style="';C+="overflow:auto;",C+="word-wrap:break-word;",C+=`background-color:${p.toCssColorString()};`,C+=`color:${g.toCssColorString()};`,C+='">',C+=`${So.innerHTML}</div>`,So.innerHTML="",t.description=C}function w8(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=pEe(t,i,n.context),c=a.kml,u=Adt(e,t,n.styleCollection,r,s),f=Gn(t,"name",Le.kml);a.name=f,a.parent=o;let h=mdt(t);l(h)||(h=hdt(t)),a.availability=h,CX(a);function p(I){return I?I.show&&p(I.parent):!0}let g=hm(t,"visibility",Le.kml);a.show=p(o)&&(g??!0);let m=ji(t,"author",Le.atom),_=c.author;_.name=Gn(m,"name",Le.atom),_.uri=Gn(m,"uri",Le.atom),_.email=Gn(m,"email",Le.atom);let y=ji(t,"link",Le.atom),C=c.link;C.href=$s(y,"href"),C.hreflang=$s(y,"hreflang"),C.rel=$s(y,"rel"),C.type=$s(y,"type"),C.title=$s(y,"title"),C.length=$s(y,"length"),c.address=Gn(t,"address",Le.kml),c.phoneNumber=Gn(t,"phoneNumber",Le.kml),c.snippet=Gn(t,"Snippet",Le.kml),Sdt(t,a),wdt(t,a,u,s,r);let E=e._ellipsoid;return bEe(t,a,E),xEe(t,a,E),l(ji(t,"Region",Le.kml))&&yt("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:u}}function IEe(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function Bdt(e,t,n,i){let o=w8(e,t,n),r=je(n);r.parentEntity=o.entity,IEe(e,t,r,i)}function Ddt(e,t,n,i){let o=w8(e,t,n),r=o.entity,s=o.styleEntity,a=!1,c=t.childNodes;for(let u=0,f=c.length;u<f&&!a;u++){let h=c.item(u),p=EEe[h.localName];l(p)&&(p(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),S8(e,r,s))}var vdt={FlyTo:Mdt,Wait:Rdt,SoundCue:aX,AnimatedUpdate:aX,TourControl:aX};function Pdt(e,t,n,i){let o=Gn(t,"name",Le.kml),r=$s(t,"id"),s=new r2(o,r),a=ji(t,"Playlist",Le.gx);if(a){let c=e._ellipsoid,u=a.childNodes;for(let f=0;f<u.length;f++){let h=u[f];if(h.localName){let p=vdt[h.localName];p?p(s,h,c):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}function aX(e,t){yt(`KML Tour unsupported node ${t.localName}`)}function Rdt(e,t){let n=mi(t,"duration",Le.gx);e.addPlaylistEntry(new c2(n))}function Mdt(e,t,n){let i=mi(t,"duration",Le.gx),o=Gn(t,"flyToMode",Le.gx),r={kml:{}};bEe(t,r,n),xEe(t,r,n);let s=r.kml.lookAt||r.kml.camera,a=new a2(i,o,s);e.addPlaylistEntry(a)}function xEe(e,t,n){let i=ji(e,"Camera",Le.kml);if(l(i)){let o=mi(i,"longitude",Le.kml)??0,r=mi(i,"latitude",Le.kml)??0,s=mi(i,"altitude",Le.kml)??0,a=mi(i,"heading",Le.kml)??0,c=mi(i,"tilt",Le.kml)??0,u=mi(i,"roll",Le.kml)??0,f=d.fromDegrees(o,r,s,n),h=ic.fromDegrees(a,c-90,u);t.kml.camera=new kF(f,h)}}function bEe(e,t,n){let i=ji(e,"LookAt",Le.kml);if(l(i)){let o=mi(i,"longitude",Le.kml)??0,r=mi(i,"latitude",Le.kml)??0,s=mi(i,"altitude",Le.kml)??0,a=mi(i,"heading",Le.kml),c=mi(i,"tilt",Le.kml),u=mi(i,"range",Le.kml)??0;c=D.toRadians(c??0),a=D.toRadians(a??0);let f=new Ld(a,c-D.PI_OVER_TWO,u),h=d.fromDegrees(o,r,s,n);t.kml.lookAt=new o2(h,f)}}function Ndt(e,t,n,i){let o=n.screenOverlayContainer;if(!l(o))return;let r=n.sourceResource,s=n.uriResolver,a=ji(t,"Icon",Le.kml),c=AX(a,e,r,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"],h=ji(t,"screenXY",Le.kml),p=ji(t,"overlayXY",Le.kml),g=ji(t,"size",Le.kml),m,_,y,C,E,I;l(g)&&(m=oC(g,"x"),_=oC(g,"y"),y=$s(g,"xunits"),C=$s(g,"yunits"),l(m)&&m!==-1&&m!==0&&(y==="fraction"?E=`width: ${Math.floor(m*100)}%`:y==="pixels"&&(E=`width: ${m}px`),f.push(E)),l(_)&&_!==-1&&_!==0&&(C==="fraction"?I=`height: ${Math.floor(_*100)}%`:C==="pixels"&&(I=`height: ${_}px`),f.push(I))),u.style=f.join(";");let b=0,S=u.height;l(p)&&(m=oC(p,"x"),_=oC(p,"y"),y=$s(p,"xunits"),C=$s(p,"yunits"),l(m)&&(y==="fraction"?b=m*u.width:(y==="pixels"||y==="insetPixels")&&(b=m)),l(_)&&(C==="fraction"?S=_*u.height:(C==="pixels"||C==="insetPixels")&&(S=_))),l(h)&&(m=oC(h,"x"),_=oC(h,"y"),y=$s(h,"xunits"),C=$s(h,"yunits"),l(m)&&(y==="fraction"?E=`left: calc(${Math.floor(m*100)}% - ${b}px)`:y==="pixels"?E=`left: ${m-b}px`:y==="insetPixels"&&(E=`right: ${m-b}px`),f.push(E)),l(_)&&(C==="fraction"?I=`bottom: calc(${Math.floor(_*100)}% - ${S}px)`:C==="pixels"?I=`bottom: ${_-S}px`:C==="insetPixels"&&(I=`top: ${_-S}px`),f.push(I))),u.style=f.join(";")},o.appendChild(u)}function Ldt(e,t,n,i){let r=w8(e,t,n).entity,s,a=!1,c=e._ellipsoid,u=I8(ji(t,"LatLonQuad",Le.gx),c),f=mi(t,"drawOrder",Le.kml);if(l(u))s=pX(),s.hierarchy=new uc(u),s.zIndex=f,r.polygon=s,a=!0;else{s=new yh,s.zIndex=f,r.rectangle=s;let m=ji(t,"LatLonBox",Le.kml);if(l(m)){let _=mi(m,"west",Le.kml),y=mi(m,"south",Le.kml),C=mi(m,"east",Le.kml),E=mi(m,"north",Le.kml);l(_)&&(_=D.negativePiToPi(D.toRadians(_))),l(y)&&(y=D.clampToLatitudeRange(D.toRadians(y))),l(C)&&(C=D.negativePiToPi(D.toRadians(C))),l(E)&&(E=D.clampToLatitudeRange(D.toRadians(E))),s.coordinates=new ae(_,y,C,E);let I=mi(m,"rotation",Le.kml);if(l(I)){let b=D.toRadians(I);s.rotation=b,s.stRotation=b}}}let h=ji(t,"Icon",Le.kml),p=AX(h,e,n.sourceResource,n.uriResolver,!0);if(l(p)){a&&yt("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let m=mi(h,"x",Le.gx),_=mi(h,"y",Le.gx),y=mi(h,"w",Le.gx),C=mi(h,"h",Le.gx);(l(m)||l(_)||l(y)||l(C))&&yt("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=p,s.material.color=EI(t,"color",Le.kml),s.material.transparent=!0}else s.material=EI(t,"color",Le.kml);let g=Gn(t,"altitudeMode",Le.kml);l(g)?g==="absolute"?(s.height=mi(t,"altitude",Le.kml),s.zIndex=void 0):g!=="clampToGround"&&yt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`):(g=Gn(t,"altitudeMode",Le.gx),g==="relativeToSeaFloor"?(yt("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=mi(t,"altitude",Le.kml),s.zIndex=void 0):g==="clampToSeaFloor"?yt("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(g)&&yt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${g}`))}function TEe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),yt(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var rC={INTERVAL:0,EXPIRE:1,STOP:2};function b8(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var Odt=new ae,ZS=new me,cX=new U,Fdt=new d;function _X(e,t,n,i,o,r){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=GC(e.queryParameters);if(c=c.replace(/%5B/g,"[").replace(/%5D/g,"]"),l(t)&&t._mode!==oe.MORPHING){let u,f;if(o=o??Odt,l(n)&&(cX.x=n.clientWidth*.5,cX.y=n.clientHeight*.5,u=t.pickEllipsoid(cX,r,Fdt)),l(u)?f=r.cartesianToCartographic(u,ZS):(f=ae.center(o,ZS),u=r.cartographicToCartesian(f)),l(i)&&!D.equalsEpsilon(i,1,D.EPSILON9)){let C=o.width*i*.5,E=o.height*i*.5;o=new ae(a(f.longitude-C),s(f.latitude-E),a(f.longitude+C),s(f.latitude+E))}c=c.replace("[bboxWest]",D.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",D.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",D.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",D.toDegrees(o.north).toString());let h=D.toDegrees(f.longitude).toString(),p=D.toDegrees(f.latitude).toString();c=c.replace("[lookatLon]",h),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]",d.distance(t.positionWC,u)),c=c.replace("[lookatTerrainLon]",h),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",f.height.toString()),r.cartesianToCartographic(t.positionWC,ZS),c=c.replace("[cameraLon]",D.toDegrees(ZS.longitude).toString()),c=c.replace("[cameraLat]",D.toDegrees(ZS.latitude).toString()),c=c.replace("[cameraAlt]",D.toDegrees(ZS.height).toString());let g=t.frustum,m=g.aspectRatio,_="",y="";if(l(m)){let C=D.toDegrees(g.fov);m>1?(_=C,y=C/m):(y=C,_=C*m)}c=c.replace("[horizFov]",_.toString()),c=c.replace("[vertFov]",y.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(Fu(c))}function Qdt(e,t,n,i){let r=w8(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=ji(t,"Link",Le.kml);if(l(c)||(c=ji(t,"Url",Le.kml)),l(c)){let u=Gn(c,"href",Le.kml),f,h;if(l(u)){let p=u;if(u=mX(u,s,n.uriResolver),/^data:/.test(u.getUrlComponent()))/\.kmz/i.test(s.getUrlComponent())||(p=s.getDerivedResource({url:p}));else{if(p=u.clone(),f=Gn(c,"viewRefreshMode",Le.kml),f==="onRegion"){yt("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}h=Gn(c,"viewBoundScale",Le.kml)??1;let y=f==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",C=Gn(c,"viewFormat",Le.kml)??y,E=Gn(c,"httpQuery",Le.kml);l(C)&&u.setQueryParameters(Fu(b8(C))),l(E)&&u.setQueryParameters(Fu(b8(E)));let I=e._ellipsoid;_X(u,e.camera,e.canvas,h,e._lastCameraView.bbox,I)}let g={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},m=new ya,_=yX(e,m,u,g).then(function(y){let C=e._entityCollection,E=m.values;C.suspendEvents();for(let S=0;S<E.length;S++){let B=E[S];l(B.parent)||(B.parent=r,CX(B)),C.add(B)}C.resumeEvents();let I=Gn(c,"refreshMode",Le.kml),b=mi(c,"refreshInterval",Le.kml)??0;if(I==="onInterval"&&b>0||I==="onExpire"||f==="onStop"){let S=ji(y,"NetworkLinkControl",Le.kml),B=l(S),v=K.now(),P={id:qn(),href:u,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:v},N=0;if(B&&(P.cookie=Fu(Gn(S,"cookie",Le.kml)??""),N=mi(S,"minRefreshPeriod",Le.kml)??0),I==="onInterval")B&&(b=Math.max(N,b)),P.refreshMode=rC.INTERVAL,P.time=b;else if(I==="onExpire"){let L;if(B&&(L=Gn(S,"expires",Le.kml)),l(L))try{let A=K.fromIso8601(L),x=K.secondsDifference(A,v);x>0&&x<N&&K.addSeconds(v,N,A),P.refreshMode=rC.EXPIRE,P.time=A}catch{yt("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else yt("kml-refreshMode-onExpire","KML - refreshMode of onExpire requires the NetworkLinkControl to have an expires element")}else l(e.camera)?(P.refreshMode=rC.STOP,P.time=mi(c,"viewRefreshTime",Le.kml)??0):yt("kml-refrehMode-onStop-noCamera","A NetworkLink with viewRefreshMode=onStop requires the `camera` property to be defined.");l(P.refreshMode)&&e._networkLinks.set(P.id,P)}}).catch(function(y){yt(`An error occured during loading ${u.url}`),e._error.raiseEvent(e,y)});i.addPromise(_)}}}function kdt(e,t,n,i){let o=hX[t.localName];return l(o)?o(e,t,n,i):TEe(e,t,n,i)}function fX(e,t,n,i,o,r,s){t.removeAll();let a=n.documentElement,c=a.localName==="Document"?a:ji(a,"Document",Le.kml),u=Gn(c,"name",Le.kml);l(u)||(u=Tg(i.getUrlComponent())),l(e._name)||(e._name=u);let f=new Tf._DeferredLoading(e),h=new ya(e);return Promise.all(_Ee(e,n,h,i,!1,o)).then(function(){let p=n.documentElement;if(p.localName==="kml"){let m=p.childNodes;for(let _=0;_<m.length;_++){let y=m[_];if(l(hX[y.localName])){p=y;break}}}let g={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),kdt(e,p,g,f),t.resumeEvents(),f.wait().then(function(){return n.documentElement})})}function Udt(e,t,n,i,o){let r=fn("ThirdParty/Workers/z-worker-pako.js");VS({workerScripts:{deflate:[r,"./pako_deflate.min.js"],inflate:[r,"./pako_inflate.min.js"]}});let s=new p8(new Hg(n));return Promise.resolve(s.getEntries()).then(function(a){let c=[],u={},f;for(let h=0;h<a.length;h++){let p=a[h];p.directory||(/\.kml$/i.test(p.filename)&&(!l(f)||!/\//i.test(p.filename))?(l(f)&&c.push(sX(f,u)),f=p):c.push(sX(p,u)))}return l(f)&&c.push(ddt(f,u)),Promise.all(c).then(function(){if(s.close(),!l(u.kml))throw new ce("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),fX(e,t,u.kml,i,u,o)})})}function yX(e,t,n,i){i=i??V.EMPTY_OBJECT;let o=i.sourceUri,r=i.uriResolver,s=i.context,a=i.screenOverlayContainer,c=n;if(typeof n=="string"||n instanceof we){n=we.createIfNeeded(n),c=n.fetchBlob(),o=o??n.clone();let u=e._resourceCredits,f=n.credits;if(l(f)){let h=f.length;for(let p=0;p<h;p++)u.push(f[p])}}else o=o??we.DEFAULT.clone();return o=we.createIfNeeded(o),l(a)&&(a=Un(a)),Promise.resolve(c).then(function(u){return u instanceof Blob?udt(u).then(function(f){return f?Udt(e,t,u,o,a):fdt(u).then(function(h){h=hEe(h),h=mEe(h);let p,g;try{p=dX.parseFromString(h,"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 ce(m)}return fX(e,t,p,o,r,a,s)})}):fX(e,t,u,o,r,a,s)}).catch(function(u){return e._error.raiseEvent(e,u),console.log(u),Promise.reject(u)})}function Tf(e){e=e??V.EMPTY_OBJECT;let t=e.camera,n=e.canvas;this._changed=new ge,this._error=new ge,this._loading=new ge,this._refresh=new ge,this._unsupportedNode=new ge,this._clock=void 0,this._entityCollection=new ya(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new Qg,this._networkLinks=new Pt,this._entityCluster=new uf,this.canvas=n,this.camera=t,this._lastCameraView={position:l(t)?d.clone(t.positionWC):void 0,direction:l(t)?d.clone(t.directionWC):void 0,up:l(t)?d.clone(t.upWC):void 0,bbox:l(t)?t.computeViewRectangle():ae.clone(ae.MAX_VALUE)},this._ellipsoid=e.ellipsoid??ne.default;let i=e.credit;typeof i=="string"&&(i=new Bt(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}Tf.load=function(e,t){return t=t??V.EMPTY_OBJECT,new Tf(t).load(e,t)};Object.defineProperties(Tf.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}},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}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},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}},kmlTours:{get:function(){return this._kmlTours}}});Tf.prototype.load=function(e,t){t=t??V.EMPTY_OBJECT,as.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=t.clampToGround??!1;let i=this;return yX(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=K.equals(s,Ye.MINIMUM_VALUE),u=K.equals(a,Ye.MAXIMUM_VALUE);if(!c||!u){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=K.fromDate(h)),u&&(h=new Date,h.setHours(24,0,0,0),a=K.fromDate(h)),o=new $h,o.startTime=s,o.stopTime=a,o.currentTime=K.clone(s),o.clockRange=cs.LOOP_STOP,o.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,o.multiplier=Math.round(Math.min(Math.max(K.secondsDifference(a,s)/60,1),31556900))}let f=!1;return o!==i._clock&&(i._clock=o,f=!0),n!==i._name&&(f=!0),f&&i._changed.raiseEvent(i),as.setLoading(i,!1),i}).catch(function(o){return as.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};Tf.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function CX(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 Gdt(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=ji(r,"NetworkLinkControl",Le.kml),c=l(a),u=0;if(c){if(l(ji(a,"Update",Le.kml))){yt("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=Fu(Gn(a,"cookie",Le.kml)??""),u=mi(a,"minRefreshPeriod",Le.kml)??0}let f=K.now(),h=t.refreshMode;if(h===rC.INTERVAL)l(a)&&(t.time=Math.max(u,t.time));else if(h===rC.EXPIRE){let v;if(l(a)&&(v=Gn(a,"expires",Le.kml)),l(v))try{let P=K.fromIso8601(v),N=K.secondsDifference(P,f);N>0&&N<u&&K.addSeconds(f,u,P),t.time=P}catch{yt("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else yt("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 _(v){g.remove(v);let P=v._children,N=P.length;for(let L=0;L<N;++L)_(P[L])}g.suspendEvents();let y=g.values.slice(),C;for(C=0;C<y.length;++C){let v=y[C];v.parent===p&&(v.parent=void 0,_(v))}for(g.resumeEvents(),g.suspendEvents(),C=0;C<m.length;C++){let v=m[C];l(v.parent)||(v.parent=p,CX(v)),g.add(v)}g.resumeEvents(),s?i.remove(t.id):t.lastUpdated=f;let E=g.computeAvailability(),I=E.start,b=E.stop,S=K.equals(I,Ye.MINIMUM_VALUE),B=K.equals(b,Ye.MAXIMUM_VALUE);if(!S||!B){let v=e._clock;(v.startTime!==I||v.stopTime!==b)&&(v.startTime=I,v.stopTime=b,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var lX=new Pt;Tf.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=K.now(),i=this;lX.removeAll();function o(f){let h=f._children,p=h.length;for(let g=0;g<p;++g){let m=h[g];lX.set(m.id,m),o(m)}}let r=!1,s=this._lastCameraView,a=this.camera;l(a)&&!(a.positionWC.equalsEpsilon(s.position,D.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,D.EPSILON7)&&a.upWC.equalsEpsilon(s.up,D.EPSILON7))&&(s.position=d.clone(a.positionWC),s.direction=d.clone(a.directionWC),s.up=d.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);let c=new Pt,u=!1;return t.values.forEach(function(f){let h=f.entity;if(!lX.contains(h.id)){if(!f.updating){let p=!1;if(f.refreshMode===rC.INTERVAL?K.secondsDifference(n,f.lastUpdated)>f.time&&(p=!0):f.refreshMode===rC.EXPIRE?K.greaterThan(n,f.time)&&(p=!0):f.refreshMode===rC.STOP&&(r&&(f.needsUpdate=!0,f.cameraUpdateTime=n),f.needsUpdate&&K.secondsDifference(n,f.cameraUpdateTime)>=f.time&&(p=!0)),p){o(h),f.updating=!0;let g=new ya,m=f.href.clone();m.setQueryParameters(f.cookie);let _=i._ellipsoid??ne.default;_X(m,i.camera,i.canvas,f.viewBoundScale,s.bbox,_),yX(i,g,m,{context:h.id}).then(Gdt(i,f,g,c,m)).catch(function(y){let C=`NetworkLink ${f.href} refresh failed: ${y}`;console.log(C),i._error.raiseEvent(i,C)}),u=!0}}c.set(f.id,f)}}),u&&(this._networkLinks=c,this._changed.raiseEvent(this)),!0};function zdt(){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}Tf._DeferredLoading=Dp;Tf._getTimestamp=Mi;var II=Tf;function f2(){he.throwInstantiationError()}f2.prototype.update=he.throwInstantiationError;f2.prototype.getBoundingSphere=he.throwInstantiationError;f2.prototype.isDestroyed=he.throwInstantiationError;f2.prototype.destroy=he.throwInstantiationError;var EX=f2;var IX=32,Vdt="http://www.opengis.net/kml/2.2",pm="http://www.google.com/kml/ext/2.2",Hdt="http://www.w3.org/2000/xmlns/";function B8(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Wdt=/^data:image\/([^,;]+)/;B8.prototype.texture=function(e){let t=this,n;if(typeof e=="string"||e instanceof we){if(e=we.createIfNeeded(e),!e.isDataUri)return e.url;let i=e.url.match(Wdt);n=`texture_${++this._count}`,l(i)&&(n+=`.${i[1]}`);let o=e.fetchBlob().then(function(r){t._files[n]=r});return this._promises.push(o),n}if(e instanceof HTMLCanvasElement){n=`texture_${++this._count}.png`;let i=new Promise(o=>{e.toBlob(function(r){t._files[n]=r,o()})});return this._promises.push(i),n}return""};function jdt(e,t){return function(n){e._files[t]=n}}B8.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new ce("Encountered a model entity while exporting to KML, but no model callback was supplied.");let i={},o=n(e,t,i);for(let r in i)if(i.hasOwnProperty(r)){let s=Promise.resolve(i[r]);this._promises.push(s),s.then(jdt(this,r))}return o};Object.defineProperties(B8.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function D8(e){this._time=e}D8.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};D8.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return bI(n)};D8.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function xX(){this._ids={},this._styles={},this._count=0}xX.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};xX.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 BEe(){this._ids={}}BEe.prototype.get=function(e){if(!l(e))return this.get(qn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function bX(e){e=e??V.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=bX._createState(e),o=t.values.filter(function(u){return!l(u.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(Hdt,"xmlns:gx",pm);let a=r.createElement("Document");s.appendChild(a),vEe(i,a,o),i.styleCache.save(a);let c=i.externalFileHandler;return c.promise.then(function(){let f=new XMLSerializer().serializeToString(i.kmlDoc);return n?Ydt(f,c.files):{kml:f,externalFiles:c.files}})}function Ydt(e,t){let n=fn("ThirdParty/Workers/z-worker-pako.js");VS({workerScripts:{deflate:[n,"./pako_deflate.min.js"],inflate:[n,"./pako_inflate.min.js"]}});let i=new ZF,o=new y8(i);return o.add("doc.kml",new e8(e)).then(function(){let r=Object.keys(t);return DEe(o,r,t,0)}).then(function(){return o.close()}).then(function(r){return{kmz:r}})}function DEe(e,t,n,i){if(t.length===i)return;let o=t[i];return e.add(o,new Hg(n[o])).then(function(){return DEe(e,t,n,i+1)})}bX._createState=function(e){let t=e.entities,n=new xX,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=e.defaultAvailability??i,s=e.sampleDuration??60;r.start===Ye.MINIMUM_VALUE?r.stop===Ye.MAXIMUM_VALUE?r=new Rn:K.addSeconds(r.stop,-10*s,r.start):r.stop===Ye.MAXIMUM_VALUE&&K.addSeconds(r.start,10*s,r.stop);let a=new B8(e.modelCallback);return{kmlDoc:document.implementation.createDocument(Vdt,"kml"),ellipsoid:e.ellipsoid??ne.default,idManager:new BEe,styleCache:n,externalFileHandler:a,time:o,valueGetter:new D8(o),sampleDuration:s,defaultAvailability:new ss([r])}};function vEe(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,u,f;for(let h=0;h<a;++h){let p=n[h];c=[],u=[],f=[],qdt(e,p,u,f),Kdt(e,p.polyline,u,f),wEe(e,p.rectangle,u,f,c),wEe(e,p.polygon,u,f,c),$dt(e,p,p.model,u,f);let g,m=p.availability;l(m)&&(g=i.createElement("TimeSpan"),K.equals(m.start,Ye.MINIMUM_VALUE)||g.appendChild(En(i,"begin",K.toIso8601(m.start))),K.equals(m.stop,Ye.MAXIMUM_VALUE)||g.appendChild(En(i,"end",K.toIso8601(m.stop))));for(let C=0;C<c.length;++C){let E=c[C];E.setAttribute("id",s.get(p.id)),E.appendChild(En(i,"name",p.name)),E.appendChild(En(i,"visibility",p.show)),E.appendChild(En(i,"description",p.description)),l(g)&&E.appendChild(g),t.appendChild(E)}let _=u.length;if(_>0){let C=i.createElement("Placemark");C.setAttribute("id",s.get(p.id));let E=p.name,I=p.label;if(l(I)){let S=i.createElement("LabelStyle"),B=r.get(I.text);E=l(B)&&B.length>0?B:E;let v=r.getColor(I.fillColor);l(v)&&(S.appendChild(En(i,"color",v)),S.appendChild(En(i,"colorMode","normal")));let P=r.get(I.scale);l(P)&&S.appendChild(En(i,"scale",P)),f.push(S)}C.appendChild(En(i,"name",E)),C.appendChild(En(i,"visibility",p.show)),C.appendChild(En(i,"description",p.description)),l(g)&&C.appendChild(g),t.appendChild(C);let b=f.length;if(b>0){let S=i.createElement("Style");for(let B=0;B<b;++B)S.appendChild(f[B]);C.appendChild(En(i,"styleUrl",o.get(S)))}if(u.length===1)C.appendChild(u[0]);else if(u.length>1){let S=i.createElement("MultiGeometry");for(let B=0;B<_;++B)S.appendChild(u[B]);C.appendChild(S)}}let y=p._children;if(y.length>0){let C=i.createElement("Folder");C.setAttribute("id",s.get(p.id)),C.appendChild(En(i,"name",p.name)),C.appendChild(En(i,"visibility",p.show)),C.appendChild(En(i,"description",p.description)),t.appendChild(C),vEe(e,C,y)}}}var Tu=new d,Gl=new me,mm=new K;function qdt(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter,a=t.billboard??t.point;if(!l(a)&&!l(t.path))return;let c=t.position;if(!c.isConstant){PEe(e,t,a,n,i);return}s.get(c,void 0,Tu);let u=En(o,"coordinates",xI(Tu,r)),f=o.createElement("Point"),h=o.createElement("altitudeMode");h.appendChild(TI(e,a.heightReference)),f.appendChild(h),f.appendChild(u),n.push(f);let p=a instanceof Pc?MEe(e,a):REe(e,a);i.push(p)}function PEe(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,u=t.position,f=!0;u instanceof za?(c=u.intervals,f=!1):c=t.availability??e.defaultAvailability;let h=n instanceof yA,p,g,m,_=[];for(p=0;p<c.length;++p){let C=c.get(p),E=f?u:C.data,I=r.createElement("altitudeMode");E instanceof Ap?(E=E._value,I.appendChild(TI(e,Ze.CLAMP_TO_GROUND))):l(n)?I.appendChild(TI(e,n.heightReference)):I.appendChild(TI(e,Ze.NONE));let b=[],S=[];if(E.isConstant){a.get(E,void 0,Tu);let v=En(r,"coordinates",xI(Tu,s));b.push(K.toIso8601(C.start)),S.push(v),b.push(K.toIso8601(C.stop)),S.push(v)}else if(E instanceof Ha)for(m=E._property._times,g=0;g<m.length;++g)b.push(K.toIso8601(m[g])),E.getValueInReferenceFrame(m[g],Xi.FIXED,Tu),S.push(xI(Tu,s));else if(E instanceof mf){m=E._times;let v=E._values;for(g=0;g<m.length;++g)b.push(K.toIso8601(m[g])),d.fromArray(v,g*3,Tu),S.push(xI(Tu,s))}else{let v=e.sampleDuration;C.start.clone(mm),C.isStartIncluded||K.addSeconds(mm,v,mm);let P=C.stop;for(;K.lessThan(mm,P);)E.getValue(mm,Tu),b.push(K.toIso8601(mm)),S.push(xI(Tu,s)),K.addSeconds(mm,v,mm);C.isStopIncluded&&K.equals(mm,P)&&(E.getValue(mm,Tu),b.push(K.toIso8601(mm)),S.push(xI(Tu,s)))}let B=r.createElementNS(pm,"Track");B.appendChild(I);for(let v=0;v<b.length;++v){let P=En(r,"when",b[v]),N=En(r,"coord",S[v],pm);B.appendChild(P),B.appendChild(N)}h&&B.appendChild(NEe(e,n)),_.push(B)}if(_.length===1)i.push(_[0]);else if(_.length>1){let C=r.createElementNS(pm,"MultiTrack");for(p=0;p<_.length;++p)C.appendChild(_[p]);i.push(C)}if(l(n)&&!h){let C=n instanceof Pc?MEe(e,n):REe(e,n);o.push(C)}let y=t.path;if(l(y)){let C=a.get(y.width),E=y.material;if(l(E)||l(C)){let I=r.createElement("LineStyle");l(C)&&I.appendChild(En(r,"width",C)),TX(e,E,I),o.push(I)}}}function REe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);l(r)&&(o.appendChild(En(n,"color",r)),o.appendChild(En(n,"colorMode","normal")));let s=i.get(t.pixelSize);return l(s)&&o.appendChild(En(n,"scale",s/IX)),o}function MEe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("IconStyle"),s=i.get(t.image);if(l(s)){s=o.texture(s);let p=n.createElement("Icon");p.appendChild(En(n,"href",s));let g=i.get(t.imageSubRegion);l(g)&&(p.appendChild(En(n,"x",g.x,pm)),p.appendChild(En(n,"y",g.y,pm)),p.appendChild(En(n,"w",g.width,pm)),p.appendChild(En(n,"h",g.height,pm))),r.appendChild(p)}let a=i.getColor(t.color);l(a)&&(r.appendChild(En(n,"color",a)),r.appendChild(En(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&r.appendChild(En(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,IX),g=i.get(t.height,IX),m=i.get(t.horizontalOrigin,vi.CENTER);m===vi.CENTER?u.x-=p*.5:m===vi.RIGHT&&(u.x-=p);let _=i.get(t.verticalOrigin,Hn.CENTER);_===Hn.TOP?u.y+=g:_===Hn.CENTER&&(u.y+=g*.5);let y=n.createElement("hotSpot");y.setAttribute("x",-u.x),y.setAttribute("y",u.y),y.setAttribute("xunits","pixels"),y.setAttribute("yunits","pixels"),r.appendChild(y)}let f=i.get(t.rotation),h=i.get(t.alignedAxis);return l(f)&&d.equals(d.UNIT_Z,h)&&(f=D.toDegrees(-f),f===0&&(f=360),r.appendChild(En(n,"heading",f))),r}function Kdt(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=e.valueGetter;if(!l(t))return;let a=o.createElement("LineString"),c=o.createElement("altitudeMode"),u=s.get(t.clampToGround,!1),f;u?(a.appendChild(En(o,"tessellate",!0)),f=o.createTextNode("clampToGround")):f=o.createTextNode("absolute"),c.appendChild(f),a.appendChild(c);let h=t.positions,p=s.get(h),g=En(o,"coordinates",xI(p,r));a.appendChild(g);let m=s.get(t.zIndex);u&&l(m)&&a.appendChild(En(o,"drawOrder",m,pm)),n.push(a);let _=o.createElement("LineStyle"),y=s.get(t.width);l(y)&&_.appendChild(En(o,"width",y)),TX(e,t.material,_),i.push(_)}function Xdt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0);n>0&&(r=n);let s=t.coordinates,a=o.get(s),c=[],u=[ae.northeast,ae.southeast,ae.southwest,ae.northwest];for(let g=0;g<4;++g)u[g](a,Gl),c.push(`${D.toDegrees(Gl.longitude)},${D.toDegrees(Gl.latitude)},${r}`);let f=En(i,"coordinates",c.join(" ")),h=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(f),h.appendChild(p),[h]}function SEe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let f=0;f<a;++f)me.fromCartesian(t[f],r,Gl),s.push(`${D.toDegrees(Gl.longitude)},${D.toDegrees(Gl.latitude)},${i?Gl.height:n}`);let c=En(o,"coordinates",s.join(" ")),u=o.createElement("LinearRing");return u.appendChild(c),u}function Jdt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0),s=o.get(t.perPositionHeight,!1);!s&&n>0&&(r=n);let a=[],c=t.hierarchy,u=o.get(c),f=Array.isArray(u)?u:u.positions,h=i.createElement("outerBoundaryIs");h.appendChild(SEe(e,f,r,s)),a.push(h);let p=u.holes;if(l(p)){let g=p.length;for(let m=0;m<g;++m){let _=i.createElement("innerBoundaryIs");_.appendChild(SEe(e,p[m].positions,r,s)),a.push(_)}}return a}function wEe(e,t,n,i,o){let r=e.kmlDoc,s=e.valueGetter;if(!l(t))return;let a=t instanceof yh;if(a&&s.getMaterialType(t.material)==="Image"){Zdt(e,t,o);return}let c=r.createElement("Polygon"),u=s.get(t.extrudedHeight,0);u>0&&c.appendChild(En(r,"extrude",!0));let f=a?Xdt(e,t,u):Jdt(e,t,u),h=f.length;for(let y=0;y<h;++y)c.appendChild(f[y]);let p=r.createElement("altitudeMode");p.appendChild(TI(e,t.heightReference)),c.appendChild(p),n.push(c);let g=r.createElement("PolyStyle"),m=s.get(t.fill,!1);m&&g.appendChild(En(r,"fill",m)),TX(e,t.material,g);let _=s.get(t.outline,!1);if(_){g.appendChild(En(r,"outline",_));let y=r.createElement("LineStyle"),C=s.get(t.outlineWidth,1);y.appendChild(En(r,"width",C));let E=s.getColor(t.outlineColor,G.BLACK);y.appendChild(En(r,"color",E)),y.appendChild(En(r,"colorMode","normal")),i.push(y)}i.push(g)}function Zdt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(TI(e,t.heightReference)),s.appendChild(a);let c=o.get(t.height);l(c)&&s.appendChild(En(i,"altitude",c));let u=o.get(t.coordinates),f=i.createElement("LatLonBox");f.appendChild(En(i,"north",D.toDegrees(u.north))),f.appendChild(En(i,"south",D.toDegrees(u.south))),f.appendChild(En(i,"east",D.toDegrees(u.east))),f.appendChild(En(i,"west",D.toDegrees(u.west))),s.appendChild(f);let h=o.get(t.material),p=r.texture(h.image),g=i.createElement("Icon");g.appendChild(En(i,"href",p)),s.appendChild(g);let m=h.color;l(m)&&s.appendChild(En(i,"color",bI(h.color))),n.push(s)}function NEe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=e.externalFileHandler,r=n.createElement("Model"),s=i.get(t.scale);if(l(s)){let u=n.createElement("scale");u.appendChild(En(n,"x",s)),u.appendChild(En(n,"y",s)),u.appendChild(En(n,"z",s)),r.appendChild(u)}let a=n.createElement("Link"),c=o.model(t,e.time);return a.appendChild(En(n,"href",c)),r.appendChild(a),r}function $dt(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter;if(!l(n))return;let c=t.position;if(!c.isConstant){PEe(e,t,n,i,o);return}let u=NEe(e,n),f=r.createElement("altitudeMode");f.appendChild(TI(e,n.heightReference)),u.appendChild(f),a.get(c,void 0,Tu),me.fromCartesian(Tu,s,Gl);let h=r.createElement("Location");h.appendChild(En(r,"longitude",D.toDegrees(Gl.longitude))),h.appendChild(En(r,"latitude",D.toDegrees(Gl.latitude))),h.appendChild(En(r,"altitude",Gl.height)),u.appendChild(h),i.push(u)}function TX(e,t,n){let i=e.kmlDoc,o=e.valueGetter;if(!l(t))return;let r=o.get(t);if(!l(r))return;let s,a=o.getMaterialType(t),c,u;switch(a){case"Image":s=bI(G.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=bI(r.color);break;case"PolylineOutline":s=bI(r.color),c=bI(r.outlineColor),u=r.outlineWidth,n.appendChild(En(i,"outerColor",c,pm)),n.appendChild(En(i,"outerWidth",u,pm));break;case"Stripe":s=bI(r.oddColor);break}l(s)&&(n.appendChild(En(i,"color",s)),n.appendChild(En(i,"colorMode","normal")))}function TI(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,Ze.NONE),r;switch(o){case Ze.NONE:r=n.createTextNode("absolute");break;case Ze.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case Ze.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function xI(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)me.fromCartesian(e[o],t,Gl),i.push(`${D.toDegrees(Gl.longitude)},${D.toDegrees(Gl.latitude)},${Gl.height}`);return i.join(" ")}function En(e,t,n,i){n=n??"",typeof n=="boolean"&&(n=n?"1":"0");let o=l(i)?e.createElementNS(i,t):e.createElement(t),r=n==="string"&&n.indexOf("<")!==-1?e.createCDATASection(n):e.createTextNode(n);return o.appendChild(r),o}function bI(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 SX=bX;var $S=`#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 d2=`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; } /** * Estimate the geometric self-shadowing of the microfacets in a surface, * using the Smith Joint GGX visibility function. * Note: Vis = G / (4 * NdotL * NdotV) * see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3 * see Real-Time Rendering. Page 331 to 336. * see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg) * * @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness. * @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source. * @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera. */ 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; // 2.0 if NdotL = NdotV = 1.0 if (GGX > 0.0) { return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0 } 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); } `;var h2=`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; } // Interpolate a voxel with its neighbor (along the positive X-axis) 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); } // Intersection with a unit sphere with radius 0.5 at center (0, 0, 0). 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; } // Transforms the ray origin and direction into unit sphere space, // then transforms the result back into the ellipsoid's space. 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; } // Assume that if phase shift is being called for octave i, // the frequency is of i - 1. This saves us from doing extra // division / multiplication operations. 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)); } // The cloud texture function derived from Gardner's 1985 paper, // "Visual Simulation of Clouds." // https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf const float T0 = 0.6; // contrast of the texture pattern const float k = 0.1; // computed to produce a maximum value of 1 const float C0 = 0.8; // coefficient const float FX0 = 0.6; // frequency X const float FY0 = 0.6; // frequency Y 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; // fraction of surface reflection due to ambient or scattered light, const float t = 0.4; // fraction of texture shading const float s = 0.25; // fraction of specular reflection 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); // diffuse reflection float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection float It = T(cloudPoint); // texture function 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; // The dot product between the cloud's normal and the ray's direction is greatest // in the center of the ellipsoid's surface. It decreases towards the edge. // Thus, it is used to blur the areas leading to the edges of the ellipsoid, // so that no harsh lines appear. // The first (and biggest) layer of worley noise is then subtracted from this. // The final result is scaled up so that the base cloud is not too translucent. float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0); float TR = pow(ndDot, 3.0) - W; // translucency TR *= 1.3; // Subtracting the second and third layers of worley noise is more complicated. // If these layers of noise were simply subtracted from the current translucency, // the shape derived from the first layer of noise would be completely deleted. // The erosion of this noise should thus be constricted to the edges of the cloud. // However, because the edges of the ellipsoid were already blurred away, mapping // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance. // The value of (0.5 - ndDot) provides the best compromise. float minusDot = 0.5 - ndDot; // Even with the previous calculation, subtracting the second layer of wnoise // erode too much of the cloud. The addition of it, however, will detailed // volume to the cloud. As long as the noise is only added and not subtracted, // the results are aesthetically pleasing. // The minusDot product is mapped in a way that it is larger at the edges of // the ellipsoid, so a subtraction and min operation are used instead of // an addition and max one. TR -= min(minusDot * W2, 0.0); // The third level of worley noise is subtracted from the result, with some // modifications. First, a scalar is added to minusDot so that the noise // starts affecting the shape farther away from the center of the ellipsoid's // surface. Then, it is scaled down so its impact is not too intense. TR -= 0.8 * (minusDot + 0.25) * W3; // The texture function's shading does not correlate with the shape of the cloud // produced by the layers of noise, so an extra shading scalar is calculated. // The darkest areas of the cloud are assigned to be where the noise erodes // the cloud the most. This is then interpolated based on the translucency // and the diffuse shading term of that point in the cloud. float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR); // To avoid values that are too dark, this scalar is increased by a small amount // and clamped so it never goes to zero. shading = clamp(shading + 0.2, 0.3, 1.0); // Finally, the contrast of the cloud's color is increased. 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 // To avoid calculations with high values, // we raycast from an arbitrarily smaller space. 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 m2=`#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() { // Unpack attributes. 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 p2=`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)); } // Frequency corresponds to cell size. // The higher the frequency, the smaller the cell size. 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 A2=`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; } `;var g2=`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 _2=`/** * Compositing for Weighted Blended Order-Independent Transparency. See: * - http://jcgt.org/published/0002/02/09/ * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html */ 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; } } `;var y2=`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); // left, bottom vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top 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 C2=`in vec4 position; out vec4 positionEC; void main() { positionEC = czm_modelView * position; gl_Position = czm_projection * positionEC; czm_vertexLogDepth(); } `;var ew=`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; // normalized surface normal (always facing the viewer) in model coordinates vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates 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() { // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii // in the vertex shader. Only when it is larger than some constant, march along the ray. // Otherwise perform one intersection test which will be the common case. // Test if the ray intersects a sphere with the ellipsoid's maximum radius. // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test // may cause false negatives. This will discard fragments before marching the ray forward. 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; } // March ray forward to intersection with larger sphere and find 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; } // If the viewer is outside, compute outsideFaceColor, with normals facing outward. vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0); // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward. 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 tw=`in vec3 position; uniform vec3 u_radii; out vec3 v_positionEC; void main() { // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates. // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry, // but doing it here allows us to change the radii without rewriting the vertex data, and // allows all ellipsoids to reuse the same vertex data. vec4 p = vec4(u_radii * position, 1.0); v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates gl_Position = czm_modelViewProjection * p; // position in clip coordinates // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the // ellipsoid (does not write depth) that was rendered in the farther frustum. // // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates // artifacts since some fragments can be alpha blended twice. This is solved by only rendering // the ellipsoid in the closest frustum to the viewer. gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far); czm_vertexLogDepth(); } `;/** * @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 E2=`/** * @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. */ // NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples // Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h // Steps used to integrate into Cesium: // * The following defines are set: // #define FXAA_PC 1 // #define FXAA_WEBGL_1 1 // #define FXAA_GREEN_AS_LUMA 1 // #define FXAA_EARLY_EXIT 1 // #define FXAA_GLSL_120 1 // * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed. // * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace // /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/. // * There are no implicit conversions from ivec* to vec* so replace: // #define FxaaInt2 ivec2 // with // #define FxaaInt2 vec2 // * The texture2DLod function is only available in vertex shaders so replace: // #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0) // #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0) // with // #define FxaaTexTop(t, p) texture(t, p) // #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r)) // * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future. // * The following parameters to FxaaPixelShader are unused and can be removed: // fxaaConsolePosPos // fxaaConsoleRcpFrameOpt // fxaaConsoleRcpFrameOpt2 // fxaaConsole360RcpFrameOpt2 // fxaaConsoleEdgeSharpness // fxaaConsoleEdgeThreshold // fxaaConsoleEdgeThresholdMi // fxaaConsole360ConstDir // // Choose the quality preset. // This needs to be compiled into the shader as it effects code. // Best option to include multiple presets is to // in each shader define the preset, then include this file. // // OPTIONS // ----------------------------------------------------------------------- // 10 to 15 - default medium dither (10=fastest, 15=highest quality) // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality) // 39 - no dither, very expensive // // NOTES // ----------------------------------------------------------------------- // 12 = slightly faster then FXAA 3.9 and higher edge quality (default) // 13 = about same speed as FXAA 3.9 and better than 12 // 23 = closest to FXAA 3.9 visually and performance wise // _ = the lowest digit is directly related to performance // _ = the highest digit is directly related to style // //#define FXAA_QUALITY_PRESET 12 #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( // // Use noperspective interpolation here (turn off perspective interpolation). // {xy} = center of pixel FxaaFloat2 pos, // // Input color texture. // {rgb_} = color in linear or perceptual color space // if (FXAA_GREEN_AS_LUMA == 0) // {___a} = luma in perceptual color space (not linear) FxaaTex tex, // // Only used on FXAA Quality. // This must be from a constant/uniform. // {x_} = 1.0/screenWidthInPixels // {_y} = 1.0/screenHeightInPixels FxaaFloat2 fxaaQualityRcpFrame, // // Only used on FXAA Quality. // This used to be the FXAA_QUALITY_SUBPIX define. // It is here now to allow easier tuning. // Choose the amount of sub-pixel aliasing removal. // This can effect sharpness. // 1.00 - upper limit (softer) // 0.75 - default amount of filtering // 0.50 - lower limit (sharper, less sub-pixel aliasing removal) // 0.25 - almost off // 0.00 - completely off FxaaFloat fxaaQualitySubpix, // // Only used on FXAA Quality. // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define. // It is here now to allow easier tuning. // The minimum amount of local contrast required to apply algorithm. // 0.333 - too little (faster) // 0.250 - low quality // 0.166 - default // 0.125 - high quality // 0.063 - overkill (slower) FxaaFloat fxaaQualityEdgeThreshold, // // Only used on FXAA Quality. // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define. // It is here now to allow easier tuning. // Trims the algorithm from processing darks. // 0.0833 - upper limit (default, the start of visible unfiltered edges) // 0.0625 - high quality (faster) // 0.0312 - visible limit (slower) // Special notes when using FXAA_GREEN_AS_LUMA, // Likely want to set this to zero. // As colors that are mostly not-green // will appear very dark in the green channel! // Tune by looking at mostly non-green content, // then start at zero and increase until aliasing is a problem. 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); } `;var I2=`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 #ifdef ENABLE_CLIPPING_POLYGONS uniform highp sampler2D u_clippingDistance; in vec2 v_clippingPosition; flat in int v_regionIndex; #endif #if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING)) uniform float u_minimumBrightness; #endif // Based on colorCorrect // The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift // are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider // - The tileProvider.hue/saturation/brightnessShift are just passed through // from the Globe hue/saturation/brightness, like atmosphereBrightnessShift // - The applyFog depends on enableFog, and some tile distance from the viewer // - The showGroundAtmosphere is a flag that is passed through from the Globe, // and is true by default when the ellipsoid is WGS84 #ifdef COLOR_CORRECT uniform vec3 u_hsbShift; // Hue, saturation, brightness #endif // Based on highlightFillTile // This is set for terrain tiles when they are "fill" tiles, and // the terrainProvider.fillHighlightColor was set to a value with // nonzero alpha #ifdef HIGHLIGHT_FILL_TILE uniform vec4 u_fillHighlightColor; #endif // Based on translucent // This is set depending on the GlobeTranslucencyState #ifdef TRANSLUCENT uniform vec4 u_frontFaceAlphaByDistance; uniform vec4 u_backFaceAlphaByDistance; uniform vec4 u_translucencyRectangle; #endif // Based on showUndergroundColor // This is set when GlobeSurfaceTileProvider.isUndergroundVisible // returns true, AND the tileProvider.undergroundColor had a value with // nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance // was in the right range #ifdef UNDERGROUND_COLOR uniform vec4 u_undergroundColor; uniform vec4 u_undergroundColorAlphaByDistance; #endif // Based on enableLighting && hasVertexNormals // The enableLighting flag is passed in directly from the Globe. // The hasVertexNormals flag is from the tileProvider #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) { // This crazy step stuff sets the alpha to 0.0 if this following condition is true: // tileTextureCoordinates.s < textureCoordinateRectangle.s || // tileTextureCoordinates.s > textureCoordinateRectangle.p || // tileTextureCoordinates.t < textureCoordinateRectangle.t || // tileTextureCoordinates.t > textureCoordinateRectangle.q // In other words, the alpha is zero if the fragment is outside the rectangle // covered by this texture. Would an actual 'if' yield better performance? 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; // Split to the left if (split < 0.0 && gl_FragCoord.x > splitPosition) { alpha = 0.0; } // Split to the right 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; // When rendering imagery for a tile in multiple passes, // some GPU/WebGL implementation combinations will not blend fragments in // additional passes correctly if their computation includes an unmasked // divide-by-zero operation, // even if it's not in the output or if the output has alpha zero. // // For example, without sanitization for outAlpha, // this renders without artifacts: // if (outAlpha == 0.0) { outColor = vec3(0.0); } // // but using czm_branchFreeTernary will cause portions of the tile that are // alpha-zero in the additional pass to render as black instead of blending // with the previous pass: // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor); // // So instead, sanitize against divide-by-zero, // store this state on the sign of outAlpha, and correct on return. 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)); // normalized surface normal in model coordinates vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates #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 // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0 // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the // fragments on the edges of tiles even though the vertex shader is outputting // coordinates strictly in the 0-1 range. 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 vec2 clippingPosition = v_clippingPosition; int regionIndex = v_regionIndex; clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex); #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; // When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader. // Otherwise, the scattering is computed in the vertex shader. #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); // Fog is applied to tiles selected for fog, close to the Earth. #ifdef FOG vec3 fogColor = groundAtmosphereColor.rgb; // If there is lighting, apply that to the fog. #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 // Apply ground atmosphere. This happens when the camera is far away from the earth. // The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere. // This value is larger near the "circumference", as it is further away from the camera. We use it to // brighten up that area of the ground atmosphere. 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 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); } // Based on water rendering by Jonas Wagner: // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog // low altitude wave settings const float oceanFrequencyLowAltitude = 825000.0; const float oceanAnimationSpeedLowAltitude = 0.004; const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0; const float oceanSpecularIntensity = 0.5; // high altitude wave settings 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); // The double normalize below works around a bug in Firefox on Android devices. vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC)); // Fade out the waves as the camera moves far from the surface. float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength); #ifdef SHOW_OCEAN_WAVES // high altitude 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); // low altitude waves time = czm_frameNumber * oceanAnimationSpeedLowAltitude; noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0); vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude); // blend the 2 wave layers based on distance to surface 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); // fade out the normal perturbation as we move farther from the water surface 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); // Use diffuse light to highlight the waves float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue; vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade); #ifdef SHOW_OCEAN_WAVES // Where diffuse light is low or non-existent, use wave highlights based solely on // the wave bumpiness and no particular light direction. float tsPerturbationRatio = normalTangentSpace.z; vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity); #else vec3 nonDiffuseHighlight = vec3(0.0); #endif // Add specular highlights in 3D, and in all modes when zoomed in. 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 x2=`#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; // Uniforms for 2D Mercator projection 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 #ifdef ENABLE_CLIPPING_POLYGONS uniform highp sampler2D u_clippingExtents; out vec2 v_clippingPosition; flat out int v_regionIndex; #endif // These functions are generated at runtime. 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) { // The width of a tile at level 11, in radians and assuming a single root tile, is // 2.0 * czm_pi / pow(2.0, 11.0) // We want to just linearly interpolate the 2D position from the texture coordinates // when we're at this level or higher. The constant below is the expression // above evaluated and then rounded up at the 4th significant digit. 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) { // We do not do RTC while morphing, so there is potential for jitter. // This is unlikely to be noticeable, though. 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); return czm_modelViewProjection * morphPosition; } #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) float webMercatorT = textureCoordinates.y; float encodedNormal = compressed0.w; #else float webMercatorT = textureCoordinates.y; float encodedNormal = 0.0; #endif #else // A single float per element 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; // stop from going through center of earth 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; // position in model coordinates 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 #ifdef ENABLE_CLIPPING_POLYGONS vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC); sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi); vec2 minDistance = vec2(czm_infinity); v_clippingPosition = vec2(czm_infinity); v_regionIndex = -1; for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) { vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex); vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz; vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0)); vec2 distance = abs(rectUv - clamped) * extents.wz; float threshold = 0.01; if (minDistance.x > distance.x || minDistance.y > distance.y) { minDistance = distance; v_clippingPosition = rectUv; if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) { v_regionIndex = regionIndex; } } } #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 nw=`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 iw=`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; // Adjustment to the atmosphere radius applied based on the camera height. 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); // Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit // for the position on the ellipsoid. float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust; float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust; // Setup the primary ray: from the camera position to the vertex position. vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC; vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC); czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection); underTranslucentGlobe = 0.0; // Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled. #if defined(GLOBE_TRANSLUCENT) // Check for intersection with the inner radius of the atmopshere. czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust); if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) { // Compute position on globe. 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); // Control the color using the camera angle. float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth)); // Control the opacity using the distance from Earth. 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); // Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton. underTranslucentGlobe = 1.0; return; } #endif computeScattering( primaryRay, length(cameraToPositionWC), lightDirection, atmosphereInnerRadius, rayleighColor, mieColor, opacity ); // Alter the opacity based on how close the viewer is to the ground. // (0.0 = At edge of atmosphere, 1.0 = On ground) float cameraHeight = czm_eyeHeight + atmosphereInnerRadius; float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS; opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0); // Alter alpha based on time of day (0.0 = night , 1.0 = day) float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0; opacity *= pow(nightAlpha, 0.5); } `;var b2=`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 // For the parts of the sky atmosphere that are not behind a translucent globe, // we mix in the default opacity so that the sky atmosphere still appears at distance. // This is needed because the opacity in the sky atmosphere is initially adjusted based // on the camera height. if (translucent == 0.0) { color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime); } out_FragColor = color; } `;var T2=`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; gl_Position = czm_modelViewProjection * position; } `;var S2=`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 w2=`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 B2=`uniform sampler2D u_texture; in vec2 v_textureCoordinates; void main() { vec4 color = texture(u_texture, v_textureCoordinates); out_FragColor = czm_gammaCorrect(color); } `;var D2=`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); // The following loop has been manually unrolled for speed, to // avoid sin() and cos(). // //for (float i = 0.4; i < 3.2; i += 1.047) { // vec2 direction = vec2(sin(i), cos(i)); // burst += 0.4 * addBurst(position, direction, lengthScalar); // // direction = vec2(sin(i - 0.08), cos(i - 0.08)); // burst += 0.3 * addBurst(position, direction, lengthScalar); //} burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4 burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047 burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0 burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08 burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08 burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08 // End of manual loop unrolling. color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15; out_FragColor = clamp(color, vec4(0.0), vec4(1.0)); } `;var v2=`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; } `;var P2=` 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); } `;async function eht(e,t,n,i){return l(i)||(i=!1),iht(e,t,n,i)}function tht(e,t,n){let i=e[0],o=i.terrainProvider.requestTileGeometry(i.x,i.y,i.level);if(!o)return!1;let r;return n?r=o.then(OEe(i)):r=o.then(OEe(i)).catch(oht(i)),e.shift(),t.push(r),!0}function nht(e){return new Promise(function(t){setTimeout(t,e)})}function wX(e,t,n){return e.length?tht(e,t,n)?wX(e,t,n):nht(100).then(()=>wX(e,t,n)):Promise.resolve()}function iht(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r<n.length;++r){let u=o.positionToTileXY(n[r],t);if(!l(u))continue;let f=u.toString();if(!a.hasOwnProperty(f)){let h={x:u.x,y:u.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[f]=h,s.push(h)}a[f].positions.push(n[r])}let c=[];return wX(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function LEe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function OEe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!LEe(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];LEe(s,i,n)}}):Promise.resolve()}}function oht(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var R2=eht;var BX=new U;async function FEe(e,t,n){l(n)||(n=!1);let i=[],o=[],r=e.availability,s=[];for(let c=0;c<t.length;++c){let u=t[c],f=r.computeMaximumLevelAtPosition(u);if(o[c]=f,f===0){e.tilingScheme.positionToTileXY(u,1,BX);let p=e.loadTileDataAvailability(BX.x,BX.y,1);l(p)&&s.push(p)}let h=i[f];l(h)||(i[f]=h=[]),h.push(u)}await Promise.all(s),await Promise.all(i.map(function(c,u){if(l(c))return R2(e,u,c,n)}));let a=[];for(let c=0;c<t.length;++c){let u=t[c];r.computeMaximumLevelAtPosition(u)!==o[c]&&a.push(u)}return a.length>0&&await FEe(e,a,n),t}var SI=FEe;async function DX(e,t){let n=t.terrainProvider,i=t.mapProjection,o=i.ellipsoid,r,s=t.camera.getRectangleCameraCoordinates(e);if(t.mode===oe.SCENE3D?r=o.cartesianToCartographic(s):r=i.unproject(s),!l(n))return r;let a=n.availability;if(!l(a)||t.mode===oe.SCENE2D)return r;let c=[ae.center(e),ae.southeast(e),ae.southwest(e),ae.northeast(e),ae.northwest(e)],u=await DX._sampleTerrainMostDetailed(n,c),f=!1,h=u.reduce(function(g,m){return l(m.height)?(f=!0,Math.max(m.height,g)):g},-Number.MAX_VALUE),p=r;return f&&(p.height+=h),p}DX._sampleTerrainMostDetailed=SI;var wI=DX;var rht={NONE:0,LERC:1},kd=Object.freeze(rht);var sht={NONE:0,BITS12:1},Ia=Object.freeze(sht);var BI=new d,aht=new d,Ud=new U,v8=new M,cht=new M,lht=Math.pow(2,12);function Xc(e,t,n,i,o,r,s,a,c,u){let f=Ia.NONE,h,p;if(l(t)&&l(n)&&l(i)&&l(o)){let g=t.minimum,m=t.maximum,_=d.subtract(m,g,aht),y=i-n;Math.max(d.maximumComponent(_),y)<lht-1?f=Ia.BITS12:f=Ia.NONE,h=M.inverseTransformation(o,new M);let E=d.negate(g,BI);M.multiply(M.fromTranslation(E,v8),h,h);let I=BI;I.x=1/_.x,I.y=1/_.y,I.z=1/_.z,M.multiply(M.fromScale(I,v8),h,h),p=M.clone(o),M.setTranslation(p,d.ZERO,p),o=M.clone(o,new M);let b=M.fromTranslation(g,v8),S=M.fromScale(_,cht),B=M.multiply(b,S,v8);M.multiply(o,B,o),M.multiply(p,B,p)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=d.clone(e),this.toScaledENU=h,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r,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()}Xc.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,u=i.y;if(this.quantization===Ia.BITS12){n=M.multiplyByPoint(this.toScaledENU,n,BI),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,h=D.clamp((o-this.minimumHeight)/f,0,1);U.fromElements(n.x,n.y,Ud);let p=Fn.compressTextureCoordinates(Ud);U.fromElements(n.z,h,Ud);let g=Fn.compressTextureCoordinates(Ud);U.fromElements(c,u,Ud);let m=Fn.compressTextureCoordinates(Ud);if(e[t++]=p,e[t++]=g,e[t++]=m,this.hasWebMercatorT){U.fromElements(s,0,Ud);let _=Fn.compressTextureCoordinates(Ud);e[t++]=_}}else d.subtract(n,this.center,BI),e[t++]=BI.x,e[t++]=BI.y,e[t++]=BI.z,e[t++]=o,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=Fn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var uht=new d,QEe=new d;Xc.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let f=0;f<i;f++){let h=s*i+f,p=s*r+f;t[p]=e[h]}let a=this.decodePosition(t,s,uht),c=n.geodeticSurfaceNormal(a,QEe),u=s*r+this._offsetGeodeticSurfaceNormal;t[u]=c.x,t[u+1]=c.y,t[u+2]=c.z}};Xc.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++){let a=r*n+s,c=r*o+s;t[c]=e[a]}};Xc.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new d),t*=this.stride,this.quantization===Ia.BITS12){let i=Fn.decompressTextureCoordinates(e[t],Ud);n.x=i.x,n.y=i.y;let o=Fn.decompressTextureCoordinates(e[t+1],Ud);return n.z=o.x,M.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],d.add(n,this.center,n)};Xc.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,QEe),a=this.decodeHeight(e,t),c=Gr.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Xc.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new U),t*=this.stride,this.quantization===Ia.BITS12?Fn.decompressTextureCoordinates(e[t+2],n):U.fromElements(e[t+4],e[t+5],n)};Xc.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Ia.BITS12?Fn.decompressTextureCoordinates(e[t+1],Ud).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Xc.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Ia.BITS12?Fn.decompressTextureCoordinates(e[t+3],Ud).x:e[t+6]};Xc.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return U.fromElements(o,r,n)};Xc.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};Xc.prototype._calculateStrideAndOffsets=function(){let e=0;switch(this.quantization){case Ia.BITS12:e+=3;break;default:e+=6}this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var P8={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},R8={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Xc.prototype.getAttributes=function(e){let t=q.FLOAT,n=q.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,c){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===Ia.NONE){s(P8.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(P8.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(P8.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(R8.compressed0,a?4:3),c&&s(R8.compressed1,1),this.hasGeodeticSurfaceNormals&&s(R8.geodeticSurfaceNormal,3)}return r};Xc.prototype.getAttributeLocations=function(){return this.quantization===Ia.NONE?P8:R8};Xc.clone=function(e,t){if(l(e))return l(t)||(t=new Xc),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=d.clone(e.center),t.toScaledENU=M.clone(e.toScaledENU),t.fromScaledENU=M.clone(e.fromScaledENU),t.matrix=M.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 Jc=Xc;var vp={};vp.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var vX=new d,fht=new M,dht=new d,hht=new d;vp.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=D.PI_OVER_TWO,a=D.toRadians,c=e.heightmap,u=e.width,f=e.height,h=e.skirtHeight,p=h>0,g=e.isGeographic??!0,m=e.ellipsoid??ne.default,_=1/m.maximumRadius,y=ae.clone(e.nativeRectangle),C=ae.clone(e.rectangle),E,I,b,S;l(C)?(E=C.west,I=C.south,b=C.east,S=C.north):g?(E=a(y.west),I=a(y.south),b=a(y.east),S=a(y.north)):(E=y.west*_,I=s-2*o(r(-y.south*_)),b=y.east*_,S=s-2*o(r(-y.north*_)));let B=e.relativeToCenter,v=l(B);B=v?B:d.ZERO;let P=e.includeWebMercatorT??!1,N=e.exaggeration??1,L=e.exaggerationRelativeHeight??0,x=N!==1,T=e.structure??vp.DEFAULT_STRUCTURE,w=T.heightScale??vp.DEFAULT_STRUCTURE.heightScale,R=T.heightOffset??vp.DEFAULT_STRUCTURE.heightOffset,O=T.elementsPerHeight??vp.DEFAULT_STRUCTURE.elementsPerHeight,k=T.stride??vp.DEFAULT_STRUCTURE.stride,F=T.elementMultiplier??vp.DEFAULT_STRUCTURE.elementMultiplier,z=T.isBigEndian??vp.DEFAULT_STRUCTURE.isBigEndian,Q=ae.computeWidth(y),H=ae.computeHeight(y),j=Q/(u-1),Z=H/(f-1);g||(Q*=_,H*=_);let Y=m.radiiSquared,$=Y.x,J=Y.y,pe=Y.z,Ce=65536,fe=-65536,ye=Qt.eastNorthUpToFixedFrame(B,m),Ie=M.inverseTransformation(ye,fht),ve,be;P&&(ve=Ui.geodeticLatitudeToMercatorAngle(I),be=1/(Ui.geodeticLatitudeToMercatorAngle(S)-ve));let ze=dht;ze.x=Number.POSITIVE_INFINITY,ze.y=Number.POSITIVE_INFINITY,ze.z=Number.POSITIVE_INFINITY;let We=hht;We.x=Number.NEGATIVE_INFINITY,We.y=Number.NEGATIVE_INFINITY,We.z=Number.NEGATIVE_INFINITY;let tt=Number.POSITIVE_INFINITY,Mt=u*f,kt=h>0?u*2+f*2:0,Oe=Mt+kt,_n=new Array(Oe),Ut=new Array(Oe),gt=new Array(Oe),ti=P?new Array(Oe):[],ai=x?new Array(Oe):[],Vt=0,wt=f,qi=0,Et=u;p&&(--Vt,++wt,--qi,++Et);let Ho=1e-5;for(let et=Vt;et<wt;++et){let pt=et;pt<0&&(pt=0),pt>=f&&(pt=f-1);let Zt=y.north-Z*pt;g?Zt=a(Zt):Zt=s-2*o(r(-Zt*_));let Tn=(Zt-I)/(S-I);Tn=D.clamp(Tn,0,1);let Bo=et===Vt,lo=et===wt-1;h>0&&(Bo?Zt+=Ho*H:lo&&(Zt-=Ho*H));let ia=t(Zt),ks=n(Zt),xi=pe*ks,Ei;P&&(Ei=(Ui.geodeticLatitudeToMercatorAngle(Zt)-ve)*be);for(let Do=qi;Do<Et;++Do){let xr=Do;xr<0&&(xr=0),xr>=u&&(xr=u-1);let $a=pt*(u*k)+xr*k,to;if(O===1)to=c[$a];else{to=0;let Lo;if(z)for(Lo=0;Lo<O;++Lo)to=to*F+c[$a+Lo];else for(Lo=O-1;Lo>=0;--Lo)to=to*F+c[$a+Lo]}to=to*w+R,fe=Math.max(fe,to),Ce=Math.min(Ce,to);let Jo=y.west+j*xr;g?Jo=a(Jo):Jo=Jo*_;let kf=(Jo-E)/(b-E);kf=D.clamp(kf,0,1);let Nr=pt*u+xr;if(h>0){let Lo=Do===qi,an=Do===Et-1,Te=Bo||lo||Lo||an;if((Bo||lo)&&(Lo||an))continue;Te&&(to-=h,Lo?(Nr=Mt+(f-pt-1),Jo-=Ho*Q):lo?Nr=Mt+f+(u-xr-1):an?(Nr=Mt+f+u+pt,Jo+=Ho*Q):Bo&&(Nr=Mt+f+u+f+xr))}let Da=ia*t(Jo),oa=ia*n(Jo),th=$*Da,Zo=J*oa,ra=1/i(th*Da+Zo*oa+xi*ks),Lr=th*ra,Ic=Zo*ra,Yl=xi*ra,ql=new d;ql.x=Lr+Da*to,ql.y=Ic+oa*to,ql.z=Yl+ks*to,M.multiplyByPoint(Ie,ql,vX),d.minimumByComponent(vX,ze,ze),d.maximumByComponent(vX,We,We),tt=Math.min(tt,to),_n[Nr]=ql,gt[Nr]=new U(kf,Tn),Ut[Nr]=to,P&&(ti[Nr]=Ei),x&&(ai[Nr]=m.geodeticSurfaceNormal(ql))}}let No=le.fromPoints(_n),ds;l(C)&&(ds=Qn.fromRectangle(C,Ce,fe,m));let Wo;v&&(Wo=new xg(m).computeHorizonCullingPointPossiblyUnderEllipsoid(B,_n,Ce));let Ir=new B_(ze,We,B),ke=new Jc(B,Ir,tt,fe,ye,!1,P,x,N,L),ct=new Float32Array(Oe*ke.stride),Xe=0;for(let et=0;et<Oe;++et)Xe=ke.encode(ct,Xe,_n[et],gt[et],Ut[et],void 0,ti[et],ai[et]);return{vertices:ct,maximumHeight:fe,minimumHeight:Ce,encoding:ke,boundingSphere3D:No,orientedBoundingBox:ds,occludeePointInScaledSpace:Wo}};var ow=vp;function sC(){he.throwInstantiationError()}Object.defineProperties(sC.prototype,{credits:{get:he.throwInstantiationError},waterMask:{get:he.throwInstantiationError}});sC.prototype.interpolateHeight=he.throwInstantiationError;sC.prototype.isChildAvailable=he.throwInstantiationError;sC.prototype.createMesh=he.throwInstantiationError;sC.prototype.upsample=he.throwInstantiationError;sC.prototype.wasCreatedByUpsampling=he.throwInstantiationError;sC.maximumAsynchronousTasks=5;var Am=sC;function mht(e,t,n,i,o,r,s,a,c,u,f,h,p,g,m,_){this.center=e,this.vertices=t,this.stride=u??6,this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=c,this.orientedBoundingBox=f,this.encoding=h,this.westIndicesSouthToNorth=p,this.southIndicesEastToWest=g,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=_}var Gd=mht;function Wg(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=e.childTileMask??15,this._encoding=e.encoding??kd.NONE;let t=ow.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===kd.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(Wg.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var kEe="createVerticesFromHeightmap",pht=new ui(kEe),Aht=new ui(kEe,Am.maximumAsynchronousTasks);Wg.prototype.createMesh=function(e){e=e??V.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),f=t.tileXYToRectangle(n,i,o),h=c.cartographicToCartesian(ae.center(f)),p=this._structure,m=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(m*4,1e3);let y=(a?Aht:pht).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:h,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Qi,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(y))return;let C=this;return Promise.resolve(y).then(function(E){let I;C._skirtHeight>0?I=Es.getRegularGridAndSkirtIndicesAndEdgeIndices(E.gridWidth,E.gridHeight):I=Es.getRegularGridIndicesAndEdgeIndices(E.gridWidth,E.gridHeight);let b=E.gridWidth*E.gridHeight;return C._mesh=new Gd(h,new Float32Array(E.vertices),I.indices,I.indexCountWithoutSkirts,b,E.minimumHeight,E.maximumHeight,le.clone(E.boundingSphere3D),d.clone(E.occludeePointInScaledSpace),E.numberOfAttributes,Qn.clone(E.orientedBoundingBox),Jc.clone(E.encoding),I.westIndicesSouthToNorth,I.southIndicesEastToWest,I.eastIndicesNorthToSouth,I.northIndicesWestToEast),C._buffer=void 0,C._mesh})};Wg.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),f=a.cartographicToCartesian(ae.center(u)),h=this._structure,g=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(g*4,1e3);let m=ow.computeVertices({heightmap:this._buffer,structure:h,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:u,relativeToCenter:f,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Qi,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let _;this._skirtHeight>0?_=Es.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):_=Es.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let y=m.gridWidth*m.gridHeight;return this._mesh=new Gd(f,m.vertices,_.indices,_.indexCountWithoutSkirts,y,m.minimumHeight,m.maximumHeight,m.boundingSphere3D,m.occludeePointInScaledSpace,m.encoding.stride,m.orientedBoundingBox,m.encoding,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),this._mesh};Wg.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,u=r.isBigEndian,f=r.heightOffset,h=r.heightScale,p=l(this._mesh),g=this._encoding===kd.LERC;if(!p&&g)return;let _;if(p){let y=this._mesh.vertices,C=this._mesh.encoding;_=UEe(y,C,f,h,e,i,o,t,n)}else _=ght(this._buffer,a,c,s,u,e,i,o,t,n),_=_*h+f;return _};Wg.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,u=this._height,f=this._structure,h=f.stride,p=new this._bufferType(c*u*h),g=a.vertices,m=a.encoding,_=e.tileXYToRectangle(t,n,i),y=e.tileXYToRectangle(o,r,s),C=f.heightOffset,E=f.heightScale,I=f.elementsPerHeight,b=f.elementMultiplier,S=f.isBigEndian,B=Math.pow(b,I-1);for(let v=0;v<u;++v){let P=D.lerp(y.north,y.south,v/(u-1));for(let N=0;N<c;++N){let L=D.lerp(y.west,y.east,N/(c-1)),A=UEe(g,m,C,E,_,c,u,L,P);A=A<f.lowestEncodedHeight?f.lowestEncodedHeight:A,A=A>f.highestEncodedHeight?f.highestEncodedHeight:A,_ht(p,I,b,B,h,S,v*c+N,A)}}return Promise.resolve(new Wg({buffer:p,width:c,height:u,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};Wg.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Wg.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function ght(e,t,n,i,o,r,s,a,c,u){let f=(c-r.west)*(s-1)/(r.east-r.west),h=(u-r.south)*(a-1)/(r.north-r.south),p=f|0,g=p+1;g>=s&&(g=s-1,p=s-2);let m=h|0,_=m+1;_>=a&&(_=a-1,m=a-2);let y=f-p,C=h-m;m=a-1-m,_=a-1-_;let E=M8(e,t,n,i,o,m*s+p),I=M8(e,t,n,i,o,m*s+g),b=M8(e,t,n,i,o,_*s+p),S=M8(e,t,n,i,o,_*s+g);return GEe(y,C,E,I,b,S)}function UEe(e,t,n,i,o,r,s,a,c){let u=(a-o.west)*(r-1)/(o.east-o.west),f=(c-o.south)*(s-1)/(o.north-o.south),h=u|0,p=h+1;p>=r&&(p=r-1,h=r-2);let g=f|0,m=g+1;m>=s&&(m=s-1,g=s-2);let _=u-h,y=f-g;g=s-1-g,m=s-1-m;let C=(t.decodeHeight(e,g*r+h)-n)/i,E=(t.decodeHeight(e,g*r+p)-n)/i,I=(t.decodeHeight(e,m*r+h)-n)/i,b=(t.decodeHeight(e,m*r+p)-n)/i;return GEe(_,y,C,E,I,b)}function GEe(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function M8(e,t,n,i,o,r){r*=i;let s=0,a;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function _ht(e,t,n,i,o,r,s,a){s*=o;let c;if(r)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 yc=Wg;function rw(e){e=e??V.EMPTY_OBJECT,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new oo({ellipsoid:e.ellipsoid??ne.default})),this._levelZeroMaximumGeometricError=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ge}Object.defineProperties(rw.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(){}}});rw.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new yc({buffer:new Uint8Array(16*16),width:16,height:16}))};rw.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};rw.prototype.getTileDataAvailable=function(e,t,n){};rw.prototype.loadTileDataAvailability=function(e,t,n){};var Pp=rw;var yht=new U;function Cht(e,t){let n=e.unionClippingRegions,i=e.length,o=Ps.useFloatTexture(t),r=Ps.getTextureResolution(e,t,yht),s=r.x,a=r.y,c=o?xht(s,a):bht(s,a);return c+=` `,c+=n?Eht(i):Iht(i),c}function Eht(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; break; } } if (breakAndDiscard) { discard; } return clipAmount; } `}function Iht(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 xht(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform) { int pixY = clippingPlaneNumber / ${e}; int pixX = clippingPlaneNumber - (pixY * ${e}); float u = (float(pixX) + 0.5) * ${o}; float v = (float(pixY) + 0.5) * ${r}; vec4 plane = texture(packedClippingPlanes, vec2(u, v)); return czm_transformPlane(plane, transform); } `}function bht(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform) { int clippingPlaneStartIndex = clippingPlaneNumber * 2; int pixY = clippingPlaneStartIndex / ${e}; int pixX = clippingPlaneStartIndex - (pixY * ${e}); float u = (float(pixX) + 0.5) * ${o}; float v = (float(pixY) + 0.5) * ${r}; 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 + ${o}, v))); return czm_transformPlane(plane, transform); } `}var jg=Cht;function Tht(e,t,n,i,o,r){this.numberOfDayTextures=e,this.flags=t,this.material=n,this.shaderProgram=i,this.clippingShaderState=o,this.clippingPolygonShaderState=r}function PX(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function Sht(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); }",o;switch(e){case oe.SCENE3D:o=t;break;case oe.SCENE2D:case oe.COLUMBUS_VIEW:o=n;break;case oe.MORPHING:o=i;break}return o}function wht(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) { czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex); }`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) { }`}function Bht(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) { return czm_unpackClippingExtents(extentsTexture, index); }`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) { return vec4(); }`}function Dht(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}PX.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,c=e.applyGamma,u=e.applyAlpha,f=e.applyDayNightAlpha,h=e.applySplit,p=e.hasWaterMask,g=e.showReflectiveOcean,m=e.showOceanWaves,_=e.enableLighting,y=e.dynamicAtmosphereLighting,C=e.dynamicAtmosphereLightingFromSun,E=e.showGroundAtmosphere,I=e.perFragmentGroundAtmosphere,b=e.hasVertexNormals,S=e.useWebMercatorProjection,B=e.enableFog,v=e.enableClippingPlanes,P=e.clippingPlanes,N=e.enableClippingPolygons,L=e.clippingPolygons,A=e.clippedByBoundaries,x=e.hasImageryLayerCutout,T=e.colorCorrect,w=e.highlightFillTile,R=e.colorToAlpha,O=e.hasGeodeticSurfaceNormals,k=e.hasExaggeration,F=e.showUndergroundColor,z=e.translucent,Q=0,H="",Z=n.renderedMesh.encoding;Z.quantization===Ia.BITS12&&(Q=1,H="QUANTIZATION_BITS12");let $=0,J="";A&&($=1,J="TILE_LIMIT_RECTANGLE");let pe=0,Ce="";x&&(pe=1,Ce="APPLY_IMAGERY_CUTOUT");let fe=t.mode,ye=fe|o<<2|r<<3|s<<4|a<<5|c<<6|u<<7|p<<8|g<<9|m<<10|_<<11|y<<12|C<<13|E<<14|I<<15|b<<16|S<<17|B<<18|Q<<19|h<<20|v<<21|N<<22|$<<23|pe<<24|T<<25|w<<26|R<<27|O<<28|k<<29|F<<30|z<<31|f<<32,Ie=0;l(P)&&P.length>0&&(Ie=v?P.clippingPlanesState:0);let ve=0;l(L)&&L.length>0&&(ve=N?L.clippingPolygonsState:0);let be=n.surfaceShader;if(l(be)&&be.numberOfDayTextures===i&&be.flags===ye&&be.material===this.material&&be.clippingShaderState===Ie&&be.clippingPolygonShaderState===ve)return be.shaderProgram;let ze=this._shadersByTexturesFlags[i];if(l(ze)||(ze=this._shadersByTexturesFlags[i]=[]),be=ze[ye],!l(be)||be.material!==this.material||be.clippingShaderState!==Ie||be.clippingPolygonShaderState!==ve){let We=this.baseVertexShaderSource.clone(),tt=this.baseFragmentShaderSource.clone();Ie!==0&&tt.sources.unshift(jg(P,t.context)),ve!==0&&(tt.sources.unshift(wht(t.context)),We.sources.unshift(Bht(t.context))),We.defines.push(H),tt.defines.push(`TEXTURE_UNITS ${i}`,J,Ce),o&&tt.defines.push("APPLY_BRIGHTNESS"),r&&tt.defines.push("APPLY_CONTRAST"),s&&tt.defines.push("APPLY_HUE"),a&&tt.defines.push("APPLY_SATURATION"),c&&tt.defines.push("APPLY_GAMMA"),u&&tt.defines.push("APPLY_ALPHA"),f&&tt.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&tt.defines.push("HAS_WATER_MASK"),g&&(tt.defines.push("SHOW_REFLECTIVE_OCEAN"),We.defines.push("SHOW_REFLECTIVE_OCEAN")),m&&tt.defines.push("SHOW_OCEAN_WAVES"),R&&tt.defines.push("APPLY_COLOR_TO_ALPHA"),F&&(We.defines.push("UNDERGROUND_COLOR"),tt.defines.push("UNDERGROUND_COLOR")),z&&(We.defines.push("TRANSLUCENT"),tt.defines.push("TRANSLUCENT")),_&&(b?(We.defines.push("ENABLE_VERTEX_LIGHTING"),tt.defines.push("ENABLE_VERTEX_LIGHTING")):(We.defines.push("ENABLE_DAYNIGHT_SHADING"),tt.defines.push("ENABLE_DAYNIGHT_SHADING"))),y&&(We.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),tt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),C&&(We.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),tt.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),E&&(We.defines.push("GROUND_ATMOSPHERE"),tt.defines.push("GROUND_ATMOSPHERE"),I&&(We.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),tt.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),We.defines.push("INCLUDE_WEB_MERCATOR_Y"),tt.defines.push("INCLUDE_WEB_MERCATOR_Y"),B&&(We.defines.push("FOG"),tt.defines.push("FOG")),h&&tt.defines.push("APPLY_SPLIT"),v&&tt.defines.push("ENABLE_CLIPPING_PLANES"),N&&(tt.defines.push("ENABLE_CLIPPING_POLYGONS"),We.defines.push("ENABLE_CLIPPING_POLYGONS"),L.inverse&&tt.defines.push("CLIPPING_INVERSE"),tt.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${L.extentsCount}`),We.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${L.extentsCount}`)),T&&tt.defines.push("COLOR_CORRECT"),w&&tt.defines.push("HIGHLIGHT_FILL_TILE"),O&&We.defines.push("GEODETIC_SURFACE_NORMALS"),k&&We.defines.push("EXAGGERATION");let Mt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend) { vec4 color = initialColor; `;x&&(Mt+=` vec4 cutoutAndColorResult; bool texelUnclipped; `);for(let Oe=0;Oe<i;++Oe)x?Mt+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Oe}]; 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[${Oe}], u_dayTextureUseWebMercatorT[${Oe}] ? textureCoordinates.xz : textureCoordinates.xy, u_dayTextureTexCoordsRectangle[${Oe}], u_dayTextureTranslationAndScale[${Oe}], ${u?`u_dayTextureAlpha[${Oe}]`:"1.0"}, ${f?`u_dayTextureNightAlpha[${Oe}]`:"1.0"}, ${f?`u_dayTextureDayAlpha[${Oe}]`:"1.0"}, ${o?`u_dayTextureBrightness[${Oe}]`:"0.0"}, ${r?`u_dayTextureContrast[${Oe}]`:"0.0"}, ${s?`u_dayTextureHue[${Oe}]`:"0.0"}, ${a?`u_dayTextureSaturation[${Oe}]`:"0.0"}, ${c?`u_dayTextureOneOverGamma[${Oe}]`:"0.0"}, ${h?`u_dayTextureSplit[${Oe}]`:"0.0"}, ${R?`u_colorsToAlpha[${Oe}]`:"vec4(0.0)"}, nightBlend); `,x&&(Mt+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color); `);Mt+=` return color; }`,tt.sources.push(Mt),We.sources.push(Sht(fe)),We.sources.push(Dht(S));let kt=cn.fromCache({context:t.context,vertexShaderSource:We,fragmentShaderSource:tt,attributeLocations:Z.getAttributeLocations()});be=ze[ye]=new Tht(i,ye,this.material,kt,Ie,ve)}return n.surfaceShader=be,be.shaderProgram};PX.prototype.destroy=function(){let e,t,n=this._shadersByTexturesFlags;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];if(!l(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],l(t)&&t.shaderProgram.destroy())}return ue(this)};var M2=PX;var vht={NONE:-1,PARTIAL:0,FULL:1},Rr=Object.freeze(vht);var Pht={START:0,LOADING:1,DONE:2,FAILED:3},xa=Object.freeze(Pht);var Rht={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6},xo=Object.freeze(Rht);function _r(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new d,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=xo.UNLOADED,this.mesh=void 0,this.fill=void 0,this.pickBoundingSphere=new le,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}Object.defineProperties(_r.prototype,{eligibleForUnloading:{get:function(){let e=this.terrainState,n=!(e===xo.RECEIVING||e===xo.TRANSFORMING),i=this.imagery;for(let o=0,r=i.length;n&&o<r;++o){let s=i[o];n=!l(s.loadingImagery)||s.loadingImagery.state!==Yn.TRANSITIONING}return n}},renderedMesh:{get:function(){if(l(this.vertexArray))return this.mesh;if(l(this.fill))return this.fill.mesh}}});var Mht=new me;function RX(e,t,n,i,o,r){let s=e.getExaggeratedPosition(i,o,r);if(l(t)&&t!==oe.SCENE3D){let c=n.ellipsoid.cartesianToCartographic(s,Mht);s=n.project(c,r),s=d.fromElements(s.z,s.x,s.y,r)}return s}var Nht=new d,Lht=new d,Oht=new d;_r.prototype.pick=function(e,t,n,i,o){let r=this.renderedMesh;if(!l(r))return;let s=r.vertices,a=r.indices,c=r.encoding,u=a.length,f=Number.MAX_VALUE;for(let h=0;h<u;h+=3){let p=a[h],g=a[h+1],m=a[h+2],_=RX(c,t,n,s,p,Nht),y=RX(c,t,n,s,g,Lht),C=RX(c,t,n,s,m,Oht),E=fi.rayTriangleParametric(e,_,y,C,i);l(E)&&E<f&&E>=0&&(f=E)}return f!==Number.MAX_VALUE?xn.getPoint(e,f,o):void 0};_r.prototype.freeResources=function(){l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=xo.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();let e=this.imagery;for(let t=0,n=e.length;t<n;++t)e[t].freeResources();this.imagery.length=0,this.freeVertexArray()};_r.prototype.freeVertexArray=function(){_r._freeVertexArray(this.vertexArray),this.vertexArray=void 0,_r._freeVertexArray(this.wireframeVertexArray),this.wireframeVertexArray=void 0};_r.initialize=function(e,t,n){let i=e.data;l(i)||(i=e.data=new _r),e.state===xa.START&&(Fht(e,t,n),e.state=xa.LOADING)};_r.processStateMachine=function(e,t,n,i,o,r,s){_r.initialize(e,n,i);let a=e.data;if(e.state===xa.LOADING&&Qht(e,t,n,i,o,r),s)return;let c=e.renderable;e.renderable=l(a.vertexArray);let u=a.terrainState===xo.READY;e.upsampledFromParent=l(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let f=a.processImagery(e,n,t);if(u&&f){let h=e._loadedCallbacks,p={};for(let g in h)h.hasOwnProperty(g)&&(h[g](e)||(p[g]=h[g]));e._loadedCallbacks=p,e.state=xa.DONE}c&&(e.renderable=!0)};_r.prototype.processImagery=function(e,t,n,i){let o=e.data,r=e.upsampledFromParent,s=!1,a=!0,c=o.imagery,u,f;for(u=0,f=c.length;u<f;++u){let h=c[u];if(!l(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===Yn.PLACEHOLDER){let g=h.loadingImagery.imageryLayer;if(g.ready){h.freeResources(),c.splice(u,1),g._createTileImagerySkeletons(e,t,u),--u,f=c.length;continue}else r=!1}let p=h.processStateMachine(e,n,i);a=a&&p,s=s||p||l(h.readyImagery),r=r&&l(h.loadingImagery)&&(h.loadingImagery.state===Yn.FAILED||h.loadingImagery.state===Yn.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function zEe(e,t,n,i){let o=e.renderedMesh,r=o.vertices,s=o.encoding,a=r.length/s.stride,c=Jc.clone(s);c.hasGeodeticSurfaceNormals=t,c=Jc.clone(c);let u=c.stride,f=new Float32Array(a*u);t?s.addGeodeticSurfaceNormals(r,f,n):s.removeGeodeticSurfaceNormals(r,f),o.vertices=f,o.stride=u,o!==e.mesh?(_r._freeVertexArray(e.fill.vertexArray),e.fill.vertexArray=_r._createVertexArrayForMesh(i.context,o)):(_r._freeVertexArray(e.vertexArray),e.vertexArray=_r._createVertexArrayForMesh(i.context,o)),_r._freeVertexArray(e.wireframeVertexArray),e.wireframeVertexArray=void 0}_r.prototype.addGeodeticSurfaceNormals=function(e,t){zEe(this,!0,e,t)};_r.prototype.removeGeodeticSurfaceNormals=function(e){zEe(this,!1,void 0,e)};_r.prototype.updateExaggeration=function(e,t,n){let i=this,o=i.renderedMesh;if(o===void 0)return;let r=t.verticalExaggeration,s=t.verticalExaggerationRelativeHeight,a=r!==1,c=o.encoding,u=c.exaggeration!==r,f=c.exaggerationRelativeHeight!==s;if(u||f){if(u)if(a&&!c.hasGeodeticSurfaceNormals){let h=e.tilingScheme.ellipsoid;i.addGeodeticSurfaceNormals(h,t)}else!a&&c.hasGeodeticSurfaceNormals&&i.removeGeodeticSurfaceNormals(t);if(c.exaggeration=r,c.exaggerationRelativeHeight=s,n!==void 0){n._tileToUpdateHeights.push(e);let h=e.customData,p=h.length;for(let g=0;g<p;g++){let m=h[g];m.level=-1}}}};function Fht(e,t,n){let i=t.getTileDataAvailable(e.x,e.y,e.level);if(!l(i)&&l(e.parent)){let o=e.parent,r=o.data;l(r)&&l(r.terrainData)&&(i=r.terrainData.isChildAvailable(o.x,o.y,e.x,e.y))}i===!1&&(e.data.terrainState=xo.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Qht(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===xo.FAILED&&a!==void 0&&(a.data!==void 0&&a.data.terrainData!==void 0&&a.data.terrainData.canUpsample!==!1||_r.processStateMachine(a,t,n,i,o,r,!0)),s.terrainState===xo.FAILED&&kht(s,e,t,n,e.x,e.y,e.level),s.terrainState===xo.UNLOADED&&Uht(s,n,e.x,e.y,e.level),s.terrainState===xo.RECEIVED&&zht(s,t,n,e.x,e.y,e.level),s.terrainState===xo.TRANSFORMED&&(Vht(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=xo.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)Wht(t.context,s);else{let u=s._findAncestorTileWithTerrainData(e);l(u)&&l(u.data.waterMaskTexture)&&(s.waterMaskTexture=u.data.waterMaskTexture,++s.waterMaskTexture.referenceCount,s._computeWaterMaskTranslationAndScale(e,u,s.waterMaskTranslationAndScale))}}function kht(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=xa.FAILED;return}let c=a.data.terrainData,u=a.x,f=a.y,h=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,u,f,h,o,r,s);l(p)&&(e.terrainState=xo.RECEIVING,Promise.resolve(p).then(function(g){l(g)&&(e.terrainData=g,e.terrainState=xo.RECEIVED)}).catch(function(){e.terrainState=xo.FAILED}))}function Uht(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=xo.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=xo.RECEIVED,e.request=void 0}function s(c){if(e.request.state===li.CANCELLED){e.terrainData=void 0,e.terrainState=xo.UNLOADED,e.request=void 0;return}e.terrainState=xo.FAILED,e.request=void 0;let u=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Qo.reportError(t._requestError,t,t.errorEvent,u,n,i,o),t._requestError.retry&&a()}function a(){let c=new ar({throttle:!1,throttleByServer:!0,type:ws.TERRAIN});e.request=c;let u=t.requestTileGeometry(n,i,o,c);l(u)?(e.terrainState=xo.RECEIVING,Promise.resolve(u).then(function(f){r(f)}).catch(function(f){s(f)})):(e.terrainState=xo.UNLOADED,e.request=void 0)}a()}var Ght={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function zht(e,t,n,i,o,r){let s=n.tilingScheme,a=Ght;a.tilingScheme=s,a.x=i,a.y=o,a.level=r,a.exaggeration=t.verticalExaggeration,a.exaggerationRelativeHeight=t.verticalExaggerationRelativeHeight,a.throttle=!0;let u=e.terrainData.createMesh(a);l(u)&&(e.terrainState=xo.TRANSFORMING,Promise.resolve(u).then(function(f){e.mesh=f,e.terrainState=xo.TRANSFORMED}).catch(function(){e.terrainState=xo.FAILED}))}_r._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=Ct.createVertexBuffer({context:e,typedArray:n,usage:Ue.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!l(s)||s.isDestroyed()){let a=t.indices;s=Ct.createIndexBuffer({context:e,typedArray:a,usage:Ue.STATIC_DRAW,indexDatatype:Qe.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new ri({context:e,attributes:o,indexBuffer:s})};_r._freeVertexArray=function(e){if(l(e)){let t=e.indexBuffer;e.isDestroyed()||e.destroy(),l(t)&&!t.isDestroyed()&&l(t.referenceCount)&&(--t.referenceCount,t.referenceCount===0&&t.destroy())}};function Vht(e,t,n,i,o,r,s){e.vertexArray=_r._createVertexArrayForMesh(t,e.mesh),e.terrainState=xo.READY,e.fill=e.fill&&e.fill.destroy(s)}function Hht(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Nt.create({context:e,pixelFormat:$e.LUMINANCE,pixelDatatype:Ve.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.LINEAR,magnificationFilter:di.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Wht(e,t){let n=t.terrainData.waterMask,i=Hht(e),o,r=n.length;if(r===1)if(n[0]!==0)o=i.allWaterTexture;else return;else{let s=Math.sqrt(r);o=Nt.create({context:e,pixelFormat:$e.LUMINANCE,pixelDatatype:Ve.UNSIGNED_BYTE,source:{width:s,height:s,arrayBufferView:n},sampler:i.sampler,flipY:!1}),o.referenceCount=0}++o.referenceCount,t.waterMaskTexture=o,se.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}_r.prototype._findAncestorTileWithTerrainData=function(e){let t=e.parent;for(;l(t)&&(!l(t.data)||!l(t.data.terrainData)||t.data.terrainData.wasCreatedByUpsampling());)t=t.parent;return t};_r.prototype._computeWaterMaskTranslationAndScale=function(e,t,n){let i=t.rectangle,o=e.rectangle,r=o.width,s=o.height,a=r/i.width,c=s/i.height;return n.x=a*(o.west-i.west)/r,n.y=c*(o.south-i.south)/s,n.z=a,n.w=c,n};var zd=_r;var jht={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Sn=jht;var VEe={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>=VEe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},oi=VEe;function aw(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}aw.prototype.update=function(e,t,n){this.changedThisFrame&&(XEe(e,t,this.tile,n),this.changedThisFrame=!1)};aw.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};aw.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):zd._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var Yht=new $_;aw.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=Yht;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(r),f=c.findTileToSouth(r),h=c.findTileToEast(r),p=c.findTileToNorth(r);ea(e,n,c,u,s,Sn.EAST,!1,a,i),ea(e,n,c,f,s,Sn.NORTH,!1,a,i),ea(e,n,c,h,s,Sn.WEST,!1,a,i),ea(e,n,c,p,s,Sn.SOUTH,!1,a,i);let g=u.findTileToNorth(r),m=u.findTileToSouth(r),_=h.findTileToNorth(r),y=h.findTileToSouth(r);ea(e,n,c,g,s,Sn.SOUTHEAST,!1,a,i),ea(e,n,c,_,s,Sn.SOUTHWEST,!1,a,i),ea(e,n,c,m,s,Sn.NORTHEAST,!1,a,i),ea(e,n,c,y,s,Sn.NORTHWEST,!1,a,i),c=a.dequeue()}};function ea(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let u=i;for(;u&&(u._lastSelectionResultFrame!==o||oi.wasKicked(u._lastSelectionResult)||oi.originalResult(u._lastSelectionResult)===oi.CULLED);){if(s)return;let f=u.parent;if(r>=Sn.NORTHWEST&&f!==void 0)switch(r){case Sn.NORTHWEST:u=u===f.northwestChild?f:void 0;break;case Sn.NORTHEAST:u=u===f.northeastChild?f:void 0;break;case Sn.SOUTHWEST:u=u===f.southwestChild?f:void 0;break;case Sn.SOUTHEAST:u=u===f.southeastChild?f:void 0;break}else u=f}if(u!==void 0){if(u._lastSelectionResult===oi.RENDERED){if(l(u.data.vertexArray))return;qht(e,t,n,u,r,o,a,c);return}if(oi.originalResult(i._lastSelectionResult)!==oi.CULLED)switch(r){case Sn.WEST:ea(e,t,n,i.northwestChild,o,r,!0,a,c),ea(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Sn.EAST:ea(e,t,n,i.southeastChild,o,r,!0,a,c),ea(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Sn.SOUTH:ea(e,t,n,i.southwestChild,o,r,!0,a,c),ea(e,t,n,i.southeastChild,o,r,!0,a,c);break;case Sn.NORTH:ea(e,t,n,i.northeastChild,o,r,!0,a,c),ea(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Sn.NORTHWEST:ea(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Sn.NORTHEAST:ea(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Sn.SOUTHWEST:ea(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Sn.SOUTHEAST:ea(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new he("Invalid edge")}}}function qht(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new aw(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),Kht(e,t,n,i,o,a)}function Kht(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(XEe(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let u,f;switch(o){case Sn.WEST:u=s.westMeshes,f=s.westTiles;break;case Sn.SOUTH:u=s.southMeshes,f=s.southTiles;break;case Sn.EAST:u=s.eastMeshes,f=s.eastTiles;break;case Sn.NORTH:u=s.northMeshes,f=s.northTiles;break;case Sn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case Sn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case Sn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case Sn.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 h,p,g,m,_=n.rectangle,y,C=i.rectangle;switch(o){case Sn.WEST:for(y=(C.north-C.south)*D.EPSILON5,h=0;h<f.length&&(g=f[h],m=g.rectangle,!D.greaterThan(_.north,m.south,y));++h);for(p=h;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(_.south,m.north,y));++p);break;case Sn.SOUTH:for(y=(C.east-C.west)*D.EPSILON5,h=0;h<f.length&&(g=f[h],m=g.rectangle,!D.lessThan(_.west,m.east,y));++h);for(p=h;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(_.east,m.west,y));++p);break;case Sn.EAST:for(y=(C.north-C.south)*D.EPSILON5,h=0;h<f.length&&(g=f[h],m=g.rectangle,!D.lessThan(_.south,m.north,y));++h);for(p=h;p<f.length&&(g=f[p],m=g.rectangle,!D.lessThanOrEquals(_.north,m.south,y));++p);break;case Sn.NORTH:for(y=(C.east-C.west)*D.EPSILON5,h=0;h<f.length&&(g=f[h],m=g.rectangle,!D.greaterThan(_.east,m.west,y));++h);for(p=h;p<f.length&&(g=f[p],m=g.rectangle,!D.greaterThanOrEquals(_.west,m.east,y));++p);break}p-h===1?(s.changedThisFrame=s.changedThisFrame||u[h]!==a,u[h]=a,f[h]=n):(s.changedThisFrame=!0,u.splice(h,p-h,a),f.splice(h,p-h,n))}var DI=new me,Xht=new me,sw=new d,OX=new d,MX=new U,NX=new U,Sf=new U;function U8(){this.height=0,this.encodedNormal=new U}function N8(e,t,n,i,o,r,s,a,c){if(l(o))return o;let u;if(l(r)&&l(s))u=(r.height+s.height)*.5;else if(l(r))u=r.height;else if(l(s))u=s.height;else if(l(a))u=a.height;else{let h=e.tile.data.tileBoundingRegion,p=0,g=0;l(h)&&(p=h.minimumHeight,g=h.maximumHeight),u=(p+g)*.5}return JEe(e,t,n,i,u,c),c}var Jht={minimumHeight:0,maximumHeight:0},Zht=new d,HEe=new U8,WEe=new U8,jEe=new U8,YEe=new U8,$ht=typeof Uint8Array<"u"?new Uint8Array(9*9):void 0,emt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function XEe(e,t,n,i){zd.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,u=a!==1,f=n.tilingScheme.ellipsoid,h=O8(r,f,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,jEe),p=O8(r,f,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,HEe),g=O8(r,f,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,WEe),m=O8(r,f,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,YEe);h=N8(r,f,0,1,h,p,m,g,jEe),p=N8(r,f,0,0,p,h,g,m,HEe),g=N8(r,f,1,1,g,p,m,h,WEe),m=N8(r,f,1,1,m,g,h,p,YEe);let _=p.height,y=g.height,C=h.height,E=m.height,I=Math.min(_,y,C,E),b=Math.max(_,y,C,E),S=(I+b)*.5,B,v,P=e.getLevelMaximumGeometricError(n.level),N=f.maximumRadius-P,L=Math.acos(N/f.maximumRadius)*4;if(L*=1.5,s.width>L&&b-I<=P){let T=new yc({width:9,height:9,buffer:$ht,structure:{heightOffset:b}}),w=emt;w.tilingScheme=n.tilingScheme,w.x=n.x,w.y=n.y,w.level=n.level,w.exaggeration=a,w.exaggerationRelativeHeight=c,r.mesh=T._createMeshSync(w)}else{let T=u,w=ae.center(s,Xht);w.height=S;let R=f.cartographicToCartesian(w,Zht),O=new Jc(R,void 0,void 0,void 0,void 0,!0,!0,T,a,c),k=5,F;for(F=r.westMeshes,B=0,v=F.length;B<v;++B)k+=F[B].eastIndicesNorthToSouth.length;for(F=r.southMeshes,B=0,v=F.length;B<v;++B)k+=F[B].northIndicesWestToEast.length;for(F=r.eastMeshes,B=0,v=F.length;B<v;++B)k+=F[B].westIndicesSouthToNorth.length;for(F=r.northMeshes,B=0,v=F.length;B<v;++B)k+=F[B].southIndicesEastToWest.length;let z=Jht;z.minimumHeight=I,z.maximumHeight=b;let Q=O.stride,H=new Float32Array(k*Q),j=0,Z=j;j=L8(f,s,O,H,j,0,1,h.height,h.encodedNormal,1,z),j=Q8(r,f,O,H,j,r.westTiles,r.westMeshes,Sn.EAST,z);let Y=j;j=L8(f,s,O,H,j,0,0,p.height,p.encodedNormal,0,z),j=Q8(r,f,O,H,j,r.southTiles,r.southMeshes,Sn.NORTH,z);let $=j;j=L8(f,s,O,H,j,1,0,g.height,g.encodedNormal,0,z),j=Q8(r,f,O,H,j,r.eastTiles,r.eastMeshes,Sn.WEST,z);let J=j;j=L8(f,s,O,H,j,1,1,m.height,m.encodedNormal,1,z),j=Q8(r,f,O,H,j,r.northTiles,r.northMeshes,Sn.SOUTH,z),I=z.minimumHeight,b=z.maximumHeight;let pe=Qn.fromRectangle(s,I,b,n.tilingScheme.ellipsoid),Ce=Ui.geodeticLatitudeToMercatorAngle(s.south),fe=1/(Ui.geodeticLatitudeToMercatorAngle(s.north)-Ce),ye=(Ui.geodeticLatitudeToMercatorAngle(w.latitude)-Ce)*fe,Ie=f.geodeticSurfaceNormalCartographic(DI,OX),ve=Fn.octEncode(Ie,MX),be=j;O.encode(H,j*Q,pe.center,U.fromElements(.5,.5,Sf),S,ve,ye,Ie),++j;let ze=j,We=ze<256?1:2,tt=(ze-1)*3,Mt=tt*We,kt=(H.length-ze*Q)*Float32Array.BYTES_PER_ELEMENT,Oe;if(kt>=Mt){let Vt=ze*Q*Float32Array.BYTES_PER_ELEMENT;Oe=ze<256?new Uint8Array(H.buffer,Vt,tt):new Uint16Array(H.buffer,Vt,tt)}else Oe=ze<256?new Uint8Array(tt):new Uint16Array(tt);H=new Float32Array(H.buffer,0,ze*Q);let _n=0;for(B=0;B<ze-2;++B)Oe[_n++]=be,Oe[_n++]=B,Oe[_n++]=B+1;Oe[_n++]=be,Oe[_n++]=B,Oe[_n++]=0;let Ut=[];for(B=Y;B>=Z;--B)Ut.push(B);let gt=[];for(B=$;B>=Y;--B)gt.push(B);let ti=[];for(B=J;B>=$;--B)ti.push(B);let ai=[];for(ai.push(0),B=be-1;B>=J;--B)ai.push(B);r.mesh=new Gd(O.center,H,Oe,tt,ze,I,b,le.fromOrientedBoundingBox(pe),amt(e,pe.center,s,I,b),O.stride,pe,O,Ut,gt,ti,ai)}let A=t.context;r._destroyVertexArray(i),r.vertexArray=zd._createVertexArrayForMesh(A,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let x=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let T=o._findAncestorTileWithTerrainData(n);l(T)&&l(T.data.waterMaskTexture)&&(r.waterMaskTexture=T.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,T,r.waterMaskTranslationAndScale))}l(x)&&(--x.referenceCount,x.referenceCount===0&&x.destroy())}function L8(e,t,n,i,o,r,s,a,c,u,f){let h=DI;h.longitude=D.lerp(t.west,t.east,r),h.latitude=D.lerp(t.south,t.north,s),h.height=a;let p=e.cartographicToCartesian(h,sw),g;n.hasGeodeticSurfaceNormals&&(g=e.geodeticSurfaceNormal(p,OX));let m=NX;return m.x=r,m.y=s,n.encode(i,o*n.stride,p,m,a,c,u,g),f.minimumHeight=Math.min(f.minimumHeight,a),f.maximumHeight=Math.max(f.maximumHeight,a),o+1}var k8=new ae;function N2(e,t,n,i){let o=e.rectangle,r=t.rectangle;t.x===0&&n.x===1&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?(o=ae.clone(e.rectangle,k8),o.west-=D.TWO_PI,o.east-=D.TWO_PI):e.x===0&&n.x===0&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&(o=ae.clone(e.rectangle,k8),o.west+=D.TWO_PI,o.east+=D.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,c=(r.east-o.west)/s,u=o.north-o.south,f=(r.south-o.south)/u,h=(r.north-o.south)/u,p=(n.x-a)/(c-a),g=(n.y-f)/(h-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 tmt=new U;function LX(e,t,n,i,o){let r=e.encoding,s=e.vertices;if(o.height=r.decodeHeight(s,t),r.hasVertexNormals)r.getOctEncodedNormal(s,t,o.encodedNormal);else{let a=o.encodedNormal;a.x=0,a.y=0}}var nmt=new U,imt=new d;function omt(e,t,n,i,o,r,s,a,c,u){let f=i.encoding,h=i.vertices,p=N2(t,n,f.decodeTextureCoordinates(h,o,Sf),Sf),g=N2(t,n,f.decodeTextureCoordinates(h,r,NX),NX),m;c?m=(s-p.x)/(g.x-p.x):m=(a-p.y)/(g.y-p.y);let _=f.decodeHeight(h,o),y=f.decodeHeight(h,r),C=n.rectangle;DI.longitude=D.lerp(C.west,C.east,s),DI.latitude=D.lerp(C.south,C.north,a),u.height=DI.height=D.lerp(_,y,m);let E;if(f.hasVertexNormals){let I=f.getOctEncodedNormal(h,o,tmt),b=f.getOctEncodedNormal(h,r,nmt),S=Fn.octDecode(I.x,I.y,sw),B=Fn.octDecode(b.x,b.y,imt);E=d.lerp(S,B,m,sw),d.normalize(E,E),Fn.octEncode(E,u.encodedNormal)}else E=e.geodeticSurfaceNormalCartographic(DI,sw),Fn.octEncode(E,u.encodedNormal)}function JEe(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(DI,sw);Fn.octEncode(s,r.encodedNormal)}function O8(e,t,n,i,o,r,s,a,c,u,f){if(KEe(e,t,a,s,!1,n,i,f)||KEe(e,t,u,c,!0,n,i,f))return f;let p;if(FX(o,r))return n===0?i===0?p=r.eastIndicesNorthToSouth[0]:p=r.southIndicesEastToWest[0]:i===0?p=r.northIndicesWestToEast[0]:p=r.westIndicesSouthToNorth[0],LX(r,p,n,i,f),f;let g;if(n===0?i===0?g=F8(e.westMeshes,e.westTiles,Sn.EAST,e.southMeshes,e.southTiles,Sn.NORTH,n,i):g=F8(e.northMeshes,e.northTiles,Sn.SOUTH,e.westMeshes,e.westTiles,Sn.EAST,n,i):i===0?g=F8(e.southMeshes,e.southTiles,Sn.NORTH,e.eastMeshes,e.eastTiles,Sn.WEST,n,i):g=F8(e.eastMeshes,e.eastTiles,Sn.WEST,e.northMeshes,e.northTiles,Sn.SOUTH,n,i),l(g))return JEe(e,t,n,i,g,f),f}function F8(e,t,n,i,o,r,s,a){let c=qEe(e,t,!1,n,s,a),u=qEe(i,o,!0,r,s,a);return l(c)&&l(u)?(c+u)*.5:l(c)?c:u}function Q8(e,t,n,i,o,r,s,a,c){for(let u=0;u<r.length;++u)o=rmt(e,t,n,i,o,r[u],s[u],a,c);return o}function rmt(e,t,n,i,o,r,s,a,c){let u=r.rectangle;a===Sn.EAST&&e.tile.x===0?(u=ae.clone(r.rectangle,k8),u.west-=D.TWO_PI,u.east-=D.TWO_PI):a===Sn.WEST&&r.x===0&&(u=ae.clone(r.rectangle,k8),u.west+=D.TWO_PI,u.east+=D.TWO_PI);let f=e.tile.rectangle,h,p;o>0&&(n.decodeTextureCoordinates(i,o-1,Sf),h=Sf.x,p=Sf.y);let g,m;switch(a){case Sn.WEST:g=s.westIndicesSouthToNorth,m=!1;break;case Sn.NORTH:g=s.northIndicesWestToEast,m=!0;break;case Sn.EAST:g=s.eastIndicesNorthToSouth,m=!1;break;case Sn.SOUTH:g=s.southIndicesEastToWest,m=!0;break}let _=r,y=e.tile,C=s.encoding,E=s.vertices,I=n.stride,b,S;C.hasWebMercatorT&&(b=Ui.geodeticLatitudeToMercatorAngle(f.south),S=1/(Ui.geodeticLatitudeToMercatorAngle(f.north)-b));for(let B=0;B<g.length;++B){let v=g[B],P=C.decodeTextureCoordinates(E,v,Sf);N2(_,y,P,P);let N=P.x,L=P.y,A=m?N:L;if(A<0||A>1||Math.abs(N-h)<D.EPSILON5&&Math.abs(L-p)<D.EPSILON5)continue;let x=Math.abs(N)<D.EPSILON5||Math.abs(N-1)<D.EPSILON5,T=Math.abs(L)<D.EPSILON5||Math.abs(L-1)<D.EPSILON5;if(x&&T)continue;let w=C.decodePosition(E,v,sw),R=C.decodeHeight(E,v),O;C.hasVertexNormals?O=C.getOctEncodedNormal(E,v,MX):(O=MX,O.x=0,O.y=0);let k=L;if(C.hasWebMercatorT){let z=D.lerp(f.south,f.north,L);k=(Ui.geodeticLatitudeToMercatorAngle(z)-b)*S}let F;n.hasGeodeticSurfaceNormals&&(F=t.geodeticSurfaceNormal(w,OX)),n.encode(i,o*I,w,P,R,O,k,F),c.minimumHeight=Math.min(c.minimumHeight,R),c.maximumHeight=Math.max(c.maximumHeight,R),++o}return o}function qEe(e,t,n,i,o,r){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],h=t[u];if(!FX(h,f))continue;let p;switch(i){case Sn.WEST:p=f.westIndicesSouthToNorth;break;case Sn.SOUTH:p=f.southIndicesEastToWest;break;case Sn.EAST:p=f.eastIndicesNorthToSouth;break;case Sn.NORTH:p=f.northIndicesWestToEast;break}let g=p[n?0:p.length-1];if(l(g))return f.encoding.decodeHeight(f.vertices,g)}}function FX(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function KEe(e,t,n,i,o,r,s,a){let c,u,f,h,p,g=i[o?0:n.length-1],m=n[o?0:n.length-1];if(FX(g,m)&&(r===0?s===0?(c=o?m.northIndicesWestToEast:m.eastIndicesNorthToSouth,u=o,f=o):(c=o?m.eastIndicesNorthToSouth:m.southIndicesEastToWest,u=!o,f=!1):s===0?(c=o?m.westIndicesSouthToNorth:m.northIndicesWestToEast,u=!o,f=!0):(c=o?m.southIndicesEastToWest:m.westIndicesSouthToNorth,u=o,f=!o),c.length>0)){h=o?0:c.length-1,p=c[h],m.encoding.decodeTextureCoordinates(m.vertices,p,Sf);let _=N2(g,e.tile,Sf,Sf);if(_.x===r&&_.y===s)return LX(m,p,r,s,a),!0;if(h=jo(c,u?r:s,function(y,C){m.encoding.decodeTextureCoordinates(m.vertices,y,Sf);let E=N2(g,e.tile,Sf,Sf);return f?u?E.x-r:E.y-s:u?r-E.x:s-E.y}),h<0){if(h=~h,h>0&&h<c.length)return omt(t,g,e.tile,m,c[h-1],c[h],r,s,u,a),!0}else return LX(m,c[h],r,s,a),!0}return!1}var smt=[new d,new d,new d,new d];function amt(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=smt;return d.fromRadians(n.west,n.south,o,a,c[0]),d.fromRadians(n.east,n.south,o,a,c[1]),d.fromRadians(n.west,n.north,o,a,c[2]),d.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var cw=aw;function yr(e){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=Bn.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=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new ge,this._removeLayerAddedListener=this._imageryLayers.layerAdded.addEventListener(yr.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(yr.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(yr.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(yr.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new ge,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new G(0,0,.5,1),this._clippingPlanes=void 0,this._clippingPolygons=void 0,this.cartographicLimitRectangle=ae.clone(ae.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0}Object.defineProperties(yr.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Ps.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Dh.setOwner(e,this,"_clippingPolygons")}}});function cmt(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}yr.prototype.update=function(e){this._imageryLayers._update()};function lmt(e,t){let n=t.creditDisplay,i=e._terrainProvider;l(i)&&l(i.credit)&&n.addCreditToNextFrame(i.credit);let o=e._imageryLayers;for(let r=0,s=o.length;r<s;++r){let a=o.get(r);a.ready&&a.show&&l(a.imageryProvider.credit)&&n.addCreditToNextFrame(a.imageryProvider.credit)}}yr.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(cmt)})),lmt(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)zd._freeVertexArray(t[i]);t.length=0};yr.prototype.beginUpdate=function(e){let t=this._tilesToRenderByTextureCount;for(let o=0,r=t.length;o<r;++o){let s=t[o];l(s)&&(s.length=0)}let n=this._clippingPlanes;l(n)&&n.enabled&&n.update(e);let i=this._clippingPolygons;l(i)&&i.enabled&&(i.update(e),i.queueCommands(e)),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1};yr.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=Ge.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:Na.LESS}}),this._blendRenderState=Ge.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:Na.LESS_OR_EQUAL},blending:An.ALPHA_BLEND});let s=je(this._renderState,!0);s.cull.enabled=!1,this._disableCullingRenderState=Ge.fromCache(s),s=je(this._blendRenderState,!0),s.cull.enabled=!1,this._disableCullingBlendRenderState=Ge.fromCache(s)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&cw.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(s){s.data.updateExaggeration(s,e,t)});let r=this._tilesToRenderByTextureCount;for(let s=0,a=r.length;s<a;++s){let c=r[s];if(l(c))for(let u=0,f=c.length;u<f;++u){let h=c[u],p=h.data.tileBoundingRegion;Mmt(this,h,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,p.minimumHeight)}}};function n0e(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)}yr.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)n0e(t[n],e)};yr.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};yr.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};yr.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===oi.CULLED_BUT_NEEDED,o=n.terrainState),zd.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i),n=t.data,i&&o!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==Rr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,zd.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var umt=new le,i0e=new ae,fmt=new ae,dmt=new me;function z8(e,t){if(t.west<t.east)return t;let n=ae.clone(t,fmt);return ae.center(e,dmt).longitude>0?n.east=D.PI:n.west=-D.PI,n}function o0e(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||!ae.equals(e.cartographicLimitRectangle,ae.MAX_VALUE))}yr.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=o0e(this,t);if(t.fog.enabled&&!o&&D.fog(i,t.fog.density)>=1)return Rr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return Rr.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let u=z8(e.rectangle,this.cartographicLimitRectangle),f=ae.simpleIntersection(u,e.rectangle,i0e);if(!l(f))return Rr.NONE;if(ae.equals(f,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==oe.SCENE3D&&(c=umt,le.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),d.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===oe.MORPHING&&l(r.renderedMesh)&&(c=le.union(s.boundingSphere,c,c))),!l(c))return Rr.PARTIAL;let h=this._clippingPlanes;if(l(h)&&h.enabled){let y=h.computeIntersectionWithBoundingVolume(c);if(e.isClipped=y!==tn.INSIDE,y===tn.OUTSIDE)return Rr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let y=p.computeIntersectionWithBoundingVolume(s);e.isClipped=y!==tn.OUTSIDE}let g,m=a.computeVisibility(c);if(m===tn.OUTSIDE?g=Rr.NONE:m===tn.INTERSECTING?g=Rr.PARTIAL:m===tn.INSIDE&&(g=Rr.FULL),g===Rr.NONE)return g;let _=t.mode===oe.SCENE3D&&t.camera.frustum instanceof mn;if(t.mode===oe.SCENE3D&&!_&&l(n)&&!o){let y=r.occludeePointInScaledSpace;return!l(y)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(y,s.minimumHeight)?g:Rr.NONE}return g};yr.prototype.canRefine=function(e){return l(e.data.terrainData)?!0:this.terrainProvider.getTileDataAvailable(e.x*2,e.y*2,e.level+1)!==void 0};var hmt=[],mmt=[];yr.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=hmt;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===xo.READY,r=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=r;if(l(s))for(a=0,c=s.length;a<c;++a){let h=s[a],p=h.loadingImagery,g=!l(p)||p.state===Yn.FAILED||p.state===Yn.INVALID,m=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[m]=g&&i[m]}let u=this.quadtree._lastSelectionFrameNumber,f=mmt;for(f.length=0,f.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);f.length>0;){let h=f.pop(),p=h._lastSelectionResultFrame===u?h._lastSelectionResult:oi.NONE;if(p===oi.RENDERED){let g=h.data;if(!l(g))continue;if(!o&&h.data.terrainState===xo.READY)return!1;let m=h.data.imagery;for(a=0,c=m.length;a<c;++a){let _=m[a],y=_.loadingImagery,C=!l(y)||y.state===Yn.FAILED||y.state===Yn.INVALID,E=(_.loadingImagery||_.readyImagery).imageryLayer._layerIndex;if(C&&!i[E])return!1}}else p===oi.REFINED&&f.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};var pmt=new d;yr.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=d.subtract(i.center,o,pmt),a=d.magnitude(s);return a<D.EPSILON5?0:(d.divideByScalar(s,a,s),(1-d.dot(s,r))*e._distance)};var ZEe=new M,G8=new M,Amt=new se,gmt=new se,_mt=new se,ymt=new d,$Ee=new d,Cmt=new d,Emt=new d;yr.prototype.showTileThisFrame=function(e,t){let n=0,i=e.data.imagery;for(let a=0,c=i.length;a<c;++a){let u=i[a];l(u.readyImagery)&&u.readyImagery.imageryLayer.alpha!==0&&++n}let o=this._tilesToRenderByTextureCount[n];l(o)||(o=[],this._tilesToRenderByTextureCount[n]=o),o.push(e);let r=e.data;l(r.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;let s=this._debug;++s.tilesRendered,s.texturesRendered+=n};var Imt=[new d,new d,new d,new d];function e0e(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=Imt;return d.fromRadians(n.west,n.south,o,a,c[0]),d.fromRadians(n.east,n.south,o,a,c[1]),d.fromRadians(n.west,n.north,o,a,c[2]),d.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}yr.prototype.computeDistanceToTile=function(e,t){xmt(e,this,t);let n=e.data;if(n.boundingVolumeSourceTile===void 0)return 9999999999;let o=n.tileBoundingRegion,r=o.minimumHeight,s=o.maximumHeight;if(n.boundingVolumeSourceTile!==e){let c=t.camera.positionCartographic.height,u=Math.abs(c-r),f=Math.abs(c-s);u>f?(o.minimumHeight=r,o.maximumHeight=r):(o.minimumHeight=s,o.maximumHeight=s)}let a=o.distanceToCamera(t);return o.minimumHeight=r,o.maximumHeight=s,a};function xmt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new zd);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new af({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,c=!1,u=e,f=i.mesh,h=i.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0)r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight,c=!0;else if(h!==void 0&&h._minimumHeight!==void 0&&h._maximumHeight!==void 0)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let g=p.data;if(g!==void 0){let m=g.mesh,_=g.terrainData;if(m!==void 0&&m.minimumHeight!==void 0&&m.maximumHeight!==void 0){r.minimumHeight=m.minimumHeight,r.maximumHeight=m.maximumHeight;break}else if(_!==void 0&&_._minimumHeight!==void 0&&_._maximumHeight!==void 0){r.minimumHeight=_._minimumHeight,r.maximumHeight=_._maximumHeight;break}}p=p.parent}u=p}if(u!==void 0){let p=n.verticalExaggeration,g=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=Gr.getHeight(r.minimumHeight,p,g),r.maximumHeight=Gr.getHeight(r.maximumHeight,p,g)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=Qn.clone(f.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=le.clone(f.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=d.clone(f.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=e0e(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace)));else{let _=r._orientedBoundingBox===void 0||r._boundingSphere===void 0;(r.minimumHeight!==s||r.maximumHeight!==a||_)&&(r.computeBoundingVolumes(o),i.occludeePointInScaledSpace=e0e(t,r._orientedBoundingBox.center,e.rectangle,r.minimumHeight,r.maximumHeight,i.occludeePointInScaledSpace))}i.boundingVolumeSourceTile=u,i.boundingVolumeIsFromMesh=c}else i.boundingVolumeSourceTile=void 0,i.boundingVolumeIsFromMesh=!1}yr.prototype.isDestroyed=function(){return!1};yr.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._clippingPolygons=this._clippingPolygons&&this._clippingPolygons.destroy(),this._removeLayerAddedListener=this._removeLayerAddedListener&&this._removeLayerAddedListener(),this._removeLayerRemovedListener=this._removeLayerRemovedListener&&this._removeLayerRemovedListener(),this._removeLayerMovedListener=this._removeLayerMovedListener&&this._removeLayerMovedListener(),this._removeLayerShownListener=this._removeLayerShownListener&&this._removeLayerShownListener(),ue(this)};function bmt(e,t,n){return function(i){let o,r,s=-1,a=i.data.imagery,c=a.length,u;for(u=0;u<c;++u)if(o=a[u],r=o.readyImagery??o.loadingImagery,r.imageryLayer===t){s=u;break}if(s!==-1){let f=s+e;if(o=a[f],r=l(o)?o.readyImagery??o.loadingImagery:void 0,!l(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(i,n,f);for(u=s;u<f;++u)a[u].freeResources();a.splice(s,e)}return!0}}yr.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(l(s._loadedCallbacks[e._layerIndex]))return;let a,c=s.data.imagery,u=c.length,f=-1,h=0;for(a=0;a<u;++a){let g=c[a];if((g.readyImagery??g.loadingImagery).imageryLayer===e)f===-1&&(f=a),++h;else if(f!==-1)break}if(f===-1)return;let p=f+h;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=bmt(h,e,n),s.state=xa.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=xa.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==oi.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};yr.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile(function(n){let i=n.data.imagery,o=-1,r=0;for(let s=0,a=i.length;s<a;++s){let c=i[s],u=c.loadingImagery;if(l(u)||(u=c.readyImagery),u.imageryLayer===e)o===-1&&(o=s),c.freeResources(),++r;else if(o!==-1)break}o!==-1&&i.splice(o,r)}),l(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()};yr.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};yr.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Tmt=new M,Smt=new M;function t0e(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,o=M.multiplyByPoint(i,this.properties.rtc,$Ee);return M.setTranslation(i,o,ZEe),ZEe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=M.multiplyByPoint(i,this.properties.rtc,$Ee);return M.setTranslation(i,r,G8),M.multiply(o,G8,G8),G8},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,o=l(i)?M.multiply(e.context.uniformState.view,i.modelMatrix,Tmt):M.IDENTITY;return M.inverseTranspose(o,Smt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},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},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new G(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new U(65e5,9e6),nightFadeDistance:new U(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new d(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new d(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new d,center3D:void 0,rtc:new d,modifiedModelView:new M,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 M,clippingPlanesEdgeColor:G.clone(G.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:G.clone(G.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?St(n,t.materialUniformMap):n}function wmt(e,t,n){let i=n.data,o,r;if(l(i.vertexArray)?(o=i.mesh,r=i.vertexArray):l(i.fill)&&l(i.fill.vertexArray)&&(o=i.fill.mesh,r=i.fill.vertexArray),!(!l(o)||!l(r))){if(l(i.wireframeVertexArray)){if(i.wireframeVertexArray.mesh===o)return;i.wireframeVertexArray.destroy(),i.wireframeVertexArray=void 0}i.wireframeVertexArray=Bmt(e,r,o),i.wireframeVertexArray.mesh=o}}function Bmt(e,t,n){let o={indices:n.indices,primitiveType:Ne.TRIANGLES};Vn.toWireframe(o);let r=o.indices,s=Ct.createIndexBuffer({context:e,typedArray:r,usage:Ue.STATIC_DRAW,indexDatatype:Qe.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new ri({context:e,attributes:t._attributes,indexBuffer:s})}var r0e,s0e,V8;(function(){let e=new Rt({geometry:mh.fromDimensions({dimensions:new d(2,2,2)})}),t=new Rt({geometry:new mg({radius:1})}),n=new M,i,o;function r(s){return new kn({geometryInstances:s,appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})}r0e=function(s,a){return s===i||(V8(),i=s,n=M.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=en.fromColor(a),o=r(e)),o},s0e=function(s,a){return s===i||(V8(),i=s,n=M.fromTranslation(s.center,n),n=M.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=en.fromColor(a),o=r(t)),o},V8=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var Dmt=new se(0,0,0,0),vmt={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},Pmt=G.TRANSPARENT,Rmt=new Kt;function Mmt(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new cw(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let Vt=r.credits;for(let wt=0,qi=Vt.length;wt<qi;++wt)o.addCreditToNextFrame(Vt[wt])}let s=qt.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,h=f.translucent,p=f.frontFaceAlphaByDistance,g=f.backFaceAlphaByDistance,m=f.rectangle,_=e.undergroundColor??Pmt,y=e.undergroundColorAlphaByDistance??Rmt,C=o0e(e,n)&&n.mode===oe.SCENE3D&&_.alpha>0&&(y.nearValue>0||y.farValue>0),E=e.lambertDiffuseMultiplier,I=e.vertexShadowDarkness,b=e.hasWaterMask&&l(a),S=b&&e.showWaterEffect,B=e.oceanNormalMap,v=S&&l(B),P=e.terrainProvider,N=l(P)&&e.terrainProvider.hasVertexNormals,L=n.fog.enabled&&n.fog.renderable&&!u,A=e.showGroundAtmosphere&&n.mode===oe.SCENE3D,x=Bn.castShadows(e.shadows)&&!h,T=Bn.receiveShadows(e.shadows)&&!h,w=e.hueShift,R=e.saturationShift,O=e.brightnessShift,k=!(D.equalsEpsilon(w,0,D.EPSILON7)&&D.equalsEpsilon(R,0,D.EPSILON7)&&D.equalsEpsilon(O,0,D.EPSILON7)),F=!1;if(A){let Vt=d.magnitude(n.camera.positionWC),wt=e.nightFadeOutDistance;F=Vt>wt}b&&--s,v&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=f.numberOfTextureUniforms;let z=i.renderedMesh,Q=z.center,H=z.encoding,j=i.tileBoundingRegion,Z=n.verticalExaggeration,Y=n.verticalExaggerationRelativeHeight,$=Z!==1,J=H.hasGeodeticSurfaceNormals,pe=Amt,Ce=0,fe=0,ye=0,Ie=0,ve=!1;if(n.mode!==oe.SCENE3D){let Vt=n.mapProjection,wt=Vt.project(ae.southwest(t.rectangle),Cmt),qi=Vt.project(ae.northeast(t.rectangle),Emt);if(pe.x=wt.x,pe.y=wt.y,pe.z=qi.x,pe.w=qi.y,n.mode!==oe.MORPHING&&(Q=ymt,Q.x=0,Q.y=(pe.z+pe.x)*.5,Q.z=(pe.w+pe.y)*.5,pe.x-=Q.y,pe.y-=Q.z,pe.z-=Q.y,pe.w-=Q.z),n.mode===oe.SCENE2D&&H.quantization===Ia.BITS12){let Et=1/(Math.pow(2,12)-1)*.5,Ho=(pe.z-pe.x)*Et,No=(pe.w-pe.y)*Et;pe.x-=Ho,pe.y-=No,pe.z+=Ho,pe.w+=No}Vt instanceof Ui&&(Ce=t.rectangle.south,fe=t.rectangle.north,ye=Ui.geodeticLatitudeToMercatorAngle(Ce),Ie=1/(Ui.geodeticLatitudeToMercatorAngle(fe)-ye),ve=!0)}let be=vmt;be.frameState=n,be.surfaceTile=i,be.hasWaterMask=b,be.showReflectiveOcean=S,be.showOceanWaves=v,be.enableLighting=e.enableLighting,be.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,be.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,be.showGroundAtmosphere=A,be.atmosphereLightIntensity=e.atmosphereLightIntensity,be.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,be.atmosphereMieCoefficient=e.atmosphereMieCoefficient,be.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,be.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,be.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,be.perFragmentGroundAtmosphere=F,be.hasVertexNormals=N,be.useWebMercatorProjection=ve,be.clippedByBoundaries=i.clippedByBoundaries,be.hasGeodeticSurfaceNormals=J,be.hasExaggeration=$;let ze=i.imagery,We=0,tt=ze.length,Mt=e.showSkirts&&!u&&!h,kt=e.backFaceCulling&&!u&&!h,Oe=kt?e._renderState:e._disableCullingRenderState,_n=kt?e._blendRenderState:e._disableCullingBlendRenderState,Ut=Oe,gt=e._firstPassInitialColor,ti=n.context;if(l(e._debug.boundingSphereTile)||V8(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let Vt=e._drawCommands.length;for(let wt=0;wt<Vt;++wt)e._uniformMaps[wt]=t0e(n,e)}do{let Vt=0,wt,qi;if(e._drawCommands.length<=e._usedDrawCommands?(wt=new nt,wt.owner=t,wt.cull=!1,wt.boundingVolume=new le,wt.orientedBoundingBox=void 0,qi=t0e(n,e),e._drawCommands.push(wt),e._uniformMaps.push(qi)):(wt=e._drawCommands[e._usedDrawCommands],qi=e._uniformMaps[e._usedDrawCommands]),wt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let Zo=j.boundingVolume,ec=j.boundingSphere;l(Zo)?r0e(Zo,G.RED).update(n):l(ec)&&s0e(ec,G.RED).update(n)}let Et=qi.properties;se.clone(gt,Et.initialColor),Et.oceanNormalMap=B,Et.lightingFadeDistance.x=e.lightingFadeOutDistance,Et.lightingFadeDistance.y=e.lightingFadeInDistance,Et.nightFadeDistance.x=e.nightFadeOutDistance,Et.nightFadeDistance.y=e.nightFadeInDistance,Et.atmosphereLightIntensity=e.atmosphereLightIntensity,Et.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Et.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Et.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Et.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Et.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Et.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let Ho=u?g:p,No=u?p:g;l(Ho)&&(se.fromElements(Ho.near,Ho.nearValue,Ho.far,Ho.farValue,Et.frontFaceAlphaByDistance),se.fromElements(No.near,No.nearValue,No.far,No.farValue,Et.backFaceAlphaByDistance)),se.fromElements(y.near,y.nearValue,y.far,y.farValue,Et.undergroundColorAlphaByDistance),G.clone(_,Et.undergroundColor),Et.lambertDiffuseMultiplier=E,Et.vertexShadowDarkness=I;let ds=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;ds&&G.clone(e.fillHighlightColor,Et.fillHighlightColor),Et.verticalExaggerationAndRelativeHeight.x=Z,Et.verticalExaggerationAndRelativeHeight.y=Y,Et.center3D=z.center,d.clone(Q,Et.rtc),se.clone(pe,Et.tileRectangle),Et.southAndNorthLatitude.x=Ce,Et.southAndNorthLatitude.y=fe,Et.southMercatorYAndOneOverHeight.x=ye,Et.southMercatorYAndOneOverHeight.y=Ie;let Wo=gmt,Ir=z8(t.rectangle,e.cartographicLimitRectangle),ke=_mt,ct=z8(t.rectangle,m);d.fromElements(w,R,O,Et.hsbShift);let Xe=t.rectangle,et=1/Xe.width,pt=1/Xe.height;Wo.x=(Ir.west-Xe.west)*et,Wo.y=(Ir.south-Xe.south)*pt,Wo.z=(Ir.east-Xe.west)*et,Wo.w=(Ir.north-Xe.south)*pt,se.clone(Wo,Et.localizedCartographicLimitRectangle),ke.x=(ct.west-Xe.west)*et,ke.y=(ct.south-Xe.south)*pt,ke.z=(ct.east-Xe.west)*et,ke.w=(ct.north-Xe.south)*pt,se.clone(ke,Et.localizedTranslucencyRectangle);let Zt=L&&D.fog(t._distance,n.fog.density)>D.EPSILON3;k=k&&(Zt||A);let Tn=!1,Bo=!1,lo=!1,ia=!1,ks=!1,xi=!1,Ei=!1,Do=!1,xr=!1,$a=!1;for(;Vt<s&&We<tt;){let Zo=ze[We],ec=Zo.readyImagery;if(++We,!l(ec)||ec.imageryLayer.alpha===0)continue;let ra=Zo.useWebMercatorT?ec.textureWebMercator:ec.texture,Lr=ec.imageryLayer;l(Zo.textureTranslationAndScale)||(Zo.textureTranslationAndScale=Lr._calculateTextureTranslationAndScale(t,Zo)),Et.dayTextures[Vt]=ra,Et.dayTextureTranslationAndScale[Vt]=Zo.textureTranslationAndScale,Et.dayTextureTexCoordsRectangle[Vt]=Zo.textureCoordinateRectangle,Et.dayTextureUseWebMercatorT[Vt]=Zo.useWebMercatorT,Et.dayTextureAlpha[Vt]=Lr.alpha,xi=xi||Et.dayTextureAlpha[Vt]!==1,Et.dayTextureNightAlpha[Vt]=Lr.nightAlpha,Ei=Ei||Et.dayTextureNightAlpha[Vt]!==1,Et.dayTextureDayAlpha[Vt]=Lr.dayAlpha,Ei=Ei||Et.dayTextureDayAlpha[Vt]!==1,Et.dayTextureBrightness[Vt]=Lr.brightness,Tn=Tn||Et.dayTextureBrightness[Vt]!==ns.DEFAULT_BRIGHTNESS,Et.dayTextureContrast[Vt]=Lr.contrast,Bo=Bo||Et.dayTextureContrast[Vt]!==ns.DEFAULT_CONTRAST,Et.dayTextureHue[Vt]=Lr.hue,lo=lo||Et.dayTextureHue[Vt]!==ns.DEFAULT_HUE,Et.dayTextureSaturation[Vt]=Lr.saturation,ia=ia||Et.dayTextureSaturation[Vt]!==ns.DEFAULT_SATURATION,Et.dayTextureOneOverGamma[Vt]=1/Lr.gamma,ks=ks||Et.dayTextureOneOverGamma[Vt]!==1/ns.DEFAULT_GAMMA,Et.dayTextureSplit[Vt]=Lr.splitDirection,Do=Do||Et.dayTextureSplit[Vt]!==0;let Ic=Et.dayTextureCutoutRectangles[Vt];if(l(Ic)||(Ic=Et.dayTextureCutoutRectangles[Vt]=new se),se.clone(se.ZERO,Ic),l(Lr.cutoutRectangle)){let Lo=z8(Xe,Lr.cutoutRectangle),an=ae.simpleIntersection(Lo,Xe,i0e);xr=l(an)||xr,Ic.x=(Lo.west-Xe.west)*et,Ic.y=(Lo.south-Xe.south)*pt,Ic.z=(Lo.east-Xe.west)*et,Ic.w=(Lo.north-Xe.south)*pt}let Yl=Et.colorsToAlpha[Vt];l(Yl)||(Yl=Et.colorsToAlpha[Vt]=new se);let ql=l(Lr.colorToAlpha)&&Lr.colorToAlphaThreshold>0;if($a=$a||ql,ql){let Lo=Lr.colorToAlpha;Yl.x=Lo.red,Yl.y=Lo.green,Yl.z=Lo.blue,Yl.w=Lr.colorToAlphaThreshold}else Yl.w=-1;if(l(ec.credits)){let Lo=ec.credits;for(let an=0,Te=Lo.length;an<Te;++an)o.addCreditToNextFrame(Lo[an])}++Vt}Et.dayTextures.length=Vt,Et.waterMask=a,se.clone(c,Et.waterMaskTranslationAndScale),Et.minMaxHeight.x=H.minimumHeight,Et.minMaxHeight.y=H.maximumHeight,M.clone(H.matrix,Et.scaleAndBias);let to=e._clippingPlanes,Jo=l(to)&&to.enabled&&t.isClipped;Jo&&(Et.clippingPlanesEdgeColor=G.clone(to.edgeColor,Et.clippingPlanesEdgeColor),Et.clippingPlanesEdgeWidth=to.edgeWidth);let kf=e._clippingPolygons,Nr=l(kf)&&kf.enabled&&t.isClipped;be.numberOfDayTextures=Vt,be.applyBrightness=Tn,be.applyContrast=Bo,be.applyHue=lo,be.applySaturation=ia,be.applyGamma=ks,be.applyAlpha=xi,be.applyDayNightAlpha=Ei,be.applySplit=Do,be.enableFog=Zt,be.enableClippingPlanes=Jo,be.clippingPlanes=to,be.enableClippingPolygons=Nr,be.clippingPolygons=kf,be.hasImageryLayerCutout=xr,be.colorCorrect=k,be.highlightFillTile=ds,be.colorToAlpha=$a,be.showUndergroundColor=C,be.translucent=h;let Da=i.renderedMesh.indices.length;Mt||(Da=i.renderedMesh.indexCountWithoutSkirts),wt.shaderProgram=e._surfaceShaderSet.getShaderProgram(be),wt.castShadows=x,wt.receiveShadows=T,wt.renderState=Ut,wt.primitiveType=Ne.TRIANGLES,wt.vertexArray=i.vertexArray||i.fill.vertexArray,wt.count=Da,wt.uniformMap=qi,wt.pass=Be.GLOBE,e._debug.wireframe&&(wmt(ti,e,t),l(i.wireframeVertexArray)&&(wt.vertexArray=i.wireframeVertexArray,wt.primitiveType=Ne.LINES,wt.count=Da*2));let oa=wt.boundingVolume,th=wt.orientedBoundingBox;n.mode!==oe.SCENE3D?(le.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,j.minimumHeight,j.maximumHeight,oa),d.fromElements(oa.center.z,oa.center.x,oa.center.y,oa.center),n.mode===oe.MORPHING&&(oa=le.union(j.boundingSphere,oa,oa))):(wt.boundingVolume=le.clone(j.boundingSphere,oa),wt.orientedBoundingBox=Qn.clone(j.boundingVolume,th)),wt.dirty=!0,h&&f.updateDerivedCommands(wt,n),n0e(wt,n),Ut=_n,gt=Dmt}while(We<tt)}var L2=yr;function a0e(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ae.clone(ae.MAX_VALUE)}Object.defineProperties(a0e.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=Kt.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=Kt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ae.clone(ae.MAX_VALUE)),ae.clone(e,this._rectangle)}}});var O2=a0e;function c0e(e){this._ellipsoid=new xg(e.ellipsoid,d.ZERO)}Object.defineProperties(c0e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var F2=c0e;var QX=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)}clear(){this.cache.clear()}},Nmt=1e3;function ba(e){this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.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=[],this._frameUpdated=void 0,this._lastSelectionResult=oi.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new QX(Nmt),this.state=xa.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}ba.createLevelZeroTiles=function(e){let t=e.getNumberOfXTilesAtLevel(0),n=e.getNumberOfYTilesAtLevel(0),i=new Array(t*n),o=0;for(let r=0;r<n;++r)for(let s=0;s<t;++s)i[o++]=new ba({tilingScheme:e,x:s,y:r,level:0});return i};var Lmt=256;function Omt(e,t,n,i){let o=n.width/Lmt*i,r=Math.floor(e/o)*o,s=Math.floor(t/o)*o;return`${r.toFixed(10)},${s.toFixed(10)}`}ba.prototype._getCacheKey=function(e,t){return Omt(e.longitude,e.latitude,this._rectangle,t)};ba.prototype.getPositionCacheEntry=function(e,t){return this._positionCache.get(this._getCacheKey(e,t))};ba.prototype.setPositionCacheEntry=function(e,t,n){this._positionCache.set(this._getCacheKey(e,t),n)};ba.prototype.clearPositionCache=function(){this._positionCache.size>0&&this._positionCache.clear()};ba.prototype._updateCustomData=function(e,t,n){let i=this.customData,o,r,s;if(l(t)&&l(n)){for(i=i.filter(function(a){return n.indexOf(a)===-1}),this._customData=i,s=this._rectangle,o=0;o<t.length;++o)r=t[o],ae.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=e}else{let a=this._parent;if(l(a)&&this._frameUpdated!==a._frameUpdated){i.length=0,s=this._rectangle;let c=a.customData;for(o=0;o<c.length;++o)r=c[o],ae.contains(s,r.positionCartographic)&&i.push(r);this._frameUpdated=a._frameUpdated}}};Object.defineProperties(ba.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return l(this._southwestChild)||(this._southwestChild=new ba({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return l(this._southeastChild)||(this._southeastChild=new ba({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return l(this._northwestChild)||(this._northwestChild=new ba({tilingScheme:this.tilingScheme,x:this.x*2,y:this.y*2,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return l(this._northeastChild)||(this._northeastChild=new ba({tilingScheme:this.tilingScheme,x:this.x*2+1,y:this.y*2,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<xa.DONE}},eligibleForUnloading:{get:function(){let e=!0;return l(this.data)&&(e=this.data.eligibleForUnloading,l(e)||(e=!0)),e}}});ba.prototype.findLevelZeroTile=function(e,t,n){let i=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=i:t>=i&&(t-=i),!(n<0||n>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter(function(o){return o.x===t&&o.y===n})[0]};ba.prototype.findTileToWest=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;let n=t.findTileToWest(e);if(n!==void 0)return t.southwestChild===this?n.southeastChild:n.northeastChild};ba.prototype.findTileToEast=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;let n=t.findTileToEast(e);if(n!==void 0)return t.southeastChild===this?n.southwestChild:n.northwestChild};ba.prototype.findTileToSouth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;let n=t.findTileToSouth(e);if(n!==void 0)return t.southwestChild===this?n.northwestChild:n.northeastChild};ba.prototype.findTileToNorth=function(e){let t=this.parent;if(t===void 0)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;let n=t.findTileToNorth(e);if(n!==void 0)return t.northwestChild===this?n.southwestChild:n.southeastChild};ba.prototype.freeResources=function(){this.clearPositionCache(),this.state=xa.START,this.renderable=!1,this.upsampledFromParent=!1,l(this.data)&&l(this.data.freeResources)&&this.data.freeResources(),H8(this._southwestChild),this._southwestChild=void 0,H8(this._southeastChild),this._southeastChild=void 0,H8(this._northwestChild),this._northwestChild=void 0,H8(this._northeastChild),this._northeastChild=void 0};function H8(e){l(e)&&e.freeResources()}var Q2=ba;function W8(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}W8.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};W8.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(),l0e(this,t)),t=i}};function l0e(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}W8.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))&&l0e(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var k2=W8;function Vd(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._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new k2,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,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 F2({ellipsoid:n}),this._tileLoadProgressEvent=new ge,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(Vd.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});Vd.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Fmt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,f0e(e);let n=e._levelZeroTiles;if(l(n))for(let i=0;i<n.length;++i){let r=n[i].customData,s=r.length;for(let a=0;a<s;++a){let c=r[a];c.level=0,e._addHeightCallbacks.push(c)}n[i].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}Vd.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==xa.START&&e(t),t=t.replacementNext};Vd.prototype.forEachRenderedTile=function(e){let t=this._tilesToRender;for(let n=0,i=t.length;n<i;++n)e(t[n])};Vd.prototype.updateHeight=function(e,t){let n=this,i={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t};return i.removeFunc=function(){let o=n._addHeightCallbacks,r=o.length;for(let s=0;s<r;++s)if(o[s]===i){o.splice(s,1);break}n._removeHeightCallbacks.push(i),i.callback&&(i.callback=void 0)},n._addHeightCallbacks.push(i),i.removeFunc};Vd.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function f0e(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}Vd.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Fmt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),f0e(this),!this._debug.suspendLodUpdate&&this._tileReplacementQueue.markStartOfRenderFrame())};Vd.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),Gmt(this,e),Jmt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function Qmt(e,t){let n=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;if(n!==e._lastTileLoadQueueLength||e._tilesInvalidated){let o=ge.prototype.raiseEvent.bind(e._tileLoadProgressEvent,n);t.afterRender.push(()=>(o(),!0)),e._lastTileLoadQueueLength=n}let i=e._debug;i.enableDebugOutput&&!i.suspendLodUpdate&&(i.maxDepth=e._tilesToRender.reduce(function(o,r){return Math.max(o,r.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))}Vd.prototype.endFrame=function(e){!e.passes.render||e.mode===oe.MORPHING||(Ymt(this,e),Xmt(this,e),Qmt(this,e))};Vd.prototype.isDestroyed=function(){return!1};Vd.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var G2,u0e=new me;function kmt(e,t){let n=ae.center(e.rectangle,u0e),i=n.longitude-G2.longitude,o=n.latitude-G2.latitude;n=ae.center(t.rectangle,u0e);let r=n.longitude-G2.longitude,s=n.latitude-G2.latitude;return i*i+o*o-(r*r+s*s)}var Umt=new d,U2=[];function Gmt(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o,r=e._tileProvider;if(!l(e._levelZeroTiles)){let _=r.tilingScheme;if(l(_)){let y=r.tilingScheme;e._levelZeroTiles=Q2.createLevelZeroTiles(y);let C=e._levelZeroTiles.length;if(U2.length<C)for(U2=new Array(C),o=0;o<C;++o)U2[o]===void 0&&(U2[o]=new z2)}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let s,a=e._levelZeroTiles,c=a.length>1?e._occluders:void 0;G2=t.camera.positionCartographic,a.sort(kmt);let u=e._addHeightCallbacks,f=e._removeHeightCallbacks,h=t.frameNumber,p;if(u.length>0||f.length>0){for(o=0,p=a.length;o<p;++o)s=a[o],s._updateCustomData(h,u,f);u.length=0,f.length=0}let g=t.camera;e._cameraPositionCartographic=g.positionCartographic;let m=M.getTranslation(g.transform,Umt);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(m,e._cameraReferenceFrameOriginCartographic),o=0,p=a.length;o<p;++o)s=a[o],e._tileReplacementQueue.markTileRendered(s),s.renderable?Cc(e,s,r,t,c,!1,U2[o]):(Yg(e,e._tileLoadQueueHigh,s,t),++n.tilesWaitingForChildren);e._lastSelectionFrameNumber=h}function Yg(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function z2(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function d0e(){this.southwest=new z2,this.southeast=new z2,this.northwest=new z2,this.northeast=new z2}d0e.prototype.combine=function(e){let t=this.southwest,n=this.southeast,i=this.northwest,o=this.northeast;e.allAreRenderable=t.allAreRenderable&&n.allAreRenderable&&i.allAreRenderable&&o.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||o.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+n.notYetRenderableCount+i.notYetRenderableCount+o.notYetRenderableCount};var UX=new Array(31);for(let e=0;e<UX.length;++e)UX[e]=new d0e;function zmt(e,t,n,i,o){let r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(n),n._updateCustomData(t.frameNumber),n.level>r.maxDepthVisited&&(r.maxDepthVisited=n.level);let s=Wmt(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,u=n.northwestChild,f=n.northeastChild,h=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===h?n._lastSelectionResult:oi.NONE,g=e.tileProvider;if(s||i){let m=oi.originalResult(p)===oi.RENDERED,_=oi.originalResult(p)===oi.CULLED||p===oi.NONE,y=n.state===xa.DONE,C=m||_||y;if(C||l(g.canRenderWithoutLosingDetail)&&(C=g.canRenderWithoutLosingDetail(n)),C){s&&Yg(e,e._tileLoadQueueMedium,n,t),j8(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&Yg(e,e._tileLoadQueueHigh,n,t)}if(g.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&u.upsampledFromParent&&f.upsampledFromParent){j8(e,n),Yg(e,e._tileLoadQueueMedium,n,t),e._tileReplacementQueue.markTileRendered(a),e._tileReplacementQueue.markTileRendered(c),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(f),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.REFINED;let _=e._tilesToRender.length,y=e._tileLoadQueueLow.length,C=e._tileLoadQueueMedium.length,E=e._tileLoadQueueHigh.length,I=e._tileToUpdateHeights.length;if(Vmt(e,a,c,u,f,t,i,o),_!==e._tilesToRender.length){let b=o.allAreRenderable,S=o.anyWereRenderedLastFrame,B=o.notYetRenderableCount,v=!1;if(!b&&!S){let P=e._tilesToRender;for(let L=_;L<P.length;++L){let A=P[L];for(;A!==void 0&&A._lastSelectionResult!==oi.KICKED&&A!==n;)A._lastSelectionResult=oi.kick(A._lastSelectionResult),A=A.parent}e._tilesToRender.length=_,e._tileToUpdateHeights.length=I,j8(e,n),n._lastSelectionResult=oi.RENDERED;let N=p===oi.RENDERED;!N&&B>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=y,e._tileLoadQueueMedium.length=C,e._tileLoadQueueHigh.length=E,Yg(e,e._tileLoadQueueMedium,n,t),o.notYetRenderableCount=n.renderable?0:1,v=!0),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=N,N||e._tileToUpdateHeights.push(n),++r.tilesWaitingForChildren}e.preloadAncestors&&!v&&Yg(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,j8(e,n),Yg(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function Vmt(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,u=e._tileProvider,f=e._occluders,h=UX[t.level],p=h.southwest,g=h.southeast,m=h.northwest,_=h.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(Cc(e,t,u,r,f,s,p),Cc(e,n,u,r,f,s,g),Cc(e,i,u,r,f,s,m),Cc(e,o,u,r,f,s,_)):(Cc(e,i,u,r,f,s,m),Cc(e,t,u,r,f,s,p),Cc(e,o,u,r,f,s,_),Cc(e,n,u,r,f,s,g)):c.latitude<t.rectangle.north?(Cc(e,n,u,r,f,s,g),Cc(e,t,u,r,f,s,p),Cc(e,o,u,r,f,s,_),Cc(e,i,u,r,f,s,m)):(Cc(e,o,u,r,f,s,_),Cc(e,i,u,r,f,s,m),Cc(e,n,u,r,f,s,g),Cc(e,t,u,r,f,s,p)),h.combine(a)}function Hmt(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ae.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ae.contains(n,e._cameraReferenceFrameOriginCartographic)}function Cc(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==Rr.NONE)return zmt(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,Hmt(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&Yg(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:oi.NONE;c!==oi.CULLED_BUT_NEEDED&&c!==oi.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=oi.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(Yg(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=oi.CULLED):t._lastSelectionResult=oi.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Wmt(e,t,n){if(t.mode===oe.SCENE2D||t.camera.frustum instanceof mn||t.camera.frustum instanceof Jr)return jmt(e,t,n);let i=e._tileProvider.getLevelMaximumGeometricError(n.level),o=n._distance,r=t.context.drawingBufferHeight,s=t.camera.frustum.sseDenominator,a=i*r/(o*s);return t.fog.enabled&&(a-=D.fog(o,t.fog.density)*t.fog.sse),a/=t.pixelRatio,a}function jmt(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,u=e._tileProvider.getLevelMaximumGeometricError(n.level),f=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,c),h=u/f;return t.fog.enabled&&t.mode!==oe.SCENE2D&&(h-=D.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}function j8(e,t){e._tilesToRender.push(t)}function Ymt(e,t){let n=e._tileLoadQueueHigh,i=e._tileLoadQueueMedium,o=e._tileLoadQueueLow;if(n.length===0&&i.length===0&&o.length===0)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);let r=Mi()+e._loadQueueTimeSlice,s=e._tileProvider,a=kX(e,t,s,r,n,!1);a=kX(e,t,s,r,i,a),kX(e,t,s,r,o,a)}function qmt(e,t){return e._loadPriority-t._loadPriority}function kX(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(qmt);for(let s=0,a=o.length;s<a&&(Mi()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var lw=new xn,Y8=new me,aC=new d,Kmt=[];function Xmt(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=Kmt;n.length=0;let i=e._tileToUpdateHeights,o=Mi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,u=e.tileProvider.tilingScheme.ellipsoid,f;for(;i.length>0;){let h=i[0];if(!l(h.data)||!l(h.data.mesh)){let _=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:oi.NONE;(_===oi.RENDERED||_===oi.CULLED_BUT_NEEDED)&&n.push(h),h.clearPositionCache(),i.shift(),e._lastTileIndex=0;continue}let p=h.customData,g=p.length,m=!1;for(f=e._lastTileIndex;f<g;++f){let _=p[f],y=h.data.terrainData,C=l(y)&&y.wasCreatedByUpsampling();if(h.level>_.level&&!C){let E,I=h.getPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError);if(l(I))E=I;else{if(l(_.positionOnEllipsoidSurface)||(_.positionOnEllipsoidSurface=d.fromRadians(_.positionCartographic.longitude,_.positionCartographic.latitude,0,u)),a===oe.SCENE3D){let b=u.geodeticSurfaceNormal(_.positionOnEllipsoidSurface,lw.direction),S=u.getSurfaceNormalIntersectionWithZAxis(_.positionOnEllipsoidSurface,11500,lw.origin);if(!l(S)){let B=0;l(h.data.tileBoundingRegion)&&(B=h.data.tileBoundingRegion.minimumHeight);let v=Math.min(B,-11500),P=d.multiplyByScalar(b,Math.abs(v)+1,aC);d.subtract(_.positionOnEllipsoidSurface,P,lw.origin)}}else me.clone(_.positionCartographic,Y8),Y8.height=-11500,c.project(Y8,aC),d.fromElements(aC.z,aC.x,aC.y,aC),d.clone(aC,lw.origin),d.clone(d.UNIT_X,lw.direction);E=h.data.pick(lw,a,c,!1,aC),l(E)&&h.setPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError,E)}if(l(E)){if(l(_.callback)){let b=u.cartesianToCartographic(E,Y8);_.callback(b)}_.level=h.level}}if(Mi()>=s){m=!0;break}}if(m){e._lastTileIndex=f;break}else e._lastTileIndex=0,i.shift()}for(f=0;f<n.length;f++)i.push(n[f])}function Jmt(e,t){let n=e._tileProvider,i=e._tilesToRender;for(let o=0,r=i.length;o<r;++o){let s=i[o];n.showTileThisFrame(s,t)}}var V2=Vd;function gm(e){e=e??ne.default;let t=new Pp({ellipsoid:e}),n=new k0;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new M2,this._material=void 0,this._surface=new V2({tileProvider:new L2({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new ge,this._undergroundColor=G.clone(G.BLACK),this._undergroundColorAlphaByDistance=new Kt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new O2,zX(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new we({url:fn("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=ne.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new d(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new d(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=Bn.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(gm.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=ae.clone(ae.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,this._terrainProviderChanged.raiseEvent(e),l(this._material)&&zX(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,zX(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=G.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){this._undergroundColorAlphaByDistance=Kt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function zX(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[vh,nw];l(e._material)&&(!n||e._terrainProvider.requestVertexNormals)?(i.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms):e._surface._tileProvider.materialUniformMap=void 0,i.push(I2),e._surfaceShaderSet.baseVertexShaderSource=new He({sources:[vh,nw,x2],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new He({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function Zmt(e){return function(t,n){let i=le.distanceSquaredTo(t.pickBoundingSphere,e),o=le.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var $mt=[],ept={start:0,stop:0};gm.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let o=t.mode,r=t.mapProjection,s=$mt;s.length=0;let a=this._surface._tilesToRender,c=a.length,u,f;for(f=0;f<c;++f){u=a[f];let p=u.data;if(!l(p))continue;let g=p.pickBoundingSphere;if(o!==oe.SCENE3D)p.pickBoundingSphere=g=le.fromRectangleWithHeights2D(u.rectangle,r,p.tileBoundingRegion.minimumHeight,p.tileBoundingRegion.maximumHeight,g),d.fromElements(g.center.z,g.center.x,g.center.y,g.center);else if(l(p.renderedMesh))le.clone(p.tileBoundingRegion.boundingSphere,g);else continue;let m=fi.raySphere(e,g,ept);l(m)&&s.push(p)}s.sort(Zmt(e.origin));let h;for(c=s.length,f=0;f<c&&(h=s[f].pick(e,t.mode,t.mapProjection,n,i),!l(h));++f);return h};var tpt=new me;gm.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==oe.SCENE3D){n=d.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,tpt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var npt=new d,h0e=new d,ipt=new me,opt=new xn;function GX(e,t){return l(e)&&ae.contains(e.rectangle,t)?e:void 0}gm.prototype.getHeight=function(e){let t=this._surface._levelZeroTiles;if(!l(t))return;let n,i,o=t.length;for(i=0;i<o&&(n=t[i],!ae.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=GX(n._southwestChild,e)||GX(n._southeastChild,e)||GX(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=d.fromRadians(e.longitude,e.latitude,0,a,npt),u=opt,f=a.geodeticSurfaceNormal(c,u.direction),h=a.getSurfaceNormalIntersectionWithZAxis(c,11500,u.origin);if(!l(h)){let g;l(n.data.tileBoundingRegion)&&(g=n.data.tileBoundingRegion.minimumHeight);let m=Math.min(g??0,-11500),_=d.multiplyByScalar(f,Math.abs(m)+1,h0e);d.subtract(c,_,u.origin)}let p=n.data.pick(u,void 0,s,!1,h0e);if(l(p))return a.cartesianToCartographic(p,ipt).height};gm.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};gm.prototype.beginFrame=function(e){let t=this._surface,n=t.tileProvider,i=this.terrainProvider,o=l(i)&&i.hasWaterMask&&i.hasWaterMask;if(o&&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 Nt({context:e.context,source:f}))})}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}let r=e.passes,s=e.mode;r.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===oe.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,n.hasWaterMask=o,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))};gm.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};gm.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};gm.prototype.isDestroyed=function(){return!1};gm.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(),ue(this)};var H2=gm;function rpt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var W2=rpt;var w0e={},spt=32.184,apt=2451545,m0e=-.0529921,p0e=-.1059842,A0e=13.0120009,g0e=13.3407154,_0e=.9856003,y0e=26.4057084,C0e=13.064993,E0e=.3287146,I0e=1.7484877,x0e=-.1589763,b0e=.0036096,T0e=.1643573,S0e=12.9590088,VX=new K;w0e.ComputeMoon=function(e,t){l(e)||(e=K.now()),VX=K.addSeconds(e,spt,VX);let n=K.totalDays(VX)-apt,i=n/ii.DAYS_PER_JULIAN_CENTURY,o=(125.045+m0e*n)*D.RADIANS_PER_DEGREE,r=(250.089+p0e*n)*D.RADIANS_PER_DEGREE,s=(260.008+A0e*n)*D.RADIANS_PER_DEGREE,a=(176.625+g0e*n)*D.RADIANS_PER_DEGREE,c=(357.529+_0e*n)*D.RADIANS_PER_DEGREE,u=(311.589+y0e*n)*D.RADIANS_PER_DEGREE,f=(134.963+C0e*n)*D.RADIANS_PER_DEGREE,h=(276.617+E0e*n)*D.RADIANS_PER_DEGREE,p=(34.226+I0e*n)*D.RADIANS_PER_DEGREE,g=(15.134+x0e*n)*D.RADIANS_PER_DEGREE,m=(119.743+b0e*n)*D.RADIANS_PER_DEGREE,_=(239.961+T0e*n)*D.RADIANS_PER_DEGREE,y=(25.053+S0e*n)*D.RADIANS_PER_DEGREE,C=Math.sin(o),E=Math.sin(r),I=Math.sin(s),b=Math.sin(a),S=Math.sin(c),B=Math.sin(u),v=Math.sin(f),P=Math.sin(h),N=Math.sin(p),L=Math.sin(g),A=Math.sin(m),x=Math.sin(_),T=Math.sin(y),w=Math.cos(o),R=Math.cos(r),O=Math.cos(s),k=Math.cos(a),F=Math.cos(c),z=Math.cos(u),Q=Math.cos(f),H=Math.cos(h),j=Math.cos(p),Z=Math.cos(g),Y=Math.cos(m),$=Math.cos(_),J=Math.cos(y),pe=(269.9949+.0031*i-3.8787*C-.1204*E+.07*I-.0172*b+.0072*B-.0052*L+.0043*T)*D.RADIANS_PER_DEGREE,Ce=(66.5392+.013*i+1.5419*w+.0239*R-.0278*O+.0068*k-.0029*z+9e-4*Q+8e-4*Z-9e-4*J)*D.RADIANS_PER_DEGREE,fe=(38.3213+13.17635815*n-14e-13*n*n+3.561*C+.1208*E-.0642*I+.0158*b+.0252*S-.0066*B-.0047*v-.0046*P+.0028*N+.0052*L+.004*A+.0019*x-.0044*T)*D.RADIANS_PER_DEGREE,ye=(13.17635815-14e-13*(2*n)+3.561*w*m0e+.1208*R*p0e-.0642*O*A0e+.0158*k*g0e+.0252*F*_0e-.0066*z*y0e-.0047*Q*C0e-.0046*H*E0e+.0028*j*I0e+.0052*Z*x0e+.004*Y*b0e+.0019*$*T0e-.0044*J*S0e)/86400*D.RADIANS_PER_DEGREE;return l(t)||(t=new W2),t.rightAscension=pe,t.declination=Ce,t.rotation=fe,t.rotationRate=ye,t};var j2=w0e;function B0e(e){(!l(e)||typeof e!="function")&&(e=j2.ComputeMoon),this._computeFunction=e}var cpt=new d,lpt=new d,upt=new d;function fpt(e,t,n){let i=cpt;i.x=Math.cos(e+D.PI_OVER_TWO),i.y=Math.sin(e+D.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=upt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=d.cross(r,i,lpt);return l(n)||(n=new X),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var dpt=new X,hpt=new Fe;B0e.prototype.evaluate=function(e,t){l(e)||(e=K.now());let n=this._computeFunction(e),i=fpt(n.rightAscension,n.declination,t),o=D.zeroToTwoPi(n.rotation),r=Fe.fromAxisAngle(d.UNIT_Z,o,hpt),s=X.fromQuaternion(Fe.conjugate(r,r),dpt);return X.multiply(s,i,i)};var Y2=B0e;var HX={position:0};function q8(e){e=e??V.EMPTY_OBJECT,this.center=d.clone(e.center??d.ZERO),this._center=new d,this.radii=d.clone(e.radii),this._radii=new d,this._oneOverEllipsoidRadiiSquared=new d,this._boundingSphere=new le,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=new M,this._computedModelMatrix=new M,this.show=e.show??!0,this.material=e.material??io.fromType(io.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 nt({owner:e._owner??this}),this._pickCommand=new nt({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 mpt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=sc.createGeometry(sc.fromDimensions({dimensions:new d(2,2,2),vertexFormat:Re.POSITION_ONLY}));return t=ri.fromGeometry({context:e,geometry:n,attributeLocations:HX,bufferUsage:Ue.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}q8.prototype.update=function(e){if(!this.show||e.mode!==oe.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:Pi.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!n&&t.fragmentDepth,blending:n?An.ALPHA_BLEND:void 0})),l(this._va)||(this._va=mpt(t));let o=!1,r=this.radii;if(!d.equals(this._radii,r)){d.clone(r,this._radii);let _=this._oneOverEllipsoidRadiiSquared;_.x=1/(r.x*r.x),_.y=1/(r.y*r.y),_.z=1/(r.z*r.z),o=!0}(!M.equals(this.modelMatrix,this._modelMatrix)||!d.equals(this.center,this._center))&&(M.clone(this.modelMatrix,this._modelMatrix),d.clone(this.center,this._center),M.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(d.clone(d.ZERO,this._boundingSphere.center),this._boundingSphere.radius=d.maximumComponent(r),le.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,h,p;(s||a||i||u)&&(h=new He({sources:[tw]}),p=new He({sources:[this.material.shaderSource,ew]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=cn.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:HX}),f.vertexArray=this._va,f.renderState=this._rs,f.shaderProgram=this._sp,f.uniformMap=St(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?Be.TRANSLUCENT:Be.OPAQUE,g.push(f)),m.pick){let _=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)&&(h=new He({sources:[tw]}),p=new He({sources:[this.material.shaderSource,ew],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=cn.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:HX}),_.vertexArray=this._va,_.renderState=this._rs,_.shaderProgram=this._pickSP,_.uniformMap=St(St(this._uniforms,this._pickUniforms),this.material._uniforms),_.executeInClosestFrustum=n),_.boundingVolume=this._boundingSphere,_.modelMatrix=this._computedModelMatrix,_.pass=n?Be.TRANSLUCENT:Be.OPAQUE,g.push(_)}};q8.prototype.isDestroyed=function(){return!1};q8.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(),ue(this)};var q2=q8;function K2(e){e=e??V.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=fn("Assets/Textures/moonSmall.jpg")),this.show=e.show??!0,this.textureUrl=t,this._ellipsoid=e.ellipsoid??ne.MOON,this.onlySunLighting=e.onlySunLighting??!0,this._ellipsoidPrimitive=new q2({radii:this.ellipsoid.radii,material:io.fromType(io.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new Y2}Object.defineProperties(K2.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var K8=new X,ppt=new X,Apt=new d,X8=[];K2.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(Qt.computeIcrfToFixedMatrix(n,K8))||Qt.computeTemeToPseudoFixedMatrix(n,K8);let i=this._axes.evaluate(n,ppt);X.transpose(i,i),X.multiply(K8,i,i);let o=b_.computeMoonPositionInEarthInertialFrame(n,Apt);X.multiplyByVector(K8,o,o),M.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=X8,X8.length=0,t.update(e),e.commandList=r,X8.length===1?X8[0]:void 0};K2.prototype.isDestroyed=function(){return!1};K2.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),ue(this)};var X2=K2;var WX=[],jX=[];function gpt(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=WX,u=jX,f,h;for(f=0;f<s;++f)c[f]=e[i+f];for(h=0;h<a;++h)u[h]=e[o+h+1];f=0,h=0;for(let p=i;p<=r;++p){let g=c[f],m=u[h];f<s&&(h>=a||t(g,m,n)<=0)?(e[p]=g,++f):h<a&&(e[p]=m,++h)}}function YX(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);YX(e,t,n,i,r),YX(e,t,n,r+1,o),gpt(e,t,n,i,r,o)}function _pt(e,t,n){let i=e.length,o=Math.ceil(i*.5);WX.length=o,jX.length=o,YX(e,t,n,0,i-1),WX.length=0,jX.length=0}var Rp=_pt;function Zc(e,t){this._occluderPosition=d.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 J8=new d;Object.defineProperties(Zc.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=d.clone(e,this._cameraPosition);let t=d.subtract(this._occluderPosition,e,J8),n=d.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=d.multiplyByScalar(t,n,J8);let a=o*o*n;s=d.add(e,d.multiplyByScalar(r,a,J8),J8)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});Zc.fromBoundingSphere=function(e,t,n){return l(n)?(d.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Zc(e,t)};var v0e=new d;Zc.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=d.subtract(e,this._occluderPosition,v0e),n=this._occluderRadius;if(n=d.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=d.subtract(e,this._cameraPosition,t),n*n>d.magnitudeSquared(t)}return!1};var ypt=new d;Zc.prototype.isBoundingSphereVisible=function(e){let t=d.clone(e.center,ypt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=d.subtract(t,this._occluderPosition,v0e),o=this._occluderRadius-n;if(o=d.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=d.subtract(t,this._cameraPosition,i),o*o+n*n>d.magnitudeSquared(i)):!1;if(o>0){i=d.subtract(t,this._cameraPosition,i);let r=d.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var Cpt=new d;Zc.prototype.computeVisibility=function(e){let t=d.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Rr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=d.subtract(t,this._occluderPosition,Cpt),o=this._occluderRadius-n,r=d.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=d.subtract(t,this._cameraPosition,i);let s=d.magnitudeSquared(i);return o*o+n*n<s?Rr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?Rr.FULL:Rr.PARTIAL):(i=d.subtract(t,this._horizonPlanePosition,i),d.dot(i,this._horizonPlaneNormal)>-n?Rr.PARTIAL:Rr.FULL))}}return Rr.NONE};var Z8=new d;Zc.computeOccludeePoint=function(e,t,n){let i=d.clone(t),o=d.clone(e.center),r=e.radius,s=n.length,a=d.normalize(d.subtract(i,o,Z8),Z8),c=-d.dot(a,o),u=Zc._anyRotationVector(o,a,c),f=Zc._horizonToPlaneNormalDotProduct(e,a,c,u,n[0]);if(!f)return;let h;for(let g=1;g<s;++g){if(h=Zc._horizonToPlaneNormalDotProduct(e,a,c,u,n[g]),!h)return;h<f&&(f=h)}if(f<.0017453283658983088)return;let p=r/f;return d.add(o,d.multiplyByScalar(a,p,Z8),Z8)};var Ept=[];Zc.computeOccludeePointFromRectangle=function(e,t){t=t??ne.default;let n=ae.subsample(e,t,0,Ept),i=le.fromPoints(n),o=d.ZERO;if(!d.equals(o,i.center))return Zc.computeOccludeePoint(new le(o,t.minimumRadius),i.center,n)};var Ipt=new d;Zc._anyRotationVector=function(e,t,n){let i=d.abs(t,Ipt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new d,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=d.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=d.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=d.UNIT_Z);let a=(d.dot(t,i)+n)/-d.dot(t,s);return d.normalize(d.subtract(d.add(i,d.multiplyByScalar(s,a,r),i),e,i),i)};var xpt=new d;Zc._rotationVector=function(e,t,n,i,o){let r=d.subtract(i,e,xpt);if(r=d.normalize(r,r),d.dot(t,r)<.9999999847691291){let s=d.cross(t,r,r);if(d.magnitude(s)>D.EPSILON13)return d.normalize(s,new d)}return o};var qX=new d,bpt=new d,$8=new d,D0e=new d;Zc._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=d.clone(o,qX),s=d.clone(e.center,bpt),a=e.radius,c=d.subtract(s,r,$8),u=d.magnitudeSquared(c),f=a*a;if(u<f)return!1;let h=u-f,p=Math.sqrt(h),m=1/Math.sqrt(u),y=p*m*p;c=d.normalize(c,c);let C=d.add(r,d.multiplyByScalar(c,y,D0e),D0e),E=Math.sqrt(h-y*y),I=this._rotationVector(s,t,n,r,i),b=d.fromElements(I.x*I.x*c.x+(I.x*I.y-I.z)*c.y+(I.x*I.z+I.y)*c.z,(I.x*I.y+I.z)*c.x+I.y*I.y*c.y+(I.y*I.z-I.x)*c.z,(I.x*I.z-I.y)*c.x+(I.y*I.z+I.x)*c.y+I.z*I.z*c.z,qX);b=d.normalize(b,b);let S=d.multiplyByScalar(b,E,qX);I=d.normalize(d.subtract(d.add(C,S,$8),s,$8),$8);let B=d.dot(t,I);I=d.normalize(d.subtract(d.subtract(C,S,I),s,I),I);let v=d.dot(t,I);return B<v?B:v};var J2=Zc;function Mp(e){e=e??V.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 vs,this._perspectiveMatrix=new M,this._infinitePerspective=new M}function KX(e){let{top:t,bottom:n,right:i,left:o,near:r,far:s}=e;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=M.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=M.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Mp.prototype,{projectionMatrix:{get:function(){return KX(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return KX(this),this._infinitePerspective}}});var Tpt=new d,Spt=new d,wpt=new d,Bpt=new d;Mp.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=d.cross(t,n,Tpt),h=Spt;d.multiplyByScalar(t,c,h),d.add(e,h,h);let p=wpt;d.multiplyByScalar(t,u,p),d.add(e,p,p);let g=Bpt;d.multiplyByScalar(f,a,g),d.add(h,g,g),d.subtract(g,e,g),d.normalize(g,g),d.cross(g,n,g),d.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=-d.dot(g,e),d.multiplyByScalar(f,s,g),d.add(h,g,g),d.subtract(g,e,g),d.cross(n,g,g),d.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=-d.dot(g,e),d.multiplyByScalar(n,r,g),d.add(h,g,g),d.subtract(g,e,g),d.cross(f,g,g),d.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=-d.dot(g,e),d.multiplyByScalar(n,o,g),d.add(h,g,g),d.subtract(g,e,g),d.cross(g,f,g),d.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=-d.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=-d.dot(t,h),d.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=-d.dot(g,p),this._cullingVolume};Mp.prototype.getPixelDimensions=function(e,t,n,i,o){KX(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Mp.prototype.clone=function(e){return l(e)||(e=new Mp),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};Mp.prototype.equals=function(e){return l(e)&&e instanceof Mp&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Mp.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Mp&&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 zl=Mp;function Su(e){e=e??V.EMPTY_OBJECT,this._offCenterFrustum=new zl,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}Su.packedLength=6;Su.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};Su.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Su),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 _m(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(Su.prototype,{projectionMatrix:{get:function(){return _m(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return _m(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return _m(this),this._fovy}},sseDenominator:{get:function(){return _m(this),this._sseDenominator}},offCenterFrustum:{get:function(){return _m(this),this._offCenterFrustum}}});Su.prototype.computeCullingVolume=function(e,t,n){return _m(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Su.prototype.getPixelDimensions=function(e,t,n,i,o){return _m(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Su.prototype.clone=function(e){return l(e)||(e=new Su),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};Su.prototype.equals=function(e){return!l(e)||!(e instanceof Su)?!1:(_m(this),_m(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Su.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Su)?!1:(_m(this),_m(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 Fi=Su;function Z2(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(Z2.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function Dpt(e,t,n){let i=t.createViewportQuadCommand(d2,{framebuffer:n,renderState:Ge.fromCache({viewport:new qe(0,0,256,256)})});e._drawCommand=i}Z2.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Nt({context:t,width:256,height:256,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,sampler:nn.NEAREST});this._colorTexture=n;let i=new Xr({context:t,colorTextures:[n],destroyAttachments:!1});Dpt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};Z2.prototype.isDestroyed=function(){return!1};Z2.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),ue(this)};var $2=Z2;var N0e={};function vpt(e,t,n){let i,o,r;if(e instanceof Fi){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof zl)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var Ppt=new d,P0e=new d;function L0e(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,c=s-r;return function(u){let f=n(u);if(u<=.5){let p=(f-o)/a;return D.lerp(e,-D.PI_OVER_TWO,p)}let h=(f-r)/c;return D.lerp(-D.PI_OVER_TWO,t,1-h)}}return function(o){return D.lerp(e,t,o)}}function JX(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!l(r)){let a=e.position,c=t,u=e.up,f=e.right,h=e.frustum,p=d.subtract(a,c,Ppt),g=d.magnitude(d.multiplyByScalar(u,d.dot(p,u),P0e)),m=d.magnitude(d.multiplyByScalar(f,d.dot(p,f),P0e));r=Math.min(vpt(h,g,m)*.2,1e9)}if(s<r){let u=-Math.pow((r-n)*1e6,.125),f=Math.pow((r-i)*1e6,1/8);return function(h){let p=h*(f-u)+u;return-Math.pow(p,8)/1e6+r}}return function(a){return D.lerp(n,i,a)}}function eQ(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 O0e=new d;function Rpt(e,t,n,i,o,r,s,a){let c=e.camera,u=d.clone(c.position,O0e),f=c.pitch,h=eQ(c.heading,i),p=eQ(c.roll,r),g=JX(c,n,u.z,n.z,s),m=L0e(f,o,g,a);function _(y){let C=y.time/t;c.setView({orientation:{heading:D.lerp(h,i,C),pitch:m(C),roll:D.lerp(p,r,C)}}),U.lerp(u,n,C,c.position),c.position.z=g(C)}return _}function Mpt(e,t){e.longitude<t.longitude?e.longitude+=D.TWO_PI:t.longitude+=D.TWO_PI}function Npt(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 Lpt=new me,Opt=new me;function Fpt(e,t,n,i,o,r,s,a,c,u){let f=e.camera,p=e.mapProjection.ellipsoid,g=me.clone(f.positionCartographic,Lpt),m=f.pitch,_=eQ(f.heading,i),y=eQ(f.roll,r),C=p.cartesianToCartographic(n,Opt);g.longitude=D.zeroToTwoPi(g.longitude),C.longitude=D.zeroToTwoPi(C.longitude);let E=!1;if(l(a)){let B=D.zeroToTwoPi(a),v=Math.min(g.longitude,C.longitude),P=Math.max(g.longitude,C.longitude),N=B>=v&&B<=P;if(l(c)){let L=Math.abs(g.longitude-C.longitude),A=D.TWO_PI-L;(N?L:A)<(N?A:L)*c&&!N&&(E=!0)}else N||(E=!0)}E?Mpt(g,C):Npt(g,C);let I=JX(f,n,g.height,C.height,s),b=L0e(m,o,I,u);function S(){let B=g.longitude,v=C.longitude,P=g.latitude,N=C.latitude;return function(A){let x=A.time/t,T=d.fromRadians(D.lerp(B,v,x),D.lerp(P,N,x),I(x),p);f.setView({destination:T,orientation:{heading:D.lerp(_,i,x),pitch:b(x),roll:D.lerp(y,r,x)}})}}return S()}function Qpt(e,t,n,i,o,r,s){let a=e.camera,c=d.clone(a.position,O0e),u=eQ(a.heading,i),f=a.frustum.right-a.frustum.left,h=JX(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 _=h(m),y=a.frustum,C=y.top/y.right,E=(_-(y.right-y.left))*.5;y.right+=E,y.left-=E,y.top=C*y.right,y.bottom=-y.top}return p}var R0e=new me,kpt=new d;function XX(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function M0e(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}N0e.createTween=function(e,t){t=t??V.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===oe.MORPHING)return XX();let o=t.convert??!0,r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,u=t.flyOverLongitudeWeight,f=t.pitchAdjustHeight,h=t.easingFunction;o&&i!==oe.SCENE3D&&(s.cartesianToCartographic(n,R0e),n=r.project(R0e,kpt));let p=e.camera,g=t.endTransform;l(g)&&p._setTransform(g);let m=t.duration;l(m)||(m=Math.ceil(d.distance(p.position,n)/1e6)+2,m=Math.min(m,3));let _=t.heading??0,y=t.pitch??-D.PI_OVER_TWO,C=t.roll??0,E=e.screenSpaceCameraController;E.enableInputs=!1;let I=M0e(E,t.complete),b=M0e(E,t.cancel),S=p.frustum,B=e.mode===oe.SCENE2D;if(B=B&&U.equalsEpsilon(p.position,n,D.EPSILON6),B=B&&D.equalsEpsilon(Math.max(S.right-S.left,S.top-S.bottom),n.z,D.EPSILON6),B=B||e.mode!==oe.SCENE2D&&d.equalsEpsilon(n,p.position,D.EPSILON10),B=B&&D.equalsEpsilon(D.negativePiToPi(_),D.negativePiToPi(p.heading),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(y),D.negativePiToPi(p.pitch),D.EPSILON10)&&D.equalsEpsilon(D.negativePiToPi(C),D.negativePiToPi(p.roll),D.EPSILON10),B)return XX(I,b);let v=new Array(4);if(v[oe.SCENE2D]=Qpt,v[oe.SCENE3D]=Fpt,v[oe.COLUMBUS_VIEW]=Rpt,m<=0)return XX(function(){v[i](e,1,n,_,y,C,a,c,u,f)({time:1}),typeof I=="function"&&I()},b);let P=v[i](e,m,n,_,y,C,a,c,u,f);if(!l(h)){let N=p.positionCartographic.height,L=i===oe.SCENE3D?s.cartesianToCartographic(n).height:n.z;N>L&&N>11500?h=fs.CUBIC_OUT:h=fs.QUINTIC_IN_OUT}return{duration:m,easingFunction:h,startObject:{time:0},stopObject:{time:m},update:P,complete:I,cancel:b}};var tQ=N0e;var Upt={ROTATE:0,INFINITE_SCROLL:1},wu=Object.freeze(Upt);function un(e){this._scene=e,this._transform=M.clone(M.IDENTITY),this._invTransform=M.clone(M.IDENTITY),this._actualTransform=M.clone(M.IDENTITY),this._actualInvTransform=M.clone(M.IDENTITY),this._transformChanged=!1,this.position=new d,this._position=new d,this._positionWC=new d,this._positionCartographic=new me,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new d,this._direction=new d,this._directionWC=new d,this.up=new d,this._up=new d,this._upWC=new d,this.right=new d,this._right=new d,this._rightWC=new d,this.frustum=new Fi,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 ge,this._moveEnd=new ge,this._changed=new ge,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 M,this._invViewMatrix=new M,H0e(this),this._mode=oe.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new me(Math.PI,D.PI_OVER_TWO)),this._max2Dfrustum=void 0,nIe(this,un.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=d.magnitude(this.position);n+=n*un.DEFAULT_VIEW_FACTOR,d.normalize(this.position,this.position),d.multiplyByScalar(this.position,n,this.position)}un.TRANSFORM_2D=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);un.TRANSFORM_2D_INVERSE=M.inverseTransformation(un.TRANSFORM_2D,new M);un.DEFAULT_VIEW_RECTANGLE=ae.fromDegrees(-95,-20,-70,90);un.DEFAULT_VIEW_FACTOR=.5;un.DEFAULT_OFFSET=new Ld(0,-D.PI_OVER_FOUR,0);function H0e(e){M.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),M.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),M.inverseTransformation(e._viewMatrix,e._invViewMatrix)}function Gpt(e){if(!l(e._oldPositionWC))e._oldPositionWC=d.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=d.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=d.magnitude(t),e._oldPositionWC=d.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Mi()):e.timeSinceMoved=Math.max(Mi()-e._lastMovedTimestamp,0)/1e3}}un.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==oe.SCENE2D};un.prototype._updateCameraChanged=function(){let e=this;if(Gpt(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 o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%D.TWO_PI;s=s>D.PI?D.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===oe.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=d.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,g=e._changedPosition,m=e.frustum,_=e._changedFrustum,y=p.x+m.left,C=p.x+m.right,E=g.x+_.left,I=g.x+_.right,b=p.y+m.bottom,S=p.y+m.top,B=g.y+_.bottom,v=g.y+_.top,P=Math.max(y,E),N=Math.min(C,I),L=Math.max(b,B),A=Math.min(S,v),x;if(P>=N||L>=S)x=1;else{let T=_;y<E&&C>I&&b<B&&S>v&&(T=m),x=1-(N-P)*(A-L)/((T.right-T.left)*(T.top-T.bottom))}x>t&&(e._changed.raiseEvent(x),e._changedPosition=d.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=d.clone(e.positionWC,e._changedPosition),e._changedDirection=d.clone(e.directionWC,e._changedDirection);return}let c=D.acosClamped(d.dot(e.directionWC,e._changedDirection)),u;l(e.frustum.fovy)?u=c/(e.frustum.fovy*.5):u=c;let h=d.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(u>t||h>t)&&(e._changed.raiseEvent(Math.max(u,h)),e._changedPosition=d.clone(e.positionWC,e._changedPosition),e._changedDirection=d.clone(e.directionWC,e._changedDirection))};function zpt(e){Qt.basisTo2D(e._projection,e._transform,e._actualTransform)}var Vpt=new me,Hpt=new d,eH=new d,Wpt=new se,jpt=new se,Ypt=new se,qpt=new se,Kpt=new se;function Xpt(e){let t=e._projection,n=t.ellipsoid,i=M.getColumn(e._transform,3,Wpt),o=n.cartesianToCartographic(i,Vpt),r=t.project(o,Hpt),s=jpt;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=se.clone(se.UNIT_X,Kpt),c=se.add(M.getColumn(e._transform,0,eH),i,eH);n.cartesianToCartographic(c,o),t.project(o,r);let u=Ypt;u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,d.subtract(u,s,u),u.x=0;let f=qpt;if(d.magnitudeSquared(u)>D.EPSILON10)d.cross(a,u,f);else{let h=se.add(M.getColumn(e._transform,1,eH),i,eH);n.cartesianToCartographic(h,o),t.project(o,r),f.x=r.z,f.y=r.x,f.z=r.y,f.w=0,d.subtract(f,s,f),f.x=0,d.magnitudeSquared(f)<D.EPSILON10&&(se.clone(se.UNIT_Y,u),se.clone(se.UNIT_Z,f))}d.cross(f,a,u),d.normalize(u,u),d.cross(a,u,f),d.normalize(f,f),M.setColumn(e._actualTransform,0,u,e._actualTransform),M.setColumn(e._actualTransform,1,f,e._actualTransform),M.setColumn(e._actualTransform,2,a,e._actualTransform),M.setColumn(e._actualTransform,3,s,e._actualTransform)}var ZX=new d;function el(e){let t=e._mode,n=!1,i=0;t===oe.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!d.equals(o,e.position)||n;r&&(o=d.clone(e.position,e._position));let s=e._direction,a=!d.equals(s,e.direction);a&&(d.normalize(e.direction,e.direction),s=d.clone(e.direction,e._direction));let c=e._up,u=!d.equals(c,e.up);u&&(d.normalize(e.up,e.up),c=d.clone(e.up,e._up));let f=e._right,h=!d.equals(f,e.right);h&&(d.normalize(e.right,e.right),f=d.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(M.inverseTransformation(e._transform,e._invTransform),e._mode===oe.COLUMBUS_VIEW||e._mode===oe.SCENE2D?M.equals(M.IDENTITY,e._transform)?M.clone(un.TRANSFORM_2D,e._actualTransform):e._mode===oe.COLUMBUS_VIEW?zpt(e):Xpt(e):M.clone(e._transform,e._actualTransform),M.inverseTransformation(e._actualTransform,e._actualInvTransform),e._modeChanged=!1);let g=e._actualTransform;if(r||p)if(e._positionWC=M.multiplyByPoint(g,o,e._positionWC),t===oe.SCENE3D||t===oe.MORPHING)e._positionCartographic=e._projection.ellipsoid.cartesianToCartographic(e._positionWC,e._positionCartographic);else{let m=ZX;m.x=e._positionWC.y,m.y=e._positionWC.z,m.z=e._positionWC.x,t===oe.SCENE2D&&(m.z=i),e._projection.unproject(m,e._positionCartographic)}if(a||u||h){let m=d.dot(s,d.cross(c,f,ZX));if(Math.abs(1-m)>D.EPSILON2){let _=1/d.magnitudeSquared(c),y=d.dot(c,s)*_,C=d.multiplyByScalar(s,y,ZX);c=d.normalize(d.subtract(c,C,e._up),e._up),d.clone(c,e.up),f=d.cross(s,c,e._right),d.clone(f,e.right)}}(a||p)&&(e._directionWC=M.multiplyByPointAsVector(g,s,e._directionWC),d.normalize(e._directionWC,e._directionWC)),(u||p)&&(e._upWC=M.multiplyByPointAsVector(g,c,e._upWC),d.normalize(e._upWC,e._upWC)),(h||p)&&(e._rightWC=M.multiplyByPointAsVector(g,f,e._rightWC),d.normalize(e._rightWC,e._rightWC)),(r||a||u||h||p)&&H0e(e)}function W0e(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 j0e(e){return D.PI_OVER_TWO-D.acosClamped(e.z)}function Y0e(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 iH=new M,oH=new M;Object.defineProperties(un.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return el(this),this._invTransform}},viewMatrix:{get:function(){return el(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return el(this),this._invViewMatrix}},positionCartographic:{get:function(){return el(this),this._positionCartographic}},positionWC:{get:function(){return el(this),this._positionWC}},directionWC:{get:function(){return el(this),this._directionWC}},upWC:{get:function(){return el(this),this._upWC}},rightWC:{get:function(){return el(this),this._rightWC}},heading:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,iH),n=Qt.eastNorthUpToFixedFrame(this.positionWC,e,oH);this._setTransform(n);let i=W0e(this.direction,this.up);return this._setTransform(t),i}}},pitch:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,iH),n=Qt.eastNorthUpToFixedFrame(this.positionWC,e,oH);this._setTransform(n);let i=j0e(this.direction);return this._setTransform(t),i}}},roll:{get:function(){if(this._mode!==oe.MORPHING){let e=this._projection.ellipsoid,t=M.clone(this._transform,iH),n=Qt.eastNorthUpToFixedFrame(this.positionWC,e,oH);this._setTransform(n);let i=Y0e(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}}});un.prototype.update=function(e){let t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==oe.MORPHING,t=this._mode===oe.SCENE2D),t){let n=this._max2Dfrustum=this.frustum.clone(),i=2,o=n.top/n.right;n.right=this._maxCoord.x*i,n.left=-n.right,n.top=o*n.right,n.bottom=-n.top}this._mode===oe.SCENE2D&&J0e(this,this.position)};var Jpt=new d,Zpt=new d,$pt=new d;un.prototype._setTransform=function(e){let t=d.clone(this.positionWC,Jpt),n=d.clone(this.upWC,Zpt),i=d.clone(this.directionWC,$pt);M.clone(e,this._transform),this._transformChanged=!0,el(this);let o=this._actualInvTransform;M.multiplyByPoint(o,t,this.position),M.multiplyByPointAsVector(o,i,this.direction),M.multiplyByPointAsVector(o,n,this.up),d.cross(this.direction,this.up,this.right),el(this)};var eAt=new U,tAt=new xn,nAt=new d,iAt=new d;function q0e(e){if(!M.equals(M.IDENTITY,e.transform))return d.magnitude(e.position);let t=e._scene,n=t.globe,i=eAt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let o;if(l(n)){let a=e.getPickRay(i,tAt);o=n.pickWorldCoordinates(a,t,!0,nAt)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,iAt));let s;if(l(o)||l(r)){let a=l(r)?d.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?d.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}un.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof mn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=q0e(this)))};var rH=new d,iJ=new M,oAt=new M,oJ=new Fe,rJ=new X,K0e=new me;function rAt(e,t,n){let i=M.clone(e.transform,iJ),o=Qt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,oAt);e._setTransform(o),d.clone(d.ZERO,e.position),n.heading=n.heading-D.PI_OVER_TWO;let r=Fe.fromHeadingPitchRoll(n,oJ),s=X.fromQuaternion(r,rJ);X.getColumn(s,0,e.direction),X.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function sAt(e,t,n,i){let o=M.clone(e.transform,iJ);if(e._setTransform(M.IDENTITY),!d.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,K0e);t=a.project(c,rH)}d.clone(t,e.position)}n.heading=n.heading-D.PI_OVER_TWO;let r=Fe.fromHeadingPitchRoll(n,oJ),s=X.fromQuaternion(r,rJ);X.getColumn(s,0,e.direction),X.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function aAt(e,t,n,i){let o=M.clone(e.transform,iJ);if(e._setTransform(M.IDENTITY),!d.equals(t,e.positionWC)){if(i){let c=e._projection,u=c.ellipsoid.cartesianToCartographic(t,K0e);t=c.project(u,rH)}U.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let c=a.top/a.right;a.right=s,a.left=r,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===wu.ROTATE){n.heading=n.heading-D.PI_OVER_TWO,n.pitch=-D.PI_OVER_TWO,n.roll=0;let r=Fe.fromHeadingPitchRoll(n,oJ),s=X.fromQuaternion(r,rJ);X.getColumn(s,2,e.up),d.cross(e.direction,e.up,e.right)}e._setTransform(o)}var cAt=new d,lAt=new d,uAt=new d;function X0e(e,t,n,i){let o=d.clone(n.direction,cAt),r=d.clone(n.up,lAt);if(e._scene.mode===oe.SCENE3D){let a=e._projection.ellipsoid,c=Qt.eastNorthUpToFixedFrame(t,a,iH),u=M.inverseTransformation(c,oH);M.multiplyByPointAsVector(u,o,o),M.multiplyByPointAsVector(u,r,r)}let s=d.cross(o,r,uAt);return i.heading=W0e(o,r),i.pitch=j0e(o),i.roll=Y0e(o,r,s),i}var nJ={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},uw=new ic;un.prototype.setView=function(e){e=e??V.EMPTY_OBJECT;let t=e.orientation??V.EMPTY_OBJECT,n=this._mode;if(n===oe.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=e.convert??!0,o=e.destination??d.clone(this.positionWC,rH);l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,rH),i=!1),l(t.direction)&&(t=X0e(this,o,t,nJ.orientation)),uw.heading=t.heading??0,uw.pitch=t.pitch??-D.PI_OVER_TWO,uw.roll=t.roll??0,n===oe.SCENE3D?rAt(this,o,uw):n===oe.SCENE2D?aAt(this,o,uw,i):sAt(this,o,uw,i)};var fAt=new d;un.prototype.flyHome=function(e){let t=this._mode;if(t===oe.MORPHING&&this._scene.completeMorph(),t===oe.SCENE2D)this.flyTo({destination:un.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:M.IDENTITY});else if(t===oe.SCENE3D){let n=this.getRectangleCameraCoordinates(un.DEFAULT_VIEW_RECTANGLE),i=d.magnitude(n);i+=i*un.DEFAULT_VIEW_FACTOR,d.normalize(n,n),d.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:M.IDENTITY})}else if(t===oe.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new d(0,-1,1);i=d.multiplyByScalar(d.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(d.normalize(i,fAt).z),roll:0},endTransform:M.IDENTITY,convert:!1})}};un.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),el(this),M.multiplyByVector(this._actualInvTransform,e,t)};un.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new d),el(this),M.multiplyByPoint(this._actualInvTransform,e,t)};un.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new d),el(this),M.multiplyByPointAsVector(this._actualInvTransform,e,t)};un.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),el(this),M.multiplyByVector(this._actualTransform,e,t)};un.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new d),el(this),M.multiplyByPoint(this._actualTransform,e,t)};un.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new d),el(this),M.multiplyByPointAsVector(this._actualTransform,e,t)};function J0e(e,t){let n=e._scene.mapMode2D===wu.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var F0e=new d;un.prototype.move=function(e,t){let n=this.position;d.multiplyByScalar(e,t,F0e),d.add(n,F0e,n),this._mode===oe.SCENE2D&&J0e(this,n),this._adjustOrthographicFrustum(!0)};un.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===oe.SCENE2D?sH(this,e):this.move(this.direction,e)};un.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===oe.SCENE2D?sH(this,-e):this.move(this.direction,-e)};un.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};un.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};un.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};un.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};un.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==oe.SCENE2D&&this.look(this.up,-e)};un.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==oe.SCENE2D&&this.look(this.up,e)};un.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==oe.SCENE2D&&this.look(this.right,-e)};un.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==oe.SCENE2D&&this.look(this.right,e)};var dAt=new Fe,hAt=new X;un.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Fe.fromAxisAngle(e,-n,dAt),o=X.fromQuaternion(i,hAt),r=this.direction,s=this.up,a=this.right;X.multiplyByVector(o,r,r),X.multiplyByVector(o,s,s),X.multiplyByVector(o,a,a)};un.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};un.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var mAt=new Fe,pAt=new X;un.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Fe.fromAxisAngle(e,-n,mAt),o=X.fromQuaternion(i,pAt);X.multiplyByVector(o,this.position,this.position),X.multiplyByVector(o,this.direction,this.direction),X.multiplyByVector(o,this.up,this.up),d.cross(this.direction,this.up,this.right),d.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};un.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,Z0e(this,e)};un.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,Z0e(this,-e)};var AAt=new d,gAt=new d,_At=new d,Q0e=new d;function Z0e(e,t){let n=e.position;if(l(e.constrainedAxis)&&!d.equalsEpsilon(e.position,d.ZERO,D.EPSILON2)){let i=d.normalize(n,AAt),o=d.equalsEpsilon(i,e.constrainedAxis,D.EPSILON2),r=d.equalsEpsilon(i,d.negate(e.constrainedAxis,Q0e),D.EPSILON2);if(!o&&!r){let s=d.normalize(e.constrainedAxis,gAt),a=d.dot(i,s),c=D.acosClamped(a);t>0&&t>c&&(t=c-D.EPSILON4),a=d.dot(i,d.negate(s,Q0e)),c=D.acosClamped(a),t<0&&-t>c&&(t=-c+D.EPSILON4);let u=d.cross(s,i,_At);e.rotate(u,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}un.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,$0e(this,-e)};un.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,$0e(this,e)};function $0e(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function sH(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 o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===wu.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===wu.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function eIe(e,t){e.move(e.direction,t)}un.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===oe.SCENE2D?sH(this,e):eIe(this,e)};un.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===oe.SCENE2D?sH(this,-e):eIe(this,-e)};un.prototype.getMagnitude=function(){if(this._mode===oe.SCENE3D)return d.magnitude(this.position);if(this._mode===oe.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===oe.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var yAt=new M;un.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??ne.default,o=Qt.eastNorthUpToFixedFrame(e,i,yAt);this.lookAtTransform(o,t)};var CAt=new d,EAt=new Fe,IAt=new Fe,xAt=new X;function tIe(e,t,n){t=D.clamp(t,-D.PI_OVER_TWO,D.PI_OVER_TWO),e=D.zeroToTwoPi(e)-D.PI_OVER_TWO;let i=Fe.fromAxisAngle(d.UNIT_Y,-t,EAt),o=Fe.fromAxisAngle(d.UNIT_Z,-e,IAt),r=Fe.multiply(o,i,o),s=X.fromQuaternion(r,xAt),a=d.clone(d.UNIT_X,CAt);return X.multiplyByVector(s,a,a),d.negate(a,a),d.multiplyByScalar(a,n,a),a}un.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=tIe(t.heading,t.pitch,t.range):n=t,this._mode===oe.SCENE2D){U.clone(U.ZERO,this.position),d.negate(n,this.up),this.up.z=0,d.magnitudeSquared(this.up)<D.EPSILON10&&d.clone(d.UNIT_Y,this.up),d.normalize(this.up,this.up),this._setTransform(M.IDENTITY),d.negate(d.UNIT_Z,this.direction),d.cross(this.direction,this.up,this.right),d.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=d.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}d.clone(n,this.position),d.negate(this.position,this.direction),d.normalize(this.direction,this.direction),d.cross(this.direction,d.UNIT_Z,this.right),d.magnitudeSquared(this.right)<D.EPSILON10&&d.clone(d.UNIT_X,this.right),d.normalize(this.right,this.right),d.cross(this.right,this.direction,this.up),d.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var nQ=new me,bAt=new me,TAt=new d,SAt=new d,wAt=new d,BAt=new d,DAt=new d,vAt=new d,PAt=new d,$X=new d,RAt={direction:new d,right:new d,up:new d},k0e;function $c(e,t,n,i){return Math.abs(d.dot(t,n))/i-d.dot(e,n)}function nIe(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:RAt,{north:s,south:a,west:c}=t,{east:u}=t;c>u&&(u+=D.TWO_PI);let f=(c+u)*.5,h;if(a<-D.PI_OVER_TWO+D.RADIANS_PER_DEGREE&&s>D.PI_OVER_TWO-D.RADIANS_PER_DEGREE)h=0;else{let N=nQ;N.longitude=f,N.latitude=s,N.height=0;let L=bAt;L.longitude=f,L.latitude=a,L.height=0;let A=k0e;(!l(A)||A.ellipsoid!==o)&&(k0e=A=new mA(void 0,void 0,o)),A.setEndPoints(N,L),h=A.interpolateUsingFraction(.5,nQ).latitude}let p=nQ;p.longitude=f,p.latitude=h,p.height=0;let g=o.cartographicToCartesian(p,PAt),m=nQ;m.longitude=u,m.latitude=s;let _=o.cartographicToCartesian(m,TAt);m.longitude=c;let y=o.cartographicToCartesian(m,wAt);m.longitude=f;let C=o.cartographicToCartesian(m,DAt);m.latitude=a;let E=o.cartographicToCartesian(m,vAt);m.longitude=u;let I=o.cartographicToCartesian(m,BAt);m.longitude=c;let b=o.cartographicToCartesian(m,SAt);d.subtract(y,g,y),d.subtract(I,g,I),d.subtract(_,g,_),d.subtract(b,g,b),d.subtract(C,g,C),d.subtract(E,g,E);let S=o.geodeticSurfaceNormal(g,r.direction);d.negate(S,S);let B=d.cross(S,d.UNIT_Z,r.right);d.normalize(B,B);let v=d.cross(B,S,r.up),P;if(e.frustum instanceof mn){let N=Math.max(d.distance(_,y),d.distance(I,b)),L=Math.max(d.distance(_,I),d.distance(y,b)),A,x,T=e.frustum._offCenterFrustum,w=T.right/T.top,R=L*w;N>R?(A=N,x=A/w):(x=L,A=R),P=Math.max(A,x)}else{let N=Math.tan(e.frustum.fovy*.5),L=e.frustum.aspectRatio*N;if(P=Math.max($c(S,v,y,N),$c(S,v,I,N),$c(S,v,_,N),$c(S,v,b,N),$c(S,v,C,N),$c(S,v,E,N),$c(S,B,y,L),$c(S,B,I,L),$c(S,B,_,L),$c(S,B,b,L),$c(S,B,C,L),$c(S,B,E,L)),a<0&&s>0){let A=nQ;A.longitude=c,A.latitude=0,A.height=0;let x=o.cartographicToCartesian(A,$X);d.subtract(x,g,x),P=Math.max(P,$c(S,v,x,N),$c(S,B,x,L)),A.longitude=u,x=o.cartographicToCartesian(A,$X),d.subtract(x,g,x),P=Math.max(P,$c(S,v,x,N),$c(S,B,x,L))}}return d.add(g,d.multiplyByScalar(S,-P,$X),n)}var MAt=new me,NAt=new d,LAt=new d;function OAt(e,t,n){let i=e._projection;t.west>t.east&&(t=ae.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=MAt;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,NAt);M.multiplyByPoint(o,a,a),M.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,LAt);if(M.multiplyByPoint(o,c,c),M.multiplyByPoint(r,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 FAt=new me,QAt=new d,kAt=new d;function UAt(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===wu.INFINITE_SCROLL?o+=D.TWO_PI:(t=ae.MAX_VALUE,o=t.east));let r=FAt;r.longitude=o,r.latitude=t.north;let s=i.project(r,QAt);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,kAt),c=Math.abs(s.x-a.x)*.5,u=Math.abs(s.y-a.y)*.5,f,h,p=e.frustum.right/e.frustum.top,g=u*p;return c>g?(f=c,h=f/p):(h=u,f=g),u=Math.max(2*f,2*h),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=u,n=i.project(r,n),n}un.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new d),n===oe.SCENE3D)return nIe(this,e,t);if(n===oe.COLUMBUS_VIEW)return OAt(this,e,t);if(n===oe.SCENE2D)return UAt(this,e,t)};var GAt=new xn;function zAt(e,t,n,i){n=n??ne.default;let o=e.getPickRay(t,GAt),r=fi.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return xn.getPoint(o,s,i)}var VAt=new xn;function HAt(e,t,n,i){let r=e.getPickRay(t,VAt).origin;r=d.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-D.PI_OVER_TWO||s.latitude>D.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var WAt=new xn;function jAt(e,t,n,i){let o=e.getPickRay(t,WAt),r=-o.origin.x/o.direction.x;xn.getPoint(o,r,i);let s=n.unproject(new d(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)}un.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new d),t=t??ne.default,this._mode===oe.SCENE3D)n=zAt(this,e,t,n);else if(this._mode===oe.SCENE2D)n=HAt(this,e,this._projection,n);else if(this._mode===oe.COLUMBUS_VIEW)n=jAt(this,e,this._projection,n);else return;return n}};var YAt=new d,qAt=new d,KAt=new d;function XAt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,u=2/o*t.x-1,f=2/r*(r-t.y)-1,h=e.positionWC;d.clone(h,n.origin);let p=d.multiplyByScalar(e.directionWC,c,YAt);d.add(h,p,p);let g=d.multiplyByScalar(e.rightWC,u*c*a,qAt),m=d.multiplyByScalar(e.upWC,f*c*s,KAt),_=d.add(p,g,n.direction);return d.add(_,m,_),d.subtract(_,h,_),d.normalize(_,_),n}var tH=new d;function JAt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/o*t.x-1;c*=(s.right-s.left)*.5;let u=2/r*(r-t.y)-1;u*=(s.top-s.bottom)*.5;let f=n.origin;return d.clone(e.positionWC,f),d.multiplyByScalar(e.rightWC,c,tH),d.add(tH,f,f),d.multiplyByScalar(e.upWC,u,tH),d.add(tH,f,f),d.clone(e.directionWC,n.direction),n}un.prototype.getPickRay=function(e,t){l(t)||(t=new xn);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)?XAt(this,e,t):JAt(this,e,t)};var ZAt=new d,$At=new d;un.prototype.distanceToBoundingSphere=function(e){let t=d.subtract(this.positionWC,e.center,ZAt),n=d.multiplyByScalar(this.directionWC,d.dot(t,this.directionWC),$At);return Math.max(0,d.magnitude(n)-e.radius)};var egt=new U;un.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,egt);return Math.max(o.x,o.y)};function tgt(e,t,n,i,o,r){let s=d.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(c){let u=d.lerp(t,s,c.time,new d);e.worldToCameraCoordinatesPoint(u,e.position)}return{easingFunction:fs.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var ngt=new d,U0e=new d,igt=new d,ogt=new d;function rgt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(d.UNIT_X,ngt),r=-d.dot(o,n)/d.dot(o,i),s=d.add(n,d.multiplyByScalar(i,r,U0e),U0e);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,igt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,u=d.magnitude(d.subtract(n,s,ogt)),f=c*u,h=a*u,p=e._maxCoord.x,g=e._maxCoord.y,m=Math.max(f-p,p),_=Math.max(h-g,g);if(n.z<-m||n.z>m||n.y<-_||n.y>_){let y=s.y<-m||s.y>m,C=s.z<-_||s.z>_;if(y||C)return tgt(e,n,s,m,_,t)}}un.prototype.createCorrectPositionTween=function(e){if(this._mode===oe.COLUMBUS_VIEW)return rgt(this,e)};var sgt=new d,Ta={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};un.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};un.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=Ta.destination,e.orientation.heading=Ta.heading,e.orientation.pitch=Ta.pitch,e.orientation.roll=Ta.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};un.prototype.flyTo=function(e){e=e??V.EMPTY_OBJECT;let t=e.destination;if(this._mode===oe.MORPHING)return;this.cancelFlight();let i=t instanceof ae;i&&(t=this.getRectangleCameraCoordinates(t,sgt));let o=e.orientation??V.EMPTY_OBJECT;if(l(o.direction)&&(o=X0e(this,t,o,nJ.orientation)),l(e.duration)&&e.duration<=0){let f=nJ;f.destination=e.destination,f.orientation.heading=o.heading,f.orientation.pitch=o.pitch,f.orientation.roll=o.roll,f.convert=e.convert,f.endTransform=e.endTransform,this.setView(f),typeof e.complete=="function"&&e.complete();return}let r=this,s;Ta.destination=t,Ta.heading=o.heading,Ta.pitch=o.pitch,Ta.roll=o.roll,Ta.duration=e.duration,Ta.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Ta.cancel=e.cancel,Ta.endTransform=e.endTransform,Ta.convert=i?!1:e.convert,Ta.maximumHeight=e.maximumHeight,Ta.pitchAdjustHeight=e.pitchAdjustHeight,Ta.flyOverLongitude=e.flyOverLongitude,Ta.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Ta.easingFunction=e.easingFunction;let a=this._scene,c=tQ.createTween(a,Ta);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!==oe.SCENE2D&&(l(u)||(u=un.clone(this)),u.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=u.frustum.computeCullingVolume(u.positionWC,u.directionWC,u.upWC))};function agt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function cgt(e,t){let n=e.frustum,i=n.offCenterFrustum;l(i)&&(n=i);let o,r,s=n.right/n.top,a=t*s;return t>a?(o=t,r=o/s):(r=t,o=a),Math.max(o,r)*1.5}var lgt=100;function iIe(e,t,n){n=Ld.clone(l(n)?n:un.DEFAULT_OFFSET);let i=e._scene.screenSpaceCameraController.minimumZoomDistance,o=e._scene.screenSpaceCameraController.maximumZoomDistance,r=n.range;if(!l(r)||r===0){let s=t.radius;s===0?n.range=lgt:e.frustum instanceof mn||e._mode===oe.SCENE2D?n.range=cgt(e,s):n.range=agt(e,s),n.range=D.clamp(n.range,i,o)}return n}un.prototype.viewBoundingSphere=function(e,t){t=iIe(this,e,t),this.lookAt(e.center,t)};var ugt=new M,fgt=new d,dgt=new d,hgt=new d,mgt=new d,pgt=new se,Agt=new Fe,ggt=new X;un.prototype.flyToBoundingSphere=function(e,t){t=t??V.EMPTY_OBJECT;let n=this._mode===oe.SCENE2D||this._mode===oe.COLUMBUS_VIEW;this._setTransform(M.IDENTITY);let i=iIe(this,e,t.offset),o;n?o=d.multiplyByScalar(d.UNIT_Z,i.range,fgt):o=tIe(i.heading,i.pitch,i.range);let s=this._scene.ellipsoid??ne.default,a=Qt.eastNorthUpToFixedFrame(e.center,s,ugt);M.multiplyByPoint(a,o,o);let c,u;if(!n){if(c=d.subtract(e.center,o,dgt),d.normalize(c,c),u=M.multiplyByPointAsVector(a,d.UNIT_Z,hgt),1-Math.abs(d.dot(c,u))<D.EPSILON6){let h=Fe.fromAxisAngle(c,i.heading,Agt),p=X.fromQuaternion(h,ggt);d.fromCartesian4(M.getColumn(a,1,pgt),u),X.multiplyByVector(p,u,u)}let f=d.cross(c,u,mgt);d.cross(f,c,u),d.normalize(u,u)}this.flyTo({destination:o,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 G0e=new d,z0e=new d,eJ=new d,V0e=new d,iQ=[new d,new d,new d,new d];function _gt(e,t){let n=t.radii,i=e.positionWC,o=d.multiplyComponents(t.oneOverRadii,i,G0e),r=d.magnitude(o),s=d.normalize(o,z0e),a,c;d.equalsEpsilon(s,d.UNIT_Z,D.EPSILON10)?(a=new d(0,1,0),c=new d(0,0,1)):(a=d.normalize(d.cross(d.UNIT_Z,s,eJ),eJ),c=d.normalize(d.cross(s,a,V0e),V0e));let u=Math.sqrt(d.magnitudeSquared(o)-1),f=d.multiplyByScalar(s,1/r,G0e),h=u/r,p=d.multiplyByScalar(a,h,z0e),g=d.multiplyByScalar(c,h,eJ),m=d.add(f,g,iQ[0]);d.subtract(m,p,m),d.multiplyComponents(n,m,m);let _=d.subtract(f,g,iQ[1]);d.subtract(_,p,_),d.multiplyComponents(n,_,_);let y=d.subtract(f,g,iQ[2]);d.add(y,p,y),d.multiplyComponents(n,y,y);let C=d.add(f,g,iQ[3]);return d.add(C,p,C),d.multiplyComponents(n,C,C),iQ}var tJ=new U,ygt=new d,cC=[new me,new me,new me,new me];function nH(e,t,n,i,o,r){tJ.x=e,tJ.y=t;let s=i.pickEllipsoid(tJ,o,ygt);return l(s)?(cC[n]=o.cartesianToCartographic(s,cC[n]),1):(cC[n]=o.cartesianToCartographic(r[n],cC[n]),0)}un.prototype.computeViewRectangle=function(e,t){e=e??ne.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new le(d.ZERO,e.maximumRadius);if(n.computeVisibility(i)===tn.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,u=_gt(this,e);if(c+=nH(0,0,0,this,e,u),c+=nH(0,a,1,this,e,u),c+=nH(s,a,2,this,e,u),c+=nH(s,0,3,this,e,u),c<2)return ae.MAX_VALUE;t=ae.fromCartographicArray(cC,t);let f=0,h=cC[3].longitude;for(let p=0;p<4;++p){let g=cC[p].longitude,m=Math.abs(g-h);m>D.PI?f+=D.TWO_PI-m:f+=m,h=g}return D.equalsEpsilon(Math.abs(f),D.TWO_PI,D.EPSILON9)&&(t.west=-D.PI,t.east=D.PI,cC[0].latitude>=0?t.north=D.PI_OVER_TWO:t.south=-D.PI_OVER_TWO),t};un.prototype.switchToPerspectiveFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof Fi)return;let e=this._scene;this.frustum=new Fi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=D.toRadians(60)};un.prototype.switchToOrthographicFrustum=function(){if(this._mode===oe.SCENE2D||this.frustum instanceof mn)return;let e=q0e(this),t=this._scene;this.frustum=new mn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};un.clone=function(e,t){return l(t)||(t=new un(e._scene)),d.clone(e.position,t.position),d.clone(e.direction,t.direction),d.clone(e.up,t.up),d.clone(e.right,t.right),M.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var _o=un;function Cgt(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var Hd=Cgt;var cIe=br(Ou(),1),oIe=576,Egt=100,oQ="#ffffff",aH="#48b";function lIe(e,t){this.credit=e,this.count=t??1}function Igt(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(Bt.equals(o,t))return!0}return!1}function xgt(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;Bt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var uIe="cesium-credit-delimiter";function rIe(e){let t=document.createElement("span");return t.textContent=e,t.className=uIe,t}function sIe(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function aIe(e,t,n,i){let o=e.childNodes,r=-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(r=s,l(n)&&(r*=2,s>0)){let u=r-1;if(o.length<=u)e.appendChild(rIe(n));else{let f=o[u];f.className!==uIe&&e.replaceChild(rIe(n),f)}}let c=a.element;if(o.length<=r)e.appendChild(sIe(c,i));else{let u=o[r];u._creditId!==a._id&&e.replaceChild(sIe(c,i),u)}}}for(++r;r<o.length;)e.removeChild(o[r])}function bgt(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<oIe?(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>=oIe&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function Tgt(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: ${oQ}; position: relative; min-height: ${Egt}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: ${oQ}; } .cesium-credit-lightbox > ul > li a:hover { color: ${aH}; } .cesium-credit-lightbox.cesium-credit-lightbox-expanded { border: 1px solid #444; border-radius: 5px; max-width: 370px; } .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: ${oQ}; } .cesium-credit-lightbox-close:hover { color: ${aH}; } .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: ${oQ}; } .cesium-credit-expand-link:hover { color: ${aH}; } .cesium-credit-text { color: ${oQ}; } .cesium-credit-delimiter { padding: 0 5px; } .cesium-credit-textContainer *, .cesium-credit-logoContainer * { display: inline; } .cesium-credit-textContainer a:hover { color: ${aH} } .cesium-credit-textContainer .cesium-credit-wrapper:first-of-type { padding-left: 5px; } `;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=n(e)??document.head,o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function Mr(e,t,n){let i=this;n=n??document.body;let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(m){r.contains(m.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="×",c.className="cesium-credit-lightbox-close",r.appendChild(c);let u=document.createElement("ul");r.appendChild(u);let f=document.createElement("div");f.className="cesium-credit-logoContainer",f.style.display="inline",e.appendChild(f);let h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),Tgt(e);let g=Bt.clone(Mr.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=h,this._cesiumCreditContainer=f,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=u,this._lightbox=o,this._hideLightbox=s,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=g,this._previousCesiumCredit=void 0,this._currentCesiumCredit=g,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new Pt,lightboxCredits:new Pt},this._defaultCredit=void 0,this.viewport=n,this.container=e}function fIe(e,t,n,i){i=i??1;let o=t.get(n.id);if(l(o))o.count<Number.MAX_VALUE&&(o.count+=i);else{let r=e._creditDisplayElementPool,s=e._creditDisplayElementPoolIndex;s<r.length?(o=r[s],o.credit=n,o.count=i):(o=new lIe(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}Mr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=Bt.clone(dIe())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,fIe(this,t,e)};Mr.prototype.addStaticCredit=function(e){let t=this._staticCredits;Igt(t,e)||t.push(e)};Mr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};Mr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};Mr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};Mr.prototype.update=function(){this._expanded&&bgt(this)};Mr.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 o=0;o<i.length;++o){let r=i[o],s=r.showOnScreen?t:n;r.isIon()&&Bt.equals(Mr.cesiumCredit,this._cesiumCredit)||fIe(this,s,r,Number.MAX_VALUE)}Bt.equals(Mr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=Bt.clone(Mr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};Mr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;aIe(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",aIe(this._creditList,t,void 0,"li"),xgt(this)};Mr.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),ue(this)};Mr.prototype.isDestroyed=function(){return!1};Mr._cesiumCredit=void 0;Mr._cesiumCreditInitialized=!1;var cH;function dIe(){if(!l(cH)){let e=fn("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new cIe.default(e).path()),cH=new Bt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return Mr._cesiumCreditInitialized||(Mr._cesiumCredit=cH,Mr._cesiumCreditInitialized=!0),cH}Object.defineProperties(Mr,{cesiumCredit:{get:function(){return dIe(),Mr._cesiumCredit},set:function(e){Mr._cesiumCredit=e,Mr._cesiumCreditInitialized=!0}}});Mr.CreditDisplayElement=lIe;var rQ=Mr;var lH=0,Sgt=1;function vI(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e.vertexFormat??Re.DEFAULT,r=e._drawNearPlane??!0,s,a;t instanceof Fi?(s=lH,a=Fi.packedLength):t instanceof mn&&(s=Sgt,a=mn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=d.clone(i),this._orientation=Fe.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+d.packedLength+Fe.packedLength+Re.packedLength}vI.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===lH?(Fi.pack(o,t,n),n+=Fi.packedLength):(mn.pack(o,t,n),n+=mn.packedLength),d.pack(e._origin,t,n),n+=d.packedLength,Fe.pack(e._orientation,t,n),n+=Fe.packedLength,Re.pack(e._vertexFormat,t,n),n+=Re.packedLength,t[n]=e._drawNearPlane?1:0,t};var wgt=new Fi,Bgt=new mn,Dgt=new Fe,vgt=new d,Pgt=new Re;vI.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===lH?(o=Fi.unpack(e,t,wgt),t+=Fi.packedLength):(o=mn.unpack(e,t,Bgt),t+=mn.packedLength);let r=d.unpack(e,t,vgt);t+=d.packedLength;let s=Fe.unpack(e,t,Dgt);t+=Fe.packedLength;let a=Re.unpack(e,t,Pgt);t+=Re.packedLength;let c=e[t]===1;if(!l(n))return new vI({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=d.clone(r,n._origin),n._orientation=Fe.clone(s,n._orientation),n._vertexFormat=Re.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function fw(e,t,n,i,o,r,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.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;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var Rgt=new X,Mgt=new M,sJ=new M,hIe=new d,mIe=new d,pIe=new d,Ngt=new d,Lgt=new d,Ogt=new d,lC=new Array(3),sQ=new Array(4);sQ[0]=new se(-1,-1,1,1);sQ[1]=new se(1,-1,1,1);sQ[2]=new se(1,1,1,1);sQ[3]=new se(-1,1,1,1);var AIe=new Array(4);for(let e=0;e<4;++e)AIe[e]=new se;vI._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=X.fromQuaternion(t,Rgt),u=r??hIe,f=s??mIe,h=a??pIe;u=X.getColumn(c,0,u),f=X.getColumn(c,1,f),h=X.getColumn(c,2,h),d.normalize(u,u),d.normalize(f,f),d.normalize(h,h),d.negate(u,u);let p=M.computeView(e,h,f,u,Mgt),g,m,_=i.projectionMatrix;if(n===lH){let y=M.multiply(_,p,sJ);m=M.inverse(y,sJ)}else g=M.inverseTransformation(p,sJ);l(m)?(lC[0]=i.near,lC[1]=i.far):(lC[0]=0,lC[1]=i.near,lC[2]=i.far);for(let y=0;y<2;++y)for(let C=0;C<4;++C){let E=se.clone(sQ[C],AIe[C]);if(l(m)){E=M.multiplyByVector(m,E,E);let I=1/E.w;d.multiplyByScalar(E,I,E),d.subtract(E,e,E),d.normalize(E,E);let b=d.dot(h,E);d.multiplyByScalar(E,lC[y]/b,E),d.add(E,e,E)}else{let I=i.offCenterFrustum;l(I)&&(i=I);let b=lC[y],S=lC[y+1];E.x=(E.x*(i.right-i.left)+i.left+i.right)*.5,E.y=(E.y*(i.top-i.bottom)+i.bottom+i.top)*.5,E.z=(E.z*(b-S)-b-S)*.5,E.w=1,M.multiplyByVector(g,E,E)}o[12*y+C*3]=E.x,o[12*y+C*3+1]=E.y,o[12*y+C*3+2]=E.z}};vI.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);vI._computeNearFarPlanes(i,o,t,n,c);let u=3*4*2;c[u]=c[3*4],c[u+1]=c[3*4+1],c[u+2]=c[3*4+2],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[3*3],c[u+7]=c[3*3+1],c[u+8]=c[3*3+2],c[u+9]=c[3*7],c[u+10]=c[3*7+1],c[u+11]=c[3*7+2],u+=3*4,c[u]=c[3*5],c[u+1]=c[3*5+1],c[u+2]=c[3*5+2],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[3*4],c[u+10]=c[3*4+1],c[u+11]=c[3*4+2],u+=3*4,c[u]=c[3],c[u+1]=c[4],c[u+2]=c[5],c[u+3]=c[3*5],c[u+4]=c[3*5+1],c[u+5]=c[3*5+2],c[u+6]=c[3*6],c[u+7]=c[3*6+1],c[u+8]=c[3*6+2],c[u+9]=c[3*2],c[u+10]=c[3*2+1],c[u+11]=c[3*2+2],u+=3*4,c[u]=c[3*2],c[u+1]=c[3*2+1],c[u+2]=c[3*2+2],c[u+3]=c[3*6],c[u+4]=c[3*6+1],c[u+5]=c[3*6+2],c[u+6]=c[3*7],c[u+7]=c[3*7+1],c[u+8]=c[3*7+2],c[u+9]=c[3*3],c[u+10]=c[3*3+1],c[u+11]=c[3*3+2],r||(c=c.subarray(3*4));let f=new Cn({position:new De({componentDatatype:q.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(3*4*a):void 0,m=l(s.bitangent)?new Float32Array(3*4*a):void 0,_=l(s.st)?new Float32Array(2*4*a):void 0,y=hIe,C=mIe,E=pIe,I=d.negate(y,Ngt),b=d.negate(C,Lgt),S=d.negate(E,Ogt);u=0,r&&(fw(u,p,g,m,_,S,y,C),u+=3*4),fw(u,p,g,m,_,E,I,C),u+=3*4,fw(u,p,g,m,_,I,S,C),u+=3*4,fw(u,p,g,m,_,b,S,I),u+=3*4,fw(u,p,g,m,_,y,E,C),u+=3*4,fw(u,p,g,m,_,C,E,I),l(p)&&(f.normal=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:p})),l(g)&&(f.tangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:g})),l(m)&&(f.bitangent=new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:m})),l(_)&&(f.st=new De({componentDatatype:q.FLOAT,componentsPerAttribute:2,values:_}))}let h=new Uint16Array(6*a);for(let p=0;p<a;++p){let g=p*6,m=p*4;h[g]=m,h[g+1]=m+1,h[g+2]=m+2,h[g+3]=m,h[g+4]=m+2,h[g+5]=m+3}return new ht({attributes:f,indices:h,primitiveType:Ne.TRIANGLES,boundingSphere:le.fromVertices(c)})};var PI=vI;var aJ=0,Fgt=1;function aQ(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e._drawNearPlane??!0,r,s;t instanceof Fi?(r=aJ,s=Fi.packedLength):t instanceof mn&&(r=Fgt,s=mn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=d.clone(i),this._orientation=Fe.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+d.packedLength+Fe.packedLength}aQ.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===aJ?(Fi.pack(o,t,n),n+=Fi.packedLength):(mn.pack(o,t,n),n+=mn.packedLength),d.pack(e._origin,t,n),n+=d.packedLength,Fe.pack(e._orientation,t,n),n+=Fe.packedLength,t[n]=e._drawNearPlane?1:0,t};var Qgt=new Fi,kgt=new mn,Ugt=new Fe,Ggt=new d;aQ.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===aJ?(o=Fi.unpack(e,t,Qgt),t+=Fi.packedLength):(o=mn.unpack(e,t,kgt),t+=mn.packedLength);let r=d.unpack(e,t,Ggt);t+=d.packedLength;let s=Fe.unpack(e,t,Ugt);t+=Fe.packedLength;let a=e[t]===1;if(!l(n))return new aQ({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=d.clone(r,n._origin),n._orientation=Fe.clone(s,n._orientation),n._drawNearPlane=a,n};aQ.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);PI._computeNearFarPlanes(i,o,t,n,s);let a=new Cn({position:new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=r?2:1,h=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,h[c]=u,h[c+1]=u+1,h[c+2]=u+1,h[c+3]=u+2,h[c+4]=u+2,h[c+5]=u+3,h[c+6]=u+3,h[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,h[c]=u,h[c+1]=u+4,h[c+2]=u+1,h[c+3]=u+5,h[c+4]=u+2,h[c+5]=u+6,h[c+6]=u+3,h[c+7]=u+7;return new ht({attributes:a,indices:h,primitiveType:Ne.LINES,boundingSphere:le.fromVertices(s)})};var cQ=aQ;function uH(e){e=e??V.EMPTY_OBJECT,this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=e.color??G.CYAN,this._updateOnChange=e.updateOnChange??!0,this.show=e.show??!0,this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var zgt=new d,Vgt=new X,Hgt=new Fe,Wgt=new Fi,jgt=new zl,Ygt=new mn,qgt=new Jr,Kgt=new G,Xgt=[1,1e5];uH.prototype.update=function(e){if(!this.show)return;let t=this._planesPrimitives,n=this._outlinePrimitives,i,o;if(this._updateOnChange){for(o=t.length,i=0;i<o;++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 r=this._camera,s=r.frustum,a;s instanceof Fi?a=Wgt:s instanceof zl?a=jgt:s instanceof mn?a=Ygt:a=qgt,a=s.clone(a);let c,u=this._frustumSplits;!l(u)||u.length<=1?(u=Xgt,u[0]=this._camera.frustum.near,u[1]=this._camera.frustum.far,c=1):c=u.length-1;let f=r.positionWC,h=r.directionWC,p=r.upWC,g=r.rightWC;g=d.negate(g,zgt);let m=Vgt;X.setColumn(m,0,g,m),X.setColumn(m,1,p,m),X.setColumn(m,2,h,m);let _=Fe.fromRotationMatrix(m,Hgt);for(t.length=n.length=c,i=0;i<c;++i)a.near=u[i],a.far=u[i+1],t[i]=new kn({geometryInstances:new Rt({geometry:new PI({origin:f,orientation:_,frustum:a,_drawNearPlane:i===0}),attributes:{color:en.fromColor(G.fromAlpha(this._color,.1,Kgt))},id:this.id,pickPrimitive:this}),appearance:new gn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new kn({geometryInstances:new Rt({geometry:new cQ({origin:f,orientation:_,frustum:a,_drawNearPlane:i===0}),attributes:{color:en.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};uH.prototype.isDestroyed=function(){return!1};uH.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 ue(this)};var Np=uH;function uQ(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 lQ=jt.supportsTypedArrays()?new Float32Array(12):[],gIe=new d,_Ie=new d,cJ=new d,yIe=new d,fH=new d;function Jgt(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof mn)o=d.ZERO,r=i.rightWC,s=i.upWC;else{let h=i.positionWC,p=d.multiplyComponents(e.oneOverRadii,h,gIe),g=d.normalize(p,_Ie),m=d.normalize(d.cross(d.UNIT_Z,p,cJ),cJ),_=d.normalize(d.cross(g,m,yIe),yIe),y=d.magnitude(p),C=Math.sqrt(y*y-1);o=d.multiplyByScalar(g,1/y,gIe);let E=C/y;r=d.multiplyByScalar(m,E,_Ie),s=d.multiplyByScalar(_,E,cJ)}let a=d.add(o,s,fH);d.subtract(a,r,a),d.multiplyComponents(n,a,a),d.pack(a,lQ,0);let c=d.subtract(o,s,fH);d.subtract(c,r,c),d.multiplyComponents(n,c,c),d.pack(c,lQ,3);let u=d.add(o,s,fH);d.add(u,r,u),d.multiplyComponents(n,u,u),d.pack(u,lQ,6);let f=d.subtract(o,s,fH);return d.add(f,r,f),d.multiplyComponents(n,f,f),d.pack(f,lQ,9),lQ}uQ.prototype.update=function(e){if(this._mode=e.mode,e.mode!==oe.SCENE3D)return;let t=e.context,n=e.mapProjection.ellipsoid.radii,i=new ne(n.x+this._ellipsoidOffset,n.y+this._ellipsoidOffset,n.z+this._ellipsoidOffset),o=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 nt({renderState:this._rs,boundingVolume:new le(d.ZERO,i.maximumRadius),pass:Be.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new He({sources:[C2]}),a=new He({sources:[y2]});o&&(a.defines.push("LOG_DEPTH"),s.defines.push("LOG_DEPTH")),this._sp=cn.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}let r=Jgt(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new ht({attributes:{position:new De({componentDatatype:q.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:Ne.TRIANGLES});this._va=ri.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Ue.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};uQ.prototype.execute=function(e,t){this._mode===oe.SCENE3D&&this._command.execute(e,t)};uQ.prototype.isDestroyed=function(){return!1};uQ.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var fQ=uQ;function hw(){}var Zgt=/\bgl_FragDepth\b/,$gt=/\bdiscard\b/;function e_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(l(n))return n;let i=t.fragmentShaderSource,o=!1,r=i.sources;for(let a=0;a<r.length;++a)if(Zgt.test(r[a])||$gt.test(r[a])){o=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!s){let a=`void main() { out_FragColor = vec4(1.0); } `;i=new He({sources:[a]})}else if(!o&&s){let a=`void main() { out_FragColor = vec4(1.0); czm_writeLogDepth(); } `;i=new He({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function t_t(e,t){let n=e._depthOnlyRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ge.getState(t);o.depthMask=!0,o.colorMask={red:!1,green:!1,blue:!1,alpha:!1};let r=Ge.fromCache(o);return n[t.id]=r,r}hw.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.depthOnlyCommand?.shaderProgram,r=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=nt.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=e_t(n,t.shaderProgram),i.depthOnlyCommand.renderState=t_t(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var n_t=/\s+czm_writeLogDepth\(/,i_t=/\s+czm_vertexLogDepth\(/;function o_t(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 o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a=!1,c=r.sources;for(let f=0;f<c.length;++f)if(i_t.test(c[f])){a=!0;break}if(!a){for(let h=0;h<c.length;++h)c[h]=He.replaceMain(c[h],"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)n_t.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]=He.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:r,fragmentShaderSource:s,attributeLocations:o})}hw.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=nt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=o_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function r_t(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(l(i))return i;let o=t._attributeLocations,{sources:r,defines:s}=t.fragmentShaderSource,c=r.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=r.length,h=new Array(f+1);for(let g=0;g<f;++g)h[g]=He.replaceMain(r[g],"czm_non_pick_main");h[f]=u;let p=new He({sources:h,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:o})}function CIe(e,t){let n=e.picking.pickRenderStateCache,i=n[t.id];if(l(i))return i;let o=Ge.getState(t);o.blending.enabled=!1,o.depthMask=!0;let r=Ge.fromCache(o);return n[t.id]=r,r}hw.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.pickCommand?.shaderProgram,r=i.pickCommand?.renderState;return i.pickCommand=nt.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=r_t(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=CIe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function dw(e,t,n){let i=e.length;for(let o=0;o<i;o++)e[o].trimStart().split(/\s+/)[0]===t&&(e[o]=`${t} ${n}`)}function EIe(e){return e.isArray?e.arrayLength:At.getComponentCount(e.type)}function s_t(e){let t=EIe(e);return e.normalized?t===1?"float":`vec${t}`:t===1?"int":`ivec${t}`}function IIe(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function xIe(e,t){let n=zt.getMaximum(t);return`(${e}) / float(${n})`}function a_t(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,o=t.scale;n=IIe(n,i,o)}return e.normalized||(n=xIe(n,e.componentType)),n}function c_t(e,t,n){let o=`float(${`value.${n}`})`;if(t.hasValueTransform){let r=t.offset[n],s=t.scale[n];o=IIe(o,r,s)}return e.normalized||(o=xIe(o,e.componentType)),o}function l_t(e,t,n){let i=n.schemaId,o=n.className,r=n.propertyName,s=`pickMetadata-${i}-${o}-${r}`,a=e.shaderCache.getDerivedShaderProgram(t,s);if(l(a))return a;let c=n.metadataProperty,u=n.classProperty,f=s_t(u),h=["0.0","0.0","0.0","0.0"],p=EIe(u);if(p===1)h[0]=a_t(u,c);else{let y=["x","y","z","w"];for(let C=0;C<p;C++)h[C]=c_t(u,c,y[C])}let g=t.fragmentShaderSource.defines.slice();g.push(tf.METADATA_PICKING_ENABLED),dw(g,tf.METADATA_PICKING_VALUE_TYPE,f),dw(g,tf.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),dw(g,tf.METADATA_PICKING_VALUE_COMPONENT_X,h[0]),dw(g,tf.METADATA_PICKING_VALUE_COMPONENT_Y,h[1]),dw(g,tf.METADATA_PICKING_VALUE_COMPONENT_Z,h[2]),dw(g,tf.METADATA_PICKING_VALUE_COMPONENT_W,h[3]);let m=new He({sources:t.fragmentShaderSource.sources,defines:g});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:m,attributeLocations:t._attributeLocations})}hw.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=nt.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=l_t(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=CIe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function u_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(l(n))return n;let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();return o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}hw.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=nt.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=u_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var Lp=hw;function dH(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 o=i.alpha;if(!l(o)){t._alpha=void 0,t._beta=void 0,t._gamma=void 0;return}t._alpha=D.toRadians(o),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 f_t=new Fe,bIe=new Fe,d_t=new X;function h_t(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=Fe.fromAxisAngle(o,n,bIe),c=Fe.fromAxisAngle(r,i,f_t),u=Fe.multiply(c,a,c),f=Fe.fromAxisAngle(s,t,bIe);Fe.multiply(f,u,u);let h=X.fromQuaternion(u,d_t);X.multiplyByVector(h,r,r),X.multiplyByVector(h,s,s),X.multiplyByVector(h,o,o)}dH.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;h_t(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};dH.prototype.isDestroyed=function(){return!1};dH.prototype.destroy=function(){return this._removeListener(),ue(this)};var dQ=dH;function lJ(){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(lJ.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var m_t=new d;lJ.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!==oe.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=this.density*this.heightScalar*Math.pow(Math.max(o/this.maxHeight,D.EPSILON4),-Math.max(this._heightFalloff,0)),s=d.normalize(n.positionWC,m_t),a=Math.abs(d.dot(n.directionWC,s));r*=1-a,e.fog.density=r,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var hQ=lJ;function p_t(e,t,n){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=oe.SCENE3D,this.morphTime=oe.getMorphTime(oe.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,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}var mQ=p_t;var qa={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},RI=qa.DERIVED_COMMANDS_MAXIMUM_LENGTH,NIe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function MI(){this._frontFaceAlphaByDistance=new Kt(0,1,0,1),this._backFaceAlphaByDistance=new Kt(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=ae.clone(ae.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(RI),this._derivedBlendCommandTypes=new Array(RI),this._derivedPickCommandTypes=new Array(RI),this._derivedCommandTypesToUpdate=new Array(RI),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(MI.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}}});MI.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=TIe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=TIe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=SIe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=SIe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=y_t(this,e,t),this._sunVisibleThroughGlobe=A_t(this,e),this._environmentVisible=g_t(this,e),this._useDepthPlane=__t(this,e),this._numberOfTextureUniforms=C_t(this),this._rectangle=ae.clone(t.translucency.rectangle,this._rectangle),E_t(this,e)};function TIe(e,t,n,i){return e?l(n)?(Kt.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 SIe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function A_t(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function g_t(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function __t(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function y_t(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==oe.SCENE2D&&t.context.depthTexture}function C_t(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function E_t(e,t){e._derivedCommandsLength=uJ(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=uJ(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=uJ(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 o=0;for(n=0;n<RI;++n)(i&1<<n)>0&&(e._derivedCommandTypesToUpdate[o++]=n);e._derivedCommandsToUpdateLength=o;let r=i!==e._derivedCommandKey;e._derivedCommandKey=i,e._derivedCommandsDirty=r,!l(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=O_t())}function uJ(e,t,n,i,o){let r=0,s=e._frontFaceTranslucent,a=e._backFaceTranslucent;if(!s)return r;let c=t.cameraUnderground,u=e._requiresManualDepthTest,f=i?qa.PICK_FRONT_FACE:u?qa.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:qa.TRANSLUCENT_FRONT_FACE,h=i?qa.PICK_BACK_FACE:u?qa.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:qa.TRANSLUCENT_BACK_FACE;return t.mode===oe.SCENE2D?(o[r++]=qa.DEPTH_ONLY_FRONT_FACE,o[r++]=f,r):(a?(n||(o[r++]=qa.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=f,o[r++]=h):(o[r++]=h,o[r++]=f)):c?(n||(o[r++]=qa.DEPTH_ONLY_BACK_FACE),o[r++]=qa.OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=qa.DEPTH_ONLY_FRONT_FACE),o[r++]=qa.OPAQUE_BACK_FACE,o[r++]=f),r)}function Wd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function wIe(e,t){return e.indexOf(t)>-1}function I_t(e,t){Wd(e.defines,"TRANSLUCENT"),Wd(t.defines,"TRANSLUCENT")}function x_t(e,t){Wd(e.defines,"GROUND_ATMOSPHERE"),Wd(t.defines,"GROUND_ATMOSPHERE"),Wd(e.defines,"FOG"),Wd(t.defines,"FOG"),Wd(e.defines,"TRANSLUCENT"),Wd(t.defines,"TRANSLUCENT")}function fJ(e,t){if(wIe(t.defines,"TILE_LIMIT_RECTANGLE")||wIe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main() { out_FragColor = vec4(1.0); } `;t.sources=[n]}function dJ(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=He.replaceMain(n[r],"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 LIe(e,t){dJ(e,t),Wd(e.defines,"GROUND_ATMOSPHERE"),Wd(t.defines,"GROUND_ATMOSPHERE"),Wd(e.defines,"FOG"),Wd(t.defines,"FOG")}function b_t(e,t){dJ(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function T_t(e,t){LIe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function BIe(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 S_t(e,t,n,i,o,r){if(!l(o))return t;if(!i&&l(n))return n;let s=e.shaderCache.getDerivedShaderProgram(t,r);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):[],o(c,u),s=e.shaderCache.createDerivedShaderProgram(t,r,{vertexShaderSource:c,fragmentShaderSource:u,attributeLocations:a})}return s}function w_t(e){e.cull.face=Pi.BACK,e.cull.enabled=!0}function B_t(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0}function D_t(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function v_t(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function P_t(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function DIe(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=An.ALPHA_BLEND}function vIe(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=An.ALPHA_BLEND}function R_t(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function M_t(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function N_t(e,t,n,i,o){if(!l(i))return e;if(!n&&l(t))return t;let r=o[e.id];if(!l(r)){let s=Ge.getState(e);i(s),r=Ge.fromCache(s),o[e.id]=r}return r}function mw(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function L_t(e,t,n,i,o){return l(o)?!i&&l(n)?n:St(t,o(e),!1):t}function ym(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function O_t(){return[new ym({pass:Be.GLOBE,pickOnly:!1,getShaderProgramFunction:I_t,getRenderStateFunction:w_t,getUniformMapFunction:void 0}),new ym({pass:Be.GLOBE,pickOnly:!1,getShaderProgramFunction:x_t,getRenderStateFunction:B_t,getUniformMapFunction:void 0}),new ym({pass:Be.GLOBE,pickOnly:!1,getShaderProgramFunction:fJ,getRenderStateFunction:D_t,getUniformMapFunction:void 0}),new ym({pass:Be.GLOBE,pickOnly:!1,getShaderProgramFunction:fJ,getRenderStateFunction:v_t,getUniformMapFunction:void 0}),new ym({pass:Be.GLOBE,pickOnly:!1,getShaderProgramFunction:fJ,getRenderStateFunction:P_t,getUniformMapFunction:void 0}),new ym({pass:Be.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:dJ,getRenderStateFunction:DIe,getUniformMapFunction:mw}),new ym({pass:Be.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:LIe,getRenderStateFunction:vIe,getUniformMapFunction:mw}),new ym({pass:Be.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:b_t,getRenderStateFunction:DIe,getUniformMapFunction:mw}),new ym({pass:Be.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:T_t,getRenderStateFunction:vIe,getUniformMapFunction:mw}),new ym({pass:Be.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:BIe,getRenderStateFunction:R_t,getUniformMapFunction:mw}),new ym({pass:Be.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:BIe,getRenderStateFunction:M_t,getUniformMapFunction:mw})]}var PIe=new Array(RI),RIe=new Array(RI);MI.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)RIe[o]=this._derivedCommandPacks[n[o]],PIe[o]=NIe[n[o]];F_t(this,e,i,n,PIe,RIe,t)}};function F_t(e,t,n,i,o,r,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,h=a.shaderProgramDirtyFrame??0,p=a.renderStateDirtyFrame??0,g=a.uniformMap!==t.uniformMap,m=a.shaderProgramId!==t.shaderProgram.id,_=a.renderStateId!==t.renderState.id;g&&(a.uniformMapDirtyFrame=u),m&&(a.shaderProgramDirtyFrame=u),_&&(a.renderStateDirtyFrame=u),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let y=0;y<n;++y){let C=r[y],E=i[y],I=o[y],b=a[I],S,B,v;l(b)?(S=b.uniformMap,B=b.shaderProgram,v=b.renderState):(S=void 0,B=void 0,v=void 0),b=nt.shallowClone(t,b),a[I]=b;let P=b.derivedCommands.uniformMapDirtyFrame??0,N=b.derivedCommands.shaderProgramDirtyFrame??0,L=b.derivedCommands.renderStateDirtyFrame??0,A=g||P<f,x=m||N<h,T=_||L<p;A&&(b.derivedCommands.uniformMapDirtyFrame=u),x&&(b.derivedCommands.shaderProgramDirtyFrame=u),T&&(b.derivedCommands.renderStateDirtyFrame=u),b.derivedCommands.type=E,b.pass=C.pass,b.pickOnly=C.pickOnly,b.uniformMap=L_t(e,t.uniformMap,S,A,C.getUniformMapFunction),b.shaderProgram=S_t(s.context,t.shaderProgram,B,x,C.getShaderProgramFunction,I),b.renderState=N_t(t.renderState,v,T,C.getRenderStateFunction,C.renderStateCache)}}}MI.prototype.pushDerivedCommands=function(e,t,n){let i=n.passes.pick||n.passes.pickVoxel;if(i&&t)return;let o=this._derivedCommandTypes,r=this._derivedCommandsLength;if(i?(o=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(o=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),r===0){n.commandList.push(e);return}let s=e.derivedCommands.globeTranslucency;for(let a=0;a<r;++a){let c=NIe[o[a]];n.commandList.push(s[c])}};function OIe(e,t,n,i,o,r){for(let s=0;s<t;++s){let a=e[s],c=a.derivedCommands.type;(!l(r)||r.indexOf(c)>-1)&&n(a,i,o)}}function MIe(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var Q_t=[qa.OPAQUE_FRONT_FACE,qa.OPAQUE_BACK_FACE],k_t=[qa.DEPTH_ONLY_FRONT_FACE,qa.DEPTH_ONLY_BACK_FACE,qa.DEPTH_ONLY_FRONT_AND_BACK_FACE];MI.prototype.executeGlobeCommands=function(e,t,n,i,o){let r=i.context,s=e.commands[Be.GLOBE],a=e.indices[Be.GLOBE];a!==0&&(this._globeTranslucencyFramebuffer=n,n.clearClassification(r,o),OIe(s,a,t,i,o,Q_t))};MI.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let{context:r}=i,{uniformState:s}=r,a=e.commands[Be.GLOBE],c=e.indices[Be.GLOBE],u=e.commands[Be.TERRAIN_CLASSIFICATION],f=e.indices[Be.TERRAIN_CLASSIFICATION];if(c===0||f===0)return;let h=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!h||!p)&&MIe(u,f,t,i,o),!h&&!p)return;this._globeTranslucencyFramebuffer=n;let g=s.globeDepthTexture,m=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,OIe(a,c,t,i,o,k_t),r.depthTexture){let _=n.packDepth(r,o);s.globeDepthTexture=_}MIe(u,f,t,i,o),s.globeDepthTexture=g,o.framebuffer=m};var pQ=MI;var Bu=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; void main() { out_FragColor = texture(colorTexture, v_textureCoordinates); } `;function Op(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new Si({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new Si({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 pi({color:new G(0,0,0,0),owner:this}),this._clearCommand=new pi({color:new G(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(Op.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});Op.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var U_t={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Jn.EQUAL,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},backFunction:Jn.NEVER,reference:0,mask:Xt.CLASSIFICATION_MASK},blending:An.ALPHA_BLEND},G_t={depthMask:!1,stencilTest:{enabled:!0,frontFunction:Jn.NOT_EQUAL,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},backFunction:Jn.NEVER,reference:0,mask:Xt.CLASSIFICATION_MASK},blending:An.ALPHA_BLEND},z_t={depthMask:!0,depthTest:{enabled:!0},stencilTest:Xt.setCesium3DTileBit(),stencilMask:Xt.CESIUM_3D_TILE_MASK,blending:An.ALPHA_BLEND},V_t=`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; } `,H_t=`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 } `;Op.prototype.update=function(e,t,n){let i=this._fbo.getColorTexture(),o=this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;let r=this._numSamples!==t,s=e.drawingBufferWidth,a=e.drawingBufferHeight,c=!l(i)||i.width!==s||i.height!==a;if((c||o||r)&&(this._numSamples=t,this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy(),l(this._previousFramebuffer)||(this._depthStencilTexture=new Nt({context:e,width:s,height:a,pixelFormat:$e.DEPTH_STENCIL,pixelDatatype:Ve.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new Uu({context:e,width:s,height:a,format:ll.DEPTH24_STENCIL8,numSamples:t})))),!l(this._fbo.framebuffer)||c||o||r){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(U_t),this._rsClassified=Ge.fromCache(G_t),this._rsDefault=Ge.fromCache(z_t)),!l(this._unclassifiedCommand)||o||r){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)?H_t:V_t,f=new He({defines:["UNCLASSIFIED"],sources:[u]}),h=new He({sources:[u]});this._unclassifiedCommand=e.createViewportQuadCommand(f,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{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(Bu,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};Op.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};Op.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))};Op.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)};Op.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};Op.prototype.isDestroyed=function(){return!1};Op.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()),ue(this)};var pw=Op;function hH(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(hH.prototype,{total:{get:function(){return this._total}}});function uC(e){let t=new Array(dc.NUMBER_OF_JOB_TYPES);t[dc.TEXTURE]=new hH(l(e)?e[dc.TEXTURE]:10),t[dc.PROGRAM]=new hH(l(e)?e[dc.PROGRAM]:10),t[dc.BUFFER]=new hH(l(e)?e[dc.BUFFER]:30);let n=t.length,i,o=0;for(i=0;i<n;++i)o+=t[i].total;let r=new Array(n);for(i=0;i<n;++i)r[i]=!1;this._totalBudget=o,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=r}uC.getTimestamp=Mi;Object.defineProperties(uC.prototype,{totalBudget:{get:function(){return this._totalBudget}}});uC.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget};uC.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};uC.prototype.execute=function(e,t){let n=this._budgets,i=n[t],o=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&o)return i.starvedThisFrame=!0,!1;let r;if(i.usedThisFrame+i.stolenFromMeThisFrame>=i.total){let c=n.length,u;for(u=0;u<c&&(r=n[u],!(r.usedThisFrame+r.stolenFromMeThisFrame<r.total&&!r.starvedLastFrame));++u);if(u===c&&o)return!1;o&&(i.starvedThisFrame=!0)}let s=uC.getTimestamp();e.execute();let a=uC.getTimestamp()-s;return this._totalUsedThisFrame+=a,r?r.stolenFromMeThisFrame+=a:i.usedThisFrame+=a,this._executedThisFrame[t]=!0,!0};var AQ=uC;function mH(e){e=e??V.EMPTY_OBJECT;let t=Un(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 o=document.createElement("div");o.className="cesium-performanceDisplay-ms",this._msText=document.createTextNode(""),o.appendChild(this._msText),n.appendChild(o),n.appendChild(i),this._container.appendChild(n),this._lastFpsSampleTime=Mi(),this._lastMsSampleTime=Mi(),this._fpsFrameCount=0,this._msFrameCount=0,this._throttled=!1;let r=document.createElement("div");r.className="cesium-performanceDisplay-throttled",this._throttledText=document.createTextNode(""),r.appendChild(this._throttledText),n.appendChild(r)}Object.defineProperties(mH.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});mH.prototype.update=function(e){let t=Mi(),n=e??!0;this._fpsFrameCount++;let i=t-this._lastFpsSampleTime;if(i>1e3){let r="N/A";n&&(r=this._fpsFrameCount*1e3/i|0),this._fpsText.nodeValue=`${r} FPS`,this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;let o=t-this._lastMsSampleTime;if(o>200){let r="N/A";n&&(r=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=`${r} MS`,this._lastMsSampleTime=t,this._msFrameCount=0}};mH.prototype.destroy=function(){return ue(this)};var qg=mH;var Ka={};Ka.decodeRawMetadataValue=function(e,t,n){switch(e){case zt.INT8:return t.getInt8(n);case zt.UINT8:return t.getUint8(n);case zt.INT16:return t.getInt16(n,!0);case zt.UINT16:return t.getUint16(n,!0);case zt.INT32:return t.getInt32(n,!0);case zt.UINT32:return t.getUint32(n,!0);case zt.INT64:return t.getBigInt64(n,!0);case zt.UINT64:return t.getBigUint64(n,!0);case zt.FLOAT32:return t.getFloat32(n,!0);case zt.FLOAT64:return t.getFloat64(n,!0)}throw new ce(`Invalid component type: ${e}`)};Ka.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=Ka.decodeRawMetadataValue(i,t,n);return e.normalized?zt.normalize(o,i):o};Ka.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=zt.getSizeInBytes(i),r=e.type,s=At.getComponentCount(r),a=o*s;if(s>1){let f=Array(s);for(let h=0;h<s;h++){let p=n*a+h*o,g=Ka.decodeRawMetadataValueComponent(e,t,p);f[h]=g}return f}let c=n*a;return Ka.decodeRawMetadataValueComponent(e,t,c)};Ka.decodeRawMetadataValues=function(e,t){let n=new DataView(t.buffer,t.byteOffset,t.byteLength);if(e.isArray){let o=e.arrayLength,r=Array(o);for(let s=0;s<o;s++){let a=Ka.decodeRawMetadataValueElement(e,n,s);r[s]=a}return r}return Ka.decodeRawMetadataValueElement(e,n,0)};Ka.convertToObjectType=function(e,t){if(!l(t)||e===At.SCALAR||e===At.STRING||e===At.BOOLEAN||e===At.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case At.VEC2:return U.unpack(n,0,new U);case At.VEC3:return d.unpack(n,0,new d);case At.VEC4:return se.unpack(n,0,new se);case At.MAT2:return ki.unpack(n,0,new ki);case At.MAT3:return X.unpack(n,0,new X);case At.MAT4:return M.unpack(n,0,new M)}throw new ce(`Invalid metadata object type: ${e}`)};Ka.convertFromObjectType=function(e,t){if(!l(t)||e===At.SCALAR||e===At.STRING||e===At.BOOLEAN||e===At.ENUM)return t;switch(e){case At.VEC2:return U.pack(t,Array(2));case At.VEC3:return d.pack(t,Array(3));case At.VEC4:return se.pack(t,Array(4));case At.MAT2:return ki.pack(t,Array(4));case At.MAT3:return X.pack(t,Array(9));case At.MAT4:return M.pack(t,Array(16))}throw new ce(`Invalid metadata object type: ${e}`)};Ka.decodeMetadataValues=function(e,t,n){let i=Ka.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let r=Ka.convertFromObjectType(e.type,t.offset),s=Ka.convertFromObjectType(e.type,t.scale);i=qm.valueTransformInPlace(i,r,s,zt.applyValueTransform)}if(e.isArray){let r=e.arrayLength,s=Array(r);for(let a=0;a<r;a++){let c=i[a],u=Ka.convertToObjectType(e.type,c);s[a]=u}return s}return Ka.convertToObjectType(e.type,i)};var gQ=Object.freeze(Ka);function NI(){this._framebuffer=new Si,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(NI.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function W_t(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function j_t(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}NI.prototype.update=function(e,t){W_t(this,e,t),j_t(this,e,t)};var Y_t=new se,q_t=new se(1,1/255,1/65025,1/16581375);NI.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}),o=se.unpack(i,0,Y_t);return se.divideByScalar(o,255,o),se.dot(o,q_t)};NI.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};NI.prototype.isDestroyed=function(){return!1};NI.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),ue(this)};var _Q=NI;function K_t(e,t){this.near=e??0,this.far=t??0;let n=Be.NUMBER_OF_PASSES,i=new Array(n),o=new Array(n);for(let r=0;r<n;++r)i[r]=[],o[r]=0;this.commands=i,this.indices=o}var yQ=K_t;var fC=`uniform highp sampler2D u_depthTexture; in vec2 v_textureCoordinates; void main() { out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r); } `;function Fp(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new Si({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new Si({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new Si,this._tempCopyDepthFramebuffer=new Si,this._updateDepthFramebuffer=new Si({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 qe,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(Fp.prototype,{colorFramebufferManager:{get:function(){return 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}}});function FIe(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let s=!qe.equals(r,o.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=qe.clone(o.viewport,e._scissorRectangle),a=!0),(!l(e._rs)||!qe.equals(r,e._rs.viewport)||a)&&(e._rs=Ge.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=Ge.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:An.ALPHA_BLEND}),e._rsUpdate=Ge.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:Jn.EQUAL,frontOperation:{fail:_t.KEEP,zFail:_t.KEEP,zPass:_t.KEEP},backFunction:Jn.NEVER,reference:Xt.CESIUM_3D_TILE_MASK,mask:Xt.CESIUM_3D_TILE_MASK}})),l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(fC,{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(Bu,{uniformMap:{colorTexture:function(){return e.colorFramebufferManager.getColorTexture()}},owner:e})),e._copyColorCommand.renderState=e._rs,l(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(fC,{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(Bu,{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 pi({color:new G(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}Fp.prototype.update=function(e,t,n,i,o,r){let{width:s,height:a}=n,c=o?e.halfFloatingPointTexture?Ve.HALF_FLOAT:Ve.FLOAT:Ve.UNSIGNED_BYTE;this._numSamples=i,this.picking?this._pickColorFramebuffer.update(e,s,a):this._outputFramebuffer.update(e,s,a,i,c),this._copyDepthFramebuffer.update(e,s,a),FIe(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};Fp.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};Fp.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};Fp.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 o=this._updateDepthFramebuffer;if(!l(o.framebuffer)||o.getDepthStencilTexture()!==i||o.getColorTexture()!==this._copyDepthFramebuffer.getColorTexture()){let r=this._copyDepthFramebuffer.getColorTexture(),{width:s,height:a}=r;this._tempCopyDepthFramebuffer.destroy(),this._tempCopyDepthFramebuffer.update(e,s,a),o.setColorTexture(r,0),o.setDepthStencilTexture(i),o.update(e,s,a),FIe(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};Fp.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};Fp.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(G.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};Fp.prototype.isDestroyed=function(){return!1};Fp.prototype.destroy=function(){return this._pickColorFramebuffer.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()),ue(this)};var CQ=Fp;function LI(){this._framebuffer=new Si({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new Si,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new qe,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(LI.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 X_t(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function J_t(e,t,n,i,o){let r=o?t.halfFloatingPointTexture?Ve.HALF_FLOAT:Ve.FLOAT:Ve.UNSIGNED_BYTE;e._framebuffer.update(t,n,i,1,r),e._packedDepthFramebuffer.update(t,n,i)}function Z_t(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!qe.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=qe.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!qe.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(fC,{uniformMap:{u_depthTexture:function(){return e.depthStencilTexture}},owner:e})),l(e._clearCommand)||(e._clearCommand=new pi({color:new G(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}LI.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;J_t(this,n,o,r,e),Z_t(this,n,o,r,i),this._useHdr=e};LI.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};LI.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};LI.prototype.isDestroyed=function(){return!1};LI.prototype.destroy=function(){return X_t(this),ue(this)};var EQ=LI;function Kg(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 Si({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new Si({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new Si({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new Si({createColorAttachments:!1}),this._opaqueClearCommand=new pi({color:new G(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new pi({color:new G(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new pi({color:new G(0,0,0,0),owner:this}),this._alphaClearCommand=new pi({color:new G(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 qe,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function QIe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function hJ(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function kIe(e){QIe(e),hJ(e)}function $_t(e,t,n,i){QIe(e),e._accumulationTexture=new Nt({context:t,width:n,height:i,pixelFormat:$e.RGBA,pixelDatatype:Ve.FLOAT}),e._revealageTexture=new Nt({context:t,pixelFormat:$e.RGBA,pixelDatatype:Ve.FLOAT,width:n,height:i,flipY:!1})}function eyt(e,t){hJ(e);let n=te.FRAMEBUFFER_COMPLETE,i=!0,{width:o,height:r}=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,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture,0),e._adjustTranslucentFBO.setColorTexture(e._revealageTexture,1),e._adjustTranslucentFBO.update(t,o,r),(e._translucentFBO.status!==n||e._adjustTranslucentFBO.status!==n)&&(hJ(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO.setColorTexture(e._accumulationTexture),e._translucentFBO.setDepthStencilTexture(e._depthStencilTexture),e._translucentFBO.update(t,o,r),e._alphaFBO.setColorTexture(e._revealageTexture),e._alphaFBO.setDepthStencilTexture(e._depthStencilTexture),e._alphaFBO.update(t,o,r),e._adjustTranslucentFBO.setColorTexture(e._accumulationTexture),e._adjustTranslucentFBO.update(t,o,r),e._adjustAlphaFBO.setColorTexture(e._revealageTexture),e._adjustAlphaFBO.update(t,o,r);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)&&(kIe(e),e._translucentMultipassSupport=!1,i=!1)}return i}Kg.prototype.update=function(e,t,n,i,o){if(!this.isSupported())return;this._opaqueFBO=n,this._opaqueTexture=n.getColorTexture(0),this._depthStencilTexture=n.getDepthStencilTexture();let{width:r,height:s}=this._opaqueTexture,a=this._accumulationTexture,c=!l(a)||a.width!==r||a.height!==s||i!==this._useHDR,u=this._numSamples!==o;if((c||u)&&(this._numSamples=o,$_t(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||u)&&!eyt(this,e))return;this._useHDR=i;let f=this,h,p;l(this._compositeCommand)||(h=new He({sources:[_2]}),this._translucentMRTSupport&&h.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(h,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new He({defines:["MRT"],sources:[$S]}),p={u_bgColor:function(){return f._translucentMRTClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(h=new He({sources:[$S]}),p={u_bgColor:function(){return f._translucentMultipassClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}),p={u_bgColor:function(){return f._alphaClearCommand.color},u_depthTexture:function(){return f._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let g=!qe.equals(this._viewport,t.viewport),m=g!==this._useScissorTest;this._useScissorTest=g,qe.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=qe.clone(t.viewport,this._scissorRectangle),m=!0),(!l(this._rs)||!qe.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 tyt={enabled:!0,color:new G(0,0,0,0),equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.ONE,functionDestinationRgb:Oo.ONE,functionSourceAlpha:Oo.ZERO,functionDestinationAlpha:Oo.ONE_MINUS_SOURCE_ALPHA},nyt={enabled:!0,color:new G(0,0,0,0),equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.ONE,functionDestinationRgb:Oo.ONE,functionSourceAlpha:Oo.ONE,functionDestinationAlpha:Oo.ONE},iyt={enabled:!0,color:new G(0,0,0,0),equationRgb:cc.ADD,equationAlpha:cc.ADD,functionSourceRgb:Oo.ZERO,functionDestinationRgb:Oo.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:Oo.ZERO,functionDestinationAlpha:Oo.ONE_MINUS_SOURCE_ALPHA};function mJ(e,t,n,i){let o=n[i.id];if(!l(o)){let r=Ge.getState(i);r.depthMask=!1,r.blending=t,o=Ge.fromCache(r),n[i.id]=o}return o}function oyt(e,t,n){return mJ(t,tyt,e._translucentRenderStateCache,n)}function ryt(e,t,n){return mJ(t,nyt,e._translucentRenderStateCache,n)}function syt(e,t,n){return mJ(t,iyt,e._alphaRenderStateCache,n)}var ayt=` 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); `,cyt=` 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; `,lyt=` float ai = czm_out_FragColor.a; out_FragColor = vec4(ai); `;function pJ(e,t,n,i){let{shaderCache:o}=e,r=o.getDerivedShaderProgram(t,n);if(l(r))return r;let s=t._attributeLocations,a=t.fragmentShaderSource.clone();a.sources=a.sources.map(function(f){return He.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,`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 h=c[f];u=`layout (location = ${h[1]}) out vec4 ${h[0]}; ${u}`}return a.sources.push(u),a.sources.push(`void main() { czm_translucent_main(); if (czm_discard) { discard; } ${i}} `),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function uyt(e,t){return pJ(e,t,"translucentMRT",ayt)}function fyt(e,t){return pJ(e,t,"translucentMultipass",cyt)}function dyt(e,t){return pJ(e,t,"alphaMultipass",lyt)}Kg.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=nt.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=uyt(t,e.shaderProgram),n.translucentCommand.renderState=oyt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,o,r,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=nt.shallowClone(e,n.translucentCommand),n.alphaCommand=nt.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=fyt(t,e.shaderProgram),n.translucentCommand.renderState=ryt(this,t,e.renderState),n.alphaCommand.shaderProgram=dyt(t,e.shaderProgram),n.alphaCommand.renderState=syt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=i,n.translucentCommand.renderState=o,n.alphaCommand.shaderProgram=r,n.alphaCommand.renderState=s),n};function hyt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:u}=a,f=t._hdr,h=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<o.length;++m){let _=o[m];_=c?_.derivedCommands.logDepth.command:_,_=f?_.derivedCommands.hdr.command:_;let y=p&&_.receiveShadows?_.derivedCommands.oit.shadows.translucentCommand:_.derivedCommands.oit.translucentCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,_=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(_,t,i,g)}i.framebuffer=e._alphaFBO.framebuffer;for(let m=0;m<o.length;++m){let _=o[m];_=c?_.derivedCommands.logDepth.command:_,_=f?_.derivedCommands.hdr.command:_;let y=p&&_.receiveShadows?_.derivedCommands.oit.shadows.alphaCommand:_.derivedCommands.oit.alphaCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,_=p&&m.receiveShadows?m.derivedCommands.oit.shadows.alphaCommand:m.derivedCommands.oit.alphaCommand;n(_,t,i,g)}i.framebuffer=h}function myt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:u}=a,f=t._hdr,h=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<o.length;++m){let _=o[m];_=c?_.derivedCommands.logDepth.command:_,_=f?_.derivedCommands.hdr.command:_;let y=p&&_.receiveShadows?_.derivedCommands.oit.shadows.translucentCommand:_.derivedCommands.oit.translucentCommand;n(y,t,i,g)}if(l(r)){let m=r.unclassifiedCommand,_=p&&m.receiveShadows?m.derivedCommands.oit.shadows.translucentCommand:m.derivedCommands.oit.translucentCommand;n(_,t,i,g)}i.framebuffer=h}Kg.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){myt(this,e,t,n,i,o);return}hyt(this,e,t,n,i,o)};Kg.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};Kg.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this._opaqueFBO.framebuffer,G.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};Kg.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};Kg.prototype.isDestroyed=function(){return!1};Kg.prototype.destroy=function(){return kIe(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()),ue(this)};var IQ=Kg;function xQ(){this._framebuffer=new Si({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(xQ.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function pyt(e){e._framebuffer.destroy()}function Ayt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new vc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new qe},o.viewport=new qe,e._passState=o}xQ.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&Ayt(this,e);let r=this.framebuffer,s=this._passState;return s.framebuffer=r,s.viewport.width=i,s.viewport.height=o,s.scissorTest.rectangle.x=t.x,s.scissorTest.rectangle.y=o-t.y,s.scissorTest.rectangle.width=1,s.scissorTest.rectangle.height=1,s};xQ.prototype.isDestroyed=function(){return!1};xQ.prototype.destroy=function(){return pyt(this),ue(this)};var bQ=xQ;function Aw(e){let t=new vc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new qe},t.viewport=new qe,this._context=e,this._fb=new Si({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}Aw.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return qe.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};var TQ=new G;Aw.prototype.end=function(e){let t=e.width??1,n=e.height??1,i=this._context,o=i.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.max(t,n),s=r*r,a=Math.floor(t*.5),c=Math.floor(n*.5),u=0,f=0,h=0,p=-1;for(let g=0;g<s;++g){if(-a<=u&&u<=a&&-c<=f&&f<=c){let m=4*((c-f)*t+u+a);TQ.red=G.byteToFloat(o[m]),TQ.green=G.byteToFloat(o[m+1]),TQ.blue=G.byteToFloat(o[m+2]),TQ.alpha=G.byteToFloat(o[m+3]);let _=i.getObjectByPickColor(TQ);if(l(_))return _}if(u===f||u<0&&-u===f||u>0&&u===1-f){let m=h;h=-p,p=m}u+=h,f+=p}};Aw.prototype.readCenterPixel=function(e){let t=e.width??1,n=e.height??1,o=this._context.readPixels({x:e.x,y:e.y,width:t,height:n,framebuffer:this._fb.framebuffer}),r=Math.floor(t*.5),a=4*(Math.floor(n*.5)*t+r);return o.slice(a,a+4)};Aw.prototype.isDestroyed=function(){return!1};Aw.prototype.destroy=function(){return this._fb.destroy(),ue(this)};var SQ=Aw;function Xg(){this._numSamples=1,this._colorFramebuffer=new Si({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new Si({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new G(0,0,0,0),this._clearCommand=new pi({color:new G(0,0,0,0),depth:1,owner:this})}function gyt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(Xg.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});Xg.prototype.update=function(e,t,n,i){let o=t.width,r=t.height,s=n?e.halfFloatingPointTexture?Ve.HALF_FLOAT:Ve.FLOAT:Ve.UNSIGNED_BYTE;this._numSamples=i,this._colorFramebuffer.update(e,o,r,i,s),this._idFramebuffer.update(e,o,r)};Xg.prototype.clear=function(e,t,n){G.clone(n,this._clearCommand.color),G.clone(this._idClearColor,this._clearCommand.color),this._colorFramebuffer.clear(e,this._clearCommand,t),this._idFramebuffer.clear(e,this._clearCommand,t)};Xg.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};Xg.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};Xg.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};Xg.prototype.isDestroyed=function(){return!1};Xg.prototype.destroy=function(){return gyt(this),ue(this)};var OI=Xg;function FI(){}FI.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};FI.createShadowCastVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);i.push("SHADOW_MAP"),n&&i.push("GENERATE_POSITION");let r=He.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let u=0;u<a;++u)o[u]=He.replaceMain(o[u],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC; void main() { czm_shadow_cast_main(); v_positionEC = (czm_inverseProjection * gl_Position).xyz; }`)}return new He({defines:i,sources:o})};FI.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=He.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let f=0;f<c;++f)r[f]=He.replaceMain(r[f],"czm_shadow_cast_main");let u="";return t&&(a||(u+=`in vec3 v_positionEC; `),u+=`uniform vec4 shadowMap_lightPositionEC; `),i?u+=`void main() { `:u+=`void main() { czm_shadow_cast_main(); if (out_FragColor.a == 0.0) { discard; } `,t?u+=` float distance = length(${s}); if (distance >= shadowMap_lightPositionEC.w) { discard; } distance /= shadowMap_lightPositionEC.w; // radius out_FragColor = czm_packDepth(distance); `:n?u+=` out_FragColor = vec4(1.0); `:u+=` out_FragColor = czm_packDepth(gl_FragCoord.z); `,u+=`} `,r.push(u),new He({defines:o,sources:r})};FI.getShadowReceiveShaderKeyword=function(e,t,n,i){let o=e._usesDepthTexture,r=e._polygonOffsetSupported,s=e._isPointLight,a=e._isSpotLight,c=e._numberOfCascades>1,u=e.debugCascadeColors,f=e.softShadows;return`receiveShadow ${o}${r}${s}${a}${c}${u}${f}${t}${n}${i}`};FI.createShadowReceiveVertexShader=function(e,t,n){let i=e.defines.slice(0),o=e.sources.slice(0);return i.push("SHADOW_MAP"),t&&(n?i.push("GENERATE_POSITION_AND_NORMAL"):i.push("GENERATE_POSITION")),new He({defines:i,sources:o})};FI.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=He.findNormalVarying(e),s=!i&&l(r)||i&&o,a=He.findPositionVarying(e),c=l(a),u=t._usesDepthTexture,f=t._polygonOffsetSupported,h=t._isPointLight,p=t._isSpotLight,g=t._numberOfCascades>1,m=t.debugCascadeColors,_=t.softShadows,y=h?t._pointBias:i?t._terrainBias:t._primitiveBias,C=e.defines.slice(0),E=e.sources.slice(0),I=E.length;for(let B=0;B<I;++B)E[B]=He.replaceMain(E[B],"czm_shadow_receive_main");h?C.push("USE_CUBE_MAP_SHADOW"):u&&C.push("USE_SHADOW_DEPTH_TEXTURE"),_&&!h&&C.push("USE_SOFT_SHADOWS"),g&&n&&i&&(s?C.push("ENABLE_VERTEX_LIGHTING"):C.push("ENABLE_DAYNIGHT_SHADING")),n&&y.normalShading&&s&&(C.push("USE_NORMAL_SHADING"),y.normalShadingSmooth>0&&C.push("USE_NORMAL_SHADING_SMOOTH"));let b="";h?b+=`uniform samplerCube shadowMap_textureCube; `:b+=`uniform sampler2D shadowMap_texture; `;let S;return c?S=` return vec4(${a}, 1.0); `:S=`#ifndef LOG_DEPTH return czm_windowToEyeCoordinates(gl_FragCoord); #else return vec4(v_logPositionEC, 1.0); #endif `,b+=`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() { ${S}} vec3 getNormalEC() { ${s?` return normalize(${r}); `:` return vec3(1.0); `}} void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) { ${y.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; float normalOffsetScale = 1.0 - nDotL; vec3 offset = normalOffset * normalOffsetScale * normalEC; positionEC.xyz += offset; `:""}} `,b+=`void main() { czm_shadow_receive_main(); vec4 positionEC = getPositionEC(); vec3 normalEC = getNormalEC(); float depth = -positionEC.z; `,b+=` czm_shadowParameters shadowParameters; shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; `,i?b+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0); `:f||(b+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); `),h?b+=` 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?b+=` 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?b+=` 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); `:""}`:b+=` 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); `,b+=` out_FragColor.rgb *= visibility; } `,E.push(b),new He({defines:C,sources:E})};var Qp=FI;function kp(e){e=e??V.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;(jt.isInternetExplorer()||jt.isEdge()||(jt.isChrome()||jt.isFirefox())&&jt.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 M,this._shadowMapTexture=void 0,this._lightDirectionEC=new d,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new pH,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new le,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 Jr:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new M,new M,new M,new M],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new _yt(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,gJ(this),this._clearCommand=new pi({depth:1,color:new G}),this._clearPassState=new vc(t),this._size=e.size??2048,this.size=this._size}kp.MAXIMUM_DISTANCE=2e4;function _yt(e){this.camera=new pH,this.passState=new vc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function AJ(e,t){return Ge.fromCache({cull:{enabled:!0,face:Pi.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 gJ(e){let t=!e._usesDepthTexture;e._primitiveRenderState=AJ(t,e._primitiveBias),e._terrainRenderState=AJ(t,e._terrainBias),e._pointRenderState=AJ(t,e._pointBias)}kp.prototype.debugCreateRenderStates=function(){gJ(this)};Object.defineProperties(kp.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){byt(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 _J(e){let t=e._passes.length;for(let n=0;n<t;++n){let i=e._passes[n],o=i.framebuffer;l(o)&&!o.isDestroyed()&&o.destroy(),i.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function yyt(e,t){let n=new Uu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:ll.DEPTH_COMPONENT16}),i=new Nt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,sampler:nn.NEAREST}),o=new Xr({context:t,depthRenderbuffer:n,colorTextures:[i],destroyAttachments:!1}),r=e._passes.length;for(let s=0;s<r;++s){let a=e._passes[s];a.framebuffer=o,a.passState.framebuffer=o}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function Cyt(e,t){let n=new Nt({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:$e.DEPTH_STENCIL,pixelDatatype:Ve.UNSIGNED_INT_24_8,sampler:nn.NEAREST}),i=new Xr({context:t,depthStencilTexture:n,destroyAttachments:!1}),o=e._passes.length;for(let r=0;r<o;++r){let s=e._passes[r];s.framebuffer=i,s.passState.framebuffer=i}e._shadowMapTexture=n,e._depthAttachment=n}function Eyt(e,t){let n=new Uu({context:t,width:e._textureSize.x,height:e._textureSize.y,format:ll.DEPTH_COMPONENT16}),i=new kr({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,sampler:nn.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new Xr({context:t,depthRenderbuffer:n,colorTextures:[o[r]],destroyAttachments:!1}),a=e._passes[r];a.framebuffer=s,a.passState.framebuffer=s}e._shadowMapTexture=i,e._depthAttachment=n,e._colorAttachment=i}function zIe(e,t){e._isPointLight?Eyt(e,t):e._usesDepthTexture?Cyt(e,t):yyt(e,t)}function Iyt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==te.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,gJ(e),_J(e),zIe(e,t))}function xyt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(_J(e),zIe(e,t),Iyt(e,t),VIe(e,t))}function VIe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function byt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=qt.maximumCubeMapSize>=t?t:qt.maximumCubeMapSize,o.x=t,o.y=t;let r=new qe(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=qt.maximumTextureSize>=t?t:qt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new qe(0,0,t,t)):i===4&&(t=qt.maximumTextureSize>=t*2?t:qt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new qe(0,0,t,t),n[1].passState.viewport=new qe(t,0,t,t),n[2].passState.viewport=new qe(0,t,t,t),n[3].passState.viewport=new qe(t,t,t,t));e._clearPassState.viewport=new qe(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,u=a.y/o.y,f=a.width/o.x,h=a.height/o.y;s.textureOffsets=new M(f,0,0,c,0,h,0,u,0,0,1,0,0,0,0,1)}}var Tyt=new qe;function Syt(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=Be.OVERLAY,i}function wyt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=Tyt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=Syt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!qe.equals(a.renderState.viewport,s))&&(a.renderState=Ge.fromCache({viewport:qe.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var Up=new Array(8);Up[0]=new se(-1,-1,-1,1);Up[1]=new se(1,-1,-1,1);Up[2]=new se(1,1,-1,1);Up[3]=new se(-1,1,-1,1);Up[4]=new se(-1,-1,1,1);Up[5]=new se(1,-1,1,1);Up[6]=new se(1,1,1,1);Up[7]=new se(-1,1,1,1);var dC=new M,yJ=new Array(8);for(let e=0;e<8;++e)yJ[e]=new se;function Byt(e,t){let n=new Rt({geometry:new mh({minimum:new d(-.5,-.5,-.5),maximum:new d(.5,.5,.5)}),attributes:{color:en.fromColor(t)}}),i=new Rt({geometry:new mg({radius:.5}),attributes:{color:en.fromColor(t)}});return new kn({geometryInstances:[n,i],appearance:new gn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var Dyt=[G.RED,G.GREEN,G.BLUE,G.MAGENTA],vyt=new d;function Pyt(e,t){wyt(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 Np({camera:e._sceneCamera,color:G.CYAN,updateOnChange:!1})),e._debugCameraFrustum.update(t)),e._cascadesEnabled){if(e.debugFreezeFrame){n&&(e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=new Np({camera:e._shadowMapCamera,color:G.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 Np({camera:e._passes[i].camera,color:Dyt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=Fe.IDENTITY,r=e._pointLightRadius*2,s=d.fromElements(r,r,r,vyt),a=M.fromTranslationQuaternionRotationScale(i,o,s,dC);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=Byt(a,G.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new Np({camera:e._shadowMapCamera,color:G.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function pH(){this.viewMatrix=new M,this.inverseViewMatrix=new M,this.frustum=void 0,this.positionCartographic=new me,this.positionWC=new d,this.directionWC=d.clone(d.UNIT_Z),this.upWC=d.clone(d.UNIT_Y),this.rightWC=d.clone(d.UNIT_X),this.viewProjectionMatrix=new M}pH.prototype.clone=function(e){M.clone(e.viewMatrix,this.viewMatrix),M.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),me.clone(e.positionCartographic,this.positionCartographic),d.clone(e.positionWC,this.positionWC),d.clone(e.directionWC,this.directionWC),d.clone(e.upWC,this.upWC),d.clone(e.rightWC,this.rightWC)};var Ryt=new M(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);pH.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return M.multiply(t,e,this.viewProjectionMatrix),M.multiply(Ryt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var Myt=new Array(5),Nyt=new Fi,Lyt=new Array(4),HIe=new d,WIe=new d;function Oyt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,c=r-o,u=r/o,f=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,f=.9);let p=Lyt,g=Myt;for(g[0]=o,g[s]=r,a=0;a<s;++a){let L=(a+1)/s,A=o*Math.pow(u,L),x=o+c*L,T=D.lerp(x,A,f);g[a+1]=T,p[a]=T-g[a]}if(h){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,_=m.left,y=m.right,C=m.bottom,E=m.top,I=m.near,b=m.far,S=n.positionWC,B=n.directionWC,v=n.upWC,P=i.frustum.clone(Nyt),N=n.getViewProjection();for(a=0;a<s;++a){P.near=g[a],P.far=g[a+1];let L=M.multiply(P.projectionMatrix,i.viewMatrix,dC),A=M.inverse(L,dC),x=M.multiply(N,A,dC),T=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,HIe),w=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,WIe);for(let z=0;z<8;++z){let Q=se.clone(Up[z],yJ[z]);M.multiplyByVector(x,Q,Q),d.divideByScalar(Q,Q.w,Q),d.minimumByComponent(Q,T,T),d.maximumByComponent(Q,w,w)}T.x=Math.max(T.x,0),T.y=Math.max(T.y,0),T.z=0,w.x=Math.min(w.x,1),w.y=Math.min(w.y,1),w.z=Math.min(w.z,1);let R=e._passes[a],O=R.camera;O.clone(n);let k=O.frustum;k.left=_+T.x*(y-_),k.right=_+w.x*(y-_),k.bottom=C+T.y*(E-C),k.top=C+w.y*(E-C),k.near=I+T.z*(b-I),k.far=I+w.z*(b-I),R.cullingVolume=O.frustum.computeCullingVolume(S,B,v);let F=e._cascadeMatrices[a];M.multiply(O.getViewProjection(),i.inverseViewMatrix,F),M.multiply(R.textureOffsets,F,F)}}var Fyt=new M,Qyt=new d,kyt=new d,UIe=new d;function Uyt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=M.multiply(i.frustum.projectionMatrix,i.viewMatrix,dC),r=M.inverse(o,dC),s=n.directionWC,a=i.directionWC;d.equalsEpsilon(s,a,D.EPSILON10)&&(a=i.upWC);let c=d.cross(s,a,Qyt);a=d.cross(c,s,kyt),d.normalize(a,a),d.normalize(c,c);let u=d.fromElements(0,0,0,UIe),f=M.computeView(u,s,a,c,Fyt),h=M.multiply(f,r,dC),p=d.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,HIe),g=d.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,WIe);for(let b=0;b<8;++b){let S=se.clone(Up[b],yJ[b]);M.multiplyByVector(h,S,S),d.divideByScalar(S,S.w,S),d.minimumByComponent(S,p,p),d.maximumByComponent(S,g,g)}g.z+=1e3,p.z-=10;let m=UIe;m.x=-(.5*(p.x+g.x)),m.y=-(.5*(p.y+g.y)),m.z=-g.z;let _=M.fromTranslation(m,dC);f=M.multiply(_,f,f);let y=.5*(g.x-p.x),C=.5*(g.y-p.y),E=g.z-p.z,I=n.frustum;I.left=-y,I.right=y,I.bottom=-C,I.top=C,I.near=.01,I.far=E,M.clone(f,n.viewMatrix),M.inverse(f,n.inverseViewMatrix),M.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),d.clone(s,n.directionWC),d.clone(a,n.upWC),d.clone(c,n.rightWC)}var Gyt=[new d(-1,0,0),new d(0,-1,0),new d(0,0,-1),new d(1,0,0),new d(0,1,0),new d(0,0,1)],zyt=[new d(0,-1,0),new d(0,0,-1),new d(0,-1,0),new d(0,-1,0),new d(0,0,1),new d(0,-1,0)],Vyt=[new d(0,0,1),new d(1,0,0),new d(-1,0,0),new d(0,0,-1),new d(1,0,0),new d(1,0,0)];function Hyt(e,t){let n=new Fi;n.fov=D.PI_OVER_TWO,n.near=1,n.far=e._pointLightRadius,n.aspectRatio=1;for(let i=0;i<6;++i){let o=e._passes[i].camera;o.positionWC=e._shadowMapCamera.positionWC,o.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(o.positionWC,o.positionCartographic),o.directionWC=Gyt[i],o.upWC=zyt[i],o.rightWC=Vyt[i],M.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),M.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var Wyt=new d,jyt=new d,jIe=new le,GIe=jIe.center;function Yyt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=jIe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,Wyt),s=d.negate(i.directionWC,jyt),a=d.dot(r,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)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===tn.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=d.add(i.positionWC,d.multiplyByScalar(i.directionWC,r,GIe),GIe);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===tn.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),le.clone(o,e._boundingSphere)}}function qyt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?d.clone(i.directionWC,r.directionWC):e._isPointLight?d.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;M.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),d.normalize(s,s),d.negate(s,s),M.multiplyByPoint(n.viewMatrix,r.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=_o.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,Yyt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}kp.prototype.update=function(e){if(qyt(this,e),this._needsUpdate)if(xyt(this,e.context),this._isPointLight&&Hyt(this,e),this._cascadesEnabled&&(Uyt(this,e),this._numberOfCascades>1&&Oyt(this,e)),this._isPointLight)this._shadowMapCullingVolume=vs.fromBoundingSphere(this._boundingSphere);else{let t=this._shadowMapCamera,n=t.positionWC,i=t.directionWC,o=t.upWC;this._shadowMapCullingVolume=t.frustum.computeCullingVolume(n,i,o),this._passes.length===1&&this._passes[0].camera.clone(t)}if(this._passes.length===1){let t=this._sceneCamera.inverseViewMatrix;M.multiply(this._shadowMapCamera.getViewProjection(),t,this._shadowMapMatrix)}this.debugShow&&Pyt(this,e)};kp.prototype.updatePass=function(e,t){VIe(this,e,t)};var Kyt=new U;function YIe(e,t,n){let i=e._isPointLight?e._pointBias:n?e._terrainBias:e._primitiveBias,o={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 r=Kyt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.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 St(t,o,!1)}function Xyt(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=nt.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(s)||o!==n.shaderProgram.id||t){let u=n.shaderProgram,f=n.pass===Be.GLOBE,h=n.pass!==Be.TRANSLUCENT,p=e._isPointLight,g=e._usesDepthTexture,m=Qp.getShadowCastShaderKeyword(p,f,g,h);if(s=i.shaderCache.getDerivedShaderProgram(u,m),!l(s)){let y=u.vertexShaderSource,C=u.fragmentShaderSource,E=Qp.createShadowCastVertexShader(y,p,f),I=Qp.createShadowCastFragmentShader(C,p,g,h);s=i.shaderCache.createDerivedShaderProgram(u,m,{vertexShaderSource:E,fragmentShaderSource:I,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=YIe(e,n.uniformMap,f)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}kp.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,u=t.pass===Be.GLOBE,f=!1;if(u&&(f=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let h,p;l(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=nt.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let g=o.receiveShaderCastShadows!==t.castShadows,m=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(h)||m||n||g){let _=Qp.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,f);if(h=i.shaderCache.getDerivedShaderProgram(s,_),!l(h)){let y=Qp.createShadowReceiveVertexShader(a,u,f),C=Qp.createShadowReceiveFragmentShader(c,e[0],t.castShadows,u,f);h=i.shaderCache.createDerivedShaderProgram(s,_,{vertexShaderSource:y,fragmentShaderSource:C,attributeLocations:s._attributeLocations})}p=YIe(e[0],t.uniformMap,u)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};kp.createCastDerivedCommand=function(e,t,n,i,o){if(l(o)||(o={}),t.castShadows){let r=o.castCommands;l(r)||(r=o.castCommands=[]);let s=o.castShaderProgramId,a=e.length;r.length=a;for(let c=0;c<a;++c)r[c]=Xyt(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};kp.prototype.isDestroyed=function(){return!1};kp.prototype.destroy=function(){_J(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 ue(this)};var Jg=kp;var QI=`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 // Reverse premultiplication process to get the correct composited result of the classification primitives color.rgb /= color.a; #endif out_FragColor = color; #endif } `;var Jyt=!1;function hC(e){this._drawClassificationFBO=new Si({createDepthAttachments:!1}),this._accumulationFBO=new Si({createDepthAttachments:!1}),this._packFBO=new Si,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 pi({color:new G(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new pi({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new qe,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(hC.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function qIe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function KIe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function Zyt(e,t,n,i){qIe(e),e._translucentDepthStencilTexture=new Nt({context:t,width:n,height:i,pixelFormat:$e.DEPTH_STENCIL,pixelDatatype:Ve.UNSIGNED_INT_24_8,sampler:nn.NEAREST})}function $yt(e,t,n,i){KIe(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 eCt(e,t,n,i){if(!e.isSupported())return;e._opaqueDepthStencilTexture=i;let o=e._opaqueDepthStencilTexture.width,r=e._opaqueDepthStencilTexture.height;e._drawClassificationFBO.isDirty(o,r)&&(Zyt(e,t,o,r),$yt(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new He({sources:[g2]}),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 He({sources:[QI]}),a={colorTexture:function(){return e._textureToComposite}},Jyt&&(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,h=f.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new He({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),g=nt.shallowClone(f);g.shaderProgram=p,f.derivedCommands.pick=g}l(e._copyCommand)||(s=new He({sources:[QI]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new He({sources:[QI]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!qe.equals(e._viewport,n.viewport),u=c!==e._useScissorTest;e._useScissorTest=c,qe.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=qe.clone(n.viewport,e._scissorRectangle),u=!0),(!l(e._rsDepth)||!qe.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)||!qe.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:Jn.EQUAL,reference:Xt.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!qe.equals(e._viewport,e._rsComp.viewport)||u)&&(e._rsComp=Ge.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:An.ALPHA_BLEND})),l(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}hC.prototype.executeTranslucentCommands=function(e,t,n,i,o){let r=e.frameState.useLogDepth,s=e.context,a=n.framebuffer;for(let c=0;c<i.length;++c){let u=i[c];if(u=r?u.derivedCommands.logDepth.command:u,u.depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}}if(this._hasTranslucentDepth){eCt(this,s,n,o),n.framebuffer=this._drawClassificationFBO.framebuffer,this._clearDepthStencilCommand.execute(s,n);for(let c=0;c<i.length;++c){let u=i[c];if(u=r?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}};hC.prototype.executeClassificationCommands=function(e,t,n,i){if(!this._hasTranslucentDepth)return;let o=e.context,r=o.uniformState,s=n.framebuffer;n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=this._drawClassificationFBO.framebuffer,this._frustumsDrawn>1&&this._clearColorCommand.execute(o,n),r.updatePass(Be.CESIUM_3D_TILE_CLASSIFICATION);let a=r.globeDepthTexture;r.globeDepthTexture=this._packFBO.getColorTexture();let c=i.commands[Be.CESIUM_3D_TILE_CLASSIFICATION],u=i.indices[Be.CESIUM_3D_TILE_CLASSIFICATION];for(let f=0;f<u;++f)t(c[f],e,n);r.globeDepthTexture=a,n.framebuffer=s,this._frustumsDrawn!==1&&(n.framebuffer=this._accumulationFBO.framebuffer,this._accumulateCommand.execute(o,n),n.framebuffer=s)};hC.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),tCt(this,e,t)};function tCt(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}hC.prototype.isSupported=function(){return this._supported};hC.prototype.isDestroyed=function(){return!1};hC.prototype.destroy=function(){return qIe(this),KIe(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()),ue(this)};var wQ=hC;function nCt(){this.command=void 0,this.near=void 0,this.far=void 0}function AH(e,t,n){let i=e.context,o;i.depthTexture&&(o=new CQ);let r;e._useOIT&&i.depthTexture&&(r=new IQ(i));let s=new vc(i);s.viewport=qe.clone(n),this.camera=t,this._cameraClone=_o.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new SQ(i),this.pickDepthFramebuffer=new bQ,this.sceneFramebuffer=new OI,this.globeDepth=o,this.globeTranslucencyFramebuffer=new EQ,this.oit=r,this.translucentTileClassification=new wQ(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var CJ=new d,EJ=new d;function iCt(e,t,n){let i=Math.max(d.maximumComponent(d.abs(e.position,CJ)),d.maximumComponent(d.abs(t.position,EJ))),o=1/Math.max(1,i);return d.multiplyByScalar(e.position,o,CJ),d.multiplyByScalar(t.position,o,EJ),d.equalsEpsilon(CJ,EJ,n)&&d.equalsEpsilon(e.direction,t.direction,n)&&d.equalsEpsilon(e.up,t.up,n)&&d.equalsEpsilon(e.right,t.right,n)&&M.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}AH.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return iCt(t,n,D.EPSILON15)?(this._cameraStartFired&&Mi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Mi(),_o.clone(t,n),!0)};function oCt(e,t,n,i){let{frameState:o}=t,{camera:r,useLogDepth:s}=o,a=s?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,c=t.mode===oe.SCENE2D,u=t.nearToFarDistance2D;i*=1+D.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let f;c?(i=Math.min(i,r.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:h}=e;h.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));let _=h[p];l(_)?(_.near=g,_.far=m):_=h[p]=new yQ(g,m)}}function rCt(e,t,n){let{command:i,near:o,far:r}=n;t.debugShowFrustums&&(i.debugOverlappingFrustums=0);let{frustumCommandsList:s}=e;for(let a=0;a<s.length;++a){let c=s[a];if(o>c.far)continue;if(r<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 XIe=new vs,sCt=new rc;AH.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:o}=t,{positionWC:r,directionWC:s,frustum:a}=n,c=e._computeCommandList,u=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let f=this.frustumCommandsList;for(let N=0;N<f.length;++N)for(let L=0;L<Be.NUMBER_OF_PASSES;++L)f[N].indices[L]=0;c.length=0,u.length=0;let h=this._commandExtents,p=h.length,g=0,m=+Number.MAX_VALUE,_=-Number.MAX_VALUE,{shadowsEnabled:y}=o,C=+Number.MAX_VALUE,E=-Number.MAX_VALUE,I=Number.MAX_VALUE,b=t.mode===oe.SCENE3D?t.occluder:void 0,{cullingVolume:S}=t,B=XIe.planes;for(let N=0;N<5;++N)B[N]=S.planes[N];S=XIe;for(let N=0;N<i.length;++N){let L=i[N],{pass:A,boundingVolume:x}=L;if(A===Be.COMPUTE)c.push(L);else if(A===Be.OVERLAY)u.push(L);else{let T,w;if(l(x)){if(!e.isVisible(S,L,b))continue;let O=x.computePlaneDistances(r,s,sCt);if(T=O.start,w=O.stop,m=Math.min(m,T),_=Math.max(_,w),y&&L.receiveShadows&&T<Jg.MAXIMUM_DISTANCE&&!(A===Be.GLOBE&&T<-100&&w>100)){let k=w-T;A!==Be.GLOBE&&T<100&&(I=Math.min(I,k)),C=Math.min(C,T),E=Math.max(E,w)}}else L instanceof pi?(T=a.near,w=a.far):(T=a.near,w=a.far,m=Math.min(m,T),_=Math.max(_,w));let R=h[g];l(R)||(R=h[g]=new nCt),R.command=L,R.near=T,R.far=w,g++}}y&&(C=Math.min(Math.max(C,a.near),a.far),E=Math.max(Math.min(E,a.far),C),o.nearPlane=C,o.farPlane=E,o.closestObjectSize=I),oCt(this,e,m,_);for(let N=0;N<g;N++)rCt(this,e,h[N]);if(g<p)for(let N=g;N<p;N++){let L=h[N];if(!l(L.command))break;L.command=void 0}let v=f.length,{frustumSplits:P}=t;P.length=v+1;for(let N=0;N<v;++N)P[N]=f[N].near,N===v-1&&(P[N+1]=f[N].far)};AH.prototype.destroy=function(){this.pickFramebuffer=this.pickFramebuffer&&this.pickFramebuffer.destroy(),this.pickDepthFramebuffer=this.pickDepthFramebuffer&&this.pickDepthFramebuffer.destroy(),this.sceneFramebuffer=this.sceneFramebuffer&&this.sceneFramebuffer.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 kI=AH;var ZIe=.1,aCt=new Hd({pass:Ko.MOST_DETAILED_PRELOAD}),cCt=new Hd({pass:Ko.MOST_DETAILED_PICK}),BQ=new Hd({pass:Ko.PICK});function Sa(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new qe(0,0,1,1),n=new _o(e);n.frustum=new mn({width:ZIe,aspectRatio:1,near:.1}),this._pickOffscreenView=new kI(e,n,t)}Sa.prototype.update=function(){this._pickPositionCacheDirty=!0};Sa.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new _Q,n[t]=i),i};var lCt=new Jr,uCt=new d,gH=new d,fCt=new U,dCt=new M;function hCt(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2*(t.x-o.x)/o.width-1;c*=(s.right-s.left)*.5;let u=2*(o.height-t.y-o.y)/o.height-1;u*=(s.top-s.bottom)*.5;let f=M.clone(r.transform,dCt);r._setTransform(M.IDENTITY);let h=d.clone(r.position,uCt);d.multiplyByScalar(r.right,c,gH),d.add(gH,h,h),d.multiplyByScalar(r.up,u,gH),d.add(gH,h,h),r._setTransform(f),e.mode===oe.SCENE2D&&d.fromElements(h.z,h.x,h.y,h);let p=s.getPixelDimensions(o.width,o.height,1,1,fCt),g=lCt;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(h,r.directionWC,r.upWC)}var mCt=new zl,pCt=new U;function ACt(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,c=Math.tan(s.fovy*.5),u=s.aspectRatio*c,f=2*(t.x-o.x)/o.width-1,h=2*(o.height-t.y-o.y)/o.height-1,p=f*a*u,g=h*a*c,m=s.getPixelDimensions(o.width,o.height,1,1,pCt),_=m.x*n*.5,y=m.y*i*.5,C=mCt;return C.top=g+y,C.bottom=g-y,C.right=p+_,C.left=p-_,C.near=a,C.far=s.far,C.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}function _H(e,t,n,i,o){let r=e.camera.frustum;return r instanceof mn||r instanceof Jr?hCt(e,t,n,i,o):ACt(e,t,n,i,o)}var yH=new qe(0,0,3,3),CH=new U,DQ=new G(0,0,0,0);function IJ(e,t,n,i,o){return o.width=n??3,o.height=i??o.width,o.x=t.x-(o.width-1)*.5,o.y=e-t.y-(o.height-1)*.5,o}Sa.prototype.pick=function(e,t,n,i){let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=qe.clone(a,u.viewport);let f=Ji.transformWindowToDrawingBuffer(e,t,CH),h=IJ(o.drawingBufferHeight,f,n,i,yH);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=_H(e,f,h.width,h.height,a),r.invertClassification=!1,r.passes.pick=!0,r.tilesetPassState=BQ,o.uniformState.update(r),e.updateEnvironment(),u=c.begin(h,a),e.updateAndExecuteCommands(u,DQ),e.resolveFramebuffers(u);let p=c.end(h);return o.endFrame(),p};Sa.prototype.pickVoxelCoordinate=function(e,t,n,i){let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let u=s.passState;u.viewport=qe.clone(a,u.viewport);let f=Ji.transformWindowToDrawingBuffer(e,t,CH),h=IJ(o.drawingBufferHeight,f,n,i,yH);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=_H(e,f,h.width,h.height,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=BQ,o.uniformState.update(r),e.updateEnvironment(),u=c.begin(h,a),e.updateAndExecuteCommands(u,DQ),e.resolveFramebuffers(u);let p=c.readCenterPixel(h);return o.endFrame(),p};Sa.prototype.pickMetadata=function(e,t,n){let{context:i,frameState:o,defaultView:r}=e,{viewport:s,pickFramebuffer:a}=r;e.view=r,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=r.passState;c.viewport=qe.clone(s,c.viewport);let u=Ji.transformWindowToDrawingBuffer(e,t,CH),f=IJ(i.drawingBufferHeight,u,1,1,yH);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=_H(e,u,f.width,f.height,s),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=BQ,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),c=a.begin(f,s),e.updateAndExecuteCommands(c,DQ);let h=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=h;let p=a.readCenterPixel(f);return i.endFrame(),o.pickingMetadata=!1,gQ.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function gCt(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=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=qe.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=_H(e,t,1,1,s),o.tilesetPassState=BQ,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,DQ),e.resolveFramebuffers(c),i.endFrame()}var _Ct=new Fi,yCt=new zl,CCt=new mn,ECt=new Jr;Sa.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 d.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let u=Ji.transformWindowToDrawingBuffer(e,t,CH);e.pickTranslucentDepth?gCt(e,u):(e.updateFrameState(),c.update(r),e.updateEnvironment()),u.y=e.drawingBufferHeight-u.y;let f;l(s.frustum.fov)?f=s.frustum.clone(_Ct):l(s.frustum.infiniteProjectionMatrix)?f=s.frustum.clone(yCt):l(s.frustum.width)?f=s.frustum.clone(CCt):f=s.frustum.clone(ECt);let{frustumCommandsList:h}=a,p=h.length;for(let g=0;g<p;++g){let _=this.getPickDepth(e,g).getDepth(o,u.x,u.y);if(l(_)&&_>0&&_<1){let y=h[g],C;return e.mode===oe.SCENE2D?(C=s.position.z,s.position.z=C-y.near+1,f.far=Math.max(1,y.far-y.near),f.near=1,c.update(r),c.updateFrustum(f)):(f.near=y.near*(g!==0?e.opaqueFrustumNearOffset:1),f.far=y.far,c.updateFrustum(f)),n=Ji.drawingBufferToWorldCoordinates(e,u,_,n),e.mode===oe.SCENE2D&&(s.position.z=C,c.update(r)),this._pickPositionCache[i]=d.clone(n),n}}this._pickPositionCache[i]=void 0};var ICt=new me;Sa.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==oe.SCENE3D){d.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,ICt);o.cartographicToCartesian(r,n)}return n};function $Ie(e,t){let n,i,o=[],r=[],s=[],a=[];l(e)||(e=Number.MAX_VALUE);let c=t();for(;l(c);){let u=c.object,f=c.position,h=c.exclude;if(l(f)&&!l(u)){o.push(c);break}if(!l(u)||!l(u.primitive)||!h&&(o.push(c),0>=--e))break;let p=u.primitive,g=!1;typeof p.getGeometryInstanceAttributes=="function"&&l(u.id)&&(i=p.getGeometryInstanceAttributes(u.id),l(i)&&l(i.show)&&(g=!0,i.show=wn.toValue(!1,i.show),s.push(i))),u instanceof da&&(g=!0,u.show=!1,a.push(u)),g||(p.show=!1,r.push(p)),c=t()}for(n=0;n<r.length;++n)r[n].show=!0;for(n=0;n<s.length;++n)i=s[n],i.show=wn.toValue(!0,i.show);for(n=0;n<a.length;++n)a[n].show=!0;return o}Sa.prototype.drillPick=function(e,t,n,i,o){let r=this;return $Ie(n,function(){let c=r.pick(e,t,i,o);if(l(c))return{object:c,position:void 0,exclude:!1}}).map(function(c){return c.object})};var JIe=new d,xCt=new d;function bCt(e,t,n){this.ray=e,this.width=t,this.tilesets=n,this.ready=!1;let i=this;this.promise=new Promise(o=>{i._completePick=()=>{o()}})}function exe(e,t,n,i){let o=t.direction,r=d.mostOrthogonalAxis(o,JIe),s=d.cross(o,r,JIe),a=d.cross(o,s,xCt);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=n??ZIe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function TCt(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=exe(e,o,r,a),u=aCt;u.camera=a,u.cullingVolume=c;let f=!0,h=s.length;for(let p=0;p<h;++p){let g=s[p];g.show&&t.primitives.contains(g)&&(g.updateForPass(i,u),f=f&&u.ready)}return f&&n._completePick(),f}Sa.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)TCt(this,e,t[n])&&t.splice(n--,1)};function txe(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof Ol&&txe(o,t,n))}}function EH(e,t,n,i,o,r){let s=[];if(txe(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new bCt(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function SCt(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 wCt(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,u=a.uniformState,f=e._pickOffscreenView;t.view=f,exe(e,n,o,f.camera);let h=qe.clone(f.viewport,yH),p=f.pickFramebuffer.begin(h,f.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=cCt:c.tilesetPassState=BQ,u.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,DQ),t.resolveFramebuffers(p);let g,m=f.pickFramebuffer.end(h);if(t.context.depthTexture){let{frustumCommandsList:_}=f,y=_.length;for(let C=0;C<y;++C){let I=e.getPickDepth(t,C).getDepth(a,0,0);if(l(I)&&I>0&&I<1){let b=_[C],S=b.near*(C!==0?t.opaqueFrustumNearOffset:1),B=b.far,v=S+I*(B-S);g=xn.getPoint(n,v);break}}}if(t.view=t.defaultView,a.endFrame(),l(m)||l(g))return{object:m,position:g,exclude:!l(g)&&r||SCt(m,i)}}function nxe(e,t,n,i,o,r,s,a){return $Ie(i,function(){return wCt(e,t,n,o,r,s,a)})}function gw(e,t,n,i,o,r,s){let a=nxe(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function ixe(e,t,n,i,o,r,s,a){return nxe(e,t,n,i,o,r,s,a)}function IH(e,t){return new Promise((n,i)=>{t.then(function(o){let r=e.postRender.addEventListener(function(){r(),n(o)});e.requestRender()}).catch(function(o){i(o)})})}Sa.prototype.pickFromRay=function(e,t,n,i){return gw(this,e,t,n,i,!1,!1)};Sa.prototype.drillPickFromRay=function(e,t,n,i,o){return ixe(this,e,t,n,i,o,!1,!1)};Sa.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=xn.clone(t),n=l(n)?n.slice():n,IH(e,EH(o,e,t,n,i,function(){return gw(o,e,t,n,i,!1,!0)}))};Sa.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=xn.clone(t),i=l(i)?i.slice():i,IH(e,EH(r,e,t,i,o,function(){return ixe(r,e,t,n,i,o,!1,!0)}))};var BCt=new d,DCt=new d,vCt=new xn,oxe=new me;function xJ(e,t){let n=e.ellipsoid,i=Ii._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,DCt),r=me.toCartesian(t,n,BCt),s=vCt;s.origin=r,s.direction=o;let a=new xn;return xn.getPoint(s,i,a.origin),d.negate(o,a.direction),a}function rxe(e,t){let n=e.ellipsoid,i=me.fromCartesian(t,n,oxe);return xJ(e,i)}function sxe(e,t){let n=e.ellipsoid;return me.fromCartesian(t,n,oxe).height}function PCt(e,t,n,i,o){let r=xJ(t,n);return EH(e,t,r,i,o,function(){let s=gw(e,t,r,i,o,!0,!0);if(l(s))return sxe(t,s.position)})}function RCt(e,t,n,i,o,r){let s=rxe(t,n);return EH(e,t,s,i,o,function(){let a=gw(e,t,s,i,o,!0,!0);if(l(a))return d.clone(a.position,r)})}Sa.prototype.sampleHeight=function(e,t,n,i){let o=xJ(e,t),r=gw(this,e,o,n,i,!0,!1);if(l(r))return sxe(e,r.position)};Sa.prototype.clampToHeight=function(e,t,n,i,o){let r=rxe(e,t),s=gw(this,e,r,n,i,!0,!1);if(l(s))return d.clone(s.position,o)};Sa.prototype.sampleHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=PCt(this,e,t[s],n,i);return IH(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c].height=s[c];return t}))};Sa.prototype.clampToHeightMostDetailed=function(e,t,n,i){n=l(n)?n.slice():n;let o=t.length,r=new Array(o);for(let s=0;s<o;++s)r[s]=RCt(this,e,t[s],n,i,t[s]);return IH(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};Sa.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var vQ=Sa;var PQ=`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 RQ=`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; // Avoid numerical error at far plane if (depth >= 1.0) { posEC.z = czm_currentFrustum.y; } return posEC; } // Reconstruct surface normal in eye coordinates, avoiding edges vec3 getNormalXEdge(vec3 positionEC) { // Find the 3D surface positions at adjacent screen pixels 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; // Compute potential tangent vectors vec3 dx0 = positionEC - positionLeft; vec3 dx1 = positionRight - positionEC; vec3 dy0 = positionEC - positionDown; vec3 dy1 = positionUp - positionEC; // The shorter tangent is more likely to be on the same surface 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); // Exit if we are too close to the back of the frustum, where the depth value is invalid. 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); // Choose a step length such that the marching stops just before 3 * variance. float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0); float metersPerPixel = czm_metersPerPixel(positionEC, 1.0); // Minimum step is 1 pixel to avoid double sampling 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); // Initial sampling direction (different for each pixel) 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; // Loop over sampling directions #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 // Step along sampling direction, away from output pixel vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5); // Exit if we stepped off the screen if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) { break; } // Compute step vector from output point to sampled point vec4 samplePositionEC = pixelToEye(samplePixel); vec3 stepVector = samplePositionEC.xyz - positionEC.xyz; // Estimate the angle from the surface normal. 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); // Weight contribution based on the distance from the output point 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 MQ=`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 NQ=`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 LQ=`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 OQ=`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 FQ=`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 QQ=`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 kQ=`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 UQ=`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 GQ=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; #ifdef AUTO_EXPOSURE uniform sampler2D autoExposure; #else uniform float exposure; #endif // See slides 142 and 143: // http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting 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; // shoulder strength const float B = 0.30; // linear strength const float C = 0.10; // linear angle const float D = 0.20; // toe strength const float E = 0.01; // toe numerator const float F = 0.30; // toe denominator const float white = 11.2; // linear white point value 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 zQ=`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 VQ=`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 mC=`#define SAMPLES 8 uniform float delta; uniform float sigma; uniform float direction; // 0.0 for x direction, 1.0 for y direction uniform sampler2D colorTexture; #ifdef USE_STEP_SIZE uniform float stepSize; #else uniform vec2 step; #endif in vec2 v_textureCoordinates; // Incremental Computation of the Gaussian: // https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html 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 HQ=`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; // whether it is in space or not // 6500000.0 is empirical value #define DISTANCE_TO_SPACE 6500000.0 // return ndc from world coordinate biased earthRadius 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); } // Check if current pixel is included Earth // if then mask it gradually 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)); } // For Chromatic effect 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; // Sun position 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 sun is not in the screen space, use original color. if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1))) { // Lens flare is disabled when not in space until #5932 is fixed. // https://github.com/CesiumGS/cesium/issues/5932 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); // ghost vector to image centre: vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal; vec3 direction = normalize(vec3(ghostVec, 0.0)); // sample ghosts: vec4 result = vec4(0.0); vec4 ghost = vec4(0.0); for (int i = 0; i < 4; ++i) { vec2 offset = fract(texcoord + ghostVec * float(i)); // Only bright spots from the centre of the source image ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace); } result += ghost; // sample halo 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; // dirt on lens 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); // Rotating starburst texture's coordinate // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0)) 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 WQ=`uniform sampler2D colorTexture; uniform vec3 white; in vec2 v_textureCoordinates; #ifdef AUTO_EXPOSURE uniform sampler2D autoExposure; #else uniform float exposure; #endif // See equation 4: // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf 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 jQ=`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 YQ=`uniform sampler2D colorTexture; in vec2 v_textureCoordinates; #ifdef AUTO_EXPOSURE uniform sampler2D autoExposure; #else uniform float exposure; #endif // See equation 3: // http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf 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 qQ=`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); } `;function UI(){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 Si,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(UI.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 axe(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 MCt(e,t){axe(e);let n=e._width,i=e._height,o=t.halfFloatingPointTexture?Ve.HALF_FLOAT:Ve.FLOAT,r=Math.ceil(Math.log(Math.max(n,i))/Math.log(3)),s=new Array(r);for(let c=0;c<r;++c)n=Math.max(Math.ceil(n/3),1),i=Math.max(Math.ceil(i/3),1),s[c]=new Si,s[c].update(t,n,i,1,o);let a=s[r-1].getColorTexture(0);e._previousLuminance.update(t,a.width,a.height,1,o),e._framebuffers=s}function cxe(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 NCt(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 LCt(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 OCt(e,t){cxe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(LCt(r,i),{framebuffer:n[r].framebuffer,uniformMap:NCt(e,r)});e._commands=o}UI.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new pi({color:new G(0,0,0,0),framebuffer:void 0}));let i=t.length;for(let o=0;o<i;++o)t[o].clear(e,n)};UI.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,MCt(this,e),OCt(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;let i=this._framebuffers,o=i[i.length-1];i[i.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance.framebuffer,this._previousLuminance=o};UI.prototype.execute=function(e,t){this._colorTexture=t;let n=this._commands;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o)n[o].execute(e)};UI.prototype.isDestroyed=function(){return!1};UI.prototype.destroy=function(){return axe(this),cxe(this),ue(this)};var KQ=UI;var FCt={NEAREST:0,LINEAR:1},wf=FCt;function GI(e){e=e??V.EMPTY_OBJECT;let{name:t=qn(),fragmentShader:n,uniforms:i,textureScale:o=1,forcePowerOfTwo:r=!1,sampleMode:s=wf.NEAREST,pixelFormat:a=$e.RGBA,pixelDatatype:c=Ve.UNSIGNED_BYTE,clearColor:u=G.BLACK,scissorRectangle:f}=e;this._fragmentShader=n,this._uniforms=i,this._textureScale=o,this._forcePowerOfTwo=r,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 h=new vc;h.scissorTest={enabled:!0,rectangle:l(f)?qe.clone(f):new qe},this._passState=h,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(GI.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 QCt=/uniform\s+sampler2D\s+depthTexture/g;GI.prototype._isSupported=function(e){return!QCt.test(this._fragmentShader)||e.depthTexture};function kCt(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(o){let r=t[n];t[n]=o;let s=e._actualUniforms,a=s[n];l(a)&&a!==r&&a instanceof Nt&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Nt&&e._texturesToRelease.push(r),typeof o=="string"||o instanceof HTMLCanvasElement||o instanceof HTMLImageElement||o instanceof HTMLVideoElement||o instanceof ImageData?e._dirtyUniforms.push(n):s[n]=o}}}function UCt(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function GCt(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function zCt(e){if(l(e._uniformMap))return;let t={},n={},i=e._uniforms,o=e._actualUniforms;for(let r in i){if(!i.hasOwnProperty(r))continue;typeof i[r]!="function"?(t[r]=UCt(e,r),n[r]=kCt(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Nt||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=GCt(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=St(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 VCt(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 HCt(e,t){if(l(e._command)&&!e._logDepthChanged&&!e._selectedDirty)return;let n=e._fragmentShader;if(l(e._selectedIdTexture)){let o=e._selectedIdTexture.width;n=VCt(n,o)}let i=new He({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function WCt(e){let t=e._sampleMode,n,i;t===wf.LINEAR?(n=$t.LINEAR,i=di.LINEAR):(n=$t.NEAREST,i=di.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function jCt(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function YCt(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function qCt(e,t){let n=e._texturesToRelease;for(let a=0;a<n.length;++a){let c=n[a];c=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 Nt({context:t,source:u})}i.length=0;let o=e._dirtyUniforms;if(o.length===0&&!l(e._texturePromise)){e._ready=!0;return}if(o.length===0||l(e._texturePromise))return;let r=e._uniforms,s=[];for(let a=0;a<o.length;++a){let c=o[a],u=r[c],f=e._textureCache.getStageByName(u);if(l(f))e._actualUniforms[c]=YCt(e,u);else if(typeof u=="string"){let h=new we({url:u});s.push(h.fetchImage().then(jCt(e,c)))}else e._texturesToCreate.push({name:c,source:u})}o.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 lxe(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 o in i){if(!i.hasOwnProperty(o))continue;let r=i[o];r instanceof Nt&&(l(t.getStageByName(n[o]))||r.destroy(),e._dirtyUniforms.push(o))}}function KCt(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 o=0;o<e._combinedSelected.length;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}function XCt(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 s=0;s<n.length;++s){let a=n[s];l(a.pickIds)?i+=a.pickIds.length:l(a.pickId)&&++i}if(n.length===0||i===0){let s=new Uint8Array([255,255,255,255]);e._selectedIdTexture=new Nt({context:t,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:nn.NEAREST});return}let o=0,r=new Uint8Array(i*4);for(let s=0;s<n.length;++s){let a=n[s];if(l(a.pickIds)){let c=a.pickIds,u=c.length;for(let f=0;f<u;++f){let h=c[f].color;r[o]=G.floatToByte(h.red),r[o+1]=G.floatToByte(h.green),r[o+2]=G.floatToByte(h.blue),r[o+3]=G.floatToByte(h.alpha),o+=4}}else if(l(a.pickId)){let c=a.pickId.color;r[o]=G.floatToByte(c.red),r[o+1]=G.floatToByte(c.green),r[o+2]=G.floatToByte(c.blue),r[o+3]=G.floatToByte(c.alpha),o+=4}}e._selectedIdTexture=new Nt({context:t,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:nn.NEAREST})}GI.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&lxe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=KCt(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,XCt(this,e),zCt(this),qCt(this,e),HCt(this,e),WCt(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),o;(i.width!==e.drawingBufferWidth||i.height!==e.drawingBufferHeight)&&(o=this._renderState,(!l(o)||i.width!==o.viewport.width||i.height!==o.viewport.height)&&(this._renderState=Ge.fromCache({viewport:new qe(0,0,i.width,i.height)}))),this._command.renderState=o};GI.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,nn.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);let o=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;l(o)&&(o.context=e),this._command.execute(e,o)};GI.prototype.isDestroyed=function(){return!1};GI.prototype.destroy=function(){return lxe(this),ue(this)};var bo=GI;function zI(e){e=e??V.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=qn()),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(zI.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}}});zI.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};zI.prototype.get=function(e){return this._stages[e]};function JCt(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 o=0;o<t;++o)if(e._combinedSelected[o]!==e._combinedSelectedShadow[o])return!0}return i}zI.prototype.update=function(e,t){this._selectedDirty=JCt(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 o=0;o<i;++o){let r=n[o];this._selectedDirty&&(r.parentSelected=this._combinedSelected),r.update(e,t)}};zI.prototype.isDestroyed=function(){return!1};zI.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return ue(this)};var Du=zI;var Yr={};function bJ(e){let o=`#define USE_STEP_SIZE ${mC}`,r=new bo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:wf.LINEAR}),s=new bo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:wf.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(c){let u=r.uniforms,f=s.uniforms;u.delta=f.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let u=r.uniforms,f=s.uniforms;u.sigma=f.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let u=r.uniforms,f=s.uniforms;u.stepSize=f.stepSize=c}}}),new Du({name:e,stages:[r,s],uniforms:a})}Yr.createBlurStage=function(){return bJ("czm_blur")};Yr.createDepthOfFieldStage=function(){let e=bJ("czm_depth_of_field_blur"),t=new bo({name:"czm_depth_of_field_composite",fragmentShader:QQ,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 Du({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};Yr.isDepthOfFieldSupported=function(e){return e.context.depthTexture};Yr.createEdgeDetectionStage=function(){let e=qn();return new bo({name:`czm_edge_detection_${e}`,fragmentShader:UQ,uniforms:{length:.25,color:G.clone(G.BLACK)}})};Yr.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function ZCt(e){if(!l(e))return Yr.createEdgeDetectionStage();let t=new Du({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a}; `,o+=` 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 r=`${i}in vec2 v_textureCoordinates; void main() { vec4 color = vec4(0.0); for (int i = 0; i < ${e.length}; i++) { ${o} } out_FragColor = color; } `,s=new bo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new Du({name:"czm_edge_detection_composite",stages:[t,s]})}Yr.createSilhouetteStage=function(e){let t=ZCt(e),n=new bo({name:"czm_silhouette_color_edges",fragmentShader:qQ,uniforms:{silhouetteTexture:t.name}});return new Du({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};Yr.isSilhouetteSupported=function(e){return e.context.depthTexture};Yr.createBloomStage=function(){let e=new bo({name:"czm_bloom_contrast_bias",fragmentShader:FQ,uniforms:{contrast:128,brightness:-.3}}),t=bJ("czm_bloom_blur"),n=new Du({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new bo({name:"czm_bloom_generate_composite",fragmentShader:LQ,uniforms:{glowOnly:!1,bloomTexture:n.name}}),o={};return Object.defineProperties(o,{glowOnly:{get:function(){return i.uniforms.glowOnly},set:function(r){i.uniforms.glowOnly=r}},contrast:{get:function(){return e.uniforms.contrast},set:function(r){e.uniforms.contrast=r}},brightness:{get:function(){return e.uniforms.brightness},set:function(r){e.uniforms.brightness=r}},delta:{get:function(){return t.uniforms.delta},set:function(r){t.uniforms.delta=r}},sigma:{get:function(){return t.uniforms.sigma},set:function(r){t.uniforms.sigma=r}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(r){t.uniforms.stepSize=r}}}),new Du({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};Yr.createAmbientOcclusionStage=function(){let e=new bo({name:"czm_ambient_occlusion_generate",fragmentShader:RQ,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new bo({name:"czm_ambient_occlusion_composite",fragmentShader:MQ,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 Du({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};Yr.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var $Ct=`#define FXAA_QUALITY_PRESET 39 ${E2} ${VQ}`;Yr.createFXAAStage=function(){return new bo({name:"czm_FXAA",fragmentShader:$Ct,sampleMode:wf.LINEAR})};Yr.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE `:"";return t+=PQ,new bo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};Yr.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE `:"";return t+=GQ,new bo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};Yr.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE `:"";return t+=zQ,new bo({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};Yr.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE `:"";return t+=YQ,new bo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};Yr.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE `:"";return t+=WQ,new bo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:G.WHITE,autoExposure:void 0,exposure:1}})};Yr.createAutoExposureStage=function(){return new KQ};Yr.createBlackAndWhiteStage=function(){return new bo({name:"czm_black_and_white",fragmentShader:NQ,uniforms:{gradations:5}})};Yr.createBrightnessStage=function(){return new bo({name:"czm_brightness",fragmentShader:OQ,uniforms:{brightness:.5}})};Yr.createNightVisionStage=function(){return new bo({name:"czm_night_vision",fragmentShader:jQ})};Yr.createDepthViewStage=function(){return new bo({name:"czm_depth_view",fragmentShader:kQ})};Yr.createLensFlareStage=function(){return new bo({name:"czm_lens_flare",fragmentShader:HQ,uniforms:{dirtTexture:fn("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:fn("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ne.WGS84.maximumRadius}})};var Bf=Yr;function Zg(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function JQ(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function TJ(e,t,n,i,o){if(!i.enabled||!i._isSupported(t))return o;let r=n[i.name]={};if(l(o)){let a=e.getStageByName(o);r[JQ(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 h=e.getStageByName(f);l(h)&&(r[JQ(h)]=!0)}}}return i.name}function XQ(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,c=i.length;for(let h=0;h<c;++h){let p=i.get(h);l(p.length)?a=XQ(e,t,n,p,o):a=TJ(e,t,n,p,o),s&&(o=a)}let u,f;if(s)for(u=1;u<c;++u)f=JQ(i.get(u)),l(n[f])||(n[f]={}),n[f][r]=!0;else for(u=1;u<c;++u){f=JQ(i.get(u));let h=n[f];for(let p=0;p<u;++p)h[JQ(i.get(p))]=!0}return a}function eEt(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=XQ(e,t,n,i,void 0);a=XQ(e,t,n,o,a),a=TJ(e,t,n,r,a),a=XQ(e,t,n,e,a),TJ(e,t,n,s,a)}else XQ(e,t,n,e,void 0);return n}function tEt(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,c=o._pixelDatatype,u=o._clearColor,f,h,p=e._framebuffers,g=p.length;for(f=0;f<g;++f){if(h=p[f],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||c!==h.pixelDatatype||!G.equals(u,h.clearColor))continue;let m=h.stages,_=m.length,y=!1;for(let C=0;C<_;++C)if(n[m[C]]){y=!0;break}if(!y)break}return l(h)&&f<g?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:u,stages:[t],buffer:new Si({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(h),h)}function nEt(e,t){let n=eEt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=tEt(e,i,n[i]))}function SJ(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function iEt(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.textureScale,u=Math.ceil(n*c),f=Math.ceil(i*c),h=Math.min(u,f);a.forcePowerOfTwo&&(D.isPowerOfTwo(h)||(h=D.nextPowerOfTwo(h)),u=h,f=h),a.buffer.update(t,u,f),a.clear=new pi({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}Zg.prototype.updateDependencies=function(){this._updateDependencies=!0};Zg.prototype.update=function(e){let t=this._collection,n=this._updateDependencies,i=l(t.ambientOcclusion)&&t.ambientOcclusion.enabled&&t.ambientOcclusion._isSupported(e),o=l(t.bloom)&&t.bloom.enabled&&t.bloom._isSupported(e),r=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||o||r||s;if((n||!a&&this._framebuffers.length>0)&&(SJ(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&nEt(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,SJ(this),iEt(this,e))};Zg.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};Zg.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};Zg.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};Zg.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};Zg.prototype.isDestroyed=function(){return!1};Zg.prototype.destroy=function(){return SJ(this),ue(this)};var VI=Zg;var oEt={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};var $g=Object.freeze(oEt);var wJ=[];function Vl(){let e=Bf.createFXAAStage(),t=Bf.createAmbientOcclusionStage(),n=Bf.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Bf.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=$g.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new VI(this),r={},s=wJ;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();r[c.name]=c,c._textureCache=o;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=r,this._textureCache=o}Object.defineProperties(Vl.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,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.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 BJ(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 o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);let r=this._ao;if(r.enabled&&r.ready)return this.getOutputTexture(r.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 $g.REINHARD:n=Bf.createReinhardTonemappingStage(t);break;case $g.MODIFIED_REINHARD:n=Bf.createModifiedReinhardTonemappingStage(t);break;case $g.FILMIC:n=Bf.createFilmicTonemappingStage(t);break;case $g.PBR_NEUTRAL:n=Bf.createPbrNeutralTonemappingStage(t);break;default:n=Bf.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 BJ(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,o=0;i<n.length;++i){let r=n[i];r&&(r._index=o++,t.push(r))}e._stages=t}Vl.prototype.add=function(e){let t=this._stageNames,n=wJ;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};Vl.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=wJ;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};Vl.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};Vl.prototype.get=function(e){return BJ(this),this._stages[e]};Vl.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};Vl.prototype.getStageByName=function(e){return this._stageNames[e]};Vl.prototype.update=function(e,t,n){BJ(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages;o.length=r.length;let s=0;for(let C=0;C<r.length;++C){let E=r[C];E.ready&&E.enabled&&E._isSupported(e)&&(o[s++]=E)}o.length=s;let a=s!==i.length;if(!a){for(let C=0;C<s;++C)if(o[C]!==i[C]){a=!0;break}}let c=this._ao,u=this._bloom,f=this._autoExposure,h=this._tonemapping,p=this._fxaa;h.enabled=n;let g=c.enabled&&c._isSupported(e),m=u.enabled&&u._isSupported(e),_=h.enabled&&h._isSupported(e),y=p.enabled&&p._isSupported(e);if((a||this._textureCacheDirty||g!==this._aoEnabled||m!==this._bloomEnabled||_!==this._tonemappingEnabled||y!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=g,this._bloomEnabled=m,this._tonemappingEnabled=_,this._fxaaEnabled=y,this._textureCacheDirty=!1),l(this._randomTexture)&&!g&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&g){let E=new Uint8Array(196608);for(let I=0;I<196608;I+=3)E[I]=Math.floor(Math.random()*255);this._randomTexture=new Nt({context:e,pixelFormat:$e.RGB,pixelDatatype:Ve.UNSIGNED_BYTE,source:{arrayBufferView:E,width:256,height:256},sampler:new nn({wrapS:Pn.REPEAT,wrapT:Pn.REPEAT,minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),u.update(e,t),h.update(e,t),this._autoExposureEnabled&&f.update(e,t);for(let C=0;C<r.length;++C)r[C].update(e,t);s=0;for(let C=0;C<r.length;++C){let E=r[C];E.ready&&E.enabled&&E._isSupported(e)&&s++}a=s!==o.length,a&&this.update(e,t,n)};Vl.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function HI(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}Vl.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return HI(t)};function Gp(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){Gp(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)Gp(e.get(r),t,HI(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)Gp(e.get(r),t,n,i,o)}Vl.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,c=this._bloom,u=this._autoExposure,f=this._tonemapping,h=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),g=this._autoExposureEnabled,m=f.enabled&&f._isSupported(e),_=s.enabled&&s._isSupported(e);if(!_&&!h&&!p&&!m&&r===0)return;let y=t;h&&a.ready&&(Gp(a,e,y,n,i),y=HI(a)),p&&c.ready&&(Gp(c,e,y,n,i),y=HI(c)),g&&u.ready&&Gp(u,e,y,n,i),m&&f.ready&&(Gp(f,e,y,n,i),y=HI(f));let C=y;if(r>0){Gp(o[0],e,y,n,i);for(let E=1;E<r;++E)Gp(o[E],e,HI(o[E-1]),n,i);C=HI(o[r-1])}_&&s.ready&&Gp(s,e,C,n,i)};Vl.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Bu,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};Vl.prototype.isDestroyed=function(){return!1};Vl.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(),ue(this)};var ZQ=Vl;var rEt={SHIFT:0,CTRL:1,ALT:2},wa=Object.freeze(rEt);var sEt={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},Dn=Object.freeze(sEt);function pC(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function NJ(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function WI(e){if(e.shiftKey)return wa.SHIFT;if(e.ctrlKey)return wa.CTRL;if(e.altKey)return wa.ALT}var ta={LEFT:0,MIDDLE:1,RIGHT:2};function Df(e,t,n,i){function o(r){i(e,r)}jt.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function aEt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;jt.supportsPointerEvents()?(Df(e,"pointerdown",t,hEt),Df(e,"pointerup",t,yxe),Df(e,"pointermove",t,mEt),Df(e,"pointercancel",t,yxe)):(Df(e,"mousedown",t,Cxe),Df(e,"mouseup",n,Exe),Df(e,"mousemove",n,Ixe),Df(e,"touchstart",t,fEt),Df(e,"touchend",n,mxe),Df(e,"touchmove",n,dEt),Df(e,"touchcancel",n,mxe)),Df(e,"dblclick",t,lEt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Df(e,i,t,uEt)}function cEt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var uxe={position:new U};function LJ(e){e._lastSeenTouchEvent=Mi()}function OJ(e){return Mi()-e._lastSeenTouchEvent>Cm.mouseEmulationIgnoreMilliseconds}function MJ(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function Cxe(e,t){if(!OJ(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===ta.LEFT)i=Dn.LEFT_DOWN;else if(n===ta.MIDDLE)i=Dn.MIDDLE_DOWN;else if(n===ta.RIGHT)i=Dn.RIGHT_DOWN;else return;let o=pC(e,t,e._primaryPosition);U.clone(o,e._primaryStartPosition),U.clone(o,e._primaryPreviousPosition);let r=WI(t),s=e.getInputAction(i,r);l(s)&&(U.clone(o,uxe.position),s(uxe),t.preventDefault())}var fxe={position:new U},dxe={position:new U};function DJ(e,t,n,i){let o=WI(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=pC(e,i,e._primaryPosition);if(l(r)&&(U.clone(a,fxe.position),r(fxe)),l(s)){let c=e._primaryStartPosition;MJ(c,a,e._clickPixelTolerance)&&(U.clone(a,dxe.position),s(dxe))}}}function Exe(e,t){if(!OJ(e))return;let n=t.button;n!==ta.LEFT&&n!==ta.MIDDLE&&n!==ta.RIGHT||(e._buttonDown[ta.LEFT]&&(DJ(e,Dn.LEFT_UP,Dn.LEFT_CLICK,t),e._buttonDown[ta.LEFT]=!1),e._buttonDown[ta.MIDDLE]&&(DJ(e,Dn.MIDDLE_UP,Dn.MIDDLE_CLICK,t),e._buttonDown[ta.MIDDLE]=!1),e._buttonDown[ta.RIGHT]&&(DJ(e,Dn.RIGHT_UP,Dn.RIGHT_CLICK,t),e._buttonDown[ta.RIGHT]=!1))}var vJ={startPosition:new U,endPosition:new U};function Ixe(e,t){if(!OJ(e))return;let n=WI(t),i=pC(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Dn.MOUSE_MOVE,n);l(r)&&(U.clone(o,vJ.startPosition),U.clone(i,vJ.endPosition),r(vJ)),U.clone(i,o),(e._buttonDown[ta.LEFT]||e._buttonDown[ta.MIDDLE]||e._buttonDown[ta.RIGHT])&&t.preventDefault()}var hxe={position:new U};function lEt(e,t){let n=t.button,i;if(n===ta.LEFT)i=Dn.LEFT_DOUBLE_CLICK;else return;let o=WI(t),r=e.getInputAction(i,o);l(r)&&(pC(e,t,hxe.position),r(hxe))}function uEt(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===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=WI(t),o=e.getInputAction(Dn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function fEt(e,t){LJ(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,pC(e,r,new U));xH(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,U.clone(a.get(s)))}function mxe(e,t){LJ(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);xH(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var pxe={position:new U},PJ={position1:new U,position2:new U},Axe={position:new U},gxe={position:new U},_xe={position:new U};function xH(e,t){let n=WI(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[ta.LEFT]){if(e._buttonDown[ta.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Dn.LEFT_UP,n),l(r)&&(U.clone(e._primaryPosition,Axe.position),r(Axe)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(Dn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,u=e._previousPositions.values[0];MJ(c,u,e._clickPixelTolerance)&&(U.clone(e._primaryPosition,gxe.position),s(gxe))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(Dn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];U.clone(c,e._primaryPosition),U.clone(c,e._primaryStartPosition),U.clone(c,e._primaryPreviousPosition),e._buttonDown[ta.LEFT]=!0,r=e.getInputAction(Dn.LEFT_DOWN,n),l(r)&&(U.clone(c,pxe.position),r(pxe)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(Dn.RIGHT_CLICK,n),l(s))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];MJ(u,f,e._holdPixelTolerance)&&(U.clone(e._primaryPosition,_xe.position),s(_xe))}},Cm.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(Dn.PINCH_START,n),l(r)&&(U.clone(i.values[0],PJ.position1),U.clone(i.values[1],PJ.position2),r(PJ),t.preventDefault()))}function dEt(e,t){LJ(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let u=a.get(s);l(u)&&pC(e,r,u)}xxe(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,U.clone(a.get(s),c.get(s))}var RJ={startPosition:new U,endPosition:new U},$Q={distance:{startPosition:new U,endPosition:new U},angleAndHeight:{startPosition:new U,endPosition:new U}};function xxe(e,t){let n=WI(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[ta.LEFT]){let a=i.values[0];U.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(Dn.MOUSE_MOVE,n),l(s)&&(U.clone(c,RJ.startPosition),U.clone(a,RJ.endPosition),s(RJ)),U.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(Dn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],u=o.values[0],f=o.values[1],h=c.x-a.x,p=c.y-a.y,g=Math.sqrt(h*h+p*p)*.25,m=f.x-u.x,_=f.y-u.y,y=Math.sqrt(m*m+_*_)*.25,C=(c.y+a.y)*.125,E=(f.y+u.y)*.125,I=Math.atan2(p,h),b=Math.atan2(_,m);U.fromElements(0,y,$Q.distance.startPosition),U.fromElements(0,g,$Q.distance.endPosition),U.fromElements(b,E,$Q.angleAndHeight.startPosition),U.fromElements(I,C,$Q.angleAndHeight.endPosition),s($Q)}}function hEt(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,pC(e,t,new U)),xH(e,t),e._previousPositions.set(i,U.clone(n.get(i)))}else Cxe(e,t)}function yxe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),xH(e,t),e._previousPositions.remove(i)}else Exe(e,t)}function mEt(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;pC(e,t,o),xxe(e,t);let r=e._previousPositions;U.clone(n.get(i),r.get(i))}else Ixe(e,t)}function Cm(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Cm.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new U,this._primaryPosition=new U,this._primaryPreviousPosition=new U,this._positions=new Pt,this._previousPositions=new Pt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,aEt(this)}Cm.prototype.setInputAction=function(e,t,n){let i=NJ(t,n);this._inputEvents[i]=e};Cm.prototype.getInputAction=function(e,t){let n=NJ(e,t);return this._inputEvents[n]};Cm.prototype.removeInputAction=function(e,t){let n=NJ(e,t);delete this._inputEvents[n]};Cm.prototype.isDestroyed=function(){return!1};Cm.prototype.destroy=function(){return cEt(this),ue(this)};Cm.mouseEmulationIgnoreMilliseconds=800;Cm.touchHoldDelayMilliseconds=1500;var vf=Cm;function jI(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}jI.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};jI.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof mn,!(this._previousMode===oe.SCENE2D||this._previousMode===oe.MORPHING)&&(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE2D,!0),n._mode=oe.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===oe.COLUMBUS_VIEW?YEt(this,e):e0t(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var pEt=new d,AEt=new d,gEt=new d,_Et=new d,yEt=new d,CEt=new d,EEt=new d,IEt=new me,xEt=new M,bEt=new Fi,TEt=new mn,SEt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};jI.prototype.morphToColumbusView=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,this._previousMode===oe.COLUMBUS_VIEW||this._previousMode===oe.MORPHING)return;this._scene.morphStart.raiseEvent(this,this._previousMode,oe.COLUMBUS_VIEW,!0),n.camera._setTransform(M.IDENTITY);let i=pEt,o=AEt,r=gEt;if(e>0)i.x=0,i.y=-1,i.z=1,i=d.multiplyByScalar(d.normalize(i,i),5*t.maximumRadius,i),d.negate(d.normalize(i,o),o),d.cross(d.UNIT_X,o,r);else{let u=n.camera;if(this._previousMode===oe.SCENE2D)d.clone(u.position,i),i.z=u.frustum.right-u.frustum.left,d.negate(d.UNIT_Z,o),d.clone(d.UNIT_Y,r);else{d.clone(u.positionWC,i),d.clone(u.directionWC,o),d.clone(u.upWC,r);let f=t.scaleToGeodeticSurface(i,EEt),h=Qt.eastNorthUpToFixedFrame(f,t,xEt);M.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,IEt),i),M.multiplyByPointAsVector(h,o,o),M.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=TEt,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=bEt,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=D.toRadians(60));let a=SEt;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=n0t(a);ek(this,c),this._previousMode===oe.SCENE2D?t0t(this,e,a,c):(a.position2D=M.multiplyByPoint(_o.TRANSFORM_2D,i,_Et),a.direction2D=M.multiplyByPointAsVector(_o.TRANSFORM_2D,o,yEt),a.up2D=M.multiplyByPointAsVector(_o.TRANSFORM_2D,r,CEt),n._mode=oe.MORPHING,Nxe(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var kJ={position:new d,direction:new d,up:new d,frustum:void 0},Txe=new Fi;jI.prototype.morphTo3D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;if(this._previousMode=n.mode,!(this._previousMode===oe.SCENE3D||this._previousMode===oe.MORPHING)){if(this._scene.morphStart.raiseEvent(this,this._previousMode,oe.SCENE3D,!0),n._mode=oe.MORPHING,n.camera._setTransform(M.IDENTITY),this._previousMode===oe.SCENE2D)FEt(this,e,t);else{let i;e>0?(i=kJ,d.fromDegrees(0,0,5*t.maximumRadius,t,i.position),d.negate(i.position,i.direction),d.normalize(i.direction,i.direction),d.clone(d.UNIT_Z,i.up)):i=Sxe(this,t);let o,r=n.camera;r.frustum instanceof mn?o=r.frustum.clone():(o=Txe,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=D.toRadians(60)),i.frustum=o;let s=Oxe(i);ek(this,s),QJ(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};jI.prototype.isDestroyed=function(){return!1};jI.prototype.destroy=function(){return bH(this),ue(this)};function ek(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new vf(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Dn.LEFT_DOWN),e._morphHandler.setInputAction(n,Dn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Dn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Dn.WHEEL)}}function bH(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 wEt=new me,BEt=new d,DEt=new M;function Sxe(e,t){let n=e._scene,i=n.camera,o=kJ,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,wEt);t.cartographicToCartesian(c,r);let u=t.scaleToGeodeticSurface(r,BEt),f=Qt.eastNorthUpToFixedFrame(u,t,DEt);return M.multiplyByPointAsVector(f,i.direction,s),M.multiplyByPointAsVector(f,i.up,a),o}var vEt=new d,PEt=new d,REt=new d,MEt=new d,NEt=new d,LEt=new d;function QJ(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=d.clone(r.position,vEt),a=d.clone(r.direction,PEt),c=d.clone(r.up,REt),u=M.multiplyByPoint(_o.TRANSFORM_2D_INVERSE,n.position,MEt),f=M.multiplyByPointAsVector(_o.TRANSFORM_2D_INVERSE,n.direction,NEt),h=M.multiplyByPointAsVector(_o.TRANSFORM_2D_INVERSE,n.up,LEt);function p(m){jd(s,u,m.time,r.position),jd(a,f,m.time,r.direction),jd(c,h,m.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right)}let g=o.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Lxe(e,o,0,1,t,i)}});e._currentTweens.push(g)}var OEt=new mn,wxe=new d,Bxe=new d,Dxe=new d,UJ=new d,vxe=new d,Pxe=new d;function FEt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=kJ,d.fromDegrees(0,0,5*n.maximumRadius,n,r.position),d.negate(r.position,r.direction),d.normalize(r.direction,r.direction),d.clone(d.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=Sxe(e,n));let s;e._morphToOrthographic?(s=OEt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=Txe,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=D.toRadians(60)),r.frustum=s;let a=Oxe(r);ek(e,a);let c;e._morphToOrthographic?c=function(){QJ(e,t,r,a)}:c=function(){Mxe(e,t,r,function(){QJ(e,t,r,a)})},t>0?(i._mode=oe.SCENE2D,o.flyTo({duration:t,destination:d.fromDegrees(0,0,5*n.maximumRadius,n,UJ),complete:function(){i._mode=oe.MORPHING,c()}})):c()}function jd(e,t,n,i){return d.lerp(e,t,n,i)}function Rxe(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof mn)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 h=r.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}var QEt=new d,kEt=new d,UEt=new d,FJ=new d,GEt=new d,zEt=new d,VEt=new Jr,HEt=new xn,WEt=new d,jEt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function YEt(e,t){t*=.5;let n=e._scene,i=n.camera,o=d.clone(i.position,QEt),r=d.clone(i.direction,kEt),s=d.clone(i.up,UEt),a=d.negate(d.UNIT_Z,GEt),c=d.clone(d.UNIT_Y,zEt),u=FJ;if(t>0)d.clone(d.ZERO,FJ),u.z=5*n.ellipsoid.maximumRadius;else{d.clone(o,FJ);let y=HEt;M.multiplyByPoint(_o.TRANSFORM_2D,o,y.origin),M.multiplyByPointAsVector(_o.TRANSFORM_2D,r,y.direction);let C=n.globe;if(l(C)){let E=C.pickWorldCoordinates(y,n,!0,WEt);l(E)&&(M.multiplyByPoint(_o.TRANSFORM_2D_INVERSE,E,u),u.z+=d.distance(o,u))}}let f=VEt;f.right=u.z*.5,f.left=-f.right,f.top=f.right*(n.drawingBufferHeight/n.drawingBufferWidth),f.bottom=-f.top;let h=jEt;h.position=u,h.direction=a,h.up=c,h.frustum=f;let p=Fxe(h);ek(e,p);function g(y){jd(o,u,y.time,i.position),jd(r,a,y.time,i.direction),jd(s,c,y.time,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function m(y,C){y.position.z=C}let _=n.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){Rxe(e,t,h,m,p)}});e._currentTweens.push(_)}var bxe=new me,qEt={position:new d,direction:new d,up:new d,position2D:new d,direction2D:new d,up2D:new d,frustum:new Jr},KEt={position:new d,direction:new d,up:new d,frustum:void 0},XEt=new d,JEt=new xn,ZEt=new M,$Et=new d;function e0t(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=qEt;if(t>0)d.clone(d.ZERO,r.position),r.position.z=5*n.maximumRadius,d.negate(d.UNIT_Z,r.direction),d.clone(d.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,bxe),i.mapProjection.project(bxe,r.position),d.negate(d.UNIT_Z,r.direction),d.clone(d.UNIT_Y,r.up);let h=JEt;d.clone(r.position2D,h.origin);let p=d.clone(o.directionWC,h.direction),g=n.scaleToGeodeticSurface(o.positionWC,$Et),m=Qt.eastNorthUpToFixedFrame(g,n,ZEt);M.inverseTransformation(m,m),M.multiplyByPointAsVector(m,p,p),M.multiplyByPointAsVector(_o.TRANSFORM_2D,p,p);let _=i.globe;if(l(_)){let y=_.pickWorldCoordinates(h,i,!0,XEt);if(l(y)){let C=d.distance(r.position2D,y);y.x+=C,d.clone(y,r.position2D)}}}function s(h,p){h.position.x=p}M.multiplyByPoint(_o.TRANSFORM_2D,r.position,r.position2D),M.multiplyByPointAsVector(_o.TRANSFORM_2D,r.direction,r.direction2D),M.multiplyByPointAsVector(_o.TRANSFORM_2D,r.up,r.up2D);let a=r.frustum;a.right=r.position.z*.5,a.left=-a.right,a.top=a.right*(i.drawingBufferHeight/i.drawingBufferWidth),a.bottom=-a.top;let c=KEt;M.multiplyByPoint(_o.TRANSFORM_2D_INVERSE,r.position2D,c.position),d.clone(r.direction,c.direction),d.clone(r.up,c.up),c.frustum=a;let u=Fxe(c);ek(e,u);function f(){Rxe(e,t,r,s,u)}Nxe(e,t,r,f)}function Mxe(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,c=D.RADIANS_PER_DEGREE*.5,u=s*Math.tan(a*.5);r.frustum.far=u/Math.tan(c*.5)+1e7,r.frustum.fov=c;function f(p){r.frustum.fov=D.lerp(c,a,p.time),r.position.z=u/Math.tan(r.frustum.fov*.5)}let h=o.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:f,complete:function(){i(e)}});e._currentTweens.push(h)}function t0t(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=d.clone(n.position,UJ),a=d.clone(n.direction,vxe),c=d.clone(n.up,Pxe);o._mode=oe.MORPHING;function u(){r.frustum=n.frustum.clone();let f=d.clone(r.position,wxe),h=d.clone(r.direction,Bxe),p=d.clone(r.up,Dxe);f.z=s.z;function g(_){jd(f,s,_.time,r.position),jd(h,a,_.time,r.direction),jd(p,c,_.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right)}let m=o.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:g,complete:function(){i(e)}});e._currentTweens.push(m)}e._morphToOrthographic?u():Mxe(e,0,n,u)}function Nxe(e,t,n,i){let o=e._scene,r=o.camera,s=d.clone(r.position,wxe),a=d.clone(r.direction,Bxe),c=d.clone(r.up,Dxe),u=d.clone(n.position2D,UJ),f=d.clone(n.direction2D,vxe),h=d.clone(n.up2D,Pxe);function p(m){jd(s,u,m.time,r.position),jd(a,f,m.time,r.direction),jd(c,h,m.time,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let g=o.tweens.add({duration:t,easingFunction:fs.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){Lxe(e,o,1,0,t,i)}});e._currentTweens.push(g)}function Lxe(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:fs.QUARTIC_OUT};l(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function Oxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE3D,n.morphTime=oe.getMorphTime(oe.SCENE3D),bH(t);let i=n.camera;(t._previousMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,d.clone(e.position,i.position),d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE3D,r)}}function Fxe(e){return function(t){let n=t._scene;n._mode=oe.SCENE2D,n.morphTime=oe.getMorphTime(oe.SCENE2D),bH(t);let i=n.camera;d.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.SCENE2D,o)}}function n0t(e){return function(t){let n=t._scene;n._mode=oe.COLUMBUS_VIEW,n.morphTime=oe.getMorphTime(oe.COLUMBUS_VIEW),bH(t);let i=n.camera;(t._previousModeMode!==oe.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,d.clone(e.position,i.position),d.clone(e.direction,i.direction),d.clone(e.up,i.up),d.cross(i.direction,i.up,i.right),d.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,oe.COLUMBUS_VIEW,r)}}var tk=jI;var i0t={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4},Yi=Object.freeze(i0t);function Ba(e,t){let n=`${e}`;return l(t)&&(n+=`+${t}`),n}function o0t(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 Qxe(e,t,n){let i=Ba(Yi.PINCH,t),o=e._update,r=e._isDown,s=e._eventStartPosition,a=e._pressTime,c=e._releaseTime;o[i]=!0,r[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++,r[i]=!0,a[i]=new Date,U.lerp(f.position1,f.position2,.5,s[i])},Dn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Dn.PINCH_END,t),e._eventHandler.setInputAction(function(f){if(r[i]){o[i]?(o0t(f,u),o[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 h=u.angleAndHeight.endPosition.x,p=u.prevAngle,g=Math.PI*2;for(;h>=p+Math.PI;)h-=g;for(;h<p-Math.PI;)h+=g;u.angleAndHeight.endPosition.x=-h*n.clientWidth/12,u.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Dn.PINCH_MOVE,t)}function kxe(e,t){let n=Ba(Yi.WHEEL,t),i=e._pressTime,o=e._releaseTime,r=e._update;r[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]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=u,U.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Dn.WHEEL,t)}function _w(e,t,n){let i=Ba(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime;o[i]=!1,r[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===Yi.LEFT_DRAG?(c=Dn.LEFT_DOWN,u=Dn.LEFT_UP):n===Yi.RIGHT_DRAG?(c=Dn.RIGHT_DOWN,u=Dn.RIGHT_UP):n===Yi.MIDDLE_DRAG&&(c=Dn.MIDDLE_DOWN,u=Dn.MIDDLE_UP),e._eventHandler.setInputAction(function(f){e._buttonsDown++,a.valid=!1,o[i]=!0,s[i]=new Date,U.clone(f.position,r[i])},c,t),e._eventHandler.setInputAction(function(){GJ(Ba(n,void 0),e);for(let f of Object.values(wa)){let h=Ba(n,f);GJ(h,e)}},u,t)}function GJ(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 Uxe(e,t){U.clone(e.startPosition,t.startPosition),U.clone(e.endPosition,t.endPosition)}function r0t(e,t,n){let i=n._isDown,o=!1,r=Ba(e,t);for(let[c,u]of Object.entries(i))c.startsWith(e)&&u&&c!==r&&(o=!0,GJ(c,n));if(!o)return;let s=n._pressTime,a=n._lastMovement[r];l(a)||(a=n._lastMovement[r]={startPosition:new U,endPosition:new U,valid:!1}),n._buttonsDown++,a.valid=!1,i[r]=!0,s[r]=new Date}function Gxe(e,t){let n=e._update,i=e._movement,o=e._lastMovement,r=e._isDown;for(let s in Yi)if(Yi.hasOwnProperty(s)){let a=Yi[s];if(l(a)){let c=Ba(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 Yi)if(Yi.hasOwnProperty(a)){let c=Yi[a];if(l(c)){let u=Ba(c,t);r0t(c,t,e),r[u]&&(n[u]?(Uxe(i[u],o[u]),o[u].valid=!0,Uxe(s,i[u]),n[u]=!1):U.clone(s.endPosition,i[u].endPosition))}}U.clone(s.endPosition,e._currentMousePosition)},Dn.MOUSE_MOVE,t)}function Yd(e){this._eventHandler=new vf(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new U,kxe(this,void 0),Qxe(this,void 0,e),_w(this,void 0,Yi.LEFT_DRAG),_w(this,void 0,Yi.RIGHT_DRAG),_w(this,void 0,Yi.MIDDLE_DRAG),Gxe(this,void 0);for(let t in wa)if(wa.hasOwnProperty(t)){let n=wa[t];l(n)&&(kxe(this,n),Qxe(this,n,e),_w(this,n,Yi.LEFT_DRAG),_w(this,n,Yi.RIGHT_DRAG),_w(this,n,Yi.MIDDLE_DRAG),Gxe(this,n))}}Object.defineProperties(Yd.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Ba(Yi.WHEEL)]||!this._update[Ba(Yi.WHEEL,wa.SHIFT)]||!this._update[Ba(Yi.WHEEL,wa.CTRL)]||!this._update[Ba(Yi.WHEEL,wa.ALT)];return this._buttonsDown>0||e}}});Yd.prototype.isMoving=function(e,t){let n=Ba(e,t);return!this._update[n]};Yd.prototype.getMovement=function(e,t){let n=Ba(e,t);return this._movement[n]};Yd.prototype.getLastMovement=function(e,t){let n=Ba(e,t),i=this._lastMovement[n];if(i.valid)return i};Yd.prototype.isButtonDown=function(e,t){let n=Ba(e,t);return this._isDown[n]};Yd.prototype.getStartMousePosition=function(e,t){if(e===Yi.WHEEL)return this._currentMousePosition;let n=Ba(e,t);return this._eventStartPosition[n]};Yd.prototype.getButtonPressTime=function(e,t){let n=Ba(e,t);return this._pressTime[n]};Yd.prototype.getButtonReleaseTime=function(e,t){let n=Ba(e,t);return this._releaseTime[n]};Yd.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};Yd.prototype.isDestroyed=function(){return!1};Yd.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),ue(this)};var nk=Yd;function TH(e,t,n,i,o,r,s,a,c,u){this._tweens=e,this._tweenjs=t,this._startObject=je(n),this._stopObject=je(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=u,this.needsStart=!0}Object.defineProperties(TH.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}}});TH.prototype.cancelTween=function(){this._tweens.remove(this)};function Em(){this._tweens=[]}Object.defineProperties(Em.prototype,{length:{get:function(){return this._tweens.length}}});Em.prototype.add=function(e){if(e=e??V.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new TH(this);let t=e.duration/ii.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/ii.SECONDS_PER_MILLISECOND,o=e.easingFunction??fs.LINEAR_NONE,r=e.startObject,s=new tEe(r);s.to(je(e.stopObject),t),s.delay(i),s.easing(o),l(e.update)&&s.onUpdate(function(){e.update(r)}),s.onComplete(e.complete??null),s.repeat(e._repeat??0);let a=new TH(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};Em.prototype.addProperty=function(e){e=e??V.EMPTY_OBJECT;let t=e.object,n=e.property,i=e.startValue,o=e.stopValue;function r(s){t[n]=s.value}return this.add({startObject:{value:i},stopObject:{value:o},duration:e.duration??3,delay:e.delay,easingFunction:e.easingFunction,update:r,complete:e.complete,cancel:e.cancel,_repeat:e._repeat})};Em.prototype.addAlpha=function(e){e=e??V.EMPTY_OBJECT;let t=e.material,n=[];for(let o in t.uniforms)t.uniforms.hasOwnProperty(o)&&l(t.uniforms[o])&&l(t.uniforms[o].alpha)&&n.push(o);function i(o){let r=n.length;for(let s=0;s<r;++s)t.uniforms[n[s]].alpha=o.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})};Em.prototype.addOffsetIncrement=function(e){e=e??V.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})};Em.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};Em.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};Em.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Em.prototype.get=function(e){return this._tweens[e]};Em.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/ii.SECONDS_PER_MILLISECOND:Mi();n<t.length;){let i=t[n],o=i.tweenjs;i.needsStart?(i.needsStart=!1,o.start(e)):o.update(e)?n++:(o.stop(),t.splice(n,1))}};var YI=Em;function ok(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=Yi.LEFT_DRAG,this.zoomEventTypes=[Yi.RIGHT_DRAG,Yi.WHEEL,Yi.PINCH],this.rotateEventTypes=Yi.LEFT_DRAG,this.tiltEventTypes=[Yi.MIDDLE_DRAG,Yi.PINCH,{eventType:Yi.LEFT_DRAG,modifier:wa.CTRL},{eventType:Yi.RIGHT_DRAG,modifier:wa.CTRL}],this.lookEventTypes={eventType:Yi.LEFT_DRAG,modifier:wa.SHIFT};let t=e.ellipsoid??ne.default;this.minimumPickingTerrainHeight=ne.WGS84.equals(t)?15e4:t.minimumRadius*.025,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumPickingTerrainDistanceWithInertia=ne.WGS84.equals(t)?4e3:t.minimumRadius*63e-5,this.minimumCollisionTerrainHeight=ne.WGS84.equals(t)?15e3:t.minimumRadius*.0025,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=ne.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 nk(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 YI,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new U(-1,-1),this._tiltCenter=new d,this._rotateMousePosition=new U(-1,-1),this._rotateStartPosition=new d,this._strafeStartPosition=new d,this._strafeMousePosition=new U,this._strafeEndMousePosition=new U,this._zoomMouseStart=new U(-1,-1),this._zoomWorldPosition=new d,this._useZoomWorldPosition=!1,this._panLastMousePosition=new U,this._panLastWorldPosition=new d,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 me(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 s0t(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function a0t(e){return U.equalsEpsilon(e.startPosition,e.endPosition,D.EPSILON14)}var c0t=.4;function l0t(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[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<c0t){let g=s0t(p,i),m=e.getLastMovement(t,n);if(!l(m)||a0t(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 _=e.getStartMousePosition(t,n);o(r,_,a)}}}function u0t(e,t){if(l(t)){let n=e[t];l(n)&&(n.inertiaEnabled=!0);let i=e._inertiaDisablers[t];if(l(i)){let o=i.length;for(let r=0;r<o;++r)n=e[i[r]],l(n)&&(n.inertiaEnabled=!1)}}}var zxe=[];function Hl(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(zxe[0]=n,n=zxe);let a=n.length;for(let c=0;c<a;++c){let u=n[c],f=l(u.eventType)?u.eventType:u,h=u.modifier,p=s.isMoving(f,h)&&s.getMovement(f,h),g=s.getStartMousePosition(f,h);e.enableInputs&&t&&(p?(i(e,g,p),u0t(e,r)):o<1&&l0t(s,f,h,o,i,e,r))}}var SH=new xn,f0t=new d,d0t=new U,h0t=new d,m0t=new U,p0t=new d,A0t=new d,g0t=new d,_0t=new d,ebe=new d,y0t=new d,C0t=new d,E0t=new d,I0t=new d,x0t=new d,b0t=new d,T0t=new d,S0t=new d,w0t=new d,B0t=new d,qI=new d,Vxe=new d,Hxe=new d,zJ={orientation:new ic};function XJ(e,t,n,i,o,r){let s=1;l(r)&&(s=D.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,u=a>0?e.minimumZoomDistance*s:0,f=e.maximumZoomDistance,h=o-u,p=i*h;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(o-u)<1||m<0&&Math.abs(o-f)<1)return;o-m<u?m=o-u-1:o-m>f&&(m=o-f)}let _=e._scene,y=_.camera,C=_.mode,E=zJ.orientation;E.heading=y.heading,E.pitch=y.pitch,E.roll=y.roll;let I=n.inertiaEnabled??U.equals(t,e._zoomMouseStart),b=e._zoomingOnVector,S=e._rotatingZoom,B;if(I||(e._zoomMouseStart=U.clone(t,e._zoomMouseStart),l(e._globe)&&C===oe.SCENE2D?(B=y.getPickRay(t,SH).origin,B=d.fromElements(B.y,B.z,B.x)):l(e._globe)&&(B=e_(e,t,f0t)),l(B)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=d.clone(B,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,b=e._zoomingOnVector=!1,S=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){y.zoomIn(m);return}let v=C===oe.COLUMBUS_VIEW;if(y.positionCartographic.height<2e6&&(S=!0),!I||S){if(C===oe.SCENE2D){let P=e._zoomWorldPosition,N=y.position;if(!d.equals(P,N)&&y.positionCartographic.height<e._maxCoord.x*2){let L=y.position.x,A=d.subtract(P,N,h0t);d.normalize(A,A);let x=d.distance(P,N)*m/(y.getMagnitude()*.5);y.move(A,x*.5),(y.position.x<0&&L>0||y.position.x>0&&L<0)&&(B=y.getPickRay(t,SH).origin,B=d.fromElements(B.y,B.z,B.x),e._zoomWorldPosition=d.clone(B,e._zoomWorldPosition))}}else if(C===oe.SCENE3D){let P=d.normalize(y.position,ebe);if(e._cameraUnderground||e._zoomingUnderground||y.positionCartographic.height<3e3&&Math.abs(d.dot(y.direction,P))<.6)v=!0;else{let N=_.canvas,L=m0t;L.x=N.clientWidth/2,L.y=N.clientHeight/2;let A=e_(e,L,p0t);if(!l(A))v=!0;else if(y.positionCartographic.height<1e6)if(d.dot(y.direction,P)>=-.5)v=!0;else{let x=C0t;d.clone(y.position,x);let T=e._zoomWorldPosition,w=y0t;if(w=d.normalize(T,w),d.dot(w,P)<0)return;let R=B0t,O=x0t;d.clone(y.direction,O),d.add(x,d.multiplyByScalar(O,1e3,qI),R);let k=b0t,F=T0t;d.subtract(T,x,k),d.normalize(k,F);let z=d.dot(P,F);if(z>=0){e._zoomMouseStart.x=-1;return}let Q=Math.acos(-z),H=d.magnitude(x),j=d.magnitude(T),Z=H-m,Y=d.magnitude(k),$=Math.asin(D.clamp(Y/j*Math.sin(Q),-1,1)),J=Math.asin(D.clamp(Z/j*Math.sin(Q),-1,1)),pe=$-J+Q,Ce=E0t;d.normalize(x,Ce);let fe=I0t;fe=d.cross(F,Ce,fe),fe=d.normalize(fe,fe),d.normalize(d.cross(Ce,fe,qI),O),d.multiplyByScalar(d.normalize(R,qI),d.magnitude(R)-m,R),d.normalize(x,x),d.multiplyByScalar(x,Z,x);let ye=S0t;d.multiplyByScalar(d.add(d.multiplyByScalar(Ce,Math.cos(pe)-1,Vxe),d.multiplyByScalar(O,Math.sin(pe),Hxe),qI),Z,ye),d.add(x,ye,x),d.normalize(R,Ce),d.normalize(d.cross(Ce,fe,qI),O);let Ie=w0t;d.multiplyByScalar(d.add(d.multiplyByScalar(Ce,Math.cos(pe)-1,Vxe),d.multiplyByScalar(O,Math.sin(pe),Hxe),qI),d.magnitude(R),Ie),d.add(R,Ie,R),d.clone(x,y.position),d.normalize(d.subtract(R,x,qI),y.direction),d.clone(y.direction,y.direction),d.cross(y.direction,y.up,y.right),d.cross(y.right,y.direction,y.up),y.setView(zJ);return}else{let x=d.normalize(A,A0t),T=d.normalize(e._zoomWorldPosition,g0t),w=d.dot(T,x);if(w>0&&w<1){let R=D.acosClamped(w),O=d.cross(T,x,_0t),k=Math.abs(R)>D.toRadians(20)?y.positionCartographic.height*.75:y.positionCartographic.height-m,F=m/k;y.rotate(O,R*F)}}}}e._rotatingZoom=!v}if(!I&&v||b){let P,N=Ji.worldToWindowCoordinates(_,e._zoomWorldPosition,d0t);C!==oe.COLUMBUS_VIEW&&U.equals(t,e._zoomMouseStart)&&l(N)?P=y.getPickRay(N,SH):P=y.getPickRay(t,SH);let L=P.direction;(C===oe.COLUMBUS_VIEW||C===oe.SCENE2D)&&d.fromElements(L.y,L.z,L.x,L),y.move(L,m),e._zoomingOnVector=!0}else y.zoomIn(m);e._cameraUnderground||y.setView(zJ)}var D0t=new xn,v0t=new xn,P0t=new d;function R0t(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,D0t).origin,s=o.getPickRay(n.endPosition,v0t).origin;r=d.fromElements(r.y,r.z,r.x,r),s=d.fromElements(s.y,s.z,s.x,s);let a=d.subtract(r,s,P0t),c=d.magnitude(a);c>0&&(d.normalize(a,a),o.move(a,c))}function Wxe(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;XJ(e,t,n,e.zoomFactor,o.getMagnitude())}var M0t=new U,N0t=new U;function jxe(e,t,n){if(l(n.angleAndHeight)){L0t(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=M0t;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=U.normalize(c,c);let u=N0t;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 h=D.acosClamped(u.x);u.y<0&&(h=D.TWO_PI-h);let p=h-f;o.twistRight(p)}function L0t(e,t,n){let i=e._rotateFactor*e._rotateRateRangeAdjustment;i>e._maximumRotateRate&&(i=e._maximumRotateRate),i<e._minimumRotateRate&&(i=e._minimumRotateRate);let o=e._scene,r=o.camera,s=o.canvas,a=(n.endPosition.x-n.startPosition.x)/s.clientWidth;a=Math.min(a,e.maximumMovementRatio);let c=i*a*Math.PI*4;r.twistRight(c)}function O0t(e){let t=e._scene.mapMode2D===wu.ROTATE;M.equals(M.IDENTITY,e._scene.camera.transform)?(Hl(e,e.enableTranslate,e.translateEventTypes,R0t,e.inertiaTranslate,"_lastInertiaTranslateMovement"),Hl(e,e.enableZoom,e.zoomEventTypes,Wxe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&Hl(e,e.enableRotate,e.tiltEventTypes,jxe,e.inertiaSpin,"_lastInertiaTiltMovement")):(Hl(e,e.enableZoom,e.zoomEventTypes,Wxe,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&Hl(e,e.enableRotate,e.translateEventTypes,jxe,e.inertiaSpin,"_lastInertiaSpinMovement"))}var tbe=new xn,F0t=new d,Q0t=new d;function e_(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,F0t)),!l(o))return d.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,tbe),u=o.pickWorldCoordinates(c,i,a,Q0t),f=l(s)?d.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=l(u)?d.distance(u,r.positionWC):Number.POSITIVE_INFINITY;return f<h?d.clone(s,n):d.clone(u,n)}var k0t=new me;function MH(e){let t=e._ellipsoid,n=e._scene,i=n.camera,o=n.mode,r=0;if(o===oe.SCENE3D){let c=t.cartesianToCartographic(i.position,k0t);l(c)&&(r=c.height)}else r=i.position.z;let s=e._scene.globeHeight??0;return Math.abs(s-r)}var U0t=new d;function nbe(e,t){let n=t.origin,i=t.direction,o=MH(e),r=d.normalize(n,U0t),s=Math.abs(d.dot(r,i));return s=Math.max(s,.5)*2,o*s}function ibe(e,t,n,i){let o=d.distance(t.origin,n),r=MH(e),s=D.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),xn.getPoint(t,o,i)}function obe(e,t,n,i){let o;return l(n)?(o=d.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=MH(e))):o=MH(e),xn.getPoint(t,o,i)}var G0t=new U;function rbe(e,t){let n=t.endPosition,i=U.subtract(t.endPosition,t.startPosition,G0t),o=e._strafeEndMousePosition;U.add(o,i,o),t.endPosition=o,JJ(e,t,e._strafeStartPosition),t.endPosition=n}var Yxe=new xn,z0t=new xn,VJ=new d,V0t=new d,H0t=new d,W0t=new d,j0t=new hn(d.UNIT_X,0),Y0t=new U,q0t=new U;function K0t(e,t,n){if(d.equals(t,e._translateMousePosition)||(e._looking=!1),d.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Rf(e,t,n);return}if(e._strafing){rbe(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=U.clone(n.startPosition,Y0t),a=U.clone(n.endPosition,q0t),c=o.getPickRay(s,Yxe),u=d.clone(d.ZERO,W0t),f=d.UNIT_X,h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=e_(e,s,VJ),l(h)&&(u.x=h.x)),r||u.x>o.position.z&&l(h)){let I=h;r&&(I=obe(e,c,h,VJ)),U.clone(t,e._strafeMousePosition),U.clone(t,e._strafeEndMousePosition),d.clone(I,e._strafeStartPosition),e._strafing=!0,JJ(e,n,e._strafeStartPosition);return}let p=hn.fromPointNormal(u,f,j0t);c=o.getPickRay(s,Yxe);let g=fi.rayPlane(c,p,VJ),m=o.getPickRay(a,z0t),_=fi.rayPlane(m,p,V0t);if(!l(g)||!l(_)){e._looking=!0,Rf(e,t,n),U.clone(t,e._translateMousePosition);return}let y=d.subtract(g,_,H0t),C=y.x;y.x=y.y,y.y=y.z,y.z=C;let E=d.magnitude(y);E>D.EPSILON6&&(d.normalize(y,y),o.move(y,E))}var sbe=new U,DH=new xn,vH=new d,X0t=new d,abe=new M,J0t=new M,Z0t=new d,$0t=new hn(d.UNIT_X,0),HJ=new d,YJ=new me,cbe=new M,eIt=new Fe,tIt=new X,PH=new d;function nIt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),U.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Rf(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,iIt(e,t,n)):oIt(e,t,n)}function iIt(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=sbe;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,DH),c=d.UNIT_X,u=a.origin,f=a.direction,h,p=d.dot(c,f);if(Math.abs(p)>D.EPSILON6&&(h=-d.dot(c,u)/p),!l(h)||h<=0){e._looking=!0,Rf(e,t,n),U.clone(t,e._tiltCenterMousePosition);return}let g=d.multiplyByScalar(f,h,vH);d.add(u,g,g);let m=i.mapProjection,_=m.ellipsoid;d.fromElements(g.y,g.z,g.x,g);let y=m.unproject(g,YJ);_.cartographicToCartesian(y,g);let C=Qt.eastNorthUpToFixedFrame(g,_,abe),E=e._globe,I=e._ellipsoid;e._globe=void 0,e._ellipsoid=ne.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let b=M.clone(o.transform,cbe);o._setTransform(C),Pf(e,t,n,d.UNIT_Z),o._setTransform(b),e._globe=E,e._ellipsoid=I;let S=I.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}function oIt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=d.UNIT_X;if(U.equals(t,e._tiltCenterMousePosition))s=d.clone(e._tiltCenter,vH);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=e_(e,t,vH)),!l(s)){a=o.getPickRay(t,DH);let A=a.origin,x=a.direction,T,w=d.dot(c,x);if(Math.abs(w)>D.EPSILON6&&(T=-d.dot(c,A)/w),!l(T)||T<=0){e._looking=!0,Rf(e,t,n),U.clone(t,e._tiltCenterMousePosition);return}s=d.multiplyByScalar(x,T,vH),d.add(A,s,s)}r&&(l(a)||(a=o.getPickRay(t,DH)),ibe(e,a,s,s)),U.clone(t,e._tiltCenterMousePosition),d.clone(s,e._tiltCenter)}let u=i.canvas,f=sbe;f.x=u.clientWidth/2,f.y=e._tiltCenterMousePosition.y,a=o.getPickRay(f,DH);let h=d.clone(d.ZERO,Z0t);h.x=s.x;let p=hn.fromPointNormal(h,c,$0t),g=fi.rayPlane(a,p,X0t),m=o._projection,_=m.ellipsoid;d.fromElements(s.y,s.z,s.x,s);let y=m.unproject(s,YJ);_.cartographicToCartesian(y,s);let C=Qt.eastNorthUpToFixedFrame(s,_,abe),E;l(g)?(d.fromElements(g.y,g.z,g.x,g),y=m.unproject(g,YJ),_.cartographicToCartesian(y,g),E=Qt.eastNorthUpToFixedFrame(g,_,J0t)):E=C;let I=e._globe,b=e._ellipsoid;e._globe=void 0,e._ellipsoid=ne.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let S=d.UNIT_Z,B=M.clone(o.transform,cbe);o._setTransform(C);let v=d.cross(d.UNIT_Z,d.normalize(o.position,HJ),HJ),P=d.dot(o.right,v);if(Pf(e,t,n,S,!1,!0),o._setTransform(E),P<0){let A=n.startPosition.y-n.endPosition.y;(r&&A<0||!r&&A>0)&&(S=void 0);let x=o.constrainedAxis;o.constrainedAxis=void 0,Pf(e,t,n,S,!0,!1),o.constrainedAxis=x}else Pf(e,t,n,S,!0,!1);if(l(o.constrainedAxis)){let A=d.cross(o.direction,o.constrainedAxis,PH);d.equalsEpsilon(A,d.ZERO,D.EPSILON6)||(d.dot(A,o.right)<0&&d.negate(A,A),d.cross(A,o.direction,o.up),d.cross(o.direction,o.up,o.right),d.normalize(o.up,o.up),d.normalize(o.right,o.right))}o._setTransform(B),e._globe=I,e._ellipsoid=b;let N=b.maximumRadius;e._rotateFactor=1/N,e._rotateRateRangeAdjustment=N;let L=d.clone(o.positionWC,HJ);if(e.enableCollisionDetection&&eZ(e,!0),!d.equals(o.positionWC,L)){o._setTransform(E),o.worldToCameraCoordinatesPoint(L,L);let A=d.magnitudeSquared(L);d.magnitudeSquared(o.position)>A&&(d.normalize(o.position,o.position),d.multiplyByScalar(o.position,Math.sqrt(A),o.position));let x=d.angleBetween(L,o.position),T=d.cross(L,o.position,L);d.normalize(T,T);let w=Fe.fromAxisAngle(T,x,eIt),R=X.fromQuaternion(w,tIt);X.multiplyByVector(R,o.direction,o.direction),X.multiplyByVector(R,o.up,o.up),d.cross(o.direction,o.up,o.right),d.cross(o.right,o.direction,o.up),o._setTransform(B)}}var lbe=new U,ube=new xn,fbe=new d;function rIt(e,t,n){l(n.distance)&&(n=n.distance);let i=e._scene,o=i.camera,r=i.canvas,s=e._cameraUnderground,a;s?a=t:(a=lbe,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,ube),u=c.origin,f=c.direction,h=o.position.z,p;h<e._minimumPickingTerrainHeight&&(p=e_(e,a,fbe));let g;if(l(p)&&(g=d.distance(u,p)),s){let m=nbe(e,c,h);l(g)?g=Math.min(g,m):g=m}if(!l(g)){let m=d.UNIT_X;g=-d.dot(m,u)/d.dot(m,f)}XJ(e,t,n,e.zoomFactor,g)}function sIt(e){let n=e._scene.camera;if(!M.equals(M.IDENTITY,n.transform))Hl(e,e.enableRotate,e.rotateEventTypes,Pf,e.inertiaSpin,"_lastInertiaSpinMovement"),Hl(e,e.enableZoom,e.zoomEventTypes,hbe,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),Hl(e,e.enableTilt,e.tiltEventTypes,nIt,e.inertiaSpin,"_lastInertiaTiltMovement"),Hl(e,e.enableTranslate,e.translateEventTypes,K0t,e.inertiaTranslate,"_lastInertiaTranslateMovement"),Hl(e,e.enableZoom,e.zoomEventTypes,rIt,e.inertiaZoom,"_lastInertiaZoomMovement"),Hl(e,e.enableLook,e.lookEventTypes,Rf),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var aIt=new xn,cIt=new hn(d.UNIT_X,0),lIt=new d,uIt=new d;function JJ(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,aIt),s=d.clone(o.direction,uIt);i.mode===oe.COLUMBUS_VIEW&&d.fromElements(s.z,s.x,s.y,s);let a=hn.fromPointNormal(n,s,cIt),c=fi.rayPlane(r,a,lIt);l(c)&&(s=d.subtract(n,c,s),i.mode===oe.COLUMBUS_VIEW&&d.fromElements(s.y,s.z,s.x,s),d.add(o.position,s,o.position))}var qxe=new d,dbe=new me,qJ=new d,KJ=new ne,fIt=new d,dIt=new d,hIt=new d;function mIt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!M.equals(o.transform,M.IDENTITY)){Pf(e,t,n);return}let a,c,u=s.geodeticSurfaceNormal(o.position,fIt);if(U.equals(t,e._rotateMousePosition)){if(e._looking)Rf(e,t,n,u);else if(e._rotating)Pf(e,t,n);else if(e._strafing)rbe(e,n);else{if(d.magnitude(o.position)<d.magnitude(e._rotateStartPosition))return;a=d.magnitude(e._rotateStartPosition),c=qJ,c.x=c.y=c.z=a,s=ne.fromCartesian3(c,KJ),jJ(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let f=s.cartesianToCartographic(o.positionWC,dbe).height,h=e._globe;if(l(h)&&f<e._minimumPickingTerrainHeight){let p=e_(e,n.startPosition,hIt);if(l(p)){let g=!1,m=o.getPickRay(n.startPosition,tbe);if(r)g=!0,obe(e,m,p,p);else{let _=s.geodeticSurfaceNormal(p,dIt);Math.abs(d.dot(m.direction,_))<.05?g=!0:g=d.magnitude(o.position)<d.magnitude(p)}g?(U.clone(t,e._strafeEndMousePosition),d.clone(p,e._strafeStartPosition),e._strafing=!0,JJ(e,n,e._strafeStartPosition)):(a=d.magnitude(p),c=qJ,c.x=c.y=c.z=a,s=ne.fromCartesian3(c,KJ),jJ(e,t,n,s),d.clone(p,e._rotateStartPosition))}else e._looking=!0,Rf(e,t,n,u)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,qxe))?(jJ(e,t,n,e._ellipsoid),d.clone(qxe,e._rotateStartPosition)):f>e._minimumTrackBallHeight?(e._rotating=!0,Pf(e,t,n)):(e._looking=!0,Rf(e,t,n,u));U.clone(t,e._rotateMousePosition)}function Pf(e,t,n,i,o,r){o=o??!1,r=r??!1;let s=e._scene,a=s.camera,c=s.canvas,u=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let f=d.magnitude(a.position),h=e._rotateFactor*(f-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=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=h*p*Math.PI*2,_=h*g*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let y=e.maximumTiltAngle,C=d.dot(a.direction,i),E=Math.PI-Math.acos(C)+_;E>y&&(_-=E-y)}o||a.rotateRight(m),r||a.rotateUp(_),a.constrainedAxis=u}var WJ=se.clone(se.UNIT_W),Kxe=se.clone(se.UNIT_W),wH=new d,yw=new d,BH=new d,Xxe=new d,pIt=new U,AIt=new U,gIt=new U,_It=new U,yIt=new xn;function jJ(e,t,n,i){let o=e._scene,r=o.camera,s=U.clone(n.startPosition,pIt),a=U.clone(n.endPosition,AIt),c=i.cartesianToCartographic(r.positionWC,dbe).height,u,f;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(u=d.clone(e._panLastWorldPosition,WJ),!l(e._globe)&&!U.equalsEpsilon(s,e._panLastMousePosition)&&(u=e_(e,s,WJ)),!l(e._globe)&&l(u))){let h=d.subtract(u,r.positionWC,yw),p=d.multiplyByScalar(r.directionWC,d.dot(r.directionWC,h),yw),g=d.magnitude(p),m=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,g,o.pixelRatio,_It),_=U.subtract(a,s,gIt),y=d.multiplyByScalar(r.rightWC,_.x*m.x,yw),C=d.normalize(r.positionWC,ebe),E=r.getPickRay(a,yIt).direction,I=d.subtract(E,d.projectVector(E,r.rightWC,BH),BH),b=d.angleBetween(I,r.directionWC),S=1;l(r.frustum.fov)&&(S=Math.max(Math.tan(b),.1));let B=Math.abs(d.dot(r.directionWC,C)),v=-_.y*m.y*2/Math.sqrt(S)*(1-B),P=d.multiplyByScalar(E,v,BH);B=Math.abs(d.dot(r.upWC,C));let N=d.multiplyByScalar(r.upWC,-_.y*(1-B)*m.y,Xxe);f=d.add(u,y,Kxe),f=d.add(f,P,f),f=d.add(f,N,f),d.clone(f,e._panLastWorldPosition),U.clone(a,e._panLastMousePosition)}if((!l(u)||!l(f))&&(u=r.pickEllipsoid(s,i,WJ),f=r.pickEllipsoid(a,i,Kxe)),!l(u)||!l(f)){e._rotating=!0,Pf(e,t,n);return}if(u=r.worldToCameraCoordinates(u,u),f=r.worldToCameraCoordinates(f,f),l(r.constrainedAxis)){let h=r.constrainedAxis,p=d.mostOrthogonalAxis(h,wH);d.cross(p,h,p),d.normalize(p,p);let g=d.cross(h,p,yw),m=d.magnitude(u),_=d.dot(h,u),y=Math.acos(_/m),C=d.multiplyByScalar(h,_,BH);d.subtract(u,C,C),d.normalize(C,C);let E=d.magnitude(f),I=d.dot(h,f),b=Math.acos(I/E),S=d.multiplyByScalar(h,I,Xxe);d.subtract(f,S,S),d.normalize(S,S);let B=Math.acos(d.dot(C,p));d.dot(C,g)<0&&(B=D.TWO_PI-B);let v=Math.acos(d.dot(S,p));d.dot(S,g)<0&&(v=D.TWO_PI-v);let P=B-v,N;d.equalsEpsilon(h,r.position,D.EPSILON2)?N=r.right:N=d.cross(h,r.position,wH);let L=d.cross(h,N,wH),A=d.dot(L,d.subtract(u,h,yw)),x=d.dot(L,d.subtract(f,h,yw)),T;A>0&&x>0?T=b-y:A>0&&x<=0?d.dot(r.position,h)>0?T=-y-b:T=y+b:T=y-b,r.rotateRight(P),r.rotateUp(T)}else{d.normalize(u,u),d.normalize(f,f);let h=d.dot(u,f),p=d.cross(u,f,wH);if(h<1&&!d.equalsEpsilon(p,d.ZERO,D.EPSILON14)){let g=Math.acos(h);r.rotate(p,g)}}}var CIt=new d,EIt=new me,Jxe=0;function hbe(e,t,n){l(n.distance)&&(n=n.distance);let i=n.inertiaEnabled,o=e._ellipsoid,r=e._scene,s=r.camera,a=r.canvas,c=e._cameraUnderground,u;c?u=t:(u=lbe,u.x=a.clientWidth/2,u.y=a.clientHeight/2);let f=s.getPickRay(u,ube),h,p=o.cartesianToCartographic(s.position,EIt).height,g=Math.abs(Jxe)<e.minimumPickingTerrainDistanceWithInertia;(i?g:p<e._minimumPickingTerrainHeight)&&(h=e_(e,u,fbe));let _;if(l(h)&&(_=d.distance(f.origin,h),Jxe=_),c){let C=nbe(e,f,p);l(_)?_=Math.min(_,C):_=C}l(_)||(_=p);let y=d.normalize(s.position,CIt);XJ(e,t,n,e.zoomFactor,_,d.dot(y,s.direction))}var mbe=new U,RH=new xn,ik=new d,IIt=new d,pbe=new M,xIt=new M,Abe=new M,bIt=new Fe,TIt=new X,ZJ=new me,$J=new d;function SIt(e,t,n){let o=e._scene.camera;if(!M.equals(o.transform,M.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(o.position,$J);Rf(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,ZJ);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,BIt(e,t,n)):DIt(e,t,n)}var wIt=new me;function BIt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,wIt).height;if(a-s-1<D.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,u=mbe;u.x=c.clientWidth/2,u.y=c.clientHeight/2;let f=r.getPickRay(u,RH),h,p=fi.rayEllipsoid(f,i);if(l(p))h=xn.getPoint(f,p.start,ik);else if(a>e._minimumTrackBallHeight){let E=fi.grazingAltitudeLocation(f,i);if(!l(E))return;let I=i.cartesianToCartographic(E,ZJ);I.height=0,h=i.cartographicToCartesian(I,ik)}else{e._looking=!0;let E=e._ellipsoid.geodeticSurfaceNormal(r.position,$J);Rf(e,t,n,E),U.clone(t,e._tiltCenterMousePosition);return}let g=Qt.eastNorthUpToFixedFrame(h,i,pbe),m=e._globe,_=e._ellipsoid;e._globe=void 0,e._ellipsoid=ne.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let y=M.clone(r.transform,Abe);r._setTransform(g),Pf(e,t,n,d.UNIT_Z),r._setTransform(y),e._globe=m,e._ellipsoid=_;let C=_.maximumRadius;e._rotateFactor=1/C,e._rotateRateRangeAdjustment=C}function DIt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,u;if(U.equals(t,e._tiltCenterMousePosition))a=d.clone(e._tiltCenter,ik);else{if(a=e_(e,t,ik),!l(a)){if(c=r.getPickRay(t,RH),u=fi.rayEllipsoid(c,i),!l(u)){if(i.cartesianToCartographic(r.position,ZJ).height<=e._minimumTrackBallHeight){e._looking=!0;let x=e._ellipsoid.geodeticSurfaceNormal(r.position,$J);Rf(e,t,n,x),U.clone(t,e._tiltCenterMousePosition)}return}a=xn.getPoint(c,u.start,ik)}s&&(l(c)||(c=r.getPickRay(t,RH)),ibe(e,c,a,a)),U.clone(t,e._tiltCenterMousePosition),d.clone(a,e._tiltCenter)}let f=o.canvas,h=mbe;h.x=f.clientWidth/2,h.y=e._tiltCenterMousePosition.y,c=r.getPickRay(h,RH);let p=d.magnitude(a),g=d.fromElements(p,p,p,qJ),m=ne.fromCartesian3(g,KJ);if(u=fi.rayEllipsoid(c,m),!l(u))return;let _=d.magnitude(c.origin)>p?u.start:u.stop,y=xn.getPoint(c,_,IIt),C=Qt.eastNorthUpToFixedFrame(a,i,pbe),E=Qt.eastNorthUpToFixedFrame(y,m,xIt),I=e._globe,b=e._ellipsoid;e._globe=void 0,e._ellipsoid=ne.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let S=d.UNIT_Z,B=M.clone(r.transform,Abe);r._setTransform(E);let v=d.cross(y,r.positionWC,PH);if(d.dot(r.rightWC,v)<0){let A=n.startPosition.y-n.endPosition.y;(s&&A<0||!s&&A>0)&&(S=void 0);let x=r.constrainedAxis;r.constrainedAxis=void 0,Pf(e,t,n,S,!0,!1),r.constrainedAxis=x}else Pf(e,t,n,S,!0,!1);if(r._setTransform(C),Pf(e,t,n,S,!1,!0),l(r.constrainedAxis)){let A=d.cross(r.direction,r.constrainedAxis,PH);d.equalsEpsilon(A,d.ZERO,D.EPSILON6)||(d.dot(A,r.right)<0&&d.negate(A,A),d.cross(A,r.direction,r.up),d.cross(r.direction,r.up,r.right),d.normalize(r.up,r.up),d.normalize(r.right,r.right))}r._setTransform(B),e._globe=I,e._ellipsoid=b;let N=b.maximumRadius;e._rotateFactor=1/N,e._rotateRateRangeAdjustment=N;let L=d.clone(r.positionWC,PH);if(e.enableCollisionDetection&&eZ(e,!0),!d.equals(r.positionWC,L)){r._setTransform(E),r.worldToCameraCoordinatesPoint(L,L);let A=d.magnitudeSquared(L);d.magnitudeSquared(r.position)>A&&(d.normalize(r.position,r.position),d.multiplyByScalar(r.position,Math.sqrt(A),r.position));let x=d.angleBetween(L,r.position),T=d.cross(L,r.position,L);d.normalize(T,T);let w=Fe.fromAxisAngle(T,x,bIt),R=X.fromQuaternion(w,TIt);X.multiplyByVector(R,r.direction,r.direction),X.multiplyByVector(R,r.up,r.up),d.cross(r.direction,r.up,r.right),d.cross(r.right,r.direction,r.up),r._setTransform(B)}}var vIt=new U,PIt=new U,Zxe=new xn,$xe=new xn,RIt=new d,MIt=new d;function Rf(e,t,n,i){let r=e._scene.camera,s=vIt;s.x=n.startPosition.x,s.y=0;let a=PIt;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,Zxe),u=r.getPickRay(a,$xe),f=0,h,p;r.frustum instanceof mn?(h=c.origin,p=u.origin,d.add(r.direction,h,h),d.add(r.direction,p,p),d.subtract(h,r.position,h),d.subtract(p,r.position,p),d.normalize(h,h),d.normalize(p,p)):(h=c.direction,p=u.direction);let g=d.dot(h,p);g<1&&(f=Math.acos(g)),f=n.startPosition.x>n.endPosition.x?-f:f;let m=e._horizontalRotationAxis;if(l(i)?r.look(i,-f):l(m)?r.look(m,-f):r.lookLeft(f),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=r.getPickRay(s,Zxe),u=r.getPickRay(a,$xe),f=0,r.frustum instanceof mn?(h=c.origin,p=u.origin,d.add(r.direction,h,h),d.add(r.direction,p,p),d.subtract(h,r.position,h),d.subtract(p,r.position,p),d.normalize(h,h),d.normalize(p,p)):(h=c.direction,p=u.direction),g=d.dot(h,p),g<1&&(f=Math.acos(g)),f=n.startPosition.y>n.endPosition.y?-f:f,i=i??m,l(i)){let _=r.direction,y=d.negate(i,RIt),C=d.equalsEpsilon(_,i,D.EPSILON2),E=d.equalsEpsilon(_,y,D.EPSILON2);if(!C&&!E){g=d.dot(_,i);let I=D.acosClamped(g);f>0&&f>I&&(f=I-D.EPSILON4),g=d.dot(_,y),I=D.acosClamped(g),f<0&&-f>I&&(f=-I+D.EPSILON4);let b=d.cross(i,_,MIt);r.look(b,f)}else(C&&f<0||E&&f>0)&&r.look(r.right,-f)}else r.lookUp(f)}function NIt(e){Hl(e,e.enableRotate,e.rotateEventTypes,mIt,e.inertiaSpin,"_lastInertiaSpinMovement"),Hl(e,e.enableZoom,e.zoomEventTypes,hbe,e.inertiaZoom,"_lastInertiaZoomMovement"),Hl(e,e.enableTilt,e.tiltEventTypes,SIt,e.inertiaSpin,"_lastInertiaTiltMovement"),Hl(e,e.enableLook,e.lookEventTypes,Rf)}var LIt=new M,OIt=new me;function eZ(e,t){e._adjustedHeightForTerrain=!0;let n=e._scene,i=n.mode;if(i===oe.SCENE2D||i===oe.MORPHING)return;let o=n.camera,r=n.ellipsoid??ne.WGS84,s=n.mapProjection,a,c;M.equals(o.transform,M.IDENTITY)||(a=M.clone(o.transform,LIt),c=d.magnitude(o.position),o._setTransform(M.IDENTITY));let u=OIt;i===oe.SCENE3D?r.cartesianToCartographic(o.position,u):s.unproject(o.position,u);let f=!1;if(u.height<e._minimumCollisionTerrainHeight){let h=e._scene.globeHeight;if(l(h)){let p=h+e.minimumZoomDistance,g=h-e._lastGlobeHeight,m=g/e._lastGlobeHeight;u.height<p&&(t||Math.abs(m)<=.1)&&(u.height=p,i===oe.SCENE3D?r.cartographicToCartesian(u,o.position):s.project(u,o.position),f=!0),t||Math.abs(m)<=.1?e._lastGlobeHeight=h:e._lastGlobeHeight+=g*.1}}l(a)&&(o._setTransform(a),f&&(d.normalize(o.position,o.position),d.negate(o.position,o.direction),d.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),d.normalize(o.direction,o.direction),d.cross(o.direction,o.up,o.right),d.cross(o.right,o.direction,o.up)))}ok.prototype.onMap=function(){let e=this._scene,t=e.mode,n=e.camera;return t===oe.COLUMBUS_VIEW?Math.abs(n.position.x)-this._maxCoord.x<0&&Math.abs(n.position.y)-this._maxCoord.y<0:!0};var FIt=new d,QIt=new d;ok.prototype.update=function(){let e=this._scene,{camera:t,globe:n,mode:i}=e;M.equals(t.transform,M.IDENTITY)?(this._globe=n,this._ellipsoid=e.ellipsoid??ne.default):(this._globe=void 0,this._ellipsoid=ne.UNIT_SPHERE);let{verticalExaggeration:o,verticalExaggerationRelativeHeight:r}=e;this._minimumCollisionTerrainHeight=Gr.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=Gr.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=Gr.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=d.clone(t.positionWC,FIt),c=d.clone(t.directionWC,QIt);if(i===oe.SCENE2D?O0t(this):i===oe.COLUMBUS_VIEW?(this._horizontalRotationAxis=d.UNIT_Z,sIt(this)):i===oe.SCENE3D&&(this._horizontalRotationAxis=void 0,NIt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let u=!d.equals(a,t.positionWC)||!d.equals(c,t.directionWC);eZ(this,u)}this._aggregator.reset()};ok.prototype.isDestroyed=function(){return!1};ok.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),ue(this)};var rk=ok;var sk=`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 ak=`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; } // See section 9. "The bright-pass filter" of Realtime HDR Rendering // http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf 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 t_(){this._sceneFramebuffer=new OI;let e=.125,t=new Array(6);t[0]=new bo({fragmentShader:Bu,textureScale:e,forcePowerOfTwo:!0,sampleMode:wf.LINEAR});let n=t[1]=new bo({fragmentShader:ak,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 bo({fragmentShader:mC,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 bo({fragmentShader:mC,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 bo({fragmentShader:Bu,sampleMode:wf.LINEAR}),this._uCenter=new U,this._uRadius=void 0,t[5]=new bo({fragmentShader:sk,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new Du({stages:t});let o=new VI(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}t_.prototype.get=function(e){return this._stages.get(e)};t_.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 kIt=new se,gbe=new U,UIt=new U,_be=new M;function GIt(e,t,n){let i=t.uniformState,o=i.sunPositionWC,r=i.view,s=i.viewProjection,a=i.projection,c=M.computeViewportTransformation(n,0,1,_be),u=M.multiplyByPoint(r,o,kIt),f=Qt.pointToGLWindowCoordinates(s,c,o,gbe);u.x+=D.SOLAR_RADIUS;let h=Qt.pointToGLWindowCoordinates(a,c,u,u),p=U.magnitude(U.subtract(h,f,h))*30*2,g=UIt;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,_=t.drawingBufferHeight,y=e._stages,C=y.get(0),E=C.outputTexture.width,I=C.outputTexture.height,b=new qe;b.width=E,b.height=I,c=M.computeViewportTransformation(b,0,1,_be),f=Qt.pointToGLWindowCoordinates(s,c,o,gbe),g.x*=E/m,g.y*=I/_;let S=C.scissorRectangle;S.x=Math.max(f.x-g.x*.5,0),S.y=Math.max(f.y-g.y*.5,0),S.width=Math.min(g.x,m),S.height=Math.min(g.y,_);for(let B=1;B<4;++B)qe.clone(S,y.get(B).scissorRectangle)}t_.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};t_.prototype.update=function(e){let t=e.context,n=e.viewport,i=this._sceneFramebuffer;i.update(t,n);let o=i.framebuffer;return this._textureCache.update(t),this._stages.update(t,!1),GIt(this,t,n),o};t_.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 o=1;o<i;++o)n.get(o).execute(e,n.get(o-1).outputTexture)};t_.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(Bu,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};t_.prototype.isDestroyed=function(){return!1};t_.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),ue(this)};var ck=t_;function ybe(){this._cachedShowFrustumsShaders={}}function zIt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function VIt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(f){f=He.replaceMain(f,"czm_Debug_main");let h=/out_FragData_(\d+)/g,p;for(;(p=h.exec(f))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return f});let s=r.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_${r[c]}.rgb *= debugShowCommandsColor; `,a+=` out_FragData_${r[c]}.rgb *= debugShowFrustumsColor; `;else a+=` out_FragColor.rgb *= debugShowCommandsColor; `,a+=` out_FragColor.rgb *= debugShowFrustumsColor; `;a+="}",o.sources.push(a);let u=zIt(i);return cn.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:u})}var lk=new G;function HIt(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=G.fromRandom()),t._debugColor):G.WHITE},n.debugShowFrustumsColor=function(){return e.debugShowFrustums?(lk.red=t.debugOverlappingFrustums&1?1:0,lk.green=t.debugOverlappingFrustums&2?1:0,lk.blue=t.debugOverlappingFrustums&4?1:0,lk.alpha=1,lk):G.WHITE}),n}var WIt=new nt;ybe.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=VIt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=nt.shallowClone(t,WIt);r.shaderProgram=o,r.uniformMap=HIt(e,t),r.execute(e.context,n)};var uk=ybe;function KI(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new Qn}KI.fromKeyframeNode=function(e,t,n,i){let o=new KI(e,t,n),{spatialNode:r,content:s}=i;return o._metadata=jIt(e,s,n),o._orientedBoundingBox=qIt(e,r,n,o._orientedBoundingBox),o};function jIt(e,t,n){if(!l(t)||!l(t.metadata))return;let{names:i,types:o}=e.provider,{metadata:r}=t,s={};for(let a=0;a<i.length;a++){let c=i[a],u=At.getComponentCount(o[a]),f=r[a].slice(n*u,(n+1)*u);s[c]=f}return s}var Cbe=new d,YIt=new d;function qIt(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,c=Math.floor(a/o.x),u=a-c*o.x,f=d.fromElements(u,c,s,Cbe),h=d.divideComponents(d.subtract(f,e._paddingBefore,Cbe),e.dimensions,YIt);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,h,i)}Object.defineProperties(KI.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()}}});KI.prototype.hasProperty=function(e){return l(this._metadata[e])};KI.prototype.getNames=function(){return Object.keys(this._metadata)};KI.prototype.getProperty=function(e){return this._metadata[e]};var fk=KI;var dk=`struct Ray { vec3 pos; vec3 dir; vec3 rawDir; }; #if defined(JITTER) /** * Generate a pseudo-random value for a given 2D screen coordinate. * Similar to https://www.shadertoy.com/view/4djSRW with a modified hashscale. */ float hash(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * 50.0); p3 += dot(p3, p3.yzx + 19.19); return fract((p3.x + p3.y) * p3.z); } #endif 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); } struct PointJacobianT { vec3 point; mat3 jacobianT; }; `;var hk=`// See Intersection.glsl for the definition of intersectScene // See IntersectionUtils.glsl for the definition of nextIntersection // See convertUvToBox.glsl, convertUvToCylinder.glsl, or convertUvToEllipsoid.glsl // for the definition of convertUvToShapeUvSpace. The appropriate function is // selected based on the VoxelPrimitive shape type, and added to the shader in // Scene/VoxelRenderResources.js. // See Octree.glsl for the definitions of TraversalData, SampleData, // traverseOctreeFromBeginning, and traverseOctreeFromExisting // See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture #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_transformPositionUvToView; uniform mat3 u_transformDirectionViewToLocal; uniform vec3 u_cameraPositionUv; uniform vec3 u_cameraDirectionUv; 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) /** * Given a coordinate within a tile, and sample spacings along a ray through * the coordinate, find the distance to the points where the ray entered and * exited the voxel cell, along with the surface normals at those points. * The surface normals are returned in shape space coordinates. */ 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) { // The Jacobian is computed in a space where the shape spans [-1, 1]. // But the ray is marched in a space where the shape fills [0, 1]. // So we need to scale the Jacobian by 2. vec3 gradient = 2.0 * viewRay.rawDir * jacobianT; vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient; RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay); // Transform normal from shape space to Cartesian space vec3 voxelNormal = normalize(jacobianT * voxelIntersection.entry.xyz); // Compare with the shape intersection, to choose the appropriate normal 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) { // Stop at end of shape 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) { // tileUv = 1.0 is a valid coordinate but sampleIndex = u_inputDimensions is not. // (tileUv = 1.0 corresponds to the far edge of the last sample, at index = u_inputDimensions - 1). // Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5); vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate); ivec3 sampleIndex = ivec3(floor(inputCoordinate)); // Convert to a 1D index for lookup in a 1D data array return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z); } /** * Compute the view ray at the current fragment, in the local UV coordinates of the shape. */ Ray getViewRayUv() { vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord); vec3 viewDirUv; vec3 viewPosUv; if (czm_orthographicIn3D == 1.0) { eyeCoordinates.z = 0.0; viewPosUv = (u_transformPositionViewToUv * eyeCoordinates).xyz; viewDirUv = normalize(u_cameraDirectionUv); } else { viewPosUv = u_cameraPositionUv; viewDirUv = normalize(u_transformDirectionViewToLocal * eyeCoordinates.xyz); } #if defined(SHAPE_ELLIPSOID) // viewDirUv has been scaled to a space where the ellipsoid is a sphere. // Undo this scaling to get the raw direction. vec3 rawDir = viewDirUv * u_ellipsoidRadiiUv; return Ray(viewPosUv, viewDirUv, rawDir); #else return Ray(viewPosUv, viewDirUv, viewDirUv); #endif } void main() { Ray viewRayUv = getViewRayUv(); Intersections ix; vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1] RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayUv, ix); // Exit early if the scene was completely missed. if (shapeIntersection.entry.w == NO_HIT) { discard; } float currentT = shapeIntersection.entry.w; float endT = shapeIntersection.exit.w; vec3 positionUv = viewRayUv.pos + currentT * viewRayUv.dir; PointJacobianT pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv); // Traverse the tree from the start position TraversalData traversalData; SampleData sampleDatas[SAMPLE_COUNT]; traverseOctreeFromBeginning(pointJacobian.point, traversalData, sampleDatas); vec4 step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT); #if defined(JITTER) float noise = hash(screenCoord); // [0,1] currentT += noise * step.w; positionUv += noise * step.w * viewRayUv.dir; #endif 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) { // Read properties from the megatexture based on the traversal state Properties properties = accumulatePropertiesFromMegatexture(sampleDatas); // Prepare the custom shader inputs copyPropertiesToMetadata(properties, fragmentInput.metadata); fragmentInput.attributes.positionEC = vec3(u_transformPositionUvToView * vec4(positionUv, 1.0)); fragmentInput.attributes.normalEC = normalize(czm_normal * step.xyz); fragmentInput.voxel.viewDirUv = viewRayUv.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; // Run the custom shader fragmentMain(fragmentInput, materialOutput); // Sanitize the custom shader output vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha); color.rgb = max(color.rgb, vec3(0.0)); color.a = clamp(color.a, 0.0, 1.0); // Pre-multiplied alpha blend colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a); // Stop traversing if the alpha has been fully saturated if (colorAccum.a > ALPHA_ACCUM_MAX) { colorAccum.a = ALPHA_ACCUM_MAX; break; } if (step.w == 0.0) { // Shape is infinitely thin. The ray may have hit the edge of a // foreground voxel. Step ahead slightly to check for more voxels step.w == 0.00001; } // Keep raymarching currentT += step.w; // Check if there's more intersections. if (currentT > endT) { #if (INTERSECTION_COUNT == 1) break; #else shapeIntersection = nextIntersection(ix); if (shapeIntersection.entry.w == NO_HIT) { break; } else { // Found another intersection. Resume raymarching there currentT = shapeIntersection.entry.w; endT = shapeIntersection.exit.w; } #endif } positionUv = viewRayUv.pos + currentT * viewRayUv.dir; // Traverse the tree from the current ray position. // This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step. pointJacobian = convertUvToShapeUvSpaceDerivative(positionUv); traverseOctreeFromExisting(pointJacobian.point, traversalData, sampleDatas); step = getStepSize(sampleDatas[0], viewRayUv, shapeIntersection, pointJacobian.jacobianT, currentT); } // Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1] colorAccum.a /= ALPHA_ACCUM_MAX; #if defined(PICKING) // If alpha is 0.0 there is nothing to pick if (colorAccum.a == 0.0) { discard; } out_FragColor = u_pickColor; #elif defined(PICKING_VOXEL) // If alpha is 0.0 there is nothing to pick 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 mk=`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 pk=`/* Intersection defines #define INTERSECTION_COUNT ### */ #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 { // Don't access these member variables directly - call the functions instead. // Store an array of ray-surface intersections. Each intersection is composed of: // .xyz for the surface normal at the intersection point // .w for the T value // The scale of the normal encodes the shape intersection type: // length(intersection.xyz) = 1: positive shape entry // length(intersection.xyz) = 2: positive shape exit // length(intersection.xyz) = 3: negative shape entry // length(intersection.xyz) = 4: negative shape exit // INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections, // so we need twice as many to track ray-*surface* intersections vec4 intersections[INTERSECTION_COUNT * 2]; float distanceToDepthBuffer; #if (INTERSECTION_COUNT > 1) // Maintain state for future nextIntersection calls 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); } // Use defines instead of real functions because WebGL1 cannot access array with non-constant index. #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) { // Sort the intersections from min T to max T with bubble sort. // Note: If this sorting function changes, some of the intersection test may // need to be updated. Search for "bubble sort" to find those areas. const int sortPasses = INTERSECTION_COUNT * 2 - 1; for (int n = sortPasses; n > 0; --n) { for (int i = 0; i < sortPasses; ++i) { // The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot // loop with non-constant condition, so it has to break early instead 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; } } // Prepare initial state for nextIntersection 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) { // The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot // loop with non-constant condition, so it has to continue instead. 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 = intMod(intersectionType, 2) == 0; ix.surroundCount += enter ? +1 : -1; ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive; // entering positive or exiting negative if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) { shapeIntersection.entry = surfaceIntersection; } // exiting positive or entering negative after being inside positive bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0; bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive; if (exitPositive || enterNegativeFromPositive) { shapeIntersection.exit = surfaceIntersection; // entry and exit have been found, so the loop can stop if (exitPositive) { // After exiting positive shape there is nothing left to intersect, so jump to the end index. ix.index = passCount; } break; } } return shapeIntersection; } #endif // NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1 `;var Ak=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, // setIntersectionPair, INF_HIT, NO_HIT /* intersectDepth defines (set in Scene/VoxelRenderResources.js) #define DEPTH_INTERSECTION_INDEX ### */ uniform mat4 u_transformPositionViewToUv; 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) { // Calculate how far the ray must travel before it hits the depth buffer. vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth); eyeCoordinateDepth /= eyeCoordinateDepth.w; vec3 depthPositionUv = vec3(u_transformPositionViewToUv * eyeCoordinateDepth); entry = dot(depthPositionUv - ray.pos, ray.dir); exit = +INF_HIT; } else { // There's no depth at this location. entry = NO_HIT; exit = NO_HIT; } ix.distanceToDepthBuffer = entry; #if defined(DEPTH_TEST) setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit)); #endif } `;var gk=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT, // NO_HIT, setShapeIntersection /* Clipping plane defines (set in Scene/VoxelRenderResources.js) #define CLIPPING_PLANES_UNION #define CLIPPING_PLANES_COUNT #define CLIPPING_PLANES_INTERSECTION_INDEX */ uniform sampler2D u_clippingPlanesTexture; uniform mat4 u_clippingPlanesMatrix; // Plane is in Hessian Normal Form vec4 intersectPlane(in Ray ray, in vec4 plane) { vec3 n = plane.xyz; // normal float w = plane.w; // -dot(pointOnPlane, normal) float a = dot(ray.pos, n); float b = dot(ray.dir, n); float t = -(w + a) / b; return vec4(n, t); } 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) // Union and intersection are the same when there's one clipping plane, and the code // is more simplified. vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0, u_clippingPlanesMatrix); 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, u_clippingPlanesMatrix); 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, u_clippingPlanesMatrix); 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 } `;var Cw=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, // RayShapeIntersection 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] = intersectHalfSpace(ray, minMaxAngle.x, false); intersections[1] = 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); if (hitPositiveHalfPlane(ray, intersection, true)) { intersections[0].entry = -1.0 * farSide; intersections[0].exit = vec4(-1.0 * intersection.xy, 0.0, intersection.w); intersections[1].entry = intersection; intersections[1].exit = farSide; } else { vec4 miss = vec4(normalize(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) { // Note: works for maxAngle > minAngle + pi, where the "regular wedge" // is actually a negative volume. // Compute intersections with the two planes. // Normals will point toward the "outside" (negative space) vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false); vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true); // Choose intersection with smallest T as the "first", the other as "last" // Note: first or last could be in the "shadow" wedge, beyond the tip 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) { // Ray crosses both faces of negative wedge, exiting then entering the positive shape return RayShapeIntersection(first, last); } else if (!exitFromInside && enterFromOutside) { // Ray starts inside wedge. last is in shadow wedge, and first is actually the entry return RayShapeIntersection(-1.0 * farSide, first); } else if (exitFromInside && !enterFromOutside) { // First intersection was in the shadow wedge, so last is actually the exit return RayShapeIntersection(last, farSide); } else { // !exitFromInside && !enterFromOutside // Both intersections were in the shadow wedge return RayShapeIntersection(miss, miss); } } `;var _k=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection, // NO_HIT, Intersections /* Box defines (set in Scene/VoxelBoxShape.js) #define BOX_INTERSECTION_INDEX ### // always 0 */ uniform vec3 u_renderMinBounds; uniform vec3 u_renderMaxBounds; RayShapeIntersection intersectBox(in Ray ray, in vec3 minBound, in vec3 maxBound) { // Consider the box as the intersection of the space between 3 pairs of parallel planes // Compute the distance along the ray to each plane vec3 t0 = (minBound - ray.pos) / ray.dir; vec3 t1 = (maxBound - ray.pos) / ray.dir; // Identify candidate entries/exits based on distance from ray.pos vec3 entries = min(t0, t1); vec3 exits = max(t0, t1); vec3 directions = sign(ray.dir); // The actual intersection points are the furthest entry and the closest exit float lastEntry = maxComponent(entries); bvec3 isLastEntry = equal(entries, vec3(lastEntry)); vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions; vec4 entry = vec4(entryNormal, lastEntry); float firstExit = minComponent(exits); bvec3 isFirstExit = equal(exits, vec3(firstExit)); vec3 exitNormal = vec3(isLastEntry) * directions; vec4 exit = vec4(exitNormal, firstExit); if (entry.w > exit.w) { entry.w = NO_HIT; exit.w = NO_HIT; } return RayShapeIntersection(entry, exit); } void intersectShape(in Ray ray, inout Intersections ix) { RayShapeIntersection intersection = intersectBox(ray, u_renderMinBounds, u_renderMaxBounds); setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection); } `;var yk=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections, // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection, // intersectIntersections // See IntersectLongitude.glsl for the definitions of intersectHalfPlane, // intersectFlippedWedge, intersectRegularWedge /* Cylinder defines (set in Scene/VoxelCylinderShape.js) #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN #define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF #define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO #define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX #define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN #define CYLINDER_INTERSECTION_INDEX_ANGLE */ // Cylinder uniforms uniform vec2 u_cylinderRenderRadiusMinMax; uniform vec2 u_cylinderRenderHeightMinMax; #if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE) uniform vec2 u_cylinderRenderAngleMinMax; #endif /** * Find the intersection of a ray with the volume defined by two planes of constant z */ RayShapeIntersection intersectHeightBounds(in Ray ray, in vec2 minMaxHeight, in bool convex) { float zPosition = ray.pos.z; float zDirection = ray.dir.z; float tmin = (minMaxHeight.x - zPosition) / zDirection; float tmax = (minMaxHeight.y - zPosition) / zDirection; // Normals point outside the volume float signFlip = convex ? 1.0 : -1.0; vec4 intersectMin = vec4(0.0, 0.0, -1.0 * signFlip, tmin); vec4 intersectMax = vec4(0.0, 0.0, 1.0 * signFlip, tmax); bool topEntry = zDirection < 0.0; vec4 entry = topEntry ? intersectMax : intersectMin; vec4 exit = topEntry ? intersectMin : intersectMax; return RayShapeIntersection(entry, exit); } /** * Find the intersection of a ray with a right cylindrical surface of a given radius * about the z-axis. */ 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; vec4 intersect1 = vec4(normalize(position + t1 * direction) * signFlip, 0.0, t1); vec4 intersect2 = vec4(normalize(position + t2 * direction) * signFlip, 0.0, t2); return RayShapeIntersection(intersect1, intersect2); } /** * Find the intersection of a ray with a right cylindrical solid of given * radius and height bounds. NOTE: The shape is assumed to be convex. */ RayShapeIntersection intersectBoundedCylinder(in Ray ray, in float radius, in vec2 minMaxHeight) { RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true); RayShapeIntersection heightBoundsIntersection = intersectHeightBounds(ray, minMaxHeight, true); return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection); } void intersectShape(Ray ray, inout Intersections ix) { // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1]. // Direction is scaled as well to be in sync with position. ray.pos = ray.pos * 2.0 - 1.0; ray.dir *= 2.0; RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, u_cylinderRenderRadiusMinMax.y, u_cylinderRenderHeightMinMax); setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect); if (outerIntersect.entry.w == NO_HIT) { return; } #if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT) // When the cylinder is perfectly thin it's necessary to sandwich the // inner cylinder intersection inside the outer cylinder intersection. // Without this special case, // [outerMin, outerMax, innerMin, innerMax] will bubble sort to // [outerMin, innerMin, outerMax, innerMax] which will cause the back // side of the cylinder to be invisible because it will think the ray // is still inside the inner (negative) cylinder after exiting the // outer (positive) cylinder. // With this special case, // [outerMin, innerMin, innerMax, outerMax] will bubble sort to // [outerMin, innerMin, innerMax, outerMax] which will work correctly. // Note: If initializeIntersections() changes its sorting function // from bubble sort to something else, this code may need to change. RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false); setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit #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 Ck=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections, // RayShapeIntersection, setSurfaceIntersection, setShapeIntersection // See IntersectLongitude.glsl for the definitions of intersectHalfPlane, // intersectFlippedWedge, intersectRegularWedge /* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js) #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF #define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF #define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX #define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX #define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN */ #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 relativeHeight, in bool convex) { // Scale the ray by the ellipsoid axes to make it a unit sphere // Note: approximating ellipsoid + height as an ellipsoid vec3 radiiCorrection = u_ellipsoidRadiiUv / (u_ellipsoidRadiiUv + relativeHeight); vec3 position = ray.pos * radiiCorrection; vec3 direction = ray.dir * radiiCorrection; float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled) float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in. float determinant = b * b - a * c; // ~ b * b when zoomed in if (determinant < 0.0) { vec4 miss = vec4(normalize(direction), NO_HIT); return RayShapeIntersection(miss, miss); } determinant = sqrt(determinant); // Compute larger root using standard formula float signB = b < 0.0 ? -1.0 : 1.0; // The other root may suffer from subtractive cancellation in the standard formula. // Compute it from the first root instead. 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 * normalize(position + tmin * direction); vec3 d2 = directionScale * normalize(position + tmax * direction); return RayShapeIntersection(vec4(d1, tmin), vec4(d2, tmax)); } /** * Given a circular cone around the z-axis, with apex at the origin, * find the parametric distance(s) along a ray where that ray intersects * the cone. * The cone opening angle is described by the squared cosine of * its half-angle (the angle between the Z-axis and the surface) */ 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; // determinant = b * b - a * c. But bSin * bSin = aSin * cSin. // Avoid subtractive cancellation by expanding to eliminate these terms 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) { // Ray is parallel to cone surface return (b == 0.0) ? vec2(NO_HIT) // Ray is on cone surface : vec2(-0.5 * c / b, NO_HIT); } determinant = sqrt(determinant); // Compute larger root using standard formula float signB = b < 0.0 ? -1.0 : 1.0; float t1 = (-b - signB * determinant) / a; // The other root may suffer from subtractive cancellation in the standard formula. // Compute it from the first root instead. float t2 = c / (a * t1); float tmin = min(t1, t2); float tmax = max(t1, t2); return vec2(tmin, tmax); } /** * Given a point on a conical surface, find the surface normal at that point. */ vec3 getConeNormal(in vec3 p, in bool convex) { // Start with radial component pointing toward z-axis vec2 radial = -abs(p.z) * normalize(p.xy); // Z component points toward opening of cone float zSign = (p.z < 0.0) ? -1.0 : 1.0; float z = length(p.xy) * zSign; // Flip normal if shape is convex float flip = (convex) ? -1.0 : 1.0; return normalize(vec3(radial, z) * flip); } /** * Compute the shift between the ellipsoid origin and the apex of a cone of latitude */ float getLatitudeConeShift(in float sinLatitude) { // Find prime vertical radius of curvature: // the distance along the ellipsoid normal to the intersection with the z-axis float x2 = u_eccentricitySquared * sinLatitude * sinLatitude; float primeVerticalRadius = inversesqrt(1.0 - x2); // Compute a shift from the origin to the intersection of the cone with the z-axis return primeVerticalRadius * u_eccentricitySquared * sinLatitude; } void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) { // Undo the scaling from ellipsoid to sphere ray.pos = ray.pos * u_ellipsoidRadiiUv; ray.dir = ray.dir * u_ellipsoidRadiiUv; // Shift the ray to account for the latitude cone not being centered at the Earth center 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); // Initialize output with no intersections intersections[0].entry = -1.0 * farSide; intersections[0].exit = farSide; intersections[1].entry = miss; intersections[1].exit = miss; if (intersect.x == NO_HIT) { return; } // Find the points of intersection 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) { // no valid intersections } 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) { // Undo the scaling from ellipsoid to sphere ray.pos = ray.pos * u_ellipsoidRadiiUv; ray.dir = ray.dir * u_ellipsoidRadiiUv; // Shift the ray to account for the latitude cone not being centered at the Earth center 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); } // Find the points of intersection 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, inout Intersections ix) { // Position is converted from [0,1] to [-1,+1] because shape intersections assume unit space is [-1,+1]. // Direction is scaled as well to be in sync with position. ray.pos = ray.pos * 2.0 - 1.0; ray.dir *= 2.0; // Outer ellipsoid RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true); setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect); // Exit early if the outer ellipsoid was missed. if (outerIntersect.entry.w == NO_HIT) { return; } // Inner ellipsoid RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false); if (innerIntersect.entry.w == NO_HIT) { setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect); } else { // When the ellipsoid is large and thin it's possible for floating point math // to cause the ray to intersect the inner ellipsoid before the outer ellipsoid. // To prevent this from happening, clamp innerIntersect to outerIntersect and // sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection. // Without this special case, // [outerMin, outerMax, innerMin, innerMax] will bubble sort to // [outerMin, innerMin, outerMax, innerMax] which will cause the back // side of the ellipsoid to be invisible because it will think the ray // is still inside the inner (negative) ellipsoid after exiting the // outer (positive) ellipsoid. // With this special case, // [outerMin, innerMin, innerMax, outerMax] will bubble sort to // [outerMin, innerMin, innerMax, outerMax] which will work correctly. // Note: If initializeIntersections() changes its sorting function // from bubble sort to something else, this code may need to change. 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); // positive, enter setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit } // Bottom cone #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 // Top cone #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 // Wedge #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 XI=`// Main intersection function for Voxel scenes. // See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl // for the definition of intersectShape. The appropriate function is selected // based on the VoxelPrimitive shape type, and added to the shader in // Scene/VoxelRenderResources.js. // See also IntersectClippingPlane.glsl and IntersectDepth.glsl. // See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, // getFirstIntersection, initializeIntersections, nextIntersection. /* Intersection defines (set in Scene/VoxelRenderResources.js) #define INTERSECTION_COUNT ### */ RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, out Intersections ix) { // Do a ray-shape intersection to find the exact starting and ending points. intersectShape(ray, ix); // Exit early if the positive shape was completely missed or behind the ray. RayShapeIntersection intersection = getFirstIntersection(ix); if (intersection.entry.w == NO_HIT) { // Positive shape was completely missed - so exit early. return intersection; } // Clipping planes #if defined(CLIPPING_PLANES) intersectClippingPlanes(ray, ix); #endif // Depth intersectDepth(screenCoord, ray, ix); // Find the first intersection that's in front of the ray #if (INTERSECTION_COUNT > 1) initializeIntersections(ix); for (int i = 0; i < INTERSECTION_COUNT; ++i) { intersection = nextIntersection(ix); if (intersection.exit.w > 0.0) { // Set start to 0.0 when ray is inside the shape. intersection.entry.w = max(intersection.entry.w, 0.0); break; } } #else // Set start to 0.0 when ray is inside the shape. intersection.entry.w = max(intersection.entry.w, 0.0); #endif return intersection; } `;var Ek=`/* Box defines (set in Scene/VoxelBoxShape.js) #define BOX_HAS_SHAPE_BOUNDS */ #if defined(BOX_HAS_SHAPE_BOUNDS) uniform vec3 u_boxUvToShapeUvScale; uniform vec3 u_boxUvToShapeUvTranslate; #endif PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) { // For BOX, UV space = shape space, so we can use positionUv as-is, // and the Jacobian is the identity matrix, except that a step of 1 // only spans half the shape space [-1, 1], so the identity is scaled. return PointJacobianT(positionUv, mat3(0.5)); } vec3 convertShapeToShapeUvSpace(in vec3 positionShape) { #if defined(BOX_HAS_SHAPE_BOUNDS) return positionShape * u_boxUvToShapeUvScale + u_boxUvToShapeUvTranslate; #else return positionShape; #endif } PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) { PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv); pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point); return pointJacobian; } vec3 convertShapeUvToUvSpace(in vec3 shapeUv) { #if defined(BOX_HAS_SHAPE_BOUNDS) return (shapeUv - u_boxUvToShapeUvTranslate) / u_boxUvToShapeUvScale; #else return shapeUv; #endif } vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { #if defined(BOX_HAS_SHAPE_BOUNDS) return shapeUv / u_boxUvToShapeUvScale; #else return shapeUv; #endif }`;var Ik=`/* Cylinder defines (set in Scene/VoxelCylinderShape.js) #define CYLINDER_HAS_SHAPE_BOUNDS_RADIUS #define CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY #define CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED */ #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS) uniform vec2 u_cylinderUvToShapeUvRadius; // x = scale, y = offset #endif #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT) uniform vec2 u_cylinderUvToShapeUvHeight; // x = scale, y = offset #endif #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE) uniform vec2 u_cylinderUvToShapeUvAngle; // x = scale, y = offset #endif #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) uniform vec2 u_cylinderShapeUvAngleMinMax; #endif #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) || defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED) uniform float u_cylinderShapeUvAngleRangeZeroMid; #endif PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) { // Convert from Cartesian UV space [0, 1] to Cartesian local space [-1, 1] vec3 position = positionUv * 2.0 - 1.0; float radius = length(position.xy); // [0, 1] vec3 radial = normalize(vec3(position.xy, 0.0)); // Shape space height is defined within [0, 1] float height = positionUv.z; // [0, 1] vec3 z = vec3(0.0, 0.0, 1.0); float angle = atan(position.y, position.x); vec3 east = normalize(vec3(-position.y, position.x, 0.0)); vec3 point = vec3(radius, angle, height); mat3 jacobianT = mat3(radial, east / length(position.xy), z); return PointJacobianT(point, jacobianT); } vec3 convertShapeToShapeUvSpace(in vec3 positionShape) { float radius = positionShape.x; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS) radius = radius * u_cylinderUvToShapeUvRadius.x + u_cylinderUvToShapeUvRadius.y; #endif float angle = (positionShape.y + czm_pi) / czm_twoPi; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE) #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED) // Comparing against u_cylinderShapeUvAngleMinMax has precision problems. u_cylinderShapeUvAngleRangeZeroMid is more conservative. angle += float(angle < u_cylinderShapeUvAngleRangeZeroMid); #endif // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity. #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY) angle = angle > u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.x : angle; #elif defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY) angle = angle < u_cylinderShapeUvAngleRangeZeroMid ? u_cylinderShapeUvAngleMinMax.y : angle; #endif angle = angle * u_cylinderUvToShapeUvAngle.x + u_cylinderUvToShapeUvAngle.y; #endif float height = positionShape.z; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT) height = height * u_cylinderUvToShapeUvHeight.x + u_cylinderUvToShapeUvHeight.y; #endif return vec3(radius, angle, height); } PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) { PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv); pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point); return pointJacobian; } vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { float radius = shapeUv.x; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_RADIUS) radius /= u_cylinderUvToShapeUvRadius.x; #endif float angle = shapeUv.y * czm_twoPi; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE) angle /= u_cylinderUvToShapeUvAngle.x; #endif float height = shapeUv.z; #if defined(CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT) height /= u_cylinderUvToShapeUvHeight.x; #endif return vec3(radius, angle, height); } `;var xk=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js) #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY #define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE #define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED #define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE */ uniform vec3 u_ellipsoidRadiiUv; // [0,1] uniform vec2 u_evoluteScale; // (radiiUv.x ^ 2 - radiiUv.z ^ 2) * vec2(1.0, -1.0) / radiiUv; uniform vec3 u_ellipsoidInverseRadiiSquaredUv; #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) || defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) || defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED) uniform vec3 u_ellipsoidShapeUvLongitudeMinMaxMid; #endif #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE) uniform vec2 u_ellipsoidUvToShapeUvLongitude; // x = scale, y = offset #endif #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE) uniform vec2 u_ellipsoidUvToShapeUvLatitude; // x = scale, y = offset #endif uniform float u_ellipsoidInverseHeightDifferenceUv; // robust iterative solution without trig functions // https://github.com/0xfaded/ellipse_demo/issues/1 // https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse // Extended to return radius of curvature along with the point vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) { vec2 p = abs(pos); vec2 inverseRadii = 1.0 / radii; // We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t)) // but store the cos and sin of t in a vec2 for efficiency. // Initial guess: t = pi/4 vec2 tTrigs = vec2(0.7071067811865476); // Initial guess of point on ellipsoid vec2 v = radii * tTrigs; // Center of curvature of the ellipse at v vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs; const int iterations = 3; for (int i = 0; i < iterations; ++i) { // Find the (approximate) intersection of p - evolute with the ellipsoid. vec2 q = normalize(p - evolute) * length(v - evolute); // Update the estimate of t. 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)); } PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) { // Convert from UV space [0, 1] to local space [-1, 1] vec3 position = positionUv * 2.0 - 1.0; // Undo the scaling from ellipsoid to sphere position = position * u_ellipsoidRadiiUv; float longitude = atan(position.y, position.x); vec3 east = normalize(vec3(-position.y, position.x, 0.0)); // Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z) // (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal float distanceFromZAxis = length(position.xy); vec2 posEllipse = vec2(distanceFromZAxis, position.z); vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadiiUv.xz); vec2 surfacePoint = surfacePointAndRadius.xy; vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquaredUv.xz); float latitude = atan(normal2d.y, normal2d.x); 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)); vec3 point = vec3(longitude, latitude, height); mat3 jacobianT = mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up); return PointJacobianT(point, jacobianT); } vec3 convertShapeToShapeUvSpace(in vec3 positionShape) { // Longitude: shift & scale to [0, 1] float longitude = (positionShape.x + czm_pi) / czm_twoPi; // Correct the angle when max < min // Technically this should compare against min longitude - but it has precision problems so compare against the middle of empty space. #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED) longitude += float(longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z); #endif // Avoid flickering from reading voxels from both sides of the -pi/+pi discontinuity. #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY) longitude = longitude > u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.x : longitude; #endif #if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY) longitude = longitude < u_ellipsoidShapeUvLongitudeMinMaxMid.z ? u_ellipsoidShapeUvLongitudeMinMaxMid.y : longitude; #endif #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE) longitude = longitude * u_ellipsoidUvToShapeUvLongitude.x + u_ellipsoidUvToShapeUvLongitude.y; #endif // Latitude: shift and scale to [0, 1] float latitude = (positionShape.y + czm_piOverTwo) / czm_pi; #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE) latitude = latitude * u_ellipsoidUvToShapeUvLatitude.x + u_ellipsoidUvToShapeUvLatitude.y; #endif // Height: scale to the range [0, 1] float height = 1.0 + positionShape.z * u_ellipsoidInverseHeightDifferenceUv; return vec3(longitude, latitude, height); } PointJacobianT convertUvToShapeUvSpaceDerivative(in vec3 positionUv) { PointJacobianT pointJacobian = convertUvToShapeSpaceDerivative(positionUv); pointJacobian.point = convertShapeToShapeUvSpace(pointJacobian.point); return pointJacobian; } vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) { // Convert from [0, 1] to radians [-pi, pi] float longitude = shapeUv.x * czm_twoPi; #if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE) longitude /= u_ellipsoidUvToShapeUvLongitude.x; #endif // Convert from [0, 1] to radians [-pi/2, pi/2] float latitude = shapeUv.y * czm_pi; #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE) latitude /= u_ellipsoidUvToShapeUvLatitude.x; #endif float height = shapeUv.z / u_ellipsoidInverseHeightDifferenceUv; return vec3(longitude, latitude, height); } `;var bk=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js #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; // does not include padding, and is in the z-up orientation uniform ivec3 u_inputDimensions; // includes padding, and is in the orientation of the input data #if defined(PADDING) uniform ivec3 u_paddingBefore; #endif struct OctreeNodeData { int data; int flag; }; struct TraversalData { ivec4 octreeCoords; int parentOctreeIndex; }; struct SampleData { int megatextureIndex; ivec4 tileCoords; vec3 tileUv; vec3 inputCoordinate; #if (SAMPLE_COUNT > 1) float weight; #endif }; // Integer mod: For WebGL1 only int intMod(in int a, in int b) { return a - (b * (a / b)); } 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 = intMod(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 = intMod(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; } /** * Convert a position in the uv-space of the tileset bounding shape * into the uv-space of a tile within the tileset */ vec3 getTileUv(in vec3 shapePosition, in ivec4 octreeCoords) { // PERFORMANCE_IDEA: use bit-shifting (only in WebGL2) float dimAtLevel = exp2(float(octreeCoords.w)); return shapePosition * dimAtLevel - vec3(octreeCoords.xyz); } vec3 getClampedTileUv(in vec3 shapePosition, in ivec4 octreeCoords) { vec3 tileUv = getTileUv(shapePosition, octreeCoords); return clamp(tileUv, vec3(0.0), vec3(1.0)); } void addSampleCoordinates(in vec3 shapePosition, inout SampleData sampleData) { vec3 tileUv = getClampedTileUv(shapePosition, 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 = float(u_inputDimensions.y) - inputCoordinate.z; inputCoordinate.z = inputY; #elif defined(SHAPE_CYLINDER) float angle = inputCoordinate.y; float height = inputCoordinate.z; #if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)) // Account for the different 0-angle convention in glTF vs 3DTiles 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; // Adding 0.5 moves to the center of the texel float leafCoordXStart = float(intMod(leafIndex, u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5; float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5; // Get an interpolation weight and a flag to determine whether to read the parent texture 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; // TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 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; // Get megatexture indices for both samples 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 vec3 shapePosition, inout TraversalData traversalData) { float sizeAtLevel = exp2(-1.0 * float(traversalData.octreeCoords.w)); vec3 start = vec3(traversalData.octreeCoords.xyz) * sizeAtLevel; vec3 end = start + vec3(sizeAtLevel); OctreeNodeData childData; for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) { // Find out which octree child contains the position // 0 if before center, 1 if after vec3 center = 0.5 * (start + end); vec3 childCoord = step(center, shapePosition); // Get octree coords for the next level down ivec4 octreeCoords = traversalData.octreeCoords; traversalData.octreeCoords = ivec4(octreeCoords.xyz * 2 + ivec3(childCoord), octreeCoords.w + 1); childData = getOctreeChildData(traversalData.parentOctreeIndex, ivec3(childCoord)); if (childData.flag != OCTREE_FLAG_INTERNAL) { // leaf tile - stop traversing break; } // interior tile - keep going deeper start = mix(start, center, childCoord); end = mix(center, end, childCoord); traversalData.parentOctreeIndex = childData.data; } return childData; } /** * Transform a given position to an octree tile coordinate and a position within that tile, * and find the corresponding megatexture index and texture coordinates */ void traverseOctreeFromBeginning(in vec3 shapePosition, 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(shapePosition, traversalData); } #if (SAMPLE_COUNT == 1) getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]); addSampleCoordinates(shapePosition, sampleDatas[0]); #else getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas); addSampleCoordinates(shapePosition, sampleDatas[0]); addSampleCoordinates(shapePosition, sampleDatas[1]); #endif } bool inRange(in vec3 v, in vec3 minVal, in vec3 maxVal) { return clamp(v, minVal, maxVal) == v; } bool insideTile(in vec3 shapePosition, in ivec4 octreeCoords) { vec3 tileUv = getTileUv(shapePosition, octreeCoords); bool inside = inRange(tileUv, vec3(0.0), vec3(1.0)); // Assume (!) the position is always inside the root tile. return inside || octreeCoords.w == 0; } void traverseOctreeFromExisting(in vec3 shapePosition, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) { if (insideTile(shapePosition, traversalData.octreeCoords)) { for (int i = 0; i < SAMPLE_COUNT; i++) { addSampleCoordinates(shapePosition, sampleDatas[i]); } return; } // Go up tree until we find a parent tile containing shapePosition for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) { traversalData.octreeCoords.xyz /= 2; traversalData.octreeCoords.w -= 1; if (insideTile(shapePosition, traversalData.octreeCoords)) { break; } traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex); } // Go down tree OctreeNodeData nodeData = traverseOctreeDownwards(shapePosition, traversalData); #if (SAMPLE_COUNT == 1) getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]); addSampleCoordinates(shapePosition, sampleDatas[0]); #else getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas); addSampleCoordinates(shapePosition, sampleDatas[0]); addSampleCoordinates(shapePosition, sampleDatas[1]); #endif } `;var Tk=`// See Octree.glsl for the definitions of SampleData and intMod /* Megatexture defines (set in Scene/VoxelRenderResources.js) #define SAMPLE_COUNT ### #define NEAREST_SAMPLING #define PADDING */ uniform ivec2 u_megatextureSliceDimensions; // number of slices per tile, in two dimensions uniform ivec2 u_megatextureTileDimensions; // number of tiles per megatexture, in two dimensions uniform vec2 u_megatextureVoxelSizeUv; uniform vec2 u_megatextureSliceSizeUv; uniform vec2 u_megatextureTileSizeUv; // Integer min, max, clamp: For WebGL1 only int intMin(int a, int b) { return a <= b ? a : b; } int intMax(int a, int b) { return a >= b ? a : b; } int intClamp(int v, int minVal, int maxVal) { return intMin(intMax(v, minVal), maxVal); } vec2 index1DTo2DTexcoord(int index, ivec2 dimensions, vec2 uvScale) { int indexX = intMod(index, dimensions.x); int indexY = index / dimensions.x; return vec2(indexX, indexY) * uvScale; } /* How is 3D data stored in a 2D megatexture? In this example there is only one loaded tile and it has 2x2x2 voxels (8 voxels total). The data is sliced by Z. The data at Z = 0 is placed in texels (0,0), (0,1), (1,0), (1,1) and the data at Z = 1 is placed in texels (2,0), (2,1), (3,0), (3,1). Note that there could be empty space in the megatexture because it's a power of two. 0 1 2 3 +---+---+---+---+ | | | | | 3 +---+---+---+---+ | | | | | 2 +-------+-------+ |010|110|011|111| 1 |--- ---|--- ---| |000|100|001|101| 0 +-------+-------+ When doing linear interpolation the megatexture needs to be sampled twice: once for the Z slice above the voxel coordinate and once for the slice below. The two slices are interpolated with fract(coord.z - 0.5). For example, a Z coordinate of 1.0 is halfway between two Z slices so the interpolation factor is 0.5. Below is a side view of the 3D voxel grid with voxel coordinates on the left side. 2 +---+ |001| 1 +-z-+ |000| 0 +---+ When doing nearest neighbor the megatexture only needs to be sampled once at the closest Z slice. */ Properties getPropertiesFromMegatexture(in SampleData sampleData) { int tileIndex = sampleData.megatextureIndex; vec3 voxelCoord = sampleData.inputCoordinate; #if defined(NEAREST_SAMPLING) // Round to the center of the nearest voxel voxelCoord = floor(voxelCoord) + vec3(0.5); #endif // Tile location vec2 tileUvOffset = index1DTo2DTexcoord(tileIndex, u_megatextureTileDimensions, u_megatextureTileSizeUv); // Slice location float slice = voxelCoord.z - 0.5; int sliceIndex = int(floor(slice)); int sliceIndex0 = intClamp(sliceIndex, 0, u_inputDimensions.z - 1); vec2 sliceUvOffset0 = index1DTo2DTexcoord(sliceIndex0, u_megatextureSliceDimensions, u_megatextureSliceSizeUv); // Voxel location vec2 voxelUvOffset = clamp(voxelCoord.xy, vec2(0.5), vec2(u_inputDimensions.xy) - vec2(0.5)) * u_megatextureVoxelSizeUv; // Final location in the megatexture vec2 uv0 = tileUvOffset + sliceUvOffset0 + voxelUvOffset; #if defined(NEAREST_SAMPLING) return getPropertiesFromMegatextureAtUv(uv0); #else float sliceLerp = fract(slice); int sliceIndex1 = intMin(sliceIndex + 1, u_inputDimensions.z - 1); vec2 sliceUvOffset1 = index1DTo2DTexcoord(sliceIndex1, u_megatextureSliceDimensions, u_megatextureSliceSizeUv); vec2 uv1 = tileUvOffset + sliceUvOffset1 + voxelUvOffset; Properties properties0 = getPropertiesFromMegatextureAtUv(uv0); Properties properties1 = getPropertiesFromMegatextureAtUv(uv1); return mixProperties(properties0, properties1, sliceLerp); #endif } // Convert an array of sample datas to a final weighted properties. Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) { #if (SAMPLE_COUNT == 1) return getPropertiesFromMegatexture(sampleDatas[0]); #else // When more than one sample is taken the accumulator needs to start at 0 Properties properties = clearProperties(); for (int i = 0; i < SAMPLE_COUNT; ++i) { float weight = sampleDatas[i].weight; // Avoid reading the megatexture when the weight is 0 as it can be costly. if (weight > 0.0) { Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]); tempProperties = scaleProperties(tempProperties, weight); properties = sumProperties(properties, tempProperties); } } return properties; #endif } `;var KIt={Z_UP:0,Y_UP:1},qd=Object.freeze(KIt);function XIt(e){let t=new cA;this.shaderBuilder=t;let n=e._customShader,i=St(e._uniformMap,n.uniformMap);e._uniformMap=i;let o=n.uniforms;for(let p in o)if(o.hasOwnProperty(p)){let g=o[p];t.addUniform(g.type,p,Ae.FRAGMENT)}t.addUniform("sampler2D","u_megatextureTextures[METADATA_COUNT]",Ae.FRAGMENT),this.uniformMap=i;let r=e._clippingPlanes,s=l(r)&&r.enabled?r.length:0;this.clippingPlanes=r,this.clippingPlanesLength=s,t.addVertexLines([mk]),e.provider.metadataOrder===qd.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,Ae.FRAGMENT);let a=e._provider.shape;a==="BOX"?t.addDefine("SHAPE_BOX",void 0,Ae.FRAGMENT):a==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,Ae.FRAGMENT):a==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,Ae.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",bk,dk,pk,Tk]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,Ae.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,Ae.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,Ae.FRAGMENT),t.addFragmentLines([gk])),t.addFragmentLines([Ak]),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,Ae.FRAGMENT),a==="BOX"?t.addFragmentLines([Ek,_k,XI]):a==="CYLINDER"?t.addFragmentLines([Ik,Cw,yk,XI]):a==="ELLIPSOID"&&t.addFragmentLines([xk,Cw,Ck,XI]),t.addFragmentLines([hk]);let c=e._shape,u=c.shaderDefines;for(let p in u)if(u.hasOwnProperty(p)){let g=u[p];l(g)&&(g=g===!0?void 0:g,t.addDefine(p,g,Ae.FRAGMENT))}let f=c.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",f,Ae.FRAGMENT),s===1?f+=1:r.unionClippingRegions?f+=2:f+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",f,Ae.FRAGMENT),f+=1),t.addDefine("INTERSECTION_COUNT",f,Ae.FRAGMENT),(!d.equals(e.paddingBefore,d.ZERO)||!d.equals(e.paddingAfter,d.ZERO))&&t.addDefine("PADDING",void 0,Ae.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,Ae.FRAGMENT),e._nearestSampling&&t.addDefine("NEAREST_SAMPLING",void 0,Ae.FRAGMENT);let h=e._traversal;t.addDefine("SAMPLE_COUNT",`${h._sampleCount}`,Ae.FRAGMENT)}var Sk=XIt;function JIt(e,t){let{shaderBuilder:n}=e,{names:i,types:o,componentTypes:r,minimumValues:s,maximumValues:a}=t._provider,c=o.length,u=l(s)&&l(a);n.addDefine("METADATA_COUNT",c,Ae.FRAGMENT),u&&n.addDefine("STATISTICS",void 0,Ae.FRAGMENT);for(let A=0;A<c;A++){let x=i[A],T=NH(o[A]),w=`PropertyStatistics_${x}`,R=`PropertyStatistics_${x}`;n.addStruct(w,R,Ae.FRAGMENT),n.addStructField(w,T,"min"),n.addStructField(w,T,"max")}let f="MetadataStatistics",h="MetadataStatistics",p="metadataStatistics";n.addStruct(f,h,Ae.FRAGMENT);for(let A=0;A<c;A++){let x=i[A],T=`PropertyStatistics_${x}`,w=x;n.addStructField(f,T,w)}let g="Metadata",m="Metadata",_="metadata";n.addStruct(g,m,Ae.FRAGMENT);for(let A=0;A<c;A++){let x=NH(o[A]);n.addStructField(g,x,i[A])}let y="Attributes",C="Attributes",E="attributes";n.addStruct(y,C,Ae.FRAGMENT),n.addStructField(y,"vec3","positionEC"),n.addStructField(y,"vec3","normalEC");let I="Voxel",b="Voxel",S="voxel";n.addStruct(I,b,Ae.FRAGMENT),n.addStructField(I,"vec3","viewDirUv"),n.addStructField(I,"float","travelDistance"),n.addStructField(I,"int","stepCount"),n.addStructField(I,"int","tileIndex"),n.addStructField(I,"int","sampleIndex"),n.addStructField(I,"float","distanceToDepthBuffer");let B="FragmentInput";n.addStruct(B,"FragmentInput",Ae.FRAGMENT),n.addStructField(B,h,p),n.addStructField(B,m,_),n.addStructField(B,C,E),n.addStructField(B,b,S);let P="Properties",N="Properties",L="properties";n.addStruct(P,N,Ae.FRAGMENT);for(let A=0;A<c;A++){let x=NH(o[A]);n.addStructField(P,x,i[A])}{let A="clearProperties";n.addFunction(A,`${N} clearProperties()`,Ae.FRAGMENT),n.addFunctionLines(A,[`${N} ${L};`]);for(let x=0;x<c;x++){let T=NH(o[x],r[x]);n.addFunctionLines(A,[`${L}.${i[x]} = ${T}(0.0);`])}n.addFunctionLines(A,[`return ${L};`])}{let A="sumProperties";n.addFunction(A,`${N} sumProperties(${N} propertiesA, ${N} propertiesB)`,Ae.FRAGMENT),n.addFunctionLines(A,[`${N} ${L};`]);for(let x=0;x<c;x++){let T=i[x];n.addFunctionLines(A,[`${L}.${T} = propertiesA.${T} + propertiesB.${T};`])}n.addFunctionLines(A,[`return ${L};`])}{let A="scaleProperties";n.addFunction(A,`${N} scaleProperties(${N} ${L}, float scale)`,Ae.FRAGMENT),n.addFunctionLines(A,[`${N} scaledProperties = ${L};`]);for(let x=0;x<c;x++)n.addFunctionLines(A,[`scaledProperties.${i[x]} *= scale;`]);n.addFunctionLines(A,["return scaledProperties;"])}{let A="mixProperties";n.addFunction(A,`${N} mixProperties(${N} propertiesA, ${N} propertiesB, float mixFactor)`,Ae.FRAGMENT),n.addFunctionLines(A,[`${N} ${L};`]);for(let x=0;x<c;x++){let T=i[x];n.addFunctionLines(A,[`${L}.${T} = mix(propertiesA.${T}, propertiesB.${T}, mixFactor);`])}n.addFunctionLines(A,[`return ${L};`])}{let A="copyPropertiesToMetadata";n.addFunction(A,`void copyPropertiesToMetadata(in ${N} ${L}, inout ${m} ${_})`,Ae.FRAGMENT);for(let x=0;x<c;x++){let T=i[x];n.addFunctionLines(A,[`${_}.${T} = ${L}.${T};`])}}if(u){let A="setStatistics";n.addFunction(A,`void setStatistics(inout ${h} ${p})`,Ae.FRAGMENT);for(let x=0;x<c;x++){let T=i[x],w=o[x],R=At.getComponentCount(w);for(let O=0;O<R;O++){let k=$It(w,O),F=s[x][O],z=a[x][O];!l(F)||!l(z)||n.addFunctionLines(A,[`${p}.${T}.min${k} = ${Ebe(F)};`,`${p}.${T}.max${k} = ${Ebe(z)};`])}}}{let A="getPropertiesFromMegatextureAtUv";n.addFunction(A,`${N} getPropertiesFromMegatextureAtUv(vec2 texcoord)`,Ae.FRAGMENT),n.addFunctionLines(A,[`${N} ${L};`]);for(let x=0;x<c;x++){let T=o[x],w=r[x],R=ZIt(T,w);n.addFunctionLines(A,[`properties.${i[x]} = texture(u_megatextureTextures[${x}], texcoord)${R};`])}n.addFunctionLines(A,[`return ${L};`])}}function NH(e){if(e===At.SCALAR)return"float";if(e===At.VEC2)return"vec2";if(e===At.VEC3)return"vec3";if(e===At.VEC4)return"vec4"}function ZIt(e){if(e===At.SCALAR)return".r";if(e===At.VEC2)return".ra";if(e===At.VEC3)return".rgb";if(e===At.VEC4)return""}function Ebe(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function $It(e,t){return e===At.SCALAR?"":`[${t}]`}var wk=JIt;function ext(e,t){let n=new Sk(e);wk(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r}=n;if(r>0){let C="getClippingPlane",E=jg(o,t),I=0,b=E.indexOf(")")+1,S=E.indexOf("{",b)+1,B=E.indexOf("}",S),v=E.slice(I,b),P=E.slice(S,B);i.addFunction(C,v,Ae.FRAGMENT),i.addFunctionLines(C,[P])}let s=i.clone();s.addDefine("PICKING",void 0,Ae.FRAGMENT);let a=i.clone();a.addDefine("PICKING_VOXEL",void 0,Ae.FRAGMENT);let c=i.buildShaderProgram(t),u=s.buildShaderProgram(t),f=a.buildShaderProgram(t),h=Ge.fromCache({cull:{enabled:!0,face:Pi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:An.PRE_MULTIPLIED_ALPHA_BLEND}),p=t.getViewportQuadVertexArray(),g=e._depthTest,m=new nt({vertexArray:p,primitiveType:Ne.TRIANGLES,renderState:h,shaderProgram:c,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Be.VOXELS,executeInClosestFrustum:!0,owner:this,cull:g,occlude:g}),_=nt.shallowClone(m,new nt);_.shaderProgram=u,_.pickOnly=!0;let y=nt.shallowClone(m,new nt);if(y.shaderProgram=f,y.pickOnly=!0,l(e._drawCommand)){let C=e._drawCommand;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPick)){let C=e._drawCommandPick;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let C=e._drawCommandPickVoxel;C.shaderProgram=C.shaderProgram&&C.shaderProgram.destroy()}e._drawCommand=m,e._drawCommandPick=_,e._drawCommandPickVoxel=y}var Bk=ext;var txt={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"},Ew=Object.freeze(txt);function nxt(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var Dk=nxt;function Iw(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}Iw.prototype.getTexture=function(e){return this._textures[e]};function ixt(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})}Iw.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):ixt(this,e,t)};function oxt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?LH(o,r,n):rxt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function LH(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?xbe(e,n):new Nt({context:n,source:t,sampler:o});return Ibe(o)&&r.generateMipmap(),r}function rxt(e,t,n){let{typedArray:i,sampler:o}=e,r=Ibe(o),s=o.wrapS===Pn.REPEAT||o.wrapS===Pn.MIRRORED_REPEAT||o.wrapT===Pn.REPEAT||o.wrapT===Pn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,u=[a,c].every(D.isPowerOfTwo);if((r||s)&&!u)if(l(i)){if(e.pixelDatatype===Ve.UNSIGNED_BYTE){let h=Dk(i,a,c),p=Y_(h);return LH({sampler:o},p,n)}}else{let h=Y_(t);return LH(e,h,n)}else return LH(e,t,n);return r?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."),xbe(e,n)}function Ibe(e){return[$t.NEAREST_MIPMAP_NEAREST,$t.NEAREST_MIPMAP_LINEAR,$t.LINEAR_MIPMAP_NEAREST,$t.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function xbe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Nt({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}Iw.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 o=n[i];oxt(this,o,t)}n.length=0};Iw.prototype.isDestroyed=function(){return!1};Iw.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 ue(this)};var vk=Iw;function Pk(e){e=e??V.EMPTY_OBJECT,this.mode=e.mode??KA.MODIFY_MATERIAL,this.lightingModel=e.lightingModel,this.uniforms=e.uniforms??V.EMPTY_OBJECT,this.varyings=e.varyings??V.EMPTY_OBJECT,this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.translucencyMode=e.translucencyMode??fy.INHERIT,this._textureManager=new vk,this._defaultTexture=void 0,this.uniformMap=sxt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},lxt(this),uxt(this)}function sxt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===Ew.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=axt(e,i)):n[i]=cxt(e,i)}return n}function axt(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function cxt(e,t){return function(){return e.uniforms[t].value}}function JI(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function lxt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,JI(r,t,o),o=e.usedVariablesVertex.featureIdSet,JI(r,n,o),o=e.usedVariablesVertex.metadataSet,JI(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,JI(s,t,o),o=e.usedVariablesFragment.featureIdSet,JI(s,n,o),o=e.usedVariablesFragment.metadataSet,JI(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;JI(s,a,c)}}function bbe(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 tl(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${bbe(t)} is not available in the ${i} shader. Did you mean ${bbe(n)} instead?`;throw new he(o)}}function uxt(e){let t=e.usedVariablesVertex.attributeSet;tl(t,"position","positionMC","vertex"),tl(t,"normal","normalMC","vertex"),tl(t,"tangent","tangentMC","vertex"),tl(t,"bitangent","bitangentMC","vertex"),tl(t,"positionWC","positionMC","vertex"),tl(t,"positionEC","positionMC","vertex"),tl(t,"normalEC","normalMC","vertex"),tl(t,"tangentEC","tangentMC","vertex"),tl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;tl(n,"position","positionEC","fragment"),tl(n,"normal","normalEC","fragment"),tl(n,"tangent","tangentEC","fragment"),tl(n,"bitangent","bitangentEC","fragment"),tl(n,"normalMC","normalEC","fragment"),tl(n,"tangentMC","tangentEC","fragment"),tl(n,"bitangentMC","bitangentEC","fragment")}Pk.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===Ew.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};Pk.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};Pk.prototype.isDestroyed=function(){return!1};Pk.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),ue(this)};var ZI=Pk;function n_(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(n_.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});n_.fromMetadataArray=function(e){return new n_({metadata:e})};n_.fromGltf=async function(e){let t=new Zu({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new n_({loader:t})};n_.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:o}=n.components,{attributes:r}=o.nodes[0].primitives[0];this._metadata=fxt(r,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function fxt(e,t,n){let{className:i,names:o,types:r,componentTypes:s}=n.provider,a=t.propertyAttributes.find(f=>f.class.id===i),{properties:c}=a,u=new Array(o.length);for(let f=0;f<e.length;f++){let h=c[o[f]].attribute,p=e.find(y=>y.name===h);if(!l(p))continue;let g=zt.toComponentDatatype(s[f]),m=At.getComponentCount(r[f]),_=p.count*m;u[f]=q.createArrayBufferView(g,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,_)}return u}n_.prototype.isDestroyed=function(){return!1};n_.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),ue(this)};var $I=n_;function zp(){this.orientedBoundingBox=new Qn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._minBounds=zp.DefaultMinBounds.clone(),this._maxBounds=zp.DefaultMaxBounds.clone(),this.shaderUniforms={renderMinBounds:new d,renderMaxBounds:new d,boxUvToShapeUvScale:new d,boxUvToShapeUvTranslate:new d},this.shaderDefines={BOX_INTERSECTION_INDEX:void 0,BOX_HAS_SHAPE_BOUNDS:void 0},this.shaderMaximumIntersectionsLength=0}var dxt=new d,tZ=new d,hxt=new X,mxt=new d,pxt=new d,Axt=new d,gxt=new d,Tbe=M.fromRotationTranslation(X.fromUniformScale(.5,new X),new d(.5,.5,.5),new M);zp.prototype.update=function(e,t,n,i,o){i=i??t.clone(mxt),o=o??n.clone(pxt),t=d.clone(t,this._minBounds),n=d.clone(n,this._maxBounds);let r=d.clamp(t,i,o,Axt),s=d.clamp(n,i,o,gxt),a=M.getScale(e,tZ);if(r.x>s.x||r.y>s.y||r.z>s.z||(r.x===s.x)+(r.y===s.y)+(r.z===s.z)>=2||a.x===0||a.y===0||a.z===0)return!1;this.shapeTransform=M.clone(e,this.shapeTransform),this.orientedBoundingBox=iZ(r,s,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let{shaderUniforms:c,shaderDefines:u}=this;for(let g in u)u.hasOwnProperty(g)&&(u[g]=void 0);let f=0;u.BOX_INTERSECTION_INDEX=f,f+=1,c.renderMinBounds=M.multiplyByPoint(Tbe,r,c.renderMinBounds),c.renderMaxBounds=M.multiplyByPoint(Tbe,s,c.renderMaxBounds),u.BOX_HAS_SHAPE_BOUNDS=!0;let h=t,p=n;return c.boxUvToShapeUvScale=d.fromElements(2/(h.x===p.x?1:p.x-h.x),2/(h.y===p.y?1:p.y-h.y),2/(h.z===p.z?1:p.z-h.z),c.boxUvToShapeUvScale),c.boxUvToShapeUvTranslate=d.fromElements(-c.boxUvToShapeUvScale.x*(h.x*.5+.5),-c.boxUvToShapeUvScale.y*(h.y*.5+.5),-c.boxUvToShapeUvScale.z*(h.z*.5+.5),c.boxUvToShapeUvTranslate),this.shaderMaximumIntersectionsLength=f,!0};var OH=new d,nZ=new d;zp.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=d.fromElements(D.lerp(r.x,s.x,a*t),D.lerp(r.y,s.y,a*n),D.lerp(r.z,s.z,a*i),OH),u=d.fromElements(D.lerp(r.x,s.x,a*(t+1)),D.lerp(r.y,s.y,a*(n+1)),D.lerp(r.z,s.z,a*(i+1)),nZ);return iZ(c,u,this.shapeTransform,o)};var Sbe=new d;zp.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,Sbe),s=d.multiplyByScalar(r,o,Sbe),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,OH),o,OH),c=d.add(a,s,nZ),u=this._minBounds,f=this._maxBounds,h=d.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),OH),p=d.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),nZ);return iZ(h,p,this.shapeTransform,i)};zp.DefaultMinBounds=Object.freeze(new d(-1,-1,-1));zp.DefaultMaxBounds=Object.freeze(new d(1,1,1));function iZ(e,t,n,i){let o=zp.DefaultMinBounds,r=zp.DefaultMaxBounds;if(d.equals(e,o)&&d.equals(t,r))i.center=M.getTranslation(n,i.center),i.halfAxes=M.getMatrix3(n,i.halfAxes);else{let a=M.getScale(n,tZ),c=d.midpoint(e,t,dxt);i.center=M.multiplyByPoint(n,c,i.center),a=d.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),tZ);let u=M.getRotation(n,hxt);i.halfAxes=X.setScale(u,a,i.halfAxes)}return i}var ex=zp;function i_(){this.orientedBoundingBox=new Qn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._minBounds=i_.DefaultMinBounds.clone(),this._maxBounds=i_.DefaultMaxBounds.clone(),this.shaderUniforms={cylinderRenderRadiusMinMax:new U,cylinderRenderAngleMinMax:new U,cylinderRenderHeightMinMax:new U,cylinderUvToShapeUvRadius:new U,cylinderUvToShapeUvAngle:new U,cylinderUvToShapeUvHeight:new U,cylinderShapeUvAngleMinMax:new U,cylinderShapeUvAngleRangeZeroMid:0},this.shaderDefines={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_HAS_SHAPE_BOUNDS_RADIUS:void 0,CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY:void 0,CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED: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}var Dbe=new d,_xt=new d,yxt=new d,Cxt=new d,Ext=new d;i_.prototype.update=function(e,t,n,i,o){i=i??t.clone(_xt),o=o??n.clone(yxt),t=d.clone(t,this._minBounds),n=d.clone(n,this._maxBounds);let{DefaultMinBounds:r,DefaultMaxBounds:s}=i_,a=s.y-r.y,c=.5*a,u=D.EPSILON10,f=D.EPSILON3,h=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),o.y=D.negativePiToPi(o.y);let p=d.maximumByComponent(t,i,Cxt),g=d.minimumByComponent(n,o,Ext),m=M.getScale(e,Dbe);if(g.x===0||p.x>g.x||p.z>g.z||D.equalsEpsilon(m.x,0,void 0,u)||D.equalsEpsilon(m.y,0,void 0,u)||D.equalsEpsilon(m.z,0,void 0,u))return!1;this.shapeTransform=M.clone(e,this.shapeTransform),this.orientedBoundingBox=sZ(p,g,this.shapeTransform,this.orientedBoundingBox),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let _=t.x===r.x&&n.x===s.x,y=n.y<t.y,C=n.y-t.y+y*a,E=C>c+h&&C<a-h,I=C<c-h,b=C>=c-h&&C<=c+h,S=E||I||b,B=D.equalsEpsilon(t.y,r.y,void 0,f),v=D.equalsEpsilon(n.y,s.y,void 0,f),P=t.z===r.z&&n.z===s.z,N=p.x===r.x,L=g.y<p.y,A=g.y-p.y+L*a,x=A>=c-h&&A<a-h,T=A>h&&A<c-h,w=A<=h,R=x||T||w,{shaderUniforms:O,shaderDefines:k}=this;for(let z in k)k.hasOwnProperty(z)&&(k[z]=void 0);let F=0;if(k.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=F,F+=1,N||(k.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,k.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=F,F+=1),O.cylinderRenderRadiusMinMax=U.fromElements(p.x,g.x,O.cylinderRenderRadiusMinMax),p.x===g.x&&(k.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0),!_){k.CYLINDER_HAS_SHAPE_BOUNDS_RADIUS=!0;let z=n.x-t.x,Q=0,H=1;z!==0&&(Q=1/z,H=-t.x/z),O.cylinderUvToShapeUvRadius=U.fromElements(Q,H,O.cylinderUvToShapeUvRadius)}if(!P){k.CYLINDER_HAS_SHAPE_BOUNDS_HEIGHT=!0;let z=n.z-t.z,Q=0,H=1;z!==0&&(Q=2/z,H=-(t.z+1)/z),O.cylinderUvToShapeUvHeight=U.fromElements(Q,H,O.cylinderUvToShapeUvHeight)}if(O.cylinderRenderHeightMinMax=U.fromElements(p.z,g.z,O.cylinderRenderHeightMinMax),y&&(k.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_MAX_REVERSED=!0),R&&(k.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,k.CYLINDER_INTERSECTION_INDEX_ANGLE=F,x?(k.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,F+=1):T?(k.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,F+=2):w&&(k.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,F+=2),O.cylinderRenderAngleMinMax=U.fromElements(p.y,g.y,O.cylinderRenderAngleMinMax)),S){k.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0,B&&(k.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MIN_DISCONTINUITY=!0),v&&(k.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE_MAX_DISCONTINUITY=!0);let z=(t.y-r.y)/a,Q=(n.y-r.y)/a,H=1-C/a;if(O.cylinderShapeUvAngleMinMax=U.fromElements(z,Q,O.cylinderShapeUvAngleMinMax),O.cylinderShapeUvAngleRangeZeroMid=(Q+.5*H)%1,C<=h)O.cylinderUvToShapeUvAngle=U.fromElements(0,1,O.cylinderUvToShapeUvAngle);else{let j=a/C,Z=-(t.y-r.y)/C;O.cylinderUvToShapeUvAngle=U.fromElements(j,Z,O.cylinderUvToShapeUvAngle)}}return this.shaderMaximumIntersectionsLength=F,!0};var FH=new d,rZ=new d;i_.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=d.fromElements(D.lerp(r.x,s.x,t*a),D.lerp(r.y,s.y,n*a),D.lerp(r.z,s.z,i*a),FH),u=d.fromElements(D.lerp(r.x,s.x,(t+1)*a),D.lerp(r.y,s.y,(n+1)*a),D.lerp(r.z,s.z,(i+1)*a),rZ);return sZ(c,u,this.shapeTransform,o)};var wbe=new d;i_.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,wbe),s=d.multiplyByScalar(r,o,wbe),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,FH),o,FH),c=d.add(a,s,rZ),u=this._minBounds,f=this._maxBounds,h=d.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),FH),p=d.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),rZ);return sZ(h,p,this.shapeTransform,i)};i_.DefaultMinBounds=Object.freeze(new d(0,-D.PI,-1));i_.DefaultMaxBounds=Object.freeze(new d(1,+D.PI,1));var Ixt=5,xxt=new Array(Ixt),bxt=new d,Txt=new X,Sxt=new M,wxt=new M,Bxt=new M,oZ=new M,Dxt=new d,vxt=new d,Pxt=new d,vbe=new Array(8);for(let e=0;e<8;e++)vbe[e]=new d;function Bbe(e,t,n){return Math.abs(se.dot(e,t))<n}function Rxt(e){let t=M.getColumn(e,0,Dxt),n=M.getColumn(e,1,vxt),i=M.getColumn(e,2,Pxt),o=D.EPSILON4;return Bbe(t,n,o)&&Bbe(n,i,o)}function Mxt(e,t){let n=vbe;d.fromElements(-.5,-.5,-.5,n[0]),d.fromElements(-.5,-.5,.5,n[1]),d.fromElements(-.5,.5,-.5,n[2]),d.fromElements(-.5,.5,.5,n[3]),d.fromElements(.5,-.5,-.5,n[4]),d.fromElements(.5,-.5,.5,n[5]),d.fromElements(.5,.5,-.5,n[6]),d.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)M.multiplyByPoint(e,n[i],n[i]);return Qn.fromPoints(n,t)}function sZ(e,t,n,i){let o=e.x,r=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,h=s+f*.5,p=xxt,g=0;p[g++]=s,p[g++]=a,p[g++]=h,f>D.PI&&(p[g++]=h-D.PI_OVER_TWO,p[g++]=h+D.PI_OVER_TWO);let m=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,C=Number.NEGATIVE_INFINITY;for(let O=0;O<g;++O){let k=p[O]-h,F=Math.cos(k),z=Math.sin(k),Q=F*o,H=z*o,j=F*r,Z=z*r;m=Math.min(m,Q,j),_=Math.min(_,H,Z),y=Math.max(y,Q,j),C=Math.max(C,H,Z)}let E=y-m,I=C-_,b=u-c,S=(m+y)*.5,B=(_+C)*.5,v=(c+u)*.5,P=d.fromElements(S,B,v,bxt),N=X.fromRotationZ(h,Txt),L=d.fromElements(E,I,b,Dbe),A=M.fromScale(L,Bxt),x=M.fromRotation(N,wxt),T=M.fromTranslation(P,Sxt),w=M.multiplyTransformation(x,M.multiplyTransformation(T,A,oZ),oZ),R=M.multiplyTransformation(n,w,oZ);return Rxt(R)?Qn.fromTransformation(R,i):Mxt(R,i)}var tx=i_;function o_(){this.orientedBoundingBox=new Qn,this.boundingSphere=new le,this.boundTransform=new M,this.shapeTransform=new M,this._rectangle=new ae,this._minimumHeight=o_.DefaultMinBounds.z,this._maximumHeight=o_.DefaultMaxBounds.z,this._ellipsoid=new ne,this._translation=new d,this._rotation=new X,this.shaderUniforms={ellipsoidRadiiUv:new d,eccentricitySquared:0,evoluteScale:new U,ellipsoidInverseRadiiSquaredUv:new d,ellipsoidRenderLongitudeMinMax:new U,ellipsoidShapeUvLongitudeMinMaxMid:new d,ellipsoidUvToShapeUvLongitude:new U,ellipsoidUvToShapeUvLatitude:new U,ellipsoidRenderLatitudeSinMinMax:new U,ellipsoidInverseHeightDifferenceUv:0,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_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED: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}var Nxt=new d,Lxt=new d,Oxt=new d,Fxt=new d,Qxt=new d,kxt=new d,Uxt=new d,Gxt=new d,zxt=new X,Pbe=new d,Rbe=new d,Vxt=new ae;o_.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=o_;i=i??r,o=o??s;let a=D.EPSILON10,c=D.EPSILON3,u=D.EPSILON10,f=D.EPSILON10,h=D.EPSILON3,p=M.getScale(e,Gxt),g=d.clone(r,Nxt);g.z=-d.minimumComponent(p);let m=d.clamp(t,g,s,Lxt),_=d.clamp(n,g,s,Oxt),y=d.clamp(i,g,s,Fxt),C=d.clamp(o,g,s,Qxt),E=d.maximumByComponent(m,y,kxt),I=d.minimumByComponent(_,C,Uxt),b=d.add(p,d.fromElements(_.z,_.z,_.z,Pbe),Pbe),S=d.maximumComponent(b),B=d.add(p,d.fromElements(I.z,I.z,I.z,Rbe),Rbe);if(E.y>I.y||E.y===s.y||I.y===r.y||E.z>I.z||D.equalsEpsilon(B,d.ZERO,void 0,a))return!1;this._rectangle=ae.fromRadians(m.x,m.y,_.x,_.y),this._translation=M.getTranslation(e,this._translation),this._rotation=M.getRotation(e,this._rotation),this._ellipsoid=ne.fromCartesian3(p,this._ellipsoid),this._minimumHeight=m.z,this._maximumHeight=_.z;let v=ae.fromRadians(E.x,E.y,I.x,I.y,Vxt);this.orientedBoundingBox=aZ(v,E.z,I.z,this._ellipsoid,this._translation,this._rotation,this.orientedBoundingBox),this.shapeTransform=M.fromRotationTranslation(X.setScale(this._rotation,b,zxt),this._translation,this.shapeTransform),this.boundTransform=M.fromRotationTranslation(this.orientedBoundingBox.halfAxes,this.orientedBoundingBox.center,this.boundTransform),this.boundingSphere=le.fromOrientedBoundingBox(this.orientedBoundingBox,this.boundingSphere);let P=s.x-r.x,N=.5*P,L=I.x<E.x,A=I.x-E.x+L*P,x=A<=u,T=A>=N-u&&A<P-u,w=A>u&&A<N-u,R=x||T||w,O=_.x<m.x,k=_.x-m.x+O*P,F=k>N+u&&k<P-u,z=k>=N-u&&k<=N+u,Q=k<N-u,H=F||z||Q,j=I.y<-h,Z=I.y>=-h&&I.y<=+h,Y=I.y>+h&&I.y<s.y-f,$=j||Z||Y,J=E.y>r.y+f&&E.y<-h,pe=E.y>=-h&&E.y<=+h,Ce=E.y>+h,fe=J||pe||Ce,ye=$||fe,Ie=_.y-m.y,ve=_.y<-h,be=_.y>=-h&&_.y<=+h,ze=_.y>+h&&_.y<s.y-f,We=ve||be||ze,tt=m.y>r.y+f&&m.y<-h,Mt=m.y>=-h&&m.y<=+h,kt=m.y>+h,_n=We||(tt||Mt||kt),{shaderUniforms:Ut,shaderDefines:gt}=this;for(let Et in gt)gt.hasOwnProperty(Et)&&(gt[Et]=void 0);Ut.ellipsoidRadiiUv=d.divideByScalar(b,S,Ut.ellipsoidRadiiUv);let{x:ti,z:ai}=Ut.ellipsoidRadiiUv,Vt=ai/ti;Ut.eccentricitySquared=1-Vt*Vt,Ut.evoluteScale=U.fromElements((ti*ti-ai*ai)/ti,(ai*ai-ti*ti)/ai,Ut.evoluteScale),Ut.ellipsoidInverseRadiiSquaredUv=d.divideComponents(d.ONE,d.multiplyComponents(Ut.ellipsoidRadiiUv,Ut.ellipsoidRadiiUv,Ut.ellipsoidInverseRadiiSquaredUv),Ut.ellipsoidInverseRadiiSquaredUv);let wt=0;gt.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=wt,wt+=1,gt.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=wt,wt+=1,Ut.clipMinMaxHeight=U.fromElements((E.z-_.z)/S,(I.z-_.z)/S,Ut.clipMinMaxHeight);let qi=(_.z-m.z)/S;if(Ut.ellipsoidInverseHeightDifferenceUv=1/qi,m.z===_.z&&(Ut.ellipsoidInverseHeightDifferenceUv=0),R&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,gt.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=wt,T?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,wt+=1):w?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,wt+=2):x&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,wt+=2),Ut.ellipsoidRenderLongitudeMinMax=U.fromElements(E.x,I.x,Ut.ellipsoidRenderLongitudeMinMax)),H)if(gt.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0,_.x<m.x&&(gt.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE_MIN_MAX_REVERSED=!0),k<=u)Ut.ellipsoidUvToShapeUvLongitude=U.fromElements(0,1,Ut.ellipsoidUvToShapeUvLongitude);else{let Ho=P/k,No=-(m.x-r.x)/k;Ut.ellipsoidUvToShapeUvLongitude=U.fromElements(Ho,No,Ut.ellipsoidUvToShapeUvLongitude)}if(R){let Et=D.equalsEpsilon(E.x,r.x,void 0,c),Ho=D.equalsEpsilon(I.x,s.x,void 0,c);Et&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MIN_DISCONTINUITY=!0),Ho&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_MAX_DISCONTINUITY=!0);let No=(m.x-r.x)/P,ds=(_.x-r.x)/P,Wo=(I.x-r.x)/P,Ir=1-A/P,ke=(Wo+.5*Ir)%1;Ut.ellipsoidShapeUvLongitudeMinMaxMid=d.fromElements(No,ds,ke,Ut.ellipsoidShapeUvLongitudeMinMaxMid)}if(ye&&(fe&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,gt.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=wt,J?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,wt+=1):pe?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,wt+=1):Ce&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,wt+=2)),$&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,gt.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=wt,j?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,wt+=2):Z?(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,wt+=1):Y&&(gt.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,wt+=1)),Ut.ellipsoidRenderLatitudeSinMinMax=U.fromElements(Math.sin(E.y),Math.sin(I.y),Ut.ellipsoidRenderLatitudeSinMinMax)),_n)if(gt.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,Ie<f)Ut.ellipsoidUvToShapeUvLatitude=U.fromElements(0,1,Ut.ellipsoidUvToShapeUvLatitude);else{let Ho=(s.y-r.y)/Ie,No=(r.y-m.y)/Ie;Ut.ellipsoidUvToShapeUvLatitude=U.fromElements(Ho,No,Ut.ellipsoidUvToShapeUvLatitude)}return this.shaderMaximumIntersectionsLength=wt,!0};var Lbe=new ae;o_.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,c=n*r,u=(n+1)*r,f=i*r,h=(i+1)*r,p=ae.subsection(this._rectangle,s,c,a,u,Lbe),g=D.lerp(this._minimumHeight,this._maximumHeight,f),m=D.lerp(this._minimumHeight,this._maximumHeight,h);return aZ(p,g,m,this._ellipsoid,this._translation,this._rotation,o)};var Mbe=new d,Nbe=new d,Hxt=new d;o_.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=d.divideComponents(d.ONE,t,Mbe),s=d.multiplyByScalar(r,o,Mbe),a=d.multiplyByScalar(d.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,Nbe),o,Nbe),c=d.add(a,s,Hxt),u=ae.subsection(this._rectangle,a.x,a.y,c.x,c.y,Lbe),f=D.lerp(this._minimumHeight,this._maximumHeight,a.z),h=D.lerp(this._minimumHeight,this._maximumHeight,c.z);return aZ(u,f,h,this._ellipsoid,this._translation,this._rotation,i)};function aZ(e,t,n,i,o,r,s){return s=Qn.fromRectangle(e,t,n,i,s),s.center=d.add(s.center,o,s.center),s.halfAxes=X.multiply(s.halfAxes,r,s.halfAxes),s}o_.DefaultMinBounds=Object.freeze(new d(-D.PI,-D.PI_OVER_TWO,-ne.WGS84.minimumRadius));o_.DefaultMaxBounds=Object.freeze(new d(D.PI,D.PI_OVER_TWO,10*ne.WGS84.maximumRadius));var nx=o_;var Mf={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};Mf.getMinBounds=function(e){switch(e){case Mf.BOX:return ex.DefaultMinBounds;case Mf.ELLIPSOID:return nx.DefaultMinBounds;case Mf.CYLINDER:return tx.DefaultMinBounds}};Mf.getMaxBounds=function(e){switch(e){case Mf.BOX:return ex.DefaultMaxBounds;case Mf.ELLIPSOID:return nx.DefaultMaxBounds;case Mf.CYLINDER:return tx.DefaultMaxBounds}};Mf.getShapeConstructor=function(e){switch(e){case Mf.BOX:return ex;case Mf.ELLIPSOID:return nx;case Mf.CYLINDER:return tx}};var Xa=Object.freeze(Mf);function Im(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(Im.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}}});Im.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new Im({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};Im.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};Im.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)Obe(this,t)};Im.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,Obe(this,i),t};Im.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],Fbe(this,0)),this._array[e-1]=void 0,t};Im.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=cZ(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&Fbe(this,n)}return this._array[e-1]=void 0,t};Im.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};Im.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[cZ(this,1,2)?1:2]};function QH(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function Rk(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function cZ(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function Obe(e,t){if(t===0)return;let n=Math.floor(D.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=Rk(e,t,i);for(o!==n&&(QH(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(Rk(e,t,r)!==o)break;QH(e,t,r),t=r}}function Fbe(e,t){let n=e._length,i=Math.floor(D.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){Rk(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;Rk(e,f,r)===i&&(r=f)}}if(Rk(e,r,t)===i&&(QH(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);cZ(e,r,a)===i&&QH(e,r,a)}t=r}}var ix=Im;var lZ=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function Mk(e,t){this.spatialNode=e,this.keyframe=t,this.state=lZ.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}Mk.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=lZ.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};Mk.priorityComparator=function(e,t){return e.priority-t.priority};Mk.searchComparator=function(e,t){return e.keyframe-t.keyframe};Mk.LoadState=lZ;var wo=Mk;function AC(e,t,n,i,o){if(o=Math.min(o??128*1024*1024,536870912),i===zt.UNSIGNED_SHORT&&(i=zt.FLOAT32),i===zt.FLOAT32&&!e.floatingPointTexture)throw new ce("Floating point texture not supported");let s=Wxt(i),a=jxt(n,e.webgl2),c=zt.getSizeInBytes(i),u=Yxt(o,n,c),f=Math.ceil(Math.sqrt(t.x)),h=Math.ceil(t.z/f),p=f*t.x,g=h*t.y,m=Math.floor(u/p),_=Math.floor(u/g);if(m===0||_===0)throw new ce("Tileset is too large to fit into megatexture");this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*n*u**2,this.voxelCountPerTile=d.clone(t,new d),this.maximumTileCount=m*_,this.regionCountPerMegatexture=new U(m,_),this.voxelCountPerRegion=new U(p,g),this.sliceCountPerRegion=new U(f,h),this.voxelSizeUv=new U(1/u,1/u),this.sliceSizeUv=new U(t.x/u,t.y/u),this.regionSizeUv=new U(p/u,g/u),this.texture=new Nt({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:u,height:u,sampler:new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.LINEAR,magnificationFilter:di.LINEAR})});let y=zt.toComponentDatatype(i);this.tileVoxelDataTemp=q.createTypedArray(y,p*g*n),this.nodes=new Array(this.maximumTileCount);for(let C=0;C<this.maximumTileCount;C++)this.nodes[C]=new qxt(C);for(let C=0;C<this.maximumTileCount;C++){let E=this.nodes[C];E.previousNode=C>0?this.nodes[C-1]:void 0,E.nextNode=C<this.maximumTileCount-1?this.nodes[C+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0}function Wxt(e){if(e===zt.FLOAT32||e===zt.FLOAT64)return Ve.FLOAT;if(e===zt.UINT8)return Ve.UNSIGNED_BYTE}function jxt(e,t){if(e===1)return t?$e.RED:$e.LUMINANCE;if(e===2)return t?$e.RG:$e.LUMINANCE_ALPHA;if(e===3)return $e.RGB;if(e===4)return $e.RGBA}function Yxt(e,t,n){let i=Math.floor(e/(t*n));return Math.min(qt.maximumTextureSize,D.previousPowerOfTwo(Math.floor(Math.sqrt(i))))}function qxt(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}AC.prototype.add=function(e){if(this.isFull())throw new he("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};AC.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new he("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--};AC.prototype.isFull=function(){return this.emptyList===void 0};AC.getApproximateTextureMemoryByteLength=function(e,t,n,i){i===zt.UNSIGNED_SHORT&&(i=zt.FLOAT32);let o=zt.getSizeInBytes(i),r=e*t.x*t.y*t.z,s=Math.ceil(Math.sqrt(t.x)),a=Math.ceil(t.z/s),c=s*t.x,u=a*t.y,f=D.previousPowerOfTwo(Math.floor(Math.sqrt(r)));for(;;){let p=Math.floor(f/c),g=Math.floor(f/u);if(p*g>=e)break;f*=2}return f*f*n*o};AC.prototype.writeDataToTexture=function(e,t){let n=t.constructor===Uint16Array?new Float32Array(t):t,{tileVoxelDataTemp:i,voxelCountPerTile:o,sliceCountPerRegion:r,voxelCountPerRegion:s,channelCount:a,regionCountPerMegatexture:c}=this;for(let g=0;g<o.z;g++){let m=g%r.x*o.x,_=Math.floor(g/r.x)*o.y;for(let y=0;y<o.y;y++){let C=Kxt(o,y,g),E=(_+y)*s.x+m;for(let I=0;I<o.x;I++){let b=C+I,S=E+I;for(let B=0;B<a;B++)i[S*a+B]=n[b*a+B]}}}let u=e%c.x*s.x,f=Math.floor(e/c.x)*s.y,p={source:{arrayBufferView:i,width:s.x,height:s.y},xOffset:u,yOffset:f};this.texture.copyFrom(p)};function Kxt(e,t,n){let i=e.y*e.x,o=n,r=t;return o*i+r*e.x}AC.prototype.isDestroyed=function(){return!1};AC.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),ue(this)};var xw=AC;function Kd(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=d.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new Qn,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var Xxt=new d;Kd.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=X.getScale(this.orientedBoundingBox.halfAxes,Xxt),n=2*d.maximumComponent(t);this.approximateVoxelSize=n/d.minimumComponent(this.dimensions)};Kd.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,c=s+1,u=r+1,f=a+1,h=t+1,p=[[h,r,s,a],[h,u,s,a],[h,r,c,a],[h,u,c,a],[h,r,s,f],[h,u,s,f],[h,r,c,f],[h,u,c,f]];this.children=p.map(([g,m,_,y])=>new Kd(g,m,_,y,this,e,this.dimensions))};Kd.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};Kd.prototype.computeScreenSpaceError=function(e,t){let n=this.orientedBoundingBox,i=Math.sqrt(n.distanceSquaredTo(e));i=Math.max(i,D.EPSILON7);let o=this.approximateVoxelSize,r=t*(o/i);this.screenSpaceError=r};var Qbe={keyframe:0};function Nk(e,t){return Qbe.keyframe=e,jo(t,Qbe,wo.searchComparator)}Kd.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:h}=t;if(h.length>=1){let p=Jxt(i,h),g=h[p],m=o===i||i<g.keyframe?p:Math.min(p+1,h.length-1),_=h[m],y=i-g.keyframe,C=kbe(n-t.level,y);C<a&&(a=C,r=g);let E=_.keyframe-o,I=kbe(n-t.level,E);if(I<c&&(c=I,s=_),y===0&&E===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!l(r)||!l(s))return;let u=r.keyframe,f=s.keyframe;this.renderableKeyframeNodeLerp=u===f?0:D.clamp((e-u)/(f-u),0,1)};function Jxt(e,t){let n=Nk(e,t);return n<0?D.clamp(~n-1,0,t.length-1):n}function kbe(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}Kd.prototype.isVisited=function(e){return this.visitedFrameNumber===e};Kd.prototype.createKeyframeNode=function(e){let t=Nk(e,this.keyframeNodes);if(t<0){t=~t;let n=new wo(this,e);this.keyframeNodes.splice(t,0,n)}};Kd.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=Nk(n,this.keyframeNodes);if(i<0)throw new he("Keyframe node does not exist.");if(this.keyframeNodes.splice(i,1),e.megatextureIndex!==-1){for(let r=0;r<t.length;r++)t[r].remove(e.megatextureIndex);let o=Nk(n,this.renderableKeyframeNodes);if(o<0)throw new he("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.unload()};Kd.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new he("Keyframe node cannot be added to megatexture");let{metadata:n}=e.content;for(let r=0;r<t.length;r++){let s=t[r];e.megatextureIndex=s.add(n[r])}let i=this.renderableKeyframeNodes,o=Nk(e.keyframe,i);if(o>=0)throw new he("Keyframe already renderable");o=~o,i.splice(o,0,e)};Kd.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 Lk=Kd;function gC(e,t,n,i){let{provider:o,dimensions:r,paddingBefore:s,paddingAfter:a}=e,{types:c,componentTypes:u,metadataOrder:f}=o,h=d.add(r,s,new d);if(d.add(h,a,h),f===qd.Y_UP){let I=h.y;h.y=h.z,h.z=I}!l(i)&&l(o.maximumTileCount)&&(i=ubt(o.maximumTileCount,h,c,u)),this._primitive=e,this.textureMemoryByteLength=0,this.megatextures=new Array(c.length);for(let I=0;I<c.length;I++){let b=c[I],S=At.getComponentCount(b),B=u[I];this.megatextures[I]=new xw(t,h,S,B,i),this.textureMemoryByteLength+=this.megatextures[I].textureMemoryByteLength}let p=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._calculateStatistics=this._primitive._calculateStatistics??!1,this._frameNumber=0;let g=e._shape;this.rootNode=new Lk(0,0,0,0,void 0,g,r),this._priorityQueue=new ix({maximumLength:p,comparator:wo.priorityComparator}),this._highPriorityKeyframeNodes=new Array(p),this._highPriorityKeyframeNodeCount=0,this._keyframeNodesInMegatexture=new Array(p),this._keyframeCount=n,this._sampleCount=void 0,this._keyframeLocation=0,this._binaryTreeKeyframeWeighting=new Array(n),this._initialTilesLoaded=!1;let m=this._binaryTreeKeyframeWeighting;m[0]=0,m[n-1]=0,uZ(m,1,n-2,0);let _=9,y=2048,C=Math.floor(y/_),E=Math.ceil(p/C);this.internalNodeTexture=new Nt({context:t,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,flipY:!1,width:y,height:E,sampler:new nn({minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST})}),this.internalNodeTilesPerRow=C,this.internalNodeTexelSizeUv=new U(1/y,1/E),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new U}gC.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function uZ(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,uZ(e,t,o-1,i+1),uZ(e,o+1,n,i+1)}gC.simultaneousRequestCountMaximum=50;gC.prototype.update=function(e,t,n,i){let o=this._primitive,r=e.context,s=this.megatextures[0].maximumTileCount,a=this._keyframeCount,c=o._levelBlendFactor,u=c>0,f=a>1,h=(u?2:1)*(f?2:1);this._sampleCount=h;let p=h>=2;if(p&&!l(this.leafNodeTexture)){let I=Math.floor(512),b=Math.ceil(s/I);this.leafNodeTexture=new Nt({context:r,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,flipY:!1,width:1024,height:b,sampler:new nn({minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST})}),this.leafNodeTexelSizeUv=U.fromElements(1/1024,1/b,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=I}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=D.clamp(t,0,a-1),n&&Ube(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let g=Mi();ebt(this,e),tbt(this,e);let m=Mi();sbt(this,h,c);let _=Mi(),y=o.loadProgress.numberOfListeners>0||o.allTilesLoaded.numberOfListeners>0||o.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||y){let C=m-g,E=_-m,I=_-g;rbt(this,e,C,E,I)}};gC.prototype.isRenderable=function(e){return e.isRenderable(this._frameNumber)};gC.prototype.isDestroyed=function(){return!1};gC.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(),ue(this)};function Ube(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];Ube(e,i)}}function Zxt(e,t){if(e._simultaneousRequestCount>=gC.simultaneousRequestCountMaximum)return;let i=e._primitive.provider,{keyframe:o,spatialNode:r}=t;if(l(i.availableLevels)&&r.level>=i.availableLevels)return;function s(f){e._simultaneousRequestCount--,t.content=f,t.state=l(f)?wo.LoadState.PROCESSING:wo.LoadState.UNAVAILABLE}function a(f){e._simultaneousRequestCount--,t.state=wo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent()}let c={tileLevel:r.level,tileX:r.x,tileY:r.y,tileZ:r.z,keyframe:o},u=i.requestData(c);l(u)&&(e._simultaneousRequestCount++,t.state=wo.LoadState.RECEIVING,u.then(s).catch(a))}function $xt(e){return e/(1+e)}function ebt(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),Gbe(e.rootNode,vs.MASK_INDETERMINATE,e,t);let o=e._highPriorityKeyframeNodes,r=0,s;for(;i.length>0;)s=i.removeMaximum(),s.highPriorityFrameNumber=n,o[r]=s,r++;e._highPriorityKeyframeNodeCount=r}function tbt(e,t){let n=e.megatextures[0],i=n.occupiedCount,o=e._keyframeNodesInMegatexture;o.length=i,o.sort(nbt);let r=e._highPriorityKeyframeNodes,s=e._highPriorityKeyframeNodeCount,a=0,c=0;for(let u=0;u<s;u++){let f=r[u];if(!(f.state===wo.LoadState.LOADED||f.spatialNode===void 0)&&(f.state===wo.LoadState.UNLOADED&&Zxt(e,f),f.state===wo.LoadState.PROCESSING)){let{content:h}=f;if(h.update(e._primitive,t),!h.ready)continue;if(!ibt(h.metadata,e)){f.content=void 0,f.state=wo.LoadState.FAILED,e._primitive.tileFailed.raiseEvent();continue}let p=0;if(n.isFull()){p=i-1-a,a++;let g=o[p];e._primitive.tileUnload.raiseEvent(),g.spatialNode.destroyKeyframeNode(g,e.megatextures)}else p=i+c,c++;f.spatialNode.addKeyframeNodeToMegatextures(f,e.megatextures),f.state=wo.LoadState.LOADED,o[p]=f,e._primitive.tileLoad.raiseEvent()}}}function nbt(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function ibt(e,t){let n=t._primitive.provider.types.length;if(!Array.isArray(e)||e.length!==n)return!1;let{megatextures:i}=t;for(let o=0;o<n;o++){let{voxelCountPerTile:r,channelCount:s}=i[o],{x:a,y:c,z:u}=r,f=a*c*u,h=e[o],p=f*s;if(h.length!==p)return!1}return!0}function Gbe(e,t,n,i){let{camera:o,context:r,pixelRatio:s,frameNumber:a}=i,{positionWC:c,frustum:u}=o,h=r.drawingBufferHeight/s/u.sseDenominator;if(e.computeScreenSpaceError(c,h),t=e.visibility(i,t),t===vs.MASK_OUTSIDE)return;e.visitedFrameNumber=a;let p=n._primitive,g=p._shape,m=p.screenSpaceError,_=n._priorityQueue,y=n._keyframeCount,C=D.clamp(Math.floor(n._keyframeLocation),0,y-2),E=C+1;if(y===1)e.createKeyframeNode(0);else if(e.keyframeNodes.length!==y)for(let v=0;v<y;v++)e.createKeyframeNode(v);let{screenSpaceError:I,keyframeNodes:b}=e,S=$xt(I),B=!1;for(let v=0;v<b.length;v++){let P=b[v];P.priority=10*S+obt(C,P.keyframe,E,n),P.state!==wo.LoadState.UNAVAILABLE&&P.state!==wo.LoadState.FAILED&&P.priority!==-Number.MAX_VALUE&&_.insert(P),P.state===wo.LoadState.LOADED&&(B=!0)}if(I<m||!B){e.children=void 0;return}l(e.children)||e.constructChildNodes(g);for(let v=0;v<8;v++){let P=e.children[v];Gbe(P,t,n,i)}}function obt(e,t,n,i){let o=Math.min(Math.abs(t-e),Math.abs(t-n)),r=Math.max(e,i._keyframeCount-n-1,1),s=Math.pow(1-o/r,4),a=Math.exp(-i._binaryTreeKeyframeWeighting[t]);return D.lerp(a,s,.15+.85*s)}function rbt(e,t,n,i,o){let r=e._keyframeCount,s=e.rootNode,a=Object.keys(wo.LoadState).length,c=new Array(a),u=new Array(a),f=0;for(let B=0;B<a;B++){let v=new Array(r).fill(0);c[B]=v,u[B]=0}function h(B){let v=B.keyframeNodes;for(let P=0;P<v.length;P++){let N=v[P],L=N.keyframe,A=N.state;c[A][L]+=1,u[A]+=1,f++}if(l(B.children))for(let P=0;P<8;P++){let N=B.children[P];h(N)}}h(s),e._primitive.statistics.numberOfTilesWithContentReady=u[wo.LoadState.LOADED],e._primitive.statistics.visited=f;let p=u[wo.LoadState.RECEIVING],g=u[wo.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 y=`KEYFRAMES: ${c[wo.LoadState.LOADED]}`,C=`UNLOADED: ${u[wo.LoadState.UNLOADED]} | RECEIVING: ${u[wo.LoadState.RECEIVING]} | PROCESSING: ${u[wo.LoadState.PROCESSING]} | LOADED: ${u[wo.LoadState.LOADED]} | FAILED: ${u[wo.LoadState.FAILED]} | UNAVAILABLE: ${u[wo.LoadState.UNAVAILABLE]} | TOTAL: ${f}`,E=Math.round(n*100)/100,I=Math.round(i*100)/100,b=Math.round(o*100)/100,S=`LOAD: ${E} | OCT: ${I} | ALL: ${b}`;console.log(`${y} || ${C} || ${S}`)}var kH={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function sbt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,u=[],f=[];function h(g,m,_,y,C){let E=!1;if(l(g.children))for(let I=0;I<8;I++){let b=g.children[I];b.computeSurroundingRenderableKeyframeNodes(o),b.isRenderable(r)&&(E=!0)}if(E){u[C]=kH.INTERNAL<<16|m,u[_]=y,a++,y=m,C=y*9+1;for(let I=0;I<8;I++){let b=g.children[I];m=a,_=m*9+0,h(b,m,_,y,C+I)}}else{if(e._primitive.tileVisible.raiseEvent(),s){let I=c*5,b=g.renderableKeyframeNodePrevious,S=g.level-b.spatialNode.level,B=b.spatialNode.parent,v=l(B)?B.renderableKeyframeNodePrevious:b,P=abt(g,i,n),N=S,L=1,A=b.megatextureIndex,x=v.megatextureIndex;f[I+0]=P,f[I+1]=N,f[I+2]=L,f[I+3]=A,f[I+4]=x,u[C]=kH.LEAF<<16|c}else{let I=g.renderableKeyframeNodePrevious,S=g.level-I.spatialNode.level===0?kH.LEAF:kH.PACKED_LEAF_FROM_PARENT;u[C]=S<<16|I.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&h(p,0,0,0,0),cbt(u,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&lbt(f,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function abt(e,t,n){if(e.parent===void 0)return 0;let i=e.screenSpaceError,o=e.parent.screenSpaceError,s=((t-i)/(o-i)+n-1)/n;return D.clamp(s,0,1)}function cbt(e,t,n,i){let o=$e.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){let p=e[h],g=h*o;for(let m=0;m<o;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 lbt(e,t,n,i){let o=$e.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),u=new Uint8Array(a*c*o);for(let p=0;p<s;p++){let g=e[p*r+0],m=e[p*r+1],_=e[p*r+2],y=e[p*r+3],C=e[p*r+4],E=D.clamp(Math.floor(65536*g),0,65535);u[p*8+0]=E>>>0&255,u[p*8+1]=E>>>8&255,u[p*8+2]=m&255,u[p*8+3]=_&255,u[p*8+4]=y>>>0&255,u[p*8+5]=y>>>8&255,u[p*8+6]=C>>>0&255,u[p*8+7]=C>>>8&255}let h={source:{arrayBufferView:u,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(h)}function ubt(e,t,n,i){let o=0,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=i[s],u=At.getComponentCount(a);o+=xw.getApproximateTextureMemoryByteLength(e,t,u,c)}return o}var Ok=gC;function Vp(e){e=e??V.EMPTY_OBJECT,this._ready=!1,this._provider=e.provider??Vp.DefaultProvider,this._traversal=void 0,this._statistics=new Yh,this._calculateStatistics=e.calculateStatistics??!1,this._shape=void 0,this._shapeVisible=!1,this._dimensions=new d,this._inputDimensions=new d,this._paddingBefore=new d,this._paddingAfter=new d,this._minBounds=new d,this._minBoundsOld=new d,this._maxBounds=new d,this._maxBoundsOld=new d,this._exaggeratedMinBounds=new d,this._exaggeratedMinBoundsOld=new d,this._exaggeratedMaxBounds=new d,this._exaggeratedMaxBoundsOld=new d,this._minClippingBounds=new d,this._minClippingBoundsOld=new d,this._maxClippingBounds=new d,this._maxClippingBoundsOld=new d,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._exaggeratedModelMatrix=M.clone(this._modelMatrix),this._compoundModelMatrix=new M,this._compoundModelMatrixOld=new M,this._customShader=e.customShader??Vp.DefaultCustomShader,this._customShaderCompilationEvent=new ge,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionWorldToUv=new M,this._transformDirectionWorldToUv=new X,this._transformPositionUvToWorld=new M,this._transformDirectionWorldToLocal=new X,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new zh,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new U,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new U,megatextureTextures:[],megatextureSliceDimensions:new U,megatextureTileDimensions:new U,megatextureVoxelSizeUv:new U,megatextureSliceSizeUv:new U,megatextureTileSizeUv:new U,dimensions:new d,inputDimensions:new d,paddingBefore:new d,paddingAfter:new d,transformPositionViewToUv:new M,transformPositionUvToView:new M,transformDirectionViewToLocal:new X,cameraPositionUv:new d,cameraDirectionUv:new d,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new M,stepSize:0,pickColor:new G},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}this.tileLoad=new ge,this.tileVisible=new ge,this.tileFailed=new ge,this.tileUnload=new ge,this.loadProgress=new ge,this.allTilesLoaded=new ge,this.initialTilesLoaded=new ge;let i=this._provider;fbt(this,i)}function fbt(e,t){let{shape:n,minBounds:i=Xa.getMinBounds(n),maxBounds:o=Xa.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=i.clone(),e.maxClippingBounds=o.clone(),e._exaggeratedMinBounds=d.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=d.clone(e._maxBounds,e._exaggeratedMaxBounds),e._exaggeratedModelMatrix=M.clone(e._modelMatrix,e._exaggeratedModelMatrix),Vbe(e,t);let r=Xa.getShapeConstructor(n);e._shape=new r,e._shapeVisible=Hbe(e,e._shape,t)}Object.defineProperties(Vp.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=M.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&&(this._nearestSampling=e,this._shaderDirty=!0)}},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=d.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=d.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=d.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=d.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Ps.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];l(e)?this._customShader=e:this._customShader=Vp.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var dbt=new se,hbt=new se,mbt=new M,pbt=new M,Abt=new M,gbt=M.fromRotationTranslation(X.fromUniformScale(.5,new X),new d(.5,.5,.5),new M),_bt=M.fromRotationTranslation(X.fromUniformScale(2,new X),new d(-1,-1,-1),new M);Vp.prototype.update=function(e){let t=this._provider;this._customShader.update(e);let n=e.context;if(!this._ready){bbt(this,t,n),e.afterRender.push(()=>(this._ready=!0,!0));return}Ibt(this,e);let i=Vbe(this,t),o=this._shape;if(i&&(this._shapeVisible=Hbe(this,o,t),Sbt(this,o)&&(this._shaderDirty=!0)),!this._shapeVisible)return;let r=wbt(t.timeIntervalCollection,this._clock),s=this._traversal,a=s._sampleCount;if(s.update(e,r,i,this._disableUpdate),a!==s._sampleCount&&(this._shaderDirty=!0),!s.isRenderable(s.rootNode)||(this._debugDraw&&Lbt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),Bbt(this,e)&&(this._shaderDirty=!0);let u=s.leafNodeTexture,f=this._uniforms;l(u)&&(f.octreeLeafNodeTexture=s.leafNodeTexture,f.octreeLeafNodeTexelSizeUv=U.clone(s.leafNodeTexelSizeUv,f.octreeLeafNodeTexelSizeUv),f.octreeLeafNodeTilesPerRow=s.leafNodeTilesPerRow),this._shaderDirty&&(Bk(this,n),this._shaderDirty=!1);let h=n.uniformState.viewProjection,p=o.orientedBoundingBox,g=Pbt(p,h,hbt);if(g.x===1||g.y===1||g.z===-1||g.w===-1)return;f.ndcSpaceAxisAlignedBoundingBox=se.clone(g,f.ndcSpaceAxisAlignedBoundingBox);let _=n.uniformState.inverseView;f.transformPositionViewToUv=M.multiplyTransformation(this._transformPositionWorldToUv,_,f.transformPositionViewToUv);let y=n.uniformState.view;f.transformPositionUvToView=M.multiplyTransformation(y,this._transformPositionUvToWorld,f.transformPositionUvToView);let C=n.uniformState.inverseViewRotation;f.transformDirectionViewToLocal=X.multiply(this._transformDirectionWorldToLocal,C,f.transformDirectionViewToLocal),f.cameraPositionUv=M.multiplyByPoint(this._transformPositionWorldToUv,e.camera.positionWC,f.cameraPositionUv),f.cameraDirectionUv=X.multiplyByVector(this._transformDirectionWorldToUv,e.camera.directionWC,f.cameraDirectionUv),f.cameraDirectionUv=d.normalize(f.cameraDirectionUv,f.cameraDirectionUv),f.stepSize=this._stepSizeMultiplier;let E=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;E.boundingVolume=o.boundingSphere,e.commandList.push(E)};var ybt=new d,fZ=new d,Cbt=new me,Ebt=new d;function Ibt(e,t){if(e._exaggeratedMinBounds=d.clone(e._minBounds,e._exaggeratedMinBounds),e._exaggeratedMaxBounds=d.clone(e._maxBounds,e._exaggeratedMaxBounds),e.shape===Xa.ELLIPSOID){let n=t.verticalExaggerationRelativeHeight,i=t.verticalExaggeration;e._exaggeratedMinBounds.z=(e._minBounds.z-n)*i+n,e._exaggeratedMaxBounds.z=(e._maxBounds.z-n)*i+n}else{let n=d.fromElements(1,1,t.verticalExaggeration,ybt);e._exaggeratedModelMatrix=M.multiplyByScale(e._modelMatrix,n,e._exaggeratedModelMatrix),e._exaggeratedModelMatrix=M.multiplyByTranslation(e._exaggeratedModelMatrix,xbt(e,t),e._exaggeratedModelMatrix)}}function xbt(e,t){let{shapeTransform:n=M.IDENTITY,globalTransform:i=M.IDENTITY}=e._provider,o=M.getTranslation(n,fZ),r=M.multiplyByPoint(e._modelMatrix,o,fZ),s=M.multiplyByPoint(i,r,fZ),c=ne.WGS84.cartesianToCartographic(s,Cbt),u=0;l(c)&&(u=c.height);let f=Gr.getHeight(u,t.verticalExaggeration,t.verticalExaggerationRelativeHeight);return d.fromElements(0,0,(f-u)/t.verticalExaggeration,Ebt)}function bbt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=G.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=je(o,!0);let s=e._uniformMap;for(let c in r)if(r.hasOwnProperty(c)){let u=`u_${c}`;s[u]=function(){return r[c]}}if(e._dimensions=d.clone(t.dimensions,e._dimensions),i.dimensions=d.clone(e._dimensions,i.dimensions),e._paddingBefore=d.clone(t.paddingBefore??d.ZERO,e._paddingBefore),i.paddingBefore=d.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=d.clone(t.paddingAfter??d.ZERO,e._paddingAfter),i.paddingAfter=d.clone(e._paddingAfter,i.paddingAfter),e._inputDimensions=d.add(e._dimensions,e._paddingBefore,e._inputDimensions),e._inputDimensions=d.add(e._inputDimensions,e._paddingAfter,e._inputDimensions),t.metadataOrder===qd.Y_UP){let c=e._inputDimensions.y;e._inputDimensions.y=e._inputDimensions.z,e._inputDimensions.z=c}i.inputDimensions=d.clone(e._inputDimensions,i.inputDimensions);let a=t.keyframeCount??1;e._traversal=new Ok(e,n,a),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,Tbt(e._traversal,i)}function Vbe(e,t){let n=t.shapeTransform??M.IDENTITY,i=t.globalTransform??M.IDENTITY;return M.multiplyTransformation(i,e._exaggeratedModelMatrix,e._compoundModelMatrix),M.multiplyTransformation(e._compoundModelMatrix,n,e._compoundModelMatrix),ox(e,"_compoundModelMatrix","_compoundModelMatrixOld")+ox(e,"_minBounds","_minBoundsOld")+ox(e,"_maxBounds","_maxBoundsOld")+ox(e,"_exaggeratedMinBounds","_exaggeratedMinBoundsOld")+ox(e,"_exaggeratedMaxBounds","_exaggeratedMaxBoundsOld")+ox(e,"_minClippingBounds","_minClippingBoundsOld")+ox(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function ox(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}function Hbe(e,t,n){if(!t.update(e._compoundModelMatrix,e._exaggeratedMinBounds,e._exaggeratedMaxBounds,e.minClippingBounds,e.maxClippingBounds))return!1;let o=t.shapeTransform,r=M.inverse(o,mbt);return e._transformPositionWorldToUv=M.multiplyTransformation(gbt,r,e._transformPositionWorldToUv),e._transformDirectionWorldToUv=M.getMatrix3(e._transformPositionWorldToUv,e._transformDirectionWorldToUv),e._transformPositionUvToWorld=M.multiplyTransformation(o,_bt,e._transformPositionUvToWorld),e._transformDirectionWorldToLocal=M.getMatrix3(r,e._transformDirectionWorldToLocal),!0}function Tbt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=U.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let n=e.megatextures,i=n[0],o=n.length;t.megatextureTextures=new Array(o);for(let r=0;r<o;r++)t.megatextureTextures[r]=n[r].texture;t.megatextureSliceDimensions=U.clone(i.sliceCountPerRegion,t.megatextureSliceDimensions),t.megatextureTileDimensions=U.clone(i.regionCountPerMegatexture,t.megatextureTileDimensions),t.megatextureVoxelSizeUv=U.clone(i.voxelSizeUv,t.megatextureVoxelSizeUv),t.megatextureSliceSizeUv=U.clone(i.sliceSizeUv,t.megatextureSliceSizeUv),t.megatextureTileSizeUv=U.clone(i.regionSizeUv,t.megatextureTileSizeUv)}function Sbt(e,t){let n=t.shaderDefines,i=Object.keys(n).some(o=>n[o]!==e._shapeDefinesOld[o]);return i&&(e._shapeDefinesOld=je(n,!0)),i}function wbt(e,t){if(!l(e)||!l(t))return 0;let n=t.currentTime,i,o=e.indexOf(n);o>=0?i=e.get(o):(o=~o,o===e.length?(o=e.length-1,i=e.get(o),n=i.stop):(i=e.get(o),n=i.start));let r=K.secondsDifference(i.stop,i.start),a=K.secondsDifference(n,i.start)/r;return o+a}function Bbt(e,t){let n=e.clippingPlanes;if(!l(n))return!1;n.update(t);let{clippingPlanesState:i,enabled:o}=n;if(o){let r=e._uniforms;r.clippingPlanesTexture=n.texture,r.clippingPlanesMatrix=M.transpose(M.multiplyTransformation(M.inverse(n.modelMatrix,r.clippingPlanesMatrix),e._transformPositionUvToWorld,r.clippingPlanesMatrix),r.clippingPlanesMatrix)}return e._clippingPlanesState===i&&e._clippingPlanesEnabled===o?!1:(e._clippingPlanesState=i,e._clippingPlanesEnabled=o,!0)}Vp.prototype.isDestroyed=function(){return!1};Vp.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(),ue(this)};var zbe=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)),Dbt=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),vbt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function Pbt(e,t,n){let i=M.fromRotationTranslation(e.halfAxes,e.center,pbt),o=M.multiply(t,i,Abt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,u,f=vbt,h=zbe.length;for(u=0;u<h;u++)M.multiplyByVector(o,zbe[u],f[u]);for(u=0;u<h;u++){let p=f[u];if(p.z>=-p.w){let g=p.x/p.w,m=p.y/p.w;r=Math.min(r,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=Dbt[u*3+g],_=f[m];if(_.z>=-_.w){let y=p.z+p.w,C=_.z+_.w,E=y/(y-C),I=se.lerp(p,_,E,dbt),b=I.x/I.w,S=I.y/I.w;r=Math.min(r,b),s=Math.max(s,b),a=Math.min(a,S),c=Math.max(c,S)}}}return r=D.clamp(r,-1,1),a=D.clamp(a,-1,1),s=D.clamp(s,-1,1),c=D.clamp(c,-1,1),n=se.fromElements(r,a,s,c,n),n}var dZ=3e7,Rbt=new d(dZ,0,0),Mbt=new d(0,dZ,0),Nbt=new d(0,0,dZ);function Lbt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,u,f,h){i.add({positions:[c,u],width:h,material:io.fromType("Color",{color:f})})}function r(c,u,f){let h=c.computeCorners();o(h[0],h[1],u,f),o(h[2],h[3],u,f),o(h[4],h[5],u,f),o(h[6],h[7],u,f),o(h[0],h[2],u,f),o(h[4],h[6],u,f),o(h[1],h[3],u,f),o(h[5],h[7],u,f),o(h[0],h[4],u,f),o(h[2],h[6],u,f),o(h[1],h[5],u,f),o(h[3],h[7],u,f)}function s(c){if(!n.isRenderable(c))return;let u=c.level,h=Math.max(1,5/Math.pow(2,u)),g=[G.RED,G.LIME,G.BLUE][u%3];if(r(c.orientedBoundingBox,g,h),l(c.children))for(let m=0;m<8;m++)s(c.children[m])}r(e._shape.orientedBoundingBox,G.WHITE,5),s(n.rootNode);let a=10;o(d.ZERO,Rbt,G.RED,a),o(d.ZERO,Mbt,G.LIME,a),o(d.ZERO,Nbt,G.BLUE,a),i.update(t)}Vp.DefaultCustomShader=new ZI({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) { material.diffuse = vec3(1.0); material.alpha = 1.0; }`});function Wbe(){this.ready=!0,this.shape=Xa.BOX,this.dimensions=new d(1,1,1),this.names=["data"],this.types=[At.SCALAR],this.componentTypes=[zt.FLOAT32],this.maximumTileCount=1}Wbe.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new $I({metadata:[new Float32Array(1)]});return Promise.resolve(n)};Vp.DefaultProvider=new Wbe;var _C=Vp;function Obt(e,t,n,i){if(!l(e)||l(t)&&e.id!==t)return;let r=(e.classes||{})[n];if(!l(r))return;let a=(r.properties||{})[i];if(l(a))return a}var Fk=Obt;function Fbt(e,t,n,i,o){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=o}var Qk=Fbt;function Qbt(e,t,n){if(!l(e))return;let i=e.propertyTextures;for(let o of i)if(o.class.id===t){let a=o.properties[n];if(l(a))return a}}var kk=Qbt;var GH=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function Ci(e){e=e??V.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=je(e.contextOptions),r=l(n),s=new hP(t,o);r||(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=qn(),this._jobScheduler=new AQ,this._frameState=new mQ(s,new rQ(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!r,this._creditContainer=n,this._canvas=t,this._context=s,this._computeEngine=new yB(s),this._ellipsoid=e.ellipsoid??ne.default,this._globe=void 0,this._globeTranslucencyState=new pQ,this._primitives=new Ol,this._groundPrimitives=new Ol,this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=Ci.defaultLogDepthBuffer&&s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new YI,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new fQ(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new pi({color:new G,stencil:0,owner:this}),this._depthClearCommand=new pi({depth:1,owner:this}),this._stencilClearCommand=new pi({stencil:0}),this._classificationStencilClearCommand=new pi({stencil:0,renderState:Ge.fromCache({stencilMask:Xt.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new tk(this),this._preUpdate=new ge,this._postUpdate=new ge,this._renderError=new ge,this._preRender=new ge,this._postRender=new ge,this._minimumDisableDepthTestDistance=0,this._debugInspector=new uk,this._msaaSamples=e.msaaSamples??4,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new ge,this.morphComplete=new ge,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=G.clone(G.BLACK),this._mode=oe.SCENE3D,this._mapProjection=l(e.mapProjection)?e.mapProjection:new Qi(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 i0,this.fog=new hQ,this.fog.enabled=ne.WGS84.equals(this._ellipsoid),ne.WGS84.equals(this._ellipsoid)||(_o.DEFAULT_VIEW_RECTANGLE=ae.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new _o(this),this.shadowMap=new Jg({context:s,lightCamera:this._shadowMapCamera,enabled:e.shadows??!1}),this.invertClassification=!1,this.invertClassificationColor=G.clone(G.WHITE),this._actualInvertClassificationColor=G.clone(this._invertClassificationColor),this._invertClassification=new pw,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new ZQ,this._brdfLutGenerator=new $2,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new rk(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??wu.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=wc.requestCompletedEvent.addEventListener(GH(this)),this._removeTaskProcessorListenerCallback=ui.taskCompletedEvent.addEventListener(GH(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new qe(0,0,s.drawingBufferWidth,s.drawingBufferHeight),c=new _o(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new _o(this),this.preloadFlightCullingVolume=void 0,this._picking=new vQ(this),this._defaultView=new kI(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 aA,Jbe(this,0,K.now()),this.updateFrameState(),this.initializeFrame()}Ci.defaultLogDepthBuffer=!0;function kbt(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(GH(e))),n.push(t.terrainProviderChanged.addEventListener(GH(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(Ci.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 qt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return qt.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 Ih.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,kbt(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}},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}},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===oe.SCENE2D?this.morphTo2D(0):e===oe.SCENE3D?this.morphTo3D(0):e===oe.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 _o(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new dQ(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,qt.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}}});Ci.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 Ubt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function jbe(e,t,n){let i=e._frameState,o=e._context,r=e._view.oit,{lightShadowMaps:s,lightShadowsEnabled:a}=i.shadowState,c=t.derivedCommands;l(t.pickId)&&(c.picking=Lp.createPickDerivedCommand(e,t,o,c.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=Lp.createPickMetadataDerivedCommand(e,t,o,c.pickingMetadata))),t.pickOnly||(c.depth=Lp.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=Lp.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=Jg.createReceiveDerivedCommand(s,t,n,o,c.shadows)),t.pass===Be.TRANSLUCENT&&l(r)&&r.isSupported()&&(a&&t.receiveShadows?(c.oit=l(c.oit)?c.oit:{},c.oit.shadows=r.createDerivedCommands(c.shadows.receiveCommand,o,c.oit.shadows)):c.oit=r.createDerivedCommands(t,o,c.oit))}Ci.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!l(t))return;let n=this._frameState,{shadowState:i,useLogDepth:o}=this._frameState,r=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),h=l(t.originalCommand),p=o&&!u,g=c&&!f,m=(!o||!c)&&!h,_=n.pickingMetadata&&Ubt(e,n);if(e.dirty=e.dirty||p||g||m||_,!e.dirty)return;e.dirty=!1;let{shadowsEnabled:y,shadowMaps:C}=i;y&&e.castShadows&&(t.shadows=Jg.createCastDerivedCommand(C,e,s,r,t.shadows)),(u||p)&&(t.logDepth=Lp.createLogDepthCommand(e,r,t.logDepth),jbe(this,t.logDepth.command,s)),(h||m)&&jbe(this,e,s)};var Gbt=new Hd({pass:Ko.RENDER}),hZ=new Hd({pass:Ko.PRELOAD}),mZ=new Hd({pass:Ko.PRELOAD_FLIGHT}),zbt=new Hd({pass:Ko.REQUEST_RENDER_MODE_DEFER_CHECK}),Ybe=new le,pZ;function Vbt(e){if(!(e._mode!==oe.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return Ybe.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,pZ=J2.fromBoundingSphere(Ybe,e.camera.positionWC,pZ),pZ}Ci.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function Jbe(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=K.clone(n,i.time)}Ci.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=Vbt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof mn||this.camera.frustum instanceof Jr),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=G.clone(this.invertClassificationColor,this._actualInvertClassificationColor),pw.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};Ci.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===tn.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var UH=new M(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);UH=M.inverseTransformation(UH,UH);function Hbt(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a=d.clone(s.center);if(o.mode!==oe.SCENE3D){a=M.multiplyByPoint(UH,a,a);let m=o.mapProjection,_=m.unproject(a);a=m.ellipsoid.cartographicToCartesian(_)}let c,u,{radius:f}=s;l(f)?(c=Ca.createGeometry(new Ca({radii:new d(f,f,f),vertexFormat:gn.FLAT_VERTEX_FORMAT})),u=M.fromTranslation(a)):(c=sc.createGeometry(sc.fromDimensions({dimensions:new d(2,2,2),vertexFormat:gn.FLAT_VERTEX_FORMAT})),u=M.fromRotationTranslation(s.halfAxes,a,new M)),t._debugVolume=new kn({geometryInstances:new Rt({geometry:Vn.toWireframe(c),modelMatrix:u,attributes:{color:new en(1,0,0,1)}}),appearance:new gn({flat:!0,translucent:!1}),asynchronous:!1});let h=o.commandList,p=o.commandList=[];t._debugVolume.update(o),e=p[0],o.useLogDepth&&(e=Lp.createLogDepthCommand(e,r).command);let g;l(i)&&(g=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(g)&&(n.framebuffer=g),o.commandList=h}function xm(e,t,n,i){let o=t._frameState,r=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof pi){e.execute(r,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&Hbt(e,t,n,i),o.useLogDepth&&l(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);let s=o.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(o.pickingMetadata&&l(e.derivedCommands.pickingMetadata)){e=e.derivedCommands.pickingMetadata.pickMetadataCommand,e.execute(r,n);return}if(!o.pickingMetadata&&l(e.derivedCommands.picking)){e=e.derivedCommands.picking.pickCommand,e.execute(r,n);return}}else if(l(e.derivedCommands.depth)){e=e.derivedCommands.depth.depthOnlyCommand,e.execute(r,n);return}}if(t.debugShowCommands||t.debugShowFrustums){t._debugInspector.executeDebugShowFrustumsCommand(t,e,n);return}o.shadowState.lightShadowsEnabled&&e.receiveShadows&&l(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(r,n):e.execute(r,n)}function qbe(e,t,n){let{derivedCommands:i}=e;if(!l(i))return;let o=t._frameState,r=t._context;o.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(r,n)),l(s)?(e=s.pickCommand,e.execute(r,n)):l(c)&&(e=c.depthOnlyCommand,e.execute(r,n))}function Zbe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var Wbt=new d;function Kbe(e,t){let n=d.subtract(e,t,Wbt),i=Math.max(0,d.magnitude(n));return i*i}function jbt(e,t,n){let i=e.boundingVolume,o=t.boundingVolume;return Kbe(o.center,n)-Kbe(i.center,n)}function Ybt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+D.EPSILON12}function qbt(e,t,n,i,o){Rp(i,Zbe,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function Kbt(e,t,n,i,o){Rp(i,Ybt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function Xbt(e,t,n){e.context.uniformState.updatePass(Be.VOXELS);let i=n.commands[Be.VOXELS];i.length=n.indices[Be.VOXELS],Rp(i,Zbe,e.camera.positionWC);for(let o=0;o<i.length;++o)xm(i[o],e,t)}function Jbt(e,t,n){e.context.uniformState.updatePass(Be.GAUSSIAN_SPLATS);let i=n.commands[Be.GAUSSIAN_SPLATS];i.length=n.indices[Be.GAUSSIAN_SPLATS],Rp(i,jbt,e.camera.positionWC);for(let o=0;o<i.length;++o)xm(i[o],e,t)}var Zbt=new Fi,$bt=new zl,eTt=new mn,tTt=new Jr;function nTt(e){let{frustum:t}=e;return l(t.fov)?t.clone(Zbt):l(t.infiniteProjectionMatrix)?t.clone($bt):l(t.width)?t.clone(eTt):t.clone(tTt)}function iTt(e){if(e._environmentState.useOIT){if(!l(e._executeOITFunction)){let{view:t,context:n}=e;e._executeOITFunction=function(i,o,r,s,a){t.globeDepth.prepareColorTextures(n),t.oit.executeCommands(i,o,r,s,a)}}return e._executeOITFunction}return e.frameState.passes.render?qbt:Kbt}function oTt(e,t,n){let{frameState:i,context:o}=e,{pick:r,pickVoxel:s}=i.passes,a=r||s,c;!a&&e._environmentState.useInvertClassification&&i.invertClassificationColor.alpha<1&&(c=e._invertClassification);let u=iTt(e);o.uniformState.updatePass(Be.TRANSLUCENT);let f=n.commands[Be.TRANSLUCENT];f.length=n.indices[Be.TRANSLUCENT],u(e,xm,t,f,c)}function rTt(e,t,n){let{translucentTileClassification:i,globeDepth:o}=e._view;if(!(n.indices[Be.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let s=n.commands[Be.TRANSLUCENT];i.executeTranslucentCommands(e,xm,t,s,o.depthStencilTexture),i.executeClassificationCommands(e,xm,t,n)}function gZ(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s=nTt(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=o.passes,c=a.pick||a.pickVoxel;c||sTt(e,t);let{clearGlobeDepth:u,renderTranslucentDepthForPick:f,useDepthPlane:h,useGlobeDepthFramebuffer:p,useInvertClassification:g,usePostProcessSelected:m}=e._environmentState,{globeDepth:_,globeTranslucencyFramebuffer:y,sceneFramebuffer:C,frustumCommandsList:E}=e._view,I=E.length,b=e._globeTranslucencyState,S=e._depthClearCommand,B=e._stencilClearCommand,v=e._classificationStencilClearCommand,P=e._depthPlane,N=n.position.z;function L(x,T){r.updatePass(T);let w=x.commands[T],R=x.indices[T];for(let O=0;O<R;++O)xm(w[O],e,t);return R}function A(x,T){r.updatePass(T);let w=x.commands[T],R=x.indices[T];for(let O=0;O<R;++O)qbe(w[O],e,t)}for(let x=0;x<I;++x){let T=I-x-1,w=E[T];e.mode===oe.SCENE2D?(n.position.z=N-w.near+1,s.far=Math.max(1,w.far-w.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=T!==0?w.near*e.opaqueFrustumNearOffset:w.near,s.far=w.far,r.updateFrustum(s)),S.execute(i,t),i.stencilBuffer&&B.execute(i,t),b.translucent?(r.updatePass(Be.GLOBE),b.executeGlobeCommands(w,xm,y,e,t)):L(w,Be.GLOBE),p&&_.executeCopyDepth(i,t),f||(b.translucent?(r.updatePass(Be.TERRAIN_CLASSIFICATION),b.executeGlobeClassificationCommands(w,xm,y,e,t)):L(w,Be.TERRAIN_CLASSIFICATION)),u&&(S.execute(i,t),h&&P.execute(i,t));let R;if(!g||c||f)R=L(w,Be.CESIUM_3D_TILE),R>0&&(p&&(_.prepareColorTextures(i,u),_.executeUpdateDepth(i,t,_.depthStencilTexture)),f||(R=L(w,Be.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let k=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,R=L(w,Be.CESIUM_3D_TILE),p&&(e._invertClassification.prepareTextures(i),_.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),R=L(w,Be.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),t.framebuffer=k,e._invertClassification.executeClassified(i,t),o.invertClassificationColor.alpha===1&&e._invertClassification.executeUnclassified(i,t),R>0&&i.stencilBuffer&&v.execute(i,t),R=L(w,Be.CESIUM_3D_TILE_CLASSIFICATION)}if(R>0&&i.stencilBuffer&&B.execute(i,t),Xbt(e,t,w),L(w,Be.OPAQUE),Jbt(e,t,w),T!==0&&e.mode!==oe.SCENE2D&&(s.near=w.near,r.updateFrustum(s)),oTt(e,t,w),rTt(e,t,w),i.depthTexture&&e.useDepthPicking&&(p||f)){let k=e._picking.getPickDepth(e,T);k.update(i,_.depthStencilTexture),k.executeCopyDepth(i,t)}if(c||!m)continue;let O=t.framebuffer;t.framebuffer=C.getIdFramebuffer(),s.near=T!==0?w.near*e.opaqueFrustumNearOffset:w.near,s.far=w.far,r.updateFrustum(s),b.translucent?(r.updatePass(Be.GLOBE),b.executeGlobeCommands(w,qbe,y,e,t)):A(w,Be.GLOBE),u&&(S.framebuffer=t.framebuffer,S.execute(i,t),S.framebuffer=void 0),u&&h&&P.execute(i,t),A(w,Be.CESIUM_3D_TILE),A(w,Be.OPAQUE),A(w,Be.TRANSLUCENT),t.framebuffer=O}}function sTt(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(Be.ENVIRONMENT),l(i.skyBoxCommand)&&xm(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&xm(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let r;i.useGlobeDepthFramebuffer?r=o.globeDepth.framebuffer:i.usePostProcess?r=o.sceneFramebuffer.framebuffer:r=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,r),t.framebuffer=r}i.isMoonVisible&&i.moonCommand.execute(n,t)}function $be(e){e.context.uniformState.updatePass(Be.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 aTt(e,t){e.context.uniformState.updatePass(Be.OVERLAY);let n=e.context,i=e._overlayCommandList;for(let o=0;o<i.length;++o)i[o].execute(n,t)}function cTt(e,t,n){let{shadowMapCullingVolume:i,isPointLight:o,passes:r}=n,s=r.length,a=[Be.GLOBE,Be.CESIUM_3D_TILE,Be.OPAQUE,Be.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(o)for(let f=0;f<s;++f)r[f].commandList.push(u);else if(s===1)r[0].commandList.push(u);else{let f=!1;for(let h=s-1;h>=0;--h){let p=r[h].cullingVolume;if(e.isVisible(p,u))r[h].commandList.push(u),f=!0;else if(f)break}}}}function eTe(e){let{shadowState:t,commandList:n}=e.frameState,{shadowsEnabled:i,shadowMaps:o}=t;if(!i)return;let{context:r}=e,{uniformState:s}=r;for(let a=0;a<o.length;++a){let c=o[a];if(c.outOfView)continue;let{passes:u}=c;for(let f=0;f<u.length;++f)u[f].commandList.length=0;cTt(e,n,c);for(let f=0;f<u.length;++f){let h=c.passes[f],{camera:p,commandList:g}=h;s.updateCamera(p),c.updatePass(r,f);for(let m=0;m<g.length;++m){let _=g[m];s.updatePass(_.pass);let y=_.derivedCommands.shadows.castCommands[a];xm(y,e,h.passState)}}}}var lTt=new d;Ci.prototype.updateAndExecuteCommands=function(e,t){ITt(this,e,t),this._environmentState.useWebVR?uTt(this,e,t):this._frameState.mode!==oe.SCENE2D||this._mapMode2D===wu.ROTATE?yC(!0,this,e):yTt(this,e)};function uTt(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;tTe(e),n.createPotentiallyVisibleSet(e),$be(e),r||eTe(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=_o.clone(i,e._cameraVR);a.frustum=i.frustum;let c=i.frustum.near,u=c*(e.focalLength??5),f=e.eyeSeparation??u/30,h=d.multiplyByScalar(a.right,f*.5,lTt);i.frustum.aspectRatio=s.width/s.height;let p=.5*f*c/u;d.add(a.position,h,i.position),i.frustum.xOffset=p,gZ(e,t),s.x=s.width,d.subtract(a.position,h,i.position),i.frustum.xOffset=-p,gZ(e,t),_o.clone(a,i)}var fTt=new me(Math.PI,D.PI_OVER_TWO),dTt=new d,hTt=new d,mTt=new M,pTt=new M,ATt=new d,gTt=new d,_Tt=new qe;function yTt(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,s=qe.clone(r,_Tt);t.viewport=s;let a=fTt,c=dTt;e.mapProjection.project(a,c);let f=d.clone(i.position,hTt),h=M.clone(i.transform,pTt),p=i.frustum.clone();i._setTransform(M.IDENTITY);let g=M.computeViewportTransformation(s,0,1,mTt),m=i.frustum.projectionMatrix,_=i.positionWC.y,y=d.fromElements(D.sign(_)*c.x-_,0,-i.positionWC.x,ATt),C=Qt.pointToGLWindowCoordinates(m,g,y,gTt);C.x=Math.floor(C.x);let E=s.x,I=s.width;if(_===0||C.x<=E||C.x>=E+I)yC(!0,e,t);else if(Math.abs(E+I*.5-C.x)<1)s.width=C.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),o.update(n),yC(!0,e,t),s.x=C.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),o.update(n),yC(!1,e,t);else if(C.x>E+I*.5){s.width=C.x-E;let b=i.frustum.right;i.frustum.right=c.x-_,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),yC(!0,e,t),s.x=C.x,s.width=E+I-C.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=b-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),yC(!1,e,t)}else{s.x=C.x,s.width=E+I-C.x;let b=i.frustum.left;i.frustum.left=-c.x-_,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),yC(!0,e,t),s.x=E,s.width=C.x-E,i.position.x=-i.position.x,i.frustum.right=-i.frustum.left,i.frustum.left=b-i.frustum.left*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),yC(!1,e,t)}i._setTransform(h),d.clone(f,i.position),i.frustum=p.clone(),t.viewport=r}function yC(e,t,n){let i=t._view,{renderTranslucentDepthForPick:o}=t._environmentState;e||(t.frameState.commandList.length=0),tTe(t),i.createPotentiallyVisibleSet(t),e&&($be(t),o||eTe(t)),gZ(t,n)}var Xbe=new vs;Ci.prototype.updateEnvironment=function(){let e=this._frameState,t=this._view,n=this._environmentState,i=e.passes.render,o=e.passes.offscreen,r=this.atmosphere,s=this.skyAtmosphere,a=this.globe,c=this._globeTranslucencyState;if(!i||this._mode!==oe.SCENE2D&&t.camera.frustum instanceof mn||!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(QA.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let C=r.dynamicLighting;s.setDynamicLighting(C),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 y=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(y)?y.drawCommand:void 0,n.sunComputeCommand=l(y)?y.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===oe.SCENE2D);(n.useDepthPlane=u&&this.mode===oe.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==oe.SCENE2D&&!o;let h=e.mode===oe.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,g=Xbe.planes;for(let y=0;y<5;++y)g[y]=p.planes[y];p=Xbe,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,h),n.isMoonVisible=this.isVisible(p,n.moonCommand,h);let m=this.specularEnvironmentMaps,_=this._specularEnvironmentCubeMap;l(m)&&_?.url!==m?(_=_&&_.destroy(),this._specularEnvironmentCubeMap=new Ih(m)):!l(m)&&l(_)&&(_.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function CTt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new Np({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 ETt(e){let t=e._frameState,{passes:n,shadowState:i,shadowMaps:o}=t,r=o.length,s=r>0&&!n.pick&&!n.pickVoxel&&e.mode===oe.SCENE3D;if(s!==i.shadowsEnabled&&(++i.lastDirtyTime,i.shadowsEnabled=s),i.lightShadowsEnabled=!1,!!s){for(let a=0;a<r;++a)if(o[a]!==i.shadowMaps[a]){++i.lastDirtyTime;break}i.shadowMaps.length=0,i.lightShadowMaps.length=0;for(let a=0;a<r;++a){let c=o[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 tTe(e){let t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),CTt(e),ETt(e),e._globe&&e._globe.render(t)}function ITt(e,t,n){let i=e._context,o=e._frameState,r=e._environmentState,s=e._view,a=o.passes,c=a.pick||a.pickVoxel;l(s.globeDepth)&&(s.globeDepth.picking=c);let u=r.useWebVR;r.originalFramebuffer=t.framebuffer,l(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!u?e._sunPostProcess=new ck: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;G.clone(n,f.color),f.execute(i,t);let h=r.useGlobeDepthFramebuffer=l(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,g=r.useOIT=!c&&l(p)&&p.isSupported();g&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let m=e.postProcessStages,_=r.usePostProcess=!c&&(e._hdr||m.length>0||m.ambientOcclusion.enabled||m.fxaa.enabled||m.bloom.enabled);if(r.usePostProcessSelected=!1,_&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),m.update(i,o.useLogDepth,e._hdr),m.clear(i),_=r.usePostProcess=m.ready,r.usePostProcessSelected=_&&m.hasSelected),r.isSunVisible&&e.sunBloom&&!u?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:_&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&f.execute(i,t),r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification){let C;if(o.invertClassificationColor.alpha===1&&h&&(C=s.globeDepth.framebuffer),l(C)||i.depthTexture){if(e._invertClassification.previousFramebuffer=C,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),o.invertClassificationColor.alpha<1&&g){let E=e._invertClassification.unclassifiedCommand,I=E.derivedCommands;I.oit=p.createDerivedCommands(E,i,I.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}Ci.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:o,translucentTileClassification:r}=i;l(o)&&o.prepareColorTextures(t);let{useOIT:s,useGlobeDepthFramebuffer:a,usePostProcess:c,originalFramebuffer:u}=n,f=a?o.colorFramebufferManager:void 0,h=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=c?h.framebuffer:u,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let g=h;a&&!s&&(g=f);let m=this.postProcessStages,_=g.getColorTexture(0),y=p.getColorTexture(0),C=(f??h).getDepthStencilTexture();m.execute(t,_,C,y),m.copy(t,u)}!s&&!c&&a&&(e.framebuffer=u,o.executeCopyColor(t,e))};function xTt(e){let t=e._frameState.afterRender;for(let n=0;n<t.length;++n)t[n]()&&e.requestRender();t.length=0}function bTt(e){if(e.mode===oe.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function nTe(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof Ol){let o=e.length;for(let r=0;r<o;++r){let s=e.get(r),a=nTe(s,t,n);l(a)&&a>i&&(i=a)}}else if(e.isCesium3DTileset&&e.show&&e.enableCollision){let o=e.getHeight(t,n);if(l(o)&&o>i)return o}return i}Ci.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===Ze.CLAMP_TO_TERRAIN||t===Ze.RELATIVE_TO_TERRAIN,i=t===Ze.CLAMP_TO_3D_TILE||t===Ze.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=nTe(this.primitives,e,this);l(s)&&s>o&&(o=s)}let r=this._globe;if(!i&&l(r)&&r.show){let s=r.getHeight(e);s>o&&(o=s)}if(o>Number.NEGATIVE_INFINITY)return o};var AZ=new me;Ci.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,o=g=>{me.clone(e,AZ);let m;l(g)&&(m=g.height),l(m)||(m=this.getHeight(e,n)),l(m)&&(AZ.height=m,t(AZ))},r=n===Ze.CLAMP_TO_TERRAIN||n===Ze.RELATIVE_TO_TERRAIN,s=n===Ze.CLAMP_TO_3D_TILE||n===Ze.RELATIVE_TO_3D_TILE,a;!s&&l(this.globe)&&(a=this.globe._surface.updateHeight(e,o));let c={},u=g=>{if(r||g.isDestroyed()||!g.isCesium3DTileset)return;let m=g.updateHeight(e,o,i);c[g.id]=m};if(!r){let g=this.primitives.length;for(let m=0;m<g;++m){let _=this.primitives.get(m);u(_)}}let f=this.primitives.primitiveAdded.addEventListener(u),h=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(),h()}};function TTt(e){let t=e.camera,n=e._mode,i=e._screenSpaceCameraController,o=t.positionCartographic;if(!l(o))return!1;if(!i.onMap()&&o.height<0)return!0;if(n===oe.SCENE2D||n===oe.MORPHING)return!1;let r=e._globeHeight;return l(r)&&o.height<r}Ci.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=bTt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=TTt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function STt(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 o=new qg({container:n});e._performanceDisplay=o,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 wTt(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 BTt(e){e.primitives.postPassesUpdate(e._frameState),wc.update()}var DTt=new G;function vTt(e){let t=e._frameState,n=e.context,{uniformState:i}=n,o=e._defaultView;e._view=o,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=Gbt;let r=e.backgroundColor??G.BLACK;e._hdr&&(r=G.clone(r,DTt),r.red=Math.pow(r.red,e.gamma),r.green=Math.pow(r.green,e.gamma),r.blue=Math.pow(r.blue,e.gamma)),t.backgroundColor=r,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 aA?d.negate(i.sunDirectionWC,e._shadowMapCamera.direction):d.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=qe.clone(a,c.viewport),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,aTt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function rx(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function PTt(e){return e._picking.updateMostDetailedRayPicks(e)}Ci.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);let t=this._frameState;t.newFrame=!1,l(e)||(e=K.now());let n=this._view.checkForCameraUpdates(this);n&&(this._globeHeightDirty=!0);let i=!this.requestRenderMode||this._renderRequested||n||this._logDepthBufferDirty||this._hdrDirty||this.mode===oe.MORPHING;if(!i&&l(this.maximumRenderTimeChange)&&l(this._lastRenderTime)){let o=Math.abs(K.secondsDifference(this._lastRenderTime,e));i=i||o>this.maximumRenderTimeChange}if(i){this._lastRenderTime=K.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1;let o=D.incrementWrap(t.frameNumber,15e6,1);Jbe(this,o,e),t.newFrame=!0}rx(this,wTt),this.primitives.show&&(rx(this,PTt),rx(this,RTt),rx(this,MTt),i||rx(this,NTt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),rx(this,vTt)),STt(this,i),rx(this,BTt),xTt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};Ci.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};Ci.prototype.requestRender=function(){this._renderRequested=!0};Ci.prototype.clampLineWidth=function(e){return Math.max(qt.minimumAliasedLineWidth,Math.min(e,qt.maximumAliasedLineWidth))};Ci.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n)};Ci.prototype.pickVoxel=function(e,t,n){let i=this.pick(e,t,n);if(!l(i))return;let o=i.primitive;if(!(o instanceof _C))return;let r=this._picking.pickVoxelCoordinate(this,e,t,n),s=255*r[0]+r[1],a=o._traversal.findKeyframeNode(s);if(!l(a))return;let c=255*r[2]+r[3];return fk.fromKeyframeNode(o,s,c,a)};Ci.prototype.pickMetadata=function(e,t,n,i){let o=this.pick(e);if(!l(o))return;let r=o.detail?.model?.structuralMetadata;if(!l(r))return;let s=r.schema,a=Fk(s,t,n,i);if(!l(a))return;let c=kk(r,n,i);if(!l(c))return;let u=new Qk(t,n,i,a,c);return this._picking.pickMetadata(this,e,u)};Ci.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};Ci.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};Ci.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};Ci.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function RTt(e){let t=e._frameState;hZ.camera=t.camera,hZ.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,hZ)}function MTt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;mZ.camera=e.preloadFlightCamera,mZ.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,mZ)}function NTt(e){e.primitives.updateForPass(e._frameState,zbt)}Ci.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};Ci.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};Ci.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};Ci.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};Ci.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};Ci.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};Ci.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};Ci.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};Ci.prototype.cartesianToCanvasCoordinates=function(e,t){return Ji.worldToWindowCoordinates(this,e,t)};Ci.prototype.completeMorph=function(){this._transitioner.completeMorph()};Ci.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};Ci.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};Ci.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function LTt(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()})}Ci.prototype.setTerrain=function(e){return LTt(this,e),e};Ci.prototype.isDestroyed=function(){return!1};Ci.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),ue(this)};var Uk=Ci;function bw(e){e=e??ne.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=d.multiplyByScalar(e.radii,t,new d);this._scaleMatrix=M.fromScale(n),this._modelMatrix=new M,this._command=new nt({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new d(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new d(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 d;let i=new d;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(bw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});bw.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var _Z=new M;bw.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==oe.SCENE3D&&n!==oe.MORPHING||!e.passes.render)return;let i=M.fromRotationTranslation(e.context.uniformState.inverseViewRotation,d.ZERO,_Z),o=M.multiplyTransformation(i,fo.Y_UP_TO_Z_UP,_Z),r=M.multiply(this._scaleMatrix,o,_Z);M.clone(r,this._modelMatrix);let s=e.context,a=OTt(this),c=e.globeTranslucencyState.translucent,u=this.perFragmentAtmosphere||c||!l(t)||!t.show,f=this._command;if(!l(f.vertexArray)){let p=Ca.createGeometry(new Ca({radii:new d(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Re.POSITION_ONLY}));f.vertexArray=ri.fromGeometry({context:s,geometry:p,attributeLocations:Vn.createAttributeLocations(p),bufferUsage:Ue.STATIC_DRAW}),f.renderState=Ge.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:An.ALPHA_BLEND,depthMask:!1})}let h=a|u<<2|c<<3;if(h!==this._flags){this._flags=h;let p=[];a&&p.push("COLOR_CORRECT"),u&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let g=new He({defines:p,sources:[vh,iw,T2]}),m=new He({defines:p,sources:[vh,iw,b2]});this._spSkyAtmosphere=cn.fromCache({context:s,vertexShaderSource:g,fragmentShaderSource:m}),f.shaderProgram=this._spSkyAtmosphere}return f};function OTt(e){return!(D.equalsEpsilon(e.hueShift,0,D.EPSILON7)&&D.equalsEpsilon(e.saturationShift,0,D.EPSILON7)&&D.equalsEpsilon(e.brightnessShift,0,D.EPSILON7))}bw.prototype.isDestroyed=function(){return!1};bw.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),ue(this)};var Gk=bw;function Sw(e){this.sources=e.sources,this._sources=void 0,this.show=e.show??!0,this._command=new nt({modelMatrix:M.clone(M.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this._hasError=!1,this._error=void 0}Sw.prototype.update=function(e,t){let n=this,{mode:i,passes:o,context:r}=e;if(!this.show||i!==oe.SCENE3D&&i!==oe.MORPHING||!o.render)return;if(this._hasError){let a=this._error;throw this._hasError=!1,this._error=void 0,a}if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;typeof a.positiveX=="string"?yP(r,this._sources).then(function(c){n._cubeMap=n._cubeMap&&n._cubeMap.destroy(),n._cubeMap=c}).catch(c=>{this._hasError=!0,this._error=c}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new kr({context:r,source:a}))}let s=this._command;if(!l(s.vertexArray)){s.uniformMap={u_cubeMap:function(){return n._cubeMap}};let a=sc.createGeometry(sc.fromDimensions({dimensions:new d(2,2,2),vertexFormat:Re.POSITION_ONLY})),c=this._attributeLocations=Vn.createAttributeLocations(a);s.vertexArray=ri.fromGeometry({context:r,geometry:a,attributeLocations:c,bufferUsage:Ue.STATIC_DRAW}),s.renderState=Ge.fromCache({blending:An.ALPHA_BLEND})}if(!l(s.shaderProgram)||this._useHdr!==t){let a=new He({defines:[t?"HDR":""],sources:[S2]});s.shaderProgram=cn.fromCache({context:r,vertexShaderSource:w2,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(l(this._cubeMap))return s};Sw.prototype.isDestroyed=function(){return!1};Sw.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(),ue(this)};function Tw(e){return fn(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}Sw.createEarthSkyBox=function(){return new Sw({sources:{positiveX:Tw("px"),negativeX:Tw("mx"),positiveY:Tw("py"),negativeY:Tw("my"),positiveZ:Tw("pz"),negativeZ:Tw("mz")}})};var zk=Sw;function Hk(){this.show=!0,this._drawCommand=new nt({primitiveType:Ne.TRIANGLES,boundingVolume:new le,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new le,this._boundingVolume2D=new le,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(Hk.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var FTt=new U,QTt=new U,kTt=new se,Vk=new se;Hk.prototype.update=function(e,t,n){if(!this.show)return;let i=e.mode;if(i===oe.SCENE2D||i===oe.MORPHING||!e.passes.render)return;let o=e.context,r=t.viewport.width,s=t.viewport.height;if(!l(this._texture)||r!==this._drawingBufferWidth||s!==this._drawingBufferHeight||this._glowFactorDirty||n!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=r,this._drawingBufferHeight=s,this._glowFactorDirty=!1,this._useHdr=n;let b=Math.max(r,s);b=Math.pow(2,Math.ceil(Math.log(b)/Math.log(2))-2),b=Math.max(1,b);let S=n?o.halfFloatingPointTexture?Ve.HALF_FLOAT:Ve.FLOAT:Ve.UNSIGNED_BYTE;this._texture=new Nt({context:o,width:b,height:b,pixelFormat:$e.RGBA,pixelDatatype:S}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let B=this,v={u_radiusTS:function(){return B._radiusTS}};this._commands.computeCommand=new sl({fragmentShaderSource:D2,outputTexture:this._texture,uniformMap:v,persists:!1,owner:this,postExecute:function(){B._commands.computeCommand=void 0}})}let a=this._drawCommand;if(!l(a.vertexArray)){let b={direction:0},S=new Uint8Array(4*2);S[0]=0,S[1]=0,S[2]=255,S[3]=0,S[4]=255,S[5]=255,S[6]=0,S[7]=255;let B=Ct.createVertexBuffer({context:o,typedArray:S,usage:Ue.STATIC_DRAW}),v=[{index:b.direction,vertexBuffer:B,componentsPerAttribute:2,normalize:!0,componentDatatype:q.UNSIGNED_BYTE}],P=Ct.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT});a.vertexArray=new ri({context:o,attributes:v,indexBuffer:P}),a.shaderProgram=cn.fromCache({context:o,vertexShaderSource:v2,fragmentShaderSource:B2,attributeLocations:b}),a.renderState=Ge.fromCache({blending:An.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,u=o.uniformState.sunPositionColumbusView,f=this._boundingVolume,h=this._boundingVolume2D;d.clone(c,f.center),h.center.x=u.z,h.center.y=u.x,h.center.z=u.y,f.radius=D.SOLAR_RADIUS+D.SOLAR_RADIUS*this._glowLengthTS,h.radius=f.radius,i===oe.SCENE3D?le.clone(f,a.boundingVolume):i===oe.COLUMBUS_VIEW&&le.clone(h,a.boundingVolume);let p=Ji.computeActualEllipsoidPosition(e,c,Vk),g=d.magnitude(d.subtract(p,e.camera.position,Vk)),m=o.uniformState.projection,_=kTt;_.x=0,_.y=0,_.z=-g,_.w=1;let y=M.multiplyByVector(m,_,Vk),C=Ji.clipToGLWindowCoordinates(t.viewport,y,FTt);_.x=D.SOLAR_RADIUS;let E=M.multiplyByVector(m,_,Vk),I=Ji.clipToGLWindowCoordinates(t.viewport,E,QTt);return this._size=U.magnitude(U.subtract(I,C,Vk)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};Hk.prototype.isDestroyed=function(){return!1};Hk.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(),ue(this)};var Wk=Hk;var rTe=br(DU(),1);function UTt(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 jk=UTt;var GTt={modifyFragmentShader:function(t){return t=He.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}}},ww=GTt;var sx={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function Yk(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=G.clone(G.DARKGRAY),this._highlightColor=G.clone(G.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=sx.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??Be.OPAQUE,this._cull=e.cull??!0,this.style=void 0,this._style=void 0,this.styleDirty=!1,this.modelMatrix=M.clone(M.IDENTITY),this._modelMatrix=M.clone(M.IDENTITY),this.time=0,this.shadows=Bn.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??Tr.NONE,this._splittingEnabled=!1,this._error=void 0,zTt(this,e)}Object.defineProperties(Yk.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},color:{get:function(){return G.clone(this._highlightColor)},set:function(e){this._highlightColor=G.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(l(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=le.clone(e,this._boundingSphere)}}});function zTt(e,t){let n=g0.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=SA.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=sx.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 o=n.normals;l(o)&&(e._isOctEncoded16P=o.octEncoded);let r=n.colors;l(r)&&(l(r.constantColor)&&(e._constantColor=G.clone(r.constantColor,e._constantColor),e._hasColors=!1),e._isRGB565=r.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 VTt=new d,HTt=new d,WTt=new d,iTe,zH;function jTt(e){if(!l(zH)){iTe=new rTe.default(0),zH=new Array(e);for(let t=0;t<e;++t)zH[t]=iTe.random()}return zH}function YTt(e){let n=e.length/3,i=Math.min(n,20),o=jTt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=d.fromElements(r,r,r,VTt),c=d.fromElements(s,s,s,HTt);for(let f=0;f<i;++f){let h=Math.floor(o[f]*n),p=d.unpack(e,h*3,WTt);d.minimumByComponent(a,p,a),d.maximumByComponent(c,p,c)}let u=le.fromCornerPoints(a,c);return u.radius+=D.EPSILON2,u}function oTe(e,t){let n=q.fromTypedArray(e);return n===q.INT||n===q.UNSIGNED_INT||n===q.DOUBLE?(yt("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 qTt=new se,KTt=new se,XTt=new G,sTe=0,VH=1,xZ=2,aTe=3,JTt=4,yZ=new M,ZTt=new M;function $Tt(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,c=i.batchIds,u=i.styleableProperties,f=l(u),h=e._isQuantized,p=e._isQuantizedDraco,g=e._isOctEncoded16P,m=e._isOctEncodedDraco,_=e._quantizedRange,y=e._octEncodedRange,C=e._isRGB565,E=e._isTranslucent,I=e._hasColors,b=e._hasNormals,S=e._hasBatchIds,B,v,P=[],N={};if(e._styleableShaderAttributes=N,f){let F=JTt;for(let z in u)if(u.hasOwnProperty(z)){let Q=u[z],H=oTe(Q.typedArray,z);B=Q.componentCount,v=q.fromTypedArray(H);let j=Ct.createVertexBuffer({context:n,typedArray:H,usage:Ue.STATIC_DRAW});e._geometryByteLength+=j.sizeInBytes;let Z={index:F,vertexBuffer:j,componentsPerAttribute:B,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};P.push(Z),N[z]={location:F,componentCount:B},++F}}let L=Ct.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Ue.STATIC_DRAW});e._geometryByteLength+=L.sizeInBytes;let A;I&&(A=Ct.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Ue.STATIC_DRAW}),e._geometryByteLength+=A.sizeInBytes);let x;b&&(x=Ct.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Ue.STATIC_DRAW}),e._geometryByteLength+=x.sizeInBytes);let T;S&&(c.typedArray=oTe(c.typedArray,"batchIds"),T=Ct.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Ue.STATIC_DRAW}),e._geometryByteLength+=T.sizeInBytes);let w=[];if(h?v=q.UNSIGNED_SHORT:p?v=_<=255?q.UNSIGNED_BYTE:q.UNSIGNED_SHORT:v=q.FLOAT,w.push({index:sTe,vertexBuffer:L,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(h||p?e._boundingSphere=le.fromCornerPoints(d.ZERO,e._quantizedVolumeScale):e._boundingSphere=YTt(r.typedArray)),I)if(C)w.push({index:VH,vertexBuffer:A,componentsPerAttribute:1,componentDatatype:q.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let F=E?4:3;w.push({index:VH,vertexBuffer:A,componentsPerAttribute:F,componentDatatype:q.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}b&&(g?(B=2,v=q.UNSIGNED_BYTE):m?(B=2,v=y<=255?q.UNSIGNED_BYTE:q.UNSIGNED_SHORT):(B=3,v=q.FLOAT),w.push({index:xZ,vertexBuffer:x,componentsPerAttribute:B,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),S&&w.push({index:aTe,vertexBuffer:T,componentsPerAttribute:1,componentDatatype:q.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),f&&(w=w.concat(P));let R=new ri({context:n,attributes:w}),O={depthTest:{enabled:!0}},k={depthTest:{enabled:!0},depthMask:!1,blending:An.ALPHA_BLEND};e._opaquePass===Be.CESIUM_3D_TILE&&(O.stencilTest=Xt.setCesium3DTileBit(),O.stencilMask=Xt.CESIUM_3D_TILE_MASK,k.stencilTest=Xt.setCesium3DTileBit(),k.stencilMask=Xt.CESIUM_3D_TILE_MASK),e._opaqueRenderState=Ge.fromCache(O),e._translucentRenderState=Ge.fromCache(k),e._drawCommand=new nt({boundingVolume:new le,cull:e._cull,modelMatrix:new M,primitiveType:Ne.POINTS,vertexArray:R,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:E?e._translucentRenderState:e._opaqueRenderState,pass:E?Be.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function eSt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=qTt;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===oe.SCENE2D||c instanceof mn?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 G.TRANSPARENT;let c=G.clone(a.edgeColor,XTt);return c.alpha=a.edgeWidth,c},u_clippingPlanesMatrix:function(){let a=e.clippingPlanes;if(!l(a))return M.IDENTITY;let c=e.clippingPlanesOriginMatrix??e._modelMatrix;M.multiply(n.uniformState.view3D,c,yZ);let u=M.multiply(yZ,a.modelMatrix,yZ);return M.inverseTranspose(u,ZTt)}};ww.addUniforms(e,s),(i||o||r)&&(s=St(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=KTt;if(l(e._quantizedVolumeScale)){let c=d.clone(e._quantizedVolumeScale,a);d.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function CZ(e,t){let n=/czm_3dtiles_property_(\d+)/g,i=n.exec(e);for(;i!==null;){let o=parseInt(i[1]);t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function EZ(e,t){e=e.slice(e.indexOf(` `));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function IZ(e,t){let n=e.numberOfAttributes;for(let i=0;i<n;++i){let o=e.getAttribute(i);if(o.index===t)return o}}var tSt={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 nSt(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,u=e._isQuantizedDraco,f=e._isOctEncoded16P,h=e._isOctEncodedDraco,p=e._isRGB565,g=e._isTranslucent,m=e._hasColors,_=e._hasNormals,y=e._hasBatchIds,C=e._backFaceCulling,E=e._normalShading,I=e._drawCommand.vertexArray,b=e.clippingPlanes,S=e._attenuation,B,v,P,N=g,L=je(tSt),A={},x=e._styleableShaderAttributes;for(o in x)x.hasOwnProperty(o)&&(r=x[o],L[o]=`czm_3dtiles_property_${r.location}`,A[r.location]=r);if(a){let fe={translucent:!1},ye="(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)";B=n.getColorShaderFunction(`getColorFromStyle${ye}`,L,fe),v=n.getShowShaderFunction(`getShowFromStyle${ye}`,L,fe),P=n.getPointSizeShaderFunction(`getPointSizeFromStyle${ye}`,L,fe),l(B)&&fe.translucent&&(N=!0)}e._styleTranslucent=N;let T=l(B),w=l(v),R=l(P),O=e.isClipped,k=[],F=[];T&&(CZ(B,k),EZ(B,F)),w&&(CZ(v,k),EZ(v,F)),R&&(CZ(P,k),EZ(P,F));let z=F.indexOf("COLOR")>=0,Q=F.indexOf("NORMAL")>=0;if(Q&&!_)throw new ce("Style references the NORMAL semantic but the point cloud does not have normals");for(o in x)if(x.hasOwnProperty(o)){r=x[o];let fe=k.indexOf(r.location)>=0,ye=IZ(I,r.location);ye.enabled=fe}let H=m&&(!T||z);if(m){let fe=IZ(I,VH);fe.enabled=H}let j=_&&(E||C||Q);if(_){let fe=IZ(I,xZ);fe.enabled=j}let Z={a_position:sTe};H&&(Z.a_color=VH),j&&(Z.a_normal=xZ),y&&(Z.a_batchId=aTe);let Y="",$=k.length;for(i=0;i<$;++i){let fe=k[i];r=A[fe];let ye=r.componentCount,Ie=`czm_3dtiles_property_${fe}`,ve;ye===1?ve="float":ve=`vec${ye}`,Y+=`in ${ve} ${Ie}; `,Z[Ie]=r.location}eSt(e,t);let J=`in vec3 a_position; out vec4 v_color; uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier; uniform vec4 u_constantColor; uniform vec4 u_highlightColor; `;J+=`float u_pointSize; float tiles3d_tileset_time; `,S&&(J+=`float u_geometricError; float u_depthMultiplier; `),J+=Y,H&&(g?J+=`in vec4 a_color; `:p?J+=`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; `:J+=`in vec3 a_color; `),j&&(f||h?J+=`in vec2 a_normal; `:J+=`in vec3 a_normal; `),y&&(J+=`in float a_batchId; `),(c||u||h)&&(J+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange; `),T&&(J+=B),w&&(J+=v),R&&(J+=P),J+=`void main() { u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x; tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y; `,S&&(J+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z; u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w; `),H?g?J+=` vec4 color = a_color; `:p?J+=` 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); `:J+=` vec4 color = vec4(a_color, 1.0); `:J+=` vec4 color = u_constantColor; `,c||u?J+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz; `:J+=` vec3 position = a_position; `,J+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0)); `,j?(f?J+=` vec3 normal = czm_octDecode(a_normal); `:h?J+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy; `:J+=` vec3 normal = a_normal; `,J+=` vec3 normalEC = czm_normal * normal; `):J+=` vec3 normal = vec3(1.0); `,T&&(J+=` color = getColorFromStyle(position, position_absolute, color, normal); `),w&&(J+=` float show = float(getShowFromStyle(position, position_absolute, color, normal)); `),R?J+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio; `:S?J+=` vec4 positionEC = czm_modelView * vec4(position, 1.0); float depth = -positionEC.z; gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize); `:J+=` gl_PointSize = u_pointSize; `,J+=` color = color * u_highlightColor; `,j&&E&&(J+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC); diffuseStrength = max(diffuseStrength, 0.4); color.xyz *= diffuseStrength * czm_lightColor; `),J+=` v_color = color; gl_Position = czm_modelViewProjection * vec4(position, 1.0); `,j&&C&&(J+=` float visible = step(-normalEC.z, 0.0); gl_Position *= visible; gl_PointSize *= visible; `),w&&(J+=` gl_Position.w *= float(show); gl_PointSize *= float(show); `),J+=`} `;let pe=`in vec4 v_color; `;O&&(pe+=`uniform highp sampler2D u_clippingPlanes; uniform mat4 u_clippingPlanesMatrix; uniform vec4 u_clippingPlanesEdgeStyle; `,pe+=` `,pe+=jg(b,s),pe+=` `),pe+=`void main() { out_FragColor = czm_gammaCorrect(v_color); `,O&&(pe+=jk("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),pe+=`} `,e.splitDirection!==Tr.NONE&&(pe=ww.modifyFragmentShader(pe)),l(e._vertexShaderLoaded)&&(J=e._vertexShaderLoaded(J)),l(e._fragmentShaderLoaded)&&(pe=e._fragmentShaderLoaded(pe));let Ce=e._drawCommand;l(Ce.shaderProgram)&&Ce.shaderProgram.destroy(),Ce.shaderProgram=cn.fromCache({context:s,vertexShaderSource:J,fragmentShaderSource:pe,attributeLocations:Z});try{Ce.shaderProgram._bind()}catch{throw new ce("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function iSt(e,t){if(e._decodingState===sx.READY)return!1;if(e._decodingState===sx.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=MA.decodePointCloud(i,t);l(o)&&(e._decodingState=sx.DECODING,o.then(function(r){e._decodingState=sx.READY;let s=l(r.POSITION)?r.POSITION.array:void 0,a=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,u=l(r.NORMAL)?r.NORMAL.array:void 0,f=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=l(s)&&l(r.POSITION.data.quantization),p=l(u)&&l(r.NORMAL.data.quantization);if(h){let y=r.POSITION.data.quantization,C=y.range;e._quantizedVolumeScale=d.fromElements(C,C,C),e._quantizedVolumeOffset=d.unpack(y.minValues),e._quantizedRange=(1<<y.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let g=n.styleableProperties,m=i.batchTableProperties;for(let y in m)if(m.hasOwnProperty(y)){let C=r[y];l(g)||(g={}),g[y]={typedArray:C.array,componentCount:C.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let _=c??a;l(_)&&(n.colors={typedArray:_}),l(u)&&(n.normals={typedArray:u}),l(f)&&(n.batchIds={typedArray:f}),n.styleableProperties=g}).catch(function(r){e._decodingState=sx.FAILED,e._error=r}))}return!0}var oSt=new se,rSt=new d;Yk.prototype.update=function(e){let t=e.context;if(l(this._error)){let u=this._error;throw this._error=void 0,u}if(iSt(this,t))return;let i=!1,o=!M.equals(this._modelMatrix,this.modelMatrix);if(this._mode!==e.mode&&(this._mode=e.mode,o=!0),l(this._drawCommand)||($Tt(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){M.clone(this.modelMatrix,this._modelMatrix);let u=this._drawCommand.modelMatrix;if(M.clone(this._modelMatrix,u),l(this._rtcCenter)&&M.multiplyByTranslation(u,this._rtcCenter,u),l(this._quantizedVolumeOffset)&&M.multiplyByTranslation(u,this._quantizedVolumeOffset,u),e.mode!==oe.SCENE3D){let h=e.mapProjection,p=M.getColumn(u,3,oSt);se.equals(p,se.UNIT_W)||Qt.basisTo2D(h,u,u)}let f=this._drawCommand.boundingVolume;if(le.clone(this._boundingSphere,f),this._cull){let h=f.center;M.multiplyByPoint(u,h,h);let p=M.getScale(u,rSt);f.radius*=d.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 r=this.splitDirection!==Tr.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&nSt(this,e,this._style),this._drawCommand.castShadows=Bn.castShadows(this.shadows),this._drawCommand.receiveShadows=Bn.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?Be.TRANSLUCENT:this._opaquePass;let a=e.commandList,c=e.passes;(c.render||c.pick)&&a.push(this._drawCommand)};Yk.prototype.isDestroyed=function(){return!1};Yk.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),ue(this)};var qk=Yk;function cx(e){e=e??V.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this.shadows=e.shadows??Bn.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new $m(e.shading),this.style=e.style,this.frameFailed=new ge,this.frameChanged=new ge,this._clock=e.clock,this._intervals=e.intervals,this._clippingPlanes=void 0,this.clippingPlanes=e.clippingPlanes,this._pointCloudEyeDomeLighting=new zA,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(cx.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){Ps.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function sSt(e){return`uniform vec4 czm_pickColor; ${e}`}function aSt(e){return function(t){return St(t,{czm_pickColor:function(){return e._pickId.color}})}}function cSt(){return"czm_pickColor"}cx.prototype.makeStyleDirty=function(){this._styleDirty=!0};cx.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var lSt=new K;function TZ(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function ax(e,t){return e._intervals.indexOf(t.start)}function uSt(e,t){let n=e._intervals,i=e._clock,o=TZ(e);if(o===0)return;let r=e._getAverageLoadTime(),s=K.addSeconds(i.currentTime,r*o,lSt),a=n.indexOf(s),c=ax(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function fSt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function dSt(e,t,n){let i=TZ(e),o=ax(e,t),r=ax(e,n);return i>=0?o>=r:o<=r}function lTe(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 hSt(e,t,n){let i=ax(e,t),o=e._frames,r=o[i];if(!l(r)){let s=t.data.transform,a=l(s)?M.fromArray(s):void 0,c=t.data.uri;r={pointCloud:void 0,transform:a,timestamp:Mi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,we.fetchArrayBuffer({url:c}).then(function(u){r.pointCloud=new qk({arrayBuffer:u,cull:!0,fragmentShaderLoaded:sSt,uniformMapLoaded:aSt(e),pickIdLoaded:cSt})}).catch(lTe(e,c))}return r}function mSt(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 pSt(e,t,n,i){t.touchedFrameNumber<i.frameNumber-1&&(t.sequential=!1);let o=t.pointCloud;if(l(o)&&!t.ready){let r=i.commandList,s=r.length;if(uTe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(Mi()-t.timestamp)/1e3;mSt(e,a)}}t.touchedFrameNumber=i.frameNumber}var ASt=new M;function gSt(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 _St(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var ySt=new $m;function uTe(e,t,n,i){let o=e.shading??ySt,r=t.pointCloud,s=t.transform??M.IDENTITY;r.modelMatrix=M.multiplyTransformation(e.modelMatrix,s,ASt),r.style=e.style,r.time=n.timeSinceLoad,r.shadows=e.shadows,r.clippingPlanes=e._clippingPlanes,r.isClipped=n.isClipped,r.attenuation=o.attenuation,r.backFaceCulling=o.backFaceCulling,r.normalShading=o.normalShading,r.geometricError=gSt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=_St(e);try{r.update(i)}catch(a){lTe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function bZ(e,t,n,i){let o=hSt(e,t,i);pSt(e,o,n,i)}function CSt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function fTe(e,t){let n=e._frames,i=n.length;for(let o=0;o<i;++o){let r=n[o];if(l(r)&&(!l(t)||t(r))){let s=r.pointCloud;r.ready&&(e._totalMemoryUsageInBytes-=s.geometryByteLength),l(s)&&s.destroy(),r===e._lastRenderedFrame&&(e._lastRenderedFrame=void 0),n[o]=void 0}}}function ESt(e,t){let n=ax(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function cTe(e,t,n,i,o){return l(n)?n.ready?!0:(bZ(e,t,i,o),n.ready):!1}function ISt(e,t,n,i,o){let r,s,a,c=e._intervals,u=e._frames,f=ax(e,n),h=ax(e,t);if(f>=h){for(r=f;r>=h;--r)if(s=c.get(r),a=u[r],cTe(e,s,a,i,o))return s}else for(r=f;r<=h;++r)if(s=c.get(r),a=u[r],cTe(e,s,a,i,o))return s;return t}function xSt(e,t,n){let i=e._frames,o=i.length;for(let r=0;r<o;++r){let s=i[r];l(s)&&l(s.pointCloud)&&(s.pointCloud.clippingPlanesDirty=t,s.pointCloud.styleDirty=n)}}var Bw={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};cx.prototype.update=function(e){if(e.mode===oe.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,o=!1,r=l(n)&&n.enabled;r&&(n.update(e),i=n.clippingPlanesState),this._clippingPlanesState!==i&&(this._clippingPlanesState=i,o=!0);let s=this._styleDirty;this._styleDirty=!1,(o||s)&&xSt(this,o,s),Bw.timeSinceLoad=t,Bw.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,u=e.commandList,f=u.length,h=this._previousInterval,p=this._nextInterval,g=fSt(this);if(!l(g))return;let m=!1,_=TZ(this),y=_===0;_!==this._clockMultiplier&&(m=!0,this._clockMultiplier=_),(!l(h)||y)&&(h=g),(!l(p)||m||dSt(this,g,p))&&(p=uSt(this,g)),h=ISt(this,h,g,Bw,e);let C=ESt(this,h);l(C)||(bZ(this,h,Bw,e),C=this._lastRenderedFrame),l(C)&&uTe(this,C,Bw,e),l(p)&&bZ(this,p,Bw,e);let E=this;l(C)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(C)&&C!==this._lastRenderedFrame&&E.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return E.frameChanged.raiseEvent(E),!0}),this._previousInterval=h,this._nextInterval=p,this._lastRenderedFrame=C;let I=this._totalMemoryUsageInBytes,b=this.maximumMemoryUsage*1024*1024;I>b&&fTe(this,CSt(e));let B=u.length-f;l(a)&&a.attenuation&&a.eyeDomeLighting&&B>0&&c.update(e,f,a,this.boundingSphere)};cx.prototype.isDestroyed=function(){return!1};cx.prototype.destroy=function(){return fTe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),ue(this)};var Dw=cx;function mTe(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function bSt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors&&e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,o)}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function pTe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function ATe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=pTe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function gTe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function Vo(e,t){e=Un(e),t=t??V.EMPTY_OBJECT;let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=jt.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=jt.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}(t.blurActiveElementOnCanvasFocus??!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?Un(t.creditContainer):n;c.appendChild(a);let u=l(t.creditViewport)?Un(t.creditViewport):n,f=t.showRenderLoopErrors??!0,h=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=h,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 ge,this._allowDataSourcesToSuspendAnimation=!0,this._clock=l(t.clock)?t.clock:new Zh,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),ATe(this);try{let p=t.ellipsoid??ne.default,g=new Uk({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=d.UNIT_Z,pTe(this),gTe(this);let m=t.globe;l(m)||(m=new H2(p)),m!==!1&&(g.globe=m,g.globe.shadows=t.terrainShadows??Bn.RECEIVE_ONLY);let _=t.skyBox;!l(_)&&ne.WGS84.equals(p)&&(_=zk.createEarthSkyBox()),_!==!1&&(g.skyBox=_,g.sun=new Wk,ne.WGS84.equals(p)&&(g.moon=new X2));let y=t.skyAtmosphere;!l(y)&&ne.WGS84.equals(p)&&(y=new Gk(p),y.show=t.globe!==!1&&m.show),y!==!1&&(g.skyAtmosphere=y);let C=t.baseLayer;t.globe!==!1&&C!==!1&&(l(C)||(C=ns.fromWorldImagery()),g.imageryLayers.add(C)),l(t.terrainProvider)&&t.globe!==!1&&(g.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&g.setTerrain(t.terrain),this._screenSpaceEventHandler=new vf(i),l(t.sceneMode)&&(t.sceneMode===oe.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===oe.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=t.useDefaultRenderLoop??!0,this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let E=this;this._onRenderError=function(P,N){E._useDefaultRenderLoop=!1,E._renderLoopRunning=!1,E._showRenderLoopErrors&&E.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,N)},g.renderError.addEventListener(this._onRenderError);let I=t.dataSources,b=!1;l(I)||(I=new GO,b=!0);let S=new DF({scene:g,dataSourceCollection:I}),B=new Dr;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=I,this._destroyDataSourceCollection=b,this._dataSourceDisplay=S,this._eventHelper=B,this._canAnimateUpdateCallback=this._updateCanAnimate,B.add(this._clock.onTick,Vo.prototype._onTick,this),B.add(g.morphStart,Vo.prototype._clearTrackedObject,this),B.add(I.dataSourceAdded,Vo.prototype._onDataSourceAdded,this),B.add(I.dataSourceRemoved,Vo.prototype._onDataSourceRemoved,this),B.add(g.postRender,Vo.prototype._postRender,this);let v=I.length;for(let P=0;P<v;P++)this._dataSourceAdded(I,I.get(P));this._dataSourceAdded(void 0,S.defaultDataSource),B.add(I.dataSourceAdded,Vo.prototype._dataSourceAdded,this),B.add(I.dataSourceRemoved,Vo.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(Vo.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&&bSt(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,SZ(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===oe.COLUMBUS_VIEW||n===oe.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===oe.COLUMBUS_VIEW||n===oe.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(M.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,mTe(this.clock,e))}}});Vo.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.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=tp(n);u||(typeof n=="string"&&(n=new Error(n)),t=tp({name:n.name,message:n.message}),m=n.stack),typeof console<"u"&&console.error(`${e} ${t} ${m}`);let _=document.createElement("div");_.className="cesium-widget-errorPanel-message-details collapsed";let y=document.createElement("span");y.className="cesium-widget-errorPanel-more-details",y.appendChild(document.createTextNode("See more...")),_.appendChild(y),_.onclick=function(C){_.removeChild(y),_.appendChild(document.createTextNode(m)),_.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",_.onclick=void 0},a.appendChild(_)}g.innerHTML=`<p>${t}</p>`}let h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);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(o)},h.appendChild(p),i.appendChild(o)};Vo.prototype.isDestroyed=function(){return!1};Vo.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()),ue(this)};Vo.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,ATe(this),gTe(this),this._scene.requestRender())};Vo.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};Vo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Vo.prototype._onEntityCollectionChanged,this)};Vo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Vo.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};Vo.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var TSt=new le;Vo.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 o=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(o,!1,i.boundingSphere??TSt)===mt.DONE&&i.update(t)}};Vo.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0)}};Vo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Vo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&mTe(this.clock,e)};Vo.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Vo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Vo.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 o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};Vo.prototype.zoomTo=function(e,t){return _Te(this,e,{offset:t},!1)};Vo.prototype.flyTo=function(e,t){return _Te(this,e,t,!0)};function _Te(e,t,n,i){SZ(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof ns){let s;l(r.imageryProvider)?s=Promise.resolve(r.getImageryRectangle()):s=new Promise(a=>{let c=r.readyEvent.addEventListener(()=>{c(),a(r.getImageryRectangle())})}),s.then(function(a){return wI(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof Ms||r instanceof Dw||r instanceof _C){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=r.values??r,l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function Kk(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function SZ(e){let t=e._zoomPromise;l(t)&&(Kk(e),e._completeZoom(!1))}Vo.prototype._postRender=function(){SSt(this),wSt(this)};var dTe=new le;function SSt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===oe.MORPHING)return;let n=e.scene,i=n.camera,o=e._zoomOptions??{},r;function s(f){l(o.offset)||(o.offset=new Ld(0,-.5,f.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(f,o.offset),i.lookAtTransform(M.IDENTITY),e._completeZoom(!0)),Kk(e)}if(t instanceof Dw){if(l(t.boundingSphere)){s(t.boundingSphere);return}let f=t.frameChanged.addEventListener(function(h){s(h.boundingSphere),f()});return}if(t instanceof Ms||t instanceof _C){s(t.boundingSphere);return}if(t instanceof me){r={destination:n.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),Kk(e);return}let a=t,c=[];for(let f=0,h=a.length;f<h;f++){let p=e._dataSourceDisplay.getBoundingSphere(a[f],!1,dTe);if(p===mt.PENDING)return;p!==mt.FAILED&&c.push(le.clone(dTe))}if(c.length===0){SZ(e);return}e.trackedEntity=void 0;let u=le.fromBoundingSpheres(c);e._zoomIsFlight?(Kk(e),i.flyToBoundingSphere(u,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(M.IDENTITY),Kk(e),e._completeZoom(!0))}var hTe=new le;function wSt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=W.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,hTe);if(r===mt.PENDING)return;let s=o.mode;(s===oe.COLUMBUS_VIEW||s===oe.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===oe.COLUMBUS_VIEW||s===oe.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==mt.FAILED?hTe:void 0;e._entityView=new PF(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var Xk=Vo;var BSt=new d(1,1,1);function wZ(e){e=e??BSt,this._dimensions=d.clone(e)}Object.defineProperties(wZ.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){d.clone(e,this._dimensions)}}});var DSt=new d;wZ.prototype.emit=function(e){let t=this._dimensions,n=d.multiplyByScalar(t,.5,DSt),i=D.randomBetween(-n.x,n.x),o=D.randomBetween(-n.y,n.y),r=D.randomBetween(-n.z,n.z);e.position=d.fromElements(i,o,r,e.position),e.velocity=d.normalize(e.position,e.velocity)};var BZ=wZ;function Hp(){this.featurePropertiesDirty=!1}Object.defineProperties(Hp.prototype,{featuresLength:{get:function(){he.throwInstantiationError()}},pointsLength:{get:function(){he.throwInstantiationError()}},trianglesLength:{get:function(){he.throwInstantiationError()}},geometryByteLength:{get:function(){he.throwInstantiationError()}},texturesByteLength:{get:function(){he.throwInstantiationError()}},batchTableByteLength:{get:function(){he.throwInstantiationError()}},innerContents:{get:function(){he.throwInstantiationError()}},ready:{get:function(){he.throwInstantiationError()}},tileset:{get:function(){he.throwInstantiationError()}},tile:{get:function(){he.throwInstantiationError()}},url:{get:function(){he.throwInstantiationError()}},batchTable:{get:function(){he.throwInstantiationError()}},metadata:{get:function(){he.throwInstantiationError()},set:function(e){he.throwInstantiationError()}},group:{get:function(){he.throwInstantiationError()},set:function(e){he.throwInstantiationError()}}});Hp.prototype.hasProperty=function(e,t){he.throwInstantiationError()};Hp.prototype.getFeature=function(e){he.throwInstantiationError()};Hp.prototype.applyDebugSettings=function(e,t){he.throwInstantiationError()};Hp.prototype.applyStyle=function(e){he.throwInstantiationError()};Hp.prototype.update=function(e,t){he.throwInstantiationError()};Hp.prototype.pick=function(e,t,n){he.throwInstantiationError()};Hp.prototype.isDestroyed=function(){he.throwInstantiationError()};Hp.prototype.destroy=function(){he.throwInstantiationError()};var DZ=Hp;function vw(e,t){this._conditionsExpression=je(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,PSt(this,t)}Object.defineProperties(vw.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function vSt(e,t){this.condition=e,this.expression=t}function PSt(e,t){let n=[],i=e._conditions;if(!l(i))return;let o=i.length;for(let r=0;r<o;++r){let s=i[r],a=String(s[0]),c=String(s[1]);n.push(new vSt(new od(a,t),new od(c,t)))}e._runtimeConditions=n}vw.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};vw.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};vw.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let c=o[a],u=c.condition.getShaderExpression(t,n),f=c.expression.getShaderExpression(t,n);r+=` ${a===0?"if":"else if"} (${u}) { return ${f}; } `}return r=`${i} ${e} { ${r} return ${i}(1.0); } `,r};vw.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 o=t[i];e.push.apply(e,o.condition.getVariables()),e.push.apply(e,o.expression.getVariables())}return e=e.filter(function(i,o,r){return r.indexOf(i)===o}),e};var Jk=vw;function CC(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._colorShaderFunction=void 0,this._showShaderFunction=void 0,this._pointSizeShaderFunction=void 0,this._colorShaderFunctionReady=!1,this._showShaderFunctionReady=!1,this._pointSizeShaderFunctionReady=!1,this._colorShaderTranslucent=!1,RSt(this,e)}function RSt(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;let n={};if(l(t.meta)){let i=t.defines,o=t.meta??V.EMPTY_OBJECT;for(let r in o)o.hasOwnProperty(r)&&(n[r]=new od(o[r],i))}e._meta=n,e._ready=!0}function Cr(e,t){let n=(e._style??V.EMPTY_OBJECT).defines;if(l(t)){if(typeof t=="boolean"||typeof t=="number")return new od(String(t));if(typeof t=="string")return new od(t,n);if(l(t.conditions))return new Jk(t,n)}else return;return t}function Er(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(CC.prototype,{style:{get:function(){return this._style}},show:{get:function(){return this._show},set:function(e){this._show=Cr(this,e),this._style.show=Er(this._show),this._showShaderFunctionReady=!1}},color:{get:function(){return this._color},set:function(e){this._color=Cr(this,e),this._style.color=Er(this._color),this._colorShaderFunctionReady=!1}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=Cr(this,e),this._style.pointSize=Er(this._pointSize),this._pointSizeShaderFunctionReady=!1}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=Cr(this,e),this._style.pointOutlineColor=Er(this._pointOutlineColor)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=Cr(this,e),this._style.pointOutlineWidth=Er(this._pointOutlineWidth)}},labelColor:{get:function(){return this._labelColor},set:function(e){this._labelColor=Cr(this,e),this._style.labelColor=Er(this._labelColor)}},labelOutlineColor:{get:function(){return this._labelOutlineColor},set:function(e){this._labelOutlineColor=Cr(this,e),this._style.labelOutlineColor=Er(this._labelOutlineColor)}},labelOutlineWidth:{get:function(){return this._labelOutlineWidth},set:function(e){this._labelOutlineWidth=Cr(this,e),this._style.labelOutlineWidth=Er(this._labelOutlineWidth)}},font:{get:function(){return this._font},set:function(e){this._font=Cr(this,e),this._style.font=Er(this._font)}},labelStyle:{get:function(){return this._labelStyle},set:function(e){this._labelStyle=Cr(this,e),this._style.labelStyle=Er(this._labelStyle)}},labelText:{get:function(){return this._labelText},set:function(e){this._labelText=Cr(this,e),this._style.labelText=Er(this._labelText)}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=Cr(this,e),this._style.backgroundColor=Er(this._backgroundColor)}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){this._backgroundPadding=Cr(this,e),this._style.backgroundPadding=Er(this._backgroundPadding)}},backgroundEnabled:{get:function(){return this._backgroundEnabled},set:function(e){this._backgroundEnabled=Cr(this,e),this._style.backgroundEnabled=Er(this._backgroundEnabled)}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){this._scaleByDistance=Cr(this,e),this._style.scaleByDistance=Er(this._scaleByDistance)}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){this._translucencyByDistance=Cr(this,e),this._style.translucencyByDistance=Er(this._translucencyByDistance)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){this._distanceDisplayCondition=Cr(this,e),this._style.distanceDisplayCondition=Er(this._distanceDisplayCondition)}},heightOffset:{get:function(){return this._heightOffset},set:function(e){this._heightOffset=Cr(this,e),this._style.heightOffset=Er(this._heightOffset)}},anchorLineEnabled:{get:function(){return this._anchorLineEnabled},set:function(e){this._anchorLineEnabled=Cr(this,e),this._style.anchorLineEnabled=Er(this._anchorLineEnabled)}},anchorLineColor:{get:function(){return this._anchorLineColor},set:function(e){this._anchorLineColor=Cr(this,e),this._style.anchorLineColor=Er(this._anchorLineColor)}},image:{get:function(){return this._image},set:function(e){this._image=Cr(this,e),this._style.image=Er(this._image)}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance=Cr(this,e),this._style.disableDepthTestDistance=Er(this._disableDepthTestDistance)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=Cr(this,e),this._style.horizontalOrigin=Er(this._horizontalOrigin)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=Cr(this,e),this._style.verticalOrigin=Er(this._verticalOrigin)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=Cr(this,e),this._style.labelHorizontalOrigin=Er(this._labelHorizontalOrigin)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=Cr(this,e),this._style.labelVerticalOrigin=Er(this._labelVerticalOrigin)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}});CC.fromUrl=function(e){return we.createIfNeeded(e).fetchJson(e).then(function(n){return new CC(n)})};CC.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)};CC.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)};CC.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)};CC.prototype.getVariables=function(){let e=[];return l(this.color)&&l(this.color.getVariables)&&e.push.apply(e,this.color.getVariables()),l(this.show)&&l(this.show.getVariables)&&e.push.apply(e,this.show.getVariables()),l(this.pointSize)&&l(this.pointSize.getVariables)&&e.push.apply(e,this.pointSize.getVariables()),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var lx=CC;function Zk(e){e=e??V.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new ix({comparator:Zk.comparator})}Zk.prototype.addSubtree=function(e){let t=new MSt(e,this._subtreeRequestCounter);this._subtreeRequestCounter++,this._queue.insert(t);let n=e.implicitCoordinates;if(n.level>0){let i=n.getParentSubtreeCoordinates(),o=this.find(i)}if(this._maximumSubtreeCount>0)for(;this._queue.length>this._maximumSubtreeCount&&this._queue.getMinimum()!==t;)this._queue.removeMinimum()};Zk.prototype.find=function(e){let t=this._queue,n=t.internalArray,i=t.length;for(let o=0;o<i;o++){let r=n[o],a=r.subtree.implicitCoordinates;if(e.isEqual(a))return r.subtree}};Zk.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 MSt(e,t){this.subtree=e,this.stamp=t}var $k=Zk;function e3(e){e=e??V.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:o,shape:r,dimensions:s,paddingBefore:a=d.ZERO.clone(),paddingAfter:c=d.ZERO.clone(),globalTransform:u=M.IDENTITY.clone(),shapeTransform:f=M.IDENTITY.clone(),minBounds:h,maxBounds:p,minimumValues:g,maximumValues:m,maximumTileCount:_}=e;this._shapeTransform=f,this._globalTransform=u,this._shape=r,this._minBounds=h,this._maxBounds=p,this._dimensions=s,this._paddingBefore=a,this._paddingAfter=c,this._className=t,this._names=n,this._types=i,this._componentTypes=o,this._metadataOrder=r===Xa.ELLIPSOID?qd.Z_UP:qd.Y_UP,this._minimumValues=g,this._maximumValues=m,this._maximumTileCount=_,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new $k}Object.defineProperties(e3.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}}});e3.fromUrl=async function(e){let t=we.createIfNeeded(e),n=await t.fetchJson();LSt(n);let i=zSt(n,t);await i.load();let{root:o}=n,r=_i(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,s=new L0({metadataJson:r,schema:i.schema}),a=o.content.extensions["3DTILES_content_voxels"],c=a.class,u=VSt(s,c);Object.assign(u,OSt(o)),l(o.transform)?u.globalTransform=M.unpack(o.transform):u.globalTransform=M.clone(M.IDENTITY),u.dimensions=d.unpack(a.dimensions),u.maximumTileCount=NSt(s),l(a.padding)&&(u.paddingBefore=d.unpack(a.padding.before),u.paddingAfter=d.unpack(a.padding.after));let f=new e3(u),h=new F0(t,o,i.schema);return f._implicitTileset=h,f._availableLevels=h.availableLevels,Li.unload(i),f};function NSt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(JE.TILESET_TILE_COUNT)}function LSt(e){let t=e.root;if(!l(t.content))throw new ce("Root must have content");if(!_i(t.content,"3DTILES_content_voxels"))throw new ce("Root tile content must have 3DTILES_content_voxels extension");if(!_i(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new ce("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!_i(e,"3DTILES_metadata"))throw new ce("Tileset must have a metadata schema")}function OSt(e){let t=e.boundingVolume;if(l(t.box))return USt(t.box);if(l(t.region))return FSt(t.region);if(_i(t,"3DTILES_bounding_volume_cylinder"))return GSt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new ce("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function FSt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=M.fromScale(ne.WGS84.radii),c=new d(t,n,r),u=new d(i,o,s);return{shape:Xa.ELLIPSOID,minBounds:c,maxBounds:u,shapeTransform:a}}var QSt=new d,kSt=new X;function USt(e){let t=Qn.unpack(e),n=X.getScale(t.halfAxes,QSt),i=X.getRotation(t.halfAxes,kSt);return{shape:Xa.BOX,minBounds:d.negate(n,new d),maxBounds:d.clone(n),shapeTransform:M.fromRotationTranslation(i,t.center)}}function GSt(e){let{minRadius:t,maxRadius:n,height:i,minAngle:o=-D.PI,maxAngle:r=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=M.fromTranslationQuaternionRotationScale(d.unpack(s),Fe.unpack(a),d.ONE);return{shape:Xa.CYLINDER,minBounds:d.fromElements(t,o,c),maxBounds:d.fromElements(n,r,u),shapeTransform:f}}function zSt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?Li.getSchemaLoader({resource:t.getDerivedResource({url:n})}):Li.getSchemaLoader({schema:i})}function VSt(e,t){let{schema:n,statistics:i}=e,o=i?.classes[t],r=n.classes[t].properties,s=Object.entries(r).map(([g,m])=>{let{type:_,componentType:y}=m,C=o?.properties[g].min,E=o?.properties[g].max,I=At.getComponentCount(_),b=yTe(C,I),S=yTe(E,I);return{id:g,type:_,componentType:y,minValue:b,maxValue:S}}),a=s.map(g=>g.id),c=s.map(g=>g.type),u=s.map(g=>g.componentType),f=s.map(g=>g.minValue),h=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?h:void 0}}function yTe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function HSt(e,t){let n=e._implicitTileset,i=e._subtreeCache,o=i.find(t);if(l(o))return o;let r=n.subtreeUriTemplate.getDerivedResource({templateValues:t.getTemplateValues()}),s=n.baseResource.getDerivedResource({url:r.url}),a=await s.fetchArrayBuffer();if(o=i.find(t),l(o))return o;let c=fg(a);return o=await XE.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}e3.prototype.requestData=async function(e){e=e??V.EMPTY_OBJECT;let{tileLevel:t=0,tileX:n=0,tileY:i=0,tileZ:o=0,keyframe:r=0}=e;if(r!==0)return Promise.reject("3D Tiles currently doesn't support time-dynamic data.");let s=this._implicitTileset,a=new Q0({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),c=a.isSubtreeRoot()&&a.level>0,u=c?a.getParentSubtreeCoordinates():a.getSubtreeCoordinates(),h=await HSt(this,u);if(!(c?h.childSubtreeIsAvailableAtCoordinates:h.tileIsAvailableAtCoordinates).call(h,a))return Promise.reject(`Tile is not available at level ${t}, x ${n}, y ${i}, z ${o}.`);let{contentUriTemplates:m,baseResource:_}=s,y=m[0].getDerivedResource({templateValues:a.getTemplateValues()}),C=_.getDerivedResource({url:y.url});return $I.fromGltf(C)};var vZ=e3;function PZ(e){e=e??1,this._radius=e??1}Object.defineProperties(PZ.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});PZ.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=d.fromElements(i,o,r,e.position),e.velocity=d.clone(d.UNIT_Z,e.velocity)};var t3=PZ;var RZ={CUMULUS:0};RZ.validate=function(e){return e===RZ.CUMULUS};var Pw=Object.freeze(RZ);function bm(e,t){if(e=e??V.EMPTY_OBJECT,this._show=e.show??!0,this._position=d.clone(e.position??d.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=d.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 d(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=d.clone(e.maximumSize??n)}this._slice=e.slice??-1,this._color=G.clone(e.color??G.WHITE),this._brightness=e.brightness??1,this._cloudCollection=t,this._index=-1}var WSt=bm.SHOW_INDEX=0,jSt=bm.POSITION_INDEX=1,YSt=bm.SCALE_INDEX=2,qSt=bm.MAXIMUM_SIZE_INDEX=3,KSt=bm.SLICE_INDEX=4,XSt=bm.BRIGHTNESS_INDEX=5,JSt=bm.COLOR_INDEX=6;bm.NUMBER_OF_PROPERTIES=7;function ux(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(bm.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,ux(this,WSt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;d.equals(t,e)||(d.clone(e,t),ux(this,jSt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;U.equals(t,e)||(U.clone(e,t),ux(this,YSt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;d.equals(t,e)||(d.clone(e,t),ux(this,qSt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;G.equals(t,e)||(G.clone(e,t),ux(this,JSt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,ux(this,KSt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,ux(this,XSt))}}});bm.prototype._destroy=function(){this._cloudCollection=void 0};var Nf=bm;var Lf,HH=new d,ZSt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},$St={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},ewt=Nf.SHOW_INDEX,twt=Nf.POSITION_INDEX,nwt=Nf.SCALE_INDEX,iwt=Nf.MAXIMUM_SIZE_INDEX,owt=Nf.SLICE_INDEX,rwt=Nf.BRIGHTNESS_INDEX,swt=Nf.NUMBER_OF_PROPERTIES,awt=Nf.COLOR_INDEX;function Tm(e){e=e??V.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(swt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=d.clone(e.noiseOffset??d.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:CTe(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 CTe(e){return function(){return HH.x=e._textureSliceWidth,HH.y=e._noiseTextureRows,HH.z=1/e._noiseTextureRows,HH}}Object.defineProperties(Tm.prototype,{length:{get:function(){return NZ(this),this._clouds.length}}});function ETe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Tm.prototype.add=function(e){e=e??V.EMPTY_OBJECT;let t=e.cloudType??Pw.CUMULUS,n;return t===Pw.CUMULUS&&(n=new Nf(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Tm.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Tm.prototype.removeAll=function(){ETe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function NZ(e){if(e._cloudsRemoved){e._cloudsRemoved=!1;let t=[],n=e._clouds,i=n.length;for(let o=0,r=0;o<i;++o){let s=n[o];l(s)&&(n._index=r++,t.push(s))}e._clouds=t}}Tm.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Tm.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Tm.prototype.get=function(e){return NZ(this),this._clouds[e]};var cwt=new Float32Array([-1,-1,1,-1,1,1,-1,1]),lwt=new Uint16Array([0,1,2,0,2,3]);function uwt(e){let t=Ct.createVertexBuffer({context:e,typedArray:cwt,usage:Ue.STATIC_DRAW}),n=Ct.createIndexBuffer({context:e,typedArray:lwt,usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:q.FLOAT}];return new ri({context:e,attributes:i,indexBuffer:n})}var LZ;function fwt(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=Ct.createIndexBuffer({context:e,typedArray:o,usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function dwt(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=Ct.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Ue.STATIC_DRAW,indexDatatype:Qe.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function hwt(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=Ct.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Ue.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function mwt(e,t,n){let i=[{index:Lf.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:Ue.STATIC_DRAW},{index:Lf.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:Ue.STATIC_DRAW},{index:Lf.packedAttribute0,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:Ue.STATIC_DRAW},{index:Lf.packedAttribute1,componentsPerAttribute:4,componentDatatype:q.FLOAT,usage:Ue.STATIC_DRAW},{index:Lf.color,componentsPerAttribute:4,componentDatatype:q.UNSIGNED_BYTE,normalize:!0,usage:Ue.STATIC_DRAW}];n&&i.push({index:Lf.direction,componentsPerAttribute:2,componentDatatype:q.FLOAT,vertexBuffer:hwt(e)});let o=n?t:4*t;return new lA(e,i,o,n)}var MZ=new $n;function ITe(e,t,n,i){let o,r=n[Lf.positionHighAndScaleX],s=n[Lf.positionLowAndScaleY],a=i.position;$n.fromCartesian(a,MZ);let c=i.scale,u=MZ.high,f=MZ.low;e._instanced?(o=i._index,r(o,u.x,u.y,u.z,c.x),s(o,f.x,f.y,f.z,c.y)):(o=i._index*4,r(o+0,u.x,u.y,u.z,c.x),r(o+1,u.x,u.y,u.z,c.x),r(o+2,u.x,u.y,u.z,c.x),r(o+3,u.x,u.y,u.z,c.x),s(o+0,f.x,f.y,f.z,c.y),s(o+1,f.x,f.y,f.z,c.y),s(o+2,f.x,f.y,f.z,c.y),s(o+3,f.x,f.y,f.z,c.y))}function xTe(e,t,n,i){let o,r=n[Lf.packedAttribute0],s=i.show,a=i.brightness;e._instanced?(o=i._index,r(o,s,a,0,0)):(o=i._index*4,r(o+0,s,a,0,0),r(o+1,s,a,1,0),r(o+2,s,a,1,1),r(o+3,s,a,0,1))}function bTe(e,t,n,i){let o,r=n[Lf.packedAttribute1],s=i.maximumSize,a=i.slice;e._instanced?(o=i._index,r(o,s.x,s.y,s.z,a)):(o=i._index*4,r(o+0,s.x,s.y,s.z,a),r(o+1,s.x,s.y,s.z,a),r(o+2,s.x,s.y,s.z,a),r(o+3,s.x,s.y,s.z,a))}function TTe(e,t,n,i){let o,r=n[Lf.color],s=i.color,a=G.floatToByte(s.red),c=G.floatToByte(s.green),u=G.floatToByte(s.blue),f=G.floatToByte(s.alpha);e._instanced?(o=i._index,r(o,a,c,u,f)):(o=i._index*4,r(o+0,a,c,u,f),r(o+1,a,c,u,f),r(o+2,a,c,u,f),r(o+3,a,c,u,f))}function pwt(e,t,n,i){ITe(e,t,n,i),xTe(e,t,n,i),bTe(e,t,n,i),TTe(e,t,n,i)}function Awt(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=uwt(a),o._spNoise=cn.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,u=o.noiseOffset;o._noiseTexture=new Nt({context:a,width:r*r/s,height:r*s,pixelDatatype:Ve.UNSIGNED_BYTE,pixelFormat:$e.RGBA,sampler:new nn({wrapS:Pn.REPEAT,wrapT:Pn.REPEAT,minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST})});let f=new sl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:CTe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return u}},persists:!1,owner:e,postExecute:function(h){o._ready=!0,o._loading=!1}});t.commandList.push(f),o._loading=!0}function gwt(e,t){let n=e,i=t.context;n._createVertexArray=!1,n._vaf=n._vaf&&n._vaf.destroy();let o=e._clouds,r=o.length;if(r>0){n._vaf=mwt(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];pwt(e,t,s,c)}n._vaf.commit(LZ(i))}}var _wt=[];function ywt(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,u=_wt;u.length=0,(c[twt]||c[nwt])&&u.push(ITe),(c[ewt]||c[rwt])&&u.push(xTe),(c[iwt]||c[owt])&&u.push(bTe),c[awt]&&u.push(TTe);let f=u.length,h=i._vaf.writers,p,g,m;if(a/r>.1){for(p=0;p<a;++p)for(g=s[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,h,g);i._vaf.commit(LZ(n))}else{for(p=0;p<a;++p){for(g=s[p],g._dirty=!1,m=0;m<f;++m)u[m](e,t,h,g);i._instanced?i._vaf.subCommit(g._index,1):i._vaf.subCommit(g._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function Cwt(e,t,n,i){let o=t.context,r=e,s=new He({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new He({defines:[],sources:[i]});r.debugBillboards&&a.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&a.defines.push("DEBUG_ELLIPSOIDS"),r._sp=cn.replaceCache({context:o,shaderProgram:r._sp,vertexShaderSource:s,fragmentShaderSource:a,attributeLocations:Lf}),r._rs=Ge.fromCache({depthTest:{enabled:!0,func:te.LESS},depthMask:!1,blending:An.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function Ewt(e,t){let n=e,i=t.passes,o=n._uniforms,r=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 nt),f.pass=Be.TRANSLUCENT,f.owner=e,f.uniformMap=o,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),r.push(f)}}}Tm.prototype.update=function(e){if(NZ(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&Awt(this,e,A2,p2),this._instanced=e.context.instancedArrays,Lf=this._instanced?$St:ZSt,LZ=this._instanced?dwt:fwt;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?gwt(this,e):r>0&&ywt(this,e),r>i*1.5&&(o.length=i),!(!l(this._vaf)||!l(this._vaf.va)||!this._ready&!t)&&((!this._spCreated||this.debugBillboards!==this._compiledDebugBillboards||this.debugEllipsoids!==this._compiledDebugEllipsoids)&&Cwt(this,e,m2,h2),Ewt(this,e))};Tm.prototype.isDestroyed=function(){return!1};Tm.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(),ETe(this._clouds),ue(this)};var OZ=Tm;var Iwt=D.toRadians(30);function FZ(e){this._angle=e??Iwt}Object.defineProperties(FZ.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});FZ.prototype.emit=function(e){let t=Math.tan(this._angle),n=D.randomBetween(0,D.TWO_PI),i=D.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=d.fromElements(o,r,s,e.velocity),d.normalize(e.velocity,e.velocity),e.position=d.clone(d.ZERO,e.position)};var QZ=FZ;function n3(e){e=e??V.EMPTY_OBJECT;let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=e.glslDatatype??"vec3",o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); } `;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); } `;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); } `;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); } `;break;case"vec4":r=`vec4 getColor() { return ${o}; } `;break}let s=`in vec3 position3DHigh; in vec3 position3DLow; in float batchId; ${n?"":`in ${i} ${t}; `}out ${i} ${o}; void main() { vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow); ${n?`${o} = czm_batchTable_${t}(batchId); `:`${o} = ${t}; `}gl_Position = czm_modelViewProjectionRelativeToEye * p; }`,a=`in ${i} ${o}; ${r} 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=po.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(n3.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}}});n3.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;n3.prototype.isTranslucent=po.prototype.isTranslucent;n3.prototype.getRenderState=po.prototype.getRenderState;var kZ=n3;function WH(e){e=e??V.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=M.clone(e.modelMatrix??M.IDENTITY),this._modelMatrix=new M,this.id=e.id,this._id=void 0,this._primitive=void 0}WH.prototype.update=function(e){if(this.show){if(!l(this._primitive)||!M.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=M.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 Rt({geometry:new Fg({positions:[d.ZERO,d.UNIT_X],width:this.width,vertexFormat:ps.VERTEX_FORMAT,colors:[G.RED,G.RED],arcType:ln.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),n=new Rt({geometry:new Fg({positions:[d.ZERO,d.UNIT_Y],width:this.width,vertexFormat:ps.VERTEX_FORMAT,colors:[G.GREEN,G.GREEN],arcType:ln.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this}),i=new Rt({geometry:new Fg({positions:[d.ZERO,d.UNIT_Z],width:this.width,vertexFormat:ps.VERTEX_FORMAT,colors:[G.BLUE,G.BLUE],arcType:ln.NONE}),modelMatrix:M.multiplyByUniformScale(this.modelMatrix,this.length,new M),id:this.id,pickPrimitive:this});this._primitive=new kn({geometryInstances:[t,n,i],appearance:new ps,asynchronous:!1})}this._primitive.update(e)}};WH.prototype.isDestroyed=function(){return!1};WH.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),ue(this)};var i3=WH;function xwt(e){this.direction=d.clone(e.direction),this.color=G.clone(e.color??G.WHITE),this.intensity=e.intensity??1}var UZ=xwt;var o3=`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); // Convert tangent space material normal to eye space materialInput.normalEC = normalEC; materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC); // Convert view vector to world space 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 r3=`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; // position in model coordinates v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates v_st = st; gl_Position = czm_modelViewProjectionRelativeToEye * p; } `;function fx(e){e=e??V.EMPTY_OBJECT;let t=e.translucent??!0,n=e.aboveGround??!1;this.material=l(e.material)?e.material:io.fromType(io.ColorType),this.translucent=e.translucent??!0,this._vertexShaderSource=e.vertexShaderSource??r3,this._fragmentShaderSource=e.fragmentShaderSource??o3,this._renderState=po.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(fx.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 fx.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});fx.VERTEX_FORMAT=Re.POSITION_AND_ST;fx.prototype.getFragmentShaderSource=po.prototype.getFragmentShaderSource;fx.prototype.isTranslucent=po.prototype.isTranslucent;fx.prototype.getRenderState=po.prototype.getRenderState;var GZ=fx;function vu(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??vu.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??vu.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??vu.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??vu.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??vu.defaultSettings.minimumFrameRateAfterWarmup,this._lowFrameRate=new ge,this._nominalFrameRate=new ge,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(o,r){bwt(t,r)}),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(){Twt(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}vu.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};vu.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new vu({scene:e})),e._frameRateMonitor};Object.defineProperties(vu.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}}});vu.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};vu.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};vu.prototype.isDestroyed=function(){return!1};vu.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),ue(this)};function bwt(e,t){if(e._pauseCount>0)return;let n=Mi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/ii.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/ii.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/ii.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 o=(n-e._frameTimes[0])/(e._frameTimes.length-1);e._lastFramesPerSecond=1e3/o;let r=1e3/(n>e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);o>r?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 Twt(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var s3=vu;var Swt=1953029805,wwt=2917034100;function zZ(e,t){if(zZ.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new ce("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===Swt||o===wwt)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,h=8;for(;s<c;)for(h=(h+8)%24,f=h;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(h=(h+8)%24,f=h);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}zZ.passThroughDataForTesting=!1;var a3=zZ;var Mwt=br(VZ(),1);function Bwt(e,t){return(e&t)!==0}var nl=Bwt;var Dwt=[1,2,4,8],STe=15,vwt=16,Pwt=64,Rwt=128;function Wp(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Wp.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 Wp(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};Wp.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};Wp.prototype.hasSubtree=function(){return nl(this._bits,vwt)};Wp.prototype.hasImagery=function(){return nl(this._bits,Pwt)};Wp.prototype.hasTerrain=function(){return nl(this._bits,Rwt)};Wp.prototype.hasChildren=function(){return nl(this._bits,STe)};Wp.prototype.hasChild=function(e){return nl(this._bits,Dwt[e])};Wp.prototype.getChildBitmask=function(){return this._bits&STe};var c3=Wp;function Nwt(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var Lwt=Nwt(`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 Of(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(Of.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});Of.fromUrl=async function(e){let t=e;typeof t!="string"&&!(t instanceof we)&&(t=e.url);let n=we.createIfNeeded(t);n.appendForwardSlash();let i=new Of;i._resource=n;try{await Owt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${BTe(i,"",1).url}: ${o}`;throw new ce(r)}return i};Of.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;nl(t,r)?nl(e,r)&&(s|=1):(s|=2,nl(e,r)||(s|=1)),i+=s}return i};Of.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];nl(s,2)?nl(s,1)||(t|=r):(n|=r,nl(s,1)&&(t|=r))}return{x:t,y:n,level:i}};Of.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var wTe=new ui("decodeGoogleEarthEnterprisePacket");Of.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let o=BTe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return wTe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(u){let f,h=-1;if(e!==""){h=e.length+1;let m=u[e];f=r[e],f._bits|=m._bits,delete u[e]}let p=Object.keys(u);p.sort(function(m,_){return m.length-_.length});let g=p.length;for(let m=0;m<g;++m){let _=p[m];if(u[_]!==null){let C=c3.clone(u[_]),E=_.length;if(E===h)C.setParent(f);else if(E>1){let I=r[_.substring(0,_.length-1)];C.setParent(I)}r[_]=C}else r[_]=null}})})};Of.prototype.populateSubtree=function(e,t,n,i){let o=Of.tileXYToQuadKey(e,t,n);return jZ(this,o,i)};function jZ(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new ar({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),jZ(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new ce(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new ar({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),jZ(e,t,s)}).finally(function(){delete a[o]})}Of.prototype.getTileInformation=function(e,t,n){let i=Of.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};Of.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function BTe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var HZ,WZ;function Owt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(WZ)){let n=fn("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;WZ=UC(n).then(function(){HZ=window.cesiumGoogleEarthDbRootParser(Mwt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return WZ.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=HZ.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return wTe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=HZ.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 o=e.providers,r=i.providerInfo??[],s=r.length;for(let a=0;a<s;++a){let c=r[a],u=c.copyrightString;l(u)&&(o[c.providerId]=new Bt(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=Lwt})}var r_=Of;var DTe=br(VZ(),1);function YZ(){this._image=new Image}YZ.prototype.isReady=function(){return!0};YZ.prototype.shouldDiscardImage=function(e){return e===this._image};function dx(e){e=e??V.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 oo({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ae(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Bt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new YZ),this._errorEvent=new ge}Object.defineProperties(dx.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}}});dx.fromMetadata=function(e,t){if(!e.imageryPresent)throw new ce(`The server ${e.url} doesn't have imagery`);let n=new dx(t);return n._metadata=e,n};dx.prototype.getTileCredits=function(e,t,n){let i=this._metadata,o=i.getTileInformation(e,t,n);if(l(o)){let r=i.providers[o.imageryProvider];if(l(r))return[r]}};dx.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=r_.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let u=new ar({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction});r.populateSubtree(e,t,n,u);return}return Promise.resolve(o)}if(!a.hasImagery())return Promise.resolve(o);let c=Fwt(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(u){a3(r.key,u);let f=new Uint8Array(u),h,p=r.protoImagery;if((!l(p)||!p)&&(h=Qwt(f)),!l(h)&&(!l(p)||p)){let g=kwt(f);h=g.imageType,f=g.imageData}return!l(h)||!l(f)?o:VE({uint8Array:f,format:h,flipY:!0})})};dx.prototype.pickFeatures=function(e,t,n,i,o){};function Fwt(e,t,n,i,o,r){let s=r_.tileXYToQuadKey(n,i,o),a=t.imageryVersion;return a=l(a)&&a>0?a:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1-0${s}-i.${a.toString()}`,request:r})}function Qwt(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 kwt(e){let t=DTe.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 o=i.imageType;if(l(o))switch(o){case 0:i.imageType="image/jpeg";break;case 4:i.imageType="image/png";break;default:throw new ce("GoogleEarthEnterpriseImageryProvider: Unsupported image type.")}let r=i.alphaType;return l(r)&&r!==0&&(console.log("GoogleEarthEnterpriseImageryProvider: External alpha not supported."),delete i.alphaType,delete i.imageAlpha),i}var qZ=dx;var Uwt=new G(1,1,1,.4),Gwt=new G(0,1,0,.05),zwt=new G(0,.5,0,.2);function hx(e){e=e??V.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 oo({ellipsoid:e.ellipsoid}),this._cells=e.cells??8,this._color=e.color??Uwt,this._glowColor=e.glowColor??Gwt,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??zwt,this._errorEvent=new ge,this._tileWidth=e.tileWidth??256,this._tileHeight=e.tileHeight??256,this._canvasSize=e.canvasSize??256,this._canvas=this._createGridCanvas()}Object.defineProperties(hx.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}}});hx.prototype._drawGrid=function(e){let n=this._canvasSize;for(let i=0;i<=this._cells;++i){let r=1+i/this._cells*(n-1);e.moveTo(r,0),e.lineTo(r,n),e.moveTo(0,r),e.lineTo(n,r)}e.stroke()};hx.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"),o=this._backgroundColor.toCssColorString();i.fillStyle=o,i.fillRect(t,t,n,n);let r=this._glowColor.toCssColorString();i.strokeStyle=r,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};hx.prototype.getTileCredits=function(e,t,n){};hx.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};hx.prototype.pickFeatures=function(e,t,n,i,o){};var KZ=hx;function Sm(){}Sm._maxDecodingConcurrency=Math.max(jt.hardwareConcurrency-1,1);Sm._decodeTaskProcessor=new ui("decodeI3S",Sm._maxDecodingConcurrency);Sm._promise=void 0;async function Vwt(){if(await Sm._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return Sm._decodeTaskProcessor;throw new ce("I3S decoder could not be initialized.")}Sm.decode=async function(e,t,n,i,o){return l(Sm._promise)||(Sm._promise=Vwt()),Sm._promise.then(function(r){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 h=X.fromRotationX(-D.PI_OVER_TWO),p=new X;X.multiply(h,a,p);let g=me.fromDegrees(c,u,f),m=ne.WGS84.cartographicToCartesian(g),_={binaryData:n._data,featureData:l(i)&&l(i[0])?i[0].data:void 0,schema:t,bufferInfo:n._geometryBufferInfo,ellipsoidRadiiSquare:ne.WGS84.radiiSquared,url:e,geoidDataList:n._dataProvider._geoidDataList,cartographicCenter:g,cartesianCenter:m,parentRotation:p,enableFeatures:n._dataProvider.showFeatures,splitGeometryByColorTransparency:n._dataProvider.adjustMaterialAlphaMode,symbologyData:o,calculateNormals:n._dataProvider.calculateNormals};return r.scheduleTask(_)})};var l3=Sm;function XZ(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(XZ.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});XZ.prototype.load=async function(){return this._data=await wm.loadJson(this._resource),this._data};var u3=XZ;function s_(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(s_.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 jH(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 Hwt(e){return e==="String"?1:jH(e)}async function Wwt(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}s_.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=Wwt(this).catch(function(e){console.error(e)}),this._loadPromise)};s_.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 o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-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}};s_.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],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};s_.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].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,r.valueType,t);f.value.charCodeAt(0)!==0&&(c+=f.value),t=f.offset}this._values[o].push(c)}}}};s_.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=jH(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=jH(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};s_.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=Hwt(i.valueType)}if(e.byteLength<t)throw new ce(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};s_.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new ce(`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 o=this._storageInfo.ordering[i],r=o==="ObjectIds"?"objectIds":o,s=this._storageInfo[r];if(l(s))if(s.valueType!=="String"){r==="attributeByteCounts"&&(n=t);let a=jH(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new ce(`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 ce(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new ce(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var f3=s_;function jwt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var mx=jwt;function d3(e,t){let n=e._dataProvider,i=e._layer,o;l(e._nodeIndex)?o=i.resource.getDerivedResource({url:`nodes/${e._data.mesh.geometry.resource}/${t}`}):o=e.resource.getDerivedResource({url:t}),this._parent=e,this._dataProvider=n,this._layer=i,this._resource=o,this._customAttributes=void 0}Object.defineProperties(d3.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});d3.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var Ywt=new d,qwt=new d,Kwt=new d,Xwt=new d,Jwt=new d;function JZ(e,t,n,i){let o=d.subtract(i,n,Ywt),r=d.cross(o,d.subtract(e,n,qwt),Xwt),s=d.cross(o,d.subtract(t,n,Kwt),Jwt);return d.dot(r,s)>=0}var Zwt=new d,$wt=new d,eBt=new d,tBt=new d,nBt=new d,iBt=new d,oBt=new d,rBt=new d,sBt=new d,aBt=new d;d3.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new d(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,X.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,u=this._customAttributes.positions,f=this._customAttributes.indices,h;l(f)?h=f.length:h=u.length/3;for(let p=0;p<h;p++){let g,m,_;l(f)?(g=f[p],m=f[p+1],_=f[p+2]):(g=p*3,m=p*3+1,_=p*3+2);let y=d.fromElements(u[g*3],u[g*3+1],u[g*3+2],Zwt),C=d.fromElements(u[m*3],u[m*3+1],u[m*3+2],$wt),E=new d(u[_*3],u[_*3+1],u[_*3+2],eBt);if(!JZ(i,y,C,E)||!JZ(i,C,y,E)||!JZ(i,E,y,C))continue;let I=d.subtract(C,y,tBt),b=d.subtract(E,y,nBt),S=d.cross(I,b,iBt);if(d.magnitude(S)===0)continue;let B=d.normalize(S,oBt),v=d.subtract(i,y,rBt),P=Math.abs(d.dot(v,B));if(P<o){o=P,r=p;let N=d.magnitudeSquared(d.subtract(i,y,v)),L=d.magnitudeSquared(d.subtract(i,C,sBt)),A=d.magnitudeSquared(d.subtract(i,E,aBt));N<L&&N<A?(a=g,c=y,s=N):L<A?(a=m,c=C,s=L):(a=_,c=E,s=A)}}if(l(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:d.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function vTe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(mx(e[i])):t.push(e[i]);return t}d3.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},u=!1,f,h="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let I=this._parent._data.mesh.material.definition;if(I>=0&&I<this._layer._data.materialDefinitions.length){if(f=this._layer._data.materialDefinitions[I],c=f,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){u=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let b="0";if(l(this._layer._data.textureSetDefinitions))for(let S=0;S<this._layer._data.textureSetDefinitions.length;S++){let B=this._layer._data.textureSetDefinitions[S];for(let v=0;v<B.formats.length;v++){let P=B.formats[v];if(P.format==="jpg"){b=P.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(h=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${b}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=vTe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=vTe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(u=!0,h=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:h}],m=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let _=[],y=n.length;for(let E=0;E<y;E++){let I=n[E].primitives,b=I.length;for(let S=0;S<b;S++){let B=I[S];if(l(B.material)){for(;B.material>=_.length;){let P=je(c,!0);_.push(P)}let v=_[B.material];l(B.extra)&&B.extra.isTransparent?l(v.alphaMode)||(v.alphaMode="BLEND"):v.alphaMode==="BLEND"&&(v.alphaMode="OPAQUE")}}}return{scene:0,scenes:[{nodes:e}],nodes:t,meshes:n,buffers:i,bufferViews:o,accessors:r,materials:_,textures:p,images:g,samplers:m,asset:{version:"2.0"},extensions:s,extensionsUsed:a}};var Rw=d3;function il(e,t,n){let i,o,r,s;n?(i=0,o=e):(i=e._level+1,o=e._layer),typeof t=="number"?r=t:s=e.resource.getDerivedResource({url:`${t}/`}),this._parent=e,this._dataProvider=e._dataProvider,this._isRoot=n,this._level=i,this._layer=o,this._nodeIndex=r,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(il.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}}});il.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new bd(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await wm.loadJson(this._resource);e._data=o,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 PTe(e,t){let n=new f3(e,t);return e._fields[t.name]=n,n.load()}il.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],o=this._fields[i.name];l(o)?t.push(o.load()):t.push(PTe(this,i))}return Promise.all(t)};il.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 o=n[i];if(o.name===e)return PTe(this,o)}return Promise.resolve()};il.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)};il.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};il.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],o=new il(e,i.href??i,!1);e._children.push(o),t.push(o.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};il.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new Rw(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 Rw(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};il.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new u3(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};il.prototype._clearGeometryData=function(){this._geometryData=[]};il.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=me.fromDegrees(e.center[0],e.center[1],e.center[2]):n=me.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let C=0;C<this._dataProvider._geoidDataList.length;C++){let E=this._dataProvider._geoidDataList[C],I=E.projection.project(n);if(I.x>E.nativeExtent.west&&I.x<E.nativeExtent.east&&I.y>E.nativeExtent.south&&I.y<E.nativeExtent.north){n.height+=fBt(I.x,I.y,E);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=ne.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=ne.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let C=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/C}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let C=this._data.lodThreshold;s=r/C}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let C=0;C<this._data.lodSelection.length;C++)this._data.lodSelection[C].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[C].maxError);s===1/0&&(s=1e5);let a=s*16,c=new ic(0,0,0),u=Qt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(u=new Fe(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let f=X.fromQuaternion(u),h=X.inverse(f,new X),p=new M(f[0],f[1],f[2],0,f[3],f[4],f[5],0,f[6],f[7],f[8],0,o.x,o.y,o.z,1),g=M.inverse(p,new M),m=M.clone(p);l(this._parent._globalTransform)&&M.multiply(p,this._parent._inverseGlobalTransform,m),this._globalTransform=p,this._inverseGlobalTransform=g,this._inverseRotationMatrix=h;let _=[];for(let C=0;C<this._children.length;C++)_.push(this._children[C]._create3DTileDefinition());return{children:_,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}};il.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};il.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 o=this._geometryData[0].resource.url,r=this._layer._data.store.defaultGeometrySchema,s=this._geometryData[0],a=await l3.decode(o,r,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 cBt(e){let t=e._layer._filters,n=[];for(let i=0;i<t.length;i++){let o=e.loadField(t[i].name);n.push(o)}return await Promise.all(n),t}function lBt(e,t,n){if(!l(n.values)||n.values.length===0)return!1;let i=l(t)?t.values:[],o;e<i.length&&(o=i[e]);let r=!1;for(let s=0;s<n.values.length;s++)if(n.values[s]===o){r=!0;break}return r}async function RTe(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await cBt(e);if(i.length>0)for(let o=0;o<n.featuresLength;o++)for(let r=0;r<i.length;r++){let s=i[r];if(!lBt(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}il.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=RTe(this,t);e.push(n)}return Promise.all(e)};bd.prototype._hookedRequestContent=bd.prototype.requestContent;bd.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 we({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(()=>{RTe(e._i3sNode,n)})),e._isLoading=!1,t})}};function uBt(e,t,n,i,o,r){let s=n*(1-e)+i*e,a=o*(1-e)+r*e;return s*(1-t)+a*t}function YH(e,t,n,i){let o=e+t*n;return i[o]}function fBt(e,t,n){let i=n.nativeExtent,o=(e-i.west)/(i.east-i.west)*(n.width-1),r=(t-i.south)/(i.north-i.south)*(n.height-1),s=Math.floor(o),a=Math.floor(r);o-=s,r-=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=YH(s,a,n.width,n.buffer),h=YH(c,a,n.width,n.buffer),p=YH(s,u,n.width,n.buffer),g=YH(c,u,n.width,n.buffer),m=uBt(o,r,f,h,p,g);return m=m*n.scale+n.offset,m}Object.defineProperties(bd.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var Mw=il;function qH(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(qH.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function ZZ(e,t){let n=[];for(let i=0;i<e.length;i++){let o=G.byteToFloat(e[i]);i<3?n.push(mx(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function Nw(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 o=e.symbolLayers[i];if(o.type==="Fill"){let r=o.edges,s=o.outline;if(l(r)?(n.edges={},l(r.color)&&(n.edges.color=ZZ(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=ZZ(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=ZZ(a.color,a.transparency)))}break}}return n}function dBt(e,t){if(l(e.uniqueValueGroups)){let n={};for(let i=0;i<e.uniqueValueGroups.length;i++){let o=e.uniqueValueGroups[i].classes;if(l(o))for(let r=0;r<o.length;r++){let s=Nw(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let u=a[c],f=n;for(let h=0;h<u.length;h++){let p=u[h];h===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 o=e.uniqueValueInfos[i];n[o.value]=Nw(o.symbol,t)}return n}}function hBt(e,t){if(l(e.classBreakInfos)){let n=[...e.classBreakInfos];n.sort(function(o,r){let s=o.classMaxValue??o.classMinValue,a=r.classMaxValue??r.classMinValue;return s-a});let i={ranges:[],symbols:[]};l(e.minValue)&&(i.ranges.push(e.minValue),i.symbols.push(void 0));for(let o=0;o<n.length;o++){let r=n[o];l(r.classMinValue)&&(i.ranges.length===0||r.classMinValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMinValue),i.symbols.push(void 0)),l(r.classMaxValue)&&(i.ranges.length===0||r.classMaxValue>i.ranges[i.ranges.length-1])&&(i.ranges.push(r.classMaxValue),i.symbols.push(Nw(r.symbol,t)))}return i.symbols.push(void 0),i}}qH.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=Nw(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=Nw(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=dBt(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=Nw(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=hBt(i,n))}};function MTe(e,t,n,i){let o=t[n];if(i<o.length){let r=o[i],s=e[r];return l(s)&&++n<t.length?MTe(s,t,n,i):s}}function mBt(e,t){let n=0,i=e.length;if(n<i)do{let o=n+i>>>1;e[o]<t?n=o+1:i=o}while(n<i);return n}function pBt(e,t,n){let i=t[n],o=mBt(e.ranges,i);return e.symbols[o]}qH.prototype._getSymbology=async function(e){let t={default:this._defaultSymbology};if(this._valueFields.length>0){let n=[];for(let r=0;r<this._valueFields.length;r++)n.push(e.loadField(this._valueFields[r]));await Promise.all(n);let i=[];for(let r=0;r<this._valueFields.length;r++)i.push(e.fields[this._valueFields[r]].values);let o;if(l(this._uniqueValueHash)?o=r=>MTe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>pBt(this._classBreaksHash,i[0],r)),l(o)){let r=i[0];for(let s=0;s<r.length;s++){let a=o(s);l(a)&&(t[s]=a)}}}return t};var h3=qH;function Pu(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(),o="";i.match(/layers\/\d/)?o=`${i}`.replace(/\/+$/,""):o=`${i}`.replace(/\/?$/,"/").concat(`${t.href}`),this._version=t.store.version;let r=this._version.split(".");this._majorVersion=parseInt(r[0]),this._minorVersion=r.length>1?parseInt(r[1]):0,this._resource=new we({url:o}),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(Pu.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}}});Pu.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new ce(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new h3(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()};Pu.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 o=0;o<i.length;o++){let r=i[o],s=[],a=!1;if(l(r.compressedAttributes)&&e){a=!0;let c=r.compressedAttributes.attributes;for(let u=0;u<c.length;u++)s.push(c[u])}else for(let c in r)c!=="offset"&&s.push(c);n.push({compressed:a,attributes:s,index:i.indexOf(r)})}n.sort(function(o,r){return o.compressed&&!r.compressed?-1:!o.compressed&&r.compressed?1:o.attributes.length-r.attributes.length}),this._geometryDefinitions.push(n)}};Pu.prototype._findBestGeometryBuffers=function(e,t){let n=this._geometryDefinitions[e];if(l(n)){for(let i=0;i<n.length;++i){let o=n[i],r=!1,s=o.attributes;for(let a=0;a<t.length;a++)if(!s.includes(t[a])){r=!0;break}if(!r)return{bufferIndex:o.index,definition:n,geometryBufferInfo:o}}if(l(n[0]))return{bufferIndex:0,definition:n,geometryBufferInfo:n[0]}}};Pu.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 Mw(this,t,!0)}else this._rootNode=new Mw(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};Pu.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]})};Pu._fetchJson=function(e){return e.fetchJson()};Pu.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=Pu._fetchJson(n).then(function(o){return l(o.error)&&o.error.code!==200?Promise.reject(o.error):(t._nodePages[e]=o.nodes,o)});this._nodePageFetches[e]=i}return this._nodePageFetches[e]};Pu.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ae.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ae.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};Pu.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),o=this._symbology?.defaultSymbology?.edges?.color;l(o)&&!l(e?.outlineColor)&&(e=l(e)?je(e):{},e.outlineColor=G.fromCartesian4(se.fromArray(o))),this._tileset=await Ms.fromUrl(i,e),this._tileset.show=this._parent.show,this._tileset._isI3STileSet=!0,this._tileset.tileUnload.addEventListener(function(r){r._i3sNode._clearGeometryData(),URL.revokeObjectURL(r._contentResource._url),r._contentResource=r._i3sNode.resource}),this._tileset.tileVisible.addEventListener(function(r){l(r._i3sNode)&&r._i3sNode._loadChildren()})};Pu.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};Pu.prototype.filterByAttributes=function(e){this._filters=l(e)?je(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var px=Pu;function KH(e,t){this._dataProvider=e,this._resource=new we({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(KH.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}}});KH.prototype.load=async function(){return this._data=await wm.loadJson(this._resource),this._data};KH.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 m3=KH;function p3(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(p3.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}}});p3._fromData=async function(e,t,n,i){let o=new p3(e,i,n);if(o._data.layerType==="group"){let r=o._data.sublayers;if(l(r)){let s=[];for(let c=0;c<r.length;c++){let u=p3._fromData(e,t,r[c],o);s.push(u)}let a=await Promise.all(s);for(let c=0;c<a.length;c++){let u=a[c];o._sublayers.push(u),o._i3sLayers.push(...u._i3sLayers)}}}else if(o._data.layerType==="3DObject"){let r=t.concat(`/sublayers/${o._data.id}`),s=new we({url:r});s.setQueryParameters(e.resource.queryParameters),s.appendForwardSlash(),o._resource=s;let a=await wm.loadJson(o._resource),c=new px(e,a,o);o._i3sLayers.push(c)}else console.log(`${o._data.layerType} layer ${o._data.name} is skipped as not supported.`);return o};var A3=p3;var OTe=br(NTe(),1);function Fs(e){e=e??V.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??V.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(Fs.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}}});Fs.prototype.destroy=function(){for(let e=0;e<this._layers.length;e++)l(this._layers[e]._tileset)&&this._layers[e]._tileset.destroy();return ue(this)};Fs.prototype.isDestroyed=function(){return!1};Fs.prototype.update=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.update(e)};Fs.prototype.prePassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.prePassesUpdate(e)};Fs.prototype.postPassesUpdate=function(e){for(let t=0;t<this._layers.length;t++)l(this._layers[t]._tileset)&&this._layers[t]._tileset.postPassesUpdate(e)};Fs.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 ABt(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 LTe(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=ABt(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=A3._fromData(e,i,t.sublayers[s],e);o.push(a)}let r=await Promise.all(o);for(let s=0;s<r.length;s++){let a=r[s];e._sublayers.push(a),e._layers.push(...a._i3sLayers)}}if(l(t.statisticsHRef)){let o=i.concat(`/${t.statisticsHRef}`),r=new m3(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=ae.fromDegrees(t.fullExtent.xmin,t.fullExtent.ymin,t.fullExtent.xmax,t.fullExtent.ymax);e._layersExtent.push(o)}}else if(t.layerType==="3DObject"||t.layerType==="IntegratedMesh"){!l(n.calculateNormals)&&!l(t.textureSetDefinitions)&&(e._calculateNormals=!0);let i=new px(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.`)}Fs.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT;let n=we.createIfNeeded(e);n.setQueryParameters({f:"pjson"},!0);let i=await Fs.loadJson(n),o=new Fs(t);if(o._resource=n,o._data=i,l(i.layers)){let s=[];for(let a=0;a<i.layers.length;a++){let c=LTe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await LTe(o,i,t);o._computeExtent();let r=[];for(let s=0;s<o._layers.length;s++)r.push(o._layers[s].load(t.cesium3dTilesetOptions));return await Promise.all(r),o};Fs._fetchJson=function(e){return e.fetchJson()};Fs.loadJson=async function(e){let t=await Fs._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 ce(t.error)}return t};Fs.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 ce(`Failed to load binary: ${e.url}`);return t};Fs.prototype._binarizeGltf=function(e){let n=new TextEncoder().encode(JSON.stringify(e)),i=new Uint8Array(n.byteLength+20),o={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 o.magic[0]=103,o.magic[1]=108,o.magic[2]=84,o.magic[3]=70,o.version[0]=2,o.length[0]=i.byteLength,o.chunkLength[0]=n.byteLength,o.chunkType[0]=1313821514,o.chunkData.set(n),i};var gBt=new U;function _Bt(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=me.fromRadians(t.west,t.north),a=me.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),u=n.positionToTileXY(a,r);for(let h=c.x;h<=u.x;h++)for(let p=c.y;p<=u.y;p++){let g=U.fromElements(h,p,gBt),m=g.toString();if(!o.hasOwnProperty(m)){let _={x:g.x,y:g.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[m]=_,i.push(_)}}let f=[];for(let h=0;h<i.length;++h){let p=i[h],g=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);f.push(g)}return Promise.all(f).then(function(h){let p=[];for(let g=0;g<h.length;g++){let m={tilingScheme:n,x:i[g].x,y:i[g].y,level:i[g].level},_=h[g],y="Geographic";n._projection instanceof Ui&&(y="WebMercator");let C={projectionType:y,projection:n._projection,nativeExtent:n.tileXYToNativeRectangle(m.x,m.y,m.level),height:_._height,width:_._width,scale:_._structure.heightScale,offset:_._structure.heightOffset};if(_._encoding===kd.LERC){let E=OTe.default.decode(_._buffer);C.buffer=E.pixels[0]}else C.buffer=_._buffer;p.push(C)}return p})}async function yBt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await _Bt(t,e._extent);e._geoidDataList=n}catch{console.log("Error retrieving Geoid Terrain tiles - no geoid conversion will be performed.")}}Fs.prototype.loadGeoidData=async function(){return l(this._geoidDataPromise)?this._geoidDataPromise:(this._geoidDataPromise=yBt(this),this._geoidDataPromise)};Fs.prototype._computeExtent=function(){let e;for(let t=0;t<this._layersExtent.length;t++){let n=this._layersExtent[t];l(e)?ae.union(e,n,e):e=ae.clone(n)}this._extent=e};Fs.prototype.getAttributeNames=function(){let e=[];for(let t=0;t<this._attributeStatistics.length;++t)e.push(...this._attributeStatistics[t].names);return e};Fs.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[]};Fs.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 wm=Fs;var Qs={};Qs.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});Qs.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});Qs.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});Qs.defaultAccessToken=void 0;Qs.defaultShareKey=void 0;Qs._getAuthorizationHeader=function(){return l(Qs.defaultShareKey)?`Basic ${Qs.defaultShareKey}`:`Bearer ${Qs.defaultAccessToken}`};Qs.apiEndpoint=new we({url:"https://api.bentley.com"});Qs.getExports=async function(e){let t=new we({url:`${Qs.apiEndpoint}mesh-export`,headers:{Authorization:Qs._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:Qs.ExportType["3DTILES"],$top:"5",client:"CesiumJS"}});typeof CESIUM_VERSION<"u"&&t.appendQueryParameters({clientVersion:CESIUM_VERSION});try{return await t.fetchJson()}catch(n){let i=JSON.parse(n.response);if(n.statusCode===401){let o=i.error.details?.[0].code??"";throw new ce(`Unauthorized, bad token, wrong scopes or headers bad. ${o}`)}else{if(n.statusCode===403)throw console.error(i.error.code,i.error.message),new ce("Not allowed, forbidden");if(n.statusCode===422)throw new ce(`Unprocessable Entity:${i.error.code} ${i.error.message}`);if(n.statusCode===429)throw new ce("Too many requests")}throw new ce(`Unknown request failure ${n.statusCode}`)}};Qs.getRealityDataMetadata=async function(e,t){let n=new we({url:`${Qs.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:Qs._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{return(await n.fetchJson()).realityData}catch(i){let o=JSON.parse(i.response);if(i.statusCode===401){let r=o.error.details?.[0].code??"";throw new ce(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new ce("Not allowed, forbidden");if(i.statusCode===404)throw new ce(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new ce(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new ce("Too many requests")}throw new ce(`Unknown request failure ${i.statusCode}`)}};Qs.getRealityDataURL=async function(e,t,n){let i=new we({url:`${Qs.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:Qs._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{iTwinId:e}});try{let r=(await i.fetchJson())._links.containerUrl.href,s=new URL(r);return s.pathname=`${s.pathname}/${n}`,s.toString()}catch(o){let r=JSON.parse(o.response);if(o.statusCode===401){let s=r.error.details?.[0].code??"";throw new ce(`Unauthorized, bad token, wrong scopes or headers bad. ${s}`)}else{if(o.statusCode===403)throw console.error(r.error.code,r.error.message),new ce("Not allowed, forbidden");if(o.statusCode===404)throw new ce(`Reality data not found: ${e}, ${t}`);if(o.statusCode===422)throw new ce(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(o.statusCode===429)throw new ce("Too many requests")}throw new ce(`Unknown request failure ${o.statusCode}`)}};var na=Qs;var g3={};g3.createTilesetFromIModelId=async function(e,t){let{exports:n}=await na.getExports(e);if(n.length>0&&n.every(a=>a.status===na.ExportStatus.Invalid))throw new ce(`All exports for this iModel are Invalid: ${e}`);let i=n.find(a=>a.status===na.ExportStatus.Complete);if(!l(i))return;let o=new URL(i._links.mesh.href);o.pathname=`${o.pathname}/tileset.json`;let r=o.toString(),s=new we({url:r});return Ms.fromUrl(s,t)};g3.createTilesetForRealityDataId=async function(e,t,n,i){if(!l(n)||!l(i)){let s=await na.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![na.RealityDataType.Cesium3DTiles,na.RealityDataType.PNTS,na.RealityDataType.RealityMesh3DTiles,na.RealityDataType.Terrain3DTiles].includes(n))throw new ce(`Reality data type is not a mesh type: ${n}`);let r=await na.getRealityDataURL(e,t,i);return Ms.fromUrl(r,{maximumScreenSpaceError:4})};g3.createDataSourceForRealityDataId=async function(e,t,n,i){if(!l(n)||!l(i)){let s=await na.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![na.RealityDataType.KML,na.RealityDataType.GeoJSON].includes(n))throw new ce(`Reality data type is not a data source type: ${n}`);let r=await na.getRealityDataURL(e,t,i);return n===na.RealityDataType.GeoJSON?Wy.load(r):II.load(r)};g3.loadGeospatialFeatures=async function(e,t,n){let i=n??1e4,o=`${na.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,r=new we({url:o,headers:{Authorization:na._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return Wy.load(r)};var $Z=g3;function FTe(){}Object.defineProperties(FTe.prototype,{color:{get:he.throwInstantiationError},intensity:{get:he.throwInstantiationError}});var e$=FTe;var CBt=/\/$/,QTe=new Bt('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function Lw(e){e=e??V.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=we.createIfNeeded(e.url??"https://api.mapbox.com/styles/v1/");this._styleId=t,this._accessToken=n;let o=e.tilesize??512;this._tilesize=o;let r=e.username??"mapbox";this._username=r;let s=l(e.scaleFactor)?"@2x":"",a=i.getUrlComponent();CBt.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 Bt(c))):c=QTe,this._resource=i,this._imageryProvider=new mc({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(Lw.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}}});Lw.prototype.getTileCredits=function(e,t,n){};Lw.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Lw.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Lw._defaultCredit=QTe;var t$=Lw;function n$(e){}n$.prototype.isReady=function(){return!0};n$.prototype.shouldDiscardImage=function(e){return!1};var i$=n$;var EBt=new Bt("MapQuest, Open Street Map and contributors, CC-BY-SA");function JH(e){e=e??V.EMPTY_OBJECT;let t=we.createIfNeeded(e.url??"https://tile.openstreetmap.org/");t.appendForwardSlash(),t.url+=`{z}/{x}/{y}${e.retinaTiles?"@2x":""}.${e.fileExtension??"png"}`;let n=new Cs({ellipsoid:e.ellipsoid}),i=256,o=256,r=e.minimumLevel??0,s=e.maximumLevel,a=e.rectangle??n.rectangle,c=n.positionToTileXY(ae.southwest(a),r),u=n.positionToTileXY(ae.northeast(a),r),f=(Math.abs(u.x-c.x)+1)*(Math.abs(u.y-c.y)+1),h=e.credit??EBt;typeof h=="string"&&(h=new Bt(h)),mc.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(JH.prototype=Object.create(mc.prototype),JH.prototype.constructor=JH);var a_=JH;var IBt=new U(1,1);function o$(e){e=e??V.EMPTY_OBJECT,this.mass=e.mass??1,this.position=d.clone(e.position??d.ZERO),this.velocity=d.clone(e.velocity??d.ZERO),this.life=e.life??Number.MAX_VALUE,this.image=e.image,this.startColor=G.clone(e.startColor??G.WHITE),this.endColor=G.clone(e.endColor??G.WHITE),this.startScale=e.startScale??1,this.endScale=e.endScale??1,this.imageSize=U.clone(e.imageSize??IBt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(o$.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var kTe=new d;o$.prototype.update=function(e,t){return d.multiplyByScalar(this.velocity,e,kTe),d.add(this.position,kTe,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 Ow=o$;function UTe(e){e=e??V.EMPTY_OBJECT,this.time=e.time??0,this.minimum=e.minimum??0,this.maximum=e.maximum??50,this._complete=!1}Object.defineProperties(UTe.prototype,{complete:{get:function(){return this._complete}}});var r$=UTe;function GTe(e){}GTe.prototype.emit=function(e){he.throwInstantiationError()};var s$=GTe;var zTe=new U(1,1);function _3(e){e=e??V.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 t3(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=M.clone(e.modelMatrix??M.IDENTITY),this._emitterModelMatrix=M.clone(e.emitterModelMatrix??M.IDENTITY),this._matrixDirty=!0,this._combinedMatrix=new M,this._startColor=G.clone(e.color??e.startColor??G.WHITE),this._endColor=G.clone(e.color??e.endColor??G.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??zTe),this._maximumImageSize=U.clone(e.imageSize??e.maximumImageSize??zTe),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 ge,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}Object.defineProperties(_3.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||!M.equals(this._modelMatrix,e),M.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){this._matrixDirty=this._matrixDirty||!M.equals(this._emitterModelMatrix,e),M.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){G.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){G.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 xBt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let h=o.length;for(let p=0;p<h;++p)i+=o[p].maximum}let r=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 h=0;h<f;++h){let p=new Ow;p._billboard=r.add({image:s,show:!1}),u.push(p)}e._particleEstimate=a}function bBt(e){let t=e._particlePool.pop();return l(t)||(t=new Ow),t}function TBt(e,t){e._particlePool.push(t)}function SBt(e){let t=e._particles,n=e._particlePool,i=e._billboardCollection,o=t.length,r=n.length,s=e._particleEstimate,a=r-Math.max(s-o-r,0);for(let c=a;c<r;++c){let u=n[c];i.remove(u._billboard)}n.length=a}function wBt(e){l(e._billboard)&&(e._billboard.show=!1)}function VTe(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),o=D.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=D.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),s=D.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);n.color=new G(i,o,r,s),n.scale=D.lerp(t.startScale,t.endScale,t.normalizedAge)}function BBt(e,t){t.startColor=G.clone(e._startColor,t.startColor),t.endColor=G.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);d.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function DBt(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 o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=D.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var ZH=new d;_3.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new of),this._updateParticlePool&&(xBt(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,o=this.updateCallback,r,s,a=n.length;for(r=0;r<a;++r)s=n[r],s.update(t,o)?VTe(this,s):(wBt(s),TBt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=DBt(this,t);if(c>0&&l(i)){this._matrixDirty&&(this._combinedMatrix=M.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);let u=this._combinedMatrix;for(r=0;r<c;r++)s=bBt(this),this._emitter.emit(s),d.add(s.position,s.velocity,ZH),M.multiplyByPoint(u,ZH,ZH),s.position=M.multiplyByPoint(u,s.position,s.position),d.subtract(ZH,s.position,s.velocity),d.normalize(s.velocity,s.velocity),BBt(this,s),VTe(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(r=0;r<u;r++)this.bursts[r]._complete=!1}}else this._isComplete=!0,this._complete.raiseEvent(this);e.frameNumber%120===0&&SBt(this)};_3.prototype.isDestroyed=function(){return!1};_3.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),ue(this)};var a$=_3;function Ff(){he.throwInstantiationError()}Ff.computeDefaultLevelZeroMaximumGeometricError=function(e){return e.ellipsoid.maximumRadius*2*Math.PI*.25/(65*e.getNumberOfXTilesAtLevel(0))};Object.defineProperties(Ff.prototype,{quadtree:{get:he.throwInstantiationError,set:he.throwInstantiationError},tilingScheme:{get:he.throwInstantiationError},errorEvent:{get:he.throwInstantiationError}});Ff.prototype.update=he.throwInstantiationError;Ff.prototype.beginUpdate=he.throwInstantiationError;Ff.prototype.endUpdate=he.throwInstantiationError;Ff.prototype.getLevelMaximumGeometricError=he.throwInstantiationError;Ff.prototype.loadTile=he.throwInstantiationError;Ff.prototype.computeTileVisibility=he.throwInstantiationError;Ff.prototype.showTileThisFrame=he.throwInstantiationError;Ff.prototype.computeDistanceToTile=he.throwInstantiationError;Ff.prototype.isDestroyed=he.throwInstantiationError;Ff.prototype.destroy=he.throwInstantiationError;var c$=Ff;function l$(e){e=e??1,this._radius=e??1}Object.defineProperties(l$.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});l$.prototype.emit=function(e){let t=D.randomBetween(0,D.TWO_PI),n=D.randomBetween(0,D.PI),i=D.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=d.fromElements(o,r,s,e.position),e.velocity=d.normalize(e.position,e.velocity)};var u$=l$;function y3(){}y3.prototype.evaluate=function(e,t){he.throwInstantiationError()};y3.prototype.evaluateColor=function(e,t){he.throwInstantiationError()};y3.prototype.getShaderFunction=function(e,t,n,i){he.throwInstantiationError()};y3.prototype.getVariables=function(){he.throwInstantiationError()};var f$=y3;var $H={};$H.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let u=s+a+c,f,h,p,g,m,_;return u===1?s?(f=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),h!==1&&(r.push(-1),r.push(0),r.push(2),r.push(h)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(p=(e-i)/(o-i),g=(e-i)/(n-i),r.push(2),r.push(0),g!==1&&(r.push(-1),r.push(1),r.push(0),r.push(g)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),_=(e-o)/(i-o),r.push(0),r.push(1),_!==1&&(r.push(-1),r.push(2),r.push(1),r.push(_)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!s&&n!==e?(g=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(g),r.push(-1),r.push(2),r.push(0),r.push(m)):!a&&i!==e?(_=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(_),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(h=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};$H.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let u=n-s,f=s-o,h=r-a,p=i-a,g=1/(h*u+f*p),m=t-a,_=e-s,y=(h*_+f*m)*g,C=(-p*_+u*m)*g,E=1-y-C;return l(c)?(c.x=y,c.y=C,c.z=E,c):new d(y,C,E)};$H.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),h=(a-r)*(n-e)-(s-o)*(i-t);if(h===0)return;let p=u/h,g=f/h;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 c_=$H;function EC(e){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 o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=t5(e.westIndices,o,t),this._southIndices=t5(e.southIndices,r,t),this._eastIndices=t5(e.eastIndices,o,t),this._northIndices=t5(e.northIndices,r,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(EC.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 e5=[];function t5(e,t,n){e5.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)e5[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(e5.sort(t),Qe.createTypedArray(n,e5)):e}var HTe="createVerticesFromQuantizedTerrainMesh",vBt=new ui(HTe),PBt=new ui(HTe,Am.maximumAsynchronousTasks);EC.prototype.createMesh=function(e){e=e??V.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),h=(a?PBt:vBt).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:r,exaggerationRelativeHeight:s});if(!l(h))return;let p=this;return Promise.resolve(h).then(function(g){let m=p._quantizedVertices.length/3,_=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,y=Qe.createTypedArray(_,g.indices),C=new Float32Array(g.vertices),E=g.center,I=g.minimumHeight,b=g.maximumHeight,S=p._boundingSphere,B=p._orientedBoundingBox,v=d.clone(g.occludeePointInScaledSpace)??p._horizonOcclusionPoint,P=g.vertexStride,N=Jc.clone(g.encoding);return p._mesh=new Gd(E,C,y,g.indexCountWithoutSkirts,m,I,b,S,v,P,B,N,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 RBt=new ui("upsampleQuantizedTerrainMesh",Am.maximumAsynchronousTasks);EC.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=RBt.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:h,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,_=u?g*.5:this._southSkirtHeight,y=c?this._eastSkirtHeight:g*.5,C=u?this._northSkirtHeight:g*.5,E=this._credits;return Promise.resolve(p).then(function(I){let b=new Uint16Array(I.vertices),S=Qe.createTypedArray(b.length/3,I.indices),B;return l(I.encodedNormals)&&(B=new Uint8Array(I.encodedNormals)),new EC({quantizedVertices:b,indices:S,encodedNormals:B,minimumHeight:I.minimumHeight,maximumHeight:I.maximumHeight,boundingSphere:le.clone(I.boundingSphere),orientedBoundingBox:Qn.clone(I.orientedBoundingBox),horizonOcclusionPoint:d.clone(I.horizonOcclusionPoint),westIndices:I.westIndices,southIndices:I.southIndices,eastIndices:I.eastIndices,northIndices:I.northIndices,westSkirtHeight:m,southSkirtHeight:_,eastSkirtHeight:y,northSkirtHeight:C,childTileMask:0,credits:E,createdByUpsampling:!0})})};var d$=32767,WTe=new d;EC.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1);i*=d$;let o=D.clamp((n-e.south)/e.height,0,1);return o*=d$,l(this._mesh)?OBt(this,i,o):FBt(this,i,o)};function jTe(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),h=Math.max(i,r,a);return e>=c&&e<=u&&t>=f&&t<=h}var MBt=new U,NBt=new U,LBt=new U;function OBt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,u,MBt),g=r.decodeTextureCoordinates(o,f,NBt),m=r.decodeTextureCoordinates(o,h,LBt);if(jTe(t,n,p.x,p.y,g.x,g.y,m.x,m.y)){let _=c_.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,WTe);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){let y=r.decodeHeight(o,u),C=r.decodeHeight(o,f),E=r.decodeHeight(o,h);return _.x*y+_.y*C+_.z*E}}}}function FBt(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],h=s[a+2],p=i[u],g=i[f],m=i[h],_=o[u],y=o[f],C=o[h];if(jTe(t,n,p,_,g,y,m,C)){let E=c_.computeBarycentricCoordinates(t,n,p,_,g,y,m,C,WTe);if(E.x>=-1e-15&&E.y>=-1e-15&&E.z>=-1e-15){let I=E.x*r[u]+E.y*r[f]+E.z*r[h];return D.lerp(e._minimumHeight,e._maximumHeight,I/d$)}}}}EC.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};EC.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var Ax=EC;function kw(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var gx=new ae;function QBt(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}kw.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let g=t;g<=i;++g)QBt(e,g,p,s)||s.push(new Fw(r,void 0,0,g,p));r.tileXYToRectangle(t,n,e,gx);let a=gx.west,c=gx.north;r.tileXYToRectangle(i,o,e,gx);let u=gx.east,f=gx.south,h=new VBt(e,a,f,u,c);for(let p=0;p<s.length;++p){let g=s[p];h$(g.extent,h)&&HBt(this._maximumLevel,g,h)}};kw.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(Qw(i.extent,e)){t=i;break}}return l(t)?C3(void 0,t,e):-1};var kBt=[],UBt=[],GBt=new ae,zBt=new ae;kw.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=kBt;t.length=0,e.east<e.west?(t.push(ae.fromRadians(-Math.PI,e.south,e.east,e.north,GBt)),t.push(ae.fromRadians(e.west,e.south,Math.PI,e.north,zBt))):t.push(e);let n=UBt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)E3(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 YTe=new me;kw.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,gx);return ae.center(i,YTe),this.computeMaximumLevelAtPosition(YTe)>=e};kw.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function Fw(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(Fw.prototype,{nw:{get:function(){return this._nw||(this._nw=new Fw(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new Fw(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new Fw(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new Fw(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function VBt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function h$(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function HBt(e,t,n){for(;t.level<e;)if(n5(t.nw.extent,n))t=t.nw;else if(n5(t.ne.extent,n))t=t.ne;else if(n5(t.sw.extent,n))t=t.sw;else if(n5(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=jo(t.rectangles,n.level,WBt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function WBt(e,t){return e.level-t}function n5(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function Qw(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function C3(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&Qw(t._nw.extent,n),s=t._ne&&Qw(t._ne.extent,n),a=t._sw&&Qw(t._sw.extent,n),c=t._se&&Qw(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,C3(t,t._nw,n))),s&&(i=Math.max(i,C3(t,t._ne,n))),a&&(i=Math.max(i,C3(t,t._sw,n))),c&&(i=Math.max(i,C3(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];Qw(a,n)&&(i=a.level)}t=t.parent}return i}function E3(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||h$(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=jBt(e[s.level],s)}E3(e,t._nw,n),E3(e,t._ne,n),E3(e,t._sw,n),E3(e,t._se,n)}function jBt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];h$(o,t)?(o.west<t.west&&n.push(new ae(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new ae(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new ae(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new ae(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Bm=kw;function YBt(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 KTe(e){this.requestVertexNormals=e.requestVertexNormals??!1,this.requestWaterMask=e.requestWaterMask??!1,this.requestMetadata=e.requestMetadata??!0,this.ellipsoid=e.ellipsoid??ne.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=[]}KTe.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 XTe(e,t,n){if(!t.format){let _="The tile format is not specified in the layer.json file.";throw e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,_),new ce(_)}if(!t.tiles||t.tiles.length===0){let _="The layer.json file does not specify any tile URL templates.";throw e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,_),new ce(_)}let i=!1,o=!1,r=!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}),o=!0,e.requestWaterMask=!0;else if(t.format.indexOf("quantized-mesh-1.")!==0){let _=`The tile format "${t.format}" is invalid or not supported.`;throw e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,_),new ce(_)}let c=t.tiles,u=t.maxzoom;if(e.overallMaxZoom=Math.max(e.overallMaxZoom,u),!t.projection||t.projection==="EPSG:4326")e.tilingScheme=new oo({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else if(t.projection==="EPSG:3857")e.tilingScheme=new Cs({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let _=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,_),new ce(_)}if(e.levelZeroMaximumGeometricError=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.tilingScheme.ellipsoid,e.heightmapWidth,e.tilingScheme.getNumberOfXTilesAtLevel(0)),!t.scheme||t.scheme==="tms"||t.scheme==="slippyMap")e.scheme=t.scheme;else{let _=`The scheme "${t.scheme}" is invalid or not supported.`;throw e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,_),new ce(_)}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&&(o=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let h=t.metadataAvailability,p=t.available,g;if(l(p)&&!l(h)){g=new Bm(e.tilingScheme,p.length);for(let _=0;_<p.length;++_){let y=p[_],C=e.tilingScheme.getNumberOfYTilesAtLevel(_);l(e.overallAvailability[_])||(e.overallAvailability[_]=[]);for(let E=0;E<y.length;++E){let I=y[E],b=C-I.endY-1,S=C-I.startY-1;e.overallAvailability[_].push([I.startX,b,I.endX,S]),g.addAvailableTileRange(_,I.startX,b,I.endX,S)}}}else l(h)&&(f=new Bm(e.tilingScheme,u),g=new Bm(e.tilingScheme,u),e.overallAvailability[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new YBt({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:g,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,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 A$(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function qBt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=` ${t.message}`),e.previousError=Qo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return A$(e,n);throw new ce(i)}async function KBt(e,t,n){await XTe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Bm(e.tilingScheme,e.overallMaxZoom);for(let r=0;r<i;++r){let s=e.overallAvailability[r];for(let a=0;a<s.length;++a){let c=s[a];o.addAvailableTileRange(r,c[0],c[1],c[2],c[3])}}}if(e.attribution.length>0){let o=new Bt(e.attribution);e.tileCredits.push(o)}return!0}async function A$(e,t){try{let n=await e.layerJsonResource.fetchJson();return KBt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await XTe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):qBt(e,n,t)}}function Dm(e){e=e??V.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 ge;let t=e.credit;typeof t=="string"&&(t=new Bt(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 m$={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function qTe(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 XBt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new yc({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function JBt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,h=Float64Array.BYTES_PER_ELEMENT*u,g=Uint16Array.BYTES_PER_ELEMENT*3,m=3,_=Uint16Array.BYTES_PER_ELEMENT,y=_*m,C=new DataView(t),E=new d(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=f;let I=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let b=C.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let S=new le(new d(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0)),C.getFloat64(a+f,!0));a+=h;let B=new d(C.getFloat64(a,!0),C.getFloat64(a+8,!0),C.getFloat64(a+16,!0));a+=f;let v=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let P=new Uint16Array(t,a,v*3);a+=v*g,v>64*1024&&(_=Uint32Array.BYTES_PER_ELEMENT,y=_*m);let N=P.subarray(0,v),L=P.subarray(v,2*v),A=P.subarray(v*2,3*v);Fn.zigZagDeltaDecode(N,L,A),a%_!==0&&(a+=_-a%_);let x=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let T=Qe.createTypedArrayFromArrayBuffer(v,t,a,x*m);a+=x*y;let w=0,R=T.length;for(let fe=0;fe<R;++fe){let ye=T[fe];T[fe]=w-ye,ye===0&&++w}let O=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let k=Qe.createTypedArrayFromArrayBuffer(v,t,a,O);a+=O*_;let F=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let z=Qe.createTypedArrayFromArrayBuffer(v,t,a,F);a+=F*_;let Q=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Qe.createTypedArrayFromArrayBuffer(v,t,a,Q);a+=Q*_;let j=C.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Z=Qe.createTypedArrayFromArrayBuffer(v,t,a,j);a+=j*_;let Y,$;for(;a<C.byteLength;){let fe=C.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ye=C.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,fe===m$.OCT_VERTEX_NORMALS&&e._requestVertexNormals)Y=new Uint8Array(t,a,v*2);else if(fe===m$.WATER_MASK&&e._requestWaterMask)$=new Uint8Array(t,a,ye);else if(fe===m$.METADATA&&e._requestMetadata){let Ie=C.getUint32(a,!0);if(Ie>0){let be=hr(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,Ie).available;if(l(be))for(let ze=0;ze<be.length;++ze){let We=n+ze+1,tt=be[ze],Mt=e._tilingScheme.getNumberOfYTilesAtLevel(We);for(let kt=0;kt<tt.length;++kt){let Oe=tt[kt],_n=Mt-Oe.endY-1,Ut=Mt-Oe.startY-1;e.availability.addAvailableTileRange(We,Oe.startX,_n,Oe.endX,Ut),r.availability.addAvailableTileRange(We,Oe.startX,_n,Oe.endX,Ut)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ye}let J=e.getLevelMaximumGeometricError(n)*5,pe=e._tilingScheme.tileXYToRectangle(i,o,n),Ce=Qn.fromRectangle(pe,I,b,e._tilingScheme.ellipsoid);return new Ax({center:E,minimumHeight:I,maximumHeight:b,boundingSphere:S,orientedBoundingBox:Ce,horizonOcclusionPoint:B,quantizedVertices:P,encodedNormals:Y,indices:T,westIndices:k,southIndices:z,eastIndices:H,northIndices:Z,westSkirtHeight:J,southSkirtHeight:J,eastSkirtHeight:J,northSkirtHeight:J,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:$,credits:e._tileCredits})}Dm.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length,a=!1,c=Promise.resolve();if(s===1)r=o[0];else for(let u=0;u<s;++u){let f=o[u];if(!l(f.availability)||f.availability.isTileAvailable(n,e,t)){r=f;break}let h=g$(this,e,t,n,f,u===0);h.result&&(a=!0,c=c.then(()=>h.promise))}return!l(r)&&a?c.then(()=>new Promise(u=>{setTimeout(()=>{let f=this.requestTileGeometry(e,t,n,i);u(f)},0)})):JTe(this,e,t,n,r,i)};function JTe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new ce("Terrain tile doesn't exist"));let s=o.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&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,h=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=qTe(void 0)):u=qTe(c);let g=p.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(l(g))return g.then(function(m){return l(m)?l(e._heightmapStructure)?XBt(e,m,i,t,n):JBt(e,m,i,t,n,o):Promise.reject(new ce("Mesh buffer doesn't exist."))})}Object.defineProperties(Dm.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}}});Dm.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Dm.fromIonAssetId=async function(e,t){let n=await ju.fromAssetId(e);return Dm.fromUrl(n,t)};Dm.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT,e=await Promise.resolve(e);let n=we.createIfNeeded(e);n.appendForwardSlash();let i=new KTe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await A$(i);let o=new Dm(t);return i.build(o),o};Dm.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,o=i.length;for(let r=0;r<o;++r)if(g$(this,e,t,n,i[r],r===0).result)return;return!1};Dm.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,o=i.length;for(let r=0;r<o;++r){let s=g$(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function p$(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function g$(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,u=o.availability,f=p$(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let h;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,h=o.availabilityPromiseCache[s],!l(h))){let p=new ar({throttle:!1,throttleByServer:!0,type:ws.TERRAIN});h=JTe(e,f.x,f.y,f.level,o,p),l(h)&&(o.availabilityPromiseCache[s]=h,h.then(a))}return{result:!0,promise:h}}f=p$(o,f.x,f.y,f.level)}return{result:!1}}Dm._getAvailabilityTile=p$;var _x=Dm;function ZBt(e){return e=e??V.EMPTY_OBJECT,_x.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var I3=ZBt;function $Bt(e){return e=e??V.EMPTY_OBJECT,_x.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:ne.WGS84})}var yx=$Bt;function Uw(e){this._ready=!1,this._provider=void 0,this._errorEvent=new ge,this._readyEvent=new ge,tDt(this,e)}Object.defineProperties(Uw.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}}});Uw.fromWorldTerrain=function(e){return new Uw(yx(e))};Uw.fromWorldBathymetry=function(e){return new Uw(I3(e))};function eDt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function tDt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){eDt(e._errorEvent,i)}}var x3=Uw;function Gw(){}Gw.prototype.boundingVolume=void 0;Gw.prototype.boundingSphere=void 0;Gw.prototype.distanceToCamera=function(e){he.throwInstantiationError()};Gw.prototype.intersectPlane=function(e){he.throwInstantiationError()};Gw.prototype.createDebugVolume=function(e){he.throwInstantiationError()};var _$=Gw;function b3(e){e=e??V.EMPTY_OBJECT,this._tilingScheme=l(e.tilingScheme)?e.tilingScheme:new oo({ellipsoid:e.ellipsoid}),this._color=e.color??G.YELLOW,this._errorEvent=new ge,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(b3.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}}});b3.prototype.getTileCredits=function(e,t,n){};b3.prototype.requestImage=function(e,t,n,i){let o=document.createElement("canvas");o.width=256,o.height=256;let r=o.getContext("2d"),s=this._color.toCssColorString();return r.strokeStyle=s,r.lineWidth=2,r.strokeRect(1,1,255,255),r.font="bold 25px Arial",r.textAlign="center",r.fillStyle=s,r.fillText(`L: ${n}`,124,86),r.fillText(`X: ${e}`,124,136),r.fillText(`Y: ${t}`,124,186),Promise.resolve(o)};b3.prototype.pickFeatures=function(e,t,n,i,o){};var T3=b3;function y$(e){he.throwInstantiationError()}y$.prototype.isReady=he.throwInstantiationError;y$.prototype.shouldDiscardImage=he.throwInstantiationError;var C$=y$;var nDt={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3},E$=Object.freeze(nDt);function i5(e,t){this.show=!0,l(e)||(e=new qe),this.rectangle=qe.clone(e),l(t)||(t=io.fromType(io.ColorType,{color:new G(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}i5.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!qe.equals(t.viewport,this.rectangle))&&(this._rs=Ge.fromCache({blending:An.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 o=new He({sources:[this._material.shaderSource,P2]});this._overlayCommand=i.createViewportQuadCommand(o,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Be.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}};i5.prototype.isDestroyed=function(){return!1};i5.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),ue(this)};var I$=i5;function x$(){he.throwInstantiationError()}Object.defineProperties(x$.prototype,{globalTransform:{get:he.throwInstantiationError},shapeTransform:{get:he.throwInstantiationError},shape:{get:he.throwInstantiationError},minBounds:{get:he.throwInstantiationError},maxBounds:{get:he.throwInstantiationError},dimensions:{get:he.throwInstantiationError},paddingBefore:{get:he.throwInstantiationError},paddingAfter:{get:he.throwInstantiationError},names:{get:he.throwInstantiationError},types:{get:he.throwInstantiationError},componentTypes:{get:he.throwInstantiationError},minimumValues:{get:he.throwInstantiationError},maximumValues:{get:he.throwInstantiationError},maximumTileCount:{get:he.throwInstantiationError},availableLevels:{get:he.throwInstantiationError},keyframeCount:{get:he.throwInstantiationError},timeIntervalCollection:{get:he.throwInstantiationError}});x$.prototype.requestData=function(e){he.throwInstantiationError()};var b$=x$;function Cx(){he.throwInstantiationError()}Object.defineProperties(Cx.prototype,{orientedBoundingBox:{get:he.throwInstantiationError},boundingSphere:{get:he.throwInstantiationError},boundTransform:{get:he.throwInstantiationError},shapeTransform:{get:he.throwInstantiationError},shaderUniforms:{get:he.throwInstantiationError},shaderDefines:{get:he.throwInstantiationError},shaderMaximumIntersectionsLength:{get:he.throwInstantiationError}});Cx.prototype.update=he.throwInstantiationError;Cx.prototype.computeOrientedBoundingBoxForTile=he.throwInstantiationError;Cx.prototype.computeOrientedBoundingBoxForSample=he.throwInstantiationError;Cx.DefaultMinBounds=he.throwInstantiationError;Cx.DefaultMaxBounds=he.throwInstantiationError;var T$=Cx;var iDt=new G,oDt=new G,rDt=new G,sDt=new G,ZTe=new se,S3=new Uint8Array(4);function $Te(e,t,n,i){let o=t.height===n.height?0:(e-t.height)/(n.height-t.height);return G.lerp(t.color,n.color,o,i)}function o5(e,t){return{height:e,color:G.clone(t)}}function eSe(e){return e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?t.height===i[n-1].height:!0,a=r?t.height===i[n+1].height:!0;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=n<i.length-1,s=o?G.equals(t.color,i[n-1].color):!1,a=r?G.equals(t.color,i[n+1].color):!1;return!s||!a}),e=e.filter(function(t,n,i){let o=n>0,r=o?G.equals(t.color,i[n-1].color):!1,s=o?t.height===i[n-1].height:!0;return!r||!s}),e}function aDt(e){let t,n,i=[],o=e.length;for(t=0;t<o;t++){let r=e[t],s=r.entries,a=s.length,c=[];for(n=0;n<a;n++){let g=s[n],m=D.clamp(g.height,Ru._minimumHeight,Ru._maximumHeight),_=G.clone(g.color,iDt);_.red*=_.alpha,_.green*=_.alpha,_.blue*=_.alpha,c.push(o5(m,_))}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||Rp(c,function(g,m){return D.sign(g.height-m.height)});let h=r.extendDownwards??!1,p=r.extendUpwards??!1;c.length===1&&!h&&!p&&(h=!0,p=!0),h&&c.splice(0,0,o5(Ru._minimumHeight,c[0].color)),p&&c.splice(c.length,0,o5(Ru._maximumHeight,c[c.length-1].color)),c=eSe(c),i.push(c)}return i}function cDt(e){let t=aDt(e),n=[],i=[],o;function r(u,f){n.push(o5(u,f))}function s(u,f,h){let p=G.multiplyByScalar(h,1-f.alpha,sDt);p=G.add(p,f,p),r(u,p)}let a=t.length;for(o=0;o<a;o++){let u=t[o],f=0,h=0;i=n,n=[];let p=u.length,g=i.length;for(;f<p||h<g;){let m=f<p?u[f]:void 0,_=f>0?u[f-1]:void 0,y=f<p-1?u[f+1]:void 0,C=h<g?i[h]:void 0,E=h>0?i[h-1]:void 0,I=h<g-1?i[h+1]:void 0;if(l(m)&&l(C)&&m.height===C.height){let b=l(I)&&C.height===I.height,S=!l(E),B=!l(I),v=l(y)&&m.height===y.height,P=!l(_),N=!l(y);b?v?(s(m.height,m.color,C.color),s(m.height,y.color,I.color)):P?(r(m.height,C.color),s(m.height,m.color,I.color)):N?(s(m.height,m.color,C.color),r(m.height,I.color)):(s(m.height,m.color,C.color),s(m.height,m.color,I.color)):S?v?(r(m.height,m.color),s(m.height,y.color,C.color)):N?(r(m.height,m.color),r(m.height,C.color)):(P||r(m.height,m.color),s(m.height,m.color,C.color)):B?v?(s(m.height,m.color,C.color),r(m.height,y.color)):P?(r(m.height,C.color),r(m.height,m.color)):N?s(m.height,m.color,C.color):(s(m.height,m.color,C.color),r(m.height,m.color)):v?(s(m.height,m.color,C.color),s(m.height,y.color,C.color)):P?(r(m.height,C.color),s(m.height,m.color,C.color)):N?(s(m.height,m.color,C.color),r(m.height,C.color)):s(m.height,m.color,C.color),f+=v?2:1,h+=b?2:1}else if(l(m)&&l(C)&&l(E)&&m.height<C.height){let b=$Te(m.height,E,C,rDt);l(_)?l(y)?s(m.height,m.color,b):(s(m.height,m.color,b),r(m.height,b)):(r(m.height,b),s(m.height,m.color,b)),f++}else if(l(C)&&l(m)&&l(_)&&C.height<m.height){let b=$Te(C.height,_,m,oDt);l(E)?l(I)?s(C.height,b,C.color):(s(C.height,b,C.color),r(C.height,b)):(r(C.height,b),s(C.height,b,C.color)),h++}else l(m)&&(!l(C)||m.height<C.height)?(l(C)&&!l(E)&&!l(y)?(r(m.height,m.color),r(m.height,Ru._emptyColor),r(C.height,Ru._emptyColor)):(!l(C)&&l(E)&&!l(_)&&(r(E.height,Ru._emptyColor),r(m.height,Ru._emptyColor)),r(m.height,m.color)),f++):l(C)&&(!l(m)||C.height<m.height)&&(r(C.height,C.color),h++)}}return eSe(n)}function Ru(e){let{scene:t,layers:n}=e??V.EMPTY_OBJECT,{context:i}=t,o=cDt(n),r=o.length,s,a,c;if(!Ru._useFloatTexture(i)){a=Ve.UNSIGNED_BYTE,c=$e.RGBA,s=new Uint8Array(r*4);for(let g=0;g<r;g++)se.packFloat(o[g].height,ZTe),se.pack(ZTe,s,g*4)}else{a=Ve.FLOAT,c=i.webgl2?$e.RED:$e.LUMINANCE,s=new Float32Array(r);for(let g=0;g<r;g++)s[g]=o[g].height}let f=Nt.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.NEAREST,magnificationFilter:di.NEAREST})}),h=new Uint8Array(r*4);for(let g=0;g<r;g++)o[g].color.toBytes(S3),h[g*4+0]=S3[0],h[g*4+1]=S3[1],h[g*4+2]=S3[2],h[g*4+3]=S3[3];let p=Nt.create({context:i,pixelFormat:$e.RGBA,pixelDatatype:Ve.UNSIGNED_BYTE,source:{arrayBufferView:h,width:r,height:1},sampler:new nn({wrapS:Pn.CLAMP_TO_EDGE,wrapT:Pn.CLAMP_TO_EDGE,minificationFilter:$t.LINEAR,magnificationFilter:di.LINEAR})});return io.fromType("ElevationBand",{heights:f,colors:p})}Ru._useFloatTexture=function(e){return e.floatingPointTexture};Ru._maximumHeight=5906376425472;Ru._minimumHeight=-5906376425472;Ru._emptyColor=new G(0,0,0,0);var S$=Ru;var r5={};r5.defaultApiKey=void 0;r5.mapTilesApiEndpoint=new we({url:"https://tile.googleapis.com/v1/"});r5.getDefaultCredit=function(){return new Bt('<img src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align: -5px" alt="Google">',!0)};var Ex=r5;async function lDt(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??V.EMPTY_OBJECT,e.onlyUsingWithGoogleGeocoder||yt("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??Ex.defaultApiKey;if(!l(n))return uDt(t);let i,o=Ex.getDefaultCredit();l(o)&&(i=[o]);let r=new we({url:`${Ex.mapTilesApiEndpoint}3dtiles/root.json`,queryParameters:{key:n},credits:i});return Ms.fromUrl(r,t)}var tSe={};async function uDt(e){let i=tSe[2275207];l(i)||(i=ju.fromAssetId(2275207),tSe[2275207]=i);let o=await i;return Ms.fromUrl(o,e)}var w$=lDt;async function fDt(e){let t=await Ms.fromIonAssetId(96188,e);e=e??V.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??G.WHITE).toCssColorString();n=new lx({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var B$=fDt;function dDt(e){e=e??V.EMPTY_OBJECT;let t=[],n=e.geometry;(!l(n.attributes)||!l(n.primitiveType))&&(n=n.constructor.createGeometry(n));let i=n.attributes,o=M.clone(e.modelMatrix??M.IDENTITY),r=e.length??1e4;if(l(i.normal)&&t.push(new Rt({geometry:Vn.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new en(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new Rt({geometry:Vn.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new en(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new Rt({geometry:Vn.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new en(0,0,1,1)},modelMatrix:o})),t.length>0)return new kn({asynchronous:!1,geometryInstances:t,appearance:new gn({flat:!0,translucent:!1})})}var D$=dDt;var hDt=15;function nSe(e){this.ellipsoid=e.ellipsoid??ne.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}nSe.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 mDt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new Bt(n));let i=t.spatialReference,o=i.latestWkid??i.wkid,r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=ae.fromDegrees(r.xmin,r.ymin,r.xmax,r.ymax),e.tilingScheme=new oo(s);else if(o===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(r.xmin,r.ymin),s.rectangleNortheastInMeters=new U(r.xmax,r.ymax),e.tilingScheme=new Cs(s)}else throw new ce("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new ce("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?kd.LERC:kd.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Bm(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Bm(e.tilingScheme,e.lodCount)),e.levelZeroMaximumGeometricError=Es.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 pDt(e,t,n){try{let i=await t.fetchJson();mDt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Qo.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function IC(e){e=e??V.EMPTY_OBJECT,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 ge}Object.defineProperties(IC.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}}});IC.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT,e=await Promise.resolve(e);let n=we.createIfNeeded(e);n.appendForwardSlash(),l(t.token)&&(n=n.getDerivedResource({queryParameters:{token:t.token}}));let i=n.getDerivedResource({queryParameters:{f:"pjson"}}),o=new nSe(t);await pDt(o,i);let r=new IC(t);return o.build(r),r._resource=n,r};IC.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(v$(this,n+1,e*2,t*2))){let h=iSe(this,n+1,e*2,t*2);s=h.promise,a=h.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(h){return new yc({buffer:h[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):hDt,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(async function(h){if(l(a)&&a.state===li.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=li.CANCELLED,Promise.reject(h)}return Promise.reject(h)})};function v$(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailabilityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}IC.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};IC.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=v$(this,n,e,t);if(l(i))return i;iSe(this,n,e,t)};IC.prototype.loadTileDataAvailability=function(e,t,n){};function ADt(e,t,n,i){let o=t-1,r=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,h=!1;for(;!(f&&h);){let p=u.x,g=h?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===o?(c.endX=u.x,f=!0):++u.x}if(!h){let m=u.y*t;for(let _=e.x;_<=p;++_)if(i[m+_]!==s){h=!0;break}h?(a.push(new U(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,h=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function gDt(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new U(0,0)];for(;a.length>0;){let c=a.pop(),u=ADt(c,n,i,o);if(u.value===1){let h=u.range;h.startX+=e,h.endX+=e,h.startY+=t,h.endY+=t,r.push(h)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function iSe(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new ar({throttle:!1,throttleByServer:!0,type:ws.TERRAIN}),h=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(h)?(h=h.then(function(p){let g=gDt(o,r,s,s,p.data);e._tilesAvailabilityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let m=e._tilesAvailable;for(let _=0;_<g.length;++_){let y=g[_];m.addAvailableTileRange(t,y.startX,y.startY,y.endX,y.endY)}return v$(e,t,n,i)}),c[a]={promise:h,request:u},h=h.finally(function(p){return delete c[a],p}),{promise:h,request:u}):{}}var P$=IC;var oSe="https://dev.virtualearth.net/REST/v1/Locations";function R$(e){e=e??V.EMPTY_OBJECT;let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new we({url:oSe,queryParameters:n}),this._credit=new Bt('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(R$.prototype,{url:{get:function(){return oSe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});R$.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(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:ae.fromDegrees(a,s,u,c)}})})};var M$=R$;function N$(){}Object.defineProperties(N$.prototype,{credit:{get:function(){}}});N$.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],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.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(o)){let r={displayName:e,destination:d.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var L$=N$;var _Dt=new se,rSe=new d,zw=new d;function yDt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new d);let u=(a-i)*o;return d.lerp(r,s,u,c)}}return function(i,o){l(o)||(o=new d);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=_Dt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,h,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,h=d.subtract(t[2],c,rSe),d.multiplyByScalar(h,.5,h),p=M.multiplyByVector(ay.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],u=t[r+1],h=e.lastTangent,f=d.subtract(u,t[r-1],rSe),d.multiplyByScalar(f,.5,f),p=M.multiplyByVector(ay.hermiteCoefficientMatrix,a,a)):(c=t[r-1],u=t[r],f=t[r+1],h=t[r+2],p=M.multiplyByVector(xC.catmullRomCoefficientMatrix,a,a)),o=d.multiplyByScalar(c,p.x,o),d.multiplyByScalar(u,p.y,zw),d.add(o,zw,o),d.multiplyByScalar(f,p.z,zw),d.add(o,zw,o),d.multiplyByScalar(h,p.w,zw),d.add(o,zw,o)}}var CDt=new d,EDt=new d;function xC(e){e=e??V.EMPTY_OBJECT;let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=CDt,d.multiplyByScalar(t[1],2,i),d.subtract(i,t[2],i),d.subtract(i,t[0],i),d.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=EDt,d.multiplyByScalar(t[r-1],2,o),d.subtract(t[r],o,o),d.add(o,t[r-2],o),d.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=d.clone(i),this._lastTangent=d.clone(o),this._evaluateFunction=yDt(this),this._lastTimeIndex=0}Object.defineProperties(xC.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}}});xC.catmullRomCoefficientMatrix=new M(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);xC.prototype.findTimeInterval=Ao.prototype.findTimeInterval;xC.prototype.wrapTime=Ao.prototype.wrapTime;xC.prototype.clampTime=Ao.prototype.clampTime;xC.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var O$=xC;function l_(e){e=e??V.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 Fl(n),this._workerName="createCircleGeometry"}l_.packedLength=Fl.packedLength;l_.pack=function(e,t,n){return Fl.pack(e._ellipseGeometry,t,n)};var sSe=new Fl({center:new d,semiMajorAxis:1,semiMinorAxis:1}),Ec={center:new d,radius:void 0,ellipsoid:ne.clone(ne.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Re,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};l_.unpack=function(e,t,n){let i=Fl.unpack(e,t,sSe);return Ec.center=d.clone(i._center,Ec.center),Ec.ellipsoid=ne.clone(i._ellipsoid,Ec.ellipsoid),Ec.ellipsoid=ne.clone(i._ellipsoid,sSe._ellipsoid),Ec.height=i._height,Ec.extrudedHeight=i._extrudedHeight,Ec.granularity=i._granularity,Ec.vertexFormat=Re.clone(i._vertexFormat,Ec.vertexFormat),Ec.stRotation=i._stRotation,Ec.shadowVolume=i._shadowVolume,l(n)?(Ec.semiMajorAxis=i._semiMajorAxis,Ec.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Fl(Ec),n):(Ec.radius=i._semiMajorAxis,new l_(Ec))};l_.createGeometry=function(e){return Fl.createGeometry(e._ellipseGeometry)};l_.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new l_({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Re.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(l_.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var F$=l_;function Vw(e){e=e??V.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 Af(n),this._workerName="createCircleOutlineGeometry"}Vw.packedLength=Af.packedLength;Vw.pack=function(e,t,n){return Af.pack(e._ellipseGeometry,t,n)};var IDt=new Af({center:new d,semiMajorAxis:1,semiMinorAxis:1}),Qf={center:new d,radius:void 0,ellipsoid:ne.clone(ne.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};Vw.unpack=function(e,t,n){let i=Af.unpack(e,t,IDt);return Qf.center=d.clone(i._center,Qf.center),Qf.ellipsoid=ne.clone(i._ellipsoid,Qf.ellipsoid),Qf.height=i._height,Qf.extrudedHeight=i._extrudedHeight,Qf.granularity=i._granularity,Qf.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Qf.semiMajorAxis=i._semiMajorAxis,Qf.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Af(Qf),n):(Qf.radius=i._semiMajorAxis,new Vw(Qf))};Vw.createGeometry=function(e){return Af.createGeometry(e._ellipseGeometry)};var Q$=Vw;function Hw(e){e=e??V.EMPTY_OBJECT,this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new oo({ellipsoid:e.ellipsoid??ne.default})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new ge;let n=e.credit;typeof n=="string"&&(n=new Bt(n)),this._credit=n}Object.defineProperties(Hw.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}}});Hw.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new yc({buffer:c,width:r,height:s})})};Hw.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};Hw.prototype.getTileDataAvailable=function(e,t,n){};Hw.prototype.loadTileDataAvailability=function(e,t,n){};var k$=Hw;function aSe(e){this.proxy=e}aSe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var U$=aSe;var xDt={SEARCH:0,AUTOCOMPLETE:1},bC=Object.freeze(xDt);function s5(){he.throwInstantiationError()}Object.defineProperties(s5.prototype,{credit:{get:he.throwInstantiationError}});s5.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(Bt.getIonCredit)};s5.prototype.geocode=he.throwInstantiationError;var Ww=s5;function cSe(){he.throwInstantiationError()}cSe.createGeometry=function(e){he.throwInstantiationError()};var G$=cSe;function Ix(e){e=e??V.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(Ix.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var fSe="createVerticesFromGoogleEarthEnterpriseBuffer",bDt=new ui(fSe),TDt=new ui(fSe,Am.maximumAsynchronousTasks),lSe=new ae,z$=new ae;Ix.prototype.createMesh=function(e){e=e??V.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,lSe),t.tileXYToRectangle(n,i,o,z$);let u=c.cartographicToCartesian(ae.center(z$)),h=40075.16/(1<<o);this._skirtHeight=Math.min(h*8,1e3);let g=(a?TDt:bDt).scheduleTask({buffer:this._buffer,nativeRectangle:lSe,rectangle:z$,relativeToCenter:u,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(g))return;let m=this;return g.then(function(_){return m._mesh=new Gd(u,new Float32Array(_.vertices),new Uint16Array(_.indices),_.indexCountWithoutSkirts,_.vertexCountWithoutSkirts,_.minimumHeight,_.maximumHeight,le.clone(_.boundingSphere3D),d.clone(_.occludeePointInScaledSpace),_.numberOfAttributes,Qn.clone(_.orientedBoundingBox),Jc.clone(_.encoding),_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),m._minimumHeight=_.minimumHeight,m._maximumHeight=_.maximumHeight,m._buffer=void 0,m._mesh})};Ix.prototype.interpolateHeight=function(e,t,n){let i=D.clamp((t-e.west)/e.width,0,1),o=D.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?vDt(this,i,o):MDt(this,i,o,e)};var SDt=new ui("upsampleQuantizedTerrainMesh",Am.maximumAsynchronousTasks);Ix.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=SDt.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:h,ellipsoid:f});if(!l(p))return;let g=this;return p.then(function(m){let _=new Uint16Array(m.vertices),y=Qe.createTypedArray(_.length/3,m.indices),C=g._skirtHeight;return new Ax({quantizedVertices:_,indices:y,minimumHeight:m.minimumHeight,maximumHeight:m.maximumHeight,boundingSphere:le.clone(m.boundingSphere),orientedBoundingBox:Qn.clone(m.orientedBoundingBox),horizonOcclusionPoint:d.clone(m.horizonOcclusionPoint),westIndices:m.westIndices,southIndices:m.southIndices,eastIndices:m.eastIndices,northIndices:m.northIndices,westSkirtHeight:C,southSkirtHeight:C,eastSkirtHeight:C,northSkirtHeight:C,childTileMask:0,createdByUpsampling:!0,credits:g._credits})})};Ix.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Ix.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var wDt=new U,BDt=new U,DDt=new U,dSe=new d;function vDt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,u,wDt),g=r.decodeTextureCoordinates(o,f,BDt),m=r.decodeTextureCoordinates(o,h,DDt),_=c_.computeBarycentricCoordinates(t,n,p.x,p.y,g.x,g.y,m.x,m.y,dSe);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){let y=r.decodeHeight(o,u),C=r.decodeHeight(o,f),E=r.decodeHeight(o,h);return _.x*y+_.y*C+_.z*E}}}var PDt=Uint16Array.BYTES_PER_ELEMENT,uSe=Uint32Array.BYTES_PER_ELEMENT,V$=Int32Array.BYTES_PER_ELEMENT,RDt=Float32Array.BYTES_PER_ELEMENT,H$=Float64Array.BYTES_PER_ELEMENT;function MDt(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),u=0;for(let S=0;S<r;++S)u+=c.getUint32(u,!0),u+=uSe;u+=uSe,u+=2*H$;let f=D.toRadians(c.getFloat64(u,!0)*180);u+=H$;let h=D.toRadians(c.getFloat64(u,!0)*180);u+=H$;let p=i.width/f/2,g=i.height/h/2,m=c.getInt32(u,!0);u+=V$;let _=c.getInt32(u,!0)*3;u+=V$,u+=V$;let y=new Array(m),C=new Array(m),E=new Array(m),I;for(I=0;I<m;++I)y[I]=s+c.getUint8(u++)*p,C[I]=a+c.getUint8(u++)*g,E[I]=c.getFloat32(u,!0)*6371010,u+=RDt;let b=new Array(_);for(I=0;I<_;++I)b[I]=c.getUint16(u,!0),u+=PDt;for(I=0;I<_;I+=3){let S=b[I],B=b[I+1],v=b[I+2],P=y[S],N=y[B],L=y[v],A=C[S],x=C[B],T=C[v],w=c_.computeBarycentricCoordinates(t,n,P,A,N,x,L,T,dSe);if(w.x>=-1e-15&&w.y>=-1e-15&&w.z>=-1e-15)return w.x*E[S]+w.y*E[B]+w.z*E[v]}}var jw=Ix;var Xd={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},a5=new K;function c5(){this._terrainCache={},this._lastTidy=K.now()}c5.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:K.now()}};c5.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};c5.prototype.tidy=function(){if(K.now(a5),K.secondsDifference(a5,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];K.secondsDifference(a5,r.timestamp)>10&&delete e[o]}K.clone(a5,this._lastTidy)}};function TC(e){e=e??V.EMPTY_OBJECT,this._tilingScheme=new oo({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ae(-D.PI,-D.PI,D.PI,D.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new Bt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new c5,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new ge}Object.defineProperties(TC.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(){}}});TC.fromMetadata=function(e,t){if(!e.terrainPresent)throw new ce(`The server ${e.url} doesn't have terrain`);let n=new TC(t);return n._metadata=e,n};var NDt=new ui("decodeGoogleEarthEnterprisePacket");function hSe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===Xd.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}TC.prototype.requestTileGeometry=function(e,t,n,i){let o=r_.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new ce("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=Xd.UNKNOWN);let u=r.get(o);if(l(u)){let C=s.providers[a.terrainProvider];return Promise.resolve(new jw({buffer:u,childTileMask:hSe(o,a,s),credits:l(C)?[C]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===Xd.NONE)return Promise.reject(new ce("Terrain tile doesn't exist"))}else return Promise.resolve(new yc({buffer:new Uint8Array(16*16),width:16,height:16}));let f,h=o,p=-1;switch(c){case Xd.SELF:p=a.terrainVersion;break;case Xd.PARENT:h=h.substring(0,h.length-1),f=s.getTileInformationFromQuadKey(h),p=f.terrainVersion;break;case Xd.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(h=h.substring(0,h.length-1),f=s.getTileInformationFromQuadKey(h),l(f)&&f.hasTerrain()&&(p=f.terrainVersion));break}if(p<0)return Promise.reject(new ce("Terrain tile doesn't exist"));let g=this._terrainPromises,m=this._terrainRequests,_,y;if(l(g[h]))_=g[h],y=m[h];else{y=i;let C=LDt(this,h,p,y).fetchArrayBuffer();if(!l(C))return;_=C.then(function(E){return l(E)?NDt.scheduleTask({buffer:E,type:"Terrain",key:s.key},[E]).then(function(I){let b=s.getTileInformationFromQuadKey(h);b.terrainState=Xd.SELF,r.add(h,I[0]);let S=b.terrainProvider,B=I.length-1;for(let v=0;v<B;++v){let P=h+v.toString(),N=s.getTileInformationFromQuadKey(P);l(N)&&(r.add(P,I[v+1]),N.terrainState=Xd.PARENT,N.terrainProvider===0&&(N.terrainProvider=S))}}):Promise.reject(new ce("Failed to load terrain."))}),g[h]=_,m[h]=y,_=_.finally(function(){delete g[h],delete m[h]})}return _.then(function(){let C=r.get(o);if(l(C)){let E=s.providers[a.terrainProvider];return new jw({buffer:C,childTileMask:hSe(o,a,s),credits:l(E)?[E]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new ce("Failed to load terrain."))}).catch(function(C){return y.state===li.CANCELLED?(i.state=y.state,Promise.reject(C)):(a.terrainState=Xd.NONE,Promise.reject(C))})};TC.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};TC.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=r_.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===Xd.NONE)return!1;if((!l(s)||s===Xd.UNKNOWN)&&(r.terrainState=Xd.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new ar({throttle:!1,throttleByServer:!0,type:ws.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};TC.prototype.loadTileDataAvailability=function(e,t,n){};function LDt(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 W$=TC;var ODt="https://maps.googleapis.com/maps/api/geocode/json",mSe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function j$(e){e=e??V.EMPTY_OBJECT;let t=e.key;this._resource=new we({url:ODt,queryParameters:{key:t}}),this._credit=new Bt(mSe,!0)}Object.defineProperties(j$.prototype,{credit:{get:function(){return this._credit}}});j$.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 ce(`GoogleGeocoderService got a bad response ${n.status}: ${n.error_message}`);return n.results.map(o=>{let r=o.geometry.viewport.southwest,s=o.geometry.viewport.northeast;return{displayName:o.formatted_address,destination:ae.fromDegrees(r.lng,r.lat,s.lng,s.lat),attribution:{html:mSe,collapsible:!1}}})};var Y$=j$;var w3={};w3.type=void 0;w3.getRequiredDataPoints=he.throwInstantiationError;w3.interpolateOrderZero=he.throwInstantiationError;w3.interpolate=he.throwInstantiationError;var q$=w3;var FDt={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"},u_=Object.freeze(FDt);function K$(e){this._url=we.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(K$.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});K$.prototype.geocode=async function(e,t){return this._url.getDerivedResource({url:t===bC.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=ae.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=d.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var B3=K$;function QDt(e){if(!Object.values(u_).some(t=>t===e))throw new he(`Invalid geocodeProviderType: "${e}"`)}var pSe=Object.freeze({[u_.GOOGLE]:"google",[u_.BING]:"bing",[u_.DEFAULT]:void 0});function kDt(e){return pSe[e]}function UDt(e){return Object.entries(pSe).find(t=>t[1]===e)[0]}function X$(e){e=e??V.EMPTY_OBJECT;let t=e.geocodeProviderType??u_.DEFAULT,n=e.accessToken??xh.defaultAccessToken,i=we.createIfNeeded(e.server??xh.defaultServer);i.appendForwardSlash();let o=xh.getDefaultTokenCredit(n);l(o)&&e.scene.frameState.creditDisplay.addStaticCredit(Bt.clone(o));let r=i.getDerivedResource({url:"v1/geocode"});l(n)&&r.appendQueryParameters({access_token:n}),this._accessToken=n,this._server=i,this._pelias=new B3(r),this.geocodeProviderType=t}Object.defineProperties(X$.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return UDt(this._pelias.url.queryParameters.geocoder)},set:function(e){QDt(e);let t={...this._pelias.url.queryParameters,geocoder:kDt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});X$.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var xx=X$;function l5(){he.throwInstantiationError()}Object.defineProperties(l5.prototype,{ellipsoid:{get:he.throwInstantiationError}});l5.prototype.project=he.throwInstantiationError;l5.prototype.unproject=he.throwInstantiationError;var J$=l5;function Yw(e){e=e??V.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(Yw.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});Yw.prototype.findTimeInterval=Ao.prototype.findTimeInterval;Yw.prototype.wrapTime=Ao.prototype.wrapTime;Yw.prototype.clampTime=Ao.prototype.clampTime;Yw.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var Z$=Yw;function $$(e,t,n){e=we.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new Bt('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties($$.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});$$.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:St(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=ae.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=d.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var eee=$$;var GDt={packedLength:void 0,pack:he.throwInstantiationError,unpack:he.throwInstantiationError},tee=GDt;var zDt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:he.throwInstantiationError,unpackInterpolationResult:he.throwInstantiationError},nee=zDt;function ASe(){he.throwInstantiationError()}ASe.prototype.getURL=he.throwInstantiationError;var iee=ASe;function VDt(e,t,n,i,o,r,s){let a=Vi.numberOfPoints(e,t,o),c,u=n.red,f=n.green,h=n.blue,p=n.alpha,g=i.red,m=i.green,_=i.blue,y=i.alpha;if(G.equals(n,i)){for(c=0;c<a;c++)r[s++]=G.floatToByte(u),r[s++]=G.floatToByte(f),r[s++]=G.floatToByte(h),r[s++]=G.floatToByte(p);return s}let C=(g-u)/a,E=(m-f)/a,I=(_-h)/a,b=(y-p)/a,S=s;for(c=0;c<a;c++)r[S++]=G.floatToByte(u+c*C),r[S++]=G.floatToByte(f+c*E),r[S++]=G.floatToByte(h+c*I),r[S++]=G.floatToByte(p+c*b);return S}function D3(e){e=e??V.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??ne.default,this._workerName="createSimplePolylineGeometry";let o=1+t.length*d.packedLength;o+=l(n)?1+n.length*G.packedLength:1,this.packedLength=o+ne.packedLength+3}D3.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=d.packedLength)d.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return ne.pack(e._ellipsoid,t,n),n+=ne.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};D3.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=d.packedLength)r[i]=d.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=ne.unpack(e,t);t+=ne.packedLength;let c=e[t++]===1,u=e[t++],f=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=u,n._granularity=f,n):new D3({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:u,granularity:f})};var u5=new Array(2),f5=new Array(2),HDt={positions:u5,height:f5,ellipsoid:void 0,minDistance:void 0,granularity:void 0};D3.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=D.chordLength(r,s.maximumRadius),c=l(n)&&!i,u,f=t.length,h,p,g,m,_=0;if(o===ln.GEODESIC||o===ln.RHUMB){let b,S,B;o===ln.GEODESIC?(b=D.chordLength(r,s.maximumRadius),S=Vi.numberOfPoints,B=Vi.generateArc):(b=r,S=Vi.numberOfPointsRhumbLine,B=Vi.generateRhumbArc);let v=Vi.extractHeights(t,s),P=HDt;if(o===ln.GEODESIC?P.minDistance=a:P.granularity=r,P.ellipsoid=s,c){let N=0;for(u=0;u<f-1;u++)N+=S(t[u],t[u+1],b)+1;h=new Float64Array(N*3),g=new Uint8Array(N*4),P.positions=u5,P.height=f5;let L=0;for(u=0;u<f-1;++u){u5[0]=t[u],u5[1]=t[u+1],f5[0]=v[u],f5[1]=v[u+1];let A=B(P);if(l(n)){let x=A.length/3;m=n[u];for(let T=0;T<x;++T)g[L++]=G.floatToByte(m.red),g[L++]=G.floatToByte(m.green),g[L++]=G.floatToByte(m.blue),g[L++]=G.floatToByte(m.alpha)}h.set(A,_),_+=A.length}}else if(P.positions=t,P.height=v,h=new Float64Array(B(P)),l(n)){for(g=new Uint8Array(h.length/3*4),u=0;u<f-1;++u){let L=t[u],A=t[u+1],x=n[u],T=n[u+1];_=VDt(L,A,x,T,a,g,_)}let N=n[f-1];g[_++]=G.floatToByte(N.red),g[_++]=G.floatToByte(N.green),g[_++]=G.floatToByte(N.blue),g[_++]=G.floatToByte(N.alpha)}}else{p=c?f*2-2:f,h=new Float64Array(p*3),g=l(n)?new Uint8Array(p*4):void 0;let b=0,S=0;for(u=0;u<f;++u){let B=t[u];if(c&&u>0&&(d.pack(B,h,b),b+=3,m=n[u-1],g[S++]=G.floatToByte(m.red),g[S++]=G.floatToByte(m.green),g[S++]=G.floatToByte(m.blue),g[S++]=G.floatToByte(m.alpha)),c&&u===f-1)break;d.pack(B,h,b),b+=3,l(n)&&(m=n[u],g[S++]=G.floatToByte(m.red),g[S++]=G.floatToByte(m.green),g[S++]=G.floatToByte(m.blue),g[S++]=G.floatToByte(m.alpha))}}let y=new Cn;y.position=new De({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:h}),l(n)&&(y.color=new De({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:4,values:g,normalize:!0})),p=h.length/3;let C=(p-1)*2,E=Qe.createTypedArray(p,C),I=0;for(u=0;u<p-1;++u)E[I++]=u,E[I++]=u+1;return new ht({attributes:y,indices:E,primitiveType:Ne.LINES,boundingSphere:le.fromPoints(t)})};var oee=D3;function qw(e){let t=e.radius??1,i={radii:new d(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new Ca(i),this._workerName="createSphereGeometry"}qw.packedLength=Ca.packedLength;qw.pack=function(e,t,n){return Ca.pack(e._ellipsoidGeometry,t,n)};var WDt=new Ca,SC={radius:void 0,radii:new d,vertexFormat:new Re,stackPartitions:void 0,slicePartitions:void 0};qw.unpack=function(e,t,n){let i=Ca.unpack(e,t,WDt);return SC.vertexFormat=Re.clone(i._vertexFormat,SC.vertexFormat),SC.stackPartitions=i._stackPartitions,SC.slicePartitions=i._slicePartitions,l(n)?(d.clone(i._radii,SC.radii),n._ellipsoidGeometry=new Ca(SC),n):(SC.radius=i._radii.x,new qw(SC))};qw.createGeometry=function(e){return Ca.createGeometry(e._ellipsoidGeometry)};var ree=qw;function wC(e){}Object.defineProperties(wC.prototype,{ellipsoid:{get:he.throwInstantiationError},rectangle:{get:he.throwInstantiationError},projection:{get:he.throwInstantiationError}});wC.prototype.getNumberOfXTilesAtLevel=he.throwInstantiationError;wC.prototype.getNumberOfYTilesAtLevel=he.throwInstantiationError;wC.prototype.rectangleToNativeRectangle=he.throwInstantiationError;wC.prototype.tileXYToNativeRectangle=he.throwInstantiationError;wC.prototype.tileXYToRectangle=he.throwInstantiationError;wC.prototype.positionToTileXY=he.throwInstantiationError;var see=wC;function jDt(e,t){this.rectangle=e,this.maxLevel=t}function gSe(e){this.ellipsoid=e.ellipsoid??ne.default,this.tilingScheme=void 0,this.heightmapWidth=void 0,this.heightmapHeight=void 0,this.levelZeroMaximumGeometricError=void 0,this.rectangles=[]}gSe.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 YDt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new oo({ellipsoid:e.ellipsoid});else throw new ce(`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=Es.getEstimatedLevelZeroGeometricErrorForAHeightmap(e.ellipsoid,Math.min(e.heightmapWidth,e.heightmapHeight),e.tilingScheme.getNumberOfXTilesAtLevel(0));let o=t.getElementsByTagName("DataExtent");for(let r=0;r<o.length;++r){let s=o[r],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"))),h=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new jDt(new ae(a,c,u,f),h))}}function qDt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Qo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new ce(i)}async function KDt(e,t,n){try{let i=await t.fetchXML();YDt(e,i)}catch(i){qDt(t,i,n)}}function BC(e){e=e??V.EMPTY_OBJECT,this._errorEvent=new ge,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 Bt(t)),this._credit=t,this._tilingScheme=void 0,this._rectangles=[]}Object.defineProperties(BC.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(){}}});BC.fromUrl=async function(e,t){t=t??V.EMPTY_OBJECT;let n=new gSe(t),i=we.createIfNeeded(e);await KDt(n,i);let o=new BC(t);return n.build(o),o._resource=i,o};BC.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-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 yc({buffer:rh(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:XDt(a,e,t,n),structure:a._terrainDataStructure})})};BC.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var _Se=new ae;function XDt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let u=r[c];if(u.maxLevel<=i)continue;let f=u.rectangle,h=ae.intersection(f,s,_Se);l(h)&&(d5(o,f,t*2,n*2,i+1)&&(a|=4),d5(o,f,t*2+1,n*2,i+1)&&(a|=8),d5(o,f,t*2,n*2+1,i+1)&&(a|=1),d5(o,f,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function d5(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(ae.intersection(r,t,_Se))}BC.prototype.getTileDataAvailable=function(e,t,n){};BC.prototype.loadTileDataAvailability=function(e,t,n){};var aee=BC;function bx(e){e=e??V.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??Ye.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(bx.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(bx.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=JDt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});bx.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,ue(this)};bx.prototype.isDestroyed=function(){return!1};bx.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};bx.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 o=e.currentTime,r=this.epoch??Ye.MINIMUM_VALUE,s=K.secondsDifference(o,r),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 JDt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var cee=bx;var ZDt={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},lee=Object.freeze(ZDt);function ySe(e,t){return Vs("defaultValue","defaultValue has been deprecated and will be removed in Cesium 1.134. Use the nullish coalescing operator instead: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing"),e??t}Object.defineProperty(ySe,"EMPTY_OBJECT",{get:function(){return Vs("defaultValue.EMPTY_OBJECT","defaultValue.EMPTY_OBJECT has been deprecated and will be removed in Cesium 1.134. Use Frozen.EMPTY_OBJECT instead"),V.EMPTY_OBJECT}});var uee=ySe;var $Dt=new d;function evt(e,t,n,i){let o=KC(e,t,n,i,$Dt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var fee=evt;function tvt(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 dee=tvt;function nvt(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var v3=nvt;var hee=`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); } `;function ivt(e){e=e??V.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??$e.RGBA,this.pixelDatatype=e.pixelDatatype??Ve.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=we.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?Pn.REPEAT:Pn.CLAMP_TO_EDGE;this.sampler=new nn({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var mee=ivt;var ovt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"},pee=Object.freeze(ovt);var rvt={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"},Aee=Object.freeze(rvt);function svt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${tp(s)} with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}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 gee=svt;globalThis.CESIUM_VERSION="1.131";var P3;typeof ko<"u"&&(P3=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,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),function(s){s(t.ko={})}(function(s,a){function c(A,x){return A===null||typeof A in _?A===x:!1}function u(A,x){var T;return function(){T||(T=m.a.setTimeout(function(){T=e,A()},x))}}function f(A,x){var T;return function(){clearTimeout(T),T=m.a.setTimeout(A,x)}}function h(A,x){x&&x!=="change"?x==="beforeChange"?this.pc(A):this.gb(A,x):this.qc(A)}function p(A,x){x!==null&&x.s&&x.s()}function g(A,x){var T=this.qd,w=T[b];w.ra||(this.Qb&&this.mb[x]?(T.uc(x,A,this.mb[x]),this.mb[x]=null,--this.Qb):w.I[x]||T.uc(x,A,w.J?{da:A}:T.$c(A)),A.Ja&&A.gd())}var m=typeof s<"u"?s:{};m.b=function(A,x){for(var T=A.split("."),w=m,R=0;R<T.length-1;R++)w=w[T[R]];w[T[T.length-1]]=x},m.L=function(A,x,T){A[x]=T},m.version="3.5.1",m.b("version",m.version),m.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},m.a=function(){function A(Y,$){for(var J in Y)R.call(Y,J)&&$(J,Y[J])}function x(Y,$){if($)for(var J in $)R.call($,J)&&(Y[J]=$[J]);return Y}function T(Y,$){return Y.__proto__=$,Y}function w(Y,$,J,pe){var Ce=Y[$].match(j)||[];m.a.D(J.match(j),function(fe){m.a.Na(Ce,fe,pe)}),Y[$]=Ce.join(" ")}var R=Object.prototype.hasOwnProperty,O={__proto__:[]}instanceof Array,k=typeof Symbol=="function",F={},z={};F[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],F.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),A(F,function(Y,$){if($.length)for(var J=0,pe=$.length;J<pe;J++)z[$[J]]=Y});var Q={propertychange:!0},H=n&&function(){for(var Y=3,$=n.createElement("div"),J=$.getElementsByTagName("i");$.innerHTML="<!--[if gt IE "+ ++Y+"]><i></i><![endif]-->",J[0];);return 4<Y?Y:e}(),j=/\S+/g,Z;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(Y,$,J){for(var pe=0,Ce=Y.length;pe<Ce;pe++)$.call(J,Y[pe],pe,Y)},A:typeof Array.prototype.indexOf=="function"?function(Y,$){return Array.prototype.indexOf.call(Y,$)}:function(Y,$){for(var J=0,pe=Y.length;J<pe;J++)if(Y[J]===$)return J;return-1},Lb:function(Y,$,J){for(var pe=0,Ce=Y.length;pe<Ce;pe++)if($.call(J,Y[pe],pe,Y))return Y[pe];return e},Pa:function(Y,$){var J=m.a.A(Y,$);0<J?Y.splice(J,1):J===0&&Y.shift()},wc:function(Y){var $=[];return Y&&m.a.D(Y,function(J){0>m.a.A($,J)&&$.push(J)}),$},Mb:function(Y,$,J){var pe=[];if(Y)for(var Ce=0,fe=Y.length;Ce<fe;Ce++)pe.push($.call(J,Y[Ce],Ce));return pe},jb:function(Y,$,J){var pe=[];if(Y)for(var Ce=0,fe=Y.length;Ce<fe;Ce++)$.call(J,Y[Ce],Ce)&&pe.push(Y[Ce]);return pe},Nb:function(Y,$){if($ instanceof Array)Y.push.apply(Y,$);else for(var J=0,pe=$.length;J<pe;J++)Y.push($[J]);return Y},Na:function(Y,$,J){var pe=m.a.A(m.a.bc(Y),$);0>pe?J&&Y.push($):J||Y.splice(pe,1)},Ba:O,extend:x,setPrototypeOf:T,Ab:O?T:x,P:A,Ga:function(Y,$,J){if(!Y)return Y;var pe={},Ce;for(Ce in Y)R.call(Y,Ce)&&(pe[Ce]=$.call(J,Y[Ce],Ce,Y));return pe},Tb:function(Y){for(;Y.firstChild;)m.removeNode(Y.firstChild)},Yb:function(Y){Y=m.a.la(Y);for(var $=(Y[0]&&Y[0].ownerDocument||n).createElement("div"),J=0,pe=Y.length;J<pe;J++)$.appendChild(m.oa(Y[J]));return $},Ca:function(Y,$){for(var J=0,pe=Y.length,Ce=[];J<pe;J++){var fe=Y[J].cloneNode(!0);Ce.push($?m.oa(fe):fe)}return Ce},va:function(Y,$){if(m.a.Tb(Y),$)for(var J=0,pe=$.length;J<pe;J++)Y.appendChild($[J])},Xc:function(Y,$){var J=Y.nodeType?[Y]:Y;if(0<J.length){for(var pe=J[0],Ce=pe.parentNode,fe=0,ye=$.length;fe<ye;fe++)Ce.insertBefore($[fe],pe);for(fe=0,ye=J.length;fe<ye;fe++)m.removeNode(J[fe])}},Ua:function(Y,$){if(Y.length){for($=$.nodeType===8&&$.parentNode||$;Y.length&&Y[0].parentNode!==$;)Y.splice(0,1);for(;1<Y.length&&Y[Y.length-1].parentNode!==$;)Y.length--;if(1<Y.length){var J=Y[0],pe=Y[Y.length-1];for(Y.length=0;J!==pe;)Y.push(J),J=J.nextSibling;Y.push(pe)}}return Y},Zc:function(Y,$){7>H?Y.setAttribute("selected",$):Y.selected=$},Db:function(Y){return Y===null||Y===e?"":Y.trim?Y.trim():Y.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(Y,$){return Y=Y||"",$.length>Y.length?!1:Y.substring(0,$.length)===$},vd:function(Y,$){if(Y===$)return!0;if(Y.nodeType===11)return!1;if($.contains)return $.contains(Y.nodeType!==1?Y.parentNode:Y);if($.compareDocumentPosition)return($.compareDocumentPosition(Y)&16)==16;for(;Y&&Y!=$;)Y=Y.parentNode;return!!Y},Sb:function(Y){return m.a.vd(Y,Y.ownerDocument.documentElement)},kd:function(Y){return!!m.a.Lb(Y,m.a.Sb)},R:function(Y){return Y&&Y.tagName&&Y.tagName.toLowerCase()},Ac:function(Y){return m.onError?function(){try{return Y.apply(this,arguments)}catch($){throw m.onError&&m.onError($),$}}:Y},setTimeout:function(Y,$){return setTimeout(m.a.Ac(Y),$)},Gc:function(Y){setTimeout(function(){throw m.onError&&m.onError(Y),Y},0)},B:function(Y,$,J){var pe=m.a.Ac(J);if(J=Q[$],m.options.useOnlyNativeEvents||J||!o)if(J||typeof Y.addEventListener!="function")if(typeof Y.attachEvent<"u"){var Ce=function(ye){pe.call(Y,ye)},fe="on"+$;Y.attachEvent(fe,Ce),m.a.K.za(Y,function(){Y.detachEvent(fe,Ce)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else Y.addEventListener($,pe,!1);else Z||(Z=typeof o(Y).on=="function"?"on":"bind"),o(Y)[Z]($,pe)},Fb:function(Y,$){if(!Y||!Y.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var J;if(m.a.R(Y)==="input"&&Y.type&&$.toLowerCase()=="click"?(J=Y.type,J=J=="checkbox"||J=="radio"):J=!1,m.options.useOnlyNativeEvents||!o||J)if(typeof n.createEvent=="function")if(typeof Y.dispatchEvent=="function")J=n.createEvent(z[$]||"HTMLEvents"),J.initEvent($,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,Y),Y.dispatchEvent(J);else throw Error("The supplied element doesn't support dispatchEvent");else if(J&&Y.click)Y.click();else if(typeof Y.fireEvent<"u")Y.fireEvent("on"+$);else throw Error("Browser doesn't support triggering events");else o(Y).trigger($)},f:function(Y){return m.O(Y)?Y():Y},bc:function(Y){return m.O(Y)?Y.v():Y},Eb:function(Y,$,J){var pe;$&&(typeof Y.classList=="object"?(pe=Y.classList[J?"add":"remove"],m.a.D($.match(j),function(Ce){pe.call(Y.classList,Ce)})):typeof Y.className.baseVal=="string"?w(Y.className,"baseVal",$,J):w(Y,"className",$,J))},Bb:function(Y,$){var J=m.a.f($);(J===null||J===e)&&(J="");var pe=m.h.firstChild(Y);!pe||pe.nodeType!=3||m.h.nextSibling(pe)?m.h.va(Y,[Y.ownerDocument.createTextNode(J)]):pe.data=J,m.a.Ad(Y)},Yc:function(Y,$){if(Y.name=$,7>=H)try{var J=Y.name.replace(/[&<>'"]/g,function(pe){return"&#"+pe.charCodeAt(0)+";"});Y.mergeAttributes(n.createElement("<input name='"+J+"'/>"),!1)}catch{}},Ad:function(Y){9<=H&&(Y=Y.nodeType==1?Y:Y.parentNode,Y.style&&(Y.style.zoom=Y.style.zoom))},wd:function(Y){if(H){var $=Y.style.width;Y.style.width=0,Y.style.width=$}},Pd:function(Y,$){Y=m.a.f(Y),$=m.a.f($);for(var J=[],pe=Y;pe<=$;pe++)J.push(pe);return J},la:function(Y){for(var $=[],J=0,pe=Y.length;J<pe;J++)$.push(Y[J]);return $},Da:function(Y){return k?Symbol(Y):Y},Zd:H===6,$d:H===7,W:H,Lc:function(Y,$){for(var J=m.a.la(Y.getElementsByTagName("input")).concat(m.a.la(Y.getElementsByTagName("textarea"))),pe=typeof $=="string"?function(ye){return ye.name===$}:function(ye){return $.test(ye.name)},Ce=[],fe=J.length-1;0<=fe;fe--)pe(J[fe])&&Ce.push(J[fe]);return Ce},Nd:function(Y){return typeof Y=="string"&&(Y=m.a.Db(Y))?r&&r.parse?r.parse(Y):new Function("return "+Y)():null},hc:function(Y,$,J){if(!r||!r.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 r.stringify(m.a.f(Y),$,J)},Od:function(Y,$,J){J=J||{};var pe=J.params||{},Ce=J.includeFields||this.Jc,fe=Y;if(typeof Y=="object"&&m.a.R(Y)==="form")for(var fe=Y.action,ye=Ce.length-1;0<=ye;ye--)for(var Ie=m.a.Lc(Y,Ce[ye]),ve=Ie.length-1;0<=ve;ve--)pe[Ie[ve].name]=Ie[ve].value;$=m.a.f($);var be=n.createElement("form");be.style.display="none",be.action=fe,be.method="post";for(var ze in $)Y=n.createElement("input"),Y.type="hidden",Y.name=ze,Y.value=m.a.hc(m.a.f($[ze])),be.appendChild(Y);A(pe,function(We,tt){var Mt=n.createElement("input");Mt.type="hidden",Mt.name=We,Mt.value=tt,be.appendChild(Mt)}),n.body.appendChild(be),J.submitter?J.submitter(be):be.submit(),setTimeout(function(){be.parentNode.removeChild(be)},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(A){var x=this;if(arguments.length===1)return function(){return x.apply(A,arguments)};var T=Array.prototype.slice.call(arguments,1);return function(){var w=T.slice(0);return w.push.apply(w,arguments),x.apply(A,w)}}),m.a.g=new function(){var A=0,x="__ko__"+new Date().getTime(),T={},w,R;return m.a.W?(w=function(O,k){var F=O[x];if(!F||F==="null"||!T[F]){if(!k)return e;F=O[x]="ko"+A++,T[F]={}}return T[F]},R=function(O){var k=O[x];return k?(delete T[k],O[x]=null,!0):!1}):(w=function(O,k){var F=O[x];return!F&&k&&(F=O[x]={}),F},R=function(O){return O[x]?(delete O[x],!0):!1}),{get:function(O,k){var F=w(O,!1);return F&&F[k]},set:function(O,k,F){(O=w(O,F!==e))&&(O[k]=F)},Ub:function(O,k,F){return O=w(O,!0),O[k]||(O[k]=F)},clear:R,Z:function(){return A+++x}}},m.b("utils.domData",m.a.g),m.b("utils.domData.clear",m.a.g.clear),m.a.K=new function(){function A(k,F){var z=m.a.g.get(k,w);return z===e&&F&&(z=[],m.a.g.set(k,w,z)),z}function x(k){var F=A(k,!1);if(F)for(var F=F.slice(0),z=0;z<F.length;z++)F[z](k);m.a.g.clear(k),m.a.K.cleanExternalData(k),O[k.nodeType]&&T(k.childNodes,!0)}function T(k,F){for(var z=[],Q,H=0;H<k.length;H++)if((!F||k[H].nodeType===8)&&(x(z[z.length]=Q=k[H]),k[H]!==Q))for(;H--&&m.a.A(z,k[H])==-1;);}var w=m.a.g.Z(),R={1:!0,8:!0,9:!0},O={1:!0,9:!0};return{za:function(k,F){if(typeof F!="function")throw Error("Callback must be a function");A(k,!0).push(F)},yb:function(k,F){var z=A(k,!1);z&&(m.a.Pa(z,F),z.length==0&&m.a.g.set(k,w,e))},oa:function(k){return m.u.G(function(){R[k.nodeType]&&(x(k),O[k.nodeType]&&T(k.getElementsByTagName("*")))}),k},removeNode:function(k){m.oa(k),k.parentNode&&k.parentNode.removeChild(k)},cleanExternalData:function(k){o&&typeof o.cleanData=="function"&&o.cleanData([k])}}},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 A=[0,"",""],x=[1,"<table>","</table>"],T=[3,"<table><tbody><tr>","</tr></tbody></table>"],w=[1,"<select multiple='multiple'>","</select>"],R={thead:x,tbody:x,tfoot:x,tr:[2,"<table><tbody>","</tbody></table>"],td:T,th:T,option:w,optgroup:w},O=8>=m.a.W;m.a.ua=function(k,F){var z;if(o){if(o.parseHTML)z=o.parseHTML(k,F)||[];else if((z=o.clean([k],F))&&z[0]){for(var Q=z[0];Q.parentNode&&Q.parentNode.nodeType!==11;)Q=Q.parentNode;Q.parentNode&&Q.parentNode.removeChild(Q)}}else{(z=F)||(z=n);var Q=z.parentWindow||z.defaultView||t,H=m.a.Db(k).toLowerCase(),j=z.createElement("div"),Z;for(Z=(H=H.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&R[H[1]]||A,H=Z[0],Z="ignored<div>"+Z[1]+k+Z[2]+"</div>",typeof Q.innerShiv=="function"?j.appendChild(Q.innerShiv(Z)):(O&&z.body.appendChild(j),j.innerHTML=Z,O&&j.parentNode.removeChild(j));H--;)j=j.lastChild;z=m.a.la(j.lastChild.childNodes)}return z},m.a.Md=function(k,F){var z=m.a.ua(k,F);return z.length&&z[0].parentElement||m.a.Yb(z)},m.a.fc=function(k,F){if(m.a.Tb(k),F=m.a.f(F),F!==null&&F!==e)if(typeof F!="string"&&(F=F.toString()),o)o(k).html(F);else for(var z=m.a.ua(F,k.ownerDocument),Q=0;Q<z.length;Q++)k.appendChild(z[Q])}}(),m.b("utils.parseHtmlFragment",m.a.ua),m.b("utils.setHtml",m.a.fc),m.aa=function(){function A(T,w){if(T){if(T.nodeType==8){var R=m.aa.Uc(T.nodeValue);R!=null&&w.push({ud:T,Kd:R})}else if(T.nodeType==1)for(var R=0,O=T.childNodes,k=O.length;R<k;R++)A(O[R],w)}}var x={};return{Xb:function(T){if(typeof T!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var w=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return x[w]=T,"<!--[ko_memo:"+w+"]-->"},bd:function(T,w){var R=x[T];if(R===e)throw Error("Couldn't find any memo with ID "+T+". Perhaps it's already been unmemoized.");try{return R.apply(null,w||[]),!0}finally{delete x[T]}},cd:function(T,w){var R=[];A(T,R);for(var O=0,k=R.length;O<k;O++){var F=R[O].ud,z=[F];w&&m.a.Nb(z,w),m.aa.bd(R[O].Kd,z),F.nodeValue="",F.parentNode&&F.parentNode.removeChild(F)}},Uc:function(T){return(T=T.match(/^\[ko_memo\:(.*?)\]$/))?T[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 A(){if(R){for(var F=R,z=0,Q;k<R;)if(Q=w[k++]){if(k>F){if(5e3<=++z){k=R,m.a.Gc(Error("'Too much recursion' after processing "+z+" task groups."));break}F=R}try{Q()}catch(H){m.a.Gc(H)}}}}function x(){A(),k=R=w.length=0}var T,w=[],R=0,O=1,k=0;return t.MutationObserver?T=function(F){var z=n.createElement("div");return new MutationObserver(F).observe(z,{attributes:!0}),function(){z.classList.toggle("foo")}}(x):T=n&&"onreadystatechange"in n.createElement("script")?function(F){var z=n.createElement("script");z.onreadystatechange=function(){z.onreadystatechange=null,n.documentElement.removeChild(z),z=null,F()},n.documentElement.appendChild(z)}:function(F){setTimeout(F,0)},{scheduler:T,zb:function(F){return R||m.na.scheduler(x),w[R++]=F,O++},cancel:function(F){F=F-(O-R),F>=k&&F<R&&(w[F]=null)},resetForTesting:function(){var F=R-k;return k=R=w.length=0,F},Sd:A}}(),m.b("tasks",m.na),m.b("tasks.schedule",m.na.zb),m.b("tasks.runEarly",m.na.Sd),m.Ta={throttle:function(A,x){A.throttleEvaluation=x;var T=null;return m.$({read:A,write:function(w){clearTimeout(T),T=m.a.setTimeout(function(){A(w)},x)}})},rateLimit:function(A,x){var T,w,R;typeof x=="number"?T=x:(T=x.timeout,w=x.method),A.Hb=!1,R=typeof w=="function"?w:w=="notifyWhenChangesStop"?f:u,A.ub(function(O){return R(O,T,x)})},deferred:function(A,x){if(x!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");A.Hb||(A.Hb=!0,A.ub(function(T){var w,R=!1;return function(){if(!R){m.na.cancel(w),w=m.na.zb(T);try{R=!0,A.notifySubscribers(e,"dirty")}finally{R=!1}}}}))},notify:function(A,x){A.equalityComparer=x=="always"?null:c}};var _={undefined:1,boolean:1,number:1,string:1};m.b("extenders",m.Ta),m.ic=function(A,x,T){this.da=A,this.lc=x,this.mc=T,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(A){this.Jb=A,m.a.K.za(A,this.fb=this.s.bind(this))},m.T=function(){m.a.Ab(this,y),y.qb(this)};var y={qb:function(A){A.U={change:[]},A.sc=1},subscribe:function(A,x,T){var w=this;T=T||"change";var R=new m.ic(w,x?A.bind(x):A,function(){m.a.Pa(w.U[T],R),w.hb&&w.hb(T)});return w.Qa&&w.Qa(T),w.U[T]||(w.U[T]=[]),w.U[T].push(R),R},notifySubscribers:function(A,x){if(x=x||"change",x==="change"&&this.Gb(),this.Wa(x)){var T=x==="change"&&this.ed||this.U[x].slice(0);try{m.u.xc();for(var w=0,R;R=T[w];++w)R.Ib||R.lc(A)}finally{m.u.end()}}},ob:function(){return this.sc},Dd:function(A){return this.ob()!==A},Gb:function(){++this.sc},ub:function(A){var x=this,T=m.O(x),w,R,O,k,F;x.gb||(x.gb=x.notifySubscribers,x.notifySubscribers=h);var z=A(function(){x.Ja=!1,T&&k===x&&(k=x.nc?x.nc():x());var Q=R||F&&x.sb(O,k);F=R=w=!1,Q&&x.gb(O=k)});x.qc=function(Q,H){H&&x.Ja||(F=!H),x.ed=x.U.change.slice(0),x.Ja=w=!0,k=Q,z()},x.pc=function(Q){w||(O=Q,x.gb(Q,"beforeChange"))},x.rc=function(){F=!0},x.gd=function(){x.sb(O,x.v(!0))&&(R=!0)}},Wa:function(A){return this.U[A]&&this.U[A].length},Bd:function(A){if(A)return this.U[A]&&this.U[A].length||0;var x=0;return m.a.P(this.U,function(T,w){T!=="dirty"&&(x+=w.length)}),x},sb:function(A,x){return!this.equalityComparer||!this.equalityComparer(A,x)},toString:function(){return"[object Object]"},extend:function(A){var x=this;return A&&m.a.P(A,function(T,w){var R=m.Ta[T];typeof R=="function"&&(x=R(x,w)||x)}),x}};m.L(y,"init",y.qb),m.L(y,"subscribe",y.subscribe),m.L(y,"extend",y.extend),m.L(y,"getSubscriptionsCount",y.Bd),m.a.Ba&&m.a.setPrototypeOf(y,Function.prototype),m.T.fn=y,m.Qc=function(A){return A!=null&&typeof A.subscribe=="function"&&typeof A.notifySubscribers=="function"},m.b("subscribable",m.T),m.b("isSubscribable",m.Qc),m.S=m.u=function(){function A(O){T.push(w),w=O}function x(){w=T.pop()}var T=[],w,R=0;return{xc:A,end:x,cc:function(O){if(w){if(!m.Qc(O))throw Error("Only subscribable things can act as dependencies");w.od.call(w.pd,O,O.fd||(O.fd=++R))}},G:function(O,k,F){try{return A(),O.apply(k,F||[])}finally{x()}},qa:function(){if(w)return w.o.qa()},Va:function(){if(w)return w.o.Va()},Ya:function(){if(w)return w.Ya},o:function(){if(w)return w.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 C=m.a.Da("_latestValue");m.ta=function(A){function x(){return 0<arguments.length?(x.sb(x[C],arguments[0])&&(x.ya(),x[C]=arguments[0],x.xa()),this):(m.u.cc(x),x[C])}return x[C]=A,m.a.Ba||m.a.extend(x,m.T.fn),m.T.fn.qb(x),m.a.Ab(x,E),m.options.deferUpdates&&m.Ta.deferred(x,!0),x};var E={equalityComparer:c,v:function(){return this[C]},xa:function(){this.notifySubscribers(this[C],"spectate"),this.notifySubscribers(this[C])},ya:function(){this.notifySubscribers(this[C],"beforeChange")}};m.a.Ba&&m.a.setPrototypeOf(E,m.T.fn);var I=m.ta.Ma="__ko_proto__";E[I]=m.ta,m.O=function(A){if((A=typeof A=="function"&&A[I])&&A!==E[I]&&A!==m.o.fn[I])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!A},m.Za=function(A){return typeof A=="function"&&(A[I]===E[I]||A[I]===m.o.fn[I]&&A.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",E),m.L(E,"peek",E.v),m.L(E,"valueHasMutated",E.xa),m.L(E,"valueWillMutate",E.ya),m.Ha=function(A){if(A=A||[],typeof A!="object"||!("length"in A))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return A=m.ta(A),m.a.Ab(A,m.Ha.fn),A.extend({trackArrayChanges:!0})},m.Ha.fn={remove:function(A){for(var x=this.v(),T=[],w=typeof A!="function"||m.O(A)?function(k){return k===A}:A,R=0;R<x.length;R++){var O=x[R];if(w(O)){if(T.length===0&&this.ya(),x[R]!==O)throw Error("Array modified during remove; cannot remove item");T.push(O),x.splice(R,1),R--}}return T.length&&this.xa(),T},removeAll:function(A){if(A===e){var x=this.v(),T=x.slice(0);return this.ya(),x.splice(0,x.length),this.xa(),T}return A?this.remove(function(w){return 0<=m.a.A(A,w)}):[]},destroy:function(A){var x=this.v(),T=typeof A!="function"||m.O(A)?function(O){return O===A}:A;this.ya();for(var w=x.length-1;0<=w;w--){var R=x[w];T(R)&&(R._destroy=!0)}this.xa()},destroyAll:function(A){return A===e?this.destroy(function(){return!0}):A?this.destroy(function(x){return 0<=m.a.A(A,x)}):[]},indexOf:function(A){var x=this();return m.a.A(x,A)},replace:function(A,x){var T=this.indexOf(A);0<=T&&(this.ya(),this.v()[T]=x,this.xa())},sorted:function(A){var x=this().slice(0);return A?x.sort(A):x.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(A){m.Ha.fn[A]=function(){var x=this.v();this.ya(),this.zc(x,A,arguments);var T=x[A].apply(x,arguments);return this.xa(),T===x?this:T}}),m.a.D(["slice"],function(A){m.Ha.fn[A]=function(){var x=this();return x[A].apply(x,arguments)}}),m.Pc=function(A){return m.O(A)&&typeof A.remove=="function"&&typeof A.push=="function"},m.b("observableArray",m.Ha),m.b("isObservableArray",m.Pc),m.Ta.trackArrayChanges=function(A,x){function T(){function j(){if(F){var Z=[].concat(A.v()||[]),Y;A.Wa("arrayChange")&&((!R||1<F)&&(R=m.a.Pb(z,Z,A.Ob)),Y=R),z=Z,R=null,F=0,Y&&Y.length&&A.notifySubscribers(Y,"arrayChange")}}w?j():(w=!0,k=A.subscribe(function(){++F},null,"spectate"),z=[].concat(A.v()||[]),R=null,O=A.subscribe(j))}if(A.Ob={},x&&typeof x=="object"&&m.a.extend(A.Ob,x),A.Ob.sparse=!0,!A.zc){var w=!1,R=null,O,k,F=0,z,Q=A.Qa,H=A.hb;A.Qa=function(j){Q&&Q.call(A,j),j==="arrayChange"&&T()},A.hb=function(j){H&&H.call(A,j),j!=="arrayChange"||A.Wa("arrayChange")||(O&&O.s(),k&&k.s(),k=O=null,w=!1,z=e)},A.zc=function(j,Z,Y){function $(be,ze,We){return J[J.length]={status:be,value:ze,index:We}}if(w&&!F){var J=[],pe=j.length,Ce=Y.length,fe=0;switch(Z){case"push":fe=pe;case"unshift":for(Z=0;Z<Ce;Z++)$("added",Y[Z],fe+Z);break;case"pop":fe=pe-1;case"shift":pe&&$("deleted",j[fe],fe);break;case"splice":Z=Math.min(Math.max(0,0>Y[0]?pe+Y[0]:Y[0]),pe);for(var pe=Ce===1?pe:Math.min(Z+(Y[1]||0),pe),Ce=Z+Ce-2,fe=Math.max(pe,Ce),ye=[],Ie=[],ve=2;Z<fe;++Z,++ve)Z<pe&&Ie.push($("deleted",j[Z],Z)),Z<Ce&&ye.push($("added",Y[ve],Z));m.a.Kc(Ie,ye);break;default:return}R=J}}}};var b=m.a.Da("_state");m.o=m.$=function(A,x,T){function w(){if(0<arguments.length){if(typeof R=="function")R.apply(O.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 O.ra||m.u.cc(w),(O.ka||O.J&&w.Xa())&&w.ha(),O.X}if(typeof A=="object"?T=A:(T=T||{},A&&(T.read=A)),typeof T.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var R=T.write,O={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:T.read,nb:x||T.owner,l:T.disposeWhenNodeIsRemoved||T.l||null,Sa:T.disposeWhen||T.Sa,Rb:null,I:{},V:0,Ic:null};return w[b]=O,w.Nc=typeof R=="function",m.a.Ba||m.a.extend(w,m.T.fn),m.T.fn.qb(w),m.a.Ab(w,S),T.pure?(O.wb=!0,O.J=!0,m.a.extend(w,B)):T.deferEvaluation&&m.a.extend(w,v),m.options.deferUpdates&&m.Ta.deferred(w,!0),O.l&&(O.jc=!0,O.l.nodeType||(O.l=null)),O.J||T.deferEvaluation||w.ha(),O.l&&w.ja()&&m.a.K.za(O.l,O.Rb=function(){w.s()}),w};var S={equalityComparer:c,qa:function(){return this[b].V},Va:function(){var A=[];return m.a.P(this[b].I,function(x,T){A[T.Ka]=T.da}),A},Vb:function(A){if(!this[b].V)return!1;var x=this.Va();return m.a.A(x,A)!==-1?!0:!!m.a.Lb(x,function(T){return T.Vb&&T.Vb(A)})},uc:function(A,x,T){if(this[b].wb&&x===this)throw Error("A 'pure' computed must not be called recursively");this[b].I[A]=T,T.Ka=this[b].V++,T.La=x.ob()},Xa:function(){var A,x,T=this[b].I;for(A in T)if(Object.prototype.hasOwnProperty.call(T,A)&&(x=T[A],this.Ia&&x.da.Ja||x.da.Dd(x.La)))return!0},Jd:function(){this.Ia&&!this[b].rb&&this.Ia(!1)},ja:function(){var A=this[b];return A.ka||0<A.V},Rd:function(){this.Ja?this[b].ka&&(this[b].sa=!0):this.Hc()},$c:function(A){if(A.Hb){var x=A.subscribe(this.Jd,this,"dirty"),T=A.subscribe(this.Rd,this);return{da:A,s:function(){x.s(),T.s()}}}return A.subscribe(this.Hc,this)},Hc:function(){var A=this,x=A.throttleEvaluation;x&&0<=x?(clearTimeout(this[b].Ic),this[b].Ic=m.a.setTimeout(function(){A.ha(!0)},x)):A.Ia?A.Ia(!0):A.ha(!0)},ha:function(A){var x=this[b],T=x.Sa,w=!1;if(!x.rb&&!x.ra){if(x.l&&!m.a.Sb(x.l)||T&&T()){if(!x.jc){this.s();return}}else x.jc=!1;x.rb=!0;try{w=this.zd(A)}finally{x.rb=!1}return w}},zd:function(A){var x=this[b],w=!1,T=x.wb?e:!x.V,w={qd:this,mb:x.I,Qb:x.V};m.u.xc({pd:w,od:g,o:this,Ya:T}),x.I={},x.V=0;var R=this.yd(x,w);return x.V?w=this.sb(x.X,R):(this.s(),w=!0),w&&(x.J?this.Gb():this.notifySubscribers(x.X,"beforeChange"),x.X=R,this.notifySubscribers(x.X,"spectate"),!x.J&&A&&this.notifySubscribers(x.X),this.rc&&this.rc()),T&&this.notifySubscribers(x.X,"awake"),w},yd:function(A,x){try{var T=A.Wc;return A.nb?T.call(A.nb):T()}finally{m.u.end(),x.Qb&&!A.J&&m.a.P(x.mb,p),A.sa=A.ka=!1}},v:function(A){var x=this[b];return(x.ka&&(A||!x.V)||x.J&&this.Xa())&&this.ha(),x.X},ub:function(A){m.T.fn.ub.call(this,A),this.nc=function(){return this[b].J||(this[b].sa?this.ha():this[b].ka=!1),this[b].X},this.Ia=function(x){this.pc(this[b].X),this[b].ka=!0,x&&(this[b].sa=!0),this.qc(this,!x)}},s:function(){var A=this[b];!A.J&&A.I&&m.a.P(A.I,function(x,T){T.s&&T.s()}),A.l&&A.Rb&&m.a.K.yb(A.l,A.Rb),A.I=e,A.V=0,A.ra=!0,A.sa=!1,A.ka=!1,A.J=!1,A.l=e,A.Sa=e,A.Wc=e,this.Nc||(A.nb=e)}},B={Qa:function(A){var x=this,T=x[b];if(!T.ra&&T.J&&A=="change"){if(T.J=!1,T.sa||x.Xa())T.I=null,T.V=0,x.ha()&&x.Gb();else{var w=[];m.a.P(T.I,function(R,O){w[O.Ka]=R}),m.a.D(w,function(R,O){var k=T.I[R],F=x.$c(k.da);F.Ka=O,F.La=k.La,T.I[R]=F}),x.Xa()&&x.ha()&&x.Gb()}T.ra||x.notifySubscribers(T.X,"awake")}},hb:function(A){var x=this[b];x.ra||A!="change"||this.Wa("change")||(m.a.P(x.I,function(T,w){w.s&&(x.I[T]={da:w.da,Ka:w.Ka,La:w.La},w.s())}),x.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var A=this[b];return A.J&&(A.sa||this.Xa())&&this.ha(),m.T.fn.ob.call(this)}},v={Qa:function(A){A!="change"&&A!="beforeChange"||this.v()}};m.a.Ba&&m.a.setPrototypeOf(S,m.T.fn);var P=m.ta.Ma;S[P]=m.o,m.Oc=function(A){return typeof A=="function"&&A[P]===S[P]},m.Fd=function(A){return m.Oc(A)&&A[b]&&A[b].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",S),m.L(S,"peek",S.v),m.L(S,"dispose",S.s),m.L(S,"isActive",S.ja),m.L(S,"getDependenciesCount",S.qa),m.L(S,"getDependencies",S.Va),m.xb=function(A,x){return typeof A=="function"?m.o(A,x,{pure:!0}):(A=m.a.extend({},A),A.pure=!0,m.o(A,x))},m.b("pureComputed",m.xb),function(){function A(w,R,O){if(O=O||new T,w=R(w),typeof w!="object"||w===null||w===e||w instanceof RegExp||w instanceof Date||w instanceof String||w instanceof Number||w instanceof Boolean)return w;var k=w instanceof Array?[]:{};return O.save(w,k),x(w,function(F){var z=R(w[F]);switch(typeof z){case"boolean":case"number":case"string":case"function":k[F]=z;break;case"object":case"undefined":var Q=O.get(z);k[F]=Q!==e?Q:A(z,R,O)}}),k}function x(w,R){if(w instanceof Array){for(var O=0;O<w.length;O++)R(O);typeof w.toJSON=="function"&&R("toJSON")}else for(O in w)R(O)}function T(){this.keys=[],this.values=[]}m.ad=function(w){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return A(w,function(R){for(var O=0;m.O(R)&&10>O;O++)R=R();return R})},m.toJSON=function(w,R,O){return w=m.ad(w),m.a.hc(w,R,O)},T.prototype={constructor:T,save:function(w,R){var O=m.a.A(this.keys,w);0<=O?this.values[O]=R:(this.keys.push(w),this.values.push(R))},get:function(w){return w=m.a.A(this.keys,w),0<=w?this.values[w]:e}}}(),m.b("toJS",m.ad),m.b("toJSON",m.toJSON),m.Wd=function(A,x,T){function w(R){var O=m.xb(A,T).extend({ma:"always"}),k=O.subscribe(function(F){F&&(k.s(),R(F))});return O.notifySubscribers(O.v()),k}return typeof Promise!="function"||x?w(x.bind(T)):new Promise(w)},m.b("when",m.Wd),function(){m.w={M:function(A){switch(m.a.R(A)){case"option":return A.__ko__hasDomDataOptionValue__===!0?m.a.g.get(A,m.c.options.$b):7>=m.a.W?A.getAttributeNode("value")&&A.getAttributeNode("value").specified?A.value:A.text:A.value;case"select":return 0<=A.selectedIndex?m.w.M(A.options[A.selectedIndex]):e;default:return A.value}},cb:function(A,x,T){switch(m.a.R(A)){case"option":typeof x=="string"?(m.a.g.set(A,m.c.options.$b,e),"__ko__hasDomDataOptionValue__"in A&&delete A.__ko__hasDomDataOptionValue__,A.value=x):(m.a.g.set(A,m.c.options.$b,x),A.__ko__hasDomDataOptionValue__=!0,A.value=typeof x=="number"?x:"");break;case"select":(x===""||x===null)&&(x=e);for(var w=-1,R=0,O=A.options.length,k;R<O;++R)if(k=m.w.M(A.options[R]),k==x||k===""&&x===e){w=R;break}(T||0<=w||x===e&&1<A.size)&&(A.selectedIndex=w,m.a.W===6&&m.a.setTimeout(function(){A.selectedIndex=w},0));break;default:(x===null||x===e)&&(x=""),A.value=x}}}}(),m.b("selectExtensions",m.w),m.b("selectExtensions.readValue",m.w.M),m.b("selectExtensions.writeValue",m.w.cb),m.m=function(){function A(F){F=m.a.Db(F),F.charCodeAt(0)===123&&(F=F.slice(1,-1)),F+=` ,`;var z=[],Q=F.match(w),H,j=[],Z=0;if(1<Q.length){for(var Y=0,$;$=Q[Y];++Y){var J=$.charCodeAt(0);if(J===44){if(0>=Z){z.push(H&&j.length?{key:H,value:j.join("")}:{unknown:H||j.join("")}),H=Z=0,j=[];continue}}else if(J===58){if(!Z&&!H&&j.length===1){H=j.pop();continue}}else{if(J===47&&1<$.length&&($.charCodeAt(1)===47||$.charCodeAt(1)===42))continue;J===47&&Y&&1<$.length?(J=Q[Y-1].match(R))&&!O[J[0]]&&(F=F.substr(F.indexOf($)+1),Q=F.match(w),Y=-1,$="/"):J===40||J===123||J===91?++Z:J===41||J===125||J===93?--Z:H||j.length||J!==34&&J!==39||($=$.slice(1,-1))}j.push($)}if(0<Z)throw Error("Unbalanced parentheses, braces, or brackets")}return z}var x=["true","false","null","undefined"],T=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,w=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.* |/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),R=/[\])"'A-Za-z0-9_$]+$/,O={in:1,return:1,typeof:1},k={};return{Ra:[],wa:k,ac:A,vb:function(F,z){function Q(J,pe){var Ce;if(!Y){var fe=m.getBindingHandler(J);if(fe&&fe.preprocess&&!(pe=fe.preprocess(pe,J,Q)))return;(fe=k[J])&&(Ce=pe,0<=m.a.A(x,Ce)?Ce=!1:(fe=Ce.match(T),Ce=fe===null?!1:fe[1]?"Object("+fe[1]+")"+fe[2]:Ce),fe=Ce),fe&&j.push("'"+(typeof k[J]=="string"?k[J]:J)+"':function(_z){"+Ce+"=_z}")}Z&&(pe="function(){return "+pe+" }"),H.push("'"+J+"':"+pe)}z=z||{};var H=[],j=[],Z=z.valueAccessors,Y=z.bindingParams,$=typeof F=="string"?A(F):F;return m.a.D($,function(J){Q(J.key||J.unknown,J.value)}),j.length&&Q("_ko_property_writers","{"+j.join(",")+" }"),H.join(",")},Id:function(F,z){for(var Q=0;Q<F.length;Q++)if(F[Q].key==z)return!0;return!1},eb:function(F,z,Q,H,j){F&&m.O(F)?!m.Za(F)||j&&F.v()===H||F(H):(F=z.get("_ko_property_writers"))&&F[Q]&&F[Q](H)}}}(),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 A(Q){return Q.nodeType==8&&O.test(R?Q.text:Q.nodeValue)}function x(Q){return Q.nodeType==8&&k.test(R?Q.text:Q.nodeValue)}function T(Q,H){for(var j=Q,Z=1,Y=[];j=j.nextSibling;){if(x(j)&&(m.a.g.set(j,z,!0),Z--,Z===0))return Y;Y.push(j),A(j)&&Z++}if(!H)throw Error("Cannot find closing comment tag to match: "+Q.nodeValue);return null}function w(Q,H){var j=T(Q,H);return j?0<j.length?j[j.length-1].nextSibling:Q.nextSibling:null}var R=n&&n.createComment("test").text==="<!--test-->",O=R?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,k=R?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,F={ul:!0,ol:!0},z="__ko_matchedEndComment__";m.h={ea:{},childNodes:function(Q){return A(Q)?T(Q):Q.childNodes},Ea:function(Q){if(A(Q)){Q=m.h.childNodes(Q);for(var H=0,j=Q.length;H<j;H++)m.removeNode(Q[H])}else m.a.Tb(Q)},va:function(Q,H){if(A(Q)){m.h.Ea(Q);for(var j=Q.nextSibling,Z=0,Y=H.length;Z<Y;Z++)j.parentNode.insertBefore(H[Z],j)}else m.a.va(Q,H)},Vc:function(Q,H){var j;A(Q)?(j=Q.nextSibling,Q=Q.parentNode):j=Q.firstChild,j?H!==j&&Q.insertBefore(H,j):Q.appendChild(H)},Wb:function(Q,H,j){j?(j=j.nextSibling,A(Q)&&(Q=Q.parentNode),j?H!==j&&Q.insertBefore(H,j):Q.appendChild(H)):m.h.Vc(Q,H)},firstChild:function(Q){if(A(Q))return!Q.nextSibling||x(Q.nextSibling)?null:Q.nextSibling;if(Q.firstChild&&x(Q.firstChild))throw Error("Found invalid end comment, as the first child of "+Q);return Q.firstChild},nextSibling:function(Q){if(A(Q)&&(Q=w(Q)),Q.nextSibling&&x(Q.nextSibling)){var H=Q.nextSibling;if(x(H)&&!m.a.g.get(H,z))throw Error("Found end comment without a matching opening comment, as child of "+Q);return null}return Q.nextSibling},Cd:A,Vd:function(Q){return(Q=(R?Q.text:Q.nodeValue).match(O))?Q[1]:null},Sc:function(Q){if(F[m.a.R(Q)]){var H=Q.firstChild;if(H)do if(H.nodeType===1){var j;j=H.firstChild;var Z=null;if(j)do if(Z)Z.push(j);else if(A(j)){var Y=w(j,!0);Y?j=Y:Z=[j]}else x(j)&&(Z=[j]);while(j=j.nextSibling);if(j=Z)for(Z=H.nextSibling,Y=0;Y<j.length;Y++)Z?Q.insertBefore(j[Y],Z):Q.appendChild(j[Y])}while(H=H.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(A){switch(A.nodeType){case 1:return A.getAttribute("data-bind")!=null||m.j.getComponentNameForNode(A);case 8:return m.h.Cd(A);default:return!1}},getBindings:function(A,x){var T=this.getBindingsString(A,x),T=T?this.parseBindingsString(T,x,A):null;return m.j.tc(T,A,x,!1)},getBindingAccessors:function(A,x){var T=this.getBindingsString(A,x),T=T?this.parseBindingsString(T,x,A,{valueAccessors:!0}):null;return m.j.tc(T,A,x,!0)},getBindingsString:function(A){switch(A.nodeType){case 1:return A.getAttribute("data-bind");case 8:return m.h.Vd(A);default:return null}},parseBindingsString:function(A,x,T,w){try{var R=this.nd,O=A+(w&&w.valueAccessors||""),k;if(!(k=R[O])){var F,z="with($context){with($data||{}){return{"+m.m.vb(A,w)+"}}}";F=new Function("$context","$element",z),k=R[O]=F}return k(x,T)}catch(Q){throw Q.message=`Unable to parse bindings. Bindings value: `+A+` Message: `+Q.message,Q}}}),m.ga.instance=new m.ga}(),m.b("bindingProvider",m.ga),function(){function A(fe){var ye=(fe=m.a.g.get(fe,Ce))&&fe.N;ye&&(fe.N=null,ye.Tc())}function x(fe,ye,Ie){this.node=fe,this.yc=ye,this.kb=[],this.H=!1,ye.N||m.a.K.za(fe,A),Ie&&Ie.N&&(Ie.N.kb.push(fe),this.Kb=Ie)}function T(fe){return function(){return fe}}function w(fe){return fe()}function R(fe){return m.a.Ga(m.u.G(fe),function(ye,Ie){return function(){return fe()[Ie]}})}function O(fe,ye,Ie){return typeof fe=="function"?R(fe.bind(null,ye,Ie)):m.a.Ga(fe,T)}function k(fe,ye){return R(this.getBindings.bind(this,fe,ye))}function F(fe,ye){var Ie=m.h.firstChild(ye);if(Ie){var ve,be=m.ga.instance,ze=be.preprocessNode;if(ze){for(;ve=Ie;)Ie=m.h.nextSibling(ve),ze.call(be,ve);Ie=m.h.firstChild(ye)}for(;ve=Ie;)Ie=m.h.nextSibling(ve),z(fe,ve)}m.i.ma(ye,m.i.H)}function z(fe,ye){var Ie=fe,ve=ye.nodeType===1;ve&&m.h.Sc(ye),(ve||m.ga.instance.nodeHasBindings(ye))&&(Ie=H(ye,null,fe).bindingContextForDescendants),Ie&&!J[m.a.R(ye)]&&F(Ie,ye)}function Q(fe){var ye=[],Ie={},ve=[];return m.a.P(fe,function be(ze){if(!Ie[ze]){var We=m.getBindingHandler(ze);We&&(We.after&&(ve.push(ze),m.a.D(We.after,function(tt){if(fe[tt]){if(m.a.A(ve,tt)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+ve.join(", "));be(tt)}}),ve.length--),ye.push({key:ze,Mc:We})),Ie[ze]=!0}}),ye}function H(fe,ye,Ie){var ve=m.a.g.Ub(fe,Ce,{}),be=ve.hd;if(!ye){if(be)throw Error("You cannot apply bindings multiple times to the same element.");ve.hd=!0}be||(ve.context=Ie),ve.Zb||(ve.Zb={});var ze;if(ye&&typeof ye!="function")ze=ye;else{var We=m.ga.instance,tt=We.getBindingAccessors||k,Mt=m.$(function(){return(ze=ye?ye(Ie,fe):tt.call(We,fe,Ie))&&(Ie[Z]&&Ie[Z](),Ie[$]&&Ie[$]()),ze},null,{l:fe});ze&&Mt.ja()||(Mt=null)}var kt=Ie,Oe;if(ze){var _n=function(){return m.a.Ga(Mt?Mt():ze,w)},Ut=Mt?function(gt){return function(){return w(Mt()[gt])}}:function(gt){return ze[gt]};_n.get=function(gt){return ze[gt]&&w(Ut(gt))},_n.has=function(gt){return gt in ze},m.i.H in ze&&m.i.subscribe(fe,m.i.H,function(){var gt=(0,ze[m.i.H])();if(gt){var ti=m.h.childNodes(fe);ti.length&>(ti,m.Ec(ti[0]))}}),m.i.pa in ze&&(kt=m.i.Cb(fe,Ie),m.i.subscribe(fe,m.i.pa,function(){var gt=(0,ze[m.i.pa])();gt&&m.h.firstChild(fe)&>(fe)})),ve=Q(ze),m.a.D(ve,function(gt){var ti=gt.Mc.init,ai=gt.Mc.update,Vt=gt.key;if(fe.nodeType===8&&!m.h.ea[Vt])throw Error("The binding '"+Vt+"' cannot be used with virtual elements");try{typeof ti=="function"&&m.u.G(function(){var wt=ti(fe,Ut(Vt),_n,kt.$data,kt);if(wt&&wt.controlsDescendantBindings){if(Oe!==e)throw Error("Multiple bindings ("+Oe+" and "+Vt+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Oe=Vt}}),typeof ai=="function"&&m.$(function(){ai(fe,Ut(Vt),_n,kt.$data,kt)},null,{l:fe})}catch(wt){throw wt.message='Unable to process binding "'+Vt+": "+ze[Vt]+`" Message: `+wt.message,wt}})}return ve=Oe===e,{shouldBindDescendants:ve,bindingContextForDescendants:ve&&kt}}function j(fe,ye){return fe&&fe instanceof m.fa?fe:new m.fa(fe,e,e,ye)}var Z=m.a.Da("_subscribable"),Y=m.a.Da("_ancestorBindingInfo"),$=m.a.Da("_dataDependency");m.c={};var J={script:!0,textarea:!0,template:!0};m.getBindingHandler=function(fe){return m.c[fe]};var pe={};m.fa=function(fe,ye,Ie,ve,be){function ze(){var Ut=kt?Mt():Mt,gt=m.a.f(Ut);return ye?(m.a.extend(We,ye),Y in ye&&(We[Y]=ye[Y])):(We.$parents=[],We.$root=gt,We.ko=m),We[Z]=Oe,tt?gt=We.$data:(We.$rawData=Ut,We.$data=gt),Ie&&(We[Ie]=gt),ve&&ve(We,ye,gt),ye&&ye[Z]&&!m.S.o().Vb(ye[Z])&&ye[Z](),_n&&(We[$]=_n),We.$data}var We=this,tt=fe===pe,Mt=tt?e:fe,kt=typeof Mt=="function"&&!m.O(Mt),Oe,_n=be&&be.dataDependency;be&&be.exportDependencies?ze():(Oe=m.xb(ze),Oe.v(),Oe.ja()?Oe.equalityComparer=null:We[Z]=e)},m.fa.prototype.createChildContext=function(fe,ye,Ie,ve){if(!ve&&ye&&typeof ye=="object"&&(ve=ye,ye=ve.as,Ie=ve.extend),ye&&ve&&ve.noChildContext){var be=typeof fe=="function"&&!m.O(fe);return new m.fa(pe,this,null,function(ze){Ie&&Ie(ze),ze[ye]=be?fe():fe},ve)}return new m.fa(fe,this,ye,function(ze,We){ze.$parentContext=We,ze.$parent=We.$data,ze.$parents=(We.$parents||[]).slice(0),ze.$parents.unshift(ze.$parent),Ie&&Ie(ze)},ve)},m.fa.prototype.extend=function(fe,ye){return new m.fa(pe,this,null,function(Ie){m.a.extend(Ie,typeof fe=="function"?fe(Ie):fe)},ye)};var Ce=m.a.g.Z();x.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},x.prototype.sd=function(fe){m.a.Pa(this.kb,fe),!this.kb.length&&this.H&&this.Cc()},x.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,m.a.K.yb(this.node,A),m.i.ma(this.node,m.i.pa),this.Tc())},m.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(fe,ye,Ie,ve,be){var ze=m.a.g.Ub(fe,Ce,{});return ze.Fa||(ze.Fa=new m.T),be&&be.notifyImmediately&&ze.Zb[ye]&&m.u.G(Ie,ve,[fe]),ze.Fa.subscribe(Ie,ve,ye)},ma:function(fe,ye){var Ie=m.a.g.get(fe,Ce);if(Ie&&(Ie.Zb[ye]=!0,Ie.Fa&&Ie.Fa.notifySubscribers(fe,ye),ye==m.i.H)){if(Ie.N)Ie.N.Cc();else if(Ie.N===e&&Ie.Fa&&Ie.Fa.Wa(m.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(fe,ye){var Ie=m.a.g.Ub(fe,Ce,{});return Ie.N||(Ie.N=new x(fe,Ie,ye[Y])),ye[Y]==Ie?ye:ye.extend(function(ve){ve[Y]=Ie})}},m.Td=function(fe){return(fe=m.a.g.get(fe,Ce))&&fe.context},m.ib=function(fe,ye,Ie){return fe.nodeType===1&&m.h.Sc(fe),H(fe,ye,j(Ie))},m.ld=function(fe,ye,Ie){return Ie=j(Ie),m.ib(fe,O(ye,Ie,fe),Ie)},m.Oa=function(fe,ye){ye.nodeType!==1&&ye.nodeType!==8||F(j(fe),ye)},m.vc=function(fe,ye,Ie){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(ye=n.body,!ye)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!ye||ye.nodeType!==1&&ye.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");z(j(fe,Ie),ye)},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(A){function x(k,F){var z=Object.prototype.hasOwnProperty.call(R,k)?R[k]:A,Q;z?z.subscribe(F):(z=R[k]=new m.T,z.subscribe(F),T(k,function(H,j){var Z=!(!j||!j.synchronous);O[k]={definition:H,Gd:Z},delete R[k],Q||Z?z.notifySubscribers(H):m.na.zb(function(){z.notifySubscribers(H)})}),Q=!0)}function T(k,F){w("getConfig",[k],function(z){z?w("loadComponent",[k,z],function(Q){F(Q,z)}):F(null,null)})}function w(k,F,z,Q){Q||(Q=m.j.loaders.slice(0));var H=Q.shift();if(H){var j=H[k];if(j){var Z=!1;if(j.apply(H,F.concat(function(Y){Z?z(null):Y!==null?z(Y):w(k,F,z,Q)}))!==A&&(Z=!0,!H.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else w(k,F,z,Q)}else z(null)}var R={},O={};m.j={get:function(k,F){var z=Object.prototype.hasOwnProperty.call(O,k)?O[k]:A;z?z.Gd?m.u.G(function(){F(z.definition)}):m.na.zb(function(){F(z.definition)}):x(k,F)},Bc:function(k){delete O[k]},oc:w},m.j.loaders=[],m.b("components",m.j),m.b("components.get",m.j.get),m.b("components.clearCachedDefinition",m.j.Bc)}(),function(){function A(z,Q,H,j){function Z(){--$===0&&j(Y)}var Y={},$=2,J=H.template;H=H.viewModel,J?R(Q,J,function(pe){m.j.oc("loadTemplate",[z,pe],function(Ce){Y.template=Ce,Z()})}):Z(),H?R(Q,H,function(pe){m.j.oc("loadViewModel",[z,pe],function(Ce){Y[F]=Ce,Z()})}):Z()}function x(z,Q,H){if(typeof Q=="function")H(function(Z){return new Q(Z)});else if(typeof Q[F]=="function")H(Q[F]);else if("instance"in Q){var j=Q.instance;H(function(){return j})}else"viewModel"in Q?x(z,Q.viewModel,H):z("Unknown viewModel value: "+Q)}function T(z){switch(m.a.R(z)){case"script":return m.a.ua(z.text);case"textarea":return m.a.ua(z.value);case"template":if(w(z.content))return m.a.Ca(z.content.childNodes)}return m.a.Ca(z.childNodes)}function w(z){return t.DocumentFragment?z instanceof DocumentFragment:z&&z.nodeType===11}function R(z,Q,H){typeof Q.require=="string"?a||t.require?(a||t.require)([Q.require],function(j){j&&typeof j=="object"&&j.Xd&&j.default&&(j=j.default),H(j)}):z("Uses require, but no AMD loader is present"):H(Q)}function O(z){return function(Q){throw Error("Component '"+z+"': "+Q)}}var k={};m.j.register=function(z,Q){if(!Q)throw Error("Invalid configuration for "+z);if(m.j.tb(z))throw Error("Component "+z+" is already registered");k[z]=Q},m.j.tb=function(z){return Object.prototype.hasOwnProperty.call(k,z)},m.j.unregister=function(z){delete k[z],m.j.Bc(z)},m.j.Fc={getConfig:function(z,Q){Q(m.j.tb(z)?k[z]:null)},loadComponent:function(z,Q,H){var j=O(z);R(j,Q,function(Z){A(z,j,Z,H)})},loadTemplate:function(z,Q,H){if(z=O(z),typeof Q=="string")H(m.a.ua(Q));else if(Q instanceof Array)H(Q);else if(w(Q))H(m.a.la(Q.childNodes));else if(Q.element)if(Q=Q.element,t.HTMLElement?Q instanceof HTMLElement:Q&&Q.tagName&&Q.nodeType===1)H(T(Q));else if(typeof Q=="string"){var j=n.getElementById(Q);j?H(T(j)):z("Cannot find element with ID "+Q)}else z("Unknown element type: "+Q);else z("Unknown template value: "+Q)},loadViewModel:function(z,Q,H){x(O(z),Q,H)}};var F="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=k}(),function(){function A(T,w){var R=T.getAttribute("params");if(R){var R=x.parseBindingsString(R,w,T,{valueAccessors:!0,bindingParams:!0}),R=m.a.Ga(R,function(F){return m.o(F,null,{l:T})}),O=m.a.Ga(R,function(F){var z=F.v();return F.ja()?m.o({read:function(){return m.a.f(F())},write:m.Za(z)&&function(Q){F()(Q)},l:T}):z});return Object.prototype.hasOwnProperty.call(O,"$raw")||(O.$raw=R),O}return{$raw:{}}}m.j.getComponentNameForNode=function(T){var w=m.a.R(T);if(m.j.tb(w)&&(w.indexOf("-")!=-1||""+T=="[object HTMLUnknownElement]"||8>=m.a.W&&T.tagName===w))return w},m.j.tc=function(T,w,R,O){if(w.nodeType===1){var k=m.j.getComponentNameForNode(w);if(k){if(T=T||{},T.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var F={name:k,params:A(w,R)};T.component=O?function(){return F}:F}}return T};var x=new m.ga;9>m.a.W&&(m.j.register=function(T){return function(w){return T.apply(this,arguments)}}(m.j.register),n.createDocumentFragment=function(T){return function(){var w=T(),R=m.j.dd,O;for(O in R);return w}}(n.createDocumentFragment))}(),function(){function A(w,R,O){if(R=R.template,!R)throw Error("Component '"+w+"' has no template");w=m.a.Ca(R),m.h.va(O,w)}function x(w,R,O){var k=w.createViewModel;return k?k.call(w,R,O):R}var T=0;m.c.component={init:function(w,R,O,k,F){function z(){var Y=Q&&Q.dispose;typeof Y=="function"&&Y.call(Q),j&&j.s(),H=Q=j=null}var Q,H,j,Z=m.a.la(m.h.childNodes(w));return m.h.Ea(w),m.a.K.za(w,z),m.o(function(){var Y=m.a.f(R()),$,J;if(typeof Y=="string"?$=Y:($=m.a.f(Y.name),J=m.a.f(Y.params)),!$)throw Error("No component name specified");var pe=m.i.Cb(w,F),Ce=H=++T;m.j.get($,function(fe){if(H===Ce){if(z(),!fe)throw Error("Unknown component '"+$+"'");A($,fe,w);var ye=x(fe,J,{element:w,templateNodes:Z});fe=pe.createChildContext(ye,{extend:function(Ie){Ie.$component=ye,Ie.$componentTemplateNodes=Z}}),ye&&ye.koDescendantsComplete&&(j=m.i.subscribe(w,m.i.pa,ye.koDescendantsComplete,ye)),Q=ye,m.Oa(fe,w)}})},null,{l:w}),{controlsDescendantBindings:!0}}},m.h.ea.component=!0}();var N={class:"className",for:"htmlFor"};m.c.attr={update:function(A,x){var T=m.a.f(x())||{};m.a.P(T,function(w,R){R=m.a.f(R);var O=w.indexOf(":"),O="lookupNamespaceURI"in A&&0<O&&A.lookupNamespaceURI(w.substr(0,O)),k=R===!1||R===null||R===e;k?O?A.removeAttributeNS(O,w):A.removeAttribute(w):R=R.toString(),8>=m.a.W&&w in N?(w=N[w],k?A.removeAttribute(w):A[w]=R):k||(O?A.setAttributeNS(O,w,R):A.setAttribute(w,R)),w==="name"&&m.a.Yc(A,k?"":R)})}},function(){m.c.checked={after:["value","attr"],init:function(A,x,T){function w(){var Y=A.checked,$=O();if(!m.S.Ya()&&(Y||!F&&!m.S.qa())){var J=m.u.G(x);if(Q){var pe=H?J.v():J,Ce=Z;Z=$,Ce!==$?Y&&(m.a.Na(pe,$,!0),m.a.Na(pe,Ce,!1)):m.a.Na(pe,$,Y),H&&m.Za(J)&&J(pe)}else k&&($===e?$=Y:Y||($=e)),m.m.eb(J,T,"checked",$,!0)}}function R(){var Y=m.a.f(x()),$=O();Q?(A.checked=0<=m.a.A(Y,$),Z=$):A.checked=k&&$===e?!!Y:O()===Y}var O=m.xb(function(){if(T.has("checkedValue"))return m.a.f(T.get("checkedValue"));if(j)return T.has("value")?m.a.f(T.get("value")):A.value}),k=A.type=="checkbox",F=A.type=="radio";if(k||F){var z=x(),Q=k&&m.a.f(z)instanceof Array,H=!(Q&&z.push&&z.splice),j=F||Q,Z=Q?O():e;F&&!A.name&&m.c.uniqueName.init(A,function(){return!0}),m.o(w,null,{l:A}),m.a.B(A,"click",w),m.o(R,null,{l:A}),z=e}}},m.m.wa.checked=!0,m.c.checkedValue={update:function(A,x){A.value=m.a.f(x())}}}(),m.c.class={update:function(A,x){var T=m.a.Db(m.a.f(x()));m.a.Eb(A,A.__ko__cssValue,!1),A.__ko__cssValue=T,m.a.Eb(A,T,!0)}},m.c.css={update:function(A,x){var T=m.a.f(x());T!==null&&typeof T=="object"?m.a.P(T,function(w,R){R=m.a.f(R),m.a.Eb(A,w,R)}):m.c.class.update(A,x)}},m.c.enable={update:function(A,x){var T=m.a.f(x());T&&A.disabled?A.removeAttribute("disabled"):T||A.disabled||(A.disabled=!0)}},m.c.disable={update:function(A,x){m.c.enable.update(A,function(){return!m.a.f(x())})}},m.c.event={init:function(A,x,T,w,R){var O=x()||{};m.a.P(O,function(k){typeof k=="string"&&m.a.B(A,k,function(F){var z,Q=x()[k];if(Q){try{var H=m.a.la(arguments);w=R.$data,H.unshift(w),z=Q.apply(w,H)}finally{z!==!0&&(F.preventDefault?F.preventDefault():F.returnValue=!1)}T.get(k+"Bubble")===!1&&(F.cancelBubble=!0,F.stopPropagation&&F.stopPropagation())}})})}},m.c.foreach={Rc:function(A){return function(){var x=A(),T=m.a.bc(x);return!T||typeof T.length=="number"?{foreach:x,templateEngine:m.ba.Ma}:(m.a.f(x),{foreach:T.data,as:T.as,noChildContext:T.noChildContext,includeDestroyed:T.includeDestroyed,afterAdd:T.afterAdd,beforeRemove:T.beforeRemove,afterRender:T.afterRender,beforeMove:T.beforeMove,afterMove:T.afterMove,templateEngine:m.ba.Ma})}},init:function(A,x){return m.c.template.init(A,m.c.foreach.Rc(x))},update:function(A,x,T,w,R){return m.c.template.update(A,m.c.foreach.Rc(x),T,w,R)}},m.m.Ra.foreach=!1,m.h.ea.foreach=!0,m.c.hasfocus={init:function(A,x,T){function w(k){A.__ko_hasfocusUpdating=!0;var F=A.ownerDocument;if("activeElement"in F){var z;try{z=F.activeElement}catch{z=F.body}k=z===A}F=x(),m.m.eb(F,T,"hasfocus",k,!0),A.__ko_hasfocusLastValue=k,A.__ko_hasfocusUpdating=!1}var R=w.bind(null,!0),O=w.bind(null,!1);m.a.B(A,"focus",R),m.a.B(A,"focusin",R),m.a.B(A,"blur",O),m.a.B(A,"focusout",O),A.__ko_hasfocusLastValue=!1},update:function(A,x){var T=!!m.a.f(x());A.__ko_hasfocusUpdating||A.__ko_hasfocusLastValue===T||(T?A.focus():A.blur(),!T&&A.__ko_hasfocusLastValue&&A.ownerDocument.body.focus(),m.u.G(m.a.Fb,null,[A,T?"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(A,x){m.a.fc(A,x())}},function(){function A(x,T,w){m.c[x]={init:function(R,O,k,F,z){var Q,H,j={},Z,Y,$;if(T){F=k.get("as");var J=k.get("noChildContext");$=!(F&&J),j={as:F,noChildContext:J,exportDependencies:$}}return Y=(Z=k.get("completeOn")=="render")||k.has(m.i.pa),m.o(function(){var pe=m.a.f(O()),Ce=!w!=!pe,fe=!H,ye;($||Ce!==Q)&&(Y&&(z=m.i.Cb(R,z)),Ce&&((!T||$)&&(j.dataDependency=m.S.o()),ye=T?z.createChildContext(typeof pe=="function"?pe:O,j):m.S.qa()?z.extend(null,j):z),fe&&m.S.qa()&&(H=m.a.Ca(m.h.childNodes(R),!0)),Ce?(fe||m.h.va(R,m.a.Ca(H)),m.Oa(ye,R)):(m.h.Ea(R),Z||m.i.ma(R,m.i.H)),Q=Ce)},null,{l:R}),{controlsDescendantBindings:!0}}},m.m.Ra[x]=!1,m.h.ea[x]=!0}A("if"),A("ifnot",!1,!0),A("with",!0)}(),m.c.let={init:function(A,x,T,w,R){return x=R.extend(x),m.Oa(x,A),{controlsDescendantBindings:!0}}},m.h.ea.let=!0;var L={};m.c.options={init:function(A){if(m.a.R(A)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<A.length;)A.remove(0);return{controlsDescendantBindings:!0}},update:function(A,x,T){function w(){return m.a.jb(A.options,function(J){return J.selected})}function R(J,pe,Ce){var fe=typeof pe;return fe=="function"?pe(J):fe=="string"?J[pe]:Ce}function O(J,pe){if(Y&&Q)m.i.ma(A,m.i.H);else if(Z.length){var Ce=0<=m.a.A(Z,m.w.M(pe[0]));m.a.Zc(pe[0],Ce),Y&&!Ce&&m.u.G(m.a.Fb,null,[A,"change"])}}var k=A.multiple,F=A.length!=0&&k?A.scrollTop:null,z=m.a.f(x()),Q=T.get("valueAllowUnset")&&T.has("value"),H=T.get("optionsIncludeDestroyed");x={};var j,Z=[];Q||(k?Z=m.a.Mb(w(),m.w.M):0<=A.selectedIndex&&Z.push(m.w.M(A.options[A.selectedIndex]))),z&&(typeof z.length>"u"&&(z=[z]),j=m.a.jb(z,function(J){return H||J===e||J===null||!m.a.f(J._destroy)}),T.has("optionsCaption")&&(z=m.a.f(T.get("optionsCaption")),z!==null&&z!==e&&j.unshift(L)));var Y=!1;if(x.beforeRemove=function(J){A.removeChild(J)},z=O,T.has("optionsAfterRender")&&typeof T.get("optionsAfterRender")=="function"&&(z=function(J,pe){O(0,pe),m.u.G(T.get("optionsAfterRender"),null,[pe[0],J!==L?J:e])}),m.a.ec(A,j,function(J,pe,Ce){return Ce.length&&(Z=!Q&&Ce[0].selected?[m.w.M(Ce[0])]:[],Y=!0),pe=A.ownerDocument.createElement("option"),J===L?(m.a.Bb(pe,T.get("optionsCaption")),m.w.cb(pe,e)):(Ce=R(J,T.get("optionsValue"),J),m.w.cb(pe,m.a.f(Ce)),J=R(J,T.get("optionsText"),Ce),m.a.Bb(pe,J)),[pe]},x,z),!Q){var $;k?$=Z.length&&w().length<Z.length:$=Z.length&&0<=A.selectedIndex?m.w.M(A.options[A.selectedIndex])!==Z[0]:Z.length||0<=A.selectedIndex,$&&m.u.G(m.a.Fb,null,[A,"change"])}(Q||m.S.Ya())&&m.i.ma(A,m.i.H),m.a.wd(A),F&&20<Math.abs(F-A.scrollTop)&&(A.scrollTop=F)}},m.c.options.$b=m.a.g.Z(),m.c.selectedOptions={init:function(A,x,T){function w(){var k=x(),F=[];m.a.D(A.getElementsByTagName("option"),function(z){z.selected&&F.push(m.w.M(z))}),m.m.eb(k,T,"selectedOptions",F)}function R(){var k=m.a.f(x()),F=A.scrollTop;k&&typeof k.length=="number"&&m.a.D(A.getElementsByTagName("option"),function(z){var Q=0<=m.a.A(k,m.w.M(z));z.selected!=Q&&m.a.Zc(z,Q)}),A.scrollTop=F}if(m.a.R(A)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var O;m.i.subscribe(A,m.i.H,function(){O?w():(m.a.B(A,"change",w),O=m.o(R,null,{l:A}))},null,{notifyImmediately:!0})},update:function(){}},m.m.wa.selectedOptions=!0,m.c.style={update:function(A,x){var T=m.a.f(x()||{});m.a.P(T,function(w,R){if(R=m.a.f(R),(R===null||R===e||R===!1)&&(R=""),o)o(A).css(w,R);else if(/^--/.test(w))A.style.setProperty(w,R);else{w=w.replace(/-(\w)/g,function(k,F){return F.toUpperCase()});var O=A.style[w];A.style[w]=R,R===O||A.style[w]!=O||isNaN(R)||(A.style[w]=R+"px")}})}},m.c.submit={init:function(A,x,T,w,R){if(typeof x()!="function")throw Error("The value for a submit binding must be a function");m.a.B(A,"submit",function(O){var k,F=x();try{k=F.call(R.$data,A)}finally{k!==!0&&(O.preventDefault?O.preventDefault():O.returnValue=!1)}})}},m.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(A,x){m.a.Bb(A,x())}},m.h.ea.text=!0,function(){if(t&&t.navigator){var A=function(j){if(j)return parseFloat(j[1])},x=t.navigator.userAgent,T,w,R,O,k;(T=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(k=A(x.match(/Edge\/([^ ]+)$/)))||A(x.match(/Chrome\/([^ ]+)/))||(w=A(x.match(/Version\/([^ ]+) Safari/)))||(R=A(x.match(/Firefox\/([^ ]+)/)))||(O=m.a.W||A(x.match(/MSIE ([^ ]+)/)))||(O=A(x.match(/rv:([^ )]+)/)))}if(8<=O&&10>O)var F=m.a.g.Z(),z=m.a.g.Z(),Q=function(j){var Z=this.activeElement;(Z=Z&&m.a.g.get(Z,z))&&Z(j)},H=function(j,Z){var Y=j.ownerDocument;m.a.g.get(Y,F)||(m.a.g.set(Y,F,!0),m.a.B(Y,"selectionchange",Q)),m.a.g.set(j,z,Z)};m.c.textInput={init:function(j,Z,Y){function $(ze,We){m.a.B(j,ze,We)}function J(){var ze=m.a.f(Z());(ze===null||ze===e)&&(ze=""),Ie!==e&&ze===Ie?m.a.setTimeout(J,4):j.value!==ze&&(be=!0,j.value=ze,be=!1,fe=j.value)}function pe(){ye||(Ie=j.value,ye=m.a.setTimeout(Ce,4))}function Ce(){clearTimeout(ye),Ie=ye=e;var ze=j.value;fe!==ze&&(fe=ze,m.m.eb(Z(),Y,"textInput",ze))}var fe=j.value,ye,Ie,ve=m.a.W==9?pe:Ce,be=!1;O&&$("keypress",Ce),11>O&&$("propertychange",function(ze){be||ze.propertyName!=="value"||ve(ze)}),O==8&&($("keyup",Ce),$("keydown",Ce)),H&&(H(j,ve),$("dragend",pe)),(!O||9<=O)&&$("input",ve),5>w&&m.a.R(j)==="textarea"?($("keydown",pe),$("paste",pe),$("cut",pe)):11>T?$("keydown",pe):4>R?($("DOMAutoComplete",Ce),$("dragdrop",Ce),$("drop",Ce)):k&&j.type==="number"&&$("keydown",pe),$("change",Ce),$("blur",Ce),m.o(J,null,{l:j})}},m.m.wa.textInput=!0,m.c.textinput={preprocess:function(j,Z,Y){Y("textInput",j)}}}(),m.c.uniqueName={init:function(A,x){if(x()){var T="ko_unique_"+ ++m.c.uniqueName.rd;m.a.Yc(A,T)}}},m.c.uniqueName.rd=0,m.c.using={init:function(A,x,T,w,R){var O;return T.has("as")&&(O={as:T.get("as"),noChildContext:T.get("noChildContext")}),x=R.createChildContext(x,O),m.Oa(x,A),{controlsDescendantBindings:!0}}},m.h.ea.using=!0,m.c.value={init:function(A,x,T){var w=m.a.R(A),R=w=="input";if(!R||A.type!="checkbox"&&A.type!="radio"){var O=[],k=T.get("valueUpdate"),F=!1,z=null;k&&(typeof k=="string"?O=[k]:O=m.a.wc(k),m.a.Pa(O,"change"));var Q=function(){z=null,F=!1;var Z=x(),Y=m.w.M(A);m.m.eb(Z,T,"value",Y)};!m.a.W||!R||A.type!="text"||A.autocomplete=="off"||A.form&&A.form.autocomplete=="off"||m.a.A(O,"propertychange")!=-1||(m.a.B(A,"propertychange",function(){F=!0}),m.a.B(A,"focus",function(){F=!1}),m.a.B(A,"blur",function(){F&&Q()})),m.a.D(O,function(Z){var Y=Q;m.a.Ud(Z,"after")&&(Y=function(){z=m.w.M(A),m.a.setTimeout(Q,0)},Z=Z.substring(5)),m.a.B(A,Z,Y)});var H;if(H=R&&A.type=="file"?function(){var Z=m.a.f(x());Z===null||Z===e||Z===""?A.value="":m.u.G(Q)}:function(){var Z=m.a.f(x()),Y=m.w.M(A);z!==null&&Z===z?m.a.setTimeout(H,0):(Z!==Y||Y===e)&&(w==="select"?(Y=T.get("valueAllowUnset"),m.w.cb(A,Z,Y),Y||Z===m.w.M(A)||m.u.G(Q)):m.w.cb(A,Z))},w==="select"){var j;m.i.subscribe(A,m.i.H,function(){j?T.get("valueAllowUnset")?H():Q():(m.a.B(A,"change",Q),j=m.o(H,null,{l:A}))},null,{notifyImmediately:!0})}else m.a.B(A,"change",Q),m.o(H,null,{l:A})}else m.ib(A,{checkedValue:x})},update:function(){}},m.m.wa.value=!0,m.c.visible={update:function(A,x){var T=m.a.f(x()),w=A.style.display!="none";T&&!w?A.style.display="":!T&&w&&(A.style.display="none")}},m.c.hidden={update:function(A,x){m.c.visible.update(A,function(){return!m.a.f(x())})}},function(A){m.c[A]={init:function(x,T,w,R,O){return m.c.event.init.call(this,x,function(){var k={};return k[A]=T(),k},w,R,O)}}}("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(A,x){if(typeof A=="string"){x=x||n;var T=x.getElementById(A);if(!T)throw Error("Cannot find template with ID "+A);return new m.C.F(T)}if(A.nodeType==1||A.nodeType==8)return new m.C.ia(A);throw Error("Unknown template type: "+A)},m.ca.prototype.renderTemplate=function(A,x,T,w){return A=this.makeTemplateSource(A,w),this.renderTemplateSource(A,x,T,w)},m.ca.prototype.isTemplateRewritten=function(A,x){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(A,x).data("isRewritten")},m.ca.prototype.rewriteTemplate=function(A,x,T){A=this.makeTemplateSource(A,T),x=x(A.text()),A.text(x),A.data("isRewritten",!0)},m.b("templateEngine",m.ca),m.kc=function(){function A(w,R,O,k){w=m.m.ac(w);for(var F=m.m.Ra,z=0;z<w.length;z++){var Q=w[z].key;if(Object.prototype.hasOwnProperty.call(F,Q)){var H=F[Q];if(typeof H=="function"){if(Q=H(w[z].value))throw Error(Q)}else if(!H)throw Error("This template engine does not support the '"+Q+"' binding within its templates")}}return O="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+m.m.vb(w,{valueAccessors:!0})+" } })()},'"+O.toLowerCase()+"')",k.createJavaScriptEvaluatorBlock(O)+R}var x=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,T=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(w,R,O){R.isTemplateRewritten(w,O)||R.rewriteTemplate(w,function(k){return m.kc.Ld(k,R)},O)},Ld:function(w,R){return w.replace(x,function(O,k,F,z,Q){return A(Q,k,F,R)}).replace(T,function(O,k){return A(k,"<!-- ko -->","#comment",R)})},md:function(w,R){return m.aa.Xb(function(O,k){var F=O.nextSibling;F&&F.nodeName.toLowerCase()===R&&m.ib(F,w,k)})}}}(),m.b("__tr_ambtns",m.kc.md),function(){m.C={},m.C.F=function(T){if(this.F=T){var w=m.a.R(T);this.ab=w==="script"?1:w==="textarea"?2:w=="template"&&T.content&&T.content.nodeType===11?3:4}},m.C.F.prototype.text=function(){var T=this.ab===1?"text":this.ab===2?"value":"innerHTML";if(arguments.length==0)return this.F[T];var w=arguments[0];T==="innerHTML"?m.a.fc(this.F,w):this.F[T]=w};var A=m.a.g.Z()+"_";m.C.F.prototype.data=function(T){if(arguments.length===1)return m.a.g.get(this.F,A+T);m.a.g.set(this.F,A+T,arguments[1])};var x=m.a.g.Z();m.C.F.prototype.nodes=function(){var T=this.F;if(arguments.length==0){var w=m.a.g.get(T,x)||{},R=w.lb||(this.ab===3?T.content:this.ab===4?T:e);if(!R||w.jd){var O=this.text();O&&O!==w.bb&&(R=m.a.Md(O,T.ownerDocument),m.a.g.set(T,x,{lb:R,bb:O,jd:!0}))}return R}w=arguments[0],this.ab!==e&&this.text(""),m.a.g.set(T,x,{lb:w})},m.C.ia=function(T){this.F=T},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 T=m.a.g.get(this.F,x)||{};return T.bb===e&&T.lb&&(T.bb=T.lb.innerHTML),T.bb}m.a.g.set(this.F,x,{bb:arguments[0]})},m.b("templateSources",m.C),m.b("templateSources.domElement",m.C.F),m.b("templateSources.anonymousTemplate",m.C.ia)}(),function(){function A(z,Q,H){var j;for(Q=m.h.nextSibling(Q);z&&(j=z)!==Q;)z=m.h.nextSibling(j),H(j,z)}function x(z,Q){if(z.length){var H=z[0],j=z[z.length-1],Z=H.parentNode,Y=m.ga.instance,$=Y.preprocessNode;if($){if(A(H,j,function(J,pe){var Ce=J.previousSibling,fe=$.call(Y,J);fe&&(J===H&&(H=fe[0]||pe),J===j&&(j=fe[fe.length-1]||Ce))}),z.length=0,!H)return;H===j?z.push(H):(z.push(H,j),m.a.Ua(z,Z))}A(H,j,function(J){J.nodeType!==1&&J.nodeType!==8||m.vc(Q,J)}),A(H,j,function(J){J.nodeType!==1&&J.nodeType!==8||m.aa.cd(J,[Q])}),m.a.Ua(z,Z)}}function T(z){return z.nodeType?z:0<z.length?z[0]:null}function w(z,Q,H,j,Z){Z=Z||{};var Y=(z&&T(z)||H||{}).ownerDocument,$=Z.templateEngine||O;if(m.kc.xd(H,$,Y),H=$.renderTemplate(H,j,Z,Y),typeof H.length!="number"||0<H.length&&typeof H[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(Y=!1,Q){case"replaceChildren":m.h.va(z,H),Y=!0;break;case"replaceNode":m.a.Xc(z,H),Y=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+Q)}return Y&&(x(H,j),Z.afterRender&&m.u.G(Z.afterRender,null,[H,j[Z.as||"$data"]]),Q=="replaceChildren"&&m.i.ma(z,m.i.H)),H}function R(z,Q,H){return m.O(z)?z():typeof z=="function"?z(Q,H):z}var O;m.gc=function(z){if(z!=e&&!(z instanceof m.ca))throw Error("templateEngine must inherit from ko.templateEngine");O=z},m.dc=function(z,Q,H,j,Z){if(H=H||{},(H.templateEngine||O)==e)throw Error("Set a template engine before calling renderTemplate");if(Z=Z||"replaceChildren",j){var Y=T(j);return m.$(function(){var J=Q&&Q instanceof m.fa?Q:new m.fa(Q,null,null,null,{exportDependencies:!0}),$=R(z,J.$data,J),J=w(j,Z,$,J,H);Z=="replaceNode"&&(j=J,Y=T(j))},null,{Sa:function(){return!Y||!m.a.Sb(Y)},l:Y&&Z=="replaceNode"?Y.parentNode:Y})}return m.aa.Xb(function($){m.dc(z,Q,H,$,"replaceNode")})},m.Qd=function(z,Q,H,j,Z){function Y(Ie,ve){m.u.G(m.a.ec,null,[j,Ie,J,H,$,ve]),m.i.ma(j,m.i.H)}function $(Ie,ve){x(ve,pe),H.afterRender&&H.afterRender(ve,Ie),pe=null}function J(Ie,ve){pe=Z.createChildContext(Ie,{as:Ce,noChildContext:H.noChildContext,extend:function(ze){ze.$index=ve,Ce&&(ze[Ce+"Index"]=ve)}});var be=R(z,Ie,pe);return w(j,"ignoreTargetNode",be,pe,H)}var pe,Ce=H.as,fe=H.includeDestroyed===!1||m.options.foreachHidesDestroyed&&!H.includeDestroyed;if(fe||H.beforeRemove||!m.Pc(Q))return m.$(function(){var Ie=m.a.f(Q)||[];typeof Ie.length>"u"&&(Ie=[Ie]),fe&&(Ie=m.a.jb(Ie,function(ve){return ve===e||ve===null||!m.a.f(ve._destroy)})),Y(Ie)},null,{l:j});Y(Q.v());var ye=Q.subscribe(function(Ie){Y(Q(),Ie)},null,"arrayChange");return ye.l(j),ye};var k=m.a.g.Z(),F=m.a.g.Z();m.c.template={init:function(z,Q){var H=m.a.f(Q());if(typeof H=="string"||"name"in H)m.h.Ea(z);else if("nodes"in H){if(H=H.nodes||[],m.O(H))throw Error('The "nodes" option must be a plain, non-observable array.');var j=H[0]&&H[0].parentNode;j&&m.a.g.get(j,F)||(j=m.a.Yb(H),m.a.g.set(j,F,!0)),new m.C.ia(z).nodes(j)}else if(H=m.h.childNodes(z),0<H.length)j=m.a.Yb(H),new m.C.ia(z).nodes(j);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(z,Q,H,j,Z){var Y=Q();Q=m.a.f(Y),H=!0,j=null,typeof Q=="string"?Q={}:(Y="name"in Q?Q.name:z,"if"in Q&&(H=m.a.f(Q.if)),H&&"ifnot"in Q&&(H=!m.a.f(Q.ifnot)),H&&!Y&&(H=!1)),"foreach"in Q?j=m.Qd(Y,H&&Q.foreach||[],Q,z,Z):H?(H=Z,"data"in Q&&(H=Z.createChildContext(Q.data,{as:Q.as,noChildContext:Q.noChildContext,exportDependencies:!0})),j=m.dc(Y,H,Q,z)):m.h.Ea(z),Z=j,(Q=m.a.g.get(z,k))&&typeof Q.s=="function"&&Q.s(),m.a.g.set(z,k,!Z||Z.ja&&!Z.ja()?e:Z)}},m.m.Ra.template=function(z){return z=m.m.ac(z),z.length==1&&z[0].unknown||m.m.Id(z,"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(A,x,T){if(A.length&&x.length){var w,R,O,k,F;for(w=R=0;(!T||w<T)&&(k=A[R]);++R){for(O=0;F=x[O];++O)if(k.value===F.value){k.moved=F.index,F.moved=k.index,x.splice(O,1),w=O=0;break}w+=O}}},m.a.Pb=function(){function A(x,T,w,R,O){var k=Math.min,F=Math.max,z=[],Q,H=x.length,j,Z=T.length,Y=Z-H||1,$=H+Z+1,J,pe,Ce;for(Q=0;Q<=H;Q++)for(pe=J,z.push(J=[]),Ce=k(Z,Q+Y),j=F(0,Q-1);j<=Ce;j++)J[j]=j?Q?x[Q-1]===T[j-1]?pe[j-1]:k(pe[j]||$,J[j-1]||$)+1:j+1:Q+1;for(k=[],F=[],Y=[],Q=H,j=Z;Q||j;)Z=z[Q][j]-1,j&&Z===z[Q][j-1]?F.push(k[k.length]={status:w,value:T[--j],index:j}):Q&&Z===z[Q-1][j]?Y.push(k[k.length]={status:R,value:x[--Q],index:Q}):(--j,--Q,O.sparse||k.push({status:"retained",value:T[j]}));return m.a.Kc(Y,F,!O.dontLimitMoves&&10*H),k.reverse()}return function(x,T,w){return w=typeof w=="boolean"?{dontLimitMoves:w}:w||{},x=x||[],T=T||[],x.length<T.length?A(x,T,"added","deleted",w):A(T,x,"deleted","added",w)}}(),m.b("utils.compareArrays",m.a.Pb),function(){function A(w,R,O,k,F){var z=[],Q=m.$(function(){var H=R(O,F,m.a.Ua(z,w))||[];0<z.length&&(m.a.Xc(z,H),k&&m.u.G(k,null,[O,H,F])),z.length=0,m.a.Nb(z,H)},null,{l:w,Sa:function(){return!m.a.kd(z)}});return{Y:z,$:Q.ja()?Q:e}}var x=m.a.g.Z(),T=m.a.g.Z();m.a.ec=function(w,R,O,k,F,z){function Q(gt){be={Aa:gt,pb:m.ta(pe++)},$.push(be),Y||ve.push(be)}function H(gt){be=Z[gt],pe!==be.pb.v()&&Ie.push(be),be.pb(pe++),m.a.Ua(be.Y,w),$.push(be)}function j(gt,ti){if(gt)for(var ai=0,Vt=ti.length;ai<Vt;ai++)m.a.D(ti[ai].Y,function(wt){gt(wt,ai,ti[ai].Aa)})}R=R||[],typeof R.length>"u"&&(R=[R]),k=k||{};var Z=m.a.g.get(w,x),Y=!Z,$=[],J=0,pe=0,Ce=[],fe=[],ye=[],Ie=[],ve=[],be,ze=0;if(Y)m.a.D(R,Q);else{if(!z||Z&&Z._countWaitingForRemove){var We=m.a.Mb(Z,function(gt){return gt.Aa});z=m.a.Pb(We,R,{dontLimitMoves:k.dontLimitMoves,sparse:!0})}for(var We=0,tt,Mt,kt;tt=z[We];We++)switch(Mt=tt.moved,kt=tt.index,tt.status){case"deleted":for(;J<kt;)H(J++);Mt===e&&(be=Z[J],be.$&&(be.$.s(),be.$=e),m.a.Ua(be.Y,w).length&&(k.beforeRemove&&($.push(be),ze++,be.Aa===T?be=null:ye.push(be)),be&&Ce.push.apply(Ce,be.Y))),J++;break;case"added":for(;pe<kt;)H(J++);Mt!==e?(fe.push($.length),H(Mt)):Q(tt.value)}for(;pe<R.length;)H(J++);$._countWaitingForRemove=ze}m.a.g.set(w,x,$),j(k.beforeMove,Ie),m.a.D(Ce,k.beforeRemove?m.oa:m.removeNode);var Oe,_n,Ut;try{Ut=w.ownerDocument.activeElement}catch{}if(fe.length)for(;(We=fe.shift())!=e;){for(be=$[We],Oe=e;We;)if((_n=$[--We].Y)&&_n.length){Oe=_n[_n.length-1];break}for(R=0;J=be.Y[R];Oe=J,R++)m.h.Wb(w,J,Oe)}for(We=0;be=$[We];We++){for(be.Y||m.a.extend(be,A(w,O,be.Aa,F,be.pb)),R=0;J=be.Y[R];Oe=J,R++)m.h.Wb(w,J,Oe);!be.Ed&&F&&(F(be.Aa,be.Y,be.pb),be.Ed=!0,Oe=be.Y[be.Y.length-1])}for(Ut&&w.ownerDocument.activeElement!=Ut&&Ut.focus(),j(k.beforeRemove,ye),We=0;We<ye.length;++We)ye[We].Aa=T;j(k.afterMove,Ie),j(k.afterAdd,ve)}}(),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(A,x,T,w){return(x=!(9>m.a.W)&&A.nodes?A.nodes():null)?m.a.la(x.cloneNode(!0).childNodes):(A=A.text(),m.a.ua(A,w))},m.ba.Ma=new m.ba,m.gc(m.ba.Ma),m.b("nativeTemplateEngine",m.ba),function(){m.$a=function(){var x=this.Hd=function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1}();this.renderTemplateSource=function(T,w,R,O){if(O=O||n,R=R||{},2>x)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var k=T.data("precompiled");return k||(k=T.text()||"",k=o.template(null,"{{ko_with $item.koBindingContext}}"+k+"{{/ko_with}}"),T.data("precompiled",k)),T=[w.$data],w=o.extend({koBindingContext:w},R.templateOptions),w=o.tmpl(k,T,w),w.appendTo(O.createElement("div")),o.fragments={},w},this.createJavaScriptEvaluatorBlock=function(T){return"{{ko_code ((function() { return "+T+" })()) }}"},this.addTemplate=function(T,w){n.write("<script type='text/html' id='"+T+"'>"+w+"</script>")},0<x&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},m.$a.prototype=new m.ca,m.$a.prototype.constructor=m.$a;var A=new m.$a;0<A.Hd&&m.gc(A),m.b("jqueryTmplTemplateEngine",m.$a)}()})})()})()})();var avt=ko;typeof window<"u"?(ko=window.ko,typeof P3<"u"?window.ko=P3:delete window.ko):(ko=global.ko,typeof P3<"u"?global.ko=P3:delete global.ko);var Tx=avt;/** * @license * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5 * Copyright (c) Steve Sanderson * MIT license */var _ee="__knockoutObservables",yee="__knockoutSubscribable";function CSe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=ESe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===_ee||o===yee)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&lvt(n,a)}}),e}function ESe(e,t){var n=e[_ee];return!n&&t&&(n={},Object.defineProperty(e,_ee,{value:n})),n}function cvt(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.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".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),CSe.call(i,e,[t]),e}function lvt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=uvt(e,t,i))})}function uvt(e,t,n){var i=fvt(e,n);return i.subscribe(t)}function fvt(e,t){var n=t[yee];if(!n){n=new e.subscribable,Object.defineProperty(t,yee,{value:n});var i={};dvt(t,n,i),hvt(e,t,n,i)}return n}function dvt(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function hvt(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function ISe(e,t){if(!e)return null;var n=ESe(e,!1);return n&&n[t]||null}function mvt(e,t){var n=ISe(e,t);n&&n.valueHasMutated()}function pvt(e){e.track=CSe,e.getObservable=ISe,e.valueHasMutated=mvt,e.defineProperty=cvt}var R3={attachToKo:pvt};var xSe="http://www.w3.org/2000/svg",bSe="cesium-svgPath-svg",Avt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(xSe,"svg:svg");i.setAttribute("class",bSe);let o=document.createElementNS(xSe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${bSe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},M3=Avt;R3.attachToKo(Tx);M3.register(Tx);var Ee=Tx;function N3(e){l(e)||(e=new Zh),this._clock=e,this._eventHelper=new Dr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Ee.observable(K.now()),this.systemTime.equalityComparer=K.equals,this.startTime=Ee.observable(e.startTime),this.startTime.equalityComparer=K.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Ee.observable(e.stopTime),this.stopTime.equalityComparer=K.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Ee.observable(e.currentTime),this.currentTime.equalityComparer=K.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Ee.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Ee.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Ee.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Ee.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Ee.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Ee.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(N3.prototype,{clock:{get:function(){return this._clock}}});N3.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};N3.prototype.isDestroyed=function(){return!1};N3.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var L3=N3;function gvt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,he.throwInstantiationError()}var Cee=gvt;var Kw={};Kw.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};Kw.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};Kw.createRangeInput=function(e,t,n,i,o,r){r=r??t;let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=n,a.max=i,a.step=o??"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};Kw.createRangeInputWithDynamicMinMax=function(e,t,n,i){i=i??t;let o=document.createElement("input");o.setAttribute("data-bind",`value: ${i}`),o.type="number";let r=document.createElement("input");r.type="range",r.step=n??"any",r.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);let s=document.createElement("div");s.appendChild(r);let a=document.createElement("div");return a.className="cesium-cesiumInspector-slider",a.appendChild(document.createTextNode(e)),a.appendChild(o),a.appendChild(s),a};Kw.createButton=function(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=e,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${t}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i};var Mu=Kw;function TSe(e,t){this._command=e,t=t??V.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",Ee.track(this,["toggled","tooltip"])}Object.defineProperties(TSe.prototype,{command:{get:function(){return this._command}}});var DC=TSe;function _vt(e,t){t=t??!0;let n=new ge,i=new ge;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,Ee.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Mn=_vt;function yvt(e,t,n,i,o){return n.call(i,e[t]),Ee.getObservable(e,t).subscribe(n,i,o)}var Ja=yvt;var Sx="http://www.w3.org/2000/svg",BSe="http://www.w3.org/1999/xlink",h5,O3=G.fromCssColorString("rgba(247,250,255,0.384)"),m5=G.fromCssColorString("rgba(143,191,255,0.216)"),Eee=G.fromCssColorString("rgba(153,197,255,0.098)"),p5=G.fromCssColorString("rgba(255,255,255,0.086)"),Cvt=G.fromCssColorString("rgba(255,255,255,0.267)"),Evt=G.fromCssColorString("rgba(255,255,255,0)"),SSe=G.fromCssColorString("rgba(66,67,68,0.3)"),wSe=G.fromCssColorString("rgba(0,0,0,0.5)");function vC(e){return G.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var F3={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 vm(e){let t=document.createElementNS(Sx,e.tagName);for(let n in e)if(e.hasOwnProperty(n)&&n!=="tagName")if(n==="children"){let i=e.children.length;for(let o=0;o<i;++o)t.appendChild(vm(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(BSe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function Iee(e,t,n){let i=document.createElementNS(Sx,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(Sx,"tspan");return o.textContent=n,i.appendChild(o),i}function Ivt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var A5=new G;function bs(e,t){let n=t.alpha,i=1-n;return A5.red=e.red*i+t.red*n,A5.green=e.green*i+t.green*n,A5.blue=e.blue*i+t.blue*n,A5.toCssColorString()}function xee(e,t,n){let i=F3[n],o={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 vm(o)}function xvt(e,t,n){let i=F3[n],o=F3.animation_pathWingButton,r={tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:o.tagName,d:o.d},{class:"cesium-animation-buttonPath",id:n,tagName:i.tagName,transform:i.transform,d:i.d},{tagName:"title",textContent:""}]};return vm(r)}function bvt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&h5!==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 o=e._centerX,r=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(),h=c-o-a.left,p=u-r-a.top,g=Math.atan2(p,h)*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?(h5=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=g):g<m?n.slower():g>m&&n.faster(),t.preventDefault()}else e===h5&&(h5=void 0),n.shuttleRingDragging=!1}function f_(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=[Ja(t,"toggled",this.setToggled,this),Ja(t,"tooltip",this.setTooltip,this),Ja(t.command,"canExecute",this.setEnabled,this)]}f_.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();ue(this)};f_.prototype.isDestroyed=function(){return!1};f_.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")}};f_.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")))};f_.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function Xw(e,t){e=Un(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 o=document.createElement("div");o.className="cesium-animation-theme",o.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=o,this._themeNormal=o.childNodes[0],this._themeHover=o.childNodes[1],this._themeSelect=o.childNodes[2],this._themeDisabled=o.childNodes[3],this._themeKnob=o.childNodes[4],this._themePointer=o.childNodes[5],this._themeSwoosh=o.childNodes[6],this._themeSwooshHover=o.childNodes[7];let r=document.createElementNS(Sx,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",BSe);let s=document.createElementNS(Sx,"g");this._topG=s,this._realtimeSVG=new f_(xvt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new f_(xee(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new f_(xee(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new f_(xee(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(Sx,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=vm({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let u=F3.animation_pathSwooshFX,f=F3.animation_pathPointer,h=vm({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=h,this._shuttleRingPointer=vm({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:f.tagName,d:f.d});let p=vm({tagName:"g",transform:"translate(100,100)"});this._knobOuter=vm({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let g=61,m=vm({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:g});this._knobDate=Iee(0,-24,""),this._knobTime=Iee(0,-7,""),this._knobStatus=Iee(0,-41,"");let _=vm({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:g}),y=document.createElementNS(Sx,"g");y.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(y),s.appendChild(p),s.appendChild(a),y.appendChild(c),y.appendChild(h),y.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(m),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(_),r.appendChild(s),e.appendChild(r);let C=this;function E(v){bvt(C,v)}this._mouseCallback=E,c.addEventListener("mousedown",E,!0),c.addEventListener("touchstart",E,!0),h.addEventListener("mousedown",E,!0),h.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 I=this._knobTime.childNodes[0],b=this._knobDate.childNodes[0],S=this._knobStatus.childNodes[0],B;this._subscriptions=[Ja(t.pauseViewModel,"toggled",function(v){B!==v&&(B=v,B?C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):C._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),Ja(t,"shuttleRingAngle",function(v){Ivt(C._shuttleRingPointer,C._knobOuter,v)}),Ja(t,"dateLabel",function(v){b.textContent!==v&&(b.textContent=v)}),Ja(t,"timeLabel",function(v){I.textContent!==v&&(I.textContent=v)}),Ja(t,"multiplierLabel",function(v){S.textContent!==v&&(S.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(Xw.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Xw.prototype.isDestroyed=function(){return!1};Xw.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),this._container.removeChild(this._svgNode),this._container.removeChild(this._theme),this._realtimeSVG.destroy(),this._playReverseSVG.destroy(),this._playForwardSVG.destroy(),this._pauseSVG.destroy();let n=this._subscriptions;for(let i=0,o=n.length;i<o;i++)n[i].dispose();return ue(this)};Xw.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,o=132,r=e,s=t;e===0&&t===0?(r=i,s=o):e===0?(s=t,r=i*(t/o)):t===0&&(r=e,s=o*(e/i));let a=r/i,c=s/o;n.style.cssText=`width: ${r}px; height: ${s}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,n.setAttribute("width",r),n.setAttribute("height",s),n.setAttribute("viewBox",`0 0 ${r} ${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};Xw.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=vC(this._themeNormal),n=vC(this._themeHover),i=vC(this._themeSelect),o=vC(this._themeDisabled),r=vC(this._themeKnob),s=vC(this._themePointer),a=vC(this._themeSwoosh),c=vC(this._themeSwooshHover),u=vm({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":bs(t,O3)},{tagName:"stop",offset:"12%","stop-color":bs(t,m5)},{tagName:"stop",offset:"46%","stop-color":bs(t,Eee)},{tagName:"stop",offset:"81%","stop-color":bs(t,p5)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":bs(n,O3)},{tagName:"stop",offset:"12%","stop-color":bs(n,m5)},{tagName:"stop",offset:"46%","stop-color":bs(n,Eee)},{tagName:"stop",offset:"81%","stop-color":bs(n,p5)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":bs(i,O3)},{tagName:"stop",offset:"12%","stop-color":bs(i,m5)},{tagName:"stop",offset:"46%","stop-color":bs(i,Eee)},{tagName:"stop",offset:"81%","stop-color":bs(i,p5)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":bs(o,Cvt)},{tagName:"stop",offset:"75%","stop-color":bs(o,Evt)}]},{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":bs(s,wSe)},{tagName:"stop",offset:"100%","stop-color":bs(s,wSe)}]},{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":bs(r,O3)},{tagName:"stop",offset:"60%","stop-color":bs(r,SSe)},{tagName:"stop",offset:"85%","stop-color":bs(r,m5)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":bs(r,SSe)},{tagName:"stop",offset:"60%","stop-color":bs(r,O3)},{tagName:"stop",offset:"85%","stop-color":bs(r,p5)}]}]});l(this._defsElement)?this._svgNode.replaceChild(u,this._defsElement):this._svgNode.appendChild(u),this._defsElement=u};var Q3=Xw;var Tvt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],PC=15,Jw=105;function DSe(e,t){return e-t}function bee(e,t){let n=jo(t,e,DSe);return n<0?~n:n}function Svt(e,t){if(Math.abs(e)<=PC)return e/PC;let n=PC,i=Jw,o,r=0,s;return e>0?(o=Math.log(t[t.length-1]),s=(o-r)/(i-n),Math.exp(r+s*(e-n))):(o=Math.log(-t[0]),s=(o-r)/(i-n),-Math.exp(r+s*(Math.abs(e)-n)))}function wvt(e,t,n){if(n.clockStep===To.SYSTEM_CLOCK)return PC;if(Math.abs(e)<=1)return e*PC;let i=t[t.length-1];e>i?e=i:e<-i&&(e=-i);let o=PC,r=Jw,s,a=0,c;return e>0?(s=Math.log(i),c=(s-a)/(r-o),(Math.log(e)-a)/c+o):(s=Math.log(-t[0]),c=(s-a)/(r-o),-((Math.log(Math.abs(e))-a)/c+o))}function Jd(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=Jd.defaultDateFormatter,this._timeFormatter=Jd.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Ee.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(Jd.defaultTicks),this.timeLabel=void 0,Ee.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Ee.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Ee.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===To.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,Ee.defineProperty(this,"shuttleRingAngle",{get:function(){return wvt(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,Jw),-Jw);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=To.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===Jw){c.multiplier=s>0?a[a.length-1]:a[0];return}let u=Svt(s,a);if(t.snapToTicks)u=a[bee(u,a)];else if(u!==0){let f=Math.abs(u);if(f>100){let h=f.toFixed(0).length-2,p=Math.pow(10,h);u=Math.round(u/p)*p|0}else f>PC?u=Math.round(u):f>1?u=+u.toFixed(1):f>0&&(u=+u.toFixed(2))}c.multiplier=u}}),this._canAnimate=void 0,Ee.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===cs.UNBOUNDED)return!0;let c=s.multiplier,u=s.currentTime,f=s.startTime,h=!1;if(a===cs.LOOP_STOP)h=K.greaterThan(u,f)||u.equals(f)&&c>0;else{let p=s.stopTime;h=K.greaterThan(u,f)&&K.lessThan(u,p)||u.equals(f)&&c>0||u.equals(p)&&c<0}return h||(s.shouldAnimate=!1),h}),this._isSystemTimeAvailable=void 0,Ee.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===cs.UNBOUNDED)return!0;let c=s.systemTime;return K.greaterThanOrEquals(c,s.startTime)&&K.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Ee.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Mn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new DC(n,{toggled:Ee.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Mn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new DC(i,{toggled:Ee.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Mn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new DC(o,{toggled:Ee.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==To.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Mn(function(){t._clockViewModel.clockStep=To.SYSTEM_CLOCK},Ee.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new DC(r,{toggled:Ee.computed(function(){return e.clockStep===To.SYSTEM_CLOCK}),tooltip:Ee.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Mn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,u=bee(c,a)-1;u>=0&&(s.multiplier=a[u])}),this._faster=Mn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,u=bee(c,a)+1;u<a.length&&(s.multiplier=a[u])})}Jd.defaultDateFormatter=function(e,t){let n=K.toGregorianDate(e);return`${Tvt[n.month-1]} ${n.day} ${n.year}`};Jd.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];Jd.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`};Jd.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};Jd.prototype.setShuttleRingTicks=function(e){let t,n,i,o={},r=this._sortedFilteredPositiveTicks;for(r.length=0,t=0,n=e.length;t<n;++t)i=e[t],o.hasOwnProperty(i)||(o[i]=!0,r.push(i));r.sort(DSe);let s=[];for(n=r.length,t=n-1;t>=0;--t)i=r[t],i!==0&&s.push(-i);Array.prototype.push.apply(s,r),this._allShuttleRingTicks=s};Object.defineProperties(Jd.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}}});Jd._maxShuttleRingAngle=Jw;Jd._realtimeShuttleRingAngle=PC;var k3=Jd;function Bvt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof Ms&&(e.tileset=n.primitive),e.pickActive=!1}}function PSe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof Ms&&(e.tileset=i.primitive)},Dn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Dn.MOUSE_MOVE),e.picking=e.picking)}var Dvt={maximumFractionDigits:3};function U3(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,Dvt):Math.round(t).toLocaleString()}function G3(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[Ko.PICK]:e._statisticsPerPass[Ko.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>${U3(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${U3(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${U3(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function RSe(){let e=Li.statistics;return` <ul class="cesium-cesiumInspector-statistics"> <li><strong>Geometry Memory (MB): </strong>${U3(e.geometryByteLength)}</li> <li><strong>Texture Memory (MB): </strong>${U3(e.texturesByteLength)}</li> </ul> `}var vvt=[{text:"Highlight",value:ru.HIGHLIGHT},{text:"Replace",value:ru.REPLACE},{text:"Mix",value:ru.MIX}],vSe=new G(1,1,0,.4),Pvt=new G,g5=new G;function Za(e,t){let n=this,i=e.canvas;this._eventHandler=new vf(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new qg({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,Ee.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=Ee.observable({}),this.properties=[],Ee.defineProperty(this,"properties",function(){let Q=[],H=n._properties();for(let j in H)H.hasOwnProperty(j)&&Q.push(j);return Q});let o=Ee.observable();Ee.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(Q){o(Q),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=Q)}}),this.dynamicScreenSpaceError=!1;let r=Ee.observable();Ee.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(Q){r(Q),l(n._tileset)&&(n._tileset.colorBlendMode=Q,n._scene.requestRender())}}),this.colorBlendMode=ru.HIGHLIGHT;let s=Ee.observable(),a=Ee.observable();Ee.defineProperty(this,"picking",{get:function(){return a()},set:function(Q){a(Q),Q?n._eventHandler.setInputAction(function(H){let j=e.pick(H.endPosition);if(j instanceof da?(n.feature=j,n.tile=j.content.tile):l(j)&&l(j.content)?(n.feature=void 0,n.tile=j.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(j)&&l(j.content)){let Z;e.pickPositionSupported&&(Z=e.pickPosition(H.endPosition),l(Z)&&(n._tileset.debugPickPosition=Z)),n._tileset.debugPickedTile=j.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Dn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Dn.MOUSE_MOVE))}}),this.picking=!0;let c=Ee.observable();Ee.defineProperty(this,"colorize",{get:function(){return c()},set:function(Q){c(Q),l(n._tileset)&&(n._tileset.debugColorizeTiles=Q,n._scene.requestRender())}}),this.colorize=!1;let u=Ee.observable();Ee.defineProperty(this,"wireframe",{get:function(){return u()},set:function(Q){u(Q),l(n._tileset)&&(n._tileset.debugWireframe=Q,n._scene.requestRender())}}),this.wireframe=!1;let f=Ee.observable();Ee.defineProperty(this,"showBoundingVolumes",{get:function(){return f()},set:function(Q){f(Q),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=Q,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let h=Ee.observable();Ee.defineProperty(this,"showContentBoundingVolumes",{get:function(){return h()},set:function(Q){h(Q),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=Q,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Ee.observable();Ee.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(Q){p(Q),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=Q,n._scene.requestRender())}}),this.showRequestVolumes=!1;let g=Ee.observable();Ee.defineProperty(this,"freezeFrame",{get:function(){return g()},set:function(Q){g(Q),l(n._tileset)&&(n._tileset.debugFreezeFrame=Q,n._scene.debugShowFrustumPlanes=Q,n._scene.requestRender())}}),this.freezeFrame=!1,Ee.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(Q){s(Q),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=Q,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let m=Ee.observable();Ee.defineProperty(this,"showGeometricError",{get:function(){return m()},set:function(Q){m(Q),l(n._tileset)&&(n._tileset.debugShowGeometricError=Q,n._scene.requestRender())}}),this.showGeometricError=!1;let _=Ee.observable();Ee.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(Q){_(Q),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=Q,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let y=Ee.observable();Ee.defineProperty(this,"showMemoryUsage",{get:function(){return y()},set:function(Q){y(Q),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=Q,n._scene.requestRender())}}),this.showMemoryUsage=!1;let C=Ee.observable();Ee.defineProperty(this,"showUrl",{get:function(){return C()},set:function(Q){C(Q),l(n._tileset)&&(n._tileset.debugShowUrl=Q,n._scene.requestRender())}}),this.showUrl=!1;let E=Ee.observable();Ee.defineProperty(this,"maximumScreenSpaceError",{get:function(){return E()},set:function(Q){Q=Number(Q),isNaN(Q)||(E(Q),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=Q))}}),this.maximumScreenSpaceError=16;let I=Ee.observable();Ee.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return I()},set:function(Q){Q=Number(Q),isNaN(Q)||(I(Q),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=Q))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Ee.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(I(),1/6)},set:function(Q){let H=Math.pow(Q,6);I(H),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=H)}});let b=Ee.observable();Ee.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return b()},set:function(Q){Q=Number(Q),isNaN(Q)||(b(Q),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=Q))}}),this.dynamicScreenSpaceErrorFactor=24;let S=Bvt(this),B=Ee.observable();Ee.defineProperty(this,"pickActive",{get:function(){return B()},set:function(Q){B(Q),Q?n._eventHandler.setInputAction(S,Dn.LEFT_CLICK):n._eventHandler.removeInputAction(Dn.LEFT_CLICK)}});let v=Ee.observable();Ee.defineProperty(this,"pointCloudShading",{get:function(){return v()},set:function(Q){v(Q),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=Q)}}),this.pointCloudShading=!1;let P=Ee.observable();Ee.defineProperty(this,"geometricErrorScale",{get:function(){return P()},set:function(Q){Q=Number(Q),isNaN(Q)||(P(Q),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=Q))}}),this.geometricErrorScale=1;let N=Ee.observable();Ee.defineProperty(this,"maximumAttenuation",{get:function(){return N()},set:function(Q){Q=Number(Q),isNaN(Q)||(N(Q),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=Q===0?void 0:Q))}}),this.maximumAttenuation=0;let L=Ee.observable();Ee.defineProperty(this,"baseResolution",{get:function(){return L()},set:function(Q){Q=Number(Q),isNaN(Q)||(L(Q),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=Q===0?void 0:Q))}}),this.baseResolution=0;let A=Ee.observable();Ee.defineProperty(this,"eyeDomeLighting",{get:function(){return A()},set:function(Q){A(Q),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=Q)}}),this.eyeDomeLighting=!1;let x=Ee.observable();Ee.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return x()},set:function(Q){Q=Number(Q),isNaN(Q)||(x(Q),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=Q))}}),this.eyeDomeLightingStrength=1;let T=Ee.observable();Ee.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return T()},set:function(Q){Q=Number(Q),isNaN(Q)||(T(Q),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=Q))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let w=Ee.observable();Ee.defineProperty(this,"skipLevelOfDetail",{get:function(){return w()},set:function(Q){w(Q),l(n._tileset)&&(n._tileset.skipLevelOfDetail=Q)}}),this.skipLevelOfDetail=!0;let R=Ee.observable();Ee.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return R()},set:function(Q){Q=Number(Q),isNaN(Q)||(R(Q),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=Q))}}),this.skipScreenSpaceErrorFactor=16;let O=Ee.observable();Ee.defineProperty(this,"baseScreenSpaceError",{get:function(){return O()},set:function(Q){Q=Number(Q),isNaN(Q)||(O(Q),l(n._tileset)&&(n._tileset.baseScreenSpaceError=Q))}}),this.baseScreenSpaceError=1024;let k=Ee.observable();Ee.defineProperty(this,"skipLevels",{get:function(){return k()},set:function(Q){Q=Number(Q),isNaN(Q)||(k(Q),l(n._tileset)&&(n._tileset.skipLevels=Q))}}),this.skipLevels=1;let F=Ee.observable();Ee.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return F()},set:function(Q){F(Q),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=Q)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let z=Ee.observable();Ee.defineProperty(this,"loadSiblings",{get:function(){return z()},set:function(Q){z(Q),l(n._tileset)&&(n._tileset.loadSiblings=Q)}}),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)||PSe(this,!0)}Object.defineProperties(Za.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 vvt}},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 o=0;o<n;++o){let r=t[o];this[r]=this[r]}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=G3(e,!1),this._pickStatisticsText=G3(e,!0),this._resourceCacheStatisticsText=RSe(),PSe(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,Pvt):G.WHITE:t.color=g5,this._scene.requestRender()),l(e)&&(G.clone(e.color,g5),e.color=vSe,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()&&!Tee(t.content)&&(t.color=g5,this._scene.requestRender()),l(e)&&!Tee(e.content)&&(G.clone(e.color,g5),e.color=vSe,this._scene.requestRender()),this._tile=e}}});function Tee(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(!Tee(t[i]))return!1;return!0}return!1}Za.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};Za.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};Za.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};Za.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};Za.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};Za.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};Za.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};Za.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};Za.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};Za.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};Za.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 lx(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};Za.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).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),r-=2):(a[u]=a[u].substr(1),r-=1));else for(u=0;u<c;++u)a[u]=` ${a[u]}`,r+=2;let f=a.join(` `);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};Za.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=G3(e,!1),this._pickStatisticsText=G3(e,!0),this._resourceCacheStatisticsText=RSe())};Za.prototype.isDestroyed=function(){return!1};Za.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Ee.getObservable(e,t).dispose()}),ue(this)};Za.getStatistics=G3;var z3=Za;function _5(e,t){e=Un(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new z3(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),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=Mu.createSection,c=Mu.createCheckbox,u=Mu.createRangeInput,f=Mu.createButton,h=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),g=a(s,"Update","updateVisible","toggleUpdate"),m=a(s,"Logging","loggingVisible","toggleLogging"),_=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),y=a(s,"Style","styleVisible","toggleStyle"),C=a(s,"Optimization","optimizationVisible","toggleOptimization"),E=document.createElement("div");E.className="field-group";let I=document.createElement("label");I.className="field-label",I.appendChild(document.createTextNode("Properties: "));let b=document.createElement("div");b.setAttribute("data-bind","text: properties"),E.appendChild(I),E.appendChild(b),h.appendChild(E),h.appendChild(f("Pick Tileset","togglePickTileset","pickActive")),h.appendChild(f("Trim Tiles Cache","trimTilesCache")),h.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let S=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),B=document.createElement("p");B.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),B.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),B.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",S.appendChild(B),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 v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(u("Geometric Error Scale","geometricErrorScale",0,2,.01)),v.appendChild(u("Maximum Attenuation","maximumAttenuation",0,32,1)),v.appendChild(u("Base Resolution","baseResolution",0,1,.01)),v.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(v);let P=document.createElement("div");P.setAttribute("data-bind","visible: eyeDomeLighting"),P.appendChild(u("EDL Strength","eyeDomeLightingStrength",0,2,.1)),P.appendChild(u("EDL Radius","eyeDomeLightingRadius",0,4,.1)),v.appendChild(P),g.appendChild(c("Freeze Frame","freezeFrame")),g.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let N=document.createElement("div");N.appendChild(u("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),g.appendChild(N);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 A=document.createElement("div");A.className="cesium-3dTilesInspector-statistics",A.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),m.appendChild(A),m.appendChild(c("Pick Statistics","showPickStatistics"));let x=document.createElement("div");x.className="cesium-3dTilesInspector-statistics",x.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),m.appendChild(x),m.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let T=document.createElement("div");T.className="cesium-3dTilesInspector-statistics",T.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),m.appendChild(T);let w=document.createElement("div");y.appendChild(w),w.appendChild(document.createTextNode("Color Blend Mode: "));let R=document.createElement("select");R.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),w.appendChild(R);let O=document.createElement("textarea");O.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),w.className="cesium-cesiumInspector-styleEditor",w.appendChild(O);let k=f("Compile (Ctrl+Enter)","compileStyle");w.appendChild(k);let F=document.createElement("div");F.className="cesium-cesiumInspector-error",F.setAttribute("data-bind","text: editorError"),w.appendChild(F),_.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),_.appendChild(c("Geometric Error","showGeometricError")),_.appendChild(c("Rendering Statistics","showRenderingStatistics")),_.appendChild(c("Memory Usage (MB)","showMemoryUsage")),_.appendChild(c("Url","showUrl")),C.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let z=document.createElement("div");z.appendChild(u("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),C.appendChild(z);let Q=document.createElement("div");Q.appendChild(u("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),C.appendChild(Q);let H=document.createElement("div");H.appendChild(u("Min. levels to skip","skipLevels",0,10,1)),C.appendChild(H),C.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),C.appendChild(c("Load siblings of visible tiles","loadSiblings")),Ee.applyBindings(o,n)}Object.defineProperties(_5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});_5.prototype.isDestroyed=function(){return!1};_5.prototype.destroy=function(){return Ee.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};var V3=_5;function Rvt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br>    ${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function See(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var Mvt=new xn,Nvt=new d;function H3(e,t){let n=this,i=e.canvas,o=new vf(i);this._eventHandler=o,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 r=this._scene.globe;r.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="",Ee.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=Mn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Mn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Mn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Mn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Ee.getObservable(this,"frustums").subscribe(function(u){n._scene.debugShowFrustums=u,n._scene.requestRender()}),this._frustumPlanesSubscription=Ee.getObservable(this,"frustumPlanes").subscribe(function(u){n._scene.debugShowFrustumPlanes=u,n._scene.requestRender()}),this._performanceSubscription=Ee.getObservable(this,"performance").subscribe(function(u){u?n._performanceDisplay=new qg({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Mn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Ee.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Mn(function(){if(n.primitiveReferenceFrame){let u=n._primitive.modelMatrix;n._modelMatrixPrimitive=new i3({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=Ee.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Mn(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=Ee.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Ee.getObservable(this,"wireframe").subscribe(function(u){r._surface.tileProvider._debug.wireframe=u,n._scene.requestRender()}),this._depthFrustumSubscription=Ee.getObservable(this,"depthFrustum").subscribe(function(u){n._scene.debugShowDepthFrustum=u,n._scene.requestRender()}),this._incrementDepthFrustum=Mn(function(){let u=n.depthFrustum+1;return n.depthFrustum=See(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Mn(function(){let u=n.depthFrustum-1;return n.depthFrustum=See(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Ee.getObservable(this,"suspendUpdates").subscribe(function(u){r._surface._debug.suspendLodUpdate=u,u||(n.filterTile=!1)});let s;this._showTileCoordinates=Mn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new T3({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Ee.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Ee.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Mn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Mn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=Ee.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=Mn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Ee.getObservable(this,"pickPrimitiveActive").subscribe(function(u){u?o.setInputAction(a,Dn.LEFT_CLICK):o.removeInputAction(Dn.LEFT_CLICK)});function c(u){let f,h=r.ellipsoid,p=n._scene.camera.getPickRay(u.position,Mvt),g=r.pick(p,n._scene,Nvt);if(l(g)){let m=h.cartesianToCartographic(g),_=r._surface.tileProvider._tilesToRenderByTextureCount;for(let y=0;!f&&y<_.length;++y){let C=_[y];if(l(C))for(let E=0;!f&&E<C.length;++E){let I=C[E];ae.contains(I.rectangle,m)&&(f=I)}}}n.tile=f,n.pickTileActive=!1}this._pickTile=Mn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Ee.getObservable(this,"pickTileActive").subscribe(function(u){u?o.setInputAction(c,Dn.LEFT_CLICK):o.removeInputAction(Dn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(H3.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 Mn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Mn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Mn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Mn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Mn(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}}});H3.prototype._update=function(){this.frustums&&(this.frustumStatisticText=Rvt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=See(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}`};H3.prototype.isDestroyed=function(){return!1};H3.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(),ue(this)};var W3=H3;function y5(e,t){e=Un(e);let n=document.createElement("div"),i=new W3(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.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",o.appendChild(s);let a=Mu.createSection,c=Mu.createCheckbox,u=a(s,"General","generalVisible","toggleGeneral"),f=c("Show Frustums","frustums"),h=document.createElement("div");h.className="cesium-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(h),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: "     Frustum:"'),g.appendChild(m);let _=document.createElement("span");_.setAttribute("data-bind","text: depthFrustumText"),g.appendChild(_);let y=document.createElement("input");y.type="button",y.value="-",y.className="cesium-cesiumInspector-pickButton",y.setAttribute("data-bind","click: decrementDepthFrustum"),g.appendChild(y);let C=document.createElement("input");C.type="button",C.value="+",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: incrementDepthFrustum"),g.appendChild(C);let E=a(s,"Primitives","primitivesVisible","togglePrimitives"),I=document.createElement("div");I.className="cesium-cesiumInspector-pickSection",E.appendChild(I);let b=document.createElement("input");b.type="button",b.value="Pick a primitive",b.className="cesium-cesiumInspector-pickButton",b.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let S=document.createElement("div");S.className="cesium-cesiumInspector-center",S.appendChild(b),I.appendChild(S),I.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),I.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),I.appendChild(this._primitiveOnly);let B=a(s,"Terrain","terrainVisible","toggleTerrain"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",B.appendChild(v);let P=document.createElement("input");P.type="button",P.value="Pick a tile",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),S=document.createElement("div"),S.appendChild(P),S.className="cesium-cesiumInspector-center",v.appendChild(S);let N=document.createElement("div");v.appendChild(N);let L=document.createElement("input");L.type="button",L.value="Parent",L.className="cesium-cesiumInspector-pickButton",L.setAttribute("data-bind","click: selectParent");let A=document.createElement("input");A.type="button",A.value="NW",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: selectNW");let x=document.createElement("input");x.type="button",x.value="NE",x.className="cesium-cesiumInspector-pickButton",x.setAttribute("data-bind","click: selectNE");let T=document.createElement("input");T.type="button",T.value="SW",T.className="cesium-cesiumInspector-pickButton",T.setAttribute("data-bind","click: selectSW");let w=document.createElement("input");w.type="button",w.value="SE",w.className="cesium-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectSE");let R=document.createElement("div");R.className="cesium-cesiumInspector-tileText",N.className="cesium-cesiumInspector-frustumStatistics",N.appendChild(R),N.setAttribute("data-bind","visible: hasPickedTile"),R.setAttribute("data-bind","html: tileText");let O=document.createElement("div");O.className="cesium-cesiumInspector-relativeText",O.textContent="Select relative:",N.appendChild(O);let k=document.createElement("table"),F=document.createElement("tr"),z=document.createElement("tr"),Q=document.createElement("td");Q.appendChild(L);let H=document.createElement("td");H.appendChild(A);let j=document.createElement("td");j.appendChild(x),F.appendChild(Q),F.appendChild(H),F.appendChild(j);let Z=document.createElement("td"),Y=document.createElement("td");Y.appendChild(T);let $=document.createElement("td");$.appendChild(w),z.appendChild(Z),z.appendChild(Y),z.appendChild($),k.appendChild(F),k.appendChild(z),N.appendChild(k),v.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),v.appendChild(c("Show only selected","filterTile","hasPickedTile")),B.appendChild(c("Wireframe","wireframe")),B.appendChild(c("Suspend LOD update","suspendUpdates")),B.appendChild(c("Show tile coordinates","tileCoordinates")),Ee.applyBindings(i,this._element)}Object.defineProperties(y5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});y5.prototype.isDestroyed=function(){return!1};y5.prototype.destroy=function(){return Ee.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};var j3=y5;function MSe(e){e=e??V.EMPTY_OBJECT;let t=e.globe,n=e.imageryProviderViewModels??V.EMPTY_ARRAY,i=e.terrainProviderViewModels??V.EMPTY_ARRAY;this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,Ee.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Ee.getObservable(this,"imageryProviderViewModels"),r=Ee.pureComputed(function(){let h=o(),p={},g;for(g=0;g<h.length;g++){let y=h[g],C=y.category;l(p[C])?p[C].push(y):p[C]=[y]}let m=Object.keys(p),_=[];for(g=0;g<m.length;g++){let y=m[g];_.push({name:y,providers:p[y]})}return _});this._imageryProviders=r;let s=Ee.getObservable(this,"terrainProviderViewModels"),a=Ee.pureComputed(function(){let h=s(),p={},g;for(g=0;g<h.length;g++){let y=h[g],C=y.category;l(p[C])?p[C].push(y):p[C]=[y]}let m=Object.keys(p),_=[];for(g=0;g<m.length;g++){let y=m[g];_.push({name:y,providers:p[y]})}return _});this._terrainProviders=a,this.buttonTooltip=void 0,Ee.defineProperty(this,"buttonTooltip",function(){let h=this.selectedImagery,p=this.selectedTerrain,g=l(h)?h.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,Ee.defineProperty(this,"buttonImageUrl",function(){let h=this.selectedImagery;if(l(h))return h.iconUrl}),this.selectedImagery=void 0;let c=Ee.observable();this._currentImageryLayers=[],Ee.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(h){if(c()===h){this.dropDownVisible=!1;return}let p,g=this._currentImageryLayers,m=g.length,_=this._globe.imageryLayers,y=!1;for(p=0;p<m;p++){let C=_.length;for(let E=0;E<C;E++){let I=_.get(E);if(I===g[p]){_.remove(I),y=!0;break}}}if(l(h)){let C=h.creationCommand();if(Array.isArray(C)){let E=C.length;for(this._currentImageryLayers=[],p=E-1;p>=0;p--){let I=ns.fromProviderAsync(C[p]);_.add(I,0),this._currentImageryLayers.push(I)}}else{this._currentImageryLayers=[];let E=ns.fromProviderAsync(C);if(E.name=h.name,y)_.add(E,0);else{let I=_.get(0);l(I)&&_.remove(I),_.add(E,0)}this._currentImageryLayers.push(E)}}c(h),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let u=Ee.observable();Ee.defineProperty(this,"selectedTerrain",{get:function(){return u()},set:function(h){if(u()===h){this.dropDownVisible=!1;return}let p;if(l(h)&&(p=h.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof Pp),this._globe.terrainProvider=p;else if(l(p)){let g=!1,m=this._globe.terrainProviderChanged.addEventListener(()=>{g=!0,m()}),y=new x3(p).readyEvent.addEventListener(C=>{g||(this._globe.depthTestAgainstTerrain=!(C instanceof Pp),this._globe.terrainProvider=C,y())})}u(h),this.dropDownVisible=!1}});let f=this;this._toggleDropDown=Mn(function(){f.dropDownVisible=!f.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(MSe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var Y3=MSe;function C5(e,t){e=Un(e);let n=new Y3(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 o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.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 h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.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(h);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),h.appendChild(p);let g=document.createElement("div");g.className="cesium-baseLayerPicker-itemLabel",g.setAttribute("data-bind","text: name"),h.appendChild(g);let m=document.createElement("div");m.className="cesium-baseLayerPicker-sectionTitle",m.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),m.innerHTML="Terrain",r.appendChild(m);let _=document.createElement("div");_.className="cesium-baseLayerPicker-section",_.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(_);let y=document.createElement("div");y.className="cesium-baseLayerPicker-category",_.appendChild(y);let C=document.createElement("div");C.className="cesium-baseLayerPicker-categoryTitle",C.setAttribute("data-bind","text: name"),y.appendChild(C);let E=document.createElement("div");E.className="cesium-baseLayerPicker-choices",E.setAttribute("data-bind","foreach: providers"),y.appendChild(E);let I=document.createElement("div");I.className="cesium-baseLayerPicker-item",I.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),E.appendChild(I);let b=document.createElement("img");b.className="cesium-baseLayerPicker-itemIcon",b.setAttribute("data-bind","attr: { src: iconUrl }"),b.setAttribute("draggable","false"),I.appendChild(b);let S=document.createElement("div");S.className="cesium-baseLayerPicker-itemLabel",S.setAttribute("data-bind","text: name"),I.appendChild(S),Ee.applyBindings(n,i),Ee.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(B){i.contains(B.target)||r.contains(B.target)||(n.dropDownVisible=!1)},jt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(C5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});C5.prototype.isDestroyed=function(){return!1};C5.prototype.destroy=function(){return jt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ee.cleanNode(this._element),Ee.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),ue(this)};var q3=C5;function NSe(e){let t=e.creationFunction;l(t.canExecute)||(t=Mn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",Ee.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(NSe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var Ts=NSe;function Lvt(){let e=[],t=devicePixelRatio>=2;return e.push(new Ts({name:"Bing Maps Aerial",iconUrl:fn("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return $A({style:ZA.AERIAL})}})),e.push(new Ts({name:"Bing Maps Aerial with Labels",iconUrl:fn("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return $A({style:ZA.AERIAL_WITH_LABELS})}})),e.push(new Ts({name:"Bing Maps Roads",iconUrl:fn("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return $A({style:ZA.ROAD})}})),e.push(new Ts({name:"ArcGIS World Imagery",iconUrl:fn("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 XA.fromBasemapType(Fh.SATELLITE,{enablePickFeatures:!1})}})),e.push(new Ts({name:"ArcGIS World Hillshade",iconUrl:fn("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 XA.fromBasemapType(Fh.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new Ts({name:"Esri World Ocean",iconUrl:fn("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 XA.fromBasemapType(Fh.OCEANS,{enablePickFeatures:!1})}})),e.push(new Ts({name:"Open\xADStreet\xADMap",iconUrl:fn("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 a_({url:"https://tile.openstreetmap.org/"})}})),e.push(new Ts({name:"Stadia x Stamen Watercolor",iconUrl:fn("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 a_({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new Ts({name:"Stadia x Stamen Toner",iconUrl:fn("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 a_({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`© <a href="https://stamen.com/" target="_blank">Stamen Design</a> © <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new Ts({name:"Stadia Alidade Smooth",iconUrl:fn("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 a_({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new Ts({name:"Stadia Alidade Smooth Dark",iconUrl:fn("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 a_({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`© <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a> © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new Ts({name:"Sentinel-2",iconUrl:fn("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 JA.fromAssetId(3954)}})),e.push(new Ts({name:"Blue Marble",iconUrl:fn("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return JA.fromAssetId(3845)}})),e.push(new Ts({name:"Earth at night",iconUrl:fn("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 JA.fromAssetId(3812)}})),e.push(new Ts({name:"Natural Earth\xA0II",iconUrl:fn("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast. http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return my.fromUrl(fn("Assets/Textures/NaturalEarthII"))}})),e}var K3=Lvt;function Ovt(){let e=[];return e.push(new Ts({name:"WGS84 Ellipsoid",iconUrl:fn("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new Pp({ellipsoid:ne.WGS84})}})),e.push(new Ts({name:"Cesium World Terrain",iconUrl:fn("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 yx({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var X3=Ovt;function E5(e,t){l(t)||(t=document.body),t=Un(t);let n=this,i=Ee.observable(Or.fullscreen),o=Ee.observable(Or.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Ee.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Ee.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Or.enabled)}}),this.tooltip=void 0,Ee.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Mn(function(){Or.fullscreen?Or.exitFullscreen():Or.requestFullscreen(n._fullscreenElement)},Ee.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Un(e)??r.body,this._callback=function(){i(Or.fullscreen)},r.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(E5.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});E5.prototype.isDestroyed=function(){return!1};E5.prototype.destroy=function(){document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var J3=E5;var Fvt="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",Qvt="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 I5(e,t){e=Un(e);let n=new J3(t,e);n._exitFullScreenPath=Qvt,n._enterFullScreenPath=Fvt;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),Ee.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(I5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});I5.prototype.isDestroyed=function(){return!1};I5.prototype.destroy=function(){return this._viewModel.destroy(),Ee.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Z3=I5;var LSe=1e3;function Zd(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new xx({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 ge,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=FSe,this._handleArrowUp=OSe;let t=this;this._suggestionsVisible=Ee.pureComputed(function(){let o=Ee.getObservable(t,"_suggestions")().length>0,r=Ee.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Mn(function(i){if(i=i??bC.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)Hvt(t);else return zvt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?OSe(t):r?FSe(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;USe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??Zd.flyToDestination,this._focusTextbox=!1,Ee.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Ee.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){Zd._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Ee.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Ee.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Ee.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(Zd.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}}});Zd.prototype.destroy=function(){this._suggestionSubscription.dispose()};function OSe(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],Zd._adjustSuggestionsScroll(e,n)}function FSe(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],Zd._adjustSuggestionsScroll(e,i)}function kvt(e,t){let n=l(t)?t.availability:void 0;return l(n)?SI(t,[e]).then(function(i){return e=i[0],e.height+=LSe,e}):(e.height+=LSe,Promise.resolve(e))}function Uvt(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,s=t,a;return t instanceof ae?D.equalsEpsilon(t.south,t.north,D.EPSILON7)&&D.equalsEpsilon(t.east,t.west,D.EPSILON7)?t=ae.center(t):a=wI(t,n):t=i.cartesianToCartographic(t),l(a)||(a=kvt(t,r)),a.then(function(c){s=i.cartographicToCartesian(c)}).finally(function(){o.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:M.IDENTITY})})}async function Gvt(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 zvt(e,t,n){let i=e._searchText;if(kSe(i)){e.showSuggestions();return}e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1;let o,r;for(o=0;o<t.length;o++){if(e._wasGeocodeCancelled)return;if(r=await Gvt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,Bee(e);let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);let a=QSe(e,Ww.getCreditsFromResult(s[0]));l(a)||wee(e,t[o].credit);return}e._searchText=`${i} (not found)`}function wee(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function QSe(e,t){return l(t)&&t.forEach(n=>wee(e,n)),t}function Bee(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function Vvt(e,t){let n=Un(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function Hvt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function kSe(e){return/^\s*$/.test(e)}function USe(e){Ee.getObservable(e,"_suggestions").removeAll()}async function Wvt(e){if(!e.autoComplete)return;let t=e._searchText;if(USe(e),Bee(e),!kSe(t))for(let n of e._geocoderServices){let i=await n.geocode(t,bC.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(i),i.length>0){let o=!0;i.forEach(r=>{let s=Ww.getCreditsFromResult(r);o=o&&!l(s),QSe(e,s)}),o&&wee(e,n.credit)}if(e._suggestions.length>=5)return}}Zd.flyToDestination=Uvt;Zd._updateSearchSuggestions=Wvt;Zd._adjustSuggestionsScroll=Vvt;Zd.prototype.isDestroyed=function(){return!1};Zd.prototype.destroy=function(){return Bee(this),ue(this)};var $3=Zd;var jvt="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",Yvt="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 x5(e){let t=Un(e.container),n=new $3(e);n._startSearchPath=jvt,n._stopSearchPath=Yvt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.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(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),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),Ee.applyBindings(n,i),Ee.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()},jt.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(x5.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});x5.prototype.isDestroyed=function(){return!1};x5.prototype.destroy=function(){let e=this._container;return jt.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(),Ee.cleanNode(this._form),Ee.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),ue(this)};var eU=x5;function GSe(e,t){this._scene=e,this._duration=t;let n=this;this._command=Mn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Ee.track(this,["tooltip"])}Object.defineProperties(GSe.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 tU=GSe;function b5(e,t,n){e=Un(e);let i=new tU(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 o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),Ee.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(b5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});b5.prototype.isDestroyed=function(){return!1};b5.prototype.destroy=function(){return Ee.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var nU=b5;function qvt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function VSe(e,t){Ee.track(e);for(let n=0;n<e.sublayers.length;n++)VSe(e.sublayers[n],t)}function T5(e){return e.modelName==="FullModel"}function HSe(e){return e.modelName==="Overview"}function WSe(e){return HSe(e)||T5(e)}function zSe(e,t){if(WSe(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:Ee.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function Kvt(e,t){if(WSe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");T5(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function Xvt(e,t){try{let n=e.getAttributeNames();for(let i=0;i<n.length;i++)if(n[i]==="BldgLevel"){let o=e.getAttributeValues(n[i]);for(let r=0;r<o.length;r++)t.push(o[r])}t.sort((i,o)=>i-o),t.unshift("All")}catch(n){console.log(`There was an error getting attributes: ${n}`)}}function Jvt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Ee.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Ee.observable(!0),index:-1}],currentLayer:Ee.observable(),expandClickHandler:qvt,setOptionDisable:function(i,o){Ee.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){Kvt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){VSe(n[i],this.viewModel);let o=zSe(n[i],this.viewModel);l(o)&&(HSe(o)||!l(this.viewModel.defaultLayer)&&T5(o))&&(this.viewModel.defaultLayer=o)}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=zSe(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=T5(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return Xvt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var iU=Jvt;function Zvt(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 o=new iU(t);Ee.track(o),Ee.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var Dee=Zvt;var $vt="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",ePt="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 vee(){this._cameraClicked=new ge,this._closeClicked=new ge,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Ee.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,Ee.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?ePt:$vt}}),Ee.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}vee.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(vee.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var oU=vee;function S5(e){e=Un(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=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.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(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new oU;Ee.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,u=c.createElement("link");u.href=fn("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";let f=c.createElement("div");f.className="cesium-infoBox-description",c.head.appendChild(u),c.body.appendChild(f),a._descriptionSubscription=Ja(s,"description",function(h){r.style.height="5px",f.innerHTML=h;let p=null,g=f.firstElementChild;if(g!==null&&f.childNodes.length===1){let _=window.getComputedStyle(g);if(_!==null){let y=_["background-color"],C=G.fromCssColorString(y);l(C)&&C.alpha!==0&&(p=_["background-color"])}}t.style["background-color"]=p;let m=f.getBoundingClientRect().height;r.style.height=`${m}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(S5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});S5.prototype.isDestroyed=function(){return!1};S5.prototype.destroy=function(){let e=this._container;return Ee.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),ue(this)};var rU=S5;function jSe(){this.showInstructions=!1;let e=this;this._command=Mn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Mn(function(){e._touch=!1}),this._showTouch=Mn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Ee.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(jSe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var sU=jSe;function w5(e){let t=Un(e.container),n=new sU,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 o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.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=fn("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=fn("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 h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=` <table> <tr> <td><img src="${fn("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="${fn("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="${fn("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(h);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="${fn("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="${fn("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="${fn("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="${fn("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),Ee.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(g){o.contains(g.target)||(n.showInstructions=!1)},jt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(w5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});w5.prototype.isDestroyed=function(){return!1};w5.prototype.destroy=function(){return jt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Ee.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var aU=w5;function Pee(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,Ee.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Mn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=s3.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(Pee.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});Pee.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),ue(this)};var cU=Pee;function B5(e){let t=Un(e.container),n=new cU(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),Ee.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(B5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});B5.prototype.isDestroyed=function(){return!1};B5.prototype.destroy=function(){return this._viewModel.destroy(),Ee.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var lU=B5;function D5(e){this._scene=e,this._orthographic=e.camera.frustum instanceof mn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Ee.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Ee.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Mn(function(){t.sceneMode===oe.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Dr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===oe.SCENE2D||t._scene.camera.frustum instanceof mn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Mn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Mn(function(){t.sceneMode!==oe.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=oe}Object.defineProperties(D5.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}}});D5.prototype.isDestroyed=function(){return!1};D5.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var uU=D5;var tPt="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",nPt="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 v5(e,t){e=Un(e);let n=new uU(t);n._perspectivePath=tPt,n._orthographicPath=nPt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.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'),o.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(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.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(r);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),Ee.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},jt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(v5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});v5.prototype.isDestroyed=function(){return!1};v5.prototype.destroy=function(){return this._viewModel.destroy(),jt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ee.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var fU=v5;function P5(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Dr,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",Ee.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Ee.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===oe.SCENE2D?n.tooltip2D:o===oe.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Mn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Mn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Mn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Mn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=oe}Object.defineProperties(P5.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}}});P5.prototype.isDestroyed=function(){return!1};P5.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var dU=P5;var iPt="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",oPt="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",rPt="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 R5(e,t,n){e=Un(e);let i=new dU(t,n);i._globePath=iPt,i._flatMapPath=oPt,i._columbusViewPath=rPt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.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'),r.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 -->',o.appendChild(r);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 }'),o.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 }'),o.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 }'),o.appendChild(c),Ee.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},jt.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(R5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});R5.prototype.isDestroyed=function(){return!1};R5.prototype.destroy=function(){return this._viewModel.destroy(),jt.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ee.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var hU=R5;var sPt=new U,M5="-1000px";function mU(e,t,n){this._scene=e,this._screenPositionX=M5,this._screenPositionY=M5,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Ee.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Ee.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Ee.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return Ji.worldToWindowCoordinates(e,i,o)}}mU.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,sPt);if(!l(e))this._screenPositionX=M5,this._screenPositionY=M5;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};mU.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:fs.EXPONENTIAL_OUT})};mU.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:fs.EXPONENTIAL_OUT})};Object.defineProperties(mU.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var pU=mU;function N5(e,t){e=Un(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",o="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",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new pU(t,this._element,this._container);this._viewModel=c,Ee.applyBindings(this._viewModel,this._element)}Object.defineProperties(N5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});N5.prototype.isDestroyed=function(){return!1};N5.prototype.destroy=function(){let e=this._container;return Ee.cleanNode(this._element),e.removeChild(this._element),ue(this)};var AU=N5;function wx(e,t,n){this._color=e,this._height=t,this._base=n??0}wx.prototype.getHeight=function(){return this._height};wx.prototype.getBase=function(){return this._base};wx.prototype.getStartTime=function(){return this._start};wx.prototype.getStopTime=function(){return this._stop};wx.prototype.setRange=function(e,t){this._start=e,this._stop=t};wx.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)),o=K.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var gU=wx;function YSe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new G(.5,.5,.5,1),this.backgroundColor=i||new G(0,0,0,0)}YSe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=K.addSeconds(t.startJulian,t.duration,new K);if(K.lessThan(n,o)&&K.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(K.lessThanOrEquals(n,r)&&K.greaterThanOrEquals(i,o)){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 _U=YSe;var Ree=1e12,$d={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},Wl={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},RC=[.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],aPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jl(e,t){e=Un(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=$d.none,this._touchMode=Wl.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=cPt(this),this._onMouseUp=lPt(this),this._onMouseMove=uPt(this),this._onMouseWheel=fPt(this),this._onTouchStart=dPt(this),this._onTouchMove=mPt(this),this._onTouchEnd=hPt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}jl.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};jl.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};jl.prototype.isDestroyed=function(){return!1};jl.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),ue(this)};jl.prototype.addHighlightRange=function(e,t,n){let i=new gU(e,t,n);return this._highlightRanges.push(i),this.resize(),i};jl.prototype.addTrack=function(e,t,n,i){let o=new _U(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};jl.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=K.secondsDifference(t,e),this._clock&&this._clock.clockRange!==cs.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=K.secondsDifference(o,i),s=K.secondsDifference(i,this._startJulian),a=K.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,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=o,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)};jl.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 Mee(e){return e<10?`0${e.toString()}`:e.toString()}jl.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`${aPt[t.month-1]} ${t.day} ${t.year} ${Mee(t.hour)}:${Mee(t.minute)}:${Mee(t.second)}${i}`};jl.prototype.smallestTicInPixels=7;jl.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,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,u=1e-10,f=0,h=this._timeBarSecondsSpan;h<a?(h=a,this._timeBarSecondsSpan=a,this._endJulian=K.addSeconds(this._startJulian,a,new K)):h>c&&(h=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(h/p*1e-5,.4),_,y=K.toGregorianDate(g);h>31536e4?_=K.fromDate(new Date(Date.UTC(Math.floor(y.year/100)*100,0))):h>31536e3?_=K.fromDate(new Date(Date.UTC(Math.floor(y.year/10)*10,0))):h>86400?_=K.fromDate(new Date(Date.UTC(y.year,0))):_=K.fromDate(new Date(Date.UTC(y.year,y.month,y.day)));let C=K.secondsDifference(this._startJulian,K.addSeconds(_,m,new K)),E=C+h;this._epochJulian=_;function I(Q){return Math.floor(C/Q)*Q}function b(Q,H){return Math.ceil(Q/H+.5)*H}function S(Q){return(Q-C)/h}function B(Q,H){return Q-H*Math.round(Q/H)}this._rulerEle.innerHTML=this.makeLabel(K.addSeconds(this._endJulian,-a,new K));let v=this._rulerEle.offsetWidth+20;v<30&&(v=180);let P=f;f-=u;let N={startTime:C,startJulian:g,epochJulian:_,duration:h,timeBarWidth:p,getAlpha:S};this._highlightRanges.forEach(function(Q){s+=Q.render(N)});let L=0,A=0,x=0,T=v/p;T>1&&(T=1),T*=this._timeBarSecondsSpan;let w=-1,R=-1,O=RC.length,k;for(k=0;k<O;++k){let Q=RC[k];if(++w,L=Q,Q>T&&Q>f)break;R<0&&p*(Q/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(R=w)}if(w>0){for(;w>0;)if(--w,Math.abs(B(L,RC[w]))<1e-5){RC[w]>=f&&(A=RC[w]);break}if(R>=0)for(;R<w;){if(Math.abs(B(A,RC[R]))<1e-5&&RC[R]>=f){x=RC[R];break}++R}}f=P,f>u&&x<1e-5&&Math.abs(f-L)>u&&(x=f,f<=L+u&&(A=0));let F=-999999,z;if(p*(x/this._timeBarSecondsSpan)>=3)for(o=I(x);o<=E;o=b(o,x))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*S(o)).toString()}px;"></span>`;if(p*(A/this._timeBarSecondsSpan)>=3)for(o=I(A);o<=E;o=b(o,A))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*S(o)).toString()}px;"></span>`;if(p*(L/this._timeBarSecondsSpan)>=2){this._mainTicSpan=L,E+=L,o=I(L);let Q=K.computeTaiMinusUtc(_);for(;o<=E;){let H=K.addSeconds(g,o-C,new K);if(L>2.1){let $=K.computeTaiMinusUtc(H);Math.abs($-Q)>.1&&(o+=$-Q,H=K.addSeconds(g,o-C,new K))}let j=Math.round(p*S(o)),Z=this.makeLabel(H);this._rulerEle.innerHTML=Z,z=this._rulerEle.offsetWidth,z<10&&(z=v);let Y=j-(z/2-1);Y>F?(F=Y+z+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${j.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${Y.toString()}px;">${Z}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${j.toString()}px;"></span>`,o=b(o,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),N.y=0,this._trackList.forEach(function(Q){Q.render(r._context,N),N.y+=Q.height})};jl.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)))};jl.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 cPt(e){return function(t){e._mouseMode!==$d.touchOnly&&(t.button===0?(e._mouseMode=$d.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=$d.zoom:e._mouseMode=$d.slide)),t.preventDefault()}}function lPt(e){return function(t){e._mouseMode=$d.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function uPt(e){return function(t){let n;if(e._mouseMode===$d.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===$d.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===$d.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function fPt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;Ree=Math.max(Math.min(Math.abs(n),Ree),1),n/=Ree,e.zoomFrom(Math.pow(1.05,-n))}}function dPt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=$d.touchOnly,n===1?(i=K.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=Wl.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=Wl.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=Wl.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=Wl.ignore}}function hPt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===Wl.singleTap?(e._touchMode=Wl.scrub,e._onTouchMove(t)):e._touchMode===Wl.scrub&&e._onTouchMove(t),e._mouseMode=$d.touchOnly,n!==1?e._touchMode=n>0?Wl.ignore:Wl.none:e._touchMode===Wl.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function mPt(e){return function(t){let n,i,o,r,s,a,c=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===Wl.singleTap&&(e._touchMode=Wl.slideZoom),e._mouseMode=$d.touchOnly,e._touchMode===Wl.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===Wl.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-u,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=K.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new K)):(n=e._touchState.centerX-r,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=r,e._touchState.spanX=s))}}jl.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 yU=jl;var KSe=br(qSe(),1);function pPt(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 XSe(){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 APt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(XSe(),e._locked=!1),e._noSleep.disable(),Or.exitFullscreen(),n(!1)):(Or.fullscreen||Or.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=pPt("landscape")),t.useWebVR=!0,n(!0)))}function L5(e,t){let n=this,i=Ee.observable(Or.enabled),o=Ee.observable(!1);this.isVRMode=void 0,Ee.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Ee.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Or.enabled)}}),this.tooltip=void 0,Ee.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Ee.observable(!1);this._isOrthographic=void 0,Ee.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Dr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof mn)}),this._locked=!1,this._noSleep=new KSe.default,this._command=Mn(function(){APt(n,e,o,r)},Ee.getObservable(this,"isVREnabled")),this._vrElement=Un(t)??document.body,this._callback=function(){!Or.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(XSe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(L5.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});L5.prototype.isDestroyed=function(){return!1};L5.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var EU=L5;var gPt="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",_Pt="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 O5(e,t,n){e=Un(e);let i=new EU(t,n);i._exitVRPath=_Pt,i._enterVRPath=gPt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.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(o),Ee.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(O5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});O5.prototype.isDestroyed=function(){return!1};O5.prototype.destroy=function(){return this._viewModel.destroy(),Ee.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var IU=O5;var JSe=new le;function ewe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function yPt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function CPt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function ZSe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof dr)return i;if(n instanceof da)return new dr({name:CPt(n),description:yPt(n),feature:n})}if(l(e.scene.globe))return xPt(e,t.position)}var EPt=new K;function Lee(e,t){if(l(t)){let n=t.clock;if(l(n)&&l(e)){let i=n.startTime,o=n.stopTime;K.equals(i,o)&&(o=K.addSeconds(i,D.EPSILON2,EPt)),e.updateFromClock(),e.zoomTo(i,o)}}}var IPt=new d;function xPt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new dr({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=$Se();return}let a=s[0],c=new dr({id:a.name,description:a.description});if(l(a.position)){let u=e.scene.ellipsoid.cartographicToCartesian(a.position,IPt);c.position=new ml(u)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=$Se())}),r}function $Se(){return new dr({id:"None",description:"No features found."})}function bPt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,u=e._fullscreenButton,f=e._infoBox,h=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.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(h)&&(h.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 co(e,t){e=Un(e),t=t??V.EMPTY_OBJECT;let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=t.scene3DOnly??!1,c,u,f=!1;l(t.clockViewModel)?(u=t.clockViewModel,c=u.clock):(c=new Zh,u=new L3(c),f=!0);let h=new Xk(r,{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=h.scene,g=new Dr;g.add(c.onTick,co.prototype._onTick,this);let m;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let H=document.createElement("div");H.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(H),m=new AU(H,p)}let _;if(!l(t.infoBox)||t.infoBox!==!1){let H=document.createElement("div");H.className="cesium-viewer-infoBoxContainer",o.appendChild(H),_=new rU(H);let j=_.viewModel;g.add(j.cameraClicked,co.prototype._onInfoBoxCameraClicked,this),g.add(j.closeClicked,co.prototype._onInfoBoxClockClicked,this)}let y=document.createElement("div");y.className="cesium-viewer-toolbar",o.appendChild(y);let C;if(!l(t.geocoder)||t.geocoder!==!1){let H=document.createElement("div");H.className="cesium-viewer-geocoderContainer",y.appendChild(H);let j;typeof t.geocoder=="string"?j=[new xx({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(j=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),C=new eU({container:H,geocoderServices:j,scene:p}),g.add(C.viewModel.search.beforeExecute,co.prototype._clearObjects,this)}let E;(!l(t.homeButton)||t.homeButton!==!1)&&(E=new nU(y,p),l(C)&&g.add(E.viewModel.command.afterExecute,function(){let H=C.viewModel;H.searchText="",H.isSearchInProgress&&H.search()}),g.add(E.viewModel.command.beforeExecute,co.prototype._clearTrackedObject,this));let I;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(I=new hU(y,p));let b;t.projectionPicker&&(b=new fU(y,p));let S,B;if(n){let H=t.imageryProviderViewModels??K3(),j=t.terrainProviderViewModels??X3();S=new q3(y,{globe:p.globe,imageryProviderViewModels:H,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:j,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),B=y.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(S.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(S.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let v;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let H=!0;try{if(l(window.localStorage)){let j=window.localStorage.getItem("cesium-hasSeenNavHelp");l(j)&&j?H=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}v=new aU({container:y,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??H})}let P;if(!l(t.animation)||t.animation!==!1){let H=document.createElement("div");H.className="cesium-viewer-animationContainer",o.appendChild(H),P=new Q3(H,new k3(u))}let N;if(!l(t.timeline)||t.timeline!==!1){let H=document.createElement("div");H.className="cesium-viewer-timelineContainer",o.appendChild(H),N=new yU(H,c),N.addEventListener("settime",ewe,!1),N.zoomTo(c.startTime,c.stopTime)}let L,A,x;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(x=document.createElement("div"),x.className="cesium-viewer-fullscreenContainer",o.appendChild(x),L=new Z3(x,t.fullscreenElement),A=Ja(L.viewModel,"isFullscreenEnabled",function(H){x.style.display=H?"block":"none",l(N)&&(N.container.style.right=`${x.clientWidth}px`,N.resize())}));let T,w,R;if(t.vrButton){let H=document.createElement("div");H.className="cesium-viewer-vrContainer",o.appendChild(H),T=new IU(H,p,t.fullScreenElement),w=Ja(T.viewModel,"isVREnabled",function(j){H.style.display=j?"block":"none",l(L)&&(H.style.right=`${x.clientWidth}px`),l(N)&&(N.container.style.right=`${H.clientWidth}px`,N.resize())}),R=Ja(T.viewModel,"isVRMode",function(j){bPt(i,j)})}this._baseLayerPickerDropDown=B,this._fullscreenSubscription=A,this._vrSubscription=w,this._vrModeSubscription=R,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=h,this._selectionIndicator=m,this._infoBox=_,this._clockViewModel=u,this._destroyClockViewModel=f,this._toolbar=y,this._homeButton=E,this._sceneModePicker=I,this._projectionPicker=b,this._baseLayerPicker=S,this._navigationHelpButton=v,this._animation=P,this._timeline=N,this._fullscreenButton=L,this._vrButton=T,this._geocoder=C,this._eventHelper=g,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(_)||l(m),this._selectedEntity=void 0,this._selectedEntityChanged=new ge;let O=this._cesiumWidget.dataSources,k=this._cesiumWidget.dataSourceDisplay;g.add(O.dataSourceAdded,co.prototype._onDataSourceAdded,this),g.add(O.dataSourceRemoved,co.prototype._onDataSourceRemoved,this),g.add(p.postUpdate,co.prototype.resize,this);let F=O.length;for(let H=0;H<F;H++)this._dataSourceAdded(O,O.get(H));this._dataSourceAdded(void 0,k.defaultDataSource),g.add(O.dataSourceAdded,co.prototype._dataSourceAdded,this),g.add(O.dataSourceRemoved,co.prototype._dataSourceRemoved,this);function z(H){let j=ZSe(i,H);l(j)?W.getValueOrUndefined(j.position,i.clock.currentTime)?i.trackedEntity=j:i.zoomTo(j):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function Q(H){i.selectedEntity=ZSe(i,H)}h.screenSpaceEventHandler.setInputAction(Q,Dn.LEFT_CLICK),h.screenSpaceEventHandler.setInputAction(z,Dn.LEFT_DOUBLE_CLICK),h._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(co.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,Lee(this._timeline,e))}}});co.prototype.extend=function(e,t){e(this,t)};co.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=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,h=5,p=3,g=0;if(o&&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())),h=f+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let m=this._fullscreenButton,_=this._vrButton,y=c.container,C=y.style;p=y.clientHeight+3,C.left=`${f}px`;let E=0;l(m)&&(E+=m.container.clientWidth),l(_)&&(E+=_.container.clientWidth),C.right=`${E}px`,c.resize()}!r&&l(this._fullscreenButton)&&(g=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${h}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${g}px`,this._lastWidth=n,this._lastHeight=i};co.prototype.forceResize=function(){this._lastWidth=0,this.resize()};co.prototype.render=function(){this._cesiumWidget.render()};co.prototype.isDestroyed=function(){return!1};co.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Dn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Dn.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",ewe,!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(),ue(this)};co.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(co.prototype._onEntityCollectionChanged,this)};co.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(co.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};co.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};co.prototype._onTick=function(e){let t=e.currentTime,n,i=!1,o=this.selectedEntity,r=l(o)&&this._enableInfoOrSelection;r&&o.isShowing&&o.isAvailable(t)&&(this._cesiumWidget.dataSourceDisplay.getBoundingSphere(o,!0,JSe)!==mt.FAILED?n=JSe.center:l(o.position)&&(n=o.position.getValue(t,n)),i=l(n));let s=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(s)&&(s.position=d.clone(n,s.position),s.showSelection=r&&i,s.update());let a=l(this._infoBox)?this._infoBox.viewModel:void 0;l(a)&&(a.showInfo=r,a.enableCamera=i,a.isCameraTracking=this.trackedEntity===this.selectedEntity,r?(a.titleText=o.name??o.id,a.description=W.getValueOrDefault(o.description,t,"")):(a.titleText="",a.description=""))};co.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.selectedEntity===r&&(this.selectedEntity=void 0)}};co.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)}};co.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};co.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};co.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};co.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Lee(this.timeline,e)};co.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Lee(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,co.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};co.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};co.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};co.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var Oee=co;function TPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new V3(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var Fee=TPt;function SPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new j3(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var Qee=SPt;function wPt(e,t){t=t??V.EMPTY_OBJECT;let n=!0,i=t.flyToOnDrop??!0,o=new ge,r=t.clearOnDrop??!0,s=t.dropTarget??e.container,a=t.clampToGround??!0,c=t.proxy;s=Un(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(f){twe(s,u),s=f,kee(s,u)}},dropEnabled:{get:function(){return n},set:function(f){f!==n&&(f?kee(s,u):twe(s,u),n=f)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(f){r=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){Bx(f),r&&(e.entities.removeAll(),e.dataSources.removeAll());let h=f.dataTransfer.files,p=h.length;for(let g=0;g<p;g++){let m=h[g],_=new FileReader;_.onload=BPt(e,m,c,a),_.onerror=DPt(e,m),_.readAsText(m)}}kee(s,u),e.destroy=v3(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=u}function Bx(e){e.stopPropagation(),e.preventDefault()}function twe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",Bx,!1),n.removeEventListener("dragover",Bx,!1),n.removeEventListener("dragexit",Bx,!1))}function kee(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",Bx,!1),e.addEventListener("dragover",Bx,!1),e.addEventListener("dragexit",Bx,!1)}function BPt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=UO.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=Wy.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=II.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=QF.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 DPt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var Uee=wPt;function vPt(e,t){t=t??V.EMPTY_OBJECT;let n=new lU({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var Gee=vPt;function nwe(e){let t=e.split(` `),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",o=/^\s*/,s=t[n].match(o)[0].length;for(let a=n;a<t.length;a++){let c=t[a];c.match(o)[0].length>=s&&(c=c.slice(s)),i+=`${c} `}return i}function eh(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:s}=o;t._definedProperties.push(r);let a=o.setPrimitiveFunction;a===!0&&(a=function(f){t._voxelPrimitive[r]=f});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let u=Ee.observable();return Ee.defineProperty(t,r,{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[r]=s,u}function i(o,r){return function(s){let a=t._voxelPrimitive[o].clone();a[r]=s,t._voxelPrimitive[o]=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 o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=nwe(o)}}),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 o=t._voxelPrimitive.shape;t.shapeIsBox=o===Xa.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===Xa.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===Xa.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&&jp(t)},getPrimitiveFunction:function(){t.translationX=M.getTranslation(t._voxelPrimitive.modelMatrix,new d).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)},getPrimitiveFunction:function(){t.translationY=M.getTranslation(t._voxelPrimitive.modelMatrix,new d).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)},getPrimitiveFunction:function(){t.translationZ=M.getTranslation(t._voxelPrimitive.modelMatrix,new d).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)},getPrimitiveFunction:function(){t.scaleX=M.getScale(t._voxelPrimitive.modelMatrix,new d).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)},getPrimitiveFunction:function(){t.scaleY=M.getScale(t._voxelPrimitive.modelMatrix,new d).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)},getPrimitiveFunction:function(){t.scaleZ=M.getScale(t._voxelPrimitive.modelMatrix,new d).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&jp(t)}})}var PPt=new d,RPt=new d,MPt=new ic,NPt=new X;function jp(e){let t=d.fromElements(e.translationX,e.translationY,e.translationZ,PPt),n=d.fromElements(e.scaleX,e.scaleY,e.scaleZ,RPt),i=MPt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=X.fromHeadingPitchRoll(i,NPt),r=X.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=M.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(eh.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=nwe(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,jp(t)}}});eh.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};eh.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};eh.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};eh.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};eh.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};eh.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};eh.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new ZI({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};eh.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).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),r-=2):(a[u]=a[u].substr(1),r-=1));else for(u=0;u<c;++u)a[u]=` ${a[u]}`,r+=2;let f=a.join(` `);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};eh.prototype.isDestroyed=function(){return!1};eh.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ee.getObservable(e,t).dispose()}),ue(this)};var xU=eh;function F5(e,t){e=Un(e);let n=document.createElement("div"),i=new xU(t);this._viewModel=i,this._container=e,this._element=n;let o=document.createElement("div");o.textContent="Voxel Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),n.appendChild(o),n.className="cesium-cesiumInspector cesium-VoxelInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let r=document.createElement("div");r.className="cesium-cesiumInspector-dropDown",n.appendChild(r);let{createSection:s,createCheckbox:a,createRangeInput:c,createButton:u}=Mu,f=s(r,"Display","displayVisible","toggleDisplay"),h=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Clipping","clippingVisible","toggleClipping"),g=s(r,"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,_=10,y=D.PI;h.appendChild(c("Translation X","translationX",-m,+m)),h.appendChild(c("Translation Y","translationY",-m,+m)),h.appendChild(c("Translation Z","translationZ",-m,+m)),h.appendChild(c("Scale X","scaleX",0,+_)),h.appendChild(c("Scale Y","scaleY",0,+_)),h.appendChild(c("Scale Z","scaleZ",0,+_)),h.appendChild(c("Heading","angleX",-y,+y)),h.appendChild(c("Pitch","angleY",-y,+y)),h.appendChild(c("Roll","angleZ",-y,+y)),zee("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),zee("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),zee("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let C=document.createElement("div");g.appendChild(C);let E=document.createElement("textarea");E.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),C.className="cesium-cesiumInspector-styleEditor",C.appendChild(E);let I=u("Compile (Ctrl+Enter)","compileShader");C.appendChild(I);let b=document.createElement("label");b.style.display="block",b.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),C.appendChild(b),Ee.applyBindings(i,n)}Object.defineProperties(F5.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});F5.prototype.isDestroyed=function(){return!1};F5.prototype.destroy=function(){return Ee.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};function zee(e,t,n,i,o,r,s,a,c,u,f,h,p,g){let m=Mu.createRangeInputWithDynamicMinMax,_=g.appendChild(document.createElement("div"));_.setAttribute("data-bind",`if: ${p}`),_.appendChild(m(e,s)),_.appendChild(m(t,a)),_.appendChild(m(n,c)),_.appendChild(m(i,u)),_.appendChild(m(o,f)),_.appendChild(m(r,h))}var bU=F5;function LPt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new bU(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var Vee=LPt;globalThis.CESIUM_VERSION="1.131";var OPt="1.131";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,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,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,Cesium3DTilesInspector,Cesium3DTilesInspectorViewModel,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,CoplanarPolygonGeometry,CoplanarPolygonGeometryLibrary,CoplanarPolygonOutlineGeometry,CornerType,CorrelationGroup,CorridorGeometry,CorridorGeometryLibrary,CorridorGeometryUpdater,CorridorGraphics,CorridorOutlineGeometry,Credit,CreditDisplay,CubeMap,CubeMapFace,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,EllipseGeometry,EllipseGeometryLibrary,EllipseGeometryUpdater,EllipseGraphics,EllipseOutlineGeometry,Ellipsoid,EllipsoidGeodesic,EllipsoidGeometry,EllipsoidGeometryUpdater,EllipsoidGraphics,EllipsoidOutlineGeometry,EllipsoidPrimitive,EllipsoidRhumbLine,EllipsoidSurfaceAppearance,EllipsoidTangentPlane,EllipsoidTerrainProvider,EllipsoidalOccluder,Empty3DTileContent,EncodedCartesian3,Entity,EntityCluster,EntityCollection,EntityView,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,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,GoogleEarthEnterpriseImageryProvider,GoogleEarthEnterpriseMapsProvider,GoogleEarthEnterpriseMetadata,GoogleEarthEnterpriseTerrainData,GoogleEarthEnterpriseTerrainProvider,GoogleEarthEnterpriseTileInformation,GoogleGeocoderService,GoogleMaps,GpxDataSource,GregorianDate,GridImageryProvider,GridMaterialProperty,GroundGeometryUpdater,GroundPolylineGeometry,GroundPolylinePrimitive,GroundPrimitive,GroupMetadata,HeadingPitchRange,HeadingPitchRoll,Heap,HeightReference,HeightmapEncoding,HeightmapTerrainData,HeightmapTessellator,HermitePolynomialApproximation,HermiteSpline,HilbertOrder,HomeButton,HomeButtonViewModel,HorizontalOrigin,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,IonResource,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,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,ModelVisualizer,Moon,MorphTargetsPipelineStage,MorphWeightSpline,MortonOrder,Multiple3DTileContent,MultisampleFramebuffer,NavigationHelpButton,NavigationHelpButtonViewModel,NearFarScalar,NeverTileDiscardPolicy,NodeRenderResources,NodeStatisticsPipelineStage,NodeTransformationProperty,OIT,Occluder,OffsetGeometryInstanceAttribute,OpenCageGeocoderService,OpenStreetMapImageryProvider,OrderedGroundPrimitiveCollection,OrientedBoundingBox,OrthographicFrustum,OrthographicOffCenterFrustum,Packable,PackableForInterpolation,Particle,ParticleBurst,ParticleEmitter,ParticleSystem,Pass,PassState,PathGraphics,PathVisualizer,PeliasGeocoderService,PerInstanceColorAppearance,PerformanceDisplay,PerformanceWatchdog,PerformanceWatchdogViewModel,PerspectiveFrustum,PerspectiveOffCenterFrustum,PickDepth,PickDepthFramebuffer,PickFramebuffer,PickedMetadataInfo,Picking,PickingPipelineStage,PinBuilder,PixelDatatype,PixelFormat,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,ScreenSpaceEventHandler,ScreenSpaceEventType,SelectedFeatureIdPipelineStage,SelectionIndicator,SelectionIndicatorViewModel,SensorVolumePortionToDisplay,ShaderBuilder,ShaderCache,ShaderDestination,ShaderFunction,ShaderProgram,ShaderSource,ShaderStruct,ShadowMap,ShadowMapShader,ShadowMode,ShadowVolumeAppearance,ShowGeometryInstanceAttribute,Simon1994PlanetaryPositions,SimplePolylineGeometry,SingleTileImageryProvider,SkinningPipelineStage,SkyAtmosphere,SkyBox,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,TaskProcessor,Terrain,TerrainData,TerrainEncoding,TerrainFillMesh,TerrainMesh,TerrainOffsetProperty,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,UrlTemplateImageryProvider,VERSION,VRButton,VRButtonViewModel,VRTheWorldTerrainProvider,VaryingType,Vector3DTileBatch,Vector3DTileClampedPolylines,Vector3DTileContent,Vector3DTileGeometry,Vector3DTilePoints,Vector3DTilePolygons,Vector3DTilePolylines,Vector3DTilePrimitive,VelocityOrientationProperty,VelocityVectorProperty,VertexArray,VertexArrayFacade,VertexAttributeSemantic,VertexFormat,VerticalExaggeration,VerticalExaggerationPipelineStage,VerticalOrigin,VideoSynchronizer,View,Viewer,ViewportQuad,Visibility,Visualizer,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,_shadersBumpMapMaterial,_shadersCPUStylingStageFS,_shadersCPUStylingStageVS,_shadersCheckerboardMaterial,_shadersCloudCollectionFS,_shadersCloudCollectionVS,_shadersCloudNoiseFS,_shadersCloudNoiseVS,_shadersCompareAndPackTranslucentDepth,_shadersCompositeOITFS,_shadersCompositeTranslucentClassification,_shadersComputeIrradianceFS,_shadersComputeRadianceMapFS,_shadersContrastBias,_shadersConvolveSpecularMapFS,_shadersConvolveSpecularMapVS,_shadersCustomShaderStageFS,_shadersCustomShaderStageVS,_shadersCzmBuiltins,_shadersDepthOfField,_shadersDepthPlaneFS,_shadersDepthPlaneVS,_shadersDepthView,_shadersDepthViewPacked,_shadersDotMaterial,_shadersEdgeDetection,_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,_shadersIntersectClippingPlanes,_shadersIntersectCylinder,_shadersIntersectDepth,_shadersIntersectEllipsoid,_shadersIntersectLongitude,_shadersIntersection,_shadersIntersectionUtils,_shadersLegacyInstancingStageVS,_shadersLensFlare,_shadersLightingStageFS,_shadersMaterialStageFS,_shadersMegatexture,_shadersMetadataStageFS,_shadersMetadataStageVS,_shadersModelClippingPlanesStageFS,_shadersModelClippingPolygonsStageFS,_shadersModelClippingPolygonsStageVS,_shadersModelColorStageFS,_shadersModelFS,_shadersModelSilhouetteStageFS,_shadersModelSilhouetteStageVS,_shadersModelSplitterStageFS,_shadersModelVS,_shadersModifiedReinhardTonemapping,_shadersMorphTargetsStageVS,_shadersNightVision,_shadersNormalMapMaterial,_shadersOctree,_shadersPassThrough,_shadersPassThroughDepth,_shadersPbrNeutralTonemapping,_shadersPerInstanceColorAppearanceFS,_shadersPerInstanceColorAppearanceVS,_shadersPerInstanceFlatColorAppearanceFS,_shadersPerInstanceFlatColorAppearanceVS,_shadersPointCloudEyeDomeLighting,_shadersPointCloudStylingStageVS,_shadersPointPrimitiveCollectionFS,_shadersPointPrimitiveCollectionVS,_shadersPolygonSignedDistanceFS,_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,_shadersVectorTileVS,_shadersVerticalExaggerationStageVS,_shadersViewportQuadFS,_shadersViewportQuadVS,_shadersVoxelFS,_shadersVoxelUtils,_shadersVoxelVS,_shadersWater,_shadersWaterMaskMaterial,_shadersXYZToRGB,_shadersacesTonemapping,_shadersalphaWeight,_shadersantialias,_shadersapplyHSBShift,_shadersapproximateSphericalCoordinates,_shadersapproximateTanh,_shadersbackFacing,_shadersbranchFreeTernary,_shaderscascadeColor,_shaderscascadeDistance,_shaderscascadeMatrix,_shaderscascadeWeights,_shadersclipPolygons,_shaderscolumbusViewMorph,_shaderscomputeAtmosphereColor,_shaderscomputeGroundAtmosphereScattering,_shaderscomputePosition,_shaderscomputeScattering,_shadersconvertUvToBox,_shadersconvertUvToCylinder,_shadersconvertUvToEllipsoid,_shaderscosineAndSine,_shadersdecompressTextureCoordinates,_shadersdegreesPerRadian,_shadersdepthClamp,_shadersdepthRange,_shadersdepthRangeStruct,_shaderseastNorthUpToEyeCoordinates,_shadersellipsoidContainsPoint,_shadersellipsoidTextureCoordinates,_shadersepsilon1,_shadersepsilon2,_shadersepsilon3,_shadersepsilon4,_shadersepsilon5,_shadersepsilon6,_shadersepsilon7,_shadersequalsEpsilon,_shaderseyeOffset,_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,_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,_shadersunpackClippingExtents,_shadersunpackDepth,_shadersunpackFloat,_shadersunpackUint,_shadersvalueTransform,_shadersvertexLogDepth,_shaderswebMercatorMaxLatitude,_shaderswindowToEyeCoordinates,_shaderswriteDepthClamp,_shaderswriteLogDepth,_shaderswriteNonPerspective,addBuffer,addDefaults,addExtensionsRequired,addExtensionsUsed,addPipelineExtras,addToArray,appendForwardSlash,arrayRemoveDuplicates,barycentricCoordinates,binarySearch,buildModuleUrl,buildVoxelDrawCommands,clone,combine,computeFlyToLocationForRectangle,createBillboardPointCallback,createCommand,createDefaultImageryProviderViewModels,createDefaultTerrainProviderViewModels,createElevationBandMaterial,createGooglePhotorealistic3DTileset,createGuid,createMaterialPropertyDescriptor,createOsmBuildingsAsync,createPropertyDescriptor,createRawPropertyDescriptor,createTangentSpaceDebugPrimitive,createTaskProcessorWorker,createUniform,createUniformArray,createWorldBathymetryAsync,createWorldImageryAsync,createWorldTerrainAsync,decodeGoogleEarthEnterpriseData,decodeVectorPolylinePositions,defaultValue,defer,defined,demodernizeShader,deprecationWarning,destroyObject,exportKml,findAccessorMinMax,findContentMetadata,findGroupMetadata,findTileMetadata,forEachTextureInMaterial,formatError,freezeRenderState,getAbsoluteUri,getAccessorByteStride,getBaseUri,getBinaryAccessor,getClipAndStyleCode,getClippingFunction,getComponentReader,getElement,getExtensionFromUri,getFilenameFromUri,getImageFromTypedArray,getImagePixels,getJsonFromTypedArray,getMagic,getMetadataClassProperty,getMetadataProperty,getStringFromTypedArray,getTimestamp,hasExtension,heightReferenceOnEntityPropertyChanged,isBitSet,isBlobUri,isCrossOriginUrl,isDataUri,isLeapYear,knockout,knockout_3_5_1,knockout_es5,loadAndExecuteScript,loadCubeMap,loadImageFromTypedArray,loadKTX2,mergeSort,moveTechniqueRenderStates,moveTechniquesToExtension,numberOfComponentsForType,objectToQuery,oneTimeWarning,parseBatchTable,parseFeatureMetadataLegacy,parseGlb,parseResponseHeaders,parseStructuralMetadata,pickModel,pointInsideTriangle,preprocess3DTileContent,processVoxelProperties,queryToObject,readAccessorPacked,removeExtension,removeExtensionsRequired,removeExtensionsUsed,removePipelineExtras,removeUnusedElements,resizeImageToNextPowerOfTwo,sampleTerrain,sampleTerrainMostDetailed,scaleToGeodeticSurface,srgbToLinear,subdivideArray,subscribeAndEvaluate,updateAccessorComponentTypes,updateVersion,usesExtension,viewerCesium3DTilesInspectorMixin,viewerCesiumInspectorMixin,viewerDragDropMixin,viewerPerformanceWatchdogMixin,viewerVoxelInspectorMixin,webGLConstantToGlslType,wrapFunction,writeTextToCanvas});