DSDSWeb/static/js/Cesium/Cesium.js

533 lines
2.7 MiB
JavaScript
Raw Normal View History

2024-09-19 09:15:15 +08:00
/**
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
*
* Copyright 2011-2017 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/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
/**
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
*/
/**
* @license
*
* Grauw URI utilities
*
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js
*
* @author Laurens Holst (http://www.grauw.nl/)
*
* Copyright 2012 Laurens Holst
*
* 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.
*
*/
/**
@license
when.js - https://github.com/cujojs/when
MIT License (c) copyright B Cavalier & J Hann
* A lightweight CommonJS Promises/A and when() implementation
* when is part of the cujo.js family of libraries (http://cujojs.com/)
*
* Licensed under the MIT License at:
* http://www.opensource.org/licenses/mit-license.php
*
* @version 1.7.1
*/
/**
@license
mersenne-twister.js - https://gist.github.com/banksean/300494
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. 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.
3. The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"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.
*/
/**
@license
sprintf.js from the php.js project - https://github.com/kvz/phpjs
Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js
php.js is copyright 2012 Kevin van Zonneveld.
Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick
(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
L. Rodrigues (http://www.jsfromhell.com), Ash Searle
(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny
Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
(http://webdevhobo.blogspot.com/), marrtins, GeekFG
(http://geekfg.blogspot.com), Andrea Giammarchi
(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
Marc Palau, Martin
(http://www.erlenwiese.de/), Breaking Par Consulting Inc
(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
Chris, Mirek Slugen, saulius, Alfonso Jimenez
(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
Ariede (http://caioariede.com), Robin, Kankrelune
(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
David, Aman Gupta, Michael White, Public Domain
(http://www.json.org/json2.js), Steven Levithan
(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
(http://javascript.crockford.com), madipta, Slawomir Kaniecki,
ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt
(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
(http://yass.meetcweb.com), Peter-Paul Koch
(http://www.quirksmode.org/js/beat.html), Olivier Louvignes
(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
(http://www.premasolutions.com/), Philippe Jausions
(http://pear.php.net/user/jausions), Aidan Lister
(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
strcmp, Taras Bogach, jpfle, Alexander Ermolaev
(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
(http://www.pedrotainha.com), James, Arnout Kazemier
(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan
W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt
Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
Russell Walker (http://www.nbill.co.uk/), Jamie Beck
(http://www.terabit.ca/), setcookie, Michael, YUI Library:
http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
http://hacks.bluesmoon.info/strftime/strftime.js, Ben
(http://benblume.co.uk/), DtTvB
(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
Bryan
Licensed under the MIT (MIT-LICENSE.txt) license.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
// Copyright 2012 Google Inc., Apache 2.0 license.
/**
@license
tween.js - https://github.com/sole/tween.js
Copyright (c) 2010-2012 Tween.js authors.
Easing equations Copyright (c) 2001 Robert Penner http://robertpenner.com/easing/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/*!
* protobuf.js v6.7.0 (c) 2016, Daniel Wirtz
* Compiled Wed, 22 Mar 2017 17:30:26 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
/**
* Dictionary of provider id to copyright strings.
* @type {Object}
* @default {}
*/
/**
@license
fontmetrics.js - https://github.com/Pomax/fontmetrics.js
Copyright (C) 2011 by Mike "Pomax" Kamermans
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
**/
/**
@license
topojson - https://github.com/mbostock/topojson
Copyright (c) 2012, Michael Bostock
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.
* The name Michael Bostock may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 MICHAEL BOSTOCK 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.
*/
/*!
* Autolinker.js
* 0.17.1
*
* Copyright(c) 2015 Gregory Jacobs <greg@greg-jacobs.com>
* MIT Licensed. http://www.opensource.org/licenses/mit-license.php
*
* https://github.com/gregjacobs/Autolinker.js
*/
/**
@license
Copyright (c) 2013 Gildas Lormeau. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. 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.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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.
**/
/**
* @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.
*/
/**
* @license
* Copyright (c) 2000-2005, Sean O'Neil (s_p_oneil@hotmail.com)
* 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 the project 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 AND CONTRIBUTORS "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.
*
* Modifications made by Analytical Graphics, Inc.
*/
/*!
* Knockout JavaScript library v3.4.2
* (c) The Knockout.js team - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* @license
* Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
* Copyright (c) Steve Sanderson
* MIT license
*/
/*! NoSleep.js v0.7.0 - git.io/vfn01 - Rich Tibbett - MIT license */
!function(){var requirejs,require,define;!function(e){function t(e,t){return v.call(e,t)}function i(e,t){var i,r,n,o,a,s,l,u,c,d,h,p,f=t&&t.split("/"),m=_.map,g=m&&m["*"]||{};if(e){for(e=e.split("/"),a=e.length-1,_.nodeIdCompat&&C.test(e[a])&&(e[a]=e[a].replace(C,"")),"."===e[0].charAt(0)&&f&&(p=f.slice(0,f.length-1),e=p.concat(e)),c=0;c<e.length;c++)if("."===(h=e[c]))e.splice(c,1),c-=1;else if(".."===h){if(0===c||1===c&&".."===e[2]||".."===e[c-1])continue;c>0&&(e.splice(c-1,2),c-=2)}e=e.join("/")}if((f||g)&&m){for(i=e.split("/"),c=i.length;c>0;c-=1){if(r=i.slice(0,c).join("/"),f)for(d=f.length;d>0;d-=1)if((n=m[f.slice(0,d).join("/")])&&(n=n[r])){o=n,s=c;break}if(o)break;!l&&g&&g[r]&&(l=g[r],u=c)}!o&&l&&(o=l,s=u),o&&(i.splice(0,s,o),e=i.join("/"))}return e}function r(t,i){return function(){var r=y.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),d.apply(e,r.concat([t,i]))}}function n(e){return function(t){return i(t,e)}}function o(e){return function(t){f[e]=t}}function a(i){if(t(m,i)){var r=m[i];delete m[i],g[i]=!0,c.apply(e,r)}if(!t(f,i)&&!t(g,i))throw new Error("No "+i);return f[i]}function s(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function l(e){return e?s(e):[]}function u(e){return function(){return _&&_.config&&_.config[e]||{}}}var c,d,h,p,f={},m={},_={},g={},v=Object.prototype.hasOwnProperty,y=[].slice,C=/\.js$/;h=function(e,t){var r,o=s(e),l=o[0],u=t[1];return e=o[1],l&&(l=i(l,u),r=a(l)),l?e=r&&r.normalize?r.normalize(e,n(u)):i(e,u):(e=i(e,u),o=s(e),l=o[0],e=o[1],l&&(r=a(l))),{f:l?l+"!"+e:e,n:e,pr:l,p:r}},p={require:function(e){return r(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:u(e)}}},c=function(i,n,s,u){var c,d,_,v,y,C,b,S=[],T=typeof s;if(u=u||i,C=l(u),"undefined"===T||"function"===T){for(n=!n.length&&s.length?["require","exports","module"]:n,y=0;y<n.length;y+=1)if(v=h(n[y],C),"require"===(d=v.f))S[y]=p.require(i);else if("exports"===d)S[y]=p.exports(i),b=!0;else if("module"===d)c=S[y]=p.module(i);else if(t(f,d)||t(m,d)||t(g,d))S[y]=a(d);else{if(!v.p)throw new Error(i+" missing "+d);v.p.load(v.n,r(u,!0),o(d),{}),S[y]=f[d]}_=s?s.apply(f[i],S):void 0,i&&(c&&c.exports!==e&&c.exports!==f[i]?f[i]=c.exports:_===e&&b||(f[i]=_))}else i&&(f[i]=s)},requirejs=require=d=function(t,i,r,n,o){if("string"==typeof t)return p[t]?p[t](i):a(h(t,l(i)).f);if(!t.splice){if(_=t,_.deps&&d(_.deps,_.callback),!i)return;i.splice?(t=i,i=r,r=null):t=e}return i=i||function(){},"function"==typeof r&&(r=n,n=o),n?c(e,t,i,r):setTimeout(function(){c(e,t,i,r)},4),d},d.config=function(e){return d(e)},requirejs._defined=f,define=function(e,i,r){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");i.splice||(r=i,i=[]),t(f,e)||t(m,e)||(m[e]=[e,i,r])},define.amd={jQuery:!0}}(),define("Core/appendForwardSlash",[],function(){"use strict";function e(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}return e}),define("Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Core/DeveloperError",["./defined"],function(e){"use strict";function t(e){this.name="DeveloperError",this.message=e;var t;try{throw new Error}catch(e){t=e.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t.throwInstantiationError=function(){throw new t("This function defines an interface and should not be called directly.")},t}),define("ThirdParty/Uri",[],function(){function e(t){if(t instanceof e)this.scheme=t.scheme,this.authority=t.authority,this.path=t.path,this.query=t.query,this.fragment=t.fragment;else if(t){var i=r.exec(t);this.scheme=i[1],this.authority=i[2],this.path=i[3],this.query=i[4],this.fragment=i[5]}}function t(e){var t=unescape(e);return o.test(t)?t:e.toUpperCase()}function i(e,t,i,r){return(t||"")+i.toLowerCase()+(r||"")}e.pro
;if("function"!=typeof i||this._retryCount>=this.retryAttempts)return t(!1);var r=this;return t(i(this,e)).then(function(e){return++r._retryCount,e})},R.prototype.clone=function(e){return s(e)||(e=new R({url:this._url})),e._url=this._url,e._queryParameters=n(this._queryParameters),e._templateValues=n(this._templateValues),e.headers=n(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},R.prototype.getBaseUri=function(e){return p(this.getUrlComponent(e),e)},R.prototype.appendForwardSlash=function(){this._url=i(this._url)},R.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},R.fetchArrayBuffer=function(e){return new R(e).fetchArrayBuffer()},R.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},R.fetchBlob=function(e){return new R(e).fetchBlob()},R.prototype.fetchImage=function(e){if(e=a(e,!1),I(this.request),!V||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!e)return O(this,!0);var i=this.fetchBlob();if(s(i)){var r,n;return i.then(function(e){if(s(e)){n=e;var t=window.URL.createObjectURL(e);return r=new R({url:t}),O(r)}}).then(function(e){if(s(e))return window.URL.revokeObjectURL(r.url),e.blob=n,e}).otherwise(function(e){return s(r)&&window.URL.revokeObjectURL(r.url),t.reject(e)})}},R.fetchImage=function(e){return new R(e).fetchImage(e.preferBlob)},R.prototype.fetchText=function(){return this.fetch({responseType:"text"})},R.fetchText=function(e){return new R(e).fetchText()},R.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(s(e))return e.then(function(e){if(s(e))return JSON.parse(e)})},R.fetchJson=function(e){return new R(e).fetchJson()},R.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},R.fetchXML=function(e){return new R(e).fetchXML()},R.prototype.fetchJsonp=function(e){e=a(e,"callback"),I(this.request);var t;do{t="loadJsonp"+Math.random().toString().substring(2,8)}while(s(window[t]));return L(this,e,t)},R.fetchJsonp=function(e){return new R(e).fetchJsonp(e.callbackParameterName)},R.prototype._makeRequest=function(e){var i=this;I(i.request);var r=i.request;r.url=i.url,r.requestFunction=function(){var n=e.responseType,a=o(e.headers,i.headers),l=e.overrideMimeType,u=e.method,c=e.data,d=t.defer(),h=R._Implementations.loadWithXhr(i.url,n,u,c,a,d,l);return s(h)&&s(h.abort)&&(r.cancelFunction=function(){h.abort()}),d.promise};var n=T.request(r);if(s(n))return n.then(function(e){return e}).otherwise(function(n){return r.state!==E.FAILED?t.reject(n):i.retryOnError(n).then(function(o){return o?(r.state=E.UNISSUED,r.deferred=void 0,i.fetch(e)):t.reject(n)})})};var U=/^data:(.*?)(;base64)?,(.*)$/;R.prototype.fetch=function(e){return e=D(e,{}),e.method="GET",this._makeRequest(e)},R.fetch=function(e){return new R(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},R.prototype.delete=function(e){return e=D(e,{}),e.method="DELETE",this._makeRequest(e)},R.delete=function(e){return new R(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},R.prototype.head=function(e){return e=D(e,{}),e.method="HEAD",this._makeRequest(e)},R.head=function(e){return new R(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},R.prototype.options=function(e){return e=D(e,{}),e.method="OPTIONS",this._makeRequest(e)},R.options=function(e){return new R(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},R.prototype.post=function(e,t){return r.defined("data",e),t=D(t,{}),t.method="POST",t.data=e,this._makeRequest(t)},R.post=function(e){return new R(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},R.prototype.put=function(e,t){return r.defined("data",e),t=D(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)},R.put=function(e){return new R(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},R.prototype.patch=
t[2]=r*s-a*n,t[3]=u*s-o*d,t[4]=i*d-u*n,t[5]=o*n-i*s,t[6]=o*c-u*a,t[7]=u*r-i*c,t[8]=i*a-o*r;var p=1/h;return l.multiplyByScalar(t,p,t)},l.equals=function(e,t){return e===t||r(e)&&r(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]},l.equalsEpsilon=function(e,t,i){return e===t||r(e)&&r(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},l.IDENTITY=a(new l(1,0,0,0,1,0,0,0,1)),l.ZERO=a(new l(0,0,0,0,0,0,0,0,0)),l.COLUMN0ROW0=0,l.COLUMN0ROW1=1,l.COLUMN0ROW2=2,l.COLUMN1ROW0=3,l.COLUMN1ROW1=4,l.COLUMN1ROW2=5,l.COLUMN2ROW0=6,l.COLUMN2ROW1=7,l.COLUMN2ROW2=8,n(l.prototype,{length:{get:function(){return l.packedLength}}}),l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},l.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},l.prototype.equalsEpsilon=function(e,t){return l.equalsEpsilon(this,e,t)},l.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},l}),define("Core/Cartesian4",["./Check","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,r,n,o){"use strict";function a(e,i,r,n){this.x=t(e,0),this.y=t(i,0),this.z=t(r,0),this.w=t(n,0)}a.fromElements=function(e,t,r,n,o){return i(o)?(o.x=e,o.y=t,o.z=r,o.w=n,o):new a(e,t,r,n)},a.fromColor=function(e,t){return i(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new a(e.red,e.green,e.blue,e.alpha)},a.clone=function(e,t){if(i(e))return i(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new a(e.x,e.y,e.z,e.w)},a.packedLength=4,a.pack=function(e,i,r){return r=t(r,0),i[r++]=e.x,i[r++]=e.y,i[r++]=e.z,i[r]=e.w,i},a.unpack=function(e,r,n){return r=t(r,0),i(n)||(n=new a),n.x=e[r++],n.y=e[r++],n.z=e[r++],n.w=e[r],n},a.packArray=function(e,t){var r=e.length;i(t)?t.length=4*r:t=new Array(4*r);for(var n=0;n<r;++n)a.pack(e[n],t,4*n);return t},a.unpackArray=function(e,t){var r=e.length;i(t)?t.length=r/4:t=new Array(r/4);for(var n=0;n<r;n+=4){var o=n/4;t[o]=a.unpack(e,n,t[o])}return t},a.fromArray=a.unpack,a.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)},a.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)},a.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i.w=Math.min(e.w,t.w),i},a.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i.w=Math.max(e.w,t.w),i},a.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},a.magnitude=function(e){return Math.sqrt(a.magnitudeSquared(e))};var s=new a;a.distance=function(e,t){return a.subtract(e,t,s),a.magnitude(s)},a.distanceSquared=function(e,t){return a.subtract(e,t,s),a.magnitudeSquared(s)},a.normalize=function(e,t){var i=a.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t.w=e.w/i,t},a.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},a.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i.w=e.w*t.w,i},a.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i.w=e.w/t.w,i},a.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i.w=e.w+t.w,i},a.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i.w=e.w-t.w,i},a.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i.w=e.w*t,i},a.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i.w=e.w/t,i},a.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},a.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var l=new a;a.lerp=function(e,t,i,r){return a.multiplyByScalar(t,i,l),r=a.multiplyByScalar(e,1-i,r),a.add(l,r,r)};var u=new a;a.mostOrthogonal
;return t[i++]=n.x,t[i++]=n.y,t[i++]=n.z,t[i]=e.radius,t},p.unpack=function(e,t,i){t=r(t,0),n(i)||(i=new p);var o=i.center;return o.x=e[t++],o.y=e[t++],o.z=e[t++],i.radius=e[t],i};var B=new e,z=new e;p.union=function(t,i,r){n(r)||(r=new p);var o=t.center,a=t.radius,s=i.center,l=i.radius,u=e.subtract(s,o,B),c=e.magnitude(u);if(a>=c+l)return t.clone(r),r;if(l>=c+a)return i.clone(r),r;var d=.5*(a+c+l),h=e.multiplyByScalar(u,(-a+d)/c,z);return e.add(h,o,h),e.clone(h,r.center),r.radius=d,r};var k=new e;p.expand=function(t,i,r){r=p.clone(t,r);var n=e.magnitude(e.subtract(i,r.center,k));return n>r.radius&&(r.radius=n),r},p.intersectPlane=function(t,i){var r=t.center,n=t.radius,o=i.normal,a=e.dot(o,r)+i.distance;return a<-n?s.OUTSIDE:a<n?s.INTERSECTING:s.INSIDE},p.transform=function(e,t,i){return n(i)||(i=new p),i.center=d.multiplyByPoint(t,e.center,i.center),i.radius=d.getMaximumScale(t)*e.radius,i};var V=new e;p.distanceSquaredTo=function(t,i){var r=e.subtract(t.center,i,V);return e.magnitudeSquared(r)-t.radius*t.radius},p.transformWithoutScale=function(e,t,i){return n(i)||(i=new p),i.center=d.multiplyByPoint(t,e.center,i.center),i.radius=e.radius,i};var U=new e;p.computePlaneDistances=function(t,i,r,o){n(o)||(o=new l);var a=e.subtract(t.center,i,U),s=e.dot(r,a);return o.start=s-t.radius,o.stop=s+t.radius,o};for(var G=new e,H=new e,W=new e,q=new e,Y=new e,j=new t,X=new Array(8),Q=0;Q<8;++Q)X[Q]=new e;var Z=new a;return p.projectTo2D=function(t,i,n){i=r(i,Z);var o=i.ellipsoid,a=t.center,s=t.radius,l=o.geodeticSurfaceNormal(a,G),u=e.cross(e.UNIT_Z,l,H);e.normalize(u,u);var c=e.cross(l,u,W);e.normalize(c,c),e.multiplyByScalar(l,s,l),e.multiplyByScalar(c,s,c),e.multiplyByScalar(u,s,u);var d=e.negate(c,Y),h=e.negate(u,q),f=X,m=f[0];e.add(l,c,m),e.add(m,u,m),m=f[1],e.add(l,c,m),e.add(m,h,m),m=f[2],e.add(l,d,m),e.add(m,h,m),m=f[3],e.add(l,d,m),e.add(m,u,m),e.negate(l,l),m=f[4],e.add(l,c,m),e.add(m,u,m),m=f[5],e.add(l,c,m),e.add(m,h,m),m=f[6],e.add(l,d,m),e.add(m,h,m),m=f[7],e.add(l,d,m),e.add(m,u,m);for(var _=f.length,g=0;g<_;++g){var v=f[g];e.add(a,v,v);var y=o.cartesianToCartographic(v,j);i.project(y,v)}n=p.fromPoints(f,n),a=n.center;var C=a.x,b=a.y,S=a.z;return a.x=S,a.y=C,a.z=b,n},p.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)},p.equals=function(t,i){return t===i||n(t)&&n(i)&&e.equals(t.center,i.center)&&t.radius===i.radius},p.prototype.intersectPlane=function(e){return p.intersectPlane(this,e)},p.prototype.distanceSquaredTo=function(e){return p.distanceSquaredTo(this,e)},p.prototype.computePlaneDistances=function(e,t,i){return p.computePlaneDistances(this,e,t,i)},p.prototype.isOccluded=function(e){return p.isOccluded(this,e)},p.prototype.equals=function(e){return p.equals(this,e)},p.prototype.clone=function(e){return p.clone(this,e)},p.prototype.volume=function(){var e=this.radius;return A*e*e*e},p}),define("Core/Cartesian2",["./Check","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(e,t,i,r,n,o){"use strict";function a(e,i){this.x=t(e,0),this.y=t(i,0)}a.fromElements=function(e,t,r){return i(r)?(r.x=e,r.y=t,r):new a(e,t)},a.clone=function(e,t){if(i(e))return i(t)?(t.x=e.x,t.y=e.y,t):new a(e.x,e.y)},a.fromCartesian3=a.clone,a.fromCartesian4=a.clone,a.packedLength=2,a.pack=function(e,i,r){return r=t(r,0),i[r++]=e.x,i[r]=e.y,i},a.unpack=function(e,r,n){return r=t(r,0),i(n)||(n=new a),n.x=e[r++],n.y=e[r],n},a.packArray=function(e,t){var r=e.length;i(t)?t.length=2*r:t=new Array(2*r);for(var n=0;n<r;++n)a.pack(e[n],t,2*n);return t},a.unpackArray=function(e,t){var r=e.length;i(t)?t.length=r/2:t=new Array(r/2);for(var n=0;n<r;n+=2){var o=n/2;t[o]=a.unpack(e,n,t[o])}return t},a.fromArray=a.unpack,a.maximumComponent=function(e){return Math.max(e.x,e.y)},a.minimumComponent=function(e){return Math.min(e.x,e.y)},a.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},a.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},a.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},a.magnitude=function(e){return Math.sqrt(a.mag
DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIF
;if(r.equals(c))return m(e,i,o,l,s),s;var d=a.secondsDifference(r,u)/a.secondsDifference(c,u),h=n*l,p=o*l,f=i[h+e._ut1MinusUtcSecondsColumn],g=i[p+e._ut1MinusUtcSecondsColumn],v=g-f;if(v>.5||v<-.5){var y=i[h+e._taiMinusUtcSecondsColumn],C=i[p+e._taiMinusUtcSecondsColumn];y!==C&&(c.equals(r)?f=g:g-=C-y)}return s.xPoleWander=_(d,i[h+e._xPoleWanderRadiansColumn],i[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=_(d,i[h+e._yPoleWanderRadiansColumn],i[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=_(d,i[h+e._xCelestialPoleOffsetRadiansColumn],i[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=_(d,i[h+e._yCelestialPoleOffsetRadiansColumn],i[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=_(d,f,g),s}return h.NONE=o({getPromiseToLoad:function(){return e()},compute:function(e,t){return r(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new n(0,0,0,0,0),t}}),h.prototype.getPromiseToLoad=function(){return e(this._downloadPromise)},h.prototype.compute=function(e,i){if(r(this._samples)){if(r(i)||(i=new n(0,0,0,0,0)),0===this._samples.length)return i.xPoleWander=0,i.yPoleWander=0,i.xPoleOffset=0,i.yPoleOffset=0,i.ut1MinusUtc=0,i;var o=this._dates,s=this._lastIndex,l=0,c=0;if(r(s)){var d=o[s],h=o[s+1],p=a.lessThanOrEquals(d,e),f=!r(h),m=f||a.greaterThanOrEquals(h,e);if(p&&m)return l=s,!f&&h.equals(e)&&++l,c=l+1,g(this,o,this._samples,e,l,c,i),i}var _=t(o,e,a.compare,this._dateColumn);return _>=0?(_<o.length-1&&o[_+1].equals(e)&&++_,l=_,c=_):(c=~_,(l=c-1)<0&&(l=0)),this._lastIndex=l,g(this,o,this._samples,e,l,c,i),i}if(r(this._dataError))throw new u(this._dataError)},h}),define("Core/HeadingPitchRoll",["./defaultValue","./defined","./DeveloperError","./Math"],function(e,t,i,r){"use strict";function n(t,i,r){this.heading=e(t,0),this.pitch=e(i,0),this.roll=e(r,0)}return n.fromQuaternion=function(e,i){t(i)||(i=new n);var r=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),s=1-2*(e.y*e.y+e.z*e.z),l=2*(e.w*e.z+e.x*e.y);return i.heading=-Math.atan2(l,s),i.roll=Math.atan2(a,o),i.pitch=-Math.asin(r),i},n.fromDegrees=function(e,i,o,a){return t(a)||(a=new n),a.heading=e*r.RADIANS_PER_DEGREE,a.pitch=i*r.RADIANS_PER_DEGREE,a.roll=o*r.RADIANS_PER_DEGREE,a},n.clone=function(e,i){if(t(e))return t(i)?(i.heading=e.heading,i.pitch=e.pitch,i.roll=e.roll,i):new n(e.heading,e.pitch,e.roll)},n.equals=function(e,i){return e===i||t(e)&&t(i)&&e.heading===i.heading&&e.pitch===i.pitch&&e.roll===i.roll},n.equalsEpsilon=function(e,i,n,o){return e===i||t(e)&&t(i)&&r.equalsEpsilon(e.heading,i.heading,n,o)&&r.equalsEpsilon(e.pitch,i.pitch,n,o)&&r.equalsEpsilon(e.roll,i.roll,n,o)},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,t,i){return n.equalsEpsilon(this,e,t,i)},n.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"},n}),define("Core/Iau2006XysSample",[],function(){"use strict";function e(e,t,i){this.x=e,this.y=t,this.s=i}return e}),define("Core/Iau2006XysData",["../ThirdParty/when","./buildModuleUrl","./defaultValue","./defined","./Iau2006XysSample","./JulianDate","./Resource","./TimeStandard"],function(e,t,i,r,n,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT),this._xysFileUrlTemplate=a.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=i(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=i(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new o(this._sampleZeroJulianEphemerisDate,0,s.TAI),this._stepSizeDays=i(e.stepSizeDays,1),this._samplesPerXysFile=i(e.samplesPerXysFile,1e3),this._totalSamples=i(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,r=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),l=Math.pow(this._stepSizeDays,t),u=0;u<=t;++u){r[u]=l,n[u]=u*this._stepSizeDays;for(var c=0;c<=t;++c)c!==u&&(r[u]*=u-c);r[u]=1/r[u]}this._work=new Array(t+1),this._coef=new Array(t+1)}function u(e,t,i){var r=d;return r.dayNumber=t
;var u=t._lastTimeIndex=t.findTimeInterval(o,t._lastTimeIndex),f=(o-r[u])/(r[u+1]-r[u]),m=d;m.z=f,m.y=f*f,m.x=m.y*f,m.w=1;var _,g,v,y,C;return 0===u?(_=i[0],g=i[1],v=t.firstTangent,y=e.subtract(i[2],_,h),e.multiplyByScalar(y,.5,y),C=s.multiplyByVector(a.hermiteCoefficientMatrix,m,m)):u===i.length-2?(_=i[u],g=i[u+1],y=t.lastTangent,v=e.subtract(g,i[u-1],h),e.multiplyByScalar(v,.5,v),C=s.multiplyByVector(a.hermiteCoefficientMatrix,m,m)):(_=i[u-1],g=i[u],v=i[u+1],y=i[u+2],C=s.multiplyByVector(c.catmullRomCoefficientMatrix,m,m)),l=e.multiplyByScalar(_,C.x,l),e.multiplyByScalar(g,C.y,p),e.add(l,p,l),e.multiplyByScalar(v,C.z,p),e.add(l,p,l),e.multiplyByScalar(y,C.w,p),e.add(l,p,l)}}function c(t){t=r(t,r.EMPTY_OBJECT);var i=t.points,o=t.times,a=t.firstTangent,s=t.lastTangent;if(i.length>2&&(n(a)||(a=f,e.multiplyByScalar(i[1],2,a),e.subtract(a,i[2],a),e.subtract(a,i[0],a),e.multiplyByScalar(a,.5,a)),!n(s))){var l=i.length-1;s=m,e.multiplyByScalar(i[l-1],2,s),e.subtract(i[l],s,s),e.add(s,i[l-2],s),e.multiplyByScalar(s,.5,s)}this._times=o,this._points=i,this._firstTangent=e.clone(a),this._lastTangent=e.clone(s),this._evaluateFunction=u(this),this._lastTimeIndex=0}var d=new t,h=new e,p=new e,f=new e,m=new e;return o(c.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}}}),c.catmullRomCoefficientMatrix=new s(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),c.prototype.findTimeInterval=l.prototype.findTimeInterval,c.prototype.wrapTime=l.prototype.wrapTime,c.prototype.clampTime=l.prototype.clampTime,c.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},c}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("ThirdParty/purify",t):e.DOMPurify=t()}(this,function(){"use strict";function e(e,t){for(var i=t.length;i--;)"string"==typeof t[i]&&(t[i]=t[i].toLowerCase()),e[t[i]]=!0;return e}function t(e){var t={},i=void 0;for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function i(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}function r(){var S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b(),T=function(e){return r(e)};if(T.version="1.0.8",T.removed=[],!S||!S.document||9!==S.document.nodeType)return T.isSupported=!1,T;var E=S.document,w=!1,A=!1,x=S.document,P=S.DocumentFragment,D=S.HTMLTemplateElement,I=S.Node,M=S.NodeFilter,R=S.NamedNodeMap,O=void 0===R?S.NamedNodeMap||S.MozNamedAttrMap:R,L=S.Text,N=S.Comment,F=S.DOMParser;if("function"==typeof D){var B=x.createElement("template");B.content&&B.content.ownerDocument&&(x=B.content.ownerDocument)}var z=x,k=z.implementation,V=z.createNodeIterator,U=z.getElementsByTagName,G=z.createDocumentFragment,H=E.importNode,W={};T.isSupported=k&&void 0!==k.createHTMLDocument&&9!==x.documentMode;var q=p,Y=f,j=m,X=_,Q=v,Z=y,K=g,J=null,$=e({},[].concat(i(n),i(o),i(a),i(s),i(l))),ee=null,te=e({},[].concat(i(u),i(c),i(d),i(h))),ie=null,re=null,ne=!0,oe=!0,ae=!1,se=!1,le=!1,ue=!1,ce=!1,de=!1,he=!1,pe=!1,fe=!1,me=!0,_e=!0,ge=!1,ve={},ye=e({},["audio","head","math","script","style","template","svg","video"]),Ce=e({},["audio","video","img","source","image"]),be=e({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Se=null,Te=x.createElement("form"),Ee=function(r){"object"!==(void 0===r?"undefined":C(r))&&(r={}),J="ALLOWED_TAGS"in r?e({},r.ALLOWED_TAGS):$,ee="ALLOWED_ATTR"in r?e({},r.ALLOWED_ATTR):te,ie="FORBID_TAGS"in r?e({},r.FORBID_TAGS):{},re="FORBID_ATTR"in r?e({},r.FORBID_ATTR):{},ve="USE_PROFILES"in r&&r.USE_PROFILES,ne=!1!==r.ALLOW_ARIA_ATTR,oe=!1!==r.ALLOW_DATA_ATTR,ae=r.ALLOW_UNKNOWN_PROTOCOLS||!1,se=r.SAFE_FOR_JQUERY||!1,le=r.SAFE_FOR_TEMPLATES||!1,ue=r.WHOLE_DOCUMENT||!1,he=r.RETURN_DOM||!1,pe=r.RETURN_DOM_FRAGMENT||!1,fe=r.RETURN_DOM_IMPORT||!1,de=r.FORCE_BODY||!1,me=!1!==r.SANITIZE_DOM,_e=!1!==r.KE
positions:[t,i,r,d,h],indices:[2,0,4,2,4,3,1,3,4]};if(!u)return m.lineSegmentPlane(t,r,n,d),m.lineSegmentPlane(i,r,n,h),{positions:[t,i,r,d,h],indices:[0,1,4,0,4,3,2,3,4]}}},m}),define("Core/Plane",["./Cartesian3","./Check","./defined","./DeveloperError","./freezeObject","./Math","./Matrix4"],function(e,t,i,r,n,o,a){"use strict";function s(t,i){this.normal=e.clone(t),this.distance=i}s.fromPointNormal=function(t,r,n){var o=-e.dot(r,t);return i(n)?(e.clone(r,n.normal),n.distance=o,n):new s(r,o)};var l=new e;s.fromCartesian4=function(t,r){var n=e.fromCartesian4(t,l),o=t.w;return i(r)?(e.clone(n,r.normal),r.distance=o,r):new s(n,o)},s.getPointDistance=function(t,i){return e.dot(t.normal,i)+t.distance};var u=new e;s.projectPointOntoPlane=function(t,r,n){i(n)||(n=new e);var o=s.getPointDistance(t,r),a=e.multiplyByScalar(t.normal,o,u);return e.subtract(r,a,n)};var c=new e;return s.transform=function(t,i,r){return a.multiplyByPointAsVector(i,t.normal,l),e.normalize(l,l),e.multiplyByScalar(t.normal,-t.distance,c),a.multiplyByPoint(i,c,c),s.fromPointNormal(c,l,r)},s.clone=function(t,r){return i(r)?(e.clone(t.normal,r.normal),r.distance=t.distance,r):new s(t.normal,t.distance)},s.equals=function(t,i){return t.distance===i.distance&&e.equals(t.normal,i.normal)},s.ORIGIN_XY_PLANE=n(new s(e.UNIT_Z,0)),s.ORIGIN_YZ_PLANE=n(new s(e.UNIT_X,0)),s.ORIGIN_ZX_PLANE=n(new s(e.UNIT_Y,0)),s}),define("Core/EllipsoidTangentPlane",["./AxisAlignedBoundingBox","./Cartesian2","./Cartesian3","./Cartesian4","./Check","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./IntersectionTests","./Matrix4","./Plane","./Ray","./Transforms"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f){"use strict";function m(e,t){t=o(t,u.WGS84),e=t.scaleToGeodeticSurface(e);var r=f.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=i.fromCartesian4(d.getColumn(r,0,_)),this._yAxis=i.fromCartesian4(d.getColumn(r,1,_));var n=i.fromCartesian4(d.getColumn(r,2,_));this._plane=h.fromPointNormal(e,n)}var _=new r;s(m.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 g=new e;m.fromPoints=function(t,i){return new m(e.fromPoints(t,g).center,i)};var v=new p,y=new i;m.prototype.projectPointOntoPlane=function(e,r){var n=v;n.origin=e,i.normalize(e,n.direction);var o=c.rayPlane(n,this._plane,y);if(a(o)||(i.negate(n.direction,n.direction),o=c.rayPlane(n,this._plane,y)),a(o)){var s=i.subtract(o,this._origin,o),l=i.dot(this._xAxis,s),u=i.dot(this._yAxis,s);return a(r)?(r.x=l,r.y=u,r):new t(l,u)}},m.prototype.projectPointsOntoPlane=function(e,t){a(t)||(t=[]);for(var i=0,r=e.length,n=0;n<r;n++){var o=this.projectPointOntoPlane(e[n],t[i]);a(o)&&(t[i]=o,i++)}return t.length=i,t},m.prototype.projectPointToNearestOnPlane=function(e,r){a(r)||(r=new t);var n=v;n.origin=e,i.clone(this._plane.normal,n.direction);var o=c.rayPlane(n,this._plane,y);a(o)||(i.negate(n.direction,n.direction),o=c.rayPlane(n,this._plane,y));var s=i.subtract(o,this._origin,o),l=i.dot(this._xAxis,s),u=i.dot(this._yAxis,s);return r.x=l,r.y=u,r},m.prototype.projectPointsToNearestOnPlane=function(e,t){a(t)||(t=[]);var i=e.length;t.length=i;for(var r=0;r<i;r++)t[r]=this.projectPointToNearestOnPlane(e[r],t[r]);return t};var C=new i;return m.prototype.projectPointOntoEllipsoid=function(e,t){a(t)||(t=new i);var r=this._ellipsoid,n=this._origin,o=this._xAxis,s=this._yAxis,l=C;return i.multiplyByScalar(o,e.x,l),t=i.add(n,l,t),i.multiplyByScalar(s,e.y,l),i.add(t,l,t),r.scaleToGeocentricSurface(t,t),t},m.prototype.projectPointsOntoEllipsoid=function(e,t){var i=e.length;a(t)?t.length=i:t=new Array(i);for(var r=0;r<i;++r)t[r]=this.projectPointOntoEllipsoid(e[r],t[r]);return t},m}),define("Core/OrientedBoundingBox",["./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./Check","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Elli
"use strict";function m(e){function t(e,t){return a[e]-a[t]}function i(e,t){return o[e]-o[t]}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;var r=this._quantizedVertices.length/3,o=this._uValues=this._quantizedVertices.subarray(0,r),a=this._vValues=this._quantizedVertices.subarray(r,2*r);this._heightValues=this._quantizedVertices.subarray(2*r,3*r),this._westIndices=_(e.westIndices,t,r),this._southIndices=_(e.southIndices,i,r),this._eastIndices=_(e.eastIndices,t,r),this._northIndices=_(e.northIndices,i,r),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=n(e.childTileMask,15),this._createdByUpsampling=n(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}function _(e,t,i){y.length=e.length;for(var r=!1,n=0,o=e.length;n<o;++n)y[n]=e[n],r=r||n>0&&t(e[n-1],e[n])>0;return r?(y.sort(t),l.createTypedArray(i,y)):e}function g(e,t,i){for(var r=e._mesh,n=r.vertices,o=r.encoding,a=r.indices,s=0,l=a.length;s<l;s+=3){var c=a[s],d=a[s+1],h=a[s+2],p=o.decodeTextureCoordinates(n,c,E),f=o.decodeTextureCoordinates(n,d,w),m=o.decodeTextureCoordinates(n,h,A),_=u.computeBarycentricCoordinates(t,i,p.x,p.y,f.x,f.y,m.x,m.y,T);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var g=o.decodeHeight(n,c),v=o.decodeHeight(n,d),y=o.decodeHeight(n,h);return _.x*g+_.y*v+_.z*y}}}function v(e,t,i){for(var r=e._uValues,n=e._vValues,o=e._heightValues,a=e._indices,s=0,l=a.length;s<l;s+=3){var d=a[s],h=a[s+1],p=a[s+2],f=r[d],m=r[h],_=r[p],g=n[d],v=n[h],y=n[p],C=u.computeBarycentricCoordinates(t,i,f,g,m,v,_,y,T);if(C.x>=-1e-15&&C.y>=-1e-15&&C.z>=-1e-15){var b=C.x*o[d]+C.y*o[h]+C.z*o[p];return c.lerp(e._minimumHeight,e._maximumHeight,b/S)}}}a(m.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});var y=[],C=new h("createVerticesFromQuantizedTerrainMesh");m.prototype.createMesh=function(t,i,r,a,s){var u=t.ellipsoid,c=t.tileXYToRectangle(i,r,a);s=n(s,1);var d=C.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:c,relativeToCenter:this._boundingSphere.center,ellipsoid:u,exaggeration:s});if(o(d)){var h=this;return e(d,function(e){var t=h._quantizedVertices.length/3;t+=h._westIndices.length+h._southIndices.length+h._eastIndices.length+h._northIndices.length;var i=l.createTypedArray(t,e.indices),r=new Float32Array(e.vertices),o=e.center,a=e.minimumHeight,u=e.maximumHeight,c=n(e.boundingSphere,h._boundingSphere),d=n(e.orientedBoundingBox,h._orientedBoundingBox),m=h._horizonOcclusionPoint,_=e.vertexStride,g=p.clone(e.encoding);return h._skirtIndex=e.skirtIndex,h._vertexCountWithoutSkirts=h._quantizedVertices.length/3,h._mesh=new f(o,r,i,a,u,c,m,_,d,g,s),h._quantizedVertices=void 0,h._encodedNormals=void 0,h._indices=void 0,h._uValues=void 0,h._vValues=void 0,h._heightValues=void 0,h._westIndices=void 0,h._southIndices=void 0,h._eastIndices=void 0,h._northIndices=void 0,h._mesh})}};var b=new h("upsampleQuantizedTerrainMesh");m.prototype.upsample=function(i,n,a,s,u,c,h){var p=this._mesh;if(o(this._mesh)){var f=2*n!==u,_=2*a===c,g=i.ellipsoid,v=i.tileXYToRectangle(u,c,h),y=b.scheduleTask({vertices:p.vertices,vertexCountWithoutSkirts:this._vertexCountWithoutSkirts,indices:p.indices,skirtIndex:this._skirtIndex,encoding:p.encoding,minimumHeight:thi
var t=p.computeNumberOfVertices(e),i=_.createTypedArray(t,2*(t-1));i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return e.indices=i,e.primitiveType=T.LINES,e}function V(e){var t=p.computeNumberOfVertices(e),i=_.createTypedArray(t,2*t);i[0]=0,i[1]=1;for(var r=2,n=2;n<t;++n)i[r++]=n-1,i[r++]=n;return i[r++]=t-1,i[r]=0,e.indices=i,e.primitiveType=T.LINES,e}function U(e){switch(e.primitiveType){case T.TRIANGLE_FAN:return F(e);case T.TRIANGLE_STRIP:return B(e);case T.TRIANGLES:return N(e);case T.LINE_STRIP:return k(e);case T.LINE_LOOP:return V(e);case T.LINES:return z(e)}return e}function G(e,t){Math.abs(e.y)<y.EPSILON6&&(e.y=t?-y.EPSILON6:y.EPSILON6)}function H(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return G(e,e.y<0),G(t,t.y<0),void G(i,i.y<0);var r,n=Math.abs(e.y),o=Math.abs(t.y),a=Math.abs(i.y);r=n>o?n>a?y.sign(e.y):y.sign(i.y):o>a?y.sign(t.y):y.sign(i.y);var s=r<0;G(e,s),G(t,s),G(i,s)}function W(e,t,i,r){n.add(e,n.multiplyByScalar(n.subtract(t,e,Ee),e.y/(e.y-t.y),Ee),i),n.clone(i,r),G(i,!0),G(r,!1)}function q(e,t,i){if(!(e.x>=0||t.x>=0||i.x>=0)){H(e,t,i);var r=e.y<0,n=t.y<0,o=i.y<0,a=0;a+=r?1:0,a+=n?1:0,a+=o?1:0;var s=De.indices;1===a?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,r?(W(e,t,we,xe),W(e,i,Ae,Pe),s[0]=0,s[3]=1,s[4]=2,s[6]=1):n?(W(t,i,we,xe),W(t,e,Ae,Pe),s[0]=1,s[3]=2,s[4]=0,s[6]=2):o&&(W(i,e,we,xe),W(i,t,Ae,Pe),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===a&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,r?n?o||(W(i,e,we,xe),W(i,t,Ae,Pe),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(W(t,i,we,xe),W(t,e,Ae,Pe),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(W(e,t,we,xe),W(e,i,Ae,Pe),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=De.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,1!==a&&2!==a||(l[3]=we,l[4]=Ae,l[5]=xe,l[6]=Pe,l.length=7),De}}function Y(e,t){var r=e.attributes;if(0!==r.position.values.length){for(var n in r)if(r.hasOwnProperty(n)&&u(r[n])&&u(r[n].values)){var o=r[n];o.values=s.createTypedArray(o.componentDatatype,o.values)}var a=p.computeNumberOfVertices(e);return e.indices=_.createTypedArray(a,e.indices),t&&(e.boundingSphere=i.fromVertices(r.position.values)),e}}function j(e){var t=e.attributes,i={};for(var r in t)if(t.hasOwnProperty(r)&&u(t[r])&&u(t[r].values)){var n=t[r];i[r]=new f({componentDatatype:n.componentDatatype,componentsPerAttribute:n.componentsPerAttribute,normalize:n.normalize,values:[]})}return new p({attributes:i,indices:[],primitiveType:e.primitiveType})}function X(e,t,i){var r=u(e.geometry.boundingSphere);t=Y(t,r),i=Y(i,r),u(i)&&!u(t)?e.geometry=i:!u(i)&&u(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function Q(e,t){var i=new e,r=new e,n=new e;return function(o,a,s,l,u,c,d,h){var p=e.fromArray(u,o*t,i),f=e.fromArray(u,a*t,r),m=e.fromArray(u,s*t,n);e.multiplyByScalar(p,l.x,p),e.multiplyByScalar(f,l.y,f),e.multiplyByScalar(m,l.z,m);var _=e.add(p,f,p);e.add(_,m,_),h&&e.normalize(_,_),e.pack(_,c,d*t)}}function Z(e,i,r,o,a,s,l,c,d,h,p,f,m,_,g,v){if(u(s)||u(l)||u(c)||u(d)||u(h)||0!==_){var y=n.fromArray(a,3*e,Le),C=n.fromArray(a,3*i,Ne),b=n.fromArray(a,3*r,Fe),S=t(o,y,C,b,Be);if(u(s)&&Me(e,i,r,S,s,f.normal.values,v,!0),u(h)){var T=n.fromArray(h,3*e,Le),E=n.fromArray(h,3*i,Ne),w=n.fromArray(h,3*r,Fe);n.multiplyByScalar(T,S.x,T),n.multiplyByScalar(E,S.y,E),n.multiplyByScalar(w,S.z,w);var A;n.equals(T,n.ZERO)&&n.equals(E,n.ZERO)&&n.equals(w,n.ZERO)?(A=Le,A.x=0,A.y=0,A.z=0):(A=n.add(T,E,T),n.add(A,w,A),n.normalize(A,A)),n.pack(A,f.extrudeDirection.values,3*v)}if(u(p)&&Oe(e,i,r,S,p,f.applyOffset.values,v),u(l)&&Me(e,i,r,S,l,f.tangent.values,v,!0),u(c)&&Me(e,i,r,S,c,f.bitangent.values,v,!0),u(d)&&Re(e,i,r,S,d,f.st.values,v),_>0)for(var x=0;x<_;x++){var P=m[x];K(e,i,r,S,v,g[P],f[P])}}}function K(e,t,i,r,n,o,a){var s=o.componentsPerAttribute,l=o.values,u=a.values;switch(s){case 4:Ie(e,t,i,r,l,u,n,!1);break;case 3:Me(e,t,i,r,l,u,n,!1);break;case 2:Re(e,t,i,r,l,u,n,!1);break;default:u[n]=l[e]*r.x+l[t]*r.y+l[i]*r.z}}function J(e,t,i,r,n,o){var a=e.position.values.length/3;if(-1!==n){var s=r[n],l=i[s];return-1===l?(i[s]=a,e.position.values.push(o.x,o.y,o.z),t.push(a),a):(t.push(l),l)}return e.position.values.push(o.x
height:a,vertexFormat:A.POSITION_ONLY,shadowVolume:!0})},u(L.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=O(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=N(this)),this._textureCoordinateRotationPoints}}}),L}),define("Core/CircleGeometry",["./Cartesian3","./Check","./defaultValue","./defined","./defineProperties","./EllipseGeometry","./Ellipsoid","./VertexFormat"],function(e,t,i,r,n,o,a,s){"use strict";function l(e){e=i(e,i.EMPTY_OBJECT);var t=e.radius,r={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 o(r),this._workerName="createCircleGeometry"}l.packedLength=o.packedLength,l.pack=function(e,t,i){return o.pack(e._ellipseGeometry,t,i)};var u=new o({center:new e,semiMajorAxis:1,semiMinorAxis:1}),c={center:new e,radius:void 0,ellipsoid:a.clone(a.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new s,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return l.unpack=function(t,i,n){var d=o.unpack(t,i,u);return c.center=e.clone(d._center,c.center),c.ellipsoid=a.clone(d._ellipsoid,c.ellipsoid),c.height=d._height,c.extrudedHeight=d._extrudedHeight,c.granularity=d._granularity,c.vertexFormat=s.clone(d._vertexFormat,c.vertexFormat),c.stRotation=d._stRotation,c.shadowVolume=d._shadowVolume,r(n)?(c.semiMajorAxis=d._semiMajorAxis,c.semiMinorAxis=d._semiMinorAxis,n._ellipseGeometry=new o(c),n):(c.radius=d._semiMajorAxis,new l(c))},l.createGeometry=function(e){return o.createGeometry(e._ellipseGeometry)},l.createShadowVolume=function(e,t,i){var r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,o=t(r,n),a=i(r,n);return new l({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:o,height:a,vertexFormat:s.POSITION_ONLY,shadowVolume:!0})},n(l.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),l}),define("Core/EllipseOutlineGeometry",["./arrayFill","./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./EllipseGeometryLibrary","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryOffsetAttribute","./IndexDatatype","./Math","./PrimitiveType"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m){"use strict";function _(e){var n=e.center;C=i.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(n,C),e.height,C),C=i.add(n,C,C);for(var o=new t(C,e.semiMajorAxis),a=s.computeEllipsePositions(e,!1,!0).outerPositions,l=new d({position:new c({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:s.raisePositionsToHeight(a,e,!1)})}),u=a.length/3,h=p.createTypedArray(u,2*u),f=0,m=0;m<u;++m)h[f++]=m,h[f++]=(m+1)%u;return{boundingSphere:o,attributes:l,indices:h}}function g(a){var l=a.center,u=a.ellipsoid,m=a.semiMajorAxis,_=i.multiplyByScalar(u.geodeticSurfaceNormal(l,y),a.height,y);b.center=i.add(l,_,b.center),b.radius=m,_=i.multiplyByScalar(u.geodeticSurfaceNormal(l,_),a.extrudedHeight,_),S.center=i.add(l,_,S.center),S.radius=m;var g=s.computeEllipsePositions(a,!1,!0).outerPositions,v=new d({position:new c({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:s.raisePositionsToHeight(g,a,!0)})});g=v.position.values;var C=t.union(b,S),T=g.length/3;if(o(a.offsetAttribute)){var E=new Uint8Array(T);if(a.offsetAttribute===h.TOP)E=e(E,1,0,T/2);else{var w=a.offsetAttribute===h.NONE?0:1;E=e(E,w)}v.applyOffset=new c({componentDatatype:r.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}var A=n(a.numberOfVerticalLines,16);A=
validate:function(e){return e===i.CLOCKWISE||e===i.COUNTER_CLOCKWISE}};return e(i)}),define("Core/PolygonPipeline",["../ThirdParty/earcut-2.1.1","./Cartesian2","./Cartesian3","./Check","./ComponentDatatype","./defaultValue","./defined","./Ellipsoid","./Geometry","./GeometryAttribute","./Math","./PrimitiveType","./WindingOrder"],function(e,t,i,r,n,o,a,s,l,u,c,d,h){"use strict";var p=new i,f=new i,m={};m.computeArea2D=function(e){for(var t=e.length,i=0,r=t-1,n=0;n<t;r=n++){var o=e[r],a=e[n];i+=o.x*a.y-a.x*o.y}return.5*i},m.computeWindingOrder2D=function(e){return m.computeArea2D(e)>0?h.COUNTER_CLOCKWISE:h.CLOCKWISE},m.triangulate=function(i,r){var n=t.packArray(i);return e(n,r,2)};var _=new i,g=new i,v=new i,y=new i,C=new i,b=new i,S=new i;return m.computeSubdivision=function(e,t,r,s){s=o(s,c.RADIANS_PER_DEGREE);var h,p=r.slice(0),f=t.length,m=new Array(3*f),T=0;for(h=0;h<f;h++){var E=t[h];m[T++]=E.x,m[T++]=E.y,m[T++]=E.z}for(var w=[],A={},x=e.maximumRadius,P=c.chordLength(s,x),D=P*P;p.length>0;){var I,M,R=p.pop(),O=p.pop(),L=p.pop(),N=i.fromArray(m,3*L,_),F=i.fromArray(m,3*O,g),B=i.fromArray(m,3*R,v),z=i.multiplyByScalar(i.normalize(N,y),x,y),k=i.multiplyByScalar(i.normalize(F,C),x,C),V=i.multiplyByScalar(i.normalize(B,b),x,b),U=i.magnitudeSquared(i.subtract(z,k,S)),G=i.magnitudeSquared(i.subtract(k,V,S)),H=i.magnitudeSquared(i.subtract(V,z,S)),W=Math.max(U,G,H);W>D?U===W?(I=Math.min(L,O)+" "+Math.max(L,O),h=A[I],a(h)||(M=i.add(N,F,S),i.multiplyByScalar(M,.5,M),m.push(M.x,M.y,M.z),h=m.length/3-1,A[I]=h),p.push(L,h,R),p.push(h,O,R)):G===W?(I=Math.min(O,R)+" "+Math.max(O,R),h=A[I],a(h)||(M=i.add(F,B,S),i.multiplyByScalar(M,.5,M),m.push(M.x,M.y,M.z),h=m.length/3-1,A[I]=h),p.push(O,h,L),p.push(h,R,L)):H===W&&(I=Math.min(R,L)+" "+Math.max(R,L),h=A[I],a(h)||(M=i.add(B,N,S),i.multiplyByScalar(M,.5,M),m.push(M.x,M.y,M.z),h=m.length/3-1,A[I]=h),p.push(R,h,O),p.push(h,L,O)):(w.push(L),w.push(O),w.push(R))}return new l({attributes:{position:new u({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:m})},indices:w,primitiveType:d.TRIANGLES})},m.scaleToGeodeticHeight=function(e,t,r,n){r=o(r,s.WGS84);var l=p,u=f;if(t=o(t,0),n=o(n,!0),a(e))for(var c=e.length,d=0;d<c;d+=3)i.fromArray(e,d,u),n&&(u=r.scaleToGeodeticSurface(u,u)),0!==t&&(l=r.geodeticSurfaceNormal(u,l),i.multiplyByScalar(l,t,l),i.add(u,l,u)),e[d]=u.x,e[d+1]=u.y,e[d+2]=u.z;return e},m}),define("Core/Queue",["./defineProperties"],function(e){"use strict";function t(){this._array=[],this._offset=0,this._length=0}return e(t.prototype,{length:{get:function(){return this._length}}}),t.prototype.enqueue=function(e){this._array.push(e),this._length++},t.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},t.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},t.prototype.contains=function(e){return-1!==this._array.indexOf(e)},t.prototype.clear=function(){this._array.length=this._offset=this._length=0},t.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)},t}),define("Core/PolygonGeometryLibrary",["./arrayRemoveDuplicates","./Cartesian2","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryPipeline","./IndexDatatype","./Math","./Matrix3","./PolygonPipeline","./PrimitiveType","./Quaternion","./Queue","./WindingOrder"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v){"use strict";function y(e,t,r,n){return i.subtract(t,e,b),i.multiplyByScalar(b,r/n,b),i.add(e,b,b),[b.x,b.y,b.z]}var C={};C.computeHierarchyPackedLength=function(e){for(var t=0,r=[e];r.length>0;){var n=r.pop();if(o(n)){t+=2;var a=n.positions,s=n.holes;if(o(a)&&(t+=a.length*i.packedLength),o(s))for(var l=s.length,u=0;u<l;++u)r.push(s[u])}}return t},C.packPolygonHierarchy=function(e,t,r){for(var n=[e];n.length>0;){var a=n.pop();if(o(a)){var s=a.positions,l=a.holes;if(t[r++]=o(s)?s.lengt
;A&&(w=h[0].length-3,C+=w,b+=w,w/=3,S+=6*w);var x,P,D,I,M,F,V=C+b,U=new Float64Array(V),G=t.normal?new Float32Array(V):void 0,H=t.tangent?new Float32Array(V):void 0,W=t.bitangent?new Float32Array(V):void 0,q={normals:G,tangents:H,bitangents:W},Y=0,j=V-1,X=R,Q=O,Z=w/2,K=g.createTypedArray(V/3,S),J=0;if(A){F=L,M=N;var $=h[0];for(X=r.fromArray(_,0,X),Q=r.fromArray(p,0,Q),o=0;o<Z;o++)F=r.fromArray($,3*(Z-1-o),F),M=r.fromArray($,3*(Z+o),M),l.addAttribute(U,M,Y),l.addAttribute(U,F,void 0,j),E(q,X,Q,Y,j,t),P=Y/3,I=P+1,x=(j-2)/3,D=x-1,K[J++]=x,K[J++]=P,K[J++]=D,K[J++]=D,K[J++]=P,K[J++]=I,Y+=3,j-=3}var ee=0,te=0,ie=u[ee++],re=u[ee++];U.set(ie,Y),U.set(re,j-re.length+1),Q=r.fromArray(p,te,Q);var ne,oe;for(s=re.length-3,o=0;o<s;o+=3)ne=i.geodeticSurfaceNormal(r.fromArray(ie,o,z),z),oe=i.geodeticSurfaceNormal(r.fromArray(re,s-o,k),k),X=r.normalize(r.add(ne,oe,X),X),E(q,X,Q,Y,j,t),P=Y/3,I=P+1,x=(j-2)/3,D=x-1,K[J++]=x,K[J++]=P,K[J++]=D,K[J++]=D,K[J++]=P,K[J++]=I,Y+=3,j-=3;for(ne=i.geodeticSurfaceNormal(r.fromArray(ie,s,z),z),oe=i.geodeticSurfaceNormal(r.fromArray(re,s,k),k),X=r.normalize(r.add(ne,oe,X),X),te+=3,o=0;o<d.length;o++){var ae;n=d[o];var se,le,ue=n.leftPositions,ce=n.rightPositions,de=B,he=L,pe=N;if(X=r.fromArray(_,te,X),c(ue)){for(E(q,X,Q,void 0,j,t),j-=3,se=I,le=D,ae=0;ae<ue.length/3;ae++)de=r.fromArray(ue,3*ae,de),K[J++]=se,K[J++]=le-ae-1,K[J++]=le-ae,l.addAttribute(U,de,void 0,j),he=r.fromArray(U,3*(le-ae-1),he),pe=r.fromArray(U,3*se,pe),Q=r.normalize(r.subtract(he,pe,Q),Q),E(q,X,Q,void 0,j,t),j-=3;de=r.fromArray(U,3*se,de),he=r.subtract(r.fromArray(U,3*le,he),de,he),pe=r.subtract(r.fromArray(U,3*(le-ae),pe),de,pe),Q=r.normalize(r.add(he,pe,Q),Q),E(q,X,Q,Y,void 0,t),Y+=3}else{for(E(q,X,Q,Y,void 0,t),Y+=3,se=D,le=I,ae=0;ae<ce.length/3;ae++)de=r.fromArray(ce,3*ae,de),K[J++]=se,K[J++]=le+ae,K[J++]=le+ae+1,l.addAttribute(U,de,Y),he=r.fromArray(U,3*se,he),pe=r.fromArray(U,3*(le+ae),pe),Q=r.normalize(r.subtract(he,pe,Q),Q),E(q,X,Q,Y,void 0,t),Y+=3;de=r.fromArray(U,3*se,de),he=r.subtract(r.fromArray(U,3*(le+ae),he),de,he),pe=r.subtract(r.fromArray(U,3*le,pe),de,pe),Q=r.normalize(r.negate(r.add(pe,he,Q),Q),Q),E(q,X,Q,void 0,j,t),j-=3}for(ie=u[ee++],re=u[ee++],ie.splice(0,3),re.splice(re.length-3,3),U.set(ie,Y),U.set(re,j-re.length+1),s=re.length-3,te+=3,Q=r.fromArray(p,te,Q),ae=0;ae<re.length;ae+=3)ne=i.geodeticSurfaceNormal(r.fromArray(ie,ae,z),z),oe=i.geodeticSurfaceNormal(r.fromArray(re,s-ae,k),k),X=r.normalize(r.add(ne,oe,X),X),E(q,X,Q,Y,j,t),I=Y/3,P=I-1,D=(j-2)/3,x=D+1,K[J++]=x,K[J++]=P,K[J++]=D,K[J++]=D,K[J++]=P,K[J++]=I,Y+=3,j-=3;Y-=3,j+=3}if(X=r.fromArray(_,_.length-3,X),E(q,X,Q,Y,j,t),A){Y+=3,j-=3,F=L,M=N;var fe=h[1];for(o=0;o<Z;o++)F=r.fromArray(fe,3*(w-o-1),F),M=r.fromArray(fe,3*o,M),l.addAttribute(U,F,void 0,j),l.addAttribute(U,M,Y),E(q,X,Q,Y,j,t),I=Y/3,P=I-1,D=(j-2)/3,x=D+1,K[J++]=x,K[J++]=P,K[J++]=D,K[J++]=D,K[J++]=P,K[J++]=I,Y+=3,j-=3}if(y.position=new f({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:U}),t.st){var me,_e,ge=new Float32Array(V/3*2),ve=0;if(A){C/=3,b/=3;var ye=Math.PI/(w+1);_e=1/(C-w+1),me=1/(b-w+1);var Ce,be=w/2;for(o=be+1;o<w+1;o++)Ce=v.PI_OVER_TWO+ye*o,ge[ve++]=me*(1+Math.cos(Ce)),ge[ve++]=.5*(1+Math.sin(Ce));for(o=1;o<b-w+1;o++)ge[ve++]=o*me,ge[ve++]=0;for(o=w;o>be;o--)Ce=v.PI_OVER_TWO-o*ye,ge[ve++]=1-me*(1+Math.cos(Ce)),ge[ve++]=.5*(1+Math.sin(Ce));for(o=be;o>0;o--)Ce=v.PI_OVER_TWO-ye*o,ge[ve++]=1-_e*(1+Math.cos(Ce)),ge[ve++]=.5*(1+Math.sin(Ce));for(o=C-w;o>0;o--)ge[ve++]=o*_e,ge[ve++]=1;for(o=1;o<be+1;o++)Ce=v.PI_OVER_TWO+ye*o,ge[ve++]=_e*(1+Math.cos(Ce)),ge[ve++]=.5*(1+Math.sin(Ce))}else{for(C/=3,b/=3,_e=1/(C-1),me=1/(b-1),o=0;o<b;o++)ge[ve++]=o*me,ge[ve++]=0;for(o=C;o>0;o--)ge[ve++]=(o-1)*_e,ge[ve++]=1}y.st=new f({componentDatatype:a.FLOAT,componentsPerAttribute:2,values:ge})}return t.normal&&(y.normal=new f({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:q.normals})),t.tangent&&(y.tangent=new f({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:q.tangents})),t.bitangent&&(y.bitangent=new f({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:q.bitangen
},n.clone=function(e,i){if(t(e))return t(i)||(i=new n),i.near=e.near,i.far=e.far,i},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n}),define("Core/DistanceDisplayConditionGeometryInstanceAttribute",["./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError"],function(e,t,i,r,n){"use strict";function o(e,i){e=t(e,0),i=t(i,Number.MAX_VALUE),this.value=new Float32Array([e,i])}return r(o.prototype,{componentDatatype:{get:function(){return e.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}}),o.fromDistanceDisplayCondition=function(e){return new o(e.near,e.far)},o.toValue=function(e,t){return i(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])},o}),define("Core/DoublyLinkedList",["./defined","./defineProperties"],function(e,t){"use strict";function i(){this.head=void 0,this.tail=void 0,this._length=0}function r(e,t,i){this.item=e,this.previous=t,this.next=i}function n(t,i){e(i.previous)&&e(i.next)?(i.previous.next=i.next,i.next.previous=i.previous):e(i.previous)?(i.previous.next=void 0,t.tail=i.previous):e(i.next)?(i.next.previous=void 0,t.head=i.next):(t.head=void 0,t.tail=void 0),i.next=void 0,i.previous=void 0}return t(i.prototype,{length:{get:function(){return this._length}}}),i.prototype.add=function(t){var i=new r(t,this.tail,void 0);return e(this.tail)?(this.tail.next=i,this.tail=i):(this.head=i,this.tail=i),++this._length,i},i.prototype.remove=function(t){e(t)&&(n(this,t),--this._length)},i.prototype.splice=function(e,t){if(e!==t){n(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:i.previous=t,t.next=i,t.previous=e}},i}),define("ThirdParty/Tween",[],function(){void 0===Date.now&&(Date.now=function(){return(new Date).valueOf()});var e=e||function(){var e=[];return{REVISION:"13",getAll:function(){return e},removeAll:function(){e=[]},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=void 0!==t?t:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}}}();return e.Tween=function(t){var i=t,r={},n={},o={},a=1e3,s=0,l=!1,u=!1,c=!1,d=0,h=null,p=e.Easing.Linear.None,f=e.Interpolation.Linear,m=[],_=null,g=!1,v=null,y=null,C=null;for(var b in t)r[b]=parseFloat(t[b],10);this.to=function(e,t){return void 0!==t&&(a=t),n=e,this},this.start=function(t){e.add(this),u=!0,g=!1,h=void 0!==t?t:"undefined"!=typeof window&&void 0!==window.performance&&void 0!==window.performance.now?window.performance.now():Date.now(),h+=d;for(var a in n){if(n[a]instanceof Array){if(0===n[a].length)continue;n[a]=[i[a]].concat(n[a])}r[a]=i[a],r[a]instanceof Array==!1&&(r[a]*=1),o[a]=r[a]||0}return this},this.stop=function(){return u?(e.remove(this),u=!1,null!==C&&C.call(i),this.stopChainedTweens(),this):this},this.stopChainedTweens=function(){for(var e=0,t=m.length;e<t;e++)m[e].stop()},this.delay=function(e){return d=e,this},this.repeat=function(e){return s=e,this},this.yoyo=function(e){return l=e,this},this.easing=function(e){return p=e,this},this.interpolation=function(e){return f=e,this},this.chain=function(){return m=arguments,this},this.onStart=function(e){return _=e,this},this.onUpdate=function(e){return v=e,this},this.onComplete=function(e){return y=e,this},this.onStop=function(e){return C=e,this},this.update=function(e){var t;if(e<h)return!0;!1===g&&(null!==_&&_.call(i),g=!0);var u=(e-h)/a;u=u>1?1:u;var C=p(u);for(t in n){var b=r[t]||0,S=n[t];S instanceof Array?i[t]=f(S,C):("string"==typeof S&&(S=b+parseFloat(S,10)),"number"==typeof S&&(i[t]=b+(S-b)*C))}if(null!==v&&v.call(i,C),1==u){if(s>0){isFinite(s)&&s--;for(t in o){if("string"==typeof n[t]&&(o[t]=o[t]+parseFloat(n[t],10)),l){var T=o[t];o[t]=n[t],n[t]=T}r[t]=o[t]}return l&&(c=!c),h=e+d,!0}null!==y&&y.call(i);for(var E=0,w=m.length;E<w;E++)m[E].start(e);return!1}return!0}},e.Easing={Linear:{None:function(e){return e}},Qua
_[y+2]=_[5],_[y+3]=_[15],_[y+4]=_[16],_[y+5]=_[17],_[y+6]=_[18],_[y+7]=_[19],_[y+8]=_[20],_[y+9]=_[6],_[y+10]=_[7],_[y+11]=_[8],y+=12,_[y]=_[6],_[y+1]=_[7],_[y+2]=_[8],_[y+3]=_[18],_[y+4]=_[19],_[y+5]=_[20],_[y+6]=_[21],_[y+7]=_[22],_[y+8]=_[23],_[y+9]=_[9],_[y+10]=_[10],_[y+11]=_[11],h||(_=_.subarray(12));var C=new u({position:new l({componentDatatype:n.DOUBLE,componentsPerAttribute:3,values:_})});if(a(p.normal)||a(p.tangent)||a(p.bitangent)||a(p.st)){var b=a(p.normal)?new Float32Array(12*m):void 0,S=a(p.tangent)?new Float32Array(12*m):void 0,T=a(p.bitangent)?new Float32Array(12*m):void 0,E=a(p.st)?new Float32Array(8*m):void 0,w=D,A=I,x=M,P=t.negate(w,R),N=t.negate(A,O),F=t.negate(x,L);y=0,h&&(v(y,b,S,T,E,F,w,A),y+=12),v(y,b,S,T,E,x,P,A),y+=12,v(y,b,S,T,E,P,F,A),y+=12,v(y,b,S,T,E,N,F,P),y+=12,v(y,b,S,T,E,w,x,A),y+=12,v(y,b,S,T,E,A,x,P),a(b)&&(C.normal=new l({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:b})),a(S)&&(C.tangent=new l({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:S})),a(T)&&(C.bitangent=new l({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:T})),a(E)&&(C.st=new l({componentDatatype:n.FLOAT,componentsPerAttribute:2,values:E}))}for(var B=new Uint16Array(6*m),z=0;z<m;++z){var k=6*z,V=4*z;B[k]=V,B[k+1]=V+1,B[k+2]=V+2,B[k+3]=V,B[k+4]=V+2,B[k+5]=V+3}return new s({attributes:C,indices:B,primitiveType:f.TRIANGLES,boundingSphere:e.fromVertices(_)})},g}),define("Core/FrustumOutlineGeometry",["./BoundingSphere","./Cartesian3","./Check","./ComponentDatatype","./defaultValue","./defined","./FrustumGeometry","./Geometry","./GeometryAttribute","./GeometryAttributes","./OrthographicFrustum","./PerspectiveFrustum","./PrimitiveType","./Quaternion"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p){"use strict";function f(e){var i,r,o=e.frustum,a=e.orientation,s=e.origin,l=n(e._drawNearPlane,!0);o instanceof d?(i=m,r=d.packedLength):o instanceof c&&(i=_,r=c.packedLength),this._frustumType=i,this._frustum=o.clone(),this._origin=t.clone(s),this._orientation=p.clone(a),this._drawNearPlane=l,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+r+t.packedLength+p.packedLength}var m=0,_=1;f.pack=function(e,i,r){r=n(r,0);var o=e._frustumType,a=e._frustum;return i[r++]=o,o===m?(d.pack(a,i,r),r+=d.packedLength):(c.pack(a,i,r),r+=c.packedLength),t.pack(e._origin,i,r),r+=t.packedLength,p.pack(e._orientation,i,r),r+=p.packedLength,i[r]=e._drawNearPlane?1:0,i};var g=new d,v=new c,y=new p,C=new t;return f.unpack=function(e,i,r){i=n(i,0);var a,s=e[i++];s===m?(a=d.unpack(e,i,g),i+=d.packedLength):(a=c.unpack(e,i,v),i+=c.packedLength);var l=t.unpack(e,i,C);i+=t.packedLength;var u=p.unpack(e,i,y);i+=p.packedLength;var h=1===e[i];if(!o(r))return new f({frustum:a,origin:l,orientation:u,_drawNearPlane:h});var _=s===r._frustumType?r._frustum:void 0;return r._frustum=a.clone(_),r._frustumType=s,r._origin=t.clone(l,r._origin),r._orientation=p.clone(u,r._orientation),r._drawNearPlane=h,r},f.createGeometry=function(t){var i=t._frustumType,n=t._frustum,o=t._origin,c=t._orientation,d=t._drawNearPlane,p=new Float64Array(24);a._computeNearFarPlanes(o,c,i,n,p);for(var f,m,_=new u({position:new l({componentDatatype:r.DOUBLE,componentsPerAttribute:3,values:p})}),g=d?2:1,v=new Uint16Array(8*(g+1)),y=d?0:1;y<2;++y)f=d?8*y:0,m=4*y,v[f]=m,v[f+1]=m+1,v[f+2]=m+1,v[f+3]=m+2,v[f+4]=m+2,v[f+5]=m+3,v[f+6]=m+3,v[f+7]=m;for(y=0;y<2;++y)f=8*(g+y),m=4*y,v[f]=m,v[f+1]=m+4,v[f+2]=m+1,v[f+3]=m+5,v[f+4]=m+2,v[f+5]=m+6,v[f+6]=m+3,v[f+7]=m+7;return new s({attributes:_,indices:v,primitiveType:h.LINES,boundingSphere:e.fromVertices(p)})},f}),define("Core/GeocoderService",["./DeveloperError"],function(e){"use strict";function t(){}return t.prototype.geocode=e.throwInstantiationError,t}),define("Core/GeocodeType",["../Core/freezeObject"],function(e){"use strict";return e({SEARCH:0,AUTOCOMPLETE:1})}),define("Core/GeometryInstanceAttribute",["./defaultValue","./defined","./DeveloperError"],function(e,t,i){"use strict";function r(t){t=e(t,e.EMPTY_OBJECT),this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribut
;var b=new m("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);_.prototype.getQuadTreePacket=function(e,t,i){t=o(t,1),e=o(e,"");var r=v(this,e,t,i),n=r.fetchArrayBuffer();if(a(n)){var s=this._tileInfo,u=this.key;return n.then(function(t){return b.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:u},[t]).then(function(t){var i,r=-1;if(""!==e){r=e.length+1;var n=t[e];i=s[e],i._bits|=n._bits,delete t[e]}var o=Object.keys(t);o.sort(function(e,t){return e.length-t.length});for(var a=o.length,u=0;u<a;++u){var c=o[u];if(null!==t[c]){var d=l.clone(t[c]),h=c.length;if(h===r)d.setParent(i);else if(h>1){var p=s[c.substring(0,c.length-1)];d.setParent(p)}s[c]=d}else s[c]=null}})})}},_.prototype.populateSubtree=function(e,t,i,r){return g(this,_.tileXYToQuadKey(e,t,i),r)},_.prototype.getTileInformation=function(e,t,i){var r=_.tileXYToQuadKey(e,t,i);return this._tileInfo[r]},_.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};var S,T;return _}),define("Core/GoogleEarthEnterpriseTerrainData",["./BoundingSphere","./Cartesian2","./Cartesian3","./Check","./defaultValue","./defined","./defineProperties","./DeveloperError","./IndexDatatype","./Intersections2D","./Math","./OrientedBoundingBox","./QuantizedMeshTerrainData","./Rectangle","./TaskProcessor","./TerrainEncoding","./TerrainMesh"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_){"use strict";function g(e){e=n(e,n.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=n(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=n(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0,this._vertexCountWithoutSkirts=void 0,this._skirtIndex=void 0}function v(e,t,i){for(var r=e._mesh,n=r.vertices,o=r.encoding,a=r.indices,s=0,l=a.length;s<l;s+=3){var c=a[s],d=a[s+1],h=a[s+2],p=o.decodeTextureCoordinates(n,c,E),f=o.decodeTextureCoordinates(n,d,w),m=o.decodeTextureCoordinates(n,h,A),_=u.computeBarycentricCoordinates(t,i,p.x,p.y,f.x,f.y,m.x,m.y,x);if(_.x>=-1e-15&&_.y>=-1e-15&&_.z>=-1e-15){var g=o.decodeHeight(n,c),v=o.decodeHeight(n,d),y=o.decodeHeight(n,h);return _.x*g+_.y*v+_.z*y}}}function y(e,t,i,r){var n=e._buffer,o=0,a=0,s=0;i>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(n),d=0,h=0;h<o;++h)d+=l.getUint32(d,!0),d+=D;d+=D,d+=2*R;var p=c.toRadians(180*l.getFloat64(d,!0));d+=R;var f=c.toRadians(180*l.getFloat64(d,!0));d+=R;var m=r.width/p/2,_=r.height/f/2,g=l.getInt32(d,!0);d+=I;var v=3*l.getInt32(d,!0);d+=I,d+=I;var y,C=new Array(g),b=new Array(g),S=new Array(g);for(y=0;y<g;++y)C[y]=a+l.getUint8(d++)*m,b[y]=s+l.getUint8(d++)*_,S[y]=6371010*l.getFloat32(d,!0),d+=M;var T=new Array(v);for(y=0;y<v;++y)T[y]=l.getUint16(d,!0),d+=P;for(y=0;y<v;y+=3){var E=T[y],w=T[y+1],A=T[y+2],O=C[E],L=C[w],N=C[A],F=b[E],B=b[w],z=b[A],k=u.computeBarycentricCoordinates(t,i,O,F,L,B,N,z,x);if(k.x>=-1e-15&&k.y>=-1e-15&&k.z>=-1e-15)return k.x*S[E]+k.y*S[w]+k.z*S[A]}}a(g.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var C=new f("createVerticesFromGoogleEarthEnterpriseBuffer"),b=new p,S=new p;g.prototype.createMesh=function(e,t,i,r,a){var s=e.ellipsoid;e.tileXYToNativeRectangle(t,i,r,b),e.tileXYToRectangle(t,i,r,S),a=n(a,1);var l=s.cartographicToCartesian(p.center(S)),u=40075.16/(1<<r);this._skirtHeight=Math.min(8*u,1e3);var c=C.scheduleTask({buffer:this._buffer,nativeRectangle:b,rectangle:S,relativeToCenter:l,ellipsoid:s,skirtHeight:this._skirtHeight,exaggeration:a,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(o(c)){var d=this;return c.then(function(e){return d._mesh=new _(l,new Float32Array(e.vertices),new Uint16Array(e.indices),e.minimumHeight,e.maximumHeight,e.boundingSphere3D,e.occludeePointInScaledSpace,e.numberOfAttributes,
define("Core/Iso8601",["./freezeObject","./JulianDate","./TimeInterval"],function(e,t,i){"use strict";var r=e(t.fromIso8601("0000-01-01T00:00:00Z")),n=e(t.fromIso8601("9999-12-31T24:00:00Z"));return{MINIMUM_VALUE:r,MAXIMUM_VALUE:n,MAXIMUM_INTERVAL:e(new i({start:r,stop:n}))}}),define("Core/KeyboardEventModifier",["./freezeObject"],function(e){"use strict";return e({SHIFT:0,CTRL:1,ALT:2})}),define("Core/LagrangePolynomialApproximation",["./defined"],function(e){"use strict";var t={type:"Lagrange"};return t.getRequiredDataPoints=function(e){return Math.max(e+1,2)},t.interpolateOrderZero=function(t,i,r,n,o){e(o)||(o=new Array(n));var a,s,l=i.length;for(a=0;a<n;a++)o[a]=0;for(a=0;a<l;a++){var u=1;for(s=0;s<l;s++)if(s!==a){var c=i[a]-i[s];u*=(t-i[s])/c}for(s=0;s<n;s++)o[s]+=u*r[a*n+s]}return o},t}),define("Core/LinearApproximation",["./defined","./DeveloperError"],function(e,t){"use strict";var i={type:"Linear"};return i.getRequiredDataPoints=function(e){return 2},i.interpolateOrderZero=function(t,i,r,n,o){e(o)||(o=new Array(n));var a,s,l,u=i[0],c=i[1];for(a=0;a<n;a++)s=r[a],l=r[a+n],o[a]=((l-s)*t+c*s-u*l)/(c-u);return o},i}),define("Core/loadCRN",["../ThirdParty/when","./CompressedTextureBuffer","./defined","./DeveloperError","./Resource","./TaskProcessor"],function(e,t,i,r,n,o){"use strict";function a(r){var o;if(r instanceof ArrayBuffer||ArrayBuffer.isView(r))o=e.resolve(r);else{o=n.createIfNeeded(r).fetchArrayBuffer()}if(i(o))return o.then(function(e){if(i(e)){var t=[];return e instanceof ArrayBuffer?t.push(e):0===e.byteOffset&&e.byteLength===e.buffer.byteLength?t.push(e.buffer):(e=e.slice(0,e.length),t.push(e.buffer)),s.scheduleTask(e,t)}}).then(function(e){return t.clone(e)})}var s=new o("transcodeCRNToDXT",Number.POSITIVE_INFINITY);return a}),define("Core/loadImageFromTypedArray",["../ThirdParty/when","./Check","./Resource"],function(e,t,i){"use strict";function r(t,r,n){var o=new Blob([t],{type:r}),a=window.URL.createObjectURL(o);return new i({url:a,request:n}).fetchImage().then(function(e){return window.URL.revokeObjectURL(a),e},function(t){return window.URL.revokeObjectURL(a),e.reject(t)})}return r}),define("Renderer/PixelDatatype",["../Core/freezeObject","../Core/WebGLConstants"],function(e,t){"use strict";var i={UNSIGNED_BYTE:t.UNSIGNED_BYTE,UNSIGNED_SHORT:t.UNSIGNED_SHORT,UNSIGNED_INT:t.UNSIGNED_INT,FLOAT:t.FLOAT,HALF_FLOAT:t.HALF_FLOAT_OES,UNSIGNED_INT_24_8:t.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:t.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:t.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:t.UNSIGNED_SHORT_5_6_5,isPacked:function(e){return e===i.UNSIGNED_INT_24_8||e===i.UNSIGNED_SHORT_4_4_4_4||e===i.UNSIGNED_SHORT_5_5_5_1||e===i.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case i.UNSIGNED_BYTE:return 1;case i.UNSIGNED_SHORT:case i.UNSIGNED_SHORT_4_4_4_4:case i.UNSIGNED_SHORT_5_5_5_1:case i.UNSIGNED_SHORT_5_6_5:case i.HALF_FLOAT:return 2;case i.UNSIGNED_INT:case i.FLOAT:case i.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===i.UNSIGNED_BYTE||e===i.UNSIGNED_SHORT||e===i.UNSIGNED_INT||e===i.FLOAT||e===i.HALF_FLOAT||e===i.UNSIGNED_INT_24_8||e===i.UNSIGNED_SHORT_4_4_4_4||e===i.UNSIGNED_SHORT_5_5_5_1||e===i.UNSIGNED_SHORT_5_6_5}};return e(i)}),define("Core/PixelFormat",["../Renderer/PixelDatatype","./freezeObject","./WebGLConstants"],function(e,t,i){"use strict";var r={DEPTH_COMPONENT:i.DEPTH_COMPONENT,DEPTH_STENCIL:i.DEPTH_STENCIL,ALPHA:i.ALPHA,RGB:i.RGB,RGBA:i.RGBA,LUMINANCE:i.LUMINANCE,LUMINANCE_ALPHA:i.LUMINANCE_ALPHA,RGB_DXT1:i.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:i.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:i.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:i.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGB_ETC1:i.COMPRESSED_RGB_ETC1_WEBGL,componentsLength:function(e){switch(e){case r.RGB:return 3;case r.RGBA:return 4;case r.LUMINANCE_ALPHA:return 2;case r.ALPHA:case r.LUMINANCE:default:return 1}},validate:
var t=e.polygonHierarchy,i=l(e.vertexFormat,x.DEFAULT),r=l(e.ellipsoid,h.WGS84),n=l(e.granularity,C.RADIANS_PER_DEGREE),o=l(e.stRotation,0),a=l(e.perPositionHeight,!1),s=a&&u(e.extrudedHeight),c=l(e.height,0),d=l(e.extrudedHeight,c);if(!s){var p=Math.max(c,d);d=Math.min(c,d),c=p}this._vertexFormat=x.clone(i),this._ellipsoid=h.clone(r),this._granularity=n,this._stRotation=o,this._height=c,this._extrudedHeight=d,this._closeTop=l(e.closeTop,!0),this._closeBottom=l(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=s,this._shadowVolume=l(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this.packedLength=T.computeHierarchyPackedLength(t)+h.packedLength+x.packedLength+11}function L(e){var t=-e._stRotation;if(0===t)return[0,0,0,1,1,0];var i=e._ellipsoid,r=e._polygonHierarchy.positions,n=e.rectangle;return f._textureCoordinateRotationPoints(r,t,i,n)}var N=new o,F=new o,B=new t,z=new n,k=new n,V=new n,U=new n,G=new n,H=new n,W=new n,q=new n,Y=new n,j=new r,X=new r,Q=new n,Z=new w,K=new S,J=new S,$=[];O.fromPositions=function(e){return e=l(e,l.EMPTY_OBJECT),new O({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute})},O.pack=function(e,t,i){return i=l(i,0),i=T.packPolygonHierarchy(e._polygonHierarchy,t,i),h.pack(e._ellipsoid,t,i),i+=h.packedLength,x.pack(e._vertexFormat,t,i),i+=x.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._stRotation,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._closeTop?1:0,t[i++]=e._closeBottom?1:0,t[i++]=e._shadowVolume?1:0,t[i++]=l(e._offsetAttribute,-1),t[i]=e.packedLength,t};var ee=h.clone(h.UNIT_SPHERE),te=new x,ie={polygonHierarchy:{}};return O.unpack=function(e,t,i){t=l(t,0);var r=T.unpackPolygonHierarchy(e,t);t=r.startingIndex,delete r.startingIndex;var n=h.unpack(e,t,ee);t+=h.packedLength;var o=x.unpack(e,t,te);t+=x.packedLength;var a=e[t++],s=e[t++],c=e[t++],d=e[t++],p=1===e[t++],f=1===e[t++],m=1===e[t++],_=1===e[t++],g=1===e[t++],v=e[t++],y=e[t];return u(i)||(i=new O(ie)),i._polygonHierarchy=r,i._ellipsoid=h.clone(n,i._ellipsoid),i._vertexFormat=x.clone(o,i._vertexFormat),i._height=a,i._extrudedHeight=s,i._granularity=c,i._stRotation=d,i._perPositionHeightExtrude=p,i._perPositionHeight=f,i._closeTop=m,i._closeBottom=_,i._shadowVolume=g,i._offsetAttribute=-1===v?void 0:v,i.packedLength=y,i},O.computeRectangle=function(e,t){var i=e.polygonHierarchy,r=l(e.ellipsoid,h.WGS84);return M(i.positions,r,t)},O.createGeometry=function(t){var r=t._vertexFormat,n=t._ellipsoid,o=t._granularity,a=t._stRotation,l=t._polygonHierarchy,c=t._perPositionHeight,d=t._closeTop,h=t._closeBottom,b=l.positions;if(!(b.length<3)){var S=p.fromPoints(b,n),w=T.polygonsFromHierarchy(l,S.projectPointsOntoPlane.bind(S),!c,n),A=w.hierarchy,x=w.polygons;if(0!==A.length){b=A[0].outerRing;var P,D=T.computeBoundingRectangle(S.plane.normal,S.projectPointOntoPlane.bind(S),b,a,B),M=[],O=t._height,L=t._extrudedHeight,N=t._perPositionHeightExtrude||!C.equalsEpsilon(O,L,0,C.EPSILON2),F={perPositionHeight:c,vertexFormat:r,geometry:void 0,tangentPlane:S,boundingRectangle:D,ellipsoid:n,stRotation:a,bottom:!1,top:!0,wall:!1,extrude:!1};if(N)for(F.extrude=!0,F.top=d,F.bottom=h,F.shadowVolume=t._shadowVolume,F.offsetAttribute=t._offsetAttribute,P=0;P<x.length;P++){var z,k=R(n,x[P],o,A[P],c,d,h,r);d&&h?(z=k.topAndBottom,F.geometry=T.scaleToGeodeticHeightExtruded(z.geometry,O,L,n,c)):d?(z=k.topAndBottom,z.geometry.attributes.position.values=E.scaleToGeodeticHeight(z.geometry.attributes.position.values,O,n,!c),F.geometry=z.geometry):h&&(z=k.topAndBottom,z.geometry.attributes.position.values=E.scaleToGeodeticHeight(z.geometry.attributes.position.values,L,n,!0),F.ge
c=Math.ceil(f/t)+1,d=Math.ceil(S/t)+1,h=f/(c-1),p=S/(d-1));var T=s.northwest(e,a),E=s.center(e,m);0===i&&0===r||(E.longitude<T.longitude&&(E.longitude+=o.TWO_PI),_=g.project(E,_));var w=p,A=h,x=s.clone(e,n),P={granYCos:w,granYSin:0,granXCos:A,granXSin:0,nwCorner:T,boundingRectangle:x,width:c,height:d};if(0!==i){var D=l(T,i,h,p,E,c,d);C=D.north,b=D.south,v=D.east,y=D.west,P.granYCos=D.granYCos,P.granYSin=D.granYSin,P.granXCos=D.granXCos,P.granXSin=D.granXSin,x.north=C,x.south=b,x.east=v,x.west=y}if(0!==r){i-=r;var I=s.northwest(x,u),M=l(I,i,h,p,E,c,d);P.stGranYCos=M.granYCos,P.stGranXCos=M.granXCos,P.stGranYSin=M.granYSin,P.stGranXSin=M.granXSin,P.stNwCorner=I,P.stWest=M.west,P.stSouth=M.south}return P},h}),define("Core/RectangleGeometry",["./arrayFill","./BoundingSphere","./Cartesian2","./Cartesian3","./Cartographic","./Check","./ComponentDatatype","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./GeometryInstance","./GeometryOffsetAttribute","./GeometryPipeline","./IndexDatatype","./Math","./Matrix2","./Matrix3","./PolygonPipeline","./PrimitiveType","./Quaternion","./Rectangle","./RectangleGeometryLibrary","./VertexFormat"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E,w,A,x){"use strict";function P(e,t){var i=new h({attributes:new f,primitiveType:T.TRIANGLES});return i.attributes.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(i.attributes.normal=new p({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(i.attributes.tangent=new p({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(i.attributes.bitangent=new p({componentDatatype:a.FLOAT,componentsPerAttribute:3,values:t.bitangents})),i}function D(e,t,i,n){var o=e.length,a=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,l=t.bitangent?new Float32Array(o):void 0,u=0,c=U,d=V,h=k;if(t.normal||t.tangent||t.bitangent)for(var p=0;p<o;p+=3){var f=r.fromArray(e,p,z),m=u+1,_=u+2;h=i.geodeticSurfaceNormal(f,h),(t.tangent||t.bitangent)&&(r.cross(r.UNIT_Z,h,d),b.multiplyByVector(n,d,d),r.normalize(d,d),t.bitangent&&r.normalize(r.cross(h,d,c),c)),t.normal&&(a[u]=h.x,a[m]=h.y,a[_]=h.z),t.tangent&&(s[u]=d.x,s[m]=d.y,s[_]=d.z),t.bitangent&&(l[u]=c.x,l[m]=c.y,l[_]=c.z),u+=3}return P(t,{positions:e,normals:a,tangents:s,bitangents:l})}function I(e,t,i){var n=e.length,o=t.normal?new Float32Array(n):void 0,a=t.tangent?new Float32Array(n):void 0,s=t.bitangent?new Float32Array(n):void 0,l=0,u=0,c=0,d=!0,h=U,p=V,f=k;if(t.normal||t.tangent||t.bitangent)for(var m=0;m<n;m+=6){var _=r.fromArray(e,m,z),g=r.fromArray(e,(m+6)%n,Y);if(d){var v=r.fromArray(e,(m+3)%n,j);r.subtract(g,_,g),r.subtract(v,_,v),f=r.normalize(r.cross(v,g,f),f),d=!1}r.equalsEpsilon(g,_,y.EPSILON10)&&(d=!0),(t.tangent||t.bitangent)&&(h=i.geodeticSurfaceNormal(_,h),t.tangent&&(p=r.normalize(r.cross(h,f,p),p))),t.normal&&(o[l++]=f.x,o[l++]=f.y,o[l++]=f.z,o[l++]=f.x,o[l++]=f.y,o[l++]=f.z),t.tangent&&(a[u++]=p.x,a[u++]=p.y,a[u++]=p.z,a[u++]=p.x,a[u++]=p.y,a[u++]=p.z),t.bitangent&&(s[c++]=h.x,s[c++]=h.y,s[c++]=h.z,s[c++]=h.x,s[c++]=h.y,s[c++]=h.z)}return P(t,{positions:e,normals:o,tangents:a,bitangents:s})}function M(e,t){for(var i=e._vertexFormat,r=e._ellipsoid,n=t.size,o=t.height,s=t.width,l=i.position?new Float64Array(3*n):void 0,u=i.st?new Float32Array(2*n):void 0,c=0,d=0,h=z,f=H,m=Number.MAX_VALUE,_=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=-Number.MAX_VALUE,C=0;C<o;++C)for(var b=0;b<s;++b)A.computePosition(t,r,i.st,C,b,h,f),l[c++]=h.x,l[c++]=h.y,l[c++]=h.z,i.st&&(u[d++]=f.x,u[d++]=f.y,m=Math.min(m,f.x),_=Math.min(_,f.y),g=Math.max(g,f.x),y=Math.max(y,f.y));if(i.st&&(m<0||_<0||g>1||y>1))for(var S=0;S<u.length;S+=2)u[S]=(u[S]-m)/(g-m),u[S+1]=(u[S+1]-_)/(y-_);for(var T=D(l,i,r,t.tangentRotationMatrix),E=6*(s-1)*(o-1),w=v.createTypedArray(n,E),x=0,P=0,I=0;I<o-1;++I){for(var M=0;M<s-1;++M){var R=x,O=R+s,L=O+1,N=R+1;w[P++]=R,w[P++]=O,w[P++]=N,w[P++]=N,w[P++]=O,w[P++]=L,++x}++x}return T.ind
g+=-520.77*Math.sin(P)*r+13.66*Math.sin(D-N+P)*r+1.12*Math.sin(D-P)*r-1.06*Math.sin(N-P)*r+.66*Math.sin(F)*n+.371*Math.sin(P)*n-.035*Math.sin(D-N+F)*n-.015*Math.sin(D-N+P)*n+.0014*Math.sin(P)*o-.0011*Math.sin(B)*o-9e-4*Math.sin(F)*o,l*=T,c(l,d,h+p*w,f+m*w,_+g*w,v+y*w,t)}function v(t,i){return i=g(t,i),e.multiplyByScalar(i,xe,i)}var y={},C=32.184,b=2451545,S=new r(2451545,0,s.TAI),T=1e3,E=n.RADIANS_PER_DEGREE,w=n.RADIANS_PER_ARCSECOND,A=new o,x=50,P=n.EPSILON8,D=149598022260.7121,I=100.46645683*E,M=1295977422.83429*w,R=16002,O=21863,L=32004,N=10931,F=14529,B=16368,z=15318,k=32794,V=64e-7*14959787e4,U=-2273887.624,G=927506.794,H=14959787e4*-8e-7,W=32e-7*14959787e4,q=-613351.267,Y=284235.953,j=-164557.657,X=-2243968.05,Q=-688150.202,Z=1017265.516,K=807828.498,J=14e-7*14959787e4,$=359034.888,ee=14959787e4*-28e-7,te=329115.314,ie=10,re=16002,ne=21863,oe=10931,ae=1473,se=32004,le=4387,ue=73,ce=-325e-7,de=-322e-7,he=1e-7*-79,pe=232*1e-7,fe=1e-7*-52,me=97e-7,_e=55e-7,ge=-41e-7,ve=-105e-7,ye=-137e-7,Ce=258e-7,be=35e-7,Se=1e-7*-116,Te=-88e-7,Ee=-112e-7,we=-8e-6,Ae=new r(0,0,s.TAI),xe=-.01215058143522694,Pe=new o(1.0000000000000002,5.619723173785822e-16,4.690511510146299e-19,-5.154129427414611e-16,.9174820620691819,-.39777715593191376,-2.23970096136568e-16,.39777715593191376,.9174820620691819),De=new e;return y.computeSunPositionInEarthInertialFrame=function(i,n){return t(i)||(i=r.now()),t(n)||(n=new e),De=_(i,De),n=e.negate(De,n),v(i,De),e.subtract(n,De,n),o.multiplyByVector(Pe,n,n),n},y.computeMoonPositionInEarthInertialFrame=function(e,i){return t(e)||(e=r.now()),i=g(e,i),o.multiplyByVector(Pe,i,i),i},y}),define("Core/SimplePolylineGeometry",["./BoundingSphere","./Cartesian3","./Color","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PolylinePipeline","./PrimitiveType"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f){"use strict";function m(e,t,r,n,o,a,s){var l,u=p.numberOfPoints(e,t,o),c=r.red,d=r.green,h=r.blue,f=r.alpha,m=n.red,_=n.green,g=n.blue,v=n.alpha;if(i.equals(r,n)){for(l=0;l<u;l++)a[s++]=i.floatToByte(c),a[s++]=i.floatToByte(d),a[s++]=i.floatToByte(h),a[s++]=i.floatToByte(f);return s}var y=(m-c)/u,C=(_-d)/u,b=(g-h)/u,S=(v-f)/u,T=s;for(l=0;l<u;l++)a[T++]=i.floatToByte(c+l*y),a[T++]=i.floatToByte(d+l*C),a[T++]=i.floatToByte(h+l*b),a[T++]=i.floatToByte(f+l*S);return T}function _(e){e=n(e,n.EMPTY_OBJECT);var r=e.positions,a=e.colors,l=n(e.colorsPerVertex,!1);this._positions=r,this._colors=a,this._colorsPerVertex=l,this._followSurface=n(e.followSurface,!0),this._granularity=n(e.granularity,h.RADIANS_PER_DEGREE),this._ellipsoid=n(e.ellipsoid,s.WGS84),this._workerName="createSimplePolylineGeometry";var u=1+r.length*t.packedLength;u+=o(a)?1+a.length*i.packedLength:1,this.packedLength=u+s.packedLength+3}_.pack=function(e,r,a){a=n(a,0);var l,u=e._positions,c=u.length;for(r[a++]=c,l=0;l<c;++l,a+=t.packedLength)t.pack(u[l],r,a);var d=e._colors;for(c=o(d)?d.length:0,r[a++]=c,l=0;l<c;++l,a+=i.packedLength)i.pack(d[l],r,a);return s.pack(e._ellipsoid,r,a),a+=s.packedLength,r[a++]=e._colorsPerVertex?1:0,r[a++]=e._followSurface?1:0,r[a]=e._granularity,r},_.unpack=function(e,r,a){r=n(r,0);var l,u=e[r++],c=new Array(u);for(l=0;l<u;++l,r+=t.packedLength)c[l]=t.unpack(e,r);u=e[r++];var d=u>0?new Array(u):void 0;for(l=0;l<u;++l,r+=i.packedLength)d[l]=i.unpack(e,r);var h=s.unpack(e,r);r+=s.packedLength;var p=1===e[r++],f=1===e[r++],m=e[r];return o(a)?(a._positions=c,a._colors=d,a._ellipsoid=h,a._colorsPerVertex=p,a._followSurface=f,a._granularity=m,a):new _({positions:c,colors:d,ellipsoid:h,colorsPerVertex:p,followSurface:f,granularity:m})};var g=new Array(2),v=new Array(2),y={positions:g,height:v,ellipsoid:void 0,minDistance:void 0};return _.createGeometry=function(n){var a,s,_,C,b,S=n._positions,T=n._colors,E=n._colorsPerVertex,w=n._followSurface,A=n._granularity,x=n._ellipsoid,P=h.chordLength(A,x.maximumRadius),D=o(T)&&!E,I=S.length,M=0;if(w){var R=p.extractHeights(S,x),O=y;if(O.minDistance=P,O.ellipsoid=x,D){var L=0;for(a=
define("Core/WallOutlineGeometry",["./BoundingSphere","./Cartesian3","./ComponentDatatype","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./Geometry","./GeometryAttribute","./GeometryAttributes","./IndexDatatype","./Math","./PrimitiveType","./WallGeometryLibrary"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p){"use strict";function f(e){e=r(e,r.EMPTY_OBJECT);var i=e.positions,o=e.maximumHeights,s=e.minimumHeights,l=r(e.granularity,d.RADIANS_PER_DEGREE),u=r(e.ellipsoid,a.WGS84);this._positions=i,this._minimumHeights=s,this._maximumHeights=o,this._granularity=l,this._ellipsoid=a.clone(u),this._workerName="createWallOutlineGeometry";var c=1+i.length*t.packedLength+2;n(s)&&(c+=s.length),n(o)&&(c+=o.length),this.packedLength=c+a.packedLength+1}var m=new t,_=new t;f.pack=function(e,i,o){o=r(o,0);var s,l=e._positions,u=l.length;for(i[o++]=u,s=0;s<u;++s,o+=t.packedLength)t.pack(l[s],i,o);var c=e._minimumHeights;if(u=n(c)?c.length:0,i[o++]=u,n(c))for(s=0;s<u;++s)i[o++]=c[s];var d=e._maximumHeights;if(u=n(d)?d.length:0,i[o++]=u,n(d))for(s=0;s<u;++s)i[o++]=d[s];return a.pack(e._ellipsoid,i,o),o+=a.packedLength,i[o]=e._granularity,i};var g=a.clone(a.UNIT_SPHERE),v={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:g,granularity:void 0};return f.unpack=function(e,i,o){i=r(i,0);var s,l=e[i++],u=new Array(l);for(s=0;s<l;++s,i+=t.packedLength)u[s]=t.unpack(e,i);l=e[i++];var c;if(l>0)for(c=new Array(l),s=0;s<l;++s)c[s]=e[i++];l=e[i++];var d;if(l>0)for(d=new Array(l),s=0;s<l;++s)d[s]=e[i++];var h=a.unpack(e,i,g);i+=a.packedLength;var p=e[i];return n(o)?(o._positions=u,o._minimumHeights=c,o._maximumHeights=d,o._ellipsoid=a.clone(h,o._ellipsoid),o._granularity=p,o):(v.positions=u,v.minimumHeights=c,v.maximumHeights=d,v.granularity=p,new f(v))},f.fromConstantHeights=function(e){e=r(e,r.EMPTY_OBJECT);var t,i,o=e.positions,a=e.minimumHeight,s=e.maximumHeight,l=n(a),u=n(s);if(l||u){var c=o.length;t=l?new Array(c):void 0,i=u?new Array(c):void 0;for(var d=0;d<c;++d)l&&(t[d]=a),u&&(i[d]=s)}return new f({positions:o,maximumHeights:i,minimumHeights:t,ellipsoid:e.ellipsoid})},f.createGeometry=function(r){var o=r._positions,a=r._minimumHeights,f=r._maximumHeights,g=r._granularity,v=r._ellipsoid,y=p.computePositions(v,o,f,a,g,!1);if(n(y)){var C=y.bottomPositions,b=y.topPositions,S=b.length,T=2*S,E=new Float64Array(T),w=0;S/=3;var A;for(A=0;A<S;++A){var x=3*A,P=t.fromArray(b,x,m),D=t.fromArray(C,x,_);E[w++]=D.x,E[w++]=D.y,E[w++]=D.z,E[w++]=P.x,E[w++]=P.y,E[w++]=P.z}var I=new u({position:new l({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:E})}),M=T/3;T=2*M-4+M;var R=c.createTypedArray(M,T),O=0;for(A=0;A<M-2;A+=2){var L=A,N=A+2,F=t.fromArray(E,3*L,m),B=t.fromArray(E,3*N,_);if(!t.equalsEpsilon(F,B,d.EPSILON10)){var z=A+1,k=A+3;R[O++]=z,R[O++]=L,R[O++]=z,R[O++]=k,R[O++]=L,R[O++]=N}}return R[O++]=M-2,R[O++]=M-1,new s({attributes:I,indices:R,primitiveType:h.LINES,boundingSphere:new e.fromVertices(E)})}},f}),define("Core/webGLConstantToGlslType",["./WebGLConstants"],function(e){"use strict";function t(t){switch(t){case e.FLOAT:return"float";case e.FLOAT_VEC2:return"vec2";case e.FLOAT_VEC3:return"vec3";case e.FLOAT_VEC4:return"vec4";case e.FLOAT_MAT2:return"mat2";case e.FLOAT_MAT3:return"mat3";case e.FLOAT_MAT4:return"mat4";case e.SAMPLER_2D:return"sampler2D";case e.BOOL:return"bool"}}return t}),define("Core/WebMercatorTilingScheme",["./Cartesian2","./defaultValue","./defined","./defineProperties","./Ellipsoid","./Rectangle","./WebMercatorProjection"],function(e,t,i,r,n,o,a){"use strict";function s(r){if(r=t(r,{}),this._ellipsoid=t(r.ellipsoid,n.WGS84),this._numberOfLevelZeroTilesX=t(r.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=t(r.numberOfLevelZeroTilesY,1),this._projection=new a(this._ellipsoid),i(r.rectangleSouthwestInMeters)&&i(r.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=r.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=r.rectangleNortheastInMeters;else{var s=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new e(-s,-s),this._rectangleNortheastInMet
return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),l.equals=function(e,t){return e===t||i(e)&&i(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},l}),define("Renderer/CubeMap",["../Core/Check","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Math","../Core/PixelFormat","./ContextLimits","./CubeMapFace","./MipmapHint","./PixelDatatype","./Sampler","./TextureMagnificationFilter","./TextureMinificationFilter"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f){"use strict";function m(e){function r(e,t,r,n){var o=t.arrayBufferView;i(o)||(o=t.bufferView),o?(v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL,!1),n&&(o=s.flipY(o,p,f,c,c)),v.texImage2D(e,0,p,c,c,0,p,f,o)):(v.pixelStorei(v.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),v.pixelStorei(v.UNPACK_FLIP_Y_WEBGL,n),v.texImage2D(e,0,p,p,f,t))}e=t(e,t.EMPTY_OBJECT);var n,o=e.context,a=e.source;if(i(a)){var l=[a.positiveX,a.negativeX,a.positiveY,a.negativeY,a.positiveZ,a.negativeZ];n=l[0].width,l[0].height}else n=e.width,e.height;var c=n,p=t(e.pixelFormat,s.RGBA),f=t(e.pixelDatatype,d.UNSIGNED_BYTE),m=6*s.textureSizeInBytes(p,f,c,c),_=e.preMultiplyAlpha||p===s.RGB||p===s.LUMINANCE,g=t(e.flipY,!0),v=o._gl,y=v.TEXTURE_CUBE_MAP,C=v.createTexture();v.activeTexture(v.TEXTURE0),v.bindTexture(y,C),i(a)?(r(v.TEXTURE_CUBE_MAP_POSITIVE_X,a.positiveX,_,g),r(v.TEXTURE_CUBE_MAP_NEGATIVE_X,a.negativeX,_,g),r(v.TEXTURE_CUBE_MAP_POSITIVE_Y,a.positiveY,_,g),r(v.TEXTURE_CUBE_MAP_NEGATIVE_Y,a.negativeY,_,g),r(v.TEXTURE_CUBE_MAP_POSITIVE_Z,a.positiveZ,_,g),r(v.TEXTURE_CUBE_MAP_NEGATIVE_Z,a.negativeZ,_,g)):(v.texImage2D(v.TEXTURE_CUBE_MAP_POSITIVE_X,0,p,c,c,0,p,f,null),v.texImage2D(v.TEXTURE_CUBE_MAP_NEGATIVE_X,0,p,c,c,0,p,f,null),v.texImage2D(v.TEXTURE_CUBE_MAP_POSITIVE_Y,0,p,c,c,0,p,f,null),v.texImage2D(v.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,p,c,c,0,p,f,null),v.texImage2D(v.TEXTURE_CUBE_MAP_POSITIVE_Z,0,p,c,c,0,p,f,null),v.texImage2D(v.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,p,c,c,0,p,f,null)),v.bindTexture(y,null),this._context=o,this._textureFilterAnisotropic=o._textureFilterAnisotropic,this._textureTarget=y,this._texture=C,this._pixelFormat=p,this._pixelDatatype=f,this._size=c,this._hasMipmap=!1,this._sizeInBytes=m,this._preMultiplyAlpha=_,this._flipY=g,this._sampler=void 0;var b=i(a);this._positiveX=new u(v,C,y,v.TEXTURE_CUBE_MAP_POSITIVE_X,p,f,c,_,g,b),this._negativeX=new u(v,C,y,v.TEXTURE_CUBE_MAP_NEGATIVE_X,p,f,c,_,g,b),this._positiveY=new u(v,C,y,v.TEXTURE_CUBE_MAP_POSITIVE_Y,p,f,c,_,g,b),this._negativeY=new u(v,C,y,v.TEXTURE_CUBE_MAP_NEGATIVE_Y,p,f,c,_,g,b),this._positiveZ=new u(v,C,y,v.TEXTURE_CUBE_MAP_POSITIVE_Z,p,f,c,_,g,b),this._negativeZ=new u(v,C,y,v.TEXTURE_CUBE_MAP_NEGATIVE_Z,p,f,c,_,g,b),this.sampler=i(e.sampler)?e.sampler:new h}return r(m.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,r=e.magnificationFilter,n=t===f.NEAREST_MIPMAP_NEAREST||t===f.NEAREST_MIPMAP_LINEAR||t===f.LINEAR_MIPMAP_NEAREST||t===f.LINEAR_MIPMAP_LINEAR,o=this._context,a=this._pixelDatatype;(a===d.FLOAT&&!o.textureFloatLinear||a===d.HALF_FLOAT&&!o.textureHalfFloatLinear)&&(t=n?f.NEAREST_MIPMAP_NEAREST:f.NEAREST,r=p.NEAREST);var s=o._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,r),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),i(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e
var a="uniform "+n+" "+t+";";e.shaderSource=a+e.shaderSource}var s=t+"_"+e._count++;if(Q(e,t,s),e.uniforms[t]=r,"sampler2D"===n)e._uniforms[s]=function(){return e._textures[t]},e._updateFunctions.push(H(t));else if("samplerCube"===n)e._uniforms[s]=function(){return e._textures[t]},e._updateFunctions.push(W(t));else if(-1!==n.indexOf("mat")){var l=new $[n];e._uniforms[s]=function(){return $[n].fromColumnMajorArray(e.uniforms[t],l)}}else e._uniforms[s]=function(){return e.uniforms[t]}}}function j(e){var t=e.type;if(!a(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof _||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===F.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(c(e))4!==e.length&&9!==e.length&&16!==e.length||(t="mat"+Math.sqrt(e.length));else{var r=0;for(var n in e)e.hasOwnProperty(n)&&(r+=1);r>=2&&r<=4?t="vec"+r:6===r&&(t="samplerCube")}}return t}function X(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var o=new F({strict:t,fabric:i[n],count:e._count});e._count=o._count,e._uniforms=r(e._uniforms,o._uniforms,!0),e.materials[n]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);var a="czm_getMaterial_"+e._count++;Q(o,"czm_getMaterial",a),e.shaderSource=o.shaderSource+e.shaderSource;var s=a+"(materialInput)";Q(e,n,s)}}function Q(e,t,i,r){r=o(r,!0);var n=0,a="([\\w"+(r?".":"")+"])?",s=new RegExp(a+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(s,function(e,t,r){return t||r?e:(n+=1,i)}),n}function Z(e,t,i){return Q(e,t,t,i)}F._uniformList={},F.fromType=function(e,t){var i=new F({fabric:{type:e}});if(a(t))for(var r in t)t.hasOwnProperty(r)&&(i.uniforms[r]=t[r]);return i},F.prototype.isTranslucent=function(){if(a(this.translucent))return"function"==typeof this.translucent?this.translucent():this.translucent;for(var e=!0,t=this._translucentFunctions,i=t.length,r=0;r<i;++r){var n=t[r];if(!(e="function"==typeof n?e&&n():e&&n))break}return e},F.prototype.update=function(e){var t,i,r=this._loadedImages,n=r.length;for(t=0;t<n;++t){var o=r[t];i=o.id;var s,l=o.image;s=new v(a(l.internalFormat)?{context:e,pixelFormat:l.internalFormat,width:l.width,height:l.height,source:{arrayBufferView:l.bufferView}}:{context:e,source:l}),this._textures[i]=s;var u=i+"Dimensions";if(this.uniforms.hasOwnProperty(u)){var c=this.uniforms[u];c.x=s._width,c.y=s._height}}r.length=0;var d=this._loadedCubeMaps;for(n=d.length,t=0;t<n;++t){var h=d[t];i=h.id;var p=h.images,f=new g({context:e,source:{positiveX:p[0],negativeX:p[1],positiveY:p[2],negativeY:p[3],positiveZ:p[4],negativeZ:p[5]}});this._textures[i]=f}d.length=0;var m=this._updateFunctions;for(n=m.length,t=0;t<n;++t)m[t](this,e);var _=this.materials;for(var y in _)_.hasOwnProperty(y)&&_[y].update(e)},F.prototype.isDestroyed=function(){return!1},F.prototype.destroy=function(){var e=this._textures;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];i!==this._defaultTexture&&i.destroy()}var r=this.materials;for(var n in r)r.hasOwnProperty(n)&&r[n].destroy();return l(this)};var K=["type","materials","uniforms","components","source"],J=["diffuse","specular","shininess","normal","emission","alpha"],$={mat2:p,mat3:f,mat4:m},ee=/\.ktx$/i,te=/\.crn$/i;return F._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},F.DefaultImageId="czm_defaultImage",F.DefaultCubeMapId="czm_defaultCubeMap",F.ColorType="Color",F._materialCache.addMaterial(F.ColorType,{fabric:{type:F.ColorType,uniforms:{color:new i(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),F.ImageType="Image",F._materialCache.addMaterial(F.ImageType,{fabric:{type:F.ImageType,uniforms:{image:F.DefaultImageId,repeat:new e(1,1),color:new i(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * co
czm_viewRotation:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new n({size:1,datatype:r.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new n({size:1,datatype:r.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new n({size:1,datatype:r.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight2D:new n({size:1,datatype:r.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_entireFrustum:new n({size:1,datatype:r.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new n({size:1,datatype:r.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new n({size:1,datatype:r.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_log2FarDistance:new n({size:1,datatype:r.FLOAT,getValue:function(e){return e.log2FarDistance}}),czm_log2FarPlusOne:new n({size:1,datatype:r.FLOAT,getValue:function(e){return e.log2FarPlusOne}}),czm_log2NearDistance:new n({size:1,datatype:r.FLOAT,getValue:function(e){return e.log2NearDistance}}),czm_sunPositionWC:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_encodedCameraPositionMCHigh:new n({size:1,datatype:r.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new n({siz
;return"vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\nfloat val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\nfloat val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\nval1 = val1 * (1.0 - val2);\nval1 = val1 * val1 * (3.0 - (2.0 * val1));\nval1 = pow(val1, 0.5);\nvec4 midColor = (color1 + color2) * 0.5;\nreturn mix(midColor, currentColor, val1);\n}\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\nreturn czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n"}),define("Shaders/Builtin/Functions/approximateSphericalCoordinates",[],function(){"use strict";return"vec2 czm_approximateSphericalCoordinates(vec3 normal) {\nfloat latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\nfloat longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\nreturn vec2(latitudeApproximation, longitudeApproximation);\n}\n"}),define("Shaders/Builtin/Functions/branchFreeTernary",[],function(){"use strict";return"float czm_branchFreeTernary(bool comparison, float a, float b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\nfloat useA = float(comparison);\nreturn a * useA + b * (1.0 - useA);\n}\n"}),define("Shaders/Builtin/Functions/cascadeColor",[],function(){"use strict";return"vec4 czm_cascadeColor(vec4 weights)\n{\nreturn vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\nvec4(0.0, 1.0, 0.0, 1.0) * weights.y +\nvec4(0.0, 0.0, 1.0, 1.0) * weights.z +\nvec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n"}),define("Shaders/Builtin/Functions/cascadeDistance",[],function(){"use strict";return"uniform vec4 shadowMap_cascadeDistances;\nfloat czm_cascadeDistance(vec4 weights)\n{\nreturn dot(shadowMap_cascadeDistances, weights);\n}\n"}),define("Shaders/Builtin/Functions/cascadeMatrix",[],function(){"use strict";return"uniform mat4 shadowMap_cascadeMatrices[4];\nmat4 czm_cascadeMatrix(vec4 weights)\n{\nreturn shadowMap_cascadeMatrices[0] * weights.x +\nshadowMap_cascadeMatrices[1] * weights.y +\nshadowMap_cascadeMatrices[2] * weights.z +\nshadowMap_cascadeMatrices[3] * weights.w;\n}\n"}),define("Shaders/Builtin/Functions/cascadeWeights",[],function(){"use strict";return"uniform vec4 shadowMap_cascadeSplits[2];\nvec4 czm_cascadeWeights(float depthEye)\n{\nvec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\nvec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\nreturn near * far;\n}\n"}),define("Shaders/Builtin/Functions/columbusViewMorph",[],function(){"use strict";return"vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\nvec3 p = mix(position2D.xyz, position3D.xyz, time);\nreturn vec4(p, 1.0);\n}\n"}),define("Shaders/Builtin/Functions/computePosition",[],function(){"use strict";return"vec4 czm_computePosition();\n"}),define("Shaders/Builtin/Functions/cosineAndSine",[],function(){"use strict";return"vec2 cordic(float angle)\n{\nvec2 vector = vec2(6.0725293500888267e-1, 0.0);\nfloat sense = (angle < 0.0) ? -1.0 : 1.0;\nmat2 rotation = mat2(1.0, sense, -sense, 1.0);\nvector = rotation * vector;\nangle -= sense * 7.8539816339744828e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfloat factor = sense * 5.0e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 4.6364760900080609e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 2.5e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 2.4497866312686414e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfactor = sense * 1.25e-1;\nrotation[0][1] = factor;\nrotation[1][0] = -factor;\nvector = rotation * vector;\nangle -= sense * 1.2435499454676144e-1;\nsense = (angle < 0.0) ? -1.0 : 1.0;\nfacto
;return"float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\nfloat strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\nfloat strength = step(0.0, nDotL);\n#endif\nvisibility *= strength;\n#endif\nvisibility = max(visibility, darkness);\nreturn visibility;\n}\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec3 uvw = shadowParameters.texCoords;\ndepth -= depthBias;\nfloat visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\nfloat depthBias = shadowParameters.depthBias;\nfloat depth = shadowParameters.depth;\nfloat nDotL = shadowParameters.nDotL;\nfloat normalShadingSmooth = shadowParameters.normalShadingSmooth;\nfloat darkness = shadowParameters.darkness;\nvec2 uv = shadowParameters.texCoords;\ndepth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\nvec2 texelStepSize = shadowParameters.texelStepSize;\nfloat radius = 1.0;\nfloat dx0 = -texelStepSize.x * radius;\nfloat dy0 = -texelStepSize.y * radius;\nfloat dx1 = texelStepSize.x * radius;\nfloat dy1 = texelStepSize.y * radius;\nfloat visibility = (\nczm_shadowDepthCompare(shadowMap, uv, depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\nczm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n) * (1.0 / 9.0);\n#else\nfloat visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\nreturn czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n"}),define("Shaders/Builtin/Functions/signNotZero",[],function(){"use strict";return"float czm_signNotZero(float value)\n{\nreturn value >= 0.0 ? 1.0 : -1.0;\n}\nvec2 czm_signNotZero(vec2 value)\n{\nreturn vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\nvec3 czm_signNotZero(vec3 value)\n{\nreturn vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\nvec4 czm_signNotZero(vec4 value)\n{\nreturn vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n"}),define("Shaders/Builtin/Functions/sphericalHarmonics",[],function(){"use strict";return"vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\nconst float c1 = 0.429043;\nconst float c2 = 0.511664;\nconst float c3 = 0.743125;\nconst float c4 = 0.886227;\nconst float c5 = 0.247708;\nvec3 L00 = coefficients[0];\nvec3 L1_1 = coefficients[1];\nvec3 L10 = coefficients[2];\nvec3 L11 = coefficients[3];\nvec3 L2_2 = coefficients[4];\nvec3 L2_1 = coefficients[5];\nvec3 L20 = coefficients[6];\nvec3 L21 = coefficients[7];\nvec3 L22 = coefficients[8];\nfloat x = normal.x;\nfloat y = normal.y;\nfloat z = normal.z;\nreturn c1 * L22 * (x * x - y * y) + c3 * L20 * z * z + c4 * L00 - c5 * L20 +\n2.0 * c1 * (L2_2 * x * y + L21 * x * z + L2_1 * y * z) +\n2.0 * c2 * (L11 * x + L1_1 * y + L10 * z);\n}\n"}),define("Shaders/Builtin/Functions/tangentToEyeSpaceMatrix",[],function(){"use strict";return"mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\nvec3 normal = normalize(normalEC);\nvec3 tangent = normalize(tangentEC);\nvec3 bitangent = normalize(bitangentEC);\nreturn mat3(tangent
;for(i=0;i<l;++i){n=a[i];var C=t.getSizeInBytes(e[n].componentDatatype);y[n]={pointer:t.createTypedArray(e[n].componentDatatype,_),index:h[n]/C,strideInComponentType:d/C}}for(i=0;i<s;++i)for(var b=0;b<l;++b){n=a[b],o=e[n];for(var S=o.values,T=y[n],E=T.pointer,w=o.componentsPerAttribute,A=0;A<w;++A)E[T.index+A]=S[i*w+A];T.index+=T.strideInComponentType}return{buffer:_,offsetsInBytes:h,vertexSizeInBytes:d}}}function C(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var r,n=t._vertexAttribDivisors,o=e._attributes,a=p.maximumVertexAttributes;if(i){var s=o.length;for(r=0;r<s;++r){var l=o[r];if(l.enabled){var u=l.instanceDivisor,c=l.index;u!==n[c]&&(t.glVertexAttribDivisor(c,u),n[c]=u)}}}else for(r=0;r<a;++r)n[r]>0&&(t.glVertexAttribDivisor(r,0),n[r]=0)}}function b(e,t){for(var i=e._attributes,n=i.length,o=0;o<n;++o){var a=i[o];a.enabled&&r(a.value)&&a.vertexAttrib(t)}}return _.fromGeometry=function(e){e=i(e,i.EMPTY_OBJECT);var n,o,a,c=e.context,p=i(e.geometry,i.EMPTY_OBJECT),f=i(e.bufferUsage,h.DYNAMIC_DRAW),m=i(e.attributeLocations,i.EMPTY_OBJECT),g=i(e.interleave,!1),v=e.vertexArrayAttributes,C=r(v)?v:[],b=p.attributes;if(g){var S=y(b);if(r(S)){a=d.createVertexBuffer({context:c,typedArray:S.buffer,usage:f});var T=S.offsetsInBytes,E=S.vertexSizeInBytes;for(n in b)b.hasOwnProperty(n)&&r(b[n])&&(o=b[n],r(o.values)?C.push({index:m[n],vertexBuffer:a,componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,offsetInBytes:T[n],strideInBytes:E}):C.push({index:m[n],value:o.value,componentDatatype:o.componentDatatype,normalize:o.normalize}))}}else for(n in b)if(b.hasOwnProperty(n)&&r(b[n])){o=b[n];var w=o.componentDatatype;w===t.DOUBLE&&(w=t.FLOAT),a=void 0,r(o.values)&&(a=d.createVertexBuffer({context:c,typedArray:t.createTypedArray(w,o.values),usage:f})),C.push({index:m[n],vertexBuffer:a,value:o.value,componentDatatype:w,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize})}var A,x=p.indices;return r(x)&&(A=s.computeNumberOfVertices(p)>=u.SIXTY_FOUR_KILOBYTES&&c.elementIndexUint?d.createIndexBuffer({context:c,typedArray:new Uint32Array(x),usage:f,indexDatatype:l.UNSIGNED_INT}):d.createIndexBuffer({context:c,typedArray:new Uint16Array(x),usage:f,indexDatatype:l.UNSIGNED_SHORT})),new _({context:c,attributes:C,indexBuffer:A})},n(_.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),_.prototype.getAttribute=function(e){return this._attributes[e]},_.prototype._bind=function(){r(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&C(this),this._hasConstantAttributes&&b(this,this._gl)):m(this._gl,this._attributes,this._indexBuffer)},_.prototype._unBind=function(){if(r(this._vao))this._context.glBindVertexArray(null);else{for(var e=this._attributes,t=this._gl,i=0;i<e.length;++i){var n=e[i];n.enabled&&n.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){for(var e=this._attributes,t=0;t<e.length;++t){var i=e[t].vertexBuffer;r(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}var n=this._indexBuffer;return r(n)&&!n.isDestroyed()&&n.vertexArrayDestroyable&&n.destroy(),r(this._vao)&&this._context.glDeleteVertexArray(this._vao),o(this)},_}),define("Scene/BatchTable",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/combine","../Core/ComponentDatatype","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/FeatureDetection","../Core/Math","../Core/PixelFormat","../Renderer/ContextLimits","../Renderer/PixelDatatype","../Renderer/Sampler","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g){"use strict";function v(t,r,n){if(this._attributes=r,this._numberO
h.setBatchedAttribute(_,o,b.low),!i.scene3DOnly){var S=d.cartesianToCartographic(y,Pe),T=u.project(S,De);b=f.fromCartesian(T,xe),h.setBatchedAttribute(_,a,b.high),h.setBatchedAttribute(_,s,b.low)}h.setBatchedAttribute(_,l,C)}}t._batchTableBoundingSpheresUpdated=!0}}function se(t,r){if(c(t._batchTableAttributeIndices.offset)&&!t._batchTableOffsetsUpdated&&!r.scene3DOnly){for(var n=t._batchTableOffsetAttribute2DIndex,o=r.mapProjection,a=o.ellipsoid,s=t._batchTable,l=t._instanceBoundingSpheres,u=l.length,d=0;d<u;++d){var h=l[d];if(c(h)){var p=s.getBatchedAttribute(d,t._batchTableAttributeIndices.offset);if(i.equals(p,i.ZERO))s.setBatchedAttribute(d,n,i.ZERO);else{var f=t.modelMatrix;c(f)&&(h=e.transform(h,f,Ie));var m=h.center;m=a.scaleToGeodeticSurface(m,Re);var _=a.cartesianToCartographic(m,Pe),g=o.project(_,De),v=i.add(p,m,Me);_=a.cartesianToCartographic(v,_);var y=o.project(_,Me),C=i.subtract(y,g,Me),b=C.x;C.x=C.z,C.z=C.y,C.y=b,s.setBatchedAttribute(d,n,C)}}}t._batchTableOffsetsUpdated=!0}}function le(t,i){for(var r=t._attributeLocations,n=t._geometries,o=i.scene3DOnly,a=i.context,s=[],l=n.length,u=0;u<l;++u){var d=n[u];if(s.push(L.fromGeometry({context:a,geometry:d,attributeLocations:r,bufferUsage:x.STATIC_DRAW,interleave:t._interleave})),c(t._createBoundingVolumeFunction))t._createBoundingVolumeFunction(i,d);else if(t._boundingSpheres.push(e.clone(d.boundingSphere)),t._boundingSphereWC.push(new e),!o){var h=d.boundingSphereCV.center,p=h.x,f=h.y,m=h.z;h.x=m,h.y=p,h.z=f,t._boundingSphereCV.push(e.clone(d.boundingSphereCV)),t._boundingSphere2D.push(new e),t._boundingSphereMorph.push(new e)}}t._va=s,t._primitiveType=n[0].primitiveType,t.releaseGeometryInstances&&(t.geometryInstances=void 0),t._geometries=void 0,ye(t,i,V.COMPLETE,void 0)}function ue(e,t,i,r){var n,a=i.getRenderState();r?(n=o(a,!1),n.cull={enabled:!0,face:B.BACK},e._frontFaceRS=M.fromCache(n),n.cull.face=B.FRONT,e._backFaceRS=M.fromCache(n)):(e._frontFaceRS=M.fromCache(a),e._backFaceRS=e._frontFaceRS),n=o(a,!1),c(e._depthFailAppearance)&&(n.depthTest.enabled=!1),c(e._depthFailAppearance)&&(a=e._depthFailAppearance.getRenderState(),n=o(a,!1),n.depthTest.func=z.GREATER,r?(n.cull={enabled:!0,face:B.BACK},e._frontFaceDepthFailRS=M.fromCache(n),n.cull.face=B.FRONT,e._backFaceDepthFailRS=M.fromCache(n)):(e._frontFaceDepthFailRS=M.fromCache(n),e._backFaceDepthFailRS=e._frontFaceRS))}function ce(e,t,i){var r=t.context,n=e._attributeLocations,o=e._batchTable.getVertexShaderCallback()(i.vertexShaderSource);o=H._appendOffsetToShader(e,o),o=H._appendShowToShader(e,o),o=H._appendDistanceDisplayConditionToShader(e,o,t.scene3DOnly),o=Z(o),o=H._updateColorAttribute(e,o,!1),o=J(e,o),o=H._modifyShaderPosition(e,o,t.scene3DOnly);var a=i.getFragmentShaderSource();a=K(a),e._sp=R.replaceCache({context:r,shaderProgram:e._sp,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),te(e._sp,n),c(e._depthFailAppearance)&&(o=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),o=H._appendShowToShader(e,o),o=H._appendDistanceDisplayConditionToShader(e,o,t.scene3DOnly),o=Z(o),o=H._updateColorAttribute(e,o,!0),o=J(e,o),o=H._modifyShaderPosition(e,o,t.scene3DOnly),o=$(o),a=e._depthFailAppearance.getFragmentShaderSource(),a=K(a),a=ee(a),e._spDepthFail=R.replaceCache({context:r,shaderProgram:e._spDepthFail,vertexShaderSource:o,fragmentShaderSource:a,attributeLocations:n}),te(e._spDepthFail,n))}function de(e,t,i,r){var n=c(i)?i._uniforms:void 0,o={},a=t.uniforms;if(c(a))for(var l in a)a.hasOwnProperty(l)&&(o[l]=ie(a,l));var u=s(o,n);return u=e._batchTable.getUniformMapCallback()(u),c(e.rtcCenter)&&(u.u_modifiedModelView=function(){var t=r.context.uniformState.view;return S.multiply(t,e._modelMatrix,Oe),S.multiplyByPoint(Oe,e.rtcCenter,Le),S.setTranslation(Oe,Le,Oe),Oe}),u}function he(e,t,i,r,n,o,a,s){var l,u=de(e,t,i,s);c(e._depthFailAppearance)&&(l=de(e,e._depthFailAppearance,e._depthFailAppearance.material,s));var d=r?I.TRANSLUCENT:I.OPAQUE,h=n?2:1;h*=c(e._depthFailAppearance)?2:1,o.length=e._va.length*h;for(var p=o.length,f=0,m=0;m<p;++m){var _;n&
this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance;var n;r(t)&&l(t)&&t.length>1&&(n=z),this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:i(e.vertexCacheOptimize,!1),interleave:i(e.interleave,!1),releaseGeometryInstances:i(e.releaseGeometryInstances,!0),allowPicking:i(e.allowPicking,!0),asynchronous:i(e.asynchronous,!0),compressVertices:i(e.compressVertices,!0),_readOnlyInstanceAttributes:n,_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function x(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:E.ALWAYS,frontOperation:{fail:w.KEEP,zFail:w.DECREMENT_WRAP,zPass:w.DECREMENT_WRAP},backFunction:E.ALWAYS,backOperation:{fail:w.KEEP,zFail:w.INCREMENT_WRAP,zPass:w.INCREMENT_WRAP},reference:V,mask:k},depthTest:{enabled:!1},depthMask:!1}}function P(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:E.ALWAYS,frontOperation:{fail:w.KEEP,zFail:w.KEEP,zPass:w.INCREMENT_WRAP},backFunction:E.ALWAYS,backOperation:{fail:w.KEEP,zFail:w.KEEP,zPass:w.DECREMENT_WRAP},reference:V,mask:k},depthTest:{enabled:!0,func:y.LESS_OR_EQUAL},depthMask:!1}}function D(e){return{stencilTest:{enabled:e,frontFunction:E.NOT_EQUAL,frontOperation:{fail:w.KEEP,zFail:w.KEEP,zPass:w.DECREMENT_WRAP},backFunction:E.NOT_EQUAL,backOperation:{fail:w.KEEP,zFail:w.KEEP,zPass:w.DECREMENT_WRAP},reference:V,mask:k},depthTest:{enabled:!1},depthMask:!1,blending:g.ALPHA_BLEND}}function I(e,t,i,n){if(!r(e._rsStencilPreloadPass)){var o=!e.debugShowShadowVolume;e._rsStencilPreloadPass=d.fromCache(x(o)),e._rsStencilDepthPass=d.fromCache(P(o)),e._rsColorPass=d.fromCache(D(o)),e._rsPickPass=d.fromCache(U)}}function M(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i=t;i=i.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),i=p.replaceMain(i,"czm_non_compressed_main");return["attribute vec2 compressedAttributes;","vec3 extrudeDirection;\n",i,"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}function R(e,t){var i=t.context,n=e._primitive,o=m;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=b._appendDistanceDisplayConditionToShader(n,o),o=b._modifyShaderPosition(e,o,t.scene3DOnly),o=b._updateColorAttribute(n,o);var a=e._hasPlanarExtentsAttributes,s=a||e._hasSphericalExtentsAttribute;e._extruded&&(o=M(n,o));var l=e._extruded?"EXTRUDED_GEOMETRY":"",u="ENABLE_GL_POSITION_LOG_DEPTH_AT_HEIGHT",c=new p({defines:[l,u],sources:[o]}),d=new p({sources:[f]}),_=e._primitive._attributeLocations,g=new T(s,a,e.appearance);if(e._spStencil=h.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:_}),e._primitive.allowPicking){var v=p.createPickVertexShaderSource(o);v=b._appendShowToShader(n,v),v=b._updatePickColorAttribute(v);var y=g.createPickFragmentShader(!1),C=g.createPickVertexShader([l,u],v,!1,t.mapProjection);if(e._spPick=h.replaceCache({context:i,shaderProgram:e._spPick,vertexShaderSource:C,fragmentShaderSource:y,attributeLocations:_}),s){var S=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!r(S)){var E=g.createPickFragmentShader(!0),w=g.createPickVertexShader([l,u],v,!0,t.mapProjection);S=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:w,fragmentShaderSource:E,attributeLocations:_})}e._spPick2D=S}}else e._spPick=h.fromCache({context:i,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:_});o=b._appendShowToShader(n,o),c=new p({defines:[l,u],sources:[o]}),e._sp=h.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:c
;return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\nattribute float batchId;\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\nvoid main()\n{\nv_batchId = batchId;\nvec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\nvec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\nvec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nvec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nvec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec4 startPlane2D;\nvec4 startPlane3D;\nstartPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\nstartPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\nstartPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\nstartPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\nvec4 rightPlane2D;\nvec4 rightPlane3D;\nrightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\nrightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\nrightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\nrightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\nposRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\nposRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\nposRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\nposEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\nposEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\nvec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\nvec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\nvec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\nvec4 endPlane2D;\nvec4 endPlane3D;\nendPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\nendPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\nendPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\nendPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\nv_forwardDirectionEC = normalize(endEC - startEC);\nvec2 cleanTexcoordNormalization2D;\ncleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\ncleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\nvec2 cleanTexcoordNormalization3D;\ncleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\ncleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\ncleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\nv_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n#ifdef PER_INSTANCE_COLOR\nv_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\nv_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\nv_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n#ifdef WIDTH_VARYING\nfloat width = czm_batchTable_width(batchId);\nfloat halfWidth = width
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._definitionChanged=new n,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),positions:a("positions"),height:a("height"),heightReference:a("heightReference"),extrudedHeight:a("extrudedHeight"),extrudedHeightReference:a("extrudedHeightReference"),granularity:a("granularity"),width:a("width"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),cornerType:a("cornerType"),shadows:a("shadows"),distanceDisplayCondition:a("distanceDisplayCondition"),classificationType:a("classificationType"),zIndex:a("zIndex")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.positions=this.positions,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.granularity=this.granularity,e.width=this.width,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.cornerType=this.cornerType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.positions=e(this.positions,t.positions),this.height=e(this.height,t.height),this.heightReference=e(this.heightReference,t.heightReference),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.extrudedHeightReference=e(this.extrudedHeightReference,t.extrudedHeightReference),this.granularity=e(this.granularity,t.granularity),this.width=e(this.width,t.width),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.cornerType=e(this.cornerType,t.cornerType),this.shadows=e(this.shadows,t.shadows),this.distanceDisplayCondition=e(this.distanceDisplayCondition,t.distanceDisplayCondition),this.classificationType=e(this.classificationType,t.classificationType),this.zIndex=e(this.zIndex,t.zIndex)},s}),define("DataSources/createRawPropertyDescriptor",["./createPropertyDescriptor"],function(e){"use strict";function t(e){return e}function i(i,r){return e(i,r,t)}return i}),define("DataSources/CylinderGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,r,n,o,a){"use strict";function s(t){this._heightReference=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._numberOfVerticalLines=void 0,this._numberOfVerticalLinesSubscription=void 0,this._slices=void 0,this._slicesSubscription=void 0,this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._fill=void 0,this._fillSubscription=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._definitionChanged=new n,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},heightReference:a("heightReference"),length:a("length"),topRadius:a("topRadius"),bottomRadius:a("bottomRadius"),numberOfVerticalLines:a("numberOfVerticalLines"),slices:a("slices"),show:a("show"),material:o("material"),fil
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._definitionChanged=new n,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),hierarchy:a("hierarchy"),height:a("height"),heightReference:a("heightReference"),extrudedHeight:a("extrudedHeight"),extrudedHeightReference:a("extrudedHeightReference"),granularity:a("granularity"),stRotation:a("stRotation"),fill:a("fill"),outline:a("outline"),outlineColor:a("outlineColor"),outlineWidth:a("outlineWidth"),perPositionHeight:a("perPositionHeight"),closeTop:a("closeTop"),closeBottom:a("closeBottom"),shadows:a("shadows"),distanceDisplayCondition:a("distanceDisplayCondition"),classificationType:a("classificationType"),zIndex:a("zIndex")}),s.prototype.clone=function(e){return t(e)?(e.show=this.show,e.material=this.material,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.granularity=this.granularity,e.stRotation=this.stRotation,e.fill=this.fill,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new s(this)},s.prototype.merge=function(t){this.show=e(this.show,t.show),this.material=e(this.material,t.material),this.hierarchy=e(this.hierarchy,t.hierarchy),this.height=e(this.height,t.height),this.heightReference=e(this.heightReference,t.heightReference),this.extrudedHeight=e(this.extrudedHeight,t.extrudedHeight),this.extrudedHeightReference=e(this.extrudedHeightReference,t.extrudedHeightReference),this.granularity=e(this.granularity,t.granularity),this.stRotation=e(this.stRotation,t.stRotation),this.fill=e(this.fill,t.fill),this.outline=e(this.outline,t.outline),this.outlineColor=e(this.outlineColor,t.outlineColor),this.outlineWidth=e(this.outlineWidth,t.outlineWidth),this.perPositionHeight=e(this.perPositionHeight,t.perPositionHeight),this.closeTop=e(this.closeTop,t.closeTop),this.closeBottom=e(this.closeBottom,t.closeBottom),this.shadows=e(this.shadows,t.shadows),this.distanceDisplayCondition=e(this.distanceDisplayCondition,t.distanceDisplayCondition),this.classificationType=e(this.classificationType,t.classificationType),this.zIndex=e(this.zIndex,t.zIndex)},s}),define("DataSources/PolylineGraphics",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","./createMaterialPropertyDescriptor","./createPropertyDescriptor"],function(e,t,i,r,n,o,a){"use strict";function s(t){this._show=void 0,this._showSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._depthFailMaterial=void 0,this._depthFailMaterialSubscription=void 0,this._positions=void 0,this._positionsSubscription=void 0,this._followSurface=void 0,this._followSurfaceSubscription=void 0,this._clampToGround=void 0,this._clampToGroundSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._widthSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this._definitionChanged=new n,this.merge(e(t,e.EMPTY_OBJECT))}return i(s.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:a("show"),material:o("material"),depthFailMaterial:o("depthFailMaterial"),positions:a("positions"),width:a("width"),followSurface:a("followSurface"),clampToGround:a("clampToGround"),granularity:a("granularity")
u.DONE):i(o)&&!o.ready||i(a)&&!a.ready?u.PENDING:u.FAILED},p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){var e=this._primitives,t=this._orderedGroundPrimitives;this._geometryUpdater._onTerrain?t.remove(this._primitive):e.removeAndDestroy(this._primitive),e.removeAndDestroy(this._outlinePrimitive),r(this)},p}),define("DataSources/BoxGeometryUpdater",["../Core/BoxGeometry","../Core/BoxOutlineGeometry","../Core/Cartesian3","../Core/Check","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/DistanceDisplayConditionGeometryInstanceAttribute","../Core/GeometryInstance","../Core/GeometryOffsetAttribute","../Core/Iso8601","../Core/OffsetGeometryInstanceAttribute","../Core/ShowGeometryInstanceAttribute","../Scene/HeightReference","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","./heightReferenceOnEntityPropertyChanged","./ColorMaterialProperty","./DynamicGeometryUpdater","./GeometryUpdater","./Property"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S){"use strict";function T(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function E(e,t){b.call(this,{entity:e,scene:t,geometryOptions:new T(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function w(e,t,i){C.call(this,e,t,i)}var A=i.ZERO,x=new i,P=new i,D=new n;return a(Object.create)&&(E.prototype=Object.create(b.prototype),E.prototype.constructor=E),s(E.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),E.prototype.createFillGeometryInstance=function(t){var i=this._entity,r=i.isAvailable(t),s=new f(r&&i.isShowing&&this._showProperty.getValue(t)&&this._fillProperty.getValue(t)),l=this._distanceDisplayConditionProperty.getValue(t),d=u.fromDistanceDisplayCondition(l),h={show:s,distanceDisplayCondition:d,color:void 0,offset:void 0};if(this._materialProperty instanceof y){var m;a(this._materialProperty.color)&&(this._materialProperty.color.isConstant||r)&&(m=this._materialProperty.color.getValue(t,D)),a(m)||(m=n.WHITE),h.color=o.fromColor(m)}return a(this._options.offsetAttribute)&&(h.offset=p.fromCartesian3(S.getValueOrDefault(this._terrainOffsetProperty,t,A,x))),new c({id:i,geometry:e.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(t,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:h})},E.prototype.createOutlineGeometryInstance=function(e){var i=this._entity,r=i.isAvailable(e),s=S.getValueOrDefault(this._outlineColorProperty,e,n.BLACK,D),l=this._distanceDisplayConditionProperty.getValue(e),d={show:new f(r&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o.fromColor(s),distanceDisplayCondition:u.fromDistanceDisplayCondition(l),offset:void 0};return a(this._options.offsetAttribute)&&(d.offset=p.fromCartesian3(S.getValueOrDefault(this._terrainOffsetProperty,e,A,x))),new c({id:i,geometry:t.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:d})},E.prototype._computeCenter=function(e,t){return S.getValueOrUndefined(this._entity.position,e,t)},E.prototype._isHidden=function(e,t){return!a(t.dimensions)||!a(e.position)||b.prototype._isHidden.call(this,e,t)},E.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&S.isConstant(e.orientation)&&t.dimensions.isConstant&&S.isConstant(t.outlineWidth))},E.prototype._setStaticOptions=function(e,t){var i=S.getValueOrDefault(t.heightReference,h.MINIMUM_VALUE,m.NONE),r=this._options;r.vertexFormat=this._materialProperty instanceof y?g.VERTEX_FORMAT:_.MaterialSupport.TEXTURED.vertexFormat,r.dimensions=t.dimensions.getValue(h.MINIMUM_VALUE,r.dimensions),r.offsetAttribute=i!==m.NONE?d.ALL:void 0},E.prototype._onEntityPropertyChanged=v,E.DynamicGeometryUpdater=w,a(Object.c
e._dirty=!0)}var S=C.SHOW_INDEX=0,T=C.POSITION_INDEX=1,E=C.PIXEL_OFFSET_INDEX=2,w=C.EYE_OFFSET_INDEX=3,A=C.HORIZONTAL_ORIGIN_INDEX=4,x=C.VERTICAL_ORIGIN_INDEX=5,P=C.SCALE_INDEX=6,D=C.IMAGE_INDEX_INDEX=7,I=C.COLOR_INDEX=8,M=C.ROTATION_INDEX=9,R=C.ALIGNED_AXIS_INDEX=10,O=C.SCALE_BY_DISTANCE_INDEX=11,L=C.TRANSLUCENCY_BY_DISTANCE_INDEX=12,N=C.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,F=C.DISTANCE_DISPLAY_CONDITION=14,B=C.DISABLE_DEPTH_DISTANCE=15;C.TEXTURE_COORDINATE_BOUNDS=16,C.NUMBER_OF_PROPERTIES=17,u(C.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,b(this,S))}},position:{get:function(){return this._position},set:function(e){var t=this._position;i.equals(t,e)||(i.clone(e,t),i.clone(e,this._actualPosition),this._updateClamping(),b(this,T))}},heightReference:{get:function(){return this._heightReference},set:function(e){e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),b(this,T))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var i=this._pixelOffset;t.equals(i,e)||(t.clone(e,i),b(this,E))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;p.equals(t,e)||(this._scaleByDistance=p.clone(e,t),b(this,O))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;p.equals(t,e)||(this._translucencyByDistance=p.clone(e,t),b(this,L))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;p.equals(t,e)||(this._pixelOffsetScaleByDistance=p.clone(e,t),b(this,N))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;i.equals(t,e)||(i.clone(e,t),b(this,w))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,b(this,A))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,b(this,x))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,b(this,P))}},color:{get:function(){return this._color},set:function(e){var t=this._color;o.equals(t,e)||(o.clone(e,t),b(this,I))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,b(this,M))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){var t=this._alignedAxis;i.equals(t,e)||(i.clone(e,t),b(this,R))}},width:{get:function(){return s(this._width,this._imageWidth)},set:function(e){this._width!==e&&(this._width=e,b(this,D))}},height:{get:function(){return s(this._height,this._imageHeight)},set:function(e){this._height!==e&&(this._height=e,b(this,D))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,b(this,I))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){d.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=d.clone(e,this._distanceDisplayCondition),b(this,F))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,b(this,B))}},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._imageId},set:function(e){l(e)?"string"==typeof e?this.setImage(e,e):e instanceof f?this.setImage(e.url,e):l(e.src)?this.setImage(e.src,e):this.setImage(a(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,b(this,D))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualCla
stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),d.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},d.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},d.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},d.prototype.getColorTexture=function(e){return this._colorTextures[e]},d.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]},d.prototype.isDestroyed=function(){return!1},d.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,r=t.length;e<r;++e){var o=t[e];i(o)&&o.destroy()}var a=this._colorRenderbuffers;for(r=a.length,e=0;e<r;++e){var s=a[e];i(s)&&s.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),n(this)},d}),define("Scene/TextureAtlas",["../Core/BoundingRectangle","../Core/Cartesian2","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/PixelFormat","../Core/Resource","../Core/RuntimeError","../Renderer/Framebuffer","../Renderer/Texture","../ThirdParty/when"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p){"use strict";function f(e,i,n,o,a){this.bottomLeft=r(e,t.ZERO),this.topRight=r(i,t.ZERO),this.childNode1=n,this.childNode2=o,this.imageIndex=a}function m(e){e=r(e,r.EMPTY_OBJECT);var t=r(e.borderWidthInPixels,1),n=r(e.initialSize,y);this._context=e.context,this._pixelFormat=r(e.pixelFormat,l.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=i(),this._idHash={},this._initialSize=n,this._root=void 0}function _(e,i){var r=e._context,o=e.numberOfImages,a=e._borderWidthInPixels;if(o>0){for(var s=e._texture.width,l=e._texture.height,u=2*(s+i.width+a),c=2*(l+i.height+a),p=s/u,m=l/c,_=new f(new t(s+a,a),new t(u,l)),g=new f(new t,new t(u,l),e._root,_),v=new f(new t(a,l+a),new t(u,c)),y=new f(new t,new t(u,c),g,v),C=0;C<e._textureCoordinates.length;C++){var b=e._textureCoordinates[C];n(b)&&(b.x*=p,b.y*=m,b.width*=p,b.height*=m)}var S=new h({context:e._context,width:u,height:c,pixelFormat:e._pixelFormat}),T=new d({context:r,colorTextures:[e._texture],destroyAttachments:!1});T._bind(),S.copyFromFramebuffer(0,0,0,0,u,c),T._unBind(),T.destroy(),e._texture=e._texture&&e._texture.destroy(),e._texture=S,e._root=y}else{var E=2*(i.width+2*a),w=2*(i.height+2*a);E<e._initialSize.x&&(E=e._initialSize.x),w<e._initialSize.y&&(w=e._initialSize.y),e._texture=e._texture&&e._texture.destroy(),e._texture=new h({context:e._context,width:E,height:w,pixelFormat:e._pixelFormat}),e._root=new f(new t(a,a),new t(E,w))}}function g(e,i,r){if(n(i)){if(!n(i.childNode1)&&!n(i.childNode2)){if(n(i.imageIndex))return;var o=i.topRight.x-i.bottomLeft.x,a=i.topRight.y-i.bottomLeft.y,s=o-r.width,l=a-r.height;if(s<0||l<0)return;if(0===s&&0===l)return i;if(s>l){i.childNode1=new f(new t(i.bottomLeft.x,i.bottomLeft.y),new t(i.bottomLeft.x+r.width,i.topRight.y));var u=i.bottomLeft.x+r.width+e._borderWidthInPixels;u<i.topRight.x&&(i.childNode2=new f(new t(u,i.bottomLeft.y),new t(i.topRight.x,i.topRight.y)))}else{i.childNode1=new f(new t(i.bottomLeft.x,i.bottomLeft.y),new t(i.topRight.x,i.bottomLeft.y+r.height));var c=i.bottomLeft.y+r.height+e._borderWidthInPixels;c<i.topRight.y&&(i.childNode2=new f(new t(i.bottomLeft.x,c),new t(i.topRi
s=l.length):c.Type!==E.WEAK&&c.Type!==E.BRACKETS||(u>0&&a[u-1].Type===E.RTL?a.length>u+1?a[u+1].Type===E.RTL?l=b(l,s,d):(l+=c.Word,s=l.length):l+=c.Word:(l+=c.Word,s=l.length))}i+=l,r<t.length-1&&(i+="\n")}return i}var E=u({LTR:0,RTL:1,WEAK:2,BRACKETS:3});a(v.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;o(n)&&(n.show=e)}var a=this._backgroundBillboard;o(a)&&(a.show=e)}}},position:{get:function(){return this._position},set:function(e){var t=this._position;if(!i.equals(t,e)){i.clone(e,t);for(var r=this._glyphs,n=0,a=r.length;n<a;n++){var s=r[n].billboard;o(s)&&(s.position=e)}var l=this._backgroundBillboard;o(l)&&(l.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;for(var t=this._glyphs,i=0,r=t.length;i<r;i++){var n=t[i].billboard;o(n)&&(n.heightReference=e)}var a=this._backgroundBillboard;o(a)&&(a.heightReference=e),g(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){this._text!==e&&(this._text=e,this._renderedText=v.enableRightToLeftDetection?T(e):e,_(this))}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,_(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){var t=this._fillColor;r.equals(t,e)||(r.clone(e,t),_(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){var t=this._outlineColor;r.equals(t,e)||(r.clone(e,t),_(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,_(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,_(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){var t=this._backgroundColor;if(!r.equals(t,e)){r.clone(e,t);var i=this._backgroundBillboard;o(i)&&(i.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){var i=this._backgroundPadding;t.equals(i,e)||(t.clone(e,i),g(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,_(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){var i=this._pixelOffset;if(!t.equals(i,e)){t.clone(e,i);for(var r=this._glyphs,n=0,a=r.length;n<a;n++){var s=r[n];o(s.billboard)&&(s.billboard.pixelOffset=e)}var l=this._backgroundBillboard;o(l)&&(l.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){var t=this._translucencyByDistance;if(!c.equals(t,e)){this._translucencyByDistance=c.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];o(a.billboard)&&(a.billboard.translucencyByDistance=e)}var s=this._backgroundBillboard;o(s)&&(s.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){var t=this._pixelOffsetScaleByDistance;if(!c.equals(t,e)){this._pixelOffsetScaleByDistance=c.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];o(a.billboard)&&(a.billboard.pixelOffsetScaleByDistance=e)}var s=this._backgroundBillboard;o(s)&&(s.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){var t=this._scaleByDistance;if(!c.equals(t,e)){this._scaleByDistance=c.clone(e,t);for(var i=this._glyphs,r=0,n=i.length;r<n;r++){var a=i[r];o(a.billboard)&&(a.billboard.scaleByDistance=e)}var s=this._backgroundBillboard;o(s)&&(s.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){var t=this._eyeOffset;if(!i.equals(t,e)){i.clone(e,t);for(var r=this._glyphs,n=0,a=r.length;n<a;n++){var s=r[n];o(s.billboard)&&(s.billboard.eyeOffset=e)}var l=this._backgroundBillboard;o(l)&&(l.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(
var o=r._index,a=i[K.distanceDisplayConditionAndDisableDepth],s=0,l=Number.MAX_VALUE,u=r.distanceDisplayCondition;n(u)&&(s=u.near,l=u.far,s*=s,l*=l,e._shaderDistanceDisplayCondition=!0);var c=r.disableDepthTestDistance;c*=c,c>0&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1)),a(o,s,l,c)}function F(e,t,i,r){M(e,t,i,r),R(e,t,i,r),O(e,t,i,r),L(e,t,i,r),N(e,t,i,r)}function B(t,i,r,o,a,s){var l;o.mode===A.SCENE3D?(l=t._baseVolume,t._boundingVolumeDirty=!0):l=t._baseVolume2D;for(var u=[],c=0;c<r;++c){var d=i[c],h=d.position,p=w._computeActualPosition(h,o,a);n(p)&&(d._setActualPosition(p),s?u.push(p):e.expand(l,p,l))}s&&e.fromPoints(u,l)}function z(e,t){var i=t.mode,r=e._pointPrimitives,n=e._pointPrimitivesToUpdate,o=e._modelMatrix;e._createVertexArray||e._mode!==i||i!==A.SCENE3D&&!c.equals(o,e.modelMatrix)?(e._mode=i,c.clone(e.modelMatrix,o),e._createVertexArray=!0,i!==A.SCENE3D&&i!==A.SCENE2D&&i!==A.COLUMBUS_VIEW||B(e,r,r.length,t,o,!0)):i===A.MORPHING?B(e,r,r.length,t,o,!0):i!==A.SCENE2D&&i!==A.COLUMBUS_VIEW||B(e,n,e._pointPrimitivesToUpdateIndex,t,o,!1)}function k(e,t,i){var r=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight),n=r*e._maxPixelSize;i.radius+=n}var V=w.SHOW_INDEX,U=w.POSITION_INDEX,G=w.COLOR_INDEX,H=w.OUTLINE_COLOR_INDEX,W=w.OUTLINE_WIDTH_INDEX,q=w.PIXEL_SIZE_INDEX,Y=w.SCALE_BY_DISTANCE_INDEX,j=w.TRANSLUCENCY_BY_DISTANCE_INDEX,X=w.DISTANCE_DISPLAY_CONDITION_INDEX,Q=w.DISABLE_DEPTH_DISTANCE_INDEX,Z=w.NUMBER_OF_PROPERTIES,K={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepth:5};o(x.prototype,{length:{get:function(){return D(this),this._pointPrimitives.length}}}),x.prototype.add=function(e){var t=new w(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t},x.prototype.remove=function(e){return!!this.contains(e)&&(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0)},x.prototype.removeAll=function(){P(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0},x.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]},x.prototype.contains=function(e){return n(e)&&e._pointPrimitiveCollection===this},x.prototype.get=function(e){return D(this),this._pointPrimitives[e]},x.prototype.computeNewBuffersUsage=function(){for(var e=this._buffersUsage,t=!1,i=this._propertiesChanged,r=0;r<Z;++r){var n=0===i[r]?p.STATIC_DRAW:p.STREAM_DRAW;t=t||e[r]!==n,e[r]=n}return t};var J=new l,$=65536,ee=256,te=[];return x.prototype.update=function(t){D(this),this._maxTotalPointSize=f.maximumAliasedPointSize,z(this,t);var i,r=this._pointPrimitives,o=r.length,a=this._pointPrimitivesToUpdate,s=this._pointPrimitivesToUpdateIndex,l=this._propertiesChanged,u=this._createVertexArray,p=t.context,C=t.passes,w=C.pick;if(u||!w&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(var x=0;x<Z;++x)l[x]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),o>0){this._vaf=I(p,o,this._buffersUsage),i=this._vaf.writers;for(var P=0;P<o;++P){var B=this._pointPrimitives[P];B._dirty=!1,F(this,p,i,B)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(s>0){var J=te;J.length=0,(l[U]||l[W]||l[q])&&J.push(M),(l[G]||l[H])&&J.push(R),(l[V]||l[j])&&J.push(O),l[Y]&&J.push(L),(l[X]||l[Q])&&J.push(N);var $=J.length;if(i=this._vaf.writers,s/o>.1){for(var ee=0;ee<s;++ee){var ie=a[ee];ie._dirty=!1;for(var re=0;re<$;++re)J[re](this,p,i,ie)}this._vaf.commit()}else{for(var ne=0;ne<s;++ne){var oe=a[ne];oe._dirty=!1;for(var ae=0;ae<$;++ae)J[ae](this,p,i,oe);this._vaf.subCommit(oe._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(s>1.5*o&&(a.length=o),n(this._vaf)&&n(this._vaf.va)){this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,e.transform(this._
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}var l=e.WHITE,u=e.TRANSPARENT;return r(s.prototype,{isConstant:{get:function(){return a.isConstant(this._color)&&a.isConstant(this._gapColor)&&a.isConstant(this._dashLength)&&a.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),gapColor:o("gapColor"),dashLength:o("dashLength"),dashPattern:o("dashPattern")}),s.prototype.getType=function(e){return"PolylineDash"},s.prototype.getValue=function(e,t){return i(t)||(t={}),t.color=a.getValueOrClonedDefault(this._color,e,l,t.color),t.gapColor=a.getValueOrClonedDefault(this._gapColor,e,u,t.gapColor),t.dashLength=a.getValueOrDefault(this._dashLength,e,16,t.dashLength),t.dashPattern=a.getValueOrDefault(this._dashPattern,e,255,t.dashPattern),t},s.prototype.equals=function(e){return this===e||e instanceof s&&a.equals(this._color,e._color)&&a.equals(this._gapColor,e._gapColor)&&a.equals(this._dashLength,e._dashLength)&&a.equals(this._dashPattern,e._dashPattern)},s}),define("DataSources/PolylineGlowMaterialProperty",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,r,n,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT),this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower}var l=e.WHITE;return r(s.prototype,{isConstant:{get:function(){return a.isConstant(this._color)&&a.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),glowPower:o("glowPower")}),s.prototype.getType=function(e){return"PolylineGlow"},s.prototype.getValue=function(e,t){return i(t)||(t={}),t.color=a.getValueOrClonedDefault(this._color,e,l,t.color),t.glowPower=a.getValueOrDefault(this._glowPower,e,.25,t.glowPower),t},s.prototype.equals=function(e){return this===e||e instanceof s&&a.equals(this._color,e._color)&&a.equals(this._glowPower,e._glowPower)},s}),define("DataSources/PolylineOutlineMaterialProperty",["../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/Event","./createPropertyDescriptor","./Property"],function(e,t,i,r,n,o,a){"use strict";function s(e){e=t(e,t.EMPTY_OBJECT),this._definitionChanged=new n,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}var l=e.WHITE,u=e.BLACK;return r(s.prototype,{isConstant:{get:function(){return a.isConstant(this._color)&&a.isConstant(this._outlineColor)&&a.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color"),outlineColor:o("outlineColor"),outlineWidth:o("outlineWidth")}),s.prototype.getType=function(e){return"PolylineOutline"},s.prototype.getValue=function(e,t){return i(t)||(t={}),t.color=a.getValueOrClonedDefault(this._color,e,l,t.color),t.outlineColor=a.getValueOrClonedDefault(this._outlineColor,e,u,t.outlineColor),t.outlineWidth=a.getValueOrDefault(this._outlineWidth,e,1),t},s.prototype.equals=function(e){return this===e||e instanceof s&&a.equals(this._color,e._color)&&a.equals(this._outlineColor,e._outlineColor)&&a.equals(this._outlineWidth,e._outlineWidth)},s}),define("DataSources/PositionPropertyArray",["../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/EventHelper","../Core/ReferenceFrame","./Property"],function(e,t,i,r,n,o,a,s){"use strict";function l(t,i){this._value=void 0,this._definitionChanged=new n,this._eventHelper=new o,this._referenceFrame=e(i,a.FIXED),this.setValue(t)}return i(l.prototype,{isConstant:{get:fun
return"boolean"==typeof r?Boolean:"number"==typeof r?Number:"string"==typeof r?String:r.hasOwnProperty("array")?Array:r.hasOwnProperty("boolean")?Boolean:r.hasOwnProperty("boundingRectangle")?e:r.hasOwnProperty("cartesian2")?t:r.hasOwnProperty("cartesian")||r.hasOwnProperty("spherical")||r.hasOwnProperty("cartographicRadians")||r.hasOwnProperty("cartographicDegrees")?i:r.hasOwnProperty("unitCartesian")||r.hasOwnProperty("unitSpherical")?Re:r.hasOwnProperty("rgba")||r.hasOwnProperty("rgbaf")?a:r.hasOwnProperty("colorBlendMode")?L:r.hasOwnProperty("cornerType")?s:r.hasOwnProperty("heightReference")?N:r.hasOwnProperty("horizontalOrigin")?F:r.hasOwnProperty("date")?b:r.hasOwnProperty("labelStyle")?B:r.hasOwnProperty("number")?Number:r.hasOwnProperty("nearFarScalar")?w:r.hasOwnProperty("distanceDisplayCondition")?p:r.hasOwnProperty("object")||r.hasOwnProperty("value")?Object:r.hasOwnProperty("unitQuaternion")?A:r.hasOwnProperty("shadowMode")?z:r.hasOwnProperty("string")?String:r.hasOwnProperty("stripeOrientation")?Ae:r.hasOwnProperty("wsen")||r.hasOwnProperty("wsenDegrees")?x:r.hasOwnProperty("uri")?V:r.hasOwnProperty("verticalOrigin")?k:Object}function Xe(r,n,o){switch(r){case Array:return n.array;case Boolean:return u(n.boolean,n);case e:return n.boundingRectangle;case t:return n.cartesian2;case i:return Ge(n);case Re:return We(n);case a:return Ne(n);case L:return L[u(n.colorBlendMode,n)];case s:return s[u(n.cornerType,n)];case N:return N[u(n.heightReference,n)];case F:return F[u(n.horizontalOrigin,n)];case Image:return Fe(n,o);case b:return b.fromIso8601(u(n.date,n));case B:return B[u(n.labelStyle,n)];case Number:return u(n.number,n);case w:return n.nearFarScalar;case p:return n.distanceDisplayCondition;case Object:return u(u(n.object,n.value),n);case A:return Ye(n);case Se:return u(n.number,n);case z:return z[u(u(n.shadowMode,n.shadows),n)];case String:return u(n.string,n);case Ae:return Ae[u(n.stripeOrientation,n)];case x:return Be(n);case V:return Fe(n,o);case k:return k[u(n.verticalOrigin,n)];default:throw new I(r)}}function Qe(e,t){var i=e.interpolationAlgorithm;(c(i)||c(e.interpolationDegree))&&t.setInterpolationOptions({interpolationAlgorithm:Gt[i],interpolationDegree:e.interpolationDegree});var r=e.forwardExtrapolationType;c(r)&&(t.forwardExtrapolationType=_[r]);var n=e.forwardExtrapolationDuration;c(n)&&(t.forwardExtrapolationDuration=n);var o=e.backwardExtrapolationType;c(o)&&(t.backwardExtrapolationType=_[o]);var a=e.backwardExtrapolationDuration;c(a)&&(t.backwardExtrapolationDuration=a)}function Ze(e,t,i,r,n,o,a){var s,l=r.interval;c(l)?(Ht.iso8601=l,s=R.fromIso8601(Ht),c(n)&&(s=R.intersect(s,n,Vt))):c(n)&&(s=n);var d,h,p,f,m=!c(r.reference)&&!c(r.velocityReference),_=c(s)&&!s.equals(C.MAXIMUM_INTERVAL);m&&(p=Xe(e,r,o),d=u(e.packedLength,1),f=u(p.length,1),h=!c(r.array)&&"string"!=typeof p&&f>d&&e!==Object);var g="function"==typeof e.unpack&&e!==Se;if(!h&&!_)return void(t[i]=m?new Q(g?e.unpack(p,0):p):Le(e,a,r));var v,y=t[i],S=r.epoch;if(c(S)&&(v=b.fromIso8601(S)),h&&!_)return y instanceof Ee||(y=new Ee(e),t[i]=y),y.addSamplesPackedArray(p,v),void Qe(r,y);var T;if(!h&&_)return s=s.clone(),s.data=m?g?e.unpack(p,0):p:Le(e,a,r),c(y)||(y=m?new Pe:new j,t[i]=y),void(m&&y instanceof Pe?y.intervals.addInterval(s):y instanceof j?(m&&(s.data=new Q(s.data)),y.intervals.addInterval(s)):(T=C.MAXIMUM_INTERVAL.clone(),T.data=y,y=new j,t[i]=y,y.intervals.addInterval(T),m&&(s.data=new Q(s.data)),y.intervals.addInterval(s)));c(y)||(y=new j,t[i]=y),y instanceof j||(T=C.MAXIMUM_INTERVAL.clone(),T.data=y,y=new j,t[i]=y,y.intervals.addInterval(T));var E=y.intervals;T=E.findInterval(s),c(T)&&T.data instanceof Ee||(T=s.clone(),T.data=new Ee(e),E.addInterval(T)),T.data.addSamplesPackedArray(p,v),Qe(r,T.data)}function Ke(e,t,i,r,n,o,a){if(c(r))if(y(r))for(var s=0,l=r.length;s<l;s++)Ze(e,t,i,r[s],n,o,a);else Ze(e,t,i,r,n,o,a)}function Je(e,t,r,n,o,a){var s,l=r.interval;c(l)?(Ht.iso8601=l,s=R.fromIso8601(Ht),c(n)&&(s=R.intersect(s,n,Vt))):c(n)&&(s=n);var d,h,p,f=!1,m=c(r.cartesianVelocity)?1:0,_=i.packedLength*(m+1),g=!c(r.reference),v=
define("DataSources/EllipseGeometryUpdater",["../Core/ApproximateTerrainHeights","../Core/Cartesian3","../Core/Check","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/DeveloperError","../Core/DistanceDisplayConditionGeometryInstanceAttribute","../Core/EllipseGeometry","../Core/EllipseOutlineGeometry","../Core/GeometryInstance","../Core/GeometryOffsetAttribute","../Core/Iso8601","../Core/OffsetGeometryInstanceAttribute","../Core/Rectangle","../Core/ShowGeometryInstanceAttribute","../Scene/GroundPrimitive","../Scene/HeightReference","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","./ColorMaterialProperty","./DynamicGeometryUpdater","./GeometryUpdater","./GroundGeometryUpdater","./Property"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E){"use strict";function w(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 A(e,t){T.call(this,{entity:e,scene:t,geometryOptions:new w(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function x(e,t,i){b.call(this,e,t,i)}var P=new r,D=t.ZERO,I=new t,M=new f;return o(Object.create)&&(A.prototype=Object.create(T.prototype),A.prototype.constructor=A),A.prototype.createFillGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),a={show:new m(i&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:s.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof C){var u;o(this._materialProperty.color)&&(this._materialProperty.color.isConstant||i)&&(u=this._materialProperty.color.getValue(e,P)),o(u)||(u=r.WHITE),a.color=n.fromColor(u)}return o(this._options.offsetAttribute)&&(a.offset=p.fromCartesian3(E.getValueOrDefault(this._terrainOffsetProperty,e,D,I))),new c({id:t,geometry:new l(this._options),attributes:a})},A.prototype.createOutlineGeometryInstance=function(e){var t=this._entity,i=t.isAvailable(e),a=E.getValueOrDefault(this._outlineColorProperty,e,r.BLACK,P),l=this._distanceDisplayConditionProperty.getValue(e),d={show:new m(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:n.fromColor(a),distanceDisplayCondition:s.fromDistanceDisplayCondition(l),offset:void 0};return o(this._options.offsetAttribute)&&(d.offset=p.fromCartesian3(E.getValueOrDefault(this._terrainOffsetProperty,e,D,I))),new c({id:t,geometry:new u(this._options),attributes:d})},A.prototype._computeCenter=function(e,t){return E.getValueOrUndefined(this._entity.position,e,t)},A.prototype._isHidden=function(e,t){var i=e.position;return!o(i)||!o(t.semiMajorAxis)||!o(t.semiMinorAxis)||S.prototype._isHidden.call(this,e,t)},A.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!E.isConstant(t.rotation)||!E.isConstant(t.height)||!E.isConstant(t.extrudedHeight)||!E.isConstant(t.granularity)||!E.isConstant(t.stRotation)||!E.isConstant(t.outlineWidth)||!E.isConstant(t.numberOfVerticalLines)||!E.isConstant(t.zIndex)||this._onTerrain&&!E.isConstant(this._materialProperty)},A.prototype._setStaticOptions=function(t,i){var r=E.getValueOrUndefined(i.height,h.MINIMUM_VALUE),n=E.getValueOrDefault(i.heightReference,h.MINIMUM_VALUE,g.NONE),a=E.getValueOrUndefined(i.extrudedHeight,h.MINIMUM_VALUE),s=E.getValueOrDefault(i.extrudedHeightReference,h.MINIMUM_VALUE,g.NONE);o(a)&&!o(r)&&(r=0);var u=this._options;u.vertexFormat=this._materialProperty instanceof C?y.VERTEX_FORMAT:v.MaterialSupport.TEXTURED.vertexFormat,u.center=t.position.getValue(h.MINIMUM_VALUE,u.center),u.semiMajorAxis=i.semiMajorAxis.getValue(h.MINIMUM_VALUE,u.semiMajorAxis),u.semiMinorAxis=i.semiMinorAxis.getValue(h.MINIMUM
geometry:new _(this._options),attributes:u})},P.prototype._computeCenter=function(e,t){var r=A.getValueOrUndefined(this._entity.rectangle.coordinates,e,L);if(a(r)){var n=f.center(r,N);return i.toCartesian(n,u.WGS84,t)}},P.prototype._isHidden=function(e,t){return!a(t.coordinates)||E.prototype._isHidden.call(this,e,t)},P.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!A.isConstant(t.height)||!A.isConstant(t.extrudedHeight)||!A.isConstant(t.granularity)||!A.isConstant(t.stRotation)||!A.isConstant(t.rotation)||!A.isConstant(t.outlineWidth)||!A.isConstant(t.zIndex)||this._onTerrain&&!A.isConstant(this._materialProperty)},P.prototype._setStaticOptions=function(t,i){var r=this._materialProperty instanceof S,n=A.getValueOrUndefined(i.height,h.MINIMUM_VALUE),o=A.getValueOrDefault(i.heightReference,h.MINIMUM_VALUE,y.NONE),s=A.getValueOrUndefined(i.extrudedHeight,h.MINIMUM_VALUE),l=A.getValueOrDefault(i.extrudedHeightReference,h.MINIMUM_VALUE,y.NONE);a(s)&&!a(n)&&(n=0);var u=this._options;u.vertexFormat=r?b.VERTEX_FORMAT:C.MaterialSupport.TEXTURED.vertexFormat,u.rectangle=i.coordinates.getValue(h.MINIMUM_VALUE,u.rectangle),u.granularity=A.getValueOrUndefined(i.granularity,h.MINIMUM_VALUE),u.stRotation=A.getValueOrUndefined(i.stRotation,h.MINIMUM_VALUE),u.rotation=A.getValueOrUndefined(i.rotation,h.MINIMUM_VALUE),u.offsetAttribute=w.computeGeometryOffsetAttribute(n,o,s,l),u.height=w.getGeometryHeight(n,o),s=w.getGeometryExtrudedHeight(s,l),s===w.CLAMP_TO_GROUND&&(s=e.getMinimumMaximumHeights(m.computeRectangle(u,O)).minimumTerrainHeight),u.extrudedHeight=s},P.DynamicGeometryUpdater=D,a(Object.create)&&(D.prototype=Object.create(T.prototype),D.prototype.constructor=D),D.prototype._isHidden=function(e,t,i){return!a(this._options.rectangle)||T.prototype._isHidden.call(this,e,t,i)},D.prototype._setOptions=function(t,i,r){var n=this._options,o=A.getValueOrUndefined(i.height,r),s=A.getValueOrDefault(i.heightReference,r,y.NONE),l=A.getValueOrUndefined(i.extrudedHeight,r),u=A.getValueOrDefault(i.extrudedHeightReference,r,y.NONE);a(l)&&!a(o)&&(o=0),n.rectangle=A.getValueOrUndefined(i.coordinates,r,n.rectangle),n.granularity=A.getValueOrUndefined(i.granularity,r),n.stRotation=A.getValueOrUndefined(i.stRotation,r),n.rotation=A.getValueOrUndefined(i.rotation,r),n.offsetAttribute=w.computeGeometryOffsetAttribute(o,s,l,u),n.height=w.getGeometryHeight(o,s),l=w.getGeometryExtrudedHeight(l,u),l===w.CLAMP_TO_GROUND&&(l=e.getMinimumMaximumHeights(m.computeRectangle(n,O)).minimumTerrainHeight),n.extrudedHeight=l},P}),define("DataSources/StaticGeometryColorBatch",["../Core/AssociativeArray","../Core/Cartesian3","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/DistanceDisplayCondition","../Core/DistanceDisplayConditionGeometryInstanceAttribute","../Core/OffsetGeometryInstanceAttribute","../Core/ShowGeometryInstanceAttribute","../Scene/Primitive","./BoundingSphereState","./ColorMaterialProperty","./MaterialProperty","./Property"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p){"use strict";function f(t,i,r,o,a,s,l){this.translucent=i,this.appearanceType=r,this.depthFailAppearanceType=o,this.depthFailMaterialProperty=a,this.depthFailMaterial=void 0,this.closed=s,this.shadows=l,this.primitives=t,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new e,this.updaters=new e,this.updatersWithAttributes=new e,this.attributes=new e,this.subscriptions=new e,this.showsUpdated=new e,this.itemsToRemove=[],this.invalidated=!1;var u;n(a)&&(u=a.definitionChanged.addEventListener(f.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=u}function m(e,t,i,r,n){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=i,this._closed=r,this._shadows=n}function _(e,t){for(var i=e.length,r=i-1;r>=0;r--){var n=e[r];if(n.remove(t))return 0===n.updaters.length&&(e.splice(r,1),n.destroy()),!0}return!1}function g(e,t,i){for(var r=!1,n=t.length,o=0;o<n;++o){var a=t[o],s=a.itemsToRemove,l=s.length;if(l>0)for(
;return this.itemsToRemove.length=f,p},p.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,r=0;r<i;r++){var o=t[r],a=this.geometry.get(o.id),s=this.attributes.get(a.id.id);n(s)||(s=e.getGeometryInstanceAttributes(a.id),this.attributes.set(a.id.id,s));var u=o.entity.isShowing;u!==(1===s.show[0])&&(s.show=l.toValue(u,s.show),a.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},p.prototype.contains=function(e){return this.updaters.contains(e.id)},p.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return d.PENDING;var r=i.getGeometryInstanceAttributes(e.entity);return!n(r)||!n(r.boundingSphere)||n(r.show)&&0===r.show[0]?d.FAILED:(r.boundingSphere.clone(t),d.DONE)},p.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;n(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;n(i)&&(e.remove(i),this.oldPrimitive=void 0)},f.prototype.add=function(e,t){var i,r,o=t.createOutlineGeometryInstance(e),a=this._scene.clampLineWidth(t.outlineWidth);255===o.attributes.color.value[3]?(i=this._solidBatches,r=i.get(a),n(r)||(r=new p(this._primitives,!1,a,this._shadows),i.set(a,r)),r.add(t,o)):(i=this._translucentBatches,r=i.get(a),n(r)||(r=new p(this._primitives,!0,a,this._shadows),i.set(a,r)),r.add(t,o))},f.prototype.remove=function(e){var t,i=this._solidBatches.values,r=i.length;for(t=0;t<r;t++)if(i[t].remove(e))return;var n=this._translucentBatches.values,o=n.length;for(t=0;t<o;t++)if(n[t].remove(e))return},f.prototype.update=function(e){var t,i,r,n,o,a=this._solidBatches.values,s=a.length,l=this._translucentBatches.values,u=l.length,c=!0,d=!1;do{for(d=!1,i=0;i<s;i++){n=a[i],c=n.update(e),o=n.itemsToRemove;var h=o.length;if(h>0)for(d=!0,t=0;t<h;t++)r=o[t],n.remove(r),this.add(e,r)}for(i=0;i<u;i++){n=l[i],c=n.update(e),o=n.itemsToRemove;var p=o.length;if(p>0)for(d=!0,t=0;t<p;t++)r=o[t],n.remove(r),this.add(e,r)}}while(d);return c},f.prototype.getBoundingSphere=function(e,t){var i,r=this._solidBatches.values,n=r.length;for(i=0;i<n;i++){var o=r[i];if(o.contains(e))return o.getBoundingSphere(e,t)}var a=this._translucentBatches.values,s=a.length;for(i=0;i<s;i++){var l=a[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return d.FAILED},f.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var r=this._translucentBatches.values,n=r.length;for(e=0;e<n;e++)r[e].removeAllPrimitives()},f}),define("DataSources/WallGeometryUpdater",["../Core/Check","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/defined","../Core/DeveloperError","../Core/DistanceDisplayConditionGeometryInstanceAttribute","../Core/GeometryInstance","../Core/Iso8601","../Core/ShowGeometryInstanceAttribute","../Core/WallGeometry","../Core/WallOutlineGeometry","../Scene/MaterialAppearance","../Scene/PerInstanceColorAppearance","./ColorMaterialProperty","./DynamicGeometryUpdater","./GeometryUpdater","./Property"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_){"use strict";function g(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 v(e,t){m.call(this,{entity:e,scene:t,geometryOptions:new g(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function y(e,t,i){f.call(this,e,t,i)}var C=new t;return r(Object.create)&&(v.prototype=Object.create(m.prototype),v.prototype.constructor=v),v.prototype.createFillGeometryInstance=function(e){var n,s,c=this._entity,d=c.isAvailable(e),h=new l(d&&c.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),f=this._distanceDisplayConditionProperty.getValue(e),m=o.fromDistanceDisplayCondition(f);if(this._materialProperty instanceof p){var _;r(this._materialProperty.color)&&(this._materialProperty.color.isConstant||d)&&(_=this._materialProperty.color.getValue(e,C)),r(_)||(_=t.WHITE),s=i.fromColor(_),n={show:h,distanc
define("ThirdParty/GltfPipeline/removeUnusedElements",["./ForEach","./hasExtension","../../Core/defined"],function(e,t,i){"use strict";function r(e){return n(e,"accessor"),n(e,"bufferView"),n(e,"buffer"),e}function n(e,t){var r=s[t],n=e[r];if(i(n))for(var l=0,u=a[t](e),c=n.length,d=0;d<c;++d)u[d]||(o[t](e,d-l),l++)}function o(){}function a(){}var s={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews"};return o.accessor=function(t,r){t.accessors.splice(r,1),e.mesh(t,function(t){e.meshPrimitive(t,function(t){e.meshPrimitiveAttribute(t,function(e,i){e>r&&t.attributes[i]--}),e.meshPrimitiveTarget(t,function(t){e.meshPrimitiveTargetAttribute(t,function(e,i){e>r&&t[i]--})});var n=t.indices;i(n)&&n>r&&t.indices--})}),e.skin(t,function(e){i(e.inverseBindMatrices)&&e.inverseBindMatrices>r&&e.inverseBindMatrices--}),e.animation(t,function(t){e.animationSampler(t,function(e){i(e.input)&&e.input>r&&e.input--,i(e.output)&&e.output>r&&e.output--})})},o.buffer=function(t,r){t.buffers.splice(r,1),e.bufferView(t,function(e){i(e.buffer)&&e.buffer>r&&e.buffer--})},o.bufferView=function(r,n){r.bufferViews.splice(n,1),e.accessor(r,function(e){i(e.bufferView)&&e.bufferView>n&&e.bufferView--}),e.shader(r,function(e){i(e.bufferView)&&e.bufferView>n&&e.bufferView--}),e.image(r,function(t){i(t.bufferView)&&t.bufferView>n&&t.bufferView--,e.compressedImage(t,function(e){var t=e.bufferView;i(t)&&t>n&&e.bufferView--})}),t(r,"KHR_draco_mesh_compression")&&e.mesh(r,function(t){e.meshPrimitive(t,function(e){i(e.extensions)&&i(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>n&&e.extensions.KHR_draco_mesh_compression.bufferView--})})},a.accessor=function(t){var r={};return e.mesh(t,function(t){e.meshPrimitive(t,function(t){e.meshPrimitiveAttribute(t,function(e){r[e]=!0}),e.meshPrimitiveTarget(t,function(t){e.meshPrimitiveTargetAttribute(t,function(e){r[e]=!0})});var n=t.indices;i(n)&&(r[n]=!0)})}),e.skin(t,function(e){i(e.inverseBindMatrices)&&(r[e.inverseBindMatrices]=!0)}),e.animation(t,function(t){e.animationSampler(t,function(e){i(e.input)&&(r[e.input]=!0),i(e.output)&&(r[e.output]=!0)})}),r},a.buffer=function(t){var r={};return e.bufferView(t,function(e){i(e.buffer)&&(r[e.buffer]=!0)}),r},a.bufferView=function(r){var n={};return e.accessor(r,function(e){i(e.bufferView)&&(n[e.bufferView]=!0)}),e.shader(r,function(e){i(e.bufferView)&&(n[e.bufferView]=!0)}),e.image(r,function(t){i(t.bufferView)&&(n[t.bufferView]=!0),e.compressedImage(t,function(e){i(e.bufferView)&&(n[e.bufferView]=!0)})}),t(r,"KHR_draco_mesh_compression")&&e.mesh(r,function(t){e.meshPrimitive(t,function(e){i(e.extensions)&&i(e.extensions.KHR_draco_mesh_compression)&&(n[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),n},r}),define("ThirdParty/GltfPipeline/addBuffer",["./addToArray"],function(e){"use strict";function t(t,i){var r={byteLength:i.length,extras:{_pipeline:{source:i}}},n=e(t.buffers,r),o={buffer:n,byteOffset:0,byteLength:i.length};return e(t.bufferViews,o)}return t}),define("ThirdParty/GltfPipeline/readAccessorPacked",["./getAccessorByteStride","./getComponentReader","./numberOfComponentsForType","../../Core/arrayFill","../../Core/ComponentDatatype","../../Core/defined"],function(e,t,i,r,n,o){"use strict";function a(a,s){var l=e(a,s),u=n.getSizeInBytes(s.componentType),c=i(s.type),d=s.count,h=new Array(c*d);if(!o(s.bufferView))return r(h,0),h;for(var p=a.bufferViews[s.bufferView],f=a.buffers[p.buffer].extras._pipeline.source,m=s.byteOffset+p.byteOffset+f.byteOffset,_=new DataView(f.buffer),g=new Array(c),v=t(s.componentType),y=0;y<d;++y){v(_,m,c,u,g);for(var C=0;C<c;++C)h[y*c+C]=g[C];m+=l}return h}return a}),define("ThirdParty/GltfPipeline/updateAccessorComponentTypes",["./addBuffer","./ForEach","./readAccessorPacked","../../Core/ComponentDatatype","../../Core/WebGLConstants"],function(e,t,i,r,n){"use strict";function o(e){var i;return t.accessorWithSemantic(e,"JOINTS_0",function(t){var o=e.accessors[t];i=o.componentType,i===n.BYTE?a(e,o,r.UNSIGNED_BYTE):i!==n.UNSIGNED_BYTE&&i!==n.UNSIGNED_SHORT&&a(e,o,r.UNSI
define("Scene/ModelAnimationCache",["../Core/Cartesian3","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/LinearSpline","../Core/Matrix4","../Core/Quaternion","../Core/QuaternionSpline","../Core/WebGLConstants","../Core/WeightSpline","../ThirdParty/GltfPipeline/getAccessorByteStride","../ThirdParty/GltfPipeline/numberOfComponentsForType","./AttributeType"],function(e,t,i,r,n,o,a,s,l,u,c,d,h){"use strict";function p(){}function f(e,t){var i=e.gltf,r=i.buffers,n=i.bufferViews,o=n[t.bufferView],a=r[o.buffer],s=o.byteOffset+t.byteOffset,l=t.count*d(t.type),u=g.test(a.uri)?"":a.uri;return e.cacheKey+"//"+u+"/"+s+"/"+l}function m(e,t,i){return e.cacheKey+"//"+t+"/"+i}function _(e){this._value=e}var g=/^data\:/i,v={};p.getAnimationParameterValues=function(n,o){var s=f(n,o),l=v[s];if(!r(l)){var u=n.gltf,h=u.buffers,p=u.bufferViews,m=p[o.bufferView],_=m.buffer,g=h[_],y=g.extras._pipeline.source,C=o.componentType,b=o.type,S=d(b),T=o.count,E=c(u,o);l=new Array(T);for(var w=i(o.byteOffset,0),A=m.byteOffset+w,x=0;x<T;x++){var P=t.createArrayBufferView(C,y.buffer,y.byteOffset+A,S);"SCALAR"===b?l[x]=P[0]:"VEC3"===b?l[x]=e.fromArray(P):"VEC4"===b&&(l[x]=a.unpack(P)),A+=E}r(n.cacheKey)&&(v[s]=l)}return l};var y={};_.prototype.evaluate=function(e,t){return this._value},_.prototype.wrapTime=function(e){return 0},_.prototype.clampTime=function(e){return 0},p.getAnimationSpline=function(e,t,i,o,a,l,c,d){var h=m(e,t,o),p=y[h];if(!r(p)){var f=l,g=d;1===f.length&&1===g.length?p=new _(g[0]):"LINEAR"===a.interpolation&&("translation"===c||"scale"===c?p=new n({times:f,points:g}):"rotation"===c?p=new s({times:f,points:g}):"weights"===c&&(p=new u({times:f,weights:g}))),r(e.cacheKey)&&(y[h]=p)}return p};var C={};return p.getSkinInverseBindMatrices=function(e,i){var n=f(e,i),a=C[n];if(!r(a)){var s=e.gltf,u=s.buffers,p=s.bufferViews,m=i.bufferView,_=p[m],g=_.buffer,v=u[g],y=v.extras._pipeline.source,b=i.componentType,S=i.type,T=i.count,E=c(s,i),w=_.byteOffset+i.byteOffset,A=d(S);if(a=new Array(T),b===l.FLOAT&&S===h.MAT4)for(var x=0;x<T;++x){var P=t.createArrayBufferView(b,y.buffer,y.byteOffset+w,A);a[x]=o.fromArray(P),w+=E}C[n]=a}return a},p}),define("Scene/ModelAnimationLoop",["../Core/freezeObject"],function(e){"use strict";return e({NONE:0,REPEAT:1,MIRRORED_REPEAT:2})}),define("Scene/ModelAnimationState",["../Core/freezeObject"],function(e){"use strict";return e({STOPPED:0,ANIMATING:1})}),define("Scene/ModelAnimation",["../Core/defaultValue","../Core/defineProperties","../Core/defined","../Core/deprecationWarning","../Core/Event","../Core/JulianDate","./ModelAnimationLoop","./ModelAnimationState"],function(e,t,i,r,n,o,a,s){"use strict";function l(t,l,u){this._name=u.name,this._startTime=o.clone(t.startTime),this._delay=e(t.delay,0),this._stopTime=t.stopTime,this.removeOnStop=e(t.removeOnStop,!1),i(t.speedup)&&(r("ModelAnimation.speedup","ModelAnimation.speedup is deprecated and will be removed in Cesium 1.54. Use ModelAnimation.multiplier instead."),t.multiplier=t.speedup),this._multiplier=e(t.multiplier,1),this._reverse=e(t.reverse,!1),this._loop=e(t.loop,a.NONE),this.start=new n,this.update=new n,this.stop=new n,this._state=s.STOPPED,this._runtimeAnimation=u,this._computedStartTime=void 0,this._duration=void 0;var c=this;this._raiseStartEvent=function(){c.start.raiseEvent(l,c)},this._updateEventTime=0,this._raiseUpdateEvent=function(){c.update.raiseEvent(l,c,c._updateEventTime)},this._raiseStopEvent=function(){c.stop.raiseEvent(l,c)}}return t(l.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},speedup:{get:function(){return r("ModelAnimation.speedup","ModelAnimation.speedup is deprecated and will be removed in Cesium 1.54. Use ModelAnimation.multiplier instead."),this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),l}),define("Scene/ModelAnimationCollection",["../Core/
define("Scene/processModelMaterialsCommon",["./ModelUtility","../Core/defined","../Core/defaultValue","../Core/WebGLConstants","../Core/webGLConstantToGlslType","../ThirdParty/GltfPipeline/addToArray","../ThirdParty/GltfPipeline/ForEach","../ThirdParty/GltfPipeline/hasExtension","../ThirdParty/GltfPipeline/numberOfComponentsForType"],function(e,t,i,r,n,o,a,s,l){"use strict";function u(r,n){if(n=i(n,{}),t(r)&&s(r,"KHR_materials_common")){s(r,"KHR_techniques_webgl")||(t(r.extensions)||(r.extensions={}),r.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},r.extensionsUsed.push("KHR_techniques_webgl"),r.extensionsRequired.push("KHR_techniques_webgl"));var o=r.extensions.KHR_techniques_webgl;f(r);var l=c(r),u=e.splitIncompatibleMaterials(r),h={},m=!1;return a.material(r,function(e,i){if(t(e.extensions)&&t(e.extensions.KHR_materials_common)){var a=e.extensions.KHR_materials_common,s=u[i],c=p(a,s),f=h[c];t(f)||(f=d(r,o,s,a,l,n.addBatchIdToGeneratedShaders),h[c]=f,m=!0);var _,g={},v=a.values;for(var y in v)v.hasOwnProperty(y)&&"transparent"!==y&&"doubleSided"!==y&&(_="u_"+y.toLowerCase(),g[_]=v[y]);e.extensions.KHR_techniques_webgl={technique:f,values:g},e.alphaMode="OPAQUE",a.transparent&&(e.alphaMode="BLEND"),a.doubleSided&&(e.doubleSided=!0)}}),m?(e.ensureSemanticExistence(r),r):r}}function c(e){var i,n={};if(t(e.extensions)&&t(e.extensions.KHR_materials_common)&&(i=e.extensions.KHR_materials_common.lights),t(i)){var o=e.nodes;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];if(t(s.extensions)&&t(s.extensions.KHR_materials_common)){var l=s.extensions.KHR_materials_common.light;t(l)&&t(i[l])&&(i[l].node=a),delete s.extensions.KHR_materials_common}}var u=0;for(var c in i)if(i.hasOwnProperty(c)){var d=i[c],h=d.type;if("ambient"!==h&&!t(d.node)){delete i[c];continue}var p="light"+u.toString();switch(d.baseName=p,h){case"ambient":var f=d.ambient;n[p+"Color"]={type:r.FLOAT_VEC3,value:f.color};break;case"directional":var m=d.directional;n[p+"Color"]={type:r.FLOAT_VEC3,value:m.color},t(d.node)&&(n[p+"Transform"]={node:d.node,semantic:"MODELVIEW",type:r.FLOAT_MAT4});break;case"point":var _=d.point;n[p+"Color"]={type:r.FLOAT_VEC3,value:_.color},t(d.node)&&(n[p+"Transform"]={node:d.node,semantic:"MODELVIEW",type:r.FLOAT_MAT4}),n[p+"Attenuation"]={type:r.FLOAT_VEC3,value:[_.constantAttenuation,_.linearAttenuation,_.quadraticAttenuation]};break;case"spot":var g=d.spot;n[p+"Color"]={type:r.FLOAT_VEC3,value:g.color},t(d.node)&&(n[p+"Transform"]={node:d.node,semantic:"MODELVIEW",type:r.FLOAT_MAT4},n[p+"InverseTransform"]={node:d.node,semantic:"MODELVIEWINVERSE",type:r.FLOAT_MAT4,useInFragment:!0}),n[p+"Attenuation"]={type:r.FLOAT_VEC3,value:[g.constantAttenuation,g.linearAttenuation,g.quadraticAttenuation]},n[p+"FallOff"]={type:r.FLOAT_VEC2,value:[g.fallOffAngle,g.fallOffExponent]}}++u}}return n}function d(a,u,c,d,p,f){t(d)||(d={}),f=i(f,!1);var m,_=u.techniques,g=u.shaders,v=u.programs,y=d.technique.toUpperCase();t(a.extensions)&&t(a.extensions.KHR_materials_common)&&(m=a.extensions.KHR_materials_common.lights);var C,b=d.values,S=i(d.jointCount,0),T=!1,E=!1;t(c)&&(C=c.skinning,T=C.skinned,E=c.hasVertexColors);var w="precision highp float;\n",A="precision highp float;\n",x="CONSTANT"!==y,P={u_modelViewMatrix:{semantic:s(a,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:r.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:r.FLOAT_MAT4}};x&&(P.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:r.FLOAT_MAT3}),T&&(P.u_jointMatrix={count:S,semantic:"JOINTMATRIX",type:r.FLOAT_MAT4});var D,I=!1;for(var M in b)if(b.hasOwnProperty(M)&&"transparent"!==M&&"doubleSided"!==M){var R=h(M,b[M]);D="u_"+M.toLowerCase(),I||R!==r.SAMPLER_2D||(I=!0),P[D]={type:R}}if(t(P.u_diffuse)&&(P.u_diffuse.semantic="_3DTILESDIFFUSE"),t(p))for(var O in p)p.hasOwnProperty(O)&&(D="u_"+O,P[D]=p[O]);for(D in P)if(P.hasOwnProperty(D)){var L=P[D],N=t(L.count)?"["+L.count+"]":"";L.type!==r.FLOAT_MAT3&&L.type!==r.FLOAT_MAT4||L.useInFragment?(A+="uniform "+n(L.type)+" "+D+N+";\n",delete L.useInFragment):w+="uniform "+n(L.type)+" "+D+N+";\n"}
define("Scene/Model",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/Cartographic","../Core/Check","../Core/clone","../Core/Color","../Core/combine","../Core/createGuid","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/DistanceDisplayCondition","../Core/FeatureDetection","../Core/getAbsoluteUri","../Core/getMagic","../Core/getStringFromTypedArray","../Core/IndexDatatype","../Core/isArray","../Core/loadCRN","../Core/loadImageFromTypedArray","../Core/loadKTX","../Core/Math","../Core/Matrix3","../Core/Matrix4","../Core/PixelFormat","../Core/PrimitiveType","../Core/Quaternion","../Core/Resource","../Core/Transforms","../Core/WebGLConstants","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/Pass","../Renderer/RenderState","../Renderer/Sampler","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","../Renderer/VertexArray","../ThirdParty/GltfPipeline/addDefaults","../ThirdParty/GltfPipeline/addPipelineExtras","../ThirdParty/GltfPipeline/ForEach","../ThirdParty/GltfPipeline/getAccessorByteStride","../ThirdParty/GltfPipeline/hasExtension","../ThirdParty/GltfPipeline/numberOfComponentsForType","../ThirdParty/GltfPipeline/parseGlb","../ThirdParty/GltfPipeline/removePipelineExtras","../ThirdParty/GltfPipeline/updateVersion","../ThirdParty/when","./Axis","./BlendingState","./ClippingPlaneCollection","./ColorBlendMode","./DracoLoader","./getClipAndStyleCode","./getClippingFunction","./HeightReference","./JobType","./ModelAnimationCache","./ModelAnimationCollection","./ModelLoadResources","./ModelMaterial","./ModelMesh","./ModelNode","./ModelUtility","./OctahedralProjectedCubeMap","./processModelMaterialsCommon","./processPbrMaterials","./SceneMode","./ShadowMode"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E,w,A,x,P,D,I,M,R,O,L,N,F,B,z,k,V,U,G,H,W,q,Y,j,X,Q,Z,K,J,$,ee,te,ie,re,ne,oe,ae,se,le,ue,ce,de,he,pe,fe,me,_e,ge,ve,ye,Ce,be,Se){"use strict";function Te(e,t){e._cachedGltf=t}function Ee(e){this._gltf=e.gltf,this.ready=e.ready,this.modelsToLoad=[],this.count=0}function we(r){r=c(r,c.EMPTY_OBJECT);var n=r.cacheKey;this._cacheKey=n,this._cachedGltf=void 0,this._releaseGltfJson=c(r.releaseGltfJson,!1);var o;if(d(n)&&d(Ti[n])&&Ti[n].ready)o=Ti[n],++o.count;else{var a=r.gltf;if(d(a)){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),a instanceof Uint8Array){o=new Ee({gltf:J(a),ready:!0})}else o=new Ee({gltf:r.gltf,ready:!0});o.count=1,d(n)&&(Ti[n]=o)}}Te(this,o);var l=c(r.basePath,"");this._resource=M.createIfNeeded(l),this.show=c(r.show,!0),this.silhouetteColor=c(r.silhouetteColor,s.RED),this._silhouetteColor=new s,this._silhouetteColorPreviousAlpha=1,this._normalAttributeName=void 0,this.silhouetteSize=c(r.silhouetteSize,0),this.modelMatrix=x.clone(c(r.modelMatrix,x.IDENTITY)),this._modelMatrix=x.clone(this.modelMatrix),this._clampedModelMatrix=void 0,this.scale=c(r.scale,1),this._scale=this.scale,this.minimumPixelSize=c(r.minimumPixelSize,0),this._minimumPixelSize=this.minimumPixelSize,this.maximumScale=r.maximumScale,this._maximumScale=this.maximumScale,this.id=r.id,this._id=r.id,this.heightReference=c(r.heightReference,ue.NONE),this._heightReference=this.heightReference,this._heightChanged=!1,this._removeUpdateHeightCallback=void 0;var u=r.scene;this._scene=u,d(u)&&d(u.terrainProviderChanged)&&(this._terrainProviderChangedCallback=u.terrainProviderChanged.addEventListener(function(){this._heightChanged=!0},this)),this._pickObject=r.pickObject,this._allowPicking=c(r.allowPicking,!0),this._ready=!1,this._readyPromise=te.defer(),this.activeAnimations=new he(this),this.clampAnimations=c(r.clampAnimations,!0),this._defaultTexture=void 0,this._incrementallyLoadTextures=c(r.incrementallyLoadTextures,!0),this._asynchronous=c(r.asynchronous,!0),this.shadows=c(r.shadows,Se.ENABLED),this._shadows=this.shadows,this.color=c(r.color,s.WHITE),this._color=new s,this._colorPreviousAlp
}else qe(e,t),$e(e,t),it(e,i),tt(e),nt(e,t);lt(e),ct(e),e._loadRendererResourcesFromCache||(dt(e,i),ht(e)),_t(e,i),zt(e,i,r)}function Gt(e,t){var i=e.publicNode,r=i.matrix;i.useMatrix&&d(r)?x.clone(r,t):d(e.matrix)?x.clone(e.matrix,t):(x.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t),i.setMatrix(t))}function Ht(t,n,o,a){var s=t._maxDirtyNumber,l=t._runtime.rootNodes,u=l.length,c=Bi,h=t._computedModelMatrix;if(t._mode!==be.SCENE3D&&!t._ignoreCommands){var p=x.getColumn(h,3,zi);if(r.equals(p,r.UNIT_W)){var f=t.boundingSphere.center,m=R.wgs84To2DModelMatrix(a,f,ki);h=x.multiply(m,h,ki),d(t._rtcCenter)&&(x.setTranslation(h,r.UNIT_W,h),t._rtcCenter=t._rtcCenter2D)}else h=R.basisTo2D(a,h,ki),t._rtcCenter=t._rtcCenter3D}for(var _=0;_<u;++_){var g=l[_];for(Gt(g,g.transformToRoot),c.push(g);c.length>0;){g=c.pop();var v=g.transformToRoot,y=g.commands;if(g.dirtyNumber===s||n||o){var C=x.multiplyTransformation(h,v,g.computedMatrix),b=y.length;if(b>0)for(var S=0;S<b;++S){var T=y[S],E=T.command;x.clone(C,E.modelMatrix),e.transform(T.boundingSphere,E.modelMatrix,E.boundingVolume),d(t._rtcCenter)&&i.add(t._rtcCenter,E.boundingVolume.center,E.boundingVolume.center),E=T.command2D,d(E)&&t._mode===be.SCENE2D&&(x.clone(C,E.modelMatrix),E.modelMatrix[13]-=2*w.sign(E.modelMatrix[13])*w.PI*a.ellipsoid.maximumRadius,e.transform(T.boundingSphere,E.modelMatrix,E.boundingVolume))}}var A=g.children;if(d(A))for(var P=A.length,D=0;D<P;++D){var I=A[D];I.dirtyNumber=Math.max(I.dirtyNumber,g.dirtyNumber),(I.dirtyNumber===s||o)&&(Gt(I,I.transformToRoot),x.multiplyTransformation(v,I.transformToRoot,I.transformToRoot)),c.push(I)}}}++t._maxDirtyNumber}function Wt(e){for(var t=e._runtime.skinnedNodes,i=t.length,r=0;r<i;++r){var n=t[r];Vi=x.inverseTransformation(n.transformToRoot,Vi);for(var o=n.computedJointMatrices,a=n.joints,s=n.bindShapeMatrix,l=n.inverseBindMatrices,u=l.length,c=0;c<u;++c)d(o[c])||(o[c]=new x),o[c]=x.multiplyTransformation(Vi,a[c].transformToRoot,o[c]),o[c]=x.multiplyTransformation(o[c],l[c],o[c]),d(s)&&(o[c]=x.multiplyTransformation(o[c],s,o[c]))}}function qt(e){for(var t=e._runtime.rootNodes,i=t.length,r=Bi,n=0;n<i;++n){var o=t[n];for(o.computedShow=o.publicNode.show,r.push(o);r.length>0;){o=r.pop();for(var a=o.computedShow,s=o.commands,l=s.length,u=0;u<l;++u)s[u].show=a;var c=o.children;if(d(c))for(var h=c.length,p=0;p<h;++p){var f=c[p];f.computedShow=a&&f.publicNode.show,r.push(f)}}}}function Yt(e,t){var i=e.id;if(e._id!==i){e._id=i;for(var r=e._pickIds,n=r.length,o=0;o<n;++o)r[o].object.id=i}}function jt(e){if(e._debugWireframe!==e.debugWireframe){e._debugWireframe=e.debugWireframe;for(var t=e.debugWireframe?D.LINES:D.TRIANGLES,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.primitiveType=t}}function Xt(e){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var t=e.debugShowBoundingVolume,i=e._nodeCommands,r=i.length,n=0;n<r;++n)i[n].command.debugShowBoundingVolume=t}}function Qt(e){if(e.shadows!==e._shadows){e._shadows=e.shadows;for(var t=Se.castShadows(e.shadows),i=Se.receiveShadows(e.shadows),r=e._nodeCommands,n=r.length,o=0;o<n;o++){var a=r[o];a.command.castShadows=t,a.command.receiveShadows=i}}}function Zt(e){var t=a(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=re.ALPHA_BLEND,z.fromCache(t)}function Kt(e){var t=F.shallowClone(e);return t.pass=B.TRANSLUCENT,t.renderState=Zt(e.renderState),t}function Jt(e,t,i){var r=t.scene3DOnly,n=e.color.alpha;if(n>0&&n<1){var o=e._nodeCommands,a=o.length;if(!d(o[0].translucentCommand)||i)for(var s=0;s<a;++s){var l=o[s],u=l.command;if(l.translucentCommand=Kt(u),!r){var c=l.command2D;l.translucentCommand2D=Kt(c)}}}}function $t(e,t){var i=e._rendererResources.programs;for(var r in i)if(i.hasOwnProperty(r)&&i[r]===t)return r}function ei(e,t,i){var r=t.vertexShaderSource.sources[0],n=t._attributeLocations,o=e._normalAttributeName;r=U.replaceMain(r,"gltf_silhouette_main"),r+="uniform float gltf_silhouetteSize; \nvoid main() \n{ \n gltf_silhouette_main(); \n vec3
;return"attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position2DHigh;\nattribute vec3 position2DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 prevPosition2DHigh;\nattribute vec3 prevPosition2DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec3 nextPosition2DHigh;\nattribute vec3 nextPosition2DLow;\nattribute vec4 texCoordExpandAndBatchIndex;\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\nvoid main()\n{\nfloat texCoord = texCoordExpandAndBatchIndex.x;\nfloat expandDir = texCoordExpandAndBatchIndex.y;\nbool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\nfloat batchTableIndex = texCoordExpandAndBatchIndex.w;\nvec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\nfloat width = widthAndShow.x + 0.5;\nfloat show = widthAndShow.y;\nif (width < 1.0)\n{\nshow = 0.0;\n}\nvec4 pickColor = batchTable_getPickColor(batchTableIndex);\nvec4 p, prev, next;\nif (czm_morphTime == 1.0)\n{\np = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\nprev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\nnext = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n}\nelse if (czm_morphTime == 0.0)\n{\np = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\nprev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\nnext = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n}\nelse\n{\np = czm_columbusViewMorph(\nczm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\nczm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\nczm_morphTime);\nprev = czm_columbusViewMorph(\nczm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\nczm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\nczm_morphTime);\nnext = czm_columbusViewMorph(\nczm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\nczm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\nczm_morphTime);\n}\n#ifdef DISTANCE_DISPLAY_CONDITION\nvec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\nvec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\nvec3 centerLow = centerLowAndRadius.xyz;\nfloat radius = centerLowAndRadius.w;\nvec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\nfloat lengthSq;\nif (czm_sceneMode == czm_sceneMode2D)\n{\nlengthSq = czm_eyeHeight2D.y;\n}\nelse\n{\nvec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\nlengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n}\nfloat nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\nfloat farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\nif (lengthSq < nearSq || lengthSq > farSq)\n{\nshow = 0.0;\n}\n#endif\nvec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, v_polylineAngle);\ngl_Position = czm_viewportOrthographic * positionWC * show;\nv_st = vec2(texCoord, clamp(expandDir, 0.0, 1.0));\nv_width = width;\nv_pickColor = pickColor;\n#ifdef LOG_DEPTH\nczm_vertexLogDepth(czm_modelViewProjectionRelativeToEye * p);\n#endif\n}\n"}),define("Scene/Polyline",["../Core/arrayRemoveDuplicates","../Core/BoundingSphere","../Core/Cartesian3","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/DistanceDisplayCondition","../Core/Matrix4","../Core/PolylinePipeline","./Material"],function(e,t,i,r,n,o,a,s,l,u,c,d){"use strict";function h(a,s){a=n(a,n.EMPTY_OBJECT),this._show=n(a.show,!0),this._width=n(a.width,1),this._loop=n(a.loop,!1),this._distanceDisplayCondition=a.distanceDisplayCondition,this._material=a.material,o(this._material)||(this._material=d.fromType(d.ColorType,{color:new r(1,1,1,1)}));var l=a.positions;o(l)||(l=[]),this._positions=l,this._actualPositions=e(l,i.equalsEpsilon),this._loop&&this._ac
c.positions=P(l,r,n,e,this._referenceFrame,E,c.positions.slice()),c.material=m.getValue(e,s._material,c.material),c.width=_.getValueOrDefault(s._width,e,1),c.distanceDisplayCondition=_.getValueOrUndefined(s._distanceDisplayCondition,e,c.distanceDisplayCondition)},D.prototype.removeObject=function(e){var t=e.polyline;i(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},D.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),r(this)},I.prototype.update=function(e){var t=this._updaters;for(var r in t)t.hasOwnProperty(r)&&t[r].update(e);for(var n=this._items.values,o=0,a=n.length;o<a;o++){var s=n[o],u=s.entity,c=u._position,d=s.updater,p=l.FIXED;this._scene.mode===h.SCENE3D&&(p=c.referenceFrame);var f=this._updaters[p];d===f&&i(f)?f.updateObject(e,s):(i(d)&&d.removeObject(s),i(f)||(f=new D(this._scene,p),f.update(e),this._updaters[p]=f),s.updater=f,i(f)&&f.updateObject(e,s))}return!0},I.prototype.isDestroyed=function(){return!1},I.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(I.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return r(this)},I.prototype._onCollectionChanged=function(e,t,r,n){var o,a,s,l=this._items;for(o=t.length-1;o>-1;o--)a=t[o],i(a._path)&&i(a._position)&&l.set(a.id,new b(a));for(o=n.length-1;o>-1;o--)a=n[o],i(a._path)&&i(a._position)?l.contains(a.id)||l.set(a.id,new b(a)):(s=l.get(a.id),i(s)&&(s.updater.removeObject(s),l.remove(a.id)));for(o=r.length-1;o>-1;o--)a=r[o],s=l.get(a.id),i(s)&&(i(s.updater)&&s.updater.removeObject(s),l.remove(a.id))},I._subSample=P,I}),define("Scene/createBillboardPointCallback",[],function(){"use strict";function e(e,t,i,r,n){return function(){var o=document.createElement("canvas"),a=n+2*r;o.height=o.width=a;var s=o.getContext("2d");return s.clearRect(0,0,a,a),0!==r&&(s.beginPath(),s.arc(a/2,a/2,a/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=i,s.fill(),e<1&&(s.save(),s.globalCompositeOperation="destination-out",s.beginPath(),s.arc(a/2,a/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle="black",s.fill(),s.restore())),s.beginPath(),s.arc(a/2,a/2,n/2,0,2*Math.PI,!0),s.closePath(),s.fillStyle=t,s.fill(),o}}return e}),define("DataSources/PointVisualizer",["../Core/AssociativeArray","../Core/Cartesian3","../Core/Color","../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/DistanceDisplayCondition","../Core/NearFarScalar","../Scene/createBillboardPointCallback","../Scene/HeightReference","./BoundingSphereState","./Property"],function(e,t,i,r,n,o,a,s,l,u,c,d){"use strict";function h(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 p(t,i){i.collectionChanged.addEventListener(p.prototype._onCollectionChanged,this),this._cluster=t,this._entityCollection=i,this._items=new e,this._onCollectionChanged(i,i.values,[],[])}function f(e,t,i){if(r(e)){var n=e.pointPrimitive;if(r(n))return e.pointPrimitive=void 0,void i.removePoint(t);var o=e.billboard;r(o)&&(e.billboard=void 0,i.removeBillboard(t))}}var m=i.WHITE,_=i.BLACK,g=new i,v=new t,y=new i,C=new s,b=new s,S=new a;return p.prototype.update=function(e){for(var t=this._items.values,n=this._cluster,o=0,a=t.length;o<a;o++){var s,c=t[o],h=c.entity,p=h._point,T=c.pointPrimitive,E=c.billboard,w=d.getValueOrDefault(p._heightReference,e,u.NONE),A=h.isShowing&&h.isAvailable(e)&&d.getValueOrDefault(p._show,e,!0);if(A&&(s=d.getValueOrUndefined(h._position,e,v),A=r(s)),A){d.isConstant(h._position)||(n._clusterDirty=!0);var x=!1;if(w===u.NONE||r(E)?w!==u.NONE||r(T)||(r(E)&&(f(c,h,n),E=void 0),T=n.getPoint(h),T.id=h,c.pointPrimitive=T):(r(T)&&(f(c,h,n),T=void 0),E=n.getBillboard(h),E.id=h,E.image=void 0,c.billboard=E,x=!0),r(T))T.show=!0,T.position=s,T.scaleByDistance=d.getValueOrUndefined(p._scaleByDistance,e,C),T.translucencyByDistance=d.getValueOrUndefined(p._translucencyByDistance,e,b),T.color=d.getValueOrDefault(p._color,e,m,g),T.ou
;if(r(u)){var c=s!==this._lastEntity,d=a!==this._mode,m=n.camera,_=c||d,g=!0;if(c){var v=s.viewFrom,y=r(v);if(!y&&r(i)){x.pitch=-l.PI_OVER_FOUR,x.range=0;var C=u.getValue(t,P);if(r(C)){var b=2-1/Math.max(1,e.magnitude(C)/o.maximumRadius);x.pitch*=b}m.viewBoundingSphere(i,x),this.boundingSphere=i,_=!1,g=!1}else y&&r(v.getValue(t,this._offset3D))||e.clone(f._defaultOffset3D,this._offset3D)}else d||this._mode===h.SCENE2D||e.clone(m.position,this._offset3D);this._lastEntity=s,this._mode=a,p(this,m,_,g,u,t,o)}}},f}),function(){function e(e,t){function i(t){var i,r=e.arcs[t<0?~t:t],n=r[0];return e.transform?(i=[0,0],r.forEach(function(e){i[0]+=e[0],i[1]+=e[1]})):i=r[r.length-1],t<0?[i,n]:[n,i]}function r(e,t){for(var i in e){var r=e[i];delete t[r.start],delete r.start,delete r.end,r.forEach(function(e){n[e<0?~e:e]=1}),s.push(r)}}var n={},o={},a={},s=[],l=-1;return t.forEach(function(i,r){var n,o=e.arcs[i<0?~i:i];o.length<3&&!o[1][0]&&!o[1][1]&&(n=t[++l],t[l]=i,t[r]=n)}),t.forEach(function(e){var t,r,n=i(e),s=n[0],l=n[1];if(t=a[s])if(delete a[t.end],t.push(e),t.end=l,r=o[l]){delete o[r.start];var u=r===t?t:t.concat(r);o[u.start=t.start]=a[u.end=r.end]=u}else o[t.start]=a[t.end]=t;else if(t=o[l])if(delete o[t.start],t.unshift(e),t.start=s,r=a[s]){delete a[r.end];var c=r===t?t:r.concat(t);o[c.start=r.start]=a[c.end=t.end]=c}else o[t.start]=a[t.end]=t;else t=[e],o[t.start=s]=a[t.end=l]=t}),r(a,o),r(o,a),t.forEach(function(e){n[e<0?~e:e]||s.push([e])}),s}function t(t,i,r){function n(e){var t=e<0?~e:e;(c[t]||(c[t]=[])).push({i:e,g:u})}function o(e){e.forEach(n)}function a(e){e.forEach(o)}function s(e){"GeometryCollection"===e.type?e.geometries.forEach(s):e.type in d&&(u=e,d[e.type](e.arcs))}var l=[];if(arguments.length>1){var u,c=[],d={LineString:o,MultiLineString:a,Polygon:a,MultiPolygon:function(e){e.forEach(a)}};s(i),c.forEach(arguments.length<3?function(e){l.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&l.push(e[0].i)})}else for(var h=0,p=t.arcs.length;h<p;++h)l.push(h);return{type:"MultiLineString",arcs:e(t,l)}}function i(t,i){function r(e){e.forEach(function(t){t.forEach(function(t){(s[t=t<0?~t:t]||(s[t]=[])).push(e)})}),l.push(e)}function o(e){return d(a(t,{type:"Polygon",arcs:[e]}).coordinates[0])>0}var s={},l=[],u=[];return i.forEach(function(e){"Polygon"===e.type?r(e.arcs):"MultiPolygon"===e.type&&e.arcs.forEach(r)}),l.forEach(function(e){if(!e._){var t=[],i=[e];for(e._=1,u.push(t);e=i.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){s[e<0?~e:e].forEach(function(e){e._||(e._=1,i.push(e))})})})}}),l.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:u.map(function(i){var r=[];if(i.forEach(function(e){e.forEach(function(e){e.forEach(function(e){s[e<0?~e:e].length<2&&r.push(e)})})}),r=e(t,r),(n=r.length)>1)for(var a,l=o(i[0][0]),u=0;u<n;++u)if(l===o(r[u])){a=r[0],r[0]=r[u],r[u]=a;break}return r})}}function r(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return o(e,t)})}:o(e,t)}function o(e,t){var i={type:"Feature",id:t.id,properties:t.properties||{},geometry:a(e,t)};return null==t.id&&delete i.id,i}function a(e,t){function i(e,t){t.length&&t.pop();for(var i,r=c[e<0?~e:e],n=0,o=r.length;n<o;++n)t.push(i=r[n].slice()),u(i,n);e<0&&s(t,o)}function r(e){return e=e.slice(),u(e,0),e}function n(e){for(var t=[],r=0,n=e.length;r<n;++r)i(e[r],t);return t.length<2&&t.push(t[0].slice()),t}function o(e){for(var t=n(e);t.length<4;)t.push(t[0].slice());return t}function a(e){return e.map(o)}function l(e){var t=e.type;return"GeometryCollection"===t?{type:t,geometries:e.geometries.map(l)}:t in d?{type:t,coordinates:d[t](e)}:null}var u=m(e.transform),c=e.arcs,d={Point:function(e){return r(e.coordinates)},MultiPoint:function(e){return e.coordinates.map(r)},LineString:function(e){return n(e.arcs)},MultiLineString:function(e){return e.arcs.map(n)},Polygon:function(e){return a(e.arcs)},MultiPolygon:function(e){return e.arcs.map(a)}};return l(t)}function s(e,t){for(var i,r=e.length,n=r-t;n<--r;)i=e[n],e[n++]=e[r],e[r]=i}function l(e,t){for(var i=0,r=e.length;i<r;)
o(!1,r),h()},u)),t.onflush&&(r?(f+=r.length,i.writeUint8Array(r,function(){o(!1,r),c()},u)):c()),t.progress&&a&&a(p+t.current,n)}function h(){p=m*B,p<n?t.readUint8Array(r+p,Math.min(B,n-p),function(t){e.postMessage({append:!0,data:t}),m++,a&&a(p,n),o(!0,t)},l):e.postMessage({flush:!0})}var p,f,m=0;f=0,e.addEventListener(U,d,!1),h()}function m(e,t,i,r,n,o,a,s,l,u){function c(){var f;d=h*B,d<n?t.readUint8Array(r+d,Math.min(B,n-d),function(t){var s=e.append(t,function(){a&&a(r+d,n)});p+=s.length,o(!0,t),i.writeUint8Array(s,function(){o(!1,s),h++,setTimeout(c,1)},u),a&&a(d,n)},l):(f=e.flush(),f?(p+=f.length,i.writeUint8Array(f,function(){o(!1,f),s(p)},u)):s(p))}var d,h=0,p=0;c()}function _(e,t,n,o,a,s,l,u,c){function d(e,t){a&&!e&&_.append(t)}function h(e){s(e,_.get())}var p,_=new r;return i.zip.useWebWorkers?(p=new Worker(i.zip.workerScriptsPath+z),f(p,e,t,n,o,d,l,h,u,c)):m(new i.zip.Inflater,e,t,n,o,d,l,h,u,c),p}function g(e,t,n,o,a,s,l){function u(e,t){e&&p.append(t)}function c(e){o(e,p.get())}function d(){h.removeEventListener(U,d,!1),f(h,e,t,0,e.size,u,a,c,s,l)}var h,p=new r;return i.zip.useWebWorkers?(h=new Worker(i.zip.workerScriptsPath+k),h.addEventListener(U,d,!1),h.postMessage({init:!0,level:n})):m(new i.zip.Deflater,e,t,0,e.size,u,a,c,s,l),h}function v(e,t,i,n,o,a,s,l,u){function c(){var r=d*B;r<n?e.readUint8Array(i+r,Math.min(B,n-r),function(e){o&&h.append(e),s&&s(r,n,e),t.writeUint8Array(e,function(){d++,c()},u)},l):a(n,h.get())}var d=0,h=new r;c()}function y(e){var t,i,r="",n=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(t=0;t<e.length;t++)i=255&e.charCodeAt(t),r+=i>127?n[i-128]:String.fromCharCode(i);return r}function C(e){return decodeURIComponent(escape(e))}function b(e){var t,i="";for(t=0;t<e.length;t++)i+=String.fromCharCode(e[t]);return i}function S(e){var t=(4294901760&e)>>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch(e){}}function T(e,t,i,r,n){return e.version=t.view.getUint16(i,!0),e.bitFlag=t.view.getUint16(i+2,!0),e.compressionMethod=t.view.getUint16(i+4,!0),e.lastModDateRaw=t.view.getUint32(i+6,!0),e.lastModDate=S(e.lastModDateRaw),1==(1&e.bitFlag)?void n(I):((r||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(i+10,!0),e.compressedSize=t.view.getUint32(i+14,!0),e.uncompressedSize=t.view.getUint32(i+18,!0)),4294967295===e.compressedSize||4294967295===e.uncompressedSize?void n(M):(e.filenameLength=t.view.getUint16(i+22,!0),void(e.extraFieldLength=t.view.getUint16(i+24,!0))))}function E(e,t){function i(){}function r(i,n){e.readUint8Array(e.size-i,i,function(e){var t=o(e.length,e).view;1347093766!=t.getUint32(0)?r(i+1,n):n(t)},function(){t(R)})}return i.prototype.getData=function(i,r,n,a){function s(e,t){h&&h.terminate(),h=null,e&&e(t)}function l(e){var t=o(4);return t.view.setUint32(0,e),p.crc32==t.view.getUint32(0)}function u(e,t){a&&!l(t)?c():i.getData(function(e){s(r,e)})}function c(){s(t,N)}function d(){s(t,L)}var h,p=this;e.readUint8Array(p.offset,30,function(r){var s,l=o(r.length,r);if(1347093252!=l.view.getUint32(0))return void t(D);T(p,l,4,!1,t),s=p.offset+30+p.filenameLength+p.extraFieldLength,i.init(function(){0===p.compressionMethod?v(e,i,s,p.compressedSize,a,u,n,c,d):h=_(e,i,s,p.compressedSize,a,u,n,c,d)},d)},c)},{getEntries:function(n){if(e.size<22)return void t(D);r(22,function(r){var a,s;a=r.getUint32(16,!0),s=r.getUint16(8,!0),e.readUint8Array(a,e.size-a,function(e){var r,a,l,u,c=0,d=[],h=o(e.length,e);for(r=0;r<s;r++){if(a=new i,1347092738!=h.view.getUint3
for(var u=at(e,t,i,r,n,o,a,s,l),d=u.entity,h=u.styleEntity,p=!1,f=i.childNodes,m=0,_=f.length;m<_&&!p;m++){var g=f.item(m),v=Gt[g.localName];c(v)&&(v(e,r,g,d,h,d.id),p=!0)}p||(d.merge(h),Xe(e,d,h))}function ct(e,t,i,r,n,o,a,s,l){var u=Pe(i,"name",Vt.kml),d=Te(i,"id"),h=new Z(u,d),p=Ee(i,"Playlist",Vt.gx);if(p)for(var f=e._ellipsoid,m=p.childNodes,_=0;_<m.length;_++){var g=m[_];if(g.localName){var v=qt[g.localName];v?v(h,g,f):console.log("Unknown KML Tour playlist entry type "+g.localName)}}c(e.kmlTours)||(e.kmlTours=[]),e.kmlTours.push(h)}function dt(e,t){E("KML Tour unsupported node "+t.localName)}function ht(e,t){var i=xe(t,"duration",Vt.gx);e.addPlaylistEntry(new J(i))}function pt(e,t,i){var r=xe(t,"duration",Vt.gx),n=Pe(t,"flyToMode",Vt.gx),o={kml:{}};mt(t,o,i),ft(t,o,i);var a=o.kml.lookAt||o.kml.camera,s=new K(r,n,a);e.addPlaylistEntry(s)}function ft(e,t,i){var n=Ee(e,"Camera",Vt.kml);if(c(n)){var o=u(xe(n,"longitude",Vt.kml),0),a=u(xe(n,"latitude",Vt.kml),0),s=u(xe(n,"altitude",Vt.kml),0),l=u(xe(n,"heading",Vt.kml),0),d=u(xe(n,"tilt",Vt.kml),0),h=u(xe(n,"roll",Vt.kml),0),p=r.fromDegrees(o,a,s,i),f=v.fromDegrees(l,d-90,h);t.kml.camera=new X(p,f)}}function mt(e,t,i){var n=Ee(e,"LookAt",Vt.kml);if(c(n)){var o=u(xe(n,"longitude",Vt.kml),0),a=u(xe(n,"latitude",Vt.kml),0),s=u(xe(n,"altitude",Vt.kml),0),l=xe(n,"heading",Vt.kml),d=xe(n,"tilt",Vt.kml),h=u(xe(n,"range",Vt.kml),0);d=b.toRadians(u(d,0)),l=b.toRadians(u(l,0));var p=new g(l,d-b.PI_OVER_TWO,h),f=r.fromDegrees(o,a,s,i);t.kml.lookAt=new Q(f,p)}}function _t(e,t,i,r,n,o,a,s,l){var u,d=at(e,t,i,r,n,o,a,s,l),h=d.entity,p=!1,f=e._ellipsoid,m=be(Ee(i,"LatLonQuad",Vt.gx),f),_=xe(i,"drawOrder",Vt.kml);if(c(m))u=Fe(),u.hierarchy=new A(m),u.zIndex=_,h.polygon=u,p=!0;else{u=new ne,u.zIndex=_,h.rectangle=u;var g=Ee(i,"LatLonBox",Vt.kml);if(c(g)){var v=xe(g,"west",Vt.kml),y=xe(g,"south",Vt.kml),C=xe(g,"east",Vt.kml),S=xe(g,"north",Vt.kml);c(v)&&(v=b.negativePiToPi(b.toRadians(v))),c(y)&&(y=b.clampToLatitudeRange(b.toRadians(y))),c(C)&&(C=b.negativePiToPi(b.toRadians(C))),c(S)&&(S=b.clampToLatitudeRange(b.toRadians(S))),u.coordinates=new P(v,y,C,S);var T=xe(g,"rotation",Vt.kml);if(c(T)){var w=b.toRadians(T);u.rotation=w,u.stRotation=w}}}var x=Ee(i,"Icon",Vt.kml),D=ze(x,e,o,a,!0);if(c(D)){p&&E("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");var I=xe(x,"x",Vt.gx),M=xe(x,"y",Vt.gx),R=xe(x,"w",Vt.gx),O=xe(x,"h",Vt.gx);(c(I)||c(M)||c(R)||c(O))&&E("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),u.material=D,u.material.color=Re(i,"color",Vt.kml),u.material.transparent=!0}else u.material=Re(i,"color",Vt.kml);var L=Pe(i,"altitudeMode",Vt.kml);c(L)?"absolute"===L?(u.height=xe(i,"altitude",Vt.kml),u.zIndex=void 0):"clampToGround"!==L&&E("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+L):(L=Pe(i,"altitudeMode",Vt.gx),"relativeToSeaFloor"===L?(E("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),u.height=xe(i,"altitude",Vt.kml),u.zIndex=void 0):"clampToSeaFloor"===L?E("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):c(L)&&E("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+L))}function gt(e,t,i,r,n,o,a,s,l){e._unsupportedNode.raiseEvent(e,t,i,r,n,o,a),E("kml-unsupportedFeature-"+i.nodeName,"KML - Unsupported feature: "+i.nodeName)}function vt(e){if(!c(e)||0===e.length)return"";var t=e[0];return"&"!==t&&"?"!==t||(e=e.substring(1)),e}function yt(e,t,i,n,o,a){function s(e){return e<-b.PI_OVER_TWO?-b.PI_OVER_TWO:e>b.PI_OVER_TWO?b.PI_OVER_TWO:e}function l(e){return e>b.PI?e-b.TWO_PI:e<-b.PI?e+b.TWO_PI:e}var d=T(e.queryParameters);if(d=d.replace(/%5B/g,"[").replace(/%5D/g,"]"),c(t)&&t._mode!==F.MORPHING){var h,p;if(o=u(o,jt),c(i)&&(Qt.x=.5*i.clientWidth,Qt.y=.5*i.clientHeight,h=t.pickEllipsoid(Qt,a,Zt)),c(h)?p=a.cartesianToCartographic(h,Xt):(p=P.center(o,Xt),h=a.cartographicToCartesian(p)),c(n)&&!b.equalsEpsilon(n,1,b.EPSILON9)){var f=o.width*
d.transpose(t,t)}}function k(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;h.getRotation(e.inverseModelView3D,t),d.transpose(t,t)}}function V(e){e._inverseNormalDirty&&(e._inverseNormalDirty=!1,h.getRotation(e.inverseModelView,e._inverseNormal))}function U(e){e._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,h.getRotation(e.inverseModelView3D,e._inverseNormal3D))}function G(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,h.multiplyByPoint(e.inverseModel,e._cameraPosition,X),u.fromCartesian(X,e._encodedCameraPositionMC))}function H(e,t,r,n,o,a,l,u){var d=Q;d.x=e.y,d.y=e.z,d.z=e.x;var p=Z;p.x=r.y,p.y=r.z,p.z=r.x;var f=K;f.x=n.y,f.y=n.z,f.z=n.x;var g=J;g.x=t.y,g.y=t.z,g.z=t.x,a===_.SCENE2D&&(d.z=.5*o);var v=l.unproject(d,$);v.longitude=c.clamp(v.longitude,-Math.PI,Math.PI),v.latitude=c.clamp(v.latitude,-c.PI_OVER_TWO,c.PI_OVER_TWO);var y=l.ellipsoid,C=y.cartographicToCartesian(v,ee),b=m.eastNorthUpToFixedFrame(C,y,te);return h.multiplyByPointAsVector(b,p,p),h.multiplyByPointAsVector(b,f,f),h.multiplyByPointAsVector(b,g,g),s(u)||(u=new h),u[0]=p.x,u[1]=f.x,u[2]=-g.x,u[3]=0,u[4]=p.y,u[5]=f.y,u[6]=-g.y,u[7]=0,u[8]=p.z,u[9]=f.z,u[10]=-g.z,u[11]=0,u[12]=-i.dot(p,C),u[13]=-i.dot(f,C),u[14]=i.dot(g,C),u[15]=1,u}function W(e){e._view3DDirty&&(e._mode===_.SCENE3D?h.clone(e._view,e._view3D):H(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),h.getRotation(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function q(e){e._inverseView3DDirty&&(h.inverseTransformation(e.view3D,e._inverseView3D),h.getRotation(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}l(v.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(t){if(!e.equals(t,this._viewport)){e.clone(t,this._viewport);var i=this._viewport,r=this._viewportCartesian4;r.x=i.x,r.y=i.y,r.z=i.width,r.w=i.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return w(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return w(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){h.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,h.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,h.getRotation(this.inverseModel,e),d.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return W(this),this._view3D}},viewRotation:{get:function(){return W(this),this._viewRotation}},viewRotation3D:{get:function(){return W(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return q(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return q(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return A(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return x(this),this._modelView}},modelView3D:{get:function(){return P(this),this._modelView3D}},modelViewRelativeToEye:{get:function()
function s(e){var t="An error occurred while accessing "+S._resource.url+".";b=m.handleError(b,S,S._errorEvent,t,void 0,void 0,void 0,u),S._readyPromise.reject(new f(t))}function u(){var e=S._resource.getDerivedResource({queryParameters:{f:"json"}}),t=e.fetchJsonp();v(t,a,s)}i=n(i,{});var d=p.createIfNeeded(i.url);d.appendForwardSlash(),o(i.token)&&d.setQueryParameters({token:i.token}),this._resource=d,this._tileDiscardPolicy=i.tileDiscardPolicy,this._tileWidth=n(i.tileWidth,256),this._tileHeight=n(i.tileHeight,256),this._maximumLevel=i.maximumLevel,this._tilingScheme=n(i.tilingScheme,new c({ellipsoid:i.ellipsoid})),this._useTiles=n(i.usePreCachedTilesIfAvailable,!0),this._rectangle=n(i.rectangle,this._tilingScheme.rectangle),this._layers=i.layers;var C=i.credit;"string"==typeof C&&(C=new r(C)),this._credit=C,this.enablePickFeatures=n(i.enablePickFeatures,!0),this._errorEvent=new l,this._ready=!1,this._readyPromise=v.defer();var b,S=this;this._useTiles?u():(this._ready=!0,this._readyPromise.resolve(!0))}function T(e,t,i,r,n){var o;if(e._useTiles)o=e._resource.getDerivedResource({url:"tile/"+r+"/"+i+"/"+t,request:n});else{var a=e._tilingScheme.tileXYToNativeRectangle(t,i,r),s=a.west+","+a.south+","+a.east+","+a.north,l={bbox:s,size:e._tileWidth+","+e._tileHeight,format:"png",transparent:!0,f:"image"};e._tilingScheme.projection instanceof u?(l.bboxSR=4326,l.imageSR=4326):(l.bboxSR=3857,l.imageSR=3857),e.layers&&(l.layers="show:"+e.layers),o=e._resource.getDerivedResource({url:"export",request:n,queryParameters:l})}return o}return a(S.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}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),S.prototype.getTileCredits=function(e,t,i){},S.prototype.requestImage=function(e,t,i,r){return b.loadImage(this,T(this,e,t,i,r))},S.prototype.pickFeatures=function(e,r,n,a,s){if(this.enablePickFeatures){var l,c,h,p=this._tilingScheme.tileXYToNativeRectangle(e,r,n);if(this._tilingScheme.projection instanceof u)l=d.toDegrees(a),c=d.toDegrees(s),h="4326";else{var f=this._tilingScheme.projection.project(new i(a,s,0));l=f.x,c=f.y,h="3857"}var m="visible";o(this._layers)&&(m+=":"+this._layers);var g={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:l+","+c,mapExtent:p.west+","+p.south+","+p.east+","+p.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:h,layers:m};return this._resource.getDerivedResource({url:"identify",queryParameters:g}).fetchJson().then(function(e){var r=[],n=e.results;if(!o(n))return r;for(var a=0;a<n.length;++a){var s=n[a],l=new C;if(l.data=s,l.name=s.value,l.properties=s.attributes,l.configureDescriptionFromProperties(s.attributes),"esriGeometryPoint"===s.geometryType&&s.geometry){var u=s.geometry.spatialReference&&s.geometry.spatialReference.wkid?s.geometry.spatialReference.wkid:4326;if(4326===u||4283===u)l.position=i.fromDegrees(s.geometry.x,s.geometry.y,s.geometry.z);else if(102100===u||900913===u||3857===u){var c=new _;l.position=c.unproject(new t(s.geometry.x,s.geometry.y,s.geometry.z))}}r.push(l)}return r})}},S}),define("Scene/AutoExposure",["../Core/Cartesian2","../Core/Color","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/PixelFormat","../Renderer/ClearCommand","../Renderer/Framebuffer","../Ren
type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},c=function(e){return e>=48&&e<=57},d=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!r[String.fromCharCode(e)]},h=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!r[String.fromCharCode(e)]},p=function(e){for(var n,p,f=0,m=e.charAt,_=e.charCodeAt,g=function(t){return m.call(e,t)},v=function(t){return _.call(e,t)},y=e.length,C=function(){for(var e=v(f);32===e||9===e;)e=v(++f)},b=function(){var e,i,r=T();return C(),63!==v(f)?r:(f++,e=b(),e||t("Expected expression",f),C(),58===v(f)?(f++,i=b(),i||t("Expected expression",f),{type:"ConditionalExpression",test:r,consequent:e,alternate:i}):void t("Expected :",f))},S=function(){C();for(var t=e.substr(f,a),i=t.length;i>0;){if(r.hasOwnProperty(t))return f+=i,t;t=t.substr(0,--i)}return!1},T=function(){var e,i,r,n,o,a,s,c;if(a=E(),!(i=S()))return a;for(o={value:i,prec:l(i)},s=E(),s||t("Expected expression after "+i,f),n=[a,o,s];(i=S())&&0!==(r=l(i));){for(o={value:i,prec:r};n.length>2&&r<=n[n.length-2].prec;)s=n.pop(),i=n.pop().value,a=n.pop(),e=u(i,a,s),n.push(e);e=E(),e||t("Expected expression after "+i,f),n.push(o,e)}for(c=n.length-1,e=n[c];c>1;)e=u(n[c-1].value,n[c-2],e),c-=2;return e},E=function(){var t,r,n;if(C(),t=v(f),c(t)||46===t)return w();if(39===t||34===t)return A();if(d(t)||40===t)return D();if(91===t)return M();for(r=e.substr(f,o),n=r.length;n>0;){if(i.hasOwnProperty(r))return f+=n,{type:"UnaryExpression",operator:r,argument:E(),prefix:!0};r=r.substr(0,--n)}return!1},w=function(){for(var e,i,r="";c(v(f));)r+=g(f++);if(46===v(f))for(r+=g(f++);c(v(f));)r+=g(f++);if("e"===(e=g(f))||"E"===e){for(r+=g(f++),e=g(f),"+"!==e&&"-"!==e||(r+=g(f++));c(v(f));)r+=g(f++);c(v(f-1))||t("Expected exponent ("+r+g(f)+")",f)}return i=v(f),d(i)?t("Variable names cannot start with a number ("+r+g(f)+")",f):46===i&&t("Unexpected period",f),{type:"Literal",value:parseFloat(r),raw:r}},A=function(){for(var e,i="",r=g(f++),n=!1;f<y;){if((e=g(f++))===r){n=!0;break}if("\\"===e)switch(e=g(f++)){case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;default:i+="\\"+e}else i+=e}return n||t('Unclosed quote after "'+i+'"',f),{type:"Literal",value:i,raw:r+i+r}},x=function(){var i,r=v(f),n=f;for(d(r)?f++:t("Unexpected "+g(f),f);f<y&&(r=v(f),h(r));)f++;return i=e.slice(n,f),s.hasOwnProperty(i)?{type:"Literal",value:s[i],raw:i}:"this"===i?{type:"ThisExpression"}:{type:"Identifier",name:i}},P=function(e){for(var i,r,n=[],o=!1;f<y;){if(C(),(i=v(f))===e){o=!0,f++;break}44===i?f++:(r=b(),r&&"Compound"!==r.type||t("Expected comma",f),n.push(r))}return o||t("Expected "+String.fromCharCode(e),f),n},D=function(){var e,i;for(e=v(f),i=40===e?I():x(),C(),e=v(f);46===e||91===e||40===e;)f++,46===e?(C(),i={type:"MemberExpression",computed:!1,object:i,property:x()}):91===e?(i={type:"MemberExpression",computed:!0,object:i,property:b()},C(),e=v(f),93!==e&&t("Unclosed [",f),f++):40===e&&(i={type:"CallExpression",arguments:P(41),callee:i}),C(),e=v(f);return i},I=function(){f++;var e=b();if(C(),41===v(f))return f++,e;t("Unclosed (",f)},M=function(){return f++,{type:"ArrayExpression",elements:P(93)}},R=[];f<y;)n=v(f),59===n||44===n?f++:(p=b())?R.push(p):f<y&&t('Unexpected "'+g(f)+'"',f);return 1===R.length?R[0]:{type:"Compound",body:R}};if(p.version="0.3.1",p.toString=function(){return"JavaScript Expression Parser (JSEP) v"+p.version},p.addUnaryOp=function(e){return o=Math.max(e.length,o),i[e]=!0,this},p.addBinaryOp=function(e,t){return a=Math.max(e.length,a),r[e]=t,this},p.addLiteral=function(e,t){return s[e]=t,this},p.removeUnaryOp=function(e){return delete i[e],e.length===o&&(o=n(i)),this},p.removeAllUnaryOps=function(){return i={},o=0,this},p.removeBinaryOp=function(e){return delete r[e],e.length===a&&(a=n(r)),this},p.removeAllBinaryOps=function(){return r={},a=0,this},p.removeLiteral=function(e){return delete s[e],this},p.removeAllLiterals=function(){return s={},this},"undefined"==typeof exports){
;return o(r)?r[1]:null},w.prototype._evaluateToString=function(r){var n=this._left.evaluate(r);if(n instanceof RegExp||n instanceof e||n instanceof t||n instanceof i)return String(n);throw new c('Unexpected function call "'+this._value+'".')},w.prototype.getShaderExpression=function(e,t,i){var r,a,s,u,d=this._type,p=this._value;switch(o(this._left)&&(a=l(this._left)?$(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),o(this._right)&&(s=this._right.getShaderExpression(e,t,this)),o(this._test)&&(u=this._test.getShaderExpression(e,t,this)),l(this._value)&&(p=$(this._value,e,t,this)),d){case h.VARIABLE:return e+p;case h.UNARY:if("Boolean"===p)return"bool("+a+")";if("Number"===p)return"float("+a+")";if("round"===p)return"floor("+a+" + 0.5)";if(o(le[p]))return p+"("+a+")";if("isNaN"===p||"isFinite"===p||"String"===p||"isExactClass"===p||"isClass"===p||"getExactClassName"===p)throw new c('Error generating style shader: "'+p+'" is not supported.');return o(le[p])?p+"("+a+")":p+a;case h.BINARY:return"%"===p?"mod("+a+", "+s+")":"==="===p?"("+a+" == "+s+")":"!=="===p?"("+a+" != "+s+")":"atan2"===p?"atan("+a+", "+s+")":o(ue[p])?p+"("+a+", "+s+")":"("+a+" "+p+" "+s+")";case h.TERNARY:if(o(ce[p]))return p+"("+a+", "+s+", "+u+")";break;case h.CONDITIONAL:return"("+u+" ? "+a+" : "+s+")";case h.MEMBER:return"r"===s||"x"===s||"0.0"===s?a+"[0]":"g"===s||"y"===s||"1.0"===s?a+"[1]":"b"===s||"z"===s||"2.0"===s?a+"[2]":"a"===s||"w"===s||"3.0"===s?a+"[3]":a+"[int("+s+")]";case h.FUNCTION_CALL:throw new c('Error generating style shader: "'+p+'" is not supported.');case h.ARRAY:if(4===p.length)return"vec4("+p[0]+", "+p[1]+", "+p[2]+", "+p[3]+")";if(3===p.length)return"vec3("+p[0]+", "+p[1]+", "+p[2]+")";if(2===p.length)return"vec2("+p[0]+", "+p[1]+")";throw new c("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case h.REGEX:throw new c("Error generating style shader: Regular expressions are not supported.");case h.VARIABLE_IN_STRING:throw new c("Error generating style shader: Converting a variable to a string is not supported.");case h.LITERAL_NULL:throw new c("Error generating style shader: null is not supported.");case h.LITERAL_BOOLEAN:return p?"true":"false";case h.LITERAL_NUMBER:return Z(p);case h.LITERAL_STRING:if(o(i)&&i._type===h.MEMBER&&("r"===p||"g"===p||"b"===p||"a"===p||"x"===p||"y"===p||"z"===p||"w"===p))return p;if(r=n.fromCssColorString(p,se),o(r))return K(r);throw new c("Error generating style shader: String literals are not supported.");case h.LITERAL_COLOR:var f=a;if("color"===p){if(!o(f))return"vec4(1.0)";if(f.length>1){var m=f[0],_=f[1];return"1.0"!==_&&(t.translucent=!0),"vec4("+m+", "+_+")"}return"vec4("+f[0]+", 1.0)"}if("rgb"===p)return r=Q(this),o(r)?J(r):"vec4("+f[0]+" / 255.0, "+f[1]+" / 255.0, "+f[2]+" / 255.0, 1.0)";if("rgba"===p)return"1.0"!==f[3]&&(t.translucent=!0),r=Q(this),o(r)?J(r):"vec4("+f[0]+" / 255.0, "+f[1]+" / 255.0, "+f[2]+" / 255.0, "+f[3]+")";if("hsl"===p)return r=X(this),o(r)?J(r):"vec4(czm_HSLToRGB(vec3("+f[0]+", "+f[1]+", "+f[2]+")), 1.0)";if("hsla"===p)return r=X(this),o(r)?(1!==r.alpha&&(t.translucent=!0),J(r)):("1.0"!==f[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+f[0]+", "+f[1]+", "+f[2]+")), "+f[3]+")");break;case h.LITERAL_VECTOR:for(var g=a.length,v=p+"(",y=0;y<g;++y)v+=a[y],y<g-1&&(v+=", ");return v+=")";case h.LITERAL_REGEX:throw new c("Error generating style shader: Regular expressions are not supported.");case h.LITERAL_UNDEFINED:throw new c("Error generating style shader: undefined is not supported.");case h.BUILTIN_VARIABLE:if("tiles3d_tileset_time"===p)return"u_time"}},p}),define("Scene/Vector3DTilePrimitive",["../Core/Cartesian3","../Core/Color","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/IndexDatatype","../Core/Matrix4","../Core/PrimitiveType","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/Pass","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","..
;return n(r)?r(t):t}}function D(e){return function(t,i){e._model.updateCommands(t,i)}}function I(t,o,a){var s=t._tileset,l=t._tile,u=t._resource,f=r(a,0);a=f;var v=new Uint8Array(o),S=new DataView(o);a+=R;var E=S.getUint32(a,!0);if(1!==E)throw new p("Only Batched 3D Model version 1 is supported. Version "+E+" is not.");a+=R;var I=S.getUint32(a,!0);a+=R;var M=S.getUint32(a,!0);a+=R;var O=S.getUint32(a,!0);a+=R;var L=S.getUint32(a,!0);a+=R;var N=S.getUint32(a,!0);a+=R;var F;L>=570425344?(a-=2*R,F=M,L=O,N=0,M=0,O=0,T._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/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Batched3DModel.")):N>=570425344&&(a-=R,F=L,L=M,N=O,M=0,O=0,T._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/AnalyticalGraphicsInc/3d-tiles/tree/master/specification/TileFormats/Batched3DModel."));var B;if(0===M)B={BATCH_LENGTH:r(F,0)};else{var z=c(v,a,M);B=JSON.parse(z),a+=M}var k=new Uint8Array(o,a,O);a+=O;var V=new y(B,k);F=V.getGlobalProperty("BATCH_LENGTH"),V.featuresLength=F;var U,G;if(L>0){var H=c(v,a,L);U=JSON.parse(H),a+=L,N>0&&(G=new Uint8Array(o,a,N),G=new Uint8Array(G),a+=N)}var W;n(s.classificationType)&&(W=D(t));var q=new g(t,F,U,G,W);t._batchTable=q;var Y=f+I-a;if(0===Y)throw new p("glTF byte length must be greater than 0.");var j;a%4==0?j=new Uint8Array(o,a,Y):(T._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),j=new Uint8Array(v.subarray(a,a+Y)));var X={content:t,primitive:s};t._rtcCenterTransform=d.IDENTITY;var Q=V.getGlobalProperty("RTC_CENTER",i.FLOAT,3);n(Q)&&(t._rtcCenterTransform=d.fromTranslation(e.fromArray(Q))),t._contentModelMatrix=d.multiply(l.computedTransform,t._rtcCenterTransform,new d),n(s.classificationType)?t._model=new C({gltf:j,cull:!1,basePath:u,requestType:h.TILES3D,modelMatrix:t._contentModelMatrix,upAxis:s._gltfUpAxis,forwardAxis:_.X,debugWireframe:s.debugWireframe,vertexShaderLoaded:w(t),classificationShaderLoaded:P(t),uniformMapLoaded:q.getUniformMapCallback(),pickIdLoaded:x(t),classificationType:s._classificationType,batchTable:q}):t._model=new b({gltf:j,cull:!1,releaseGltfJson:!0,opaquePass:m.CESIUM_3D_TILE,basePath:u,requestType:h.TILES3D,modelMatrix:t._contentModelMatrix,upAxis:s._gltfUpAxis,forwardAxis:_.X,shadows:s.shadows,debugWireframe:s.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:w(t),fragmentShaderLoaded:A(t),uniformMapLoaded:q.getUniformMapCallback(),pickIdLoaded:x(t),addBatchIdToGeneratedShaders:F>0,pickObject:X,imageBasedLightingFactor:s.imageBasedLightingFactor,lightColor:s.lightColor,luminanceAtZenith:s.luminanceAtZenith,sphericalHarmonicCoefficients:s.sphericalHarmonicCoefficients,specularEnvironmentMaps:s.specularEnvironmentMaps})}function M(e){var t=e.featuresLength;if(!n(e._features)&&t>0){for(var i=new Array(t),r=0;r<t;++r)i[r]=new v(e,r);e._features=i}}if(!u.supportsTypedArrays())return{};T._deprecationWarning=a,o(T.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},
;var n=gt;n.longitude=t.east,n.latitude=t.north;var o=r.project(n,vt);n.longitude=t.west,n.latitude=t.south;var a,s,l=r.project(n,yt),u=.5*Math.abs(o.x-l.x),c=.5*Math.abs(o.y-l.y),d=e.frustum.right/e.frustum.top,h=c*d;return u>h?(a=u,s=a/d):(s=c,a=h),c=Math.max(2*a,2*s),i.x=.5*(o.x-l.x)+l.x,i.y=.5*(o.y-l.y)+l.y,n=r.unproject(i,n),n.height=c,i=r.project(n,i)}function J(e,t,i,r){i=o(i,c.WGS84);var n=e.getPickRay(t,Ct),a=_.rayEllipsoid(n,i);if(a){var s=a.start>0?a.start:a.stop;return E.getPoint(n,s,r)}}function $(e,t,r,n){var o=e.getPickRay(t,bt),a=o.origin;a=i.fromElements(a.y,a.z,0,a);var s=r.unproject(a);if(!(s.latitude<-g.PI_OVER_TWO||s.latitude>g.PI_OVER_TWO))return r.ellipsoid.cartographicToCartesian(s,n)}function ee(e,t,r,n){var o=e.getPickRay(t,St),a=-o.origin.x/o.direction.x;E.getPoint(o,a,n);var s=r.unproject(new i(n.y,n.z,0));if(!(s.latitude<-g.PI_OVER_TWO||s.latitude>g.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return r.ellipsoid.cartographicToCartesian(s,n)}function te(e,t,r){var n=e._scene.canvas,o=n.clientWidth,a=n.clientHeight,s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=e.frustum.near,c=2/o*t.x-1,d=2/a*(a-t.y)-1,h=e.positionWC;i.clone(h,r.origin);var p=i.multiplyByScalar(e.directionWC,u,Tt);i.add(h,p,p);var f=i.multiplyByScalar(e.rightWC,c*u*l,Et),m=i.multiplyByScalar(e.upWC,d*u*s,wt),_=i.add(p,f,r.direction);return i.add(_,m,_),i.subtract(_,h,_),i.normalize(_,_),r}function ie(e,t,r){var n=e._scene.canvas,o=n.clientWidth,s=n.clientHeight,l=e.frustum;a(l._offCenterFrustum)&&(l=l._offCenterFrustum);var u=2/o*t.x-1;u*=.5*(l.right-l.left);var c=2/s*(s-t.y)-1;c*=.5*(l.top-l.bottom);var d=r.origin;return i.clone(e.position,d),i.multiplyByScalar(e.right,u,At),i.add(At,d,d),i.multiplyByScalar(e.up,c,At),i.add(At,d,d),i.clone(e.directionWC,r.direction),e._mode!==D.COLUMBUS_VIEW&&e._mode!==D.SCENE2D||i.fromElements(r.origin.z,r.origin.x,r.origin.y,r.origin),r}function re(e,t,r,n,o,a){function s(r){var n=i.lerp(t,l,r.time,new i);e.worldToCameraCoordinatesPoint(n,e.position)}var l=i.clone(t);return r.y>n?l.y-=r.y-n:r.y<-n&&(l.y+=-n-r.y),r.z>o?l.z-=r.z-o:r.z<-o&&(l.z+=-o-r.z),{easingFunction:u.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:a,update:s}}function ne(e,t){var r=e.position,n=e.direction,o=e.worldToCameraCoordinatesVector(i.UNIT_X,It),a=-i.dot(o,r)/i.dot(o,n),s=i.add(r,i.multiplyByScalar(n,a,Mt),Mt);e.cameraToWorldCoordinatesPoint(s,s),r=e.cameraToWorldCoordinatesPoint(e.position,Rt);var l=Math.tan(.5*e.frustum.fovy),u=e.frustum.aspectRatio*l,c=i.magnitude(i.subtract(r,s,Ot)),d=u*c,h=l*c,p=e._maxCoord.x,f=e._maxCoord.y,m=Math.max(d-p,p),_=Math.max(h-f,f);if(r.z<-m||r.z>m||r.y<-_||r.y>_){var g=s.y<-m||s.y>m,v=s.z<-_||s.z>_;if(g||v)return re(e,r,s,m,_,t)}}function oe(e,t){var i=e.frustum,r=Math.tan(.5*i.fovy),n=i.aspectRatio*r;return Math.max(t/n,t/r)}function ae(e,t){var i=e.frustum;a(i._offCenterFrustum)&&(i=i._offCenterFrustum);var r,n,o=i.right/i.top,s=t*o;return t>s?(r=t,n=r/o):(n=t,r=s),1.5*Math.max(r,n)}function se(e,t,i){a(i)||(i=p.clone(I.DEFAULT_OFFSET));var r=e._scene.screenSpaceCameraController.minimumZoomDistance,n=e._scene.screenSpaceCameraController.maximumZoomDistance,o=i.range;if(!a(o)||0===o){var s=t.radius;0===s?i.range=Ft:e.frustum instanceof C||e._mode===D.SCENE2D?i.range=ae(e,s):i.range=oe(e,s),i.range=g.clamp(i.range,r,n)}return i}function le(e,t){var r,n,o=t.radii,a=e.positionWC,s=i.multiplyComponents(t.oneOverRadii,a,qt),l=i.magnitude(s),u=i.normalize(s,Yt);i.equalsEpsilon(u,i.UNIT_Z,g.EPSILON10)?(r=new i(0,1,0),n=new i(0,0,1)):(r=i.normalize(i.cross(i.UNIT_Z,u,jt),jt),n=i.normalize(i.cross(u,r,Xt),Xt));var c=Math.sqrt(i.magnitudeSquared(s)-1),d=i.multiplyByScalar(u,1/l,qt),h=c/l,p=i.multiplyByScalar(r,h,Yt),f=i.multiplyByScalar(n,h,jt),m=i.add(d,f,Qt[0]);i.subtract(m,p,m),i.multiplyComponents(o,m,m);var _=i.subtract(d,f,Qt[1]);i.subtract(_,p,_),i.multiplyComponents(o,_,_);var v=i.subtract(d,f,Qt[2]);i.add(v,p,v),i.multiplyComponents(o,v,v);var y=i.add(d,f,Qt[3]);return i.add(y,p,y),i.multiplyComponents(o,y,y),Qt}function ue(e,t,i,r,n,o){Zt.
batchIds:g})}return o}function g(t){if(!o(t._primitive)){if(!o(t._verticesPromise)){var i=t._boxes,r=t._boxBatchIds,a=t._cylinders,s=t._cylinderBatchIds,l=t._ellipsoids,u=t._ellipsoidBatchIds,c=t._spheres,d=t._sphereBatchIds,h=t._batchTableColors,f=t._packedBuffer;if(!o(h)){var g=0;o(t._boxes)&&(i=t._boxes=e(i),r=t._boxBatchIds=e(r),g+=r.length),o(t._cylinders)&&(a=t._cylinders=e(a),s=t._cylinderBatchIds=e(s),g+=s.length),o(t._ellipsoids)&&(l=t._ellipsoids=e(l),u=t._ellipsoidBatchIds=e(u),g+=u.length),o(t._spheres)&&(c=t._sphere=e(c),d=t._sphereBatchIds=e(d),g+=d.length),h=t._batchTableColors=new Uint32Array(g);for(var C=t._batchTable,b=0;b<g;++b){var S=C.getColor(b,y);h[b]=S.toRgba()}f=t._packedBuffer=m(t)}var T=[];o(i)&&T.push(i.buffer,r.buffer),o(a)&&T.push(a.buffer,s.buffer),o(l)&&T.push(l.buffer,u.buffer),o(c)&&T.push(c.buffer,d.buffer),T.push(h.buffer,f.buffer);var E={boxes:o(i)?i.buffer:void 0,boxBatchIds:o(i)?r.buffer:void 0,cylinders:o(a)?a.buffer:void 0,cylinderBatchIds:o(a)?s.buffer:void 0,ellipsoids:o(l)?l.buffer:void 0,ellipsoidBatchIds:o(l)?u.buffer:void 0,spheres:o(c)?c.buffer:void 0,sphereBatchIds:o(c)?d.buffer:void 0,batchTableColors:h.buffer,packedBuffer:f.buffer},w=t._verticesPromise=v.scheduleTask(E,T);if(!o(w))return;w.then(function(e){var i=new Float64Array(e.packedBuffer),r=_(t,i);t._indices=2===r?new Uint16Array(e.indices):new Uint32Array(e.indices),t._indexOffsets=new Uint32Array(e.indexOffsets),t._indexCounts=new Uint32Array(e.indexCounts),t._positions=new Float32Array(e.positions),t._vertexBatchIds=new Uint16Array(e.vertexBatchIds),t._batchIds=new Uint16Array(e.batchIds),t._ready=!0})}t._ready&&!o(t._primitive)&&(t._primitive=new p({batchTable:t._batchTable,positions:t._positions,batchIds:t._batchIds,vertexBatchIds:t._vertexBatchIds,indices:t._indices,indexOffsets:t._indexOffsets,indexCounts:t._indexCounts,batchedIndices:t._batchedIndices,boundingVolume:t._boundingVolume,boundingVolumes:t._boundingVolumes,center:t._center,pickObject:n(t._pickObject,t)}),t._boxes=void 0,t._boxBatchIds=void 0,t._cylinders=void 0,t._cylinderBatchIds=void 0,t._ellipsoids=void 0,t._ellipsoidBatchIds=void 0,t._spheres=void 0,t._sphereBatchIds=void 0,t._center=void 0,t._modelMatrix=void 0,t._batchTable=void 0,t._boundingVolume=void 0,t._boundingVolumes=void 0,t._batchedIndices=void 0,t._indices=void 0,t._indexOffsets=void 0,t._indexCounts=void 0,t._positions=void 0,t._vertexBatchIds=void 0,t._batchIds=void 0,t._batchTableColors=void 0,t._packedBuffer=void 0,t._verticesPromise=void 0,t._readyPromise.resolve())}}a(f.prototype,{trianglesLength:{get:function(){return o(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return o(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}}),f.packedBoxLength=l.packedLength+i.packedLength,f.packedCylinderLength=l.packedLength+2,f.packedEllipsoidLength=l.packedLength+i.packedLength,f.packedSphereLength=i.packedLength+1;var v=new u("createVectorTileGeometries"),y=new r;return f.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},f.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},f.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},f.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},f.prototype.update=function(e){g(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},f.prototype.isDestroyed=function(){return!1},f.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),s(this)},f}),define("Scene/Geometry3DTileContent",["../Core/Cartesian3","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Ellipsoid","../Core/FeatureDetection","../Core/getMagic","../Core/getStringFromTypedArray","../Core/Math","../Core/Matrix4","../Core/
define("Scene/PointCloud",["../Core/arraySlice","../Core/BoundingSphere","../Core/Cartesian3","../Core/Cartesian4","../Core/Math","../Core/Check","../Core/Color","../Core/combine","../Core/ComponentDatatype","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/FeatureDetection","../Core/getStringFromTypedArray","../Core/Matrix4","../Core/oneTimeWarning","../Core/OrthographicFrustum","../Core/Plane","../Core/PrimitiveType","../Core/RuntimeError","../Core/Transforms","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/DrawCommand","../Renderer/Pass","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/VertexArray","../ThirdParty/when","./BlendingState","./Cesium3DTileBatchTable","./Cesium3DTileFeature","./Cesium3DTileFeatureTable","./DracoLoader","./getClipAndStyleCode","./getClippingFunction","./SceneMode","./ShadowMode"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E,w,A,x,P,D,I,M,R,O,L,N,F,B,z,k){"use strict";function V(e){this._parsedContent=void 0,this._drawCommand=void 0,this._isTranslucent=!1,this._styleTranslucent=!1,this._constantColor=a.clone(a.DARKGRAY),this._highlightColor=a.clone(a.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=J.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._readyPromise=I.defer(),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=u(e.opaquePass,w.OPAQUE),this._cull=u(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=k.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,U(this,e)}function U(t,r){var n=r.arrayBuffer,o=u(r.byteOffset,0),d=new Uint8Array(n),h=new DataView(n);o+=ee;var p=h.getUint32(o,!0);if(1!==p)throw new C("Only Point Cloud tile version 1 is supported. Version "+p+" is not.");o+=ee,o+=ee;var m=h.getUint32(o,!0);if(0===m)throw new C("Feature table must have a byte length greater than zero");o+=ee;var _=h.getUint32(o,!0);o+=ee;var g=h.getUint32(o,!0);o+=ee;var v=h.getUint32(o,!0);o+=ee;var y=f(d,o,m),b=JSON.parse(y);o+=m;var S=new Uint8Array(n,o,_);o+=_;var T,E;if(g>0){var w=f(d,o,g);T=JSON.parse(w),o+=g,v>0&&(E=new Uint8Array(n,o,v),o+=v)}var A=new L(b,S),x=A.getGlobalProperty("POINTS_LENGTH");if(A.featuresLength=x,!c(x))throw new C("Feature table global property: POINTS_LENGTH must be defined");var P=A.getGlobalProperty("RTC_CENTER",l.FLOAT,3);c(P)&&(t._rtcCenter=i.unpack(P));var D,I,M,O,N,F,B,z=!1,k=!1,V=!1,U=!1,G=!1,H=!1,W=!1,q=!1,Y=c(b.extensions)?b.extensions["3DTILES_draco_point_compression"]:void 0,j=c(T)&&c(T.extensions)?T.extensions["3DTILES_draco_point_compression"]:void 0;if(c(j)&&(B=j.properties),c(Y)){F=Y.properties;var X=Y.byteOffset,Q=Y.byteLength;if(!c(F)||!c(X)||!c(Q))throw new C("Draco properties, byteOffset, and byteLength must be defined");N=e(S,X,X+Q),z=c(F.POSITION),k=c(F.RGB)||c(F.RGBA),V=c(F.NORMAL),U=c(F.BATCH_ID),H=c(F.RGBA),t._decodingState=J.NEEDS_DECODE}var Z;if(c(N)&&(Z={buffer:N,featureTableProperties:F,batchTableProperties:B,properties:s(F,B),dequa
a.defaultPointSize=8,a.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},a.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},a.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},a.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},a.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},a.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},a.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},a}),define("Scene/Vector3DTilePoints",["../Core/arraySlice","../Core/Cartesian2","../Core/Cartesian3","../Core/Color","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DistanceDisplayCondition","../Core/Ellipsoid","../Core/NearFarScalar","../Core/Rectangle","../Core/TaskProcessor","../ThirdParty/when","./BillboardCollection","./Cesium3DTilePointFeature","./HorizontalOrigin","./LabelCollection","./LabelStyle","./PolylineCollection","./VerticalOrigin"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y){"use strict";function C(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._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=h.defer(),this._resolvedPromise=!1}function b(e,t){var i=e._rectangle,r=e._minHeight,n=e._maxHeight,o=2+c.packedLength+l.packedLength,a=new Float64Array(o),s=0;return a[s++]=r,a[s++]=n,c.pack(i,a,s),s+=c.packedLength,l.pack(t,a,s),a}function S(t,r){if(!n(t._billboardCollection)){var o;if(!n(t._verticesPromise)){o=t._positions;var a=t._packedBuffer;n(a)||(o=t._positions=e(o),t._batchIds=e(t._batchIds),a=t._packedBuffer=b(t,r));var s=[o.buffer,a.buffer],l={positions:o.buffer,packedBuffer:a.buffer},u=t._verticesPromise=E.scheduleTask(l,s);if(!n(u))return;u.then(function(e){t._positions=new Float64Array(e.positions),t._ready=!0})}if(t._ready&&!n(t._billboardCollection)){o=t._positions;var c=t._batchTable,d=t._batchIds,h=t._billboardCollection=new p({batchTable:c}),f=t._labelCollection=new _({batchTable:c}),m=t._polylineCollection=new v;m._useHighlightColor=!0;for(var g=o.length/3,y=0;y<g;++y){var C=d[y],S=i.unpack(o,3*y,w),T=h.add();T.position=S,T._batchIndex=C;var A=f.add();A.text=" ",A.position=S,A._batchIndex=C;m.add().positions=[i.clone(S),i.clone(S)]}t._positions=void 0,t._packedBuffer=void 0}}}function T(e,i){for(var n=e._batchIds,o=n.length,a=0;a<o;++a){var s=n[a],l=i[s];l.show=!0,l.pointSize=f.defaultPointSize,l.color=f.defaultColor,l.pointOutlineColor=f.defaultPointOutlineColor,l.pointOutlineWidth=f.defaultPointOutlineWidth,l.labelColor=r.WHITE,l.labelOutlineColor=r.WHITE,l.labelOutlineWidth=1,l.font="30px sans-serif",l.labelStyle=g.FILL,l.labelText=void 0,l.backgroundColor=new r(.165,.165,.165,.8),l.backgroundPadding=new t(7,5),l.backgroundEnabled=!1,l.scaleByDistance=void 0,l.translucencyByDistance=void 0,l.distanceDisplayCondition=void 0,l.heightOffset=0,l.anchorLineEnabled=!1,l.anchorLineColor=r.WHITE,l.image=void 0,l.disableDepthTestDistance=0,l.horizontalOrigin=m.CENTER,l.verticalOrigin=y.CENTER,l.labelHorizontalOrigin=m.RIGHT,l.labelVerticalOrigin=y.BASELINE}}o(C.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var E=new d("createVectorTilePoints"),w=new i;C.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,r=this._labelCollection,n=this._polylineCollection,o=this._batchIds,a=o.length,s
;var I=h.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,P);u.rayPlane(D,I,e.northeastCornerCartesian),v=r.geodeticSurfaceNormal(C,S)}else v=r.geodeticSurfaceNormalCartographic(f.northwest(i),S);var M=t.cross(c,v,T);t.normalize(M,e.northNormal)}a(y.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});var b=new t,S=new t,T=new t,E=new t,w=new t,A=new t,x=new i,P=new h(t.UNIT_X,0),D=new p,I=new t,M=new t,R=new t(0,-1,0),O=new t(0,0,-1),L=new t;return y.prototype.distanceToCamera=function(e){var i=e.camera,r=i.positionWC,n=i.positionCartographic,o=0;if(!f.contains(this.rectangle,n)){var a=this.southwestCornerCartesian,s=this.northeastCornerCartesian,l=this.westNormal,u=this.southNormal,c=this.eastNormal,d=this.northNormal;e.mode!==v.SCENE3D&&(a=e.mapProjection.project(f.southwest(this.rectangle),I),a.z=a.y,a.y=a.x,a.x=0,s=e.mapProjection.project(f.northeast(this.rectangle),M),s.z=s.y,s.y=s.x,s.x=0,l=R,c=t.UNIT_Y,u=O,d=t.UNIT_Z);var h=t.subtract(r,a,L),p=t.dot(h,l),m=t.dot(h,u),_=t.subtract(r,s,L),g=t.dot(_,c),y=t.dot(_,d);p>0?o+=p*p:g>0&&(o+=g*g),m>0?o+=m*m:y>0&&(o+=y*y)}var C;C=e.mode===v.SCENE3D?n.height:r.x;var b=e.mode===v.SCENE3D?this.maximumHeight:0,S=C-b;return S>0&&(o+=S*S),Math.sqrt(o)},y.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},y.prototype.createDebugVolume=function(e){var t=new c.clone(c.IDENTITY),i=new m({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),r=new l({geometry:i,id:"outline",modelMatrix:t,attributes:{color:n.fromColor(e)}});return new g({geometryInstances:r,appearance:new _({translucent:!1,flat:!0}),asynchronous:!1})},y}),define("Scene/TileBoundingSphere",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Check","../Core/ColorGeometryInstanceAttribute","../Core/defineProperties","../Core/GeometryInstance","../Core/Matrix4","../Core/SphereOutlineGeometry","./PerInstanceColorAppearance","./Primitive"],function(e,t,i,r,n,o,a,s,l,u){"use strict";function c(t,i){this._boundingSphere=new e(t,i)}return n(c.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}}}),c.prototype.distanceToCamera=function(e){var i=this._boundingSphere;return Math.max(0,t.distance(i.center,e.camera.positionWC)-i.radius)},c.prototype.intersectPlane=function(t){return e.intersectPlane(this._boundingSphere,t)},c.prototype.update=function(e,i){t.clone(e,this._boundingSphere.center),this._boundingSphere.radius=i},c.prototype.createDebugVolume=function(e){var t=new s({radius:this.radius}),i=a.fromTranslation(this.center,new a.clone(a.IDENTITY)),n=new o({geometry:t,id:"outline",modelMatrix:i,attributes:{color:r.fromColor(e)}});return new u({geometryInstances:n,appearance:new l({translucent:!1,flat:!0}),asynchronous:!1})},c}),define("Scene/TileOrientedBoundingBox",["../Core/BoundingSphere","../Core/BoxOutlineGeometry","../Core/Cartesian3","../Core/Check","../Core/ColorGeometryInstanceAttribute","../Core/defineProperties","../Core/GeometryInstance","../Core/Matrix3","../Core/Matrix4","../Core/OrientedBoundingBox","./PerInstanceColorAppearance","./Primitive"],function(e,t,i,r,n,o,a,s,l,u,c,d){"use strict";function h(t,i){this._orientedBoundingBox=new u(t,i),this._boundingSphere=e.fromOrientedBoundingBox(this._orientedBoundingBox)}return o(h.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),h.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))},h.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)},h.prototype.update=function(t,r){i.clone(t,this._orientedBoundingBox.center),s.clone(r,this._orientedBoundingBox.halfAxes),e.fromOrientedBoundingBox(this._orientedBoundingBox,th
var r=!0,n=N.stack;for(n.push(t);n.length>0;){N.stackMaximumLength=Math.max(N.stackMaximumLength,n.length);var o=n.pop(),s=o.children,l=s.length,u=E(o)&&I(e,o);if(u||o.contentAvailable||(r=!1),T(e,o,i),a(o)||(v(e,o,i),_(e,o,i)),u)for(var c=0;c<l;++c){var d=s[c];n.push(d)}}return r}function O(t,i,r){var o,s=B.stack,l=B.ancestorStack;for(s.push(i);s.length>0||l.length>0;){if(B.stackMaximumLength=Math.max(B.stackMaximumLength,s.length),B.ancestorStackMaximumLength=Math.max(B.ancestorStackMaximumLength,l.length),l.length>0){var u=l.peek();if(u._stackLength===s.length){l.pop(),u!==o&&(u._finalResolution=!1),h(t,u,r);continue}}var c=s.pop();if(e(c)){var d=c.refine===n.ADD,p=c._shouldSelect,f=c.children,m=f.length,_=I(t,c);if(p)if(d)h(t,c,r);else{if(c._selectionDepth=l.length,c._selectionDepth>0&&(t._hasMixedContent=!0),o=c,!_){h(t,c,r);continue}l.push(c),c._stackLength=s.length}if(_)for(var g=0;g<m;++g){var v=f[g];a(v)&&s.push(v)}}}}var L={stack:new i,stackMaximumLength:0},N={stack:new i,stackMaximumLength:0},F={stack:new i,stackMaximumLength:0},B={stack:new i,stackMaximumLength:0,ancestorStack:new i,ancestorStackMaximumLength:0},z=2;return o.selectTiles=function(e,t){if(e._requestedTiles.length=0,!e.debugFreezeFrame){e._selectedTiles.length=0,e._selectedTilesToStyle.length=0,e._emptyTiles.length=0,e._hasMixedContent=!1;var i=e.root;if(T(e,i,t),a(i)&&!(i.getScreenSpaceError(t,!0)<=e._maximumScreenSpaceError))return c(e)?e.immediatelyLoadDesiredLevelOfDetail?l(e,i,t):u(e,i,t):s(e,i,t),L.stack.trim(L.stackMaximumLength),N.stack.trim(N.stackMaximumLength),F.stack.trim(F.stackMaximumLength),B.stack.trim(B.stackMaximumLength),B.ancestorStack.trim(B.ancestorStackMaximumLength),!0}},o}),define("Scene/Cesium3DTileStyleEngine",["../Core/defined","../Core/defineProperties"],function(e,t){"use strict";function i(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}return t(i.prototype,{style:{get:function(){return this._style},set:function(e){this._style=e,this._styleDirty=!0}}}),i.prototype.makeDirty=function(){this._styleDirty=!0},i.prototype.applyStyle=function(t,i){if(t.ready&&(!e(this._style)||this._style.ready)){var r=this._styleDirty;i.passes.render&&(this._styleDirty=!1),r&&++this._lastStyleTime;for(var n=this._lastStyleTime,o=t._statistics,a=r?t._selectedTiles:t._selectedTilesToStyle,s=a.length,l=0;l<s;++l){var u=a[l];if(u.lastStyleTime!==n){var c=u.content;u.lastStyleTime=n,c.applyStyle(this._style),o.numberOfFeaturesStyled+=c.featuresLength,++o.numberOfTilesStyled}}}},i}),define("Shaders/PostProcessStages/PointCloudEyeDomeLighting",[],function(){"use strict";return"#extension GL_EXT_frag_depth : enable\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec3 u_distancesAndEdlStrength;\nvarying vec2 v_textureCoordinates;\nvec2 neighborContribution(float log2Depth, vec2 padding)\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates + padding));\nif (depthOrLogDepth == 0.0) {\nreturn vec2(0.0);\n}\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(v_textureCoordinates + padding, depthOrLogDepth);\nreturn vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\nvoid main()\n{\nfloat depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\nvec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\neyeCoordinate /= eyeCoordinate.w;\nfloat log2Depth = log2(-eyeCoordinate.z);\nif (depthOrLogDepth == 0.0)\n{\ndiscard;\n}\nvec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\nfloat distX = u_distancesAndEdlStrength.x;\nfloat distY = u_distancesAndEdlStrength.y;\nvec2 responseAndCount = vec2(0.0);\nresponseAndCount += neighborContribution(log2Depth, vec2(0, distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(distX, 0));\nresponseAndCount += neighborContribution(log2Depth, vec2(0, -distY));\nresponseAndCount += neighborContribution(log2Depth, vec2(-distX, 0));\nfloat response = responseAndCount.x / responseAndCount.
this._disableDepthTestDistance=d(this,e)}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin=d(this,e)}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin=d(this,e)}},labelHorizontalOrigin:{get:function(){return this._labelHorizontalOrigin},set:function(e){this._labelHorizontalOrigin=d(this,e)}},labelVerticalOrigin:{get:function(){return this._labelVerticalOrigin},set:function(e){this._labelVerticalOrigin=d(this,e)}},meta:{get:function(){return this._meta},set:function(e){this._meta=e}}}),u.prototype.getColorShaderFunction=function(e,t,r){return this._colorShaderFunctionReady?(r.translucent=this._colorShaderTranslucent,this._colorShaderFunction):(this._colorShaderFunctionReady=!0,this._colorShaderFunction=i(this.color)?this.color.getShaderFunction(e,t,r,"vec4"):void 0,this._colorShaderTranslucent=r.translucent,this._colorShaderFunction)},u.prototype.getShowShaderFunction=function(e,t,r){return this._showShaderFunctionReady?this._showShaderFunction:(this._showShaderFunctionReady=!0,this._showShaderFunction=i(this.show)?this.show.getShaderFunction(e,t,r,"bool"):void 0,this._showShaderFunction)},u.prototype.getPointSizeShaderFunction=function(e,t,r){return this._pointSizeShaderFunctionReady?this._pointSizeShaderFunction:(this._pointSizeShaderFunctionReady=!0,this._pointSizeShaderFunction=i(this.pointSize)?this.pointSize.getShaderFunction(e,t,r,"float"):void 0,this._pointSizeShaderFunction)},u}),define("Scene/CircleEmitter",["../Core/Cartesian3","../Core/Check","../Core/defaultValue","../Core/defineProperties","../Core/Math"],function(e,t,i,r,n){"use strict";function o(e){e=i(e,1),this._radius=i(e,1)}return r(o.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}}),o.prototype.emit=function(t){var i=n.randomBetween(0,n.TWO_PI),r=n.randomBetween(0,this._radius),o=r*Math.cos(i),a=r*Math.sin(i);t.position=e.fromElements(o,a,0,t.position),t.velocity=e.clone(e.UNIT_Z,t.velocity)},o}),define("Scene/computeFlyToLocationForRectangle",["../Core/defined","../Core/Rectangle","../Core/sampleTerrainMostDetailed","./SceneMode","../ThirdParty/when"],function(e,t,i,r,n){"use strict";function o(i,a){var s,l=a.terrainProvider,u=a.mapProjection,c=u.ellipsoid,d=a.camera.getRectangleCameraCoordinates(i);return s=a.mode===r.SCENE3D?c.cartesianToCartographic(d):u.unproject(d),e(l)?l.readyPromise.then(function(){var n=l.availability;if(!e(n)||a.mode===r.SCENE2D)return s;var u=[t.center(i),t.southeast(i),t.southwest(i),t.northeast(i),t.northwest(i)];return o._sampleTerrainMostDetailed(l,u).then(function(e){var t=e.reduce(function(e,t){return Math.max(t.height,e)},-Number.MAX_VALUE),i=s;return i.height+=t,i})}):n.resolve(s)}return o._sampleTerrainMostDetailed=i,o}),define("Scene/ConeEmitter",["../Core/Cartesian3","../Core/Check","../Core/defaultValue","../Core/defineProperties","../Core/Math"],function(e,t,i,r,n){"use strict";function o(e){this._angle=i(e,a)}var a=n.toRadians(30);return r(o.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}}),o.prototype.emit=function(t){var i=Math.tan(this._angle),r=n.randomBetween(0,n.TWO_PI),o=n.randomBetween(0,i),a=o*Math.cos(r),s=o*Math.sin(r);t.velocity=e.fromElements(a,s,1,t.velocity),e.normalize(t.velocity,t.velocity),t.position=e.clone(e.ZERO,t.position)},o}),define("Scene/UrlTemplateImageryProvider",["../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/combine","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/GeographicProjection","../Core/isArray","../Core/Math","../Core/Rectangle","../Core/Resource","../Core/WebMercatorTilingScheme","../ThirdParty/when","./ImageryProvider"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g){"use strict";function v(e){this._errorEvent=new u,this._resource=void 0,this._urlSchemeZeroPadding=void 0,this._pickFeaturesResource=void 0,this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this.
parseFloat(n.queryParameters.version)>=1.3?m.crs=e(i.crs,i.tilingScheme&&i.tilingScheme.projection instanceof s?"EPSG:3857":"CRS:84"):m.srs=e(i.srs,i.tilingScheme&&i.tilingScheme.projection instanceof s?"EPSG:3857":"EPSG:4326"),n.setQueryParameters(m,!0),l.setQueryParameters(m,!0);var _={query_layers:i.layers,x:"{i}",y:"{j}",info_format:"{format}"};l.setQueryParameters(_,!0),this._resource=n,this._pickFeaturesResource=l,this._layers=i.layers,this._tileProvider=new c({url:n,pickFeaturesUrl:l,tilingScheme:e(i.tilingScheme,new o({ellipsoid:i.ellipsoid})),rectangle:i.rectangle,tileWidth:i.tileWidth,tileHeight:i.tileHeight,minimumLevel:i.minimumLevel,maximumLevel:i.maximumLevel,subdomains:i.subdomains,tileDiscardPolicy:i.tileDiscardPolicy,credit:i.credit,getFeatureInfoFormats:e(i.getFeatureInfoFormats,d.DefaultGetFeatureInfoFormats),enablePickFeatures:i.enablePickFeatures})}function h(e,i,r,n,o,a){var s=t(a)?a.data:void 0,l=e._tileProvider;return t(s)&&l._resource.setQueryParameters(s),l.requestImage(i,r,n,o)}function p(e,i,r,n,o,a,s){var l=t(s)?s.data:void 0,u=e._tileProvider;return t(l)&&u._pickFeaturesResource.setQueryParameters(l),u.pickFeatures(i,r,n,o,a)}function f(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}return i(d.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}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},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}}}),d.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},d.prototype.requestImage=function(e,i,r,n){var o,a,s=this._timeDynamicImagery;return t(s)&&(a=s.currentInterval,o=s.getFromCache(e,i,r,n)),t(o)||(o=h(this,e,i,r,n,a)),t(o)&&t(s)&&s.checkApproachingInterval(e,i,r,n),o},d.prototype.pickFeatures=function(e,i,r,n,o){var a=this._timeDynamicImagery;return p(this,e,i,r,n,o,t(a)?a.currentInterval:void 0)},d.DefaultParameters=n({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),d.GetFeatureInfoDefaultParameters=n({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),d.DefaultGetFeatureInfoFormats=n([n(new l("json","application/json")),n(new l("xml","text/xml")),n(new l("text","text/html"))]),d}),define("Scene/WebMapTileServiceImageryProvider",["../Core/combine","../Core/Credit","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/DeveloperError","../Core/Event","../Core/freezeObject","../Core/isArray","../Core/Rectangle","../Core/Resource","../Core/WebMercatorTilingScheme","../ThirdParty/when","./ImageryProvider","./TimeDynamicImagery"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f){"use strict";function m(e){e=i(e,i.EMPTY_OBJECT);var n=c.createIfNeeded(e.url),o=e.style,s=e.tileMatrixSetID;if(n.url.indexOf("{")>=0){var p={style:o,Style:o,TileMatrixSet:s};n.setTemplateValues(p),this._useKvp=!1}else n.setQueryParameters(g),this._useKvp=!0;this._resource=n,this._layer=e.layer,this._
;var f=/\s+czm_writeLogDepth\(/,m=/\s+czm_vertexLogDepth\(/,_=/\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;return o.createLogDepthCommand=function(e,r,n){t(n)||(n={});var o;return t(n.command)&&(o=n.command.shaderProgram),n.command=i.shallowClone(e,n.command),t(o)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=o:(n.command.shaderProgram=l(r,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n},o.createPickDerivedCommand=function(e,r,n,o){t(o)||(o={});var a,s;return t(o.pickCommand)&&(a=o.pickCommand.shaderProgram,s=o.pickCommand.renderState),o.pickCommand=i.shallowClone(r,o.pickCommand),t(a)&&o.shaderProgramId===r.shaderProgram.id?(o.pickCommand.shaderProgram=a,o.pickCommand.renderState=s):(o.pickCommand.shaderProgram=u(n,r.shaderProgram,r.pickId),o.pickCommand.renderState=c(e,r.renderState),o.shaderProgramId=r.shaderProgram.id),o},o.createHdrCommand=function(e,r,n){t(n)||(n={});var o;return t(n.command)&&(o=n.command.shaderProgram),n.command=i.shallowClone(e,n.command),t(o)&&n.shaderProgramId===e.shaderProgram.id?n.command.shaderProgram=o:(n.command.shaderProgram=d(r,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id),n},o}),define("Scene/DeviceOrientationCameraController",["../Core/defined","../Core/destroyObject","../Core/DeveloperError","../Core/Math","../Core/Matrix3","../Core/Quaternion"],function(e,t,i,r,n,o){"use strict";function a(t){function i(t){var i=t.alpha;if(!e(i))return n._alpha=void 0,n._beta=void 0,void(n._gamma=void 0);n._alpha=r.toRadians(i),n._beta=r.toRadians(t.beta),n._gamma=r.toRadians(t.gamma)}this._scene=t,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var n=this;window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}function s(e,t,i,r){var a=e.direction,s=e.right,d=e.up,h=o.fromAxisAngle(a,i,u),p=o.fromAxisAngle(s,r,l),f=o.multiply(p,h,p),m=o.fromAxisAngle(d,t,u);o.multiply(m,f,f);var _=n.fromQuaternion(f,c);n.multiplyByVector(_,s,s),n.multiplyByVector(_,d,d),n.multiplyByVector(_,a,a)}var l=new o,u=new o,c=new n;return a.prototype.update=function(){if(e(this._alpha)){e(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var t=this._lastAlpha-this._alpha,i=this._lastBeta-this._beta,r=this._lastGamma-this._gamma;s(this._scene.camera,-t,i,r),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){return this._removeListener(),t(this)},a}),define("Shaders/EllipsoidFS",[],function(){"use strict";return"#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\nvarying vec3 v_positionEC;\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\nvec3 positionEC = czm_pointAlongRay(ray, intersection);\nvec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\nvec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\nvec3 sphericalNormal = normalize(positionMC / u_radii);\nvec3 normalMC = geodeticNormal * side;\nvec3 normalEC = normalize(czm_normal * normalMC);\nvec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\nvec3 positionToEyeEC = -positionEC;\nczm_materialInput materialInput;\nmaterialInput.s = st.s;\nmaterialInput.st = st;\nmaterialInput.str = (positionMC + u_radii) / u_radii;\nmaterialInput.normalEC = normalEC;\nmaterialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\nmaterialInput.positionToEyeEC = positionToEyeEC;\nczm_material material = czm_getMaterial(materialInput);\n#ifdef ONLY_SUN_LIGHTING\nreturn czm_private_phong(normalize(positionToEyeEC), material);\n#else\nreturn czm_phong(normalize(positionToEyeEC), material);\n#endif\n}\nvoid main()\n{\nfloat maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
;return"uniform vec4 u_initialColor;\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n#ifdef ENABLE_CLIPPING_PLANES\nuniform sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n#if defined(FOG) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING)) || defined(GROUND_ATMOSPHERE)\nuniform float u_minimumBrightness;\n#endif\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift;\n#endif\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\n#endif\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying float v_distance;\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n#ifdef GROUND_ATMOSPHERE\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\n#endif\nvec4 sampleAndBlend(\nvec4 previousColor,\nsampler2D textureToSample,\nvec2 tileTextureCoordinates,\nvec4 textureCoordinateRectangle,\nvec4 textureCoordinateTranslationAndScale,\nfloat textureAlpha,\nfloat textureBrightness,\nfloat textureContrast,\nfloat textureHue,\nfloat textureSaturation,\nfloat textureOneOverGamma,\nfloat split)\n{\nvec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nalphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\ntextureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\nvec2 translation = textureCoordinateTranslationAndScale.xy;\nvec2 scale = textureCoordinateTranslationAndScale.zw;\nvec2 textureCoordinates = tileTextureCoordinates * scale + translation;\nvec4 value = texture2D(textureToSample, textureCoordinates);\nvec3 color = value.rgb;\nfloat alpha = value.a;\n#if !defined(APPLY_GAMMA)\nvec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\ncolor = tempColor.rgb;\nalpha = tempColor.a;\n#else\ncolor = pow(color, vec3(textureOneOverGamma));\n#endif\n#ifdef APPLY_SPLIT\nfloat splitPosition = czm_imagerySplitPosition;\nif (split < 0.0 && gl_FragCoord.x > splitPosition) {\nalpha = 0.0;\n}\nelse if (split > 0.0 && gl_FragCoord.x < splitPosition) {\nalpha = 0.0;\n}\n#endif\n#ifdef APPLY_BRIGHTNESS\ncolor = mix(vec3(0.0), color, textureBrightness);\n#endif\n#ifdef APPLY_CONTRAST\ncolor = mix(vec3(0.5), color, textureContrast);\n#endif\n#ifdef APPLY_HUE\ncolor = czm_hue(color, textureHue);\n#endif\n#ifdef APPLY_SATURATION\ncolor = czm_saturation(color, textureSaturation);\n#endif\nfloat sourceAlpha = alpha * textureAlpha;\nfloat outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\nvec3 outCo
r.tileBoundingRegion.maximumHeight=n.maximumHeight,i.data.occludeePointInScaledSpace=t.clone(n.occludeePointInScaledSpace,r.occludeePointInScaledSpace)},m.prototype.processLoadStateMachine=function(e,t,i,r,n,o){this.state===f.UNLOADED&&_(this,t,i,r,n,o),this.state===f.RECEIVED&&g(this,e,t,i,r,n),this.state===f.TRANSFORMED&&v(this,e.context,t,i,r,n)},m.prototype.processUpsampleStateMachine=function(e,t,r,n,o){if(this.state===f.UNLOADED){var a=this.upsampleDetails,s=a.data,l=a.x,u=a.y,c=a.level;if(this.data=s.upsample(t.tilingScheme,l,u,c,r,n,o),!i(this.data))return;this.state=f.RECEIVING;var d=this;p(this.data,function(e){d.data=e,d.state=f.RECEIVED},function(){d.state=f.FAILED})}this.state===f.RECEIVED&&g(this,e,t,r,n,o),this.state===f.TRANSFORMED&&v(this,e.context,t,r,n,o)},m}),define("Scene/GlobeSurfaceTile",["../Core/BoundingSphere","../Core/Cartesian3","../Core/Cartesian4","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/IntersectionTests","../Core/PixelFormat","../Renderer/PixelDatatype","../Renderer/Sampler","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","./ImageryState","./QuadtreeTileLoadState","./SceneMode","./TerrainState","./TileBoundingRegion","./TileTerrain"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y){"use strict";function C(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new i(0,0,1,1),this.terrainData=void 0,this.center=new t,this.vertexArray=void 0,this.minimumHeight=0,this.maximumHeight=0,this.boundingSphere3D=new e,this.boundingSphere2D=new e,this.orientedBoundingBox=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new t,this.loadedTerrain=void 0,this.upsampledTerrain=void 0,this.pickBoundingSphere=new e,this.pickTerrain=void 0,this.surfaceShader=void 0,this.isClipped=!0,this.clippedByBoundaries=!1}function b(e,i,r,o,a,s){if(e.decodePosition(o,a,s),n(i)&&i!==_.SCENE3D){var l=r.ellipsoid,u=l.cartesianToCartographic(s);r.project(u,s),t.fromElements(s.z,s.x,s.y,s)}return s}function S(e){var t,i;return n(e.parent)&&n(e.parent.data)&&(t=e.parent.data.minimumHeight,i=e.parent.data.maximumHeight),new v({rectangle:e.rectangle,ellipsoid:e.tilingScheme.ellipsoid,minimumHeight:t,maximumHeight:i})}function T(e,t){return function(){return e.tileBoundingRegion.distanceToCamera(t)}}function E(e,t,i){var r=e.data,o=A(e);n(o)&&(r.upsampledTerrain=new y(o)),M(e,t)&&(r.loadedTerrain=new y);for(var a=0,s=i.length;a<s;++a){var l=i.get(a);l.show&&l._createTileImagerySkeletons(e,t)}}function w(e,t,i,o){var a=e.data,s=a.loadedTerrain,l=a.upsampledTerrain,u=!1;n(s)&&(s.processLoadStateMachine(t,i,e.x,e.y,e.level,e._priorityFunction),s.state>=g.RECEIVED&&(a.terrainData!==s.data&&(a.terrainData=s.data,O(t.context,a),D(e)),u=!0),s.state===g.READY?(s.publishToTile(e),n(e.data.vertexArray)&&o.push(e.data.vertexArray),e.data.vertexArray=s.vertexArray,s.vertexArray=void 0,a.pickTerrain=r(a.loadedTerrain,a.upsampledTerrain),a.loadedTerrain=void 0,a.upsampledTerrain=void 0):s.state===g.FAILED&&(a.loadedTerrain=void 0)),!u&&n(l)&&(l.processUpsampleStateMachine(t,i,e.x,e.y,e.level),l.state>=g.RECEIVED&&a.terrainData!==l.data&&(a.terrainData=l.data,i.hasWaterMask&&L(e),x(e)),l.state===g.READY?(l.publishToTile(e),n(e.data.vertexArray)&&o.push(e.data.vertexArray),e.data.vertexArray=l.vertexArray,l.vertexArray=void 0,a.pickTerrain=a.upsampledTerrain,a.upsampledTerrain=void 0):l.state===g.FAILED&&(a.upsampledTerrain=void 0))}function A(e){for(var t=e.parent;n(t)&&n(t.data)&&!n(t.data.terrainData);)t=t.parent;if(n(t)&&n(t.data))return{data:t.data.terrainData,x:t.x,y:t.y,level:t.level}}function x(e){P(e,e._southwestChild),P(e,e._southeastChild),P(e,e._northwestChild),P(e,e._northeastChild)}function P(e,t){if(n(t)&&t.state!==m.START){var i=t.data;if(n(i.terrainData)&&!i.terrainData.wasCreatedByUpsampling())return;n(i.upsampledTerrain)&&i.upsampledTerrain.freeResources(),i.upsampledTerrain=new y({data:e.data.terrainData,x:e.x,y:e.y,level:e.level}),t.state=m.LOADING}}function D(e
function ee(e,t,i){var r={indices:i.indices,primitiveType:T.TRIANGLES};_.toWireframe(r);var n=r.indices,o=D.createIndexBuffer({context:e,typedArray:n,usage:I.STATIC_DRAW,indexDatatype:g.UNSIGNED_SHORT});return new N({context:e,attributes:t._attributes,indexBuffer:o})}function te(t,i,o){var s=i.data,u=o.creditDisplay,d=s.terrainData;if(c(d)&&c(d.credits))for(var h=d.credits,p=0,f=h.length;p<f;++p)u.addCredit(h[p]);var m=M.maximumTextureImageUnits,_=s.waterMaskTexture,g=t.hasWaterMask&&c(_),v=t.oceanNormalMap,S=g&&c(v),w=t.terrainProvider.ready&&t.terrainProvider.hasVertexNormals,x=o.fog.enabled,D=t.showGroundAtmosphere,I=q.castShadows(t.shadows),L=q.receiveShadows(t.shadows),N=t.hueShift,F=t.saturationShift,B=t.brightnessShift,z=!(y.equalsEpsilon(N,0,y.EPSILON7)&&y.equalsEpsilon(F,0,y.EPSILON7)&&y.equalsEpsilon(B,0,y.EPSILON7)),k=!1;if(D){var V,U=o.mode,H=o.camera;V=U===W.SCENE2D||U===W.COLUMBUS_VIEW?H.positionCartographic.height:r.magnitude(H.positionWC);var Y=t.nightFadeOutDistance;U!==W.SCENE3D&&(Y-=o.mapProjection.ellipsoid.maximumRadius),k=V>Y}g&&--m,S&&--m;var j=s.center,X=s.pickTerrain.mesh.encoding,Q=le,K=0,ee=0,te=0,ie=0,ne=!1;if(o.mode!==W.SCENE3D){var oe=o.mapProjection,ae=oe.project(E.southwest(i.rectangle),he),se=oe.project(E.northeast(i.rectangle),pe);if(Q.x=ae.x,Q.y=ae.y,Q.z=se.x,Q.w=se.y,o.mode!==W.MORPHING&&(j=ce,j.x=0,j.y=.5*(Q.z+Q.x),j.z=.5*(Q.w+Q.y),Q.x-=j.y,Q.y-=j.z,Q.z-=j.y,Q.w-=j.z),o.mode===W.SCENE2D&&X.quantization===A.BITS12){var de=1/(Math.pow(2,12)-1)*.5,ge=(Q.z-Q.x)*de,Ce=(Q.w-Q.y)*de;Q.x-=ge,Q.y-=Ce,Q.z+=ge,Q.w+=Ce}oe instanceof P&&(K=i.rectangle.south,ee=i.rectangle.north,te=P.geodeticLatitudeToMercatorAngle(K),ie=1/(P.geodeticLatitudeToMercatorAngle(ee)-te),ne=!0)}var be=ye;be.frameState=o,be.surfaceTile=s,be.showReflectiveOcean=g,be.showOceanWaves=S,be.enableLighting=t.enableLighting,be.showGroundAtmosphere=D,be.perFragmentGroundAtmosphere=k,be.hasVertexNormals=w,be.useWebMercatorProjection=ne,be.clippedByBoundaries=s.clippedByBoundaries;var Se=s.imagery,Te=0,Ee=Se.length,we=t._renderState,Ae=t._blendRenderState,xe=we,Pe=t._firstPassInitialColor,De=o.context;c(t._debug.boundingSphereTile)||_e();do{var Ie,Me,Re=0;t._drawCommands.length<=t._usedDrawCommands?(Ie=new R,Ie.owner=i,Ie.cull=!1,Ie.boundingVolume=new e,Ie.orientedBoundingBox=void 0,Me=J(o,t),t._drawCommands.push(Ie),t._uniformMaps.push(Me)):(Ie=t._drawCommands[t._usedDrawCommands],Me=t._uniformMaps[t._usedDrawCommands]),Ie.owner=i,++t._usedDrawCommands,i===t._debug.boundingSphereTile&&(c(s.orientedBoundingBox)?fe(s.orientedBoundingBox,a.RED).update(o):c(s.boundingSphere3D)&&me(s.boundingSphere3D,a.RED).update(o));var Oe=Me.properties;n.clone(Pe,Oe.initialColor),Oe.oceanNormalMap=v,Oe.lightingFadeDistance.x=t.lightingFadeOutDistance,Oe.lightingFadeDistance.y=t.lightingFadeInDistance,Oe.nightFadeDistance.x=t.nightFadeOutDistance,Oe.nightFadeDistance.y=t.nightFadeInDistance,Oe.zoomedOutOceanSpecularIntensity=t.zoomedOutOceanSpecularIntensity,Oe.center3D=s.center,r.clone(j,Oe.rtc),n.clone(Q,Oe.tileRectangle),Oe.southAndNorthLatitude.x=K,Oe.southAndNorthLatitude.y=ee,Oe.southMercatorYAndOneOverHeight.x=te,Oe.southMercatorYAndOneOverHeight.y=ie;var Le=ue,Ne=Z(i.rectangle,t.cartographicLimitRectangle);r.fromElements(N,F,B,Oe.hsbShift);var Fe=i.rectangle,Be=1/Fe.width,ze=1/Fe.height;Le.x=(Ne.west-Fe.west)*Be,Le.y=(Ne.south-Fe.south)*ze,Le.z=(Ne.east-Fe.west)*Be,Le.w=(Ne.north-Fe.south)*ze,n.clone(Le,Oe.localizedCartographicLimitRectangle);var ke=x&&y.fog(i._distance,o.fog.density)>y.EPSILON3;z=z&&(ke||D);for(var Ve=!1,Ue=!1,Ge=!1,He=!1,We=!1,qe=!1,Ye=!1,je=!1;Re<m&&Te<Ee;){var Xe=Se[Te],Qe=Xe.readyImagery;if(++Te,c(Qe)&&0!==Qe.imageryLayer.alpha){var Ze=Xe.useWebMercatorT?Qe.textureWebMercator:Qe.texture,Ke=Qe.imageryLayer;c(Xe.textureTranslationAndScale)||(Xe.textureTranslationAndScale=Ke._calculateTextureTranslationAndScale(i,Xe)),Oe.dayTextures[Re]=Ze,Oe.dayTextureTranslationAndScale[Re]=Xe.textureTranslationAndScale,Oe.dayTextureTexCoordsRectangle[Re]=Xe.textureCoordinateRectangle,Oe.dayTextureUseWebMercatorT[Re]=Xe.useWebMercatorT,Oe
v.prototype.endFrame=function(e){e.passes.render&&e.mode!==_.MORPHING&&(R(this,e),L(this,e),b(this,e))},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var F,B=new t,z=new c,k=new t,V=new e,U=[];return v}),define("Scene/Globe",["../Core/BoundingSphere","../Core/buildModuleUrl","../Core/Cartesian3","../Core/Cartographic","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/Ellipsoid","../Core/EllipsoidTerrainProvider","../Core/Event","../Core/IntersectionTests","../Core/Ray","../Core/Rectangle","../Core/Resource","../Renderer/ShaderSource","../Renderer/Texture","../Shaders/GlobeFS","../Shaders/GlobeVS","../Shaders/GroundAtmosphere","../ThirdParty/when","./GlobeSurfaceShaderSet","./GlobeSurfaceTileProvider","./ImageryLayerCollection","./QuadtreePrimitive","./SceneMode","./ShadowMode"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E,w,A,x){"use strict";function P(e){e=n(e,u.WGS84);var i=new c({ellipsoid:e}),r=new E;this._ellipsoid=e,this._imageryLayerCollection=r,this._surfaceShaderSet=new S,this._material=void 0,this._surface=new w({tileProvider:new T({terrainProvider:i,imageryLayers:r,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=i,this._terrainProviderChanged=new d,D(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new m({url:t("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.enableLighting=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=x.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0}function D(e){var t=[],i=o(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),r=[C];!o(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.uniformMap=void 0:(r.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.uniformMap=e._material._uniforms),r.push(v),e._surfaceShaderSet.baseVertexShaderSource=new _({sources:[C,y],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new _({sources:r,defines:t}),e._surfaceShaderSet.material=e._material}function I(t){return function(i,r){return e.distanceSquaredTo(i.pickBoundingSphere,t)-e.distanceSquaredTo(r.pickBoundingSphere,t)}}function M(e,t){return f.contains(e.rectangle,t)?e:void 0}a(P.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tileLoadedEvent:{get:function(){return this._surface.tileProvider.tileLoadedEvent}},tilesLoaded:{get:function(){return!o(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},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}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){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),o(this._m
e.prototype.shouldDiscardImage=function(e){return!1},e}),define("Shaders/AdjustTranslucentFS",[],function(){"use strict";return"#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nif (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n{\n#ifdef MRT\ngl_FragData[0] = u_bgColor;\ngl_FragData[1] = vec4(u_bgColor.a);\n#else\ngl_FragColor = u_bgColor;\n#endif\nreturn;\n}\ndiscard;\n}\n"}),define("Shaders/CompositeOITFS",[],function(){"use strict";return"uniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 opaque = texture2D(u_opaque, v_textureCoordinates);\nvec4 accum = texture2D(u_accumulation, v_textureCoordinates);\nfloat r = texture2D(u_revealage, v_textureCoordinates).r;\n#ifdef MRT\nvec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\nvec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\ngl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\nif (opaque != czm_backgroundColor)\n{\ngl_FragColor.a = 1.0;\n}\n}\n"}),define("Scene/OIT",["../Core/BoundingRectangle","../Core/Color","../Core/defined","../Core/destroyObject","../Core/PixelFormat","../Core/WebGLConstants","../Renderer/ClearCommand","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/PixelDatatype","../Renderer/RenderState","../Renderer/ShaderSource","../Renderer/Texture","../Shaders/AdjustTranslucentFS","../Shaders/CompositeOITFS","./BlendEquation","./BlendFunction"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_){"use strict";function g(i){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var r=i.colorBufferFloat&&i.depthTexture;this._translucentMRTSupport=i.drawBuffers&&r,this._translucentMultipassSupport=!this._translucentMRTSupport&&r,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new a({color:new t(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new a({color:new t(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new a({color:new t(0,0,0,0),owner:this}),this._alphaClearCommand=new a({color:new t(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 e,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function v(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function y(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function C(e){v(e),y(e)}function b(e,t,i,r){v(e),e._accumulationTexture=new h({context:t,width:i,height:r,pixelFormat:n.RGBA,pixelDatatype:u.FLOAT});var o=new Float32Array(i*r*4);e._revealageTexture=new h({context:t,pixelFormat:n.RGBA,pixelDatatype:u.FLOAT,source:{arrayBufferView:o,width:i,height:r},flipY:!1})}function S(e,t){y(e);var i=o.FRAMEBUFFER_COMPLETE,r=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new l({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new l({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),e._translucentFBO.status===i&
this._textureScale=s,this._forcePowerOfTwo=o(t.forcePowerOfTwo,!1),this._sampleMode=o(t.sampleMode,T.NEAREST),this._pixelFormat=l,this._pixelDatatype=o(t.pixelDatatype,f.UNSIGNED_BYTE),this._clearColor=o(t.clearColor,i.BLACK),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;var u=new p;u.scissorTest={enabled:!0,rectangle:a(t.scissorRectangle)?e.clone(t.scissorRectangle):new e},this._passState=u,this._ready=!1;var c=t.name;a(c)||(c=n()),this._name=c,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}function w(e,t,i){var r=t[i];return("string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(r){var n=t[i];t[i]=r;var o=e._actualUniforms,s=o[i];a(s)&&s!==n&&s instanceof v&&!a(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(s),delete o[i],delete o[i+"Dimensions"]),n instanceof v&&e._texturesToRelease.push(n),"string"==typeof r||r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof HTMLVideoElement||r instanceof ImageData?e._dirtyUniforms.push(i):o[i]=r}}}function A(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function x(e,t){return function(){var i=e[t]();if(a(i))return i.dimensions}}function P(e){if(!a(e._uniformMap)){var t={},i={},n=e._uniforms,o=e._actualUniforms;for(var l in n)if(n.hasOwnProperty(l)){"function"!=typeof n[l]?(t[l]=A(e,l),i[l]=w(e,n,l)):(t[l]=n[l],i[l]=n[l]),o[l]=n[l];var u=t[l]();("string"==typeof u||u instanceof v||u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement)&&(t[l+"Dimensions"]=x(t,l))}e._uniforms={},s(e._uniforms,i),e._uniformMap=r(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 D(e,t){if(!a(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(a(e._selectedIdTexture)){var r=e._selectedIdTexture.width;i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""),i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+r+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2(float(i) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+i}var n=new g({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i]});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e})}}function I(e){var t,i,r=e._sampleMode;r===T.LINEAR?(t=C.LINEAR,i=y.LINEAR):(t=C.NEAREST,i=y.NEAREST);var n=e._sampler;a(n)&&n.minificationFilter===t&&n.magnificationFilter===i||(e._sampler=new _({wrapS:b.CLAMP_TO_EDGE,wrapT:b.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}function M(e,t){return fun
;return"#if (FXAA_QUALITY_PRESET == 10)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 3.0\n#define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 3.0\n#define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 4.0\n#define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 4.0\n#define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 4.0\n#define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n#define FXAA_QUALITY_PS 3\n#define FXAA_QUALITY_P0 1.5\n#define FXAA_QUALITY_P1 2.0\n#define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n#define FXAA_QUALITY_PS 4\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n#define FXAA_QUALITY_PS 5\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n#define FXAA_QUALITY_PS 6\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n#define FXAA_QUALITY_PS 7\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 3.0\n#define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n#define FXAA_QUALITY_PS 8\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 4.0\n#define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n#define FXAA_QUALITY_PS 9\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 4.0\n#define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n#define FXAA_QUALITY_PS 10\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 4.0\n#define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n#define FXAA_QUALITY_PS 11\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FXAA_QUALITY_P7 2.0\n#define FXAA_QUALITY_P8 2.0\n#define FXAA_QUALITY_P9 4.0\n#define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n#define FXAA_QUALITY_PS 12\n#define FXAA_QUALITY_P0 1.0\n#define FXAA_QUALITY_P1 1.5\n#define FXAA_QUALITY_P2 2.0\n#define FXAA_QUALITY_P3 2.0\n#define FXAA_QUALITY_P4 2.0\n#define FXAA_QUALITY_P5 2.0\n#define FXAA_QUALITY_P6 2.0\n#define FX
define("Scene/Tonemapper",["../Core/freezeObject"],function(e){"use strict";var t={REINHARD:0,MODIFIED_REINHARD:1,FILMIC:2,ACES:3,validate:function(e){return e===t.REINHARD||e===t.MODIFIED_REINHARD||e===t.FILMIC||e===t.ACES}};return e(t)}),define("Scene/PostProcessStageCollection",["../Core/arraySlice","../Core/Check","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/DeveloperError","../Core/PixelFormat","../Renderer/PixelDatatype","../Renderer/Sampler","../Renderer/Texture","../Renderer/TextureMagnificationFilter","../Renderer/TextureMinificationFilter","../Renderer/TextureWrap","../Shaders/PostProcessStages/PassThrough","./PostProcessStageLibrary","./PostProcessStageTextureCache","./Tonemapper"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g){"use strict";function v(){var e=m.createFXAAStage(),t=m.createAmbientOcclusionStage(),i=m.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=m.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=g.ACES;var n=this._tonemapping;t.enabled=!1,i.enabled=!1,n.enabled=!1;var o=new _(this),a={},s=S;for(s.push(e,t,i,n);s.length>0;){var l=s.pop();a[l.name]=l,l._textureCache=o;var u=l.length;if(r(u))for(var c=0;c<u;++c)s.push(l.get(c))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var d=this;t.uniforms.randomTexture=function(){return d._randomTexture},this._ao=t,this._bloom=i,this._fxaa=e,this._lastLength=void 0,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=a,this._textureCache=o}function y(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,r=i.length,n=0,o=0;n<r;++n){var a=i[n];a&&(a._index=o++,t.push(a))}e._stages=t}}function C(e){for(;r(e.length);)e=e.get(e.length-1);return e.outputTexture}function b(e,t,i,n,o){if(r(e.execute))return void e.execute(t,i,n,o);var a,s=e.length;if(e.inputPreviousStageTexture)for(b(e.get(0),t,i,n,o),a=1;a<s;++a)b(e.get(a),t,C(e.get(a-1)),n,o);else for(a=0;a<s;++a)b(e.get(a),t,i,n,o)}var S=[];return n(v.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length,r=i-1;r>=0;--r){var n=t[r];e=e||n.ready&&n.enabled}var o=this._fxaa,a=this._ao,s=this._bloom,l=this._tonemapping;return e=e||o.ready&&o.enabled,e=e||a.ready&&a.enabled,e=e||s.ready&&s.enabled,e=e||l.ready&&l.enabled}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return y(this),this._stages.length}},outputTexture:{get:function(){var e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);for(var t=this._stages,i=t.length,n=i-1;n>=0;--n){var o=t[n];if(r(o)&&o.ready&&o.enabled)return this.getOutputTexture(o.name)}var a=this._tonemapping;if(a.enabled&&a.ready)return this.getOutputTexture(a.name);var s=this._bloom;if(s.enabled&&s.ready)return this.getOutputTexture(s.name);var l=this._ao;return l.enabled&&l.ready?this.getOutputTexture(l.name):void 0}},hasSelected:{get:function(){for(var t=e(this._stages);t.length>0;){var i=t.pop();if(r(i)){if(r(i.selected))return!0;var n=i.length;if(r(n))for(var o=0;o<n;++o)t.push(i.get(o))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){r(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case g.REINHARD:t=m.createReinhardTonemappingStage(i);break;case g.MODIFIED_REINHARD:t=m.createModifiedReinhardTonemappingStage(i);break;case g.FILMIC:t=m.createFilmicTonemappingStage(i);break;default:t=m.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,r(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),v.prototype.add=function(e){var t=this
;t.multiplyByScalar(t.add(t.multiplyByScalar(ie,Math.cos(te)-1,Ee),t.multiplyByScalar(W,Math.sin(te),we),Te),K,Pe),t.add(V,Pe,V),t.normalize(H,ie),t.normalize(t.cross(ie,xe,Te),W);var De=be;return t.multiplyByScalar(t.add(t.multiplyByScalar(ie,Math.cos(te)-1,Ee),t.multiplyByScalar(W,Math.sin(te),we),Te),t.magnitude(H),De),t.add(H,De,H),t.clone(V,C.position),t.normalize(t.subtract(H,V,Te),C.direction),t.clone(C.direction,C.direction),t.cross(C.direction,C.up,C.right),t.cross(C.right,C.direction,C.up),void C.setView(Ae)}if(o(k)){var Ie=t.normalize(k,ue),Me=t.normalize(i._zoomWorldPosition,ce),Re=t.dot(Me,Ie);if(Re>0&&Re<1){var Oe=p.acosClamped(Re),Le=t.cross(Me,Ie,de),Ne=Math.abs(Oe)>p.toRadians(20)?.75*C.positionCartographic.height:C.positionCartographic.height-v,Fe=v/Ne;C.rotate(Le,Oe*Fe)}}else D=!0}}i._rotatingZoom=!D}if(!A&&D||x){var Be,ze=w.wgs84ToWindowCoordinates(y,i._zoomWorldPosition,oe);Be=b!==E.COLUMBUS_VIEW&&e.equals(r,i._zoomMouseStart)&&o(ze)?C.getPickRay(ze,re):C.getPickRay(r,re);var ke=Be.direction;b!==E.COLUMBUS_VIEW&&b!==E.SCENE2D||t.fromElements(ke.y,ke.z,ke.x,ke),C.move(ke,v),i._zoomingOnVector=!0}else C.zoomIn(v);C.setView(Ae)}}function O(e,i,r){var n=e._scene,o=n.camera,a=o.getPickRay(r.startPosition,xe).origin,s=o.getPickRay(r.endPosition,Pe).origin;a=t.fromElements(a.y,a.z,a.x,a),s=t.fromElements(s.y,s.z,s.x,s);var l=t.subtract(a,s,De),u=t.magnitude(l);u>0&&(t.normalize(l,l),o.move(l,u))}function L(e,t,i){o(i.distance)&&(i=i.distance);var r=e._scene,n=r.camera;R(e,t,i,e._zoomFactor,n.getMagnitude())}function N(t,i,r){if(o(r.angleAndHeight))return void F(t,i,r.angleAndHeight);var n=t._scene,a=n.camera,s=n.canvas,l=s.clientWidth,u=s.clientHeight,c=Ie;c.x=2/l*r.startPosition.x-1,c.y=2/u*(u-r.startPosition.y)-1,c=e.normalize(c,c);var d=Me;d.x=2/l*r.endPosition.x-1,d.y=2/u*(u-r.endPosition.y)-1,d=e.normalize(d,d);var h=p.acosClamped(c.x);c.y<0&&(h=p.TWO_PI-h);var f=p.acosClamped(d.x);d.y<0&&(f=p.TWO_PI-f);var m=f-h;a.twistRight(m)}function F(e,t,i){var r=e._rotateFactor*e._rotateRateRangeAdjustment;r>e._maximumRotateRate&&(r=e._maximumRotateRate),r<e._minimumRotateRate&&(r=e._minimumRotateRate);var n=e._scene,o=n.camera,a=n.canvas,s=(i.endPosition.x-i.startPosition.x)/a.clientWidth;s=Math.min(s,e.maximumMovementRatio);var l=r*s*Math.PI*4;o.twistRight(l)}function B(e){var t=e._scene.mapMode2D===T.ROTATE;m.equals(m.IDENTITY,e._scene.camera.transform)?(M(e,e.enableTranslate,e.translateEventTypes,O,e.inertiaTranslate,"_lastInertiaTranslateMovement"),M(e,e.enableZoom,e.zoomEventTypes,L,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&M(e,e.enableRotate,e.tiltEventTypes,N,e.inertiaSpin,"_lastInertiaTiltMovement")):(M(e,e.enableZoom,e.zoomEventTypes,L,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&M(e,e.enableRotate,e.translateEventTypes,N,e.inertiaSpin,"_lastInertiaSpinMovement"))}function z(e,i,r){var n=e._scene,a=e._globe,s=n.camera;if(o(a)){var l;n.pickPositionSupported&&(l=n.pickPositionWorldCoordinates(i,Oe));var u=s.getPickRay(i,Re),c=a.pickWorldCoordinates(u,n,Le);return(o(l)?t.distance(l,s.positionWC):Number.POSITIVE_INFINITY)<(o(c)?t.distance(c,s.positionWC):Number.POSITIVE_INFINITY)?t.clone(l,r):t.clone(c,r)}}function k(i,r,n){if(t.equals(r,i._translateMousePosition)||(i._looking=!1),t.equals(r,i._strafeMousePosition)||(i._strafing=!1),i._looking)return void $(i,r,n);if(i._strafing)return void q(i,r,n);var a,s=i._scene,l=s.camera,u=e.clone(n.startPosition,Ge),d=e.clone(n.endPosition,He),h=l.getPickRay(u,Ne),f=t.clone(t.ZERO,Ve),m=t.UNIT_X;if(l.position.z<i._minimumPickingTerrainHeight&&(a=z(i,u,Be),o(a)&&(f.x=a.x)),f.x>l.position.z&&o(a))return t.clone(a,i._strafeStartPosition),i._strafing=!0,q(i,r,n),void(i._strafeMousePosition=e.clone(r,i._strafeMousePosition));var _=g.fromPointNormal(f,m,Ue);h=l.getPickRay(u,Ne);var v=c.rayPlane(h,_,Be),y=l.getPickRay(d,Fe),C=c.rayPlane(y,_,ze);if(!o(v)||!o(C))return i._looking=!0,$(i,r,n),void e.clone(r,i._translateMousePosition);var b=t.subtract(v,C,ke),S=b.x;b.x=b.y,b.y=b.z,b.z=S;var T=t.magnitude(b);T>p.EPSILON6&&(t.normalize(b,b),l.move(b,T))}function V(t,i,r){if(
this._clearPassState=new L(i),this._size=h(e.size,2048),this.size=this._size}function K(e){this.camera=new fe,this.passState=new L(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function J(e,t){return z.fromCache({cull:{enabled:!0,face:q.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 $(e){var t=!e._usesDepthTexture;e._primitiveRenderState=J(t,e._primitiveBias),e._terrainRenderState=J(t,e._terrainBias),e._pointRenderState=J(t,e._pointBias)}function ee(e){for(var t=e._passes.length,i=0;i<t;++i){var r=e._passes[i],n=r.framebuffer;p(n)&&!n.isDestroyed()&&n.destroy(),r.framebuffer=void 0}e._depthAttachment=e._depthAttachment&&e._depthAttachment.destroy(),e._colorAttachment=e._colorAttachment&&e._colorAttachment.destroy()}function te(){return new k({wrapS:H.CLAMP_TO_EDGE,wrapT:H.CLAMP_TO_EDGE,minificationFilter:G.NEAREST,magnificationFilter:U.NEAREST})}function ie(e,t){for(var i=new F({context:t,width:e._textureSize.x,height:e._textureSize.y,format:B.DEPTH_COMPONENT16}),r=new V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:E.RGBA,pixelDatatype:N.UNSIGNED_BYTE,sampler:te()}),n=new R({context:t,depthRenderbuffer:i,colorTextures:[r],destroyAttachments:!1}),o=e._passes.length,a=0;a<o;++a){var s=e._passes[a];s.framebuffer=n,s.passState.framebuffer=n}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function re(e,t){for(var i=new V({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:E.DEPTH_STENCIL,pixelDatatype:N.UNSIGNED_INT_24_8,sampler:te()}),r=new R({context:t,depthStencilTexture:i,destroyAttachments:!1}),n=e._passes.length,o=0;o<n;++o){var a=e._passes[o];a.framebuffer=r,a.passState.framebuffer=r}e._shadowMapTexture=i,e._depthAttachment=i}function ne(e,t){for(var i=new F({context:t,width:e._textureSize.x,height:e._textureSize.y,format:B.DEPTH_COMPONENT16}),r=new I({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:E.RGBA,pixelDatatype:N.UNSIGNED_BYTE,sampler:te()}),n=[r.negativeX,r.negativeY,r.negativeZ,r.positiveX,r.positiveY,r.positiveZ],o=0;o<6;++o){var a=new R({context:t,depthRenderbuffer:i,colorTextures:[n[o]],destroyAttachments:!1}),s=e._passes[o];s.framebuffer=a,s.passState.framebuffer=a}e._shadowMapTexture=r,e._depthAttachment=i,e._colorAttachment=r}function oe(e,t){e._isPointLight?ne(e,t):e._usesDepthTexture?re(e,t):ie(e,t)}function ae(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==x.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,$(e),ee(e),oe(e,t))}function se(e,t){p(e._passes[0].framebuffer)&&e._shadowMapTexture.width===e._textureSize.x||(ee(e),oe(e,t),ae(e,t),le(e,t))}function le(e,t,i){i=h(i,0),(e._isPointLight||0===i)&&(e._clearCommand.framebuffer=e._passes[i].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function ue(t,i){t._size=i;var r=t._passes,n=r.length,o=t._textureSize;if(t._isPointLight){i=D.maximumCubeMapSize>=i?i:D.maximumCubeMapSize,o.x=i,o.y=i;var a=new e(0,0,i,i);r[0].passState.viewport=a,r[1].passState.viewport=a,r[2].passState.viewport=a,r[3].passState.viewport=a,r[4].passState.viewport=a,r[5].passState.viewport=a}else 1===n?(i=D.maximumTextureSize>=i?i:D.maximumTextureSize,o.x=i,o.y=i,r[0].passState.viewport=new e(0,0,i,i)):4===n&&(i=D.maximumTextureSize>=2*i?i:D.maximumTextureSize/2,o.x=2*i,o.y=2*i,r[0].passState.viewport=new e(0,0,i,i),r[1].passState.viewport=new e(i,0,i,i),r[2].passState.viewport=new e(0,i,i,i),r[3].passState.viewport=new e(i,i,i,i));t._clearPassState.viewport=new e(0,0,o.x,o.y);for(var s=0;s<n;++s){var l=r[s],u=l.passState.viewport,c=u.x/o.x,d=u.y/o.y,h=u.width/o.x,p=u.height/o.y;l.textureOffsets=new b(h,0,0,c,0,p,0,d,0,0,1,0,0,0,0,1)}}function ce(e,t){var i;i=e._isPointLight?"uniform samplerCube shadowMap_textureCube; \nvarying vec2 v_textureCoordinates; \nvoid main() \n{ \n vec2 uv = v_textureCoordinates; \n vec3 dir; \n \n if (uv.y < 0.5) \n { \n if (uv.x < 0.333) \n
;return S.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,o=i.positionWC,s=e._computeCommandList,l=e._overlayCommandList,u=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var h=this.frustumCommandsList,p=h.length,f=d.NUMBER_OF_PASSES,m=0;m<p;++m)for(var _=0;_<f;++_)h[m].indices[_]=0;s.length=0,l.length=0;for(var g=Number.MAX_VALUE,v=-Number.MAX_VALUE,y=!1,S=t.shadowState.shadowsEnabled,T=Number.MAX_VALUE,E=-Number.MAX_VALUE,x=Number.MAX_VALUE,P=t.mode===C.SCENE3D?t.occluder:void 0,M=t.cullingVolume,R=D.planes,O=0;O<5;++O)R[O]=M.planes[O];M=D;for(var L=u.length,N=0;N<L;++N){var F=u[N],B=F.pass;if(B===d.COMPUTE)s.push(F);else if(B===d.OVERLAY)l.push(F);else{var z=F.boundingVolume;if(r(z)){if(!e.isVisible(F,M,P))continue;if(I=z.computePlaneDistances(o,n,I),g=Math.min(g,I.start),v=Math.max(v,I.stop),S&&F.receiveShadows&&I.start<b.MAXIMUM_DISTANCE&&!(B===d.GLOBE&&I.start<-100&&I.stop>100)){var k=I.stop-I.start;B!==d.GLOBE&&I.start<100&&(x=Math.min(x,k)),T=Math.min(T,I.start),E=Math.max(E,I.stop)}}else I.start=i.frustum.near,I.stop=i.frustum.far,y=!(F instanceof c);A(e,this,F,I)}}y?(g=i.frustum.near,v=i.frustum.far):(g=Math.min(Math.max(g,i.frustum.near),i.frustum.far),v=Math.max(Math.min(v,i.frustum.far),g),S&&(T=Math.min(Math.max(T,i.frustum.near),i.frustum.far),E=Math.max(Math.min(E,i.frustum.far),T))),S&&(t.shadowState.nearPlane=T,t.shadowState.farPlane=E,t.shadowState.closestObjectSize=x);var V,U=e.mode===C.SCENE2D,G=t.useLogDepth,H=G?e.logarithmicDepthFarToNearRatio:e.farToNearRatio;U?(v=Math.min(v,i.position.z+e.nearToFarDistance2D),g=Math.min(g,v),V=Math.ceil(Math.max(1,v-g)/e.nearToFarDistance2D)):V=Math.ceil(Math.log(v/g)/Math.log(H)),(this.updateFrustums||g!==Number.MAX_VALUE&&(V!==p||0!==h.length&&(g<h[0].near||v>h[p-1].far&&(G||!a.equalsEpsilon(v,h[p-1].far,a.EPSILON8)))))&&(this.updateFrustums=!1,w(g,v,H,V,G,h,U,e.nearToFarDistance2D),this.createPotentiallyVisibleSet(e));var W=t.frustumSplits;W.length=V+1;for(var q=0;q<V;++q)W[q]=h[q].near,q===V-1&&(W[q+1]=h[q].far)},S.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();var e,t,i=this.pickDepths,r=this.debugGlobeDepths;for(t=i.length,e=0;e<t;++e)i[e].destroy();for(t=r.length,e=0;e<t;++e)r[e].destroy()},S}),define("Scene/Scene",["../Core/ApproximateTerrainHeights","../Core/BoundingRectangle","../Core/BoundingSphere","../Core/BoxGeometry","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartographic","../Core/Check","../Core/Color","../Core/ColorGeometryInstanceAttribute","../Core/createGuid","../Core/CullingVolume","../Core/defaultValue","../Core/defined","../Core/defineProperties","../Core/deprecationWarning","../Core/destroyObject","../Core/DeveloperError","../Core/EllipsoidGeometry","../Core/Event","../Core/GeographicProjection","../Core/GeometryInstance","../Core/GeometryPipeline","../Core/Intersect","../Core/JulianDate","../Core/Math","../Core/Matrix4","../Core/mergeSort","../Core/Occluder","../Core/OrthographicFrustum","../Core/OrthographicOffCenterFrustum","../Core/PerspectiveFrustum","../Core/PerspectiveOffCenterFrustum","../Core/PixelFormat","../Core/Ray","../Core/RequestScheduler","../Core/ShowGeometryInstanceAttribute","../Core/TaskProcessor","../Core/Transforms","../Renderer/ClearCommand","../Renderer/ComputeEngine","../Renderer/Context","../Renderer/ContextLimits","../Renderer/DrawCommand","../Renderer/Framebuffer","../Renderer/Pass","../Renderer/PixelDatatype","../Renderer/ShaderProgram","../Renderer/ShaderSource","../Renderer/Texture","../ThirdParty/when","./BrdfLutGenerator","./Camera","./Cesium3DTileFeature","./Cesium3DTileset","./CreditDisplay","./DebugCameraPrimitive","./DepthPlane","./DerivedCommand","./DeviceOrientationCamera
n.creditDisplay.beginFrame(),e.fog.update(n),r.update(n);var u=e.shadowMap;p(u)&&u.enabled&&(o.negate(r.sunDirectionWC,e._sunCamera.direction),n.shadowMaps.push(u)),e._computeCommandList.length=0,e._overlayCommandList.length=0;var c=a.viewport;c.x=0,c.y=0,c.width=i.drawingBufferWidth,c.height=i.drawingBufferHeight;var d=a.passState;d.framebuffer=void 0,d.blendingEnabled=void 0,d.scissorTest=void 0,d.viewport=t.clone(c,d.viewport),p(e.globe)&&e.globe.beginFrame(n),it(e),Je(e,d,s),st(e,d),d.framebuffer=void 0,Qe(e,d),p(e.globe)&&(e.globe.endFrame(n),e.globe.tilesLoaded||(e._renderRequested=!0)),n.creditDisplay.endFrame(),i.endFrame()}function ht(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function pt(e,t,i,r,n){var a=e.camera,s=a.frustum;p(s._offCenterFrustum)&&(s=s._offCenterFrustum);var l=2*(t.x-n.x)/n.width-1;l*=.5*(s.right-s.left);var u=2*(n.height-t.y-n.y)/n.height-1;u*=.5*(s.top-s.bottom);var c=A.clone(a.transform,ti);a._setTransform(A.IDENTITY);var d=o.clone(a.position,Jt);o.multiplyByScalar(a.right,l,$t),o.add($t,d,d),o.multiplyByScalar(a.up,u,$t),o.add($t,d,d),a._setTransform(c),e.mode===ye.SCENE2D&&o.fromElements(d.z,d.x,d.y,d);var h=s.getPixelDimensions(n.width,n.height,1,ei),f=Kt;return f.right=.5*h.x,f.left=-f.right,f.top=.5*h.y,f.bottom=-f.top,f.near=s.near,f.far=s.far,f.computeCullingVolume(d,a.directionWC,a.upWC)}function ft(e,t,i,r,n){var o=e.camera,a=o.frustum,s=a.near,l=Math.tan(.5*a.fovy),u=a.aspectRatio*l,c=2*(t.x-n.x)/n.width-1,d=2*(n.height-t.y-n.y)/n.height-1,h=c*s*u,p=d*s*l,f=a.getPixelDimensions(n.width,n.height,1,ei),m=f.x*i*.5,_=f.y*r*.5,g=ii;return g.top=p+_,g.bottom=p-_,g.right=h+m,g.left=h-m,g.near=s,g.far=a.far,g.computeCullingVolume(o.positionWC,o.directionWC,o.upWC)}function mt(e,t,i,r,n){var o=e.camera.frustum;return o instanceof D||o instanceof I?pt(e,t,i,r,n):ft(e,t,i,r,n)}function _t(e,i){var r=e._context,n=e._frameState,o=e._environmentState,a=e._defaultView;e._view=a;var s=a.viewport;s.x=0,s.y=0,s.width=r.drawingBufferWidth,s.height=r.drawingBufferHeight;var l=a.passState;l.viewport=t.clone(s,l.viewport),Re(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=mt(e,i,1,1,s),it(e),o.renderTranslucentDepthForPick=!0,l=a.pickDepthFramebuffer.update(r,i,s),Je(e,l,ai),st(e,l),r.endFrame()}function gt(e,t){var i,r,n=[],o=[],a=[],s=[];p(e)||(e=Number.MAX_VALUE);for(var l=t();p(l);){var u=l.object,c=l.position,d=l.exclude;if(p(c)&&!p(u)){n.push(l);break}if(!p(u)||!p(u.primitive))break;if(!d&&(n.push(l),0>=--e))break;var h=u.primitive,f=!1;"function"==typeof h.getGeometryInstanceAttributes&&p(u.id)&&(r=h.getGeometryInstanceAttributes(u.id),p(r)&&p(r.show)&&(f=!0,r.show=F.toValue(!1,r.show),a.push(r))),u instanceof $&&(f=!0,u.show=!1,s.push(u)),f||(h.show=!1,o.push(h)),l=t()}for(i=0;i<o.length;++i)o[i].show=!0;for(i=0;i<a.length;++i)r=a[i],r.show=F.toValue(!0,r.show);for(i=0;i<s.length;++i)s[i].show=!0;return n}function vt(e,t){var i=e.direction,r=o.mostOrthogonalAxis(i,ui),n=o.cross(i,r,ui),a=o.cross(i,n,ci);t.position=e.origin,t.direction=i,t.up=a,t.right=n}function yt(e,t){var i=e._context,r=i.uniformState,n=e._frameState,o=e._pickOffscreenView;e._view=o;var a=t.ray,s=t.primitives;vt(a,o.camera),Le(e),n.passes.offscreen=!0,n.passes.async=!0,r.update(n);for(var l=n.commandList,u=l.length,c=!0,d=s.length,h=0;h<d;++h){var p=s[h];if(p.show&&e.primitives.contains(p)){var f=p.updateAsync(n);c=c&&f}}return l.length=u,e._view=e._defaultView,c&&t.deferred.resolve(),c}function Ct(e){for(var t=e._asyncRayPicks,i=0;i<t.length;++i)yt(e,t[i])&&t.splice(i--,1)}function bt(e,t,i,r){for(var n=[],o=e.primitives,a=o.length,s=0;s<a;++s){var l=o.get(s);l instanceof ee&&l.show&&(p(i)&&-1!==i.indexOf(l)||n.push(l))}if(0===n.length)return Z.resolve(r());var u=new xe(t,n);return e._asyncRayPicks.push(u),u.promise.then(function(){return r()})}function St(e,t){return!(!p(e)||!p(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function Tt(e,i,r,n,o){var a=e._context,s=a.uniformState,l=e._frameState,u=e._pickOffscreenView;e._view=u,v
;return"uniform sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 color = texture2D(u_texture, v_textureCoordinates);\ngl_FragColor = czm_gammaCorrect(color);\n}\n"}),define("Shaders/SunTextureFS",[],function(){"use strict";return"uniform float u_radiusTS;\nvarying vec2 v_textureCoordinates;\nvec2 rotate(vec2 p, vec2 direction)\n{\nreturn vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\nvec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\nfloat radius = length(rotatedPosition) * lengthScalar;\nfloat burst = 1.0 - smoothstep(0.0, 0.55, radius);\nreturn vec4(burst);\n}\nvoid main()\n{\nfloat lengthScalar = 2.0 / sqrt(2.0);\nvec2 position = v_textureCoordinates - vec2(0.5);\nfloat radius = length(position) * lengthScalar;\nfloat surface = step(radius, u_radiusTS);\nvec4 color = vec4(vec2(1.0), surface + 0.2, surface);\nfloat glow = 1.0 - smoothstep(0.0, 0.55, radius);\ncolor.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\nvec4 burst = vec4(0.0);\nburst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar);\nburst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar);\nburst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar);\ncolor += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\ngl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n"}),define("Shaders/SunVS",[],function(){"use strict";return"attribute vec2 direction;\nuniform float u_size;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\nvec4 position;\nif (czm_morphTime == 1.0)\n{\nposition = vec4(czm_sunPositionWC, 1.0);\n}\nelse\n{\nposition = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n}\nvec4 positionEC = czm_view * position;\nvec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\nvec2 halfSize = vec2(u_size * 0.5);\nhalfSize *= ((direction * 2.0) - 1.0);\ngl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\nv_textureCoordinates = direction;\n}\n"}),define("Scene/Sun",["../Core/BoundingSphere","../Core/Cartesian2","../Core/Cartesian3","../Core/Cartesian4","../Core/ComponentDatatype","../Core/defined","../Core/defineProperties","../Core/destroyObject","../Core/IndexDatatype","../Core/Math","../Core/Matrix4","../Core/PixelFormat","../Core/PrimitiveType","../Renderer/Buffer","../Renderer/BufferUsage","../Renderer/ComputeCommand","../Renderer/DrawCommand","../Renderer/PixelDatatype","../Renderer/RenderState","../Renderer/ShaderProgram","../Renderer/Texture","../Renderer/VertexArray","../Shaders/SunFS","../Shaders/SunTextureFS","../Shaders/SunVS","./BlendingState","./SceneMode","./SceneTransforms"],function(e,t,i,r,n,o,a,s,l,u,c,d,h,p,f,m,_,g,v,y,C,b,S,T,E,w,A,x){"use strict";function P(){this.show=!0,this._drawCommand=new _({primitiveType:h.TRIANGLES,boundingVolume:new e,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new e,this._boundingVolume2D=new e,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;var t=this;this._uniformMap={u_texture:function(){return t._texture},u_size:function(){return t._size}}}a(P.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var D=new t,I=new t,M=new r,R=new r;return P.prototype.update=function(r,a,s){if(this.show){var h=r.mode;if(h!==A.SCENE2D&&h!==A.MORPHING&&r.passes.render){var _=r.context,P=a.viewport.width,O=a.viewport.height;if(!o(this._texture)||P!==this._drawingBufferWidth||O!==this._drawingBufferHeight||this._glowFactorDirty||s!==this._useHdr){this._texture=this._texture&&this._texture.
i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},Za:function(e){return o||m.Z.scheduler(r),n[o++]=e,a++},cancel:function(e){(e-=a-o)>=s&&e<o&&(n[e]=null)},resetForTesting:function(){var e=o-s;return s=o=n.length=0,e},rd:e}}(),m.b("tasks",m.Z),m.b("tasks.schedule",m.Z.Za),m.b("tasks.runEarly",m.Z.rd),m.Aa={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return m.B({read:e,write:function(r){clearTimeout(i),i=m.a.setTimeout(function(){e(r)},t)}})},rateLimit:function(e,t){var i,r,n;"number"==typeof t?i=t:(i=t.timeout,r=t.method),e.gb=!1,n="notifyWhenChangesStop"==r?c:u,e.Wa(function(e){return n(e,i)})},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.gb||(t.gb=!0,t.Wa(function(i){var r,n=!1;return function(){if(!n){m.Z.cancel(r),r=m.Z.Za(i);try{n=!0,t.notifySubscribers(e,"dirty")}finally{n=!1}}}}))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var _={undefined:1,boolean:1,number:1,string:1};m.b("extenders",m.Aa),m.zc=function(e,t,i){this.$=e,this.jb=t,this.Pc=i,this.T=!1,m.H(this,"dispose",this.k)},m.zc.prototype.k=function(){this.T=!0,this.Pc()},m.K=function(){m.a.ab(this,v),v.ub(this)};var g="change",v={ub:function(e){e.F={change:[]},e.Qb=1},Y:function(e,t,i){var r=this;i=i||g;var n=new m.zc(r,t?e.bind(t):e,function(){m.a.Na(r.F[i],n),r.Ka&&r.Ka(i)});return r.ua&&r.ua(i),r.F[i]||(r.F[i]=[]),r.F[i].push(n),n},notifySubscribers:function(e,t){if(t=t||g,t===g&&this.Kb(),this.Ra(t)){var i=t===g&&this.Fc||this.F[t].slice(0);try{m.l.Xb();for(var r,n=0;r=i[n];++n)r.T||r.jb(e)}finally{m.l.end()}}},Pa:function(){return this.Qb},Zc:function(e){return this.Pa()!==e},Kb:function(){++this.Qb},Wa:function(e){var t,i,r,n,o=this,a=m.I(o);o.Ja||(o.Ja=o.notifySubscribers,o.notifySubscribers=d);var s=e(function(){o.Ha=!1,a&&n===o&&(n=o.Mb?o.Mb():o());var e=i||o.Ua(r,n);i=t=!1,e&&o.Ja(r=n)});o.Pb=function(e){o.Fc=o.F[g].slice(0),o.Ha=t=!0,n=e,s()},o.Ob=function(e){t||(r=e,o.Ja(e,"beforeChange"))},o.Hc=function(){o.Ua(r,o.p(!0))&&(i=!0)}},Ra:function(e){return this.F[e]&&this.F[e].length},Xc:function(e){if(e)return this.F[e]&&this.F[e].length||0;var t=0;return m.a.D(this.F,function(e,i){"dirty"!==e&&(t+=i.length)}),t},Ua:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},extend:function(e){var t=this;return e&&m.a.D(e,function(e,i){var r=m.Aa[e];"function"==typeof r&&(t=r(t,i)||t)}),t}};m.H(v,"subscribe",v.Y),m.H(v,"extend",v.extend),m.H(v,"getSubscriptionsCount",v.Xc),m.a.la&&m.a.$a(v,Function.prototype),m.K.fn=v,m.lc=function(e){return null!=e&&"function"==typeof e.Y&&"function"==typeof e.notifySubscribers},m.b("subscribable",m.K),m.b("isSubscribable",m.lc),m.xa=m.l=function(){function e(e){r.push(i),i=e}function t(){i=r.pop()}var i,r=[],n=0;return{Xb:e,end:t,sc:function(e){if(i){if(!m.lc(e))throw Error("Only subscribable things can act as dependencies");i.jb.call(i.Lc,e,e.Gc||(e.Gc=++n))}},w:function(i,r,n){try{return e(),i.apply(r,n||[])}finally{t()}},Ca:function(){if(i)return i.m.Ca()},Va:function(){if(i)return i.Va}}}(),m.b("computedContext",m.xa),m.b("computedContext.getDependenciesCount",m.xa.Ca),m.b("computedContext.isInitial",m.xa.Va),m.b("ignoreDependencies",m.wd=m.l.w);var y=m.a.bc("_latestValue");m.O=function(e){function t(){return 0<arguments.length?(t.Ua(t[y],arguments[0])&&(t.ia(),t[y]=arguments[0],t.ha()),this):(m.l.sc(t),t[y])}return t[y]=e,m.a.la||m.a.extend(t,m.K.fn),m.K.fn.ub(t),m.a.ab(t,C),m.options.deferUpdates&&m.Aa.deferred(t,!0),t};var C={equalityComparer:l,p:function(){return this[y]},ha:function(){this.notifySubscribers(this[y])},ia:function(){this.notifySubscribers(this[y],"beforeChange")}};m.a.la&&m.a.$a(C,m.K.fn);var b=m.O.md="__ko_proto__";C[b]=m.O,m.Qa=function(t,i){return null!==t&&t!==e&&t[b]!==e&&(t[b]===i||m.Qa(t[b],i))},m.I=function(e){return m.Qa(e,m.O)},m.Da=function(e){return!!("function"==typeof e&&e[b]===m.O||"function"==typeof e&&e[b]===m.B&&e.$c)},m.b("observable",m.O),m.b("isObservable",m.I),m.b("isWriteableObservable",m.
i=o(i,r.get("optionsText"),a),m.a.bb(n,i)),[n]},i,u),m.l.w(function(){c?m.j.ja(t,m.a.c(r.get("value")),!0):(s?p.length&&n().length<p.length:p.length&&0<=t.selectedIndex?m.j.u(t.options[t.selectedIndex])!==p[0]:p.length||0<=t.selectedIndex)&&m.a.Fa(t,"change")}),m.a.Sc(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},m.d.options.zb=m.a.e.J(),m.d.selectedOptions={after:["options","foreach"],init:function(e,t,i){m.a.q(e,"change",function(){var r=t(),n=[];m.a.r(e.getElementsByTagName("option"),function(e){e.selected&&n.push(m.j.u(e))}),m.h.Ga(r,i,"selectedOptions",n)})},update:function(e,t){if("select"!=m.a.A(e))throw Error("values binding applies only to SELECT elements");var i=m.a.c(t()),r=e.scrollTop;i&&"number"==typeof i.length&&m.a.r(e.getElementsByTagName("option"),function(e){var t=0<=m.a.o(i,m.j.u(e));e.selected!=t&&m.a.wc(e,t)}),e.scrollTop=r}},m.h.ga.selectedOptions=!0,m.d.style={update:function(t,i){var r=m.a.c(i()||{});m.a.D(r,function(i,r){r=m.a.c(r),null!==r&&r!==e&&!1!==r||(r=""),t.style[i]=r})}},m.d.submit={init:function(e,t,i,r,n){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");m.a.q(e,"submit",function(i){var r,o=t();try{r=o.call(n.$data,e)}finally{!0!==r&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}})}},m.d.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){m.a.bb(e,t())}},m.f.aa.text=!0,function(){if(t&&t.navigator)var i=function(e){if(e)return parseFloat(e[1])},r=t.opera&&t.opera.version&&parseInt(t.opera.version()),n=t.navigator.userAgent,o=i(n.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),a=i(n.match(/Firefox\/([^ ]*)/));if(10>m.a.C)var s=m.a.e.J(),l=m.a.e.J(),u=function(e){var t=this.activeElement;(t=t&&m.a.e.get(t,l))&&t(e)},c=function(e,t){var i=e.ownerDocument;m.a.e.get(i,s)||(m.a.e.set(i,s,!0),m.a.q(i,"selectionchange",u)),m.a.e.set(e,l,t)};m.d.textInput={init:function(t,i,n){function s(e,i){m.a.q(t,e,i)}function l(){var r=m.a.c(i());null!==r&&r!==e||(r=""),p!==e&&r===p?m.a.setTimeout(l,4):t.value!==r&&(f=r,t.value=r)}function u(){h||(p=t.value,h=m.a.setTimeout(d,4))}function d(){clearTimeout(h),p=h=e;var r=t.value;f!==r&&(f=r,m.h.Ga(i(),n,"textInput",r))}var h,p,f=t.value,_=9==m.a.C?u:d;10>m.a.C?(s("propertychange",function(e){"value"===e.propertyName&&_(e)}),8==m.a.C&&(s("keyup",d),s("keydown",d)),8<=m.a.C&&(c(t,_),s("dragend",u))):(s("input",d),5>o&&"textarea"===m.a.A(t)?(s("keydown",u),s("paste",u),s("cut",u)):11>r?s("keydown",u):4>a&&(s("DOMAutoComplete",d),s("dragdrop",d),s("drop",d))),s("change",d),m.m(l,null,{i:t})}},m.h.ga.textInput=!0,m.d.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),m.d.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++m.d.uniqueName.Nc;m.a.vc(e,i)}}},m.d.uniqueName.Nc=0,m.d.value={after:["options","foreach"],init:function(e,t,i){if("input"!=e.tagName.toLowerCase()||"checkbox"!=e.type&&"radio"!=e.type){var r=["change"],n=i.get("valueUpdate"),o=!1,a=null;n&&("string"==typeof n&&(n=[n]),m.a.ta(r,n),r=m.a.Wb(r));var s=function(){a=null,o=!1;var r=t(),n=m.j.u(e);m.h.Ga(r,i,"value",n)};!m.a.C||"input"!=e.tagName.toLowerCase()||"text"!=e.type||"off"==e.autocomplete||e.form&&"off"==e.form.autocomplete||-1!=m.a.o(r,"propertychange")||(m.a.q(e,"propertychange",function(){o=!0}),m.a.q(e,"focus",function(){o=!1}),m.a.q(e,"blur",function(){o&&s()})),m.a.r(r,function(t){var i=s;m.a.sd(t,"after")&&(i=function(){a=m.j.u(e),m.a.setTimeout(s,0)},t=t.substring(5)),m.a.q(e,t,i)});var l=function(){var r=m.a.c(t()),n=m.j.u(e);if(null!==a&&r===a)m.a.setTimeout(l,0);else if(r!==n)if("select"===m.a.A(e)){var o=i.get("valueAllowUnset"),n=function(){m.j.ja(e,r,o)};n(),o||r===m.j.u(e)?m.a.setTimeout(n,0):m.l.w(m.a.Fa,null,[e,"change"])}else m.j.ja(e,r)};m.m(l,null,{i:e})}else m.La(e,{checkedValue:t})},update:function(){}},m.h.ga.value=!0,m.d.visible={update:function(e,t){var i=m.a.c(t()),r="none"!=e.style.display;i&&!r?e.style.display="":!i&&r&&(e.style.display="none")}},function(e){m.d[e]={init:function(t,i,r,n,o){return m.d.event.init.call(this,t,function(){var t={};return t[e
function f(e,t){var i=e._viewModel,r=i.shuttleRingDragging;if(!r||g===e)if("mousedown"===t.type||r&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||r&&"touchmove"===t.type&&1===t.touches.length){var n,o,a=e._centerX,s=e._centerY,l=e._svgNode,u=l.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(n=t.touches[0].clientX,o=t.touches[0].clientY):(n=t.clientX,o=t.clientY),!r&&(n>u.right||n<u.left||o<u.top||o>u.bottom))return;var c=e._shuttleRingPointer.getBoundingClientRect(),d=n-a-u.left,h=o-s-u.top,p=180*Math.atan2(h,d)/Math.PI+90;p>180&&(p-=360);var f=i.shuttleRingAngle;r||n<c.right&&n>c.left&&o>c.top&&o<c.bottom?(g=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=p):p<f?i.slower():p>f&&i.faster(),t.preventDefault()}else e===g&&(g=void 0),i.shuttleRingDragging=!1}function m(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;var i=this;this._clickFunction=function(){var e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[a(t,"toggled",this.setToggled,this),a(t,"tooltip",this.setTooltip,this),a(t.command,"canExecute",this.setEnabled,this)]}function _(e,t){function i(e){f(w,e)}e=o(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;var r=document.createElement("style");r.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); }",document.head.insertBefore(r,document.head.childNodes[0]);var n=document.createElement("div");n.className="cesium-animation-theme",n.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=n,this._themeNormal=n.childNodes[0],this._themeHover=n.childNodes[1],this._themeSelect=n.childNodes[2],this._themeDisabled=n.childNodes[3],this._themeKnob=n.childNodes[4],this._themePointer=n.childNodes[5],this._themeSwoosh=n.childNodes[6],this._themeSwooshHover=n.childNodes[7];var s=document.createElementNS(v,"svg:svg");this._svgNode=s,s.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",y);var d=document.createElementNS(v,"g");this._topG=d,this._realtimeSVG=new m(p(3,4,"#animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new m(h(44,99,"#animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new m(h(124,99,"#animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new m(h(84,99,"#animation_pathPause"),t.pauseViewModel);var _=document.createElementNS(v,"g");_.appendChild(this._realtimeSVG.svgElement),_.appendChild(this._playReverseSVG.svgElement),_.appendChild(this._playForwardSVG.svgElement),_.appendChild(this._pauseSVG.svgElement);var g=l({tagName:"circle",class:"cesium
this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),i(this)},l}),define("Widgets/BaseLayerPicker/ProviderViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../../ThirdParty/knockout","../createCommand"],function(e,t,i,r,n,o){"use strict";function a(i){var r=i.creationFunction;t(r.canExecute)||(r=o(r)),this._creationCommand=r,this.name=i.name,this.tooltip=i.tooltip,this.iconUrl=i.iconUrl,this._category=e(i.category,""),n.track(this,["name","tooltip","iconUrl"])}return i(a.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}}),a}),define("Widgets/BaseLayerPicker/createDefaultImageryProviderViewModels",["../../Core/buildModuleUrl","../../Scene/ArcGisMapServerImageryProvider","../../Scene/IonWorldImageryStyle","../../Scene/createOpenStreetMapImageryProvider","../../Scene/createTileMapServiceImageryProvider","../../Scene/createWorldImagery","../../Scene/IonImageryProvider","../../Scene/MapboxImageryProvider","../BaseLayerPicker/ProviderViewModel"],function(e,t,i,r,n,o,a,s,l){"use strict";function u(){var u=[];return u.push(new l({name:"Bing Maps Aerial",iconUrl:e("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return o({style:i.AERIAL})}})),u.push(new l({name:"Bing Maps Aerial with Labels",iconUrl:e("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return o({style:i.AERIAL_WITH_LABELS})}})),u.push(new l({name:"Bing Maps Roads",iconUrl:e("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return o({style:i.ROAD})}})),u.push(new l({name:"Mapbox Satellite",tooltip:"Mapbox satellite imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxSatellite.png"),category:"Other",creationFunction:function(){return new s({mapId:"mapbox.satellite"})}})),u.push(new l({name:"Mapbox Streets",tooltip:"Mapbox streets imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxTerrain.png"),category:"Other",creationFunction:function(){return new s({mapId:"mapbox.streets"})}})),u.push(new l({name:"Mapbox Streets Classic",tooltip:"Mapbox streets basic imagery https://www.mapbox.com/maps/",iconUrl:e("Widgets/Images/ImageryProviders/mapboxStreets.png"),category:"Other",creationFunction:function(){return new s({mapId:"mapbox.streets-basic"})}})),u.push(new l({name:"ESRI World Imagery",iconUrl:e("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"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 NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new t({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),u.push(new l({name:"ESRI World Street Map",iconUrl:e("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Ja
o.applyBindings(u,r)}function c(e,i,r,n,o,a){a=t(a,e);var s=document.createElement("input");s.setAttribute("data-bind","value: "+a),s.type="number";var l=document.createElement("input");l.type="range",l.min=i,l.max=r,l.step=n,l.setAttribute("data-bind",'valueUpdate: "input", value: '+e);var u=document.createElement("div");u.appendChild(l);var c=document.createElement("div");return c.className="cesium-cesiumInspector-slider",c.appendChild(document.createTextNode(o)),c.appendChild(s),c.appendChild(u),c}function d(e,t,r){var n=document.createElement("button");n.type="button",n.textContent=t,n.className="cesium-cesiumInspector-pickButton";var o="click: "+e;return i(r)&&(o+=', css: {"cesium-cesiumInspector-pickButtonHighlight" : '+r+"}"),n.setAttribute("data-bind",o),n}return r(u.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){return o.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),n(this)},u}),define("Widgets/CesiumInspector/CesiumInspectorViewModel",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/Rectangle","../../Core/ScreenSpaceEventHandler","../../Core/ScreenSpaceEventType","../../Scene/DebugModelMatrixPrimitive","../../Scene/PerformanceDisplay","../../Scene/TileCoordinatesImageryProvider","../../ThirdParty/knockout","../createCommand"],function(e,t,i,r,n,o,a,s,l,u,c,d){"use strict";function h(t){var i;if(e(t)){i="Command Statistics";var r=t.commandsInFrustums;for(var n in r)if(r.hasOwnProperty(n)){var o,a=parseInt(n,10);if(7===a)o="1, 2 and 3";else{for(var s=[],l=2;l>=0;l--){var u=Math.pow(2,l);a>=u&&(s.push(l+1),a-=u)}o=s.reverse().join(" and ")}i+="<br>&nbsp;&nbsp;&nbsp;&nbsp;"+r[n]+" in frustum "+o}i+="<br>Total: "+t.totalCommands}return i}function p(e,t,i){var r=Math.min(i,t);return r=Math.max(r,e)}function f(t,i){function r(t){var i=f._scene.pick({x:t.position.x,y:t.position.y});e(i)&&(f.primitive=e(i.collection)?i.collection:i.primitive),f._scene.requestRender(),f.pickPrimitiveActive=!1}function h(t){var i,r=g.ellipsoid,o=f._scene.camera.pickEllipsoid({x:t.position.x,y:t.position.y},r);if(e(o))for(var a=r.cartesianToCartographic(o),s=g._surface.tileProvider._tilesToRenderByTextureCount,l=0;!i&&l<s.length;++l){var u=s[l];if(e(u))for(var c=0;!i&&c<u.length;++c){var d=u[c];n.contains(d.rectangle,a)&&(i=d)}}f.tile=i,f.pickTileActive=!1}var f=this,m=t.canvas,_=new o(m);this._eventHandler=_,this._scene=t,this._canvas=m,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=i;var g=this._scene.globe;g.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.globeDepth=!1,this.pickDepth=!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="",c.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","globeDepth","pickDepth","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=d(function(){f.dropDownVisible=!f.dropDownVisible}),this._toggleGeneral=d(function(){f.generalVisible=!f.generalVisible}),this._togglePrimitives=d(function(){f.primi
;return r?v(o):i?y(o):n&&o._searchCommand(),!0},this.activateSuggestion=function(e){o.hideSuggestions(),o._searchText=e.displayName;var t=e.destination;x(o),o.destinationFound(o,t)},this.hideSuggestions=function(){o._showSuggestions=!1,o._selectedSuggestion=void 0},this.showSuggestions=function(){o._showSuggestions=!0},this.handleMouseover=function(e,t){e!==o._selectedSuggestion&&(o._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=i(n.autocomplete,!0),this.destinationFound=i(n.destinationFound,g.flyToDestination),this._focusTextbox=!1,p.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);var l=p.getObservable(this,"_searchText");l.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=l.subscribe(function(){g._updateSearchSuggestions(o)}),this.isSearchInProgress=void 0,p.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,p.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){this._searchText=e}}),this.flightDuration=void 0,p.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){this._flightDuration=e}})}function v(e){if(0!==e._suggestions.length){var t,i=e._suggestions.indexOf(e._selectedSuggestion);if(-1===i||0===i)return void(e._selectedSuggestion=void 0);t=i-1,e._selectedSuggestion=e._suggestions[t],g._adjustSuggestionsScroll(e,t)}}function y(e){if(0!==e._suggestions.length){var t=e._suggestions.length,i=e._suggestions.indexOf(e._selectedSuggestion),r=(i+1)%t;e._selectedSuggestion=e._suggestions[r],g._adjustSuggestionsScroll(e,r)}}function C(e,t){var i=r(t)?t.availability:void 0;return r(i)?d(t,[e]).then(function(t){return e=t[0],e.height+=D,e}):(e.height+=D,f.resolve(e))}function b(e,t){var i,n=e._scene,o=n.mapProjection,a=o.ellipsoid,s=n.camera,d=n.terrainProvider,p=t;t instanceof c?l.equalsEpsilon(t.south,t.north,l.EPSILON7)&&l.equalsEpsilon(t.east,t.west,l.EPSILON7)?t=c.center(t):i=h(t,n):t=a.cartesianToCartographic(t),r(i)||(i=C(t,d)),i.then(function(e){p=a.cartographicToCartesian(e)}).always(function(){s.flyTo({destination:p,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:u.IDENTITY})})}function S(e,t,i,n){return e.then(function(e){return r(e)&&"fulfilled"===e.state&&e.value.length>0?e:t.geocode(i,n).then(function(e){return{state:"fulfilled",value:e}}).otherwise(function(e){return{state:"rejected",reason:e}})})}function T(e,t,i){var n=e._searchText;if(A(n))return void e.showSuggestions();e._isSearchInProgress=!0;for(var o=f.resolve(),a=0;a<t.length;a++)o=S(o,t[a],n,i);e._geocodePromise=o,o.then(function(t){if(!o.cancel){e._isSearchInProgress=!1;var i=t.value;if("fulfilled"===t.state&&r(i)&&i.length>0)return e._searchText=i[0].displayName,void e.destinationFound(e,i[0].destination);e._searchText=n+" (not found)"}})}function E(e,t){var i=_(e._viewContainer),r=i.getElementsByClassName("search-results")[0],n=i.getElementsByTagName("li"),o=n[t];if(0===t)return void(r.scrollTop=0);var a=o.offsetTop;a+o.clientHeight>r.clientHeight?r.scrollTop=a+o.clientHeight:a<r.scrollTop&&(r.scrollTop=a)}function w(e){e._isSearchInProgress=!1,r(e._geocodePromise)&&(e._geocodePromise.cancel=!0,e._geocodePromise=void 0)}function A(e){return/^\s*$/.test(e)}function x(e){p.getObservable(e,"_suggestions").removeAll()}function P(e){if(e.autoComplete){var t=e._searchText;if(x(e),!A(t)){var i=f.resolve([]);e._geocoderServices.forEach(function(e){i=i.then(function(i){return i.length>=5?i:e.geocode(t,s.AUTOCOMPLETE).then(function(e){return i=i.concat(e)})})}),i.then(function(t){for(var i=e._suggestions,r=0;r<t.length;r++)i.push(t[r])})}}}var D=1e3;return n(g.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._s
t.morphTo2D(r._duration)}),this._morphTo3D=l(function(){t.morphTo3D(r._duration)}),this._morphToColumbusView=l(function(){t.morphToColumbusView(r._duration)}),this._sceneMode=a}return i(u.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}}}),u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){this._eventHelper.removeAll(),r(this)},u}),define("Widgets/SceneModePicker/SceneModePicker",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/FeatureDetection","../../ThirdParty/knockout","../getElement","./SceneModePickerViewModel"],function(e,t,i,r,n,o,a,s){"use strict";function l(e,t,i){e=a(e);var r=new s(t,i);r._globePath=u,r._flatMapPath=c,r._columbusViewPath=d;var l=document.createElement("span");l.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(l);var h=document.createElement("button");h.type="button",h.className="cesium-button cesium-toolbar-button",h.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'),h.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',l.appendChild(h);var p=document.createElement("button");p.type="button",p.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",p.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 }'),l.appendChild(p);var f=document.createElement("button");f.type="button",f.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",f.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 }'),l.appendChild(f);var m=document.createElement("button");m.type="button",m.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",m.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 }'),l.appendChild(m),o.applyBindings(r,l),this._viewModel=r,this._container=e,this._wrapper=l,this._closeDropDown=function(e){l.contains(e.target)||(r.
define("Widgets/VRButton/VRButtonViewModel",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../Core/EventHelper","../../Core/Fullscreen","../../Core/OrthographicFrustum","../../ThirdParty/knockout","../../ThirdParty/NoSleep","../createCommand","../getElement"],function(e,t,i,r,n,o,a,s,l,u,c,d){"use strict";function h(e){var i=!1,r=window.screen;return t(r)&&(t(r.lockOrientation)?i=r.lockOrientation(e):t(r.mozLockOrientation)?i=r.mozLockOrientation(e):t(r.msLockOrientation)?i=r.msLockOrientation(e):t(r.orientation&&r.orientation.lock)&&(i=r.orientation.lock(e))),i}function p(){var e=window.screen;t(e)&&(t(e.unlockOrientation)?e.unlockOrientation():t(e.mozUnlockOrientation)?e.mozUnlockOrientation():t(e.msUnlockOrientation)?e.msUnlockOrientation():t(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function f(e,t,i,r){r()||(i()?(t.useWebVR=!1,e._locked&&(p(),e._locked=!1),e._noSleep.disable(),a.exitFullscreen(),i(!1)):(a.fullscreen||a.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=h("landscape")),t.useWebVR=!0,i(!0)))}function m(t,i){var r=this,n=l.observable(a.enabled),h=l.observable(!1);this.isVRMode=void 0,l.defineProperty(this,"isVRMode",{get:function(){return h()}}),this.isVREnabled=void 0,l.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&a.enabled)}}),this.tooltip=void 0,l.defineProperty(this,"tooltip",function(){return n()?h()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});var m=l.observable(!1);this._isOrthographic=void 0,l.defineProperty(this,"_isOrthographic",{get:function(){return m()}}),this._eventHelper=new o,this._eventHelper.add(t.preRender,function(){m(t.camera.frustum instanceof s)}),this._locked=!1,this._noSleep=new u,this._command=c(function(){f(r,t,h,m)},l.getObservable(this,"isVREnabled")),this._vrElement=e(d(i),document.body),this._callback=function(){!a.fullscreen&&h()&&(t.useWebVR=!1,r._locked&&(p(),r._locked=!1),r._noSleep.disable(),h(!1))},document.addEventListener(a.changeEventName,this._callback)}return i(m.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}}),m.prototype.isDestroyed=function(){return!1},m.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(a.changeEventName,this._callback),r(this)},m}),define("Widgets/VRButton/VRButton",["../../Core/defined","../../Core/defineProperties","../../Core/destroyObject","../../Core/DeveloperError","../../ThirdParty/knockout","../getElement","./VRButtonViewModel"],function(e,t,i,r,n,o,a){"use strict";function s(e,t,i){e=o(e);var r=new a(t,i);r._exitVRPath=u,r._enterVRPath=l;var s=document.createElement("button");s.type="button",s.className="cesium-button cesium-vrButton",s.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(s),n.applyBindings(r,s),this._container=e,this._viewModel=r,this._element=s}var l="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",u="M 25.77058
v=e}}}),p(g,a),t.destroy=o(t,t.destroy,function(){t.dropEnabled=!1}),t._handleDrop=a}function d(e){e.stopPropagation(),e.preventDefault()}function h(e,i){var r=e;t(r)&&(r.removeEventListener("drop",i,!1),r.removeEventListener("dragenter",d,!1),r.removeEventListener("dragover",d,!1),r.removeEventListener("dragexit",d,!1))}function p(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",d,!1),e.addEventListener("dragover",d,!1),e.addEventListener("dragexit",d,!1)}function f(e,i,r,n){var o=e.scene;return function(u){var c=i.name;try{var d;if(/\.czml$/i.test(c))d=a.load(JSON.parse(u.target.result),{sourceUri:c});else if(/\.geojson$/i.test(c)||/\.json$/i.test(c)||/\.topojson$/i.test(c))d=s.load(JSON.parse(u.target.result),{sourceUri:c,clampToGround:n});else{if(!/\.(kml|kmz)$/i.test(c))return void e.dropError.raiseEvent(e,c,"Unrecognized file: "+c);d=l.load(i,{sourceUri:c,proxy:r,camera:o.camera,canvas:o.canvas,clampToGround:n})}t(d)&&e.dataSources.add(d).then(function(t){e.flyToOnDrop&&e.flyTo(t)}).otherwise(function(t){e.dropError.raiseEvent(e,c,t)})}catch(t){e.dropError.raiseEvent(e,c,t)}}}function m(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}return c}),define("Widgets/Viewer/viewerPerformanceWatchdogMixin",["../../Core/defaultValue","../../Core/defined","../../Core/defineProperties","../../Core/DeveloperError","../PerformanceWatchdog/PerformanceWatchdog"],function(e,t,i,r,n){"use strict";function o(t,r){r=e(r,e.EMPTY_OBJECT);var o=new n({scene:t.scene,container:t.bottomContainer,lowFrameRateMessage:r.lowFrameRateMessage});i(t,{performanceWatchdog:{get:function(){return o}}})}return o}),define("Workers/createTaskProcessorWorker",["../ThirdParty/when","../Core/defaultValue","../Core/defined","../Core/formatError"],function(e,t,i,r){"use strict";function n(t,i,r){try{return t(i,r)}catch(t){return e.reject(t)}}function o(o){var a;return function(s){var l=s.data,u=[],c={id:l.id,result:void 0,error:void 0};return e(n(o,l.parameters,u)).then(function(e){c.result=e}).otherwise(function(e){e instanceof Error?c.error={name:e.name,message:e.message,stack:e.stack}:c.error=e}).always(function(){i(a)||(a=t(self.webkitPostMessage,self.postMessage)),l.canTransferArrayBuffer||(u.length=0);try{a(c,u)}catch(e){c.result=void 0,c.error="postMessage failed with error: "+r(e)+"\n with responseMessage: "+JSON.stringify(c),a(c)}})}}return o}),
define("Cesium",["./Core/appendForwardSlash","./Core/ApproximateTerrainHeights","./Core/arrayFill","./Core/arrayRemoveDuplicates","./Core/arraySlice","./Core/AssociativeArray","./Core/AttributeCompression","./Core/AxisAlignedBoundingBox","./Core/barycentricCoordinates","./Core/binarySearch","./Core/BingMapsApi","./Core/BingMapsGeocoderService","./Core/BoundingRectangle","./Core/BoundingSphere","./Core/BoxGeometry","./Core/BoxOutlineGeometry","./Core/buildModuleUrl","./Core/cancelAnimationFrame","./Core/Cartesian2","./Core/Cartesian3","./Core/Cartesian4","./Core/Cartographic","./Core/CartographicGeocoderService","./Core/CatmullRomSpline","./Core/CesiumTerrainProvider","./Core/Check","./Core/CircleGeometry","./Core/CircleOutlineGeometry","./Core/Clock","./Core/ClockRange","./Core/ClockStep","./Core/clone","./Core/Color","./Core/ColorGeometryInstanceAttribute","./Core/combine","./Core/ComponentDatatype","./Core/CompressedTextureBuffer","./Core/CoplanarPolygonGeometry","./Core/CoplanarPolygonGeometryLibrary","./Core/CoplanarPolygonOutlineGeometry","./Core/CornerType","./Core/CorridorGeometry","./Core/CorridorGeometryLibrary","./Core/CorridorOutlineGeometry","./Core/createGuid","./Core/createWorldTerrain","./Core/Credit","./Core/CubicRealPolynomial","./Core/CullingVolume","./Core/CylinderGeometry","./Core/CylinderGeometryLibrary","./Core/CylinderOutlineGeometry","./Core/decodeGoogleEarthEnterpriseData","./Core/DefaultProxy","./Core/defaultValue","./Core/defined","./Core/defineProperties","./Core/deprecationWarning","./Core/destroyObject","./Core/DeveloperError","./Core/DistanceDisplayCondition","./Core/DistanceDisplayConditionGeometryInstanceAttribute","./Core/DoublyLinkedList","./Core/EarthOrientationParameters","./Core/EarthOrientationParametersSample","./Core/EasingFunction","./Core/EllipseGeometry","./Core/EllipseGeometryLibrary","./Core/EllipseOutlineGeometry","./Core/Ellipsoid","./Core/EllipsoidalOccluder","./Core/EllipsoidGeodesic","./Core/EllipsoidGeometry","./Core/EllipsoidOutlineGeometry","./Core/EllipsoidTangentPlane","./Core/EllipsoidTerrainProvider","./Core/EncodedCartesian3","./Core/Event","./Core/EventHelper","./Core/ExtrapolationType","./Core/FeatureDetection","./Core/formatError","./Core/freezeObject","./Core/FrustumGeometry","./Core/FrustumOutlineGeometry","./Core/Fullscreen","./Core/GeocoderService","./Core/GeocodeType","./Core/GeographicProjection","./Core/GeographicTilingScheme","./Core/Geometry","./Core/GeometryAttribute","./Core/GeometryAttributes","./Core/GeometryInstance","./Core/GeometryInstanceAttribute","./Core/GeometryOffsetAttribute","./Core/GeometryPipeline","./Core/GeometryType","./Core/getAbsoluteUri","./Core/getBaseUri","./Core/getExtensionFromUri","./Core/getFilenameFromUri","./Core/getImagePixels","./Core/getMagic","./Core/getStringFromTypedArray","./Core/getTimestamp","./Core/GoogleEarthEnterpriseMetadata","./Core/GoogleEarthEnterpriseTerrainData","./Core/GoogleEarthEnterpriseTerrainProvider","./Core/GoogleEarthEnterpriseTileInformation","./Core/GregorianDate","./Core/GroundPolylineGeometry","./Core/HeadingPitchRange","./Core/HeadingPitchRoll","./Core/Heap","./Core/HeightmapTerrainData","./Core/HeightmapTessellator","./Core/HermitePolynomialApproximation","./Core/HermiteSpline","./Core/Iau2000Orientation","./Core/Iau2006XysData","./Core/Iau2006XysSample","./Core/IauOrientationAxes","./Core/IauOrientationParameters","./Core/IndexDatatype","./Core/InterpolationAlgorithm","./Core/Intersect","./Core/Intersections2D","./Core/IntersectionTests","./Core/Interval","./Core/Ion","./Core/IonGeocoderService","./Core/IonResource","./Core/isArray","./Core/isBitSet","./Core/isBlobUri","./Core/isCrossOriginUrl","./Core/isDataUri","./Core/isLeapYear","./Core/Iso8601","./Core/JulianDate","./Core/KeyboardEventModifier","./Core/LagrangePolynomialApproximation","./Core/LeapSecond","./Core/LinearApproximation","./Core/LinearSpline","./Core/loadAndExecuteScript","./Core/loadCRN","./Core/loadImageFromTypedArray","./Core/loadKTX","./Core/ManagedArray","./Core/MapboxApi","./Core/MapProjection","./Core/Math","./Cor
"use strict";var Jm={VERSION:"1.53",_shaders:{}};return Jm.appendForwardSlash=e,Jm.ApproximateTerrainHeights=t,Jm.arrayFill=i,Jm.arrayRemoveDuplicates=r,Jm.arraySlice=n,Jm.AssociativeArray=o,Jm.AttributeCompression=a,Jm.AxisAlignedBoundingBox=s,Jm.barycentricCoordinates=l,Jm.binarySearch=u,Jm.BingMapsApi=c,Jm.BingMapsGeocoderService=d,Jm.BoundingRectangle=h,Jm.BoundingSphere=p,Jm.BoxGeometry=f,Jm.BoxOutlineGeometry=m,Jm.buildModuleUrl=_,Jm.cancelAnimationFrame=g,Jm.Cartesian2=v,Jm.Cartesian3=y,Jm.Cartesian4=C,Jm.Cartographic=b,Jm.CartographicGeocoderService=S,Jm.CatmullRomSpline=T,Jm.CesiumTerrainProvider=E,Jm.Check=w,Jm.CircleGeometry=A,Jm.CircleOutlineGeometry=x,Jm.Clock=P,Jm.ClockRange=D,Jm.ClockStep=I,Jm.clone=M,Jm.Color=R,Jm.ColorGeometryInstanceAttribute=O,Jm.combine=L,Jm.ComponentDatatype=N,Jm.CompressedTextureBuffer=F,Jm.CoplanarPolygonGeometry=B,Jm.CoplanarPolygonGeometryLibrary=z,Jm.CoplanarPolygonOutlineGeometry=k,Jm.CornerType=V,Jm.CorridorGeometry=U,Jm.CorridorGeometryLibrary=G,Jm.CorridorOutlineGeometry=H,Jm.createGuid=W,Jm.createWorldTerrain=q,Jm.Credit=Y,Jm.CubicRealPolynomial=j,Jm.CullingVolume=X,Jm.CylinderGeometry=Q,Jm.CylinderGeometryLibrary=Z,Jm.CylinderOutlineGeometry=K,Jm.decodeGoogleEarthEnterpriseData=J,Jm.DefaultProxy=$,Jm.defaultValue=ee,Jm.defined=te,Jm.defineProperties=ie,Jm.deprecationWarning=re,Jm.destroyObject=ne,Jm.DeveloperError=oe,Jm.DistanceDisplayCondition=ae,Jm.DistanceDisplayConditionGeometryInstanceAttribute=se,Jm.DoublyLinkedList=le,Jm.EarthOrientationParameters=ue,Jm.EarthOrientationParametersSample=ce,Jm.EasingFunction=de,Jm.EllipseGeometry=he,Jm.EllipseGeometryLibrary=pe,Jm.EllipseOutlineGeometry=fe,Jm.Ellipsoid=me,Jm.EllipsoidalOccluder=_e,Jm.EllipsoidGeodesic=ge,Jm.EllipsoidGeometry=ve,Jm.EllipsoidOutlineGeometry=ye,Jm.EllipsoidTangentPlane=Ce,Jm.EllipsoidTerrainProvider=be,Jm.EncodedCartesian3=Se,Jm.Event=Te,Jm.EventHelper=Ee,Jm.ExtrapolationType=we,Jm.FeatureDetection=Ae,Jm.formatError=xe,Jm.freezeObject=Pe,Jm.FrustumGeometry=De,Jm.FrustumOutlineGeometry=Ie,Jm.Fullscreen=Me,Jm.GeocoderService=Re,Jm.GeocodeType=Oe,Jm.GeographicProjection=Le,Jm.GeographicTilingScheme=Ne,Jm.Geometry=Fe,Jm.GeometryAttribute=Be,Jm.GeometryAttributes=ze,Jm.GeometryInstance=ke,Jm.GeometryInstanceAttribute=Ve,Jm.GeometryOffsetAttribute=Ue,Jm.GeometryPipeline=Ge,Jm.GeometryType=He,Jm.getAbsoluteUri=We,Jm.getBaseUri=qe,Jm.getExtensionFromUri=Ye,Jm.getFilenameFromUri=je,Jm.getImagePixels=Xe,Jm.getMagic=Qe,Jm.getStringFromTypedArray=Ze,Jm.getTimestamp=Ke,Jm.GoogleEarthEnterpriseMetadata=Je,Jm.GoogleEarthEnterpriseTerrainData=$e,Jm.GoogleEarthEnterpriseTerrainProvider=et,Jm.GoogleEarthEnterpriseTileInformation=tt,Jm.GregorianDate=it,Jm.GroundPolylineGeometry=rt,Jm.HeadingPitchRange=nt,Jm.HeadingPitchRoll=ot,Jm.Heap=at,Jm.HeightmapTerrainData=st,Jm.HeightmapTessellator=lt,Jm.HermitePolynomialApproximation=ut,Jm.HermiteSpline=ct,Jm.Iau2000Orientation=dt,Jm.Iau2006XysData=ht,Jm.Iau2006XysSample=pt,Jm.IauOrientationAxes=ft,Jm.IauOrientationParameters=mt,Jm.IndexDatatype=_t,Jm.InterpolationAlgorithm=gt,Jm.Intersect=vt,Jm.Intersections2D=yt,Jm.IntersectionTests=Ct,Jm.Interval=bt,Jm.Ion=St,Jm.IonGeocoderService=Tt,Jm.IonResource=Et,Jm.isArray=wt,Jm.isBitSet=At,Jm.isBlobUri=xt,Jm.isCrossOriginUrl=Pt,Jm.isDataUri=Dt,Jm.isLeapYear=It,Jm.Iso8601=Mt,Jm.JulianDate=Rt,Jm.KeyboardEventModifier=Ot,Jm.LagrangePolynomialApproximation=Lt,Jm.LeapSecond=Nt,Jm.LinearApproximation=Ft,Jm.LinearSpline=Bt,Jm.loadAndExecuteScript=zt,Jm.loadCRN=kt,Jm.loadImageFromTypedArray=Vt,Jm.loadKTX=Ut,Jm.ManagedArray=Gt,Jm.MapboxApi=Ht,Jm.MapProjection=Wt,Jm.Math=qt,Jm.Matrix2=Yt,Jm.Matrix3=jt,Jm.Matrix4=Xt,Jm.mergeSort=Qt,Jm.NearFarScalar=Zt,Jm.objectToQuery=Kt,Jm.Occluder=Jt,Jm.OffsetGeometryInstanceAttribute=$t,Jm.oneTimeWarning=ei,Jm.OpenCageGeocoderService=ti,Jm.OrientedBoundingBox=ii,Jm.OrthographicFrustum=ri,Jm.OrthographicOffCenterFrustum=ni,Jm.Packable=oi,Jm.PackableForInterpolation=ai,Jm.parseResponseHeaders=si,Jm.PeliasGeocoderService=li,Jm.PerspectiveFrustum=ui,Jm.PerspectiveOffCenterFrustum=ci,Jm.PinBuilder=di,Jm.PixelFormat=hi