/** * Cesium - https://github.com/CesiumGS/cesium * * Copyright 2011-2020 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details. */ var BASIS=function(){var Dr="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(Dr=Dr||__filename),function(e){var t,i,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,r){t=e,readyPromiseRejectza=r});var r,n={};for(r in a)a.hasOwnProperty(r)&&(n[r]=a[r]);var o,u,s=[],c=!1,f=!1;c="object"==typeof window,f="function"==typeof importScripts,o="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,u=!c&&!o&&!f;var l,p,d,h,v,y="";o?(y=f?require("path").dirname(y)+"/":__dirname+"/",l=function(e,r){return h||(h=require("fs")),v||(v=require("path")),e=v.normalize(e),h.readFileSync(e,r?null:"utf8")},d=function(e){var r=l(e,!0);return r.buffer||(r=new Uint8Array(r)),C(r.buffer),r},1>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i}function A(e,r){return e?P(W,e,r):""}var _,S,W,E,F,k,O,j,R,x="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function I(e,r){for(var t=e,n=t>>1,o=n+r/2;!(o<=n)&&F[n];)++n;if(32<(t=n<<1)-e&&x)return x.decode(W.subarray(e,t));for(var i="",a=0;!(r/2<=a);++a){var u=E[e+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function D(e,r,t){if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,i=0;i>1]=a,r+=2}return E[r>>1]=0,r-n}function U(e){return 2*e.length}function B(e,r){for(var t=0,n="";!(r/4<=t);){var o=k[e+4*t>>2];if(0==o)break;if(++t,65536<=o){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function M(e,r,t){if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,i=0;i>2]=a,o<(r+=4)+4)break}return k[r>>2]=0,r-n}function V(e){for(var r=0,t=0;t>2])}var fe={},le={},pe={},de=48,he=57;function ve(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return de<=r&&r<=he?"_"+e:e}function ye(e,r){return e=ve(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function me(e,t){var r=ye(t,function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),(r.prototype.constructor=r).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ge=void 0;function we(e){throw new ge(e)}function Te(n,r,o){function t(e){var r=o(e);r.length!==n.length&&we("Mismatched type converter count");for(var t=0;t>2)+n]);return t}function dr(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=ye(e.name||"unknownFunctionName",function(){});t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function hr(e,r,t,n,o){var i=r.length;i<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==r[1]&&null!==t,u=!1,s=1;s>>16),q(T.buffer),1}catch(e){}}var Fr={mappings:{},buffers:[null,[],[]],printChar:function(e,r){var t=Fr.buffers[e];0===r||10===r?((1===e?m:g)(P(t,0)),t.length=0):t.push(r)},varargs:void 0,get:function(){return Fr.varargs+=4,k[Fr.varargs-4>>2]},getStr:function(e){return A(e)},get64:function(e,r){return e}};ge=a.InternalError=me(Error,"InternalError"),function(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Ce=e}(),Pe=a.BindingError=me(Error,"BindingError"),Me.prototype.isAliasOf=Se,Me.prototype.clone=je,Me.prototype.delete=Re,Me.prototype.isDeleted=xe,Me.prototype.deleteLater=Be,ir.prototype.getPointee=Je,ir.prototype.destructor=Ke,ir.prototype.argPackAdvance=8,ir.prototype.readValueFromPointer=ce,ir.prototype.deleteObject=Qe,ir.prototype.fromWireType=or,a.getInheritedInstanceCount=Ye,a.getLiveInheritedInstances=Ze,a.flushPendingDeletes=Ue,a.setDelayFunction=er,cr=a.UnboundTypeError=me(Error,"UnboundTypeError"),a.count_emval_handles=gr,a.get_first_emval=wr;var kr,Or={t:function(e){var r=ue[e];delete ue[e];var o=r.rawConstructor,i=r.rawDestructor,l=r.fields;Te([e],l.map(function(e){return e.getterReturnType}).concat(l.map(function(e){return e.setterArgumentType})),function(c){var f={};return l.forEach(function(e,r){var t=e.fieldName,n=c[r],o=e.getter,i=e.getterContext,a=c[r+l.length],u=e.setter,s=e.setterContext;f[t]={read:function(e){return n.fromWireType(o(i,e))},write:function(e,r){var t=[];u(s,e,a.toWireType(t,r)),se(t)}}}),[{name:r.name,fromWireType:function(e){var r={};for(var t in f)r[t]=f[t].read(e);return i(e),r},toWireType:function(e,r){for(var t in f)if(!(t in r))throw new TypeError('Missing field: "'+t+'"');var n=o();for(t in f)f[t].write(n,r[t]);return null!==e&&e.push(i,n),n},argPackAdvance:8,readValueFromPointer:ce,destructorFunction:i}]})},I:function(e,t,n,o,i){var a=be(n);_e(e,{name:t=$e(t),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?o:i},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===n)r=S;else if(2===n)r=E;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=k}return this.fromWireType(r[e>>a])},destructorFunction:null})},x:function(c,e,r,f,t,l,n,p,o,d,h,i,v){h=$e(h),l=sr(t,l),p&&(p=sr(n,p)),d&&(d=sr(o,d)),v=sr(i,v);var y=ve(h);He(y,function(){lr("Cannot construct "+h+" due to unbound types",[f])}),Te([c,e,r],f?[f]:[],function(e){var r,t;e=e[0],t=f?(r=e.registeredClass).instancePrototype:Me.prototype;var n=ye(y,function(){if(Object.getPrototypeOf(this)!==o)throw new Pe("Use 'new' to construct "+h);if(void 0===i.constructor_body)throw new Pe(h+" has no accessible constructor");var e=i.constructor_body[arguments.length];if(void 0===e)throw new Pe("Tried to invoke ctor of "+h+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(i.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),o=Object.create(t,{constructor:{value:n}});n.prototype=o;var i=new ze(h,n,o,v,r,l,p,d),a=new ir(h,i,!0,!1,!1),u=new ir(h+"*",i,!1,!1,!1),s=new ir(h+" const*",i,!1,!0,!1);return Ve[c]={pointerType:u,constPointerType:s},ar(y,n),[a,u,s]})},w:function(e,o,r,t,i,n){C(0>1])};case 2:return function(e){var r=t?k:O;return this.fromWireType(r[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}(r,o,n),destructorFunction:null}),He(r,i)},a:function(e,r,t){var n=br(e,"enum");r=$e(r);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:ye(n.name+"_"+r,function(){})}});o.values[t]=i,o[r]=i},A:function(e,r,t){var n=be(t);_e(e,{name:r=$e(r),fromWireType:function(e){return e},toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Cr(r)+'" to '+this.name);return r},argPackAdvance:8,readValueFromPointer:function(e,r){switch(r){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(r,n),destructorFunction:null})},i:function(t,n,e,r,o,i){var a=pr(n,e);t=$e(t),o=sr(r,o),He(t,function(){lr("Cannot call "+t+" due to unbound types",a)},n-1),Te([],a,function(e){var r=[e[0],null].concat(e.slice(1));return ar(t,hr(t,r,null,o,i),n-1),[]})},j:function(e,t,r,n,o){t=$e(t),-1===o&&(o=4294967295);var i=be(r),a=function(e){return e};if(0===n){var u=32-8*r;a=function(e){return e<>>u}}var s=-1!=t.indexOf("unsigned");_e(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Cr(r)+'" to '+this.name);if(r>>0:0|r},argPackAdvance:8,readValueFromPointer:function(e,r,t){switch(r){case 0:return t?function(e){return S[e]}:function(e){return W[e]};case 1:return t?function(e){return E[e>>1]}:function(e){return F[e>>1]};case 2:return t?function(e){return k[e>>2]}:function(e){return O[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(t,i,0!==n),destructorFunction:null})},h:function(e,r,t){var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function n(e){var r=O,t=r[e>>=2],n=r[e+1];return new o(_,n,t)}_e(e,{name:t=$e(t),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},B:function(e,r){var s="std::string"===(r=$e(r));_e(e,{name:r,fromWireType:function(e){var r,t=O[e>>2];if(s)for(var n=e+4,o=0;o<=t;++o){var i=e+4+o;if(o==t||0==W[i]){var a=A(n,i-n);void 0===r?r=a:(r+=String.fromCharCode(0),r+=a),n=i+1}}else{var u=new Array(t);for(o=0;o>2]=n,s&&t)!function(e,r,t,n){if(0>6,r[t++]=128|63&a}else if(a<=65535){if(o<=t+2)break;r[t++]=224|a>>12,r[t++]=128|a>>6&63,r[t++]=128|63&a}else{if(o<=t+3)break;r[t++]=240|a>>18,r[t++]=128|a>>12&63,r[t++]=128|a>>6&63,r[t++]=128|63&a}}r[t]=0}}(r,W,o+4,n+1);else if(t)for(var i=0;i>2],n=f(),o=e+4,i=0;i<=t;++i){var a=e+4+i*s;if(i==t||0==n[a>>l]){var u=c(o,a-o);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),o=a+s}}return Rr(e),r},toWireType:function(e,r){"string"!=typeof r&&Ae("Cannot pass non-string to C++ string type "+o);var t=a(r),n=jr(4+t+s);return O[n>>2]=t>>l,i(r,n+4,t+s),null!==e&&e.push(Rr,n),n},argPackAdvance:8,readValueFromPointer:ce,destructorFunction:function(e){Rr(e)}})},u:function(e,r,t,n,o,i){ue[e]={name:$e(r),rawConstructor:sr(t,n),rawDestructor:sr(o,i),fields:[]}},c:function(e,r,t,n,o,i,a,u,s,c){ue[e].fields.push({fieldName:$e(r),getterReturnType:t,getter:sr(n,o),getterContext:i,setterArgumentType:a,setter:sr(u,s),setterContext:c})},J:function(e,r){_e(e,{isVoid:!0,name:r=$e(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})},m:function(e,r,t){e=$r(e),r=br(r,"emval::as");var n=[],o=Tr(n);return k[t>>2]=o,r.toWireType(n,e)},s:function(e,r,t,n){(e=_r[e])(r=$r(r),t=Ar(t),null,n)},b:mr,y:function(e){return 0===e?Tr(Sr()):(e=Ar(e),Tr(Sr()[e]))},p:function(e,r){for(var t=function(e,r){for(var t=new Array(e),n=0;n>2)+n],"parameter "+n);return t}(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map(function(e){return e.name}).join("_")+"$",i=["retType"],a=[n],u="",s=0;s>> 2) + "+t+'], "parameter '+t+'");\nvar arg'+t+" = argType"+t+".readValueFromPointer(args);\nargs += argType"+t+"['argPackAdvance'];\n";return n+="var obj = new constructor("+r+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(br,a,Tr)}(r),Wr[r]=o),o(e,t,n)},f:function(e){return Tr(Ar(e))},l:function(e){se(yr[e].value),mr(e)},o:function(){Q()},E:function(e,r,t){W.copyWithin(e,r,r+t)},F:function(e){var r,t,n=W.length,o=2147483648;if(o<(e>>>=0))return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,e+100663296),Er(Math.min(o,(0<(r=Math.max(e,a))%(t=65536)&&(r+=t-r%t),r))))return!0}return!1},G:function(e){return 0},C:function(e,r,t,n,o){},z:function(e,r,t,n){for(var o=0,i=0;i>2],u=k[r+(8*i+4)>>2],s=0;s>2]=o,0},D:function(e){0|e}},jr=(function(){var r={a:Or};function t(e,r){var t,n=e.exports;a.asm=n,q((T=a.asm.K).buffer),H=a.asm.O,t=a.asm.L,N.unshift(t),function(e){if(X--,a.monitorRunDependencies&&a.monitorRunDependencies(X),0==X&&(null!==J&&(clearInterval(J),J=null),K)){var r=K;K=null,r()}}()}function n(e){t(e.instance)}function o(e){return function(){if(!w&&(c||f)){if("function"==typeof fetch&&!te(oe))return fetch(oe,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+oe+"'";return e.arrayBuffer()}).catch(function(){return ie(oe)});if(p)return new Promise(function(r,e){p(oe,function(e){r(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return ie(oe)})}().then(function(e){return WebAssembly.instantiate(e,r)}).then(e,function(e){g("failed to asynchronously prepare wasm: "+e),Q(e)})}if(X++,a.monitorRunDependencies&&a.monitorRunDependencies(X),a.instantiateWasm)try{return a.instantiateWasm(r,t)}catch(e){return g("Module.instantiateWasm callback failed with error: "+e)}(w||"function"!=typeof WebAssembly.instantiateStreaming||ee(oe)||te(oe)||"function"!=typeof fetch?o(n):fetch(oe,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,r).then(n,function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),o(n)})})).catch(i)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.L).apply(null,arguments)},a._malloc=function(){return(jr=a._malloc=a.asm.M).apply(null,arguments)}),Rr=a._free=function(){return(Rr=a._free=a.asm.N).apply(null,arguments)},xr=a.___getTypeName=function(){return(xr=a.___getTypeName=a.asm.P).apply(null,arguments)};a.___embind_register_native_and_builtin_types=function(){return(a.___embind_register_native_and_builtin_types=a.asm.Q).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.R).apply(null,arguments)};function Ir(e){function r(){kr||(kr=!0,a.calledRun=!0,b||(!0,ae(N),ae(G),t(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)e=a.postRun.shift(),L.unshift(e);var e;ae(L)}()))}e=e||s,0