bimland/dist/Cesium/Workers/GeometryAttribute-3a88ba31.js

128 lines
48 KiB
JavaScript
Raw Normal View History

2023-07-26 17:04:38 +08:00
define(["exports","./Cartesian2-47311507","./Cartographic-3309dd0d","./Check-7b2a090c","./when-b60132fc","./PrimitiveType-a54dc62f","./FeatureDetection-c3b71206","./Math-119be1a3","./Cartesian4-3ca25aab","./buildModuleUrl-4e1b81e7","./RuntimeError-4a5c8994"],(function(e,t,n,a,r,i,s,o,u,l,d){"use strict";var c=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});function f(e,t,n,a){this[0]=r.defaultValue(e,0),this[1]=r.defaultValue(n,0),this[2]=r.defaultValue(t,0),this[3]=r.defaultValue(a,0)}f.packedLength=4,f.pack=function(e,t,n){return n=r.defaultValue(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t},f.unpack=function(e,t,n){return t=r.defaultValue(t,0),r.defined(n)||(n=new f),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n},f.clone=function(e,t){if(r.defined(e))return r.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new f(e[0],e[2],e[1],e[3])},f.fromArray=function(e,t,n){return t=r.defaultValue(t,0),r.defined(n)||(n=new f),n[0]=e[t],n[1]=e[t+1],n[2]=e[t+2],n[3]=e[t+3],n},f.fromColumnMajorArray=function(e,t){return f.clone(e,t)},f.fromRowMajorArray=function(e,t){return r.defined(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new f(e[0],e[1],e[2],e[3])},f.fromScale=function(e,t){return r.defined(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new f(e.x,0,0,e.y)},f.fromUniformScale=function(e,t){return r.defined(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new f(e,0,0,e)},f.fromRotation=function(e,t){var n=Math.cos(e),a=Math.sin(e);return r.defined(t)?(t[0]=n,t[1]=a,t[2]=-a,t[3]=n,t):new f(n,-a,a,n)},f.toArray=function(e,t){return r.defined(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},f.getElementIndex=function(e,t){return 2*e+t},f.getColumn=function(e,t,n){var a=2*t,r=e[a],i=e[a+1];return n.x=r,n.y=i,n},f.setColumn=function(e,t,n,a){var r=2*t;return(a=f.clone(e,a))[r]=n.x,a[r+1]=n.y,a},f.getRow=function(e,t,n){var a=e[t],r=e[t+2];return n.x=a,n.y=r,n},f.setRow=function(e,t,n,a){return(a=f.clone(e,a))[t]=n.x,a[t+2]=n.y,a};var h=new t.Cartesian2;f.getScale=function(e,n){return n.x=t.Cartesian2.magnitude(t.Cartesian2.fromElements(e[0],e[1],h)),n.y=t.Cartesian2.magnitude(t.Cartesian2.fromElements(e[2],e[3],h)),n};var m=new t.Cartesian2;function p(e,t,n,a){this.x=r.defaultValue(e,0),this.y=r.defaultValue(t,0),this.z=r.defaultValue(n,0),this.w=r.defaultValue(a,0)}f.getMaximumScale=function(e){return f.getScale(e,m),t.Cartesian2.maximumComponent(m)},f.multiply=function(e,t,n){var a=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],i=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=a,n[1]=i,n[2]=r,n[3]=s,n},f.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n},f.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n},f.multiplyByVector=function(e,t,n){var a=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return n.x=a,n.y=r,n},f.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n},f.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n},f.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},f.transpose=function(e,t){var n=e[0],a=e[2],r=e[1],i=e[3];return t[0]=n,t[1]=a,t[2]=r,t[3]=i,t},f.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},f.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},f.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]},f.equalsEpsilon=function(e,t,n){return e===t||r.defined(e)&&r.defined(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n},f.IDENTITY=Object.freeze(new f(1,0,0,1)),f.ZERO=Object.freeze(new f(0,0,0,0)),f.COLUMN0ROW0=0,f.COLUMN0ROW1=1,f.COLUMN1ROW0=2,f.COLUMN1ROW1=3,Object.defineProperties(f.prototype,{length:{get:function(){return f.packedLength}}}),f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f.prototype.equalsEpsilon=function(e,t){r
/**
@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.
*/function Z(){var e=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g,t=arguments,n=0,a=t[n++],r=function(e,t,n,a){n||(n=" ");var r=e.length>=t?"":Array(1+t-e.length>>>0).join(n);return a?e+r:r+e},i=function(e,t,n,a,i,s){var o=a-e.length;return o>0&&(e=n||!i?r(e,a,s,n):e.slice(0,t.length)+r("",o,"0",!0)+e.slice(t.length)),e},s=function(e,t,n,a,s,o,u){var l=e>>>0;return e=(n=n&&l&&{2:"0b",8:"0",16:"0x"}[t]||"")+r(l.toString(t),o||0,"0",!1),i(e,n,a,s,u)},o=function(e,t,n,a,r,s){return null!=a&&(e=e.slice(0,a)),i(e,"",t,n,r,s)},u=function(e,a,u,l,d,c,f){var h,m,p,y,w;if("%%"==e)return"%";for(var C=!1,x="",M=!1,_=!1,E=" ",O=u.length,v=0;u&&v<O;v++)switch(u.charAt(v)){case" ":x=" ";break;case"+":x="+";break;case"-":C=!0;break;case"'":E=u.charAt(v+1);break;case"0":M=!0;break;case"#":_=!0}if((l=l?"*"==l?+t[n++]:"*"==l.charAt(0)?+t[l.slice(1,-1)]:+l:0)<0&&(l=-l,C=!0),!isFinite(l))throw new Error("sprintf: (minimum-)width must be finite");switch(c=c?"*"==c?+t[n++]:"*"==c.charAt(0)?+t[c.slice(1,-1)]:+c:"fFeE".indexOf(f)>-1?6:"d"==f?0:void 0,w=a?t[a.slice(0,-1)]:t[n++],f){case"s":return o(String(w),C,l,c,M,E);case"c":return o(String.fromCharCode(+w),C,l,c,M);case"b":return s(w,2,_,C,l,c,M);case"o":return s(w,8,_,C,l,c,M);case"x":return s(w,16,_,C,l,c,M);case"X":return s(w,16,_,C,l,c,M).toUpperCase();case"u":return s(w,10,_,C,l,c,M);case"i":case"d":return h=+w||0,w=(m=(h=Math.round(h-h%1))<0?"-":x)+r(String(Math.abs(h)),c,"0",!1),i(w,m,C,l,M);case"e":case"E":case"f":case"F":case"g":case"G":return m=(h=+w)<0?"-":x,p=["toExponential","toFixed","toPrecision"]["efg".indexOf(f.toLowerCase())],y=["toString","toUpperCase"]["eEfFgG".indexOf(f)%2],w=m+Math.abs(h)[p](c),i(w,m,C,l,M)[y]();default:return e}};return a.replace(e,u)}function X(e,t,n,a,r,i,s,o){this.year=e,this.month=t,this.day=n,this.hour=a,this.minute=r,this.second=i,this.millisecond=s,this.isLeapSecond=o}function J(e){return e%4==0&&e%100!=0||e%400==0}function H(e,t){this.julianDate=e,this.offset=t}V[7]=F/136,W[7]=8*F/17,p.fastSlerp=function(e,t,n,a){var r,i=p.dot(e,t);i>=0?r=1:(r=-1,i=-i);for(var s=i-1,o=1-n,u=n*n,l=o*o,d=7;d>=0;--d)q[d]=(V[d]*u-W[d])*s,L[d]=(V[d]*l-W[d])*s;var c=r*n*(1+q[0]*(1+q[1]*(1+q[2]*(1+q[3]*(1+q[4]*(1+q[5]*(1+q[6]*(1+q[7])))))))),f=o*(1+L[0]*(1+L[1]*(1+L[2]*(1+L[3]*(1+L[4]*(1+L[5]*(1+L[6]*(1+L[7])))))))),h=p.multiplyByScalar(e,f,z);return p.multiplyByScalar(t,c,a),p.add(h,a,a)},p.fastSquad=function(e,t,n,a,r,i){var s=p.fastSlerp(e,t,r,U),o=p.fastSlerp(n,a,r,b);return p.fastSlerp(s,o,2*r*(1-r),i)},p.equals=function(e,t){return e===t||r.defined(e)&&r.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},p.equalsEpsilon=function(e,t,n){return e===t||r.defined(e)&&r.defined(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n},p.ZERO=Object.freeze(new p(0,0,0,0)),p.IDENTITY=Object.freeze(new p(0,0,0,1)),p.prototype.clone=function(e){return p.clone(this,e)},p.prototype.equals=function(e){return p.equals(this,e)},p.prototype.equalsEpsilon=function(e,t){return p.equalsEpsilon(this,e,t)},p.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"};var $=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:2400000.5}),Q=Object.freeze({UTC:0,TAI:1}),K=new X,ee=[31,28,31,30,31,30,31,31,30,31,30,31];function te(e,t){return ye.compare(e.julianDate,t.julianDate)}var ne=new H;function ae(e){ne.julianDate=e;var t=ye.leapSeconds,n=j(t,ne,te);n<0&&(n=~n),n>=t.length&&(n=t.length-1);var a=t[n].offset;n>0&&(ye.secondsDifference(t[n].julianDate,e)>a&&(a=t[--n].offset));ye.addSeconds(e,a,e)}function re(e,t){ne.julianDate=e;var n=ye.leapSeconds,a=j(n,ne,te);if(a<0&&(a=~a),0===a)return ye.addSeconds(e,-n[0].offset,t);if(a>=n.length)return ye.addSeconds(e,-n[a-1].offset,t);var r=ye.secondsDifference(n[a].julianDate,e);return 0===r?ye.addSeconds(e,-n[a].offset,t):r<=1?void 0:ye.add